commit 7525a8c4b51d0b8e9069ea4518c9fe08d510a54c Author: wangxy <1481820854@qq.com> Date: Tue May 20 15:13:38 2025 +0800 档案代码提交 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 0000000..e76d1f3 --- /dev/null +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..2cc7d4a Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..a9f1ef8 --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/README.md b/README.md new file mode 100644 index 0000000..ed8eb9b --- /dev/null +++ b/README.md @@ -0,0 +1,90 @@ +## 平台简介 + +一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适的。于是利用空闲休息时间开始自己写了一套后台系统。如此有了若依。她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。 + +性别男,若依是给女儿取的名字(寓意:你若不离不弃,我必生死相依) + +若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。 + +* 前后端分离版本,请移步[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud) +* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)   +* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)   + +## 内置功能 + +1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。 +2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。 +3. 岗位管理:配置系统用户所属担任职务。 +4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。 +5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。 +6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。 +7. 参数管理:对系统动态配置常用参数。 +8. 通知公告:系统通知公告信息发布维护。 +9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。 +10. 登录日志:系统登录日志记录查询包含登录异常。 +11. 在线用户:当前系统中活跃用户状态监控。 +12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。 +13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。 +14. 系统接口:根据业务代码自动生成相关的api接口文档。 +15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。 +16. 缓存监控:对系统的缓存查询,删除、清空等操作。 +17. 在线构建器:拖动表单元素生成相应的HTML代码。 +18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。 + +## 在线体验 + +- admin/admin123 +- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。 + +演示地址:http://ruoyi.vip +文档地址:http://doc.ruoyi.vip + +## 演示图 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +## 若依交流群 + +QQ群: [![加入QQ群](https://img.shields.io/badge/已满-1389287-blue.svg)](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [![加入QQ群](https://img.shields.io/badge/已满-1679294-blue.svg)](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [![加入QQ群](https://img.shields.io/badge/已满-1529866-blue.svg)](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [![加入QQ群](https://img.shields.io/badge/已满-1772718-blue.svg)](https://jq.qq.com/?_wv=1027&k=5g75dCU) [![加入QQ群](https://img.shields.io/badge/已满-1366522-blue.svg)](https://jq.qq.com/?_wv=1027&k=58cPoHA) [![加入QQ群](https://img.shields.io/badge/已满-1382251-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [![加入QQ群](https://img.shields.io/badge/已满-1145125-blue.svg)](https://jq.qq.com/?_wv=1027&k=5yugASz) [![加入QQ群](https://img.shields.io/badge/已满-86752435-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [![加入QQ群](https://img.shields.io/badge/已满-134072510-blue.svg)](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [![加入QQ群](https://img.shields.io/badge/已满-210336300-blue.svg)](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [![加入QQ群](https://img.shields.io/badge/已满-339522636-blue.svg)](https://jq.qq.com/?_wv=1027&k=5omzbKc) [![加入QQ群](https://img.shields.io/badge/已满-130035985-blue.svg)](https://jq.qq.com/?_wv=1027&k=qPIKBb7s) [![加入QQ群](https://img.shields.io/badge/已满-143151071-blue.svg)](https://jq.qq.com/?_wv=1027&k=4NsjKbtU) [![加入QQ群](https://img.shields.io/badge/已满-158781320-blue.svg)](https://jq.qq.com/?_wv=1027&k=VD2pkz2G) [![加入QQ群](https://img.shields.io/badge/已满-201531282-blue.svg)](https://jq.qq.com/?_wv=1027&k=HlshFwkJ) [![加入QQ群](https://img.shields.io/badge/已满-101526938-blue.svg)](https://jq.qq.com/?_wv=1027&k=0ARRrO9V) [![加入QQ群](https://img.shields.io/badge/264355400-blue.svg)](https://jq.qq.com/?_wv=1027&k=up9k3ZXJ) \ No newline at end of file diff --git a/doc/若依环境使用手册.docx b/doc/若依环境使用手册.docx new file mode 100644 index 0000000..fa5b62d Binary files /dev/null and b/doc/若依环境使用手册.docx differ diff --git a/mvnw b/mvnw new file mode 100644 index 0000000..a16b543 --- /dev/null +++ b/mvnw @@ -0,0 +1,310 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..c8d4337 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,182 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + +FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..abc60fd --- /dev/null +++ b/pom.xml @@ -0,0 +1,424 @@ + + + 4.0.0 + + com.archive + archive + 4.6.0 + jar + + archive + http://www.archive.vip + 档案管理系统 + + + org.springframework.boot + spring-boot-starter-parent + 2.2.13.RELEASE + + + + + UTF-8 + UTF-8 + 1.8 + 3.1.1 + 1.7.1 + 2.0.0 + 2.1.3 + 1.3.0 + 1.2.75 + 1.2.4 + 2.5 + 1.3.3 + 1.21 + 1.7 + 2.3.2 + 2.9.2 + 4.1.2 + 5.6.0 + 5.7.0 + + + + + + + org.springframework.boot + spring-boot-starter + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + org.springframework.boot + spring-boot-starter-aop + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + + org.springframework.boot + spring-boot-devtools + true + + + + + mysql + mysql-connector-java + + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis.spring.boot.starter.version} + + + + + com.github.pagehelper + pagehelper-spring-boot-starter + ${pagehelper.spring.boot.starter.version} + + + + + + + net.sourceforge.tess4j + tess4j + 4.1.1 + + + + + com.alibaba + druid-spring-boot-starter + ${druid.version} + + + + + org.apache.commons + commons-lang3 + + + + + commons-io + commons-io + ${commons.io.version} + + + + + commons-fileupload + commons-fileupload + ${commons.fileupload.version} + + + + + org.apache.shiro + shiro-core + ${shiro.version} + + + + + org.apache.shiro + shiro-spring + ${shiro.version} + + + + + org.apache.shiro + shiro-ehcache + ${shiro.version} + + + + + com.github.theborakompanioni + thymeleaf-extras-shiro + ${thymeleaf.extras.shiro.version} + + + + + com.alibaba + fastjson + ${fastjson.version} + + + + + eu.bitwalker + UserAgentUtils + ${bitwalker.version} + + + + + org.springframework + spring-context-support + + + + + org.quartz-scheduler + quartz + + + com.mchange + c3p0 + + + + + + + org.apache.velocity + velocity + ${velocity.version} + + + + + com.github.penggle + kaptcha + ${kaptcha.version} + + + javax.servlet-api + javax.servlet + + + + + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + io.swagger + swagger-annotations + + + io.swagger + swagger-models + + + + + + + io.swagger + swagger-annotations + 1.5.21 + + + + io.swagger + swagger-models + 1.5.21 + + + + + + + + com.itextpdf + itext-asian + 5.2.0 + + + + com.itextpdf + itextpdf + 5.5.10 + + + org.xhtmlrenderer + flying-saucer-pdf-itext5 + 9.0.3 + + + + + com.luhuiguo + aspose-cells + 22.4 + + + org.javassist + javassist + 3.20.0-GA + + + + + org.ofdrw + ofdrw-converter + 1.17.18 + + + + org.ansj + ansj_seg + 5.1.6 + + + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + + + com.github.oshi + oshi-core + ${oshi.version} + + + + org.apache.tika + tika-parsers + 1.24.1 + + + + com.belerweb + pinyin4j + 2.5.0 + + + + + org.apache.poi + ooxml-schemas + 1.4 + + + org.apache.poi + poi-ooxml-full + 5.1.0 + + + org.apache.xmlbeans + xmlbeans + 3.1.0 + + + + + org.springframework + spring-test + 5.3.14 + compile + + + + + + org.xerial + sqlite-jdbc + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + + com.e-iceblue + https://repo.e-iceblue.cn/repository/maven-public/ + + true + + + + + AsposeJavaAPI + Aspose Java API + https://repository.aspose.com/repo/ + + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + false + + + + + + \ No newline at end of file diff --git a/sql/quartz.sql b/sql/quartz.sql new file mode 100644 index 0000000..cee613b --- /dev/null +++ b/sql/quartz.sql @@ -0,0 +1,174 @@ +DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS; +DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE; +DROP TABLE IF EXISTS QRTZ_LOCKS; +DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_JOB_DETAILS; +DROP TABLE IF EXISTS QRTZ_CALENDARS; + +-- ---------------------------- +-- 1、存储每一个已配置的 jobDetail 的详细信息 +-- ---------------------------- +create table QRTZ_JOB_DETAILS ( + sched_name varchar(120) not null comment '调度名称', + job_name varchar(200) not null comment '任务名称', + job_group varchar(200) not null comment '任务组名', + description varchar(250) null comment '相关介绍', + job_class_name varchar(250) not null comment '执行任务类名称', + is_durable varchar(1) not null comment '是否持久化', + is_nonconcurrent varchar(1) not null comment '是否并发', + is_update_data varchar(1) not null comment '是否更新数据', + requests_recovery varchar(1) not null comment '是否接受恢复执行', + job_data blob null comment '存放持久化job对象', + primary key (sched_name, job_name, job_group) +) engine=innodb comment = '任务详细信息表'; + +-- ---------------------------- +-- 2、 存储已配置的 Trigger 的信息 +-- ---------------------------- +create table QRTZ_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment '触发器的名字', + trigger_group varchar(200) not null comment '触发器所属组的名字', + job_name varchar(200) not null comment 'qrtz_job_details表job_name的外键', + job_group varchar(200) not null comment 'qrtz_job_details表job_group的外键', + description varchar(250) null comment '相关介绍', + next_fire_time bigint(13) null comment '上一次触发时间(毫秒)', + prev_fire_time bigint(13) null comment '下一次触发时间(默认为-1表示不触发)', + priority integer null comment '优先级', + trigger_state varchar(16) not null comment '触发器状态', + trigger_type varchar(8) not null comment '触发器的类型', + start_time bigint(13) not null comment '开始时间', + end_time bigint(13) null comment '结束时间', + calendar_name varchar(200) null comment '日程表名称', + misfire_instr smallint(2) null comment '补偿执行的策略', + job_data blob null comment '存放持久化job对象', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, job_name, job_group) references QRTZ_JOB_DETAILS(sched_name, job_name, job_group) +) engine=innodb comment = '触发器详细信息表'; + +-- ---------------------------- +-- 3、 存储简单的 Trigger,包括重复次数,间隔,以及已触发的次数 +-- ---------------------------- +create table QRTZ_SIMPLE_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + repeat_count bigint(7) not null comment '重复的次数统计', + repeat_interval bigint(12) not null comment '重复的间隔时间', + times_triggered bigint(10) not null comment '已经触发的次数', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) engine=innodb comment = '简单触发器的信息表'; + +-- ---------------------------- +-- 4、 存储 Cron Trigger,包括 Cron 表达式和时区信息 +-- ---------------------------- +create table QRTZ_CRON_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + cron_expression varchar(200) not null comment 'cron表达式', + time_zone_id varchar(80) comment '时区', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) engine=innodb comment = 'Cron类型的触发器表'; + +-- ---------------------------- +-- 5、 Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型,JobStore 并不知道如何存储实例的时候) +-- ---------------------------- +create table QRTZ_BLOB_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + blob_data blob null comment '存放持久化Trigger对象', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) engine=innodb comment = 'Blob类型的触发器表'; + +-- ---------------------------- +-- 6、 以 Blob 类型存储存放日历信息, quartz可配置一个日历来指定一个时间范围 +-- ---------------------------- +create table QRTZ_CALENDARS ( + sched_name varchar(120) not null comment '调度名称', + calendar_name varchar(200) not null comment '日历名称', + calendar blob not null comment '存放持久化calendar对象', + primary key (sched_name, calendar_name) +) engine=innodb comment = '日历信息表'; + +-- ---------------------------- +-- 7、 存储已暂停的 Trigger 组的信息 +-- ---------------------------- +create table QRTZ_PAUSED_TRIGGER_GRPS ( + sched_name varchar(120) not null comment '调度名称', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + primary key (sched_name, trigger_group) +) engine=innodb comment = '暂停的触发器表'; + +-- ---------------------------- +-- 8、 存储与已触发的 Trigger 相关的状态信息,以及相联 Job 的执行信息 +-- ---------------------------- +create table QRTZ_FIRED_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + entry_id varchar(95) not null comment '调度器实例id', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + instance_name varchar(200) not null comment '调度器实例名', + fired_time bigint(13) not null comment '触发的时间', + sched_time bigint(13) not null comment '定时器制定的时间', + priority integer not null comment '优先级', + state varchar(16) not null comment '状态', + job_name varchar(200) null comment '任务名称', + job_group varchar(200) null comment '任务组名', + is_nonconcurrent varchar(1) null comment '是否并发', + requests_recovery varchar(1) null comment '是否接受恢复执行', + primary key (sched_name, entry_id) +) engine=innodb comment = '已触发的触发器表'; + +-- ---------------------------- +-- 9、 存储少量的有关 Scheduler 的状态信息,假如是用于集群中,可以看到其他的 Scheduler 实例 +-- ---------------------------- +create table QRTZ_SCHEDULER_STATE ( + sched_name varchar(120) not null comment '调度名称', + instance_name varchar(200) not null comment '实例名称', + last_checkin_time bigint(13) not null comment '上次检查时间', + checkin_interval bigint(13) not null comment '检查间隔时间', + primary key (sched_name, instance_name) +) engine=innodb comment = '调度器状态表'; + +-- ---------------------------- +-- 10、 存储程序的悲观锁的信息(假如使用了悲观锁) +-- ---------------------------- +create table QRTZ_LOCKS ( + sched_name varchar(120) not null comment '调度名称', + lock_name varchar(40) not null comment '悲观锁名称', + primary key (sched_name, lock_name) +) engine=innodb comment = '存储的悲观锁信息表'; + +-- ---------------------------- +-- 11、 Quartz集群实现同步机制的行锁表 +-- ---------------------------- +create table QRTZ_SIMPROP_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + str_prop_1 varchar(512) null comment 'String类型的trigger的第一个参数', + str_prop_2 varchar(512) null comment 'String类型的trigger的第二个参数', + str_prop_3 varchar(512) null comment 'String类型的trigger的第三个参数', + int_prop_1 int null comment 'int类型的trigger的第一个参数', + int_prop_2 int null comment 'int类型的trigger的第二个参数', + long_prop_1 bigint null comment 'long类型的trigger的第一个参数', + long_prop_2 bigint null comment 'long类型的trigger的第二个参数', + dec_prop_1 numeric(13,4) null comment 'decimal类型的trigger的第一个参数', + dec_prop_2 numeric(13,4) null comment 'decimal类型的trigger的第二个参数', + bool_prop_1 varchar(1) null comment 'Boolean类型的trigger的第一个参数', + bool_prop_2 varchar(1) null comment 'Boolean类型的trigger的第二个参数', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) engine=innodb comment = '同步机制的行锁表'; + +commit; \ No newline at end of file diff --git a/sql/ruoyi.html b/sql/ruoyi.html new file mode 100644 index 0000000..abd2596 --- /dev/null +++ b/sql/ruoyi.html @@ -0,0 +1,2890 @@ + + + + +RuoYi + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RuoYi + Move the mouse over tables & columns to read the comments. + + + + + + + Fk qrtz_blob_triggers_ibfk_1 +qrtz_blob_triggers ref qrtz_triggers ( sched_name, trigger_name, trigger_group ) + + +sched_name,trigger_name,trigger_group + + + Fk qrtz_cron_triggers_ibfk_1 +qrtz_cron_triggers ref qrtz_triggers ( sched_name, trigger_name, trigger_group ) + + +sched_name,trigger_name,trigger_group + + + Fk qrtz_simple_triggers_ibfk_1 +qrtz_simple_triggers ref qrtz_triggers ( sched_name, trigger_name, trigger_group ) + + +sched_name,trigger_name,trigger_group + + + Fk qrtz_simprop_triggers_ibfk_1 +qrtz_simprop_triggers ref qrtz_triggers ( sched_name, trigger_name, trigger_group ) + + +sched_name,trigger_name,trigger_group + + + Fk qrtz_triggers_ibfk_1 +qrtz_triggers ref qrtz_job_details ( sched_name, job_name, job_group ) + + +sched_name,job_name,job_group + + + + + + + +qrtz_blob_triggersTable ry.qrtz_blob_triggers + Pk pk_qrtz_blob_triggers ( sched_name, trigger_name, trigger_group ) +sched_namesched_name +* varchar(120) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + Pk pk_qrtz_blob_triggers ( sched_name, trigger_name, trigger_group ) +trigger_nametrigger_name +* varchar(200) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + Pk pk_qrtz_blob_triggers ( sched_name, trigger_name, trigger_group ) +trigger_grouptrigger_group +* varchar(200) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + blob_datablob_data +blob +~ + + + + + + + +qrtz_calendarsTable ry.qrtz_calendars + Pk pk_qrtz_calendars ( sched_name, calendar_name ) +sched_namesched_name +* varchar(120) +t Pk pk_qrtz_calendars ( sched_name, calendar_name ) +calendar_namecalendar_name +* varchar(200) +t calendarcalendar +* blob +~ + + + + + + + +qrtz_cron_triggersTable ry.qrtz_cron_triggers + Pk pk_qrtz_cron_triggers ( sched_name, trigger_name, trigger_group ) +sched_namesched_name +* varchar(120) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + Pk pk_qrtz_cron_triggers ( sched_name, trigger_name, trigger_group ) +trigger_nametrigger_name +* varchar(200) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + Pk pk_qrtz_cron_triggers ( sched_name, trigger_name, trigger_group ) +trigger_grouptrigger_group +* varchar(200) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + cron_expressioncron_expression +* varchar(200) +t time_zone_idtime_zone_id +varchar(80) +t + + + + + + + +qrtz_job_detailsTable ry.qrtz_job_details + Pk pk_qrtz_job_details ( sched_name, job_name, job_group ) +sched_namesched_name +* varchar(120) +Referred by qrtz_triggers ( sched_name, job_name, job_group ) + Pk pk_qrtz_job_details ( sched_name, job_name, job_group ) +job_namejob_name +* varchar(200) +Referred by qrtz_triggers ( sched_name, job_name, job_group ) + Pk pk_qrtz_job_details ( sched_name, job_name, job_group ) +job_groupjob_group +* varchar(200) +Referred by qrtz_triggers ( sched_name, job_name, job_group ) + descriptiondescription +varchar(250) +t job_class_namejob_class_name +* varchar(250) +t is_durableis_durable +* varchar(1) +t is_nonconcurrentis_nonconcurrent +* varchar(1) +t is_update_datais_update_data +* varchar(1) +t requests_recoveryrequests_recovery +* varchar(1) +t job_datajob_data +blob +~ + + + + + + + +qrtz_locksTable ry.qrtz_locks + Pk pk_qrtz_locks ( sched_name, lock_name ) +sched_namesched_name +* varchar(120) +t Pk pk_qrtz_locks ( sched_name, lock_name ) +lock_namelock_name +* varchar(40) +t + + + + + + + +qrtz_scheduler_stateTable ry.qrtz_scheduler_state + Pk pk_qrtz_scheduler_state ( sched_name, instance_name ) +sched_namesched_name +* varchar(120) +t Pk pk_qrtz_scheduler_state ( sched_name, instance_name ) +instance_nameinstance_name +* varchar(200) +t last_checkin_timelast_checkin_time +* bigint +# checkin_intervalcheckin_interval +* bigint +# + + + + + + + +qrtz_simple_triggersTable ry.qrtz_simple_triggers + Pk pk_qrtz_simple_triggers ( sched_name, trigger_name, trigger_group ) +sched_namesched_name +* varchar(120) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + Pk pk_qrtz_simple_triggers ( sched_name, trigger_name, trigger_group ) +trigger_nametrigger_name +* varchar(200) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + Pk pk_qrtz_simple_triggers ( sched_name, trigger_name, trigger_group ) +trigger_grouptrigger_group +* varchar(200) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + repeat_countrepeat_count +* bigint +# repeat_intervalrepeat_interval +* bigint +# times_triggeredtimes_triggered +* bigint +# + + + + + + + +qrtz_simprop_triggersTable ry.qrtz_simprop_triggers + Pk pk_qrtz_simprop_triggers ( sched_name, trigger_name, trigger_group ) +sched_namesched_name +* varchar(120) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + Pk pk_qrtz_simprop_triggers ( sched_name, trigger_name, trigger_group ) +trigger_nametrigger_name +* varchar(200) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + Pk pk_qrtz_simprop_triggers ( sched_name, trigger_name, trigger_group ) +trigger_grouptrigger_group +* varchar(200) +References qrtz_triggers ( sched_name, trigger_name, trigger_group ) + str_prop_1str_prop_1 +varchar(512) +t str_prop_2str_prop_2 +varchar(512) +t str_prop_3str_prop_3 +varchar(512) +t int_prop_1int_prop_1 +int +# int_prop_2int_prop_2 +int +# long_prop_1long_prop_1 +bigint +# long_prop_2long_prop_2 +bigint +# dec_prop_1dec_prop_1 +decimal(13,4) +# dec_prop_2dec_prop_2 +decimal(13,4) +# bool_prop_1bool_prop_1 +varchar(1) +t bool_prop_2bool_prop_2 +varchar(1) +t + + + + + + + +qrtz_triggersTable ry.qrtz_triggers + Pk pk_qrtz_triggers ( sched_name, trigger_name, trigger_group ) sched_name ( sched_name, job_name, job_group ) +sched_namesched_name +* varchar(120) +References qrtz_job_details ( sched_name, job_name, job_group ) +Referred by qrtz_blob_triggers ( sched_name, trigger_name, trigger_group ) +Referred by qrtz_cron_triggers ( sched_name, trigger_name, trigger_group ) +Referred by qrtz_simple_triggers ( sched_name, trigger_name, trigger_group ) +Referred by qrtz_simprop_triggers ( sched_name, trigger_name, trigger_group ) + Pk pk_qrtz_triggers ( sched_name, trigger_name, trigger_group ) +trigger_nametrigger_name +* varchar(200) +Referred by qrtz_blob_triggers ( sched_name, trigger_name, trigger_group ) +Referred by qrtz_cron_triggers ( sched_name, trigger_name, trigger_group ) +Referred by qrtz_simple_triggers ( sched_name, trigger_name, trigger_group ) +Referred by qrtz_simprop_triggers ( sched_name, trigger_name, trigger_group ) + Pk pk_qrtz_triggers ( sched_name, trigger_name, trigger_group ) +trigger_grouptrigger_group +* varchar(200) +Referred by qrtz_blob_triggers ( sched_name, trigger_name, trigger_group ) +Referred by qrtz_cron_triggers ( sched_name, trigger_name, trigger_group ) +Referred by qrtz_simple_triggers ( sched_name, trigger_name, trigger_group ) +Referred by qrtz_simprop_triggers ( sched_name, trigger_name, trigger_group ) + sched_name ( sched_name, job_name, job_group ) +job_namejob_name +* varchar(200) +References qrtz_job_details ( sched_name, job_name, job_group ) + sched_name ( sched_name, job_name, job_group ) +job_groupjob_group +* varchar(200) +References qrtz_job_details ( sched_name, job_name, job_group ) + descriptiondescription +varchar(250) +t next_fire_timenext_fire_time +bigint +# prev_fire_timeprev_fire_time +bigint +# prioritypriority +int +# trigger_statetrigger_state +* varchar(16) +t trigger_typetrigger_type +* varchar(8) +t start_timestart_time +* bigint +# end_timeend_time +bigint +# calendar_namecalendar_name +varchar(200) +t misfire_instrmisfire_instr +smallint +# job_datajob_data +blob +~ + + + + + + + +sys_dict_dataTable ry.sys_dict_data + Pk pk_sys_dict_data ( dict_code ) +dict_codedict_code +* int +字典编码 +# dict_sortdict_sort +int default 0 +字典排序 +# dict_labeldict_label +varchar(100) default '' +字典标签 +t dict_valuedict_value +varchar(100) default '' +字典键值 +t dict_typedict_type +varchar(100) default '' +字典类型 +t statusstatus +int default 0 +状态(0正常 1禁用) +# create_bycreate_by +varchar(64) default '' +创建者 +t create_timecreate_time +* timestamp default CURRENT_TIMESTAMP +创建时间 +d update_byupdate_by +varchar(64) default '' +更新者 +t update_timeupdate_time +* timestamp default '0000-00-00 00:00:00' +更新时间 +d remarkremark +varchar(500) default '' +备注 +t + + + + + + + +sys_dict_typeTable ry.sys_dict_type + Pk pk_sys_dict_type ( dict_id ) +dict_iddict_id +* int +字典主键 +# dict_namedict_name +varchar(100) default '' +字典名称 +t Unq dict_type ( dict_type ) +dict_typedict_type +varchar(100) default '' +字典类型 +t statusstatus +int default 0 +状态(0正常 1禁用) +# create_bycreate_by +varchar(64) default '' +创建者 +t create_timecreate_time +* timestamp default CURRENT_TIMESTAMP +创建时间 +d update_byupdate_by +varchar(64) default '' +更新者 +t update_timeupdate_time +* timestamp default '0000-00-00 00:00:00' +更新时间 +d remarkremark +varchar(500) default '' +备注 +t + + + + + + + +sys_jobTable ry.sys_job + Pk pk_sys_job ( job_id, job_name, job_group ) +job_idjob_id +* int +任务ID +# Pk pk_sys_job ( job_id, job_name, job_group ) +job_namejob_name +* varchar(64) default '' +任务名称 +t Pk pk_sys_job ( job_id, job_name, job_group ) +job_groupjob_group +* varchar(64) default '' +任务组名 +t method_namemethod_name +varchar(500) default '' +任务方法 +t paramsparams +varchar(200) default '' +方法参数 +t cron_expressioncron_expression +varchar(255) default '' +cron执行表达式 +t statusstatus +int default 0 +状态(0正常 1暂停) +# create_bycreate_by +varchar(64) default '' +创建者 +t create_timecreate_time +* timestamp default CURRENT_TIMESTAMP +创建时间 +d update_byupdate_by +varchar(64) default '' +更新者 +t update_timeupdate_time +* timestamp default '0000-00-00 00:00:00' +更新时间 +d remarkremark +varchar(500) default '' +备注信息 +t + + + + + + + +sys_job_logTable ry.sys_job_log + Pk pk_sys_job_log ( job_log_id ) +job_log_idjob_log_id +* int +任务日志ID +# job_namejob_name +* varchar(64) +任务名称 +t job_groupjob_group +* varchar(64) +任务组名 +t method_namemethod_name +varchar(500) +任务方法 +t paramsparams +varchar(200) default '' +方法参数 +t job_messagejob_message +varchar(500) +日志信息 +t is_exceptionis_exception +int default 0 +是否异常 +# exception_infoexception_info +text +异常信息 +t create_timecreate_time +* timestamp default CURRENT_TIMESTAMP +创建时间 +d + + + + + + + +sys_logininforTable ry.sys_logininfor + Pk pk_sys_logininfor ( info_id ) +info_idinfo_id +* int +访问ID +# login_namelogin_name +varchar(50) default '' +登录账号 +t ipaddripaddr +varchar(50) default '' +登录IP地址 +t browserbrowser +varchar(50) default '' +浏览器类型 +t osos +varchar(50) default '' +操作系统 +t statusstatus +int default 0 +登录状态 0成功 1失败 +# msgmsg +varchar(255) default '' +提示消息 +t login_timelogin_time +* timestamp default CURRENT_TIMESTAMP +访问时间 +d + + + + + + + +sys_menuTable ry.sys_menu + Pk pk_sys_menu ( menu_id ) +menu_idmenu_id +* int +菜单ID +# menu_namemenu_name +* varchar(50) +菜单名称 +t parent_idparent_id +int default 0 +父菜单ID +# order_numorder_num +int +显示顺序 +# urlurl +varchar(200) default '' +请求地址 +t menu_typemenu_type +char(1) default '' +类型:M目录,C菜单,F按钮 +c visiblevisible +int default 0 +菜单状态:0显示,1隐藏 +# permsperms +varchar(100) default '' +权限标识 +t iconicon +varchar(100) default '' +菜单图标 +t create_bycreate_by +varchar(64) default '' +创建者 +t create_timecreate_time +* timestamp default CURRENT_TIMESTAMP +创建时间 +d update_byupdate_by +varchar(64) default '' +更新者 +t update_timeupdate_time +* timestamp default '0000-00-00 00:00:00' +更新时间 +d remarkremark +varchar(500) default '' +备注 +t + + + + + + + +sys_oper_logTable ry.sys_oper_log + Pk pk_sys_oper_log ( oper_id ) +oper_idoper_id +* int +日志主键 +# titletitle +varchar(50) default '' +模块标题 +t actionaction +varchar(100) default '' +功能请求 +t methodmethod +varchar(100) default '' +方法名称 +t channelchannel +varchar(20) default '' +来源渠道 +t login_namelogin_name +varchar(50) default '' +登录账号 +t dept_namedept_name +varchar(50) default '' +部门名称 +t oper_urloper_url +varchar(255) default '' +请求URL +t oper_ipoper_ip +varchar(30) default '' +主机地址 +t oper_paramoper_param +varchar(255) default '' +请求参数 +t statusstatus +int default 0 +操作状态 0正常 1异常 +# error_msgerror_msg +varchar(2000) default '' +错误消息 +t oper_timeoper_time +* timestamp default CURRENT_TIMESTAMP +操作时间 +d + + + + + + + +sys_postTable ry.sys_post + Pk pk_sys_post ( post_id ) +post_idpost_id +* int +岗位ID +# post_codepost_code +* varchar(64) +岗位编码 +t post_namepost_name +* varchar(100) +岗位名称 +t post_sortpost_sort +* int +显示顺序 +# statusstatus +* int +状态(0正常 1停用) +# create_bycreate_by +varchar(64) default '' +创建者 +t create_timecreate_time +* timestamp default CURRENT_TIMESTAMP +创建时间 +d update_byupdate_by +varchar(64) default '' +更新者 +t update_timeupdate_time +* timestamp default '0000-00-00 00:00:00' +更新时间 +d remarkremark +varchar(500) default '' +备注 +t + + + + + + + +sys_roleTable ry.sys_role + Pk pk_sys_role ( role_id ) +role_idrole_id +* int +角色ID +# role_namerole_name +* varchar(30) +角色名称 +t role_keyrole_key +* varchar(100) +角色权限字符串 +t role_sortrole_sort +* int +显示顺序 +# statusstatus +int default 0 +角色状态:0正常,1禁用 +# create_bycreate_by +varchar(64) default '' +创建者 +t create_timecreate_time +* timestamp default CURRENT_TIMESTAMP +创建时间 +d update_byupdate_by +varchar(64) default '' +更新者 +t update_timeupdate_time +* timestamp default '0000-00-00 00:00:00' +更新时间 +d remarkremark +varchar(500) default '' +备注 +t + + + + + + + +sys_role_menuTable ry.sys_role_menu + Pk pk_sys_role_menu ( role_id, menu_id ) +role_idrole_id +* int +角色ID +# Pk pk_sys_role_menu ( role_id, menu_id ) +menu_idmenu_id +* int +菜单ID +# + + + + + + + +sys_userTable ry.sys_user + Pk pk_sys_user ( user_id ) +user_iduser_id +* int +用户ID +# dept_iddept_id +int +部门ID +# login_namelogin_name +varchar(30) default '' +登录账号 +t user_nameuser_name +varchar(30) default '' +用户昵称 +t emailemail +varchar(100) default '' +用户邮箱 +t phonenumberphonenumber +varchar(20) default '' +手机号码 +t passwordpassword +varchar(100) default '' +密码 +t saltsalt +varchar(100) default '' +盐加密 +t user_typeuser_type +char(1) default 'N' +类型:Y默认用户,N非默认用户 +c statusstatus +int default 0 +帐号状态:0正常,1禁用 +# refuse_desrefuse_des +varchar(500) default '' +拒绝登录描述 +t create_bycreate_by +varchar(64) default '' +创建者 +t create_timecreate_time +* timestamp default CURRENT_TIMESTAMP +创建时间 +d update_byupdate_by +varchar(64) default '' +更新者 +t update_timeupdate_time +* timestamp default '0000-00-00 00:00:00' +更新时间 +d + + + + + + + +sys_user_onlineTable ry.sys_user_online + Pk pk_sys_user_online ( sessionId ) +sessionIdsessionId +* varchar(50) default '' +用户会话id +t login_namelogin_name +varchar(50) default '' +登录账号 +t dept_namedept_name +varchar(50) default '' +部门名称 +t ipaddripaddr +varchar(50) default '' +登录IP地址 +t browserbrowser +varchar(50) default '' +浏览器类型 +t osos +varchar(50) default '' +操作系统 +t statusstatus +varchar(10) default '' +在线状态on_line在线off_line离线 +t start_timestampstart_timestamp +* timestamp default CURRENT_TIMESTAMP +session创建时间 +d last_access_timelast_access_time +* timestamp default '0000-00-00 00:00:00' +session最后访问时间 +d expire_timeexpire_time +int default 0 +超时时间,单位为分钟 +# + + + + + + + +sys_user_postTable ry.sys_user_post + Pk pk_sys_user_post ( user_id, post_id ) +user_iduser_id +* varchar(64) +用户ID +t Pk pk_sys_user_post ( user_id, post_id ) +post_idpost_id +* varchar(64) +岗位ID +t + + + + + + + +sys_user_roleTable ry.sys_user_role + Pk pk_sys_user_role ( user_id, role_id ) +user_iduser_id +* int +用户ID +# Pk pk_sys_user_role ( user_id, role_id ) +role_idrole_id +* int +角色ID +# + + + + + + + +sys_deptTable ry.sys_dept + Pk pk_sys_dept ( dept_id ) +dept_iddept_id +* int +部门id +# parent_idparent_id +int default 0 +父部门id +# dept_namedept_name +varchar(30) default '' +部门名称 +t order_numorder_num +int default 0 +显示顺序 +# leaderleader +varchar(20) default '' +负责人 +t phonephone +varchar(20) default '' +联系电话 +t emailemail +varchar(20) default '' +邮箱 +t statusstatus +int default 0 +部门状态:0正常,1停用 +# create_bycreate_by +varchar(64) default '' +创建者 +t create_timecreate_time +* timestamp default CURRENT_TIMESTAMP +创建时间 +d update_byupdate_by +varchar(64) default '' +更新者 +t update_timeupdate_time +* timestamp default '0000-00-00 00:00:00' +更新时间 +d + + + + + + + +qrtz_paused_trigger_grpsTable ry.qrtz_paused_trigger_grps + Pk pk_qrtz_paused_trigger_grps ( sched_name, trigger_group ) +sched_namesched_name +* varchar(120) +t Pk pk_qrtz_paused_trigger_grps ( sched_name, trigger_group ) +trigger_grouptrigger_group +* varchar(200) +t + + + + + + + +qrtz_fired_triggersTable ry.qrtz_fired_triggers + Pk pk_qrtz_fired_triggers ( sched_name, entry_id ) +sched_namesched_name +* varchar(120) +t Pk pk_qrtz_fired_triggers ( sched_name, entry_id ) +entry_identry_id +* varchar(95) +t trigger_nametrigger_name +* varchar(200) +t trigger_grouptrigger_group +* varchar(200) +t instance_nameinstance_name +* varchar(200) +t fired_timefired_time +* bigint +# sched_timesched_time +* bigint +# prioritypriority +* int +# statestate +* varchar(16) +t job_namejob_name +varchar(200) +t job_groupjob_group +varchar(200) +t is_nonconcurrentis_nonconcurrent +varchar(1) +t requests_recoveryrequests_recovery +varchar(1) +t +
+ + +

+

Table qrtz_blob_triggers

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*trigger_name varchar( 200 )
*trigger_group varchar( 200 )
 blob_data blob
Indexes
pk_qrtz_blob_triggers ON sched_name, trigger_name, trigger_group
Foreign Keys
qrtz_blob_triggers_ibfk_1 ( sched_name, trigger_name, trigger_group ) ref qrtz_triggers (sched_name, trigger_name, trigger_group)
+ +

+

Table qrtz_calendars

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*calendar_name varchar( 200 )
*calendar blob
Indexes
pk_qrtz_calendars ON sched_name, calendar_name
+ +

+

Table qrtz_cron_triggers

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*trigger_name varchar( 200 )
*trigger_group varchar( 200 )
*cron_expression varchar( 200 )
 time_zone_id varchar( 80 )
Indexes
pk_qrtz_cron_triggers ON sched_name, trigger_name, trigger_group
Foreign Keys
qrtz_cron_triggers_ibfk_1 ( sched_name, trigger_name, trigger_group ) ref qrtz_triggers (sched_name, trigger_name, trigger_group)
+ +

+

Table qrtz_fired_triggers

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*entry_id varchar( 95 )
*trigger_name varchar( 200 )
*trigger_group varchar( 200 )
*instance_name varchar( 200 )
*fired_time bigint
*sched_time bigint
*priority int
*state varchar( 16 )
 job_name varchar( 200 )
 job_group varchar( 200 )
 is_nonconcurrent varchar( 1 )
 requests_recovery varchar( 1 )
Indexes
pk_qrtz_fired_triggers ON sched_name, entry_id
+ +

+

Table qrtz_job_details

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*job_name varchar( 200 )
*job_group varchar( 200 )
 description varchar( 250 )
*job_class_name varchar( 250 )
*is_durable varchar( 1 )
*is_nonconcurrent varchar( 1 )
*is_update_data varchar( 1 )
*requests_recovery varchar( 1 )
 job_data blob
Indexes
pk_qrtz_job_details ON sched_name, job_name, job_group
+ +

+

Table qrtz_locks

+ + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*lock_name varchar( 40 )
Indexes
pk_qrtz_locks ON sched_name, lock_name
+ +

+

Table qrtz_paused_trigger_grps

+ + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*trigger_group varchar( 200 )
Indexes
pk_qrtz_paused_trigger_grps ON sched_name, trigger_group
+ +

+

Table qrtz_scheduler_state

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*instance_name varchar( 200 )
*last_checkin_time bigint
*checkin_interval bigint
Indexes
pk_qrtz_scheduler_state ON sched_name, instance_name
+ +

+

Table qrtz_simple_triggers

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*trigger_name varchar( 200 )
*trigger_group varchar( 200 )
*repeat_count bigint
*repeat_interval bigint
*times_triggered bigint
Indexes
pk_qrtz_simple_triggers ON sched_name, trigger_name, trigger_group
Foreign Keys
qrtz_simple_triggers_ibfk_1 ( sched_name, trigger_name, trigger_group ) ref qrtz_triggers (sched_name, trigger_name, trigger_group)
+ +

+

Table qrtz_simprop_triggers

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*trigger_name varchar( 200 )
*trigger_group varchar( 200 )
 str_prop_1 varchar( 512 )
 str_prop_2 varchar( 512 )
 str_prop_3 varchar( 512 )
 int_prop_1 int
 int_prop_2 int
 long_prop_1 bigint
 long_prop_2 bigint
 dec_prop_1 decimal( 13, 4 )
 dec_prop_2 decimal( 13, 4 )
 bool_prop_1 varchar( 1 )
 bool_prop_2 varchar( 1 )
Indexes
pk_qrtz_simprop_triggers ON sched_name, trigger_name, trigger_group
Foreign Keys
qrtz_simprop_triggers_ibfk_1 ( sched_name, trigger_name, trigger_group ) ref qrtz_triggers (sched_name, trigger_name, trigger_group)
+ +

+

Table qrtz_triggers

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sched_name varchar( 120 )
*trigger_name varchar( 200 )
*trigger_group varchar( 200 )
*job_name varchar( 200 )
*job_group varchar( 200 )
 description varchar( 250 )
 next_fire_time bigint
 prev_fire_time bigint
 priority int
*trigger_state varchar( 16 )
*trigger_type varchar( 8 )
*start_time bigint
 end_time bigint
 calendar_name varchar( 200 )
 misfire_instr smallint
 job_data blob
Indexes
pk_qrtz_triggers ON sched_name, trigger_name, trigger_group
sched_name ON sched_name, job_name, job_group
Foreign Keys
qrtz_triggers_ibfk_1 ( sched_name, job_name, job_group ) ref qrtz_job_details (sched_name, job_name, job_group)
+ +

+

Table sys_dept

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*dept_id int AUTOINCREMENT 部门id
 parent_id int DEFAULT 0 父部门id
 dept_name varchar( 30 ) DEFAULT '' 部门名称
 order_num int DEFAULT 0 显示顺序
 leader varchar( 20 ) DEFAULT '' 负责人
 phone varchar( 20 ) DEFAULT '' 联系电话
 email varchar( 20 ) DEFAULT '' 邮箱
 status int DEFAULT 0 部门状态:0正常,1停用
 create_by varchar( 64 ) DEFAULT '' 创建者
*create_time timestamp DEFAULT CURRENT_TIMESTAMP 创建时间
 update_by varchar( 64 ) DEFAULT '' 更新者
*update_time timestamp DEFAULT '0000-00-00 00:00:00' 更新时间
Indexes
pk_sys_dept ON dept_id
+ +

+

Table sys_dict_data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*dict_code int AUTOINCREMENT 字典编码
 dict_sort int DEFAULT 0 字典排序
 dict_label varchar( 100 ) DEFAULT '' 字典标签
 dict_value varchar( 100 ) DEFAULT '' 字典键值
 dict_type varchar( 100 ) DEFAULT '' 字典类型
 status int DEFAULT 0 状态(0正常 1禁用)
 create_by varchar( 64 ) DEFAULT '' 创建者
*create_time timestamp DEFAULT CURRENT_TIMESTAMP 创建时间
 update_by varchar( 64 ) DEFAULT '' 更新者
*update_time timestamp DEFAULT '0000-00-00 00:00:00' 更新时间
 remark varchar( 500 ) DEFAULT '' 备注
Indexes
pk_sys_dict_data ON dict_code
+ +

+

Table sys_dict_type

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*dict_id int AUTOINCREMENT 字典主键
 dict_name varchar( 100 ) DEFAULT '' 字典名称
dict_type varchar( 100 ) DEFAULT '' 字典类型
 status int DEFAULT 0 状态(0正常 1禁用)
 create_by varchar( 64 ) DEFAULT '' 创建者
*create_time timestamp DEFAULT CURRENT_TIMESTAMP 创建时间
 update_by varchar( 64 ) DEFAULT '' 更新者
*update_time timestamp DEFAULT '0000-00-00 00:00:00' 更新时间
 remark varchar( 500 ) DEFAULT '' 备注
Indexes
pk_sys_dict_type ON dict_id
dict_type ON dict_type
+ +

+

Table sys_job

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*job_id int AUTOINCREMENT 任务ID
*job_name varchar( 64 ) DEFAULT '' 任务名称
*job_group varchar( 64 ) DEFAULT '' 任务组名
 method_name varchar( 500 ) DEFAULT '' 任务方法
 params varchar( 200 ) DEFAULT '' 方法参数
 cron_expression varchar( 255 ) DEFAULT '' cron执行表达式
 status int DEFAULT 0 状态(0正常 1暂停)
 create_by varchar( 64 ) DEFAULT '' 创建者
*create_time timestamp DEFAULT CURRENT_TIMESTAMP 创建时间
 update_by varchar( 64 ) DEFAULT '' 更新者
*update_time timestamp DEFAULT '0000-00-00 00:00:00' 更新时间
 remark varchar( 500 ) DEFAULT '' 备注信息
Indexes
pk_sys_job ON job_id, job_name, job_group
+ +

+

Table sys_job_log

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*job_log_id int AUTOINCREMENT 任务日志ID
*job_name varchar( 64 ) 任务名称
*job_group varchar( 64 ) 任务组名
 method_name varchar( 500 ) 任务方法
 params varchar( 200 ) DEFAULT '' 方法参数
 job_message varchar( 500 ) 日志信息
 is_exception int DEFAULT 0 是否异常
 exception_info text 异常信息
*create_time timestamp DEFAULT CURRENT_TIMESTAMP 创建时间
Indexes
pk_sys_job_log ON job_log_id
+ +

+

Table sys_logininfor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*info_id int AUTOINCREMENT 访问ID
 login_name varchar( 50 ) DEFAULT '' 登录账号
 ipaddr varchar( 50 ) DEFAULT '' 登录IP地址
 browser varchar( 50 ) DEFAULT '' 浏览器类型
 os varchar( 50 ) DEFAULT '' 操作系统
 status int DEFAULT 0 登录状态 0成功 1失败
 msg varchar( 255 ) DEFAULT '' 提示消息
*login_time timestamp DEFAULT CURRENT_TIMESTAMP 访问时间
Indexes
pk_sys_logininfor ON info_id
+ +

+

Table sys_menu

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*menu_id int AUTOINCREMENT 菜单ID
*menu_name varchar( 50 ) 菜单名称
 parent_id int DEFAULT 0 父菜单ID
 order_num int 显示顺序
 url varchar( 200 ) DEFAULT '' 请求地址
 menu_type char( 1 ) DEFAULT '' 类型:M目录,C菜单,F按钮
 visible int DEFAULT 0 菜单状态:0显示,1隐藏
 perms varchar( 100 ) DEFAULT '' 权限标识
 icon varchar( 100 ) DEFAULT '' 菜单图标
 create_by varchar( 64 ) DEFAULT '' 创建者
*create_time timestamp DEFAULT CURRENT_TIMESTAMP 创建时间
 update_by varchar( 64 ) DEFAULT '' 更新者
*update_time timestamp DEFAULT '0000-00-00 00:00:00' 更新时间
 remark varchar( 500 ) DEFAULT '' 备注
Indexes
pk_sys_menu ON menu_id
+ +

+

Table sys_oper_log

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*oper_id int AUTOINCREMENT 日志主键
 title varchar( 50 ) DEFAULT '' 模块标题
 action varchar( 100 ) DEFAULT '' 功能请求
 method varchar( 100 ) DEFAULT '' 方法名称
 channel varchar( 20 ) DEFAULT '' 来源渠道
 login_name varchar( 50 ) DEFAULT '' 登录账号
 dept_name varchar( 50 ) DEFAULT '' 部门名称
 oper_url varchar( 255 ) DEFAULT '' 请求URL
 oper_ip varchar( 30 ) DEFAULT '' 主机地址
 oper_param varchar( 255 ) DEFAULT '' 请求参数
 status int DEFAULT 0 操作状态 0正常 1异常
 error_msg varchar( 2000 ) DEFAULT '' 错误消息
*oper_time timestamp DEFAULT CURRENT_TIMESTAMP 操作时间
Indexes
pk_sys_oper_log ON oper_id
+ +

+

Table sys_post

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*post_id int AUTOINCREMENT 岗位ID
*post_code varchar( 64 ) 岗位编码
*post_name varchar( 100 ) 岗位名称
*post_sort int 显示顺序
*status int 状态(0正常 1停用)
 create_by varchar( 64 ) DEFAULT '' 创建者
*create_time timestamp DEFAULT CURRENT_TIMESTAMP 创建时间
 update_by varchar( 64 ) DEFAULT '' 更新者
*update_time timestamp DEFAULT '0000-00-00 00:00:00' 更新时间
 remark varchar( 500 ) DEFAULT '' 备注
Indexes
pk_sys_post ON post_id
+ +

+

Table sys_role

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*role_id int AUTOINCREMENT 角色ID
*role_name varchar( 30 ) 角色名称
*role_key varchar( 100 ) 角色权限字符串
*role_sort int 显示顺序
 status int DEFAULT 0 角色状态:0正常,1禁用
 create_by varchar( 64 ) DEFAULT '' 创建者
*create_time timestamp DEFAULT CURRENT_TIMESTAMP 创建时间
 update_by varchar( 64 ) DEFAULT '' 更新者
*update_time timestamp DEFAULT '0000-00-00 00:00:00' 更新时间
 remark varchar( 500 ) DEFAULT '' 备注
Indexes
pk_sys_role ON role_id
+ +

+

Table sys_role_menu

+ + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*role_id int 角色ID
*menu_id int 菜单ID
Indexes
pk_sys_role_menu ON role_id, menu_id
+ +

+

Table sys_user

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*user_id int AUTOINCREMENT 用户ID
 dept_id int 部门ID
 login_name varchar( 30 ) DEFAULT '' 登录账号
 user_name varchar( 30 ) DEFAULT '' 用户昵称
 email varchar( 100 ) DEFAULT '' 用户邮箱
 phonenumber varchar( 20 ) DEFAULT '' 手机号码
 password varchar( 100 ) DEFAULT '' 密码
 salt varchar( 100 ) DEFAULT '' 盐加密
 user_type char( 1 ) DEFAULT 'N' 类型:Y默认用户,N非默认用户
 status int DEFAULT 0 帐号状态:0正常,1禁用
 refuse_des varchar( 500 ) DEFAULT '' 拒绝登录描述
 create_by varchar( 64 ) DEFAULT '' 创建者
*create_time timestamp DEFAULT CURRENT_TIMESTAMP 创建时间
 update_by varchar( 64 ) DEFAULT '' 更新者
*update_time timestamp DEFAULT '0000-00-00 00:00:00' 更新时间
Indexes
pk_sys_user ON user_id
+ +

+

Table sys_user_online

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*sessionId varchar( 50 ) DEFAULT '' 用户会话id
 login_name varchar( 50 ) DEFAULT '' 登录账号
 dept_name varchar( 50 ) DEFAULT '' 部门名称
 ipaddr varchar( 50 ) DEFAULT '' 登录IP地址
 browser varchar( 50 ) DEFAULT '' 浏览器类型
 os varchar( 50 ) DEFAULT '' 操作系统
 status varchar( 10 ) DEFAULT '' 在线状态on_line在线off_line离线
*start_timestsamp timestamp DEFAULT CURRENT_TIMESTAMP session创建时间
*last_access_time timestamp DEFAULT '0000-00-00 00:00:00' session最后访问时间
 expire_time int DEFAULT 0 超时时间,单位为分钟
Indexes
pk_sys_user_online ON sessionId
+ +

+

Table sys_user_post

+ + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*user_id varchar( 64 ) 用户ID
*post_id varchar( 64 ) 岗位ID
Indexes
pk_sys_user_post ON user_id, post_id
+ +

+

Table sys_user_role

+ + + + + + + + + + + + + + + + + + + + + + +
IndexesField NameData TypeDescription
*user_id int 用户ID
*role_id int 角色ID
Indexes
pk_sys_user_role ON user_id, role_id
+ +

Powered by DbSchema

\ No newline at end of file diff --git a/sql/ruoyi.pdm b/sql/ruoyi.pdm new file mode 100644 index 0000000..78d8504 --- /dev/null +++ b/sql/ruoyi.pdm @@ -0,0 +1,4851 @@ + + + + + + + + + +21C20947-ED50-4632-B638-DC1A02BD948A +ruoyi +ruoyi +1524449337 +Administrator +1538297587 +admin +[FolderOptions] + +[FolderOptions\Physical Objects] +GenerationCheckModel=Yes +GenerationPath= +GenerationOptions= +GenerationTasks= +GenerationTargets= +GenerationSelections= +RevPkey=Yes +RevFkey=Yes +RevAkey=Yes +RevCheck=Yes +RevIndx=Yes +RevOpts=Yes +RevViewAsTabl=No +RevViewOpts=Yes +RevSystAsTabl=Yes +RevTablPerm=No +RevViewPerm=No +RevProcPerm=No +RevDbpkPerm=No +RevSqncPerm=No +RevAdtPerm=No +RevUserPriv=No +RevUserOpts=No +RevGrpePriv=No +RevRolePriv=No +RevDtbsOpts=Yes +RevDtbsPerm=No +RevViewIndx=Yes +RevJidxOpts=Yes +RevStats=No +RevTspcPerm=No +RevCaseSensitive=No +GenTrgrStdMsg=Yes +GenTrgrMsgTab= +GenTrgrMsgNo= +GenTrgrMsgTxt= +TrgrPreserve=No +TrgrIns=Yes +TrgrUpd=Yes +TrgrDel=Yes +TrgrC2Ins=Yes +TrgrC2Upd=Yes +TrgrC3=Yes +TrgrC4=Yes +TrgrC5=Yes +TrgrC6=Yes +TrgrC7=Yes +TrgrC8=Yes +TrgrC9=Yes +TrgrC10=Yes +TrgrC11=Yes +TrgrC1=Yes +TrgrC12Ins=Yes +TrgrC12Upd=Yes +TrgrC13=Yes +UpdateTableStatistics=Yes +UpdateColumnStatistics=Yes + +[FolderOptions\Physical Objects\Database Generation] +GenScriptName=orders.sql +GenScriptName0=orders.sql +GenScriptName1=studentsystem.sql +GenScriptName2=NetCTOSS.sql +GenScriptName3=product.sql +GenScriptName4=voteSystem.sql +GenScriptName5=.sql +GenScriptName6=enterpriseManagement.sql +GenScriptName7=crebas.sql +GenScriptName8= +GenScriptName9= +GenPathName=C:\Users\Administrator\Desktop\ +GenSingleFile=Yes +GenODBC=No +GenCheckModel=Yes +GenScriptPrev=Yes +GenArchiveModel=No +GenUseSync=No +GenSyncChoice=0 +GenSyncArch= +GenSyncRmg=0 + +[FolderOptions\Physical Objects\Database Generation\Format] +GenScriptTitle=Yes +GenScriptNamLabl=No +GenScriptQDtbs=No +GenScriptQOwnr=Yes +GenScriptCase=0 +GenScriptEncoding=ANSI +GenScriptNAcct=No +IdentifierDelimiter=" + +[FolderOptions\Physical Objects\Database Generation\Database] +Create=Yes +Open=Yes +Close=Yes +Drop=Yes +Permission=No + +[FolderOptions\Physical Objects\Database Generation\Database\Create] +Physical Options=Yes +Header=Yes +Footer=Yes + +[FolderOptions\Physical Objects\Database Generation\Tablespace] +Create=Yes +Drop=Yes +Comment=Yes +Permission=No + +[FolderOptions\Physical Objects\Database Generation\Tablespace\Create] +Header=Yes +Footer=Yes + +[FolderOptions\Physical Objects\Database Generation\Storage] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\User] +Create=Yes +Grant=Yes +Drop=Yes +Comment=Yes +Privilege=No + +[FolderOptions\Physical Objects\Database Generation\User\Create] +Physical Options=No + +[FolderOptions\Physical Objects\Database Generation\Group] +Create=Yes +Drop=Yes +Comment=Yes +Privilege=No + +[FolderOptions\Physical Objects\Database Generation\Role] +Create=Yes +Drop=Yes +Privilege=No + +[FolderOptions\Physical Objects\Database Generation\UserDefinedDataType] +Create=Yes +Comment=Yes +Drop=Yes + +[FolderOptions\Physical Objects\Database Generation\UserDefinedDataType\Create] +Default value=Yes +Check=Yes + +[FolderOptions\Physical Objects\Database Generation\AbstractDataType] +Create=Yes +Header=Yes +Footer=Yes +Drop=Yes +Comment=Yes +Install JAVA class=Yes +Remove JAVA class=Yes +Permission=No + +[FolderOptions\Physical Objects\Database Generation\Rule] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\Default] +Create=Yes +Comment=Yes +Drop=Yes + +[FolderOptions\Physical Objects\Database Generation\Sequence] +Create=Yes +Drop=Yes +Comment=Yes +Permission=No + +[FolderOptions\Physical Objects\Database Generation\Table&&Column] + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Table] +Create=Yes +Drop=Yes +Comment=Yes +Permission=No + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Table\Create] +Check=Yes +Physical Options=Yes +Header=Yes +Footer=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Table\Create\Check] +Constraint declaration=No + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Column] +User datatype=No +Default value=Yes +Check=Yes +Physical Options=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Column\Check] +Constraint declaration=No + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Key] + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Key\Primary key] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Key\Primary key\Create] +Constraint declaration=No +Physical Options=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Key\Alternate key] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Key\Alternate key\Create] +Constraint declaration=No +Physical Options=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Foreign key] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Foreign key\Create] +Constraint declaration=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Index] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Index\Create] +Constraint declaration=Yes +Physical Options=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Index\Filter] +Primary key=No +Foreign key=No +Alternate key=No +Cluster=Yes +Other=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Trigger] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\Table&&Column\Trigger\Filter] +For insert=Yes +For update=Yes +For delete=Yes +For other=Yes + +[FolderOptions\Physical Objects\Database Generation\View] +Create=Yes +Drop=Yes +Comment=Yes +Permission=No + +[FolderOptions\Physical Objects\Database Generation\View\Create] +Force Column list=No +Physical Options=Yes +Header=Yes +Footer=Yes + +[FolderOptions\Physical Objects\Database Generation\View\ViewColumn] +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\View\ViewIndex] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\View\ViewIndex\Create] +Physical Options=Yes + +[FolderOptions\Physical Objects\Database Generation\View\ViewIndex\Filter] +Cluster=Yes +Other=Yes + +[FolderOptions\Physical Objects\Database Generation\View\Trigger] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\View\Trigger\Filter] +For insert=Yes +For update=Yes +For delete=Yes +For other=Yes + +[FolderOptions\Physical Objects\Database Generation\DBMSTrigger] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\Synonym] +Create=Yes +Drop=Yes + +[FolderOptions\Physical Objects\Database Generation\Synonym\Filter] +Table=Yes +View=Yes +Proc=Yes +Synonym=Yes +Database Package=Yes +Sequence=Yes + +[FolderOptions\Physical Objects\Database Generation\JoinIndex] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\JoinIndex\Create] +Physical Options=Yes +Header=Yes +Footer=Yes + +[FolderOptions\Physical Objects\Database Generation\Procedure] +Create=Yes +Drop=Yes +Comment=Yes +Permission=No + +[FolderOptions\Physical Objects\Database Generation\Procedure\Create] +Header=Yes +Footer=Yes + +[FolderOptions\Physical Objects\Database Generation\DatabasePackage] +Create=Yes +Drop=Yes +Permission=No + +[FolderOptions\Physical Objects\Database Generation\WebService] +Create=Yes +Drop=Yes +Comment=Yes + +[FolderOptions\Physical Objects\Database Generation\Dimension] +Create=Yes +Drop=Yes + +[FolderOptions\Physical Objects\Database Generation\Synchronization] +GenBackupTabl=1 +GenKeepBackTabl=1 +GenTmpTablDrop=No +GenKeepTablOpts=No + +[FolderOptions\Physical Objects\Test Data] +GenDataPathName= +GenDataSinglefile=Yes +GenDataScriptName=testdata +GenDataScriptName0= +GenDataScriptName1= +GenDataScriptName2= +GenDataScriptName3= +GenDataScriptName4= +GenDataScriptName5= +GenDataScriptName6= +GenDataScriptName7= +GenDataScriptName8= +GenDataScriptName9= +GenDataOdbc=0 +GenDataDelOld=No +GenDataTitle=No +GenDataDefNumRows=20 +GenDataCommit=0 +GenDataPacket=0 +GenDataOwner=No +GenDataProfNumb= +GenDataProfChar= +GenDataProfDate= +GenDataCSVSeparator=, +GenDataFileFormat=CSV +GenDataUseWizard=No + +[FolderOptions\Pdm] +IndxIQName=%COLUMN%_%INDEXTYPE% +IndxPK=Yes +IndxFK=Yes +IndxAK=Yes +IndxPKName=%TABLE%_PK +IndxFKName=%REFR%_FK +IndxAKName=%AKEY%_AK +IndxPreserve=No +IndxThreshold=0 +IndxStats=No +RefrPreserve=No +JidxPreserve=No +RbldMultiFact=Yes +RbldMultiDim=Yes +RbldMultiJidx=Yes +CubePreserve=No +TablStProcPreserve=No +ProcDepPreserve=Yes +TrgrDepPreserve=Yes +CubeScriptPath= +CubeScriptCase=0 +CubeScriptEncoding=ANSI +CubeScriptNacct=No +CubeScriptHeader=No +CubeScriptExt=csv +CubeScriptExt0=txt +CubeScriptExt1= +CubeScriptExt2= +CubeScriptSep=, +CubeScriptDeli=" +DfltDomnName=D_%.U:VALUE% +DfltColnName=D_%.U:VALUE% +DfltReuse=Yes +DfltDrop=Yes +[ModelOptions] + +[ModelOptions\Physical Objects] +CaseSensitive=No +DisplayName=Yes +EnableTrans=No +EnableRequirements=No +DefaultDttp= +IgnoreOwner=No +RebuildTrigger=Yes +RefrUnique=No +RefrAutoMigrate=Yes +RefrMigrateReuse=Yes +RefrMigrateDomain=Yes +RefrMigrateCheck=Yes +RefrMigrateRule=Yes +RefrMigrateExtd=No +RefrMigrDefaultLink=No +RefrDfltImpl=D +RefrPrgtColn=No +RefrMigrateToEnd=No +RebuildTriggerDep=No +ColnFKName=%.3:PARENT%_%COLUMN% +ColnFKNameUse=No +DomnCopyDttp=Yes +DomnCopyChck=No +DomnCopyRule=No +DomnCopyMand=No +DomnCopyExtd=No +DomnCopyProf=No +Notation=0 +DomnDefaultMandatory=No +ColnDefaultMandatory=No +TablDefaultOwner= +ViewDefaultOwner= +TrgrDefaultOwnerTabl= +TrgrDefaultOwnerView= +IdxDefaultOwnerTabl= +IdxDefaultOwnerView= +JdxDefaultOwner= +DBPackDefaultOwner= +SeqDefaultOwner= +ProcDefaultOwner= +DBMSTrgrDefaultOwner= +Currency=USD +RefrDeleteConstraint=1 +RefrUpdateConstraint=1 +RefrParentMandatory=No +RefrParentChangeAllow=Yes +RefrCheckOnCommit=No + +[ModelOptions\Physical Objects\NamingOptionsTemplates] + +[ModelOptions\Physical Objects\ClssNamingOptions] + +[ModelOptions\Physical Objects\ClssNamingOptions\PDMPCKG] + +[ModelOptions\Physical Objects\ClssNamingOptions\PDMPCKG\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\PDMPCKG\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\PDMDOMN] + +[ModelOptions\Physical Objects\ClssNamingOptions\PDMDOMN\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\PDMDOMN\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\TABL] + +[ModelOptions\Physical Objects\ClssNamingOptions\TABL\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\TABL\Code] +Template= +MaxLen=64 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\COLN] + +[ModelOptions\Physical Objects\ClssNamingOptions\COLN\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\COLN\Code] +Template= +MaxLen=64 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\INDX] + +[ModelOptions\Physical Objects\ClssNamingOptions\INDX\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\INDX\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\REFR] + +[ModelOptions\Physical Objects\ClssNamingOptions\REFR\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\REFR\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\VREF] + +[ModelOptions\Physical Objects\ClssNamingOptions\VREF\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\VREF\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\VIEW] + +[ModelOptions\Physical Objects\ClssNamingOptions\VIEW\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\VIEW\Code] +Template= +MaxLen=64 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\VIEWC] + +[ModelOptions\Physical Objects\ClssNamingOptions\VIEWC\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\VIEWC\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\WEBSERV] + +[ModelOptions\Physical Objects\ClssNamingOptions\WEBSERV\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\WEBSERV\Code] +Template= +MaxLen=254 +Case=M +ValidChar='a'-'z','A'-'Z','0'-'9',"/-_.!~*'()" +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\WEBOP] + +[ModelOptions\Physical Objects\ClssNamingOptions\WEBOP\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\WEBOP\Code] +Template= +MaxLen=254 +Case=M +ValidChar='a'-'z','A'-'Z','0'-'9',"/-_.!~*'()" +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\WPARAM] + +[ModelOptions\Physical Objects\ClssNamingOptions\WPARAM\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\WPARAM\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\FACT] + +[ModelOptions\Physical Objects\ClssNamingOptions\FACT\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\FACT\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\DIMN] + +[ModelOptions\Physical Objects\ClssNamingOptions\DIMN\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\DIMN\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\CUBE] + +[ModelOptions\Physical Objects\ClssNamingOptions\CUBE\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\CUBE\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\MEAS] + +[ModelOptions\Physical Objects\ClssNamingOptions\MEAS\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\MEAS\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\DATTR] + +[ModelOptions\Physical Objects\ClssNamingOptions\DATTR\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\DATTR\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\FILO] + +[ModelOptions\Physical Objects\ClssNamingOptions\FILO\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\FILO\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\FRMEOBJ] + +[ModelOptions\Physical Objects\ClssNamingOptions\FRMEOBJ\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\FRMEOBJ\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\FRMELNK] + +[ModelOptions\Physical Objects\ClssNamingOptions\FRMELNK\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\FRMELNK\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\DefaultClass] + +[ModelOptions\Physical Objects\ClssNamingOptions\DefaultClass\Name] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Physical Objects\ClssNamingOptions\DefaultClass\Code] +Template= +MaxLen=254 +Case=M +ValidChar= +InvldChar= +AllValid=Yes +NoAccent=No +DefaultChar= +Script= +ConvTable= +ConvTablePath=%_HOME%\Resource Files\Conversion Tables + +[ModelOptions\Connection] + +[ModelOptions\Pdm] + +[ModelOptions\Generate] + +[ModelOptions\Generate\Pdm] +RRMapping=No + +[ModelOptions\Generate\Cdm] +CheckModel=Yes +SaveLinks=Yes +NameToCode=No +Notation=2 + +[ModelOptions\Generate\Oom] +CheckModel=Yes +SaveLinks=Yes +ORMapping=No +NameToCode=Yes +ClassPrefix= + +[ModelOptions\Generate\Xsm] +CheckModel=Yes +SaveLinks=Yes +ORMapping=No +NameToCode=No + +[ModelOptions\Generate\Ldm] +CheckModel=Yes +SaveLinks=Yes +NameToCode=No + +[ModelOptions\Default Opts] + +[ModelOptions\Default Opts\TABL] +PhysOpts= + +[ModelOptions\Default Opts\COLN] +PhysOpts= + +[ModelOptions\Default Opts\INDX] +PhysOpts= + +[ModelOptions\Default Opts\AKEY] +PhysOpts= + +[ModelOptions\Default Opts\PKEY] +PhysOpts= + +[ModelOptions\Default Opts\STOR] +PhysOpts= + +[ModelOptions\Default Opts\TSPC] +PhysOpts= + +[ModelOptions\Default Opts\SQNC] +PhysOpts= + +[ModelOptions\Default Opts\DTBS] +PhysOpts= + +[ModelOptions\Default Opts\USER] +PhysOpts= + +[ModelOptions\Default Opts\JIDX] +PhysOpts= + + +AFAD9ECF-F417-4FCE-BEA4-884857D4C1A9 +MySQL 5.0 +MYSQL50 +1524449337 +Administrator +1524449337 +Administrator + +F4F16ECD-F2F1-4006-AF6F-638D5C65F35E +4BA9F647-DAB1-11D1-9944-006097355D9B + + + + +B6C2C4A4-6A8A-41F3-909D-C7B514E1EAE2 +PhysicalDiagram_1 +PhysicalDiagram_1 +1524449325 +Administrator +1538297386 +admin +[DisplayPreferences] + +[DisplayPreferences\PDM] + +[DisplayPreferences\General] +Adjust to text=Yes +Snap Grid=No +Constrain Labels=Yes +Display Grid=No +Show Page Delimiter=Yes +Grid size=0 +Graphic unit=2 +Window color=255, 255, 255 +Background image= +Background mode=8 +Watermark image= +Watermark mode=8 +Show watermark on screen=No +Gradient mode=0 +Gradient end color=255, 255, 255 +Show Swimlane=No +SwimlaneVert=Yes +TreeVert=No +CompDark=0 + +[DisplayPreferences\Object] +Mode=0 +Trunc Length=80 +Word Length=80 +Word Text=!""#$%&'()*+,-./:;<=>?@[\]^_`{|}~ +Shortcut IntIcon=Yes +Shortcut IntLoct=Yes +Shortcut IntFullPath=No +Shortcut IntLastPackage=Yes +Shortcut ExtIcon=Yes +Shortcut ExtLoct=No +Shortcut ExtFullPath=No +Shortcut ExtLastPackage=Yes +Shortcut ExtIncludeModl=Yes +EObjShowStrn=Yes +ExtendedObject.Comment=No +ExtendedObject.IconPicture=No +ExtendedObject_SymbolLayout=<Form>[CRLF] <StandardAttribute Name="Stereotype" Attribute="Stereotype" Prefix="&lt;&lt;" Suffix="&gt;&gt;" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Object Name" Attribute="DisplayName" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="Yes" />[CRLF] <Separator Name="Separator" />[CRLF] <StandardAttribute Name="Comment" Attribute="Comment" Prefix="" Suffix="" Alignment="LEFT" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Icon" Attribute="IconPicture" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="Yes" />[CRLF]</Form> +ELnkShowStrn=Yes +ELnkShowName=Yes +ExtendedLink_SymbolLayout=<Form>[CRLF] <Form Name="Center" >[CRLF] <StandardAttribute Name="Stereotype" Attribute="Stereotype" Prefix="&lt;&lt;" Suffix="&gt;&gt;" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Name" Attribute="DisplayName" Prefix="" Suffix="" Caption="" Mandatory="No" />[CRLF] </Form>[CRLF] <Form Name="Source" >[CRLF] </Form>[CRLF] <Form Name="Destination" >[CRLF] </Form>[CRLF]</Form> +FileObject.Stereotype=No +FileObject.DisplayName=Yes +FileObject.LocationOrName=No +FileObject.IconPicture=No +FileObject.IconMode=Yes +FileObject_SymbolLayout=<Form>[CRLF] <StandardAttribute Name="Stereotype" Attribute="Stereotype" Prefix="&lt;&lt;" Suffix="&gt;&gt;" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] <ExclusiveChoice Name="Exclusive Choice" Mandatory="Yes" Display="HorizontalRadios" >[CRLF] <StandardAttribute Name="Name" Attribute="DisplayName" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Location" Attribute="LocationOrName" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] </ExclusiveChoice>[CRLF] <StandardAttribute Name="Icon" Attribute="IconPicture" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="Yes" />[CRLF]</Form> +PckgShowStrn=Yes +Package.Comment=No +Package.IconPicture=No +Package_SymbolLayout= +Display Model Version=Yes +Table.Stereotype=Yes +Table.DisplayName=Yes +Table.OwnerDisplayName=No +Table.Columns=Yes +Table.Columns._Filter=""PDMCOLNALL +Table.Columns._Columns=Stereotype DataType KeyIndicator +Table.Columns._Limit=-5 +Table.Keys=No +Table.Keys._Columns=Stereotype Indicator +Table.Indexes=No +Table.Indexes._Columns=Stereotype +Table.Triggers=No +Table.Triggers._Columns=Stereotype +Table.Comment=No +Table.IconPicture=No +Table_SymbolLayout=<Form>[CRLF] <StandardAttribute Name="Stereotype" Attribute="Stereotype" Prefix="&lt;&lt;" Suffix="&gt;&gt;" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] <ExclusiveChoice Name="Exclusive Choice" Mandatory="Yes" Display="HorizontalRadios" >[CRLF] <StandardAttribute Name="Name" Attribute="DisplayName" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Owner and Name" Attribute="OwnerDisplayName" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] </ExclusiveChoice>[CRLF] <Separator Name="Separator" />[CRLF] <StandardCollection Name="Columns" Collection="Columns" Columns="Stereotype No\r\nDisplayName Yes\r\nDataType No\r\nSymbolDataType No &quot;Domain or Data type&quot;\r\nDomain No\r\nKeyIndicator No\r\nIndexIndicator No\r\nNullStatus No" Filters="&quot;All Columns&quot; PDMCOLNALL &quot;&quot;\r\n&quot;PK Columns&quot; PDMCOLNPK &quot;PRIM \&quot;TRUE\&quot; TRUE&quot;\r\n&quot;Key Columns&quot; PDMCOLNKEY &quot;KEYS \&quot;TRUE\&quot; TRUE&quot;" HasLimit="Yes" Caption="" Mandatory="No" />[CRLF] <StandardCollection Name="Keys" Collection="Keys" Columns="Stereotype No\r\nDisplayName Yes\r\nIndicator No" HasLimit="No" Caption="" Mandatory="No" />[CRLF] <StandardCollection Name="Indexes" Collection="Indexes" Columns="Stereotype No\r\nDisplayName Yes\r\nIndicator No" HasLimit="No" Caption="" Mandatory="No" />[CRLF] <StandardCollection Name="Triggers" Collection="Triggers" Columns="Stereotype No\r\nDisplayName Yes" HasLimit="No" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Comment" Attribute="Comment" Prefix="" Suffix="" Alignment="LEFT" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Icon" Attribute="IconPicture" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="Yes" />[CRLF]</Form> +View.Stereotype=Yes +View.DisplayName=Yes +View.OwnerDisplayName=No +View.Columns=Yes +View.Columns._Columns=DisplayName +View.Columns._Limit=-5 +View.TemporaryVTables=Yes +View.Indexes=No +View.Comment=No +View.IconPicture=No +View_SymbolLayout=<Form>[CRLF] <StandardAttribute Name="Stereotype" Attribute="Stereotype" Prefix="&lt;&lt;" Suffix="&gt;&gt;" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] <ExclusiveChoice Name="Exclusive Choice" Mandatory="Yes" Display="HorizontalRadios" >[CRLF] <StandardAttribute Name="Name" Attribute="DisplayName" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Owner and Name" Attribute="OwnerDisplayName" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] </ExclusiveChoice>[CRLF] <Separator Name="Separator" />[CRLF] <StandardCollection Name="Columns" Collection="Columns" Columns="DisplayName No\r\nExpression No\r\nDataType No\r\nSymbolDataType No &quot;Domain or Data type&quot;\r\nIndexIndicator No" HasLimit="Yes" Caption="" Mandatory="No" />[CRLF] <StandardCollection Name="Tables" Collection="TemporaryVTables" Columns="Name Yes" HasLimit="No" Caption="" Mandatory="No" />[CRLF] <StandardCollection Name="Indexes" Collection="Indexes" Columns="DisplayName Yes" HasLimit="No" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Comment" Attribute="Comment" Prefix="" Suffix="" Alignment="LEFT" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Icon" Attribute="IconPicture" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="Yes" />[CRLF]</Form> +Procedure.Stereotype=No +Procedure.DisplayName=Yes +Procedure.OwnerDisplayName=No +Procedure.Comment=No +Procedure.IconPicture=No +Procedure_SymbolLayout=<Form>[CRLF] <StandardAttribute Name="Stereotype" Attribute="Stereotype" Prefix="&lt;&lt;" Suffix="&gt;&gt;" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] <ExclusiveChoice Name="Exclusive Choice" Mandatory="Yes" Display="HorizontalRadios" >[CRLF] <StandardAttribute Name="Name" Attribute="DisplayName" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Owner and Name" Attribute="OwnerDisplayName" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="No" />[CRLF] </ExclusiveChoice>[CRLF] <Separator Name="Separator" />[CRLF] <StandardAttribute Name="Comment" Attribute="Comment" Prefix="" Suffix="" Alignment="LEFT" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Icon" Attribute="IconPicture" Prefix="" Suffix="" Alignment="CNTR" Caption="" Mandatory="Yes" />[CRLF]</Form> +Reference.Cardinality=No +Reference.ImplementationType=No +Reference.ChildRole=Yes +Reference.Stereotype=Yes +Reference.DisplayName=No +Reference.ForeignKeyConstraintName=Yes +Reference.JoinExpression=No +Reference.Integrity=No +Reference.ParentRole=Yes +Reference_SymbolLayout=<Form>[CRLF] <Form Name="Source" >[CRLF] <StandardAttribute Name="Cardinality" Attribute="Cardinality" Prefix="" Suffix="" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Implementation" Attribute="ImplementationType" Prefix="" Suffix="" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Child Role" Attribute="ChildRole" Prefix="" Suffix="" Caption="" Mandatory="No" />[CRLF] </Form>[CRLF] <Form Name="Center" >[CRLF] <StandardAttribute Name="Stereotype" Attribute="Stereotype" Prefix="&lt;&lt;" Suffix="&gt;&gt;" Caption="" Mandatory="No" />[CRLF] <ExclusiveChoice Name="Exclusive Choice" Mandatory="No" Display="HorizontalRadios" >[CRLF] <StandardAttribute Name="Name" Attribute="DisplayName" Prefix="" Suffix="" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Cons&amp;traint Name" Attribute="ForeignKeyConstraintName" Prefix="" Suffix="" Caption="Cons&amp;traint Name" Mandatory="No" />[CRLF] <StandardAttribute Name="Join" Attribute="JoinExpression" Prefix="" Suffix="" Caption="Join" Mandatory="No" />[CRLF] </ExclusiveChoice>[CRLF] <StandardAttribute Name="Referential integrity" Attribute="Integrity" Prefix="" Suffix="" Caption="Referential integrity" Mandatory="No" />[CRLF] </Form>[CRLF] <Form Name="Destination" >[CRLF] <StandardAttribute Name="Parent Role" Attribute="ParentRole" Prefix="" Suffix="" Caption="" Mandatory="No" />[CRLF] </Form>[CRLF]</Form> +ViewReference.ChildRole=Yes +ViewReference.Stereotype=Yes +ViewReference.DisplayName=No +ViewReference.JoinExpression=No +ViewReference.ParentRole=Yes +ViewReference_SymbolLayout=<Form>[CRLF] <Form Name="Source" >[CRLF] <StandardAttribute Name="Child Role" Attribute="ChildRole" Prefix="" Suffix="" Caption="" Mandatory="No" />[CRLF] </Form>[CRLF] <Form Name="Center" >[CRLF] <StandardAttribute Name="Stereotype" Attribute="Stereotype" Prefix="&lt;&lt;" Suffix="&gt;&gt;" Caption="" Mandatory="No" />[CRLF] <ExclusiveChoice Name="Exclusive Choice" Mandatory="No" Display="HorizontalRadios" >[CRLF] <StandardAttribute Name="Name" Attribute="DisplayName" Prefix="" Suffix="" Caption="" Mandatory="No" />[CRLF] <StandardAttribute Name="Join Expression" Attribute="JoinExpression" Prefix="" Suffix="" Caption="" Mandatory="No" />[CRLF] </ExclusiveChoice>[CRLF] </Form>[CRLF] <Form Name="Destination" >[CRLF] <StandardAttribute Name="Parent Role" Attribute="ParentRole" Prefix="" Suffix="" Caption="" Mandatory="No" />[CRLF] </Form>[CRLF]</Form> +File Location=No +PckgStrn=Yes +ColnMode=0 +ColnMax=5 +TablOwnr=No +ColnDttp=Yes +ColnDomn=No +ColnShowDomn=No +ColnKey=Yes +ColnIndx=No +ColnMand=No +ColnStrn=Yes +VColName=Yes +VColExpr=No +VColDttp=No +VColIndx=No +VColCMod=0 +VColCMax=5 +ProcOwnr=No +KeyStrn=Yes +IndxStrn=Yes +TrgrStrn=Yes + +[DisplayPreferences\Symbol] + +[DisplayPreferences\Symbol\FRMEOBJ] +STRNFont=新宋体,8,N +STRNFont color=0, 0, 0 +DISPNAMEFont=新宋体,8,N +DISPNAMEFont color=0, 0, 0 +LABLFont=新宋体,8,N +LABLFont color=0, 0, 0 +AutoAdjustToText=Yes +Keep aspect=No +Keep center=No +Keep size=No +Width=6000 +Height=2000 +Brush color=255 255 255 +Fill Color=Yes +Brush style=6 +Brush bitmap mode=12 +Brush gradient mode=64 +Brush gradient color=192 192 192 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=1 0 255 128 128 +Shadow color=192 192 192 +Shadow=0 + +[DisplayPreferences\Symbol\FRMELNK] +CENTERFont=新宋体,8,N +CENTERFont color=0, 0, 0 +Line style=0 +AutoAdjustToText=Yes +Keep aspect=No +Keep center=No +Keep size=No +Brush color=255 255 255 +Fill Color=Yes +Brush style=1 +Brush bitmap mode=12 +Brush gradient mode=0 +Brush gradient color=118 118 118 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=1 0 128 128 255 +Shadow color=192 192 192 +Shadow=0 + +[DisplayPreferences\Symbol\FILO] +OBJSTRNFont=新宋体,8,N +OBJSTRNFont color=0, 0, 0 +DISPNAMEFont=新宋体,8,N +DISPNAMEFont color=0, 0, 0 +LCNMFont=新宋体,8,N +LCNMFont color=0, 0, 0 +AutoAdjustToText=Yes +Keep aspect=Yes +Keep center=Yes +Keep size=No +Width=2400 +Height=2400 +Brush color=255 255 255 +Fill Color=No +Brush style=1 +Brush bitmap mode=12 +Brush gradient mode=0 +Brush gradient color=118 118 118 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=1 0 0 0 255 +Shadow color=192 192 192 +Shadow=0 + +[DisplayPreferences\Symbol\PDMPCKG] +STRNFont=新宋体,8,N +STRNFont color=0, 0, 0 +DISPNAMEFont=新宋体,8,N +DISPNAMEFont color=0, 0, 0 +LABLFont=新宋体,8,N +LABLFont color=0, 0, 0 +AutoAdjustToText=Yes +Keep aspect=No +Keep center=No +Keep size=No +Width=4800 +Height=3600 +Brush color=255 255 192 +Fill Color=Yes +Brush style=6 +Brush bitmap mode=12 +Brush gradient mode=65 +Brush gradient color=255 255 255 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=1 0 178 178 178 +Shadow color=192 192 192 +Shadow=0 + +[DisplayPreferences\Symbol\TABL] +STRNFont=新宋体,8,N +STRNFont color=0, 0, 0 +DISPNAMEFont=新宋体,8,N +DISPNAMEFont color=0, 0, 0 +OWNRDISPNAMEFont=新宋体,8,N +OWNRDISPNAMEFont color=0, 0, 0 +ColumnsFont=新宋体,8,N +ColumnsFont color=0, 0, 0 +TablePkColumnsFont=新宋体,8,U +TablePkColumnsFont color=0, 0, 0 +TableFkColumnsFont=新宋体,8,N +TableFkColumnsFont color=0, 0, 0 +KeysFont=新宋体,8,N +KeysFont color=0, 0, 0 +IndexesFont=新宋体,8,N +IndexesFont color=0, 0, 0 +TriggersFont=新宋体,8,N +TriggersFont color=0, 0, 0 +LABLFont=新宋体,8,N +LABLFont color=0, 0, 0 +AutoAdjustToText=Yes +Keep aspect=No +Keep center=No +Keep size=No +Width=4800 +Height=4000 +Brush color=178 214 252 +Fill Color=Yes +Brush style=6 +Brush bitmap mode=12 +Brush gradient mode=65 +Brush gradient color=255 255 255 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=1 0 0 128 192 +Shadow color=192 192 192 +Shadow=0 + +[DisplayPreferences\Symbol\VIEW] +STRNFont=新宋体,8,N +STRNFont color=0, 0, 0 +DISPNAMEFont=新宋体,8,N +DISPNAMEFont color=0, 0, 0 +OWNRDISPNAMEFont=新宋体,8,N +OWNRDISPNAMEFont color=0, 0, 0 +ColumnsFont=新宋体,8,N +ColumnsFont color=0, 0, 0 +TablePkColumnsFont=新宋体,8,U +TablePkColumnsFont color=0, 0, 0 +TableFkColumnsFont=新宋体,8,N +TableFkColumnsFont color=0, 0, 0 +TemporaryVTablesFont=新宋体,8,N +TemporaryVTablesFont color=0, 0, 0 +IndexesFont=新宋体,8,N +IndexesFont color=0, 0, 0 +LABLFont=新宋体,8,N +LABLFont color=0, 0, 0 +AutoAdjustToText=Yes +Keep aspect=No +Keep center=No +Keep size=No +Width=4800 +Height=4000 +Brush color=208 208 255 +Fill Color=Yes +Brush style=6 +Brush bitmap mode=12 +Brush gradient mode=65 +Brush gradient color=255 255 255 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=1 0 128 128 192 +Shadow color=192 192 192 +Shadow=0 + +[DisplayPreferences\Symbol\PROC] +STRNFont=新宋体,8,N +STRNFont color=0, 0, 0 +DISPNAMEFont=新宋体,8,N +DISPNAMEFont color=0, 0, 0 +OWNRDISPNAMEFont=新宋体,8,N +OWNRDISPNAMEFont color=0, 0, 0 +LABLFont=新宋体,8,N +LABLFont color=0, 0, 0 +AutoAdjustToText=Yes +Keep aspect=No +Keep center=No +Keep size=No +Width=4000 +Height=1000 +Brush color=255 255 192 +Fill Color=Yes +Brush style=6 +Brush bitmap mode=12 +Brush gradient mode=65 +Brush gradient color=255 255 255 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=1 0 128 108 0 +Shadow color=192 192 192 +Shadow=0 + +[DisplayPreferences\Symbol\REFR] +SOURCEFont=新宋体,8,N +SOURCEFont color=0, 0, 0 +CENTERFont=新宋体,8,N +CENTERFont color=0, 0, 0 +DESTINATIONFont=新宋体,8,N +DESTINATIONFont color=0, 0, 0 +Line style=0 +AutoAdjustToText=Yes +Keep aspect=No +Keep center=No +Keep size=No +Brush color=255 255 255 +Fill Color=Yes +Brush style=1 +Brush bitmap mode=12 +Brush gradient mode=0 +Brush gradient color=118 118 118 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=1 0 0 128 192 +Shadow color=192 192 192 +Shadow=0 + +[DisplayPreferences\Symbol\VREF] +SOURCEFont=新宋体,8,N +SOURCEFont color=0, 0, 0 +CENTERFont=新宋体,8,N +CENTERFont color=0, 0, 0 +DESTINATIONFont=新宋体,8,N +DESTINATIONFont color=0, 0, 0 +Line style=0 +AutoAdjustToText=Yes +Keep aspect=No +Keep center=No +Keep size=No +Brush color=255 255 255 +Fill Color=Yes +Brush style=1 +Brush bitmap mode=12 +Brush gradient mode=0 +Brush gradient color=118 118 118 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=1 0 128 128 192 +Shadow color=192 192 192 +Shadow=0 + +[DisplayPreferences\Symbol\USRDEPD] +OBJXSTRFont=新宋体,8,N +OBJXSTRFont color=0, 0, 0 +Line style=0 +AutoAdjustToText=Yes +Keep aspect=No +Keep center=No +Keep size=No +Brush color=255 255 255 +Fill Color=Yes +Brush style=1 +Brush bitmap mode=12 +Brush gradient mode=0 +Brush gradient color=118 118 118 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=2 0 128 128 255 +Shadow color=192 192 192 +Shadow=0 + +[DisplayPreferences\Symbol\Free Symbol] +Free TextFont=新宋体,8,N +Free TextFont color=0, 0, 0 +Line style=0 +AutoAdjustToText=Yes +Keep aspect=No +Keep center=No +Keep size=No +Brush color=255 255 255 +Fill Color=Yes +Brush style=1 +Brush bitmap mode=12 +Brush gradient mode=0 +Brush gradient color=118 118 118 +Brush background image= +Custom shape= +Custom text mode=0 +Pen=1 0 0 0 255 +Shadow color=192 192 192 +Shadow=0 +(8268, 11693) +((315,354), (433,354)) +1 +15 + + +1524449375 +1538296407 +-1 +((-38123,15297), (-26435,28269)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1524449886 +-1 +((-23935,12010), (-11861,28282)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538296409 +-1 +((-9361,18172), (2713,27845)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1524449886 +-1 +((5214,16547), (17288,27869)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538296412 +-1 +((19788,14872), (31862,27845)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538296204 +-1 +((-37598,8498), (-29000,12497)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538296205 +-1 +((-37674,3548), (-29076,7547)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538296308 +-1 +((-37528,-6452), (-28929,-2453)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538296401 +-1 +((-24280,-1775), (-11048,10373)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538296599 +-1 +((-9182,625), (2892,10298)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538296612 +-1 +((5017,-2538), (17091,10434)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538297772 +-1 +((-39520,-17440), (-26288,-8592)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538297770 +-1 +((-24744,-19106), (-10738,-8608)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538297380 +-1 +((-9749,-20696), (3870,-8548)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1524449375 +1538297383 +-1 +((5261,-17623), (18494,-8774)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1538296083 +1538296211 +-1 +((-37675,-1349), (-29076,2650)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +1538296587 +1538296608 +-1 +((19570,-987), (32030,8687)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + +config_id +1538296632 +1538297253 +((-13950,-17175), (73200,19575)) +4130 +1 +0 +7 +16777215 +16777215 +新宋体,8,N + + +1538297386 +1538297498 +-1 +((19859,-18262), (33092,-8589)) +12615680 +16570034 +12632256 +STRN 0 新宋体,8,N +DISPNAME 0 新宋体,8,N +OWNRDISPNAME 0 新宋体,8,N +Columns 0 新宋体,8,N +TablePkColumns 0 新宋体,8,U +TableFkColumns 0 新宋体,8,N +Keys 0 新宋体,8,N +Indexes 0 新宋体,8,N +Triggers 0 新宋体,8,N +LABL 0 新宋体,8,N +6 +65 +16777215 + + + + + + + + + + + + +BB11FFF9-9DBB-4648-87AA-9A50E1214549 +sys_dept +sys_dept +1524449375 +Administrator +1538297518 +admin +部门表 + + + +00C66282-419A-4915-8509-DFFFE6352DE8 +dept_id +dept_id +1524449375 +Administrator +1524449375 +Administrator +部门id +int(11) +11 +1 +1 + + +5B6FB0B1-5B1E-4E86-AF2A-72C49EBB315E +parent_id +parent_id +1524449375 +Administrator +1524449375 +Administrator +父部门id +0 +int(11) +11 + + +065E33A5-6AB5-44F1-8FEC-A72311EECD66 +ancestors +ancestors +1538295690 +admin +1538295792 +admin +varchar(50) +50 + + +EBB59EC8-AFD4-40E3-B811-DD5040728D91 +dept_name +dept_name +1524449375 +Administrator +1524449375 +Administrator +部门名称 +'' +varchar(30) +30 + + +2F26C025-82B0-4AC5-AEE0-32BA07B7B529 +order_num +order_num +1524449375 +Administrator +1524449375 +Administrator +显示顺序 +0 +int(4) +4 + + +CA504E09-528C-482E-A0C7-F86C559AA3A6 +leader +leader +1524449375 +Administrator +1524449375 +Administrator +负责人 +'' +varchar(20) +20 + + +9CFC55C4-DF2B-4A90-A789-C3839FAA43A8 +phone +phone +1524449375 +Administrator +1524449375 +Administrator +联系电话 +'' +varchar(20) +20 + + +1A9407E5-D74E-4CE9-9078-C4EC25393F7B +email +email +1524449375 +Administrator +1524449375 +Administrator +邮箱 +'' +varchar(20) +20 + + +B6772812-4B69-4248-871D-FA1B4BA0E5F7 +status +status +1524449375 +Administrator +1538295792 +admin +部门状态:0正常,1停用 +0 +char(1) +1 + + +6EBD2BFF-861E-4247-BAAB-B37CCBAF6F8D +del_flag +del_flag +1538295690 +admin +1538295792 +admin +char(1) +1 + + +2504A090-F6D6-493F-855E-5154E01AF0CA +create_by +create_by +1524449375 +Administrator +1524449375 +Administrator +创建者 +'' +varchar(64) +64 + + +D866AE9E-E7FF-47B2-BF3D-9BC1605A2F39 +create_time +create_time +1524449375 +Administrator +1524449375 +Administrator +创建时间 +timestamp + + +7C6C9836-FC23-4492-8CF1-A4439E01B57C +update_by +update_by +1524449375 +Administrator +1524449375 +Administrator +更新者 +'' +varchar(64) +64 + + +FCED770D-005C-4531-A9D7-D1FD0A054719 +update_time +update_time +1524449375 +Administrator +1524449375 +Administrator +更新时间 +timestamp + + + + +15C1774B-9F17-48B6-A61F-728A25220B30 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +AA56FD91-4450-4282-8F31-AE302DF6AFEC +sys_user +sys_user +1524449375 +Administrator +1538297540 +admin +用户信息表 + + + +4A920BCE-4040-4F12-89D2-7DF345B90321 +user_id +user_id +1524449375 +Administrator +1524449375 +Administrator +用户ID +int(11) +11 +1 +1 + + +174E10B2-4A4D-40FF-80B8-B4D285561E42 +dept_id +dept_id +1524449375 +Administrator +1538297552 +admin +部门ID +NULL +int(11) +11 + + +1D4908A9-5416-4252-BA09-FA122D0194C3 +login_name +login_name +1524449375 +Administrator +1524449375 +Administrator +登录账号 +'' +varchar(30) +30 + + +2EF63346-9E82-4746-81B7-AB67D727446D +user_name +user_name +1524449375 +Administrator +1524449375 +Administrator +用户昵称 +'' +varchar(30) +30 + + +477EA57C-0E0B-4596-9A85-EC91E72F5160 +user_type +user_type +1524449375 +Administrator +1524449375 +Administrator +类型:Y默认用户,N非默认用户 +N +char(1) +1 + + +CD16FFF4-F214-473B-A9A8-FA30A3E357D1 +email +email +1524449375 +Administrator +1524449375 +Administrator +用户邮箱 +'' +varchar(100) +100 + + +61603FA5-3EBC-4389-AED7-1B54D238A563 +phonenumber +phonenumber +1524449375 +Administrator +1524449375 +Administrator +手机号码 +'' +varchar(20) +20 + + +65E9DE55-ED58-4BD9-B96C-7C081D1119B2 +sex +sex +1538295815 +admin +1538295948 +admin +char(1) +1 + + +E5E35061-221A-4BB9-AA22-3CF20F1FCCF6 +avatar +avatar +1538295815 +admin +1538295948 +admin +varchar(100) +100 + + +4ED1C2BF-B826-4A82-9464-EEBF271F4054 +password +password +1524449375 +Administrator +1524449375 +Administrator +密码 +'' +varchar(100) +100 + + +53E6BB49-3435-46E0-832F-BCAFE1A021CB +salt +salt +1524449375 +Administrator +1524449375 +Administrator +盐加密 +'' +varchar(100) +100 + + +245CAD53-B33B-4EED-8CFA-7AA10ED943B8 +status +status +1524449375 +Administrator +1538297540 +admin +帐号状态:0正常,1禁用 +0 +char(1) +1 + + +7F851464-6CC5-445B-9413-2A89B9CE90CB +del_flag +del_flag +1524449375 +Administrator +1538295948 +admin +拒绝登录描述 +'' +char(1) +1 + + +3DC8EC79-D75A-4BF8-8FBC-152E938AC14F +create_by +create_by +1524449375 +Administrator +1524449375 +Administrator +创建者 +'' +varchar(64) +64 + + +48C8C936-7A34-4A97-AACA-A6F07751FFAD +create_time +create_time +1524449375 +Administrator +1524449375 +Administrator +创建时间 +timestamp + + +6050B4F3-9B26-4B40-AB4C-BA483F179958 +update_by +update_by +1524449375 +Administrator +1524449375 +Administrator +更新者 +'' +varchar(64) +64 + + +CD1E7E11-8EB6-4C9C-A69C-39CBCF10573E +update_time +update_time +1524449375 +Administrator +1524449375 +Administrator +更新时间 +timestamp + + +F9F55D4C-13E6-49A0-BFDB-E0AFE0FA5501 +remark +remark +1538295815 +admin +1538295948 +admin +varchar(500) +500 + + + + +2E35FD67-A7A7-4B10-85E4-85115AD0E143 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +2711A520-532C-4F14-A034-BFF047C9CD6B +sys_post +sys_post +1524449375 +Administrator +1538297571 +admin +岗位信息表 + + + +FB04D29E-41F0-49A3-BFDB-58E222843F21 +post_id +post_id +1524449375 +Administrator +1524449375 +Administrator +岗位ID +int(11) +11 +1 +1 + + +50010C4E-4F59-47B9-8F08-05E8E071E8B1 +post_code +post_code +1524449375 +Administrator +1524449375 +Administrator +岗位编码 +varchar(64) +64 +1 + + +0F929250-051E-4344-B22A-C30E071A543B +post_name +post_name +1524449375 +Administrator +1524449375 +Administrator +岗位名称 +varchar(100) +100 +1 + + +2BC9005E-350F-46BE-98D6-9B13060F1B20 +post_sort +post_sort +1524449375 +Administrator +1524449375 +Administrator +显示顺序 +int(4) +4 +1 + + +F6D7AD3E-5EA0-4759-B6BF-6334B7105B78 +status +status +1524449375 +Administrator +1538297565 +admin +状态(0正常 1停用) +char(1) +1 +1 + + +CED01369-5063-479D-A444-32936369A486 +create_by +create_by +1524449375 +Administrator +1524449375 +Administrator +创建者 +'' +varchar(64) +64 + + +A29528FF-A2B9-4149-B997-1B0204D42E40 +create_time +create_time +1524449375 +Administrator +1524449375 +Administrator +创建时间 +timestamp + + +6026A05D-0C1E-497E-8EAF-FDB704BE6A52 +update_by +update_by +1524449375 +Administrator +1524449375 +Administrator +更新者 +'' +varchar(64) +64 + + +DF516F5F-CD82-4347-AC57-BDCB4E5DD75E +update_time +update_time +1524449375 +Administrator +1524449375 +Administrator +更新时间 +timestamp + + +539CEC34-49F0-49A0-9B7C-B84655FD2233 +remark +remark +1524449375 +Administrator +1524449375 +Administrator +备注 +'' +varchar(500) +500 + + + + +14E893B1-D0BA-46A7-A905-F0FFA089B65A +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +11337551-BA45-43CD-9148-92BE60E2F8F5 +sys_role +sys_role +1524449375 +Administrator +1538297608 +admin +角色信息表 + + + +A420E2C9-8FE3-452A-9047-C7BEACE8490C +role_id +role_id +1524449375 +Administrator +1524449375 +Administrator +角色ID +int(10) +10 +1 +1 + + +9342763D-5B89-4440-965B-2B55DB4ACD86 +role_name +role_name +1524449375 +Administrator +1524449375 +Administrator +角色名称 +varchar(30) +30 +1 + + +54480009-0C7E-40F2-AA76-CD914A6D66C5 +role_key +role_key +1524449375 +Administrator +1524449375 +Administrator +角色权限字符串 +varchar(100) +100 +1 + + +E73F4D0E-12A0-42B5-B3CE-B573D499DD6C +role_sort +role_sort +1524449375 +Administrator +1538296031 +admin +显示顺序 +int(10) +10 + + +5F836F54-9EBD-4768-AA3C-F268F5FAFE8D +data_scope +data_scope +1538295973 +admin +1538296031 +admin +char(1) +1 + + +424ED799-E4C1-44AD-A172-C2B3C405E9C5 +status +status +1524449375 +Administrator +1538297608 +admin +角色状态:0正常,1禁用 +0 +char(1) +1 + + +8E034C76-5966-4246-B81B-7B12F37D96A7 +del_flag +del_flag +1538295973 +admin +1538296031 +admin +char(1) +1 + + +214F6E1F-28B1-454B-ABF0-D1C43220129D +create_by +create_by +1524449375 +Administrator +1524449375 +Administrator +创建者 +'' +varchar(64) +64 + + +1A6D5791-0353-4ABC-8BC2-921BB87A2E5A +create_time +create_time +1524449375 +Administrator +1524449375 +Administrator +创建时间 +timestamp + + +D6394880-A49C-4B83-B43A-5FDBAA918AA3 +update_by +update_by +1524449375 +Administrator +1524449375 +Administrator +更新者 +'' +varchar(64) +64 + + +34285DF5-8E36-452B-A3AA-9F4290C20F7E +update_time +update_time +1524449375 +Administrator +1524449375 +Administrator +更新时间 +timestamp + + +2FAB98F7-68A2-460B-8A20-5D5DA73F5103 +remark +remark +1524449375 +Administrator +1524449375 +Administrator +备注 +'' +varchar(500) +500 + + + + +4342E67F-D33C-435F-9865-973E053B6075 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +FBC2A590-443B-43C9-82D5-687B850C8B3D +sys_menu +sys_menu +1524449375 +Administrator +1538297627 +admin +菜单权限表 + + + +BB061292-3B99-432E-9B96-5362AAD918B9 +menu_id +menu_id +1524449375 +Administrator +1524449375 +Administrator +菜单ID +int(11) +11 +1 +1 + + +EA8422AB-37B1-4D60-A3C9-A4BF9039A9D4 +menu_name +menu_name +1524449375 +Administrator +1524449375 +Administrator +菜单名称 +varchar(50) +50 +1 + + +E56E04A8-63F6-4271-92E3-974DC84DD536 +parent_id +parent_id +1524449375 +Administrator +1524449375 +Administrator +父菜单ID +0 +int(11) +11 + + +1809914E-6B09-4CD2-8916-E603D6717557 +order_num +order_num +1524449375 +Administrator +1524449375 +Administrator +显示顺序 +NULL +int(4) +4 + + +FCB44D46-3C21-40CB-B942-57823E52E5B1 +url +url +1524449375 +Administrator +1524449375 +Administrator +请求地址 +'' +varchar(200) +200 + + +667EE044-6805-4668-BAF4-E78B3052051F +menu_type +menu_type +1524449375 +Administrator +1524449375 +Administrator +类型:M目录,C菜单,F按钮 +'' +char(1) +1 + + +F7658083-BCAB-46F7-AF31-8A4B1D8749EF +visible +visible +1524449375 +Administrator +1538297627 +admin +菜单状态:0显示,1隐藏 +0 +char(1) +1 + + +528611C8-C319-430F-8F00-68FBA60F310B +perms +perms +1524449375 +Administrator +1524449375 +Administrator +权限标识 +'' +varchar(100) +100 + + +38004CD7-8DD0-43F1-9E59-B50132CB6F1A +icon +icon +1524449375 +Administrator +1524449375 +Administrator +菜单图标 +'' +varchar(100) +100 + + +6927665F-EC42-4E1F-A275-4B27F442B6B8 +create_by +create_by +1524449375 +Administrator +1524449375 +Administrator +创建者 +'' +varchar(64) +64 + + +1A6A4D0F-0B0B-4522-B4DA-3F1D592CB889 +create_time +create_time +1524449375 +Administrator +1524449375 +Administrator +创建时间 +timestamp + + +605D7776-4820-4BA9-91E8-AD837B73AEFB +update_by +update_by +1524449375 +Administrator +1524449375 +Administrator +更新者 +'' +varchar(64) +64 + + +4CFF26BB-8736-4864-855E-C7C1B133370B +update_time +update_time +1524449375 +Administrator +1524449375 +Administrator +更新时间 +timestamp + + +67C6E46C-DF06-480A-BC74-E927406E5D26 +remark +remark +1524449375 +Administrator +1524449375 +Administrator +备注 +'' +varchar(500) +500 + + + + +08EBE713-9E4D-4312-AA7D-2E4E439734E5 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +F8CB66D1-3632-4509-97C4-17016BE261FC +sys_user_role +sys_user_role +1524449375 +Administrator +1538297676 +admin +用户和角色关联表 + + + +73701F72-C45B-4CA0-8A62-632890E3DEF0 +user_id +user_id +1524449375 +Administrator +1524449375 +Administrator +用户ID +int(11) +11 +1 + + +CABD458B-DA59-46A8-99C3-088AD8D34097 +role_id +role_id +1524449375 +Administrator +1524449375 +Administrator +角色ID +int(11) +11 +1 + + + + +37C3213B-EF22-4CD4-A91F-9A9A2503FB2A +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + + +9F8C6A9F-3221-410E-AEA4-D1A80026397E +sys_role_menu +sys_role_menu +1524449375 +Administrator +1538297683 +admin +角色和菜单关联表 + + + +D2E151A5-6156-46EF-844E-0ADC3070293B +role_id +role_id +1524449375 +Administrator +1524449375 +Administrator +角色ID +int(11) +11 +1 + + +6B8C1E62-FD8B-4504-8FA0-F69917722FBD +menu_id +menu_id +1524449375 +Administrator +1524449375 +Administrator +菜单ID +int(11) +11 +1 + + + + +2E72304F-91F0-4392-BAE8-BBF7A4346B7D +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + + +726CB18E-7D5B-4E2E-9CF8-047AD5AF89E3 +sys_user_post +sys_user_post +1524449375 +Administrator +1538297694 +admin +用户与岗位关联表 + + + +E4A1CAB6-0F63-4917-ACEF-418DE7F894BA +user_id +user_id +1524449375 +Administrator +1538296306 +admin +用户ID +int(11) +11 +1 + + +8E7188D5-B3A5-4F1D-B6CB-D77D652414DE +post_id +post_id +1524449375 +Administrator +1538296306 +admin +岗位ID +int(11) +11 +1 + + + + +4091B7D3-2404-4C20-BBCD-B63E22A5E960 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + + +FE347A45-D8EC-423B-9B38-4D315A3ABE42 +sys_oper_log +sys_oper_log +1524449375 +Administrator +1538297699 +admin +操作日志记录 + + + +F5FC8AC1-7415-4A57-BA2C-EE2E7B9E1EFC +oper_id +oper_id +1524449375 +Administrator +1524449375 +Administrator +日志主键 +int(11) +11 +1 +1 + + +2103BC5C-E28D-4369-8369-E898B218587A +title +title +1524449375 +Administrator +1524449375 +Administrator +模块标题 +'' +varchar(50) +50 + + +6816377B-3DB6-424A-99ED-1D20FEB30ED4 +business_type +business_type +1524449375 +Administrator +1538296397 +admin +功能请求 +'' +int(2) +2 + + +9CA3B7C3-F52C-4E2E-893F-8E6EBA7B2667 +method +method +1524449375 +Administrator +1524449375 +Administrator +方法名称 +'' +varchar(100) +100 + + +A5744803-C050-4108-9D15-7A0B95F03642 +operator_type +operator_type +1524449375 +Administrator +1538296397 +admin +来源渠道 +'' +int(1) +1 + + +B0DF8235-6BC1-452C-8B30-A56F0430E4F5 +oper_name +oper_name +1524449375 +Administrator +1538296397 +admin +登录账号 +'' +varchar(50) +50 + + +25315A12-4EB9-4B67-9E2C-9F40F8EF7FAB +dept_name +dept_name +1524449375 +Administrator +1524449375 +Administrator +部门名称 +'' +varchar(50) +50 + + +7AF8602B-A1DA-4EA3-BFB2-7638F96A86C0 +oper_url +oper_url +1524449375 +Administrator +1524449375 +Administrator +请求URL +'' +varchar(255) +255 + + +F2A56B63-7A56-43FA-8099-411F3578B30D +oper_ip +oper_ip +1524449375 +Administrator +1524449375 +Administrator +主机地址 +'' +varchar(30) +30 + + +1EF1BAF6-F5C1-496C-98E0-8B10C37279A1 +oper_param +oper_param +1524449375 +Administrator +1524449375 +Administrator +请求参数 +'' +varchar(255) +255 + + +AA3F3A4E-D375-4232-B152-01DCFB8F6B6D +status +status +1524449375 +Administrator +1524449375 +Administrator +操作状态 0正常 1异常 +0 +int(1) +1 + + +29E44D4A-6AC7-4220-A502-4BFC8746397A +error_msg +error_msg +1524449375 +Administrator +1524449375 +Administrator +错误消息 +'' +varchar(2000) +2000 + + +22343C35-D913-485B-862E-2CEF579AAF22 +oper_time +oper_time +1524449375 +Administrator +1524449375 +Administrator +操作时间 +timestamp + + + + +C0561C20-CC22-471B-A764-414C0D378FD6 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +AA2CFBA5-FA97-4AF1-92FE-645370B5848D +sys_dict_type +sys_dict_type +1524449375 +Administrator +1538297703 +admin +字典类型表 + + + +79CB7D43-B999-4D92-9477-D3AFEBD94248 +dict_id +dict_id +1524449375 +Administrator +1524449375 +Administrator +字典主键 +int(11) +11 +1 +1 + + +2490B755-3E0A-4935-97F0-2EFDF9A72D05 +dict_name +dict_name +1524449375 +Administrator +1524449375 +Administrator +字典名称 +'' +varchar(100) +100 + + +7421238A-82DB-4992-AA28-41726AB6A5D6 +dict_type +dict_type +1524449375 +Administrator +1524449375 +Administrator +字典类型 +'' +varchar(100) +100 + + +971D2FBD-1A24-4EE4-B943-9367609C7472 +status +status +1524449375 +Administrator +1538296458 +admin +状态(0正常 1禁用) +0 +char(1) +1 + + +B8876246-5BBA-4A03-86D7-98CA4EBEE342 +create_by +create_by +1524449375 +Administrator +1524449375 +Administrator +创建者 +'' +varchar(64) +64 + + +5237CED2-0853-41DE-ACF4-BE442BC9E112 +create_time +create_time +1524449375 +Administrator +1524449375 +Administrator +创建时间 +timestamp + + +2CACFBC0-8349-4B3A-9183-208B18C9F56F +update_by +update_by +1524449375 +Administrator +1524449375 +Administrator +更新者 +'' +varchar(64) +64 + + +ABEE7806-4F61-4B97-980C-CA081F61CA7C +update_time +update_time +1524449375 +Administrator +1524449375 +Administrator +更新时间 +timestamp + + +3966B558-B911-45DE-86C6-57F3DB9267BA +remark +remark +1524449375 +Administrator +1524449375 +Administrator +备注 +'' +varchar(500) +500 + + +AFC0A0ED-A469-40B2-A6C4-4616444830AA +unique +unique +1524449375 +Administrator +1524449375 +Administrator +(dict_type) + + + + +BAD40D8E-BC11-44F5-918E-B27CABBCB051 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +493D6B25-21D0-45B1-BBA0-764B9C09B57D +sys_dict_data +sys_dict_data +1524449375 +Administrator +1538297709 +admin +字典数据表 + + + +CFDB23A8-AE38-4051-973A-2DABAC8283F9 +dict_code +dict_code +1524449375 +Administrator +1524449375 +Administrator +字典编码 +int(11) +11 +1 +1 + + +EAA405BD-12A8-472F-A42D-CDA6A82E291A +dict_sort +dict_sort +1524449375 +Administrator +1524449375 +Administrator +字典排序 +0 +int(4) +4 + + +F13017F5-2AA0-4DE9-9DC2-A9A3D73A98E6 +dict_label +dict_label +1524449375 +Administrator +1524449375 +Administrator +字典标签 +'' +varchar(100) +100 + + +EEEC4136-823D-4892-9BB9-BB0B4ADD83E3 +dict_value +dict_value +1524449375 +Administrator +1524449375 +Administrator +字典键值 +'' +varchar(100) +100 + + +ADF5A383-D055-40BE-BBFC-06E2B93D4E6A +dict_type +dict_type +1524449375 +Administrator +1524449375 +Administrator +字典类型 +'' +varchar(100) +100 + + +A0B2DDF2-251D-4701-9B00-6893C74CC449 +css_class +css_class +1538296497 +admin +1538296556 +admin +varchar(100) +100 + + +3CBFBA8E-7609-458D-9E53-A825C3F307A2 +list_class +list_class +1538296497 +admin +1538296556 +admin +varchar(100) +100 + + +BA974839-DEE0-4684-BBEF-6D7776C34354 +is_default +is_default +1538296497 +admin +1538296556 +admin +char(1) +1 + + +1676CDF5-01CA-4749-BA1D-6E5399257BD0 +status +status +1524449375 +Administrator +1524449375 +Administrator +状态(0正常 1禁用) +0 +int(1) +1 + + +8798B094-1AAF-4A23-B2F1-4C19DACF1AA3 +create_by +create_by +1524449375 +Administrator +1524449375 +Administrator +创建者 +'' +varchar(64) +64 + + +D1CB9293-D762-403C-85CB-4B974ACF7328 +create_time +create_time +1524449375 +Administrator +1524449375 +Administrator +创建时间 +timestamp + + +5A34AF87-B25E-4349-9713-69DC50F6F5F2 +update_by +update_by +1524449375 +Administrator +1524449375 +Administrator +更新者 +'' +varchar(64) +64 + + +3204FBAC-1F61-4571-ADC4-BF1BE9CED85A +update_time +update_time +1524449375 +Administrator +1524449375 +Administrator +更新时间 +timestamp + + +B7DE1842-809C-4401-9C80-C9A37DF9B053 +remark +remark +1524449375 +Administrator +1524449375 +Administrator +备注 +'' +varchar(500) +500 + + + + +2809F417-7FA5-48DA-B613-662C7C28061E +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +0A7C2F56-6E3B-4E70-A549-0EC60779D180 +sys_logininfor +sys_logininfor +1524449375 +Administrator +1538297756 +admin +系统访问记录 + + + +5CB5D942-D52B-487D-BC86-476481B0FB8D +info_id +info_id +1524449375 +Administrator +1524449375 +Administrator +访问ID +int(11) +11 +1 +1 + + +A1C66DBC-9DB7-428B-9275-3D014B6CE388 +login_name +login_name +1524449375 +Administrator +1524449375 +Administrator +登录账号 +'' +varchar(50) +50 + + +8E0F50A6-F98D-48B0-8D9D-78F3A76ED171 +ipaddr +ipaddr +1524449375 +Administrator +1524449375 +Administrator +登录IP地址 +'' +varchar(50) +50 + + +91B70723-1A7E-4277-A100-63B775A504B3 +login_location +login_location +1538297350 +admin +1538297369 +admin +varchar(255) +255 + + +AA04F533-A044-428B-80F8-515B6BB1A302 +browser +browser +1524449375 +Administrator +1524449375 +Administrator +浏览器类型 +'' +varchar(50) +50 + + +D37570E9-9EEE-4349-B875-494A5415C736 +os +os +1524449375 +Administrator +1524449375 +Administrator +操作系统 +'' +varchar(50) +50 + + +CF10A80C-123E-42F3-A2DD-1B770E5F9D86 +status +status +1524449375 +Administrator +1524449375 +Administrator +登录状态 0成功 1失败 +0 +int(1) +1 + + +9113784E-932A-4FAF-82CB-A75B8C827309 +msg +msg +1524449375 +Administrator +1524449375 +Administrator +提示消息 +'' +varchar(255) +255 + + +BCA519C6-19C9-45DF-A0B5-F88E9E6D3557 +login_time +login_time +1524449375 +Administrator +1524449375 +Administrator +访问时间 +timestamp + + + + +C14E656C-0645-49EB-8B42-AD82232E0416 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +4DCA223F-E98B-4D8B-A71C-CFB438C15488 +sys_user_online +sys_user_online +1524449375 +Administrator +1538297754 +admin +在线用户记录 + + + +7FCC57CE-47DD-4948-B949-10401B2FC7B1 +sessionId +sessionId +1524449375 +Administrator +1524449375 +Administrator +用户会话id +'' +varchar(50) +50 +1 + + +FDE5B59D-8CF7-4AAE-987F-3FF2AEBE22CB +login_name +login_name +1524449375 +Administrator +1524449375 +Administrator +登录账号 +'' +varchar(50) +50 + + +AB65FF92-33A0-42C8-8B3F-454A1FAD5615 +dept_name +dept_name +1524449375 +Administrator +1524449375 +Administrator +部门名称 +'' +varchar(50) +50 + + +C4DAF2D0-9CDC-476B-A011-FF5D302371EB +ipaddr +ipaddr +1524449375 +Administrator +1524449375 +Administrator +登录IP地址 +'' +varchar(50) +50 + + +C8243FB0-425B-4A74-9ADA-C93B15E713EA +login_location +login_location +1538297178 +admin +1538297216 +admin +varchar(255) +255 + + +89EC40B0-0C22-4811-90BB-BEA385ACDF20 +browser +browser +1524449375 +Administrator +1524449375 +Administrator +浏览器类型 +'' +varchar(50) +50 + + +AC455631-CFE0-45BB-A0C5-788D695E4B6C +os +os +1524449375 +Administrator +1524449375 +Administrator +操作系统 +'' +varchar(50) +50 + + +5C56E3C9-4591-4762-89E1-C9BBFECB5F11 +status +status +1524449375 +Administrator +1524449375 +Administrator +在线状态on_line在线off_line离线 +'' +varchar(10) +10 + + +0CAF2F1F-459F-4F78-9075-D95F924A4FF7 +start_timestamp +start_timestamp +1524449375 +Administrator +1524449375 +Administrator +session创建时间 +timestamp + + +6AE6BDED-823E-4455-9A9F-338EC6F7BDB9 +last_access_time +last_access_time +1524449375 +Administrator +1524449375 +Administrator +session最后访问时间 +timestamp + + +CE390924-4628-421C-979F-002C2952E99E +expire_time +expire_time +1524449375 +Administrator +1524449375 +Administrator +超时时间,单位为分钟 +0 +int(5) +5 + + + + +365CC94D-6124-42C7-96BD-376B84B709F7 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +AFCBF4DB-07EC-42D1-ACA7-56B5038F5AC5 +sys_job +sys_job +1524449375 +Administrator +1538297732 +admin +定时任务调度表 + + + +1658CED4-3885-4094-AB70-F35408EBCD5E +job_id +job_id +1524449375 +Administrator +1524449375 +Administrator +任务ID +int(11) +11 +1 +1 + + +731E7147-E3A4-4D93-8C7C-BB1C6D94DB9E +job_name +job_name +1524449375 +Administrator +1524449375 +Administrator +任务名称 +'' +varchar(64) +64 +1 + + +C64B3655-C240-44F0-83B4-F42FB76C8BEA +job_group +job_group +1524449375 +Administrator +1524449375 +Administrator +任务组名 +'' +varchar(64) +64 +1 + + +9F7E735D-B823-4ADA-BA3D-8FFFFEC92F5C +method_name +method_name +1524449375 +Administrator +1524449375 +Administrator +任务方法 +'' +varchar(500) +500 + + +28EEE4F4-E8E7-4052-8F10-88D6C74C595D +method_params +method_params +1524449375 +Administrator +1538297298 +admin +方法参数 +'' +varchar(200) +200 + + +C8986FAD-E2E7-4364-9E8B-B75366B9A4ED +cron_expression +cron_expression +1524449375 +Administrator +1524449375 +Administrator +cron执行表达式 +'' +varchar(255) +255 + + +FD188167-AC02-4161-BE89-D63E61412313 +misfire_policy +misfire_policy +1538297273 +admin +1538297298 +admin +varchar(20) +20 + + +2D4B6C8F-EEE8-4474-9D20-8206A7E80362 +status +status +1524449375 +Administrator +1524449375 +Administrator +状态(0正常 1暂停) +0 +int(1) +1 + + +CA78AC7F-19E7-47BC-BF7B-9F31EFB02702 +create_by +create_by +1524449375 +Administrator +1524449375 +Administrator +创建者 +'' +varchar(64) +64 + + +B8F807AE-9F19-4FCA-BA98-7BF71DD0CA02 +create_time +create_time +1524449375 +Administrator +1524449375 +Administrator +创建时间 +timestamp + + +3FBB42FA-ED0F-4D7C-99D0-5F7AF7B0F1DD +update_by +update_by +1524449375 +Administrator +1524449375 +Administrator +更新者 +'' +varchar(64) +64 + + +1C5863D2-A8B9-43DB-AA06-F8BE3E01093B +update_time +update_time +1524449375 +Administrator +1524449375 +Administrator +更新时间 +timestamp + + +889C3FF9-BB1E-4EB1-AFE9-1D1155984915 +remark +remark +1524449375 +Administrator +1524449375 +Administrator +备注信息 +'' +varchar(500) +500 + + + + +38106F1A-4FFB-4EC0-B979-55BD6C6C6FF7 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + + + +CF7C8958-5494-48C6-BE05-83F2CF8C7513 +sys_job_log +sys_job_log +1524449375 +Administrator +1538297742 +admin +定时任务调度日志表 + + + +308F32A1-A8EC-4002-9993-DF9234A303B7 +job_log_id +job_log_id +1524449375 +Administrator +1524449375 +Administrator +任务日志ID +int(11) +11 +1 +1 + + +F4D55B65-BB6B-4182-A6D6-F9CAABC19110 +job_name +job_name +1524449375 +Administrator +1524449375 +Administrator +任务名称 +varchar(64) +64 +1 + + +8AF383A0-01C0-4947-8384-FF0F13AC00AE +job_group +job_group +1524449375 +Administrator +1524449375 +Administrator +任务组名 +varchar(64) +64 +1 + + +96582B76-F1E9-4473-BA51-01B87B5F459E +method_name +method_name +1524449375 +Administrator +1524449375 +Administrator +任务方法 +varchar(500) +500 + + +2AB02ABA-02E3-4F72-95BA-4261A7F5729A +method_params +method_params +1524449375 +Administrator +1538297325 +admin +方法参数 +'' +varchar(200) +200 + + +8EB39444-CBFF-43AA-AA37-49217EF545B6 +job_message +job_message +1524449375 +Administrator +1524449375 +Administrator +日志信息 +varchar(500) +500 + + +18CD263C-0F57-4EDF-999E-1B5A7EE2BFF9 +is_exception +is_exception +1524449375 +Administrator +1538297325 +admin +是否异常 +0 +char(1) +1 + + +634ECD78-2251-43EB-B6CF-DF7FA9DA4354 +exception_info +exception_info +1524449375 +Administrator +1524449375 +Administrator +异常信息 +text + + +4EC075CC-507B-43D7-860F-34DAAEB1DBBF +create_time +create_time +1524449375 +Administrator +1524449375 +Administrator +创建时间 +timestamp + + + + +A87DCE10-894A-4CF7-B39C-AF18202C7F86 +Key_1 +Key_1 +1524449375 +Administrator +1524449375 +Administrator + + + + + + + + + + +FD6284E8-B6D4-43AF-A038-9C97DCD403DC +sys_role_dept +sys_role_dept +1538296083 +admin +1538297689 +admin +角色和部门关联表 + + + +2BC66204-4193-42E6-BB7B-7AD57C9E5BEF +role_id +role_id +1538296083 +admin +1538296150 +admin +用户ID +int(11) +11 +1 + + +A32BC025-6437-41AB-BAA4-3A150E406781 +dept_id +dept_id +1538296083 +admin +1538296150 +admin +岗位ID +int(11) +11 +1 + + + + +315FFED5-B0A0-4649-8255-2283896340C9 +Key_1 +Key_1 +1538296083 +admin +1538296083 +admin + + + + + + + + + + + +45EB995C-F5F6-4818-AEB1-2038DEBA9CEE +sys_config +sys_config +1538296587 +admin +1538297714 +admin +参数配置表 + + + +667C4616-146B-475C-8111-4720375D762C +config_id +config_id +1538296587 +admin +1538296691 +admin +字典编码 +int(5) +5 +1 +1 + + +EA798E0B-0CBE-4897-B0AF-1F2D3CD6DEF4 +config_name +config_name +1538296587 +admin +1538296691 +admin +字典排序 +0 +varchar(100) +100 + + +A9A2A6E0-C914-4516-AE4C-F33CE71B92E8 +config_key +config_key +1538296587 +admin +1538296691 +admin +字典标签 +'' +varchar(100) +100 + + +24CCA897-8671-402E-8229-9ED0C80C176A +config_value +config_value +1538296587 +admin +1538296691 +admin +字典键值 +'' +varchar(100) +100 + + +B4E76B1D-BFAF-42F3-8CCA-8B5A8CC7CBFF +config_type +config_type +1538296587 +admin +1538296691 +admin +字典类型 +'' +char(1) +1 + + +A6AC1891-F5C4-45B3-8CAB-8F4CE8B8BF08 +create_by +create_by +1538296587 +admin +1538296587 +admin +创建者 +'' +varchar(64) +64 + + +CC1E0367-A079-49A0-8F0A-FE5F7B3EB6EA +create_time +create_time +1538296587 +admin +1538296587 +admin +创建时间 +timestamp + + +081CD54E-AE38-4696-A326-F829B8EA5737 +update_by +update_by +1538296587 +admin +1538296587 +admin +更新者 +'' +varchar(64) +64 + + +E2118ECE-8F52-4FBA-B18A-F30FFB2BDD20 +update_time +update_time +1538296587 +admin +1538296587 +admin +更新时间 +timestamp + + +55A16121-8932-465E-8427-EBDA39B2B900 +remark +remark +1538296587 +admin +1538296587 +admin +备注 +'' +varchar(500) +500 + + + + +0F331278-2804-496A-A87B-B0944C80FB82 +Key_1 +Key_1 +1538296587 +admin +1538296587 +admin + + + + + + + + + + +F33DE1D6-C12D-43DB-A502-83BD1615F081 +sys_notice +sys_notice +1538297386 +admin +1538297746 +admin +通知公告表 + + + +FF4A9744-D7CA-450E-8AD7-B3E7E90075CE +notice_id +notice_id +1538297386 +admin +1538297496 +admin +任务日志ID +int(4) +4 +1 +1 + + +E2B08825-4C94-4209-80B2-21A7AD8CBF2D +notice_title +notice_title +1538297386 +admin +1538297496 +admin +任务名称 +varchar(50) +50 +1 + + +04414862-9ABC-4431-B1B7-B44ECC08CB6E +notice_type +notice_type +1538297386 +admin +1538297496 +admin +任务组名 +char(2) +2 +1 + + +E829DAD1-E3F9-4AED-A3DE-59CE4340333E +notice_content +notice_content +1538297386 +admin +1538297496 +admin +任务方法 +varchar(500) +500 + + +2EABC8DB-6700-4717-89A3-31461C4CB2D5 +status +status +1538297386 +admin +1538297496 +admin +方法参数 +'' +char(1) +1 + + +448D3EB6-DE24-4BE3-9C29-1FC3C71B0E8D +create_by +create_by +1538297386 +admin +1538297496 +admin +日志信息 +varchar(64) +64 + + +770ED87D-D4D7-499C-A266-7A54051B1A84 +create_time1 +create_time1 +1538297386 +admin +1538297496 +admin +是否异常 +0 +datetime + + +12DDF399-7CCB-4117-8B05-6AA9BEE845E5 +update_by +update_by +1538297386 +admin +1538297496 +admin +异常信息 +varchar(64) +64 + + +FE101CE4-9B66-4097-944D-36B01A9E2219 +update_time1 +update_time1 +1538297400 +admin +1538297496 +admin +datetime + + +D5F1728C-01D0-4C00-9AD6-AAA14228104B +remark +remark +1538297386 +admin +1538297496 +admin +创建时间 +varchar(255) +255 + + + + +43C7AC1D-CE7A-4B55-A474-8CB2376D446F +Key_1 +Key_1 +1538297386 +admin +1538297386 +admin + + + + + + + + + + + + +F2EBEA5B-F352-45CB-B349-39158064CEE8 +PUBLIC +PUBLIC +1524449325 +Administrator +1524449325 +Administrator + + + + +41740AEF-D7FB-4738-ABDF-47C3287A6AF6 +MySQL 5.0 +MYSQL50 +1524449337 +Administrator +1538295558 +admin +file:///%_DBMS%/mysql50.xdb +F4F16ECD-F2F1-4006-AF6F-638D5C65F35E +4BA9F647-DAB1-11D1-9944-006097355D9B + + + + + + + + + + \ No newline at end of file diff --git a/sql/ry_20210924.sql b/sql/ry_20210924.sql new file mode 100644 index 0000000..1fa768b --- /dev/null +++ b/sql/ry_20210924.sql @@ -0,0 +1,713 @@ +-- ---------------------------- +-- 1、部门表 +-- ---------------------------- +drop table if exists sys_dept; +create table sys_dept ( + dept_id bigint(20) not null auto_increment comment '部门id', + parent_id bigint(20) default 0 comment '父部门id', + ancestors varchar(50) default '' comment '祖级列表', + dept_name varchar(30) default '' comment '部门名称', + order_num int(4) default 0 comment '显示顺序', + leader varchar(20) default null comment '负责人', + phone varchar(11) default null comment '联系电话', + email varchar(50) default null comment '邮箱', + status char(1) default '0' comment '部门状态(0正常 1停用)', + del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + primary key (dept_id) +) engine=innodb auto_increment=200 comment = '部门表'; + +-- ---------------------------- +-- 初始化-部门表数据 +-- ---------------------------- +insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); + + +-- ---------------------------- +-- 2、用户信息表 +-- ---------------------------- +drop table if exists sys_user; +create table sys_user ( + user_id bigint(20) not null auto_increment comment '用户ID', + dept_id bigint(20) default null comment '部门ID', + login_name varchar(30) not null comment '登录账号', + user_name varchar(30) default '' comment '用户昵称', + user_type varchar(2) default '00' comment '用户类型(00系统用户 01注册用户)', + email varchar(50) default '' comment '用户邮箱', + phonenumber varchar(11) default '' comment '手机号码', + sex char(1) default '0' comment '用户性别(0男 1女 2未知)', + avatar varchar(100) default '' comment '头像路径', + password varchar(50) default '' comment '密码', + salt varchar(20) default '' comment '盐加密', + status char(1) default '0' comment '帐号状态(0正常 1停用)', + del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', + login_ip varchar(128) default '' comment '最后登录IP', + login_date datetime comment '最后登录时间', + pwd_update_date datetime comment '密码最后更新时间', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default null comment '备注', + primary key (user_id) +) engine=innodb auto_increment=100 comment = '用户信息表'; + +-- ---------------------------- +-- 初始化-用户信息表数据 +-- ---------------------------- +insert into sys_user values(1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '29c67a30398638269fe600f73a054934', '111111', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '管理员'); +insert into sys_user values(2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '8e6d98b90472783cc73c17047ddccf36', '222222', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '测试员'); + + +-- ---------------------------- +-- 3、岗位信息表 +-- ---------------------------- +drop table if exists sys_post; +create table sys_post +( + post_id bigint(20) not null auto_increment comment '岗位ID', + post_code varchar(64) not null comment '岗位编码', + post_name varchar(50) not null comment '岗位名称', + post_sort int(4) not null comment '显示顺序', + status char(1) not null comment '状态(0正常 1停用)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default null comment '备注', + primary key (post_id) +) engine=innodb comment = '岗位信息表'; + +-- ---------------------------- +-- 初始化-岗位信息表数据 +-- ---------------------------- +insert into sys_post values(1, 'ceo', '董事长', 1, '0', 'admin', sysdate(), '', null, ''); +insert into sys_post values(2, 'se', '项目经理', 2, '0', 'admin', sysdate(), '', null, ''); +insert into sys_post values(3, 'hr', '人力资源', 3, '0', 'admin', sysdate(), '', null, ''); +insert into sys_post values(4, 'user', '普通员工', 4, '0', 'admin', sysdate(), '', null, ''); + + +-- ---------------------------- +-- 4、角色信息表 +-- ---------------------------- +drop table if exists sys_role; +create table sys_role ( + role_id bigint(20) not null auto_increment comment '角色ID', + role_name varchar(30) not null comment '角色名称', + role_key varchar(100) not null comment '角色权限字符串', + role_sort int(4) not null comment '显示顺序', + data_scope char(1) default '1' comment '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)', + status char(1) not null comment '角色状态(0正常 1停用)', + del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default null comment '备注', + primary key (role_id) +) engine=innodb auto_increment=100 comment = '角色信息表'; + +-- ---------------------------- +-- 初始化-角色信息表数据 +-- ---------------------------- +insert into sys_role values('1', '超级管理员', 'admin', 1, 1, '0', '0', 'admin', sysdate(), '', null, '超级管理员'); +insert into sys_role values('2', '普通角色', 'common', 2, 2, '0', '0', 'admin', sysdate(), '', null, '普通角色'); + + +-- ---------------------------- +-- 5、菜单权限表 +-- ---------------------------- +drop table if exists sys_menu; +create table sys_menu ( + menu_id bigint(20) not null auto_increment comment '菜单ID', + menu_name varchar(50) not null comment '菜单名称', + parent_id bigint(20) default 0 comment '父菜单ID', + order_num int(4) default 0 comment '显示顺序', + url varchar(200) default '#' comment '请求地址', + target varchar(20) default '' comment '打开方式(menuItem页签 menuBlank新窗口)', + menu_type char(1) default '' comment '菜单类型(M目录 C菜单 F按钮)', + visible char(1) default 0 comment '菜单状态(0显示 1隐藏)', + is_refresh char(1) default 1 comment '是否刷新(0刷新 1不刷新)', + perms varchar(100) default null comment '权限标识', + icon varchar(100) default '#' comment '菜单图标', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default '' comment '备注', + primary key (menu_id) +) engine=innodb auto_increment=2000 comment = '菜单权限表'; + +-- ---------------------------- +-- 初始化-菜单信息表数据 +-- ---------------------------- +-- 一级菜单 +insert into sys_menu values('1', '系统管理', '0', '1', '#', '', 'M', '0', '1', '', 'fa fa-gear', 'admin', sysdate(), '', null, '系统管理目录'); +insert into sys_menu values('2', '系统监控', '0', '2', '#', '', 'M', '0', '1', '', 'fa fa-video-camera', 'admin', sysdate(), '', null, '系统监控目录'); +insert into sys_menu values('3', '系统工具', '0', '3', '#', '', 'M', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '系统工具目录'); +insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', 'menuBlank', 'C', '0', '1', '', 'fa fa-location-arrow', 'admin', sysdate(), '', null, '若依官网地址'); +-- 二级菜单 +insert into sys_menu values('100', '用户管理', '1', '1', '/system/user', '', 'C', '0', '1', 'system:user:view', 'fa fa-user-o', 'admin', sysdate(), '', null, '用户管理菜单'); +insert into sys_menu values('101', '角色管理', '1', '2', '/system/role', '', 'C', '0', '1', 'system:role:view', 'fa fa-user-secret', 'admin', sysdate(), '', null, '角色管理菜单'); +insert into sys_menu values('102', '菜单管理', '1', '3', '/system/menu', '', 'C', '0', '1', 'system:menu:view', 'fa fa-th-list', 'admin', sysdate(), '', null, '菜单管理菜单'); +insert into sys_menu values('103', '部门管理', '1', '4', '/system/dept', '', 'C', '0', '1', 'system:dept:view', 'fa fa-outdent', 'admin', sysdate(), '', null, '部门管理菜单'); +insert into sys_menu values('104', '岗位管理', '1', '5', '/system/post', '', 'C', '0', '1', 'system:post:view', 'fa fa-address-card-o', 'admin', sysdate(), '', null, '岗位管理菜单'); +insert into sys_menu values('105', '字典管理', '1', '6', '/system/dict', '', 'C', '0', '1', 'system:dict:view', 'fa fa-bookmark-o', 'admin', sysdate(), '', null, '字典管理菜单'); +insert into sys_menu values('106', '参数设置', '1', '7', '/system/config', '', 'C', '0', '1', 'system:config:view', 'fa fa-sun-o', 'admin', sysdate(), '', null, '参数设置菜单'); +insert into sys_menu values('107', '通知公告', '1', '8', '/system/notice', '', 'C', '0', '1', 'system:notice:view', 'fa fa-bullhorn', 'admin', sysdate(), '', null, '通知公告菜单'); +insert into sys_menu values('108', '日志管理', '1', '9', '#', '', 'M', '0', '1', '', 'fa fa-pencil-square-o', 'admin', sysdate(), '', null, '日志管理菜单'); +insert into sys_menu values('109', '在线用户', '2', '1', '/monitor/online', '', 'C', '0', '1', 'monitor:online:view', 'fa fa-user-circle', 'admin', sysdate(), '', null, '在线用户菜单'); +insert into sys_menu values('110', '定时任务', '2', '2', '/monitor/job', '', 'C', '0', '1', 'monitor:job:view', 'fa fa-tasks', 'admin', sysdate(), '', null, '定时任务菜单'); +insert into sys_menu values('111', '数据监控', '2', '3', '/monitor/data', '', 'C', '0', '1', 'monitor:data:view', 'fa fa-bug', 'admin', sysdate(), '', null, '数据监控菜单'); +insert into sys_menu values('112', '服务监控', '2', '4', '/monitor/server', '', 'C', '0', '1', 'monitor:server:view', 'fa fa-server', 'admin', sysdate(), '', null, '服务监控菜单'); +insert into sys_menu values('113', '缓存监控', '2', '5', '/monitor/cache', '', 'C', '0', '1', 'monitor:cache:view', 'fa fa-cube', 'admin', sysdate(), '', null, '缓存监控菜单'); +insert into sys_menu values('114', '表单构建', '3', '1', '/tool/build', '', 'C', '0', '1', 'tool:build:view', 'fa fa-wpforms', 'admin', sysdate(), '', null, '表单构建菜单'); +insert into sys_menu values('115', '代码生成', '3', '2', '/tool/gen', '', 'C', '0', '1', 'tool:gen:view', 'fa fa-code', 'admin', sysdate(), '', null, '代码生成菜单'); +insert into sys_menu values('116', '系统接口', '3', '3', '/tool/swagger', '', 'C', '0', '1', 'tool:swagger:view', 'fa fa-gg', 'admin', sysdate(), '', null, '系统接口菜单'); +-- 三级菜单 +insert into sys_menu values('500', '操作日志', '108', '1', '/monitor/operlog', '', 'C', '0', '1', 'monitor:operlog:view', 'fa fa-address-book', 'admin', sysdate(), '', null, '操作日志菜单'); +insert into sys_menu values('501', '登录日志', '108', '2', '/monitor/logininfor', '', 'C', '0', '1', 'monitor:logininfor:view', 'fa fa-file-image-o', 'admin', sysdate(), '', null, '登录日志菜单'); +-- 用户管理按钮 +insert into sys_menu values('1000', '用户查询', '100', '1', '#', '', 'F', '0', '1', 'system:user:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1001', '用户新增', '100', '2', '#', '', 'F', '0', '1', 'system:user:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1002', '用户修改', '100', '3', '#', '', 'F', '0', '1', 'system:user:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1003', '用户删除', '100', '4', '#', '', 'F', '0', '1', 'system:user:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1004', '用户导出', '100', '5', '#', '', 'F', '0', '1', 'system:user:export', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1005', '用户导入', '100', '6', '#', '', 'F', '0', '1', 'system:user:import', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1006', '重置密码', '100', '7', '#', '', 'F', '0', '1', 'system:user:resetPwd', '#', 'admin', sysdate(), '', null, ''); +-- 角色管理按钮 +insert into sys_menu values('1007', '角色查询', '101', '1', '#', '', 'F', '0', '1', 'system:role:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1008', '角色新增', '101', '2', '#', '', 'F', '0', '1', 'system:role:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1009', '角色修改', '101', '3', '#', '', 'F', '0', '1', 'system:role:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1010', '角色删除', '101', '4', '#', '', 'F', '0', '1', 'system:role:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1011', '角色导出', '101', '5', '#', '', 'F', '0', '1', 'system:role:export', '#', 'admin', sysdate(), '', null, ''); +-- 菜单管理按钮 +insert into sys_menu values('1012', '菜单查询', '102', '1', '#', '', 'F', '0', '1', 'system:menu:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1013', '菜单新增', '102', '2', '#', '', 'F', '0', '1', 'system:menu:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1014', '菜单修改', '102', '3', '#', '', 'F', '0', '1', 'system:menu:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1015', '菜单删除', '102', '4', '#', '', 'F', '0', '1', 'system:menu:remove', '#', 'admin', sysdate(), '', null, ''); +-- 部门管理按钮 +insert into sys_menu values('1016', '部门查询', '103', '1', '#', '', 'F', '0', '1', 'system:dept:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1017', '部门新增', '103', '2', '#', '', 'F', '0', '1', 'system:dept:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1018', '部门修改', '103', '3', '#', '', 'F', '0', '1', 'system:dept:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1019', '部门删除', '103', '4', '#', '', 'F', '0', '1', 'system:dept:remove', '#', 'admin', sysdate(), '', null, ''); +-- 岗位管理按钮 +insert into sys_menu values('1020', '岗位查询', '104', '1', '#', '', 'F', '0', '1', 'system:post:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1021', '岗位新增', '104', '2', '#', '', 'F', '0', '1', 'system:post:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1022', '岗位修改', '104', '3', '#', '', 'F', '0', '1', 'system:post:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1023', '岗位删除', '104', '4', '#', '', 'F', '0', '1', 'system:post:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1024', '岗位导出', '104', '5', '#', '', 'F', '0', '1', 'system:post:export', '#', 'admin', sysdate(), '', null, ''); +-- 字典管理按钮 +insert into sys_menu values('1025', '字典查询', '105', '1', '#', '', 'F', '0', '1', 'system:dict:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1026', '字典新增', '105', '2', '#', '', 'F', '0', '1', 'system:dict:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1027', '字典修改', '105', '3', '#', '', 'F', '0', '1', 'system:dict:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1028', '字典删除', '105', '4', '#', '', 'F', '0', '1', 'system:dict:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1029', '字典导出', '105', '5', '#', '', 'F', '0', '1', 'system:dict:export', '#', 'admin', sysdate(), '', null, ''); +-- 参数设置按钮 +insert into sys_menu values('1030', '参数查询', '106', '1', '#', '', 'F', '0', '1', 'system:config:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1031', '参数新增', '106', '2', '#', '', 'F', '0', '1', 'system:config:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1032', '参数修改', '106', '3', '#', '', 'F', '0', '1', 'system:config:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1033', '参数删除', '106', '4', '#', '', 'F', '0', '1', 'system:config:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1034', '参数导出', '106', '5', '#', '', 'F', '0', '1', 'system:config:export', '#', 'admin', sysdate(), '', null, ''); +-- 通知公告按钮 +insert into sys_menu values('1035', '公告查询', '107', '1', '#', '', 'F', '0', '1', 'system:notice:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1036', '公告新增', '107', '2', '#', '', 'F', '0', '1', 'system:notice:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1037', '公告修改', '107', '3', '#', '', 'F', '0', '1', 'system:notice:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1038', '公告删除', '107', '4', '#', '', 'F', '0', '1', 'system:notice:remove', '#', 'admin', sysdate(), '', null, ''); +-- 操作日志按钮 +insert into sys_menu values('1039', '操作查询', '500', '1', '#', '', 'F', '0', '1', 'monitor:operlog:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1040', '操作删除', '500', '2', '#', '', 'F', '0', '1', 'monitor:operlog:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1041', '详细信息', '500', '3', '#', '', 'F', '0', '1', 'monitor:operlog:detail', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1042', '日志导出', '500', '4', '#', '', 'F', '0', '1', 'monitor:operlog:export', '#', 'admin', sysdate(), '', null, ''); +-- 登录日志按钮 +insert into sys_menu values('1043', '登录查询', '501', '1', '#', '', 'F', '0', '1', 'monitor:logininfor:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1044', '登录删除', '501', '2', '#', '', 'F', '0', '1', 'monitor:logininfor:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1045', '日志导出', '501', '3', '#', '', 'F', '0', '1', 'monitor:logininfor:export', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1046', '账户解锁', '501', '4', '#', '', 'F', '0', '1', 'monitor:logininfor:unlock', '#', 'admin', sysdate(), '', null, ''); +-- 在线用户按钮 +insert into sys_menu values('1047', '在线查询', '109', '1', '#', '', 'F', '0', '1', 'monitor:online:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1048', '批量强退', '109', '2', '#', '', 'F', '0', '1', 'monitor:online:batchForceLogout', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1049', '单条强退', '109', '3', '#', '', 'F', '0', '1', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, ''); +-- 定时任务按钮 +insert into sys_menu values('1050', '任务查询', '110', '1', '#', '', 'F', '0', '1', 'monitor:job:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1051', '任务新增', '110', '2', '#', '', 'F', '0', '1', 'monitor:job:add', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1052', '任务修改', '110', '3', '#', '', 'F', '0', '1', 'monitor:job:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1053', '任务删除', '110', '4', '#', '', 'F', '0', '1', 'monitor:job:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1054', '状态修改', '110', '5', '#', '', 'F', '0', '1', 'monitor:job:changeStatus', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1055', '任务详细', '110', '6', '#', '', 'F', '0', '1', 'monitor:job:detail', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1056', '任务导出', '110', '7', '#', '', 'F', '0', '1', 'monitor:job:export', '#', 'admin', sysdate(), '', null, ''); +-- 代码生成按钮 +insert into sys_menu values('1057', '生成查询', '115', '1', '#', '', 'F', '0', '1', 'tool:gen:list', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1058', '生成修改', '115', '2', '#', '', 'F', '0', '1', 'tool:gen:edit', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1059', '生成删除', '115', '3', '#', '', 'F', '0', '1', 'tool:gen:remove', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1060', '预览代码', '115', '4', '#', '', 'F', '0', '1', 'tool:gen:preview', '#', 'admin', sysdate(), '', null, ''); +insert into sys_menu values('1061', '生成代码', '115', '5', '#', '', 'F', '0', '1', 'tool:gen:code', '#', 'admin', sysdate(), '', null, ''); + + +-- ---------------------------- +-- 6、用户和角色关联表 用户N-1角色 +-- ---------------------------- +drop table if exists sys_user_role; +create table sys_user_role ( + user_id bigint(20) not null comment '用户ID', + role_id bigint(20) not null comment '角色ID', + primary key(user_id, role_id) +) engine=innodb comment = '用户和角色关联表'; + +-- ---------------------------- +-- 初始化-用户和角色关联表数据 +-- ---------------------------- +insert into sys_user_role values ('1', '1'); +insert into sys_user_role values ('2', '2'); + + +-- ---------------------------- +-- 7、角色和菜单关联表 角色1-N菜单 +-- ---------------------------- +drop table if exists sys_role_menu; +create table sys_role_menu ( + role_id bigint(20) not null comment '角色ID', + menu_id bigint(20) not null comment '菜单ID', + primary key(role_id, menu_id) +) engine=innodb comment = '角色和菜单关联表'; + +-- ---------------------------- +-- 初始化-角色和菜单关联表数据 +-- ---------------------------- +insert into sys_role_menu values ('2', '1'); +insert into sys_role_menu values ('2', '2'); +insert into sys_role_menu values ('2', '3'); +insert into sys_role_menu values ('2', '4'); +insert into sys_role_menu values ('2', '100'); +insert into sys_role_menu values ('2', '101'); +insert into sys_role_menu values ('2', '102'); +insert into sys_role_menu values ('2', '103'); +insert into sys_role_menu values ('2', '104'); +insert into sys_role_menu values ('2', '105'); +insert into sys_role_menu values ('2', '106'); +insert into sys_role_menu values ('2', '107'); +insert into sys_role_menu values ('2', '108'); +insert into sys_role_menu values ('2', '109'); +insert into sys_role_menu values ('2', '110'); +insert into sys_role_menu values ('2', '111'); +insert into sys_role_menu values ('2', '112'); +insert into sys_role_menu values ('2', '113'); +insert into sys_role_menu values ('2', '114'); +insert into sys_role_menu values ('2', '115'); +insert into sys_role_menu values ('2', '116'); +insert into sys_role_menu values ('2', '500'); +insert into sys_role_menu values ('2', '501'); +insert into sys_role_menu values ('2', '1000'); +insert into sys_role_menu values ('2', '1001'); +insert into sys_role_menu values ('2', '1002'); +insert into sys_role_menu values ('2', '1003'); +insert into sys_role_menu values ('2', '1004'); +insert into sys_role_menu values ('2', '1005'); +insert into sys_role_menu values ('2', '1006'); +insert into sys_role_menu values ('2', '1007'); +insert into sys_role_menu values ('2', '1008'); +insert into sys_role_menu values ('2', '1009'); +insert into sys_role_menu values ('2', '1010'); +insert into sys_role_menu values ('2', '1011'); +insert into sys_role_menu values ('2', '1012'); +insert into sys_role_menu values ('2', '1013'); +insert into sys_role_menu values ('2', '1014'); +insert into sys_role_menu values ('2', '1015'); +insert into sys_role_menu values ('2', '1016'); +insert into sys_role_menu values ('2', '1017'); +insert into sys_role_menu values ('2', '1018'); +insert into sys_role_menu values ('2', '1019'); +insert into sys_role_menu values ('2', '1020'); +insert into sys_role_menu values ('2', '1021'); +insert into sys_role_menu values ('2', '1022'); +insert into sys_role_menu values ('2', '1023'); +insert into sys_role_menu values ('2', '1024'); +insert into sys_role_menu values ('2', '1025'); +insert into sys_role_menu values ('2', '1026'); +insert into sys_role_menu values ('2', '1027'); +insert into sys_role_menu values ('2', '1028'); +insert into sys_role_menu values ('2', '1029'); +insert into sys_role_menu values ('2', '1030'); +insert into sys_role_menu values ('2', '1031'); +insert into sys_role_menu values ('2', '1032'); +insert into sys_role_menu values ('2', '1033'); +insert into sys_role_menu values ('2', '1034'); +insert into sys_role_menu values ('2', '1035'); +insert into sys_role_menu values ('2', '1036'); +insert into sys_role_menu values ('2', '1037'); +insert into sys_role_menu values ('2', '1038'); +insert into sys_role_menu values ('2', '1039'); +insert into sys_role_menu values ('2', '1040'); +insert into sys_role_menu values ('2', '1041'); +insert into sys_role_menu values ('2', '1042'); +insert into sys_role_menu values ('2', '1043'); +insert into sys_role_menu values ('2', '1044'); +insert into sys_role_menu values ('2', '1045'); +insert into sys_role_menu values ('2', '1046'); +insert into sys_role_menu values ('2', '1047'); +insert into sys_role_menu values ('2', '1048'); +insert into sys_role_menu values ('2', '1049'); +insert into sys_role_menu values ('2', '1050'); +insert into sys_role_menu values ('2', '1051'); +insert into sys_role_menu values ('2', '1052'); +insert into sys_role_menu values ('2', '1053'); +insert into sys_role_menu values ('2', '1054'); +insert into sys_role_menu values ('2', '1055'); +insert into sys_role_menu values ('2', '1056'); +insert into sys_role_menu values ('2', '1057'); +insert into sys_role_menu values ('2', '1058'); +insert into sys_role_menu values ('2', '1059'); +insert into sys_role_menu values ('2', '1060'); +insert into sys_role_menu values ('2', '1061'); + +-- ---------------------------- +-- 8、角色和部门关联表 角色1-N部门 +-- ---------------------------- +drop table if exists sys_role_dept; +create table sys_role_dept ( + role_id bigint(20) not null comment '角色ID', + dept_id bigint(20) not null comment '部门ID', + primary key(role_id, dept_id) +) engine=innodb comment = '角色和部门关联表'; + +-- ---------------------------- +-- 初始化-角色和部门关联表数据 +-- ---------------------------- +insert into sys_role_dept values ('2', '100'); +insert into sys_role_dept values ('2', '101'); +insert into sys_role_dept values ('2', '105'); + +-- ---------------------------- +-- 9、用户与岗位关联表 用户1-N岗位 +-- ---------------------------- +drop table if exists sys_user_post; +create table sys_user_post +( + user_id bigint(20) not null comment '用户ID', + post_id bigint(20) not null comment '岗位ID', + primary key (user_id, post_id) +) engine=innodb comment = '用户与岗位关联表'; + +-- ---------------------------- +-- 初始化-用户与岗位关联表数据 +-- ---------------------------- +insert into sys_user_post values ('1', '1'); +insert into sys_user_post values ('2', '2'); + + +-- ---------------------------- +-- 10、操作日志记录 +-- ---------------------------- +drop table if exists sys_oper_log; +create table sys_oper_log ( + oper_id bigint(20) not null auto_increment comment '日志主键', + title varchar(50) default '' comment '模块标题', + business_type int(2) default 0 comment '业务类型(0其它 1新增 2修改 3删除)', + method varchar(100) default '' comment '方法名称', + request_method varchar(10) default '' comment '请求方式', + operator_type int(1) default 0 comment '操作类别(0其它 1后台用户 2手机端用户)', + oper_name varchar(50) default '' comment '操作人员', + dept_name varchar(50) default '' comment '部门名称', + oper_url varchar(255) default '' comment '请求URL', + oper_ip varchar(128) default '' comment '主机地址', + oper_location varchar(255) default '' comment '操作地点', + oper_param varchar(2000) default '' comment '请求参数', + json_result varchar(2000) default '' comment '返回参数', + status int(1) default 0 comment '操作状态(0正常 1异常)', + error_msg varchar(2000) default '' comment '错误消息', + oper_time datetime comment '操作时间', + primary key (oper_id) +) engine=innodb auto_increment=100 comment = '操作日志记录'; + + +-- ---------------------------- +-- 11、字典类型表 +-- ---------------------------- +drop table if exists sys_dict_type; +create table sys_dict_type +( + dict_id bigint(20) not null auto_increment comment '字典主键', + dict_name varchar(100) default '' comment '字典名称', + dict_type varchar(100) default '' comment '字典类型', + status char(1) default '0' comment '状态(0正常 1停用)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default null comment '备注', + primary key (dict_id), + unique (dict_type) +) engine=innodb auto_increment=100 comment = '字典类型表'; + +insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', '0', 'admin', sysdate(), '', null, '用户性别列表'); +insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', '0', 'admin', sysdate(), '', null, '菜单状态列表'); +insert into sys_dict_type values(3, '系统开关', 'sys_normal_disable', '0', 'admin', sysdate(), '', null, '系统开关列表'); +insert into sys_dict_type values(4, '任务状态', 'sys_job_status', '0', 'admin', sysdate(), '', null, '任务状态列表'); +insert into sys_dict_type values(5, '任务分组', 'sys_job_group', '0', 'admin', sysdate(), '', null, '任务分组列表'); +insert into sys_dict_type values(6, '系统是否', 'sys_yes_no', '0', 'admin', sysdate(), '', null, '系统是否列表'); +insert into sys_dict_type values(7, '通知类型', 'sys_notice_type', '0', 'admin', sysdate(), '', null, '通知类型列表'); +insert into sys_dict_type values(8, '通知状态', 'sys_notice_status', '0', 'admin', sysdate(), '', null, '通知状态列表'); +insert into sys_dict_type values(9, '操作类型', 'sys_oper_type', '0', 'admin', sysdate(), '', null, '操作类型列表'); +insert into sys_dict_type values(10, '系统状态', 'sys_common_status', '0', 'admin', sysdate(), '', null, '登录状态列表'); + + +-- ---------------------------- +-- 12、字典数据表 +-- ---------------------------- +drop table if exists sys_dict_data; +create table sys_dict_data +( + dict_code bigint(20) not null auto_increment comment '字典编码', + dict_sort int(4) default 0 comment '字典排序', + dict_label varchar(100) default '' comment '字典标签', + dict_value varchar(100) default '' comment '字典键值', + dict_type varchar(100) default '' comment '字典类型', + css_class varchar(100) default null comment '样式属性(其他样式扩展)', + list_class varchar(100) default null comment '表格回显样式', + is_default char(1) default 'N' comment '是否默认(Y是 N否)', + status char(1) default '0' comment '状态(0正常 1停用)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default null comment '备注', + primary key (dict_code) +) engine=innodb auto_increment=100 comment = '字典数据表'; + +insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', sysdate(), '', null, '性别男'); +insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别女'); +insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别未知'); +insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '显示菜单'); +insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '隐藏菜单'); +insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态'); +insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态'); +insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态'); +insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态'); +insert into sys_dict_data values(10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', sysdate(), '', null, '默认分组'); +insert into sys_dict_data values(11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', sysdate(), '', null, '系统分组'); +insert into sys_dict_data values(12, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '系统默认是'); +insert into sys_dict_data values(13, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '系统默认否'); +insert into sys_dict_data values(14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', sysdate(), '', null, '通知'); +insert into sys_dict_data values(15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', sysdate(), '', null, '公告'); +insert into sys_dict_data values(16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态'); +insert into sys_dict_data values(17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '关闭状态'); +insert into sys_dict_data values(18, 99, '其他', '0', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '其他操作'); +insert into sys_dict_data values(19, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '新增操作'); +insert into sys_dict_data values(20, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '修改操作'); +insert into sys_dict_data values(21, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '删除操作'); +insert into sys_dict_data values(22, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '授权操作'); +insert into sys_dict_data values(23, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '导出操作'); +insert into sys_dict_data values(24, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '导入操作'); +insert into sys_dict_data values(25, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '强退操作'); +insert into sys_dict_data values(26, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '生成操作'); +insert into sys_dict_data values(27, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '清空操作'); +insert into sys_dict_data values(28, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '正常状态'); +insert into sys_dict_data values(29, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态'); + + +-- ---------------------------- +-- 13、参数配置表 +-- ---------------------------- +drop table if exists sys_config; +create table sys_config ( + config_id int(5) not null auto_increment comment '参数主键', + config_name varchar(100) default '' comment '参数名称', + config_key varchar(100) default '' comment '参数键名', + config_value varchar(500) default '' comment '参数键值', + config_type char(1) default 'N' comment '系统内置(Y是 N否)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default null comment '备注', + primary key (config_id) +) engine=innodb auto_increment=100 comment = '参数配置表'; + +insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow'); +insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', sysdate(), '', null, '初始化密码 123456'); +insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', sysdate(), '', null, '深黑主题theme-dark,浅色主题theme-light,深蓝主题theme-blue'); +insert into sys_config values(4, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', sysdate(), '', null, '是否开启注册用户功能(true开启,false关闭)'); +insert into sys_config values(5, '用户管理-密码字符范围', 'sys.account.chrtype', '0', 'Y', 'admin', sysdate(), '', null, '默认任意字符范围,0任意(密码可以输入任意字符),1数字(密码只能为0-9数字),2英文字母(密码只能为a-z和A-Z字母),3字母和数字(密码必须包含字母,数字),4字母数字和特殊字符(目前支持的特殊字符包括:~!@#$%^&*()-=_+)'); +insert into sys_config values(6, '用户管理-初始密码修改策略', 'sys.account.initPasswordModify', '0', 'Y', 'admin', sysdate(), '', null, '0:初始密码修改策略关闭,没有任何提示,1:提醒用户,如果未修改初始密码,则在登录时就会提醒修改密码对话框'); +insert into sys_config values(7, '用户管理-账号密码更新周期', 'sys.account.passwordValidateDays', '0', 'Y', 'admin', sysdate(), '', null, '密码更新周期(填写数字,数据初始化值为0不限制,若修改必须为大于0小于365的正整数),如果超过这个周期登录系统时,则在登录时就会提醒修改密码对话框'); +insert into sys_config values(8, '主框架页-菜单导航显示风格', 'sys.index.menuStyle', 'default', 'Y', 'admin', sysdate(), '', null, '菜单导航显示风格(default为左侧导航菜单,topnav为顶部导航菜单)'); +insert into sys_config values(9, '主框架页-是否开启页脚', 'sys.index.footer', 'true', 'Y', 'admin', sysdate(), '', null, '是否开启底部页脚显示(true显示,false隐藏)'); +insert into sys_config values(10, '主框架页-是否开启页签', 'sys.index.tagsView', 'true', 'Y', 'admin', sysdate(), '', null, '是否开启菜单多页签显示(true显示,false隐藏)'); + + +-- ---------------------------- +-- 14、系统访问记录 +-- ---------------------------- +drop table if exists sys_logininfor; +create table sys_logininfor ( + info_id bigint(20) not null auto_increment comment '访问ID', + login_name varchar(50) default '' comment '登录账号', + ipaddr varchar(128) default '' comment '登录IP地址', + login_location varchar(255) default '' comment '登录地点', + browser varchar(50) default '' comment '浏览器类型', + os varchar(50) default '' comment '操作系统', + status char(1) default '0' comment '登录状态(0成功 1失败)', + msg varchar(255) default '' comment '提示消息', + login_time datetime comment '访问时间', + primary key (info_id) +) engine=innodb auto_increment=100 comment = '系统访问记录'; + + +-- ---------------------------- +-- 15、在线用户记录 +-- ---------------------------- +drop table if exists sys_user_online; +create table sys_user_online ( + sessionId varchar(50) default '' comment '用户会话id', + login_name varchar(50) default '' comment '登录账号', + dept_name varchar(50) default '' comment '部门名称', + ipaddr varchar(128) default '' comment '登录IP地址', + login_location varchar(255) default '' comment '登录地点', + browser varchar(50) default '' comment '浏览器类型', + os varchar(50) default '' comment '操作系统', + status varchar(10) default '' comment '在线状态on_line在线off_line离线', + start_timestamp datetime comment 'session创建时间', + last_access_time datetime comment 'session最后访问时间', + expire_time int(5) default 0 comment '超时时间,单位为分钟', + primary key (sessionId) +) engine=innodb comment = '在线用户记录'; + + +-- ---------------------------- +-- 16、定时任务调度表 +-- ---------------------------- +drop table if exists sys_job; +create table sys_job ( + job_id bigint(20) not null auto_increment comment '任务ID', + job_name varchar(64) default '' comment '任务名称', + job_group varchar(64) default 'DEFAULT' comment '任务组名', + invoke_target varchar(500) not null comment '调用目标字符串', + cron_expression varchar(255) default '' comment 'cron执行表达式', + misfire_policy varchar(20) default '3' comment '计划执行错误策略(1立即执行 2执行一次 3放弃执行)', + concurrent char(1) default '1' comment '是否并发执行(0允许 1禁止)', + status char(1) default '0' comment '状态(0正常 1暂停)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default '' comment '备注信息', + primary key (job_id, job_name, job_group) +) engine=innodb auto_increment=100 comment = '定时任务调度表'; + +insert into sys_job values(1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); +insert into sys_job values(2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); +insert into sys_job values(3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); + + +-- ---------------------------- +-- 17、定时任务调度日志表 +-- ---------------------------- +drop table if exists sys_job_log; +create table sys_job_log ( + job_log_id bigint(20) not null auto_increment comment '任务日志ID', + job_name varchar(64) not null comment '任务名称', + job_group varchar(64) not null comment '任务组名', + invoke_target varchar(500) not null comment '调用目标字符串', + job_message varchar(500) comment '日志信息', + status char(1) default '0' comment '执行状态(0正常 1失败)', + exception_info varchar(2000) default '' comment '异常信息', + create_time datetime comment '创建时间', + primary key (job_log_id) +) engine=innodb comment = '定时任务调度日志表'; + + +-- ---------------------------- +-- 18、通知公告表 +-- ---------------------------- +drop table if exists sys_notice; +create table sys_notice ( + notice_id int(4) not null auto_increment comment '公告ID', + notice_title varchar(50) not null comment '公告标题', + notice_type char(1) not null comment '公告类型(1通知 2公告)', + notice_content varchar(2000) default null comment '公告内容', + status char(1) default '0' comment '公告状态(0正常 1关闭)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(255) default null comment '备注', + primary key (notice_id) +) engine=innodb auto_increment=10 comment = '通知公告表'; + +-- ---------------------------- +-- 初始化-公告信息表数据 +-- ---------------------------- +insert into sys_notice values('1', '温馨提醒:2018-07-01 若依新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate(), '', null, '管理员'); +insert into sys_notice values('2', '维护通知:2018-07-01 若依系统凌晨维护', '1', '维护内容', '0', 'admin', sysdate(), '', null, '管理员'); + + +-- ---------------------------- +-- 19、代码生成业务表 +-- ---------------------------- +drop table if exists gen_table; +create table gen_table ( + table_id bigint(20) not null auto_increment comment '编号', + table_name varchar(200) default '' comment '表名称', + table_comment varchar(500) default '' comment '表描述', + sub_table_name varchar(64) default null comment '关联子表的表名', + sub_table_fk_name varchar(64) default null comment '子表关联的外键名', + class_name varchar(100) default '' comment '实体类名称', + tpl_category varchar(200) default 'crud' comment '使用的模板(crud单表操作 tree树表操作 sub主子表操作)', + package_name varchar(100) comment '生成包路径', + module_name varchar(30) comment '生成模块名', + business_name varchar(30) comment '生成业务名', + function_name varchar(50) comment '生成功能名', + function_author varchar(50) comment '生成功能作者', + gen_type char(1) default '0' comment '生成代码方式(0zip压缩包 1自定义路径)', + gen_path varchar(200) default '/' comment '生成路径(不填默认项目路径)', + options varchar(1000) comment '其它生成选项', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default null comment '备注', + primary key (table_id) +) engine=innodb auto_increment=1 comment = '代码生成业务表'; + + +-- ---------------------------- +-- 20、代码生成业务表字段 +-- ---------------------------- +drop table if exists gen_table_column; +create table gen_table_column ( + column_id bigint(20) not null auto_increment comment '编号', + table_id varchar(64) comment '归属表编号', + column_name varchar(200) comment '列名称', + column_comment varchar(500) comment '列描述', + column_type varchar(100) comment '列类型', + java_type varchar(500) comment 'JAVA类型', + java_field varchar(200) comment 'JAVA字段名', + is_pk char(1) comment '是否主键(1是)', + is_increment char(1) comment '是否自增(1是)', + is_required char(1) comment '是否必填(1是)', + is_insert char(1) comment '是否为插入字段(1是)', + is_edit char(1) comment '是否编辑字段(1是)', + is_list char(1) comment '是否列表字段(1是)', + is_query char(1) comment '是否查询字段(1是)', + query_type varchar(200) default 'EQ' comment '查询方式(等于、不等于、大于、小于、范围)', + html_type varchar(200) comment '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)', + dict_type varchar(200) default '' comment '字典类型', + sort int comment '排序', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + primary key (column_id) +) engine=innodb auto_increment=1 comment = '代码生成业务表字段'; \ No newline at end of file diff --git a/sql/rysqlite3.db b/sql/rysqlite3.db new file mode 100644 index 0000000..8943326 Binary files /dev/null and b/sql/rysqlite3.db differ diff --git a/sql/更新记录 b/sql/更新记录 new file mode 100644 index 0000000..7854801 --- /dev/null +++ b/sql/更新记录 @@ -0,0 +1,35 @@ +2021-12-11 18:30:21 --- 2021-12-12 19:36:42 +调整配置支持sqlite嵌入式数据库 +1、首先添加【依赖包】、sqlite依赖、【注释 ScheduleConfig。java】定时任务配置 src/main/java/com/ruoyi/framework/config/ScheduleConfig.java +2、添加【application.yml】、修改url配置文件、驱动时间格式、配置数据库绝对路径 java mybatisplus Error parsing time stamp https://blog.csdn.net/weixin_39910452/article/details/118391867 +3、调整 【application.yml 配置检测连接是否有效】 sqlite 不支持DUAL, 调整为sys_user +4、sqlite 获取系统当前时间是 sysdate()/datetime('now'),插入时间使用datetime('now')【修改**.xml文件】 + Sqlite 当前时区的当前时间与正常差8h. datetime('now') 更改为 (datetime(CURRENT_TIMESTAMP,'localtime')) +5、sqlite设置主键自动增长、sqlit修改默认值 :slite_sequence存储的表的自增长id 【修改数据库文件】 +6、清空表记录:SQLite中并不支持Truncate语句、使用Delete来删除全部表数据、sqlite_sequenc存放表自增列的当前序号【修改**.xml文件】 + delete from TableName; //清空数据 + update sqlite_sequence SET seq = 0 where name ='TableName';//同步执行后会把自增长ID修改为0 +7、Date日期类型( Sat Dec 11 20:51:41 CST 2021)插入数据库后会转换为时间戳;【 数据库文件修改日期格式为date,默认(strftime('%Y-%m-%d %H:%M:%f','now'))】 +8、replace into sys_user_online 【报错后数据不影响正常运行】 merge sql error, dbType sqlite, druid-1.2.8, sql : replace into sys_user_online +9、关联语句查询页面,【前端设置 sortName: "u.createTime"】 SQL error or missing database (ambiguous column name: create_time) +10、在SQLite中替代mysql中find_in_set()函数的使用 FIND_IN_SET(value, column_name) 【修改**.xml文件】 + 如果只需要true/false值而不是索引,则可以使用LIKE子句: (',' || column_name || ',') LIKE '%,value,%' https://www.it1352.com/1667649.html +11、SQLite 与 Mysql 分别在mybatis中模糊查询的写法 LIKE CONCAT('%',#{roleName},'%') / like '%'||#{roleName}||'%' https://www.jianshu.com/p/5c90722a66cd + Sqlite中不包含Concat函数帮助我们处理,就只能用最原始的字符串拼接,特别的Sqlite中使用 '||' 符号做拼接而不是 ‘+’ 【修改**。xml文件】 +12、【tool模块 语法差别较大,未处理】 MySQL, SQLite 和 PostgreSQL 关于information_schema 的一些查询(表结构,表信息,库信息....) https://blog.csdn.net/weixin_41986096/article/details/106236359 +13、 处理排序失败,引入jsqlparser依赖未解决【 报错后数据不影响正常运行】: net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: "||" at line 4, column 37. + +调整文件汇总 +调整版本:v4.7.1 更新日志:http://doc.ruoyi.vip/ruoyi/document/gxrz.html#v4-7-1 +src/main/java/com/ruoyi/framework/config/ScheduleConfig.java +src/main/resources/mybatis/**/**.xml +src/main/resources/templates/system/user/user.html +src/main/resources/application-druid.yml +src/main/resources/application.yml +pom.xml + +src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java + +调整配置支持sqlite嵌入式数据库 +14、Sqlite 当前时区的当前时间与正常差8h调整. datetime('now') 更改为 (datetime(CURRENT_TIMESTAMP,'localtime')) +15、concat函数调整 concat(m.menu_id, ifnull(m.perms,''))——————(m.menu_id || ifnull(m.perms,'')) \ No newline at end of file diff --git a/src/main/java/com/archive/ArchiveApplication.java b/src/main/java/com/archive/ArchiveApplication.java new file mode 100644 index 0000000..b80b4ed --- /dev/null +++ b/src/main/java/com/archive/ArchiveApplication.java @@ -0,0 +1,50 @@ +package com.archive; + + + + import com.archive.common.archiveUtil.MacUtil; + import java.text.SimpleDateFormat; + import org.springframework.boot.SpringApplication; + import org.springframework.boot.autoconfigure.SpringBootApplication; + import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; + + + + + + + + + + + + + + + + @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) + public class ArchiveApplication + { + public static String MAC = "9E-5C-B9-BA-E2-66"; + public static String ckDate = "2024-08-14"; + public static int sqsj = 90; + + + public static void main(String[] args) throws Exception { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + System.out.println("系统授权MAC:" + MAC); + System.out.println("系统授权时间:" + ckDate); + + boolean res = MacUtil.sqjy(MAC, ckDate, sqsj); + if (res) { + SpringApplication.run(com.archive.ArchiveApplication.class, args); + System.out.println("(♥◠‿◠)ノ゙ 系统启动成功 ლ(´ڡ`ლ)゙ "); + } + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\ArchiveApplication.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/ArchiveServletInitializer.java b/src/main/java/com/archive/ArchiveServletInitializer.java new file mode 100644 index 0000000..258cdcb --- /dev/null +++ b/src/main/java/com/archive/ArchiveServletInitializer.java @@ -0,0 +1,24 @@ + package com.archive; + + import com.archive.ArchiveApplication; + import org.springframework.boot.builder.SpringApplicationBuilder; + import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + + + + + + + public class ArchiveServletInitializer + extends SpringBootServletInitializer + { + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(new Class[] { ArchiveApplication.class }); + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\ArchiveServletInitializer.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/AnsjTextUtil.java b/src/main/java/com/archive/common/archiveUtil/AnsjTextUtil.java new file mode 100644 index 0000000..b9d773b --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/AnsjTextUtil.java @@ -0,0 +1,79 @@ + package com.archive.common.archiveUtil; + + import org.ansj.domain.Result; + import org.ansj.splitWord.analysis.BaseAnalysis; + import org.ansj.splitWord.analysis.NlpAnalysis; + import org.ansj.splitWord.analysis.ToAnalysis; + + + + + + + + + + + + public class AnsjTextUtil + { + public static String jbfc(String text) { + long startTime = System.currentTimeMillis(); + + Result analysisedResult = BaseAnalysis.parse(text); + long endTime = System.currentTimeMillis(); + long time = endTime - startTime; + System.out.println("基本分词: " + analysisedResult + "(" + time + "ms)"); + return analysisedResult.toString(); + } + + + + + + + + + public static String jzfc(String text) { + long startTime = System.currentTimeMillis(); + + String analysisedText = ToAnalysis.parse(text).toStringWithOutNature(); + long endTime = System.currentTimeMillis(); + long time = endTime - startTime; + System.out.println("精准分词: " + analysisedText + "(" + time + "ms)"); + return analysisedText; + } + + + + + + + + + public static String nlpfc(String text) { + long startTime = System.currentTimeMillis(); + + String analysisedText = NlpAnalysis.parse(text).toStringWithOutNature(); + long endTime = System.currentTimeMillis(); + long time = endTime - startTime; + System.out.println("nlp分词: " + analysisedText + "(" + time + "ms)"); + return analysisedText; + } + + + + + + public static void main(String[] args) { + jzfc("昨天晚上张三睡觉忘了关窗户"); + jbfc("昨天晚上张三睡觉忘了关窗户"); + nlpfc("昨天晚上张三睡觉忘了关窗户"); + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\AnsjTextUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/CopyFileUtil.java b/src/main/java/com/archive/common/archiveUtil/CopyFileUtil.java new file mode 100644 index 0000000..bcc1ce6 --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/CopyFileUtil.java @@ -0,0 +1,78 @@ + package com.archive.common.archiveUtil; + + import java.io.File; + import java.io.FileInputStream; + import java.io.FileNotFoundException; + import java.io.FileOutputStream; + import java.io.IOException; + + + + + + + + public class CopyFileUtil + { + public static void copyFile(File fromFilePath, File toFilePath) { + FileInputStream fis = null; + FileOutputStream fos = null; + + try { + String str = toFilePath.toString(); + File filePath = new File(str.substring(0, str.indexOf(toFilePath.getName()))); + if (!filePath.exists() && !filePath.isDirectory()) { + filePath.mkdirs(); + } + fis = new FileInputStream(fromFilePath); + fos = new FileOutputStream(toFilePath); + byte[] b = new byte[1024]; + + while (fis.read(b) != -1) { + fos.write(b); + } + if (fis != null) { + fis.close(); + fis = null; + } + if (fos != null) { + fos.flush(); + fos.close(); + fos = null; + } + } catch (FileNotFoundException e) { + System.out.println("源文件不存在"); + } catch (IOException e) { + System.out.println("io异常"); + } finally { + if (fos != null) { + try { + fos.close(); + } catch (IOException iOException) {} + } + + if (fis != null) { + try { + fis.close(); + } catch (IOException iOException) {} + } + } + } + + + + + + + public static void main(String[] args) { + File file1 = new File("C:\\Users\\18291\\Desktop\\watermark\\0101-2001-长期-办公室-0005.pdf"); + File file2 = new File("C:\\Users\\18291\\Desktop\\watermark\\1\\2\\w3.pdf"); + copyFile(file1, file2); + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\CopyFileUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/CreatePdfUtil.java b/src/main/java/com/archive/common/archiveUtil/CreatePdfUtil.java new file mode 100644 index 0000000..7376777 --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/CreatePdfUtil.java @@ -0,0 +1,185 @@ + package com.archive.common.archiveUtil; + + import com.itextpdf.text.Document; + import com.itextpdf.text.DocumentException; + import com.itextpdf.text.Element; + import com.itextpdf.text.Font; + import com.itextpdf.text.PageSize; + import com.itextpdf.text.Phrase; + import com.itextpdf.text.Rectangle; + import com.itextpdf.text.pdf.BaseFont; + import com.itextpdf.text.pdf.PdfPCell; + import com.itextpdf.text.pdf.PdfPTable; + import com.itextpdf.text.pdf.PdfWriter; + import java.io.BufferedInputStream; + import java.io.BufferedOutputStream; + import java.io.File; + import java.io.FileInputStream; + import java.io.FileOutputStream; + import java.io.IOException; + import java.io.InputStream; + import java.io.OutputStream; + import java.net.URLEncoder; + import java.util.ArrayList; + import java.util.List; + import javax.servlet.http.HttpServletResponse; + + public class CreatePdfUtil + { + public static void createlocalPdf() { + String outPath = "F://test.pdf"; + + Rectangle rect = new Rectangle(PageSize.A4); + + + try { + Document doc = new Document(rect); + PdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream(new File(outPath))); + doc.open(); + doc.newPage(); + + float[] columnWidth = { 10.0F, 30.0F, 50.0F, 30.0F, 30.0F }; + String[] heads = { "序号", "档号", "题名", "日期", "页数" }; + List dataList = new ArrayList(); + for (int i = 0; i < 35; i++) { + Object[] objs = new Object[5]; + objs[0] = Integer.valueOf(i + 1); + objs[1] = "001-WS.2015-Y-0001"; + objs[2] = "关于XXXXX的XXXXX的通知批示处理,请先当官实打实打算发生和发动机和法国价格合适的范围为发生阿三大苏打撒旦发个发生发、阿三大苏打实打实鬼地方鬼地方生啊沙发沙发沙发上"; + + + objs[3] = "2015-06-21"; + objs[4] = "15"; + dataList.add(objs); + } + createTableByData(writer, doc, columnWidth, "测试表格", heads, dataList); + doc.close(); + } + catch (Exception ex) { + ex.printStackTrace(); + } + } + + + private static final String TITLE = ""; + + public static PdfPCell createSetCell(String value, Font font) { + PdfPCell cell = new PdfPCell(); + cell.setPhrase(new Phrase(value, font)); + cell.setVerticalAlignment(5); + cell.setHorizontalAlignment(1); + return cell; + } + + + + + + + + + + + + + + + + public static void createTableByData(PdfWriter writer, Document document, float[] columnWidth, String title, String[] heads, List dataList) throws DocumentException, IOException { + PdfPTable table = new PdfPTable(columnWidth); + table.setTotalWidth(520.0F); + table.setPaddingTop(200.0F); + table.setLockedWidth(true); + table.setHorizontalAlignment(1); + table.writeSelectedRows(0, -1, 500.0F, 800.0F, writer.getDirectContentUnder()); + + table.setHeaderRows(2); + + + + BaseFont baseFont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", false); + Font textFont = new Font(baseFont, 10.0F, 0); + + + + + + + + + PdfPCell heandCell = new PdfPCell(); + heandCell.setRowspan(1); + heandCell.setColspan(heads.length); + heandCell.setFixedHeight(40.0F); + heandCell.setBorder(0); + heandCell.setVerticalAlignment(5); + heandCell.setHorizontalAlignment(1); + heandCell.setPhrase(new Phrase(title, textFont)); + table.addCell(heandCell); + + int i; + for (i = 0; i < heads.length; i++) { + PdfPCell heardCell = new PdfPCell(); + heardCell.setVerticalAlignment(5); + heardCell.setHorizontalAlignment(1); + heardCell.setPhrase(new Phrase(heads[i], textFont)); + heardCell.setMinimumHeight(20.0F); + table.addCell(heardCell); + } + + + for (i = 0; i < dataList.size(); i++) { + PdfPCell setCell1 = createSetCell((i + 1) + "", textFont); + table.addCell(setCell1); + + for (int a = 1; a < heads.length; a++) { + PdfPCell setCell2 = createSetCell((((Object[])dataList.get(i))[a] == null) ? "" : ((Object[])dataList.get(i))[a].toString(), textFont); + table.addCell(setCell2); + } + } + document.add((Element)table); + } + + + public static void main(String[] args) { + createlocalPdf(); + } + + + + + + + + public static void download(String path, HttpServletResponse response) { + try { + File file = new File(path); + + String filename = file.getName(); + + InputStream fis = new BufferedInputStream(new FileInputStream(path)); + byte[] buffer = new byte[fis.available()]; + fis.read(buffer); + fis.close(); + + response.reset(); + + response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); + response.addHeader("Content-Length", "" + file.length()); + + OutputStream toClient = new BufferedOutputStream((OutputStream)response.getOutputStream()); + response.setContentType("application/pdf;charset=gb2312"); + toClient.write(buffer); + toClient.flush(); + toClient.close(); + } catch (IOException ex) { + ex.printStackTrace(); + } + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\CreatePdfUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/CreateTableAndInsertPhysicalTable.java b/src/main/java/com/archive/common/archiveUtil/CreateTableAndInsertPhysicalTable.java new file mode 100644 index 0000000..d991a6a --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/CreateTableAndInsertPhysicalTable.java @@ -0,0 +1,752 @@ + package com.archive.common.archiveUtil; + + import com.archive.project.common.service.IExecuteSqlService; + import com.archive.project.dasz.basecolumn.domain.ColumnDocument; + import com.archive.project.dasz.basecolumn.domain.ColumnFile; + import com.archive.project.dasz.basecolumn.domain.ColumnFolder; + import com.archive.project.dasz.basecolumn.domain.ColumnInfo; + import com.archive.project.dasz.basecolumn.service.IColumnDocumentService; + import com.archive.project.dasz.basecolumn.service.IColumnFileService; + import com.archive.project.dasz.basecolumn.service.IColumnFolderService; + import com.archive.project.dasz.basecolumn.service.IColumnInfoService; + import com.archive.project.dasz.physicaltable.domain.PhysicalTable; + import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; + import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; + import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; + import java.util.ArrayList; + import java.util.List; + import javax.annotation.PostConstruct; + import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Component; + + + + + + + + + + + + @Component + public class CreateTableAndInsertPhysicalTable + { + @Autowired + public IExecuteSqlService executeSqlService; + @Autowired + public IColumnFolderService columnFolderService; + @Autowired + public IColumnFileService columnFileService; + @Autowired + public IColumnDocumentService columnDocumentService; + @Autowired + public IColumnInfoService columnInfoService; + @Autowired + public IPhysicalTableService physicalTableService; + @Autowired + public IPhysicalTableColumnService physicalTableColumnService; + public static com.archive.common.archiveUtil.CreateTableAndInsertPhysicalTable createTableAndInsertPhysicalTable; + + @PostConstruct + public void init() { + createTableAndInsertPhysicalTable = this; + } + + + + + + + + + public static void createFolderTable(String code, String archiveTypeName, String archivetypeid) throws Exception { + String tableName = "t_ar_" + code + "_folder"; + tableName = tableName.toLowerCase(); + + + PhysicalTable physicalTable = new PhysicalTable(); + physicalTable.setTablename(tableName); + physicalTable.setShowname(archiveTypeName + "-案卷表"); + physicalTable.setTableCode("folder"); + physicalTable.setShoworder(Long.valueOf(1L)); + physicalTable.setArchivetypeid(archivetypeid); + physicalTable.setArchivetypecode(code); + createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable); + + + List ptcList = new ArrayList<>(); + + + + List columnFolderList = createTableAndInsertPhysicalTable.columnFolderService.selectColumnFolderList(new ColumnFolder()); + String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`"; + String createSql = "create table " + tableName + " ("; + String columnsSql = "`id` int(11) NOT NULL AUTO_INCREMENT"; + for (int i = 0; i < columnFolderList.size(); i++) { + ColumnFolder cf = columnFolderList.get(i); + if (cf != null) { + String columnType = ""; + String mrz = ""; + switch (cf.getColumnType()) { + case "D": + columnType = "varchar(" + cf.getColumnLength() + ")"; + break; + case "S": + columnType = "varchar(" + cf.getColumnLength() + ")"; + break; + case "C": + columnType = "int(" + cf.getColumnLength() + ")"; + break; + } + if (cf.getMrz() != null && !cf.getMrz().equals("")) { + if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT '" + cf.getMrz() + "'"; + } else if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } else if (cf.getColumnType().equals("C")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } + } + + columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz + " COMMENT '" + cf.getColumnName() + "' "; + } + + + PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); + physicalTableColumn.setColumnName(cf.getColumnName()); + physicalTableColumn.setColumnCode(cf.getColumnCode()); + physicalTableColumn.setColumnLength(cf.getColumnLength()); + physicalTableColumn.setColumnType(cf.getColumnType()); + physicalTableColumn.setColumnCodetype(cf.getColumnCodetype()); + physicalTableColumn.setBz(cf.getBz()); + physicalTableColumn.setPxx(cf.getPxx()); + physicalTableColumn.setLbx(cf.getLbx()); + physicalTableColumn.setJmx(cf.getJmx()); + physicalTableColumn.setJsx(cf.getJsx()); + physicalTableColumn.setMrz(cf.getMrz()); + physicalTableColumn.setShowType(cf.getShowType()); + physicalTableColumn.setTableId(physicalTable.getId()); + ptcList.add(physicalTableColumn); + } + + + columnsSql = columnsSql + ",PRIMARY KEY (`id`) USING BTREE "; + createSql = createSql + columnsSql + ") ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '" + archiveTypeName + "-案卷表' ROW_FORMAT = Dynamic"; + + + System.out.println("~~~createSql:" + createSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql); + + + for (PhysicalTableColumn physicalTableColumn : ptcList) { + createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true); + } + } + + public static void createFolderTableSqlite(String code, String archiveTypeName, String archivetypeid) throws Exception { + String tableName = "t_ar_" + code + "_folder"; + tableName = tableName.toLowerCase(); + + + PhysicalTable physicalTable = new PhysicalTable(); + physicalTable.setTablename(tableName); + physicalTable.setShowname(archiveTypeName + "-案卷表"); + physicalTable.setTableCode("folder"); + physicalTable.setShoworder(Long.valueOf(1L)); + physicalTable.setArchivetypeid(archivetypeid); + physicalTable.setArchivetypecode(code); + createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable); + + + List ptcList = new ArrayList<>(); + + + + List columnFolderList = createTableAndInsertPhysicalTable.columnFolderService.selectColumnFolderList(new ColumnFolder()); + String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`"; + String createSql = "create table " + tableName + " ("; + String columnsSql = "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT"; + for (int i = 0; i < columnFolderList.size(); i++) { + ColumnFolder cf = columnFolderList.get(i); + if (cf != null) { + String columnType = ""; + String mrz = ""; + switch (cf.getColumnType()) { + case "D": + columnType = "TEXT(" + cf.getColumnLength() + ")"; + break; + case "S": + columnType = "TEXT(" + cf.getColumnLength() + ")"; + break; + case "C": + columnType = "INTEGER"; + break; + } + if (cf.getMrz() != null && !cf.getMrz().equals("")) { + if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT '" + cf.getMrz() + "'"; + } else if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } else if (cf.getColumnType().equals("C")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } + } + columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz; + } + + + PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); + physicalTableColumn.setColumnName(cf.getColumnName()); + physicalTableColumn.setColumnCode(cf.getColumnCode()); + physicalTableColumn.setColumnLength(cf.getColumnLength()); + physicalTableColumn.setColumnType(cf.getColumnType()); + physicalTableColumn.setColumnCodetype(cf.getColumnCodetype()); + physicalTableColumn.setBz(cf.getBz()); + physicalTableColumn.setPxx(cf.getPxx()); + physicalTableColumn.setLbx(cf.getLbx()); + physicalTableColumn.setJmx(cf.getJmx()); + physicalTableColumn.setJsx(cf.getJsx()); + physicalTableColumn.setMrz(cf.getMrz()); + physicalTableColumn.setShowType(cf.getShowType()); + physicalTableColumn.setTableId(physicalTable.getId()); + ptcList.add(physicalTableColumn); + } + + + createSql = createSql + columnsSql + ") "; + System.out.println("~~~createSql:" + createSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql); + + + for (PhysicalTableColumn physicalTableColumn : ptcList) { + createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true); + } + } + + + + + + + + + public static void createFileTable(String code, String archiveTypeName, String archivetypeid) throws Exception { + String tableName = "t_ar_" + code + "_file"; + tableName = tableName.toLowerCase(); + + + PhysicalTable physicalTable = new PhysicalTable(); + physicalTable.setTablename(tableName); + physicalTable.setShowname(archiveTypeName + "-文件表"); + physicalTable.setTableCode("file"); + physicalTable.setShoworder(Long.valueOf(2L)); + physicalTable.setArchivetypeid(archivetypeid); + physicalTable.setArchivetypecode(code); + createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable); + + + List ptcList = new ArrayList<>(); + + + ColumnFile cf1 = new ColumnFile(); + List columnFileList = createTableAndInsertPhysicalTable.columnFileService.selectColumnFileList(cf1); + String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`"; + String createSql = "create table " + tableName + " ("; + String columnsSql = "`id` int(11) NOT NULL AUTO_INCREMENT"; + for (int i = 0; i < columnFileList.size(); i++) { + ColumnFile cf = columnFileList.get(i); + if (cf != null) { + String columnType = ""; + String mrz = ""; + switch (cf.getColumnType()) { + case "D": + columnType = "varchar(" + cf.getColumnLength() + ")"; + break; + case "S": + columnType = "varchar(" + cf.getColumnLength() + ")"; + break; + case "C": + columnType = "int(" + cf.getColumnLength() + ")"; + break; + } + if (cf.getMrz() != null && !cf.getMrz().equals("")) { + if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT '" + cf.getMrz() + "'"; + } else if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } else if (cf.getColumnType().equals("C")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } + } + + columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz + " COMMENT '" + cf.getColumnName() + "' "; + } + + + PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); + physicalTableColumn.setColumnName(cf.getColumnName()); + physicalTableColumn.setColumnCode(cf.getColumnCode()); + physicalTableColumn.setColumnLength(cf.getColumnLength()); + physicalTableColumn.setColumnType(cf.getColumnType()); + physicalTableColumn.setColumnCodetype(cf.getColumnCodetype()); + physicalTableColumn.setBz(cf.getBz()); + physicalTableColumn.setPxx(cf.getPxx()); + physicalTableColumn.setLbx(cf.getLbx()); + physicalTableColumn.setJmx(cf.getJmx()); + physicalTableColumn.setJsx(cf.getJsx()); + physicalTableColumn.setMrz(cf.getMrz()); + physicalTableColumn.setShowType(cf.getShowType()); + physicalTableColumn.setTableId(physicalTable.getId()); + ptcList.add(physicalTableColumn); + } + + + columnsSql = columnsSql + ",PRIMARY KEY (`id`) USING BTREE "; + createSql = createSql + columnsSql + ") ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '" + archiveTypeName + "-文件表' ROW_FORMAT = Dynamic"; + + + System.out.println("~~~createSql:" + createSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql); + + + for (PhysicalTableColumn physicalTableColumn : ptcList) { + createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true); + } + } + + public static void createFileTableSqlite(String code, String archiveTypeName, String archivetypeid) throws Exception { + String tableName = "t_ar_" + code + "_file"; + tableName = tableName.toLowerCase(); + + + PhysicalTable physicalTable = new PhysicalTable(); + physicalTable.setTablename(tableName); + physicalTable.setShowname(archiveTypeName + "-文件表"); + physicalTable.setTableCode("file"); + physicalTable.setShoworder(Long.valueOf(2L)); + physicalTable.setArchivetypeid(archivetypeid); + physicalTable.setArchivetypecode(code); + createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable); + + + List ptcList = new ArrayList<>(); + + + ColumnFile cf1 = new ColumnFile(); + List columnFileList = createTableAndInsertPhysicalTable.columnFileService.selectColumnFileList(cf1); + String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`"; + String createSql = "create table " + tableName + " ("; + String columnsSql = "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT"; + for (int i = 0; i < columnFileList.size(); i++) { + ColumnFile cf = columnFileList.get(i); + if (cf != null) { + String columnType = ""; + String mrz = ""; + switch (cf.getColumnType()) { + case "D": + columnType = "TEXT(" + cf.getColumnLength() + ")"; + break; + case "S": + columnType = "TEXT(" + cf.getColumnLength() + ")"; + break; + case "C": + columnType = "INTEGER"; + break; + } + if (cf.getMrz() != null && !cf.getMrz().equals("")) { + if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT '" + cf.getMrz() + "'"; + } else if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } else if (cf.getColumnType().equals("C")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } + } + columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz; + } + + + PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); + physicalTableColumn.setColumnName(cf.getColumnName()); + physicalTableColumn.setColumnCode(cf.getColumnCode()); + physicalTableColumn.setColumnLength(cf.getColumnLength()); + physicalTableColumn.setColumnType(cf.getColumnType()); + physicalTableColumn.setColumnCodetype(cf.getColumnCodetype()); + physicalTableColumn.setBz(cf.getBz()); + physicalTableColumn.setPxx(cf.getPxx()); + physicalTableColumn.setLbx(cf.getLbx()); + physicalTableColumn.setJmx(cf.getJmx()); + physicalTableColumn.setJsx(cf.getJsx()); + physicalTableColumn.setMrz(cf.getMrz()); + physicalTableColumn.setShowType(cf.getShowType()); + physicalTableColumn.setTableId(physicalTable.getId()); + ptcList.add(physicalTableColumn); + } + + + createSql = createSql + columnsSql + ") "; + System.out.println("~~~createSql:" + createSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql); + + + for (PhysicalTableColumn physicalTableColumn : ptcList) { + createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true); + } + } + + + + + + + + + public static void createDocumentTable(String code, String archiveTypeName, String archivetypeid) throws Exception { + String tableName = "t_ar_" + code + "_document"; + tableName = tableName.toLowerCase(); + + + PhysicalTable physicalTable = new PhysicalTable(); + physicalTable.setTablename(tableName); + physicalTable.setShowname(archiveTypeName + "-全文表"); + physicalTable.setTableCode("document"); + physicalTable.setShoworder(Long.valueOf(3L)); + physicalTable.setArchivetypeid(archivetypeid); + physicalTable.setArchivetypecode(code); + createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable); + + + List ptcList = new ArrayList<>(); + + + + List columnDocumentList = createTableAndInsertPhysicalTable.columnDocumentService.selectColumnDocumentList(new ColumnDocument()); + String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`"; + String createSql = "create table " + tableName + " ("; + String columnsSql = "`id` int(11) NOT NULL AUTO_INCREMENT"; + for (int i = 0; i < columnDocumentList.size(); i++) { + ColumnDocument cf = columnDocumentList.get(i); + if (cf != null) { + String columnType = ""; + String mrz = ""; + switch (cf.getColumnType()) { + case "D": + columnType = "varchar(" + cf.getColumnLength() + ")"; + break; + case "S": + columnType = "varchar(" + cf.getColumnLength() + ")"; + break; + case "C": + columnType = "int(" + cf.getColumnLength() + ")"; + break; + } + if (cf.getMrz() != null && !cf.getMrz().equals("")) { + if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT '" + cf.getMrz() + "'"; + } else if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } else if (cf.getColumnType().equals("C")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } + } + + columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz + " COMMENT '" + cf.getColumnName() + "' "; + } + + + PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); + physicalTableColumn.setColumnName(cf.getColumnName()); + physicalTableColumn.setColumnCode(cf.getColumnCode()); + physicalTableColumn.setColumnLength(cf.getColumnLength()); + physicalTableColumn.setColumnType(cf.getColumnType()); + physicalTableColumn.setColumnCodetype(cf.getColumnCodetype()); + physicalTableColumn.setBz(cf.getBz()); + physicalTableColumn.setPxx(cf.getPxx()); + physicalTableColumn.setLbx(cf.getLbx()); + physicalTableColumn.setJmx(cf.getJmx()); + physicalTableColumn.setJsx(cf.getJsx()); + physicalTableColumn.setMrz(cf.getMrz()); + physicalTableColumn.setShowType(cf.getShowType()); + physicalTableColumn.setTableId(physicalTable.getId()); + ptcList.add(physicalTableColumn); + } + + + columnsSql = columnsSql + ",PRIMARY KEY (`id`) USING BTREE "; + createSql = createSql + columnsSql + ") ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '" + archiveTypeName + "-全文表' ROW_FORMAT = Dynamic"; + + + System.out.println("~~~createSql:" + createSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql); + + + for (PhysicalTableColumn physicalTableColumn : ptcList) { + createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true); + } + } + + public static void createDocumentTableSqlite(String code, String archiveTypeName, String archivetypeid) throws Exception { + String tableName = "t_ar_" + code + "_document"; + tableName = tableName.toLowerCase(); + + + PhysicalTable physicalTable = new PhysicalTable(); + physicalTable.setTablename(tableName); + physicalTable.setShowname(archiveTypeName + "-全文表"); + physicalTable.setTableCode("document"); + physicalTable.setShoworder(Long.valueOf(3L)); + physicalTable.setArchivetypeid(archivetypeid); + physicalTable.setArchivetypecode(code); + createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable); + + + List ptcList = new ArrayList<>(); + + + + List columnDocumentList = createTableAndInsertPhysicalTable.columnDocumentService.selectColumnDocumentList(new ColumnDocument()); + String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`"; + String createSql = "create table " + tableName + " ("; + String columnsSql = "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT"; + for (int i = 0; i < columnDocumentList.size(); i++) { + ColumnDocument cf = columnDocumentList.get(i); + if (cf != null) { + String columnType = ""; + String mrz = ""; + switch (cf.getColumnType()) { + case "D": + columnType = "TEXT(" + cf.getColumnLength() + ")"; + break; + case "S": + columnType = "TEXT(" + cf.getColumnLength() + ")"; + break; + case "C": + columnType = "INTEGER"; + break; + } + if (cf.getMrz() != null && !cf.getMrz().equals("")) { + if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT '" + cf.getMrz() + "'"; + } else if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } else if (cf.getColumnType().equals("C")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } + } + columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz; + } + + + PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); + physicalTableColumn.setColumnName(cf.getColumnName()); + physicalTableColumn.setColumnCode(cf.getColumnCode()); + physicalTableColumn.setColumnLength(cf.getColumnLength()); + physicalTableColumn.setColumnType(cf.getColumnType()); + physicalTableColumn.setColumnCodetype(cf.getColumnCodetype()); + physicalTableColumn.setBz(cf.getBz()); + physicalTableColumn.setPxx(cf.getPxx()); + physicalTableColumn.setLbx(cf.getLbx()); + physicalTableColumn.setJmx(cf.getJmx()); + physicalTableColumn.setJsx(cf.getJsx()); + physicalTableColumn.setMrz(cf.getMrz()); + physicalTableColumn.setShowType(cf.getShowType()); + physicalTableColumn.setTableId(physicalTable.getId()); + ptcList.add(physicalTableColumn); + } + + + createSql = createSql + columnsSql + ") "; + System.out.println("~~~createSql:" + createSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql); + + + for (PhysicalTableColumn physicalTableColumn : ptcList) { + createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true); + } + } + + + + + + + + + public static void createInfoTable(String code, String archiveTypeName, String archivetypeid) throws Exception { + String tableName = "t_ar_" + code + "_info"; + tableName = tableName.toLowerCase(); + + + PhysicalTable physicalTable = new PhysicalTable(); + physicalTable.setTablename(tableName); + physicalTable.setShowname(archiveTypeName + "-过程表"); + physicalTable.setTableCode("info"); + physicalTable.setShoworder(Long.valueOf(4L)); + physicalTable.setArchivetypeid(archivetypeid); + physicalTable.setArchivetypecode(code); + createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable); + + + List ptcList = new ArrayList<>(); + + + + List columnInfoList = createTableAndInsertPhysicalTable.columnInfoService.selectColumnInfoList(new ColumnInfo()); + String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`"; + String createSql = "create table " + tableName + " ("; + String columnsSql = "id int(11) NOT NULL AUTO_INCREMENT"; + for (int i = 0; i < columnInfoList.size(); i++) { + ColumnInfo cf = columnInfoList.get(i); + if (cf != null) { + String columnType = ""; + String mrz = ""; + switch (cf.getColumnType()) { + case "D": + columnType = "varchar(" + cf.getColumnLength() + ")"; + break; + case "S": + columnType = "varchar(" + cf.getColumnLength() + ")"; + break; + case "C": + columnType = "int(" + cf.getColumnLength() + ")"; + break; + } + if (cf.getMrz() != null && !cf.getMrz().equals("")) { + if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT '" + cf.getMrz() + "'"; + } else if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } else if (cf.getColumnType().equals("C")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } + } + + columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz + " COMMENT '" + cf.getColumnName() + "' "; + } + + + PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); + physicalTableColumn.setColumnName(cf.getColumnName()); + physicalTableColumn.setColumnCode(cf.getColumnCode()); + physicalTableColumn.setColumnLength(cf.getColumnLength()); + physicalTableColumn.setColumnType(cf.getColumnType()); + physicalTableColumn.setColumnCodetype(cf.getColumnCodetype()); + physicalTableColumn.setBz(cf.getBz()); + physicalTableColumn.setPxx(cf.getPxx()); + physicalTableColumn.setLbx(cf.getLbx()); + physicalTableColumn.setJmx(cf.getJmx()); + physicalTableColumn.setJsx(cf.getJsx()); + physicalTableColumn.setMrz(cf.getMrz()); + physicalTableColumn.setShowType(cf.getShowType()); + physicalTableColumn.setTableId(physicalTable.getId()); + ptcList.add(physicalTableColumn); + } + + + columnsSql = columnsSql + ",PRIMARY KEY (`id`) USING BTREE "; + createSql = createSql + columnsSql + ") ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '" + archiveTypeName + "-过程表' ROW_FORMAT = Dynamic"; + + + System.out.println("~~~createSql:" + createSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql); + + + for (PhysicalTableColumn physicalTableColumn : ptcList) { + createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true); + } + } + + public static void createInfoTableSqlite(String code, String archiveTypeName, String archivetypeid) throws Exception { + String tableName = "t_ar_" + code + "_info"; + tableName = tableName.toLowerCase(); + + + PhysicalTable physicalTable = new PhysicalTable(); + physicalTable.setTablename(tableName); + physicalTable.setShowname(archiveTypeName + "-过程表"); + physicalTable.setTableCode("info"); + physicalTable.setShoworder(Long.valueOf(4L)); + physicalTable.setArchivetypeid(archivetypeid); + physicalTable.setArchivetypecode(code); + createTableAndInsertPhysicalTable.physicalTableService.insertPhysicalTable(physicalTable); + + + List ptcList = new ArrayList<>(); + + + + List columnInfoList = createTableAndInsertPhysicalTable.columnInfoService.selectColumnInfoList(new ColumnInfo()); + String deleteSql = "DROP TABLE IF EXISTS `" + tableName + "`"; + String createSql = "create table " + tableName + " ("; + String columnsSql = "id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT"; + for (int i = 0; i < columnInfoList.size(); i++) { + ColumnInfo cf = columnInfoList.get(i); + if (cf != null) { + String columnType = ""; + String mrz = ""; + switch (cf.getColumnType()) { + case "D": + columnType = "TEXT(" + cf.getColumnLength() + ")"; + break; + case "S": + columnType = "TEXT(" + cf.getColumnLength() + ")"; + break; + case "C": + columnType = "INTEGER"; + break; + } + if (cf.getMrz() != null && !cf.getMrz().equals("")) { + if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT '" + cf.getMrz() + "'"; + } else if (cf.getColumnType().equals("S")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } else if (cf.getColumnType().equals("C")) { + mrz = "DEFAULT " + cf.getMrz() + ""; + } + } + columnsSql = columnsSql + "," + cf.getColumnCode() + " " + columnType + " " + mrz; + } + + + PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); + physicalTableColumn.setColumnName(cf.getColumnName()); + physicalTableColumn.setColumnCode(cf.getColumnCode()); + physicalTableColumn.setColumnLength(cf.getColumnLength()); + physicalTableColumn.setColumnType(cf.getColumnType()); + physicalTableColumn.setColumnCodetype(cf.getColumnCodetype()); + physicalTableColumn.setBz(cf.getBz()); + physicalTableColumn.setPxx(cf.getPxx()); + physicalTableColumn.setLbx(cf.getLbx()); + physicalTableColumn.setJmx(cf.getJmx()); + physicalTableColumn.setJsx(cf.getJsx()); + physicalTableColumn.setMrz(cf.getMrz()); + physicalTableColumn.setShowType(cf.getShowType()); + physicalTableColumn.setTableId(physicalTable.getId()); + ptcList.add(physicalTableColumn); + } + + + createSql = createSql + columnsSql + ") "; + System.out.println("~~~createSql:" + createSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(deleteSql); + createTableAndInsertPhysicalTable.executeSqlService.jdbcTemplateExecute(createSql); + + + for (PhysicalTableColumn physicalTableColumn : ptcList) + createTableAndInsertPhysicalTable.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, true); + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\CreateTableAndInsertPhysicalTable.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/ExcelUtilArchive$1.java b/src/main/java/com/archive/common/archiveUtil/ExcelUtilArchive$1.java new file mode 100644 index 0000000..824edf6 --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/ExcelUtilArchive$1.java @@ -0,0 +1,11 @@ +/* */ package com.archive.common.archiveUtil; +/* */ +/* */ import com.archive.common.archiveUtil.ExcelUtilArchive; +/* */ import org.apache.poi.ss.usermodel.CellType; +/* */ + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\ExcelUtilArchive$1.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/ExcelUtilArchive.java b/src/main/java/com/archive/common/archiveUtil/ExcelUtilArchive.java new file mode 100644 index 0000000..ddad70b --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/ExcelUtilArchive.java @@ -0,0 +1,516 @@ + package com.archive.common.archiveUtil; + import java.io.BufferedOutputStream; + import java.io.FileInputStream; + import java.io.FileNotFoundException; + import java.io.IOException; + import java.io.InputStream; + import java.io.OutputStream; + import java.lang.reflect.Field; + import java.text.DateFormat; + import java.text.SimpleDateFormat; + import java.util.ArrayList; + import java.util.Collection; + import java.util.Date; + import java.util.Iterator; + import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import javax.servlet.http.HttpServletResponse; + import org.apache.poi.hssf.usermodel.HSSFWorkbook; + import org.apache.poi.ss.usermodel.Cell; + import org.apache.poi.ss.usermodel.CellStyle; + import org.apache.poi.ss.usermodel.CellType; + import org.apache.poi.ss.usermodel.Font; + import org.apache.poi.ss.usermodel.Row; + import org.apache.poi.ss.usermodel.Sheet; + import org.apache.poi.ss.usermodel.Workbook; + import org.apache.poi.ss.util.CellRangeAddress; + import org.apache.poi.xssf.streaming.SXSSFSheet; + import org.apache.poi.xssf.streaming.SXSSFWorkbook; + import org.apache.poi.xssf.usermodel.XSSFWorkbook; + + public class ExcelUtilArchive { + public static void exportMultisheetExcel(String name, List mapList, HttpServletResponse response) { + BufferedOutputStream bos = null; + try { + String fileName = name + ".xlsx"; + bos = getBufferedOutputStream(fileName, response); + doExport(mapList, bos); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (bos != null) { + bos.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + + + + + + + public static List> readExcel(String filePath, Integer sheetIndex) { + List> dataList = new ArrayList<>(); + Workbook wb = createWorkBook(filePath); + if (wb != null) { + Sheet sheet = wb.getSheetAt(sheetIndex.intValue()); + int maxRownum = sheet.getPhysicalNumberOfRows(); + Row firstRow = sheet.getRow(0); + int maxColnum = firstRow.getPhysicalNumberOfCells(); + String[] columns = new String[maxColnum]; + for (int i = 0; i < maxRownum; ) { + Map map = null; + if (i > 0) { + map = new LinkedHashMap<>(); + firstRow = sheet.getRow(i); + } + if (firstRow != null) { + String cellData = null; + for (int j = 0; j < maxColnum; j++) { + cellData = getCellFormatValue(firstRow.getCell(j)); + if (i == 0) { + columns[j] = cellData; + } else { + map.put(columns[j], cellData); + } + } + + + + if (i > 0) + dataList.add(map); i++; + } + } + } + try { + wb.close(); + } catch (IOException e) { + e.printStackTrace(); + } + return dataList; + } + + + + + + + + public static int getSheetCount(String filePath) { + Workbook wb = createWorkBook(filePath); + int i = 0; + if (wb != null) { + Sheet whet1 = wb.getSheetAt(0); + if (whet1 != null) { + i++; + } + Sheet whet2 = wb.getSheetAt(1); + if (whet2 != null) { + i++; + } + } + + + + + + try { + wb.close(); + } catch (IOException e) { + e.printStackTrace(); + } + return i; + } + + + + + + + + + public static String[] readExcelFirstRow(String filePath, Integer sheetIndex) { + String[] columns = null; + Workbook wb = createWorkBook(filePath); + if (wb != null) { + Sheet sheet = wb.getSheetAt(sheetIndex.intValue()); + + Row firstRow = sheet.getRow(0); + int maxColnum = firstRow.getPhysicalNumberOfCells(); + columns = new String[maxColnum]; + if (firstRow != null) { + String cellData = null; + for (int j = 0; j < maxColnum; j++) { + cellData = getCellFormatValue(firstRow.getCell(j)); + if (!cellData.equals("") && !cellData.trim().equals("") && !cellData.equals("请选择")) { + columns[j] = cellData; + } + } + } + } + + try { + wb.close(); + } catch (IOException e) { + e.printStackTrace(); + } + return columns; + } + + + private static BufferedOutputStream getBufferedOutputStream(String fileName, HttpServletResponse response) throws Exception { + response.setContentType("application/x-msdownload"); + response.setHeader("Content-Disposition", "attachment;filename=" + new String(fileName + .getBytes("gb2312"), "ISO8859-1")); + return new BufferedOutputStream((OutputStream)response.getOutputStream()); + } + + private static void doExport(List mapList, OutputStream outputStream) { + int maxBuff = 100; + + SXSSFWorkbook wb = new SXSSFWorkbook(maxBuff); + try { + for (int i = 0; i < mapList.size(); i++) { + Map map = mapList.get(i); + String[] headers = (String[])map.get("headers"); + Collection dataList = (Collection)map.get("dataList"); + String fileName = (String)map.get("fileName"); + createSheet(wb, null, headers, dataList, fileName, maxBuff); + } + + if (outputStream != null) { + wb.write(outputStream); + } + } catch (Exception ex) { + ex.printStackTrace(); + } finally { + try { + wb.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + + + private static void createSheet(SXSSFWorkbook wb, String[] exportFields, String[] headers, Collection dataList, String fileName, int maxBuff) throws NoSuchFieldException, IllegalAccessException, IOException { + SXSSFSheet sXSSFSheet = wb.createSheet(fileName); + + CellStyle style = wb.createCellStyle(); + CellStyle style2 = wb.createCellStyle(); + + Font font = wb.createFont(); + font.setFontName("微软雅黑"); + font.setFontHeightInPoints((short)11); + style.setFont(font); + + + + + + + + style2.setFont(font); + + + + + + + + + + + Row headerRow = sXSSFSheet.createRow(0); + + int headerSize = headers.length; + for (int cellnum = 0; cellnum < headerSize; cellnum++) { + Cell cell = headerRow.createCell(cellnum); + cell.setCellStyle(style); + sXSSFSheet.setColumnWidth(cellnum, 4000); + cell.setCellValue(headers[cellnum]); + } + + int rownum = 0; + Iterator iterator = dataList.iterator(); + while (iterator.hasNext()) { + T data = iterator.next(); + Row row = sXSSFSheet.createRow(rownum + 1); + + Field[] fields = getExportFields(data.getClass(), exportFields); + for (int i = 0; i < headerSize; i++) { + Cell cell = row.createCell(i); + cell.setCellStyle(style2); + Field field = fields[i]; + + setData(field, data, field.getName(), cell); + } + rownum = sXSSFSheet.getLastRowNum(); + + if (rownum % maxBuff == 0) { + sXSSFSheet.flushRows(maxBuff); + } + } + } + + + + + + private static void doExport(String[] headers, String[] exportFields, Collection dataList, String fileName, OutputStream outputStream) { + int maxBuff = 100; + + SXSSFWorkbook wb = new SXSSFWorkbook(maxBuff); + try { + createSheet(wb, exportFields, headers, dataList, fileName, maxBuff); + if (outputStream != null) { + wb.write(outputStream); + } + } catch (Exception ex) { + ex.printStackTrace(); + } + } + + + + + + + + + + + + + private static Field getDataField(T object, String property) throws NoSuchFieldException, IllegalAccessException { + if (property.contains(".")) { + String p = property.substring(0, property.indexOf(".")); + Field field = object.getClass().getDeclaredField(p); + return field; + } + Field dataField = object.getClass().getDeclaredField(property); + + return dataField; + } + + private static Field[] getExportFields(Class targetClass, String[] exportFieldNames) { + Field[] fields = null; + if (exportFieldNames == null || exportFieldNames.length < 1) { + fields = targetClass.getDeclaredFields(); + } else { + fields = new Field[exportFieldNames.length]; + for (int i = 0; i < exportFieldNames.length; i++) { + try { + fields[i] = targetClass.getDeclaredField(exportFieldNames[i]); + } catch (Exception e) { + try { + fields[i] = targetClass.getSuperclass().getDeclaredField(exportFieldNames[i]); + } catch (Exception e1) { + throw new IllegalArgumentException("无法获取导出字段", e); + } + } + } + } + + return fields; + } + + + + + + + + + + + + + + + private static void setData(Field dataField, T object, String property, Cell cell) throws IllegalAccessException, NoSuchFieldException { + dataField.setAccessible(true); + Object val = dataField.get(object); + Sheet sh = cell.getSheet(); + CellStyle style = cell.getCellStyle(); + int cellnum = cell.getColumnIndex(); + if (val != null) { + if (dataField.getType().toString().endsWith("String")) { + cell.setCellValue((String)val); + } else if (dataField.getType().toString().endsWith("Integer") || dataField.getType().toString().endsWith("int")) { + cell.setCellValue(((Integer)val).intValue()); + } else if (dataField.getType().toString().endsWith("Long") || dataField.getType().toString().endsWith("long")) { + cell.setCellValue(val.toString()); + } else if (dataField.getType().toString().endsWith("Double") || dataField.getType().toString().endsWith("double")) { + cell.setCellValue(((Double)val).doubleValue()); + } else if (dataField.getType().toString().endsWith("Date")) { + DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + cell.setCellValue(format.format((Date)val)); + } else if (dataField.getType().toString().endsWith("List")) { + List list1 = (List)val; + int size = list1.size(); + for (int i = 0; i < size; i++) + { + int start = property.indexOf(dataField.getName()) + dataField.getName().length() + 1; + String tempProperty = property.substring(start, property.length()); + Field field = getDataField(list1.get(i), tempProperty); + Cell tempCell = cell; + if (i > 0) { + int rowNum = cell.getRowIndex() + i; + Row row = sh.getRow(rowNum); + if (row == null) { + row = sh.createRow(rowNum); + + for (int j = 0; j < cell.getColumnIndex(); j++) { + sh.addMergedRegion(new CellRangeAddress(cell.getRowIndex(), cell.getRowIndex() + size - 1, j, j)); + Cell c = row.createCell(j); + c.setCellStyle(style); + } + } + tempCell = row.createCell(cellnum); + tempCell.setCellStyle(style); + } + + setData(field, list1.get(i), tempProperty, tempCell); + } + + } else if (property.contains(".")) { + String p = property.substring(property.indexOf(".") + 1, property.length()); + Field field = getDataField(val, p); + setData(field, val, p, cell); + } else { + cell.setCellValue(val.toString()); + } + } + } + + + private static Workbook createWorkBook(String filePath) { + XSSFWorkbook xSSFWorkbook; + Workbook wb = null; + if (filePath == null) { + return null; + } + String extString = filePath.substring(filePath.lastIndexOf(".")); + InputStream is = null; + try { + is = new FileInputStream(filePath); + if (".xls".equals(extString)) { + HSSFWorkbook hSSFWorkbook; return (Workbook)(hSSFWorkbook = new HSSFWorkbook(is)); + } if (".xlsx".equals(extString)) { + return (Workbook)(xSSFWorkbook = new XSSFWorkbook(is)); + } + return (Workbook)xSSFWorkbook; + } + catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + return (Workbook)xSSFWorkbook; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + public static String getCellFormatValue(Cell cell) { + SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); + String cellValue = ""; + if (cell == null) { + return cellValue; + } + + CellType cellType = cell.getCellTypeEnum(); + + if (cellType == CellType.NUMERIC) { + cell.setCellType(CellType.STRING); + } + + + switch (null.$SwitchMap$org$apache$poi$ss$usermodel$CellType[cellType.ordinal()]) + + { + + + + + + + + case 1: + cellValue = String.valueOf(cell.getStringCellValue()); + + + + + + + + + + + + + + + + + + + + + return cellValue;case 2: cellValue = String.valueOf(cell.getStringCellValue()); return cellValue;case 3: cellValue = String.valueOf(cell.getBooleanCellValue()); return cellValue;case 4: cellValue = String.valueOf(cell.getCellFormula()); return cellValue;case 5: cellValue = cell.getStringCellValue(); return cellValue;case 6: cellValue = "非法字符"; return cellValue; } cellValue = "未知类型"; return cellValue; + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\ExcelUtilArchive.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/FileUtils.java b/src/main/java/com/archive/common/archiveUtil/FileUtils.java new file mode 100644 index 0000000..d50822a --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/FileUtils.java @@ -0,0 +1,32 @@ + package com.archive.common.archiveUtil; + + + + + + + public class FileUtils + { + public static String changeValueType(Long dataSize) { + String valueType = new String(); + String[] type = { "KB", "MB", "GB", "TB", "PB" }; + int p = 0; + if (dataSize.longValue() == 0L) { + valueType = dataSize + type[p]; + } else { + Double value = Double.valueOf(dataSize.longValue() * 1.0D / 1024.0D); + while (value.doubleValue() >= 1024.0D) { + value = Double.valueOf(value.doubleValue() / 1024.0D); + p++; + } + valueType = String.format("%.2f", new Object[] { value }) + type[p]; + } + return valueType; + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\FileUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/ImageWaterMarkUtil.java b/src/main/java/com/archive/common/archiveUtil/ImageWaterMarkUtil.java new file mode 100644 index 0000000..b3f6f6d --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/ImageWaterMarkUtil.java @@ -0,0 +1,499 @@ + package com.archive.common.archiveUtil; + + import java.awt.AlphaComposite; + import java.awt.Color; + import java.awt.Font; + import java.awt.Graphics2D; + import java.awt.Image; + import java.awt.RenderingHints; + import java.awt.image.BufferedImage; + import java.awt.image.ImageObserver; + import java.io.File; + import java.io.FileOutputStream; + import java.io.IOException; + import java.io.OutputStream; + import java.util.Iterator; + import javax.imageio.ImageIO; + import javax.imageio.ImageReader; + import javax.imageio.stream.ImageInputStream; + import javax.swing.ImageIcon; + + + + + + + + + + + + + + + + + + + + + + + + + + public class ImageWaterMarkUtil + { + public static void markImageByWriting(String srcImgPath, String targerPath, String waterMarkContent, Color markContentColor, String scripts, String styles, int fontSize, Integer degree, float alpha, int xmove, int ymove) { + try { + String[] waterMarkContents = waterMarkContent.split("\\|\\|"); + + File srcImgFile = new File(srcImgPath); + Image srcImg = ImageIO.read(srcImgFile); + + int srcImgWidth = srcImg.getWidth(null); + + int srcImgHeight = srcImg.getHeight(null); + + BufferedImage bufImg = new BufferedImage(srcImgWidth, srcImgHeight, 1); + + Graphics2D g = bufImg.createGraphics(); + g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null); + + int sty = getStyle(styles); + Font font = new Font(scripts, sty, fontSize); + g.setComposite(AlphaComposite.getInstance(10, alpha)); + + g.setColor(markContentColor); + + g.setFont(font); + + g.rotate(Math.toRadians(degree.intValue()), bufImg.getWidth() / 2.0D, bufImg.getHeight() / 2.0D); + + int maxLen = 0; + int maxHigh = 0; + for (int i = 0; i < waterMarkContents.length; i++) { + waterMarkContent = waterMarkContents[i]; + int fontlen = g.getFontMetrics(g.getFont()).charsWidth(waterMarkContent.toCharArray(), 0, waterMarkContent.length()); + if (fontlen >= maxLen) { + maxLen = fontlen; + } + maxHigh = maxHigh + (i + 1) * fontSize + 10; + } + + int line = srcImgWidth * 2 / maxLen; + int co = srcImgHeight * 2 / maxHigh; + int yz = 0; + + for (int a = 0; a < co; a++) { + int t = 0; + for (int j = 0; j < waterMarkContents.length; j++) { + waterMarkContent = waterMarkContents[j]; + int y = (j + 1) * fontSize + 10 + t; + + int tempX = -srcImgWidth / 2; + int tempY = -srcImgHeight / 2 + y + yz; + + int tempCharLen = 0; + + int tempLineLen = 0; + StringBuffer sb = new StringBuffer(); + for (int k = 0; k < waterMarkContent.length(); k++) { + char tempChar = waterMarkContent.charAt(k); + tempCharLen = g.getFontMetrics(g.getFont()).charWidth(tempChar); + tempLineLen += tempCharLen; + + if (tempLineLen >= srcImgWidth) { + + g.drawString(sb.toString(), tempX, tempY); + t += fontSize; + + sb.delete(0, sb.length()); + tempY += fontSize; + tempLineLen = 0; + } + + sb.append(tempChar); + } + + for (int z = 0; z < line; z++) { + + g.drawString(sb.toString(), tempX, tempY); + tempX = tempX + maxLen + xmove; + } + } + yz = yz + maxHigh + ymove; + } + g.dispose(); + + + File targetFile = new File(targerPath); + if (!targetFile.getParentFile().exists()) { + targetFile.getParentFile().mkdirs(); + } + String format = getFormatName(new File(srcImgPath)); + FileOutputStream outImgStream = new FileOutputStream(targerPath); + ImageIO.write(bufImg, format, outImgStream); + outImgStream.flush(); + outImgStream.close(); + System.out.println("**********图片完成添加文字水印工作**********"); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + + + + + + + + + + + + + + + + + + + + public static void markImageByWriting(String srcImgPath, String targerPath, String waterMarkContent, Color markContentColor, String scripts, String styles, int fontSize, Integer degree, float alpha, String watermarkPosition, Integer left, Integer top) { + try { + File srcImgFile = new File(srcImgPath); + Image srcImg = ImageIO.read(srcImgFile); + int srcImgWidth = srcImg.getWidth(null); + int srcImgHeight = srcImg.getHeight(null); + + BufferedImage bufImg = new BufferedImage(srcImgWidth, srcImgHeight, 1); + Graphics2D g = bufImg.createGraphics(); + g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null); + int sty = getStyle(styles); + Font font = new Font(scripts, sty, fontSize); + g.setComposite(AlphaComposite.getInstance(10, alpha)); + g.setColor(markContentColor); + g.setFont(font); + g.rotate(Math.toRadians(degree.intValue()), bufImg.getWidth() / 2.0D, bufImg.getHeight() / 2.0D); + int markLength = g.getFontMetrics(g.getFont()).charsWidth(waterMarkContent.toCharArray(), 0, waterMarkContent.length()); + + int x = left.intValue(); + int y = top.intValue(); + if (x == 0 && y == 0) { + switch (watermarkPosition) { + case "topLeft": + x = 0; + y = 0 + fontSize; + break; + case "topRight": + x = srcImgWidth - markLength; + y = 0 + fontSize; + break; + case "topCenter": + x = (srcImgWidth - markLength) / 2; + y = 0 + fontSize; + break; + case "center": + x = (srcImgWidth - markLength) / 2; + y = (srcImgHeight - fontSize) / 2; + break; + case "centerLeft": + x = 0; + y = (srcImgHeight - fontSize) / 2; + break; + case "centerRight": + x = srcImgWidth - markLength; + y = (srcImgHeight - fontSize) / 2; + break; + case "bottomLeft": + x = 0; + y = srcImgHeight - 3; + break; + case "bottomCenter": + x = (srcImgWidth - markLength) / 2; + y = srcImgHeight - 3; + break; + case "bottomRight": + x = srcImgWidth - markLength - 3; + y = srcImgHeight - 3; + break; + default: + x = srcImgWidth - markLength - 3; + y = srcImgHeight - 3; + break; + } + + } + g.drawString(waterMarkContent, x, y); + g.dispose(); + + + File targetFile = new File(targerPath); + if (!targetFile.getParentFile().exists()) { + targetFile.getParentFile().mkdirs(); + } + String format = getFormatName(new File(srcImgPath)); + FileOutputStream outImgStream = new FileOutputStream(targerPath); + ImageIO.write(bufImg, format, outImgStream); + outImgStream.flush(); + outImgStream.close(); + System.out.println("**********图片完成添加文字水印工作**********"); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + public static int getStyle(String styles) { + switch (styles) + { case "普通": + sty = 0; + + + + + + + + + + + + + + + return sty;case "加粗": sty = 1; return sty;case "斜体": sty = 2; return sty;case "粗斜体": sty = 3; return sty; } int sty = 0; return sty; + } + + + + + + + + + + + + + public static void markImageByIcon(String iconPath, String srcImgPath, String targerPath, Integer degree, float alpha, Integer left, Integer top) { + OutputStream os = null; + try { + Image srcImg = ImageIO.read(new File(srcImgPath)); + BufferedImage buffImg = new BufferedImage(srcImg.getWidth(null), srcImg.getHeight(null), 1); + + + Graphics2D g = buffImg.createGraphics(); + + g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); + g.drawImage(srcImg.getScaledInstance(srcImg.getWidth(null), srcImg.getHeight(null), 4), 0, 0, (ImageObserver)null); + if (null != degree) + { + g.rotate(Math.toRadians(degree.intValue()), buffImg + .getWidth() / 2.0D, buffImg + .getHeight() / 2.0D); + } + + ImageIcon imgIcon = new ImageIcon(iconPath); + + Image img = imgIcon.getImage(); + g.setComposite(AlphaComposite.getInstance(10, alpha)); + + g.drawImage(img, left.intValue(), top.intValue(), (ImageObserver)null); + g.setComposite(AlphaComposite.getInstance(3)); + g.dispose(); + + File targetFile = new File(targerPath); + if (!targetFile.getParentFile().exists()) { + targetFile.getParentFile().mkdirs(); + } + String format = getFormatName(new File(srcImgPath)); + os = new FileOutputStream(targerPath); + + ImageIO.write(buffImg, format, os); + System.out.println("**********图片完成添加图片水印工作**********"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (null != os) + os.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + + + + + + + + + + + + + + + + public static void markImageByIcon(String iconPath, String srcImgPath, String targerPath, Integer degree, float alpha, String watermarkPosition) { + OutputStream os = null; try { + int x, y; + Image srcImg = ImageIO.read(new File(srcImgPath)); + + BufferedImage buffImg = new BufferedImage(srcImg.getWidth(null), srcImg.getHeight(null), 1); + + int srcWidth = srcImg.getWidth(null); + int srcHeight = srcImg.getHeight(null); + + Graphics2D g = buffImg.createGraphics(); + + g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); + + g.drawImage(srcImg + .getScaledInstance(srcImg.getWidth(null), srcImg + .getHeight(null), 4), 0, 0, (ImageObserver)null); + + if (null != degree) { + g.rotate(Math.toRadians(degree.intValue()), buffImg + .getWidth() / 2.0D, buffImg + .getHeight() / 2.0D); + } + + ImageIcon imgIcon = new ImageIcon(iconPath); + + Image img = imgIcon.getImage(); + int watermarkImageWidth = img.getWidth(null); + int watermarkImageHeight = img.getHeight(null); + g.setComposite(AlphaComposite.getInstance(10, alpha)); + + + + switch (watermarkPosition) { + case "topLeft": + x = 0; + y = 0; + break; + case "topRight": + x = srcWidth - watermarkImageWidth; + y = 0; + break; + case "topCenter": + x = (srcWidth - watermarkImageWidth) / 2; + y = 0; + break; + case "center": + x = (srcWidth - watermarkImageWidth) / 2; + y = (srcHeight - watermarkImageHeight) / 2; + break; + case "centerLeft": + x = 0; + y = (srcHeight - watermarkImageHeight) / 2; + break; + case "centerRight": + x = srcWidth - watermarkImageWidth; + y = (srcHeight - watermarkImageHeight) / 2; + break; + case "bottomLeft": + x = 0; + y = srcHeight - watermarkImageHeight; + break; + case "bottomCenter": + x = (srcWidth - watermarkImageWidth) / 2; + y = srcHeight - watermarkImageHeight; + break; + case "bottomRight": + x = srcWidth - watermarkImageWidth; + y = srcHeight - watermarkImageHeight; + break; + default: + x = srcWidth - watermarkImageWidth; + y = srcHeight - watermarkImageHeight; + break; + } + g.drawImage(img, x, y, (ImageObserver)null); + g.setComposite(AlphaComposite.getInstance(3)); + g.dispose(); + + File targetFile = new File(targerPath); + if (!targetFile.getParentFile().exists()) { + targetFile.getParentFile().mkdirs(); + } + String format = getFormatName(new File(srcImgPath)); + os = new FileOutputStream(targerPath); + ImageIO.write(buffImg, format, os); + System.out.println("**********图片完成添加图片水印工作**********"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (null != os) + os.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + + + + + + + + public static String getFormatName(File file) { + ImageInputStream iis = null; + ImageReader reader = null; + try { + iis = ImageIO.createImageInputStream(file); + Iterator iter = ImageIO.getImageReaders(iis); + if (!iter.hasNext()) { + return null; + } + reader = iter.next(); + return reader.getFormatName(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + if (iis != null) { + iis.close(); + } + if (reader != null) { + reader.dispose(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + return null; + } + + + + + + + + + + public static void main(String[] args) { + String iconPath = "C:\\Users\\18291\\Desktop\\watermark\\watermark2.png"; + String srcImgPath = "C:\\Users\\18291\\Desktop\\watermark\\c8.jpg"; + String targerPath = "C:\\Users\\18291\\Desktop\\watermark\\1\\2\\c1.jpg"; + String contont = "Font类是用于设置图形用户界面上的字体样式"; + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\ImageWaterMarkUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/LicenseGenerator.java b/src/main/java/com/archive/common/archiveUtil/LicenseGenerator.java new file mode 100644 index 0000000..d5b230e --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/LicenseGenerator.java @@ -0,0 +1,28 @@ + package com.archive.common.archiveUtil; + + import org.apache.commons.codec.digest.HmacUtils; + + public class LicenseGenerator + { + public static String generateLicense(String macAddress) { + String license = HmacUtils.hmacSha256Hex("tale", macAddress); + return license; + } + private static final String LICENSE_SECRET_KEY = "tale"; + public static String licenseGetMac(String macAddress) { + String license = HmacUtils.hmacSha256Hex("tale", macAddress); + return license; + } + + public static void main(String[] args) { + String macAddress = "00:1A:2B:3C:4D:5E"; + String license = generateLicense(macAddress); + System.out.println("Generated License: " + license); + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\LicenseGenerator.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/MacUtil.java b/src/main/java/com/archive/common/archiveUtil/MacUtil.java new file mode 100644 index 0000000..7397f79 --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/MacUtil.java @@ -0,0 +1,231 @@ + package com.archive.common.archiveUtil; + + import com.archive.common.utils.DateUtils; + import java.io.BufferedReader; + import java.io.InputStreamReader; + import java.net.InetAddress; + import java.net.NetworkInterface; + import java.net.SocketException; + import java.text.SimpleDateFormat; + import java.util.ArrayList; + import java.util.Collections; + import java.util.Date; + import java.util.Enumeration; + import java.util.List; + + + + + public class MacUtil + { + public static List getMACAddressByWindows() throws Exception { + ArrayList rs = new ArrayList<>(); + String result = ""; + Process process = Runtime.getRuntime().exec("ipconfig /all"); + BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream(), "GBK")); + int index = -1; + String line; + while ((line = br.readLine()) != null) { + index = line.indexOf("物理地址"); + if (index >= 0) { + index = line.indexOf(":"); + if (index >= 0) { + result = line.substring(index + 1).trim(); + } + rs.add(result.toUpperCase()); + } + } + br.close(); + + + return rs; + } + + + + + + public static List getMacIds() { + InetAddress ip = null; + NetworkInterface ni = null; + List macList = new ArrayList<>(); + + try { + Enumeration netInterfaces = NetworkInterface.getNetworkInterfaces(); + while (netInterfaces.hasMoreElements()) { + + ni = netInterfaces.nextElement(); + + + Enumeration ips = ni.getInetAddresses(); + while (ips.hasMoreElements()) { + ip = ips.nextElement(); + if (!ip.isLoopbackAddress() && ip + .getHostAddress().matches("(\\d{1,3}\\.){3}\\d{1,3}")) + { + macList.add(getMacFromBytes(ni.getHardwareAddress())); + } + } + } + } catch (Exception e) { + System.out.println("出现异常" + e.getMessage()); + } + return macList; + } + + private static String getMacFromBytes(byte[] bytes) { + StringBuffer mac = new StringBuffer(); + + boolean first = false; + for (byte b : bytes) { + if (first) { + mac.append(":"); + } + byte currentByte = (byte)((b & 0xF0) >> 4); + mac.append(Integer.toHexString(currentByte)); + currentByte = (byte)(b & 0xF); + mac.append(Integer.toHexString(currentByte)); + first = true; + } + System.out.println(mac.toString()); + return mac.toString(); + } + + + + + public static List getMacAddress() { + ArrayList macs = new ArrayList<>(); + try { + Enumeration allNetInterfaces = NetworkInterface.getNetworkInterfaces(); + byte[] mac = null; + while (allNetInterfaces.hasMoreElements()) { + NetworkInterface netInterface = allNetInterfaces.nextElement(); + if (netInterface.isLoopback() || netInterface.isVirtual() || netInterface.isPointToPoint() || !netInterface.isUp()) { + continue; + } + mac = netInterface.getHardwareAddress(); + if (mac != null) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < mac.length; i++) { + sb.append(String.format("%02X%s", new Object[] { Byte.valueOf(mac[i]), (i < mac.length - 1) ? ":" : "" })); + } + if (sb.length() > 0) { + macs.add(sb.toString().toLowerCase()); + } + } + } + + + return macs; + } catch (Exception e) { + System.out.println("MAC地址获取失败" + e.getMessage()); + + return Collections.emptyList(); + } + } + + + + + + public static String getMAC() throws SocketException { + Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces(); + + while (networkInterfaces.hasMoreElements()) { + NetworkInterface network = networkInterfaces.nextElement(); + byte[] mac = network.getHardwareAddress(); + if (mac == null) { + System.out.println("mac为空"); + continue; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < mac.length; i++) { + sb.append(String.format("%02X%s", new Object[] { Byte.valueOf(mac[i]), (i < mac.length - 1) ? "-" : "" })); + } + + + if (!"".equals(sb.toString())) { + return sb.toString(); + } + } + + + return ""; + } + + + + + + + + + public static boolean sqjy(String mac, String ckDate, int shqx) throws Exception { + boolean res = false; + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + + String osName = System.getProperty("os.name").toLowerCase(); + System.out.println("操作系统:" + osName); + if (osName.contains("windows")) { + List list = getMACAddressByWindows(); + if (list.contains(mac)) { + res = true; + } + } else if (osName.contains("linux")) { + List list = getMacIds(); + if (list.contains(mac)) { + res = true; + } + } else if (osName.contains("uos")) { + + List list = getMacAddress(); + if (list.contains(mac)) { + res = true; + } + } else if (osName.contains("kylin")) { + + String mac1 = getMAC(); + if (mac1.equals(mac)) { + res = true; + } + } + if (res == true) { + System.out.println("mac地址校验通过"); + if (shqx == 0) { + System.out.println("授权期限校验通过,永久授权"); + } else { + Date dqsj = DateUtils.addDays(sdf.parse(ckDate), shqx); + if (dqsj.after(new Date())) { + res = true; + System.out.println("系统授权期限为:" + shqx + "天,到期时间:" + sdf.format(dqsj)); + } else { + System.out.println("系统授权期限为:" + shqx + "天,出库时间:" + ckDate + ",到期时间:" + sdf.format(dqsj)); + System.out.println("系统授权已过期,请联系商务进行授权!"); + res = false; + } + } + } else { + + System.out.println("mac地址校验失败,请核实授权MAC是否正确"); + } + return res; + } + + + public static void main(String[] args) throws Exception { + String osName = System.getProperty("os.name").toLowerCase(); + System.out.println(osName); + if (osName.contains("windows")) { + List list = getMACAddressByWindows(); + for (int i = 0; i < list.size(); i++) + System.out.println(list.get(i)); + } + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\MacUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/MetadataUtil.java b/src/main/java/com/archive/common/archiveUtil/MetadataUtil.java new file mode 100644 index 0000000..608fe27 --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/MetadataUtil.java @@ -0,0 +1,218 @@ + package com.archive.common.archiveUtil; + + import java.io.File; + import java.io.FileInputStream; + import java.io.IOException; + import java.util.ArrayList; + import java.util.HashMap; + import java.util.List; + import java.util.Map; + import org.apache.tika.exception.TikaException; + import org.apache.tika.metadata.Metadata; + import org.apache.tika.parser.AutoDetectParser; + import org.apache.tika.parser.ParseContext; + import org.apache.tika.sax.BodyContentHandler; + import org.xml.sax.ContentHandler; + import org.xml.sax.SAXException; + + + + + + + + + + + + public class MetadataUtil + { + public static List> getMetadataAllByFile(String path) { + List> list = new ArrayList<>(); + File file = new File(path); + + AutoDetectParser autoDetectParser = new AutoDetectParser(); + BodyContentHandler handler = new BodyContentHandler(Integer.parseInt(String.valueOf(file.length()))); + Metadata metadata = new Metadata(); + FileInputStream inputstream = null; + try { + inputstream = new FileInputStream(file); + ParseContext context = new ParseContext(); + autoDetectParser.parse(inputstream, (ContentHandler)handler, metadata, context); + String[] metadataNames = metadata.names(); + for (String name : metadataNames) { + if (name.indexOf("tiff") == -1 && name.indexOf("Exif") == -1 && name + .indexOf("X-Parsed-By") == -1 && name + .indexOf("File Name") == -1 && name + .indexOf("Component ") == -1 && name + .indexOf("meta:") == -1 && + + !name.equals("date") && name + .indexOf("dcterms:") == -1) { + Map map = new HashMap<>(); + map.put("propety", ConverChinaText(name)); + map.put("propetyValue", metadata.get(name)); + list.add(map); + } + + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (inputstream != null) { + try { + inputstream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return list; + } + + + public static void main(String[] args) throws IOException, TikaException, SAXException { + File file = new File("C:\\Users\\Administrator\\Downloads\\20221104091635.pdf"); + + AutoDetectParser autoDetectParser = new AutoDetectParser(); + + + + BodyContentHandler handler = new BodyContentHandler(); + Metadata metadata = new Metadata(); + FileInputStream inputstream = new FileInputStream(file); + ParseContext context = new ParseContext(); + autoDetectParser.parse(inputstream, (ContentHandler)handler, metadata, context); + + + + + String[] metadataNames = metadata.names(); + for (String name : metadataNames) { + if (name.indexOf("tiff") == -1 && name.indexOf("Exif") == -1 && name + .indexOf("X-Parsed-By") == -1 && name + .indexOf("File Name") == -1 && name + .indexOf("Component ") == -1 && name + .indexOf("meta:") == -1 && + + !name.equals("date") && name + .indexOf("dcterms:") == -1) { + System.out.println(ConverChinaText(name) + ": " + metadata.get(name)); + } + } + } + + + + public static String ConverChinaText(String name) { + String res = name; + if (name.contains("Y Resolution")) { + res = "Y轴分辨率(Y Resolution)"; + } else if (name.contains("X Resolution")) { + res = "X轴分辨率(X Resolution)"; + } else if (name.contains("Image Width")) { + res = "宽度(Image Width)"; + } else if (name.contains("Image Height")) { + res = "高度(Image Height)"; + } else if (name.contains("Number of Tables")) { + res = "表格数量(Number of Tables)"; + } else if (name.contains("Compression Type")) { + res = "压缩方式(Compression Type)"; + } else if (name.contains("Data Precision")) { + res = "数据精度(Data Precision)"; + } else if (name.contains("Number of Components")) { + res = "部件数量(Number of Components)"; + } else if (name.contains("File Size")) { + res = "文件大小(File Size)"; + } else if (name.contains("Color Space")) { + res = "色彩空间(" + name + ")"; + } else if (name.contains("Exif Version")) { + res = "Exif版本(" + name + ")"; + } else if (name.contains("Thumbnail Offset")) { + res = "缩略图偏移(" + name + ")"; + } else if (name.contains("Resolution Unit")) { + res = "分辨率单位(" + name + ")"; + } else if (name.contains("BitsPerSample")) { + res = "每个样本位数(" + name + ")"; + } else if (name.contains("Caption Digest")) { + res = "标题摘要(" + name + ")"; + } else if (name.contains("Content-Type")) { + res = "内容类型(" + name + ")"; + } else if (name.contains("File Modified Date")) { + res = "文件修改日期(" + name + ")"; + } else if (name.contains("YCbCr Positioning")) { + res = "YCbCr位置(" + name + ")"; + } else if (name.contains("Thumbnail Width Pixels")) { + res = "缩略图宽度像素(" + name + ")"; + } else if (name.contains("Thumbnail Length")) { + res = "缩略图长度(" + name + ")"; + } else if (name.contains("Orientation")) { + res = "方向(" + name + ")"; + } else if (name.contains("FlashPix Version")) { + res = "FlashPix版本(" + name + ")"; + + + } + else if (name.contains("PDFVersion")) { + res = "PDF版本(" + name + ")"; + } else if (name.contains("hasXFA")) { + res = "是否有XFA(" + name + ")"; + } else if (name.contains("access_permission:modify_annotations")) { + res = "访问权限-修改注释(" + name + ")"; + } else if (name.contains("access_permission:can_print_degraded")) { + res = "访问权限-分级打印(" + name + ")"; + } else if (name.contains("created")) { + res = "创建时间(" + name + ")"; + } else if (name.contains("Last-Modified")) { + res = "最后修改时间(" + name + ")"; + } else if (name.contains("modified")) { + res = "修改时间(" + name + ")"; + } else if (name.contains("dc:format")) { + res = "格式(" + name + ")"; + } else if (name.contains("Last-Save-Date")) { + res = "最后保存时间(" + name + ")"; + } else if (name.contains("access_permission:fill_in_form")) { + res = "访问权限-填充表单(" + name + ")"; + } else if (name.contains("access_permission:fill_in_form")) { + res = "访问权限-填充表单(" + name + ")"; + } else if (name.contains("producer")) { + res = "制作者(" + name + ")"; + } else if (name.contains("access_permission:can_print")) { + res = "访问权限-可打印(" + name + ")"; + } else if (name.contains("access_permission:extract_content")) { + res = "访问权限-提取内容(" + name + ")"; + } + else if (name.contains("access_permission:assemble_document")) { + res = "访问权限-汇编文档(" + name + ")"; + } else if (name.contains("access_permission:extract_for_accessibility")) { + res = "访问权限-可访问性提取(" + name + ")"; + } else if (name.contains("xmpTPg:NPages")) { + res = "页数(" + name + ")"; + } else if (name.contains("access_permission:can_modify")) { + res = "访问权限-可修改(" + name + ")"; + } else if (name.contains("Creation-Date")) { + res = "创建时间(" + name + ")"; + } else if (name.contains("pdf:hasXMP")) { + res = "是否有XMP(" + name + ")"; + } else if (name.contains("pdf:charsPerPage")) { + res = "每页字符数(" + name + ")"; + } else if (name.contains("pdf:hasMarkedContent")) { + res = "包含标记内容(" + name + ")"; + } else if (name.contains("pdf:encrypted")) { + res = "是否加密(" + name + ")"; + } else if (name.contains("pdf:unmappedUnicodeCharsPerPage")) { + res = "每页未知字符(" + name + ")"; + } + + + + + return res; + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\MetadataUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/PdfWaterMarkUtil.java b/src/main/java/com/archive/common/archiveUtil/PdfWaterMarkUtil.java new file mode 100644 index 0000000..b5b20a7 --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/PdfWaterMarkUtil.java @@ -0,0 +1,382 @@ + package com.archive.common.archiveUtil; + + import com.itextpdf.text.Image; + import com.itextpdf.text.Rectangle; + import com.itextpdf.text.pdf.BaseFont; + import com.itextpdf.text.pdf.PdfContentByte; + import com.itextpdf.text.pdf.PdfGState; + import com.itextpdf.text.pdf.PdfReader; + import com.itextpdf.text.pdf.PdfStamper; + import java.awt.Font; + import java.awt.FontMetrics; + import java.io.File; + import java.io.FileOutputStream; + import sun.font.FontDesignMetrics; + + + + + + + + + + + public class PdfWaterMarkUtil + { + private static int interval = 20; + + + + + + + + + + + public static void waterMarkforWriting(String inputFile, String outputFile, String waterMarkName, Integer degree, float alpha, int fontSize) { + try { + File file = new File(outputFile); + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + PdfReader reader = new PdfReader(inputFile); + PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(outputFile)); + + BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", true); + Rectangle pageRect = null; + PdfGState gs = new PdfGState(); + gs.setFillOpacity(alpha); + + int total = reader.getNumberOfPages() + 1; + FontMetrics metrics = FontDesignMetrics.getMetrics(new Font("宋体", 0, fontSize)); + int textH = metrics.getHeight(); + int textW = metrics.stringWidth(waterMarkName); + + for (int i = 1; i < total; i++) { + pageRect = reader.getPageSizeWithRotation(i); + PdfContentByte under = stamper.getOverContent(i); + under.saveState(); + under.setGState(gs); + under.beginText(); + under.setFontAndSize(base, fontSize); + int height; + for (height = interval + textH; height < pageRect.getHeight(); height += textH * 3) { + int width; for (width = interval + textW; width < pageRect.getWidth() + textW; width += textW * 2) { + under.showTextAligned(0, waterMarkName, height, width, degree.intValue()); + } + } + + under.endText(); + } + stamper.close(); + reader.close(); + System.out.println("**********PDF完成添加文字水印工作**********"); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + + + + + + + + + + + + + + + + public static void waterMarkforWriting(String inputFile, String outputFile, String waterMarkName, Integer degree, float alpha, int fontSize, String watermarkPosition, Integer left, Integer top) { + try { + File file = new File(outputFile); + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + PdfReader reader = new PdfReader(inputFile); + PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(outputFile)); + + BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", true); + Rectangle pageRect = null; + PdfGState gs = new PdfGState(); + gs.setFillOpacity(alpha); + + int total = reader.getNumberOfPages() + 1; + + FontMetrics metrics = FontDesignMetrics.getMetrics(new Font("宋体", 0, fontSize)); + int textH = metrics.getHeight(); + int textW = metrics.stringWidth(waterMarkName); + + for (int i = 1; i < total; i++) { + pageRect = reader.getPageSizeWithRotation(i); + PdfContentByte under = stamper.getOverContent(i); + under.saveState(); + under.setGState(gs); + under.beginText(); + under.setFontAndSize(base, fontSize); + int pdfWidth = (int)pageRect.getWidth(); + int pdfHeight = (int)pageRect.getHeight(); + + int x = left.intValue(); + int y = top.intValue(); + if (x == 0 && y == 0) { + switch (watermarkPosition) { + case "bottomLeft": + x = 0; + y = 3; + break; + case "bottomRight": + x = pdfWidth - textW; + y = 3; + break; + case "bottomCenter": + x = (pdfWidth - textW) / 2; + y = 3; + break; + case "center": + x = (pdfWidth - textW) / 2; + y = (pdfHeight - textH) / 2; + break; + case "centerLeft": + x = 0; + y = (pdfHeight - textH) / 2; + break; + case "centerRight": + x = pdfWidth - textW; + y = (pdfHeight - textH) / 2; + break; + case "topLeft": + x = 0; + y = pdfHeight - textH; + break; + case "topCenter": + x = (pdfWidth - textW) / 2; + y = pdfHeight - textH; + break; + case "topRight": + x = pdfWidth - textW; + y = pdfHeight - textH; + break; + default: + x = pdfWidth - textW; + y = 3; + break; + } + } + under.showTextAligned(0, waterMarkName, x, y, degree.intValue()); + + under.endText(); + } + stamper.close(); + reader.close(); + System.out.println("**********PDF完成添加文字水印工作**********"); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + + + + + + + + public static void pressImageWater(String srcPath, String targetPath, String imgPath, int x, int y) { + PdfReader reader = null; + PdfStamper stamp = null; + + try { + reader = new PdfReader(srcPath); + + File targetFile = new File(targetPath); + if (!targetFile.getParentFile().exists()) { + targetFile.getParentFile().mkdirs(); + } + + stamp = new PdfStamper(reader, new FileOutputStream(targetFile)); + Image img = Image.getInstance(imgPath); + + for (int i = 1; i <= reader.getNumberOfPages(); i++) { + + PdfContentByte over = stamp.getOverContent(i); + img.setAbsolutePosition(x, y); + + over.addImage(img); + } + stamp.close(); + reader.close(); + System.out.println("**********PDF完成添加图片水印工作**********"); + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException(e); + } + } + + + + + + + + + + + + public static void pressImageWater(String srcPath, String targetPath, String imgPath, int x, int y, int r) { + PdfReader reader = null; + PdfStamper stamp = null; + + try { + reader = new PdfReader(srcPath); + + File targetFile = new File(targetPath); + if (!targetFile.getParentFile().exists()) { + targetFile.getParentFile().mkdirs(); + } + + stamp = new PdfStamper(reader, new FileOutputStream(targetFile)); + Image img = Image.getInstance(imgPath); + + for (int i = 1; i <= reader.getNumberOfPages(); i++) { + + PdfContentByte over = stamp.getOverContent(i); + img.setAbsolutePosition(x, y); + + img.setRotationDegrees(r); + + over.addImage(img); + } + stamp.close(); + reader.close(); + System.out.println("**********PDF完成添加图片水印工作**********"); + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException(e); + } + } + + + + + + + + + + + + + + + + public static void pressImageWater(String srcPath, String targetPath, String imgPath, String position, Integer left, Integer top) { + PdfReader reader = null; + PdfStamper stamp = null; + + try { + reader = new PdfReader(srcPath); + + File targetFile = new File(targetPath); + if (!targetFile.getParentFile().exists()) { + targetFile.getParentFile().mkdirs(); + } + + stamp = new PdfStamper(reader, new FileOutputStream(targetFile)); + Image img = Image.getInstance(imgPath); + + for (int i = 1; i <= reader.getNumberOfPages(); i++) { + + PdfContentByte over = stamp.getOverContent(i); + + Rectangle pageSize = reader.getPageSize(i); + int srcWth = (int)pageSize.getWidth(); + int srcHht = (int)pageSize.getHeight(); + int imgWth = (int)img.getWidth(); + int imgHht = (int)img.getHeight(); + + int x = left.intValue(); + int y = top.intValue(); + if (x == 0 && y == 0) { + switch (position) { + case "topLeft": + x = 0; + y = srcHht - imgHht; + break; + case "topCenter": + x = (srcWth - imgWth) / 2; + y = srcHht - imgHht; + break; + case "topRight": + x = srcWth - imgWth; + y = srcHht - imgHht; + break; + case "center": + x = (srcWth - imgWth) / 2; + y = (srcHht - imgHht) / 2; + break; + case "centerLeft": + x = 0; + y = (srcHht - imgHht) / 2; + break; + case "centerRight": + x = srcWth - imgWth; + y = (srcHht - imgHht) / 2; + break; + case "bottomLeft": + x = 0; + y = 0; + break; + case "bottomRight": + x = srcWth - imgWth; + y = 0; + break; + case "bottomCenter": + x = (srcWth - imgWth) / 2; + y = 0; + break; + default: + x = srcWth - imgWth; + y = 0; + break; + } + } + img.setAbsolutePosition(x, y); + + over.addImage(img); + } + stamp.close(); + reader.close(); + System.out.println("**********PDF完成添加文字水印工作**********"); + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException(e); + } + } + + + + + + + public static void main(String[] args) { + String iconPath = "C:\\Users\\18291\\Desktop\\watermark\\watermark2.png"; + String srcPdfPath = "C:\\Users\\18291\\Desktop\\watermark\\0101-2001-长期-办公室-0005.pdf"; + String outPdfPath = "C:\\Users\\18291\\Desktop\\watermark\\1\\2\\w3.pdf"; + String contont = "Font类是用于设置图形用户界面上的字体样式"; + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\PdfWaterMarkUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/SqlLiteUtil.java b/src/main/java/com/archive/common/archiveUtil/SqlLiteUtil.java new file mode 100644 index 0000000..659a04d --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/SqlLiteUtil.java @@ -0,0 +1,192 @@ + package com.archive.common.archiveUtil; + + import com.archive.common.archiveUtil.TableUtil; + import com.archive.project.common.service.IExecuteSqlService; + import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; + import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; + import java.util.List; + import javax.annotation.PostConstruct; + import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Component; + + + + + + + + + + + + + + + @Component + public class SqlLiteUtil + { + @Autowired + private IExecuteSqlService executeSqlService; + @Autowired + private IPhysicalTableColumnService physicalTableColumnService; + private static IExecuteSqlService UtilExecuteSqlService; + private static IPhysicalTableColumnService UtilPhysicalTableColumnService; + + @PostConstruct + private void initialize() { + UtilExecuteSqlService = this.executeSqlService; + UtilPhysicalTableColumnService = this.physicalTableColumnService; + } + + + + + + + + + + public static boolean updateColumnType(String tableName, String columnType, String columnName, String mrz) throws Exception { + boolean res = true; + + String newTableName = tableName + "_resect"; + String createSql = "CREATE TABLE " + newTableName + " ( id INTEGER PRIMARY KEY AUTOINCREMENT,"; + + String tableId = TableUtil.getTableId(tableName); + PhysicalTableColumn ptc = new PhysicalTableColumn(); + ptc.setTableId(Long.valueOf(Long.parseLong(tableId))); + List ptcList = UtilPhysicalTableColumnService.selectPhysicalTableColumnList(ptc); + String columns = "id,"; + for (int i = 0; i < ptcList.size(); i++) { + String type = "TEXT"; + if (i == ptcList.size() - 1) { + columns = columns + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode(); + } else { + columns = columns + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + ","; + } + + + if (((PhysicalTableColumn)ptcList.get(i)).getColumnType().equals("C")) + { + type = "INTEGER"; + } + + if (((PhysicalTableColumn)ptcList.get(i)).getColumnCode().equals(columnName)) { + if (i == ptcList.size() - 1) { + + if (mrz != null && !mrz.trim().equals("")) { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + columnType + " DEFAULT " + mrz; + } else { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + columnType; + } + + } else if (mrz != null && !mrz.trim().equals("")) { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + columnType + " DEFAULT " + mrz + " ,"; + } else { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + columnType + ","; + } + + } else { + + String otherColumnMrz = ((PhysicalTableColumn)ptcList.get(i)).getMrz(); + if (i == ptcList.size() - 1) { + if (otherColumnMrz != null && !otherColumnMrz.trim().equals("")) { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + " DEFAULT " + otherColumnMrz; + } else { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type; + } + + } else if (otherColumnMrz != null && !otherColumnMrz.trim().equals("")) { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + " DEFAULT " + otherColumnMrz + ","; + } else { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + ","; + } + } + } + + createSql = createSql + ") "; + UtilExecuteSqlService.jdbcTemplateExecute(createSql); + + String sql = "insert into " + newTableName + " select " + columns + " from " + tableName + ""; + UtilExecuteSqlService.jdbcTemplateExecute(sql); + + String dropSql = "DROP TABLE " + tableName; + UtilExecuteSqlService.jdbcTemplateExecute(dropSql); + + String updateTableNameSql = "ALTER TABLE " + newTableName + " RENAME TO " + tableName + ""; + UtilExecuteSqlService.jdbcTemplateExecute(updateTableNameSql); + return res; + } + + + + + + + + + public static boolean deleteColumn(String tableName, String columnName) throws Exception { + boolean res = true; + + String newTableName = tableName + "_resect"; + String createSql = "CREATE TABLE " + newTableName + " ( id INTEGER PRIMARY KEY AUTOINCREMENT,"; + + String tableId = TableUtil.getTableId(tableName); + PhysicalTableColumn ptc = new PhysicalTableColumn(); + ptc.setTableId(Long.valueOf(Long.parseLong(tableId))); + List ptcList = UtilPhysicalTableColumnService.selectPhysicalTableColumnList(ptc); + String columns = "id,"; + for (int i = 0; i < ptcList.size(); i++) { + String type = "TEXT"; + + if (((PhysicalTableColumn)ptcList.get(i)).getColumnType().equals("C")) + { + type = "INTEGER"; + } + if (((PhysicalTableColumn)ptcList.get(i)).getColumnCode().equals(columnName)) { + System.out.println("此字段删除:" + columnName); + } else { + String otherColumnMrz = ((PhysicalTableColumn)ptcList.get(i)).getMrz(); + if (i == ptcList.size() - 1) { + if (otherColumnMrz != null && !otherColumnMrz.trim().equals("")) { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + " DEFAULT " + otherColumnMrz; + } else { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type; + } + columns = columns + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode(); + } else { + if (otherColumnMrz != null && !otherColumnMrz.trim().equals("")) { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + " DEFAULT " + otherColumnMrz + ","; + } else { + createSql = createSql + " " + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + " " + type + ","; + } + columns = columns + ((PhysicalTableColumn)ptcList.get(i)).getColumnCode() + ","; + } + } + } + if (createSql.substring(createSql.length() - 1).equals(",")) { + createSql = createSql.substring(0, createSql.length() - 1); + } + createSql = createSql + ") "; + UtilExecuteSqlService.jdbcTemplateExecute(createSql); + + if (columns.substring(columns.length() - 1).equals(",")) { + columns = columns.substring(0, columns.length() - 1); + } + String sql = "insert into " + newTableName + " select " + columns + " from " + tableName + ""; + UtilExecuteSqlService.jdbcTemplateExecute(sql); + + String dropSql = "DROP TABLE " + tableName; + UtilExecuteSqlService.jdbcTemplateExecute(dropSql); + + String updateTableNameSql = "ALTER TABLE " + newTableName + " RENAME TO " + tableName + ""; + UtilExecuteSqlService.jdbcTemplateExecute(updateTableNameSql); + return res; + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\SqlLiteUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/TableUtil.java b/src/main/java/com/archive/common/archiveUtil/TableUtil.java new file mode 100644 index 0000000..aa64c7e --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/TableUtil.java @@ -0,0 +1,139 @@ + package com.archive.common.archiveUtil; + + import com.archive.project.dasz.archivetype.domain.ArchiveType; + import com.archive.project.dasz.archivetype.service.IArchiveTypeService; + import com.archive.project.dasz.physicaltable.domain.PhysicalTable; + import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; + import java.util.List; + import javax.annotation.PostConstruct; + import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Component; + + + + + + + + + + + + + + + @Component + public class TableUtil + { + @Autowired + private IPhysicalTableService service; + private static IPhysicalTableService physicalTableService; + @Autowired + private IArchiveTypeService archiveTypeservice; + private static IArchiveTypeService archiveTypeService1; + + @PostConstruct + public void init() { + physicalTableService = this.service; + archiveTypeService1 = this.archiveTypeservice; + } + + + + + + + + + + + public static String getTableId(String tableName) { + PhysicalTable physicalTable = new PhysicalTable(); + physicalTable.setTablename(tableName.toLowerCase()); + List list = physicalTableService.selectPhysicalTableList(physicalTable); + if (list != null && list.size() > 0) { + return String.valueOf(((PhysicalTable)list.get(0)).getId()); + } + return ""; + } + + + + + + + + + + + + public static String getTableName(Long tableId) { + PhysicalTable physicalTable = physicalTableService.selectPhysicalTableById(tableId); + if (physicalTable != null) { + return physicalTable.getTablename(); + } + return ""; + } + + + + + + + + public static long getTableIdByArchiveTypeId(long archiveTypeId) { + long tableId = 0L; + ArchiveType ArchiveType = archiveTypeService1.selectArchiveTypeById(Long.valueOf(archiveTypeId)); + String archiveCode = ArchiveType.getArhciveCode(); + String archiveType = ArchiveType.getType(); + String tableName = ""; + if (archiveType.toLowerCase().equals("file")) { + tableName = "t_ar_" + archiveCode + "_file"; + } else if (archiveType.toLowerCase().equals("folder")) { + tableName = "t_ar_" + archiveCode + "_folder"; + } + if (!tableName.equals("")) { + PhysicalTable pt = new PhysicalTable(); + pt.setTablename(tableName.toLowerCase()); + List pts = physicalTableService.selectPhysicalTableList(pt); + if (pts.size() > 0 && pts.get(0) != null) { + tableId = ((PhysicalTable)pts.get(0)).getId().longValue(); + } + } + return tableId; + } + + + + + + + public static long getArchiveTypeIdByTableId(long tableId) { + long ArchiveTypeId = 0L; + String tableName = getTableName(Long.valueOf(tableId)); + String archiveCode = tableName.substring(5, tableName.lastIndexOf("_")); + ArchiveType ac = new ArchiveType(); + ac.setArhciveCode(archiveCode.toUpperCase()); + List list = archiveTypeService1.selectArchiveTypeList(ac); + if (list != null && list.get(0) != null) { + ArchiveTypeId = ((ArchiveType)list.get(0)).getId().longValue(); + } + return ArchiveTypeId; + } + + + + + + public static List getAllArchiveType() { + ArchiveType ac = new ArchiveType(); + List list = archiveTypeService1.selectArchiveTypeList(ac); + return list; + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\TableUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/archiveUtil/ZipUtil.java b/src/main/java/com/archive/common/archiveUtil/ZipUtil.java new file mode 100644 index 0000000..52b2875 --- /dev/null +++ b/src/main/java/com/archive/common/archiveUtil/ZipUtil.java @@ -0,0 +1,124 @@ + package com.archive.common.archiveUtil; + + import java.io.File; + import java.io.FileOutputStream; + import java.io.IOException; + import java.io.InputStream; + import java.nio.charset.Charset; + import java.util.Enumeration; + import java.util.zip.ZipEntry; + import java.util.zip.ZipFile; + + + + + + + + + + + + + + + + public class ZipUtil + { + public static void unZip(File srcFile, String destDirPath) throws RuntimeException { + long start = System.currentTimeMillis(); + + + + if (!srcFile.exists()) { + throw new RuntimeException(srcFile.getPath() + "所指文件不存在"); + } + + + + + ZipFile zipFile = null; + + + try { + zipFile = new ZipFile(srcFile, Charset.forName("GBK")); + + Enumeration entries = zipFile.entries(); + + while (entries.hasMoreElements()) { + ZipEntry entry = (ZipEntry)entries.nextElement(); + + System.out.println("解压" + entry.getName()); + + + + if (entry.isDirectory()) { + String dirPath = destDirPath + "/" + entry.getName(); + + File dir = new File(dirPath); + + dir.mkdirs(); + + continue; + } + + File targetFile = new File(destDirPath + "/" + entry.getName()); + + + + if (!targetFile.getParentFile().exists()) { + targetFile.getParentFile().mkdirs(); + } + + + targetFile.createNewFile(); + + + + InputStream is = zipFile.getInputStream(entry); + + FileOutputStream fos = new FileOutputStream(targetFile); + + + + byte[] buf = new byte[4096]; + int len; + while ((len = is.read(buf)) != -1) { + fos.write(buf, 0, len); + } + + + + + fos.close(); + + is.close(); + } + + + + + long end = System.currentTimeMillis(); + + System.out.println("解压完成,耗时:" + (end - start) + " ms"); + } + catch (Exception e) { + throw new RuntimeException("unzip error from ZipUtils", e); + } finally { + + if (zipFile != null) + try { + zipFile.close(); + } + catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\ZipUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/constant/CommonMap.java b/src/main/java/com/archive/common/constant/CommonMap.java new file mode 100644 index 0000000..eb434b7 --- /dev/null +++ b/src/main/java/com/archive/common/constant/CommonMap.java @@ -0,0 +1,55 @@ + package com.archive.common.constant; + + import java.util.HashMap; + import java.util.Map; + + + + + + + + public class CommonMap + { + public static Map javaTypeMap = new HashMap<>(); + + + static { + initJavaTypeMap(); + } + + + + + + public static void initJavaTypeMap() { + javaTypeMap.put("tinyint", "Integer"); + javaTypeMap.put("smallint", "Integer"); + javaTypeMap.put("mediumint", "Integer"); + javaTypeMap.put("int", "Integer"); + javaTypeMap.put("number", "Integer"); + javaTypeMap.put("integer", "integer"); + javaTypeMap.put("bigint", "Long"); + javaTypeMap.put("float", "Float"); + javaTypeMap.put("double", "Double"); + javaTypeMap.put("decimal", "BigDecimal"); + javaTypeMap.put("bit", "Boolean"); + javaTypeMap.put("char", "String"); + javaTypeMap.put("varchar", "String"); + javaTypeMap.put("varchar2", "String"); + javaTypeMap.put("tinytext", "String"); + javaTypeMap.put("text", "String"); + javaTypeMap.put("mediumtext", "String"); + javaTypeMap.put("longtext", "String"); + javaTypeMap.put("time", "Date"); + javaTypeMap.put("date", "Date"); + javaTypeMap.put("datetime", "Date"); + javaTypeMap.put("timestamp", "Date"); + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\CommonMap.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/constant/Constants.java b/src/main/java/com/archive/common/constant/Constants.java new file mode 100644 index 0000000..db048f1 --- /dev/null +++ b/src/main/java/com/archive/common/constant/Constants.java @@ -0,0 +1,49 @@ +package com.archive.common.constant; + +public class Constants { + public static final String UTF8 = "UTF-8"; + + public static final String GBK = "GBK"; + + public static final String SUCCESS = "0"; + + public static final String FAIL = "1"; + + public static final String LOGIN_SUCCESS = "Success"; + + public static final String LOGOUT = "Logout"; + + public static final String REGISTER = "Register"; + + public static final String LOGIN_FAIL = "Error"; + + public static final String PAGE_NUM = "pageNum"; + + public static final String PAGE_SIZE = "pageSize"; + + public static final String ORDER_BY_COLUMN = "orderByColumn"; + + public static final String IS_ASC = "isAsc"; + + public static final String SYS_AUTH_CACHE = "sys-authCache"; + + public static final String SYS_CONFIG_CACHE = "sys-config"; + + public static final String SYS_CONFIG_KEY = "sys_config:"; + + public static final String SYS_DICT_CACHE = "sys-dict"; + + public static final String SYS_DICT_KEY = "sys_dict:"; + + public static final String RESOURCE_PREFIX = "/profile"; + + public static final String DATABASE_TYPE_MYSQL = "mysql"; + + public static final String DATABASE_TYPE_SQLITE = "sqlite"; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\Constants.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/constant/GenConstants.java b/src/main/java/com/archive/common/constant/GenConstants.java new file mode 100644 index 0000000..ae28476 --- /dev/null +++ b/src/main/java/com/archive/common/constant/GenConstants.java @@ -0,0 +1,85 @@ +/* */ package com.archive.common.constant; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class GenConstants +/* */ { +/* */ public static final String TPL_CRUD = "crud"; +/* */ public static final String TPL_TREE = "tree"; +/* */ public static final String TPL_SUB = "sub"; +/* */ public static final String TREE_CODE = "treeCode"; +/* */ public static final String TREE_PARENT_CODE = "treeParentCode"; +/* */ public static final String TREE_NAME = "treeName"; +/* */ public static final String PARENT_MENU_ID = "parentMenuId"; +/* */ public static final String PARENT_MENU_NAME = "parentMenuName"; +/* 35 */ public static final String[] COLUMNTYPE_STR = new String[] { "char", "varchar", "nvarchar", "varchar2" }; +/* */ +/* */ +/* 38 */ public static final String[] COLUMNTYPE_TEXT = new String[] { "tinytext", "text", "mediumtext", "longtext" }; +/* */ +/* */ +/* 41 */ public static final String[] COLUMNTYPE_TIME = new String[] { "datetime", "time", "date", "timestamp" }; +/* */ +/* */ +/* 44 */ public static final String[] COLUMNTYPE_NUMBER = new String[] { "tinyint", "smallint", "mediumint", "int", "number", "integer", "bit", "bigint", "float", "double", "decimal" }; +/* */ +/* */ +/* */ +/* 48 */ public static final String[] COLUMNNAME_NOT_EDIT = new String[] { "id", "create_by", "create_time", "del_flag" }; +/* */ +/* */ +/* 51 */ public static final String[] COLUMNNAME_NOT_LIST = new String[] { "id", "create_by", "create_time", "del_flag", "update_by", "update_time" }; +/* */ +/* */ +/* */ +/* 55 */ public static final String[] COLUMNNAME_NOT_QUERY = new String[] { "id", "create_by", "create_time", "del_flag", "update_by", "update_time", "remark" }; +/* */ +/* */ +/* */ +/* 59 */ public static final String[] BASE_ENTITY = new String[] { "createBy", "createTime", "updateBy", "updateTime", "remark" }; +/* */ +/* */ +/* 62 */ public static final String[] TREE_ENTITY = new String[] { "parentName", "parentId", "orderNum", "ancestors" }; +/* */ public static final String HTML_INPUT = "input"; +/* */ public static final String HTML_TEXTAREA = "textarea"; +/* */ public static final String HTML_SELECT = "select"; +/* */ public static final String HTML_RADIO = "radio"; +/* */ public static final String HTML_CHECKBOX = "checkbox"; +/* */ public static final String HTML_DATETIME = "datetime"; +/* */ public static final String HTML_UPLOAD = "upload"; +/* */ public static final String HTML_SUMMERNOTE = "summernote"; +/* */ public static final String TYPE_STRING = "String"; +/* */ public static final String TYPE_INTEGER = "Integer"; +/* */ public static final String TYPE_LONG = "Long"; +/* */ public static final String TYPE_DOUBLE = "Double"; +/* */ public static final String TYPE_BIGDECIMAL = "BigDecimal"; +/* */ public static final String TYPE_DATE = "Date"; +/* */ public static final String QUERY_LIKE = "LIKE"; +/* */ public static final String REQUIRE = "1"; +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\GenConstants.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/constant/PermissionConstants.java b/src/main/java/com/archive/common/constant/PermissionConstants.java new file mode 100644 index 0000000..1fe46b1 --- /dev/null +++ b/src/main/java/com/archive/common/constant/PermissionConstants.java @@ -0,0 +1,21 @@ +package com.archive.common.constant; + +public class PermissionConstants { + public static final String ADD_PERMISSION = "add"; + + public static final String EDIT_PERMISSION = "edit"; + + public static final String REMOVE_PERMISSION = "remove"; + + public static final String EXPORT_PERMISSION = "export"; + + public static final String VIEW_PERMISSION = "view"; + + public static final String LIST_PERMISSION = "list"; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\PermissionConstants.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/constant/ScheduleConstants.java b/src/main/java/com/archive/common/constant/ScheduleConstants.java new file mode 100644 index 0000000..94d4cfd --- /dev/null +++ b/src/main/java/com/archive/common/constant/ScheduleConstants.java @@ -0,0 +1,21 @@ +package com.archive.common.constant; + +public class ScheduleConstants { + public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME"; + + public static final String TASK_PROPERTIES = "TASK_PROPERTIES"; + + public static final String MISFIRE_DEFAULT = "0"; + + public static final String MISFIRE_IGNORE_MISFIRES = "1"; + + public static final String MISFIRE_FIRE_AND_PROCEED = "2"; + + public static final String MISFIRE_DO_NOTHING = "3"; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\ScheduleConstants.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/constant/ShiroConstants.java b/src/main/java/com/archive/common/constant/ShiroConstants.java new file mode 100644 index 0000000..28ea38c --- /dev/null +++ b/src/main/java/com/archive/common/constant/ShiroConstants.java @@ -0,0 +1,37 @@ +package com.archive.common.constant; + +public class ShiroConstants { + public static final String CURRENT_USER = "currentUser"; + + public static final String CURRENT_USERNAME = "username"; + + public static final String LOCK_SCREEN = "lockscreen"; + + public static final String MESSAGE = "message"; + + public static final String ERROR = "errorMsg"; + + public static final String ENCODING = "UTF-8"; + + public static final String ONLINE_SESSION = "online_session"; + + public static final String CURRENT_CAPTCHA = "captcha"; + + public static final String CURRENT_ENABLED = "captchaEnabled"; + + public static final String CURRENT_TYPE = "captchaType"; + + public static final String CURRENT_VALIDATECODE = "validateCode"; + + public static final String CAPTCHA_ERROR = "captchaError"; + + public static final String LOGINRECORDCACHE = "loginRecordCache"; + + public static final String SYS_USERCACHE = "sys-userCache"; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\ShiroConstants.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/constant/Status.java b/src/main/java/com/archive/common/constant/Status.java new file mode 100644 index 0000000..2db6e03 --- /dev/null +++ b/src/main/java/com/archive/common/constant/Status.java @@ -0,0 +1,55 @@ + package com.archive.common.constant; + + import com.archive.common.constant.ScheduleConstants; + + + + + + + + + + + + + + + + + + + + + + + + + + + public enum Status + { + NORMAL("0"), + + + + PAUSE("1"); + + private String value; + + + Status(String value) { + this.value = value; + } + + + public String getValue() { + return this.value; + } + } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\ScheduleConstants$Status.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/constant/UserConstants.java b/src/main/java/com/archive/common/constant/UserConstants.java new file mode 100644 index 0000000..5b4a2eb --- /dev/null +++ b/src/main/java/com/archive/common/constant/UserConstants.java @@ -0,0 +1,85 @@ +package com.archive.common.constant; + +public class UserConstants { + public static final String NORMAL = "0"; + + public static final String EXCEPTION = "1"; + + public static final String USER_DISABLE = "1"; + + public static final String ROLE_DISABLE = "1"; + + public static final String DEPT_NORMAL = "0"; + + public static final String DEPT_DISABLE = "1"; + + public static final String DICT_NORMAL = "0"; + + public static final String YES = "Y"; + + public static final int USERNAME_MIN_LENGTH = 2; + + public static final int USERNAME_MAX_LENGTH = 20; + + public static final String USER_NAME_UNIQUE = "0"; + + public static final String USER_NAME_NOT_UNIQUE = "1"; + + public static final String USER_PHONE_UNIQUE = "0"; + + public static final String USER_PHONE_NOT_UNIQUE = "1"; + + public static final String USER_EMAIL_UNIQUE = "0"; + + public static final String USER_EMAIL_NOT_UNIQUE = "1"; + + public static final String DEPT_NAME_UNIQUE = "0"; + + public static final String DEPT_NAME_NOT_UNIQUE = "1"; + + public static final String ROLE_NAME_UNIQUE = "0"; + + public static final String ROLE_NAME_NOT_UNIQUE = "1"; + + public static final String POST_NAME_UNIQUE = "0"; + + public static final String POST_NAME_NOT_UNIQUE = "1"; + + public static final String ROLE_KEY_UNIQUE = "0"; + + public static final String ROLE_KEY_NOT_UNIQUE = "1"; + + public static final String POST_CODE_UNIQUE = "0"; + + public static final String POST_CODE_NOT_UNIQUE = "1"; + + public static final String MENU_NAME_UNIQUE = "0"; + + public static final String MENU_NAME_NOT_UNIQUE = "1"; + + public static final String DICT_TYPE_UNIQUE = "0"; + + public static final String DICT_TYPE_NOT_UNIQUE = "1"; + + public static final String CONFIG_KEY_UNIQUE = "0"; + + public static final String CONFIG_KEY_NOT_UNIQUE = "1"; + + public static final int PASSWORD_MIN_LENGTH = 5; + + public static final int PASSWORD_MAX_LENGTH = 20; + + public static final String SYSTEM_USER_TYPE = "00"; + + public static final String REGISTER_USER_TYPE = "01"; + + public static final String MOBILE_PHONE_NUMBER_PATTERN = "^0{0,1}(13[0-9]|15[0-9]|14[0-9]|18[0-9])[0-9]{8}$"; + + public static final String EMAIL_PATTERN = "^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?"; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\constant\UserConstants.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/convert/ExcelToPdf.java b/src/main/java/com/archive/common/convert/ExcelToPdf.java new file mode 100644 index 0000000..713af5c --- /dev/null +++ b/src/main/java/com/archive/common/convert/ExcelToPdf.java @@ -0,0 +1,149 @@ +/* */ package com.archive.common.convert; +/* */ +/* */ import com.aspose.cells.IndividualFontConfigs; +/* */ import com.aspose.cells.License; +/* */ import com.aspose.cells.LoadOptions; +/* */ import com.aspose.cells.PdfSaveOptions; +/* */ import com.aspose.cells.SaveOptions; +/* */ import com.aspose.cells.Workbook; +/* */ import java.io.ByteArrayInputStream; +/* */ import java.io.FileOutputStream; +/* */ import java.io.InputStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ExcelToPdf +/* */ { +/* */ public static void main(String[] args) { +/* 20 */ excel2pdf("D:\\temp\\1.xls", "D:\\temp\\31.pdf"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean getLicense() { +/* 27 */ boolean result = false; +/* */ try { +/* 29 */ String license = "\r\n \r\n \r\n Aspose.Total for Java\r\n Aspose.Words for Java\r\n \r\n Enterprise\r\n 20991231\r\n 20991231\r\n 8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7\r\n \r\n sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=\r\n"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 43 */ InputStream is = new ByteArrayInputStream(license.getBytes("UTF-8")); +/* 44 */ License aposeLic = new License(); +/* 45 */ aposeLic.setLicense(is); +/* 46 */ result = true; +/* 47 */ } catch (Exception e) { +/* 48 */ e.printStackTrace(); +/* */ } +/* 50 */ return result; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void excel2pdf(String sourceFilePath, String desFilePathd) { +/* 60 */ if (!getLicense()) { +/* */ return; +/* */ } +/* */ try { +/* 64 */ if (isLinux()) { +/* 65 */ IndividualFontConfigs configs = new IndividualFontConfigs(); +/* 66 */ configs.setFontFolder("/usr/share/fonts/chinese", true); +/* 67 */ LoadOptions loadOptions = new LoadOptions(); +/* 68 */ loadOptions.setFontConfigs(configs); +/* */ } +/* */ +/* */ +/* */ +/* 73 */ Workbook wb = new Workbook(sourceFilePath); +/* */ +/* 75 */ FileOutputStream fileOS = new FileOutputStream(desFilePathd); +/* 76 */ PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); +/* 77 */ pdfSaveOptions.setOnePagePerSheet(true); +/* 78 */ int[] autoDrawSheets = { 3 }; +/* */ +/* 80 */ autoDraw(wb, autoDrawSheets); +/* 81 */ int[] showSheets = { 0 }; +/* */ +/* 83 */ printSheetPage(wb, showSheets); +/* 84 */ wb.save(fileOS, (SaveOptions)pdfSaveOptions); +/* 85 */ fileOS.flush(); +/* 86 */ fileOS.close(); +/* */ } +/* 88 */ catch (Exception e) { +/* 89 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void autoDraw(Workbook wb, int[] page) { +/* 99 */ if (null != page && page.length > 0) { +/* 100 */ for (int i = 0; i < page.length; i++) { +/* 101 */ wb.getWorksheets().get(i).getHorizontalPageBreaks().clear(); +/* 102 */ wb.getWorksheets().get(i).getVerticalPageBreaks().clear(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void printSheetPage(Workbook wb, int[] page) { +/* */ int i; +/* 114 */ for (i = 1; i < wb.getWorksheets().getCount(); i++) { +/* 115 */ wb.getWorksheets().get(i).setVisible(false); +/* */ } +/* 117 */ if (null == page || page.length == 0) { +/* 118 */ wb.getWorksheets().get(0).setVisible(true); +/* */ } else { +/* 120 */ for (i = 0; i < page.length; i++) { +/* 121 */ wb.getWorksheets().get(i).setVisible(true); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ public static boolean isLinux() { +/* 128 */ return System.getProperty("os.name").toLowerCase().contains("linux"); +/* */ } +/* */ +/* */ public static boolean isWindows() { +/* 132 */ return System.getProperty("os.name").toLowerCase().contains("windows"); +/* */ } +/* */ +/* */ public String JudgeSystem() { +/* 136 */ if (isLinux()) +/* 137 */ return "linux"; +/* 138 */ if (isWindows()) { +/* 139 */ return "windows"; +/* */ } +/* 141 */ return "other system"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\convert\ExcelToPdf.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/convert/HtmlToPdf.java b/src/main/java/com/archive/common/convert/HtmlToPdf.java new file mode 100644 index 0000000..9fbd31c --- /dev/null +++ b/src/main/java/com/archive/common/convert/HtmlToPdf.java @@ -0,0 +1,56 @@ +/* */ package com.archive.common.convert; + +/* */ +/* */ import java.io.File; +/* */ import java.io.FileOutputStream; +/* */ import java.io.OutputStream; +/* */ import org.xhtmlrenderer.pdf.ITextFontResolver; +/* */ import org.xhtmlrenderer.pdf.ITextRenderer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class HtmlToPdf +/* */ { +/* */ public static void html2pdf(String htmlFile, String pdfFile) throws Exception { +/* 21 */ String url = (new File(htmlFile)).toURI().toURL().toString(); +/* 22 */ System.out.println(url); +/* */ +/* 24 */ OutputStream os = new FileOutputStream(pdfFile); +/* 25 */ ITextRenderer renderer = new ITextRenderer(); +/* 26 */ renderer.setDocument(url); +/* */ +/* */ +/* 29 */ ITextFontResolver fontResolver = renderer.getFontResolver(); +/* 30 */ if ("linux".equals(getCurrentOperatingSystem())) { +/* 31 */ fontResolver.addFont("/usr/share/fonts/chiness/simsun.ttc", "Identity-H", true); +/* */ } else { +/* 33 */ fontResolver.addFont("c:/Windows/Fonts/simsun.ttc", "Identity-H", false); +/* */ } +/* */ +/* 36 */ renderer.layout(); +/* 37 */ renderer.createPDF(os); +/* 38 */ os.close(); +/* */ +/* 40 */ System.out.println("create pdf done!!"); +/* */ } +/* */ +/* */ +/* */ public static String getCurrentOperatingSystem() { +/* 45 */ String os = System.getProperty("os.name").toLowerCase(); +/* 46 */ System.out.println("---------当前操作系统是-----------" + os); +/* 47 */ return os; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\convert\HtmlToPdf.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/convert/ImgConvert.java b/src/main/java/com/archive/common/convert/ImgConvert.java new file mode 100644 index 0000000..3080f0d --- /dev/null +++ b/src/main/java/com/archive/common/convert/ImgConvert.java @@ -0,0 +1,396 @@ +/* */ package com.archive.common.convert; + + +/* */ +/* */ import com.lowagie.text.Document; +/* */ import com.lowagie.text.Element; +/* */ import com.lowagie.text.Image; +/* */ import com.lowagie.text.Rectangle; +/* */ import com.lowagie.text.pdf.PdfWriter; +/* */ import java.awt.AlphaComposite; +/* */ import java.awt.Color; +/* */ import java.awt.Font; +/* */ import java.awt.Graphics; +/* */ import java.awt.Graphics2D; +/* */ import java.awt.Image; +/* */ import java.awt.RenderingHints; +/* */ import java.awt.image.BufferedImage; +/* */ import java.io.File; +/* */ import java.io.FileOutputStream; +/* */ import java.io.IOException; +/* */ import java.text.DecimalFormat; +/* */ import java.util.ArrayList; +/* */ import java.util.Arrays; +/* */ import javax.imageio.ImageIO; +/* */ import javax.swing.ImageIcon; +/* */ +/* */ public class ImgConvert +/* */ { +/* */ public static void ImagesToPdf(String imageFolderPath, String pdfPath) { +/* */ try { +/* 29 */ long start = System.currentTimeMillis(); +/* 30 */ ArrayList list = new ArrayList<>(); +/* */ +/* 32 */ String imagePath = null; +/* 33 */ FileOutputStream fos = new FileOutputStream(pdfPath); +/* */ +/* 35 */ Document doc = new Document(null, 20.0F, 20.0F, 20.0F, 20.0F); +/* */ +/* 37 */ PdfWriter.getInstance(doc, fos); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 43 */ File file = new File(imageFolderPath); +/* 44 */ File[] files = file.listFiles(); +/* */ +/* 46 */ for (File file1 : files) { +/* 47 */ if (file1.getName().endsWith(".png") || file1.getName().endsWith(".jpg") || file1.getName().endsWith(".gif") || file1 +/* 48 */ .getName().endsWith(".jpeg") || file1.getName().endsWith(".tif")) { +/* 49 */ imagePath = imageFolderPath + File.separator + file1.getName(); +/* 50 */ list.add(file1.getName()); +/* */ +/* 52 */ BufferedImage img = ImageIO.read(new File(imagePath)); +/* */ +/* 54 */ doc.setPageSize(new Rectangle(img.getWidth(), img.getHeight())); +/* */ +/* 56 */ Image image = Image.getInstance(imagePath); +/* */ +/* 58 */ doc.open(); +/* 59 */ doc.add((Element)image); +/* */ } +/* */ } +/* */ +/* */ +/* 64 */ doc.close(); +/* 65 */ long endTime = System.currentTimeMillis(); +/* 66 */ int time = (int)((endTime - start) / 1000L); +/* 67 */ System.out.println("用时:{" + time + "}:秒!"); +/* 68 */ } catch (Exception e) { +/* 69 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void ImgToPdf(String imagePath, String pdfPath) { +/* */ try { +/* 81 */ long start = System.currentTimeMillis(); +/* 82 */ ArrayList list = new ArrayList<>(); +/* */ +/* */ +/* 85 */ FileOutputStream fos = new FileOutputStream(pdfPath); +/* */ +/* 87 */ Document doc = new Document(null, 20.0F, 20.0F, 20.0F, 20.0F); +/* */ +/* 89 */ PdfWriter.getInstance(doc, fos); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 95 */ BufferedImage img = ImageIO.read(new File(imagePath)); +/* */ +/* 97 */ doc.setPageSize(new Rectangle(img.getWidth(), img.getHeight())); +/* */ +/* 99 */ Image image = Image.getInstance(imagePath); +/* */ +/* 101 */ doc.open(); +/* 102 */ doc.add((Element)image); +/* */ +/* */ +/* */ +/* 106 */ doc.close(); +/* 107 */ long endTime = System.currentTimeMillis(); +/* 108 */ int time = (int)((endTime - start) / 1000L); +/* 109 */ System.out.println("用时:{" + time + "}:秒!"); +/* 110 */ } catch (Exception e) { +/* 111 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void PngToJpg(String pngPath, String jpgPath) { +/* */ try { +/* 125 */ BufferedImage bufferedImage = ImageIO.read(new File(pngPath)); +/* 126 */ BufferedImage newBufferedImage = new BufferedImage(bufferedImage.getWidth(), bufferedImage.getHeight(), 1); +/* 127 */ newBufferedImage.createGraphics().drawImage(bufferedImage, 0, 0, Color.white, null); +/* 128 */ ImageIO.write(newBufferedImage, "jpg", new File(jpgPath)); +/* 129 */ } catch (Exception e) { +/* 130 */ System.out.println("ERROR:png转jpg出现异常:" + e.getMessage()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void JpgToPng(String jpgPath, String pngPath) { +/* */ try { +/* 144 */ BufferedImage bufferedImage = ImageIO.read(new File(jpgPath)); +/* 145 */ BufferedImage newBufferedImage = new BufferedImage(bufferedImage.getWidth(), bufferedImage.getHeight(), 1); +/* 146 */ newBufferedImage.createGraphics().drawImage(bufferedImage, 0, 0, Color.white, null); +/* 147 */ ImageIO.write(newBufferedImage, "png", new File(pngPath)); +/* 148 */ } catch (Exception e) { +/* 149 */ System.out.println("ERROR:jpg转png出现异常:" + e.getMessage()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static BufferedImage waterMarkByText(int width, int heigth, String text, Color color, Font font, Double degree, float alpha) { +/* 167 */ BufferedImage buffImg = new BufferedImage(width, heigth, 1); +/* */ +/* 169 */ Graphics2D g2d = buffImg.createGraphics(); +/* */ +/* */ +/* 172 */ buffImg = g2d.getDeviceConfiguration().createCompatibleImage(width, heigth, 3); +/* 173 */ g2d.dispose(); +/* 174 */ g2d = buffImg.createGraphics(); +/* */ +/* */ +/* */ +/* 178 */ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 186 */ if (null != degree) +/* */ { +/* */ +/* 189 */ g2d.rotate(Math.toRadians(degree.doubleValue()), buffImg.getWidth() / 2.0D, buffImg +/* 190 */ .getHeight() / 2.0D); +/* */ } +/* */ +/* */ +/* 194 */ g2d.setColor(color); +/* */ +/* */ +/* 197 */ g2d.setFont(font); +/* */ +/* */ +/* 200 */ g2d.setComposite(AlphaComposite.getInstance(3, alpha)); +/* */ +/* 202 */ float realWidth = getRealFontWidth(text); +/* 203 */ float fontSize = font.getSize(); +/* */ +/* */ +/* 206 */ float x = 0.5F * width - 0.5F * fontSize * realWidth; +/* 207 */ float y = 0.5F * heigth + 0.5F * fontSize; +/* */ +/* 209 */ g2d.drawString(text, x, y); +/* */ +/* 211 */ g2d.dispose(); +/* */ +/* 213 */ return buffImg; +/* */ } +/* */ +/* */ +/* */ +/* */ public static BufferedImage waterMarkByText(int width, int heigth, String text, Color color, float alpha) { +/* 219 */ Font font = new Font("Dialog", 0, 33); +/* 220 */ return waterMarkByText(width, heigth, text, color, font, Double.valueOf(-30.0D), alpha); +/* */ } +/* */ +/* */ public static BufferedImage waterMarkByText(int width, int heigth, String text, float alpha) { +/* 224 */ return waterMarkByText(width, heigth, text, Color.GRAY, alpha); +/* */ } +/* */ +/* */ +/* */ public static BufferedImage waterMarkByText(int width, int heigth, String text) { +/* 229 */ return waterMarkByText(width, heigth, text, 0.2F); +/* */ } +/* */ +/* */ public static BufferedImage waterMarkByText(String text) { +/* 233 */ return waterMarkByText(200, 150, text); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private static float getRealFontWidth(String text) { +/* 240 */ int len = text.length(); +/* 241 */ float width = 0.0F; +/* 242 */ for (int i = 0; i < len; i++) { +/* 243 */ if (text.charAt(i) < 'Ā') { +/* 244 */ width += 0.5F; +/* */ } else { +/* 246 */ width++; +/* */ } +/* */ } +/* 249 */ return width; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void changeImgColor(String path, String newPath) throws IOException { +/* 263 */ File file = new File(path); +/* 264 */ BufferedImage bi = ImageIO.read(file); +/* 265 */ Image image = bi; +/* */ +/* 267 */ ImageIcon imageIcon = new ImageIcon(image); +/* 268 */ int width = imageIcon.getIconWidth(); +/* 269 */ int height = imageIcon.getIconHeight(); +/* */ +/* 271 */ BufferedImage bufferedImage = new BufferedImage(width, height, 6); +/* 272 */ Graphics2D graphics2D = (Graphics2D)bufferedImage.getGraphics(); +/* 273 */ graphics2D.drawImage(imageIcon.getImage(), 0, 0, imageIcon.getImageObserver()); +/* 274 */ int alpha = 255; +/* */ +/* 276 */ int RGB = bufferedImage.getRGB(width - 1, height - 1); +/* 277 */ for (int i = bufferedImage.getMinX(); i < width; i++) { +/* 278 */ for (int j = bufferedImage.getMinY(); j < height; j++) { +/* 279 */ int rgb = bufferedImage.getRGB(i, j); +/* 280 */ int r = (rgb & 0xFF0000) >> 16; +/* 281 */ int g = (rgb & 0xFF00) >> 8; +/* 282 */ int b = rgb & 0xFF; +/* 283 */ int R = (RGB & 0xFF0000) >> 16; +/* 284 */ int G = (RGB & 0xFF00) >> 8; +/* 285 */ int B = RGB & 0xFF; +/* */ +/* 287 */ int a = 45; +/* 288 */ if (Math.abs(R - r) < a && Math.abs(G - g) < a && Math.abs(B - b) < a) { +/* 289 */ alpha = 0; +/* */ } else { +/* 291 */ alpha = 255; +/* */ } +/* 293 */ rgb = alpha << 24 | rgb & 0xFFFFFF; +/* 294 */ bufferedImage.setRGB(i, j, rgb); +/* */ } +/* */ } +/* 297 */ ImageIO.write(bufferedImage, "png", new File(newPath)); +/* */ } +/* */ +/* */ public static String convertRgbStr(int color) { +/* 301 */ int red = (color & 0xFF0000) >> 16; +/* 302 */ int green = (color & 0xFF00) >> 8; +/* 303 */ int blue = color & 0xFF; +/* 304 */ return red + "," + green + "," + blue; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String thumbnailImage(String imagePath, int w, int h, String prevfix, boolean force) { +/* 317 */ File imgFile = new File(imagePath); +/* 318 */ String newPath = ""; +/* 319 */ if (imgFile.exists()) { +/* */ +/* */ try { +/* 322 */ String types = Arrays.toString((Object[])ImageIO.getReaderFormatNames()); +/* 323 */ String suffix = null; +/* */ +/* 325 */ if (imgFile.getName().indexOf(".") > -1) { +/* 326 */ suffix = imgFile.getName().substring(imgFile.getName().lastIndexOf(".") + 1); +/* */ } +/* */ +/* 329 */ if (suffix == null || types.toLowerCase().indexOf(suffix.toLowerCase()) < 0) { +/* 330 */ System.out.println("Sorry, the image suffix is illegal. the standard image suffix is {}." + types); +/* 331 */ return newPath; +/* */ } +/* 333 */ System.out.println("target image's size, width:{" + w + "}, height:{" + h + "}."); +/* 334 */ Image img = ImageIO.read(imgFile); +/* 335 */ if (!force) { +/* */ +/* 337 */ int width = img.getWidth(null); +/* 338 */ int height = img.getHeight(null); +/* 339 */ if (width * 1.0D / w < height * 1.0D / h) { +/* 340 */ if (width > w) { +/* 341 */ h = Integer.parseInt((new DecimalFormat("0")).format((height * w) / width * 1.0D)); +/* 342 */ System.out.println("change image's height, width:{" + w + "}, height:{" + h + "}."); +/* */ } +/* */ +/* 345 */ } else if (height > h) { +/* 346 */ w = Integer.parseInt((new DecimalFormat("0")).format((width * h) / height * 1.0D)); +/* 347 */ System.out.println("change image's width, width:{" + w + "}, height:{" + h + "}."); +/* */ } +/* */ } +/* */ +/* 351 */ BufferedImage bi = new BufferedImage(w, h, 1); +/* 352 */ Graphics g = bi.getGraphics(); +/* 353 */ g.drawImage(img, 0, 0, w, h, Color.LIGHT_GRAY, null); +/* 354 */ g.dispose(); +/* 355 */ String p = imgFile.getPath(); +/* */ +/* 357 */ newPath = p.substring(0, p.lastIndexOf(File.separator)) + File.separator + prevfix + imgFile.getName(); +/* 358 */ ImageIO.write(bi, suffix, new File(newPath)); +/* 359 */ System.out.println("缩略图在原路径下生成成功"); +/* 360 */ } catch (IOException e) { +/* 361 */ System.out.println("generate thumbnail image failed." + e); +/* */ } +/* */ } else { +/* 364 */ System.out.println("the image is not exist."); +/* */ } +/* 366 */ return newPath; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void main(String[] args) { +/* */ try { +/* 383 */ changeImgColor("F:\\FFOutput\\profile.png", "F:\\FFOutput\\profile1.png"); +/* 384 */ } catch (IOException e) { +/* 385 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\convert\ImgConvert.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/convert/ZHConvert.java b/src/main/java/com/archive/common/convert/ZHConvert.java new file mode 100644 index 0000000..1d72fd8 --- /dev/null +++ b/src/main/java/com/archive/common/convert/ZHConvert.java @@ -0,0 +1,207 @@ +/* */ package com.archive.common.convert; + +/* */ +/* */ import java.io.BufferedReader; +/* */ import java.io.FileNotFoundException; +/* */ import java.io.IOException; +/* */ import java.io.InputStream; +/* */ import java.io.InputStreamReader; +/* */ import java.util.HashMap; +/* */ import java.util.HashSet; +/* */ import java.util.Iterator; +/* */ import java.util.Map; +/* */ import java.util.Properties; +/* */ import java.util.Set; +/* */ import net.sourceforge.pinyin4j.PinyinHelper; +/* */ import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; +/* */ import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; +/* */ import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; +/* */ import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; +/* */ import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ZHConvert +/* */ { +/* 27 */ private Properties charMap = new Properties(); +/* 28 */ private Set conflictingSets = new HashSet<>(); +/* */ public static final int TRADITIONAL = 0; +/* */ public static final int SIMPLIFIED = 1; +/* */ private static final int NUM_OF_CONVERTERS = 2; +/* 32 */ private static final com.archive.common.convert.ZHConvert[] converters = new com.archive.common.convert.ZHConvert[2]; +/* 33 */ private static final String[] propertyFiles = new String[2]; +/* */ static { +/* 35 */ propertyFiles[0] = "zh2Hant.properties"; +/* 36 */ propertyFiles[1] = "zh2Hans.properties"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static com.archive.common.convert.ZHConvert getInstance(int converterType) { +/* 45 */ if (converterType >= 0 && converterType < 2) { +/* 46 */ if (converters[converterType] == null) { +/* 47 */ synchronized (com.archive.common.convert.ZHConvert.class) { +/* 48 */ if (converters[converterType] == null) { +/* 49 */ converters[converterType] = new com.archive.common.convert.ZHConvert(propertyFiles[converterType]); +/* */ } +/* */ } +/* */ } +/* 53 */ return converters[converterType]; +/* */ } +/* 55 */ return null; +/* */ } +/* */ +/* */ +/* */ public static String convert(String text, int converterType) { +/* 60 */ com.archive.common.convert.ZHConvert instance = getInstance(converterType); +/* 61 */ return instance.convert(text); +/* */ } +/* */ +/* */ +/* */ private ZHConvert(String propertyFile) { +/* 66 */ InputStream is = null; +/* 67 */ is = getClass().getResourceAsStream(propertyFile); +/* */ +/* 69 */ if (is != null) { +/* 70 */ BufferedReader reader = null; +/* */ +/* 72 */ try { reader = new BufferedReader(new InputStreamReader(is)); +/* 73 */ this.charMap.load(reader); } +/* 74 */ catch (FileNotFoundException fileNotFoundException) +/* */ +/* */ { +/* */ try { +/* */ +/* */ +/* 80 */ if (reader != null) +/* 81 */ reader.close(); +/* 82 */ if (is != null) +/* 83 */ is.close(); +/* 84 */ } catch (IOException iOException) {} } catch (IOException e) { e.printStackTrace(); } finally { try { if (reader != null) reader.close(); if (is != null) is.close(); } catch (IOException iOException) {} } +/* */ +/* */ } +/* */ +/* 88 */ initializeHelper(); +/* */ } +/* */ +/* */ +/* */ private void initializeHelper() { +/* 93 */ Map stringPossibilities = new HashMap<>(); +/* 94 */ Iterator iter = this.charMap.keySet().iterator(); +/* 95 */ while (iter.hasNext()) { +/* 96 */ String key = iter.next(); +/* 97 */ if (key.length() >= 1) { +/* 98 */ for (int i = 0; i < key.length(); i++) { +/* 99 */ String keySubstring = key.substring(0, i + 1); +/* 100 */ if (stringPossibilities.containsKey(keySubstring)) { +/* 101 */ Integer integer = stringPossibilities.get(keySubstring); +/* 102 */ stringPossibilities.put(keySubstring, new Integer(integer +/* 103 */ .intValue() + 1)); +/* */ } else { +/* 105 */ stringPossibilities.put(keySubstring, new Integer(1)); +/* */ } +/* */ } +/* */ } +/* */ } +/* 110 */ iter = stringPossibilities.keySet().iterator(); +/* 111 */ while (iter.hasNext()) { +/* 112 */ String key = iter.next(); +/* 113 */ if (((Integer)stringPossibilities.get(key)).intValue() > 1) { +/* 114 */ this.conflictingSets.add(key); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public String convert(String in) { +/* 120 */ StringBuilder outString = new StringBuilder(); +/* 121 */ StringBuilder stackString = new StringBuilder(); +/* 122 */ for (int i = 0; i < in.length(); i++) { +/* 123 */ char c = in.charAt(i); +/* 124 */ String key = "" + c; +/* 125 */ stackString.append(key); +/* 126 */ if (!this.conflictingSets.contains(stackString.toString())) +/* 127 */ if (this.charMap.containsKey(stackString.toString())) { +/* 128 */ outString.append(this.charMap.get(stackString.toString())); +/* 129 */ stackString.setLength(0); +/* */ } else { +/* 131 */ CharSequence sequence = stackString.subSequence(0, stackString.length() - 1); +/* 132 */ stackString.delete(0, stackString.length() - 1); +/* 133 */ flushStack(outString, new StringBuilder(sequence)); +/* */ } +/* */ } +/* 136 */ flushStack(outString, stackString); +/* 137 */ return outString.toString(); +/* */ } +/* */ +/* */ private void flushStack(StringBuilder outString, StringBuilder stackString) { +/* 141 */ while (stackString.length() > 0) { +/* 142 */ if (this.charMap.containsKey(stackString.toString())) { +/* 143 */ outString.append(this.charMap.get(stackString.toString())); +/* 144 */ stackString.setLength(0); continue; +/* */ } +/* 146 */ outString.append("" + stackString.charAt(0)); +/* 147 */ stackString.delete(0, 1); +/* */ } +/* */ } +/* */ +/* */ String parseOneChar(String c) { +/* 152 */ if (this.charMap.containsKey(c)) { +/* 153 */ return (String)this.charMap.get(c); +/* */ } +/* */ +/* 156 */ return c; +/* */ } +/* */ +/* */ +/* */ public static String getPingYin(String src) { +/* 161 */ char[] t1 = src.toCharArray(); +/* 162 */ String[] t2 = new String[t1.length]; +/* */ +/* 164 */ HanyuPinyinOutputFormat t3 = new HanyuPinyinOutputFormat(); +/* 165 */ t3.setCaseType(HanyuPinyinCaseType.LOWERCASE); +/* 166 */ t3.setToneType(HanyuPinyinToneType.WITHOUT_TONE); +/* 167 */ t3.setVCharType(HanyuPinyinVCharType.WITH_U_UNICODE); +/* */ +/* 169 */ String t4 = ""; +/* 170 */ int t0 = t1.length; +/* */ try { +/* 172 */ for (int i = 0; i < t0; i++) { +/* */ +/* 174 */ if (Character.toString(t1[i]).matches("[\\u4E00-\\u9FA5]+")) { +/* 175 */ t2 = PinyinHelper.toHanyuPinyinStringArray(t1[i], t3); +/* 176 */ if (t2 != null && t2.length > 0 && t2[0] != null) { +/* 177 */ t4 = t4 + t2[0]; +/* */ } +/* */ } else { +/* */ +/* 181 */ t4 = t4 + Character.toString(t1[i]); +/* */ } +/* */ } +/* 184 */ return t4; +/* 185 */ } catch (BadHanyuPinyinOutputFormatCombination e1) { +/* 186 */ System.out.println("拼音转换失败(src):" + e1.getMessage()); +/* */ +/* 188 */ return t4; +/* */ } +/* */ } +/* */ +/* */ public static void main(String[] args) { +/* 193 */ String allValueSimplified = convert("1111", 1); +/* */ +/* 195 */ String allValueTraditional = convert("1111", 0); +/* */ +/* */ +/* 198 */ String allValuePinyin = getPingYin("11111111"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\convert\ZHConvert.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/BusinessException.java b/src/main/java/com/archive/common/exception/BusinessException.java new file mode 100644 index 0000000..ad29cd6 --- /dev/null +++ b/src/main/java/com/archive/common/exception/BusinessException.java @@ -0,0 +1,36 @@ +/* */ package com.archive.common.exception; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BusinessException +/* */ extends RuntimeException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ protected final String message; +/* */ +/* */ public BusinessException(String message) { +/* 16 */ this.message = message; +/* */ } +/* */ +/* */ +/* */ public BusinessException(String message, Throwable e) { +/* 21 */ super(message, e); +/* 22 */ this.message = message; +/* */ } +/* */ +/* */ +/* */ +/* */ public String getMessage() { +/* 28 */ return this.message; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\BusinessException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/DemoModeException.java b/src/main/java/com/archive/common/exception/DemoModeException.java new file mode 100644 index 0000000..3d5c1da --- /dev/null +++ b/src/main/java/com/archive/common/exception/DemoModeException.java @@ -0,0 +1,11 @@ +package com.archive.common.exception; + +public class DemoModeException extends RuntimeException { + private static final long serialVersionUID = 1L; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\DemoModeException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/UtilException.java b/src/main/java/com/archive/common/exception/UtilException.java new file mode 100644 index 0000000..dfdf471 --- /dev/null +++ b/src/main/java/com/archive/common/exception/UtilException.java @@ -0,0 +1,32 @@ +/* */ package com.archive.common.exception; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class UtilException +/* */ extends RuntimeException +/* */ { +/* */ private static final long serialVersionUID = 8247610319171014183L; +/* */ +/* */ public UtilException(Throwable e) { +/* 14 */ super(e.getMessage(), e); +/* */ } +/* */ +/* */ +/* */ public UtilException(String message) { +/* 19 */ super(message); +/* */ } +/* */ +/* */ +/* */ public UtilException(String message, Throwable throwable) { +/* 24 */ super(message, throwable); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\UtilException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/base/BaseException.java b/src/main/java/com/archive/common/exception/base/BaseException.java new file mode 100644 index 0000000..2b41d38 --- /dev/null +++ b/src/main/java/com/archive/common/exception/base/BaseException.java @@ -0,0 +1,109 @@ +/* */ package com.archive.common.exception.base; +/* */ +/* */ import com.archive.common.utils.MessageUtils; +/* */ import org.springframework.util.StringUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BaseException +/* */ extends RuntimeException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private String module; +/* */ private String code; +/* */ private Object[] args; +/* */ private String defaultMessage; +/* */ +/* */ public BaseException(String module, String code, Object[] args, String defaultMessage) { +/* 37 */ this.module = module; +/* 38 */ this.code = code; +/* 39 */ this.args = args; +/* 40 */ this.defaultMessage = defaultMessage; +/* */ } +/* */ +/* */ +/* */ public BaseException(String module, String code, Object[] args) { +/* 45 */ this(module, code, args, null); +/* */ } +/* */ +/* */ +/* */ public BaseException(String module, String defaultMessage) { +/* 50 */ this(module, null, null, defaultMessage); +/* */ } +/* */ +/* */ +/* */ public BaseException(String code, Object[] args) { +/* 55 */ this(null, code, args, null); +/* */ } +/* */ +/* */ +/* */ public BaseException(String defaultMessage) { +/* 60 */ this(null, null, null, defaultMessage); +/* */ } +/* */ +/* */ +/* */ +/* */ public String getMessage() { +/* 66 */ String message = null; +/* 67 */ if (!StringUtils.isEmpty(this.code)) +/* */ { +/* 69 */ message = MessageUtils.message(this.code, this.args); +/* */ } +/* 71 */ if (message == null) +/* */ { +/* 73 */ message = this.defaultMessage; +/* */ } +/* 75 */ return message; +/* */ } +/* */ +/* */ +/* */ public String getModule() { +/* 80 */ return this.module; +/* */ } +/* */ +/* */ +/* */ public String getCode() { +/* 85 */ return this.code; +/* */ } +/* */ +/* */ +/* */ public Object[] getArgs() { +/* 90 */ return this.args; +/* */ } +/* */ +/* */ +/* */ public String getDefaultMessage() { +/* 95 */ return this.defaultMessage; +/* */ } +/* */ +/* */ +/* */ +/* */ public String toString() { +/* 101 */ return getClass() + "{module='" + this.module + '\'' + ", message='" + getMessage() + '\'' + '}'; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\base\BaseException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/file/FileException.java b/src/main/java/com/archive/common/exception/file/FileException.java new file mode 100644 index 0000000..12752a8 --- /dev/null +++ b/src/main/java/com/archive/common/exception/file/FileException.java @@ -0,0 +1,24 @@ +/* */ package com.archive.common.exception.file; +/* */ +/* */ import com.archive.common.exception.base.BaseException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class FileException +/* */ extends BaseException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public FileException(String code, Object[] args) { +/* 16 */ super("file", code, args, null); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\FileException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/file/FileNameLengthLimitExceededException.java b/src/main/java/com/archive/common/exception/file/FileNameLengthLimitExceededException.java new file mode 100644 index 0000000..d2f600d --- /dev/null +++ b/src/main/java/com/archive/common/exception/file/FileNameLengthLimitExceededException.java @@ -0,0 +1,22 @@ +/* */ package com.archive.common.exception.file; +/* */ +/* */ import com.archive.common.exception.file.FileException; +/* */ +/* */ +/* */ +/* */ +/* */ public class FileNameLengthLimitExceededException +/* */ extends FileException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public FileNameLengthLimitExceededException(int defaultFileNameLength) { +/* 14 */ super("upload.filename.exceed.length", new Object[] { Integer.valueOf(defaultFileNameLength) }); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\FileNameLengthLimitExceededException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/file/FileSizeLimitExceededException.java b/src/main/java/com/archive/common/exception/file/FileSizeLimitExceededException.java new file mode 100644 index 0000000..5513a55 --- /dev/null +++ b/src/main/java/com/archive/common/exception/file/FileSizeLimitExceededException.java @@ -0,0 +1,22 @@ +/* */ package com.archive.common.exception.file; +/* */ +/* */ import com.archive.common.exception.file.FileException; +/* */ +/* */ +/* */ +/* */ +/* */ public class FileSizeLimitExceededException +/* */ extends FileException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public FileSizeLimitExceededException(long defaultMaxSize) { +/* 14 */ super("upload.exceed.maxSize", new Object[] { Long.valueOf(defaultMaxSize) }); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\FileSizeLimitExceededException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidFlashExtensionException.java b/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidFlashExtensionException.java new file mode 100644 index 0000000..8bf8b73 --- /dev/null +++ b/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidFlashExtensionException.java @@ -0,0 +1,66 @@ +/* */ package com.archive.common.exception.file; +/* */ +/* */ import com.archive.common.exception.file.InvalidExtensionException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class InvalidFlashExtensionException +/* */ extends InvalidExtensionException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename) { +/* 58 */ super(allowedExtension, extension, filename); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\InvalidExtensionException$InvalidFlashExtensionException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidImageExtensionException.java b/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidImageExtensionException.java new file mode 100644 index 0000000..11dd035 --- /dev/null +++ b/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidImageExtensionException.java @@ -0,0 +1,56 @@ +/* */ package com.archive.common.exception.file; +/* */ +/* */ import com.archive.common.exception.file.InvalidExtensionException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class InvalidImageExtensionException +/* */ extends InvalidExtensionException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename) { +/* 48 */ super(allowedExtension, extension, filename); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\InvalidExtensionException$InvalidImageExtensionException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidMediaExtensionException.java b/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidMediaExtensionException.java new file mode 100644 index 0000000..1e00d4e --- /dev/null +++ b/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidMediaExtensionException.java @@ -0,0 +1,76 @@ +/* */ package com.archive.common.exception.file; +/* */ +/* */ import com.archive.common.exception.file.InvalidExtensionException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class InvalidMediaExtensionException +/* */ extends InvalidExtensionException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename) { +/* 68 */ super(allowedExtension, extension, filename); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\InvalidExtensionException$InvalidMediaExtensionException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidVideoExtensionException.java b/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidVideoExtensionException.java new file mode 100644 index 0000000..55468a2 --- /dev/null +++ b/src/main/java/com/archive/common/exception/file/InvalidExtensionException$InvalidVideoExtensionException.java @@ -0,0 +1,86 @@ +/* */ package com.archive.common.exception.file; +/* */ +/* */ import com.archive.common.exception.file.InvalidExtensionException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class InvalidVideoExtensionException +/* */ extends InvalidExtensionException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename) { +/* 78 */ super(allowedExtension, extension, filename); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\InvalidExtensionException$InvalidVideoExtensionException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/file/InvalidExtensionException.java b/src/main/java/com/archive/common/exception/file/InvalidExtensionException.java new file mode 100644 index 0000000..b2f2146 --- /dev/null +++ b/src/main/java/com/archive/common/exception/file/InvalidExtensionException.java @@ -0,0 +1,47 @@ +/* */ package com.archive.common.exception.file; +/* */ +/* */ import java.util.Arrays; +/* */ import org.apache.commons.fileupload.FileUploadException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class InvalidExtensionException +/* */ extends FileUploadException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private String[] allowedExtension; +/* */ private String extension; +/* */ private String filename; +/* */ +/* */ public InvalidExtensionException(String[] allowedExtension, String extension, String filename) { +/* 21 */ super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString((Object[])allowedExtension) + "]"); +/* 22 */ this.allowedExtension = allowedExtension; +/* 23 */ this.extension = extension; +/* 24 */ this.filename = filename; +/* */ } +/* */ +/* */ +/* */ public String[] getAllowedExtension() { +/* 29 */ return this.allowedExtension; +/* */ } +/* */ +/* */ +/* */ public String getExtension() { +/* 34 */ return this.extension; +/* */ } +/* */ +/* */ +/* */ public String getFilename() { +/* 39 */ return this.filename; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\file\InvalidExtensionException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/job/TaskException$Code.java b/src/main/java/com/archive/common/exception/job/TaskException$Code.java new file mode 100644 index 0000000..7cc0c16 --- /dev/null +++ b/src/main/java/com/archive/common/exception/job/TaskException$Code.java @@ -0,0 +1,39 @@ +/* */ package com.archive.common.exception.job; +/* */ +/* */ import com.archive.common.exception.job.TaskException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum Code +/* */ { +/* 32 */ TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE; +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\job\TaskException$Code.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/job/TaskException.java b/src/main/java/com/archive/common/exception/job/TaskException.java new file mode 100644 index 0000000..f8704f7 --- /dev/null +++ b/src/main/java/com/archive/common/exception/job/TaskException.java @@ -0,0 +1,35 @@ +/* */ package com.archive.common.exception.job; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TaskException +/* */ extends Exception +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Code code; +/* */ +/* */ public TaskException(String msg, Code code) { +/* 16 */ this(msg, code, null); +/* */ } +/* */ +/* */ +/* */ public TaskException(String msg, Code code, Exception nestedEx) { +/* 21 */ super(msg, nestedEx); +/* 22 */ this.code = code; +/* */ } +/* */ +/* */ +/* */ public Code getCode() { +/* 27 */ return this.code; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exception\job\TaskException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/user/CaptchaException.java b/src/main/java/com/archive/common/exception/user/CaptchaException.java new file mode 100644 index 0000000..70f2f4b --- /dev/null +++ b/src/main/java/com/archive/common/exception/user/CaptchaException.java @@ -0,0 +1,22 @@ +/* */ package com.archive.common.exception.user; +/* */ +/* */ import com.archive.common.exception.user.UserException; +/* */ +/* */ +/* */ +/* */ +/* */ public class CaptchaException +/* */ extends UserException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public CaptchaException() { +/* 14 */ super("user.jcaptcha.error", null); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\CaptchaException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/user/RoleBlockedException.java b/src/main/java/com/archive/common/exception/user/RoleBlockedException.java new file mode 100644 index 0000000..5f75ab6 --- /dev/null +++ b/src/main/java/com/archive/common/exception/user/RoleBlockedException.java @@ -0,0 +1,22 @@ +/* */ package com.archive.common.exception.user; +/* */ +/* */ import com.archive.common.exception.user.UserException; +/* */ +/* */ +/* */ +/* */ +/* */ public class RoleBlockedException +/* */ extends UserException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public RoleBlockedException() { +/* 14 */ super("role.blocked", null); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\RoleBlockedException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/user/UserBlockedException.java b/src/main/java/com/archive/common/exception/user/UserBlockedException.java new file mode 100644 index 0000000..9b367ad --- /dev/null +++ b/src/main/java/com/archive/common/exception/user/UserBlockedException.java @@ -0,0 +1,22 @@ +/* */ package com.archive.common.exception.user; +/* */ +/* */ import com.archive.common.exception.user.UserException; +/* */ +/* */ +/* */ +/* */ +/* */ public class UserBlockedException +/* */ extends UserException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public UserBlockedException() { +/* 14 */ super("user.blocked", null); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserBlockedException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/user/UserDeleteException.java b/src/main/java/com/archive/common/exception/user/UserDeleteException.java new file mode 100644 index 0000000..c6cf61d --- /dev/null +++ b/src/main/java/com/archive/common/exception/user/UserDeleteException.java @@ -0,0 +1,22 @@ +/* */ package com.archive.common.exception.user; +/* */ +/* */ import com.archive.common.exception.user.UserException; +/* */ +/* */ +/* */ +/* */ +/* */ public class UserDeleteException +/* */ extends UserException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public UserDeleteException() { +/* 14 */ super("user.password.delete", null); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserDeleteException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/user/UserException.java b/src/main/java/com/archive/common/exception/user/UserException.java new file mode 100644 index 0000000..4d88985 --- /dev/null +++ b/src/main/java/com/archive/common/exception/user/UserException.java @@ -0,0 +1,24 @@ +/* */ package com.archive.common.exception.user; +/* */ +/* */ import com.archive.common.exception.base.BaseException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class UserException +/* */ extends BaseException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public UserException(String code, Object[] args) { +/* 16 */ super("user", code, args, null); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/user/UserNotExistsException.java b/src/main/java/com/archive/common/exception/user/UserNotExistsException.java new file mode 100644 index 0000000..f211512 --- /dev/null +++ b/src/main/java/com/archive/common/exception/user/UserNotExistsException.java @@ -0,0 +1,22 @@ +/* */ package com.archive.common.exception.user; +/* */ +/* */ import com.archive.common.exception.user.UserException; +/* */ +/* */ +/* */ +/* */ +/* */ public class UserNotExistsException +/* */ extends UserException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public UserNotExistsException() { +/* 14 */ super("user.not.exists", null); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserNotExistsException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/user/UserPasswordNotMatchException.java b/src/main/java/com/archive/common/exception/user/UserPasswordNotMatchException.java new file mode 100644 index 0000000..f0427ba --- /dev/null +++ b/src/main/java/com/archive/common/exception/user/UserPasswordNotMatchException.java @@ -0,0 +1,22 @@ +/* */ package com.archive.common.exception.user; +/* */ +/* */ import com.archive.common.exception.user.UserException; +/* */ +/* */ +/* */ +/* */ +/* */ public class UserPasswordNotMatchException +/* */ extends UserException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public UserPasswordNotMatchException() { +/* 14 */ super("user.password.not.match", null); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserPasswordNotMatchException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/user/UserPasswordRetryLimitCountException.java b/src/main/java/com/archive/common/exception/user/UserPasswordRetryLimitCountException.java new file mode 100644 index 0000000..2f6e7ad --- /dev/null +++ b/src/main/java/com/archive/common/exception/user/UserPasswordRetryLimitCountException.java @@ -0,0 +1,22 @@ +/* */ package com.archive.common.exception.user; +/* */ +/* */ import com.archive.common.exception.user.UserException; +/* */ +/* */ +/* */ +/* */ +/* */ public class UserPasswordRetryLimitCountException +/* */ extends UserException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public UserPasswordRetryLimitCountException(int retryLimitCount) { +/* 14 */ super("user.password.retry.limit.count", new Object[] { Integer.valueOf(retryLimitCount) }); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserPasswordRetryLimitCountException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/exception/user/UserPasswordRetryLimitExceedException.java b/src/main/java/com/archive/common/exception/user/UserPasswordRetryLimitExceedException.java new file mode 100644 index 0000000..fb43936 --- /dev/null +++ b/src/main/java/com/archive/common/exception/user/UserPasswordRetryLimitExceedException.java @@ -0,0 +1,22 @@ +/* */ package com.archive.common.exception.user; +/* */ +/* */ import com.archive.common.exception.user.UserException; +/* */ +/* */ +/* */ +/* */ +/* */ public class UserPasswordRetryLimitExceedException +/* */ extends UserException +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public UserPasswordRetryLimitExceedException(int retryLimitCount) { +/* 14 */ super("user.password.retry.limit.exceed", new Object[] { Integer.valueOf(retryLimitCount) }); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\exceptio\\user\UserPasswordRetryLimitExceedException.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/ocr/ImageOcr.java b/src/main/java/com/archive/common/ocr/ImageOcr.java new file mode 100644 index 0000000..2e35497 --- /dev/null +++ b/src/main/java/com/archive/common/ocr/ImageOcr.java @@ -0,0 +1,61 @@ +/* */ package com.archive.common.ocr; +/* */ +/* */ import com.archive.common.convert.ImgConvert; +/* */ import java.io.File; +/* */ import net.sourceforge.tess4j.Tesseract; +/* */ import net.sourceforge.tess4j.util.LoadLibs; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ImageOcr +/* */ { +/* */ public static String ImageOcr(String imagPath) { +/* 18 */ String res = ""; +/* */ try { +/* 20 */ String pngPath = ""; +/* */ +/* 22 */ if (imagPath.contains(".jpg") || imagPath.contains(".jpeg")) { +/* 23 */ File fil = new File(imagPath); +/* */ +/* 25 */ pngPath = fil.getParentFile().getPath() + File.separator + fil.getName().replace(".jpg", ".png").replace(".jpeg", ".png"); +/* 26 */ ImgConvert.JpgToPng(imagPath, pngPath); +/* */ } +/* */ +/* */ +/* 30 */ Tesseract tesseract = new Tesseract(); +/* */ +/* 32 */ File tessDataFolder = LoadLibs.extractTessResources("tessdata"); +/* 33 */ tesseract.setDatapath(tessDataFolder.getAbsolutePath()); +/* */ +/* 35 */ tesseract.setLanguage("chi_sim"); +/* */ +/* 37 */ String result = ""; +/* 38 */ if (pngPath.equals("")) { +/* 39 */ result = tesseract.doOCR(new File(imagPath)); +/* */ } else { +/* 41 */ result = tesseract.doOCR(new File(pngPath)); +/* */ } +/* */ +/* 44 */ res = result.replaceAll("\\r|\\n", "-").replaceAll(" ", ""); +/* 45 */ } catch (Exception ex) { +/* 46 */ System.out.println("图片OCR出现异常:" + ex.getMessage()); +/* */ +/* */ +/* 49 */ if (ex.getMessage().equals("javax.imageio.IIOException: JFIF APP0 must be first marker after SOI")); +/* */ } +/* */ +/* */ +/* 53 */ return res; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\ocr\ImageOcr.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/ocr/PdfOcr.java b/src/main/java/com/archive/common/ocr/PdfOcr.java new file mode 100644 index 0000000..6acf153 --- /dev/null +++ b/src/main/java/com/archive/common/ocr/PdfOcr.java @@ -0,0 +1,96 @@ +/* */ package com.archive.common.ocr; +/* */ +/* */ import java.awt.image.BufferedImage; +/* */ import java.io.File; +/* */ import javax.imageio.ImageIO; +/* */ import net.sourceforge.tess4j.Tesseract; +/* */ import net.sourceforge.tess4j.util.LoadLibs; +/* */ import org.apache.pdfbox.pdmodel.PDDocument; +/* */ import org.apache.pdfbox.rendering.PDFRenderer; +/* */ import org.apache.pdfbox.text.PDFTextStripper; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PdfOcr +/* */ { +/* */ public static String getTextFromPdf(String pdfPath, String pdfSpiltImagePath) throws Exception { +/* 29 */ File pdffile = new File(pdfPath); +/* 30 */ PDDocument doc = PDDocument.load(pdffile); +/* 31 */ String text = (new PDFTextStripper()).getText(doc); +/* 32 */ String result = text.replace("\n", ""); +/* 33 */ result = result.replace("\r", ""); +/* 34 */ if (result.equals("")) { +/* */ +/* */ +/* */ +/* 38 */ String name = pdffile.getName().substring(0, pdffile.getName().lastIndexOf(".")); +/* */ +/* 40 */ String hz = pdffile.getName().substring(pdffile.getName().lastIndexOf(".") + 1); +/* 41 */ String imageRootPath = pdfSpiltImagePath + File.separator + name; +/* 42 */ File imagePathFile = new File(imageRootPath); +/* 43 */ if (!imagePathFile.exists()) { +/* 44 */ imagePathFile.mkdirs(); +/* */ } +/* */ +/* 47 */ pdfToImg(pdffile, imageRootPath, name); +/* 48 */ String res = ""; +/* 49 */ for (int i = 0; i < (imagePathFile.listFiles()).length; i++) { +/* 50 */ Tesseract tesseract = new Tesseract(); +/* */ +/* 52 */ File tessDataFolder = LoadLibs.extractTessResources("tessdata"); +/* 53 */ tesseract.setDatapath(tessDataFolder.getAbsolutePath()); +/* */ +/* 55 */ tesseract.setLanguage("chi_sim"); +/* */ +/* 57 */ String context = tesseract.doOCR(imagePathFile.listFiles()[i]); +/* */ +/* 59 */ context = context.replaceAll("\\r|\\n", "-").replaceAll(" ", ""); +/* 60 */ res = res + context + "\n"; +/* */ } +/* */ +/* 63 */ imagePathFile.setWritable(true, false); +/* 64 */ imagePathFile.delete(); +/* 65 */ text = res; +/* */ } +/* 67 */ return text; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void pdfToImg(File file, String imagePath, String fileName) { +/* */ try { +/* 76 */ PDDocument doc = PDDocument.load(file); +/* 77 */ PDFRenderer renderer = new PDFRenderer(doc); +/* 78 */ int pageCount = doc.getNumberOfPages(); +/* */ +/* 80 */ for (int i = 0; i < pageCount; i++) { +/* */ +/* 82 */ BufferedImage image = renderer.renderImageWithDPI(i, 144.0F); +/* */ +/* 84 */ ImageIO.write(image, "png", new File(imagePath + File.separator + fileName + i + ".png")); +/* */ } +/* 86 */ } catch (Exception e) { +/* 87 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\ocr\PdfOcr.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/AddressUtils.java b/src/main/java/com/archive/common/utils/AddressUtils.java new file mode 100644 index 0000000..cd7b29d --- /dev/null +++ b/src/main/java/com/archive/common/utils/AddressUtils.java @@ -0,0 +1,61 @@ +/* */ package com.archive.common.utils; +/* */ +/* */ import com.alibaba.fastjson.JSONObject; +/* */ import com.archive.common.utils.IpUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.http.HttpUtils; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AddressUtils +/* */ { +/* 17 */ private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.AddressUtils.class); +/* */ +/* */ +/* */ public static final String IP_URL = "http://whois.pconline.com.cn/ipJson.jsp"; +/* */ +/* */ +/* */ public static final String UNKNOWN = "XX XX"; +/* */ +/* */ +/* */ public static String getRealAddressByIP(String ip) { +/* 27 */ String address = "XX XX"; +/* */ +/* 29 */ if (IpUtils.internalIp(ip)) +/* */ { +/* 31 */ return "内网IP"; +/* */ } +/* 33 */ if (ArchiveConfig.isAddressEnabled()) { +/* */ +/* */ try { +/* */ +/* 37 */ String rspStr = HttpUtils.sendGet("http://whois.pconline.com.cn/ipJson.jsp", "ip=" + ip + "&json=true", "GBK"); +/* 38 */ if (StringUtils.isEmpty(rspStr)) { +/* */ +/* 40 */ log.error("获取地理位置异常 {}", ip); +/* 41 */ return "XX XX"; +/* */ } +/* 43 */ JSONObject obj = JSONObject.parseObject(rspStr); +/* 44 */ String region = obj.getString("pro"); +/* 45 */ String city = obj.getString("city"); +/* 46 */ return String.format("%s %s", new Object[] { region, city }); +/* */ } +/* 48 */ catch (Exception e) { +/* */ +/* 50 */ log.error("获取地理位置异常 {}", e); +/* */ } +/* */ } +/* 53 */ return address; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\AddressUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/Arith.java b/src/main/java/com/archive/common/utils/Arith.java new file mode 100644 index 0000000..d930199 --- /dev/null +++ b/src/main/java/com/archive/common/utils/Arith.java @@ -0,0 +1,122 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import java.math.BigDecimal; +/* */ import java.math.RoundingMode; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Arith +/* */ { +/* */ private static final int DEF_DIV_SCALE = 10; +/* */ +/* */ public static double add(double v1, double v2) { +/* 30 */ BigDecimal b1 = new BigDecimal(Double.toString(v1)); +/* 31 */ BigDecimal b2 = new BigDecimal(Double.toString(v2)); +/* 32 */ return b1.add(b2).doubleValue(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static double sub(double v1, double v2) { +/* 43 */ BigDecimal b1 = new BigDecimal(Double.toString(v1)); +/* 44 */ BigDecimal b2 = new BigDecimal(Double.toString(v2)); +/* 45 */ return b1.subtract(b2).doubleValue(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static double mul(double v1, double v2) { +/* 56 */ BigDecimal b1 = new BigDecimal(Double.toString(v1)); +/* 57 */ BigDecimal b2 = new BigDecimal(Double.toString(v2)); +/* 58 */ return b1.multiply(b2).doubleValue(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static double div(double v1, double v2) { +/* 70 */ return div(v1, v2, 10); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static double div(double v1, double v2, int scale) { +/* 83 */ if (scale < 0) +/* */ { +/* 85 */ throw new IllegalArgumentException("The scale must be a positive integer or zero"); +/* */ } +/* */ +/* 88 */ BigDecimal b1 = new BigDecimal(Double.toString(v1)); +/* 89 */ BigDecimal b2 = new BigDecimal(Double.toString(v2)); +/* 90 */ if (b1.compareTo(BigDecimal.ZERO) == 0) +/* */ { +/* 92 */ return BigDecimal.ZERO.doubleValue(); +/* */ } +/* 94 */ return b1.divide(b2, scale, RoundingMode.HALF_UP).doubleValue(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static double round(double v, int scale) { +/* 105 */ if (scale < 0) +/* */ { +/* 107 */ throw new IllegalArgumentException("The scale must be a positive integer or zero"); +/* */ } +/* */ +/* 110 */ BigDecimal b = new BigDecimal(Double.toString(v)); +/* 111 */ BigDecimal one = new BigDecimal("1"); +/* 112 */ return b.divide(one, scale, RoundingMode.HALF_UP).doubleValue(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\Arith.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/CacheUtils.java b/src/main/java/com/archive/common/utils/CacheUtils.java new file mode 100644 index 0000000..463b819 --- /dev/null +++ b/src/main/java/com/archive/common/utils/CacheUtils.java @@ -0,0 +1,205 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import java.util.Iterator; +/* */ import java.util.Set; +/* */ import org.apache.shiro.cache.Cache; +/* */ import org.apache.shiro.cache.CacheManager; +/* */ import org.apache.shiro.cache.ehcache.EhCacheManager; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CacheUtils +/* */ { +/* 19 */ private static Logger logger = LoggerFactory.getLogger(com.archive.common.utils.CacheUtils.class); +/* */ +/* 21 */ private static CacheManager cacheManager = (CacheManager)SpringUtils.getBean(CacheManager.class); +/* */ +/* */ +/* */ +/* */ +/* */ private static final String SYS_CACHE = "sys-cache"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Object get(String key) { +/* 33 */ return get("sys-cache", key); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Object get(String key, Object defaultValue) { +/* 45 */ Object value = get(key); +/* 46 */ return (value != null) ? value : defaultValue; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void put(String key, Object value) { +/* 57 */ put("sys-cache", key, value); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void remove(String key) { +/* 68 */ remove("sys-cache", key); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Object get(String cacheName, String key) { +/* 80 */ return getCache(cacheName).get(getKey(key)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Object get(String cacheName, String key, Object defaultValue) { +/* 93 */ Object value = get(cacheName, getKey(key)); +/* 94 */ return (value != null) ? value : defaultValue; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void put(String cacheName, String key, Object value) { +/* 106 */ getCache(cacheName).put(getKey(key), value); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void remove(String cacheName, String key) { +/* 117 */ getCache(cacheName).remove(getKey(key)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void removeAll(String cacheName) { +/* 127 */ Cache cache = getCache(cacheName); +/* 128 */ Set keys = cache.keys(); +/* 129 */ for (Iterator it = keys.iterator(); it.hasNext();) +/* */ { +/* 131 */ cache.remove(it.next()); +/* */ } +/* 133 */ logger.info("清理缓存: {} => {}", cacheName, keys); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void removeByKeys(Set keys) { +/* 143 */ removeByKeys("sys-cache", keys); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void removeByKeys(String cacheName, Set keys) { +/* 154 */ for (Iterator it = keys.iterator(); it.hasNext();) +/* */ { +/* 156 */ remove(it.next()); +/* */ } +/* 158 */ logger.info("清理缓存: {} => {}", cacheName, keys); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static String getKey(String key) { +/* 169 */ return key; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Cache getCache(String cacheName) { +/* 180 */ Cache cache = cacheManager.getCache(cacheName); +/* 181 */ if (cache == null) +/* */ { +/* 183 */ throw new RuntimeException("当前系统中没有定义“" + cacheName + "”这个缓存。"); +/* */ } +/* 185 */ return cache; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String[] getCacheNames() { +/* 195 */ return ((EhCacheManager)cacheManager).getCacheManager().getCacheNames(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\CacheUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/CookieUtils.java b/src/main/java/com/archive/common/utils/CookieUtils.java new file mode 100644 index 0000000..3c786e4 --- /dev/null +++ b/src/main/java/com/archive/common/utils/CookieUtils.java @@ -0,0 +1,146 @@ +/* */ package com.archive.common.utils + +; +/* */ +/* */ import java.io.UnsupportedEncodingException; +/* */ import java.net.URLDecoder; +/* */ import java.net.URLEncoder; +/* */ import javax.servlet.http.Cookie; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CookieUtils +/* */ { +/* */ public static void setCookie(HttpServletResponse response, String name, String value) { +/* 25 */ setCookie(response, name, value, 86400); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void setCookie(HttpServletResponse response, String name, String value, String path) { +/* 38 */ setCookie(response, name, value, path, 86400); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void setCookie(HttpServletResponse response, String name, String value, int maxAge) { +/* 51 */ setCookie(response, name, value, "/", maxAge); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void setCookie(HttpServletResponse response, String name, String value, String path, int maxAge) { +/* 64 */ Cookie cookie = new Cookie(name, null); +/* 65 */ cookie.setPath(path); +/* 66 */ cookie.setMaxAge(maxAge); +/* */ +/* */ try { +/* 69 */ cookie.setValue(URLEncoder.encode(value, "utf-8")); +/* */ } +/* 71 */ catch (UnsupportedEncodingException e) { +/* */ +/* 73 */ e.printStackTrace(); +/* */ } +/* 75 */ response.addCookie(cookie); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getCookie(HttpServletRequest request, String name) { +/* 86 */ return getCookie(request, null, name, false); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getCookie(HttpServletRequest request, HttpServletResponse response, String name) { +/* 97 */ return getCookie(request, response, name, true); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getCookie(HttpServletRequest request, HttpServletResponse response, String name, boolean isRemove) { +/* 112 */ String value = null; +/* 113 */ Cookie[] cookies = request.getCookies(); +/* 114 */ if (cookies != null) +/* */ { +/* 116 */ for (Cookie cookie : cookies) { +/* */ +/* 118 */ if (cookie.getName().equals(name)) { +/* */ +/* */ +/* */ try { +/* 122 */ value = URLDecoder.decode(cookie.getValue(), "utf-8"); +/* */ } +/* 124 */ catch (UnsupportedEncodingException e) { +/* */ +/* 126 */ e.printStackTrace(); +/* */ } +/* 128 */ if (isRemove) { +/* */ +/* 130 */ cookie.setMaxAge(0); +/* 131 */ response.addCookie(cookie); +/* */ } +/* */ } +/* */ } +/* */ } +/* 136 */ return value; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\CookieUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/DateUtils.java b/src/main/java/com/archive/common/utils/DateUtils.java new file mode 100644 index 0000000..9c76ce1 --- /dev/null +++ b/src/main/java/com/archive/common/utils/DateUtils.java @@ -0,0 +1,171 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import java.lang.management.ManagementFactory; +/* */ import java.text.ParseException; +/* */ import java.text.SimpleDateFormat; +/* */ import java.util.Date; +/* */ import org.apache.commons.lang3.time.DateFormatUtils; +/* */ import org.apache.commons.lang3.time.DateUtils; +/* */ +/* */ +/* */ +/* */ +/* */ public class DateUtils +/* */ extends DateUtils +/* */ { +/* 16 */ public static String YYYY = "yyyy"; +/* */ +/* 18 */ public static String YYYY_MM = "yyyy-MM"; +/* */ +/* 20 */ public static String YYYY_MM_DD = "yyyy-MM-dd"; +/* */ +/* 22 */ public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; +/* */ +/* 24 */ public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; +/* */ +/* 26 */ private static String[] parsePatterns = new String[] { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM" }; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Date getNowDate() { +/* 38 */ return new Date(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getDate() { +/* 48 */ return dateTimeNow(YYYY_MM_DD); +/* */ } +/* */ +/* */ +/* */ public static final String getTime() { +/* 53 */ return dateTimeNow(YYYY_MM_DD_HH_MM_SS); +/* */ } +/* */ +/* */ +/* */ public static final String dateTimeNow() { +/* 58 */ return dateTimeNow(YYYYMMDDHHMMSS); +/* */ } +/* */ +/* */ +/* */ public static final String dateTimeNow(String format) { +/* 63 */ return parseDateToStr(format, new Date()); +/* */ } +/* */ +/* */ +/* */ public static final String dateTime(Date date) { +/* 68 */ return parseDateToStr(YYYY_MM_DD, date); +/* */ } +/* */ +/* */ +/* */ public static final String parseDateToStr(String format, Date date) { +/* 73 */ return (new SimpleDateFormat(format)).format(date); +/* */ } +/* */ +/* */ +/* */ +/* */ public static final Date dateTime(String format, String ts) { +/* */ try { +/* 80 */ return (new SimpleDateFormat(format)).parse(ts); +/* */ } +/* 82 */ catch (ParseException e) { +/* */ +/* 84 */ throw new RuntimeException(e); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final String datePath() { +/* 93 */ Date now = new Date(); +/* 94 */ return DateFormatUtils.format(now, "yyyy/MM/dd"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final String dateTime() { +/* 102 */ Date now = new Date(); +/* 103 */ return DateFormatUtils.format(now, "yyyyMMdd"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Date parseDate(Object str) { +/* 111 */ if (str == null) +/* */ { +/* 113 */ return null; +/* */ } +/* */ +/* */ try { +/* 117 */ return parseDate(str.toString(), parsePatterns); +/* */ } +/* 119 */ catch (ParseException e) { +/* */ +/* 121 */ return null; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Date getServerStartDate() { +/* 130 */ long time = ManagementFactory.getRuntimeMXBean().getStartTime(); +/* 131 */ return new Date(time); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static int differentDaysByMillisecond(Date date1, Date date2) { +/* 139 */ return Math.abs((int)((date2.getTime() - date1.getTime()) / 86400000L)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getDatePoor(Date endDate, Date nowDate) { +/* 147 */ long nd = 86400000L; +/* 148 */ long nh = 3600000L; +/* 149 */ long nm = 60000L; +/* */ +/* */ +/* 152 */ long diff = endDate.getTime() - nowDate.getTime(); +/* */ +/* 154 */ long day = diff / nd; +/* */ +/* 156 */ long hour = diff % nd / nh; +/* */ +/* 158 */ long min = diff % nd % nh / nm; +/* */ +/* */ +/* 161 */ return day + "天" + hour + "小时" + min + "分钟"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\DateUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/ExceptionUtil.java b/src/main/java/com/archive/common/utils/ExceptionUtil.java new file mode 100644 index 0000000..b34bd91 --- /dev/null +++ b/src/main/java/com/archive/common/utils/ExceptionUtil.java @@ -0,0 +1,49 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import java.io.PrintWriter; +/* */ import java.io.StringWriter; +/* */ import org.apache.commons.lang3.exception.ExceptionUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ExceptionUtil +/* */ { +/* */ public static String getExceptionMessage(Throwable e) { +/* 20 */ StringWriter sw = new StringWriter(); +/* 21 */ e.printStackTrace(new PrintWriter(sw, true)); +/* 22 */ String str = sw.toString(); +/* 23 */ return str; +/* */ } +/* */ +/* */ +/* */ public static String getRootErrorMseeage(Exception e) { +/* 28 */ Throwable root = ExceptionUtils.getRootCause(e); +/* 29 */ root = (root == null) ? e : root; +/* 30 */ if (root == null) +/* */ { +/* 32 */ return ""; +/* */ } +/* 34 */ String msg = root.getMessage(); +/* 35 */ if (msg == null) +/* */ { +/* 37 */ return "null"; +/* */ } +/* 39 */ return StringUtils.defaultString(msg); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\ExceptionUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/IpUtils.java b/src/main/java/com/archive/common/utils/IpUtils.java new file mode 100644 index 0000000..0747bfa --- /dev/null +++ b/src/main/java/com/archive/common/utils/IpUtils.java @@ -0,0 +1,203 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import java.net.InetAddress; +/* */ import java.net.UnknownHostException; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class IpUtils +/* */ { +/* */ public static String getIpAddr(HttpServletRequest request) { +/* 16 */ if (request == null) +/* */ { +/* 18 */ return "unknown"; +/* */ } +/* 20 */ String ip = request.getHeader("x-forwarded-for"); +/* 21 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) +/* */ { +/* 23 */ ip = request.getHeader("Proxy-Client-IP"); +/* */ } +/* 25 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) +/* */ { +/* 27 */ ip = request.getHeader("X-Forwarded-For"); +/* */ } +/* 29 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) +/* */ { +/* 31 */ ip = request.getHeader("WL-Proxy-Client-IP"); +/* */ } +/* 33 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) +/* */ { +/* 35 */ ip = request.getHeader("X-Real-IP"); +/* */ } +/* */ +/* 38 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) +/* */ { +/* 40 */ ip = request.getRemoteAddr(); +/* */ } +/* */ +/* 43 */ return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; +/* */ } +/* */ +/* */ +/* */ public static boolean internalIp(String ip) { +/* 48 */ byte[] addr = textToNumericFormatV4(ip); +/* 49 */ return (internalIp(addr) || "127.0.0.1".equals(ip)); +/* */ } +/* */ +/* */ +/* */ private static boolean internalIp(byte[] addr) { +/* 54 */ if (StringUtils.isNull(addr) || addr.length < 2) +/* */ { +/* 56 */ return true; +/* */ } +/* 58 */ byte b0 = addr[0]; +/* 59 */ byte b1 = addr[1]; +/* */ +/* 61 */ byte SECTION_1 = 10; +/* */ +/* 63 */ byte SECTION_2 = -84; +/* 64 */ byte SECTION_3 = 16; +/* 65 */ byte SECTION_4 = 31; +/* */ +/* 67 */ byte SECTION_5 = -64; +/* 68 */ byte SECTION_6 = -88; +/* 69 */ switch (b0) { +/* */ +/* */ case 10: +/* 72 */ return true; +/* */ case -84: +/* 74 */ if (b1 >= 16 && b1 <= 31) +/* */ { +/* 76 */ return true; +/* */ } +/* */ case -64: +/* 79 */ switch (b1) { +/* */ +/* */ case -88: +/* 82 */ return true; +/* */ } break; +/* */ } +/* 85 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static byte[] textToNumericFormatV4(String text) { +/* 97 */ if (text.length() == 0) +/* */ { +/* 99 */ return null; +/* */ } +/* */ +/* 102 */ byte[] bytes = new byte[4]; +/* 103 */ String[] elements = text.split("\\.", -1); +/* */ +/* */ try { +/* */ long l; +/* */ int i; +/* 108 */ switch (elements.length) { +/* */ +/* */ case 1: +/* 111 */ l = Long.parseLong(elements[0]); +/* 112 */ if (l < 0L || l > 4294967295L) { +/* 113 */ return null; +/* */ } +/* 115 */ bytes[0] = (byte)(int)(l >> 24L & 0xFFL); +/* 116 */ bytes[1] = (byte)(int)((l & 0xFFFFFFL) >> 16L & 0xFFL); +/* 117 */ bytes[2] = (byte)(int)((l & 0xFFFFL) >> 8L & 0xFFL); +/* 118 */ bytes[3] = (byte)(int)(l & 0xFFL); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 168 */ return bytes;case 2: l = Integer.parseInt(elements[0]); if (l < 0L || l > 255L) return null; bytes[0] = (byte)(int)(l & 0xFFL); l = Integer.parseInt(elements[1]); if (l < 0L || l > 16777215L) return null; bytes[1] = (byte)(int)(l >> 16L & 0xFFL); bytes[2] = (byte)(int)((l & 0xFFFFL) >> 8L & 0xFFL); bytes[3] = (byte)(int)(l & 0xFFL); return bytes;case 3: for (i = 0; i < 2; i++) { l = Integer.parseInt(elements[i]); if (l < 0L || l > 255L) return null; bytes[i] = (byte)(int)(l & 0xFFL); } l = Integer.parseInt(elements[2]); if (l < 0L || l > 65535L) return null; bytes[2] = (byte)(int)(l >> 8L & 0xFFL); bytes[3] = (byte)(int)(l & 0xFFL); return bytes;case 4: for (i = 0; i < 4; i++) { l = Integer.parseInt(elements[i]); if (l < 0L || l > 255L) return null; bytes[i] = (byte)(int)(l & 0xFFL); } return bytes; +/* */ } +/* */ return null; +/* */ } catch (NumberFormatException e) { +/* */ return null; +/* */ } } public static String getHostIp() { +/* */ try { +/* 175 */ return InetAddress.getLocalHost().getHostAddress(); +/* */ } +/* 177 */ catch (UnknownHostException unknownHostException) { +/* */ +/* */ +/* 180 */ return "127.0.0.1"; +/* */ } +/* */ } +/* */ +/* */ +/* */ public static String getHostName() { +/* */ try { +/* 187 */ return InetAddress.getLocalHost().getHostName(); +/* */ } +/* 189 */ catch (UnknownHostException unknownHostException) { +/* */ +/* */ +/* 192 */ return "未知"; +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\IpUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/LogUtils.java b/src/main/java/com/archive/common/utils/LogUtils.java new file mode 100644 index 0000000..5400b2a --- /dev/null +++ b/src/main/java/com/archive/common/utils/LogUtils.java @@ -0,0 +1,142 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import com.alibaba.fastjson.JSON; +/* */ import com.archive.common.utils.IpUtils; +/* */ import java.io.PrintWriter; +/* */ import java.io.StringWriter; +/* */ import java.util.Map; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import org.apache.shiro.SecurityUtils; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class LogUtils +/* */ { +/* 19 */ public static final Logger ERROR_LOG = LoggerFactory.getLogger("sys-error"); +/* 20 */ public static final Logger ACCESS_LOG = LoggerFactory.getLogger("sys-access"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void logAccess(HttpServletRequest request) { +/* 29 */ String username = getUsername(); +/* 30 */ String jsessionId = request.getRequestedSessionId(); +/* 31 */ String ip = IpUtils.getIpAddr(request); +/* 32 */ String accept = request.getHeader("accept"); +/* 33 */ String userAgent = request.getHeader("User-Agent"); +/* 34 */ String url = request.getRequestURI(); +/* 35 */ String params = getParams(request); +/* */ +/* 37 */ StringBuilder s = new StringBuilder(); +/* 38 */ s.append(getBlock(username)); +/* 39 */ s.append(getBlock(jsessionId)); +/* 40 */ s.append(getBlock(ip)); +/* 41 */ s.append(getBlock(accept)); +/* 42 */ s.append(getBlock(userAgent)); +/* 43 */ s.append(getBlock(url)); +/* 44 */ s.append(getBlock(params)); +/* 45 */ s.append(getBlock(request.getHeader("Referer"))); +/* 46 */ getAccessLog().info(s.toString()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void logError(String message, Throwable e) { +/* 57 */ String username = getUsername(); +/* 58 */ StringBuilder s = new StringBuilder(); +/* 59 */ s.append(getBlock("exception")); +/* 60 */ s.append(getBlock(username)); +/* 61 */ s.append(getBlock(message)); +/* 62 */ ERROR_LOG.error(s.toString(), e); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void logPageError(HttpServletRequest request) { +/* 72 */ String username = getUsername(); +/* */ +/* 74 */ Integer statusCode = (Integer)request.getAttribute("javax.servlet.error.status_code"); +/* 75 */ String message = (String)request.getAttribute("javax.servlet.error.message"); +/* 76 */ String uri = (String)request.getAttribute("javax.servlet.error.request_uri"); +/* 77 */ Throwable t = (Throwable)request.getAttribute("javax.servlet.error.exception"); +/* */ +/* 79 */ if (statusCode == null) +/* */ { +/* 81 */ statusCode = Integer.valueOf(0); +/* */ } +/* */ +/* 84 */ StringBuilder s = new StringBuilder(); +/* 85 */ s.append(getBlock((t == null) ? "page" : "exception")); +/* 86 */ s.append(getBlock(username)); +/* 87 */ s.append(getBlock(statusCode)); +/* 88 */ s.append(getBlock(message)); +/* 89 */ s.append(getBlock(IpUtils.getIpAddr(request))); +/* */ +/* 91 */ s.append(getBlock(uri)); +/* 92 */ s.append(getBlock(request.getHeader("Referer"))); +/* 93 */ StringWriter sw = new StringWriter(); +/* */ +/* 95 */ while (t != null) { +/* */ +/* 97 */ t.printStackTrace(new PrintWriter(sw)); +/* 98 */ t = t.getCause(); +/* */ } +/* 100 */ s.append(getBlock(sw.toString())); +/* 101 */ getErrorLog().error(s.toString()); +/* */ } +/* */ +/* */ +/* */ +/* */ public static String getBlock(Object msg) { +/* 107 */ if (msg == null) +/* */ { +/* 109 */ msg = ""; +/* */ } +/* 111 */ return "[" + msg.toString() + "]"; +/* */ } +/* */ +/* */ +/* */ protected static String getParams(HttpServletRequest request) { +/* 116 */ Map params = request.getParameterMap(); +/* 117 */ return JSON.toJSONString(params); +/* */ } +/* */ +/* */ +/* */ protected static String getUsername() { +/* 122 */ return (String)SecurityUtils.getSubject().getPrincipal(); +/* */ } +/* */ +/* */ +/* */ public static Logger getAccessLog() { +/* 127 */ return ACCESS_LOG; +/* */ } +/* */ +/* */ +/* */ public static Logger getErrorLog() { +/* 132 */ return ERROR_LOG; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\LogUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/MapDataUtil.java b/src/main/java/com/archive/common/utils/MapDataUtil.java new file mode 100644 index 0000000..f8972bd --- /dev/null +++ b/src/main/java/com/archive/common/utils/MapDataUtil.java @@ -0,0 +1,62 @@ +/* */ package com.archive.common.utils + +; +/* */ +/* */ import java.util.HashMap; +/* */ import java.util.Iterator; +/* */ import java.util.Map; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MapDataUtil +/* */ { +/* */ public static Map convertDataMap(HttpServletRequest request) { +/* 18 */ Map properties = request.getParameterMap(); +/* 19 */ Map returnMap = new HashMap<>(); +/* 20 */ Iterator entries = properties.entrySet().iterator(); +/* */ +/* 22 */ String name = ""; +/* 23 */ String value = ""; +/* 24 */ while (entries.hasNext()) { +/* */ +/* 26 */ Map.Entry entry = (Map.Entry)entries.next(); +/* 27 */ name = (String)entry.getKey(); +/* 28 */ Object valueObj = entry.getValue(); +/* 29 */ if (null == valueObj) { +/* */ +/* 31 */ value = ""; +/* */ } +/* 33 */ else if (valueObj instanceof String[]) { +/* */ +/* 35 */ String[] values = (String[])valueObj; +/* 36 */ value = ""; +/* 37 */ for (int i = 0; i < values.length; i++) +/* */ { +/* 39 */ value = value + values[i] + ","; +/* */ } +/* 41 */ if (value.length() > 0) +/* */ { +/* 43 */ value = value.substring(0, value.length() - 1); +/* */ } +/* */ } +/* */ else { +/* */ +/* 48 */ value = valueObj.toString(); +/* */ } +/* 50 */ returnMap.put(name, value); +/* */ } +/* 52 */ return returnMap; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\MapDataUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/Md5Utils.java b/src/main/java/com/archive/common/utils/Md5Utils.java new file mode 100644 index 0000000..71ec8a2 --- /dev/null +++ b/src/main/java/com/archive/common/utils/Md5Utils.java @@ -0,0 +1,74 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import java.security.MessageDigest; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Md5Utils +/* */ { +/* 14 */ private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.Md5Utils.class); +/* */ +/* */ +/* */ +/* */ +/* */ private static byte[] md5(String s) { +/* */ try { +/* 21 */ MessageDigest algorithm = MessageDigest.getInstance("MD5"); +/* 22 */ algorithm.reset(); +/* 23 */ algorithm.update(s.getBytes("UTF-8")); +/* 24 */ byte[] messageDigest = algorithm.digest(); +/* 25 */ return messageDigest; +/* */ } +/* 27 */ catch (Exception e) { +/* */ +/* 29 */ log.error("MD5 Error...", e); +/* */ +/* 31 */ return null; +/* */ } +/* */ } +/* */ +/* */ private static final String toHex(byte[] hash) { +/* 36 */ if (hash == null) +/* */ { +/* 38 */ return null; +/* */ } +/* 40 */ StringBuffer buf = new StringBuffer(hash.length * 2); +/* */ +/* */ +/* 43 */ for (int i = 0; i < hash.length; i++) { +/* */ +/* 45 */ if ((hash[i] & 0xFF) < 16) +/* */ { +/* 47 */ buf.append("0"); +/* */ } +/* 49 */ buf.append(Long.toString((hash[i] & 0xFF), 16)); +/* */ } +/* 51 */ return buf.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ public static String hash(String s) { +/* */ try { +/* 58 */ return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8"); +/* */ } +/* 60 */ catch (Exception e) { +/* */ +/* 62 */ log.error("not supported charset...{}", e); +/* 63 */ return s; +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\Md5Utils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/MessageUtils.java b/src/main/java/com/archive/common/utils/MessageUtils.java new file mode 100644 index 0000000..2b6e722 --- /dev/null +++ b/src/main/java/com/archive/common/utils/MessageUtils.java @@ -0,0 +1,34 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import org.springframework.context.MessageSource; +/* */ import org.springframework.context.i18n.LocaleContextHolder; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MessageUtils +/* */ { +/* */ public static String message(String code, Object... args) { +/* 23 */ MessageSource messageSource = (MessageSource)SpringUtils.getBean(MessageSource.class); +/* 24 */ return messageSource.getMessage(code, args, LocaleContextHolder.getLocale()); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\MessageUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/ServletUtils.java b/src/main/java/com/archive/common/utils/ServletUtils.java new file mode 100644 index 0000000..e2ad4dd --- /dev/null +++ b/src/main/java/com/archive/common/utils/ServletUtils.java @@ -0,0 +1,172 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import java.io.IOException; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import javax.servlet.http.HttpSession; +/* */ import org.springframework.web.context.request.RequestAttributes; +/* */ import org.springframework.web.context.request.RequestContextHolder; +/* */ import org.springframework.web.context.request.ServletRequestAttributes; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ServletUtils +/* */ { +/* 22 */ private static final String[] agent = new String[] { "Android", "iPhone", "iPod", "iPad", "Windows Phone", "MQQBrowser" }; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getParameter(String name) { +/* 29 */ return getRequest().getParameter(name); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getParameter(String name, String defaultValue) { +/* 37 */ return Convert.toStr(getRequest().getParameter(name), defaultValue); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Integer getParameterToInt(String name) { +/* 45 */ return Convert.toInt(getRequest().getParameter(name)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Integer getParameterToInt(String name, Integer defaultValue) { +/* 53 */ return Convert.toInt(getRequest().getParameter(name), defaultValue); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static HttpServletRequest getRequest() { +/* 61 */ return getRequestAttributes().getRequest(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static HttpServletResponse getResponse() { +/* 69 */ return getRequestAttributes().getResponse(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static HttpSession getSession() { +/* 77 */ return getRequest().getSession(); +/* */ } +/* */ +/* */ +/* */ public static ServletRequestAttributes getRequestAttributes() { +/* 82 */ RequestAttributes attributes = RequestContextHolder.getRequestAttributes(); +/* 83 */ return (ServletRequestAttributes)attributes; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String renderString(HttpServletResponse response, String string) { +/* */ try { +/* 97 */ response.setContentType("application/json"); +/* 98 */ response.setCharacterEncoding("utf-8"); +/* 99 */ response.getWriter().print(string); +/* */ } +/* 101 */ catch (IOException e) { +/* */ +/* 103 */ e.printStackTrace(); +/* */ } +/* 105 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isAjaxRequest(HttpServletRequest request) { +/* 115 */ String accept = request.getHeader("accept"); +/* 116 */ if (accept != null && accept.indexOf("application/json") != -1) +/* */ { +/* 118 */ return true; +/* */ } +/* */ +/* 121 */ String xRequestedWith = request.getHeader("X-Requested-With"); +/* 122 */ if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1) +/* */ { +/* 124 */ return true; +/* */ } +/* */ +/* 127 */ String uri = request.getRequestURI(); +/* 128 */ if (StringUtils.inStringIgnoreCase(uri, new String[] { ".json", ".xml" })) +/* */ { +/* 130 */ return true; +/* */ } +/* */ +/* 133 */ String ajax = request.getParameter("__ajax"); +/* 134 */ if (StringUtils.inStringIgnoreCase(ajax, new String[] { "json", "xml" })) +/* */ { +/* 136 */ return true; +/* */ } +/* 138 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean checkAgentIsMobile(String ua) { +/* 146 */ boolean flag = false; +/* 147 */ if (!ua.contains("Windows NT") || (ua.contains("Windows NT") && ua.contains("compatible; MSIE 9.0;"))) +/* */ { +/* */ +/* 150 */ if (!ua.contains("Windows NT") && !ua.contains("Macintosh")) +/* */ { +/* 152 */ for (String item : agent) { +/* */ +/* 154 */ if (ua.contains(item)) { +/* */ +/* 156 */ flag = true; +/* */ break; +/* */ } +/* */ } +/* */ } +/* */ } +/* 162 */ return flag; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\ServletUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/StringUtils.java b/src/main/java/com/archive/common/utils/StringUtils.java new file mode 100644 index 0000000..0926d45 --- /dev/null +++ b/src/main/java/com/archive/common/utils/StringUtils.java @@ -0,0 +1,416 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import com.archive.common.utils.text.StrFormatter; +/* */ import java.util.Collection; +/* */ import java.util.Map; +/* */ import org.apache.commons.lang3.StringUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class StringUtils +/* */ extends StringUtils +/* */ { +/* */ private static final String NULLSTR = ""; +/* */ private static final char SEPARATOR = '_'; +/* */ +/* */ public static T nvl(T value, T defaultValue) { +/* 28 */ return (value != null) ? value : defaultValue; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isEmpty(Collection coll) { +/* 39 */ return (isNull(coll) || coll.isEmpty()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isNotEmpty(Collection coll) { +/* 50 */ return !isEmpty(coll); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isEmpty(Object[] objects) { +/* 61 */ return (isNull(objects) || objects.length == 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isNotEmpty(Object[] objects) { +/* 72 */ return !isEmpty(objects); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isEmpty(Map map) { +/* 83 */ return (isNull(map) || map.isEmpty()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isNotEmpty(Map map) { +/* 94 */ return !isEmpty(map); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isEmpty(String str) { +/* 105 */ return (isNull(str) || "".equals(str.trim())); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isNotEmpty(String str) { +/* 116 */ return !isEmpty(str); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isNull(Object object) { +/* 127 */ return (object == null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isNotNull(Object object) { +/* 138 */ return !isNull(object); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isArray(Object object) { +/* 149 */ return (isNotNull(object) && object.getClass().isArray()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String trim(String str) { +/* 157 */ return (str == null) ? "" : str.trim(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String substring(String str, int start) { +/* 169 */ if (str == null) +/* */ { +/* 171 */ return ""; +/* */ } +/* */ +/* 174 */ if (start < 0) +/* */ { +/* 176 */ start = str.length() + start; +/* */ } +/* */ +/* 179 */ if (start < 0) +/* */ { +/* 181 */ start = 0; +/* */ } +/* 183 */ if (start > str.length()) +/* */ { +/* 185 */ return ""; +/* */ } +/* */ +/* 188 */ return str.substring(start); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String substring(String str, int start, int end) { +/* 201 */ if (str == null) +/* */ { +/* 203 */ return ""; +/* */ } +/* */ +/* 206 */ if (end < 0) +/* */ { +/* 208 */ end = str.length() + end; +/* */ } +/* 210 */ if (start < 0) +/* */ { +/* 212 */ start = str.length() + start; +/* */ } +/* */ +/* 215 */ if (end > str.length()) +/* */ { +/* 217 */ end = str.length(); +/* */ } +/* */ +/* 220 */ if (start > end) +/* */ { +/* 222 */ return ""; +/* */ } +/* */ +/* 225 */ if (start < 0) +/* */ { +/* 227 */ start = 0; +/* */ } +/* 229 */ if (end < 0) +/* */ { +/* 231 */ end = 0; +/* */ } +/* */ +/* 234 */ return str.substring(start, end); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String format(String template, Object... params) { +/* 252 */ if (isEmpty(params) || isEmpty(template)) +/* */ { +/* 254 */ return template; +/* */ } +/* 256 */ return StrFormatter.format(template, params); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String toUnderScoreCase(String str) { +/* 264 */ if (str == null) +/* */ { +/* 266 */ return null; +/* */ } +/* 268 */ StringBuilder sb = new StringBuilder(); +/* */ +/* 270 */ boolean preCharIsUpperCase = true; +/* */ +/* 272 */ boolean curreCharIsUpperCase = true; +/* */ +/* 274 */ boolean nexteCharIsUpperCase = true; +/* 275 */ for (int i = 0; i < str.length(); i++) { +/* */ +/* 277 */ char c = str.charAt(i); +/* 278 */ if (i > 0) { +/* */ +/* 280 */ preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1)); +/* */ } +/* */ else { +/* */ +/* 284 */ preCharIsUpperCase = false; +/* */ } +/* */ +/* 287 */ curreCharIsUpperCase = Character.isUpperCase(c); +/* */ +/* 289 */ if (i < str.length() - 1) +/* */ { +/* 291 */ nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1)); +/* */ } +/* */ +/* 294 */ if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) { +/* */ +/* 296 */ sb.append('_'); +/* */ } +/* 298 */ else if (i != 0 && !preCharIsUpperCase && curreCharIsUpperCase) { +/* */ +/* 300 */ sb.append('_'); +/* */ } +/* 302 */ sb.append(Character.toLowerCase(c)); +/* */ } +/* 304 */ return sb.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean inStringIgnoreCase(String str, String... strs) { +/* 316 */ if (str != null && strs != null) +/* */ { +/* 318 */ for (String s : strs) { +/* */ +/* 320 */ if (str.equalsIgnoreCase(trim(s))) +/* */ { +/* 322 */ return true; +/* */ } +/* */ } +/* */ } +/* 326 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String convertToCamelCase(String name) { +/* 337 */ StringBuilder result = new StringBuilder(); +/* */ +/* 339 */ if (name == null || name.isEmpty()) +/* */ { +/* */ +/* 342 */ return ""; +/* */ } +/* 344 */ if (!name.contains("_")) +/* */ { +/* */ +/* 347 */ return name.substring(0, 1).toUpperCase() + name.substring(1); +/* */ } +/* */ +/* 350 */ String[] camels = name.split("_"); +/* 351 */ for (String camel : camels) { +/* */ +/* */ +/* 354 */ if (!camel.isEmpty()) { +/* */ +/* */ +/* */ +/* */ +/* 359 */ result.append(camel.substring(0, 1).toUpperCase()); +/* 360 */ result.append(camel.substring(1).toLowerCase()); +/* */ } +/* 362 */ } return result.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String toCamelCase(String s) { +/* 371 */ if (s == null) +/* */ { +/* 373 */ return null; +/* */ } +/* 375 */ if (s.indexOf('_') == -1) +/* */ { +/* 377 */ return s; +/* */ } +/* 379 */ s = s.toLowerCase(); +/* 380 */ StringBuilder sb = new StringBuilder(s.length()); +/* 381 */ boolean upperCase = false; +/* 382 */ for (int i = 0; i < s.length(); i++) { +/* */ +/* 384 */ char c = s.charAt(i); +/* */ +/* 386 */ if (c == '_') { +/* */ +/* 388 */ upperCase = true; +/* */ } +/* 390 */ else if (upperCase) { +/* */ +/* 392 */ sb.append(Character.toUpperCase(c)); +/* 393 */ upperCase = false; +/* */ } +/* */ else { +/* */ +/* 397 */ sb.append(c); +/* */ } +/* */ } +/* 400 */ return sb.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ public static T cast(Object obj) { +/* 406 */ return (T)obj; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\StringUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/Threads.java b/src/main/java/com/archive/common/utils/Threads.java new file mode 100644 index 0000000..3266c97 --- /dev/null +++ b/src/main/java/com/archive/common/utils/Threads.java @@ -0,0 +1,107 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import java.util.concurrent.CancellationException; +/* */ import java.util.concurrent.ExecutionException; +/* */ import java.util.concurrent.ExecutorService; +/* */ import java.util.concurrent.Future; +/* */ import java.util.concurrent.TimeUnit; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Threads +/* */ { +/* 18 */ private static final Logger logger = LoggerFactory.getLogger(com.archive.common.utils.Threads.class); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void sleep(long milliseconds) { +/* */ try { +/* 27 */ Thread.sleep(milliseconds); +/* */ } +/* 29 */ catch (InterruptedException e) { +/* */ return; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void shutdownAndAwaitTermination(ExecutorService pool) { +/* 44 */ if (pool != null && !pool.isShutdown()) { +/* */ +/* 46 */ pool.shutdown(); +/* */ +/* */ try { +/* 49 */ if (!pool.awaitTermination(120L, TimeUnit.SECONDS)) +/* */ { +/* 51 */ pool.shutdownNow(); +/* 52 */ if (!pool.awaitTermination(120L, TimeUnit.SECONDS)) +/* */ { +/* 54 */ logger.info("Pool did not terminate"); +/* */ } +/* */ } +/* */ +/* 58 */ } catch (InterruptedException ie) { +/* */ +/* 60 */ pool.shutdownNow(); +/* 61 */ Thread.currentThread().interrupt(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void printException(Runnable r, Throwable t) { +/* 71 */ if (t == null && r instanceof Future) { +/* */ +/* */ try { +/* */ +/* 75 */ Future future = (Future)r; +/* 76 */ if (future.isDone()) +/* */ { +/* 78 */ future.get(); +/* */ } +/* */ } +/* 81 */ catch (CancellationException ce) { +/* */ +/* 83 */ t = ce; +/* */ } +/* 85 */ catch (ExecutionException ee) { +/* */ +/* 87 */ t = ee.getCause(); +/* */ } +/* 89 */ catch (InterruptedException ie) { +/* */ +/* 91 */ Thread.currentThread().interrupt(); +/* */ } +/* */ } +/* 94 */ if (t != null) +/* */ { +/* 96 */ logger.error(t.getMessage(), t); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\Threads.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/TreeUtils.java b/src/main/java/com/archive/common/utils/TreeUtils.java new file mode 100644 index 0000000..b93a85a --- /dev/null +++ b/src/main/java/com/archive/common/utils/TreeUtils.java @@ -0,0 +1,145 @@ +/* */ package com.archive.common.utils + +-INF.classes.com.archive.common.utils; +/* */ +/* */ import com.archive.project.system.menu.domain.Menu; +/* */ import java.util.ArrayList; +/* */ import java.util.Iterator; +/* */ import java.util.List; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TreeUtils +/* */ { +/* */ public static List getChildPerms(List list, int parentId) { +/* 24 */ List returnList = new ArrayList<>(); +/* 25 */ for (Iterator iterator = list.iterator(); iterator.hasNext(); ) { +/* */ +/* 27 */ Menu t = iterator.next(); +/* */ +/* 29 */ if (t.getParentId().longValue() == parentId) { +/* */ +/* 31 */ recursionFn(list, t); +/* 32 */ returnList.add(t); +/* */ } +/* */ } +/* 35 */ return returnList; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static void recursionFn(List list, Menu t) { +/* 47 */ List childList = getChildList(list, t); +/* 48 */ t.setChildren(childList); +/* 49 */ for (Menu tChild : childList) { +/* */ +/* 51 */ if (hasChild(list, tChild)) +/* */ { +/* 53 */ recursionFn(list, tChild); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static List getChildList(List list, Menu t) { +/* 64 */ List tlist = new ArrayList<>(); +/* 65 */ Iterator it = list.iterator(); +/* 66 */ while (it.hasNext()) { +/* */ +/* 68 */ Menu n = it.next(); +/* 69 */ if (n.getParentId().longValue() == t.getMenuId().longValue()) +/* */ { +/* 71 */ tlist.add(n); +/* */ } +/* */ } +/* 74 */ return tlist; +/* */ } +/* */ +/* 77 */ List returnList = new ArrayList<>(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List getChildPerms(List list, int typeId, String prefix) { +/* 88 */ if (list == null) +/* */ { +/* 90 */ return null; +/* */ } +/* 92 */ for (Iterator iterator = list.iterator(); iterator.hasNext(); ) { +/* */ +/* 94 */ Menu node = iterator.next(); +/* */ +/* 96 */ if (node.getParentId().longValue() == typeId) +/* */ { +/* 98 */ recursionFn(list, node, prefix); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 105 */ return this.returnList; +/* */ } +/* */ +/* */ +/* */ +/* */ private void recursionFn(List list, Menu node, String p) { +/* 111 */ List childList = getChildList(list, node); +/* 112 */ if (hasChild(list, node)) { +/* */ +/* */ +/* 115 */ this.returnList.add(node); +/* 116 */ Iterator it = childList.iterator(); +/* 117 */ while (it.hasNext()) +/* */ { +/* 119 */ Menu n = it.next(); +/* 120 */ n.setMenuName(p + n.getMenuName()); +/* 121 */ recursionFn(list, n, p + p); +/* */ } +/* */ +/* */ } else { +/* */ +/* 126 */ this.returnList.add(node); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static boolean hasChild(List list, Menu t) { +/* 135 */ return (getChildList(list, t).size() > 0); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\TreeUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/bean/BeanUtils.java b/src/main/java/com/archive/common/utils/bean/BeanUtils.java new file mode 100644 index 0000000..9daaf6f --- /dev/null +++ b/src/main/java/com/archive/common/utils/bean/BeanUtils.java @@ -0,0 +1,116 @@ +/* */ package com.archive.common.utils.bean; +/* */ +/* */ import java.lang.reflect.Method; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import java.util.regex.Matcher; +/* */ import java.util.regex.Pattern; +/* */ import org.springframework.beans.BeanUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BeanUtils +/* */ extends BeanUtils +/* */ { +/* */ private static final int BEAN_METHOD_PROP_INDEX = 3; +/* 20 */ private static final Pattern GET_PATTERN = Pattern.compile("get(\\p{javaUpperCase}\\w*)"); +/* */ +/* */ +/* 23 */ private static final Pattern SET_PATTERN = Pattern.compile("set(\\p{javaUpperCase}\\w*)"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void copyBeanProp(Object dest, Object src) { +/* */ try { +/* 35 */ copyProperties(src, dest); +/* */ } +/* 37 */ catch (Exception e) { +/* */ +/* 39 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static List getSetterMethods(Object obj) { +/* 52 */ List setterMethods = new ArrayList<>(); +/* */ +/* */ +/* 55 */ Method[] methods = obj.getClass().getMethods(); +/* */ +/* */ +/* */ +/* 59 */ for (Method method : methods) { +/* */ +/* 61 */ Matcher m = SET_PATTERN.matcher(method.getName()); +/* 62 */ if (m.matches() && (method.getParameterTypes()).length == 1) +/* */ { +/* 64 */ setterMethods.add(method); +/* */ } +/* */ } +/* */ +/* 68 */ return setterMethods; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static List getGetterMethods(Object obj) { +/* 81 */ List getterMethods = new ArrayList<>(); +/* */ +/* 83 */ Method[] methods = obj.getClass().getMethods(); +/* */ +/* 85 */ for (Method method : methods) { +/* */ +/* 87 */ Matcher m = GET_PATTERN.matcher(method.getName()); +/* 88 */ if (m.matches() && (method.getParameterTypes()).length == 0) +/* */ { +/* 90 */ getterMethods.add(method); +/* */ } +/* */ } +/* */ +/* 94 */ return getterMethods; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isMethodPropEquals(String m1, String m2) { +/* 108 */ return m1.substring(3).equals(m2.substring(3)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\bean\BeanUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/file/FileTypeUtils.java b/src/main/java/com/archive/common/utils/file/FileTypeUtils.java new file mode 100644 index 0000000..cd641a3 --- /dev/null +++ b/src/main/java/com/archive/common/utils/file/FileTypeUtils.java @@ -0,0 +1,82 @@ +/* */ package com.archive.common.utils.file; +/* */ +/* */ import java.io.File; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class FileTypeUtils +/* */ { +/* */ public static String getFileType(File file) { +/* 23 */ if (null == file) +/* */ { +/* 25 */ return ""; +/* */ } +/* 27 */ return getFileType(file.getName()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getFileType(String fileName) { +/* 40 */ int separatorIndex = fileName.lastIndexOf("."); +/* 41 */ if (separatorIndex < 0) +/* */ { +/* 43 */ return ""; +/* */ } +/* 45 */ return fileName.substring(separatorIndex + 1).toLowerCase(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getFileExtendName(byte[] photoByte) { +/* 56 */ String strFileExtendName = "JPG"; +/* 57 */ if (photoByte[0] == 71 && photoByte[1] == 73 && photoByte[2] == 70 && photoByte[3] == 56 && (photoByte[4] == 55 || photoByte[4] == 57) && photoByte[5] == 97) { +/* */ +/* */ +/* 60 */ strFileExtendName = "GIF"; +/* */ } +/* 62 */ else if (photoByte[6] == 74 && photoByte[7] == 70 && photoByte[8] == 73 && photoByte[9] == 70) { +/* */ +/* 64 */ strFileExtendName = "JPG"; +/* */ } +/* 66 */ else if (photoByte[0] == 66 && photoByte[1] == 77) { +/* */ +/* 68 */ strFileExtendName = "BMP"; +/* */ } +/* 70 */ else if (photoByte[1] == 80 && photoByte[2] == 78 && photoByte[3] == 71) { +/* */ +/* 72 */ strFileExtendName = "PNG"; +/* */ } +/* 74 */ return strFileExtendName; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\FileTypeUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/file/FileUploadUtils.java b/src/main/java/com/archive/common/utils/file/FileUploadUtils.java new file mode 100644 index 0000000..4df6f84 --- /dev/null +++ b/src/main/java/com/archive/common/utils/file/FileUploadUtils.java @@ -0,0 +1,241 @@ +/* */ package com.archive.common.utils.file; +/* */ +/* */ import com.archive.common.exception.file.FileNameLengthLimitExceededException; +/* */ import com.archive.common.exception.file.FileSizeLimitExceededException; +/* */ import com.archive.common.exception.file.InvalidExtensionException; +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.file.MimeTypeUtils; +/* */ import com.archive.common.utils.uuid.IdUtils; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import org.apache.commons.io.FilenameUtils; +/* */ import org.springframework.web.multipart.MultipartFile; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class FileUploadUtils +/* */ { +/* */ public static final long DEFAULT_MAX_SIZE = 52428800L; +/* */ public static final int DEFAULT_FILE_NAME_LENGTH = 100; +/* 36 */ private static String defaultBaseDir = ArchiveConfig.getInstance().getProfile(); +/* */ +/* */ +/* */ public static void setDefaultBaseDir(String defaultBaseDir) { +/* 40 */ com.archive.common.utils.file.FileUploadUtils.defaultBaseDir = defaultBaseDir; +/* */ } +/* */ +/* */ +/* */ public static String getDefaultBaseDir() { +/* 45 */ return defaultBaseDir; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final String upload(MultipartFile file) throws IOException { +/* */ try { +/* 59 */ return upload(getDefaultBaseDir(), file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); +/* */ } +/* 61 */ catch (Exception e) { +/* */ +/* 63 */ throw new IOException(e.getMessage(), e); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final String upload(String baseDir, MultipartFile file) throws IOException { +/* */ try { +/* 79 */ return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); +/* */ } +/* 81 */ catch (Exception e) { +/* */ +/* 83 */ throw new IOException(e.getMessage(), e); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension) throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, InvalidExtensionException { +/* 103 */ int fileNamelength = file.getOriginalFilename().length(); +/* 104 */ if (fileNamelength > 100) +/* */ { +/* 106 */ throw new FileNameLengthLimitExceededException(100); +/* */ } +/* */ +/* 109 */ assertAllowed(file, allowedExtension); +/* */ +/* 111 */ String fileName = extractFilename(file); +/* */ +/* 113 */ File desc = getAbsoluteFile(baseDir, fileName); +/* 114 */ file.transferTo(desc); +/* 115 */ String pathFileName = getPathFileName(baseDir, fileName); +/* 116 */ return pathFileName; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final String extractFilename(MultipartFile file) { +/* 124 */ String fileName = file.getOriginalFilename(); +/* 125 */ String extension = getExtension(file); +/* 126 */ fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension; +/* 127 */ return fileName; +/* */ } +/* */ +/* */ +/* */ private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException { +/* 132 */ File desc = new File(uploadDir + File.separator + fileName); +/* */ +/* 134 */ if (!desc.exists()) +/* */ { +/* 136 */ if (!desc.getParentFile().exists()) +/* */ { +/* 138 */ desc.getParentFile().mkdirs(); +/* */ } +/* */ } +/* 141 */ return desc; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private static final String getPathFileName(String uploadDir, String fileName) throws IOException { +/* 148 */ String pathFileName = uploadDir + "/" + fileName; +/* 149 */ return pathFileName; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final void assertAllowed(MultipartFile file, String[] allowedExtension) throws FileSizeLimitExceededException, InvalidExtensionException { +/* 163 */ long size = file.getSize(); +/* 164 */ if (size > 52428800L) +/* */ { +/* 166 */ throw new FileSizeLimitExceededException(50L); +/* */ } +/* */ +/* 169 */ String fileName = file.getOriginalFilename(); +/* 170 */ String extension = getExtension(file); +/* 171 */ if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension)) { +/* */ +/* 173 */ if (allowedExtension == MimeTypeUtils.IMAGE_EXTENSION) +/* */ { +/* 175 */ throw new InvalidExtensionException.InvalidImageExtensionException(allowedExtension, extension, fileName); +/* */ } +/* */ +/* 178 */ if (allowedExtension == MimeTypeUtils.FLASH_EXTENSION) +/* */ { +/* 180 */ throw new InvalidExtensionException.InvalidFlashExtensionException(allowedExtension, extension, fileName); +/* */ } +/* */ +/* 183 */ if (allowedExtension == MimeTypeUtils.MEDIA_EXTENSION) +/* */ { +/* 185 */ throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension, fileName); +/* */ } +/* */ +/* 188 */ if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION) +/* */ { +/* 190 */ throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension, fileName); +/* */ } +/* */ +/* */ +/* */ +/* 195 */ throw new InvalidExtensionException(allowedExtension, extension, fileName); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final boolean isAllowedExtension(String extension, String[] allowedExtension) { +/* 210 */ for (String str : allowedExtension) { +/* */ +/* 212 */ if (str.equalsIgnoreCase(extension)) +/* */ { +/* 214 */ return true; +/* */ } +/* */ } +/* 217 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final String getExtension(MultipartFile file) { +/* 228 */ String extension = FilenameUtils.getExtension(file.getOriginalFilename()); +/* 229 */ if (StringUtils.isEmpty(extension)) +/* */ { +/* 231 */ extension = MimeTypeUtils.getExtension(file.getContentType()); +/* */ } +/* 233 */ return extension; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\FileUploadUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/file/FileUtils.java b/src/main/java/com/archive/common/utils/file/FileUtils.java new file mode 100644 index 0000000..968128a --- /dev/null +++ b/src/main/java/com/archive/common/utils/file/FileUtils.java @@ -0,0 +1,212 @@ +/* */ package com.archive.common.utils.file; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.file.FileTypeUtils; +/* */ import com.archive.common.utils.file.MimeTypeUtils; +/* */ import java.io.File; +/* */ import java.io.FileInputStream; +/* */ import java.io.IOException; +/* */ import java.io.OutputStream; +/* */ import java.io.UnsupportedEncodingException; +/* */ import java.net.URLEncoder; +/* */ import java.nio.charset.StandardCharsets; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import org.apache.commons.io.FileUtils; +/* */ import org.apache.commons.lang3.ArrayUtils; +/* */ +/* */ +/* */ +/* */ public class FileUtils +/* */ extends FileUtils +/* */ { +/* 23 */ public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void writeBytes(String filePath, OutputStream os) throws IOException { +/* 34 */ FileInputStream fis = null; +/* */ +/* */ try { +/* 37 */ File file = new File(filePath); +/* 38 */ if (!file.exists()) +/* */ { +/* 40 */ if (!(new File(file.getParent())).exists()) { +/* 41 */ (new File(file.getParent())).mkdirs(); +/* */ } +/* */ } +/* */ +/* 45 */ fis = new FileInputStream(file); +/* 46 */ byte[] b = new byte[1024]; +/* */ int length; +/* 48 */ while ((length = fis.read(b)) > 0) +/* */ { +/* 50 */ os.write(b, 0, length); +/* */ } +/* */ } +/* 53 */ catch (IOException e) { +/* */ +/* 55 */ throw e; +/* */ } +/* */ finally { +/* */ +/* 59 */ if (os != null) { +/* */ +/* */ try { +/* */ +/* 63 */ os.close(); +/* */ } +/* 65 */ catch (IOException e1) { +/* */ +/* 67 */ e1.printStackTrace(); +/* */ } +/* */ } +/* 70 */ if (fis != null) { +/* */ +/* */ try { +/* */ +/* 74 */ fis.close(); +/* */ } +/* 76 */ catch (IOException e1) { +/* */ +/* 78 */ e1.printStackTrace(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean deleteFile(String filePath) { +/* 92 */ boolean flag = false; +/* 93 */ File file = new File(filePath); +/* */ +/* 95 */ if (file.isFile() && file.exists()) { +/* */ +/* 97 */ file.delete(); +/* 98 */ flag = true; +/* */ } +/* 100 */ return flag; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isValidFilename(String filename) { +/* 111 */ return filename.matches(FILENAME_PATTERN); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean checkAllowDownload(String resource) { +/* 123 */ if (StringUtils.contains(resource, "..")) +/* */ { +/* 125 */ return false; +/* */ } +/* */ +/* */ +/* 129 */ if (ArrayUtils.contains((Object[])MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION, FileTypeUtils.getFileType(resource))) +/* */ { +/* 131 */ return true; +/* */ } +/* */ +/* */ +/* 135 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String setFileDownloadHeader(HttpServletRequest request, String fileName) throws UnsupportedEncodingException { +/* 147 */ String agent = request.getHeader("USER-AGENT"); +/* 148 */ String filename = fileName; +/* 149 */ if (agent.contains("MSIE")) { +/* */ +/* */ +/* 152 */ filename = URLEncoder.encode(filename, "utf-8"); +/* 153 */ filename = filename.replace("+", " "); +/* */ } +/* 155 */ else if (agent.contains("Firefox")) { +/* */ +/* */ +/* 158 */ filename = new String(fileName.getBytes(), "ISO8859-1"); +/* */ } +/* 160 */ else if (agent.contains("Chrome")) { +/* */ +/* */ +/* 163 */ filename = URLEncoder.encode(filename, "utf-8"); +/* */ +/* */ } +/* */ else { +/* */ +/* 168 */ filename = URLEncoder.encode(filename, "utf-8"); +/* */ } +/* 170 */ return filename; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void setAttachmentResponseHeader(HttpServletResponse response, String realFileName) throws UnsupportedEncodingException { +/* 182 */ String percentEncodedFileName = percentEncode(realFileName); +/* */ +/* 184 */ StringBuilder contentDispositionValue = new StringBuilder(); +/* 185 */ contentDispositionValue.append("attachment; filename=") +/* 186 */ .append(percentEncodedFileName) +/* 187 */ .append(";") +/* 188 */ .append("filename*=") +/* 189 */ .append("utf-8''") +/* 190 */ .append(percentEncodedFileName); +/* */ +/* 192 */ response.setHeader("Content-disposition", contentDispositionValue.toString()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String percentEncode(String s) throws UnsupportedEncodingException { +/* 203 */ String encode = URLEncoder.encode(s, StandardCharsets.UTF_8.toString()); +/* 204 */ return encode.replaceAll("\\+", "%20"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\FileUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/file/ImageUtils.java b/src/main/java/com/archive/common/utils/file/ImageUtils.java new file mode 100644 index 0000000..d963892 --- /dev/null +++ b/src/main/java/com/archive/common/utils/file/ImageUtils.java @@ -0,0 +1,106 @@ +/* */ package com.archive.common.utils.file; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import java.io.ByteArrayInputStream; +/* */ import java.io.ByteArrayOutputStream; +/* */ import java.io.FileInputStream; +/* */ import java.io.InputStream; +/* */ import java.net.URL; +/* */ import java.net.URLConnection; +/* */ import java.util.Arrays; +/* */ import org.apache.poi.util.IOUtils; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ImageUtils +/* */ { +/* 24 */ private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.file.ImageUtils.class); +/* */ +/* */ +/* */ public static byte[] getImage(String imagePath) { +/* 28 */ InputStream is = getFile(imagePath); +/* */ +/* */ try { +/* 31 */ return IOUtils.toByteArray(is); +/* */ } +/* 33 */ catch (Exception e) { +/* */ +/* 35 */ log.error("图片加载异常 {}", e); +/* 36 */ return null; +/* */ } +/* */ finally { +/* */ +/* 40 */ IOUtils.closeQuietly(is); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public static InputStream getFile(String imagePath) { +/* */ try { +/* 48 */ byte[] result = readFile(imagePath); +/* 49 */ result = Arrays.copyOf(result, result.length); +/* 50 */ return new ByteArrayInputStream(result); +/* */ } +/* 52 */ catch (Exception e) { +/* */ +/* 54 */ log.error("获取图片异常 {}", e); +/* */ +/* 56 */ return null; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static byte[] readFile(String url) { +/* 67 */ InputStream in = null; +/* 68 */ ByteArrayOutputStream baos = null; +/* */ +/* */ try { +/* 71 */ if (url.startsWith("http")) { +/* */ +/* */ +/* 74 */ URL urlObj = new URL(url); +/* 75 */ URLConnection urlConnection = urlObj.openConnection(); +/* 76 */ urlConnection.setConnectTimeout(30000); +/* 77 */ urlConnection.setReadTimeout(60000); +/* 78 */ urlConnection.setDoInput(true); +/* 79 */ in = urlConnection.getInputStream(); +/* */ +/* */ } +/* */ else { +/* */ +/* 84 */ String localPath = ArchiveConfig.getInstance().getProfile(); +/* 85 */ String downloadPath = localPath + StringUtils.substringAfter(url, "/profile"); +/* 86 */ in = new FileInputStream(downloadPath); +/* */ } +/* 88 */ return IOUtils.toByteArray(in); +/* */ } +/* 90 */ catch (Exception e) { +/* */ +/* 92 */ log.error("获取文件路径异常 {}", e); +/* 93 */ return null; +/* */ } +/* */ finally { +/* */ +/* 97 */ IOUtils.closeQuietly(baos); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\ImageUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/file/MimeTypeUtils.java b/src/main/java/com/archive/common/utils/file/MimeTypeUtils.java new file mode 100644 index 0000000..6dbe3a6 --- /dev/null +++ b/src/main/java/com/archive/common/utils/file/MimeTypeUtils.java @@ -0,0 +1,64 @@ +/* */ package com.archive.common.utils.file; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MimeTypeUtils +/* */ { +/* */ public static final String IMAGE_PNG = "image/png"; +/* */ public static final String IMAGE_JPG = "image/jpg"; +/* */ public static final String IMAGE_JPEG = "image/jpeg"; +/* */ public static final String IMAGE_BMP = "image/bmp"; +/* */ public static final String IMAGE_GIF = "image/gif"; +/* 20 */ public static final String[] IMAGE_EXTENSION = new String[] { "bmp", "gif", "jpg", "jpeg", "png" }; +/* */ +/* 22 */ public static final String[] FLASH_EXTENSION = new String[] { "swf", "flv" }; +/* */ +/* 24 */ public static final String[] MEDIA_EXTENSION = new String[] { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg", "asf", "rm", "rmvb" }; +/* */ +/* */ +/* 27 */ public static final String[] VIDEO_EXTENSION = new String[] { "mp4", "avi", "rmvb" }; +/* */ +/* 29 */ public static final String[] DEFAULT_ALLOWED_EXTENSION = new String[] { "bmp", "gif", "jpg", "jpeg", "png", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", "rar", "zip", "gz", "bz2", "mp4", "avi", "rmvb", "pdf" }; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getExtension(String prefix) { +/* 43 */ switch (prefix) { +/* */ +/* */ case "image/png": +/* 46 */ return "png"; +/* */ case "image/jpg": +/* 48 */ return "jpg"; +/* */ case "image/jpeg": +/* 50 */ return "jpeg"; +/* */ case "image/bmp": +/* 52 */ return "bmp"; +/* */ case "image/gif": +/* 54 */ return "gif"; +/* */ } +/* 56 */ return ""; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\MimeTypeUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/html/EscapeUtil.java b/src/main/java/com/archive/common/utils/html/EscapeUtil.java new file mode 100644 index 0000000..098441f --- /dev/null +++ b/src/main/java/com/archive/common/utils/html/EscapeUtil.java @@ -0,0 +1,161 @@ +/* */ package com.archive.common.utils.html; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.html.HTMLFilter; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class EscapeUtil +/* */ { +/* */ public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)"; +/* 14 */ private static final char[][] TEXT = new char[64][]; +/* */ +/* */ +/* */ static { +/* 18 */ for (int i = 0; i < 64; i++) { +/* */ +/* 20 */ (new char[1])[0] = (char)i; TEXT[i] = new char[1]; +/* */ } +/* */ +/* */ +/* 24 */ TEXT[39] = "'".toCharArray(); +/* 25 */ TEXT[34] = """.toCharArray(); +/* 26 */ TEXT[38] = "&".toCharArray(); +/* 27 */ TEXT[60] = "<".toCharArray(); +/* 28 */ TEXT[62] = ">".toCharArray(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String escape(String text) { +/* 39 */ return encode(text); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String unescape(String content) { +/* 50 */ return decode(content); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String clean(String content) { +/* 61 */ return (new HTMLFilter()).filter(content); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static String encode(String text) { +/* */ int len; +/* 73 */ if (text == null || (len = text.length()) == 0) +/* */ { +/* 75 */ return ""; +/* */ } +/* 77 */ StringBuilder buffer = new StringBuilder(len + (len >> 2)); +/* */ +/* 79 */ for (int i = 0; i < len; i++) { +/* */ +/* 81 */ char c = text.charAt(i); +/* 82 */ if (c < '@') { +/* */ +/* 84 */ buffer.append(TEXT[c]); +/* */ } +/* */ else { +/* */ +/* 88 */ buffer.append(c); +/* */ } +/* */ } +/* 91 */ return buffer.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String decode(String content) { +/* 102 */ if (StringUtils.isEmpty(content)) +/* */ { +/* 104 */ return content; +/* */ } +/* */ +/* 107 */ StringBuilder tmp = new StringBuilder(content.length()); +/* 108 */ int lastPos = 0, pos = 0; +/* */ +/* 110 */ while (lastPos < content.length()) { +/* */ +/* 112 */ pos = content.indexOf("%", lastPos); +/* 113 */ if (pos == lastPos) { +/* */ +/* 115 */ if (content.charAt(pos + 1) == 'u') { +/* */ +/* 117 */ char c = (char)Integer.parseInt(content.substring(pos + 2, pos + 6), 16); +/* 118 */ tmp.append(c); +/* 119 */ lastPos = pos + 6; +/* */ +/* */ continue; +/* */ } +/* 123 */ char ch = (char)Integer.parseInt(content.substring(pos + 1, pos + 3), 16); +/* 124 */ tmp.append(ch); +/* 125 */ lastPos = pos + 3; +/* */ +/* */ continue; +/* */ } +/* */ +/* 130 */ if (pos == -1) { +/* */ +/* 132 */ tmp.append(content.substring(lastPos)); +/* 133 */ lastPos = content.length(); +/* */ +/* */ continue; +/* */ } +/* 137 */ tmp.append(content.substring(lastPos, pos)); +/* 138 */ lastPos = pos; +/* */ } +/* */ +/* */ +/* 142 */ return tmp.toString(); +/* */ } +/* */ +/* */ +/* */ public static void main(String[] args) { +/* 147 */ String html = ""; +/* */ +/* */ +/* */ +/* 151 */ System.out.println(clean(html)); +/* 152 */ System.out.println(escape(html)); +/* 153 */ System.out.println(unescape(html)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\html\EscapeUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/html/HTMLFilter.java b/src/main/java/com/archive/common/utils/html/HTMLFilter.java new file mode 100644 index 0000000..74f6ad8 --- /dev/null +++ b/src/main/java/com/archive/common/utils/html/HTMLFilter.java @@ -0,0 +1,576 @@ +/* */ package com.archive.common.utils.html; +/* */ +/* */ import java.util.ArrayList; +/* */ import java.util.Collections; +/* */ import java.util.HashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import java.util.concurrent.ConcurrentHashMap; +/* */ import java.util.concurrent.ConcurrentMap; +/* */ import java.util.regex.Matcher; +/* */ import java.util.regex.Pattern; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public final class HTMLFilter +/* */ { +/* */ private static final int REGEX_FLAGS_SI = 34; +/* 24 */ private static final Pattern P_COMMENTS = Pattern.compile("", 32); +/* 25 */ private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", 34); +/* 26 */ private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", 32); +/* 27 */ private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", 34); +/* 28 */ private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", 34); +/* 29 */ private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", 34); +/* 30 */ private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", 34); +/* 31 */ private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", 34); +/* 32 */ private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?"); +/* 33 */ private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?"); +/* 34 */ private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?"); +/* 35 */ private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))"); +/* 36 */ private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", 32); +/* 37 */ private static final Pattern P_END_ARROW = Pattern.compile("^>"); +/* 38 */ private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)"); +/* 39 */ private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)"); +/* 40 */ private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)"); +/* 41 */ private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)"); +/* 42 */ private static final Pattern P_AMP = Pattern.compile("&"); +/* 43 */ private static final Pattern P_QUOTE = Pattern.compile("\""); +/* 44 */ private static final Pattern P_LEFT_ARROW = Pattern.compile("<"); +/* 45 */ private static final Pattern P_RIGHT_ARROW = Pattern.compile(">"); +/* 46 */ private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>"); +/* */ +/* */ +/* 49 */ private static final ConcurrentMap P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<>(); +/* 50 */ private static final ConcurrentMap P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<>(); +/* */ +/* */ +/* */ +/* */ +/* */ private final Map> vAllowed; +/* */ +/* */ +/* */ +/* 59 */ private final Map vTagCounts = new HashMap<>(); +/* */ +/* */ +/* */ +/* */ private final String[] vSelfClosingTags; +/* */ +/* */ +/* */ +/* */ private final String[] vNeedClosingTags; +/* */ +/* */ +/* */ +/* */ private final String[] vDisallowed; +/* */ +/* */ +/* */ +/* */ private final String[] vProtocolAtts; +/* */ +/* */ +/* */ +/* */ private final String[] vAllowedProtocols; +/* */ +/* */ +/* */ +/* */ private final String[] vRemoveBlanks; +/* */ +/* */ +/* */ +/* */ private final String[] vAllowedEntities; +/* */ +/* */ +/* */ +/* */ private final boolean stripComment; +/* */ +/* */ +/* */ +/* */ private final boolean encodeQuotes; +/* */ +/* */ +/* */ +/* */ private final boolean alwaysMakeTags; +/* */ +/* */ +/* */ +/* */ +/* */ public HTMLFilter() { +/* 105 */ this.vAllowed = new HashMap<>(); +/* */ +/* 107 */ ArrayList a_atts = new ArrayList<>(); +/* 108 */ a_atts.add("href"); +/* 109 */ a_atts.add("target"); +/* 110 */ this.vAllowed.put("a", a_atts); +/* */ +/* 112 */ ArrayList img_atts = new ArrayList<>(); +/* 113 */ img_atts.add("src"); +/* 114 */ img_atts.add("width"); +/* 115 */ img_atts.add("height"); +/* 116 */ img_atts.add("alt"); +/* 117 */ this.vAllowed.put("img", img_atts); +/* */ +/* 119 */ ArrayList no_atts = new ArrayList<>(); +/* 120 */ this.vAllowed.put("b", no_atts); +/* 121 */ this.vAllowed.put("strong", no_atts); +/* 122 */ this.vAllowed.put("i", no_atts); +/* 123 */ this.vAllowed.put("em", no_atts); +/* */ +/* 125 */ this.vSelfClosingTags = new String[] { "img" }; +/* 126 */ this.vNeedClosingTags = new String[] { "a", "b", "strong", "i", "em" }; +/* 127 */ this.vDisallowed = new String[0]; +/* 128 */ this.vAllowedProtocols = new String[] { "http", "mailto", "https" }; +/* 129 */ this.vProtocolAtts = new String[] { "src", "href" }; +/* 130 */ this.vRemoveBlanks = new String[] { "a", "b", "strong", "i", "em" }; +/* 131 */ this.vAllowedEntities = new String[] { "amp", "gt", "lt", "quot" }; +/* 132 */ this.stripComment = true; +/* 133 */ this.encodeQuotes = true; +/* 134 */ this.alwaysMakeTags = false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public HTMLFilter(Map conf) { +/* 146 */ assert conf.containsKey("vAllowed") : "configuration requires vAllowed"; +/* 147 */ assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags"; +/* 148 */ assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags"; +/* 149 */ assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed"; +/* 150 */ assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols"; +/* 151 */ assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts"; +/* 152 */ assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks"; +/* 153 */ assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities"; +/* */ +/* 155 */ this.vAllowed = Collections.unmodifiableMap((HashMap)conf.get("vAllowed")); +/* 156 */ this.vSelfClosingTags = (String[])conf.get("vSelfClosingTags"); +/* 157 */ this.vNeedClosingTags = (String[])conf.get("vNeedClosingTags"); +/* 158 */ this.vDisallowed = (String[])conf.get("vDisallowed"); +/* 159 */ this.vAllowedProtocols = (String[])conf.get("vAllowedProtocols"); +/* 160 */ this.vProtocolAtts = (String[])conf.get("vProtocolAtts"); +/* 161 */ this.vRemoveBlanks = (String[])conf.get("vRemoveBlanks"); +/* 162 */ this.vAllowedEntities = (String[])conf.get("vAllowedEntities"); +/* 163 */ this.stripComment = conf.containsKey("stripComment") ? ((Boolean)conf.get("stripComment")).booleanValue() : true; +/* 164 */ this.encodeQuotes = conf.containsKey("encodeQuotes") ? ((Boolean)conf.get("encodeQuotes")).booleanValue() : true; +/* 165 */ this.alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? ((Boolean)conf.get("alwaysMakeTags")).booleanValue() : true; +/* */ } +/* */ +/* */ +/* */ private void reset() { +/* 170 */ this.vTagCounts.clear(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static String chr(int decimal) { +/* 177 */ return String.valueOf((char)decimal); +/* */ } +/* */ +/* */ +/* */ public static String htmlSpecialChars(String s) { +/* 182 */ String result = s; +/* 183 */ result = regexReplace(P_AMP, "&", result); +/* 184 */ result = regexReplace(P_QUOTE, """, result); +/* 185 */ result = regexReplace(P_LEFT_ARROW, "<", result); +/* 186 */ result = regexReplace(P_RIGHT_ARROW, ">", result); +/* 187 */ return result; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String filter(String input) { +/* 200 */ reset(); +/* 201 */ String s = input; +/* */ +/* 203 */ s = escapeComments(s); +/* */ +/* 205 */ s = balanceHTML(s); +/* */ +/* 207 */ s = checkTags(s); +/* */ +/* 209 */ s = processRemoveBlanks(s); +/* */ +/* */ +/* */ +/* 213 */ return s; +/* */ } +/* */ +/* */ +/* */ public boolean isAlwaysMakeTags() { +/* 218 */ return this.alwaysMakeTags; +/* */ } +/* */ +/* */ +/* */ public boolean isStripComments() { +/* 223 */ return this.stripComment; +/* */ } +/* */ +/* */ +/* */ private String escapeComments(String s) { +/* 228 */ Matcher m = P_COMMENTS.matcher(s); +/* 229 */ StringBuffer buf = new StringBuffer(); +/* 230 */ if (m.find()) { +/* */ +/* 232 */ String match = m.group(1); +/* 233 */ m.appendReplacement(buf, Matcher.quoteReplacement("")); +/* */ } +/* 235 */ m.appendTail(buf); +/* */ +/* 237 */ return buf.toString(); +/* */ } +/* */ +/* */ +/* */ private String balanceHTML(String s) { +/* 242 */ if (this.alwaysMakeTags) { +/* */ +/* */ +/* */ +/* */ +/* 247 */ s = regexReplace(P_END_ARROW, "", s); +/* */ +/* 249 */ s = regexReplace(P_BODY_TO_END, "<$1>", s); +/* 250 */ s = regexReplace(P_XML_CONTENT, "$1<$2", s); +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 258 */ s = regexReplace(P_STRAY_LEFT_ARROW, "<$1", s); +/* 259 */ s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 266 */ s = regexReplace(P_BOTH_ARROWS, "", s); +/* */ } +/* */ +/* 269 */ return s; +/* */ } +/* */ +/* */ +/* */ private String checkTags(String s) { +/* 274 */ Matcher m = P_TAGS.matcher(s); +/* */ +/* 276 */ StringBuffer buf = new StringBuffer(); +/* 277 */ while (m.find()) { +/* */ +/* 279 */ String replaceStr = m.group(1); +/* 280 */ replaceStr = processTag(replaceStr); +/* 281 */ m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr)); +/* */ } +/* 283 */ m.appendTail(buf); +/* */ +/* */ +/* */ +/* 287 */ StringBuilder sBuilder = new StringBuilder(buf.toString()); +/* 288 */ for (String key : this.vTagCounts.keySet()) { +/* */ +/* 290 */ for (int ii = 0; ii < ((Integer)this.vTagCounts.get(key)).intValue(); ii++) +/* */ { +/* 292 */ sBuilder.append(""); +/* */ } +/* */ } +/* 295 */ s = sBuilder.toString(); +/* */ +/* 297 */ return s; +/* */ } +/* */ +/* */ +/* */ private String processRemoveBlanks(String s) { +/* 302 */ String result = s; +/* 303 */ for (String tag : this.vRemoveBlanks) { +/* */ +/* 305 */ if (!P_REMOVE_PAIR_BLANKS.containsKey(tag)) +/* */ { +/* 307 */ P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?>")); +/* */ } +/* 309 */ result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result); +/* 310 */ if (!P_REMOVE_SELF_BLANKS.containsKey(tag)) +/* */ { +/* 312 */ P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>")); +/* */ } +/* 314 */ result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result); +/* */ } +/* */ +/* 317 */ return result; +/* */ } +/* */ +/* */ +/* */ private static String regexReplace(Pattern regex_pattern, String replacement, String s) { +/* 322 */ Matcher m = regex_pattern.matcher(s); +/* 323 */ return m.replaceAll(replacement); +/* */ } +/* */ +/* */ +/* */ +/* */ private String processTag(String s) { +/* 329 */ Matcher m = P_END_TAG.matcher(s); +/* 330 */ if (m.find()) { +/* */ +/* 332 */ String name = m.group(1).toLowerCase(); +/* 333 */ if (allowed(name)) +/* */ { +/* 335 */ if (false == inArray(name, this.vSelfClosingTags)) +/* */ { +/* 337 */ if (this.vTagCounts.containsKey(name)) { +/* */ +/* 339 */ this.vTagCounts.put(name, Integer.valueOf(((Integer)this.vTagCounts.get(name)).intValue() - 1)); +/* 340 */ return ""; +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 347 */ m = P_START_TAG.matcher(s); +/* 348 */ if (m.find()) { +/* */ +/* 350 */ String name = m.group(1).toLowerCase(); +/* 351 */ String body = m.group(2); +/* 352 */ String ending = m.group(3); +/* */ +/* */ +/* 355 */ if (allowed(name)) { +/* */ +/* 357 */ StringBuilder params = new StringBuilder(); +/* */ +/* 359 */ Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body); +/* 360 */ Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body); +/* 361 */ List paramNames = new ArrayList<>(); +/* 362 */ List paramValues = new ArrayList<>(); +/* 363 */ while (m2.find()) { +/* */ +/* 365 */ paramNames.add(m2.group(1)); +/* 366 */ paramValues.add(m2.group(3)); +/* */ } +/* 368 */ while (m3.find()) { +/* */ +/* 370 */ paramNames.add(m3.group(1)); +/* 371 */ paramValues.add(m3.group(3)); +/* */ } +/* */ +/* */ +/* 375 */ for (int ii = 0; ii < paramNames.size(); ii++) { +/* */ +/* 377 */ String paramName = ((String)paramNames.get(ii)).toLowerCase(); +/* 378 */ String paramValue = paramValues.get(ii); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 384 */ if (allowedAttribute(name, paramName)) { +/* */ +/* 386 */ if (inArray(paramName, this.vProtocolAtts)) +/* */ { +/* 388 */ paramValue = processParamProtocol(paramValue); +/* */ } +/* 390 */ params.append(' ').append(paramName).append("=\"").append(paramValue).append("\""); +/* */ } +/* */ } +/* */ +/* 394 */ if (inArray(name, this.vSelfClosingTags)) +/* */ { +/* 396 */ ending = " /"; +/* */ } +/* */ +/* 399 */ if (inArray(name, this.vNeedClosingTags)) +/* */ { +/* 401 */ ending = ""; +/* */ } +/* */ +/* 404 */ if (ending == null || ending.length() < 1) { +/* */ +/* 406 */ if (this.vTagCounts.containsKey(name)) +/* */ { +/* 408 */ this.vTagCounts.put(name, Integer.valueOf(((Integer)this.vTagCounts.get(name)).intValue() + 1)); +/* */ } +/* */ else +/* */ { +/* 412 */ this.vTagCounts.put(name, Integer.valueOf(1)); +/* */ } +/* */ +/* */ } else { +/* */ +/* 417 */ ending = " /"; +/* */ } +/* 419 */ return "<" + name + params + ending + ">"; +/* */ } +/* */ +/* */ +/* 423 */ return ""; +/* */ } +/* */ +/* */ +/* */ +/* 428 */ m = P_COMMENT.matcher(s); +/* 429 */ if (!this.stripComment && m.find()) +/* */ { +/* 431 */ return "<" + m.group() + ">"; +/* */ } +/* */ +/* 434 */ return ""; +/* */ } +/* */ +/* */ +/* */ private String processParamProtocol(String s) { +/* 439 */ s = decodeEntities(s); +/* 440 */ Matcher m = P_PROTOCOL.matcher(s); +/* 441 */ if (m.find()) { +/* */ +/* 443 */ String protocol = m.group(1); +/* 444 */ if (!inArray(protocol, this.vAllowedProtocols)) { +/* */ +/* */ +/* 447 */ s = "#" + s.substring(protocol.length() + 1); +/* 448 */ if (s.startsWith("#//")) +/* */ { +/* 450 */ s = "#" + s.substring(3); +/* */ } +/* */ } +/* */ } +/* */ +/* 455 */ return s; +/* */ } +/* */ +/* */ +/* */ private String decodeEntities(String s) { +/* 460 */ StringBuffer buf = new StringBuffer(); +/* */ +/* 462 */ Matcher m = P_ENTITY.matcher(s); +/* 463 */ while (m.find()) { +/* */ +/* 465 */ String match = m.group(1); +/* 466 */ int decimal = Integer.decode(match).intValue(); +/* 467 */ m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); +/* */ } +/* 469 */ m.appendTail(buf); +/* 470 */ s = buf.toString(); +/* */ +/* 472 */ buf = new StringBuffer(); +/* 473 */ m = P_ENTITY_UNICODE.matcher(s); +/* 474 */ while (m.find()) { +/* */ +/* 476 */ String match = m.group(1); +/* 477 */ int decimal = Integer.valueOf(match, 16).intValue(); +/* 478 */ m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); +/* */ } +/* 480 */ m.appendTail(buf); +/* 481 */ s = buf.toString(); +/* */ +/* 483 */ buf = new StringBuffer(); +/* 484 */ m = P_ENCODE.matcher(s); +/* 485 */ while (m.find()) { +/* */ +/* 487 */ String match = m.group(1); +/* 488 */ int decimal = Integer.valueOf(match, 16).intValue(); +/* 489 */ m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); +/* */ } +/* 491 */ m.appendTail(buf); +/* 492 */ s = buf.toString(); +/* */ +/* 494 */ s = validateEntities(s); +/* 495 */ return s; +/* */ } +/* */ +/* */ +/* */ private String validateEntities(String s) { +/* 500 */ StringBuffer buf = new StringBuffer(); +/* */ +/* */ +/* 503 */ Matcher m = P_VALID_ENTITIES.matcher(s); +/* 504 */ while (m.find()) { +/* */ +/* 506 */ String one = m.group(1); +/* 507 */ String two = m.group(2); +/* 508 */ m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two))); +/* */ } +/* 510 */ m.appendTail(buf); +/* */ +/* 512 */ return encodeQuotes(buf.toString()); +/* */ } +/* */ +/* */ +/* */ private String encodeQuotes(String s) { +/* 517 */ if (this.encodeQuotes) { +/* */ +/* 519 */ StringBuffer buf = new StringBuffer(); +/* 520 */ Matcher m = P_VALID_QUOTES.matcher(s); +/* 521 */ while (m.find()) { +/* */ +/* 523 */ String one = m.group(1); +/* 524 */ String two = m.group(2); +/* 525 */ String three = m.group(3); +/* */ +/* 527 */ m.appendReplacement(buf, Matcher.quoteReplacement(one + two + three)); +/* */ } +/* 529 */ m.appendTail(buf); +/* 530 */ return buf.toString(); +/* */ } +/* */ +/* */ +/* 534 */ return s; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private String checkEntity(String preamble, String term) { +/* 541 */ return (";".equals(term) && isValidEntity(preamble)) ? ('&' + preamble) : ("&" + preamble); +/* */ } +/* */ +/* */ +/* */ private boolean isValidEntity(String entity) { +/* 546 */ return inArray(entity, this.vAllowedEntities); +/* */ } +/* */ +/* */ +/* */ private static boolean inArray(String s, String[] array) { +/* 551 */ for (String item : array) { +/* */ +/* 553 */ if (item != null && item.equals(s)) +/* */ { +/* 555 */ return true; +/* */ } +/* */ } +/* 558 */ return false; +/* */ } +/* */ +/* */ +/* */ private boolean allowed(String name) { +/* 563 */ return ((this.vAllowed.isEmpty() || this.vAllowed.containsKey(name)) && !inArray(name, this.vDisallowed)); +/* */ } +/* */ +/* */ +/* */ private boolean allowedAttribute(String name, String paramName) { +/* 568 */ return (allowed(name) && (this.vAllowed.isEmpty() || ((List)this.vAllowed.get(name)).contains(paramName))); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\html\HTMLFilter.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/http/HttpUtils$1.java b/src/main/java/com/archive/common/utils/http/HttpUtils$1.java new file mode 100644 index 0000000..2d1ed06 --- /dev/null +++ b/src/main/java/com/archive/common/utils/http/HttpUtils$1.java @@ -0,0 +1,7 @@ +package com.archive.common.utils.http; + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\http\HttpUtils$1.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/http/HttpUtils$TrustAnyHostnameVerifier.java b/src/main/java/com/archive/common/utils/http/HttpUtils$TrustAnyHostnameVerifier.java new file mode 100644 index 0000000..cd0e61e --- /dev/null +++ b/src/main/java/com/archive/common/utils/http/HttpUtils$TrustAnyHostnameVerifier.java @@ -0,0 +1,267 @@ +/* */ package com.archive.common.utils.http; +/* */ +/* */ import com.archive.common.utils.http.HttpUtils; +/* */ import javax.net.ssl.HostnameVerifier; +/* */ import javax.net.ssl.SSLSession; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class TrustAnyHostnameVerifier +/* */ implements HostnameVerifier +/* */ { +/* */ private TrustAnyHostnameVerifier() {} +/* */ +/* */ public boolean verify(String hostname, SSLSession session) { +/* 259 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\http\HttpUtils$TrustAnyHostnameVerifier.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/http/HttpUtils$TrustAnyTrustManager.java b/src/main/java/com/archive/common/utils/http/HttpUtils$TrustAnyTrustManager.java new file mode 100644 index 0000000..6328c42 --- /dev/null +++ b/src/main/java/com/archive/common/utils/http/HttpUtils$TrustAnyTrustManager.java @@ -0,0 +1,258 @@ +/* */ package com.archive.common.utils.http; +/* */ +/* */ import com.archive.common.utils.http.HttpUtils; +/* */ import java.security.cert.X509Certificate; +/* */ import javax.net.ssl.X509TrustManager; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class TrustAnyTrustManager +/* */ implements X509TrustManager +/* */ { +/* */ private TrustAnyTrustManager() {} +/* */ +/* */ public void checkClientTrusted(X509Certificate[] chain, String authType) {} +/* */ +/* */ public void checkServerTrusted(X509Certificate[] chain, String authType) {} +/* */ +/* */ public X509Certificate[] getAcceptedIssuers() { +/* 250 */ return new X509Certificate[0]; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\http\HttpUtils$TrustAnyTrustManager.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/http/HttpUtils.java b/src/main/java/com/archive/common/utils/http/HttpUtils.java new file mode 100644 index 0000000..cc5e24e --- /dev/null +++ b/src/main/java/com/archive/common/utils/http/HttpUtils.java @@ -0,0 +1,289 @@ +/* */ package com.archive.common.utils.http; +/* */ +/* */ import java.io.BufferedReader; +/* */ import java.io.IOException; +/* */ import java.io.InputStream; +/* */ import java.io.InputStreamReader; +/* */ import java.io.PrintWriter; +/* */ import java.net.ConnectException; +/* */ import java.net.SocketTimeoutException; +/* */ import java.net.URL; +/* */ import java.net.URLConnection; +/* */ import java.security.SecureRandom; +/* */ import javax.net.ssl.HostnameVerifier; +/* */ import javax.net.ssl.HttpsURLConnection; +/* */ import javax.net.ssl.SSLContext; +/* */ import javax.net.ssl.TrustManager; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class HttpUtils +/* */ { +/* 30 */ private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.http.HttpUtils.class); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String sendGet(String url, String param) { +/* 41 */ return sendGet(url, param, "UTF-8"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String sendGet(String url, String param, String contentType) { +/* 54 */ StringBuilder result = new StringBuilder(); +/* 55 */ BufferedReader in = null; +/* */ +/* */ try { +/* 58 */ String urlNameString = url + "?" + param; +/* 59 */ log.info("sendGet - {}", urlNameString); +/* 60 */ URL realUrl = new URL(urlNameString); +/* 61 */ URLConnection connection = realUrl.openConnection(); +/* 62 */ connection.setRequestProperty("accept", "*/*"); +/* 63 */ connection.setRequestProperty("connection", "Keep-Alive"); +/* 64 */ connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); +/* 65 */ connection.connect(); +/* 66 */ in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType)); +/* */ String line; +/* 68 */ while ((line = in.readLine()) != null) +/* */ { +/* 70 */ result.append(line); +/* */ } +/* 72 */ log.info("recv - {}", result); +/* */ } +/* 74 */ catch (ConnectException e) { +/* */ +/* 76 */ log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e); +/* */ } +/* 78 */ catch (SocketTimeoutException e) { +/* */ +/* 80 */ log.error("调用HttpUtils.sendGet SocketTimeoutException, url=" + url + ",param=" + param, e); +/* */ } +/* 82 */ catch (IOException e) { +/* */ +/* 84 */ log.error("调用HttpUtils.sendGet IOException, url=" + url + ",param=" + param, e); +/* */ } +/* 86 */ catch (Exception e) { +/* */ +/* 88 */ log.error("调用HttpsUtil.sendGet Exception, url=" + url + ",param=" + param, e); +/* */ } finally { +/* */ +/* */ +/* */ try { +/* */ +/* 94 */ if (in != null) +/* */ { +/* 96 */ in.close(); +/* */ } +/* */ } +/* 99 */ catch (Exception ex) { +/* */ +/* 101 */ log.error("调用in.close Exception, url=" + url + ",param=" + param, ex); +/* */ } +/* */ } +/* 104 */ return result.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String sendPost(String url, String param) { +/* 116 */ PrintWriter out = null; +/* 117 */ BufferedReader in = null; +/* 118 */ StringBuilder result = new StringBuilder(); +/* */ +/* */ try { +/* 121 */ String urlNameString = url; +/* 122 */ log.info("sendPost - {}", urlNameString); +/* 123 */ URL realUrl = new URL(urlNameString); +/* 124 */ URLConnection conn = realUrl.openConnection(); +/* 125 */ conn.setRequestProperty("accept", "*/*"); +/* 126 */ conn.setRequestProperty("connection", "Keep-Alive"); +/* 127 */ conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); +/* 128 */ conn.setRequestProperty("Accept-Charset", "utf-8"); +/* 129 */ conn.setRequestProperty("contentType", "utf-8"); +/* 130 */ conn.setDoOutput(true); +/* 131 */ conn.setDoInput(true); +/* 132 */ out = new PrintWriter(conn.getOutputStream()); +/* 133 */ out.print(param); +/* 134 */ out.flush(); +/* 135 */ in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8")); +/* */ String line; +/* 137 */ while ((line = in.readLine()) != null) +/* */ { +/* 139 */ result.append(line); +/* */ } +/* 141 */ log.info("recv - {}", result); +/* */ } +/* 143 */ catch (ConnectException e) { +/* */ +/* 145 */ log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e); +/* */ } +/* 147 */ catch (SocketTimeoutException e) { +/* */ +/* 149 */ log.error("调用HttpUtils.sendPost SocketTimeoutException, url=" + url + ",param=" + param, e); +/* */ } +/* 151 */ catch (IOException e) { +/* */ +/* 153 */ log.error("调用HttpUtils.sendPost IOException, url=" + url + ",param=" + param, e); +/* */ } +/* 155 */ catch (Exception e) { +/* */ +/* 157 */ log.error("调用HttpsUtil.sendPost Exception, url=" + url + ",param=" + param, e); +/* */ } finally { +/* */ +/* */ +/* */ try { +/* */ +/* 163 */ if (out != null) +/* */ { +/* 165 */ out.close(); +/* */ } +/* 167 */ if (in != null) +/* */ { +/* 169 */ in.close(); +/* */ } +/* */ } +/* 172 */ catch (IOException ex) { +/* */ +/* 174 */ log.error("调用in.close Exception, url=" + url + ",param=" + param, ex); +/* */ } +/* */ } +/* 177 */ return result.toString(); +/* */ } +/* */ +/* */ +/* */ public static String sendSSLPost(String url, String param) { +/* 182 */ StringBuilder result = new StringBuilder(); +/* 183 */ String urlNameString = url + "?" + param; +/* */ +/* */ try { +/* 186 */ log.info("sendSSLPost - {}", urlNameString); +/* 187 */ SSLContext sc = SSLContext.getInstance("SSL"); +/* 188 */ sc.init(null, new TrustManager[] { (TrustManager)new TrustAnyTrustManager(null) }, new SecureRandom()); +/* 189 */ URL console = new URL(urlNameString); +/* 190 */ HttpsURLConnection conn = (HttpsURLConnection)console.openConnection(); +/* 191 */ conn.setRequestProperty("accept", "*/*"); +/* 192 */ conn.setRequestProperty("connection", "Keep-Alive"); +/* 193 */ conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); +/* 194 */ conn.setRequestProperty("Accept-Charset", "utf-8"); +/* 195 */ conn.setRequestProperty("contentType", "utf-8"); +/* 196 */ conn.setDoOutput(true); +/* 197 */ conn.setDoInput(true); +/* */ +/* 199 */ conn.setSSLSocketFactory(sc.getSocketFactory()); +/* 200 */ conn.setHostnameVerifier((HostnameVerifier)new TrustAnyHostnameVerifier(null)); +/* 201 */ conn.connect(); +/* 202 */ InputStream is = conn.getInputStream(); +/* 203 */ BufferedReader br = new BufferedReader(new InputStreamReader(is)); +/* 204 */ String ret = ""; +/* 205 */ while ((ret = br.readLine()) != null) { +/* */ +/* 207 */ if (ret != null && !ret.trim().equals("")) +/* */ { +/* 209 */ result.append(new String(ret.getBytes("ISO-8859-1"), "utf-8")); +/* */ } +/* */ } +/* 212 */ log.info("recv - {}", result); +/* 213 */ conn.disconnect(); +/* 214 */ br.close(); +/* */ } +/* 216 */ catch (ConnectException e) { +/* */ +/* 218 */ log.error("调用HttpUtils.sendSSLPost ConnectException, url=" + url + ",param=" + param, e); +/* */ } +/* 220 */ catch (SocketTimeoutException e) { +/* */ +/* 222 */ log.error("调用HttpUtils.sendSSLPost SocketTimeoutException, url=" + url + ",param=" + param, e); +/* */ } +/* 224 */ catch (IOException e) { +/* */ +/* 226 */ log.error("调用HttpUtils.sendSSLPost IOException, url=" + url + ",param=" + param, e); +/* */ } +/* 228 */ catch (Exception e) { +/* */ +/* 230 */ log.error("调用HttpsUtil.sendSSLPost Exception, url=" + url + ",param=" + param, e); +/* */ } +/* 232 */ return result.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean urlWhetherReachable(String urlString, int timeOutMillSeconds) { +/* 270 */ boolean flag = true; +/* */ +/* */ try { +/* 273 */ URL url = new URL(urlString); +/* 274 */ URLConnection co = url.openConnection(); +/* 275 */ co.setConnectTimeout(timeOutMillSeconds); +/* 276 */ co.connect(); +/* 277 */ } catch (Exception e1) { +/* 278 */ System.out.println(urlString + "连接请求超时!"); +/* 279 */ flag = false; +/* */ } +/* 281 */ return flag; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\http\HttpUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/poi/ExcelUtil.java b/src/main/java/com/archive/common/utils/poi/ExcelUtil.java new file mode 100644 index 0000000..e654a63 --- /dev/null +++ b/src/main/java/com/archive/common/utils/poi/ExcelUtil.java @@ -0,0 +1,1128 @@ +/* */ package com.archive.common.utils.poi; +/* */ +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.file.FileTypeUtils; +/* */ import com.archive.common.utils.file.ImageUtils; +/* */ import com.archive.common.utils.reflect.ReflectUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.aspectj.lang.annotation.Excels; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.system.dict.utils.DictUtils; +/* */ import java.io.File; +/* */ import java.io.FileOutputStream; +/* */ import java.io.IOException; +/* */ import java.io.InputStream; +/* */ import java.io.OutputStream; +/* */ import java.lang.reflect.Field; +/* */ import java.math.BigDecimal; +/* */ import java.text.DecimalFormat; +/* */ import java.util.ArrayList; +/* */ import java.util.Arrays; +/* */ import java.util.Comparator; +/* */ import java.util.Date; +/* */ import java.util.HashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import java.util.Set; +/* */ import java.util.UUID; +/* */ import java.util.stream.Collectors; +/* */ import org.apache.poi.ss.usermodel.BorderStyle; +/* */ import org.apache.poi.ss.usermodel.Cell; +/* */ import org.apache.poi.ss.usermodel.CellStyle; +/* */ import org.apache.poi.ss.usermodel.CellType; +/* */ import org.apache.poi.ss.usermodel.ClientAnchor; +/* */ import org.apache.poi.ss.usermodel.DataValidation; +/* */ import org.apache.poi.ss.usermodel.DataValidationConstraint; +/* */ import org.apache.poi.ss.usermodel.DataValidationHelper; +/* */ import org.apache.poi.ss.usermodel.DateUtil; +/* */ import org.apache.poi.ss.usermodel.Drawing; +/* */ import org.apache.poi.ss.usermodel.FillPatternType; +/* */ import org.apache.poi.ss.usermodel.Font; +/* */ import org.apache.poi.ss.usermodel.HorizontalAlignment; +/* */ import org.apache.poi.ss.usermodel.IndexedColors; +/* */ import org.apache.poi.ss.usermodel.Row; +/* */ import org.apache.poi.ss.usermodel.Sheet; +/* */ import org.apache.poi.ss.usermodel.VerticalAlignment; +/* */ import org.apache.poi.ss.usermodel.Workbook; +/* */ import org.apache.poi.ss.usermodel.WorkbookFactory; +/* */ import org.apache.poi.ss.util.CellRangeAddressList; +/* */ import org.apache.poi.xssf.streaming.SXSSFWorkbook; +/* */ import org.apache.poi.xssf.usermodel.XSSFClientAnchor; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ExcelUtil +/* */ { +/* 68 */ private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.poi.ExcelUtil.class); +/* */ +/* */ +/* */ +/* */ +/* */ public static final int sheetSize = 65536; +/* */ +/* */ +/* */ +/* */ +/* */ private String sheetName; +/* */ +/* */ +/* */ +/* */ +/* */ private Excel.Type type; +/* */ +/* */ +/* */ +/* */ +/* */ private Workbook wb; +/* */ +/* */ +/* */ +/* */ +/* */ private Sheet sheet; +/* */ +/* */ +/* */ +/* */ +/* */ private Map styles; +/* */ +/* */ +/* */ +/* */ +/* */ private List list; +/* */ +/* */ +/* */ +/* */ +/* */ private List fields; +/* */ +/* */ +/* */ +/* */ +/* */ private short maxHeight; +/* */ +/* */ +/* */ +/* */ +/* 118 */ private Map statistics = new HashMap<>(); +/* */ +/* */ +/* */ +/* */ +/* 123 */ private static final DecimalFormat DOUBLE_FORMAT = new DecimalFormat("######0.00"); +/* */ +/* */ +/* */ +/* */ public Class clazz; +/* */ +/* */ +/* */ +/* */ public ExcelUtil(Class clazz) { +/* 132 */ this.clazz = clazz; +/* */ } +/* */ +/* */ +/* */ public void init(List list, String sheetName, Excel.Type type) { +/* 137 */ if (list == null) +/* */ { +/* 139 */ list = new ArrayList<>(); +/* */ } +/* 141 */ this.list = list; +/* 142 */ this.sheetName = sheetName; +/* 143 */ this.type = type; +/* 144 */ createExcelField(); +/* 145 */ createWorkbook(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List importExcel(InputStream is) throws Exception { +/* 156 */ return importExcel("", is); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List importExcel(String sheetName, InputStream is) throws Exception { +/* 168 */ this.type = Excel.Type.IMPORT; +/* 169 */ this.wb = WorkbookFactory.create(is); +/* 170 */ List list = new ArrayList<>(); +/* 171 */ Sheet sheet = null; +/* 172 */ if (StringUtils.isNotEmpty(sheetName)) { +/* */ +/* */ +/* 175 */ sheet = this.wb.getSheet(sheetName); +/* */ +/* */ } +/* */ else { +/* */ +/* 180 */ sheet = this.wb.getSheetAt(0); +/* */ } +/* */ +/* 183 */ if (sheet == null) +/* */ { +/* 185 */ throw new IOException("文件sheet不存在"); +/* */ } +/* */ +/* */ +/* 189 */ int rows = sheet.getLastRowNum(); +/* */ +/* 191 */ if (rows > 0) { +/* */ +/* */ +/* 194 */ Map cellMap = new HashMap<>(); +/* */ +/* 196 */ Row heard = sheet.getRow(0); +/* 197 */ for (int i = 0; i < heard.getPhysicalNumberOfCells(); i++) { +/* */ +/* 199 */ Cell cell = heard.getCell(i); +/* 200 */ if (StringUtils.isNotNull(cell)) { +/* */ +/* 202 */ String value = getCellValue(heard, i).toString(); +/* 203 */ cellMap.put(value, Integer.valueOf(i)); +/* */ } +/* */ else { +/* */ +/* 207 */ cellMap.put(null, Integer.valueOf(i)); +/* */ } +/* */ } +/* */ +/* 211 */ Field[] allFields = this.clazz.getDeclaredFields(); +/* */ +/* 213 */ Map fieldsMap = new HashMap<>(); +/* 214 */ for (int col = 0; col < allFields.length; col++) { +/* */ +/* 216 */ Field field = allFields[col]; +/* 217 */ Excel attr = field.getAnnotation(Excel.class); +/* 218 */ if (attr != null && (attr.type() == Excel.Type.ALL || attr.type() == this.type)) { +/* */ +/* */ +/* 221 */ field.setAccessible(true); +/* 222 */ Integer column = cellMap.get(attr.name()); +/* 223 */ if (column != null) +/* */ { +/* 225 */ fieldsMap.put(column, field); +/* */ } +/* */ } +/* */ } +/* 229 */ for (int j = 1; j <= rows; j++) { +/* */ +/* */ +/* 232 */ Row row = sheet.getRow(j); +/* */ +/* 234 */ if (!isRowEmpty(row)) { +/* */ +/* */ +/* */ +/* 238 */ T entity = null; +/* 239 */ for (Map.Entry entry : fieldsMap.entrySet()) { +/* */ +/* 241 */ Object val = getCellValue(row, ((Integer)entry.getKey()).intValue()); +/* */ +/* */ +/* 244 */ entity = (entity == null) ? this.clazz.newInstance() : entity; +/* */ +/* 246 */ Field field = fieldsMap.get(entry.getKey()); +/* */ +/* 248 */ Class fieldType = field.getType(); +/* 249 */ if (String.class == fieldType) { +/* */ +/* 251 */ String s = Convert.toStr(val); +/* 252 */ if (StringUtils.endsWith(s, ".0")) { +/* */ +/* 254 */ val = StringUtils.substringBefore(s, ".0"); +/* */ } +/* */ else { +/* */ +/* 258 */ String dateFormat = ((Excel)field.getAnnotation(Excel.class)).dateFormat(); +/* 259 */ if (StringUtils.isNotEmpty(dateFormat)) +/* */ { +/* 261 */ val = DateUtils.parseDateToStr(dateFormat, (Date)val); +/* */ } +/* */ else +/* */ { +/* 265 */ val = Convert.toStr(val); +/* */ } +/* */ +/* */ } +/* 269 */ } else if ((int.class == fieldType || Integer.class == fieldType) && StringUtils.isNumeric(Convert.toStr(val))) { +/* */ +/* 271 */ val = Convert.toInt(val); +/* */ } +/* 273 */ else if (long.class == fieldType || Long.class == fieldType) { +/* */ +/* 275 */ val = Convert.toLong(val); +/* */ } +/* 277 */ else if (double.class == fieldType || Double.class == fieldType) { +/* */ +/* 279 */ val = Convert.toDouble(val); +/* */ } +/* 281 */ else if (float.class == fieldType || Float.class == fieldType) { +/* */ +/* 283 */ val = Convert.toFloat(val); +/* */ } +/* 285 */ else if (BigDecimal.class == fieldType) { +/* */ +/* 287 */ val = Convert.toBigDecimal(val); +/* */ } +/* 289 */ else if (Date.class == fieldType) { +/* */ +/* 291 */ if (val instanceof String) +/* */ { +/* 293 */ val = DateUtils.parseDate(val); +/* */ } +/* 295 */ else if (val instanceof Double) +/* */ { +/* 297 */ val = DateUtil.getJavaDate(((Double)val).doubleValue()); +/* */ } +/* */ +/* 300 */ } else if (boolean.class == fieldType || Boolean.class == fieldType) { +/* */ +/* 302 */ val = Convert.toBool(val, Boolean.valueOf(false)); +/* */ } +/* 304 */ if (StringUtils.isNotNull(fieldType)) { +/* */ +/* 306 */ Excel attr = field.getAnnotation(Excel.class); +/* 307 */ String propertyName = field.getName(); +/* 308 */ if (StringUtils.isNotEmpty(attr.targetAttr())) { +/* */ +/* 310 */ propertyName = field.getName() + "." + attr.targetAttr(); +/* */ } +/* 312 */ else if (StringUtils.isNotEmpty(attr.readConverterExp())) { +/* */ +/* 314 */ val = reverseByExp(Convert.toStr(val), attr.readConverterExp(), attr.separator()); +/* */ } +/* 316 */ else if (StringUtils.isNotEmpty(attr.dictType())) { +/* */ +/* 318 */ val = reverseDictByExp(Convert.toStr(val), attr.dictType(), attr.separator()); +/* */ } +/* 320 */ ReflectUtils.invokeSetter(entity, propertyName, val); +/* */ } +/* */ } +/* 323 */ list.add(entity); +/* */ } +/* */ } +/* 326 */ } return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public AjaxResult exportExcel(List list, String sheetName) { +/* 338 */ init(list, sheetName, Excel.Type.EXPORT); +/* 339 */ return exportExcel(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public AjaxResult importTemplateExcel(String sheetName) { +/* 350 */ init(null, sheetName, Excel.Type.IMPORT); +/* 351 */ return exportExcel(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public AjaxResult exportExcel() { +/* 361 */ OutputStream out = null; +/* */ +/* */ +/* */ try { +/* 365 */ double sheetNo = Math.ceil((this.list.size() / 65536)); +/* 366 */ for (int index = 0; index <= sheetNo; index++) { +/* */ +/* 368 */ createSheet(sheetNo, index); +/* */ +/* */ +/* 371 */ Row row = this.sheet.createRow(0); +/* 372 */ int column = 0; +/* */ +/* 374 */ for (Object[] os : this.fields) { +/* */ +/* 376 */ Excel excel = (Excel)os[1]; +/* 377 */ createCell(excel, row, column++); +/* */ } +/* 379 */ if (Excel.Type.EXPORT.equals(this.type)) { +/* */ +/* 381 */ fillExcelData(index, row); +/* 382 */ addStatisticsRow(); +/* */ } +/* */ } +/* 385 */ String filename = encodingFilename(this.sheetName); +/* 386 */ out = new FileOutputStream(getAbsoluteFile(filename)); +/* 387 */ this.wb.write(out); +/* 388 */ return AjaxResult.success(filename); +/* */ } +/* 390 */ catch (Exception e) { +/* */ +/* 392 */ log.error("导出Excel异常{}", e.getMessage()); +/* 393 */ throw new BusinessException("导出Excel失败,请联系网站管理员!"); +/* */ } +/* */ finally { +/* */ +/* 397 */ if (this.wb != null) { +/* */ +/* */ try { +/* */ +/* 401 */ this.wb.close(); +/* */ } +/* 403 */ catch (IOException e1) { +/* */ +/* 405 */ e1.printStackTrace(); +/* */ } +/* */ } +/* 408 */ if (out != null) { +/* */ +/* */ try { +/* */ +/* 412 */ out.close(); +/* */ } +/* 414 */ catch (IOException e1) { +/* */ +/* 416 */ e1.printStackTrace(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void fillExcelData(int index, Row row) { +/* 430 */ int startNo = index * 65536; +/* 431 */ int endNo = Math.min(startNo + 65536, this.list.size()); +/* 432 */ for (int i = startNo; i < endNo; i++) { +/* */ +/* 434 */ row = this.sheet.createRow(i + 1 - startNo); +/* */ +/* 436 */ T vo = this.list.get(i); +/* 437 */ int column = 0; +/* 438 */ for (Object[] os : this.fields) { +/* */ +/* 440 */ Field field = (Field)os[0]; +/* 441 */ Excel excel = (Excel)os[1]; +/* */ +/* 443 */ field.setAccessible(true); +/* 444 */ addCell(excel, row, vo, field, column++); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Map createStyles(Workbook wb) { +/* 458 */ Map styles = new HashMap<>(); +/* 459 */ CellStyle style = wb.createCellStyle(); +/* 460 */ style.setAlignment(HorizontalAlignment.CENTER); +/* 461 */ style.setVerticalAlignment(VerticalAlignment.CENTER); +/* 462 */ style.setBorderRight(BorderStyle.THIN); +/* 463 */ style.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); +/* 464 */ style.setBorderLeft(BorderStyle.THIN); +/* 465 */ style.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); +/* 466 */ style.setBorderTop(BorderStyle.THIN); +/* 467 */ style.setTopBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); +/* 468 */ style.setBorderBottom(BorderStyle.THIN); +/* 469 */ style.setBottomBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); +/* 470 */ Font dataFont = wb.createFont(); +/* 471 */ dataFont.setFontName("Arial"); +/* 472 */ dataFont.setFontHeightInPoints((short)10); +/* 473 */ style.setFont(dataFont); +/* 474 */ styles.put("data", style); +/* */ +/* 476 */ style = wb.createCellStyle(); +/* 477 */ style.cloneStyleFrom(styles.get("data")); +/* 478 */ style.setAlignment(HorizontalAlignment.CENTER); +/* 479 */ style.setVerticalAlignment(VerticalAlignment.CENTER); +/* 480 */ style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex()); +/* 481 */ style.setFillPattern(FillPatternType.SOLID_FOREGROUND); +/* 482 */ Font headerFont = wb.createFont(); +/* 483 */ headerFont.setFontName("Arial"); +/* 484 */ headerFont.setFontHeightInPoints((short)10); +/* 485 */ headerFont.setBold(true); +/* 486 */ headerFont.setColor(IndexedColors.WHITE.getIndex()); +/* 487 */ style.setFont(headerFont); +/* 488 */ styles.put("header", style); +/* */ +/* 490 */ style = wb.createCellStyle(); +/* 491 */ style.setAlignment(HorizontalAlignment.CENTER); +/* 492 */ style.setVerticalAlignment(VerticalAlignment.CENTER); +/* 493 */ Font totalFont = wb.createFont(); +/* 494 */ totalFont.setFontName("Arial"); +/* 495 */ totalFont.setFontHeightInPoints((short)10); +/* 496 */ style.setFont(totalFont); +/* 497 */ styles.put("total", style); +/* */ +/* 499 */ style = wb.createCellStyle(); +/* 500 */ style.cloneStyleFrom(styles.get("data")); +/* 501 */ style.setAlignment(HorizontalAlignment.LEFT); +/* 502 */ styles.put("data1", style); +/* */ +/* 504 */ style = wb.createCellStyle(); +/* 505 */ style.cloneStyleFrom(styles.get("data")); +/* 506 */ style.setAlignment(HorizontalAlignment.CENTER); +/* 507 */ styles.put("data2", style); +/* */ +/* 509 */ style = wb.createCellStyle(); +/* 510 */ style.cloneStyleFrom(styles.get("data")); +/* 511 */ style.setAlignment(HorizontalAlignment.RIGHT); +/* 512 */ styles.put("data3", style); +/* */ +/* 514 */ return styles; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Cell createCell(Excel attr, Row row, int column) { +/* 523 */ Cell cell = row.createCell(column); +/* */ +/* 525 */ cell.setCellValue(attr.name()); +/* 526 */ setDataValidation(attr, row, column); +/* 527 */ cell.setCellStyle(this.styles.get("header")); +/* 528 */ return cell; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setCellVo(Object value, Excel attr, Cell cell) { +/* 540 */ if (Excel.ColumnType.STRING == attr.cellType()) { +/* */ +/* 542 */ cell.setCellValue(StringUtils.isNull(value) ? attr.defaultValue() : (value + attr.suffix())); +/* */ } +/* 544 */ else if (Excel.ColumnType.NUMERIC == attr.cellType()) { +/* */ +/* 546 */ cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value).doubleValue() : Convert.toInt(value).intValue()); +/* */ } +/* 548 */ else if (Excel.ColumnType.IMAGE == attr.cellType()) { +/* */ +/* */ +/* 551 */ XSSFClientAnchor xSSFClientAnchor = new XSSFClientAnchor(0, 0, 0, 0, (short)cell.getColumnIndex(), cell.getRow().getRowNum(), (short)(cell.getColumnIndex() + 1), cell.getRow().getRowNum() + 1); +/* 552 */ String imagePath = Convert.toStr(value); +/* 553 */ if (StringUtils.isNotEmpty(imagePath)) { +/* */ +/* 555 */ byte[] data = ImageUtils.getImage(imagePath); +/* 556 */ getDrawingPatriarch(cell.getSheet()).createPicture((ClientAnchor)xSSFClientAnchor, cell +/* 557 */ .getSheet().getWorkbook().addPicture(data, getImageType(data))); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Drawing getDrawingPatriarch(Sheet sheet) { +/* 567 */ if (sheet.getDrawingPatriarch() == null) +/* */ { +/* 569 */ sheet.createDrawingPatriarch(); +/* */ } +/* 571 */ return sheet.getDrawingPatriarch(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int getImageType(byte[] value) { +/* 579 */ String type = FileTypeUtils.getFileExtendName(value); +/* 580 */ if ("JPG".equalsIgnoreCase(type)) +/* */ { +/* 582 */ return 5; +/* */ } +/* 584 */ if ("PNG".equalsIgnoreCase(type)) +/* */ { +/* 586 */ return 6; +/* */ } +/* 588 */ return 5; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setDataValidation(Excel attr, Row row, int column) { +/* 596 */ if (attr.name().indexOf("注:") >= 0) { +/* */ +/* 598 */ this.sheet.setColumnWidth(column, 6000); +/* */ +/* */ } +/* */ else { +/* */ +/* 603 */ this.sheet.setColumnWidth(column, (int)((attr.width() + 0.72D) * 256.0D)); +/* */ } +/* */ +/* 606 */ if (StringUtils.isNotEmpty(attr.prompt())) +/* */ { +/* */ +/* 609 */ setXSSFPrompt(this.sheet, "", attr.prompt(), 1, 100, column, column); +/* */ } +/* */ +/* 612 */ if ((attr.combo()).length > 0) +/* */ { +/* */ +/* 615 */ setXSSFValidation(this.sheet, attr.combo(), 1, 100, column, column); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Cell addCell(Excel attr, Row row, T vo, Field field, int column) { +/* 624 */ Cell cell = null; +/* */ +/* */ +/* */ try { +/* 628 */ row.setHeight(this.maxHeight); +/* */ +/* 630 */ if (attr.isExport()) +/* */ { +/* */ +/* 633 */ cell = row.createCell(column); +/* 634 */ int align = attr.align().value(); +/* 635 */ cell.setCellStyle(this.styles.get("data" + ((align >= 1 && align <= 3) ? Integer.valueOf(align) : ""))); +/* */ +/* */ +/* 638 */ Object value = getTargetValue(vo, field, attr); +/* 639 */ String dateFormat = attr.dateFormat(); +/* 640 */ String readConverterExp = attr.readConverterExp(); +/* 641 */ String separator = attr.separator(); +/* 642 */ String dictType = attr.dictType(); +/* 643 */ if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) { +/* */ +/* 645 */ cell.setCellValue(DateUtils.parseDateToStr(dateFormat, (Date)value)); +/* */ } +/* 647 */ else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value)) { +/* */ +/* 649 */ cell.setCellValue(convertByExp(Convert.toStr(value), readConverterExp, separator)); +/* */ } +/* 651 */ else if (StringUtils.isNotEmpty(dictType) && StringUtils.isNotNull(value)) { +/* */ +/* 653 */ cell.setCellValue(convertDictByExp(Convert.toStr(value), dictType, separator)); +/* */ } +/* 655 */ else if (value instanceof BigDecimal && -1 != attr.scale()) { +/* */ +/* 657 */ cell.setCellValue(((BigDecimal)value).setScale(attr.scale(), attr.roundingMode()).toString()); +/* */ +/* */ } +/* */ else { +/* */ +/* 662 */ setCellVo(value, attr, cell); +/* */ } +/* 664 */ addStatisticsData(Integer.valueOf(column), Convert.toStr(value), attr); +/* */ } +/* */ +/* 667 */ } catch (Exception e) { +/* */ +/* 669 */ log.error("导出Excel失败{}", e); +/* */ } +/* 671 */ return cell; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setXSSFPrompt(Sheet sheet, String promptTitle, String promptContent, int firstRow, int endRow, int firstCol, int endCol) { +/* 688 */ DataValidationHelper helper = sheet.getDataValidationHelper(); +/* 689 */ DataValidationConstraint constraint = helper.createCustomConstraint("DD1"); +/* 690 */ CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); +/* 691 */ DataValidation dataValidation = helper.createValidation(constraint, regions); +/* 692 */ dataValidation.createPromptBox(promptTitle, promptContent); +/* 693 */ dataValidation.setShowPromptBox(true); +/* 694 */ sheet.addValidationData(dataValidation); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setXSSFValidation(Sheet sheet, String[] textlist, int firstRow, int endRow, int firstCol, int endCol) { +/* 710 */ DataValidationHelper helper = sheet.getDataValidationHelper(); +/* */ +/* 712 */ DataValidationConstraint constraint = helper.createExplicitListConstraint(textlist); +/* */ +/* 714 */ CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); +/* */ +/* 716 */ DataValidation dataValidation = helper.createValidation(constraint, regions); +/* */ +/* 718 */ if (dataValidation instanceof org.apache.poi.xssf.usermodel.XSSFDataValidation) { +/* */ +/* 720 */ dataValidation.setSuppressDropDownArrow(true); +/* 721 */ dataValidation.setShowErrorBox(true); +/* */ } +/* */ else { +/* */ +/* 725 */ dataValidation.setSuppressDropDownArrow(false); +/* */ } +/* */ +/* 728 */ sheet.addValidationData(dataValidation); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String convertByExp(String propertyValue, String converterExp, String separator) { +/* 741 */ StringBuilder propertyString = new StringBuilder(); +/* 742 */ String[] convertSource = converterExp.split(","); +/* 743 */ for (String item : convertSource) { +/* */ +/* 745 */ String[] itemArray = item.split("="); +/* 746 */ if (StringUtils.containsAny(separator, propertyValue)) { +/* */ +/* 748 */ for (String value : propertyValue.split(separator)) { +/* */ +/* 750 */ if (itemArray[0].equals(value)) { +/* */ +/* 752 */ propertyString.append(itemArray[1] + separator); +/* */ +/* */ +/* */ +/* */ break; +/* */ } +/* */ } +/* 759 */ } else if (itemArray[0].equals(propertyValue)) { +/* */ +/* 761 */ return itemArray[1]; +/* */ } +/* */ } +/* */ +/* 765 */ return StringUtils.stripEnd(propertyString.toString(), separator); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String reverseByExp(String propertyValue, String converterExp, String separator) { +/* 778 */ StringBuilder propertyString = new StringBuilder(); +/* 779 */ String[] convertSource = converterExp.split(","); +/* 780 */ for (String item : convertSource) { +/* */ +/* 782 */ String[] itemArray = item.split("="); +/* 783 */ if (StringUtils.containsAny(separator, propertyValue)) { +/* */ +/* 785 */ for (String value : propertyValue.split(separator)) { +/* */ +/* 787 */ if (itemArray[1].equals(value)) { +/* */ +/* 789 */ propertyString.append(itemArray[0] + separator); +/* */ +/* */ +/* */ +/* */ break; +/* */ } +/* */ } +/* 796 */ } else if (itemArray[1].equals(propertyValue)) { +/* */ +/* 798 */ return itemArray[0]; +/* */ } +/* */ } +/* */ +/* 802 */ return StringUtils.stripEnd(propertyString.toString(), separator); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String convertDictByExp(String dictValue, String dictType, String separator) { +/* 815 */ return DictUtils.getDictLabel(dictType, dictValue, separator); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String reverseDictByExp(String dictLabel, String dictType, String separator) { +/* 828 */ return DictUtils.getDictValue(dictType, dictLabel, separator); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void addStatisticsData(Integer index, String text, Excel entity) { +/* 836 */ if (entity != null && entity.isStatistics()) { +/* */ +/* 838 */ Double temp = Double.valueOf(0.0D); +/* 839 */ if (!this.statistics.containsKey(index)) +/* */ { +/* 841 */ this.statistics.put(index, temp); +/* */ } +/* */ +/* */ try { +/* 845 */ temp = Double.valueOf(text); +/* */ } +/* 847 */ catch (NumberFormatException numberFormatException) {} +/* */ +/* */ +/* 850 */ this.statistics.put(index, Double.valueOf(((Double)this.statistics.get(index)).doubleValue() + temp.doubleValue())); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addStatisticsRow() { +/* 859 */ if (this.statistics.size() > 0) { +/* */ +/* 861 */ Cell cell = null; +/* 862 */ Row row = this.sheet.createRow(this.sheet.getLastRowNum() + 1); +/* 863 */ Set keys = this.statistics.keySet(); +/* 864 */ cell = row.createCell(0); +/* 865 */ cell.setCellStyle(this.styles.get("total")); +/* 866 */ cell.setCellValue("合计"); +/* */ +/* 868 */ for (Integer key : keys) { +/* */ +/* 870 */ cell = row.createCell(key.intValue()); +/* 871 */ cell.setCellStyle(this.styles.get("total")); +/* 872 */ cell.setCellValue(DOUBLE_FORMAT.format(this.statistics.get(key))); +/* */ } +/* 874 */ this.statistics.clear(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String encodingFilename(String filename) { +/* 883 */ filename = UUID.randomUUID().toString() + "_" + filename + ".xlsx"; +/* 884 */ return filename; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getAbsoluteFile(String filename) { +/* 894 */ String downloadPath = ArchiveConfig.getInstance().getDownloadPath() + filename; +/* 895 */ File desc = new File(downloadPath); +/* 896 */ if (!desc.getParentFile().exists()) +/* */ { +/* 898 */ desc.getParentFile().mkdirs(); +/* */ } +/* 900 */ return downloadPath; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Object getTargetValue(T vo, Field field, Excel excel) throws Exception { +/* 914 */ Object o = field.get(vo); +/* 915 */ if (StringUtils.isNotEmpty(excel.targetAttr())) { +/* */ +/* 917 */ String target = excel.targetAttr(); +/* 918 */ if (target.indexOf(".") > -1) { +/* */ +/* 920 */ String[] targets = target.split("[.]"); +/* 921 */ for (String name : targets) +/* */ { +/* 923 */ o = getValue(o, name); +/* */ } +/* */ } +/* */ else { +/* */ +/* 928 */ o = getValue(o, target); +/* */ } +/* */ } +/* 931 */ return o; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Object getValue(Object o, String name) throws Exception { +/* 944 */ if (StringUtils.isNotNull(o) && StringUtils.isNotEmpty(name)) { +/* */ +/* 946 */ Class clazz = o.getClass(); +/* 947 */ Field field = clazz.getDeclaredField(name); +/* 948 */ field.setAccessible(true); +/* 949 */ o = field.get(o); +/* */ } +/* 951 */ return o; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void createExcelField() { +/* 959 */ this.fields = new ArrayList(); +/* 960 */ List tempFields = new ArrayList<>(); +/* 961 */ tempFields.addAll(Arrays.asList(this.clazz.getSuperclass().getDeclaredFields())); +/* 962 */ tempFields.addAll(Arrays.asList(this.clazz.getDeclaredFields())); +/* 963 */ for (Field field : tempFields) { +/* */ +/* */ +/* 966 */ if (field.isAnnotationPresent((Class)Excel.class)) +/* */ { +/* 968 */ putToField(field, field.getAnnotation(Excel.class)); +/* */ } +/* */ +/* */ +/* 972 */ if (field.isAnnotationPresent((Class)Excels.class)) { +/* */ +/* 974 */ Excels attrs = field.getAnnotation(Excels.class); +/* 975 */ Excel[] excels = attrs.value(); +/* 976 */ for (Excel excel : excels) +/* */ { +/* 978 */ putToField(field, excel); +/* */ } +/* */ } +/* */ } +/* 982 */ this.fields = (List)this.fields.stream().sorted(Comparator.comparing(objects -> Integer.valueOf(((Excel)objects[1]).sort()))).collect(Collectors.toList()); +/* 983 */ this.maxHeight = getRowHeight(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public short getRowHeight() { +/* 991 */ double maxHeight = 0.0D; +/* 992 */ for (Object[] os : this.fields) { +/* */ +/* 994 */ Excel excel = (Excel)os[1]; +/* 995 */ maxHeight = (maxHeight > excel.height()) ? maxHeight : excel.height(); +/* */ } +/* 997 */ return (short)(int)(maxHeight * 20.0D); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void putToField(Field field, Excel attr) { +/* 1005 */ if (attr != null && (attr.type() == Excel.Type.ALL || attr.type() == this.type)) +/* */ { +/* 1007 */ this.fields.add(new Object[] { field, attr }); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void createWorkbook() { +/* 1016 */ this.wb = (Workbook)new SXSSFWorkbook(500); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void createSheet(double sheetNo, int index) { +/* 1027 */ this.sheet = this.wb.createSheet(); +/* 1028 */ this.styles = createStyles(this.wb); +/* */ +/* 1030 */ if (sheetNo == 0.0D) { +/* */ +/* 1032 */ this.wb.setSheetName(index, this.sheetName); +/* */ } +/* */ else { +/* */ +/* 1036 */ this.wb.setSheetName(index, this.sheetName + index); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object getCellValue(Row row, int column) { +/* 1049 */ if (row == null) +/* */ { +/* 1051 */ return row; +/* */ } +/* 1053 */ Object val = ""; +/* */ +/* */ try { +/* 1056 */ Cell cell = row.getCell(column); +/* 1057 */ if (StringUtils.isNotNull(cell)) +/* */ { +/* 1059 */ if (cell.getCellType() == CellType.NUMERIC || cell.getCellType() == CellType.FORMULA) +/* */ { +/* 1061 */ val = Double.valueOf(cell.getNumericCellValue()); +/* 1062 */ if (DateUtil.isCellDateFormatted(cell)) +/* */ { +/* 1064 */ val = DateUtil.getJavaDate(((Double)val).doubleValue()); +/* */ +/* */ +/* */ } +/* 1068 */ else if (((Double)val).doubleValue() % 1.0D != 0.0D) +/* */ { +/* 1070 */ val = new BigDecimal(val.toString()); +/* */ } +/* */ else +/* */ { +/* 1074 */ val = (new DecimalFormat("0")).format(val); +/* */ } +/* */ +/* */ } +/* 1078 */ else if (cell.getCellType() == CellType.STRING) +/* */ { +/* 1080 */ val = cell.getStringCellValue(); +/* */ } +/* 1082 */ else if (cell.getCellType() == CellType.BOOLEAN) +/* */ { +/* 1084 */ val = Boolean.valueOf(cell.getBooleanCellValue()); +/* */ } +/* 1086 */ else if (cell.getCellType() == CellType.ERROR) +/* */ { +/* 1088 */ val = Byte.valueOf(cell.getErrorCellValue()); +/* */ } +/* */ +/* */ } +/* */ } +/* 1093 */ catch (Exception e) { +/* */ +/* 1095 */ return val; +/* */ } +/* 1097 */ return val; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private boolean isRowEmpty(Row row) { +/* 1108 */ if (row == null) +/* */ { +/* 1110 */ return true; +/* */ } +/* 1112 */ for (int i = row.getFirstCellNum(); i < row.getLastCellNum(); i++) { +/* */ +/* 1114 */ Cell cell = row.getCell(i); +/* 1115 */ if (cell != null && cell.getCellType() != CellType.BLANK) +/* */ { +/* 1117 */ return false; +/* */ } +/* */ } +/* 1120 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\poi\ExcelUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/reflect/ReflectUtils.java b/src/main/java/com/archive/common/utils/reflect/ReflectUtils.java new file mode 100644 index 0000000..7f2e459 --- /dev/null +++ b/src/main/java/com/archive/common/utils/reflect/ReflectUtils.java @@ -0,0 +1,416 @@ +/* */ package com.archive.common.utils.reflect; +/* */ +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import java.lang.reflect.Field; +/* */ import java.lang.reflect.InvocationTargetException; +/* */ import java.lang.reflect.Method; +/* */ import java.lang.reflect.Modifier; +/* */ import java.lang.reflect.ParameterizedType; +/* */ import java.lang.reflect.Type; +/* */ import java.util.Date; +/* */ import org.apache.commons.lang3.StringUtils; +/* */ import org.apache.commons.lang3.Validate; +/* */ import org.apache.poi.ss.usermodel.DateUtil; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ReflectUtils +/* */ { +/* */ private static final String SETTER_PREFIX = "set"; +/* */ private static final String GETTER_PREFIX = "get"; +/* */ private static final String CGLIB_CLASS_SEPARATOR = "$$"; +/* 32 */ private static Logger logger = LoggerFactory.getLogger(com.archive.common.utils.reflect.ReflectUtils.class); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static E invokeGetter(Object obj, String propertyName) { +/* 41 */ Object object = obj; +/* 42 */ for (String name : StringUtils.split(propertyName, ".")) { +/* */ +/* 44 */ String getterMethodName = "get" + StringUtils.capitalize(name); +/* 45 */ object = invokeMethod(object, getterMethodName, new Class[0], new Object[0]); +/* */ } +/* 47 */ return (E)object; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void invokeSetter(Object obj, String propertyName, E value) { +/* 56 */ Object object = obj; +/* 57 */ String[] names = StringUtils.split(propertyName, "."); +/* 58 */ for (int i = 0; i < names.length; i++) { +/* */ +/* 60 */ if (i < names.length - 1) { +/* */ +/* 62 */ String getterMethodName = "get" + StringUtils.capitalize(names[i]); +/* 63 */ object = invokeMethod(object, getterMethodName, new Class[0], new Object[0]); +/* */ } +/* */ else { +/* */ +/* 67 */ String setterMethodName = "set" + StringUtils.capitalize(names[i]); +/* 68 */ invokeMethodByName(object, setterMethodName, new Object[] { value }); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static E getFieldValue(Object obj, String fieldName) { +/* 79 */ Field field = getAccessibleField(obj, fieldName); +/* 80 */ if (field == null) { +/* */ +/* 82 */ logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 "); +/* 83 */ return null; +/* */ } +/* 85 */ E result = null; +/* */ +/* */ try { +/* 88 */ result = (E)field.get(obj); +/* */ } +/* 90 */ catch (IllegalAccessException e) { +/* */ +/* 92 */ logger.error("不可能抛出的异常{}", e.getMessage()); +/* */ } +/* 94 */ return result; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void setFieldValue(Object obj, String fieldName, E value) { +/* 102 */ Field field = getAccessibleField(obj, fieldName); +/* 103 */ if (field == null) { +/* */ +/* */ +/* 106 */ logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 "); +/* */ +/* */ return; +/* */ } +/* */ try { +/* 111 */ field.set(obj, value); +/* */ } +/* 113 */ catch (IllegalAccessException e) { +/* */ +/* 115 */ logger.error("不可能抛出的异常: {}", e.getMessage()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static E invokeMethod(Object obj, String methodName, Class[] parameterTypes, Object[] args) { +/* 128 */ if (obj == null || methodName == null) +/* */ { +/* 130 */ return null; +/* */ } +/* 132 */ Method method = getAccessibleMethod(obj, methodName, parameterTypes); +/* 133 */ if (method == null) { +/* */ +/* 135 */ logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 "); +/* 136 */ return null; +/* */ } +/* */ +/* */ try { +/* 140 */ return (E)method.invoke(obj, args); +/* */ } +/* 142 */ catch (Exception e) { +/* */ +/* 144 */ String msg = "method: " + method + ", obj: " + obj + ", args: " + args + ""; +/* 145 */ throw convertReflectionExceptionToUnchecked(msg, e); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static E invokeMethodByName(Object obj, String methodName, Object[] args) { +/* 157 */ Method method = getAccessibleMethodByName(obj, methodName, args.length); +/* 158 */ if (method == null) { +/* */ +/* */ +/* 161 */ logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 "); +/* 162 */ return null; +/* */ } +/* */ +/* */ +/* */ try { +/* 167 */ Class[] cs = method.getParameterTypes(); +/* 168 */ for (int i = 0; i < cs.length; i++) { +/* */ +/* 170 */ if (args[i] != null && !args[i].getClass().equals(cs[i])) +/* */ { +/* 172 */ if (cs[i] == String.class) { +/* */ +/* 174 */ args[i] = Convert.toStr(args[i]); +/* 175 */ if (StringUtils.endsWith((String)args[i], ".0")) +/* */ { +/* 177 */ args[i] = StringUtils.substringBefore((String)args[i], ".0"); +/* */ } +/* */ } +/* 180 */ else if (cs[i] == Integer.class) { +/* */ +/* 182 */ args[i] = Convert.toInt(args[i]); +/* */ } +/* 184 */ else if (cs[i] == Long.class) { +/* */ +/* 186 */ args[i] = Convert.toLong(args[i]); +/* */ } +/* 188 */ else if (cs[i] == Double.class) { +/* */ +/* 190 */ args[i] = Convert.toDouble(args[i]); +/* */ } +/* 192 */ else if (cs[i] == Float.class) { +/* */ +/* 194 */ args[i] = Convert.toFloat(args[i]); +/* */ } +/* 196 */ else if (cs[i] == Date.class) { +/* */ +/* 198 */ if (args[i] instanceof String) +/* */ { +/* 200 */ args[i] = DateUtils.parseDate(args[i]); +/* */ } +/* */ else +/* */ { +/* 204 */ args[i] = DateUtil.getJavaDate(((Double)args[i]).doubleValue()); +/* */ } +/* */ +/* 207 */ } else if (cs[i] == boolean.class || cs[i] == Boolean.class) { +/* */ +/* 209 */ args[i] = Convert.toBool(args[i]); +/* */ } +/* */ } +/* */ } +/* 213 */ return (E)method.invoke(obj, args); +/* */ } +/* 215 */ catch (Exception e) { +/* */ +/* 217 */ String msg = "method: " + method + ", obj: " + obj + ", args: " + args + ""; +/* 218 */ throw convertReflectionExceptionToUnchecked(msg, e); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Field getAccessibleField(Object obj, String fieldName) { +/* 229 */ if (obj == null) +/* */ { +/* 231 */ return null; +/* */ } +/* 233 */ Validate.notBlank(fieldName, "fieldName can't be blank", new Object[0]); +/* 234 */ for (Class superClass = obj.getClass(); superClass != Object.class; superClass = superClass.getSuperclass()) { +/* */ +/* */ +/* */ try { +/* 238 */ Field field = superClass.getDeclaredField(fieldName); +/* 239 */ makeAccessible(field); +/* 240 */ return field; +/* */ } +/* 242 */ catch (NoSuchFieldException e) {} +/* */ } +/* */ +/* */ +/* */ +/* 247 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Method getAccessibleMethod(Object obj, String methodName, Class... parameterTypes) { +/* 260 */ if (obj == null) +/* */ { +/* 262 */ return null; +/* */ } +/* 264 */ Validate.notBlank(methodName, "methodName can't be blank", new Object[0]); +/* 265 */ for (Class searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) { +/* */ +/* */ +/* */ try { +/* 269 */ Method method = searchType.getDeclaredMethod(methodName, parameterTypes); +/* 270 */ makeAccessible(method); +/* 271 */ return method; +/* */ } +/* 273 */ catch (NoSuchMethodException e) {} +/* */ } +/* */ +/* */ +/* */ +/* 278 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Method getAccessibleMethodByName(Object obj, String methodName, int argsNum) { +/* 290 */ if (obj == null) +/* */ { +/* 292 */ return null; +/* */ } +/* 294 */ Validate.notBlank(methodName, "methodName can't be blank", new Object[0]); +/* 295 */ for (Class searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) { +/* */ +/* 297 */ Method[] methods = searchType.getDeclaredMethods(); +/* 298 */ for (Method method : methods) { +/* */ +/* 300 */ if (method.getName().equals(methodName) && (method.getParameterTypes()).length == argsNum) { +/* */ +/* 302 */ makeAccessible(method); +/* 303 */ return method; +/* */ } +/* */ } +/* */ } +/* 307 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void makeAccessible(Method method) { +/* 315 */ if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers())) && +/* 316 */ !method.isAccessible()) +/* */ { +/* 318 */ method.setAccessible(true); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void makeAccessible(Field field) { +/* 327 */ if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) || +/* 328 */ Modifier.isFinal(field.getModifiers())) && !field.isAccessible()) +/* */ { +/* 330 */ field.setAccessible(true); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Class getClassGenricType(Class clazz) { +/* 341 */ return getClassGenricType(clazz, 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Class getClassGenricType(Class clazz, int index) { +/* 350 */ Type genType = clazz.getGenericSuperclass(); +/* */ +/* 352 */ if (!(genType instanceof ParameterizedType)) { +/* */ +/* 354 */ logger.debug(clazz.getSimpleName() + "'s superclass not ParameterizedType"); +/* 355 */ return Object.class; +/* */ } +/* */ +/* 358 */ Type[] params = ((ParameterizedType)genType).getActualTypeArguments(); +/* */ +/* 360 */ if (index >= params.length || index < 0) { +/* */ +/* 362 */ logger.debug("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: " + params.length); +/* */ +/* 364 */ return Object.class; +/* */ } +/* 366 */ if (!(params[index] instanceof Class)) { +/* */ +/* 368 */ logger.debug(clazz.getSimpleName() + " not set the actual class on superclass generic parameter"); +/* 369 */ return Object.class; +/* */ } +/* */ +/* 372 */ return (Class)params[index]; +/* */ } +/* */ +/* */ +/* */ public static Class getUserClass(Object instance) { +/* 377 */ if (instance == null) +/* */ { +/* 379 */ throw new RuntimeException("Instance must not be null"); +/* */ } +/* 381 */ Class clazz = instance.getClass(); +/* 382 */ if (clazz != null && clazz.getName().contains("$$")) { +/* */ +/* 384 */ Class superClass = clazz.getSuperclass(); +/* 385 */ if (superClass != null && !Object.class.equals(superClass)) +/* */ { +/* 387 */ return superClass; +/* */ } +/* */ } +/* 390 */ return clazz; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static RuntimeException convertReflectionExceptionToUnchecked(String msg, Exception e) { +/* 399 */ if (e instanceof IllegalAccessException || e instanceof IllegalArgumentException || e instanceof NoSuchMethodException) +/* */ { +/* */ +/* 402 */ return new IllegalArgumentException(msg, e); +/* */ } +/* 404 */ if (e instanceof InvocationTargetException) +/* */ { +/* 406 */ return new RuntimeException(msg, ((InvocationTargetException)e).getTargetException()); +/* */ } +/* 408 */ return new RuntimeException(msg, e); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\reflect\ReflectUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/security/AuthorizationUtils.java b/src/main/java/com/archive/common/utils/security/AuthorizationUtils.java new file mode 100644 index 0000000..0b5da3c --- /dev/null +++ b/src/main/java/com/archive/common/utils/security/AuthorizationUtils.java @@ -0,0 +1,36 @@ +/* */ package com.archive.common.utils.security; +/* */ +/* */ import com.archive.framework.shiro.realm.UserRealm; +/* */ import org.apache.shiro.SecurityUtils; +/* */ import org.apache.shiro.mgt.RealmSecurityManager; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AuthorizationUtils +/* */ { +/* */ public static void clearAllCachedAuthorizationInfo() { +/* 19 */ getUserRealm().clearAllCachedAuthorizationInfo(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static UserRealm getUserRealm() { +/* 27 */ RealmSecurityManager rsm = (RealmSecurityManager)SecurityUtils.getSecurityManager(); +/* 28 */ return rsm.getRealms().iterator().next(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\security\AuthorizationUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/security/PermissionUtils.java b/src/main/java/com/archive/common/utils/security/PermissionUtils.java new file mode 100644 index 0000000..ffc9d1e --- /dev/null +++ b/src/main/java/com/archive/common/utils/security/PermissionUtils.java @@ -0,0 +1,83 @@ +/* */ package com.archive.common.utils.security; +/* */ +/* */ import com.archive.common.utils.MessageUtils; +/* */ import org.apache.commons.lang3.StringUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PermissionUtils +/* */ { +/* */ public static final String VIEW_PERMISSION = "no.view.permission"; +/* */ public static final String CREATE_PERMISSION = "no.create.permission"; +/* */ public static final String UPDATE_PERMISSION = "no.update.permission"; +/* */ public static final String DELETE_PERMISSION = "no.delete.permission"; +/* */ public static final String EXPORT_PERMISSION = "no.export.permission"; +/* */ public static final String PERMISSION = "no.permission"; +/* */ +/* */ public static String getMsg(String permissionsStr) { +/* 52 */ String permission = StringUtils.substringBetween(permissionsStr, "[", "]"); +/* 53 */ String msg = MessageUtils.message("no.permission", new Object[] { permission }); +/* 54 */ if (StringUtils.endsWithIgnoreCase(permission, "add")) { +/* */ +/* 56 */ msg = MessageUtils.message("no.create.permission", new Object[] { permission }); +/* */ } +/* 58 */ else if (StringUtils.endsWithIgnoreCase(permission, "edit")) { +/* */ +/* 60 */ msg = MessageUtils.message("no.update.permission", new Object[] { permission }); +/* */ } +/* 62 */ else if (StringUtils.endsWithIgnoreCase(permission, "remove")) { +/* */ +/* 64 */ msg = MessageUtils.message("no.delete.permission", new Object[] { permission }); +/* */ } +/* 66 */ else if (StringUtils.endsWithIgnoreCase(permission, "export")) { +/* */ +/* 68 */ msg = MessageUtils.message("no.export.permission", new Object[] { permission }); +/* */ } +/* 70 */ else if (StringUtils.endsWithAny(permission, (CharSequence[])new String[] { "view", "list" })) { +/* */ +/* */ +/* 73 */ msg = MessageUtils.message("no.view.permission", new Object[] { permission }); +/* */ } +/* 75 */ return msg; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\security\PermissionUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/security/ShiroUtils.java b/src/main/java/com/archive/common/utils/security/ShiroUtils.java new file mode 100644 index 0000000..1a7a2f1 --- /dev/null +++ b/src/main/java/com/archive/common/utils/security/ShiroUtils.java @@ -0,0 +1,81 @@ +/* */ package com.archive.common.utils.security; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.bean.BeanUtils; +/* */ import com.archive.project.system.user.domain.User; +/* */ import org.apache.shiro.SecurityUtils; +/* */ import org.apache.shiro.session.Session; +/* */ import org.apache.shiro.subject.PrincipalCollection; +/* */ import org.apache.shiro.subject.SimplePrincipalCollection; +/* */ import org.apache.shiro.subject.Subject; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ShiroUtils +/* */ { +/* */ public static Subject getSubject() { +/* 21 */ return SecurityUtils.getSubject(); +/* */ } +/* */ +/* */ +/* */ public static Session getSession() { +/* 26 */ return SecurityUtils.getSubject().getSession(); +/* */ } +/* */ +/* */ +/* */ public static void logout() { +/* 31 */ getSubject().logout(); +/* */ } +/* */ +/* */ +/* */ public static User getSysUser() { +/* 36 */ User user = null; +/* 37 */ Object obj = getSubject().getPrincipal(); +/* 38 */ if (StringUtils.isNotNull(obj)) { +/* */ +/* 40 */ user = new User(); +/* 41 */ BeanUtils.copyBeanProp(user, obj); +/* */ } +/* 43 */ return user; +/* */ } +/* */ +/* */ +/* */ public static void setSysUser(User user) { +/* 48 */ Subject subject = getSubject(); +/* 49 */ PrincipalCollection principalCollection = subject.getPrincipals(); +/* 50 */ String realmName = principalCollection.getRealmNames().iterator().next(); +/* 51 */ SimplePrincipalCollection simplePrincipalCollection = new SimplePrincipalCollection(user, realmName); +/* */ +/* 53 */ subject.runAs((PrincipalCollection)simplePrincipalCollection); +/* */ } +/* */ +/* */ +/* */ public static Long getUserId() { +/* 58 */ return Long.valueOf(getSysUser().getUserId().longValue()); +/* */ } +/* */ +/* */ +/* */ public static String getLoginName() { +/* 63 */ return getSysUser().getLoginName(); +/* */ } +/* */ +/* */ +/* */ public static String getIp() { +/* 68 */ return getSubject().getSession().getHost(); +/* */ } +/* */ +/* */ +/* */ public static String getSessionId() { +/* 73 */ return String.valueOf(getSubject().getSession().getId()); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\security\ShiroUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/spring/SpringUtils.java b/src/main/java/com/archive/common/utils/spring/SpringUtils.java new file mode 100644 index 0000000..832adae --- /dev/null +++ b/src/main/java/com/archive/common/utils/spring/SpringUtils.java @@ -0,0 +1,152 @@ +/* */ package com.archive.common.utils.spring; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import org.springframework.aop.framework.AopContext; +/* */ import org.springframework.beans.BeansException; +/* */ import org.springframework.beans.factory.NoSuchBeanDefinitionException; +/* */ import org.springframework.beans.factory.config.BeanFactoryPostProcessor; +/* */ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +/* */ import org.springframework.context.ApplicationContext; +/* */ import org.springframework.context.ApplicationContextAware; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ public final class SpringUtils +/* */ implements BeanFactoryPostProcessor, ApplicationContextAware +/* */ { +/* */ private static ConfigurableListableBeanFactory beanFactory; +/* */ private static ApplicationContext applicationContext; +/* */ +/* */ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { +/* 29 */ com.archive.common.utils.spring.SpringUtils.beanFactory = beanFactory; +/* */ } +/* */ +/* */ +/* */ +/* */ public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { +/* 35 */ com.archive.common.utils.spring.SpringUtils.applicationContext = applicationContext; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static T getBean(String name) throws BeansException { +/* 49 */ return (T)beanFactory.getBean(name); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static T getBean(Class clz) throws BeansException { +/* 62 */ T result = (T)beanFactory.getBean(clz); +/* 63 */ return result; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean containsBean(String name) { +/* 74 */ return beanFactory.containsBean(name); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException { +/* 87 */ return beanFactory.isSingleton(name); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Class getType(String name) throws NoSuchBeanDefinitionException { +/* 98 */ return beanFactory.getType(name); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String[] getAliases(String name) throws NoSuchBeanDefinitionException { +/* 111 */ return beanFactory.getAliases(name); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static T getAopProxy(T invoker) { +/* 123 */ return (T)AopContext.currentProxy(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String[] getActiveProfiles() { +/* 133 */ return applicationContext.getEnvironment().getActiveProfiles(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getActiveProfile() { +/* 143 */ String[] activeProfiles = getActiveProfiles(); +/* 144 */ return StringUtils.isNotEmpty((Object[])activeProfiles) ? activeProfiles[0] : null; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\spring\SpringUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/sql/SqlUtil.java b/src/main/java/com/archive/common/utils/sql/SqlUtil.java new file mode 100644 index 0000000..f9d7ac4 --- /dev/null +++ b/src/main/java/com/archive/common/utils/sql/SqlUtil.java @@ -0,0 +1,43 @@ +/* */ package com.archive.common.utils.sql; +/* */ +/* */ import com.archive.common.exception.base.BaseException; +/* */ import com.archive.common.utils.StringUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SqlUtil +/* */ { +/* 16 */ public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,\\.]+"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String escapeOrderBySql(String value) { +/* 23 */ if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value)) +/* */ { +/* 25 */ throw new BaseException("参数不符合规范,不能进行查询"); +/* */ } +/* 27 */ return value; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isValidOrderBySql(String value) { +/* 35 */ return value.matches(SQL_PATTERN); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\sql\SqlUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/text/CharsetKit.java b/src/main/java/com/archive/common/utils/text/CharsetKit.java new file mode 100644 index 0000000..fef0dd7 --- /dev/null +++ b/src/main/java/com/archive/common/utils/text/CharsetKit.java @@ -0,0 +1,93 @@ +/* */ package com.archive.common.utils.text; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import java.nio.charset.Charset; +/* */ import java.nio.charset.StandardCharsets; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CharsetKit +/* */ { +/* */ public static final String ISO_8859_1 = "ISO-8859-1"; +/* */ public static final String UTF_8 = "UTF-8"; +/* */ public static final String GBK = "GBK"; +/* 23 */ public static final Charset CHARSET_ISO_8859_1 = Charset.forName("ISO-8859-1"); +/* */ +/* 25 */ public static final Charset CHARSET_UTF_8 = Charset.forName("UTF-8"); +/* */ +/* 27 */ public static final Charset CHARSET_GBK = Charset.forName("GBK"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Charset charset(String charset) { +/* 37 */ return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String convert(String source, String srcCharset, String destCharset) { +/* 50 */ return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String convert(String source, Charset srcCharset, Charset destCharset) { +/* 63 */ if (null == srcCharset) +/* */ { +/* 65 */ srcCharset = StandardCharsets.ISO_8859_1; +/* */ } +/* */ +/* 68 */ if (null == destCharset) +/* */ { +/* 70 */ destCharset = StandardCharsets.UTF_8; +/* */ } +/* */ +/* 73 */ if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset)) +/* */ { +/* 75 */ return source; +/* */ } +/* 77 */ return new String(source.getBytes(srcCharset), destCharset); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String systemCharset() { +/* 85 */ return Charset.defaultCharset().name(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\text\CharsetKit.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/text/Convert.java b/src/main/java/com/archive/common/utils/text/Convert.java new file mode 100644 index 0000000..9b8f995 --- /dev/null +++ b/src/main/java/com/archive/common/utils/text/Convert.java @@ -0,0 +1,1005 @@ +/* */ package com.archive.common.utils.text; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.text.CharsetKit; +/* */ import java.math.BigDecimal; +/* */ import java.math.BigInteger; +/* */ import java.nio.ByteBuffer; +/* */ import java.nio.charset.Charset; +/* */ import java.text.NumberFormat; +/* */ import java.util.Set; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Convert +/* */ { +/* */ public static String toStr(Object value, String defaultValue) { +/* 29 */ if (null == value) +/* */ { +/* 31 */ return defaultValue; +/* */ } +/* 33 */ if (value instanceof String) +/* */ { +/* 35 */ return (String)value; +/* */ } +/* 37 */ return value.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String toStr(Object value) { +/* 50 */ return toStr(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Character toChar(Object value, Character defaultValue) { +/* 64 */ if (null == value) +/* */ { +/* 66 */ return defaultValue; +/* */ } +/* 68 */ if (value instanceof Character) +/* */ { +/* 70 */ return (Character)value; +/* */ } +/* */ +/* 73 */ String valueStr = toStr(value, null); +/* 74 */ return Character.valueOf(StringUtils.isEmpty(valueStr) ? defaultValue.charValue() : valueStr.charAt(0)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Character toChar(Object value) { +/* 87 */ return toChar(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Byte toByte(Object value, Byte defaultValue) { +/* 101 */ if (value == null) +/* */ { +/* 103 */ return defaultValue; +/* */ } +/* 105 */ if (value instanceof Byte) +/* */ { +/* 107 */ return (Byte)value; +/* */ } +/* 109 */ if (value instanceof Number) +/* */ { +/* 111 */ return Byte.valueOf(((Number)value).byteValue()); +/* */ } +/* 113 */ String valueStr = toStr(value, null); +/* 114 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 116 */ return defaultValue; +/* */ } +/* */ +/* */ try { +/* 120 */ return Byte.valueOf(Byte.parseByte(valueStr)); +/* */ } +/* 122 */ catch (Exception e) { +/* */ +/* 124 */ return defaultValue; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Byte toByte(Object value) { +/* 138 */ return toByte(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Short toShort(Object value, Short defaultValue) { +/* 152 */ if (value == null) +/* */ { +/* 154 */ return defaultValue; +/* */ } +/* 156 */ if (value instanceof Short) +/* */ { +/* 158 */ return (Short)value; +/* */ } +/* 160 */ if (value instanceof Number) +/* */ { +/* 162 */ return Short.valueOf(((Number)value).shortValue()); +/* */ } +/* 164 */ String valueStr = toStr(value, null); +/* 165 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 167 */ return defaultValue; +/* */ } +/* */ +/* */ try { +/* 171 */ return Short.valueOf(Short.parseShort(valueStr.trim())); +/* */ } +/* 173 */ catch (Exception e) { +/* */ +/* 175 */ return defaultValue; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Short toShort(Object value) { +/* 189 */ return toShort(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Number toNumber(Object value, Number defaultValue) { +/* 203 */ if (value == null) +/* */ { +/* 205 */ return defaultValue; +/* */ } +/* 207 */ if (value instanceof Number) +/* */ { +/* 209 */ return (Number)value; +/* */ } +/* 211 */ String valueStr = toStr(value, null); +/* 212 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 214 */ return defaultValue; +/* */ } +/* */ +/* */ try { +/* 218 */ return NumberFormat.getInstance().parse(valueStr); +/* */ } +/* 220 */ catch (Exception e) { +/* */ +/* 222 */ return defaultValue; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Number toNumber(Object value) { +/* 236 */ return toNumber(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Integer toInt(Object value, Integer defaultValue) { +/* 250 */ if (value == null) +/* */ { +/* 252 */ return defaultValue; +/* */ } +/* 254 */ if (value instanceof Integer) +/* */ { +/* 256 */ return (Integer)value; +/* */ } +/* 258 */ if (value instanceof Number) +/* */ { +/* 260 */ return Integer.valueOf(((Number)value).intValue()); +/* */ } +/* 262 */ String valueStr = toStr(value, null); +/* 263 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 265 */ return defaultValue; +/* */ } +/* */ +/* */ try { +/* 269 */ return Integer.valueOf(Integer.parseInt(valueStr.trim())); +/* */ } +/* 271 */ catch (Exception e) { +/* */ +/* 273 */ return defaultValue; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Integer toInt(Object value) { +/* 287 */ return toInt(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Integer[] toIntArray(String str) { +/* 298 */ return toIntArray(",", str); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Long[] toLongArray(String str) { +/* 309 */ return toLongArray(",", str); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Integer[] toIntArray(String split, String str) { +/* 321 */ if (StringUtils.isEmpty(str)) +/* */ { +/* 323 */ return new Integer[0]; +/* */ } +/* 325 */ String[] arr = str.split(split); +/* 326 */ Integer[] ints = new Integer[arr.length]; +/* 327 */ for (int i = 0; i < arr.length; i++) { +/* */ +/* 329 */ Integer v = toInt(arr[i], Integer.valueOf(0)); +/* 330 */ ints[i] = v; +/* */ } +/* 332 */ return ints; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Long[] toLongArray(String split, String str) { +/* 344 */ if (StringUtils.isEmpty(str)) +/* */ { +/* 346 */ return new Long[0]; +/* */ } +/* 348 */ String[] arr = str.split(split); +/* 349 */ Long[] longs = new Long[arr.length]; +/* 350 */ for (int i = 0; i < arr.length; i++) { +/* */ +/* 352 */ Long v = toLong(arr[i], null); +/* 353 */ longs[i] = v; +/* */ } +/* 355 */ return longs; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String[] toStrArray(String str) { +/* 366 */ return toStrArray(",", str); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String[] toStrArray(String split, String str) { +/* 378 */ return str.split(split); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Long toLong(Object value, Long defaultValue) { +/* 392 */ if (value == null) +/* */ { +/* 394 */ return defaultValue; +/* */ } +/* 396 */ if (value instanceof Long) +/* */ { +/* 398 */ return (Long)value; +/* */ } +/* 400 */ if (value instanceof Number) +/* */ { +/* 402 */ return Long.valueOf(((Number)value).longValue()); +/* */ } +/* 404 */ String valueStr = toStr(value, null); +/* 405 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 407 */ return defaultValue; +/* */ } +/* */ +/* */ +/* */ try { +/* 412 */ return Long.valueOf((new BigDecimal(valueStr.trim())).longValue()); +/* */ } +/* 414 */ catch (Exception e) { +/* */ +/* 416 */ return defaultValue; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Long toLong(Object value) { +/* 430 */ return toLong(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Double toDouble(Object value, Double defaultValue) { +/* 444 */ if (value == null) +/* */ { +/* 446 */ return defaultValue; +/* */ } +/* 448 */ if (value instanceof Double) +/* */ { +/* 450 */ return (Double)value; +/* */ } +/* 452 */ if (value instanceof Number) +/* */ { +/* 454 */ return Double.valueOf(((Number)value).doubleValue()); +/* */ } +/* 456 */ String valueStr = toStr(value, null); +/* 457 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 459 */ return defaultValue; +/* */ } +/* */ +/* */ +/* */ try { +/* 464 */ return Double.valueOf((new BigDecimal(valueStr.trim())).doubleValue()); +/* */ } +/* 466 */ catch (Exception e) { +/* */ +/* 468 */ return defaultValue; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Double toDouble(Object value) { +/* 482 */ return toDouble(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Float toFloat(Object value, Float defaultValue) { +/* 496 */ if (value == null) +/* */ { +/* 498 */ return defaultValue; +/* */ } +/* 500 */ if (value instanceof Float) +/* */ { +/* 502 */ return (Float)value; +/* */ } +/* 504 */ if (value instanceof Number) +/* */ { +/* 506 */ return Float.valueOf(((Number)value).floatValue()); +/* */ } +/* 508 */ String valueStr = toStr(value, null); +/* 509 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 511 */ return defaultValue; +/* */ } +/* */ +/* */ try { +/* 515 */ return Float.valueOf(Float.parseFloat(valueStr.trim())); +/* */ } +/* 517 */ catch (Exception e) { +/* */ +/* 519 */ return defaultValue; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Float toFloat(Object value) { +/* 533 */ return toFloat(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Boolean toBool(Object value, Boolean defaultValue) { +/* 547 */ if (value == null) +/* */ { +/* 549 */ return defaultValue; +/* */ } +/* 551 */ if (value instanceof Boolean) +/* */ { +/* 553 */ return (Boolean)value; +/* */ } +/* 555 */ String valueStr = toStr(value, null); +/* 556 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 558 */ return defaultValue; +/* */ } +/* 560 */ valueStr = valueStr.trim().toLowerCase(); +/* 561 */ switch (valueStr) { +/* */ +/* */ case "true": +/* 564 */ return Boolean.valueOf(true); +/* */ case "false": +/* 566 */ return Boolean.valueOf(false); +/* */ case "yes": +/* 568 */ return Boolean.valueOf(true); +/* */ case "ok": +/* 570 */ return Boolean.valueOf(true); +/* */ case "no": +/* 572 */ return Boolean.valueOf(false); +/* */ case "1": +/* 574 */ return Boolean.valueOf(true); +/* */ case "0": +/* 576 */ return Boolean.valueOf(false); +/* */ } +/* 578 */ return defaultValue; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Boolean toBool(Object value) { +/* 592 */ return toBool(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static > E toEnum(Class clazz, Object value, E defaultValue) { +/* 606 */ if (value == null) +/* */ { +/* 608 */ return defaultValue; +/* */ } +/* 610 */ if (clazz.isAssignableFrom(value.getClass())) +/* */ { +/* */ +/* 613 */ return (E)value; +/* */ } +/* */ +/* 616 */ String valueStr = toStr(value, null); +/* 617 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 619 */ return defaultValue; +/* */ } +/* */ +/* */ try { +/* 623 */ return Enum.valueOf(clazz, valueStr); +/* */ } +/* 625 */ catch (Exception e) { +/* */ +/* 627 */ return defaultValue; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static > E toEnum(Class clazz, Object value) { +/* 641 */ return toEnum(clazz, value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static BigInteger toBigInteger(Object value, BigInteger defaultValue) { +/* 655 */ if (value == null) +/* */ { +/* 657 */ return defaultValue; +/* */ } +/* 659 */ if (value instanceof BigInteger) +/* */ { +/* 661 */ return (BigInteger)value; +/* */ } +/* 663 */ if (value instanceof Long) +/* */ { +/* 665 */ return BigInteger.valueOf(((Long)value).longValue()); +/* */ } +/* 667 */ String valueStr = toStr(value, null); +/* 668 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 670 */ return defaultValue; +/* */ } +/* */ +/* */ try { +/* 674 */ return new BigInteger(valueStr); +/* */ } +/* 676 */ catch (Exception e) { +/* */ +/* 678 */ return defaultValue; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static BigInteger toBigInteger(Object value) { +/* 692 */ return toBigInteger(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static BigDecimal toBigDecimal(Object value, BigDecimal defaultValue) { +/* 706 */ if (value == null) +/* */ { +/* 708 */ return defaultValue; +/* */ } +/* 710 */ if (value instanceof BigDecimal) +/* */ { +/* 712 */ return (BigDecimal)value; +/* */ } +/* 714 */ if (value instanceof Long) +/* */ { +/* 716 */ return new BigDecimal(((Long)value).longValue()); +/* */ } +/* 718 */ if (value instanceof Double) +/* */ { +/* 720 */ return new BigDecimal(((Double)value).doubleValue()); +/* */ } +/* 722 */ if (value instanceof Integer) +/* */ { +/* 724 */ return new BigDecimal(((Integer)value).intValue()); +/* */ } +/* 726 */ String valueStr = toStr(value, null); +/* 727 */ if (StringUtils.isEmpty(valueStr)) +/* */ { +/* 729 */ return defaultValue; +/* */ } +/* */ +/* */ try { +/* 733 */ return new BigDecimal(valueStr); +/* */ } +/* 735 */ catch (Exception e) { +/* */ +/* 737 */ return defaultValue; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static BigDecimal toBigDecimal(Object value) { +/* 751 */ return toBigDecimal(value, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String utf8Str(Object obj) { +/* 763 */ return str(obj, CharsetKit.CHARSET_UTF_8); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String str(Object obj, String charsetName) { +/* 776 */ return str(obj, Charset.forName(charsetName)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String str(Object obj, Charset charset) { +/* 789 */ if (null == obj) +/* */ { +/* 791 */ return null; +/* */ } +/* */ +/* 794 */ if (obj instanceof String) +/* */ { +/* 796 */ return (String)obj; +/* */ } +/* 798 */ if (obj instanceof byte[] || obj instanceof Byte[]) +/* */ { +/* 800 */ return str(obj, charset); +/* */ } +/* 802 */ if (obj instanceof ByteBuffer) +/* */ { +/* 804 */ return str((ByteBuffer)obj, charset); +/* */ } +/* 806 */ return obj.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String str(byte[] bytes, String charset) { +/* 818 */ return str(bytes, StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String str(byte[] data, Charset charset) { +/* 830 */ if (data == null) +/* */ { +/* 832 */ return null; +/* */ } +/* */ +/* 835 */ if (null == charset) +/* */ { +/* 837 */ return new String(data); +/* */ } +/* 839 */ return new String(data, charset); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String str(ByteBuffer data, String charset) { +/* 851 */ if (data == null) +/* */ { +/* 853 */ return null; +/* */ } +/* */ +/* 856 */ return str(data, Charset.forName(charset)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String str(ByteBuffer data, Charset charset) { +/* 868 */ if (null == charset) +/* */ { +/* 870 */ charset = Charset.defaultCharset(); +/* */ } +/* 872 */ return charset.decode(data).toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String toSBC(String input) { +/* 884 */ return toSBC(input, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String toSBC(String input, Set notConvertSet) { +/* 896 */ char[] c = input.toCharArray(); +/* 897 */ for (int i = 0; i < c.length; i++) { +/* */ +/* 899 */ if (null == notConvertSet || !notConvertSet.contains(Character.valueOf(c[i]))) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* 905 */ if (c[i] == ' ') { +/* */ +/* 907 */ c[i] = ' '; +/* */ } +/* 909 */ else if (c[i] < '') { +/* */ +/* 911 */ c[i] = (char)(c[i] + 65248); +/* */ } +/* */ } +/* */ } +/* 915 */ return new String(c); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String toDBC(String input) { +/* 926 */ return toDBC(input, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String toDBC(String text, Set notConvertSet) { +/* 938 */ char[] c = text.toCharArray(); +/* 939 */ for (int i = 0; i < c.length; i++) { +/* */ +/* 941 */ if (null == notConvertSet || !notConvertSet.contains(Character.valueOf(c[i]))) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* 947 */ if (c[i] == ' ') { +/* */ +/* 949 */ c[i] = ' '; +/* */ } +/* 951 */ else if (c[i] > '＀' && c[i] < '⦅') { +/* */ +/* 953 */ c[i] = (char)(c[i] - 65248); +/* */ } } +/* */ } +/* 956 */ String returnString = new String(c); +/* */ +/* 958 */ return returnString; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String digitUppercase(double n) { +/* 969 */ String[] fraction = { "角", "分" }; +/* 970 */ String[] digit = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" }; +/* 971 */ String[][] unit = { { "元", "万", "亿" }, { "", "拾", "佰", "仟" } }; +/* */ +/* 973 */ String head = (n < 0.0D) ? "负" : ""; +/* 974 */ n = Math.abs(n); +/* */ +/* 976 */ String s = ""; +/* 977 */ for (int i = 0; i < fraction.length; i++) +/* */ { +/* 979 */ s = s + (digit[(int)(Math.floor(n * 10.0D * Math.pow(10.0D, i)) % 10.0D)] + fraction[i]).replaceAll("(零.)+", ""); +/* */ } +/* 981 */ if (s.length() < 1) +/* */ { +/* 983 */ s = "整"; +/* */ } +/* 985 */ int integerPart = (int)Math.floor(n); +/* */ +/* 987 */ for (int j = 0; j < (unit[0]).length && integerPart > 0; j++) { +/* */ +/* 989 */ String p = ""; +/* 990 */ for (int k = 0; k < (unit[1]).length && n > 0.0D; k++) { +/* */ +/* 992 */ p = digit[integerPart % 10] + unit[1][k] + p; +/* 993 */ integerPart /= 10; +/* */ } +/* 995 */ s = p.replaceAll("(零.)*零$", "").replaceAll("^$", "零") + unit[0][j] + s; +/* */ } +/* 997 */ return head + s.replaceAll("(零.)*零元", "元").replaceFirst("(零.)+", "").replaceAll("(零.)+", "零").replaceAll("^整$", "零元整"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\text\Convert.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/text/StrFormatter.java b/src/main/java/com/archive/common/utils/text/StrFormatter.java new file mode 100644 index 0000000..3701cec --- /dev/null +++ b/src/main/java/com/archive/common/utils/text/StrFormatter.java @@ -0,0 +1,99 @@ +/* */ package com.archive.common.utils.text; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class StrFormatter +/* */ { +/* */ public static final String EMPTY_JSON = "{}"; +/* */ public static final char C_BACKSLASH = '\\'; +/* */ public static final char C_DELIM_START = '{'; +/* */ public static final char C_DELIM_END = '}'; +/* */ +/* */ public static String format(String strPattern, Object... argArray) { +/* 32 */ if (StringUtils.isEmpty(strPattern) || StringUtils.isEmpty(argArray)) +/* */ { +/* 34 */ return strPattern; +/* */ } +/* 36 */ int strPatternLength = strPattern.length(); +/* */ +/* */ +/* 39 */ StringBuilder sbuf = new StringBuilder(strPatternLength + 50); +/* */ +/* 41 */ int handledPosition = 0; +/* */ +/* 43 */ for (int argIndex = 0; argIndex < argArray.length; argIndex++) { +/* */ +/* 45 */ int delimIndex = strPattern.indexOf("{}", handledPosition); +/* 46 */ if (delimIndex == -1) { +/* */ +/* 48 */ if (handledPosition == 0) +/* */ { +/* 50 */ return strPattern; +/* */ } +/* */ +/* */ +/* 54 */ sbuf.append(strPattern, handledPosition, strPatternLength); +/* 55 */ return sbuf.toString(); +/* */ } +/* */ +/* */ +/* */ +/* 60 */ if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == '\\') { +/* */ +/* 62 */ if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == '\\') +/* */ { +/* */ +/* 65 */ sbuf.append(strPattern, handledPosition, delimIndex - 1); +/* 66 */ sbuf.append(Convert.utf8Str(argArray[argIndex])); +/* 67 */ handledPosition = delimIndex + 2; +/* */ +/* */ } +/* */ else +/* */ { +/* 72 */ argIndex--; +/* 73 */ sbuf.append(strPattern, handledPosition, delimIndex - 1); +/* 74 */ sbuf.append('{'); +/* 75 */ handledPosition = delimIndex + 1; +/* */ } +/* */ +/* */ } +/* */ else { +/* */ +/* 81 */ sbuf.append(strPattern, handledPosition, delimIndex); +/* 82 */ sbuf.append(Convert.utf8Str(argArray[argIndex])); +/* 83 */ handledPosition = delimIndex + 2; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 89 */ sbuf.append(strPattern, handledPosition, strPattern.length()); +/* */ +/* 91 */ return sbuf.toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\text\StrFormatter.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/text/TextUtils.java b/src/main/java/com/archive/common/utils/text/TextUtils.java new file mode 100644 index 0000000..d0e096e --- /dev/null +++ b/src/main/java/com/archive/common/utils/text/TextUtils.java @@ -0,0 +1,65 @@ +/* */ package com.archive.common.utils.text; +/* */ +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import java.io.BufferedWriter; +/* */ import java.io.File; +/* */ import java.io.FileWriter; +/* */ import java.io.IOException; +/* */ import java.nio.file.Files; +/* */ import java.nio.file.Paths; +/* */ import java.util.List; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TextUtils +/* */ { +/* */ public static String generateTxt(String text, String fileName) { +/* 28 */ String result = ""; +/* 29 */ String folderDir = ArchiveConfig.getInstance().getImportBathMessagePath(); +/* 30 */ File folder = new File(folderDir); +/* 31 */ if (!folder.exists()) { +/* 32 */ folder.mkdirs(); +/* */ } +/* */ try { +/* 35 */ String filePath = folderDir + File.separator + fileName; +/* 36 */ File file = new File(filePath); +/* 37 */ BufferedWriter writer = new BufferedWriter(new FileWriter(file)); +/* 38 */ writer.write(text); +/* 39 */ writer.close(); +/* 40 */ result = filePath; +/* 41 */ } catch (IOException e) { +/* 42 */ e.printStackTrace(); +/* */ } +/* 44 */ return result; +/* */ } +/* */ +/* */ public static String readText(String filePath) { +/* 48 */ String result = ""; +/* */ try { +/* 50 */ List lines = Files.readAllLines(Paths.get(filePath, new String[0])); +/* 51 */ for (String line : lines) { +/* 52 */ result = result + line; +/* */ } +/* 54 */ } catch (IOException e) { +/* 55 */ e.printStackTrace(); +/* */ } +/* 57 */ return result; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\text\TextUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/uuid/IdUtils.java b/src/main/java/com/archive/common/utils/uuid/IdUtils.java new file mode 100644 index 0000000..ede8052 --- /dev/null +++ b/src/main/java/com/archive/common/utils/uuid/IdUtils.java @@ -0,0 +1,55 @@ +/* */ package com.archive.common.utils.uuid; +/* */ +/* */ import com.archive.common.utils.uuid.UUID; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class IdUtils +/* */ { +/* */ public static String randomUUID() { +/* 17 */ return UUID.randomUUID().toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String simpleUUID() { +/* 27 */ return UUID.randomUUID().toString(true); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String fastUUID() { +/* 37 */ return UUID.fastUUID().toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String fastSimpleUUID() { +/* 47 */ return UUID.fastUUID().toString(true); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\util\\uuid\IdUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/uuid/UUID$Holder.java b/src/main/java/com/archive/common/utils/uuid/UUID$Holder.java new file mode 100644 index 0000000..6c1d360 --- /dev/null +++ b/src/main/java/com/archive/common/utils/uuid/UUID$Holder.java @@ -0,0 +1,34 @@ +/* */ package com.archive.common.utils.uuid + +-INF.classes.com.archive.common.utils.uuid; +/* */ +/* */ import com.archive.common.utils.uuid.UUID; +/* */ import java.security.SecureRandom; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class Holder +/* */ { +/* 25 */ static final SecureRandom numberGenerator = UUID.getSecureRandom(); +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\util\\uuid\UUID$Holder.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/utils/uuid/UUID.java b/src/main/java/com/archive/common/utils/uuid/UUID.java new file mode 100644 index 0000000..66a5423 --- /dev/null +++ b/src/main/java/com/archive/common/utils/uuid/UUID.java @@ -0,0 +1,490 @@ +/* */ package com.archive.common.utils.uuid; +/* */ +/* */ import com.archive.common.exception.UtilException; +/* */ import com.archive.common.utils.uuid.UUID; +/* */ import java.io.Serializable; +/* */ import java.security.MessageDigest; +/* */ import java.security.NoSuchAlgorithmException; +/* */ import java.security.SecureRandom; +/* */ import java.util.Random; +/* */ import java.util.concurrent.ThreadLocalRandom; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public final class UUID +/* */ implements Serializable, Comparable +/* */ { +/* */ private static final long serialVersionUID = -1185015143654744140L; +/* */ private final long mostSigBits; +/* */ private final long leastSigBits; +/* */ +/* */ private UUID(byte[] data) { +/* 41 */ long msb = 0L; +/* 42 */ long lsb = 0L; +/* 43 */ assert data.length == 16 : "data must be 16 bytes in length"; int i; +/* 44 */ for (i = 0; i < 8; i++) +/* */ { +/* 46 */ msb = msb << 8L | (data[i] & 0xFF); +/* */ } +/* 48 */ for (i = 8; i < 16; i++) +/* */ { +/* 50 */ lsb = lsb << 8L | (data[i] & 0xFF); +/* */ } +/* 52 */ this.mostSigBits = msb; +/* 53 */ this.leastSigBits = lsb; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public UUID(long mostSigBits, long leastSigBits) { +/* 64 */ this.mostSigBits = mostSigBits; +/* 65 */ this.leastSigBits = leastSigBits; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static UUID fastUUID() { +/* 75 */ return randomUUID(false); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static UUID randomUUID() { +/* 85 */ return randomUUID(true); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static UUID randomUUID(boolean isSecure) { +/* 96 */ Random ng = isSecure ? Holder.numberGenerator : getRandom(); +/* */ +/* 98 */ byte[] randomBytes = new byte[16]; +/* 99 */ ng.nextBytes(randomBytes); +/* 100 */ randomBytes[6] = (byte)(randomBytes[6] & 0xF); +/* 101 */ randomBytes[6] = (byte)(randomBytes[6] | 0x40); +/* 102 */ randomBytes[8] = (byte)(randomBytes[8] & 0x3F); +/* 103 */ randomBytes[8] = (byte)(randomBytes[8] | 0x80); +/* 104 */ return new UUID(randomBytes); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static UUID nameUUIDFromBytes(byte[] name) { +/* */ MessageDigest md; +/* */ try { +/* 119 */ md = MessageDigest.getInstance("MD5"); +/* */ } +/* 121 */ catch (NoSuchAlgorithmException nsae) { +/* */ +/* 123 */ throw new InternalError("MD5 not supported"); +/* */ } +/* 125 */ byte[] md5Bytes = md.digest(name); +/* 126 */ md5Bytes[6] = (byte)(md5Bytes[6] & 0xF); +/* 127 */ md5Bytes[6] = (byte)(md5Bytes[6] | 0x30); +/* 128 */ md5Bytes[8] = (byte)(md5Bytes[8] & 0x3F); +/* 129 */ md5Bytes[8] = (byte)(md5Bytes[8] | 0x80); +/* 130 */ return new UUID(md5Bytes); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static UUID fromString(String name) { +/* 143 */ String[] components = name.split("-"); +/* 144 */ if (components.length != 5) +/* */ { +/* 146 */ throw new IllegalArgumentException("Invalid UUID string: " + name); +/* */ } +/* 148 */ for (int i = 0; i < 5; i++) +/* */ { +/* 150 */ components[i] = "0x" + components[i]; +/* */ } +/* */ +/* 153 */ long mostSigBits = Long.decode(components[0]).longValue(); +/* 154 */ mostSigBits <<= 16L; +/* 155 */ mostSigBits |= Long.decode(components[1]).longValue(); +/* 156 */ mostSigBits <<= 16L; +/* 157 */ mostSigBits |= Long.decode(components[2]).longValue(); +/* */ +/* 159 */ long leastSigBits = Long.decode(components[3]).longValue(); +/* 160 */ leastSigBits <<= 48L; +/* 161 */ leastSigBits |= Long.decode(components[4]).longValue(); +/* */ +/* 163 */ return new UUID(mostSigBits, leastSigBits); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public long getLeastSignificantBits() { +/* 173 */ return this.leastSigBits; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public long getMostSignificantBits() { +/* 183 */ return this.mostSigBits; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int version() { +/* 202 */ return (int)(this.mostSigBits >> 12L & 0xFL); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int variant() { +/* 225 */ return (int)(this.leastSigBits >>> (int)(64L - (this.leastSigBits >>> 62L)) & this.leastSigBits >> 63L); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public long timestamp() throws UnsupportedOperationException { +/* 243 */ checkTimeBase(); +/* 244 */ return (this.mostSigBits & 0xFFFL) << 48L | (this.mostSigBits >> 16L & 0xFFFFL) << 32L | this.mostSigBits >>> 32L; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int clockSequence() throws UnsupportedOperationException { +/* 264 */ checkTimeBase(); +/* 265 */ return (int)((this.leastSigBits & 0x3FFF000000000000L) >>> 48L); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public long node() throws UnsupportedOperationException { +/* 283 */ checkTimeBase(); +/* 284 */ return this.leastSigBits & 0xFFFFFFFFFFFFL; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() { +/* 314 */ return toString(false); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String toString(boolean isSimple) { +/* 343 */ StringBuilder builder = new StringBuilder(isSimple ? 32 : 36); +/* */ +/* 345 */ builder.append(digits(this.mostSigBits >> 32L, 8)); +/* 346 */ if (false == isSimple) +/* */ { +/* 348 */ builder.append('-'); +/* */ } +/* */ +/* 351 */ builder.append(digits(this.mostSigBits >> 16L, 4)); +/* 352 */ if (false == isSimple) +/* */ { +/* 354 */ builder.append('-'); +/* */ } +/* */ +/* 357 */ builder.append(digits(this.mostSigBits, 4)); +/* 358 */ if (false == isSimple) +/* */ { +/* 360 */ builder.append('-'); +/* */ } +/* */ +/* 363 */ builder.append(digits(this.leastSigBits >> 48L, 4)); +/* 364 */ if (false == isSimple) +/* */ { +/* 366 */ builder.append('-'); +/* */ } +/* */ +/* 369 */ builder.append(digits(this.leastSigBits, 12)); +/* */ +/* 371 */ return builder.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int hashCode() { +/* 382 */ long hilo = this.mostSigBits ^ this.leastSigBits; +/* 383 */ return (int)(hilo >> 32L) ^ (int)hilo; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean equals(Object obj) { +/* 398 */ if (null == obj || obj.getClass() != UUID.class) +/* */ { +/* 400 */ return false; +/* */ } +/* 402 */ UUID id = (UUID)obj; +/* 403 */ return (this.mostSigBits == id.mostSigBits && this.leastSigBits == id.leastSigBits); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int compareTo(UUID val) { +/* 424 */ return (this.mostSigBits < val.mostSigBits) ? -1 : ((this.mostSigBits > val.mostSigBits) ? 1 : ((this.leastSigBits < val.leastSigBits) ? -1 : ((this.leastSigBits > val.leastSigBits) ? 1 : 0))); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static String digits(long val, int digits) { +/* 442 */ long hi = 1L << digits * 4; +/* 443 */ return Long.toHexString(hi | val & hi - 1L).substring(1); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void checkTimeBase() { +/* 451 */ if (version() != 1) +/* */ { +/* 453 */ throw new UnsupportedOperationException("Not a time-based UUID"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static SecureRandom getSecureRandom() { +/* */ try { +/* 466 */ return SecureRandom.getInstance("SHA1PRNG"); +/* */ } +/* 468 */ catch (NoSuchAlgorithmException e) { +/* */ +/* 470 */ throw new UtilException(e); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static ThreadLocalRandom getRandom() { +/* 482 */ return ThreadLocalRandom.current(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\util\\uuid\UUID.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/xss/XssFilter.java b/src/main/java/com/archive/common/xss/XssFilter.java new file mode 100644 index 0000000..c670269 --- /dev/null +++ b/src/main/java/com/archive/common/xss/XssFilter.java @@ -0,0 +1,101 @@ +/* */ package com.archive.common.xss + +-INF.classes.com.archive.common.xss; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.xss.XssHttpServletRequestWrapper; +/* */ import java.io.IOException; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import java.util.regex.Matcher; +/* */ import java.util.regex.Pattern; +/* */ import javax.servlet.Filter; +/* */ import javax.servlet.FilterChain; +/* */ import javax.servlet.FilterConfig; +/* */ import javax.servlet.ServletException; +/* */ import javax.servlet.ServletRequest; +/* */ import javax.servlet.ServletResponse; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class XssFilter +/* */ implements Filter +/* */ { +/* 28 */ public List excludes = new ArrayList<>(); +/* */ +/* */ +/* */ +/* */ public boolean enabled = false; +/* */ +/* */ +/* */ +/* */ +/* */ public void init(FilterConfig filterConfig) throws ServletException { +/* 38 */ String tempExcludes = filterConfig.getInitParameter("excludes"); +/* 39 */ String tempEnabled = filterConfig.getInitParameter("enabled"); +/* 40 */ if (StringUtils.isNotEmpty(tempExcludes)) { +/* */ +/* 42 */ String[] url = tempExcludes.split(","); +/* 43 */ for (int i = 0; url != null && i < url.length; i++) +/* */ { +/* 45 */ this.excludes.add(url[i]); +/* */ } +/* */ } +/* 48 */ if (StringUtils.isNotEmpty(tempEnabled)) +/* */ { +/* 50 */ this.enabled = Boolean.valueOf(tempEnabled).booleanValue(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { +/* 58 */ HttpServletRequest req = (HttpServletRequest)request; +/* 59 */ HttpServletResponse resp = (HttpServletResponse)response; +/* 60 */ if (handleExcludeURL(req, resp)) { +/* */ +/* 62 */ chain.doFilter(request, response); +/* */ return; +/* */ } +/* 65 */ XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper((HttpServletRequest)request); +/* 66 */ chain.doFilter((ServletRequest)xssRequest, response); +/* */ } +/* */ +/* */ +/* */ private boolean handleExcludeURL(HttpServletRequest request, HttpServletResponse response) { +/* 71 */ if (!this.enabled) +/* */ { +/* 73 */ return true; +/* */ } +/* 75 */ if (this.excludes == null || this.excludes.isEmpty()) +/* */ { +/* 77 */ return false; +/* */ } +/* 79 */ String url = request.getServletPath(); +/* 80 */ for (String pattern : this.excludes) { +/* */ +/* 82 */ Pattern p = Pattern.compile("^" + pattern); +/* 83 */ Matcher m = p.matcher(url); +/* 84 */ if (m.find()) +/* */ { +/* 86 */ return true; +/* */ } +/* */ } +/* 89 */ return false; +/* */ } +/* */ +/* */ public void destroy() {} +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\xss\XssFilter.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/common/xss/XssHttpServletRequestWrapper.java b/src/main/java/com/archive/common/xss/XssHttpServletRequestWrapper.java new file mode 100644 index 0000000..3d12ef7 --- /dev/null +++ b/src/main/java/com/archive/common/xss/XssHttpServletRequestWrapper.java @@ -0,0 +1,47 @@ +/* */ package com.archive.common.xss + +-INF.classes.com.archive.common.xss; +/* */ +/* */ import com.archive.common.utils.html.EscapeUtil; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletRequestWrapper; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class XssHttpServletRequestWrapper +/* */ extends HttpServletRequestWrapper +/* */ { +/* */ public XssHttpServletRequestWrapper(HttpServletRequest request) { +/* 19 */ super(request); +/* */ } +/* */ +/* */ +/* */ +/* */ public String[] getParameterValues(String name) { +/* 25 */ String[] values = super.getParameterValues(name); +/* 26 */ if (values != null) { +/* */ +/* 28 */ int length = values.length; +/* 29 */ String[] escapseValues = new String[length]; +/* 30 */ for (int i = 0; i < length; i++) +/* */ { +/* */ +/* 33 */ escapseValues[i] = EscapeUtil.clean(values[i]).trim(); +/* */ } +/* 35 */ return escapseValues; +/* */ } +/* 37 */ return super.getParameterValues(name); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\xss\XssHttpServletRequestWrapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/DataScopeAspect.java b/src/main/java/com/archive/framework/aspectj/DataScopeAspect.java new file mode 100644 index 0000000..6342bba --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/DataScopeAspect.java @@ -0,0 +1,174 @@ +/* */ package com.archive.framework.aspectj + +-INF.classes.com.archive.framework.aspectj; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.DataScope; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import com.archive.project.system.role.domain.Role; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.lang.reflect.Method; +/* */ import org.aspectj.lang.JoinPoint; +/* */ import org.aspectj.lang.Signature; +/* */ import org.aspectj.lang.annotation.Aspect; +/* */ import org.aspectj.lang.annotation.Before; +/* */ import org.aspectj.lang.annotation.Pointcut; +/* */ import org.aspectj.lang.reflect.MethodSignature; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Aspect +/* */ @Component +/* */ public class DataScopeAspect +/* */ { +/* */ public static final String DATA_SCOPE_ALL = "1"; +/* */ public static final String DATA_SCOPE_CUSTOM = "2"; +/* */ public static final String DATA_SCOPE_DEPT = "3"; +/* */ public static final String DATA_SCOPE_DEPT_AND_CHILD = "4"; +/* */ public static final String DATA_SCOPE_SELF = "5"; +/* */ public static final String DATA_SCOPE = "dataScope"; +/* */ +/* */ @Pointcut("@annotation(com.archive.framework.aspectj.lang.annotation.DataScope)") +/* */ public void dataScopePointCut() {} +/* */ +/* */ @Before("dataScopePointCut()") +/* */ public void doBefore(JoinPoint point) throws Throwable { +/* 66 */ handleDataScope(point); +/* */ } +/* */ +/* */ +/* */ +/* */ protected void handleDataScope(JoinPoint joinPoint) { +/* 72 */ DataScope controllerDataScope = getAnnotationLog(joinPoint); +/* 73 */ if (controllerDataScope == null) { +/* */ return; +/* */ } +/* */ +/* */ +/* 78 */ User currentUser = ShiroUtils.getSysUser(); +/* 79 */ if (currentUser != null) +/* */ { +/* */ +/* 82 */ if (!currentUser.isAdmin()) +/* */ { +/* 84 */ dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), controllerDataScope +/* 85 */ .userAlias()); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void dataScopeFilter(JoinPoint joinPoint, User user, String deptAlias, String userAlias) { +/* 100 */ StringBuilder sqlString = new StringBuilder(); +/* */ +/* 102 */ for (Role role : user.getRoles()) { +/* */ +/* 104 */ String dataScope = role.getDataScope(); +/* 105 */ if ("1".equals(dataScope)) { +/* */ +/* 107 */ sqlString = new StringBuilder(); +/* */ break; +/* */ } +/* 110 */ if ("2".equals(dataScope)) { +/* */ +/* 112 */ sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", new Object[] { deptAlias, role +/* */ +/* 114 */ .getRoleId() })); continue; +/* */ } +/* 116 */ if ("3".equals(dataScope)) { +/* */ +/* 118 */ sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", new Object[] { deptAlias, user.getDeptId() })); continue; +/* */ } +/* 120 */ if ("4".equals(dataScope)) { +/* */ +/* 122 */ sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", new Object[] { deptAlias, user +/* */ +/* 124 */ .getDeptId(), user.getDeptId() })); continue; +/* */ } +/* 126 */ if ("5".equals(dataScope)) { +/* */ +/* 128 */ if (StringUtils.isNotBlank(userAlias)) { +/* */ +/* 130 */ sqlString.append(StringUtils.format(" OR {}.user_id = {} ", new Object[] { userAlias, user.getUserId() })); +/* */ +/* */ continue; +/* */ } +/* */ +/* 135 */ sqlString.append(" OR 1=0 "); +/* */ } +/* */ } +/* */ +/* */ +/* 140 */ if (StringUtils.isNotBlank(sqlString.toString())) { +/* */ +/* 142 */ Object params = joinPoint.getArgs()[0]; +/* 143 */ if (StringUtils.isNotNull(params) && params instanceof BaseEntity) { +/* */ +/* 145 */ BaseEntity baseEntity = (BaseEntity)params; +/* 146 */ baseEntity.getParams().put("dataScope", " AND (" + sqlString.substring(4) + ")"); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private DataScope getAnnotationLog(JoinPoint joinPoint) { +/* 156 */ Signature signature = joinPoint.getSignature(); +/* 157 */ MethodSignature methodSignature = (MethodSignature)signature; +/* 158 */ Method method = methodSignature.getMethod(); +/* */ +/* 160 */ if (method != null) +/* */ { +/* 162 */ return method.getAnnotation(DataScope.class); +/* */ } +/* 164 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\DataScopeAspect.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/DataSourceAspect.java b/src/main/java/com/archive/framework/aspectj/DataSourceAspect.java new file mode 100644 index 0000000..a342122 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/DataSourceAspect.java @@ -0,0 +1,80 @@ +/* */ package com.archive.framework.aspectj + +; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.DataSource; +/* */ import com.archive.framework.datasource.DynamicDataSourceContextHolder; +/* */ import java.util.Objects; +/* */ import org.aspectj.lang.ProceedingJoinPoint; +/* */ import org.aspectj.lang.annotation.Around; +/* */ import org.aspectj.lang.annotation.Aspect; +/* */ import org.aspectj.lang.annotation.Pointcut; +/* */ import org.aspectj.lang.reflect.MethodSignature; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.core.annotation.AnnotationUtils; +/* */ import org.springframework.core.annotation.Order; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Aspect +/* */ @Order(1) +/* */ @Component +/* */ public class DataSourceAspect +/* */ { +/* 28 */ protected Logger logger = LoggerFactory.getLogger(getClass()); +/* */ +/* */ +/* */ +/* */ +/* */ @Pointcut("@annotation(com.archive.framework.aspectj.lang.annotation.DataSource)|| @within(com.archive.framework.aspectj.lang.annotation.DataSource)") +/* */ public void dsPointCut() {} +/* */ +/* */ +/* */ +/* */ @Around("dsPointCut()") +/* */ public Object around(ProceedingJoinPoint point) throws Throwable { +/* 40 */ DataSource dataSource = getDataSource(point); +/* */ +/* 42 */ if (StringUtils.isNotNull(dataSource)) +/* */ { +/* 44 */ DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name()); +/* */ } +/* */ +/* */ +/* */ try { +/* 49 */ return point.proceed(); +/* */ +/* */ } +/* */ finally { +/* */ +/* 54 */ DynamicDataSourceContextHolder.clearDataSourceType(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public DataSource getDataSource(ProceedingJoinPoint point) { +/* 63 */ MethodSignature signature = (MethodSignature)point.getSignature(); +/* 64 */ DataSource dataSource = (DataSource)AnnotationUtils.findAnnotation(signature.getMethod(), DataSource.class); +/* 65 */ if (Objects.nonNull(dataSource)) +/* */ { +/* 67 */ return dataSource; +/* */ } +/* */ +/* 70 */ return (DataSource)AnnotationUtils.findAnnotation(signature.getDeclaringType(), DataSource.class); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\DataSourceAspect.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/LogAspect.java b/src/main/java/com/archive/framework/aspectj/LogAspect.java new file mode 100644 index 0000000..8e4dda7 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/LogAspect.java @@ -0,0 +1,191 @@ +/* */ package com.archive.framework.aspectj; +/* */ +/* */ import com.alibaba.fastjson.JSONObject; +/* */ import com.alibaba.fastjson.serializer.SerializeFilter; +/* */ import com.alibaba.fastjson.support.spring.PropertyPreFilters; +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessStatus; +/* */ import com.archive.framework.manager.AsyncManager; +/* */ import com.archive.framework.manager.factory.AsyncFactory; +/* */ import com.archive.project.monitor.operlog.domain.OperLog; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.lang.reflect.Method; +/* */ import java.util.Map; +/* */ import org.aspectj.lang.JoinPoint; +/* */ import org.aspectj.lang.Signature; +/* */ import org.aspectj.lang.annotation.AfterReturning; +/* */ import org.aspectj.lang.annotation.AfterThrowing; +/* */ import org.aspectj.lang.annotation.Aspect; +/* */ import org.aspectj.lang.annotation.Pointcut; +/* */ import org.aspectj.lang.reflect.MethodSignature; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Aspect +/* */ @Component +/* */ public class LogAspect +/* */ { +/* 36 */ private static final Logger log = LoggerFactory.getLogger(com.archive.framework.aspectj.LogAspect.class); +/* */ +/* */ +/* 39 */ public static final String[] EXCLUDE_PROPERTIES = new String[] { "password", "oldPassword", "newPassword", "confirmPassword" }; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Pointcut("@annotation(com.archive.framework.aspectj.lang.annotation.Log)") +/* */ public void logPointCut() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @AfterReturning(pointcut = "logPointCut()", returning = "jsonResult") +/* */ public void doAfterReturning(JoinPoint joinPoint, Object jsonResult) { +/* 55 */ handleLog(joinPoint, null, jsonResult); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @AfterThrowing(value = "logPointCut()", throwing = "e") +/* */ public void doAfterThrowing(JoinPoint joinPoint, Exception e) { +/* 67 */ handleLog(joinPoint, e, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected void handleLog(JoinPoint joinPoint, Exception e, Object jsonResult) { +/* */ try { +/* 75 */ Log controllerLog = getAnnotationLog(joinPoint); +/* 76 */ if (controllerLog == null) { +/* */ return; +/* */ } +/* */ +/* */ +/* */ +/* 82 */ User currentUser = ShiroUtils.getSysUser(); +/* */ +/* */ +/* 85 */ OperLog operLog = new OperLog(); +/* 86 */ operLog.setStatus(Integer.valueOf(BusinessStatus.SUCCESS.ordinal())); +/* */ +/* 88 */ String ip = ShiroUtils.getIp(); +/* 89 */ operLog.setOperIp(ip); +/* */ +/* 91 */ operLog.setJsonResult(StringUtils.substring(JSONObject.toJSONString(jsonResult), 0, 2000)); +/* */ +/* 93 */ operLog.setOperUrl(ServletUtils.getRequest().getRequestURI()); +/* 94 */ if (currentUser != null) { +/* */ +/* 96 */ operLog.setOperName(currentUser.getLoginName()); +/* 97 */ if (StringUtils.isNotNull(currentUser.getDept()) && +/* 98 */ StringUtils.isNotEmpty(currentUser.getDept().getDeptName())) +/* */ { +/* 100 */ operLog.setDeptName(currentUser.getDept().getDeptName()); +/* */ } +/* */ } +/* */ +/* 104 */ if (e != null) { +/* */ +/* 106 */ operLog.setStatus(Integer.valueOf(BusinessStatus.FAIL.ordinal())); +/* 107 */ operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000)); +/* */ } +/* */ +/* 110 */ String className = joinPoint.getTarget().getClass().getName(); +/* 111 */ String methodName = joinPoint.getSignature().getName(); +/* 112 */ operLog.setMethod(className + "." + methodName + "()"); +/* */ +/* 114 */ operLog.setRequestMethod(ServletUtils.getRequest().getMethod()); +/* */ +/* 116 */ getControllerMethodDescription(controllerLog, operLog); +/* */ +/* 118 */ AsyncManager.me().execute(AsyncFactory.recordOper(operLog)); +/* */ } +/* 120 */ catch (Exception exp) { +/* */ +/* */ +/* 123 */ log.error("==前置通知异常=="); +/* 124 */ log.error("异常信息:{}", exp.getMessage()); +/* 125 */ exp.printStackTrace(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void getControllerMethodDescription(Log log, OperLog operLog) throws Exception { +/* 139 */ operLog.setBusinessType(Integer.valueOf(log.businessType().ordinal())); +/* */ +/* 141 */ operLog.setTitle(log.title()); +/* */ +/* 143 */ operLog.setOperatorType(Integer.valueOf(log.operatorType().ordinal())); +/* */ +/* 145 */ if (log.isSaveRequestData()) +/* */ { +/* */ +/* 148 */ setRequestValue(operLog); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void setRequestValue(OperLog operLog) { +/* 160 */ Map map = ServletUtils.getRequest().getParameterMap(); +/* 161 */ if (StringUtils.isNotEmpty(map)) { +/* */ +/* 163 */ PropertyPreFilters.MySimplePropertyPreFilter excludefilter = (new PropertyPreFilters()).addFilter(); +/* 164 */ excludefilter.addExcludes(EXCLUDE_PROPERTIES); +/* 165 */ String params = JSONObject.toJSONString(map, (SerializeFilter)excludefilter, new com.alibaba.fastjson.serializer.SerializerFeature[0]); +/* 166 */ operLog.setOperParam(StringUtils.substring(params, 0, 2000)); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Log getAnnotationLog(JoinPoint joinPoint) throws Exception { +/* 175 */ Signature signature = joinPoint.getSignature(); +/* 176 */ MethodSignature methodSignature = (MethodSignature)signature; +/* 177 */ Method method = methodSignature.getMethod(); +/* */ +/* 179 */ if (method != null) +/* */ { +/* 181 */ return method.getAnnotation(Log.class); +/* */ } +/* 183 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\LogAspect.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/annotation/DataScope.java b/src/main/java/com/archive/framework/aspectj/lang/annotation/DataScope.java new file mode 100644 index 0000000..41ed658 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/annotation/DataScope.java @@ -0,0 +1,22 @@ +package com.archive.framework.aspectj.lang.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface DataScope { + String deptAlias() default ""; + + String userAlias() default ""; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\annotation\DataScope.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/annotation/DataSource.java b/src/main/java/com/archive/framework/aspectj/lang/annotation/DataSource.java new file mode 100644 index 0000000..52dc7fa --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/annotation/DataSource.java @@ -0,0 +1,25 @@ +package com.archive.framework.aspectj.lang.annotation + +-INF.classes.com.archive.framework.aspectj.lang.annotation; + +import com.archive.framework.aspectj.lang.enums.DataSourceType; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD, ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Inherited +public @interface DataSource { + DataSourceType value() default DataSourceType.MASTER; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\annotation\DataSource.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel$Align.java b/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel$Align.java new file mode 100644 index 0000000..86f9e2b --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel$Align.java @@ -0,0 +1,135 @@ +/* */ package com.archive.framework.aspectj.lang.annotation + +; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum Align +/* */ { +/* 115 */ AUTO(0), LEFT(1), CENTER(2), RIGHT(3); +/* */ +/* */ private final int value; +/* */ +/* */ Align(int value) { +/* 120 */ this.value = value; +/* */ } +/* */ +/* */ +/* */ public int value() { +/* 125 */ return this.value; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\annotation\Excel$Align.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel$ColumnType.java b/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel$ColumnType.java new file mode 100644 index 0000000..8dba4e2 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel$ColumnType.java @@ -0,0 +1,172 @@ +/* */ package com.archive.framework.aspectj.lang.annotation + +-INF.classes.com.archive.framework.aspectj.lang.annotation; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum ColumnType +/* */ { +/* 152 */ NUMERIC(0), STRING(1), IMAGE(2); +/* */ +/* */ private final int value; +/* */ +/* */ ColumnType(int value) { +/* 157 */ this.value = value; +/* */ } +/* */ +/* */ +/* */ public int value() { +/* 162 */ return this.value; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\annotation\Excel$ColumnType.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel$Type.java b/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel$Type.java new file mode 100644 index 0000000..6f04683 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel$Type.java @@ -0,0 +1,156 @@ +/* */ package com.archive.framework.aspectj.lang.annotation + +-INF.classes.com.archive.framework.aspectj.lang.annotation; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum Type +/* */ { +/* 136 */ ALL(0), EXPORT(1), IMPORT(2); +/* */ +/* */ private final int value; +/* */ +/* */ Type(int value) { +/* 141 */ this.value = value; +/* */ } +/* */ +/* */ +/* */ public int value() { +/* 146 */ return this.value; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\annotation\Excel$Type.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel.java b/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel.java new file mode 100644 index 0000000..e588fc2 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/annotation/Excel.java @@ -0,0 +1,58 @@ +package com.archive.framework.aspectj.lang.annotation + +-INF.classes.com.archive.framework.aspectj.lang.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD}) +public @interface Excel { + int sort() default 2147483647; + + String name() default ""; + + String dateFormat() default ""; + + String dictType() default ""; + + String readConverterExp() default ""; + + String separator() default ","; + + int scale() default -1; + + int roundingMode() default 6; + + ColumnType cellType() default ColumnType.STRING; + + double height() default 14.0D; + + double width() default 16.0D; + + String suffix() default ""; + + String defaultValue() default ""; + + String prompt() default ""; + + String[] combo() default {}; + + boolean isExport() default true; + + String targetAttr() default ""; + + boolean isStatistics() default false; + + Align align() default Align.AUTO; + + Type type() default Type.ALL; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\annotation\Excel.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/annotation/Excels.java b/src/main/java/com/archive/framework/aspectj/lang/annotation/Excels.java new file mode 100644 index 0000000..03c11f8 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/annotation/Excels.java @@ -0,0 +1,21 @@ +package com.archive.framework.aspectj.lang.annotation + +; + +import com.archive.framework.aspectj.lang.annotation.Excel; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface Excels { + Excel[] value(); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\annotation\Excels.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/annotation/Log.java b/src/main/java/com/archive/framework/aspectj/lang/annotation/Log.java new file mode 100644 index 0000000..23a4a96 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/annotation/Log.java @@ -0,0 +1,30 @@ +package com.archive.framework.aspectj.lang.annotation + +-INF.classes.com.archive.framework.aspectj.lang.annotation; + +import com.archive.framework.aspectj.lang.enums.BusinessType; +import com.archive.framework.aspectj.lang.enums.OperatorType; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.PARAMETER, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface Log { + String title() default ""; + + BusinessType businessType() default BusinessType.OTHER; + + OperatorType operatorType() default OperatorType.MANAGE; + + boolean isSaveRequestData() default true; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\annotation\Log.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/enums/BusinessStatus.java b/src/main/java/com/archive/framework/aspectj/lang/enums/BusinessStatus.java new file mode 100644 index 0000000..c78c0f1 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/enums/BusinessStatus.java @@ -0,0 +1,26 @@ +/* */ package com.archive.framework.aspectj.lang.enums-INF.classes.com.archive.framework.aspectj.lang.enums; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum BusinessStatus +/* */ { +/* 14 */ SUCCESS, +/* */ +/* */ +/* */ +/* */ +/* 19 */ FAIL; +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\enums\BusinessStatus.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/enums/BusinessType.java b/src/main/java/com/archive/framework/aspectj/lang/enums/BusinessType.java new file mode 100644 index 0000000..fd85073 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/enums/BusinessType.java @@ -0,0 +1,82 @@ +/* */ package com.archive.framework.aspectj.lang.enums-INF.classes.com.archive.framework.aspectj.lang.enums; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum BusinessType +/* */ { +/* 14 */ OTHER, +/* */ +/* */ +/* */ +/* */ +/* 19 */ INSERT, +/* */ +/* */ +/* */ +/* */ +/* 24 */ UPDATE, +/* */ +/* */ +/* */ +/* */ +/* 29 */ DELETE, +/* */ +/* */ +/* */ +/* 33 */ RESEST, +/* */ +/* */ +/* */ +/* */ +/* 38 */ GRANT, +/* */ +/* */ +/* */ +/* */ +/* 43 */ EXPORT, +/* */ +/* */ +/* */ +/* */ +/* 48 */ IMPORT, +/* */ +/* */ +/* */ +/* */ +/* 53 */ FORCE, +/* */ +/* */ +/* */ +/* */ +/* 58 */ GENCODE, +/* */ +/* */ +/* */ +/* */ +/* 63 */ CLEAN, +/* */ +/* */ +/* */ +/* 67 */ ZLRK, +/* */ +/* */ +/* */ +/* 71 */ THJSK, +/* */ +/* */ +/* */ +/* 75 */ BMDY; +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\enums\BusinessType.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/enums/DataSourceType.java b/src/main/java/com/archive/framework/aspectj/lang/enums/DataSourceType.java new file mode 100644 index 0000000..28a6d40 --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/enums/DataSourceType.java @@ -0,0 +1,25 @@ +/* */ package com.archive.framework.aspectj.lang.enums-INF.classes.com.archive.framework.aspectj.lang.enums; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum DataSourceType +/* */ { +/* 13 */ MASTER, +/* */ +/* */ +/* */ +/* */ +/* 18 */ SLAVE; +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\enums\DataSourceType.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/aspectj/lang/enums/OperatorType.java b/src/main/java/com/archive/framework/aspectj/lang/enums/OperatorType.java new file mode 100644 index 0000000..70a761a --- /dev/null +++ b/src/main/java/com/archive/framework/aspectj/lang/enums/OperatorType.java @@ -0,0 +1,31 @@ +/* */ package com.archive.framework.aspectj.lang.enums-INF.classes.com.archive.framework.aspectj.lang.enums; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum OperatorType +/* */ { +/* 14 */ OTHER, +/* */ +/* */ +/* */ +/* */ +/* 19 */ MANAGE, +/* */ +/* */ +/* */ +/* */ +/* 24 */ MOBILE; +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\enums\OperatorType.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/ApplicationConfig.java b/src/main/java/com/archive/framework/config/ApplicationConfig.java new file mode 100644 index 0000000..94e9804 --- /dev/null +++ b/src/main/java/com/archive/framework/config/ApplicationConfig.java @@ -0,0 +1,17 @@ +package com.archive.framework.config + ; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.EnableAspectJAutoProxy; + +@Configuration +@EnableAspectJAutoProxy(exposeProxy = true) +@MapperScan({"com.archive.project.**.mapper"}) +public class ApplicationConfig {} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\ApplicationConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/ArchiveConfig.java b/src/main/java/com/archive/framework/config/ArchiveConfig.java new file mode 100644 index 0000000..9cc37de --- /dev/null +++ b/src/main/java/com/archive/framework/config/ArchiveConfig.java @@ -0,0 +1,180 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import com.archive.project.dasz.ccgl.service.ICcglService; +/* */ import java.io.File; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.boot.context.properties.ConfigurationProperties; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ @ConfigurationProperties(prefix = "archive") +/* */ public class ArchiveConfig +/* */ { +/* */ private String name; +/* */ private String version; +/* */ private String copyrightYear; +/* */ private boolean demoEnabled; +/* */ private static String profile; +/* */ private static boolean addressEnabled; +/* */ private boolean browseServerEnabled; +/* */ private String browseServer; +/* */ private String databaseType; +/* */ @Autowired +/* */ private ICcglService ccglService; +/* */ +/* */ public boolean isBrowseServerEnabled() { +/* 49 */ return this.browseServerEnabled; +/* */ } +/* */ +/* */ public void setBrowseServerEnabled(boolean browseServerEnabled) { +/* 53 */ this.browseServerEnabled = browseServerEnabled; +/* */ } +/* */ +/* */ public String getBrowseServer() { +/* 57 */ return this.browseServer; +/* */ } +/* */ +/* */ public void setBrowseServer(String browseServer) { +/* 61 */ this.browseServer = browseServer; +/* */ } +/* */ +/* */ +/* */ public String getName() { +/* 66 */ return this.name; +/* */ } +/* */ +/* */ +/* */ public void setName(String name) { +/* 71 */ this.name = name; +/* */ } +/* */ +/* */ +/* */ public String getVersion() { +/* 76 */ return this.version; +/* */ } +/* */ +/* */ +/* */ public void setVersion(String version) { +/* 81 */ this.version = version; +/* */ } +/* */ +/* */ +/* */ public String getCopyrightYear() { +/* 86 */ return this.copyrightYear; +/* */ } +/* */ +/* */ +/* */ public void setCopyrightYear(String copyrightYear) { +/* 91 */ this.copyrightYear = copyrightYear; +/* */ } +/* */ +/* */ +/* */ public boolean isDemoEnabled() { +/* 96 */ return this.demoEnabled; +/* */ } +/* */ +/* */ +/* */ public void setDemoEnabled(boolean demoEnabled) { +/* 101 */ this.demoEnabled = demoEnabled; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getProfile() { +/* 111 */ return this.ccglService.getPathByLjbs("archive.archiveRootPath"); +/* */ } +/* */ +/* */ public static com.archive.framework.config.ArchiveConfig getInstance() { +/* 115 */ return (com.archive.framework.config.ArchiveConfig)SpringUtils.getBean(com.archive.framework.config.ArchiveConfig.class); +/* */ } +/* */ +/* */ +/* */ public void setProfile(String profile) { +/* 120 */ com.archive.framework.config.ArchiveConfig.profile = this.ccglService.getPathByLjbs("archive.archiveRootPath"); +/* */ } +/* */ +/* */ +/* */ public static boolean isAddressEnabled() { +/* 125 */ return addressEnabled; +/* */ } +/* */ +/* */ +/* */ public void setAddressEnabled(boolean addressEnabled) { +/* 130 */ com.archive.framework.config.ArchiveConfig.addressEnabled = addressEnabled; +/* */ } +/* */ +/* */ public String getDatabaseType() { +/* 134 */ return this.databaseType; +/* */ } +/* */ +/* */ public void setDatabaseType(String databaseType) { +/* 138 */ this.databaseType = databaseType; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getAvatarPath() { +/* 146 */ return getProfile() + "/avatar"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getDownloadPath() { +/* 154 */ return getProfile() + "/download/"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getUploadPath() { +/* 162 */ return getProfile() + "/upload"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getImportBathMessagePath() { +/* 170 */ return getProfile() + File.separator + "ImportBathMessage"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\ArchiveConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/CaptchaConfig.java b/src/main/java/com/archive/framework/config/CaptchaConfig.java new file mode 100644 index 0000000..d29d919 --- /dev/null +++ b/src/main/java/com/archive/framework/config/CaptchaConfig.java @@ -0,0 +1,91 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import com.google.code.kaptcha.impl.DefaultKaptcha; +/* */ import com.google.code.kaptcha.util.Config; +/* */ import java.util.Properties; +/* */ import org.springframework.context.annotation.Bean; +/* */ import org.springframework.context.annotation.Configuration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Configuration +/* */ public class CaptchaConfig +/* */ { +/* */ @Bean(name = {"captchaProducer"}) +/* */ public DefaultKaptcha getKaptchaBean() { +/* 21 */ DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); +/* 22 */ Properties properties = new Properties(); +/* */ +/* 24 */ properties.setProperty("kaptcha.border", "yes"); +/* */ +/* 26 */ properties.setProperty("kaptcha.textproducer.font.color", "black"); +/* */ +/* 28 */ properties.setProperty("kaptcha.image.width", "160"); +/* */ +/* 30 */ properties.setProperty("kaptcha.image.height", "60"); +/* */ +/* 32 */ properties.setProperty("kaptcha.textproducer.font.size", "38"); +/* */ +/* 34 */ properties.setProperty("kaptcha.session.key", "kaptchaCode"); +/* */ +/* 36 */ properties.setProperty("kaptcha.textproducer.char.length", "4"); +/* */ +/* 38 */ properties.setProperty("kaptcha.textproducer.font.names", "Arial,Courier"); +/* */ +/* 40 */ properties.setProperty("kaptcha.obscurificator.impl", "com.google.code.kaptcha.impl.ShadowGimpy"); +/* 41 */ Config config = new Config(properties); +/* 42 */ defaultKaptcha.setConfig(config); +/* 43 */ return defaultKaptcha; +/* */ } +/* */ +/* */ +/* */ @Bean(name = {"captchaProducerMath"}) +/* */ public DefaultKaptcha getKaptchaBeanMath() { +/* 49 */ DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); +/* 50 */ Properties properties = new Properties(); +/* */ +/* 52 */ properties.setProperty("kaptcha.border", "yes"); +/* */ +/* 54 */ properties.setProperty("kaptcha.border.color", "105,179,90"); +/* */ +/* 56 */ properties.setProperty("kaptcha.textproducer.font.color", "blue"); +/* */ +/* 58 */ properties.setProperty("kaptcha.image.width", "160"); +/* */ +/* 60 */ properties.setProperty("kaptcha.image.height", "60"); +/* */ +/* 62 */ properties.setProperty("kaptcha.textproducer.font.size", "35"); +/* */ +/* 64 */ properties.setProperty("kaptcha.session.key", "kaptchaCodeMath"); +/* */ +/* 66 */ properties.setProperty("kaptcha.textproducer.impl", "com.archive.framework.config.KaptchaTextCreator"); +/* */ +/* 68 */ properties.setProperty("kaptcha.textproducer.char.space", "3"); +/* */ +/* 70 */ properties.setProperty("kaptcha.textproducer.char.length", "6"); +/* */ +/* 72 */ properties.setProperty("kaptcha.textproducer.font.names", "Arial,Courier"); +/* */ +/* 74 */ properties.setProperty("kaptcha.noise.color", "white"); +/* */ +/* 76 */ properties.setProperty("kaptcha.noise.impl", "com.google.code.kaptcha.impl.NoNoise"); +/* */ +/* 78 */ properties.setProperty("kaptcha.obscurificator.impl", "com.google.code.kaptcha.impl.ShadowGimpy"); +/* 79 */ Config config = new Config(properties); +/* 80 */ defaultKaptcha.setConfig(config); +/* 81 */ return defaultKaptcha; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\CaptchaConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/DruidConfig$1.java b/src/main/java/com/archive/framework/config/DruidConfig$1.java new file mode 100644 index 0000000..9b3795b --- /dev/null +++ b/src/main/java/com/archive/framework/config/DruidConfig$1.java @@ -0,0 +1,125 @@ +/* */ package extracted.BOOT-INF.classes.com.archive.framework.config; +/* */ +/* */ import com.alibaba.druid.util.Utils; +/* */ import com.archive.framework.config.DruidConfig; +/* */ import java.io.IOException; +/* */ import javax.servlet.Filter; +/* */ import javax.servlet.FilterChain; +/* */ import javax.servlet.FilterConfig; +/* */ import javax.servlet.ServletException; +/* */ import javax.servlet.ServletRequest; +/* */ import javax.servlet.ServletResponse; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class null +/* */ implements Filter +/* */ { +/* */ public void init(FilterConfig filterConfig) throws ServletException {} +/* */ +/* */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { +/* 107 */ chain.doFilter(request, response); +/* */ +/* 109 */ response.resetBuffer(); +/* */ +/* 111 */ String text = Utils.readFromResource("support/http/resources/js/common.js"); +/* */ +/* 113 */ text = text.replaceAll("
", ""); +/* 114 */ text = text.replaceAll("powered.*?shrek.wang", ""); +/* 115 */ response.getWriter().write(text); +/* */ } +/* */ +/* */ public void destroy() {} +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\DruidConfig$1.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/DruidConfig.java b/src/main/java/com/archive/framework/config/DruidConfig.java new file mode 100644 index 0000000..6d69bcb --- /dev/null +++ b/src/main/java/com/archive/framework/config/DruidConfig.java @@ -0,0 +1,136 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import com.alibaba.druid.pool.DruidDataSource; +/* */ import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; +/* */ import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties; +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import com.archive.framework.aspectj.lang.enums.DataSourceType; +/* */ import com.archive.framework.config.properties.DruidProperties; +/* */ import com.archive.framework.datasource.DynamicDataSource; +/* */ import java.util.HashMap; +/* */ import java.util.Map; +/* */ import javax.servlet.Filter; +/* */ import javax.sql.DataSource; +/* */ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +/* */ import org.springframework.boot.context.properties.ConfigurationProperties; +/* */ import org.springframework.boot.web.servlet.FilterRegistrationBean; +/* */ import org.springframework.context.annotation.Bean; +/* */ import org.springframework.context.annotation.Configuration; +/* */ import org.springframework.context.annotation.Primary; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Configuration +/* */ public class DruidConfig +/* */ { +/* */ @Bean +/* */ @ConfigurationProperties("spring.datasource.druid.master") +/* */ public DataSource masterDataSource(DruidProperties druidProperties) { +/* 39 */ DruidDataSource dataSource = DruidDataSourceBuilder.create().build(); +/* 40 */ return (DataSource)druidProperties.dataSource(dataSource); +/* */ } +/* */ +/* */ +/* */ @Bean +/* */ @ConfigurationProperties("spring.datasource.druid.slave") +/* */ @ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = {"enabled"}, havingValue = "true") +/* */ public DataSource slaveDataSource(DruidProperties druidProperties) { +/* 48 */ DruidDataSource dataSource = DruidDataSourceBuilder.create().build(); +/* 49 */ return (DataSource)druidProperties.dataSource(dataSource); +/* */ } +/* */ +/* */ +/* */ @Bean(name = {"dynamicDataSource"}) +/* */ @Primary +/* */ public DynamicDataSource dataSource(DataSource masterDataSource) { +/* 56 */ Map targetDataSources = new HashMap<>(); +/* 57 */ targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource); +/* 58 */ setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource"); +/* 59 */ return new DynamicDataSource(masterDataSource, targetDataSources); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setDataSource(Map targetDataSources, String sourceName, String beanName) { +/* */ try { +/* 73 */ DataSource dataSource = (DataSource)SpringUtils.getBean(beanName); +/* 74 */ targetDataSources.put(sourceName, dataSource); +/* */ } +/* 76 */ catch (Exception exception) {} +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Bean +/* */ @ConditionalOnProperty(name = {"spring.datasource.druid.statViewServlet.enabled"}, havingValue = "true") +/* */ public FilterRegistrationBean removeDruidFilterRegistrationBean(DruidStatProperties properties) { +/* 90 */ DruidStatProperties.StatViewServlet config = properties.getStatViewServlet(); +/* */ +/* 92 */ String pattern = (config.getUrlPattern() != null) ? config.getUrlPattern() : "/druid/*"; +/* 93 */ String commonJsPattern = pattern.replaceAll("\\*", "js/common.js"); +/* 94 */ String filePath = "support/http/resources/js/common.js"; +/* */ +/* 96 */ Object object = new Object(this); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 123 */ FilterRegistrationBean registrationBean = new FilterRegistrationBean(); +/* 124 */ registrationBean.setFilter((Filter)object); +/* 125 */ registrationBean.addUrlPatterns(new String[] { commonJsPattern }); +/* 126 */ return registrationBean; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\DruidConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/FilterConfig.java b/src/main/java/com/archive/framework/config/FilterConfig.java new file mode 100644 index 0000000..18733f3 --- /dev/null +++ b/src/main/java/com/archive/framework/config/FilterConfig.java @@ -0,0 +1,54 @@ +/* */ package com.archive.framework.config + +; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.xss.XssFilter; +/* */ import com.google.common.collect.Maps; +/* */ import java.util.Map; +/* */ import javax.servlet.DispatcherType; +/* */ import javax.servlet.Filter; +/* */ import org.springframework.beans.factory.annotation.Value; +/* */ import org.springframework.boot.web.servlet.FilterRegistrationBean; +/* */ import org.springframework.context.annotation.Bean; +/* */ import org.springframework.context.annotation.Configuration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Configuration +/* */ public class FilterConfig +/* */ { +/* */ @Value("${xss.enabled}") +/* */ private String enabled; +/* */ @Value("${xss.excludes}") +/* */ private String excludes; +/* */ @Value("${xss.urlPatterns}") +/* */ private String urlPatterns; +/* */ +/* */ @Bean +/* */ public FilterRegistrationBean xssFilterRegistration() { +/* 34 */ FilterRegistrationBean registration = new FilterRegistrationBean(); +/* 35 */ registration.setDispatcherTypes(DispatcherType.REQUEST, new DispatcherType[0]); +/* 36 */ registration.setFilter((Filter)new XssFilter()); +/* 37 */ registration.addUrlPatterns(StringUtils.split(this.urlPatterns, ",")); +/* 38 */ registration.setName("xssFilter"); +/* 39 */ registration.setOrder(2147483647); +/* 40 */ Map initParameters = Maps.newHashMap(); +/* 41 */ initParameters.put("excludes", this.excludes); +/* 42 */ initParameters.put("enabled", this.enabled); +/* 43 */ registration.setInitParameters(initParameters); +/* 44 */ return registration; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\FilterConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/GenConfig.java b/src/main/java/com/archive/framework/config/GenConfig.java new file mode 100644 index 0000000..5b3e53d --- /dev/null +++ b/src/main/java/com/archive/framework/config/GenConfig.java @@ -0,0 +1,74 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import org.springframework.boot.context.properties.ConfigurationProperties; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ @ConfigurationProperties(prefix = "gen") +/* */ public class GenConfig +/* */ { +/* */ public static String author; +/* */ public static String packageName; +/* */ public static boolean autoRemovePre; +/* */ public static String tablePrefix; +/* */ +/* */ public static String getAuthor() { +/* 29 */ return author; +/* */ } +/* */ +/* */ +/* */ public void setAuthor(String author) { +/* 34 */ com.archive.framework.config.GenConfig.author = author; +/* */ } +/* */ +/* */ +/* */ public static String getPackageName() { +/* 39 */ return packageName; +/* */ } +/* */ +/* */ +/* */ public void setPackageName(String packageName) { +/* 44 */ com.archive.framework.config.GenConfig.packageName = packageName; +/* */ } +/* */ +/* */ +/* */ public static boolean getAutoRemovePre() { +/* 49 */ return autoRemovePre; +/* */ } +/* */ +/* */ +/* */ public void setAutoRemovePre(boolean autoRemovePre) { +/* 54 */ com.archive.framework.config.GenConfig.autoRemovePre = autoRemovePre; +/* */ } +/* */ +/* */ +/* */ public static String getTablePrefix() { +/* 59 */ return tablePrefix; +/* */ } +/* */ +/* */ +/* */ public void setTablePrefix(String tablePrefix) { +/* 64 */ com.archive.framework.config.GenConfig.tablePrefix = tablePrefix; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\GenConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/I18nConfig.java b/src/main/java/com/archive/framework/config/I18nConfig.java new file mode 100644 index 0000000..f16e9a8 --- /dev/null +++ b/src/main/java/com/archive/framework/config/I18nConfig.java @@ -0,0 +1,51 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import java.util.Locale; +/* */ import org.springframework.context.annotation.Bean; +/* */ import org.springframework.context.annotation.Configuration; +/* */ import org.springframework.web.servlet.HandlerInterceptor; +/* */ import org.springframework.web.servlet.LocaleResolver; +/* */ import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +/* */ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +/* */ import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; +/* */ import org.springframework.web.servlet.i18n.SessionLocaleResolver; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Configuration +/* */ public class I18nConfig +/* */ implements WebMvcConfigurer +/* */ { +/* */ @Bean +/* */ public LocaleResolver localeResolver() { +/* 23 */ SessionLocaleResolver slr = new SessionLocaleResolver(); +/* */ +/* 25 */ slr.setDefaultLocale(Locale.SIMPLIFIED_CHINESE); +/* 26 */ return (LocaleResolver)slr; +/* */ } +/* */ +/* */ +/* */ @Bean +/* */ public LocaleChangeInterceptor localeChangeInterceptor() { +/* 32 */ LocaleChangeInterceptor lci = new LocaleChangeInterceptor(); +/* */ +/* 34 */ lci.setParamName("lang"); +/* 35 */ return lci; +/* */ } +/* */ +/* */ +/* */ +/* */ public void addInterceptors(InterceptorRegistry registry) { +/* 41 */ registry.addInterceptor((HandlerInterceptor)localeChangeInterceptor()); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\I18nConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/KaptchaTextCreator.java b/src/main/java/com/archive/framework/config/KaptchaTextCreator.java new file mode 100644 index 0000000..335b611 --- /dev/null +++ b/src/main/java/com/archive/framework/config/KaptchaTextCreator.java @@ -0,0 +1,84 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import com.google.code.kaptcha.text.impl.DefaultTextCreator; +/* */ import java.security.SecureRandom; +/* */ import java.util.Random; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class KaptchaTextCreator +/* */ extends DefaultTextCreator +/* */ { +/* 14 */ private static final String[] CNUMBERS = "0,1,2,3,4,5,6,7,8,9,10".split(","); +/* */ +/* */ +/* */ +/* */ public String getText() { +/* 19 */ Integer result = Integer.valueOf(0); +/* 20 */ Random random = new SecureRandom(); +/* 21 */ int x = random.nextInt(10); +/* 22 */ int y = random.nextInt(10); +/* 23 */ StringBuilder suChinese = new StringBuilder(); +/* 24 */ int randomoperands = (int)Math.round(Math.random() * 2.0D); +/* 25 */ if (randomoperands == 0) { +/* */ +/* 27 */ result = Integer.valueOf(x * y); +/* 28 */ suChinese.append(CNUMBERS[x]); +/* 29 */ suChinese.append("*"); +/* 30 */ suChinese.append(CNUMBERS[y]); +/* */ } +/* 32 */ else if (randomoperands == 1) { +/* */ +/* 34 */ if (x != 0 && y % x == 0) +/* */ { +/* 36 */ result = Integer.valueOf(y / x); +/* 37 */ suChinese.append(CNUMBERS[y]); +/* 38 */ suChinese.append("/"); +/* 39 */ suChinese.append(CNUMBERS[x]); +/* */ } +/* */ else +/* */ { +/* 43 */ result = Integer.valueOf(x + y); +/* 44 */ suChinese.append(CNUMBERS[x]); +/* 45 */ suChinese.append("+"); +/* 46 */ suChinese.append(CNUMBERS[y]); +/* */ } +/* */ +/* 49 */ } else if (randomoperands == 2) { +/* */ +/* 51 */ if (x >= y) +/* */ { +/* 53 */ result = Integer.valueOf(x - y); +/* 54 */ suChinese.append(CNUMBERS[x]); +/* 55 */ suChinese.append("-"); +/* 56 */ suChinese.append(CNUMBERS[y]); +/* */ } +/* */ else +/* */ { +/* 60 */ result = Integer.valueOf(y - x); +/* 61 */ suChinese.append(CNUMBERS[y]); +/* 62 */ suChinese.append("-"); +/* 63 */ suChinese.append(CNUMBERS[x]); +/* */ } +/* */ +/* */ } else { +/* */ +/* 68 */ result = Integer.valueOf(x + y); +/* 69 */ suChinese.append(CNUMBERS[x]); +/* 70 */ suChinese.append("+"); +/* 71 */ suChinese.append(CNUMBERS[y]); +/* */ } +/* 73 */ suChinese.append("=?@" + result); +/* 74 */ return suChinese.toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\KaptchaTextCreator.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/MyBatisConfig.java b/src/main/java/com/archive/framework/config/MyBatisConfig.java new file mode 100644 index 0000000..41bdba8 --- /dev/null +++ b/src/main/java/com/archive/framework/config/MyBatisConfig.java @@ -0,0 +1,140 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import java.io.IOException; +/* */ import java.util.ArrayList; +/* */ import java.util.Arrays; +/* */ import java.util.HashSet; +/* */ import java.util.List; +/* */ import javax.sql.DataSource; +/* */ import org.apache.ibatis.io.VFS; +/* */ import org.apache.ibatis.session.SqlSessionFactory; +/* */ import org.mybatis.spring.SqlSessionFactoryBean; +/* */ import org.mybatis.spring.boot.autoconfigure.SpringBootVFS; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.context.annotation.Bean; +/* */ import org.springframework.context.annotation.Configuration; +/* */ import org.springframework.core.env.Environment; +/* */ import org.springframework.core.io.DefaultResourceLoader; +/* */ import org.springframework.core.io.Resource; +/* */ import org.springframework.core.io.ResourceLoader; +/* */ import org.springframework.core.io.support.PathMatchingResourcePatternResolver; +/* */ import org.springframework.core.type.classreading.CachingMetadataReaderFactory; +/* */ import org.springframework.core.type.classreading.MetadataReader; +/* */ import org.springframework.util.ClassUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Configuration +/* */ public class MyBatisConfig +/* */ { +/* */ @Autowired +/* */ private Environment env; +/* */ static final String DEFAULT_RESOURCE_PATTERN = "**/*.class"; +/* */ +/* */ public static String setTypeAliasesPackage(String typeAliasesPackage) { +/* 42 */ PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver(); +/* 43 */ CachingMetadataReaderFactory cachingMetadataReaderFactory = new CachingMetadataReaderFactory((ResourceLoader)pathMatchingResourcePatternResolver); +/* 44 */ List allResult = new ArrayList<>(); +/* */ +/* */ try { +/* 47 */ for (String aliasesPackage : typeAliasesPackage.split(",")) { +/* */ +/* 49 */ List result = new ArrayList<>(); +/* */ +/* 51 */ aliasesPackage = "classpath*:" + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + "**/*.class"; +/* 52 */ Resource[] resources = pathMatchingResourcePatternResolver.getResources(aliasesPackage); +/* 53 */ if (resources != null && resources.length > 0) { +/* */ +/* 55 */ MetadataReader metadataReader = null; +/* 56 */ for (Resource resource : resources) { +/* */ +/* 58 */ if (resource.isReadable()) { +/* */ +/* 60 */ metadataReader = cachingMetadataReaderFactory.getMetadataReader(resource); +/* */ +/* */ try { +/* 63 */ result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName()); +/* */ } +/* 65 */ catch (ClassNotFoundException e) { +/* */ +/* 67 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ } +/* */ } +/* 72 */ if (result.size() > 0) { +/* */ +/* 74 */ HashSet hashResult = new HashSet<>(result); +/* 75 */ allResult.addAll(hashResult); +/* */ } +/* */ } +/* 78 */ if (allResult.size() > 0) +/* */ { +/* 80 */ typeAliasesPackage = String.join(",", (CharSequence[])allResult.toArray(new String[0])); +/* */ } +/* */ else +/* */ { +/* 84 */ throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包"); +/* */ } +/* */ +/* 87 */ } catch (IOException e) { +/* */ +/* 89 */ e.printStackTrace(); +/* */ } +/* 91 */ return typeAliasesPackage; +/* */ } +/* */ +/* */ +/* */ public Resource[] resolveMapperLocations(String[] mapperLocations) { +/* 96 */ PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver(); +/* 97 */ List resources = new ArrayList<>(); +/* 98 */ if (mapperLocations != null) +/* */ { +/* 100 */ for (String mapperLocation : mapperLocations) { +/* */ +/* */ +/* */ try { +/* 104 */ Resource[] mappers = pathMatchingResourcePatternResolver.getResources(mapperLocation); +/* 105 */ resources.addAll(Arrays.asList(mappers)); +/* */ } +/* 107 */ catch (IOException iOException) {} +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 113 */ return resources.toArray(new Resource[resources.size()]); +/* */ } +/* */ +/* */ +/* */ @Bean +/* */ public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception { +/* 119 */ String typeAliasesPackage = this.env.getProperty("mybatis.typeAliasesPackage"); +/* 120 */ String mapperLocations = this.env.getProperty("mybatis.mapperLocations"); +/* 121 */ String configLocation = this.env.getProperty("mybatis.configLocation"); +/* 122 */ typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage); +/* 123 */ VFS.addImplClass(SpringBootVFS.class); +/* */ +/* 125 */ SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); +/* 126 */ sessionFactory.setDataSource(dataSource); +/* 127 */ sessionFactory.setTypeAliasesPackage(typeAliasesPackage); +/* 128 */ sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ","))); +/* 129 */ sessionFactory.setConfigLocation((new DefaultResourceLoader()).getResource(configLocation)); +/* 130 */ return sessionFactory.getObject(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\MyBatisConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/ResourcesConfig.java b/src/main/java/com/archive/framework/config/ResourcesConfig.java new file mode 100644 index 0000000..4882a70 --- /dev/null +++ b/src/main/java/com/archive/framework/config/ResourcesConfig.java @@ -0,0 +1,66 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.interceptor.RepeatSubmitInterceptor; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.beans.factory.annotation.Value; +/* */ import org.springframework.context.annotation.Configuration; +/* */ import org.springframework.web.servlet.HandlerInterceptor; +/* */ import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +/* */ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +/* */ import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +/* */ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Configuration +/* */ public class ResourcesConfig +/* */ implements WebMvcConfigurer +/* */ { +/* */ @Value("${shiro.user.indexUrl}") +/* */ private String indexUrl; +/* */ @Autowired +/* */ private RepeatSubmitInterceptor repeatSubmitInterceptor; +/* */ +/* */ public void addViewControllers(ViewControllerRegistry registry) { +/* 36 */ registry.addViewController("/").setViewName("forward:" + this.indexUrl); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void addResourceHandlers(ResourceHandlerRegistry registry) { +/* 43 */ registry.addResourceHandler(new String[] { "/profile/**" }).addResourceLocations(new String[] { "file:" + ArchiveConfig.getInstance().getProfile() + "/" }); +/* */ +/* */ +/* 46 */ registry.addResourceHandler(new String[] { "swagger-ui.html" }).addResourceLocations(new String[] { "classpath:/META-INF/resources/" }); +/* 47 */ registry.addResourceHandler(new String[] { "/webjars/**" }).addResourceLocations(new String[] { "classpath:/META-INF/resources/webjars/" }); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addInterceptors(InterceptorRegistry registry) { +/* 56 */ registry.addInterceptor((HandlerInterceptor)this.repeatSubmitInterceptor).addPathPatterns(new String[] { "/**" }); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\ResourcesConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/ServerConfig.java b/src/main/java/com/archive/framework/config/ServerConfig.java new file mode 100644 index 0000000..7a508ca --- /dev/null +++ b/src/main/java/com/archive/framework/config/ServerConfig.java @@ -0,0 +1,41 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import com.archive.common.utils.ServletUtils; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ public class ServerConfig +/* */ { +/* */ public String getUrl() { +/* 23 */ HttpServletRequest request = ServletUtils.getRequest(); +/* 24 */ return getDomain(request); +/* */ } +/* */ +/* */ +/* */ public static String getDomain(HttpServletRequest request) { +/* 29 */ StringBuffer url = request.getRequestURL(); +/* 30 */ String contextPath = request.getServletContext().getContextPath(); +/* 31 */ return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\ServerConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/ShiroConfig.java b/src/main/java/com/archive/framework/config/ShiroConfig.java new file mode 100644 index 0000000..6076728 --- /dev/null +++ b/src/main/java/com/archive/framework/config/ShiroConfig.java @@ -0,0 +1,384 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import at.pollux.thymeleaf.shiro.dialect.ShiroDialect; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import com.archive.framework.shiro.realm.UserRealm; +/* */ import com.archive.framework.shiro.session.OnlineSessionDAO; +/* */ import com.archive.framework.shiro.session.OnlineSessionFactory; +/* */ import com.archive.framework.shiro.web.filter.LogoutFilter; +/* */ import com.archive.framework.shiro.web.filter.captcha.CaptchaValidateFilter; +/* */ import com.archive.framework.shiro.web.filter.kickout.KickoutSessionFilter; +/* */ import com.archive.framework.shiro.web.filter.online.OnlineSessionFilter; +/* */ import com.archive.framework.shiro.web.filter.sync.SyncOnlineSessionFilter; +/* */ import com.archive.framework.shiro.web.session.OnlineWebSessionManager; +/* */ import com.archive.framework.shiro.web.session.SpringSessionValidationScheduler; +/* */ import java.io.ByteArrayInputStream; +/* */ import java.io.IOException; +/* */ import java.io.InputStream; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.Map; +/* */ import javax.servlet.Filter; +/* */ import net.sf.ehcache.CacheManager; +/* */ import org.apache.commons.io.IOUtils; +/* */ import org.apache.shiro.cache.CacheManager; +/* */ import org.apache.shiro.cache.ehcache.EhCacheManager; +/* */ import org.apache.shiro.codec.Base64; +/* */ import org.apache.shiro.config.ConfigurationException; +/* */ import org.apache.shiro.io.ResourceUtils; +/* */ import org.apache.shiro.mgt.RememberMeManager; +/* */ import org.apache.shiro.mgt.SecurityManager; +/* */ import org.apache.shiro.realm.Realm; +/* */ import org.apache.shiro.session.mgt.SessionFactory; +/* */ import org.apache.shiro.session.mgt.SessionManager; +/* */ import org.apache.shiro.session.mgt.SessionValidationScheduler; +/* */ import org.apache.shiro.session.mgt.eis.SessionDAO; +/* */ import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor; +/* */ import org.apache.shiro.spring.web.ShiroFilterFactoryBean; +/* */ import org.apache.shiro.web.mgt.CookieRememberMeManager; +/* */ import org.apache.shiro.web.mgt.DefaultWebSecurityManager; +/* */ import org.apache.shiro.web.servlet.Cookie; +/* */ import org.apache.shiro.web.servlet.SimpleCookie; +/* */ import org.springframework.beans.factory.annotation.Qualifier; +/* */ import org.springframework.beans.factory.annotation.Value; +/* */ import org.springframework.context.annotation.Bean; +/* */ import org.springframework.context.annotation.Configuration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Configuration +/* */ public class ShiroConfig +/* */ { +/* */ @Value("${shiro.session.expireTime}") +/* */ private int expireTime; +/* */ @Value("${shiro.session.validationInterval}") +/* */ private int validationInterval; +/* */ @Value("${shiro.session.maxSession}") +/* */ private int maxSession; +/* */ @Value("${shiro.session.kickoutAfter}") +/* */ private boolean kickoutAfter; +/* */ @Value("${shiro.user.captchaEnabled}") +/* */ private boolean captchaEnabled; +/* */ @Value("${shiro.user.captchaType}") +/* */ private String captchaType; +/* */ @Value("${shiro.cookie.domain}") +/* */ private String domain; +/* */ @Value("${shiro.cookie.path}") +/* */ private String path; +/* */ @Value("${shiro.cookie.httpOnly}") +/* */ private boolean httpOnly; +/* */ @Value("${shiro.cookie.maxAge}") +/* */ private int maxAge; +/* */ @Value("${shiro.cookie.cipherKey}") +/* */ private String cipherKey; +/* */ @Value("${shiro.user.loginUrl}") +/* */ private String loginUrl; +/* */ @Value("${shiro.user.unauthorizedUrl}") +/* */ private String unauthorizedUrl; +/* */ +/* */ @Bean +/* */ public EhCacheManager getEhCacheManager() { +/* 105 */ CacheManager cacheManager = CacheManager.getCacheManager("archive"); +/* 106 */ EhCacheManager em = new EhCacheManager(); +/* 107 */ if (StringUtils.isNull(cacheManager)) { +/* */ +/* 109 */ em.setCacheManager(new CacheManager(getCacheManagerConfigFileInputStream())); +/* 110 */ return em; +/* */ } +/* */ +/* */ +/* 114 */ em.setCacheManager(cacheManager); +/* 115 */ return em; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected InputStream getCacheManagerConfigFileInputStream() { +/* 124 */ String configFile = "classpath:ehcache/ehcache-shiro.xml"; +/* 125 */ InputStream inputStream = null; +/* */ +/* */ try { +/* 128 */ inputStream = ResourceUtils.getInputStreamForPath(configFile); +/* 129 */ byte[] b = IOUtils.toByteArray(inputStream); +/* 130 */ InputStream in = new ByteArrayInputStream(b); +/* 131 */ return in; +/* */ } +/* 133 */ catch (IOException e) { +/* */ +/* 135 */ throw new ConfigurationException("Unable to obtain input stream for cacheManagerConfigFile [" + configFile + "]", e); +/* */ +/* */ } +/* */ finally { +/* */ +/* 140 */ IOUtils.closeQuietly(inputStream); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Bean +/* */ public UserRealm userRealm(EhCacheManager cacheManager) { +/* 150 */ UserRealm userRealm = new UserRealm(); +/* 151 */ userRealm.setAuthorizationCacheName("sys-authCache"); +/* 152 */ userRealm.setCacheManager((CacheManager)cacheManager); +/* 153 */ return userRealm; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Bean +/* */ public OnlineSessionDAO sessionDAO() { +/* 162 */ OnlineSessionDAO sessionDAO = new OnlineSessionDAO(); +/* 163 */ return sessionDAO; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Bean +/* */ public OnlineSessionFactory sessionFactory() { +/* 172 */ OnlineSessionFactory sessionFactory = new OnlineSessionFactory(); +/* 173 */ return sessionFactory; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Bean +/* */ public OnlineWebSessionManager sessionManager() { +/* 182 */ OnlineWebSessionManager manager = new OnlineWebSessionManager(); +/* */ +/* 184 */ manager.setCacheManager((CacheManager)getEhCacheManager()); +/* */ +/* 186 */ manager.setDeleteInvalidSessions(true); +/* */ +/* 188 */ manager.setGlobalSessionTimeout((this.expireTime * 60 * 1000)); +/* */ +/* 190 */ manager.setSessionIdUrlRewritingEnabled(false); +/* */ +/* 192 */ manager.setSessionValidationScheduler((SessionValidationScheduler)SpringUtils.getBean(SpringSessionValidationScheduler.class)); +/* */ +/* 194 */ manager.setSessionValidationSchedulerEnabled(true); +/* */ +/* 196 */ manager.setSessionDAO((SessionDAO)sessionDAO()); +/* */ +/* 198 */ manager.setSessionFactory((SessionFactory)sessionFactory()); +/* 199 */ return manager; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Bean +/* */ public SecurityManager securityManager(UserRealm userRealm) { +/* 208 */ DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); +/* */ +/* 210 */ securityManager.setRealm((Realm)userRealm); +/* */ +/* 212 */ securityManager.setRememberMeManager((RememberMeManager)rememberMeManager()); +/* */ +/* 214 */ securityManager.setCacheManager((CacheManager)getEhCacheManager()); +/* */ +/* 216 */ securityManager.setSessionManager((SessionManager)sessionManager()); +/* 217 */ return (SecurityManager)securityManager; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public LogoutFilter logoutFilter() { +/* 225 */ LogoutFilter logoutFilter = new LogoutFilter(); +/* 226 */ logoutFilter.setLoginUrl(this.loginUrl); +/* 227 */ return logoutFilter; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Bean +/* */ public ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager) { +/* 236 */ ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean(); +/* */ +/* 238 */ shiroFilterFactoryBean.setSecurityManager(securityManager); +/* */ +/* 240 */ shiroFilterFactoryBean.setLoginUrl(this.loginUrl); +/* */ +/* 242 */ shiroFilterFactoryBean.setUnauthorizedUrl(this.unauthorizedUrl); +/* */ +/* 244 */ LinkedHashMap filterChainDefinitionMap = new LinkedHashMap<>(); +/* */ +/* 246 */ filterChainDefinitionMap.put("/favicon.ico**", "anon"); +/* 247 */ filterChainDefinitionMap.put("/archive.png**", "anon"); +/* 248 */ filterChainDefinitionMap.put("/css/**", "anon"); +/* 249 */ filterChainDefinitionMap.put("/docs/**", "anon"); +/* 250 */ filterChainDefinitionMap.put("/fonts/**", "anon"); +/* 251 */ filterChainDefinitionMap.put("/img/**", "anon"); +/* 252 */ filterChainDefinitionMap.put("/ajax/**", "anon"); +/* 253 */ filterChainDefinitionMap.put("/plugins/**", "anon"); +/* 254 */ filterChainDefinitionMap.put("/js/**", "anon"); +/* 255 */ filterChainDefinitionMap.put("/archive/**", "anon"); +/* 256 */ filterChainDefinitionMap.put("/captcha/captchaImage**", "anon"); +/* */ +/* 258 */ filterChainDefinitionMap.put("/logout", "logout"); +/* */ +/* 260 */ filterChainDefinitionMap.put("/login", "anon,captchaValidate"); +/* 261 */ filterChainDefinitionMap.put("/browse/browseDocument", "anon,captchaValidate"); +/* */ +/* 263 */ filterChainDefinitionMap.put("/register", "anon,captchaValidate"); +/* */ +/* */ +/* */ +/* 267 */ Map filters = new LinkedHashMap<>(); +/* 268 */ filters.put("onlineSession", onlineSessionFilter()); +/* 269 */ filters.put("syncOnlineSession", syncOnlineSessionFilter()); +/* 270 */ filters.put("captchaValidate", captchaValidateFilter()); +/* 271 */ filters.put("kickout", kickoutSessionFilter()); +/* */ +/* 273 */ filters.put("logout", logoutFilter()); +/* 274 */ shiroFilterFactoryBean.setFilters(filters); +/* */ +/* */ +/* 277 */ filterChainDefinitionMap.put("/**", "user,kickout,onlineSession,syncOnlineSession"); +/* 278 */ shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap); +/* */ +/* 280 */ return shiroFilterFactoryBean; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public OnlineSessionFilter onlineSessionFilter() { +/* 288 */ OnlineSessionFilter onlineSessionFilter = new OnlineSessionFilter(); +/* 289 */ onlineSessionFilter.setLoginUrl(this.loginUrl); +/* 290 */ onlineSessionFilter.setOnlineSessionDAO(sessionDAO()); +/* 291 */ return onlineSessionFilter; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public SyncOnlineSessionFilter syncOnlineSessionFilter() { +/* 299 */ SyncOnlineSessionFilter syncOnlineSessionFilter = new SyncOnlineSessionFilter(); +/* 300 */ syncOnlineSessionFilter.setOnlineSessionDAO(sessionDAO()); +/* 301 */ return syncOnlineSessionFilter; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public CaptchaValidateFilter captchaValidateFilter() { +/* 309 */ CaptchaValidateFilter captchaValidateFilter = new CaptchaValidateFilter(); +/* 310 */ captchaValidateFilter.setCaptchaEnabled(this.captchaEnabled); +/* 311 */ captchaValidateFilter.setCaptchaType(this.captchaType); +/* 312 */ return captchaValidateFilter; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public SimpleCookie rememberMeCookie() { +/* 320 */ SimpleCookie cookie = new SimpleCookie("rememberMe"); +/* 321 */ cookie.setDomain(this.domain); +/* 322 */ cookie.setPath(this.path); +/* 323 */ cookie.setHttpOnly(this.httpOnly); +/* 324 */ cookie.setMaxAge(this.maxAge * 24 * 60 * 60); +/* 325 */ return cookie; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public CookieRememberMeManager rememberMeManager() { +/* 333 */ CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager(); +/* 334 */ cookieRememberMeManager.setCookie((Cookie)rememberMeCookie()); +/* 335 */ cookieRememberMeManager.setCipherKey(Base64.decode(this.cipherKey)); +/* 336 */ return cookieRememberMeManager; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public KickoutSessionFilter kickoutSessionFilter() { +/* 344 */ KickoutSessionFilter kickoutSessionFilter = new KickoutSessionFilter(); +/* 345 */ kickoutSessionFilter.setCacheManager((CacheManager)getEhCacheManager()); +/* 346 */ kickoutSessionFilter.setSessionManager((SessionManager)sessionManager()); +/* */ +/* 348 */ kickoutSessionFilter.setMaxSession(this.maxSession); +/* */ +/* 350 */ kickoutSessionFilter.setKickoutAfter(this.kickoutAfter); +/* */ +/* 352 */ kickoutSessionFilter.setKickoutUrl("/login?kickout=1"); +/* 353 */ return kickoutSessionFilter; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Bean +/* */ public ShiroDialect shiroDialect() { +/* 362 */ return new ShiroDialect(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Bean +/* */ public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(@Qualifier("securityManager") SecurityManager securityManager) { +/* 372 */ AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor(); +/* 373 */ authorizationAttributeSourceAdvisor.setSecurityManager(securityManager); +/* 374 */ return authorizationAttributeSourceAdvisor; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\ShiroConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/SwaggerConfig.java b/src/main/java/com/archive/framework/config/SwaggerConfig.java new file mode 100644 index 0000000..071f5f8 --- /dev/null +++ b/src/main/java/com/archive/framework/config/SwaggerConfig.java @@ -0,0 +1,81 @@ +/* */ package com.archive.framework.config + +-INF.classes.com.archive.framework.config; +/* */ +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import io.swagger.annotations.ApiOperation; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.beans.factory.annotation.Value; +/* */ import org.springframework.context.annotation.Bean; +/* */ import org.springframework.context.annotation.Configuration; +/* */ import springfox.documentation.builders.ApiInfoBuilder; +/* */ import springfox.documentation.builders.PathSelectors; +/* */ import springfox.documentation.builders.RequestHandlerSelectors; +/* */ import springfox.documentation.service.ApiInfo; +/* */ import springfox.documentation.service.Contact; +/* */ import springfox.documentation.spi.DocumentationType; +/* */ import springfox.documentation.spring.web.plugins.Docket; +/* */ import springfox.documentation.swagger2.annotations.EnableSwagger2; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Configuration +/* */ @EnableSwagger2 +/* */ public class SwaggerConfig +/* */ { +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ @Value("${swagger.enabled}") +/* */ private boolean enabled; +/* */ +/* */ @Bean +/* */ public Docket createRestApi() { +/* 40 */ return (new Docket(DocumentationType.SWAGGER_2)) +/* */ +/* 42 */ .enable(this.enabled) +/* */ +/* 44 */ .apiInfo(apiInfo()) +/* */ +/* 46 */ .select() +/* */ +/* 48 */ .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) +/* */ +/* */ +/* */ +/* 52 */ .paths(PathSelectors.any()) +/* 53 */ .build(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private ApiInfo apiInfo() { +/* 62 */ return (new ApiInfoBuilder()) +/* */ +/* 64 */ .title("标题:若依管理系统_接口文档") +/* */ +/* 66 */ .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...") +/* */ +/* 68 */ .contact(new Contact(this.archiveConfig.getName(), null, null)) +/* */ +/* 70 */ .version("版本号:" + this.archiveConfig.getVersion()) +/* 71 */ .build(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\SwaggerConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/ThreadPoolConfig.java b/src/main/java/com/archive/framework/config/ThreadPoolConfig.java new file mode 100644 index 0000000..1efd5d1 --- /dev/null +++ b/src/main/java/com/archive/framework/config/ThreadPoolConfig.java @@ -0,0 +1,62 @@ +/* */ package com.archive.framework.config + +; +/* */ +/* */ import java.util.concurrent.ScheduledExecutorService; +/* */ import java.util.concurrent.ThreadFactory; +/* */ import java.util.concurrent.ThreadPoolExecutor; +/* */ import org.apache.commons.lang3.concurrent.BasicThreadFactory; +/* */ import org.springframework.context.annotation.Bean; +/* */ import org.springframework.context.annotation.Configuration; +/* */ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Configuration +/* */ public class ThreadPoolConfig +/* */ { +/* 21 */ private int corePoolSize = 50; +/* */ +/* */ +/* 24 */ private int maxPoolSize = 200; +/* */ +/* */ +/* 27 */ private int queueCapacity = 1000; +/* */ +/* */ +/* 30 */ private int keepAliveSeconds = 300; +/* */ +/* */ +/* */ @Bean(name = {"threadPoolTaskExecutor"}) +/* */ public ThreadPoolTaskExecutor threadPoolTaskExecutor() { +/* 35 */ ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); +/* 36 */ executor.setMaxPoolSize(this.maxPoolSize); +/* 37 */ executor.setCorePoolSize(this.corePoolSize); +/* 38 */ executor.setQueueCapacity(this.queueCapacity); +/* 39 */ executor.setKeepAliveSeconds(this.keepAliveSeconds); +/* */ +/* 41 */ executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); +/* 42 */ return executor; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Bean(name = {"scheduledExecutorService"}) +/* */ protected ScheduledExecutorService scheduledExecutorService() { +/* 51 */ return (ScheduledExecutorService)new Object(this, this.corePoolSize, (ThreadFactory)(new BasicThreadFactory.Builder()) +/* 52 */ .namingPattern("schedule-pool-%d").daemon(true).build()); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\ThreadPoolConfig.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/config/properties/DruidProperties.java b/src/main/java/com/archive/framework/config/properties/DruidProperties.java new file mode 100644 index 0000000..6e5660a --- /dev/null +++ b/src/main/java/com/archive/framework/config/properties/DruidProperties.java @@ -0,0 +1,85 @@ +/* */ package com.archive.framework.config.properties + +-INF.classes.com.archive.framework.config.properties; +/* */ +/* */ import com.alibaba.druid.pool.DruidDataSource; +/* */ import org.springframework.beans.factory.annotation.Value; +/* */ import org.springframework.context.annotation.Configuration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Configuration +/* */ public class DruidProperties +/* */ { +/* */ @Value("${spring.datasource.druid.initialSize}") +/* */ private int initialSize; +/* */ @Value("${spring.datasource.druid.minIdle}") +/* */ private int minIdle; +/* */ @Value("${spring.datasource.druid.maxActive}") +/* */ private int maxActive; +/* */ @Value("${spring.datasource.druid.maxWait}") +/* */ private int maxWait; +/* */ @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}") +/* */ private int timeBetweenEvictionRunsMillis; +/* */ @Value("${spring.datasource.druid.minEvictableIdleTimeMillis}") +/* */ private int minEvictableIdleTimeMillis; +/* */ @Value("${spring.datasource.druid.maxEvictableIdleTimeMillis}") +/* */ private int maxEvictableIdleTimeMillis; +/* */ @Value("${spring.datasource.druid.validationQuery}") +/* */ private String validationQuery; +/* */ @Value("${spring.datasource.druid.testWhileIdle}") +/* */ private boolean testWhileIdle; +/* */ @Value("${spring.datasource.druid.testOnBorrow}") +/* */ private boolean testOnBorrow; +/* */ @Value("${spring.datasource.druid.testOnReturn}") +/* */ private boolean testOnReturn; +/* */ +/* */ public DruidDataSource dataSource(DruidDataSource datasource) { +/* 51 */ datasource.setInitialSize(this.initialSize); +/* 52 */ datasource.setMaxActive(this.maxActive); +/* 53 */ datasource.setMinIdle(this.minIdle); +/* */ +/* */ +/* 56 */ datasource.setMaxWait(this.maxWait); +/* */ +/* */ +/* 59 */ datasource.setTimeBetweenEvictionRunsMillis(this.timeBetweenEvictionRunsMillis); +/* */ +/* */ +/* 62 */ datasource.setMinEvictableIdleTimeMillis(this.minEvictableIdleTimeMillis); +/* 63 */ datasource.setMaxEvictableIdleTimeMillis(this.maxEvictableIdleTimeMillis); +/* */ +/* */ +/* */ +/* */ +/* 68 */ datasource.setValidationQuery(this.validationQuery); +/* */ +/* 70 */ datasource.setTestWhileIdle(this.testWhileIdle); +/* */ +/* 72 */ datasource.setTestOnBorrow(this.testOnBorrow); +/* */ +/* 74 */ datasource.setTestOnReturn(this.testOnReturn); +/* 75 */ return datasource; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\properties\DruidProperties.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/datasource/DynamicDataSource.java b/src/main/java/com/archive/framework/datasource/DynamicDataSource.java new file mode 100644 index 0000000..99bb134 --- /dev/null +++ b/src/main/java/com/archive/framework/datasource/DynamicDataSource.java @@ -0,0 +1,34 @@ +/* */ package com.archive.framework.datasource + +-INF.classes.com.archive.framework.datasource; +/* */ +/* */ import com.archive.framework.datasource.DynamicDataSourceContextHolder; +/* */ import java.util.Map; +/* */ import javax.sql.DataSource; +/* */ import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DynamicDataSource +/* */ extends AbstractRoutingDataSource +/* */ { +/* */ public DynamicDataSource(DataSource defaultTargetDataSource, Map targetDataSources) { +/* 16 */ setDefaultTargetDataSource(defaultTargetDataSource); +/* 17 */ setTargetDataSources(targetDataSources); +/* 18 */ afterPropertiesSet(); +/* */ } +/* */ +/* */ +/* */ +/* */ protected Object determineCurrentLookupKey() { +/* 24 */ return DynamicDataSourceContextHolder.getDataSourceType(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\datasource\DynamicDataSource.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/datasource/DynamicDataSourceContextHolder.java b/src/main/java/com/archive/framework/datasource/DynamicDataSourceContextHolder.java new file mode 100644 index 0000000..0ea9672 --- /dev/null +++ b/src/main/java/com/archive/framework/datasource/DynamicDataSourceContextHolder.java @@ -0,0 +1,53 @@ +/* */ package com.archive.framework.datasource + +-INF.classes.com.archive.framework.datasource; +/* */ +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DynamicDataSourceContextHolder +/* */ { +/* 13 */ public static final Logger log = LoggerFactory.getLogger(com.archive.framework.datasource.DynamicDataSourceContextHolder.class); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 19 */ private static final ThreadLocal CONTEXT_HOLDER = new ThreadLocal<>(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void setDataSourceType(String dsType) { +/* 26 */ log.info("切换到{}数据源", dsType); +/* 27 */ CONTEXT_HOLDER.set(dsType); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getDataSourceType() { +/* 35 */ return CONTEXT_HOLDER.get(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void clearDataSourceType() { +/* 43 */ CONTEXT_HOLDER.remove(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\datasource\DynamicDataSourceContextHolder.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/interceptor/RepeatSubmitInterceptor.java b/src/main/java/com/archive/framework/interceptor/RepeatSubmitInterceptor.java new file mode 100644 index 0000000..a60b11b --- /dev/null +++ b/src/main/java/com/archive/framework/interceptor/RepeatSubmitInterceptor.java @@ -0,0 +1,55 @@ +/* */ package com.archive.framework.interceptor + +-INF.classes.com.archive.framework.interceptor; +/* */ +/* */ import com.alibaba.fastjson.JSONObject; +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.framework.interceptor.annotation.RepeatSubmit; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import java.lang.reflect.Method; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import org.springframework.stereotype.Component; +/* */ import org.springframework.web.method.HandlerMethod; +/* */ import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ public abstract class RepeatSubmitInterceptor +/* */ extends HandlerInterceptorAdapter +/* */ { +/* */ public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { +/* 25 */ if (handler instanceof HandlerMethod) { +/* */ +/* 27 */ HandlerMethod handlerMethod = (HandlerMethod)handler; +/* 28 */ Method method = handlerMethod.getMethod(); +/* 29 */ RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class); +/* 30 */ if (annotation != null) +/* */ { +/* 32 */ if (isRepeatSubmit(request)) { +/* */ +/* 34 */ AjaxResult ajaxResult = AjaxResult.error("不允许重复提交,请稍后再试"); +/* 35 */ ServletUtils.renderString(response, JSONObject.toJSONString(ajaxResult)); +/* 36 */ return false; +/* */ } +/* */ } +/* 39 */ return true; +/* */ } +/* */ +/* */ +/* 43 */ return super.preHandle(request, response, handler); +/* */ } +/* */ +/* */ public abstract boolean isRepeatSubmit(HttpServletRequest paramHttpServletRequest); +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\interceptor\RepeatSubmitInterceptor.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/interceptor/annotation/RepeatSubmit.java b/src/main/java/com/archive/framework/interceptor/annotation/RepeatSubmit.java new file mode 100644 index 0000000..5d0b9cc --- /dev/null +++ b/src/main/java/com/archive/framework/interceptor/annotation/RepeatSubmit.java @@ -0,0 +1,20 @@ +package com.archive.framework.interceptor.annotation + +-INF.classes.com.archive.framework.interceptor.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface RepeatSubmit {} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\interceptor\annotation\RepeatSubmit.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/interceptor/impl/SameUrlDataInterceptor.java b/src/main/java/com/archive/framework/interceptor/impl/SameUrlDataInterceptor.java new file mode 100644 index 0000000..7c70108 --- /dev/null +++ b/src/main/java/com/archive/framework/interceptor/impl/SameUrlDataInterceptor.java @@ -0,0 +1,102 @@ +/* */ package com.archive.framework.interceptor.impl + +-INF.classes.com.archive.framework.interceptor.impl; +/* */ +/* */ import com.alibaba.fastjson.JSONObject; +/* */ import com.archive.framework.interceptor.RepeatSubmitInterceptor; +/* */ import java.util.HashMap; +/* */ import java.util.Map; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpSession; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ public class SameUrlDataInterceptor +/* */ extends RepeatSubmitInterceptor +/* */ { +/* 20 */ public final String REPEAT_PARAMS = "repeatParams"; +/* */ +/* 22 */ public final String REPEAT_TIME = "repeatTime"; +/* */ +/* 24 */ public final String SESSION_REPEAT_KEY = "repeatData"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 31 */ private int intervalTime = 10; +/* */ +/* */ +/* */ public void setIntervalTime(int intervalTime) { +/* 35 */ this.intervalTime = intervalTime; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isRepeatSubmit(HttpServletRequest request) { +/* 43 */ String nowParams = JSONObject.toJSONString(request.getParameterMap()); +/* 44 */ Map nowDataMap = new HashMap<>(); +/* 45 */ nowDataMap.put("repeatParams", nowParams); +/* 46 */ nowDataMap.put("repeatTime", Long.valueOf(System.currentTimeMillis())); +/* */ +/* */ +/* 49 */ String url = request.getRequestURI(); +/* */ +/* 51 */ HttpSession session = request.getSession(); +/* 52 */ Object sessionObj = session.getAttribute("repeatData"); +/* 53 */ if (sessionObj != null) { +/* */ +/* 55 */ Map map = (Map)sessionObj; +/* 56 */ if (map.containsKey(url)) { +/* */ +/* 58 */ Map preDataMap = (Map)map.get(url); +/* 59 */ if (compareParams(nowDataMap, preDataMap) && compareTime(nowDataMap, preDataMap)) +/* */ { +/* 61 */ return true; +/* */ } +/* */ } +/* */ } +/* 65 */ Map sessionMap = new HashMap<>(); +/* 66 */ sessionMap.put(url, nowDataMap); +/* 67 */ session.setAttribute("repeatData", sessionMap); +/* 68 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private boolean compareParams(Map nowMap, Map preMap) { +/* 76 */ String nowParams = (String)nowMap.get("repeatParams"); +/* 77 */ String preParams = (String)preMap.get("repeatParams"); +/* 78 */ return nowParams.equals(preParams); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private boolean compareTime(Map nowMap, Map preMap) { +/* 86 */ long time1 = ((Long)nowMap.get("repeatTime")).longValue(); +/* 87 */ long time2 = ((Long)preMap.get("repeatTime")).longValue(); +/* 88 */ if (time1 - time2 < (this.intervalTime * 1000)) +/* */ { +/* 90 */ return true; +/* */ } +/* 92 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\interceptor\impl\SameUrlDataInterceptor.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/manager/AsyncManager.java b/src/main/java/com/archive/framework/manager/AsyncManager.java new file mode 100644 index 0000000..824a8e5 --- /dev/null +++ b/src/main/java/com/archive/framework/manager/AsyncManager.java @@ -0,0 +1,65 @@ +/* */ package com.archive.framework.manager + +-INF.classes.com.archive.framework.manager; +/* */ +/* */ import com.archive.common.utils.Threads; +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import java.util.TimerTask; +/* */ import java.util.concurrent.ScheduledExecutorService; +/* */ import java.util.concurrent.TimeUnit; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AsyncManager +/* */ { +/* 19 */ private final int OPERATE_DELAY_TIME = 10; +/* */ +/* */ +/* */ +/* */ +/* 24 */ private ScheduledExecutorService executor = (ScheduledExecutorService)SpringUtils.getBean("scheduledExecutorService"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 33 */ private static com.archive.framework.manager.AsyncManager me = new com.archive.framework.manager.AsyncManager(); +/* */ +/* */ +/* */ public static com.archive.framework.manager.AsyncManager me() { +/* 37 */ return me; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void execute(TimerTask task) { +/* 47 */ this.executor.schedule(task, 10L, TimeUnit.MILLISECONDS); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void shutdown() { +/* 55 */ Threads.shutdownAndAwaitTermination(this.executor); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\manager\AsyncManager.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/manager/ShutdownManager.java b/src/main/java/com/archive/framework/manager/ShutdownManager.java new file mode 100644 index 0000000..e2386cf --- /dev/null +++ b/src/main/java/com/archive/framework/manager/ShutdownManager.java @@ -0,0 +1,93 @@ +/* */ package com.archive.framework.manager; +/* */ +/* */ import com.archive.framework.manager.AsyncManager; +/* */ import com.archive.framework.shiro.web.session.SpringSessionValidationScheduler; +/* */ import javax.annotation.PreDestroy; +/* */ import net.sf.ehcache.CacheManager; +/* */ import org.apache.shiro.cache.ehcache.EhCacheManager; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ public class ShutdownManager +/* */ { +/* 20 */ private static final Logger logger = LoggerFactory.getLogger("sys-user"); +/* */ +/* */ @Autowired(required = false) +/* */ private SpringSessionValidationScheduler springSessionValidationScheduler; +/* */ +/* */ @Autowired(required = false) +/* */ private EhCacheManager ehCacheManager; +/* */ +/* */ +/* */ @PreDestroy +/* */ public void destroy() { +/* 31 */ shutdownSpringSessionValidationScheduler(); +/* 32 */ shutdownAsyncManager(); +/* 33 */ shutdownEhCacheManager(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void shutdownSpringSessionValidationScheduler() { +/* 41 */ if (this.springSessionValidationScheduler != null && this.springSessionValidationScheduler.isEnabled()) { +/* */ +/* */ try { +/* */ +/* 45 */ logger.info("====关闭会话验证任务===="); +/* 46 */ this.springSessionValidationScheduler.disableSessionValidation(); +/* */ } +/* 48 */ catch (Exception e) { +/* */ +/* 50 */ logger.error(e.getMessage(), e); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void shutdownAsyncManager() { +/* */ try { +/* 62 */ logger.info("====关闭后台任务任务线程池===="); +/* 63 */ AsyncManager.me().shutdown(); +/* */ } +/* 65 */ catch (Exception e) { +/* */ +/* 67 */ logger.error(e.getMessage(), e); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ private void shutdownEhCacheManager() { +/* */ try { +/* 75 */ logger.info("====关闭缓存===="); +/* 76 */ if (this.ehCacheManager != null) +/* */ { +/* 78 */ CacheManager cacheManager = this.ehCacheManager.getCacheManager(); +/* 79 */ cacheManager.shutdown(); +/* */ } +/* */ +/* 82 */ } catch (Exception e) { +/* */ +/* 84 */ logger.error(e.getMessage(), e); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\manager\ShutdownManager.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/manager/factory/AsyncFactory.java b/src/main/java/com/archive/framework/manager/factory/AsyncFactory.java new file mode 100644 index 0000000..e29325c --- /dev/null +++ b/src/main/java/com/archive/framework/manager/factory/AsyncFactory.java @@ -0,0 +1,107 @@ +/* */ package com.archive.framework.manager.factory + +-INF.classes.com.archive.framework.manager.factory; +/* */ +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.project.monitor.online.domain.OnlineSession; +/* */ import com.archive.project.monitor.operlog.domain.OperLog; +/* */ import eu.bitwalker.useragentutils.UserAgent; +/* */ import java.util.TimerTask; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AsyncFactory +/* */ { +/* 30 */ private static final Logger sys_user_logger = LoggerFactory.getLogger("sys-user"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static TimerTask syncSessionToDb(OnlineSession session) { +/* 40 */ return (TimerTask)new Object(session); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static TimerTask recordOper(OperLog operLog) { +/* 72 */ return (TimerTask)new Object(operLog); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static TimerTask recordLogininfor(String username, String status, String message, Object... args) { +/* 95 */ UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); +/* 96 */ String ip = ShiroUtils.getIp(); +/* 97 */ return (TimerTask)new Object(ip, username, status, message, args, userAgent); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\manager\factory\AsyncFactory.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/realm/UserRealm.java b/src/main/java/com/archive/framework/shiro/realm/UserRealm.java new file mode 100644 index 0000000..a657e6e --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/realm/UserRealm.java @@ -0,0 +1,166 @@ +/* */ package com.archive.framework.shiro.realm + +-INF.classes.com.archive.framework.shiro.realm; +/* */ +/* */ import com.archive.common.exception.user.CaptchaException; +/* */ import com.archive.common.exception.user.RoleBlockedException; +/* */ import com.archive.common.exception.user.UserBlockedException; +/* */ import com.archive.common.exception.user.UserNotExistsException; +/* */ import com.archive.common.exception.user.UserPasswordNotMatchException; +/* */ import com.archive.common.exception.user.UserPasswordRetryLimitExceedException; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.shiro.service.LoginService; +/* */ import com.archive.project.system.menu.service.IMenuService; +/* */ import com.archive.project.system.role.service.IRoleService; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.util.HashSet; +/* */ import java.util.Set; +/* */ import org.apache.shiro.authc.AuthenticationException; +/* */ import org.apache.shiro.authc.AuthenticationInfo; +/* */ import org.apache.shiro.authc.AuthenticationToken; +/* */ import org.apache.shiro.authc.ExcessiveAttemptsException; +/* */ import org.apache.shiro.authc.IncorrectCredentialsException; +/* */ import org.apache.shiro.authc.LockedAccountException; +/* */ import org.apache.shiro.authc.SimpleAuthenticationInfo; +/* */ import org.apache.shiro.authc.UnknownAccountException; +/* */ import org.apache.shiro.authc.UsernamePasswordToken; +/* */ import org.apache.shiro.authz.AuthorizationInfo; +/* */ import org.apache.shiro.authz.SimpleAuthorizationInfo; +/* */ import org.apache.shiro.cache.Cache; +/* */ import org.apache.shiro.realm.AuthorizingRealm; +/* */ import org.apache.shiro.subject.PrincipalCollection; +/* */ import org.apache.shiro.subject.SimplePrincipalCollection; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class UserRealm +/* */ extends AuthorizingRealm +/* */ { +/* 42 */ private static final Logger log = LoggerFactory.getLogger(com.archive.framework.shiro.realm.UserRealm.class); +/* */ +/* */ +/* */ @Autowired +/* */ private IMenuService menuService; +/* */ +/* */ +/* */ @Autowired +/* */ private IRoleService roleService; +/* */ +/* */ +/* */ @Autowired +/* */ private LoginService loginService; +/* */ +/* */ +/* */ +/* */ protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection arg0) { +/* 59 */ User user = ShiroUtils.getSysUser(); +/* */ +/* 61 */ Set roles = new HashSet<>(); +/* */ +/* 63 */ Set menus = new HashSet<>(); +/* 64 */ SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); +/* */ +/* 66 */ if (user.isAdmin()) { +/* */ +/* 68 */ info.addRole("admin"); +/* 69 */ info.addStringPermission("*:*:*"); +/* */ } +/* */ else { +/* */ +/* 73 */ roles = this.roleService.selectRoleKeys(user.getUserId()); +/* 74 */ menus = this.menuService.selectPermsByUserId(user.getUserId()); +/* */ +/* 76 */ info.setRoles(roles); +/* */ +/* 78 */ info.setStringPermissions(menus); +/* */ } +/* 80 */ return (AuthorizationInfo)info; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { +/* 89 */ UsernamePasswordToken upToken = (UsernamePasswordToken)token; +/* 90 */ String username = upToken.getUsername(); +/* 91 */ String password = ""; +/* 92 */ if (upToken.getPassword() != null) +/* */ { +/* 94 */ password = new String(upToken.getPassword()); +/* */ } +/* */ +/* 97 */ User user = null; +/* */ +/* */ try { +/* 100 */ user = this.loginService.login(username, password); +/* */ } +/* 102 */ catch (CaptchaException e) { +/* */ +/* 104 */ throw new AuthenticationException(e.getMessage(), e); +/* */ } +/* 106 */ catch (UserNotExistsException e) { +/* */ +/* 108 */ throw new UnknownAccountException(e.getMessage(), e); +/* */ } +/* 110 */ catch (UserPasswordNotMatchException e) { +/* */ +/* 112 */ throw new IncorrectCredentialsException(e.getMessage(), e); +/* */ } +/* 114 */ catch (UserPasswordRetryLimitExceedException e) { +/* */ +/* 116 */ throw new ExcessiveAttemptsException(e.getMessage(), e); +/* */ } +/* 118 */ catch (UserBlockedException e) { +/* */ +/* 120 */ throw new LockedAccountException(e.getMessage(), e); +/* */ } +/* 122 */ catch (RoleBlockedException e) { +/* */ +/* 124 */ throw new LockedAccountException(e.getMessage(), e); +/* */ } +/* 126 */ catch (Exception e) { +/* */ +/* 128 */ log.info("对用户[" + username + "]进行登录验证..验证未通过{}", e.getMessage()); +/* 129 */ throw new AuthenticationException(e.getMessage(), e); +/* */ } +/* 131 */ SimpleAuthenticationInfo info = new SimpleAuthenticationInfo(user, password, getName()); +/* 132 */ return (AuthenticationInfo)info; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void clearCachedAuthorizationInfo(Object principal) { +/* 140 */ SimplePrincipalCollection principals = new SimplePrincipalCollection(principal, getName()); +/* 141 */ clearCachedAuthorizationInfo((PrincipalCollection)principals); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void clearAllCachedAuthorizationInfo() { +/* 149 */ Cache cache = getAuthorizationCache(); +/* 150 */ if (cache != null) +/* */ { +/* 152 */ for (Object key : cache.keys()) +/* */ { +/* 154 */ cache.remove(key); +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\realm\UserRealm.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/service/LoginService.java b/src/main/java/com/archive/framework/shiro/service/LoginService.java new file mode 100644 index 0000000..1b373a2 --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/service/LoginService.java @@ -0,0 +1,148 @@ +/* */ package com.archive.framework.shiro.service + +; +/* */ +/* */ import com.archive.common.exception.user.CaptchaException; +/* */ import com.archive.common.exception.user.UserBlockedException; +/* */ import com.archive.common.exception.user.UserDeleteException; +/* */ import com.archive.common.exception.user.UserNotExistsException; +/* */ import com.archive.common.exception.user.UserPasswordNotMatchException; +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.MessageUtils; +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.manager.AsyncManager; +/* */ import com.archive.framework.manager.factory.AsyncFactory; +/* */ import com.archive.framework.shiro.service.PasswordService; +/* */ import com.archive.project.system.user.domain.User; +/* */ import com.archive.project.system.user.domain.UserStatus; +/* */ import com.archive.project.system.user.service.IUserService; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Component; +/* */ import org.springframework.util.StringUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ public class LoginService +/* */ { +/* */ @Autowired +/* */ private PasswordService passwordService; +/* */ @Autowired +/* */ private IUserService userService; +/* */ +/* */ public User login(String username, String password) { +/* 44 */ if ("captchaError".equals(ServletUtils.getRequest().getAttribute("captcha"))) { +/* */ +/* 46 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.jcaptcha.error", new Object[0]), new Object[0])); +/* 47 */ throw new CaptchaException(); +/* */ } +/* */ +/* 50 */ if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) { +/* */ +/* 52 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("not.null", new Object[0]), new Object[0])); +/* 53 */ throw new UserNotExistsException(); +/* */ } +/* */ +/* 56 */ if (password.length() < 5 || password +/* 57 */ .length() > 20) { +/* */ +/* 59 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.password.not.match", new Object[0]), new Object[0])); +/* 60 */ throw new UserPasswordNotMatchException(); +/* */ } +/* */ +/* */ +/* 64 */ if (username.length() < 2 || username +/* 65 */ .length() > 20) { +/* */ +/* 67 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.password.not.match", new Object[0]), new Object[0])); +/* 68 */ throw new UserPasswordNotMatchException(); +/* */ } +/* */ +/* */ +/* 72 */ User user = this.userService.selectUserByLoginName(username); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 86 */ if (user == null) { +/* */ +/* 88 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.not.exists", new Object[0]), new Object[0])); +/* 89 */ throw new UserNotExistsException(); +/* */ } +/* */ +/* 92 */ if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { +/* */ +/* 94 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.password.delete", new Object[0]), new Object[0])); +/* 95 */ throw new UserDeleteException(); +/* */ } +/* */ +/* 98 */ if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { +/* */ +/* 100 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.blocked", new Object[] { user.getRemark() }), new Object[0])); +/* 101 */ throw new UserBlockedException(); +/* */ } +/* */ +/* 104 */ this.passwordService.validate(user, password); +/* */ +/* 106 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Success", MessageUtils.message("user.login.success", new Object[0]), new Object[0])); +/* 107 */ recordLoginInfo(user); +/* 108 */ return user; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void recordLoginInfo(User user) { +/* 136 */ user.setLoginIp(ShiroUtils.getIp()); +/* 137 */ user.setLoginDate(DateUtils.getNowDate()); +/* 138 */ this.userService.updateUserInfo(user); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\service\LoginService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/service/PasswordService.java b/src/main/java/com/archive/framework/shiro/service/PasswordService.java new file mode 100644 index 0000000..84a8348 --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/service/PasswordService.java @@ -0,0 +1,99 @@ +/* */ package com.archive.framework.shiro.service + +-INF.classes.com.archive.framework.shiro.service; +/* */ +/* */ import com.archive.common.exception.user.UserPasswordNotMatchException; +/* */ import com.archive.common.exception.user.UserPasswordRetryLimitExceedException; +/* */ import com.archive.common.utils.MessageUtils; +/* */ import com.archive.framework.manager.AsyncManager; +/* */ import com.archive.framework.manager.factory.AsyncFactory; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.util.concurrent.atomic.AtomicInteger; +/* */ import javax.annotation.PostConstruct; +/* */ import org.apache.shiro.cache.Cache; +/* */ import org.apache.shiro.cache.CacheManager; +/* */ import org.apache.shiro.crypto.hash.Md5Hash; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.beans.factory.annotation.Value; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ public class PasswordService +/* */ { +/* */ @Autowired +/* */ private CacheManager cacheManager; +/* */ private Cache loginRecordCache; +/* */ @Value("${user.password.maxRetryCount}") +/* */ private String maxRetryCount; +/* */ +/* */ @PostConstruct +/* */ public void init() { +/* 39 */ this.loginRecordCache = this.cacheManager.getCache("loginRecordCache"); +/* */ } +/* */ +/* */ +/* */ public void validate(User user, String password) { +/* 44 */ String loginName = user.getLoginName(); +/* */ +/* 46 */ AtomicInteger retryCount = (AtomicInteger)this.loginRecordCache.get(loginName); +/* */ +/* 48 */ if (retryCount == null) { +/* */ +/* 50 */ retryCount = new AtomicInteger(0); +/* 51 */ this.loginRecordCache.put(loginName, retryCount); +/* */ } +/* 53 */ if (retryCount.incrementAndGet() > Integer.valueOf(this.maxRetryCount).intValue()) { +/* */ +/* 55 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginName, "Error", MessageUtils.message("user.password.retry.limit.exceed", new Object[] { this.maxRetryCount }), new Object[0])); +/* 56 */ throw new UserPasswordRetryLimitExceedException(Integer.valueOf(this.maxRetryCount).intValue()); +/* */ } +/* */ +/* 59 */ if (!matches(user, password)) { +/* */ +/* 61 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginName, "Error", MessageUtils.message("user.password.retry.limit.count", new Object[] { retryCount }), new Object[0])); +/* 62 */ this.loginRecordCache.put(loginName, retryCount); +/* 63 */ throw new UserPasswordNotMatchException(); +/* */ } +/* */ +/* */ +/* 67 */ clearLoginRecordCache(loginName); +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean matches(User user, String newPassword) { +/* 73 */ return user.getPassword().equals(encryptPassword(user.getLoginName(), newPassword, user.getSalt())); +/* */ } +/* */ +/* */ +/* */ public void clearLoginRecordCache(String loginName) { +/* 78 */ this.loginRecordCache.remove(loginName); +/* */ } +/* */ +/* */ +/* */ public String encryptPassword(String loginName, String password, String salt) { +/* 83 */ return (new Md5Hash(loginName + password + salt)).toHex(); +/* */ } +/* */ +/* */ +/* */ public static void main(String[] args) { +/* 88 */ System.out.println((new com.archive.framework.shiro.service.PasswordService()).encryptPassword("admin", "admin123", "111111")); +/* 89 */ System.out.println((new com.archive.framework.shiro.service.PasswordService()).encryptPassword("ry", "admin123", "222222")); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\service\PasswordService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/service/RegisterService.java b/src/main/java/com/archive/framework/shiro/service/RegisterService.java new file mode 100644 index 0000000..a98c33a --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/service/RegisterService.java @@ -0,0 +1,85 @@ +/* */ package com.archive.framework.shiro.service + +-INF.classes.com.archive.framework.shiro.service; +/* */ +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.MessageUtils; +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.framework.manager.AsyncManager; +/* */ import com.archive.framework.manager.factory.AsyncFactory; +/* */ import com.archive.project.system.user.domain.User; +/* */ import com.archive.project.system.user.service.IUserService; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Component; +/* */ import org.springframework.util.StringUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ public class RegisterService +/* */ { +/* */ @Autowired +/* */ private IUserService userService; +/* */ +/* */ public String register(User user) { +/* 33 */ String msg = "", loginName = user.getLoginName(), password = user.getPassword(); +/* */ +/* 35 */ if (!StringUtils.isEmpty(ServletUtils.getRequest().getAttribute("captcha"))) { +/* */ +/* 37 */ msg = "验证码错误"; +/* */ } +/* 39 */ else if (StringUtils.isEmpty(loginName)) { +/* */ +/* 41 */ msg = "用户名不能为空"; +/* */ } +/* 43 */ else if (StringUtils.isEmpty(password)) { +/* */ +/* 45 */ msg = "用户密码不能为空"; +/* */ } +/* 47 */ else if (password.length() < 5 || password +/* 48 */ .length() > 20) { +/* */ +/* 50 */ msg = "密码长度必须在5到20个字符之间"; +/* */ } +/* 52 */ else if (loginName.length() < 2 || loginName +/* 53 */ .length() > 20) { +/* */ +/* 55 */ msg = "账户长度必须在2到20个字符之间"; +/* */ } +/* 57 */ else if ("1".equals(this.userService.checkLoginNameUnique(loginName))) { +/* */ +/* 59 */ msg = "保存用户'" + loginName + "'失败,注册账号已存在"; +/* */ } +/* */ else { +/* */ +/* 63 */ user.setPwdUpdateDate(DateUtils.getNowDate()); +/* 64 */ user.setUserName(loginName); +/* 65 */ boolean regFlag = this.userService.registerUser(user); +/* 66 */ if (!regFlag) { +/* */ +/* 68 */ msg = "注册失败,请联系系统管理人员"; +/* */ } +/* */ else { +/* */ +/* 72 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginName, "Register", MessageUtils.message("user.register.success", new Object[0]), new Object[0])); +/* */ } +/* */ } +/* 75 */ return msg; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\service\RegisterService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/session/OnlineSessionDAO.java b/src/main/java/com/archive/framework/shiro/session/OnlineSessionDAO.java new file mode 100644 index 0000000..33eab97 --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/session/OnlineSessionDAO.java @@ -0,0 +1,134 @@ +/* */ package com.archive.framework.shiro.session + +-INF.classes.com.archive.framework.shiro.session; +/* */ +/* */ import com.archive.framework.manager.AsyncManager; +/* */ import com.archive.framework.manager.factory.AsyncFactory; +/* */ import com.archive.framework.shiro.session.OnlineSessionFactory; +/* */ import com.archive.project.monitor.online.domain.OnlineSession; +/* */ import com.archive.project.monitor.online.domain.UserOnline; +/* */ import com.archive.project.monitor.online.service.IUserOnlineService; +/* */ import java.io.Serializable; +/* */ import java.util.Date; +/* */ import org.apache.shiro.session.Session; +/* */ import org.apache.shiro.session.UnknownSessionException; +/* */ import org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.beans.factory.annotation.Value; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class OnlineSessionDAO +/* */ extends EnterpriseCacheSessionDAO +/* */ { +/* */ @Value("${shiro.session.dbSyncPeriod}") +/* */ private int dbSyncPeriod; +/* 32 */ private static final String LAST_SYNC_DB_TIMESTAMP = com.archive.framework.shiro.session.OnlineSessionDAO.class.getName() + "LAST_SYNC_DB_TIMESTAMP"; +/* */ +/* */ +/* */ +/* */ +/* */ @Autowired +/* */ private IUserOnlineService onlineService; +/* */ +/* */ +/* */ +/* */ @Autowired +/* */ private OnlineSessionFactory onlineSessionFactory; +/* */ +/* */ +/* */ +/* */ +/* */ public OnlineSessionDAO() {} +/* */ +/* */ +/* */ +/* */ +/* */ public OnlineSessionDAO(long expireTime) {} +/* */ +/* */ +/* */ +/* */ +/* */ protected Session doReadSession(Serializable sessionId) { +/* 59 */ UserOnline userOnline = this.onlineService.selectOnlineById(String.valueOf(sessionId)); +/* 60 */ if (userOnline == null) +/* */ { +/* 62 */ return null; +/* */ } +/* 64 */ return this.onlineSessionFactory.createSession(userOnline); +/* */ } +/* */ +/* */ +/* */ +/* */ public void update(Session session) throws UnknownSessionException { +/* 70 */ super.update(session); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void syncToDb(OnlineSession onlineSession) { +/* 78 */ Date lastSyncTimestamp = (Date)onlineSession.getAttribute(LAST_SYNC_DB_TIMESTAMP); +/* 79 */ if (lastSyncTimestamp != null) { +/* */ +/* 81 */ boolean needSync = true; +/* 82 */ long deltaTime = onlineSession.getLastAccessTime().getTime() - lastSyncTimestamp.getTime(); +/* 83 */ if (deltaTime < (this.dbSyncPeriod * 60 * 1000)) +/* */ { +/* */ +/* 86 */ needSync = false; +/* */ } +/* */ +/* 89 */ boolean isGuest = (onlineSession.getUserId() == null || onlineSession.getUserId().longValue() == 0L); +/* */ +/* */ +/* 92 */ if (!isGuest && onlineSession.isAttributeChanged()) +/* */ { +/* 94 */ needSync = true; +/* */ } +/* */ +/* 97 */ if (!needSync) { +/* */ return; +/* */ } +/* */ } +/* */ +/* */ +/* 103 */ onlineSession.setAttribute(LAST_SYNC_DB_TIMESTAMP, onlineSession.getLastAccessTime()); +/* */ +/* 105 */ if (onlineSession.isAttributeChanged()) +/* */ { +/* 107 */ onlineSession.resetAttributeChanged(); +/* */ } +/* 109 */ AsyncManager.me().execute(AsyncFactory.syncSessionToDb(onlineSession)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void doDelete(Session session) { +/* 118 */ OnlineSession onlineSession = (OnlineSession)session; +/* 119 */ if (null == onlineSession) { +/* */ return; +/* */ } +/* */ +/* 123 */ onlineSession.setStatus(OnlineSession.OnlineStatus.off_line); +/* 124 */ this.onlineService.deleteOnlineById(String.valueOf(onlineSession.getId())); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\session\OnlineSessionDAO.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/session/OnlineSessionFactory.java b/src/main/java/com/archive/framework/shiro/session/OnlineSessionFactory.java new file mode 100644 index 0000000..aeccda1 --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/session/OnlineSessionFactory.java @@ -0,0 +1,64 @@ +/* */ package com.archive.framework.shiro.session + +-INF.classes.com.archive.framework.shiro.session; +/* */ +/* */ import com.archive.common.utils.IpUtils; +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.project.monitor.online.domain.OnlineSession; +/* */ import com.archive.project.monitor.online.domain.UserOnline; +/* */ import eu.bitwalker.useragentutils.UserAgent; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import org.apache.shiro.session.Session; +/* */ import org.apache.shiro.session.mgt.SessionContext; +/* */ import org.apache.shiro.session.mgt.SessionFactory; +/* */ import org.apache.shiro.web.session.mgt.WebSessionContext; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ public class OnlineSessionFactory +/* */ implements SessionFactory +/* */ { +/* */ public Session createSession(UserOnline userOnline) { +/* 26 */ OnlineSession onlineSession = userOnline.getSession(); +/* 27 */ if (StringUtils.isNotNull(onlineSession) && onlineSession.getId() == null) +/* */ { +/* 29 */ onlineSession.setId(userOnline.getSessionId()); +/* */ } +/* 31 */ return (Session)userOnline.getSession(); +/* */ } +/* */ +/* */ +/* */ +/* */ public Session createSession(SessionContext initData) { +/* 37 */ OnlineSession session = new OnlineSession(); +/* 38 */ if (initData != null && initData instanceof WebSessionContext) { +/* */ +/* 40 */ WebSessionContext sessionContext = (WebSessionContext)initData; +/* 41 */ HttpServletRequest request = (HttpServletRequest)sessionContext.getServletRequest(); +/* 42 */ if (request != null) { +/* */ +/* 44 */ UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); +/* */ +/* 46 */ String os = userAgent.getOperatingSystem().getName(); +/* */ +/* 48 */ String browser = userAgent.getBrowser().getName(); +/* 49 */ session.setHost(IpUtils.getIpAddr(request)); +/* 50 */ session.setBrowser(browser); +/* 51 */ session.setOs(os); +/* */ } +/* */ } +/* 54 */ return (Session)session; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\session\OnlineSessionFactory.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/web/filter/LogoutFilter.java b/src/main/java/com/archive/framework/shiro/web/filter/LogoutFilter.java new file mode 100644 index 0000000..0ca12aa --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/web/filter/LogoutFilter.java @@ -0,0 +1,98 @@ +/* */ package com.archive.framework.shiro.web.filter + +-INF.classes.com.archive.framework.shiro.web.filter; +/* */ +/* */ import com.archive.common.utils.MessageUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import com.archive.framework.manager.AsyncManager; +/* */ import com.archive.framework.manager.factory.AsyncFactory; +/* */ import com.archive.project.monitor.online.service.UserOnlineServiceImpl; +/* */ import com.archive.project.system.user.domain.User; +/* */ import javax.servlet.ServletRequest; +/* */ import javax.servlet.ServletResponse; +/* */ import org.apache.shiro.session.SessionException; +/* */ import org.apache.shiro.subject.Subject; +/* */ import org.apache.shiro.web.filter.authc.LogoutFilter; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class LogoutFilter +/* */ extends LogoutFilter +/* */ { +/* 26 */ private static final Logger log = LoggerFactory.getLogger(com.archive.framework.shiro.web.filter.LogoutFilter.class); +/* */ +/* */ +/* */ +/* */ private String loginUrl; +/* */ +/* */ +/* */ +/* */ public String getLoginUrl() { +/* 35 */ return this.loginUrl; +/* */ } +/* */ +/* */ +/* */ public void setLoginUrl(String loginUrl) { +/* 40 */ this.loginUrl = loginUrl; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception { +/* */ try { +/* 48 */ Subject subject = getSubject(request, response); +/* 49 */ String redirectUrl = getRedirectUrl(request, response, subject); +/* */ +/* */ try { +/* 52 */ User user = ShiroUtils.getSysUser(); +/* 53 */ if (StringUtils.isNotNull(user)) { +/* */ +/* 55 */ String loginName = user.getLoginName(); +/* */ +/* 57 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginName, "Logout", MessageUtils.message("user.logout.success", new Object[0]), new Object[0])); +/* */ +/* 59 */ ((UserOnlineServiceImpl)SpringUtils.getBean(UserOnlineServiceImpl.class)).removeUserCache(loginName, ShiroUtils.getSessionId()); +/* */ } +/* */ +/* 62 */ subject.logout(); +/* */ } +/* 64 */ catch (SessionException ise) { +/* */ +/* 66 */ log.error("logout fail.", (Throwable)ise); +/* */ } +/* 68 */ issueRedirect(request, response, redirectUrl); +/* */ } +/* 70 */ catch (Exception e) { +/* */ +/* 72 */ log.error("Encountered session exception during logout. This can generally safely be ignored.", e); +/* */ } +/* 74 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected String getRedirectUrl(ServletRequest request, ServletResponse response, Subject subject) { +/* 83 */ String url = getLoginUrl(); +/* 84 */ if (StringUtils.isNotEmpty(url)) +/* */ { +/* 86 */ return url; +/* */ } +/* 88 */ return super.getRedirectUrl(request, response, subject); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\filter\LogoutFilter.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/web/filter/captcha/CaptchaValidateFilter.java b/src/main/java/com/archive/framework/shiro/web/filter/captcha/CaptchaValidateFilter.java new file mode 100644 index 0000000..ab35052 --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/web/filter/captcha/CaptchaValidateFilter.java @@ -0,0 +1,85 @@ +/* */ package com.archive.framework.shiro.web.filter.captcha; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import javax.servlet.ServletRequest; +/* */ import javax.servlet.ServletResponse; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import org.apache.shiro.web.filter.AccessControlFilter; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CaptchaValidateFilter +/* */ extends AccessControlFilter +/* */ { +/* */ private boolean captchaEnabled = true; +/* 27 */ private String captchaType = "math"; +/* */ +/* */ +/* */ public void setCaptchaEnabled(boolean captchaEnabled) { +/* 31 */ this.captchaEnabled = captchaEnabled; +/* */ } +/* */ +/* */ +/* */ public void setCaptchaType(String captchaType) { +/* 36 */ this.captchaType = captchaType; +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception { +/* 42 */ request.setAttribute("captchaEnabled", Boolean.valueOf(this.captchaEnabled)); +/* 43 */ request.setAttribute("captchaType", this.captchaType); +/* 44 */ return super.onPreHandle(request, response, mappedValue); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception { +/* 51 */ HttpServletRequest httpServletRequest = (HttpServletRequest)request; +/* */ +/* 53 */ if (!this.captchaEnabled || !"post".equals(httpServletRequest.getMethod().toLowerCase())) +/* */ { +/* 55 */ return true; +/* */ } +/* 57 */ return validateResponse(httpServletRequest, httpServletRequest.getParameter("validateCode")); +/* */ } +/* */ +/* */ +/* */ public boolean validateResponse(HttpServletRequest request, String validateCode) { +/* 62 */ Object obj = ShiroUtils.getSession().getAttribute("KAPTCHA_SESSION_KEY"); +/* 63 */ String code = String.valueOf((obj != null) ? obj : ""); +/* */ +/* 65 */ request.getSession().removeAttribute("KAPTCHA_SESSION_KEY"); +/* 66 */ if (StringUtils.isEmpty(validateCode) || !validateCode.equalsIgnoreCase(code)) +/* */ { +/* 68 */ return false; +/* */ } +/* 70 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { +/* 76 */ request.setAttribute("captcha", "captchaError"); +/* 77 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\filter\captcha\CaptchaValidateFilter.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/web/filter/kickout/KickoutSessionFilter.java b/src/main/java/com/archive/framework/shiro/web/filter/kickout/KickoutSessionFilter.java new file mode 100644 index 0000000..3bbe200 --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/web/filter/kickout/KickoutSessionFilter.java @@ -0,0 +1,194 @@ +/* */ package com.archive.framework.shiro.web.filter.kickout + +-INF.classes.com.archive.framework.shiro.web.filter.kickout; +/* */ +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.system.user.domain.User; +/* */ import com.fasterxml.jackson.databind.ObjectMapper; +/* */ import java.io.IOException; +/* */ import java.io.Serializable; +/* */ import java.util.ArrayDeque; +/* */ import java.util.Deque; +/* */ import javax.servlet.ServletRequest; +/* */ import javax.servlet.ServletResponse; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import org.apache.shiro.cache.Cache; +/* */ import org.apache.shiro.cache.CacheManager; +/* */ import org.apache.shiro.session.Session; +/* */ import org.apache.shiro.session.mgt.DefaultSessionKey; +/* */ import org.apache.shiro.session.mgt.SessionKey; +/* */ import org.apache.shiro.session.mgt.SessionManager; +/* */ import org.apache.shiro.subject.Subject; +/* */ import org.apache.shiro.web.filter.AccessControlFilter; +/* */ import org.apache.shiro.web.util.WebUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class KickoutSessionFilter +/* */ extends AccessControlFilter +/* */ { +/* 33 */ private static final ObjectMapper objectMapper = new ObjectMapper(); +/* */ +/* */ +/* */ +/* */ +/* 38 */ private int maxSession = -1; +/* */ +/* */ +/* */ +/* */ +/* 43 */ private Boolean kickoutAfter = Boolean.valueOf(false); +/* */ +/* */ +/* */ private String kickoutUrl; +/* */ +/* */ +/* */ private SessionManager sessionManager; +/* */ +/* */ +/* */ private Cache> cache; +/* */ +/* */ +/* */ +/* */ protected boolean isAccessAllowed(ServletRequest servletRequest, ServletResponse servletResponse, Object o) throws Exception { +/* 57 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { +/* 63 */ Subject subject = getSubject(request, response); +/* 64 */ if ((!subject.isAuthenticated() && !subject.isRemembered()) || this.maxSession == -1) +/* */ { +/* */ +/* 67 */ return true; +/* */ } +/* */ +/* */ try { +/* 71 */ Session session = subject.getSession(); +/* */ +/* 73 */ User user = ShiroUtils.getSysUser(); +/* 74 */ String loginName = user.getLoginName(); +/* 75 */ Serializable sessionId = session.getId(); +/* */ +/* */ +/* 78 */ Deque deque = (Deque)this.cache.get(loginName); +/* 79 */ if (deque == null) +/* */ { +/* */ +/* 82 */ deque = new ArrayDeque<>(); +/* */ } +/* */ +/* */ +/* 86 */ if (!deque.contains(sessionId) && session.getAttribute("kickout") == null) { +/* */ +/* */ +/* 89 */ deque.push(sessionId); +/* */ +/* 91 */ this.cache.put(loginName, deque); +/* */ } +/* */ +/* */ +/* 95 */ while (deque.size() > this.maxSession) { +/* */ +/* 97 */ Serializable kickoutSessionId = null; +/* */ +/* 99 */ if (this.kickoutAfter.booleanValue()) { +/* */ +/* */ +/* 102 */ kickoutSessionId = deque.removeFirst(); +/* */ +/* */ } +/* */ else { +/* */ +/* 107 */ kickoutSessionId = deque.removeLast(); +/* */ } +/* */ +/* 110 */ this.cache.put(loginName, deque); +/* */ +/* */ +/* */ +/* */ try { +/* 115 */ Session kickoutSession = this.sessionManager.getSession((SessionKey)new DefaultSessionKey(kickoutSessionId)); +/* 116 */ if (null != kickoutSession) +/* */ { +/* */ +/* 119 */ kickoutSession.setAttribute("kickout", Boolean.valueOf(true)); +/* */ } +/* */ } +/* 122 */ catch (Exception exception) {} +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 129 */ if ((Boolean)session.getAttribute("kickout") != null && ((Boolean)session.getAttribute("kickout")).booleanValue() == true) { +/* */ +/* */ +/* 132 */ subject.logout(); +/* 133 */ saveRequest(request); +/* 134 */ return isAjaxResponse(request, response); +/* */ } +/* 136 */ return true; +/* */ } +/* 138 */ catch (Exception e) { +/* */ +/* 140 */ return isAjaxResponse(request, response); +/* */ } +/* */ } +/* */ +/* */ +/* */ private boolean isAjaxResponse(ServletRequest request, ServletResponse response) throws IOException { +/* 146 */ HttpServletRequest req = (HttpServletRequest)request; +/* 147 */ HttpServletResponse res = (HttpServletResponse)response; +/* 148 */ if (ServletUtils.isAjaxRequest(req)) { +/* */ +/* 150 */ AjaxResult ajaxResult = AjaxResult.error("您已在别处登录,请您修改密码或重新登录"); +/* 151 */ ServletUtils.renderString(res, objectMapper.writeValueAsString(ajaxResult)); +/* */ } +/* */ else { +/* */ +/* 155 */ WebUtils.issueRedirect(request, response, this.kickoutUrl); +/* */ } +/* 157 */ return false; +/* */ } +/* */ +/* */ +/* */ public void setMaxSession(int maxSession) { +/* 162 */ this.maxSession = maxSession; +/* */ } +/* */ +/* */ +/* */ public void setKickoutAfter(boolean kickoutAfter) { +/* 167 */ this.kickoutAfter = Boolean.valueOf(kickoutAfter); +/* */ } +/* */ +/* */ +/* */ public void setKickoutUrl(String kickoutUrl) { +/* 172 */ this.kickoutUrl = kickoutUrl; +/* */ } +/* */ +/* */ +/* */ public void setSessionManager(SessionManager sessionManager) { +/* 177 */ this.sessionManager = sessionManager; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setCacheManager(CacheManager cacheManager) { +/* 184 */ this.cache = cacheManager.getCache("sys-userCache"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\filter\kickout\KickoutSessionFilter.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/web/filter/online/OnlineSessionFilter.java b/src/main/java/com/archive/framework/shiro/web/filter/online/OnlineSessionFilter.java new file mode 100644 index 0000000..910f8da --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/web/filter/online/OnlineSessionFilter.java @@ -0,0 +1,106 @@ +/* */ package com.archive.framework.shiro.web.filter.online + +-INF.classes.com.archive.framework.shiro.web.filter.online; +/* */ +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.shiro.session.OnlineSessionDAO; +/* */ import com.archive.project.monitor.online.domain.OnlineSession; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.io.IOException; +/* */ import javax.servlet.ServletRequest; +/* */ import javax.servlet.ServletResponse; +/* */ import org.apache.shiro.session.Session; +/* */ import org.apache.shiro.subject.Subject; +/* */ import org.apache.shiro.web.filter.AccessControlFilter; +/* */ import org.apache.shiro.web.util.WebUtils; +/* */ import org.springframework.beans.factory.annotation.Value; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class OnlineSessionFilter +/* */ extends AccessControlFilter +/* */ { +/* */ @Value("${shiro.user.loginUrl}") +/* */ private String loginUrl; +/* */ private OnlineSessionDAO onlineSessionDAO; +/* */ +/* */ protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception { +/* 39 */ Subject subject = getSubject(request, response); +/* 40 */ if (subject == null || subject.getSession() == null) +/* */ { +/* 42 */ return true; +/* */ } +/* 44 */ Session session = this.onlineSessionDAO.readSession(subject.getSession().getId()); +/* 45 */ if (session != null && session instanceof OnlineSession) { +/* */ +/* 47 */ OnlineSession onlineSession = (OnlineSession)session; +/* 48 */ request.setAttribute("online_session", onlineSession); +/* */ +/* 50 */ boolean isGuest = (onlineSession.getUserId() == null || onlineSession.getUserId().longValue() == 0L); +/* 51 */ if (isGuest == true) { +/* */ +/* 53 */ User user = ShiroUtils.getSysUser(); +/* 54 */ if (user != null) { +/* */ +/* 56 */ onlineSession.setUserId(user.getUserId()); +/* 57 */ onlineSession.setLoginName(user.getLoginName()); +/* 58 */ onlineSession.setAvatar(user.getAvatar()); +/* 59 */ onlineSession.setDeptName(user.getDept().getDeptName()); +/* 60 */ onlineSession.markAttributeChanged(); +/* */ } +/* */ } +/* */ +/* 64 */ if (onlineSession.getStatus() == OnlineSession.OnlineStatus.off_line) +/* */ { +/* 66 */ return false; +/* */ } +/* */ } +/* 69 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { +/* 78 */ Subject subject = getSubject(request, response); +/* 79 */ if (subject != null) +/* */ { +/* 81 */ subject.logout(); +/* */ } +/* 83 */ saveRequestAndRedirectToLogin(request, response); +/* 84 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException { +/* 91 */ WebUtils.issueRedirect(request, response, this.loginUrl); +/* */ } +/* */ +/* */ +/* */ public void setOnlineSessionDAO(OnlineSessionDAO onlineSessionDAO) { +/* 96 */ this.onlineSessionDAO = onlineSessionDAO; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\filter\online\OnlineSessionFilter.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/web/filter/sync/SyncOnlineSessionFilter.java b/src/main/java/com/archive/framework/shiro/web/filter/sync/SyncOnlineSessionFilter.java new file mode 100644 index 0000000..fea622d --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/web/filter/sync/SyncOnlineSessionFilter.java @@ -0,0 +1,45 @@ +/* */ package com.archive.framework.shiro.web.filter.sync; +/* */ +/* */ import com.archive.framework.shiro.session.OnlineSessionDAO; +/* */ import com.archive.project.monitor.online.domain.OnlineSession; +/* */ import javax.servlet.ServletRequest; +/* */ import javax.servlet.ServletResponse; +/* */ import org.apache.shiro.web.filter.PathMatchingFilter; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SyncOnlineSessionFilter +/* */ extends PathMatchingFilter +/* */ { +/* */ private OnlineSessionDAO onlineSessionDAO; +/* */ +/* */ protected boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception { +/* 25 */ OnlineSession session = (OnlineSession)request.getAttribute("online_session"); +/* */ +/* */ +/* 28 */ if (session != null && session.getUserId() != null && session.getStopTimestamp() == null) +/* */ { +/* 30 */ this.onlineSessionDAO.syncToDb(session); +/* */ } +/* 32 */ return true; +/* */ } +/* */ +/* */ +/* */ public void setOnlineSessionDAO(OnlineSessionDAO onlineSessionDAO) { +/* 37 */ this.onlineSessionDAO = onlineSessionDAO; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\filter\sync\SyncOnlineSessionFilter.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/web/session/OnlineWebSessionManager.java b/src/main/java/com/archive/framework/shiro/web/session/OnlineWebSessionManager.java new file mode 100644 index 0000000..978e7b1 --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/web/session/OnlineWebSessionManager.java @@ -0,0 +1,183 @@ +/* */ package com.archive.framework.shiro.web.session + +-INF.classes.com.archive.framework.shiro.web.session; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.bean.BeanUtils; +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import com.archive.project.monitor.online.domain.OnlineSession; +/* */ import com.archive.project.monitor.online.domain.UserOnline; +/* */ import com.archive.project.monitor.online.service.UserOnlineServiceImpl; +/* */ import java.util.ArrayList; +/* */ import java.util.Collection; +/* */ import java.util.Date; +/* */ import java.util.List; +/* */ import org.apache.commons.lang3.time.DateUtils; +/* */ import org.apache.shiro.session.InvalidSessionException; +/* */ import org.apache.shiro.session.Session; +/* */ import org.apache.shiro.session.mgt.DefaultSessionKey; +/* */ import org.apache.shiro.session.mgt.SessionKey; +/* */ import org.apache.shiro.web.session.mgt.DefaultWebSessionManager; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class OnlineWebSessionManager +/* */ extends DefaultWebSessionManager +/* */ { +/* 31 */ private static final Logger log = LoggerFactory.getLogger(com.archive.framework.shiro.web.session.OnlineWebSessionManager.class); +/* */ +/* */ +/* */ +/* */ public void setAttribute(SessionKey sessionKey, Object attributeKey, Object value) throws InvalidSessionException { +/* 36 */ super.setAttribute(sessionKey, attributeKey, value); +/* 37 */ if (value != null && needMarkAttributeChanged(attributeKey)) { +/* */ +/* 39 */ OnlineSession session = getOnlineSession(sessionKey); +/* 40 */ session.markAttributeChanged(); +/* */ } +/* */ } +/* */ +/* */ +/* */ private boolean needMarkAttributeChanged(Object attributeKey) { +/* 46 */ if (attributeKey == null) +/* */ { +/* 48 */ return false; +/* */ } +/* 50 */ String attributeKeyStr = attributeKey.toString(); +/* */ +/* 52 */ if (attributeKeyStr.startsWith("org.springframework")) +/* */ { +/* 54 */ return false; +/* */ } +/* 56 */ if (attributeKeyStr.startsWith("javax.servlet")) +/* */ { +/* 58 */ return false; +/* */ } +/* 60 */ if (attributeKeyStr.equals("username")) +/* */ { +/* 62 */ return false; +/* */ } +/* 64 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ public Object removeAttribute(SessionKey sessionKey, Object attributeKey) throws InvalidSessionException { +/* 70 */ Object removed = super.removeAttribute(sessionKey, attributeKey); +/* 71 */ if (removed != null) { +/* */ +/* 73 */ OnlineSession s = getOnlineSession(sessionKey); +/* 74 */ s.markAttributeChanged(); +/* */ } +/* */ +/* 77 */ return removed; +/* */ } +/* */ +/* */ +/* */ public OnlineSession getOnlineSession(SessionKey sessionKey) { +/* 82 */ OnlineSession session = null; +/* 83 */ Object obj = doGetSession(sessionKey); +/* 84 */ if (StringUtils.isNotNull(obj)) { +/* */ +/* 86 */ session = new OnlineSession(); +/* 87 */ BeanUtils.copyBeanProp(session, obj); +/* */ } +/* 89 */ return session; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void validateSessions() { +/* 98 */ if (log.isInfoEnabled()) +/* */ { +/* 100 */ log.info("invalidation sessions..."); +/* */ } +/* */ +/* 103 */ int invalidCount = 0; +/* */ +/* 105 */ int timeout = (int)getGlobalSessionTimeout(); +/* 106 */ if (timeout < 0) { +/* */ return; +/* */ } +/* */ +/* */ +/* 111 */ Date expiredDate = DateUtils.addMilliseconds(new Date(), 0 - timeout); +/* 112 */ UserOnlineServiceImpl userOnlineService = (UserOnlineServiceImpl)SpringUtils.getBean(UserOnlineServiceImpl.class); +/* 113 */ List userOnlineList = userOnlineService.selectOnlineByExpired(expiredDate); +/* */ +/* 115 */ List needOfflineIdList = new ArrayList<>(); +/* 116 */ for (UserOnline userOnline : userOnlineList) { +/* */ +/* */ +/* */ try { +/* 120 */ DefaultSessionKey defaultSessionKey = new DefaultSessionKey(userOnline.getSessionId()); +/* 121 */ Session session = retrieveSession((SessionKey)defaultSessionKey); +/* 122 */ if (session != null) +/* */ { +/* 124 */ throw new InvalidSessionException(); +/* */ } +/* */ } +/* 127 */ catch (InvalidSessionException e) { +/* */ +/* 129 */ if (log.isDebugEnabled()) { +/* */ +/* 131 */ boolean expired = e instanceof org.apache.shiro.session.ExpiredSessionException; +/* 132 */ String msg = "Invalidated session with id [" + userOnline.getSessionId() + "]" + (expired ? " (expired)" : " (stopped)"); +/* */ +/* 134 */ log.debug(msg); +/* */ } +/* 136 */ invalidCount++; +/* 137 */ needOfflineIdList.add(userOnline.getSessionId()); +/* 138 */ userOnlineService.removeUserCache(userOnline.getLoginName(), userOnline.getSessionId()); +/* */ } +/* */ } +/* */ +/* 142 */ if (needOfflineIdList.size() > 0) { +/* */ +/* */ try { +/* */ +/* 146 */ userOnlineService.batchDeleteOnline(needOfflineIdList); +/* */ } +/* 148 */ catch (Exception e) { +/* */ +/* 150 */ log.error("batch delete db session error.", e); +/* */ } +/* */ } +/* */ +/* 154 */ if (log.isInfoEnabled()) { +/* */ +/* 156 */ String msg = "Finished invalidation session."; +/* 157 */ if (invalidCount > 0) { +/* */ +/* 159 */ msg = msg + " [" + invalidCount + "] sessions were stopped."; +/* */ } +/* */ else { +/* */ +/* 163 */ msg = msg + " No sessions were stopped."; +/* */ } +/* 165 */ log.info(msg); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected Collection getActiveSessions() { +/* 173 */ throw new UnsupportedOperationException("getActiveSessions method not supported"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\session\OnlineWebSessionManager.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/web/session/SpringSessionValidationScheduler$1.java b/src/main/java/com/archive/framework/shiro/web/session/SpringSessionValidationScheduler$1.java new file mode 100644 index 0000000..70c1e42 --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/web/session/SpringSessionValidationScheduler$1.java @@ -0,0 +1,104 @@ +/* */ package extracted.BOOT-INF.classes.com.archive.framework.shiro.web.session; +/* */ +/* */ import com.archive.framework.shiro.web.session.SpringSessionValidationScheduler; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class null +/* */ implements Runnable +/* */ { +/* */ public void run() { +/* 93 */ if (SpringSessionValidationScheduler.access$000(SpringSessionValidationScheduler.this)) +/* */ { +/* 95 */ SpringSessionValidationScheduler.access$100(SpringSessionValidationScheduler.this).validateSessions(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\session\SpringSessionValidationScheduler$1.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/shiro/web/session/SpringSessionValidationScheduler.java b/src/main/java/com/archive/framework/shiro/web/session/SpringSessionValidationScheduler.java new file mode 100644 index 0000000..ad99d90 --- /dev/null +++ b/src/main/java/com/archive/framework/shiro/web/session/SpringSessionValidationScheduler.java @@ -0,0 +1,139 @@ +/* */ package com.archive.framework.shiro.web.session + +-INF.classes.com.archive.framework.shiro.web.session; +/* */ +/* */ import com.archive.common.utils.Threads; +/* */ import java.util.concurrent.ScheduledExecutorService; +/* */ import java.util.concurrent.TimeUnit; +/* */ import org.apache.shiro.session.mgt.SessionValidationScheduler; +/* */ import org.apache.shiro.session.mgt.ValidatingSessionManager; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.beans.factory.annotation.Qualifier; +/* */ import org.springframework.beans.factory.annotation.Value; +/* */ import org.springframework.context.annotation.Lazy; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component +/* */ public class SpringSessionValidationScheduler +/* */ implements SessionValidationScheduler +/* */ { +/* 25 */ private static final Logger log = LoggerFactory.getLogger(com.archive.framework.shiro.web.session.SpringSessionValidationScheduler.class); +/* */ +/* */ +/* */ +/* */ public static final long DEFAULT_SESSION_VALIDATION_INTERVAL = 3600000L; +/* */ +/* */ +/* */ +/* */ @Autowired +/* */ @Qualifier("scheduledExecutorService") +/* */ private ScheduledExecutorService executorService; +/* */ +/* */ +/* */ private volatile boolean enabled = false; +/* */ +/* */ +/* */ @Autowired +/* */ @Qualifier("sessionManager") +/* */ @Lazy +/* */ private ValidatingSessionManager sessionManager; +/* */ +/* */ +/* */ @Value("${shiro.session.validationInterval}") +/* */ private long sessionValidationInterval; +/* */ +/* */ +/* */ +/* */ public boolean isEnabled() { +/* 53 */ return this.enabled; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setSessionValidationInterval(long sessionValidationInterval) { +/* 68 */ this.sessionValidationInterval = sessionValidationInterval; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void enableSessionValidation() { +/* 78 */ this.enabled = true; +/* */ +/* 80 */ if (log.isDebugEnabled()) +/* */ { +/* 82 */ log.debug("Scheduling session validation job using Spring Scheduler with session validation interval of [" + this.sessionValidationInterval + "]ms..."); +/* */ } +/* */ +/* */ +/* */ +/* */ try { +/* 88 */ this.executorService.scheduleAtFixedRate((Runnable)new Object(this), 1000L, this.sessionValidationInterval * 60L * 1000L, TimeUnit.MILLISECONDS); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 100 */ this.enabled = true; +/* */ +/* 102 */ if (log.isDebugEnabled()) +/* */ { +/* 104 */ log.debug("Session validation job successfully scheduled with Spring Scheduler."); +/* */ +/* */ } +/* */ } +/* 108 */ catch (Exception e) { +/* */ +/* 110 */ if (log.isErrorEnabled()) +/* */ { +/* 112 */ log.error("Error starting the Spring Scheduler session validation job. Session validation may not occur.", e); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void disableSessionValidation() { +/* 120 */ if (log.isDebugEnabled()) +/* */ { +/* 122 */ log.debug("Stopping Spring Scheduler session validation job..."); +/* */ } +/* */ +/* 125 */ if (this.enabled) +/* */ { +/* 127 */ Threads.shutdownAndAwaitTermination(this.executorService); +/* */ } +/* 129 */ this.enabled = false; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\session\SpringSessionValidationScheduler.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/controller/BaseController$1.java b/src/main/java/com/archive/framework/web/controller/BaseController$1.java new file mode 100644 index 0000000..65178ff --- /dev/null +++ b/src/main/java/com/archive/framework/web/controller/BaseController$1.java @@ -0,0 +1,48 @@ +/* */ package extracted.BOOT-INF.classes.com.archive.framework.web.controller; +/* */ +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import java.beans.PropertyEditorSupport; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class null +/* */ extends PropertyEditorSupport +/* */ { +/* */ public void setAsText(String text) { +/* 40 */ setValue(DateUtils.parseDate(text)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\controller\BaseController$1.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/controller/BaseController.java b/src/main/java/com/archive/framework/web/controller/BaseController.java new file mode 100644 index 0000000..3e78cf0 --- /dev/null +++ b/src/main/java/com/archive/framework/web/controller/BaseController.java @@ -0,0 +1,185 @@ +/* */ package com.archive.framework.web.controller + +-INF.classes.com.archive.framework.web.controller; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.sql.SqlUtil; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.PageDomain; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.framework.web.page.TableSupport; +/* */ import com.archive.project.system.user.domain.User; +/* */ import com.github.pagehelper.PageHelper; +/* */ import com.github.pagehelper.PageInfo; +/* */ import java.beans.PropertyEditor; +/* */ import java.util.Date; +/* */ import java.util.List; +/* */ import org.springframework.web.bind.WebDataBinder; +/* */ import org.springframework.web.bind.annotation.InitBinder; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BaseController +/* */ { +/* */ @InitBinder +/* */ public void initBinder(WebDataBinder binder) { +/* 35 */ binder.registerCustomEditor(Date.class, (PropertyEditor)new Object(this)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void startPage() { +/* 50 */ PageDomain pageDomain = TableSupport.buildPageRequest(); +/* 51 */ Integer pageNum = pageDomain.getPageNum(); +/* 52 */ Integer pageSize = pageDomain.getPageSize(); +/* 53 */ if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { +/* */ +/* 55 */ String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); +/* 56 */ PageHelper.startPage(pageNum.intValue(), pageSize.intValue(), orderBy); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void startOrderBy() { +/* 65 */ PageDomain pageDomain = TableSupport.buildPageRequest(); +/* 66 */ if (StringUtils.isNotEmpty(pageDomain.getOrderBy())) { +/* */ +/* 68 */ String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); +/* 69 */ PageHelper.orderBy(orderBy); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected TableDataInfo getDataTable(List list) { +/* 79 */ TableDataInfo rspData = new TableDataInfo(); +/* 80 */ if (list != null) { +/* 81 */ rspData.setCode(0); +/* 82 */ rspData.setRows(list); +/* 83 */ rspData.setTotal((new PageInfo(list)).getTotal()); +/* */ } +/* 85 */ return rspData; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected AjaxResult toAjax(int rows) { +/* 96 */ return (rows > 0) ? success() : error(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected AjaxResult toAjax(boolean result) { +/* 107 */ return result ? success() : error(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public AjaxResult success() { +/* 115 */ return AjaxResult.success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public AjaxResult error() { +/* 123 */ return AjaxResult.error(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public AjaxResult success(String message) { +/* 131 */ return AjaxResult.success(message); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public AjaxResult error(String message) { +/* 139 */ return AjaxResult.error(message); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public AjaxResult error(AjaxResult.Type type, String message) { +/* 147 */ return new AjaxResult(type, message); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String redirect(String url) { +/* 155 */ return StringUtils.format("redirect:{}", new Object[] { url }); +/* */ } +/* */ +/* */ +/* */ public User getSysUser() { +/* 160 */ return ShiroUtils.getSysUser(); +/* */ } +/* */ +/* */ +/* */ public void setSysUser(User user) { +/* 165 */ ShiroUtils.setSysUser(user); +/* */ } +/* */ +/* */ +/* */ public Long getUserId() { +/* 170 */ return getSysUser().getUserId(); +/* */ } +/* */ +/* */ +/* */ public String getLoginName() { +/* 175 */ return getSysUser().getLoginName(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\controller\BaseController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/domain/AjaxResult$Type.java b/src/main/java/com/archive/framework/web/domain/AjaxResult$Type.java new file mode 100644 index 0000000..2a7b0b8 --- /dev/null +++ b/src/main/java/com/archive/framework/web/domain/AjaxResult$Type.java @@ -0,0 +1,54 @@ +/* */ package com.archive.framework.web.domain + +-INF.classes.com.archive.framework.web.domain; +/* */ +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum Type +/* */ { +/* 30 */ SUCCESS(0), +/* */ +/* 32 */ WARN(301), +/* */ +/* 34 */ ERROR(500); +/* */ +/* */ private final int value; +/* */ +/* */ Type(int value) { +/* 39 */ this.value = value; +/* */ } +/* */ +/* */ +/* */ public int value() { +/* 44 */ return this.value; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\domain\AjaxResult$Type.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/domain/AjaxResult.java b/src/main/java/com/archive/framework/web/domain/AjaxResult.java new file mode 100644 index 0000000..4792c41 --- /dev/null +++ b/src/main/java/com/archive/framework/web/domain/AjaxResult.java @@ -0,0 +1,204 @@ +/* */ package com.archive.framework.web.domain + +-INF.classes.com.archive.framework.web.domain; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import java.util.HashMap; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AjaxResult +/* */ extends HashMap +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ public static final String CODE_TAG = "code"; +/* */ public static final String MSG_TAG = "msg"; +/* */ public static final String DATA_TAG = "data"; +/* */ +/* */ public AjaxResult() {} +/* */ +/* */ public AjaxResult(Type type, String msg) { +/* 63 */ super.put("code", Integer.valueOf(Type.access$000(type))); +/* 64 */ super.put("msg", msg); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public AjaxResult(Type type, String msg, Object data) { +/* 76 */ super.put("code", Integer.valueOf(Type.access$000(type))); +/* 77 */ super.put("msg", msg); +/* 78 */ if (StringUtils.isNotNull(data)) +/* */ { +/* 80 */ super.put("data", data); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public com.archive.framework.web.domain.AjaxResult put(String key, Object value) { +/* 94 */ super.put(key, value); +/* 95 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static com.archive.framework.web.domain.AjaxResult success() { +/* 105 */ return success("操作成功"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static com.archive.framework.web.domain.AjaxResult success(Object data) { +/* 115 */ return success("操作成功", data); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static com.archive.framework.web.domain.AjaxResult success(String msg) { +/* 126 */ return success(msg, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static com.archive.framework.web.domain.AjaxResult success(String msg, Object data) { +/* 138 */ return new com.archive.framework.web.domain.AjaxResult(Type.SUCCESS, msg, data); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static com.archive.framework.web.domain.AjaxResult warn(String msg) { +/* 149 */ return warn(msg, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static com.archive.framework.web.domain.AjaxResult warn(String msg, Object data) { +/* 161 */ return new com.archive.framework.web.domain.AjaxResult(Type.WARN, msg, data); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static com.archive.framework.web.domain.AjaxResult error() { +/* 171 */ return error("操作失败"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static com.archive.framework.web.domain.AjaxResult error(String msg) { +/* 182 */ return error(msg, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static com.archive.framework.web.domain.AjaxResult error(String msg, Object data) { +/* 194 */ return new com.archive.framework.web.domain.AjaxResult(Type.ERROR, msg, data); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\domain\AjaxResult.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/domain/BaseEntity.java b/src/main/java/com/archive/framework/web/domain/BaseEntity.java new file mode 100644 index 0000000..06d9dc2 --- /dev/null +++ b/src/main/java/com/archive/framework/web/domain/BaseEntity.java @@ -0,0 +1,122 @@ +/* */ package com.archive.framework.web.domain + +-INF.classes.com.archive.framework.web.domain; +/* */ +/* */ import com.fasterxml.jackson.annotation.JsonFormat; +/* */ import com.google.common.collect.Maps; +/* */ import java.io.Serializable; +/* */ import java.util.Date; +/* */ import java.util.Map; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BaseEntity +/* */ implements Serializable +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private String searchValue; +/* */ private String createBy; +/* */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") +/* */ private Date createTime; +/* */ private String updateBy; +/* */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") +/* */ private Date updateTime; +/* */ private String remark; +/* */ private Map params; +/* */ +/* */ public String getSearchValue() { +/* 43 */ return this.searchValue; +/* */ } +/* */ +/* */ +/* */ public void setSearchValue(String searchValue) { +/* 48 */ this.searchValue = searchValue; +/* */ } +/* */ +/* */ +/* */ public String getCreateBy() { +/* 53 */ return this.createBy; +/* */ } +/* */ +/* */ +/* */ public void setCreateBy(String createBy) { +/* 58 */ this.createBy = createBy; +/* */ } +/* */ +/* */ +/* */ public Date getCreateTime() { +/* 63 */ return this.createTime; +/* */ } +/* */ +/* */ +/* */ public void setCreateTime(Date createTime) { +/* 68 */ this.createTime = createTime; +/* */ } +/* */ +/* */ +/* */ public String getUpdateBy() { +/* 73 */ return this.updateBy; +/* */ } +/* */ +/* */ +/* */ public void setUpdateBy(String updateBy) { +/* 78 */ this.updateBy = updateBy; +/* */ } +/* */ +/* */ +/* */ public Date getUpdateTime() { +/* 83 */ return this.updateTime; +/* */ } +/* */ +/* */ +/* */ public void setUpdateTime(Date updateTime) { +/* 88 */ this.updateTime = updateTime; +/* */ } +/* */ +/* */ +/* */ public String getRemark() { +/* 93 */ return this.remark; +/* */ } +/* */ +/* */ +/* */ public void setRemark(String remark) { +/* 98 */ this.remark = remark; +/* */ } +/* */ +/* */ +/* */ public Map getParams() { +/* 103 */ if (this.params == null) +/* */ { +/* 105 */ this.params = Maps.newHashMap(); +/* */ } +/* 107 */ return this.params; +/* */ } +/* */ +/* */ +/* */ public void setParams(Map params) { +/* 112 */ this.params = params; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\domain\BaseEntity.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/domain/CxSelect.java b/src/main/java/com/archive/framework/web/domain/CxSelect.java new file mode 100644 index 0000000..94ddad7 --- /dev/null +++ b/src/main/java/com/archive/framework/web/domain/CxSelect.java @@ -0,0 +1,77 @@ +/* */ package com.archive.framework.web.domain + +-INF.classes.com.archive.framework.web.domain; +/* */ +/* */ import java.io.Serializable; +/* */ import java.util.List; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CxSelect +/* */ implements Serializable +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private String v; +/* */ private String n; +/* */ private List s; +/* */ +/* */ public CxSelect() {} +/* */ +/* */ public CxSelect(String v, String n) { +/* 36 */ this.v = v; +/* 37 */ this.n = n; +/* */ } +/* */ +/* */ +/* */ public List getS() { +/* 42 */ return this.s; +/* */ } +/* */ +/* */ +/* */ public void setN(String n) { +/* 47 */ this.n = n; +/* */ } +/* */ +/* */ +/* */ public String getN() { +/* 52 */ return this.n; +/* */ } +/* */ +/* */ +/* */ public void setS(List s) { +/* 57 */ this.s = s; +/* */ } +/* */ +/* */ +/* */ public String getV() { +/* 62 */ return this.v; +/* */ } +/* */ +/* */ +/* */ public void setV(String v) { +/* 67 */ this.v = v; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\domain\CxSelect.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/domain/TreeEntity.java b/src/main/java/com/archive/framework/web/domain/TreeEntity.java new file mode 100644 index 0000000..71b12d1 --- /dev/null +++ b/src/main/java/com/archive/framework/web/domain/TreeEntity.java @@ -0,0 +1,71 @@ +/* */ package com.archive.framework.web.domain + +-INF.classes.com.archive.framework.web.domain; +/* */ +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TreeEntity +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private String parentName; +/* */ private Long parentId; +/* */ private Integer orderNum; +/* */ private String ancestors; +/* */ +/* */ public String getParentName() { +/* 26 */ return this.parentName; +/* */ } +/* */ +/* */ +/* */ public void setParentName(String parentName) { +/* 31 */ this.parentName = parentName; +/* */ } +/* */ +/* */ +/* */ public Long getParentId() { +/* 36 */ return this.parentId; +/* */ } +/* */ +/* */ +/* */ public void setParentId(Long parentId) { +/* 41 */ this.parentId = parentId; +/* */ } +/* */ +/* */ +/* */ public Integer getOrderNum() { +/* 46 */ return this.orderNum; +/* */ } +/* */ +/* */ +/* */ public void setOrderNum(Integer orderNum) { +/* 51 */ this.orderNum = orderNum; +/* */ } +/* */ +/* */ +/* */ public String getAncestors() { +/* 56 */ return this.ancestors; +/* */ } +/* */ +/* */ +/* */ public void setAncestors(String ancestors) { +/* 61 */ this.ancestors = ancestors; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\domain\TreeEntity.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/domain/Ztree.java b/src/main/java/com/archive/framework/web/domain/Ztree.java new file mode 100644 index 0000000..e61c25f --- /dev/null +++ b/src/main/java/com/archive/framework/web/domain/Ztree.java @@ -0,0 +1,112 @@ +/* */ package com.archive.framework.web.domain + +-INF.classes.com.archive.framework.web.domain; +/* */ +/* */ import java.io.Serializable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Ztree +/* */ implements Serializable +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ private Long pId; +/* */ private String name; +/* */ private String title; +/* */ private boolean checked = false; +/* */ private boolean open = false; +/* */ private boolean nocheck = false; +/* */ +/* */ public Long getId() { +/* 37 */ return this.id; +/* */ } +/* */ +/* */ +/* */ public void setId(Long id) { +/* 42 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getpId() { +/* 47 */ return this.pId; +/* */ } +/* */ +/* */ +/* */ public void setpId(Long pId) { +/* 52 */ this.pId = pId; +/* */ } +/* */ +/* */ +/* */ public String getName() { +/* 57 */ return this.name; +/* */ } +/* */ +/* */ +/* */ public void setName(String name) { +/* 62 */ this.name = name; +/* */ } +/* */ +/* */ +/* */ public String getTitle() { +/* 67 */ return this.title; +/* */ } +/* */ +/* */ +/* */ public void setTitle(String title) { +/* 72 */ this.title = title; +/* */ } +/* */ +/* */ +/* */ public boolean isChecked() { +/* 77 */ return this.checked; +/* */ } +/* */ +/* */ +/* */ public void setChecked(boolean checked) { +/* 82 */ this.checked = checked; +/* */ } +/* */ +/* */ +/* */ public boolean isOpen() { +/* 87 */ return this.open; +/* */ } +/* */ +/* */ +/* */ public void setOpen(boolean open) { +/* 92 */ this.open = open; +/* */ } +/* */ +/* */ +/* */ public boolean isNocheck() { +/* 97 */ return this.nocheck; +/* */ } +/* */ +/* */ +/* */ public void setNocheck(boolean nocheck) { +/* 102 */ this.nocheck = nocheck; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\domain\Ztree.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/exception/GlobalExceptionHandler.java b/src/main/java/com/archive/framework/web/exception/GlobalExceptionHandler.java new file mode 100644 index 0000000..bfe0b30 --- /dev/null +++ b/src/main/java/com/archive/framework/web/exception/GlobalExceptionHandler.java @@ -0,0 +1,124 @@ +/* */ package com.archive.framework.web.exception + +-INF.classes.com.archive.framework.web.exception; +/* */ +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.common.exception.DemoModeException; +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.common.utils.security.PermissionUtils; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import org.apache.shiro.authz.AuthorizationException; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.validation.BindException; +/* */ import org.springframework.validation.ObjectError; +/* */ import org.springframework.web.HttpRequestMethodNotSupportedException; +/* */ import org.springframework.web.bind.annotation.ExceptionHandler; +/* */ import org.springframework.web.bind.annotation.RestControllerAdvice; +/* */ import org.springframework.web.servlet.ModelAndView; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RestControllerAdvice +/* */ public class GlobalExceptionHandler +/* */ { +/* 26 */ private static final Logger log = LoggerFactory.getLogger(com.archive.framework.web.exception.GlobalExceptionHandler.class); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @ExceptionHandler({AuthorizationException.class}) +/* */ public Object handleAuthorizationException(HttpServletRequest request, AuthorizationException e) { +/* 34 */ log.error(e.getMessage(), (Throwable)e); +/* 35 */ if (ServletUtils.isAjaxRequest(request)) +/* */ { +/* 37 */ return AjaxResult.error(PermissionUtils.getMsg(e.getMessage())); +/* */ } +/* */ +/* */ +/* 41 */ ModelAndView modelAndView = new ModelAndView(); +/* 42 */ modelAndView.setViewName("error/unauth"); +/* 43 */ return modelAndView; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @ExceptionHandler({HttpRequestMethodNotSupportedException.class}) +/* */ public AjaxResult handleException(HttpRequestMethodNotSupportedException e) { +/* 53 */ log.error(e.getMessage(), (Throwable)e); +/* 54 */ return AjaxResult.error("不支持' " + e.getMethod() + "'请求"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @ExceptionHandler({RuntimeException.class}) +/* */ public AjaxResult notFount(RuntimeException e) { +/* 63 */ log.error("运行时异常:", e); +/* 64 */ return AjaxResult.error("运行时异常:" + e.getMessage()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @ExceptionHandler({Exception.class}) +/* */ public AjaxResult handleException(Exception e) { +/* 73 */ log.error(e.getMessage(), e); +/* 74 */ return AjaxResult.error("服务器错误,请联系管理员"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @ExceptionHandler({BusinessException.class}) +/* */ public Object businessException(HttpServletRequest request, BusinessException e) { +/* 83 */ log.error(e.getMessage(), (Throwable)e); +/* 84 */ if (ServletUtils.isAjaxRequest(request)) +/* */ { +/* 86 */ return AjaxResult.error(e.getMessage()); +/* */ } +/* */ +/* */ +/* 90 */ ModelAndView modelAndView = new ModelAndView(); +/* 91 */ modelAndView.addObject("errorMessage", e.getMessage()); +/* 92 */ modelAndView.setViewName("error/business"); +/* 93 */ return modelAndView; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @ExceptionHandler({BindException.class}) +/* */ public AjaxResult validatedBindException(BindException e) { +/* 103 */ log.error(e.getMessage(), (Throwable)e); +/* 104 */ String message = ((ObjectError)e.getAllErrors().get(0)).getDefaultMessage(); +/* 105 */ return AjaxResult.error(message); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @ExceptionHandler({DemoModeException.class}) +/* */ public AjaxResult demoModeException(DemoModeException e) { +/* 114 */ return AjaxResult.error("演示模式,不允许操作"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\exception\GlobalExceptionHandler.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/page/PageDomain.java b/src/main/java/com/archive/framework/web/page/PageDomain.java new file mode 100644 index 0000000..3e6610b --- /dev/null +++ b/src/main/java/com/archive/framework/web/page/PageDomain.java @@ -0,0 +1,80 @@ +/* */ package com.archive.framework.web.page + +-INF.classes.com.archive.framework.web.page; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PageDomain +/* */ { +/* */ private Integer pageNum; +/* */ private Integer pageSize; +/* */ private String orderByColumn; +/* 22 */ private String isAsc = "asc"; +/* */ +/* */ +/* */ public String getOrderBy() { +/* 26 */ if (StringUtils.isEmpty(this.orderByColumn)) +/* */ { +/* 28 */ return ""; +/* */ } +/* 30 */ return StringUtils.toUnderScoreCase(this.orderByColumn) + " " + this.isAsc; +/* */ } +/* */ +/* */ +/* */ public Integer getPageNum() { +/* 35 */ return this.pageNum; +/* */ } +/* */ +/* */ +/* */ public void setPageNum(Integer pageNum) { +/* 40 */ this.pageNum = pageNum; +/* */ } +/* */ +/* */ +/* */ public Integer getPageSize() { +/* 45 */ return this.pageSize; +/* */ } +/* */ +/* */ +/* */ public void setPageSize(Integer pageSize) { +/* 50 */ this.pageSize = pageSize; +/* */ } +/* */ +/* */ +/* */ public String getOrderByColumn() { +/* 55 */ return this.orderByColumn; +/* */ } +/* */ +/* */ +/* */ public void setOrderByColumn(String orderByColumn) { +/* 60 */ this.orderByColumn = orderByColumn; +/* */ } +/* */ +/* */ +/* */ public String getIsAsc() { +/* 65 */ return this.isAsc; +/* */ } +/* */ +/* */ +/* */ public void setIsAsc(String isAsc) { +/* 70 */ this.isAsc = isAsc; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\page\PageDomain.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/page/TableDataInfo.java b/src/main/java/com/archive/framework/web/page/TableDataInfo.java new file mode 100644 index 0000000..1dbcc23 --- /dev/null +++ b/src/main/java/com/archive/framework/web/page/TableDataInfo.java @@ -0,0 +1,91 @@ +/* */ package com.archive.framework.web.page; +/* */ +/* */ import java.io.Serializable; +/* */ import java.util.List; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TableDataInfo +/* */ implements Serializable +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private long total; +/* */ private List rows; +/* */ private int code; +/* */ private String msg; +/* */ +/* */ public TableDataInfo() {} +/* */ +/* */ public TableDataInfo(List list, int total) { +/* 42 */ this.rows = list; +/* 43 */ this.total = total; +/* */ } +/* */ +/* */ +/* */ public long getTotal() { +/* 48 */ return this.total; +/* */ } +/* */ +/* */ +/* */ public void setTotal(long total) { +/* 53 */ this.total = total; +/* */ } +/* */ +/* */ +/* */ public List getRows() { +/* 58 */ return this.rows; +/* */ } +/* */ +/* */ +/* */ public void setRows(List rows) { +/* 63 */ this.rows = rows; +/* */ } +/* */ +/* */ +/* */ public int getCode() { +/* 68 */ return this.code; +/* */ } +/* */ +/* */ +/* */ public void setCode(int code) { +/* 73 */ this.code = code; +/* */ } +/* */ +/* */ +/* */ public String getMsg() { +/* 78 */ return this.msg; +/* */ } +/* */ +/* */ +/* */ public void setMsg(String msg) { +/* 83 */ this.msg = msg; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\page\TableDataInfo.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/page/TableSupport.java b/src/main/java/com/archive/framework/web/page/TableSupport.java new file mode 100644 index 0000000..19ddcce --- /dev/null +++ b/src/main/java/com/archive/framework/web/page/TableSupport.java @@ -0,0 +1,38 @@ +/* */ package com.archive.framework.web.page + +-INF.classes.com.archive.framework.web.page; +/* */ +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.framework.web.page.PageDomain; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TableSupport +/* */ { +/* */ public static PageDomain getPageDomain() { +/* 18 */ PageDomain pageDomain = new PageDomain(); +/* 19 */ pageDomain.setPageNum(ServletUtils.getParameterToInt("pageNum")); +/* 20 */ pageDomain.setPageSize(ServletUtils.getParameterToInt("pageSize")); +/* 21 */ pageDomain.setOrderByColumn(ServletUtils.getParameter("orderByColumn")); +/* 22 */ pageDomain.setIsAsc(ServletUtils.getParameter("isAsc")); +/* 23 */ return pageDomain; +/* */ } +/* */ +/* */ +/* */ public static PageDomain buildPageRequest() { +/* 28 */ return getPageDomain(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\page\TableSupport.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/service/CacheService.java b/src/main/java/com/archive/framework/web/service/CacheService.java new file mode 100644 index 0000000..712fd19 --- /dev/null +++ b/src/main/java/com/archive/framework/web/service/CacheService.java @@ -0,0 +1,91 @@ +/* */ package com.archive.framework.web.service + +; +/* */ +/* */ import com.archive.common.utils.CacheUtils; +/* */ import java.util.Set; +/* */ import org.apache.commons.lang3.ArrayUtils; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class CacheService +/* */ { +/* */ public String[] getCacheNames() { +/* 24 */ String[] cacheNames = CacheUtils.getCacheNames(); +/* 25 */ return (String[])ArrayUtils.removeElement((Object[])cacheNames, "sys-authCache"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Set getCacheKeys(String cacheName) { +/* 36 */ return CacheUtils.getCache(cacheName).keys(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object getCacheValue(String cacheName, String cacheKey) { +/* 48 */ return CacheUtils.get(cacheName, cacheKey); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void clearCacheName(String cacheName) { +/* 58 */ CacheUtils.removeAll(cacheName); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void clearCacheKey(String cacheName, String cacheKey) { +/* 69 */ CacheUtils.remove(cacheName, cacheKey); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void clearAll() { +/* 77 */ String[] cacheNames = getCacheNames(); +/* 78 */ for (String cacheName : cacheNames) +/* */ { +/* 80 */ CacheUtils.removeAll(cacheName); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\service\CacheService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/service/ConfigService.java b/src/main/java/com/archive/framework/web/service/ConfigService.java new file mode 100644 index 0000000..8f11e44 --- /dev/null +++ b/src/main/java/com/archive/framework/web/service/ConfigService.java @@ -0,0 +1,36 @@ +/* */ package com.archive.framework.web.service + +-INF.classes.com.archive.framework.web.service; +/* */ +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service("config") +/* */ public class ConfigService +/* */ { +/* */ @Autowired +/* */ private IConfigService configService; +/* */ +/* */ public String getKey(String configKey) { +/* 26 */ return this.configService.selectConfigByKey(configKey); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\service\ConfigService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/service/DictService.java b/src/main/java/com/archive/framework/web/service/DictService.java new file mode 100644 index 0000000..af6265c --- /dev/null +++ b/src/main/java/com/archive/framework/web/service/DictService.java @@ -0,0 +1,54 @@ +/* */ package com.archive.framework.web.service + +-INF.classes.com.archive.framework.web.service; +/* */ +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import com.archive.project.system.dict.service.IDictDataService; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service("dict") +/* */ public class DictService +/* */ { +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ @Autowired +/* */ private IDictDataService dictDataService; +/* */ +/* */ public List getType(String dictType) { +/* 32 */ return this.dictTypeService.selectDictDataByType(dictType); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getLabel(String dictType, String dictValue) { +/* 44 */ return this.dictDataService.selectDictLabel(dictType, dictValue); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\service\DictService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/framework/web/service/PermissionService.java b/src/main/java/com/archive/framework/web/service/PermissionService.java new file mode 100644 index 0000000..b923f47 --- /dev/null +++ b/src/main/java/com/archive/framework/web/service/PermissionService.java @@ -0,0 +1,270 @@ +/* */ package com.archive.framework.web.service + +-INF.classes.com.archive.framework.web.service; +/* */ +/* */ import java.beans.BeanInfo; +/* */ import java.beans.Introspector; +/* */ import java.beans.PropertyDescriptor; +/* */ import org.apache.shiro.SecurityUtils; +/* */ import org.apache.shiro.subject.Subject; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service("permission") +/* */ public class PermissionService +/* */ { +/* 21 */ private static final Logger log = LoggerFactory.getLogger(com.archive.framework.web.service.PermissionService.class); +/* */ +/* */ +/* */ +/* */ public static final String NOACCESS = "hidden"; +/* */ +/* */ +/* */ +/* */ private static final String ROLE_DELIMETER = ","; +/* */ +/* */ +/* */ +/* */ private static final String PERMISSION_DELIMETER = ","; +/* */ +/* */ +/* */ +/* */ public String hasPermi(String permission) { +/* 38 */ return isPermitted(permission) ? "" : "hidden"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String lacksPermi(String permission) { +/* 49 */ return isLacksPermitted(permission) ? "" : "hidden"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String hasAnyPermi(String permissions) { +/* 60 */ return hasAnyPermissions(permissions, ",") ? "" : "hidden"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String hasRole(String role) { +/* 71 */ return isRole(role) ? "" : "hidden"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String lacksRole(String role) { +/* 82 */ return isLacksRole(role) ? "" : "hidden"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String hasAnyRoles(String roles) { +/* 93 */ return isAnyRoles(roles, ",") ? "" : "hidden"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isUser() { +/* 103 */ Subject subject = SecurityUtils.getSubject(); +/* 104 */ return (subject != null && subject.getPrincipal() != null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isPermitted(String permission) { +/* 115 */ return SecurityUtils.getSubject().isPermitted(permission); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isLacksPermitted(String permission) { +/* 126 */ return (isPermitted(permission) != true); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean hasAnyPermissions(String permissions) { +/* 137 */ return hasAnyPermissions(permissions, ","); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean hasAnyPermissions(String permissions, String delimeter) { +/* 149 */ Subject subject = SecurityUtils.getSubject(); +/* */ +/* 151 */ if (subject != null) { +/* */ +/* 153 */ if (delimeter == null || delimeter.length() == 0) +/* */ { +/* 155 */ delimeter = ","; +/* */ } +/* */ +/* 158 */ for (String permission : permissions.split(delimeter)) { +/* */ +/* 160 */ if (permission != null && subject.isPermitted(permission.trim()) == true) +/* */ { +/* 162 */ return true; +/* */ } +/* */ } +/* */ } +/* */ +/* 167 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isRole(String role) { +/* 178 */ return SecurityUtils.getSubject().hasRole(role); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isLacksRole(String role) { +/* 189 */ return (isRole(role) != true); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isAnyRoles(String roles) { +/* 200 */ return isAnyRoles(roles, ","); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isAnyRoles(String roles, String delimeter) { +/* 212 */ Subject subject = SecurityUtils.getSubject(); +/* 213 */ if (subject != null) { +/* */ +/* 215 */ if (delimeter == null || delimeter.length() == 0) +/* */ { +/* 217 */ delimeter = ","; +/* */ } +/* */ +/* 220 */ for (String role : roles.split(delimeter)) { +/* */ +/* 222 */ if (subject.hasRole(role.trim()) == true) +/* */ { +/* 224 */ return true; +/* */ } +/* */ } +/* */ } +/* */ +/* 229 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object getPrincipalProperty(String property) { +/* 240 */ Subject subject = SecurityUtils.getSubject(); +/* 241 */ if (subject != null) { +/* */ +/* 243 */ Object principal = subject.getPrincipal(); +/* */ +/* */ try { +/* 246 */ BeanInfo bi = Introspector.getBeanInfo(principal.getClass()); +/* 247 */ for (PropertyDescriptor pd : bi.getPropertyDescriptors()) +/* */ { +/* 249 */ if (pd.getName().equals(property) == true) +/* */ { +/* 251 */ return pd.getReadMethod().invoke(principal, (Object[])null); +/* */ } +/* */ } +/* */ +/* 255 */ } catch (Exception e) { +/* */ +/* 257 */ log.error("Error reading property [{}] from principal of type [{}]", property, principal.getClass().getName()); +/* */ } +/* */ } +/* 260 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\service\PermissionService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/browse/controller/BrowseController.java b/src/main/java/com/archive/project/browse/controller/BrowseController.java new file mode 100644 index 0000000..5bae547 --- /dev/null +++ b/src/main/java/com/archive/project/browse/controller/BrowseController.java @@ -0,0 +1,341 @@ +/* */ package com.archive.project.browse.controller + +-INF.classes.com.archive.project.browse.controller; +/* */ import com.archive.common.archiveUtil.MetadataUtil; +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.ocr.ImageOcr; +/* */ import com.archive.common.ocr.PdfOcr; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.browse.service.IBrowseService; +/* */ import com.archive.project.dajs.jsgl.service.IJsglService; +/* */ import com.archive.project.dasz.ccgl.service.ICcglService; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import java.io.File; +/* */ import java.io.FileInputStream; +/* */ import java.io.IOException; +/* */ import java.util.ArrayList; +/* */ import java.util.HashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import javax.servlet.ServletOutputStream; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.RequestMethod; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ @Controller +/* */ @RequestMapping({"/browse"}) +/* */ public class BrowseController extends BaseController { +/* 36 */ private String prefix = "browse"; +/* */ +/* */ @Autowired +/* */ private IConfigService configService; +/* */ +/* */ @Autowired +/* */ private IJsglService jsglService; +/* */ +/* */ @Autowired +/* */ private IBrowseService iBrowseService; +/* */ +/* */ @Autowired +/* */ private ICcglService ccglService; +/* */ +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ @GetMapping({"/browse/{archiveId}/{id}"}) +/* */ public String browse(@PathVariable("archiveId") long archiveId, @PathVariable("id") String id, ModelMap mmap) { +/* 55 */ long tableId = TableUtil.getTableIdByArchiveTypeId(archiveId); +/* 56 */ mmap.put("archiveTypeId", Long.valueOf(archiveId)); +/* 57 */ mmap.put("tableId", Long.valueOf(tableId)); +/* 58 */ mmap.put("id", id); +/* 59 */ boolean browseServerEnabled = this.archiveConfig.isBrowseServerEnabled(); +/* */ +/* 61 */ if (browseServerEnabled) { +/* 62 */ return this.prefix + "/browse"; +/* */ } +/* 64 */ return this.prefix + "/browsesimple"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/appendAddForm/{archiveTypeId}/{type}/{id}"}) +/* */ @ResponseBody +/* */ public String appendAddForm(@PathVariable("archiveTypeId") String archiveTypeId, @PathVariable("type") String type, @PathVariable("id") String id) { +/* 79 */ return this.jsglService.appendAddFormByDataId(archiveTypeId, type, id, "true"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getDocumentListByFileTableIdAndFileId/{fileTableId}/{fileId}"}) +/* */ @ResponseBody +/* */ public AjaxResult getDocumentListByFileTableIdAndFileId(@PathVariable("fileTableId") String fileTableId, @PathVariable("fileId") String fileId) { +/* 91 */ List> list = this.iBrowseService.getDocumentListByFileTableIdAndFileId(fileTableId, fileId); +/* 92 */ return AjaxResult.success(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getDocumentList/{fileTableId}/{fileId}"}) +/* */ @ResponseBody +/* */ public AjaxResult getDocumentList(@PathVariable("fileTableId") String fileTableId, @PathVariable("fileId") String fileId) { +/* 104 */ List> list = this.iBrowseService.getDocumentList(fileTableId, fileId); +/* 105 */ return AjaxResult.success(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getDocument/{documentTableId}/{documentId}"}) +/* */ @ResponseBody +/* */ public Object getDocument(@PathVariable("documentTableId") String documentTableId, @PathVariable("documentId") String documentId, HttpServletRequest request, HttpServletResponse response) { +/* 120 */ FileInputStream fis = null; +/* 121 */ ServletOutputStream ops = null; +/* 122 */ String filepath = this.iBrowseService.getDocumentPath(documentTableId, documentId, "false"); +/* */ try { +/* 124 */ File f = new File(filepath); +/* 125 */ if (f.exists()) { +/* 126 */ System.out.println(filepath + "===cunzai"); +/* 127 */ response.addHeader("Content-Disposition", "attachment;filename=\"" + new String(f.getName().getBytes("UTF-8"), "ISO8859-1") + "\""); +/* 128 */ response.setContentType("application/octet-stream; charset=GBK"); +/* 129 */ response.setHeader("Content-Length", String.valueOf(f.length())); +/* 130 */ response.setHeader("Pragma", "No-cache"); +/* 131 */ response.setHeader("Cache-Control", "No-cache"); +/* 132 */ response.setDateHeader("Expires", 0L); +/* 133 */ fis = new FileInputStream(f); +/* 134 */ ops = response.getOutputStream(); +/* 135 */ byte[] bf = new byte[1024]; +/* 136 */ int rl = fis.read(bf); +/* 137 */ while (rl > 0) { +/* 138 */ ops.write(bf, 0, rl); +/* 139 */ rl = fis.read(bf); +/* */ } +/* 141 */ ops.flush(); +/* 142 */ ops.close(); +/* 143 */ fis.close(); +/* */ } else { +/* 145 */ System.out.println(filepath + "===bucunzai"); +/* 146 */ response.sendRedirect("common/404.jsp"); +/* */ } +/* 148 */ } catch (Exception e) { +/* 149 */ e.printStackTrace(); +/* */ } finally { +/* */ try { +/* 152 */ if (fis != null) +/* 153 */ fis.close(); +/* 154 */ if (ops != null) +/* 155 */ ops.close(); +/* 156 */ } catch (Exception e) { +/* 157 */ fis = null; +/* 158 */ ops = null; +/* */ } +/* */ } +/* 161 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/FileOcr/{documentTableId}/{documentId}"}) +/* */ @ResponseBody +/* */ public AjaxResult FileOcr(@PathVariable("documentTableId") String documentTableId, @PathVariable("documentId") String documentId) { +/* 174 */ String filepath = this.iBrowseService.getDocumentPath(documentTableId, documentId, "false"); +/* 175 */ String result2 = ""; +/* 176 */ String pdfSpiltImagePath = this.ccglService.getPathByLjbs("archive.pdfSpiltImagePath"); +/* */ try { +/* 178 */ String filepath1 = filepath.toLowerCase(); +/* 179 */ if (filepath1.contains(".jpg") || filepath1.contains(".png") || filepath1.contains(".gif") || filepath1.contains(".jpeg") || filepath1.contains(".tif")) { +/* 180 */ result2 = ImageOcr.ImageOcr(filepath); +/* 181 */ } else if (filepath1.contains(".pdf")) { +/* */ +/* 183 */ result2 = PdfOcr.getTextFromPdf(filepath, pdfSpiltImagePath); +/* 184 */ } else if (filepath1.contains(".ofd")) { +/* */ +/* 186 */ result2 = ""; +/* */ } +/* 188 */ } catch (Exception e) { +/* 189 */ System.out.println(e.getMessage()); +/* */ } +/* 191 */ return AjaxResult.success(result2); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/metaData/{documentTableId}/{documentId}"}) +/* */ public String metaData(@PathVariable("documentTableId") String documentTableId, @PathVariable("documentId") String documentId, ModelMap mmap) { +/* 203 */ mmap.put("documentTableId", documentTableId); +/* 204 */ mmap.put("documentId", documentId); +/* 205 */ return this.prefix + "/metadata"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/metaDataForm/{documentTableId}/{documentId}"}) +/* */ @ResponseBody +/* */ public String metaDataForm(@PathVariable("documentTableId") String documentTableId, @PathVariable("documentId") String documentId, ModelMap mmap) { +/* 218 */ String filepath = this.iBrowseService.getDocumentPath(documentTableId, documentId, "false"); +/* 219 */ List> list = MetadataUtil.getMetadataAllByFile(filepath); +/* 220 */ StringBuilder html = new StringBuilder(); +/* 221 */ for (int i = 1; i <= list.size(); i++) { +/* */ +/* 223 */ if (i % 2 != 0) { +/* 224 */ html.append("
"); +/* */ } +/* */ +/* 227 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 237 */ if (i % 2 == 0 || i == list.size()) { +/* 238 */ html.append("
"); +/* */ } +/* */ } +/* 241 */ return html.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getPreviewUrl/{docTableId}/{docId}"}) +/* */ @ResponseBody +/* */ public Map getPreviewUrl(HttpServletRequest request, @PathVariable("docTableId") String docTableId, @PathVariable("docId") String docId) { +/* 254 */ Map map = new HashMap<>(); +/* 255 */ String originUrl = ""; +/* 256 */ String fileName = this.iBrowseService.getFileName(docTableId, docId); +/* 257 */ if (StringUtils.isNotEmpty(fileName)) { +/* 258 */ StringBuffer url = request.getRequestURL(); +/* 259 */ originUrl = url.toString(); +/* 260 */ originUrl = originUrl.substring(0, originUrl.indexOf("getPreviewUrl")); +/* 261 */ originUrl = originUrl + "browseDocument?docTableId=" + docTableId + "&docId=" + docId + "&fullfilename=" + fileName; +/* */ } +/* */ +/* 264 */ String browseServer = this.archiveConfig.getBrowseServer(); +/* 265 */ if (StringUtils.isNotEmpty(browseServer)) { +/* 266 */ boolean flag = HttpUtils.urlWhetherReachable(browseServer, 2000); +/* 267 */ if (flag) { +/* 268 */ if (browseServer.endsWith("/")) { +/* 269 */ browseServer = browseServer + "onlinePreview?url="; +/* */ } else { +/* 271 */ browseServer = browseServer + "/onlinePreview?url="; +/* */ } +/* */ } else { +/* 274 */ browseServer = ""; +/* */ } +/* */ } +/* 277 */ map.put("originUrl", originUrl); +/* 278 */ map.put("browseServer", browseServer); +/* 279 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequestMapping(value = {"/browseDocument"}, method = {RequestMethod.GET}) +/* */ public void browseDocument(HttpServletRequest request, HttpServletResponse response) { +/* 289 */ String docTableId = request.getParameter("docTableId"); +/* 290 */ String docId = request.getParameter("docId"); +/* 291 */ String filePath = this.iBrowseService.getDocumentFilePath(docTableId, docId); +/* 292 */ File file = new File(filePath); +/* 293 */ if (file.exists()) { +/* 294 */ byte[] data = null; +/* 295 */ FileInputStream input = null; +/* */ try { +/* 297 */ input = new FileInputStream(file); +/* 298 */ data = new byte[input.available()]; +/* 299 */ input.read(data); +/* 300 */ response.getOutputStream().write(data); +/* 301 */ } catch (Exception e) { +/* 302 */ e.printStackTrace(); +/* */ } finally { +/* */ try { +/* 305 */ if (input != null) { +/* 306 */ input.close(); +/* */ } +/* 308 */ } catch (IOException e) { +/* 309 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getMetaData/{documentTableId}/{documentId}"}) +/* */ @ResponseBody +/* */ public AjaxResult getMetaData(@PathVariable("documentTableId") String documentTableId, @PathVariable("documentId") String documentId) { +/* 324 */ String filepath = this.iBrowseService.getDocumentPath(documentTableId, documentId, "false"); +/* 325 */ List> list = new ArrayList<>(); +/* */ try { +/* 327 */ list = MetadataUtil.getMetadataAllByFile(filepath); +/* 328 */ } catch (Exception e) { +/* 329 */ e.printStackTrace(); +/* */ } +/* 331 */ return AjaxResult.success(list); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\browse\controller\BrowseController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/browse/service/IBrowseService.java b/src/main/java/com/archive/project/browse/service/IBrowseService.java new file mode 100644 index 0000000..e9d3aee --- /dev/null +++ b/src/main/java/com/archive/project/browse/service/IBrowseService.java @@ -0,0 +1,24 @@ +package com.archive.project.browse.service + +-INF.classes.com.archive.project.browse.service; + +import java.util.List; +import java.util.Map; + +public interface IBrowseService { + String getDocumentPath(String paramString1, String paramString2, String paramString3); + + List> getDocumentList(String paramString1, String paramString2); + + String getFileName(String paramString1, String paramString2); + + String getDocumentFilePath(String paramString1, String paramString2); + + List> getDocumentListByFileTableIdAndFileId(String paramString1, String paramString2); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\browse\service\IBrowseService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/browse/service/impl/BrowseServiceImpl.java b/src/main/java/com/archive/project/browse/service/impl/BrowseServiceImpl.java new file mode 100644 index 0000000..9585499 --- /dev/null +++ b/src/main/java/com/archive/project/browse/service/impl/BrowseServiceImpl.java @@ -0,0 +1,237 @@ +/* */ package com.archive.project.browse.service.impl + +-INF.classes.com.archive.project.browse.service.impl; +/* */ +/* */ import com.archive.common.archiveUtil.PdfWaterMarkUtil; +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.project.browse.service.IBrowseService; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.io.File; +/* */ import java.util.ArrayList; +/* */ import java.util.HashMap; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.apache.commons.io.FilenameUtils; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class BrowseServiceImpl +/* */ implements IBrowseService +/* */ { +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private IConfigService configService; +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ @Autowired +/* */ private IArchiveImportBatchService archiveImportBatchService; +/* */ +/* */ public List> getDocumentListByFileTableIdAndFileId(String fileTableId, String fileId) { +/* 58 */ List> list = new ArrayList<>(); +/* 59 */ String fileTableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(fileTableId))); +/* */ +/* 61 */ String docTableName = fileTableName.toLowerCase().replace("_file", "_document"); +/* 62 */ docTableName = docTableName.toLowerCase().replace("_folder", "_document"); +/* 63 */ String docTableId = TableUtil.getTableId(docTableName); +/* 64 */ String sql = "select filehz,id,filename from " + docTableName + " where ownerid=" + fileId; +/* 65 */ List> doclist = this.executeSqlService.queryList(sql); +/* 66 */ for (int i = 0; i < doclist.size(); i++) { +/* 67 */ if (doclist.get(i) != null) { +/* 68 */ String docId = (((LinkedHashMap)doclist.get(i)).get("id") == null) ? "" : ((LinkedHashMap)doclist.get(i)).get("id").toString(); +/* 69 */ String dochz = (((LinkedHashMap)doclist.get(i)).get("filehz") == null) ? "" : ((LinkedHashMap)doclist.get(i)).get("filehz").toString(); +/* 70 */ String docName = (((LinkedHashMap)doclist.get(i)).get("filename") == null) ? "" : ((LinkedHashMap)doclist.get(i)).get("filename").toString(); +/* 71 */ if (!docId.equals("")) { +/* 72 */ Map map = new HashMap<>(); +/* 73 */ map.put("docId", docId); +/* 74 */ map.put("dochz", dochz.toLowerCase()); +/* 75 */ map.put("docName", docName); +/* 76 */ map.put("docTableId", docTableId); +/* 77 */ list.add(map); +/* */ } +/* */ } +/* */ } +/* 81 */ return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List> getDocumentList(String fileTableId, String fileId) { +/* 91 */ List> list = new ArrayList<>(); +/* 92 */ String fileTableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(fileTableId))); +/* */ +/* 94 */ String docTableName = fileTableName.toLowerCase().replace("_file", "_document"); +/* 95 */ docTableName = docTableName.toLowerCase().replace("_folder", "_document"); +/* 96 */ String docTableId = TableUtil.getTableId(docTableName); +/* 97 */ String sql = "select filehz, id, filename from " + docTableName + " where ownerid = " + fileId; +/* 98 */ List> doclist = this.executeSqlService.queryList(sql); +/* 99 */ for (int i = 0; i < doclist.size(); i++) { +/* 100 */ if (doclist.get(i) != null) { +/* 101 */ String docId = (((LinkedHashMap)doclist.get(i)).get("id") == null) ? "" : ((LinkedHashMap)doclist.get(i)).get("id").toString(); +/* 102 */ String dochz = (((LinkedHashMap)doclist.get(i)).get("filehz") == null) ? "" : ((LinkedHashMap)doclist.get(i)).get("filehz").toString(); +/* 103 */ String docName = (((LinkedHashMap)doclist.get(i)).get("filename") == null) ? "" : ((LinkedHashMap)doclist.get(i)).get("filename").toString(); +/* 104 */ if (!docId.equals("")) { +/* 105 */ Map map = new HashMap<>(); +/* 106 */ map.put("docId", docId); +/* 107 */ map.put("dochz", dochz.toLowerCase()); +/* 108 */ map.put("docName", docName); +/* 109 */ map.put("docTableId", docTableId); +/* 110 */ list.add(map); +/* */ } +/* */ } +/* */ } +/* 114 */ return list; +/* */ } +/* */ +/* */ +/* */ public String getFileName(String docTableId, String docId) { +/* 119 */ String fileName = ""; +/* 120 */ String docTableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(docTableId))); +/* 121 */ String sql = "select filepath from " + docTableName + " where id = " + docId; +/* 122 */ String filePath = this.executeSqlService.getSingle(sql); +/* 123 */ if (StringUtils.isNotEmpty(filePath)) { +/* 124 */ File file = new File(filePath); +/* 125 */ if (file.exists()) { +/* 126 */ fileName = FilenameUtils.getName(filePath); +/* */ } +/* */ } +/* 129 */ return fileName; +/* */ } +/* */ +/* */ +/* */ public String getDocumentFilePath(String docTableId, String docId) { +/* 134 */ String filePath = ""; +/* 135 */ String docTableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(docTableId))); +/* 136 */ String sql = "select filepath from " + docTableName + " where id = " + docId; +/* 137 */ filePath = this.executeSqlService.getSingle(sql); +/* 138 */ return filePath; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getDocumentPath(String documentTableId, String documentId, String iswater) { +/* 152 */ String path = ""; +/* 153 */ String DocTableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(documentTableId))); +/* 154 */ if (iswater.equals("true")) { +/* */ +/* 156 */ String sql = "select filewaterpath,filepath from " + DocTableName + " where id=" + documentId; +/* 157 */ LinkedHashMap data = this.executeSqlService.getOne(sql); +/* 158 */ if (data != null && data.size() > 0) { +/* 159 */ String waterpath = (data.get("filewaterpath") == null) ? "" : data.get("filewaterpath").toString(); +/* 160 */ String filepath = (data.get("filepath") == null) ? "" : data.get("filepath").toString(); +/* 161 */ if (!waterpath.equals("")) { +/* 162 */ path = waterpath; +/* */ } else { +/* 164 */ File yfile = new File(filepath); +/* 165 */ String yfileName = yfile.getName().substring(0, yfile.getName().lastIndexOf(".")); +/* 166 */ String yhz = yfile.getName().substring(yfile.getName().lastIndexOf(".") + 1); +/* 167 */ if (yfile.exists()) { +/* 168 */ String newFileName = yfileName + "_water"; +/* 169 */ String newFilePath = yfile.getPath().replace(yfileName, newFileName); +/* */ +/* 171 */ String waterType = this.configService.selectConfigByKey("archive.waterMarkType"); +/* 172 */ if (waterType.equals("1")) { +/* 173 */ String waterText = this.configService.selectConfigByKey("archive.waterMarkText"); +/* 174 */ if (waterText != null && !waterText.equals("")) { +/* 175 */ if (yhz.toLowerCase().equals("pdf")) { +/* 176 */ PdfWaterMarkUtil.waterMarkforWriting(filepath, newFilePath, waterText, Integer.valueOf(45), 1.0F, 10); +/* */ +/* 178 */ String updatSql = "update " + DocTableName + " set filewaterpath='" + newFilePath + "' where id=" + documentId; +/* 179 */ this.executeSqlService.update(updatSql); +/* */ } else { +/* 181 */ System.out.println("~~~~~其他格式暂时无法添加水印~~~~~~"); +/* 182 */ path = filepath; +/* */ } +/* */ } else { +/* 185 */ System.out.println("~~~~~~~文字水印设置为空,无法生成水印文件~~~~~~~~~"); +/* 186 */ path = filepath; +/* */ } +/* */ } else { +/* 189 */ String waterImagePath = this.configService.selectConfigByKey("archive.waterMarkImage"); +/* 190 */ File file = new File(waterImagePath); +/* 191 */ if (file.exists()) { +/* 192 */ if (yhz.toLowerCase().equals("pdf")) { +/* 193 */ PdfWaterMarkUtil.pressImageWater(filepath, newFilePath, waterImagePath, 100, 100); +/* */ +/* 195 */ String updatSql = "update " + DocTableName + " set filewaterpath='" + newFilePath + "' where id=" + documentId; +/* 196 */ this.executeSqlService.update(updatSql); +/* */ } else { +/* 198 */ System.out.println("~~~~~其他格式暂时无法添加水印~~~~~~"); +/* 199 */ path = filepath; +/* */ } +/* */ } else { +/* 202 */ System.out.println("~~~~~~~图片水印文件不存在,无法生成水印文件~~~~~~~~~"); +/* 203 */ path = filepath; +/* */ } +/* */ } +/* */ } else { +/* 207 */ System.out.println("~~~~~~~原文件不存在,无法生成水印文件~~~~~~~~~"); +/* */ } +/* */ } +/* */ } +/* */ } else { +/* */ +/* 213 */ String sql = "select filepath from " + DocTableName + " where id=" + documentId; +/* 214 */ LinkedHashMap data = this.executeSqlService.getOne(sql); +/* 215 */ if (data != null && data.size() > 0) { +/* 216 */ path = (data.get("filepath") == null) ? "" : data.get("filepath").toString(); +/* */ } +/* */ } +/* 219 */ return path; +/* */ } +/* */ +/* */ +/* */ public static void main(String[] args) { +/* 224 */ File file = new File("D://smdocument.pdf"); +/* 225 */ System.out.println(file.getName().substring(0, file.getName().lastIndexOf("."))); +/* 226 */ System.out.println(file.getName().substring(file.getName().lastIndexOf(".") + 1)); +/* 227 */ System.out.println(file.getPath()); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\browse\service\impl\BrowseServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/common/CommonController.java b/src/main/java/com/archive/project/common/CommonController.java new file mode 100644 index 0000000..2d5e5b4 --- /dev/null +++ b/src/main/java/com/archive/project/common/CommonController.java @@ -0,0 +1,128 @@ +/* */ package com.archive.project.common + +-INF.classes.com.archive.project.common; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.file.FileUploadUtils; +/* */ import com.archive.common.utils.file.FileUtils; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.config.ServerConfig; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import java.io.OutputStream; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ import org.springframework.web.multipart.MultipartFile; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ public class CommonController +/* */ { +/* 30 */ private static final Logger log = LoggerFactory.getLogger(com.archive.project.common.CommonController.class); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Autowired +/* */ private ServerConfig serverConfig; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"common/download"}) +/* */ public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) { +/* */ try { +/* 46 */ if (!FileUtils.checkAllowDownload(fileName)) +/* */ { +/* 48 */ throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", new Object[] { fileName })); +/* */ } +/* */ +/* 51 */ String filePath = ArchiveConfig.getInstance().getDownloadPath() + fileName; +/* */ +/* 53 */ response.setContentType("application/octet-stream"); +/* 54 */ FileUtils.setAttachmentResponseHeader(response, fileName); +/* 55 */ FileUtils.writeBytes(filePath, (OutputStream)response.getOutputStream()); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 61 */ catch (Exception e) { +/* */ +/* 63 */ log.error("下载文件失败", e); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/common/upload"}) +/* */ @ResponseBody +/* */ public AjaxResult uploadFile(MultipartFile file) throws Exception { +/* */ try { +/* 77 */ String filePath = ArchiveConfig.getInstance().getUploadPath(); +/* */ +/* 79 */ String fileName = FileUploadUtils.upload(filePath, file); +/* 80 */ String url = this.serverConfig.getUrl() + fileName; +/* 81 */ AjaxResult ajax = AjaxResult.success(); +/* 82 */ ajax.put("fileName", fileName); +/* 83 */ ajax.put("url", url); +/* 84 */ return ajax; +/* */ } +/* 86 */ catch (Exception e) { +/* */ +/* 88 */ return AjaxResult.error(e.getMessage()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/common/download/resource"}) +/* */ public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response) throws Exception { +/* */ try { +/* 101 */ if (!FileUtils.checkAllowDownload(resource)) +/* */ { +/* 103 */ throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", new Object[] { resource })); +/* */ } +/* */ +/* 106 */ String localPath = ArchiveConfig.getInstance().getProfile(); +/* */ +/* 108 */ String downloadPath = localPath + StringUtils.substringAfter(resource, "/profile"); +/* */ +/* 110 */ String downloadName = StringUtils.substringAfterLast(downloadPath, "/"); +/* 111 */ response.setContentType("application/octet-stream"); +/* 112 */ FileUtils.setAttachmentResponseHeader(response, downloadName); +/* 113 */ FileUtils.writeBytes(downloadPath, (OutputStream)response.getOutputStream()); +/* */ } +/* 115 */ catch (Exception e) { +/* */ +/* 117 */ log.error("下载文件失败", e); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\common\CommonController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/common/mapper/ExecuteSqlMapper.java b/src/main/java/com/archive/project/common/mapper/ExecuteSqlMapper.java new file mode 100644 index 0000000..b6a08b9 --- /dev/null +++ b/src/main/java/com/archive/project/common/mapper/ExecuteSqlMapper.java @@ -0,0 +1,24 @@ +package com.archive.project.common.mapper + +-INF.classes.com.archive.project.common.mapper; + +import java.util.LinkedHashMap; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface ExecuteSqlMapper { + List> select(String paramString); + + int insert(String paramString); + + int update(String paramString); + + int delete(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\common\mapper\ExecuteSqlMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/common/service/ExecuteSqlServiceImpl.java b/src/main/java/com/archive/project/common/service/ExecuteSqlServiceImpl.java new file mode 100644 index 0000000..aa56ca1 --- /dev/null +++ b/src/main/java/com/archive/project/common/service/ExecuteSqlServiceImpl.java @@ -0,0 +1,105 @@ +/* */ package com.archive.project.common.service + +-INF.classes.com.archive.project.common.service; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.project.common.mapper.ExecuteSqlMapper; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.jdbc.core.JdbcTemplate; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ @Service +/* */ public class ExecuteSqlServiceImpl +/* */ implements IExecuteSqlService +/* */ { +/* */ @Autowired +/* */ private ExecuteSqlMapper executeSqlMapper; +/* */ @Autowired +/* */ public JdbcTemplate jdbcTemplate; +/* */ +/* */ public String getSingle(String sql) { +/* 22 */ List> selectResult = this.executeSqlMapper.select(sql); +/* 23 */ if (selectResult.isEmpty() || selectResult.get(0) == null) { +/* 24 */ return ""; +/* */ } +/* 26 */ return ((LinkedHashMap)selectResult.get(0)).values().iterator().next().toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ public List> queryList(String sql) { +/* 32 */ return this.executeSqlMapper.select(sql); +/* */ } +/* */ +/* */ +/* */ public LinkedHashMap getOne(String sql) { +/* 37 */ return this.executeSqlMapper.select(sql).get(0); +/* */ } +/* */ +/* */ +/* */ public boolean insert(String sql) { +/* */ try { +/* 43 */ this.executeSqlMapper.insert(sql); +/* 44 */ return true; +/* 45 */ } catch (Exception e) { +/* 46 */ e.printStackTrace(); +/* 47 */ return false; +/* */ } +/* */ } +/* */ +/* */ +/* */ public boolean batchInsert(List sql) { +/* 53 */ return insert(StringUtils.join(sql, ';')); +/* */ } +/* */ +/* */ +/* */ public boolean update(String sql) { +/* */ try { +/* 59 */ this.executeSqlMapper.update(sql); +/* 60 */ return true; +/* 61 */ } catch (Exception e) { +/* 62 */ e.printStackTrace(); +/* 63 */ return false; +/* */ } +/* */ } +/* */ +/* */ +/* */ public boolean batchUpdate(List sql) { +/* 69 */ return update(StringUtils.join(sql, ';')); +/* */ } +/* */ +/* */ +/* */ public boolean delete(String sql) { +/* */ try { +/* 75 */ this.executeSqlMapper.delete(sql); +/* 76 */ return true; +/* 77 */ } catch (Exception e) { +/* 78 */ e.printStackTrace(); +/* 79 */ return false; +/* */ } +/* */ } +/* */ +/* */ +/* */ public boolean batchDelete(List sql) { +/* 85 */ return delete(StringUtils.join(sql, ';')); +/* */ } +/* */ +/* */ +/* */ public void jdbcTemplateExecute(String sql) throws Exception { +/* 90 */ this.jdbcTemplate.execute(sql); +/* */ } +/* */ +/* */ +/* */ public Integer jdbcTemplateQueryCount(String sql) { +/* 95 */ return (Integer)this.jdbcTemplate.queryForObject(sql, Integer.class); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\common\service\ExecuteSqlServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/common/service/IExecuteSqlService.java b/src/main/java/com/archive/project/common/service/IExecuteSqlService.java new file mode 100644 index 0000000..ae216bc --- /dev/null +++ b/src/main/java/com/archive/project/common/service/IExecuteSqlService.java @@ -0,0 +1,36 @@ +package com.archive.project.common.service + +-INF.classes.com.archive.project.common.service; + +import java.util.LinkedHashMap; +import java.util.List; + +public interface IExecuteSqlService { + String getSingle(String paramString); + + List> queryList(String paramString); + + LinkedHashMap getOne(String paramString); + + boolean insert(String paramString); + + boolean batchInsert(List paramList); + + boolean update(String paramString); + + boolean batchUpdate(List paramList); + + boolean delete(String paramString); + + boolean batchDelete(List paramList); + + void jdbcTemplateExecute(String paramString) throws Exception; + + Integer jdbcTemplateQueryCount(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\common\service\IExecuteSqlService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dabg/bfgl/controller/TKfBfglController.java b/src/main/java/com/archive/project/dabg/bfgl/controller/TKfBfglController.java new file mode 100644 index 0000000..9e915e5 --- /dev/null +++ b/src/main/java/com/archive/project/dabg/bfgl/controller/TKfBfglController.java @@ -0,0 +1,132 @@ +/* */ package com.archive.project.dabg.bfgl.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dabg.bfgl.domain.TKfBfgl; +/* */ import com.archive.project.dabg.bfgl.service.ITKfBfglService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dabg/bfgl"}) +/* */ public class TKfBfglController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "dabg/bfgl"; +/* */ +/* */ @Autowired +/* */ private ITKfBfglService tKfBfglService; +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:bfgl:view"}) +/* */ @GetMapping +/* */ public String bfgl() { +/* 41 */ return this.prefix + "/bfgl"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:bfgl:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(TKfBfgl tKfBfgl) { +/* 52 */ startPage(); +/* 53 */ List list = this.tKfBfglService.selectTKfBfglList(tKfBfgl); +/* 54 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:bfgl:export"}) +/* */ @Log(title = "库房八防管理", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TKfBfgl tKfBfgl) { +/* 66 */ List list = this.tKfBfglService.selectTKfBfglList(tKfBfgl); +/* 67 */ ExcelUtil util = new ExcelUtil(TKfBfgl.class); +/* 68 */ return util.exportExcel(list, "bfgl"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 77 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:bfgl:add"}) +/* */ @Log(title = "库房八防管理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TKfBfgl tKfBfgl) { +/* 89 */ return toAjax(this.tKfBfglService.insertTKfBfgl(tKfBfgl)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 98 */ TKfBfgl tKfBfgl = this.tKfBfglService.selectTKfBfglById(id); +/* 99 */ mmap.put("tKfBfgl", tKfBfgl); +/* 100 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:bfgl:edit"}) +/* */ @Log(title = "库房八防管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TKfBfgl tKfBfgl) { +/* 112 */ return toAjax(this.tKfBfglService.updateTKfBfgl(tKfBfgl)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:bfgl:remove"}) +/* */ @Log(title = "库房八防管理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 124 */ return toAjax(this.tKfBfglService.deleteTKfBfglByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dabg\bfgl\controller\TKfBfglController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dabg/bfgl/domain/TKfBfgl.java b/src/main/java/com/archive/project/dabg/bfgl/domain/TKfBfgl.java new file mode 100644 index 0000000..69770ab --- /dev/null +++ b/src/main/java/com/archive/project/dabg/bfgl/domain/TKfBfgl.java @@ -0,0 +1,145 @@ +/* */ package com.archive.project.dabg.bfgl.domain + +-INF.classes.com.archive.project.dabg.bfgl.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TKfBfgl +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "库房名称") +/* */ private String kfmc; +/* */ @Excel(name = "库房号") +/* */ private String kfh; +/* */ @Excel(name = "检查类型") +/* */ private String jclx; +/* */ @Excel(name = "检查人") +/* */ private String jcr; +/* */ @Excel(name = "状态") +/* */ private String status; +/* */ @Excel(name = "检查时间") +/* */ private String jcsj; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ +/* */ public void setId(Long id) { +/* 51 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 56 */ return this.id; +/* */ } +/* */ +/* */ public void setKfmc(String kfmc) { +/* 60 */ this.kfmc = kfmc; +/* */ } +/* */ +/* */ +/* */ public String getKfmc() { +/* 65 */ return this.kfmc; +/* */ } +/* */ +/* */ public void setKfh(String kfh) { +/* 69 */ this.kfh = kfh; +/* */ } +/* */ +/* */ +/* */ public String getKfh() { +/* 74 */ return this.kfh; +/* */ } +/* */ +/* */ public void setJclx(String jclx) { +/* 78 */ this.jclx = jclx; +/* */ } +/* */ +/* */ +/* */ public String getJclx() { +/* 83 */ return this.jclx; +/* */ } +/* */ +/* */ public void setStatus(String status) { +/* 87 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String getJcr() { +/* 92 */ return this.jcr; +/* */ } +/* */ +/* */ public void setJcr(String jcr) { +/* 96 */ this.jcr = jcr; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String getStatus() { +/* 103 */ return this.status; +/* */ } +/* */ +/* */ public void setJcsj(String jcsj) { +/* 107 */ this.jcsj = jcsj; +/* */ } +/* */ +/* */ +/* */ public String getJcsj() { +/* 112 */ return this.jcsj; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 116 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 121 */ return this.bz; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 126 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 127 */ .append("id", getId()) +/* 128 */ .append("kfmc", getKfmc()) +/* 129 */ .append("kfh", getKfh()) +/* 130 */ .append("jclx", getJclx()) +/* 131 */ .append("status", getStatus()) +/* 132 */ .append("jcsj", getJcsj()) +/* 133 */ .append("bz", getBz()) +/* 134 */ .append("jcr", getJcr()) +/* 135 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dabg\bfgl\domain\TKfBfgl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dabg/bfgl/mapper/TKfBfglMapper.java b/src/main/java/com/archive/project/dabg/bfgl/mapper/TKfBfglMapper.java new file mode 100644 index 0000000..13fdb8a --- /dev/null +++ b/src/main/java/com/archive/project/dabg/bfgl/mapper/TKfBfglMapper.java @@ -0,0 +1,28 @@ +package com.archive.project.dabg.bfgl.mapper + +-INF.classes.com.archive.project.dabg.bfgl.mapper; + +import com.archive.project.dabg.bfgl.domain.TKfBfgl; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface TKfBfglMapper { + TKfBfgl selectTKfBfglById(Long paramLong); + + List selectTKfBfglList(TKfBfgl paramTKfBfgl); + + int insertTKfBfgl(TKfBfgl paramTKfBfgl); + + int updateTKfBfgl(TKfBfgl paramTKfBfgl); + + int deleteTKfBfglById(Long paramLong); + + int deleteTKfBfglByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dabg\bfgl\mapper\TKfBfglMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dabg/bfgl/service/ITKfBfglService.java b/src/main/java/com/archive/project/dabg/bfgl/service/ITKfBfglService.java new file mode 100644 index 0000000..c3a5116 --- /dev/null +++ b/src/main/java/com/archive/project/dabg/bfgl/service/ITKfBfglService.java @@ -0,0 +1,26 @@ +package com.archive.project.dabg.bfgl.service + +-INF.classes.com.archive.project.dabg.bfgl.service; + +import com.archive.project.dabg.bfgl.domain.TKfBfgl; +import java.util.List; + +public interface ITKfBfglService { + TKfBfgl selectTKfBfglById(Long paramLong); + + List selectTKfBfglList(TKfBfgl paramTKfBfgl); + + int insertTKfBfgl(TKfBfgl paramTKfBfgl); + + int updateTKfBfgl(TKfBfgl paramTKfBfgl); + + int deleteTKfBfglByIds(String paramString); + + int deleteTKfBfglById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dabg\bfgl\service\ITKfBfglService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dabg/bfgl/service/impl/TKfBfglServiceImpl.java b/src/main/java/com/archive/project/dabg/bfgl/service/impl/TKfBfglServiceImpl.java new file mode 100644 index 0000000..4dd56cf --- /dev/null +++ b/src/main/java/com/archive/project/dabg/bfgl/service/impl/TKfBfglServiceImpl.java @@ -0,0 +1,102 @@ +/* */ package com.archive.project.dabg.bfgl.service.impl + +-INF.classes.com.archive.project.dabg.bfgl.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.dabg.bfgl.domain.TKfBfgl; +/* */ import com.archive.project.dabg.bfgl.mapper.TKfBfglMapper; +/* */ import com.archive.project.dabg.bfgl.service.ITKfBfglService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TKfBfglServiceImpl +/* */ implements ITKfBfglService +/* */ { +/* */ @Autowired +/* */ private TKfBfglMapper tKfBfglMapper; +/* */ +/* */ public TKfBfgl selectTKfBfglById(Long id) { +/* 32 */ return this.tKfBfglMapper.selectTKfBfglById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTKfBfglList(TKfBfgl tKfBfgl) { +/* 44 */ return this.tKfBfglMapper.selectTKfBfglList(tKfBfgl); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTKfBfgl(TKfBfgl tKfBfgl) { +/* 56 */ return this.tKfBfglMapper.insertTKfBfgl(tKfBfgl); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTKfBfgl(TKfBfgl tKfBfgl) { +/* 68 */ return this.tKfBfglMapper.updateTKfBfgl(tKfBfgl); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTKfBfglByIds(String ids) { +/* 80 */ return this.tKfBfglMapper.deleteTKfBfglByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTKfBfglById(Long id) { +/* 92 */ return this.tKfBfglMapper.deleteTKfBfglById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dabg\bfgl\service\impl\TKfBfglServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dabg/wsddj/controller/TKfWsddjController.java b/src/main/java/com/archive/project/dabg/wsddj/controller/TKfWsddjController.java new file mode 100644 index 0000000..1e65459 --- /dev/null +++ b/src/main/java/com/archive/project/dabg/wsddj/controller/TKfWsddjController.java @@ -0,0 +1,134 @@ +/* */ package com.archive.project.dabg.wsddj.controller + +-INF.classes.com.archive.project.dabg.wsddj.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dabg.wsddj.domain.TKfWsddj; +/* */ import com.archive.project.dabg.wsddj.service.ITKfWsddjService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dabg/wsddj"}) +/* */ public class TKfWsddjController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "dabg/wsddj"; +/* */ +/* */ @Autowired +/* */ private ITKfWsddjService tKfWsddjService; +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:wsddj:view"}) +/* */ @GetMapping +/* */ public String wsddj() { +/* 41 */ return this.prefix + "/wsddj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:wsddj:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(TKfWsddj tKfWsddj) { +/* 52 */ startPage(); +/* 53 */ List list = this.tKfWsddjService.selectTKfWsddjList(tKfWsddj); +/* 54 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:wsddj:export"}) +/* */ @Log(title = "库房温湿度登记", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TKfWsddj tKfWsddj) { +/* 66 */ List list = this.tKfWsddjService.selectTKfWsddjList(tKfWsddj); +/* 67 */ ExcelUtil util = new ExcelUtil(TKfWsddj.class); +/* 68 */ return util.exportExcel(list, "wsddj"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 77 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:wsddj:add"}) +/* */ @Log(title = "库房温湿度登记", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TKfWsddj tKfWsddj) { +/* 89 */ return toAjax(this.tKfWsddjService.insertTKfWsddj(tKfWsddj)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 98 */ TKfWsddj tKfWsddj = this.tKfWsddjService.selectTKfWsddjById(id); +/* 99 */ mmap.put("tKfWsddj", tKfWsddj); +/* 100 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:wsddj:edit"}) +/* */ @Log(title = "库房温湿度登记", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TKfWsddj tKfWsddj) { +/* 112 */ return toAjax(this.tKfWsddjService.updateTKfWsddj(tKfWsddj)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dabg:wsddj:remove"}) +/* */ @Log(title = "库房温湿度登记", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 124 */ return toAjax(this.tKfWsddjService.deleteTKfWsddjByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dabg\wsddj\controller\TKfWsddjController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dabg/wsddj/domain/TKfWsddj.java b/src/main/java/com/archive/project/dabg/wsddj/domain/TKfWsddj.java new file mode 100644 index 0000000..e51372d --- /dev/null +++ b/src/main/java/com/archive/project/dabg/wsddj/domain/TKfWsddj.java @@ -0,0 +1,157 @@ +/* */ package com.archive.project.dabg.wsddj.domain + +-INF.classes.com.archive.project.dabg.wsddj.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TKfWsddj +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "时间") +/* */ private String rqsj; +/* */ @Excel(name = "检查人") +/* */ private String jcr; +/* */ @Excel(name = "库房名称") +/* */ private String kfmc; +/* */ @Excel(name = "库房号") +/* */ private String kfh; +/* */ @Excel(name = "温度") +/* */ private String wd; +/* */ @Excel(name = "湿度") +/* */ private String sd; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "状态") +/* */ private String status; +/* */ +/* */ public void setId(Long id) { +/* 55 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 60 */ return this.id; +/* */ } +/* */ +/* */ public void setRqsj(String rqsj) { +/* 64 */ this.rqsj = rqsj; +/* */ } +/* */ +/* */ +/* */ public String getRqsj() { +/* 69 */ return this.rqsj; +/* */ } +/* */ +/* */ public void setJcr(String jcr) { +/* 73 */ this.jcr = jcr; +/* */ } +/* */ +/* */ +/* */ public String getJcr() { +/* 78 */ return this.jcr; +/* */ } +/* */ +/* */ public void setKfmc(String kfmc) { +/* 82 */ this.kfmc = kfmc; +/* */ } +/* */ +/* */ +/* */ public String getKfmc() { +/* 87 */ return this.kfmc; +/* */ } +/* */ +/* */ public void setKfh(String kfh) { +/* 91 */ this.kfh = kfh; +/* */ } +/* */ +/* */ +/* */ public String getKfh() { +/* 96 */ return this.kfh; +/* */ } +/* */ +/* */ public void setWd(String wd) { +/* 100 */ this.wd = wd; +/* */ } +/* */ +/* */ +/* */ public String getWd() { +/* 105 */ return this.wd; +/* */ } +/* */ +/* */ public void setSd(String sd) { +/* 109 */ this.sd = sd; +/* */ } +/* */ +/* */ +/* */ public String getSd() { +/* 114 */ return this.sd; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 118 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 123 */ return this.bz; +/* */ } +/* */ +/* */ public void setStatus(String status) { +/* 127 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 132 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 137 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 138 */ .append("id", getId()) +/* 139 */ .append("rqsj", getRqsj()) +/* 140 */ .append("jcr", getJcr()) +/* 141 */ .append("kfmc", getKfmc()) +/* 142 */ .append("kfh", getKfh()) +/* 143 */ .append("wd", getWd()) +/* 144 */ .append("sd", getSd()) +/* 145 */ .append("bz", getBz()) +/* 146 */ .append("status", getStatus()) +/* 147 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dabg\wsddj\domain\TKfWsddj.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dabg/wsddj/mapper/TKfWsddjMapper.java b/src/main/java/com/archive/project/dabg/wsddj/mapper/TKfWsddjMapper.java new file mode 100644 index 0000000..3b678fe --- /dev/null +++ b/src/main/java/com/archive/project/dabg/wsddj/mapper/TKfWsddjMapper.java @@ -0,0 +1,26 @@ +package com.archive.project.dabg.wsddj.mapper + +; + +import com.archive.project.dabg.wsddj.domain.TKfWsddj; +import java.util.List; + +public interface TKfWsddjMapper { + TKfWsddj selectTKfWsddjById(Long paramLong); + + List selectTKfWsddjList(TKfWsddj paramTKfWsddj); + + int insertTKfWsddj(TKfWsddj paramTKfWsddj); + + int updateTKfWsddj(TKfWsddj paramTKfWsddj); + + int deleteTKfWsddjById(Long paramLong); + + int deleteTKfWsddjByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dabg\wsddj\mapper\TKfWsddjMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dabg/wsddj/service/ITKfWsddjService.java b/src/main/java/com/archive/project/dabg/wsddj/service/ITKfWsddjService.java new file mode 100644 index 0000000..d472086 --- /dev/null +++ b/src/main/java/com/archive/project/dabg/wsddj/service/ITKfWsddjService.java @@ -0,0 +1,26 @@ +package com.archive.project.dabg.wsddj.service + +-INF.classes.com.archive.project.dabg.wsddj.service; + +import com.archive.project.dabg.wsddj.domain.TKfWsddj; +import java.util.List; + +public interface ITKfWsddjService { + TKfWsddj selectTKfWsddjById(Long paramLong); + + List selectTKfWsddjList(TKfWsddj paramTKfWsddj); + + int insertTKfWsddj(TKfWsddj paramTKfWsddj); + + int updateTKfWsddj(TKfWsddj paramTKfWsddj); + + int deleteTKfWsddjByIds(String paramString); + + int deleteTKfWsddjById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dabg\wsddj\service\ITKfWsddjService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dabg/wsddj/service/impl/TKfWsddjServiceImpl.java b/src/main/java/com/archive/project/dabg/wsddj/service/impl/TKfWsddjServiceImpl.java new file mode 100644 index 0000000..6ca9324 --- /dev/null +++ b/src/main/java/com/archive/project/dabg/wsddj/service/impl/TKfWsddjServiceImpl.java @@ -0,0 +1,102 @@ +/* */ package com.archive.project.dabg.wsddj.service.impl + +-INF.classes.com.archive.project.dabg.wsddj.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.dabg.wsddj.domain.TKfWsddj; +/* */ import com.archive.project.dabg.wsddj.mapper.TKfWsddjMapper; +/* */ import com.archive.project.dabg.wsddj.service.ITKfWsddjService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TKfWsddjServiceImpl +/* */ implements ITKfWsddjService +/* */ { +/* */ @Autowired +/* */ private TKfWsddjMapper tKfWsddjMapper; +/* */ +/* */ public TKfWsddj selectTKfWsddjById(Long id) { +/* 32 */ return this.tKfWsddjMapper.selectTKfWsddjById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTKfWsddjList(TKfWsddj tKfWsddj) { +/* 44 */ return this.tKfWsddjMapper.selectTKfWsddjList(tKfWsddj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTKfWsddj(TKfWsddj tKfWsddj) { +/* 56 */ return this.tKfWsddjMapper.insertTKfWsddj(tKfWsddj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTKfWsddj(TKfWsddj tKfWsddj) { +/* 68 */ return this.tKfWsddjMapper.updateTKfWsddj(tKfWsddj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTKfWsddjByIds(String ids) { +/* 80 */ return this.tKfWsddjMapper.deleteTKfWsddjByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTKfWsddjById(Long id) { +/* 92 */ return this.tKfWsddjMapper.deleteTKfWsddjById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dabg\wsddj\service\impl\TKfWsddjServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dacx/archivesearch/controller/ArchiveSearchController.java b/src/main/java/com/archive/project/dacx/archivesearch/controller/ArchiveSearchController.java new file mode 100644 index 0000000..f8ac039 --- /dev/null +++ b/src/main/java/com/archive/project/dacx/archivesearch/controller/ArchiveSearchController.java @@ -0,0 +1,72 @@ +/* */ package com.archive.project.dacx.archivesearch.controller + +-INF.classes.com.archive.project.dacx.archivesearch.controller; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.page.PageDomain; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.framework.web.page.TableSupport; +/* */ import com.archive.project.dacx.archivesearch.service.IArchiveSearchService; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dacx/archivesearch"}) +/* */ public class ArchiveSearchController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "dacx/archivesearch"; +/* */ +/* */ +/* */ @Autowired +/* */ private IArchiveSearchService archivesearchService; +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ +/* */ @RequiresPermissions({"dacx:archivesearch:view"}) +/* */ @GetMapping +/* */ public String archivesearch(ModelMap mmap) { +/* 45 */ return this.prefix + "/archivesearch"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dacx:archivesearch:list"}) +/* */ @PostMapping({"/list/{ft}/{py}/{qw}"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(String keyword, @PathVariable("ft") String ft, @PathVariable("py") String py, @PathVariable("qw") String qw) throws Exception { +/* 55 */ PageDomain pageDomain = TableSupport.buildPageRequest(); +/* 56 */ Integer pageNum = pageDomain.getPageNum(); +/* 57 */ Integer pageSize = pageDomain.getPageSize(); +/* 58 */ String orderBy = pageDomain.getOrderBy(); +/* 59 */ String orderByColumn = pageDomain.getOrderByColumn(); +/* 60 */ Map map = this.archivesearchService.selectArchiveList(pageNum, pageSize, orderBy, orderByColumn, keyword, ft, py, qw); +/* 61 */ TableDataInfo tableDataInfo = new TableDataInfo((List)map.get("list"), ((Integer)map.get("count")).intValue()); +/* 62 */ return tableDataInfo; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dacx\archivesearch\controller\ArchiveSearchController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dacx/archivesearch/service/IArchiveSearchService.java b/src/main/java/com/archive/project/dacx/archivesearch/service/IArchiveSearchService.java new file mode 100644 index 0000000..2cac82e --- /dev/null +++ b/src/main/java/com/archive/project/dacx/archivesearch/service/IArchiveSearchService.java @@ -0,0 +1,15 @@ +package com.archive.project.dacx.archivesearch.service + +-INF.classes.com.archive.project.dacx.archivesearch.service; + +import java.util.Map; + +public interface IArchiveSearchService { + Map selectArchiveList(Integer paramInteger1, Integer paramInteger2, String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, String paramString6); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dacx\archivesearch\service\IArchiveSearchService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dacx/archivesearch/service/impl/ArchiveSearchServiceImpl.java b/src/main/java/com/archive/project/dacx/archivesearch/service/impl/ArchiveSearchServiceImpl.java new file mode 100644 index 0000000..ca2b833 --- /dev/null +++ b/src/main/java/com/archive/project/dacx/archivesearch/service/impl/ArchiveSearchServiceImpl.java @@ -0,0 +1,163 @@ +/* */ package com.archive.project.dacx.archivesearch.service.impl; +/* */ +/* */ import com.archive.common.archiveUtil.AnsjTextUtil; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dacx.archivesearch.service.IArchiveSearchService; +/* */ import com.archive.project.dasz.archivetype.mapper.ArchiveTypeMapper; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import java.util.ArrayList; +/* */ import java.util.HashMap; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class ArchiveSearchServiceImpl +/* */ implements IArchiveSearchService +/* */ { +/* */ @Autowired +/* */ private ArchiveTypeMapper archiveTypeMapper; +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ +/* */ public Map selectArchiveList(Integer pageNum, Integer pageSize, String orderBy, String orderByColumn, String keyword, String ft, String py, String qw) { +/* 51 */ Map resultMap = new HashMap<>(); +/* 52 */ List> resultList = new ArrayList<>(); +/* 53 */ Integer count = Integer.valueOf(0); +/* 54 */ Integer beginNum = Integer.valueOf((pageNum.intValue() - 1) * pageSize.intValue()); +/* 55 */ String sql = ""; +/* 56 */ String condition = ""; +/* */ +/* 58 */ if (keyword.equals("0")) { +/* 59 */ keyword = ""; +/* */ } +/* */ +/* 62 */ if (!keyword.equals("")) { +/* 63 */ String[] sttrs = keyword.split(" "); +/* 64 */ for (int i = 0; i < sttrs.length; i++) { +/* */ +/* 66 */ String nlpfcResult = AnsjTextUtil.nlpfc(sttrs[i]); +/* 67 */ String[] words = nlpfcResult.split(","); +/* 68 */ for (int j = 0; j < words.length; j++) { +/* 69 */ condition = condition + " rowContext like '%" + words[i] + "%' OR"; +/* 70 */ if (ft.equals("true")) +/* */ { +/* 72 */ condition = condition + " fantiContext like '%" + words[i] + "%' OR"; +/* */ } +/* 74 */ if (py.equals("true")) +/* */ { +/* 76 */ condition = condition + " pinyinContext like '%" + words[i] + "%' OR"; +/* */ } +/* 78 */ if (qw.equals("true")) +/* */ { +/* 80 */ condition = condition + " fileContext like '%" + words[i] + "%' OR"; +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* 86 */ if (condition.trim().equals("")) { +/* 87 */ condition = " 1=1"; +/* */ } else { +/* 89 */ condition = condition.substring(0, condition.lastIndexOf("OR")); +/* */ } +/* 91 */ sql = "select archiveId,tableId,archiveTypeId,archiveTypeCode,archiveType,qzh,qzmc,yearCode,bgqx,tm,zrz,rq,dh,archiveTypeName from t_ar_total where " + condition + " limit " + beginNum + " , " + pageSize; +/* 92 */ if (StringUtils.isNotEmpty(orderBy) && StringUtils.isNotEmpty(orderByColumn)) { +/* 93 */ sql = sql + " order by " + orderByColumn + orderBy; +/* */ } +/* 95 */ resultList = this.executeSqlService.queryList(sql); +/* 96 */ String countSql = "select COUNT(*) from t_ar_total where " + condition; +/* 97 */ count = this.executeSqlService.jdbcTemplateQueryCount(countSql); +/* */ +/* */ +/* 100 */ if (resultList.size() > 0 && !keyword.equals("")) { +/* 101 */ for (int i = 0; i < resultList.size(); i++) { +/* 102 */ String qzh = (((LinkedHashMap)resultList.get(i)).get("qzh") == null) ? "" : ((LinkedHashMap)resultList.get(i)).get("qzh").toString(); +/* 103 */ String qzmc = (((LinkedHashMap)resultList.get(i)).get("qzmc") == null) ? "" : ((LinkedHashMap)resultList.get(i)).get("qzmc").toString(); +/* 104 */ String yearCode = (((LinkedHashMap)resultList.get(i)).get("yearCode") == null) ? "" : ((LinkedHashMap)resultList.get(i)).get("yearCode").toString(); +/* 105 */ String tm = (((LinkedHashMap)resultList.get(i)).get("tm") == null) ? "" : ((LinkedHashMap)resultList.get(i)).get("tm").toString(); +/* 106 */ String zrz = (((LinkedHashMap)resultList.get(i)).get("zrz") == null) ? "" : ((LinkedHashMap)resultList.get(i)).get("zrz").toString(); +/* 107 */ String rq = (((LinkedHashMap)resultList.get(i)).get("rq") == null) ? "" : ((LinkedHashMap)resultList.get(i)).get("rq").toString(); +/* 108 */ String dh = (((LinkedHashMap)resultList.get(i)).get("dh") == null) ? "" : ((LinkedHashMap)resultList.get(i)).get("dh").toString(); +/* 109 */ String archiveTypeName = (((LinkedHashMap)resultList.get(i)).get("archiveTypeName") == null) ? "" : ((LinkedHashMap)resultList.get(i)).get("archiveTypeName").toString(); +/* */ +/* 111 */ tm = getRedValueByKeyWord(tm, keyword); +/* 112 */ ((LinkedHashMap)resultList.get(i)).put("tm", tm); +/* 113 */ zrz = getRedValueByKeyWord(zrz, keyword); +/* 114 */ ((LinkedHashMap)resultList.get(i)).put("zrz", zrz); +/* 115 */ dh = getRedValueByKeyWord(dh, keyword); +/* 116 */ ((LinkedHashMap)resultList.get(i)).put("dh", dh); +/* 117 */ yearCode = getRedValueByKeyWord(yearCode, keyword); +/* 118 */ ((LinkedHashMap)resultList.get(i)).put("yearCode", yearCode); +/* 119 */ qzh = getRedValueByKeyWord(qzh, keyword); +/* 120 */ ((LinkedHashMap)resultList.get(i)).put("qzh", qzh); +/* 121 */ archiveTypeName = getRedValueByKeyWord(archiveTypeName, keyword); +/* 122 */ ((LinkedHashMap)resultList.get(i)).put("archiveTypeName", archiveTypeName); +/* 123 */ rq = getRedValueByKeyWord(rq, keyword); +/* 124 */ ((LinkedHashMap)resultList.get(i)).put("rq", rq); +/* 125 */ qzmc = getRedValueByKeyWord(qzmc, keyword); +/* 126 */ ((LinkedHashMap)resultList.get(i)).put("qzmc", qzmc); +/* */ } +/* */ } +/* 129 */ resultMap.put("list", resultList); +/* 130 */ resultMap.put("count", count); +/* 131 */ return resultMap; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getRedValueByKeyWord(String value, String keyword) { +/* 142 */ if (value != null && !value.equals("")) { +/* 143 */ String[] sttrs = keyword.split(" "); +/* 144 */ for (int i = 0; i < sttrs.length; i++) { +/* */ +/* 146 */ String nlpfcResult = AnsjTextUtil.nlpfc(sttrs[i]); +/* 147 */ String[] words = nlpfcResult.split(","); +/* 148 */ for (int j = 0; j < words.length; j++) { +/* 149 */ if (value.contains(words[i])) { +/* 150 */ value = value.replaceAll(words[i], "" + words[i] + ""); +/* */ } +/* */ } +/* */ } +/* */ } +/* 155 */ return value; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dacx\archivesearch\service\impl\ArchiveSearchServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/archiveimportbatch/controller/ArchiveImportBatchController.java b/src/main/java/com/archive/project/dajs/archiveimportbatch/controller/ArchiveImportBatchController.java new file mode 100644 index 0000000..f796393 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/archiveimportbatch/controller/ArchiveImportBatchController.java @@ -0,0 +1,412 @@ +/* */ package com.archive.project.dajs.archiveimportbatch.controller + +; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.TextUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dajs.archiveimportbatch.domain.ArchiveImportBatch; +/* */ import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; +/* */ import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.util.HashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.RequestParam; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ import org.springframework.web.multipart.MultipartFile; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dajs/archiveimportbatch"}) +/* */ public class ArchiveImportBatchController +/* */ extends BaseController +/* */ { +/* 47 */ private String prefix = "dajs/archiveimportbatch"; +/* */ +/* */ @Autowired +/* */ private IArchiveImportBatchService archiveImportBatchService; +/* */ +/* */ @Autowired +/* */ private IArchiveTypeService archiveTypeService; +/* */ +/* */ @Autowired +/* */ private IPhysicalTableColumnService physicalTableColumnService; +/* */ +/* */ @Autowired +/* */ private IPhysicalTableService physicalTableService; +/* */ +/* */ +/* */ @RequiresPermissions({"dajs:archiveimportbatch:view"}) +/* */ @GetMapping +/* */ public String ArchiveImportBatch() { +/* 65 */ return this.prefix + "/archiveimportbatch"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(ArchiveImportBatch archiveImportBatch) { +/* 76 */ startPage(); +/* 77 */ List list = this.archiveImportBatchService.selectArchiveImportBatchList(archiveImportBatch); +/* 78 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "档案导入", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(ArchiveImportBatch archiveImportBatch) { +/* 90 */ List list = this.archiveImportBatchService.selectArchiveImportBatchList(archiveImportBatch); +/* 91 */ ExcelUtil util = new ExcelUtil(ArchiveImportBatch.class); +/* 92 */ return util.exportExcel(list, "archiveImportBatch"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add(String archiveTypeId, String type, ModelMap mmap) { +/* 101 */ long timeNew = System.currentTimeMillis() / 1000L; +/* 102 */ mmap.put("batchNo", Long.valueOf(timeNew)); +/* 103 */ mmap.put("archiveTypeId", archiveTypeId); +/* 104 */ ArchiveType ArchiveType = this.archiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 105 */ if (type.equals("mldr")) { +/* 106 */ if (ArchiveType.getType().toLowerCase().equals("file")) { +/* 107 */ return this.prefix + "/addmldrwj"; +/* */ } +/* 109 */ return this.prefix + "/addmldraj"; +/* */ } +/* 111 */ if (type.equals("qwgj")) { +/* 112 */ List> list = this.archiveImportBatchService.getAllListToSelect(Long.parseLong(archiveTypeId), "file"); +/* 113 */ mmap.put("columnList", list); +/* 114 */ return this.prefix + "/addqwgj"; +/* */ } +/* 116 */ return this.prefix + "/addgsbdr"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "件目录导入", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(ArchiveImportBatch archiveImportBatch) throws IOException { +/* 130 */ Map adiMap = archiveImportBatch.getFormData(); +/* 131 */ archiveImportBatch.setBatcharchivetypeid(Long.valueOf(Long.parseLong(adiMap.get("batcharchivetypeid")))); +/* 132 */ archiveImportBatch.setBatchno(adiMap.get("batchno")); +/* 133 */ archiveImportBatch.setBatchname(adiMap.get("batchname")); +/* 134 */ archiveImportBatch.setTempfilepath(adiMap.get("tempfilepath")); +/* */ +/* 136 */ String filepath = adiMap.get("tempfilepath"); +/* 137 */ List> columnList = archiveImportBatch.getColumnData(); +/* 138 */ String[] result = this.archiveImportBatchService.excelImport(0, filepath, columnList, Long.parseLong(adiMap.get("batcharchivetypeid")), adiMap.get("batchno")); +/* */ +/* 140 */ ArchiveType ArchiveType = this.archiveTypeService.selectArchiveTypeById(archiveImportBatch.getBatcharchivetypeid()); +/* 141 */ archiveImportBatch.setBatcharchivetypename(ArchiveType.getArchiveName()); +/* 142 */ archiveImportBatch.setBatcharchivetypecode(ArchiveType.getArhciveCode()); +/* 143 */ archiveImportBatch.setImporttype("目录"); +/* 144 */ archiveImportBatch.setCreateUserid(ShiroUtils.getSysUser().getUserId()); +/* 145 */ archiveImportBatch.setCreateUsername(ShiroUtils.getSysUser().getUserName()); +/* */ +/* 147 */ String wjcontent = result[2]; +/* */ +/* */ +/* */ +/* 151 */ String messageFilePath = TextUtils.generateTxt(wjcontent, (String)adiMap.get("batchno") + ".txt"); +/* 152 */ archiveImportBatch.setBatchmessage(messageFilePath); +/* 153 */ archiveImportBatch.setBatchcontent(result[0] + "," + result[1]); +/* 154 */ return toAjax(this.archiveImportBatchService.insertArchiveImportBatch(archiveImportBatch)); +/* */ } +/* */ +/* */ +/* */ +/* */ @Log(title = "档案案卷目录导入", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/addFolderFileImport"}) +/* */ @ResponseBody +/* */ public AjaxResult addFolderFileImport(ArchiveImportBatch archiveImportBatch) throws IOException { +/* 163 */ Map adiMap = archiveImportBatch.getFormData(); +/* 164 */ archiveImportBatch.setBatcharchivetypeid(Long.valueOf(Long.parseLong(adiMap.get("batcharchivetypeid")))); +/* 165 */ archiveImportBatch.setBatchno(adiMap.get("batchno")); +/* 166 */ archiveImportBatch.setBatchname(adiMap.get("batchname")); +/* 167 */ archiveImportBatch.setTempfilepath(adiMap.get("tempfilepath")); +/* */ +/* 169 */ String filepath = adiMap.get("tempfilepath"); +/* 170 */ List> columnList = archiveImportBatch.getColumnData(); +/* 171 */ List> columnAJList = archiveImportBatch.getColumnAjData(); +/* 172 */ String[] result = this.archiveImportBatchService.excelImport(0, filepath, columnAJList, Long.parseLong(adiMap.get("batcharchivetypeid")), adiMap.get("batchno")); +/* 173 */ String[] result2 = this.archiveImportBatchService.excelImport(1, filepath, columnList, Long.parseLong(adiMap.get("batcharchivetypeid")), adiMap.get("batchno")); +/* */ +/* 175 */ ArchiveType ArchiveType = this.archiveTypeService.selectArchiveTypeById(archiveImportBatch.getBatcharchivetypeid()); +/* 176 */ archiveImportBatch.setBatcharchivetypename(ArchiveType.getArchiveName()); +/* 177 */ archiveImportBatch.setBatcharchivetypecode(ArchiveType.getArhciveCode()); +/* 178 */ archiveImportBatch.setImporttype("目录"); +/* 179 */ archiveImportBatch.setCreateUserid(ShiroUtils.getSysUser().getUserId()); +/* 180 */ archiveImportBatch.setCreateUsername(ShiroUtils.getSysUser().getUserName()); +/* */ +/* 182 */ String ajcontent = result[2]; +/* */ +/* */ +/* */ +/* 186 */ String wjcontent = result2[2]; +/* */ +/* */ +/* */ +/* */ +/* 191 */ String message = "案卷表:" + ajcontent + ", \r\n 卷内表:" + wjcontent; +/* 192 */ String messageFilePath = TextUtils.generateTxt(message, (String)adiMap.get("batchno") + ".txt"); +/* 193 */ archiveImportBatch.setBatchmessage(messageFilePath); +/* 194 */ archiveImportBatch.setBatchcontent("案卷表:" + result[0] + "," + result[1] + " \r\n 卷内表:" + result2[0] + "," + result2[1]); +/* 195 */ return toAjax(this.archiveImportBatchService.insertArchiveImportBatch(archiveImportBatch)); +/* */ } +/* */ +/* */ @Log(title = "档案全文挂接", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/qwgjUploadAndImport"}) +/* */ @ResponseBody +/* */ public AjaxResult qwgjUploadAndImport(ArchiveImportBatch archiveImportBatch) { +/* 202 */ Map adiMap = archiveImportBatch.getFormData(); +/* 203 */ archiveImportBatch.setBatcharchivetypeid(Long.valueOf(Long.parseLong(adiMap.get("batcharchivetypeid")))); +/* 204 */ ArchiveType ArchiveType = this.archiveTypeService.selectArchiveTypeById(archiveImportBatch.getBatcharchivetypeid()); +/* 205 */ archiveImportBatch.setBatcharchivetypename(ArchiveType.getArchiveName()); +/* 206 */ archiveImportBatch.setBatcharchivetypecode(ArchiveType.getArhciveCode()); +/* 207 */ archiveImportBatch.setBatchno(adiMap.get("batchno")); +/* 208 */ archiveImportBatch.setBatchname(adiMap.get("batchname")); +/* 209 */ archiveImportBatch.setBatchcontent(adiMap.get("batchcontent")); +/* 210 */ String messageFilePath = TextUtils.generateTxt(adiMap.get("batchmessage"), (String)adiMap.get("batchno") + ".txt"); +/* 211 */ archiveImportBatch.setBatchmessage(messageFilePath); +/* 212 */ archiveImportBatch.setCreateUserid(ShiroUtils.getSysUser().getUserId()); +/* 213 */ archiveImportBatch.setCreateUsername(ShiroUtils.getSysUser().getUserName()); +/* 214 */ archiveImportBatch.setImporttype("全文"); +/* 215 */ return toAjax(this.archiveImportBatchService.insertArchiveImportBatch(archiveImportBatch)); +/* */ } +/* */ +/* */ @Log(title = "档案格式包导入", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/addGsbdr"}) +/* */ @ResponseBody +/* */ public AjaxResult addSaveGsbdr(ArchiveImportBatch archiveImportBatch) { +/* 222 */ Map adiMap = archiveImportBatch.getFormData(); +/* 223 */ archiveImportBatch.setBatcharchivetypeid(Long.valueOf(Long.parseLong(adiMap.get("batcharchivetypeid")))); +/* 224 */ archiveImportBatch.setBatchno(adiMap.get("batchno")); +/* 225 */ archiveImportBatch.setBatchname(adiMap.get("batchname")); +/* 226 */ archiveImportBatch.setBatchcontent(adiMap.get("batchcontent")); +/* 227 */ String messageFilePath = TextUtils.generateTxt(adiMap.get("batchmessage"), (String)adiMap.get("batchno") + ".txt"); +/* 228 */ archiveImportBatch.setBatchmessage(messageFilePath); +/* 229 */ archiveImportBatch.setCreateUserid(ShiroUtils.getSysUser().getUserId()); +/* 230 */ archiveImportBatch.setCreateUsername(ShiroUtils.getSysUser().getUserName()); +/* 231 */ archiveImportBatch.setImporttype("格式包"); +/* 232 */ return toAjax(this.archiveImportBatchService.insertArchiveImportBatch(archiveImportBatch)); +/* */ } +/* */ +/* */ @Log(title = "档案导入-全文挂接", businessType = BusinessType.IMPORT) +/* */ @PostMapping({"/qwgjFileUpload"}) +/* */ @ResponseBody +/* */ public Map qwgjFileUpload(@RequestParam("file") MultipartFile[] files, long archiveTypeId, String column, String batchNo) { +/* 239 */ Map map = new HashMap<>(); +/* 240 */ int sucessCount = 0; +/* 241 */ int failCount = 0; +/* 242 */ String allMessage = ""; +/* */ try { +/* 244 */ if (files != null) { +/* 245 */ for (int i = 0; i < files.length; i++) { +/* 246 */ String fileName = files[i].getOriginalFilename(); +/* 247 */ String filepath = ArchiveConfig.getInstance().getUploadPath() + "/qwgj/temp"; +/* 248 */ File localFile = new File(filepath); +/* 249 */ if (!localFile.exists()) { +/* 250 */ localFile.mkdirs(); +/* */ } +/* 252 */ String path = filepath + File.separator + fileName; +/* */ +/* 254 */ File server_file = new File(path); +/* 255 */ files[i].transferTo(server_file); +/* */ +/* 257 */ Map resmap = this.archiveImportBatchService.insertDocByQwgj(path, archiveTypeId, column, batchNo); +/* 258 */ String res = resmap.get("res"); +/* 259 */ String msg = resmap.get("msg"); +/* 260 */ if (res.equals("1")) { +/* 261 */ sucessCount++; +/* */ } else { +/* 263 */ failCount++; +/* */ } +/* 265 */ allMessage = allMessage + msg + " \r\n "; +/* */ } +/* */ } +/* 268 */ map.put("msg", allMessage); +/* 269 */ map.put("context", "挂接成功" + sucessCount + "条,失败" + failCount + "条"); +/* 270 */ } catch (Exception e) { +/* */ +/* 272 */ System.out.println("ERROR全文挂接出现异常:" + e.getMessage()); +/* 273 */ map.put("context", "挂接失败,出现异常错误,错误信息:" + e.getMessage()); +/* */ } +/* 275 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/gsbdrFileUpload"}) +/* */ @ResponseBody +/* */ public Map gsbdrFileUpload(@RequestParam("file") MultipartFile[] files, long archiveTypeId, String column) { +/* 284 */ Map map = new HashMap<>(); +/* 285 */ int sucessCount = 0; +/* 286 */ int failCount = 0; +/* 287 */ String allMessage = ""; +/* 288 */ Map map1 = this.archiveImportBatchService.gsbUploadAndImport(files, archiveTypeId, column); +/* 289 */ allMessage = map1.get("message"); +/* 290 */ sucessCount = Integer.parseInt(map1.get("sucess")); +/* 291 */ failCount = Integer.parseInt(map1.get("fail")); +/* 292 */ String filePath = map1.get("path"); +/* 293 */ map.put("msg", allMessage); +/* 294 */ map.put("filePath", filePath); +/* 295 */ map.put("context", "挂接成功" + sucessCount + "条,失败" + failCount + "条"); +/* 296 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/mldrfileUploadAndImport"}) +/* */ @ResponseBody +/* */ public Map mldrfileUploadAndImport(@RequestParam("file") MultipartFile file, long archiveTypeId) { +/* 309 */ Map map = this.archiveImportBatchService.mldrFileUploadAndImport(file, archiveTypeId); +/* 310 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/folderMldrUploadAndImport"}) +/* */ @ResponseBody +/* */ public Map folderMldrUploadAndImport(@RequestParam("file") MultipartFile file, long archiveTypeId, String batchNo) { +/* 323 */ Map map = this.archiveImportBatchService.folderMldrUploadAndImport(file, archiveTypeId, batchNo); +/* 324 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 335 */ ArchiveImportBatch ArchiveImportBatch = this.archiveImportBatchService.selectArchiveImportBatchById(id); +/* 336 */ mmap.put("archiveImportBatch", ArchiveImportBatch); +/* 337 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dajs:archiveimportbatch:edit"}) +/* */ @Log(title = "档案导入-修改", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(ArchiveImportBatch archiveImportBatch) { +/* 349 */ return toAjax(this.archiveImportBatchService.updateArchiveImportBatch(archiveImportBatch)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dajs:archiveimportbatch:remove"}) +/* */ @Log(title = "档案导入-删除批次", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 362 */ return toAjax(this.archiveImportBatchService.deleteArchiveImportBatchByIds(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dajs:archiveimportbatch:remove"}) +/* */ @Log(title = "档案导入-删除批次及数据", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/removeData/{type}"}) +/* */ @ResponseBody +/* */ public AjaxResult removeData(@PathVariable("type") String type, String ids) { +/* 375 */ return toAjax(this.archiveImportBatchService.deleteArchiveImportBatchAndDataByIds(type, ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/importBatchMessage/{id}"}) +/* */ public String importBatchMessage(@PathVariable("id") Long id, ModelMap mmap) { +/* 387 */ String importBatchMessage = "无详细信息"; +/* 388 */ ArchiveImportBatch archiveImportBatch = this.archiveImportBatchService.selectArchiveImportBatchById(id); +/* 389 */ if (archiveImportBatch != null) { +/* 390 */ String filePath = archiveImportBatch.getBatchmessage(); +/* 391 */ if (StringUtils.isNotEmpty(filePath)) { +/* 392 */ File file = new File(filePath); +/* 393 */ if (file.exists()) { +/* 394 */ String text = TextUtils.readText(filePath); +/* 395 */ if (StringUtils.isNotEmpty(text)) { +/* 396 */ importBatchMessage = text; +/* */ } +/* */ } +/* */ } +/* */ } +/* 401 */ mmap.put("importBatchMessage", importBatchMessage); +/* 402 */ return this.prefix + "/importbatchmessage"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\archiveimportbatch\controller\ArchiveImportBatchController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/archiveimportbatch/domain/ArchiveImportBatch.java b/src/main/java/com/archive/project/dajs/archiveimportbatch/domain/ArchiveImportBatch.java new file mode 100644 index 0000000..30265f3 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/archiveimportbatch/domain/ArchiveImportBatch.java @@ -0,0 +1,266 @@ +/* */ package com.archive.project.dajs.archiveimportbatch.domain + +-INF.classes.com.archive.project.dajs.archiveimportbatch.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ArchiveImportBatch +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "批次号") +/* */ private String batchno; +/* */ @Excel(name = "批次名称") +/* */ private String batchname; +/* */ @Excel(name = "导入人") +/* */ private Long createUserid; +/* */ @Excel(name = "导入人姓名") +/* */ private String createUsername; +/* */ @Excel(name = "导入结果") +/* */ private String batchcontent; +/* */ @Excel(name = "导入详细信息") +/* */ private String batchmessage; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "档案类型id") +/* */ private Long batcharchivetypeid; +/* */ @Excel(name = "档案类型名称") +/* */ private String batcharchivetypename; +/* */ @Excel(name = "档案类型编码") +/* */ private String batcharchivetypecode; +/* */ @Excel(name = "导入类型(目录、全文、格式包)") +/* */ private String importtype; +/* */ @Excel(name = "导入临时文件路径") +/* */ private String tempfilepath; +/* */ private String cfsjclType; +/* */ private Map formData; +/* */ private List> columnData; +/* */ private List> columnAjData; +/* */ +/* */ public void setFormData(Map formData) { +/* 83 */ this.formData = formData; +/* */ } +/* */ +/* */ +/* */ public Map getFormData() { +/* 88 */ return this.formData; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setColumnAjData(List> columnAjData) { +/* 95 */ this.columnAjData = columnAjData; +/* */ } +/* */ +/* */ +/* */ public List> getColumnAjData() { +/* 100 */ return this.columnAjData; +/* */ } +/* */ +/* */ +/* */ public void setColumnData(List> columnData) { +/* 105 */ this.columnData = columnData; +/* */ } +/* */ +/* */ +/* */ public List> getColumnData() { +/* 110 */ return this.columnData; +/* */ } +/* */ +/* */ +/* */ public void setId(Long id) { +/* 115 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 120 */ return this.id; +/* */ } +/* */ +/* */ public void setBatchno(String batchno) { +/* 124 */ this.batchno = batchno; +/* */ } +/* */ +/* */ +/* */ public String getBatchno() { +/* 129 */ return this.batchno; +/* */ } +/* */ +/* */ public void setBatchname(String batchname) { +/* 133 */ this.batchname = batchname; +/* */ } +/* */ +/* */ +/* */ public String getBatchname() { +/* 138 */ return this.batchname; +/* */ } +/* */ +/* */ public void setCreateUserid(Long createUserid) { +/* 142 */ this.createUserid = createUserid; +/* */ } +/* */ +/* */ +/* */ public Long getCreateUserid() { +/* 147 */ return this.createUserid; +/* */ } +/* */ +/* */ public void setCreateUsername(String createUsername) { +/* 151 */ this.createUsername = createUsername; +/* */ } +/* */ +/* */ +/* */ public String getCreateUsername() { +/* 156 */ return this.createUsername; +/* */ } +/* */ +/* */ public void setBatchcontent(String batchcontent) { +/* 160 */ this.batchcontent = batchcontent; +/* */ } +/* */ +/* */ +/* */ public String getBatchcontent() { +/* 165 */ return this.batchcontent; +/* */ } +/* */ +/* */ public void setBatchmessage(String batchmessage) { +/* 169 */ this.batchmessage = batchmessage; +/* */ } +/* */ +/* */ +/* */ public String getBatchmessage() { +/* 174 */ return this.batchmessage; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 178 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 183 */ return this.bz; +/* */ } +/* */ +/* */ public void setBatcharchivetypeid(Long batcharchivetypeid) { +/* 187 */ this.batcharchivetypeid = batcharchivetypeid; +/* */ } +/* */ +/* */ +/* */ public Long getBatcharchivetypeid() { +/* 192 */ return this.batcharchivetypeid; +/* */ } +/* */ +/* */ public void setBatcharchivetypename(String batcharchivetypename) { +/* 196 */ this.batcharchivetypename = batcharchivetypename; +/* */ } +/* */ +/* */ +/* */ public String getBatcharchivetypename() { +/* 201 */ return this.batcharchivetypename; +/* */ } +/* */ +/* */ public void setBatcharchivetypecode(String batcharchivetypecode) { +/* 205 */ this.batcharchivetypecode = batcharchivetypecode; +/* */ } +/* */ +/* */ +/* */ public String getBatcharchivetypecode() { +/* 210 */ return this.batcharchivetypecode; +/* */ } +/* */ +/* */ public void setImporttype(String importtype) { +/* 214 */ this.importtype = importtype; +/* */ } +/* */ +/* */ +/* */ public String getImporttype() { +/* 219 */ return this.importtype; +/* */ } +/* */ +/* */ public void setTempfilepath(String tempfilepath) { +/* 223 */ this.tempfilepath = tempfilepath; +/* */ } +/* */ +/* */ +/* */ public String getTempfilepath() { +/* 228 */ return this.tempfilepath; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 233 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 234 */ .append("id", getId()) +/* 235 */ .append("createTime", getCreateTime()) +/* 236 */ .append("batchno", getBatchno()) +/* 237 */ .append("batchname", getBatchname()) +/* 238 */ .append("createUserid", getCreateUserid()) +/* 239 */ .append("createUsername", getCreateUsername()) +/* 240 */ .append("batchcontent", getBatchcontent()) +/* 241 */ .append("batchmessage", getBatchmessage()) +/* 242 */ .append("bz", getBz()) +/* 243 */ .append("batcharchivetypeid", getBatcharchivetypeid()) +/* 244 */ .append("batcharchivetypename", getBatcharchivetypename()) +/* 245 */ .append("batcharchivetypecode", getBatcharchivetypecode()) +/* 246 */ .append("importtype", getImporttype()) +/* 247 */ .append("tempfilepath", getTempfilepath()) +/* 248 */ .toString(); +/* */ } +/* */ +/* */ public String getCfsjclType() { +/* 252 */ return this.cfsjclType; +/* */ } +/* */ +/* */ public void setCfsjclType(String cfsjclType) { +/* 256 */ this.cfsjclType = cfsjclType; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\archiveimportbatch\domain\ArchiveImportBatch.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/archiveimportbatch/mapper/ArchiveImportBatchMapper.java b/src/main/java/com/archive/project/dajs/archiveimportbatch/mapper/ArchiveImportBatchMapper.java new file mode 100644 index 0000000..4f7e723 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/archiveimportbatch/mapper/ArchiveImportBatchMapper.java @@ -0,0 +1,28 @@ +package com.archive.project.dajs.archiveimportbatch.mapper + +-INF.classes.com.archive.project.dajs.archiveimportbatch.mapper; + +import com.archive.project.dajs.archiveimportbatch.domain.ArchiveImportBatch; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface ArchiveImportBatchMapper { + ArchiveImportBatch selectArchiveImportBatchById(Long paramLong); + + List selectArchiveImportBatchList(ArchiveImportBatch paramArchiveImportBatch); + + int insertArchiveImportBatch(ArchiveImportBatch paramArchiveImportBatch); + + int updateArchiveImportBatch(ArchiveImportBatch paramArchiveImportBatch); + + int deleteArchiveImportBatchById(Long paramLong); + + int deleteArchiveImportBatchByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\archiveimportbatch\mapper\ArchiveImportBatchMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/archiveimportbatch/service/IArchiveImportBatchService.java b/src/main/java/com/archive/project/dajs/archiveimportbatch/service/IArchiveImportBatchService.java new file mode 100644 index 0000000..b3d9615 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/archiveimportbatch/service/IArchiveImportBatchService.java @@ -0,0 +1,45 @@ +package com.archive.project.dajs.archiveimportbatch.service + +-INF.classes.com.archive.project.dajs.archiveimportbatch.service; + +import com.archive.project.dajs.archiveimportbatch.domain.ArchiveImportBatch; +import java.util.List; +import java.util.Map; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.multipart.MultipartFile; + +public interface IArchiveImportBatchService { + ArchiveImportBatch selectArchiveImportBatchById(Long paramLong); + + List selectArchiveImportBatchList(ArchiveImportBatch paramArchiveImportBatch); + + int insertArchiveImportBatch(ArchiveImportBatch paramArchiveImportBatch); + + int updateArchiveImportBatch(ArchiveImportBatch paramArchiveImportBatch); + + int deleteArchiveImportBatchByIds(String paramString); + + boolean deleteArchiveImportBatchAndDataByIds(String paramString1, String paramString2); + + int deleteArchiveImportBatchById(Long paramLong); + + String[] excelImport(int paramInt, String paramString1, List> paramList, long paramLong, String paramString2); + + List> getAllListToSelect(long paramLong, String paramString); + + Map mldrFileUploadAndImport(@RequestParam("file") MultipartFile paramMultipartFile, long paramLong); + + Map folderMldrUploadAndImport(@RequestParam("file") MultipartFile paramMultipartFile, long paramLong, String paramString); + + Map insertDocByQwgj(String paramString1, long paramLong, String paramString2, String paramString3); + + int getTableNewId(long paramLong); + + Map gsbUploadAndImport(MultipartFile[] paramArrayOfMultipartFile, long paramLong, String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\archiveimportbatch\service\IArchiveImportBatchService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/archiveimportbatch/service/impl/ArchiveImportBatchServiceImpl.java b/src/main/java/com/archive/project/dajs/archiveimportbatch/service/impl/ArchiveImportBatchServiceImpl.java new file mode 100644 index 0000000..0a3cde6 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/archiveimportbatch/service/impl/ArchiveImportBatchServiceImpl.java @@ -0,0 +1,877 @@ +/* */ package com.archive.project.dajs.archiveimportbatch.service.impl + +-INF.classes.com.archive.project.dajs.archiveimportbatch.service.impl; +/* */ +/* */ import com.archive.common.archiveUtil.ExcelUtilArchive; +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.archiveUtil.ZipUtil; +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dajs.archiveimportbatch.domain.ArchiveImportBatch; +/* */ import com.archive.project.dajs.archiveimportbatch.mapper.ArchiveImportBatchMapper; +/* */ import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dasz.ccgl.service.ICcglService; +/* */ import com.archive.project.dasz.physicaltable.domain.PhysicalTable; +/* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; +/* */ import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +/* */ import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; +/* */ import com.archive.project.system.dict.utils.DictUtils; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.text.DateFormat; +/* */ import java.text.DecimalFormat; +/* */ import java.text.SimpleDateFormat; +/* */ import java.util.ArrayList; +/* */ import java.util.Date; +/* */ import java.util.HashMap; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.aspectj.util.FileUtil; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.web.bind.annotation.RequestParam; +/* */ import org.springframework.web.multipart.MultipartFile; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class ArchiveImportBatchServiceImpl +/* */ implements IArchiveImportBatchService +/* */ { +/* */ @Autowired +/* */ private ArchiveImportBatchMapper archiveImportBatchMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private IArchiveTypeService archiveTypeService; +/* */ @Autowired +/* */ private IPhysicalTableService physicalTableService; +/* */ @Autowired +/* */ private IPhysicalTableColumnService physicalTableColumnService; +/* */ @Autowired +/* */ private ICcglService ccglService; +/* */ +/* */ public ArchiveImportBatch selectArchiveImportBatchById(Long id) { +/* 74 */ return this.archiveImportBatchMapper.selectArchiveImportBatchById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectArchiveImportBatchList(ArchiveImportBatch archiveImportBatch) { +/* 86 */ return this.archiveImportBatchMapper.selectArchiveImportBatchList(archiveImportBatch); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertArchiveImportBatch(ArchiveImportBatch archiveImportBatch) { +/* 98 */ archiveImportBatch.setCreateTime(DateUtils.getNowDate()); +/* 99 */ return this.archiveImportBatchMapper.insertArchiveImportBatch(archiveImportBatch); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateArchiveImportBatch(ArchiveImportBatch archiveImportBatch) { +/* 111 */ return this.archiveImportBatchMapper.updateArchiveImportBatch(archiveImportBatch); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteArchiveImportBatchByIds(String ids) { +/* 123 */ return this.archiveImportBatchMapper.deleteArchiveImportBatchByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deleteArchiveImportBatchAndDataByIds(String type, String ids) { +/* 136 */ boolean res = false; +/* */ try { +/* 138 */ String[] idss = Convert.toStrArray(ids); +/* 139 */ for (int i = 0; i < idss.length; i++) { +/* 140 */ String id = idss[i]; +/* 141 */ if (id != null && !id.equals("")) { +/* */ +/* 143 */ ArchiveImportBatch archiveImportBatch = this.archiveImportBatchMapper.selectArchiveImportBatchById(Long.valueOf(Long.parseLong(id))); +/* 144 */ long archiveTypeId = archiveImportBatch.getBatcharchivetypeid().longValue(); +/* 145 */ ArchiveType archiveType = this.archiveTypeService.selectArchiveTypeById(Long.valueOf(archiveTypeId)); +/* 146 */ String datype = archiveType.getType(); +/* 147 */ String archiveCode = archiveType.getArhciveCode(); +/* 148 */ if (datype.equals("folder")) { +/* */ +/* 150 */ if (type.equals("mldr")) { +/* */ +/* 152 */ String deleteAjSql = "delete from t_ar_" + archiveCode + "_folder where batchNo='" + archiveImportBatch.getBatchno() + "'"; +/* 153 */ String deleteJnSql = "delete from t_ar_" + archiveCode + "_file where batchNo='" + archiveImportBatch.getBatchno() + "'"; +/* 154 */ this.executeSqlService.delete(deleteAjSql); +/* 155 */ this.executeSqlService.delete(deleteJnSql); +/* 156 */ } else if (type.equals("qwgj")) { +/* */ +/* 158 */ String JnSql = "select filepath from t_ar_" + archiveCode + "_document where batchNo='" + archiveImportBatch.getBatchno() + "'"; +/* 159 */ List> datalist = this.executeSqlService.queryList(JnSql); +/* 160 */ for (int k = 0; k < datalist.size(); k++) { +/* 161 */ String path = (((LinkedHashMap)datalist.get(k)).get("filepath") == null) ? "" : ((LinkedHashMap)datalist.get(k)).get("filepath").toString(); +/* 162 */ File fil = new File(path); +/* 163 */ if (fil.exists()) { +/* 164 */ fil.setWritable(true); +/* 165 */ fil.delete(); +/* */ } +/* */ } +/* 168 */ String deleteDocumentSql = "delete from t_ar_" + archiveCode + "_document where batchNo='" + archiveImportBatch.getBatchno() + "'"; +/* 169 */ this.executeSqlService.delete(deleteDocumentSql); +/* */ } +/* 171 */ } else if (datype.equals("file")) { +/* */ +/* 173 */ if (type.equals("mldr")) { +/* */ +/* 175 */ String deleteSql = "delete from t_ar_" + archiveCode + "_file where batchNo='" + archiveImportBatch.getBatchno() + "'"; +/* 176 */ this.executeSqlService.delete(deleteSql); +/* 177 */ } else if (type.equals("qwgj")) { +/* */ +/* 179 */ String fileSql = "select filepath from t_ar_" + archiveCode + "_document where batchNo='" + archiveImportBatch.getBatchno() + "'"; +/* 180 */ List> datalist = this.executeSqlService.queryList(fileSql); +/* 181 */ for (int k = 0; k < datalist.size(); k++) { +/* 182 */ String path = (((LinkedHashMap)datalist.get(k)).get("filepath") == null) ? "" : ((LinkedHashMap)datalist.get(k)).get("filepath").toString(); +/* 183 */ File fil = new File(path); +/* 184 */ if (fil.exists()) { +/* 185 */ fil.setWritable(true); +/* 186 */ fil.delete(); +/* */ } +/* */ } +/* 189 */ String deleteDocumentSql = "delete from t_ar_" + archiveCode + "_document where batchNo='" + archiveImportBatch.getBatchno() + "'"; +/* 190 */ this.executeSqlService.delete(deleteDocumentSql); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 197 */ this.archiveImportBatchMapper.deleteArchiveImportBatchByIds(Convert.toStrArray(ids)); +/* 198 */ res = true; +/* 199 */ } catch (Exception ex) { +/* 200 */ System.out.println("ERROR出现异常信息:" + ex.getMessage()); +/* */ } +/* 202 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteArchiveImportBatchById(Long id) { +/* 215 */ return this.archiveImportBatchMapper.deleteArchiveImportBatchById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String[] excelImport(int sheetindex, String filepath, List> columnList, long batcharchivetypeid, String batchNo) { +/* 228 */ String ownerId = ""; +/* 229 */ String[] sttr = new String[3]; +/* 230 */ int successCount = 0; +/* 231 */ int failCount = 0; +/* 232 */ String messageContent = ""; +/* 233 */ long tableId = TableUtil.getTableIdByArchiveTypeId(batcharchivetypeid); +/* 234 */ String tableName = TableUtil.getTableName(Long.valueOf(tableId)); +/* 235 */ String[] excelColuns = ExcelUtilArchive.readExcelFirstRow(filepath, Integer.valueOf(sheetindex)); +/* 236 */ List> listdata = ExcelUtilArchive.readExcel(filepath, Integer.valueOf(sheetindex)); +/* 237 */ for (int i = 0; i < listdata.size(); i++) { +/* 238 */ Map map = listdata.get(i); +/* 239 */ String insertConlums = ""; +/* 240 */ String insertValuess = ""; +/* 241 */ for (int j = 0; j < columnList.size(); j++) { +/* 242 */ for (int k = 0; k < excelColuns.length; k++) { +/* 243 */ String excelColumn = (String)((Map)columnList.get(j)).get("excelColumn"); +/* 244 */ String archiveColumn = (String)((Map)columnList.get(j)).get("archiveColumn"); +/* 245 */ if (!archiveColumn.equals("") && !archiveColumn.equals("请选择") && +/* 246 */ excelColumn.equals(excelColuns[k])) { +/* 247 */ String value = map.get(excelColuns[k]); +/* 248 */ if (!value.equals("") && !value.trim().equals("") && !value.trim().equals("请选择")) { +/* */ +/* */ +/* 251 */ if (sheetindex == 1 && "档号".equals(excelColuns[k]) && +/* 252 */ value.indexOf("-") != -1) { +/* 253 */ String folderDh = value.substring(0, value.lastIndexOf("-")); +/* 254 */ String folderTableName = tableName.toLowerCase().replace("_file", "_folder"); +/* 255 */ String queryOwnerIdSql = "SELECT MAX(ID) FROM " + folderTableName + " WHERE DH = '" + folderDh + "'"; +/* 256 */ ownerId = this.executeSqlService.getSingle(queryOwnerIdSql); +/* */ } +/* */ +/* */ +/* */ +/* 261 */ insertConlums = insertConlums + "," + archiveColumn; +/* 262 */ insertValuess = insertValuess + ",'" + getCodeValue(tableId, archiveColumn, value) + "'"; +/* */ +/* */ +/* */ break; +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 272 */ if (sheetindex == 1) { +/* 273 */ tableName = tableName.toLowerCase().replace("_folder", "_file"); +/* */ } +/* 275 */ if (ownerId != null && !ownerId.equals("")) { +/* 276 */ insertConlums = insertConlums + ", ownerid"; +/* 277 */ insertValuess = insertValuess + ",'" + ownerId + "'"; +/* */ } +/* 279 */ if (insertConlums.length() > 1) { +/* 280 */ insertConlums = insertConlums.substring(1, insertConlums.length()); +/* 281 */ insertValuess = insertValuess.substring(1, insertValuess.length()); +/* */ } +/* 283 */ String insertSql = "insert into " + tableName + "(" + insertConlums + ",is_delete,status,batchno) values(" + insertValuess + ",0,60,'" + batchNo + "')"; +/* 284 */ System.out.println(insertSql); +/* 285 */ if (this.executeSqlService.insert(insertSql)) { +/* 286 */ successCount++; +/* */ } else { +/* 288 */ if (sheetindex == 1) { +/* 289 */ messageContent = messageContent + " 案卷页第" + i + "行导入失败;"; +/* */ } else { +/* 291 */ messageContent = messageContent + " 文件页第" + i + "行导入失败;"; +/* */ } +/* 293 */ failCount++; +/* */ } +/* */ } +/* 296 */ if (messageContent.equals("")) { +/* 297 */ messageContent = "导入成功" + successCount + "条,无异常情况"; +/* */ } +/* 299 */ sttr[0] = "导入成功" + successCount + "条"; +/* 300 */ sttr[1] = "导入失败" + failCount + "条"; +/* 301 */ sttr[2] = messageContent; +/* 302 */ return sttr; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List> getAllListToSelect(long archiveTypeId, String tableType) { +/* 314 */ List> columnsList = new ArrayList<>(); +/* 315 */ List lphycs = new ArrayList<>(); +/* 316 */ ArchiveType archivetypes = this.archiveTypeService.selectArchiveTypeById(Long.valueOf(archiveTypeId)); +/* 317 */ String archiveCode = archivetypes.getArhciveCode(); +/* 318 */ String archiveType = archivetypes.getType(); +/* 319 */ String tableName = ""; +/* 320 */ tableName = "t_ar_" + archiveCode + "_" + tableType; +/* 321 */ if (!tableName.equals("")) { +/* 322 */ PhysicalTable pt = new PhysicalTable(); +/* 323 */ pt.setTablename(tableName.toLowerCase()); +/* 324 */ List pts = this.physicalTableService.selectPhysicalTableList(pt); +/* 325 */ if (pts.size() > 0 && pts.get(0) != null) { +/* 326 */ PhysicalTableColumn ptc = new PhysicalTableColumn(); +/* 327 */ ptc.setTableId(((PhysicalTable)pts.get(0)).getId()); +/* 328 */ lphycs = this.physicalTableColumnService.selectPhysicalTableColumnList(ptc); +/* */ +/* */ +/* 331 */ for (int i = 0; i < lphycs.size(); i++) { +/* 332 */ Map columsMap = new HashMap<>(); +/* 333 */ columsMap.put("value", ((PhysicalTableColumn)lphycs.get(i)).getColumnCode()); +/* 334 */ columsMap.put("text", ((PhysicalTableColumn)lphycs.get(i)).getColumnName()); +/* 335 */ columnsList.add(columsMap); +/* */ } +/* */ } +/* */ } +/* 339 */ return columnsList; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map insertDocByQwgj(String path, long archiveTypeId, String column, String batchNo) { +/* 350 */ Map map = new HashMap<>(); +/* 351 */ File file = new File(path); +/* 352 */ String fileName = file.getName().substring(0, file.getName().lastIndexOf('.')); +/* 353 */ String hz = file.getName().substring(file.getName().lastIndexOf('.') + 1); +/* 354 */ String fileSize = FormetFileSize(file.length()); +/* 355 */ DateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); +/* 356 */ ArchiveType archivetypes = this.archiveTypeService.selectArchiveTypeById(Long.valueOf(archiveTypeId)); +/* 357 */ String archiveCode = archivetypes.getArhciveCode(); +/* 358 */ String tableName = "t_ar_" + archiveCode + "_file"; +/* 359 */ String tableId = TableUtil.getTableId(tableName); +/* 360 */ String docTableName = "t_ar_" + archiveCode + "_document"; +/* 361 */ String selectIdSql = "select id from " + tableName + " where " + column + "='" + fileName + "' and is_delete='0'"; +/* 362 */ System.out.println("全文挂接查找条目idsql:" + selectIdSql); +/* 363 */ List> idlist = this.executeSqlService.queryList(selectIdSql); +/* 364 */ if (idlist.size() > 0 && idlist.get(0) != null) { +/* 365 */ String archiveId = (((LinkedHashMap)idlist.get(0)).get("id") == null) ? "" : ((LinkedHashMap)idlist.get(0)).get("id").toString(); +/* */ +/* 367 */ String xdlj = this.ccglService.getCreateDocumentPathByFile(Long.parseLong(archiveId), Long.parseLong(tableId)); +/* 368 */ String filepath = ArchiveConfig.getInstance().getUploadPath() + "/DocumentFile" + xdlj; +/* 369 */ filepath = filepath.replaceAll("\\\\", "/"); +/* 370 */ File localFile = new File(filepath); +/* 371 */ if (!localFile.exists()) { +/* 372 */ localFile.mkdirs(); +/* */ } +/* 374 */ String mewpath = filepath + "/" + file.getName(); +/* */ try { +/* 376 */ FileUtil.copyFile(new File(path), new File(mewpath)); +/* 377 */ } catch (IOException e) { +/* 378 */ e.printStackTrace(); +/* */ } +/* */ +/* 381 */ String insertDocSql = "insert into " + docTableName + "(create_time,create_user,filename,filehz,filesize,filepath,ownerid,tableId,batcharchivetypeid,batchno) values('" + dateformat.format(new Date()) + "','" + ShiroUtils.getSysUser().getUserName() + "','" + fileName + "','" + hz + "','" + fileSize + "','" + mewpath + "','" + archiveId + "','" + tableId + "','" + archiveTypeId + "','" + batchNo + "')"; +/* 382 */ this.executeSqlService.insert(insertDocSql); +/* */ +/* 384 */ String updateSql = "update " + tableName + " set dqzws=dqzws+1 where id=" + archiveId; +/* 385 */ this.executeSqlService.update(updateSql); +/* 386 */ map.put("res", "1"); +/* 387 */ map.put("msg", "文件【" + fileName + "】挂接成功!"); +/* */ } else { +/* 389 */ map.put("res", "0"); +/* 390 */ map.put("msg", "文件【" + fileName + "】挂接失败,原因是没有找到对应条目!"); +/* */ } +/* 392 */ return map; +/* */ } +/* */ +/* 395 */ int folderId = 0; +/* 396 */ int fileId = 0; +/* 397 */ int documentId = 0; +/* 398 */ int infoId = 0; +/* 399 */ int successCount = 0; +/* 400 */ int failCount = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map gsbUploadAndImport(MultipartFile[] files, long archiveTypeId, String column) { +/* 409 */ String resMessage = ""; +/* 410 */ String path = ""; +/* */ try { +/* 412 */ if (files != null) { +/* 413 */ for (int i = 0; i < files.length; i++) { +/* 414 */ String fileName = files[i].getOriginalFilename(); +/* 415 */ String filepath = ArchiveConfig.getInstance().getUploadPath() + "/gsbdr/temp"; +/* 416 */ File localFile = new File(filepath); +/* 417 */ if (!localFile.exists()) { +/* 418 */ localFile.mkdirs(); +/* */ } +/* 420 */ path = filepath + "/" + fileName; +/* 421 */ File server_file = new File(path); +/* 422 */ files[i].transferTo(server_file); +/* */ +/* */ +/* 425 */ String newfileName = server_file.getName().replace(".zip", ""); +/* 426 */ newfileName = newfileName.replace(".rar", ""); +/* */ +/* 428 */ ZipUtil.unZip(server_file, filepath); +/* */ +/* 430 */ System.out.println(filepath + "/" + newfileName); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 549 */ catch (Exception e) { +/* 550 */ resMessage = "格式包上传导入出现异常:" + e.getMessage(); +/* 551 */ e.printStackTrace(); +/* */ } +/* 553 */ Map resMap = new HashMap<>(); +/* 554 */ resMap.put("message", resMessage); +/* 555 */ resMap.put("path", path); +/* 556 */ resMap.put("sucess", String.valueOf(this.successCount)); +/* 557 */ resMap.put("fail", String.valueOf(this.failCount)); +/* 558 */ return resMap; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map mldrFileUploadAndImport(MultipartFile file, long archiveTypeId) { +/* 570 */ Map map = new HashMap<>(); +/* 571 */ List> columnsList = new ArrayList<>(); +/* */ +/* 573 */ if (file.isEmpty()) { +/* 574 */ return map; +/* */ } +/* 576 */ String fileName = file.getOriginalFilename(); +/* 577 */ String filepath = ArchiveConfig.getInstance().getUploadPath() + "/mldr/temp"; +/* 578 */ File localFile = new File(filepath); +/* 579 */ if (!localFile.exists()) { +/* 580 */ localFile.mkdirs(); +/* */ } +/* 582 */ String path = filepath + "/" + fileName; +/* */ try { +/* 584 */ File server_file = new File(path); +/* 585 */ file.transferTo(server_file); +/* */ } +/* 587 */ catch (Exception exception) {} +/* */ +/* */ +/* 590 */ map.put("filePath", path); +/* */ +/* 592 */ String[] excelColuns = ExcelUtilArchive.readExcelFirstRow(path, Integer.valueOf(0)); +/* 593 */ List lphycs = new ArrayList<>(); +/* 594 */ if (excelColuns != null) { +/* */ +/* 596 */ ArchiveType archivetypes = this.archiveTypeService.selectArchiveTypeById(Long.valueOf(archiveTypeId)); +/* 597 */ String archiveCode = archivetypes.getArhciveCode(); +/* 598 */ String archiveType = archivetypes.getType(); +/* 599 */ String tableName = ""; +/* 600 */ if (archiveType.toLowerCase().equals("file")) { +/* 601 */ tableName = "t_ar_" + archiveCode + "_file"; +/* 602 */ } else if (archiveType.toLowerCase().equals("folder")) { +/* 603 */ tableName = "t_ar_" + archiveCode + "_folder"; +/* */ } +/* 605 */ if (!tableName.equals("")) { +/* 606 */ PhysicalTable pt = new PhysicalTable(); +/* 607 */ pt.setTablename(tableName.toLowerCase()); +/* 608 */ List pts = this.physicalTableService.selectPhysicalTableList(pt); +/* 609 */ if (pts.size() > 0 && pts.get(0) != null) { +/* 610 */ PhysicalTableColumn ptc = new PhysicalTableColumn(); +/* 611 */ ptc.setTableId(((PhysicalTable)pts.get(0)).getId()); +/* 612 */ lphycs = this.physicalTableColumnService.selectPhysicalTableColumnList(ptc); +/* */ +/* */ +/* 615 */ for (int j = 0; j < lphycs.size(); j++) { +/* 616 */ Map columsMap = new HashMap<>(); +/* 617 */ columsMap.put("value", ((PhysicalTableColumn)lphycs.get(j)).getColumnCode()); +/* 618 */ columsMap.put("text", ((PhysicalTableColumn)lphycs.get(j)).getColumnName()); +/* 619 */ columnsList.add(columsMap); +/* */ } +/* */ } else { +/* 622 */ map.put("status", "0"); +/* 623 */ map.put("msg", "获取档案表信息失败!"); +/* */ } +/* */ } else { +/* 626 */ map.put("status", "0"); +/* 627 */ map.put("msg", "获取档案表name失败!"); +/* */ } +/* */ +/* 630 */ List> allList = new ArrayList<>(); +/* 631 */ Map resMap = null; +/* 632 */ for (int i = 0; i < excelColuns.length; i++) { +/* 633 */ resMap = new HashMap<>(); +/* 634 */ resMap.put("excelColumn", excelColuns[i]); +/* */ +/* 636 */ String archiveColumn = "请选择"; +/* 637 */ for (int j = 0; j < lphycs.size(); j++) { +/* 638 */ String showName = ((PhysicalTableColumn)lphycs.get(j)).getColumnName(); +/* 639 */ if (showName.equals(excelColuns[i])) { +/* 640 */ archiveColumn = ((PhysicalTableColumn)lphycs.get(j)).getColumnCode(); +/* */ break; +/* */ } +/* */ } +/* 644 */ resMap.put("archiveColumn", archiveColumn); +/* 645 */ allList.add(resMap); +/* */ } +/* 647 */ map.put("data", allList); +/* 648 */ map.put("status", "1"); +/* 649 */ map.put("msg", "成功!"); +/* */ } else { +/* 651 */ map.put("status", "0"); +/* 652 */ map.put("msg", "excel获取表头失败!"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 660 */ map.put("columnsList", columnsList); +/* 661 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map folderMldrUploadAndImport(@RequestParam("file") MultipartFile file, long archiveTypeId, String batchNo) { +/* 676 */ Map map = new HashMap<>(); +/* 677 */ List> allAJList = new ArrayList<>(); +/* 678 */ List> allJNList = new ArrayList<>(); +/* 679 */ List> AJcolumnsList = new ArrayList<>(); +/* 680 */ List> JNcolumnsList = new ArrayList<>(); +/* */ +/* 682 */ if (file.isEmpty()) { +/* 683 */ return map; +/* */ } +/* 685 */ String fileName = file.getOriginalFilename(); +/* 686 */ String filepath = ArchiveConfig.getInstance().getUploadPath() + "/mldr/temp"; +/* 687 */ File localFile = new File(filepath); +/* 688 */ if (!localFile.exists()) { +/* 689 */ localFile.mkdirs(); +/* */ } +/* 691 */ String path = filepath + "/" + fileName; +/* */ try { +/* 693 */ File server_file = new File(path); +/* 694 */ file.transferTo(server_file); +/* */ } +/* 696 */ catch (Exception exception) {} +/* */ +/* */ +/* 699 */ map.put("filePath", path); +/* */ +/* 701 */ int a = ExcelUtilArchive.getSheetCount(path); +/* 702 */ if (a < 2) { +/* 703 */ map.put("status", "0"); +/* 704 */ map.put("msg", "excel格式不对,请保证excel同时有案卷和卷内的sheet页!"); +/* */ } else { +/* 706 */ String[] AJexcelColuns = ExcelUtilArchive.readExcelFirstRow(path, Integer.valueOf(0)); +/* 707 */ String[] JNexcelColuns = ExcelUtilArchive.readExcelFirstRow(path, Integer.valueOf(1)); +/* 708 */ List lphycs = new ArrayList<>(); +/* 709 */ if (AJexcelColuns != null && JNexcelColuns != null) { +/* */ +/* 711 */ ArchiveType archivetypes = this.archiveTypeService.selectArchiveTypeById(Long.valueOf(archiveTypeId)); +/* 712 */ String archiveCode = archivetypes.getArhciveCode(); +/* 713 */ String AJtableName = ""; +/* 714 */ String JNtableName = ""; +/* 715 */ AJtableName = "t_ar_" + archiveCode + "_folder"; +/* 716 */ JNtableName = "t_ar_" + archiveCode + "_file"; +/* */ +/* 718 */ if (!AJtableName.equals("")) { +/* 719 */ PhysicalTableColumn ptc = new PhysicalTableColumn(); +/* 720 */ ptc.setTableId(Long.valueOf(TableUtil.getTableId(AJtableName))); +/* 721 */ lphycs = this.physicalTableColumnService.selectPhysicalTableColumnList(ptc); +/* */ +/* */ +/* 724 */ for (int i = 0; i < lphycs.size(); i++) { +/* 725 */ Map columsMap = new HashMap<>(); +/* 726 */ columsMap.put("value", ((PhysicalTableColumn)lphycs.get(i)).getColumnCode()); +/* 727 */ columsMap.put("text", ((PhysicalTableColumn)lphycs.get(i)).getColumnName()); +/* 728 */ AJcolumnsList.add(columsMap); +/* */ } +/* */ +/* */ +/* 732 */ Map resMap = null; +/* 733 */ for (int j = 0; j < AJexcelColuns.length; j++) { +/* 734 */ resMap = new HashMap<>(); +/* 735 */ resMap.put("excelColumn", AJexcelColuns[j]); +/* */ +/* 737 */ String archiveColumn = "请选择"; +/* 738 */ for (int k = 0; k < lphycs.size(); k++) { +/* 739 */ String showName = ((PhysicalTableColumn)lphycs.get(k)).getColumnName(); +/* 740 */ if (showName.equals(AJexcelColuns[j])) { +/* 741 */ archiveColumn = ((PhysicalTableColumn)lphycs.get(k)).getColumnCode(); +/* */ break; +/* */ } +/* */ } +/* 745 */ resMap.put("archiveColumn", archiveColumn); +/* 746 */ allAJList.add(resMap); +/* */ } +/* 748 */ map.put("dataAJ", allAJList); +/* */ } +/* 750 */ if (!JNtableName.equals("")) { +/* 751 */ PhysicalTableColumn ptc = new PhysicalTableColumn(); +/* 752 */ ptc.setTableId(Long.valueOf(TableUtil.getTableId(JNtableName))); +/* 753 */ lphycs = this.physicalTableColumnService.selectPhysicalTableColumnList(ptc); +/* */ +/* */ +/* 756 */ for (int i = 0; i < lphycs.size(); i++) { +/* 757 */ Map columsMap = new HashMap<>(); +/* 758 */ columsMap.put("value", ((PhysicalTableColumn)lphycs.get(i)).getColumnCode()); +/* 759 */ columsMap.put("text", ((PhysicalTableColumn)lphycs.get(i)).getColumnName()); +/* 760 */ JNcolumnsList.add(columsMap); +/* */ } +/* */ +/* */ +/* 764 */ Map resMap = null; +/* 765 */ for (int j = 0; j < JNexcelColuns.length; j++) { +/* 766 */ resMap = new HashMap<>(); +/* 767 */ resMap.put("excelColumn", JNexcelColuns[j]); +/* */ +/* 769 */ String archiveColumn = "请选择"; +/* 770 */ for (int k = 0; k < lphycs.size(); k++) { +/* 771 */ String showName = ((PhysicalTableColumn)lphycs.get(k)).getColumnName(); +/* 772 */ if (showName.equals(JNexcelColuns[j])) { +/* 773 */ archiveColumn = ((PhysicalTableColumn)lphycs.get(k)).getColumnCode(); +/* */ break; +/* */ } +/* */ } +/* 777 */ resMap.put("archiveColumn", archiveColumn); +/* 778 */ allJNList.add(resMap); +/* */ } +/* 780 */ map.put("dataJN", allJNList); +/* */ } +/* */ +/* */ +/* 784 */ map.put("status", "1"); +/* 785 */ map.put("msg", "成功!"); +/* */ } else { +/* 787 */ map.put("status", "0"); +/* 788 */ map.put("msg", "excel获取表头失败!"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 797 */ map.put("columnsAJList", AJcolumnsList); +/* 798 */ map.put("columnsJNList", JNcolumnsList); +/* 799 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int getTableNewId(long tableId) { +/* 809 */ int res = 0; +/* 810 */ String tableName = TableUtil.getTableName(Long.valueOf(tableId)); +/* 811 */ String sql = "select max(id)+1 ID from " + tableName; +/* 812 */ List> list = this.executeSqlService.queryList(sql); +/* 813 */ if (list != null && list.size() > 0 && list.get(0) != null) { +/* 814 */ res = Integer.parseInt((((LinkedHashMap)list.get(0)).get("ID") == null) ? "1" : ((LinkedHashMap)list.get(0)).get("ID").toString()); +/* */ } else { +/* 816 */ res = 1; +/* */ } +/* 818 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getCodeValue(long tableId, String column, String value) { +/* 829 */ String res = value; +/* 830 */ PhysicalTableColumn ptc = new PhysicalTableColumn(); +/* 831 */ ptc.setTableId(Long.valueOf(tableId)); +/* 832 */ ptc.setColumnCode(column); +/* 833 */ List ptcList = this.physicalTableColumnService.selectPhysicalTableColumnList(ptc); +/* 834 */ if (ptcList != null && ptcList.size() > 0 && ptcList.get(0) != null) { +/* 835 */ ptc = ptcList.get(0); +/* 836 */ String codeType = ptc.getColumnCodetype(); +/* 837 */ if (!codeType.equals(codeType)) { +/* 838 */ String value1 = DictUtils.getDictValue(codeType, value); +/* */ +/* 840 */ if (value1 != null && !value1.equals("")) { +/* 841 */ res = value1; +/* */ } +/* */ } +/* */ } +/* */ +/* 846 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String FormetFileSize(long fileS) { +/* 856 */ DecimalFormat df = new DecimalFormat("#.00"); +/* 857 */ String fileSizeString = ""; +/* 858 */ if (fileS < 1024L) { +/* 859 */ fileSizeString = df.format(fileS) + "B"; +/* 860 */ } else if (fileS < 1048576L) { +/* 861 */ fileSizeString = df.format(fileS / 1024.0D) + "K"; +/* 862 */ } else if (fileS < 1073741824L) { +/* 863 */ fileSizeString = df.format(fileS / 1048576.0D) + "M"; +/* */ } else { +/* 865 */ fileSizeString = df.format(fileS / 1.073741824E9D) + "G"; +/* */ } +/* 867 */ return fileSizeString; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\archiveimportbatch\service\impl\ArchiveImportBatchServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/gsbdr/controller/GsbdrController.java b/src/main/java/com/archive/project/dajs/gsbdr/controller/GsbdrController.java new file mode 100644 index 0000000..f41cdd7 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/gsbdr/controller/GsbdrController.java @@ -0,0 +1,67 @@ +/* */ package com.archive.project.dajs.gsbdr.controller + +-INF.classes.com.archive.project.dajs.gsbdr.controller; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dajs.gsbdr.service.IGsbdrService; +/* */ import java.io.IOException; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dajs/gsbdr"}) +/* */ public class GsbdrController +/* */ extends BaseController +/* */ { +/* 31 */ private String prefix = "dajs/gsbdr"; +/* */ +/* */ +/* */ @Autowired +/* */ private IGsbdrService gsbdrService; +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dajs:gsbdr"}) +/* */ @GetMapping +/* */ public String gsbdr(ModelMap mmap) { +/* 42 */ return this.prefix + "/gsbdr"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(String key, int page, int size) throws IOException { +/* 54 */ startPage(); +/* */ +/* 56 */ List list = new ArrayList(); +/* 57 */ return getDataTable(list); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\gsbdr\controller\GsbdrController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/gsbdr/service/IGsbdrService.java b/src/main/java/com/archive/project/dajs/gsbdr/service/IGsbdrService.java new file mode 100644 index 0000000..d0cceee --- /dev/null +++ b/src/main/java/com/archive/project/dajs/gsbdr/service/IGsbdrService.java @@ -0,0 +1,9 @@ +package com.archive.project.dajs.gsbdr.service-INF.classes.com.archive.project.dajs.gsbdr.service; + +public interface IGsbdrService {} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\gsbdr\service\IGsbdrService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/gsbdr/service/impl/GsbdrServiceImpl.java b/src/main/java/com/archive/project/dajs/gsbdr/service/impl/GsbdrServiceImpl.java new file mode 100644 index 0000000..9a3df28 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/gsbdr/service/impl/GsbdrServiceImpl.java @@ -0,0 +1,20 @@ +package com.archive.project.dajs.gsbdr.service.impl + +-INF.classes.com.archive.project.dajs.gsbdr.service.impl; + +import com.archive.project.common.service.IExecuteSqlService; +import com.archive.project.dajs.gsbdr.service.IGsbdrService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class GsbdrServiceImpl implements IGsbdrService { + @Autowired + private IExecuteSqlService executeSqlService; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\gsbdr\service\impl\GsbdrServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/jsgl/controller/JsglController.java b/src/main/java/com/archive/project/dajs/jsgl/controller/JsglController.java new file mode 100644 index 0000000..723b46c --- /dev/null +++ b/src/main/java/com/archive/project/dajs/jsgl/controller/JsglController.java @@ -0,0 +1,348 @@ +/* */ package com.archive.project.dajs.jsgl.controller + +-INF.classes.com.archive.project.dajs.jsgl.controller; +/* */ +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.dajs.jsgl.service.IJsglService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.io.IOException; +/* */ import java.util.HashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.RequestParam; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ import org.springframework.web.multipart.MultipartFile; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dajs/jsgl"}) +/* */ public class JsglController +/* */ extends BaseController +/* */ { +/* */ @Autowired +/* */ private IArchiveTypeService archiveTypeService; +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ @Autowired +/* */ private IJsglService jsglService; +/* */ @Autowired +/* */ private IConfigService configService; +/* 56 */ private String prefix = "dajs/jsgl"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dajs:jsgl:view"}) +/* */ @GetMapping +/* */ public String jsgl(ModelMap mmap) { +/* 65 */ List ztrees = this.archiveTypeService.archiveCollationTreeData(); +/* 66 */ if (ztrees != null && ztrees.size() > 2) { +/* 67 */ mmap.put("firstNode", ztrees.get(1)); +/* */ } else { +/* 69 */ mmap.put("firstNode", null); +/* */ } +/* */ +/* */ +/* 73 */ DictType dictType = new DictType(); dictType.setLabel("column_bind"); +/* 74 */ List dictTypeList = this.dictTypeService.selectDictTypeList(dictType); +/* 75 */ Map> dictDataMap = new HashMap<>(); +/* 76 */ for (DictType dictTypeTemp : dictTypeList) { +/* 77 */ List dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); +/* 78 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); +/* */ } +/* 80 */ mmap.put("dictDataMap", dictDataMap); +/* 81 */ return this.prefix + "/jsgl"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add/{archiveId}/{type}/{ownerid}"}) +/* */ public String add(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("ownerid") String ownerid, ModelMap mmap) { +/* 97 */ mmap.put("archiveId", archiveId); +/* 98 */ mmap.put("type", type); +/* 99 */ mmap.put("ownerid", ownerid); +/* 100 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/detail/{archiveId}/{type}/{id}"}) +/* */ public String detail(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) { +/* 113 */ mmap.put("archiveTypeId", archiveId); +/* 114 */ mmap.put("type", type); +/* 115 */ mmap.put("id", id); +/* 116 */ return this.prefix + "/detail"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/update/{archiveId}/{type}/{id}"}) +/* */ public String update(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) { +/* 128 */ mmap.put("archiveTypeId", archiveId); +/* 129 */ mmap.put("type", type); +/* 130 */ mmap.put("id", id); +/* 131 */ return this.prefix + "/update"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dajs:jsgl:fileUpload"}) +/* */ @GetMapping({"/uploadFile/{archiveId}/{type}/{id}"}) +/* */ public String uploadFile(@PathVariable("archiveId") long archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) { +/* 146 */ long tableId = TableUtil.getTableIdByArchiveTypeId(archiveId); +/* 147 */ mmap.put("tableId", Long.valueOf(tableId)); +/* 148 */ mmap.put("id", id); +/* 149 */ return this.prefix + "/uploadFile"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/fileUpload"}) +/* */ @ResponseBody +/* */ public Map fileUpload(@RequestParam("file") MultipartFile[] files, long tableId, long id) { +/* 163 */ Map map = new HashMap<>(); +/* 164 */ boolean res = false; +/* */ try { +/* 166 */ res = this.jsglService.uploadFile(files, tableId, id); +/* 167 */ } catch (IOException e) { +/* 168 */ e.printStackTrace(); +/* */ } +/* */ +/* 171 */ map.put("res", Boolean.valueOf(res)); +/* 172 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/appendAddForm/{archiveId}/{type}"}) +/* */ @ResponseBody +/* */ public String appendAddForm(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type) { +/* 189 */ return this.jsglService.appendAddForm(archiveId, type); +/* */ } +/* */ +/* */ +/* */ @Log(title = "接收管理-档案新增", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(@Validated String archiveStr, @Validated String archiveId, @Validated String type) { +/* 197 */ if (StringUtils.isEmpty(archiveStr)) { +/* 198 */ return error("提交数据为空,新增失败!"); +/* */ } +/* */ +/* */ try { +/* 202 */ boolean flag = this.jsglService.addSave(archiveStr, archiveId, type); +/* 203 */ if (flag) { +/* 204 */ return toAjax(true); +/* */ } +/* 206 */ return toAjax(false); +/* */ } +/* 208 */ catch (Exception e) { +/* 209 */ e.printStackTrace(); +/* 210 */ return toAjax(false); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "接收管理-档案修改", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/update"}) +/* */ @ResponseBody +/* */ public AjaxResult update(@Validated String archiveStr, @Validated String archiveTypeId, @Validated String type, @Validated String id) { +/* 221 */ if (StringUtils.isEmpty(archiveStr)) { +/* 222 */ return error("提交数据为空,新增失败!"); +/* */ } +/* */ +/* */ try { +/* 226 */ boolean flag = this.jsglService.update(archiveStr, archiveTypeId, type, id); +/* 227 */ if (flag) { +/* 228 */ return toAjax(true); +/* */ } +/* 230 */ return toAjax(false); +/* */ } +/* 232 */ catch (Exception e) { +/* 233 */ e.printStackTrace(); +/* 234 */ return toAjax(false); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "接收管理-档案删除", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/delete"}) +/* */ @ResponseBody +/* */ public AjaxResult delete(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) { +/* 252 */ boolean flag = false; +/* */ +/* */ try { +/* 255 */ String deleteType = this.configService.selectConfigByKey("archive.deleteDataType"); +/* 256 */ if (deleteType.equals("1")) { +/* */ +/* 258 */ flag = this.jsglService.archiveLogicDelete(query, archiveTypeId, type, ids); +/* 259 */ } else if (deleteType.equals("2")) { +/* */ +/* 261 */ flag = this.jsglService.archivePhysicalDelete(query, archiveTypeId, type, ids); +/* */ } else { +/* 263 */ return error("请在\"系统参数\"中配置\"档案条目删除方式\"!"); +/* */ } +/* */ +/* 266 */ } catch (Exception ex) { +/* 267 */ System.out.println("档案删除出现异常:" + ex.getMessage()); +/* 268 */ return error("删除失败!"); +/* */ } +/* 270 */ if (flag) { +/* 271 */ return success("删除成功!"); +/* */ } +/* 273 */ return error("删除失败!"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "接收管理-整理入库", businessType = BusinessType.ZLRK) +/* */ @PostMapping({"/zlrk"}) +/* */ @ResponseBody +/* */ public AjaxResult zlrk(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) { +/* 289 */ boolean flag = false; +/* */ try { +/* 291 */ flag = this.jsglService.rzlk(query, archiveTypeId, type, ids); +/* 292 */ } catch (Exception ex) { +/* 293 */ System.out.println("入管理库出现异常:" + ex.getMessage()); +/* 294 */ return error("入管理库失败!"); +/* */ } +/* 296 */ if (flag) { +/* 297 */ return success("入管理库成功!"); +/* */ } +/* 299 */ return error("入管理库失败!"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/appendAddFormByDataId/{archiveTypeId}/{type}/{id}/{readOnly}"}) +/* */ @ResponseBody +/* */ public String appendAddFormByDataId(@PathVariable("archiveTypeId") String archiveTypeId, @PathVariable("type") String type, @PathVariable("id") String id, @PathVariable("readOnly") String readOnly) { +/* 314 */ return this.jsglService.appendAddFormByDataId(archiveTypeId, type, id, readOnly); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/folderFile/{archiveId}/{id}"}) +/* */ public String folderFile(@PathVariable("archiveId") String archiveId, @PathVariable("id") String id, ModelMap mmap) { +/* 327 */ mmap.put("archiveId", archiveId); +/* 328 */ mmap.put("folderId", id); +/* */ +/* 330 */ DictType dictType = new DictType(); dictType.setLabel("column_bind"); +/* 331 */ List dictTypeList = this.dictTypeService.selectDictTypeList(dictType); +/* 332 */ Map> dictDataMap = new HashMap<>(); +/* 333 */ for (DictType dictTypeTemp : dictTypeList) { +/* 334 */ List dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); +/* 335 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); +/* */ } +/* 337 */ mmap.put("dictDataMap", dictDataMap); +/* 338 */ return this.prefix + "/jnwj"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\jsgl\controller\JsglController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/jsgl/mapper/JsglMapper.java b/src/main/java/com/archive/project/dajs/jsgl/mapper/JsglMapper.java new file mode 100644 index 0000000..6b7127c --- /dev/null +++ b/src/main/java/com/archive/project/dajs/jsgl/mapper/JsglMapper.java @@ -0,0 +1,14 @@ +package com.archive.project.dajs.jsgl.mapper + +-INF.classes.com.archive.project.dajs.jsgl.mapper; + +import org.springframework.stereotype.Repository; + +@Repository +public interface JsglMapper {} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\jsgl\mapper\JsglMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/jsgl/service/IJsglService.java b/src/main/java/com/archive/project/dajs/jsgl/service/IJsglService.java new file mode 100644 index 0000000..8670914 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/jsgl/service/IJsglService.java @@ -0,0 +1,32 @@ +package com.archive.project.dajs.jsgl.service + +-INF.classes.com.archive.project.dajs.jsgl.service; + +import java.io.IOException; +import org.springframework.web.multipart.MultipartFile; + +public interface IJsglService { + String appendAddForm(String paramString1, String paramString2); + + String appendAddFormByDataId(String paramString1, String paramString2, String paramString3, String paramString4); + + boolean addSave(String paramString1, String paramString2, String paramString3) throws Exception; + + boolean update(String paramString1, String paramString2, String paramString3, String paramString4) throws Exception; + + boolean uploadFile(MultipartFile[] paramArrayOfMultipartFile, long paramLong1, long paramLong2) throws IOException; + + boolean archivePhysicalDelete(String paramString1, String paramString2, String paramString3, String paramString4); + + boolean archivePhysicalHf(String paramString1, String paramString2, String paramString3, String paramString4); + + boolean archiveLogicDelete(String paramString1, String paramString2, String paramString3, String paramString4); + + boolean rzlk(String paramString1, String paramString2, String paramString3, String paramString4); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\jsgl\service\IJsglService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/jsgl/service/impl/JsglServiceImpl.java b/src/main/java/com/archive/project/dajs/jsgl/service/impl/JsglServiceImpl.java new file mode 100644 index 0000000..bded4dd --- /dev/null +++ b/src/main/java/com/archive/project/dajs/jsgl/service/impl/JsglServiceImpl.java @@ -0,0 +1,1424 @@ +/* */ package com.archive.project.dajs.jsgl.service.impl + +-INF.classes.com.archive.project.dajs.jsgl.service.impl; +/* */ +/* */ import com.alibaba.fastjson.JSON; +/* */ import com.archive.common.archiveUtil.FileUtils; +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService; +/* */ import com.archive.project.dajs.jsgl.service.IJsglService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dasz.ccgl.service.ICcglService; +/* */ import com.archive.project.dasz.physicaltable.domain.PhysicalTable; +/* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; +/* */ import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.util.ArrayList; +/* */ import java.util.HashMap; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import java.util.Set; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ import org.springframework.web.multipart.MultipartFile; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class JsglServiceImpl +/* */ implements IJsglService +/* */ { +/* */ @Autowired +/* */ private IPhysicalTableService physicalTableService; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private IArchiveTypeService iArchiveTypeService; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ @Autowired +/* */ private IArchiveImportBatchService archiveImportBatchService; +/* */ @Autowired +/* */ private ICcglService ccglService; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public String appendAddForm(String archiveId, String type) { +/* 74 */ StringBuilder html = new StringBuilder(); +/* 75 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 76 */ physicalTable.setArchivetypeid(archiveId); +/* 77 */ physicalTable.setTableCode(type); +/* 78 */ List physicalTableList = this.physicalTableService.selectPhysicalTableList(physicalTable); +/* 79 */ if (physicalTableList != null && physicalTableList.size() > 0) { +/* 80 */ Long tableId = ((PhysicalTable)physicalTableList.get(0)).getId(); +/* 81 */ PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); +/* 82 */ physicalTableColumn.setTableId(tableId); +/* 83 */ physicalTableColumn.setJmx(Long.valueOf(1L)); +/* 84 */ List tableColumnsList = new ArrayList<>(); +/* 85 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 86 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn); +/* */ } +/* 88 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 89 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn); +/* */ } +/* */ +/* */ +/* 93 */ tableColumnsList = this.physicalTableService.selectTableFormColumns(tableId, tableColumnsList); +/* */ +/* 95 */ for (int i = 1; i <= tableColumnsList.size(); i++) { +/* */ +/* 97 */ if (i % 2 != 0) { +/* 98 */ html.append("
"); +/* */ } +/* */ +/* 101 */ PhysicalTableColumn tableColumn = tableColumnsList.get(i - 1); +/* 102 */ String showType = tableColumn.getShowType(); +/* 103 */ Long isBsx = tableColumn.getBsx(); +/* 104 */ String columnName = tableColumn.getColumnName(); +/* 105 */ String columnCode = tableColumn.getColumnCode(); +/* 106 */ String columnCodetype = tableColumn.getColumnCodetype(); +/* 107 */ String columnType = tableColumn.getColumnType(); +/* */ +/* 109 */ if ("textBox".equals(showType)) { +/* 110 */ if (isBsx.longValue() == 1L) { +/* 111 */ if ("C".equals(columnType)) { +/* 112 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 121 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 133 */ else if ("C".equals(columnType)) { +/* 134 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* 144 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 156 */ else if ("dateBox".equals(showType)) { +/* 157 */ if (isBsx.longValue() == 1L) { +/* 158 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 170 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 185 */ else if ("dateTimeBox".equals(showType)) { +/* 186 */ if (isBsx.longValue() == 1L) { +/* 187 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 199 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 214 */ else if ("comboBox".equals(showType)) { +/* 215 */ List dictDatas = this.dictTypeService.selectDictDataByType(columnCodetype); +/* 216 */ if (isBsx.longValue() == 1L) { +/* 217 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\t\t\t\t"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 232 */ for (DictData dictData : dictDatas) { +/* 233 */ html.append("\r\n"); +/* */ } +/* */ +/* 236 */ html.append("\t\t\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 243 */ else if ("multipleComboBox".equals(showType)) { +/* 244 */ List dictDatas = this.dictTypeService.selectDictDataByType(columnCodetype); +/* 245 */ if (isBsx.longValue() == 1L) { +/* 246 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 259 */ for (DictData dictData : dictDatas) { +/* 260 */ html.append("\r\n"); +/* */ } +/* */ +/* 263 */ html.append("\t\t\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 270 */ else if ("textArea".equals(showType)) { +/* 271 */ if (isBsx.longValue() == 1L) { +/* 272 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 281 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 294 */ else if (isBsx.longValue() == 1L) { +/* 295 */ if ("C".equals(columnType)) { +/* 296 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* 306 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 316 */ else if ("C".equals(columnType)) { +/* 317 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* 327 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 339 */ if (i % 2 == 0 || i == tableColumnsList.size()) { +/* 340 */ html.append("
"); +/* */ } +/* */ } +/* */ } +/* 344 */ return html.toString(); +/* */ } +/* */ +/* */ +/* */ @Transactional +/* */ public String appendAddFormByDataId(String archiveTypeId, String type, String id, String readOnly) { +/* 350 */ StringBuilder html = new StringBuilder(); +/* 351 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 352 */ physicalTable.setArchivetypeid(archiveTypeId); +/* 353 */ physicalTable.setTableCode(type); +/* 354 */ List physicalTableList = this.physicalTableService.selectPhysicalTableList(physicalTable); +/* 355 */ if (physicalTableList != null && physicalTableList.size() > 0) { +/* 356 */ Long tableId = ((PhysicalTable)physicalTableList.get(0)).getId(); +/* 357 */ PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); +/* 358 */ physicalTableColumn.setTableId(tableId); +/* 359 */ physicalTableColumn.setJmx(Long.valueOf(1L)); +/* 360 */ List tableColumnsList = new ArrayList<>(); +/* 361 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 362 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn); +/* */ } +/* 364 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 365 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn); +/* */ } +/* */ +/* */ +/* 369 */ tableColumnsList = this.physicalTableService.selectTableFormColumns(tableId, tableColumnsList); +/* */ +/* 371 */ for (int i = 1; i <= tableColumnsList.size(); i++) { +/* */ +/* 373 */ if (i % 2 != 0) { +/* 374 */ html.append("
"); +/* */ } +/* */ +/* 377 */ PhysicalTableColumn tableColumn = tableColumnsList.get(i - 1); +/* 378 */ String showType = tableColumn.getShowType(); +/* 379 */ Long isBsx = tableColumn.getBsx(); +/* 380 */ String columnName = tableColumn.getColumnName(); +/* 381 */ String columnCode = tableColumn.getColumnCode(); +/* 382 */ String columnCodetype = tableColumn.getColumnCodetype(); +/* 383 */ String columnType = tableColumn.getColumnType(); +/* */ +/* */ +/* */ +/* 387 */ String Sql = ""; +/* 388 */ if (type.toLowerCase().equals("folder")) { +/* 389 */ Sql = "select " + columnCode + " from " + ((PhysicalTable)physicalTableList.get(0)).getTablename() + " where id=" + id; +/* 390 */ } else if (type.toLowerCase().equals("file")) { +/* 391 */ Sql = "select " + columnCode + " from " + ((PhysicalTable)physicalTableList.get(0)).getTablename() + " where id=" + id; +/* 392 */ } else if (type.toLowerCase().equals("document") || type.toLowerCase().equals("info")) { +/* 393 */ Sql = "select " + columnCode + " from " + ((PhysicalTable)physicalTableList.get(0)).getTablename() + " where ownerid=" + id; +/* */ } +/* 395 */ LinkedHashMap datalist = this.executeSqlService.getOne(Sql); +/* 396 */ String value = ""; +/* 397 */ if (datalist != null && datalist.size() > 0) { +/* 398 */ value = (datalist.get(columnCode) == null) ? "" : datalist.get(columnCode).toString(); +/* */ } +/* */ +/* 401 */ if ("textBox".equals(showType)) { +/* 402 */ if (isBsx.longValue() == 1L) { +/* 403 */ if ("C".equals(columnType)) { +/* 404 */ if (readOnly.equals("true")) { +/* 405 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 414 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 425 */ else if (readOnly.equals("true")) { +/* 426 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 435 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 448 */ else if ("C".equals(columnType)) { +/* 449 */ if (readOnly.equals("true")) { +/* 450 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 459 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 471 */ else if (readOnly.equals("true")) { +/* 472 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 481 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 495 */ else if ("dateBox".equals(showType)) { +/* 496 */ if (isBsx.longValue() == 1L) { +/* 497 */ if (readOnly.equals("true")) { +/* 498 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 510 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 524 */ else if (readOnly.equals("true")) { +/* 525 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 537 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 554 */ else if ("dateTimeBox".equals(showType)) { +/* 555 */ if (isBsx.longValue() == 1L) { +/* 556 */ if (readOnly.equals("true")) { +/* 557 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 569 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 583 */ else if (readOnly.equals("true")) { +/* 584 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 596 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 613 */ else if ("comboBox".equals(showType)) { +/* 614 */ List dictDatas = this.dictTypeService.selectDictDataByType(columnCodetype); +/* 615 */ if (isBsx.longValue() == 1L) { +/* 616 */ if (readOnly.equals("true")) { +/* 617 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\t\t\t\t"); +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ } +/* 633 */ else if (readOnly.equals("true")) { +/* 634 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\t\t\t\t"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 651 */ for (DictData dictData : dictDatas) { +/* 652 */ if (value.equals(dictData.getDictValue())) { +/* 653 */ html.append("\r\n"); continue; +/* */ } +/* 655 */ html.append("\r\n"); +/* */ } +/* */ +/* */ +/* 659 */ html.append("\t\t\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 666 */ else if ("multipleComboBox".equals(showType)) { +/* 667 */ List dictDatas = this.dictTypeService.selectDictDataByType(columnCodetype); +/* 668 */ if (isBsx.longValue() == 1L) { +/* 669 */ if (readOnly.equals("true")) { +/* 670 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t"); +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ } +/* 684 */ else if (readOnly.equals("true")) { +/* 685 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 700 */ for (DictData dictData : dictDatas) { +/* 701 */ if (value.contains(dictData.getDictValue())) { +/* 702 */ html.append("\r\n"); continue; +/* */ } +/* 704 */ html.append("\r\n"); +/* */ } +/* */ +/* */ +/* */ +/* 709 */ html.append("\t\t\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 716 */ else if ("textArea".equals(showType)) { +/* 717 */ if (isBsx.longValue() == 1L) { +/* 718 */ if (readOnly.equals("true")) { +/* 719 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 728 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 739 */ else if (readOnly.equals("true")) { +/* 740 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 749 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 764 */ else if (isBsx.longValue() == 1L) { +/* 765 */ if ("C".equals(columnType)) { +/* 766 */ if (readOnly.equals("true")) { +/* 767 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 776 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 787 */ else if (readOnly.equals("true")) { +/* 788 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 797 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 809 */ else if ("C".equals(columnType)) { +/* 810 */ if (readOnly.equals("true")) { +/* 811 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 820 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 832 */ else if (readOnly.equals("true")) { +/* 833 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 842 */ html.append("
\r\n\t
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
\r\n
"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 856 */ if (i % 2 == 0 || i == tableColumnsList.size()) { +/* 857 */ html.append("
"); +/* */ } +/* */ } +/* */ } +/* 861 */ return html.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public boolean addSave(String archiveStr, String archiveId, String type) throws Exception { +/* 871 */ HashMap archiveMap = (HashMap)JSON.parseObject(archiveStr, HashMap.class); +/* 872 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 873 */ physicalTable.setTableCode(type); +/* 874 */ physicalTable.setArchivetypeid(archiveId); +/* 875 */ List tablesList = this.physicalTableService.selectPhysicalTableList(physicalTable); +/* 876 */ if (tablesList != null && tablesList.size() > 0) { +/* 877 */ String tableName = ((PhysicalTable)tablesList.get(0)).getTablename(); +/* 878 */ Long tableId = ((PhysicalTable)tablesList.get(0)).getId(); +/* 879 */ PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); +/* 880 */ physicalTableColumn.setTableId(tableId); +/* */ +/* 882 */ String fields = ",is_delete"; +/* 883 */ String values = ",0"; +/* 884 */ Set keySet = archiveMap.keySet(); +/* 885 */ for (String key : keySet) { +/* 886 */ fields = fields + "," + key; +/* */ +/* 888 */ String value = archiveMap.get(key); +/* */ +/* 890 */ if (StringUtils.isEmpty(value)) { +/* 891 */ values = values + ",''"; +/* */ +/* */ continue; +/* */ } +/* 895 */ physicalTableColumn.setColumnCode(key); +/* 896 */ List tableColumnsList = new ArrayList<>(); +/* 897 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 898 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn); +/* */ } +/* 900 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 901 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn); +/* */ } +/* 903 */ if (tableColumnsList.size() > 0 && tableColumnsList.get(0) != null) { +/* 904 */ String columnType = ((PhysicalTableColumn)tableColumnsList.get(0)).getColumnType(); +/* 905 */ if (columnType.equals("N")) { +/* 906 */ values = values + "," + (String)archiveMap.get(key); +/* */ continue; +/* */ } +/* 909 */ values = values + ",'" + (String)archiveMap.get(key) + "'"; +/* */ continue; +/* */ } +/* 912 */ values = values + ",'" + (String)archiveMap.get(key) + "'"; +/* */ } +/* */ +/* */ +/* */ +/* 917 */ fields = fields.substring(1); +/* 918 */ values = values.substring(1); +/* 919 */ String sql = "INSERT INTO " + tableName + " ( " + fields + ",status ) VALUES ( " + values + ",'60' ) "; +/* 920 */ return this.executeSqlService.insert(sql); +/* */ } +/* 922 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean update(String archiveStr, String archiveTypeId, String type, String id) throws Exception { +/* 938 */ HashMap archiveMap = (HashMap)JSON.parseObject(archiveStr, HashMap.class); +/* 939 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 940 */ physicalTable.setTableCode(type); +/* 941 */ physicalTable.setArchivetypeid(archiveTypeId); +/* 942 */ List tablesList = this.physicalTableService.selectPhysicalTableList(physicalTable); +/* 943 */ if (tablesList != null && tablesList.size() > 0) { +/* 944 */ String tableName = ((PhysicalTable)tablesList.get(0)).getTablename(); +/* 945 */ Long tableId = ((PhysicalTable)tablesList.get(0)).getId(); +/* 946 */ PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); +/* 947 */ physicalTableColumn.setTableId(tableId); +/* */ +/* 949 */ String fields = ""; +/* 950 */ Set keySet = archiveMap.keySet(); +/* 951 */ for (String key : keySet) { +/* */ +/* 953 */ String value = archiveMap.get(key); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 959 */ physicalTableColumn.setColumnCode(key); +/* 960 */ List tableColumnsList = new ArrayList<>(); +/* 961 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 962 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn); +/* */ } +/* 964 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 965 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn); +/* */ } +/* 967 */ if (tableColumnsList.size() > 0 && tableColumnsList.get(0) != null) { +/* 968 */ String columnType = ((PhysicalTableColumn)tableColumnsList.get(0)).getColumnType(); +/* 969 */ if (columnType.equals("C")) { +/* 970 */ if (StringUtils.isEmpty(value)) { +/* 971 */ value = "0"; +/* */ } else { +/* 973 */ value = archiveMap.get(key); +/* */ } +/* */ +/* */ } else { +/* */ +/* 978 */ value = "'" + (String)archiveMap.get(key) + "'"; +/* */ } +/* */ } else { +/* 981 */ value = "'" + (String)archiveMap.get(key) + "'"; +/* */ } +/* */ +/* 984 */ fields = fields + "," + key + "=" + value; +/* */ } +/* 986 */ fields = fields.substring(1); +/* 987 */ String sql = "update " + tableName + " set " + fields + " where id=" + id; +/* 988 */ return this.executeSqlService.update(sql); +/* */ } +/* 990 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map getTableIdByArchiveTypeId(String archiveTypeId, String type) { +/* 1002 */ Map map = new HashMap<>(); +/* 1003 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 1004 */ physicalTable.setTableCode(type); +/* 1005 */ physicalTable.setArchivetypeid(archiveTypeId); +/* 1006 */ List tablesList = this.physicalTableService.selectPhysicalTableList(physicalTable); +/* 1007 */ if (tablesList != null && tablesList.size() > 0) { +/* 1008 */ String tableName = ((PhysicalTable)tablesList.get(0)).getTablename(); +/* 1009 */ Long tableId = ((PhysicalTable)tablesList.get(0)).getId(); +/* 1010 */ map.put("tableId", tableId); +/* 1011 */ map.put("tableName", tableName); +/* */ } +/* 1013 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean uploadFile(MultipartFile[] files, long tableId, long id) throws IOException { +/* 1025 */ boolean res = false; +/* 1026 */ if (files != null) { +/* 1027 */ for (int i = 0; i < files.length; i++) { +/* 1028 */ String fileName = files[i].getOriginalFilename(); +/* */ +/* 1030 */ String xdlj = this.ccglService.getCreateDocumentPathByFile(id, tableId); +/* 1031 */ String filepath = ArchiveConfig.getInstance().getUploadPath() + File.separator + "DocumentFile" + File.separator + xdlj; +/* 1032 */ File localFile = new File(filepath); +/* 1033 */ if (!localFile.exists()) { +/* 1034 */ localFile.mkdirs(); +/* */ } +/* 1036 */ String path = localFile.getPath() + File.separator + fileName; +/* 1037 */ File server_file = new File(path); +/* 1038 */ if (server_file.exists()) { +/* 1039 */ server_file.setWritable(true); +/* 1040 */ server_file.delete(); +/* */ } +/* 1042 */ files[i].transferTo(server_file); +/* 1043 */ String newfileName = server_file.getName().substring(0, server_file.getName().lastIndexOf(".")); +/* 1044 */ String hz = server_file.getName().substring(server_file.getName().lastIndexOf(".") + 1, server_file.getName().length()); +/* 1045 */ String fileSize = FileUtils.changeValueType(Long.valueOf(server_file.length())); +/* */ +/* 1047 */ String tableName = TableUtil.getTableName(Long.valueOf(tableId)); +/* 1048 */ String docuumentTableName = tableName.toLowerCase().replace("_folder", "_document"); +/* 1049 */ docuumentTableName = docuumentTableName.toLowerCase().replace("_file", "_document"); +/* 1050 */ String docTableId = TableUtil.getTableId(docuumentTableName); +/* 1051 */ long newId = this.archiveImportBatchService.getTableNewId(Long.parseLong(docTableId)); +/* 1052 */ long archiveTypeId = TableUtil.getArchiveTypeIdByTableId(tableId); +/* 1053 */ User user = ShiroUtils.getSysUser(); +/* 1054 */ String loginName = user.getLoginName(); +/* */ +/* */ +/* 1057 */ String inserSql = "insert into " + docuumentTableName + "(id,ownerid,filename,filesize,filepath,filehz,tableId,create_user,create_time,batcharchivetypeid) values(" + newId + "," + id + ",'" + newfileName + "','" + fileSize + "','" + server_file.getPath().replaceAll("\\\\", "\\\\\\\\") + "','" + hz + "','" + tableId + "','" + loginName + "','" + DateUtils.getTime() + "'," + archiveTypeId + ")"; +/* 1058 */ res = this.executeSqlService.insert(inserSql); +/* */ +/* 1060 */ String updateSql = "update " + tableName + " set dqzws=dqzws+1 where id=" + id; +/* 1061 */ this.executeSqlService.update(updateSql); +/* 1062 */ System.out.println("文件" + path + "上传成功"); +/* */ } +/* */ } +/* 1065 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public boolean archivePhysicalDelete(String query, String archiveTypeId, String type, String ids) { +/* 1084 */ boolean res = false; +/* 1085 */ ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 1086 */ String archiveCode = archiveType.getArhciveCode(); +/* */ +/* 1088 */ if (StringUtils.isNotEmpty(ids)) { +/* 1089 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* */ +/* 1092 */ String documentPathSql = "select filewaterpath,filepath from t_ar_" + archiveCode + "_document where ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (" + ids + "))"; +/* 1093 */ getDocumentSqlDeleteFile(documentPathSql); +/* 1094 */ String documentSql = "delete from t_ar_" + archiveCode + "_document where ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (" + ids + "))"; +/* 1095 */ String filesql = "delete from t_ar_" + archiveCode + "_file where ownerid in (" + ids + ")"; +/* 1096 */ String folderSql = "delete from t_ar_" + archiveCode + "_folder where id in (" + ids + ")"; +/* 1097 */ this.executeSqlService.delete(documentSql); +/* 1098 */ this.executeSqlService.delete(filesql); +/* 1099 */ this.executeSqlService.delete(folderSql); +/* 1100 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* */ +/* 1103 */ String documentPathSql = "select filewaterpath,filepath from t_ar_" + archiveCode + "_document where ownerid in (" + ids + ")"; +/* 1104 */ getDocumentSqlDeleteFile(documentPathSql); +/* 1105 */ String documentSql = "delete from t_ar_" + archiveCode + "_document where ownerid in (" + ids + ")"; +/* 1106 */ String filesql = "delete from t_ar_" + archiveCode + "_file where id in (" + ids + ")"; +/* 1107 */ this.executeSqlService.delete(documentSql); +/* 1108 */ this.executeSqlService.delete(filesql); +/* */ } +/* 1110 */ res = true; +/* */ } +/* */ else { +/* */ +/* 1114 */ String condition = appendQueryCondition(query, archiveTypeId, type); +/* 1115 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 1117 */ String documentPathSql = "select filewaterpath,filepath from t_ar_" + archiveCode + "_document where ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + "))"; +/* 1118 */ getDocumentSqlDeleteFile(documentPathSql); +/* 1119 */ String documentSql = "delete from t_ar_" + archiveCode + "_document where ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + "))"; +/* 1120 */ String filesql = "delete from t_ar_" + archiveCode + "_file where ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + ")"; +/* 1121 */ String folderSql = "delete from t_ar_" + archiveCode + "_folder where " + condition; +/* 1122 */ this.executeSqlService.delete(documentSql); +/* 1123 */ this.executeSqlService.delete(filesql); +/* 1124 */ this.executeSqlService.delete(folderSql); +/* */ } else { +/* */ +/* 1127 */ String documentPathSql = "select filewaterpath,filepath from t_ar_" + archiveCode + "_document where ownerid in (select id from t_ar_" + archiveCode + "_file where " + condition + ")"; +/* 1128 */ getDocumentSqlDeleteFile(documentPathSql); +/* 1129 */ String documentSql = "delete from t_ar_" + archiveCode + "_document where ownerid in (select id from t_ar_" + archiveCode + "_file where " + condition + ")"; +/* 1130 */ String filesql = "delete from t_ar_" + archiveCode + "_file where " + condition; +/* 1131 */ this.executeSqlService.delete(documentSql); +/* 1132 */ this.executeSqlService.delete(filesql); +/* */ } +/* 1134 */ res = true; +/* */ } +/* 1136 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public boolean archivePhysicalHf(String query, String archiveTypeId, String type, String ids) { +/* 1154 */ boolean res = false; +/* 1155 */ ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 1156 */ String archiveCode = archiveType.getArhciveCode(); +/* */ +/* 1158 */ if (StringUtils.isNotEmpty(ids)) { +/* 1159 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 1161 */ String documentSql = "update t_ar_" + archiveCode + "_document set is_delete='0' where is_delete='1' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (" + ids + "))"; +/* 1162 */ String filesql = "update t_ar_" + archiveCode + "_file set is_delete='0' where is_delete='1' and ownerid in (" + ids + ")"; +/* 1163 */ String folderSql = "update t_ar_" + archiveCode + "_folder set is_delete='0' where is_delete='1' and id in (" + ids + ")"; +/* 1164 */ this.executeSqlService.update(documentSql); +/* 1165 */ this.executeSqlService.update(filesql); +/* 1166 */ this.executeSqlService.update(folderSql); +/* 1167 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* 1169 */ String documentSql = "update t_ar_" + archiveCode + "_document set is_delete='0' where is_delete='1' and ownerid in (" + ids + ")"; +/* 1170 */ String filesql = "update t_ar_" + archiveCode + "_file set is_delete='0' where is_delete='1' and id in (" + ids + ")"; +/* 1171 */ this.executeSqlService.update(documentSql); +/* 1172 */ this.executeSqlService.update(filesql); +/* */ } +/* 1174 */ res = true; +/* */ } +/* */ else { +/* */ +/* 1178 */ String condition = appendQueryCondition(query, archiveTypeId, type); +/* 1179 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 1181 */ String documentSql = "update t_ar_" + archiveCode + "_document set is_delete='0' where is_delete='1' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + "))"; +/* 1182 */ String filesql = "update t_ar_" + archiveCode + "_file set is_delete='0' where is_delete='1' and ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + ")"; +/* 1183 */ String folderSql = "update t_ar_" + archiveCode + "_folder set is_delete='0' where is_delete='1' and " + condition + ""; +/* 1184 */ this.executeSqlService.update(documentSql); +/* 1185 */ this.executeSqlService.update(filesql); +/* 1186 */ this.executeSqlService.update(folderSql); +/* 1187 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* 1189 */ String documentSql = "update t_ar_" + archiveCode + "_document set is_delete='0' where is_delete='1' and ownerid in (select id from t_ar_" + archiveCode + "_file where " + condition + ")"; +/* 1190 */ String filesql = "update t_ar_" + archiveCode + "_file set is_delete='0' where is_delete='1' and " + condition; +/* 1191 */ this.executeSqlService.update(documentSql); +/* 1192 */ this.executeSqlService.update(filesql); +/* */ } +/* 1194 */ res = true; +/* */ } +/* 1196 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public boolean archiveLogicDelete(String query, String archiveTypeId, String type, String ids) { +/* 1211 */ boolean res = false; +/* 1212 */ ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 1213 */ String archiveCode = archiveType.getArhciveCode(); +/* */ +/* 1215 */ if (StringUtils.isNotEmpty(ids)) { +/* 1216 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 1218 */ String documentSql = "update t_ar_" + archiveCode + "_document set is_delete='1' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (" + ids + "))"; +/* 1219 */ String filesql = "update t_ar_" + archiveCode + "_file set is_delete='1' where is_delete='0' and ownerid in (" + ids + ")"; +/* 1220 */ String folderSql = "update t_ar_" + archiveCode + "_folder set is_delete='1' where is_delete='0' and id in (" + ids + ")"; +/* 1221 */ this.executeSqlService.update(documentSql); +/* 1222 */ this.executeSqlService.update(filesql); +/* 1223 */ this.executeSqlService.update(folderSql); +/* 1224 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* 1226 */ String documentSql = "update t_ar_" + archiveCode + "_document set is_delete='1' where is_delete='0' and ownerid in (" + ids + ")"; +/* 1227 */ String filesql = "update t_ar_" + archiveCode + "_file set is_delete='1' where is_delete='0' and id in (" + ids + ")"; +/* 1228 */ this.executeSqlService.update(documentSql); +/* 1229 */ this.executeSqlService.update(filesql); +/* */ } +/* 1231 */ res = true; +/* */ } +/* */ else { +/* */ +/* 1235 */ String condition = appendQueryCondition(query, archiveTypeId, type); +/* 1236 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 1238 */ String documentSql = "update t_ar_" + archiveCode + "_document set is_delete='1' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + "))"; +/* 1239 */ String filesql = "update t_ar_" + archiveCode + "_file set is_delete='1' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + ")"; +/* 1240 */ String folderSql = "update t_ar_" + archiveCode + "_folder set is_delete='1' where is_delete='0' and " + condition + ""; +/* 1241 */ this.executeSqlService.update(documentSql); +/* 1242 */ this.executeSqlService.update(filesql); +/* 1243 */ this.executeSqlService.update(folderSql); +/* 1244 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* 1246 */ String documentSql = "update t_ar_" + archiveCode + "_document set is_delete='1' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where " + condition + ")"; +/* 1247 */ String filesql = "update t_ar_" + archiveCode + "_file set is_delete='1' where is_delete='0' and " + condition; +/* 1248 */ this.executeSqlService.update(documentSql); +/* 1249 */ this.executeSqlService.update(filesql); +/* */ } +/* 1251 */ res = true; +/* */ } +/* 1253 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String appendQueryCondition(String query, String archiveTypeId, String type) { +/* 1266 */ String condition = " 1=1 "; +/* 1267 */ if (StringUtils.isNotEmpty(query)) { +/* 1268 */ HashMap archiveMap = (HashMap)JSON.parseObject(query, HashMap.class); +/* */ +/* 1270 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 1271 */ physicalTable.setArchivetypeid(archiveTypeId); +/* 1272 */ physicalTable.setTableCode(type); +/* 1273 */ List tablesList = this.physicalTableService.selectPhysicalTableList(physicalTable); +/* */ +/* 1275 */ if (tablesList != null && tablesList.size() > 0) { +/* 1276 */ physicalTable = tablesList.get(0); +/* */ +/* 1278 */ PhysicalTableColumn physicalTableColumn1 = new PhysicalTableColumn(); +/* 1279 */ physicalTableColumn1.setTableId(physicalTable.getId()); +/* 1280 */ List columnsList1 = new ArrayList<>(); +/* 1281 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 1282 */ columnsList1 = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn1); +/* */ } +/* 1284 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 1285 */ columnsList1 = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn1); +/* */ } +/* */ +/* 1288 */ if (columnsList1 != null && columnsList1.size() > 0) { +/* 1289 */ Set keySet = archiveMap.keySet(); +/* 1290 */ for (String key : keySet) { +/* 1291 */ for (PhysicalTableColumn tableColumn : columnsList1) { +/* 1292 */ String field = tableColumn.getColumnCode(); +/* 1293 */ if (key.equals(field) || key.replaceAll("_Qazwsx13579!", "").equals(field) || key +/* 1294 */ .replaceAll("_Qazwsx24680!", "").equals(field)) { +/* 1295 */ String value = String.valueOf(archiveMap.get(key)); +/* 1296 */ if (StringUtils.isNotEmpty(value)) { +/* 1297 */ Long jsfs = tableColumn.getJsfs(); +/* */ +/* 1299 */ if (jsfs.longValue() == 0L) { +/* 1300 */ condition = condition + "and " + field + " like '%" + value + "%' "; +/* */ continue; +/* */ } +/* 1303 */ if (jsfs.longValue() == 1L) { +/* 1304 */ condition = condition + "and " + field + " = '" + value + "' "; +/* */ continue; +/* */ } +/* 1307 */ if (jsfs.longValue() == 2L) { +/* 1308 */ condition = condition + "and " + field + " > '" + value + "' "; +/* */ continue; +/* */ } +/* 1311 */ if (jsfs.longValue() == 3L) { +/* 1312 */ condition = condition + "and " + field + " < '" + value + "' "; +/* */ continue; +/* */ } +/* 1315 */ if (jsfs.longValue() == 4L) { +/* 1316 */ condition = condition + "and " + field + " >= '" + value + "' "; +/* */ continue; +/* */ } +/* 1319 */ if (jsfs.longValue() == 5L) { +/* 1320 */ condition = condition + "and " + field + " <= '" + value + "' "; +/* */ continue; +/* */ } +/* 1323 */ if (jsfs.longValue() == 6L) { +/* 1324 */ if (key.replaceAll("_Qazwsx13579!", "").equals(field)) { +/* 1325 */ condition = condition + "and " + field + " >= '" + value + "' "; +/* */ } +/* 1327 */ if (key.replaceAll("_Qazwsx24680!", "").equals(field)) +/* 1328 */ condition = condition + "and " + field + " <= '" + value + "' "; +/* */ continue; +/* */ } +/* 1331 */ condition = condition + "and " + field + " like '%" + value + "%' "; +/* */ } +/* */ } +/* */ } +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* 1340 */ return condition; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void getDocumentSqlDeleteFile(String sql) { +/* 1348 */ List> list = this.executeSqlService.queryList(sql); +/* 1349 */ for (int i = 0; i < list.size(); i++) { +/* 1350 */ String waterPath = (((LinkedHashMap)list.get(i)).get("filewaterpath") == null) ? "" : ((LinkedHashMap)list.get(i)).get("filewaterpath").toString(); +/* 1351 */ String filePath = (((LinkedHashMap)list.get(i)).get("filepath") == null) ? "" : ((LinkedHashMap)list.get(i)).get("filepath").toString(); +/* 1352 */ File waterFile = new File(waterPath); +/* 1353 */ if (waterFile.exists()) { +/* 1354 */ waterFile.delete(); +/* */ } +/* 1356 */ File file = new File(filePath); +/* 1357 */ if (file.exists()) { +/* 1358 */ file.delete(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public boolean rzlk(String query, String archiveTypeId, String type, String ids) { +/* 1375 */ boolean res = false; +/* 1376 */ ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 1377 */ String archiveCode = archiveType.getArhciveCode(); +/* 1378 */ if (StringUtils.isNotEmpty(ids)) { +/* 1379 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 1381 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='80' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (" + ids + "))"; +/* 1382 */ String filesql = "update t_ar_" + archiveCode + "_file set status='80' where is_delete='0' and ownerid in (" + ids + ")"; +/* 1383 */ String folderSql = "update t_ar_" + archiveCode + "_folder set status='80' where is_delete='0' and id in (" + ids + ")"; +/* 1384 */ this.executeSqlService.update(documentSql); +/* 1385 */ this.executeSqlService.update(filesql); +/* 1386 */ this.executeSqlService.update(folderSql); +/* 1387 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* 1389 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='80' where is_delete='0' and ownerid in (" + ids + ")"; +/* 1390 */ String filesql = "update t_ar_" + archiveCode + "_file set status='80' where is_delete='0' and id in (" + ids + ")"; +/* 1391 */ this.executeSqlService.update(documentSql); +/* 1392 */ this.executeSqlService.update(filesql); +/* */ } +/* 1394 */ res = true; +/* */ } else { +/* 1396 */ String condition = appendQueryCondition(query, archiveTypeId, type); +/* 1397 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 1399 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='80' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + "))"; +/* 1400 */ String filesql = "update t_ar_" + archiveCode + "_file set status='80' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + ")"; +/* 1401 */ String folderSql = "update t_ar_" + archiveCode + "_folder set status='80' where is_delete='0' and " + condition + ""; +/* 1402 */ this.executeSqlService.update(documentSql); +/* 1403 */ this.executeSqlService.update(filesql); +/* 1404 */ this.executeSqlService.update(folderSql); +/* 1405 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* 1407 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='80' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where " + condition + ")"; +/* 1408 */ String filesql = "update t_ar_" + archiveCode + "_file set status='80' where is_delete='0' and " + condition; +/* 1409 */ this.executeSqlService.update(documentSql); +/* 1410 */ this.executeSqlService.update(filesql); +/* */ } +/* 1412 */ res = true; +/* */ } +/* 1414 */ return res; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\jsgl\service\impl\JsglServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/mldr/controller/MldrController.java b/src/main/java/com/archive/project/dajs/mldr/controller/MldrController.java new file mode 100644 index 0000000..2a70f8a --- /dev/null +++ b/src/main/java/com/archive/project/dajs/mldr/controller/MldrController.java @@ -0,0 +1,91 @@ +/* */ package com.archive.project.dajs.mldr.controller + +-INF.classes.com.archive.project.dajs.mldr.controller; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dajs.mldr.service.IMldrService; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.io.IOException; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dajs/mldr"}) +/* */ public class MldrController +/* */ extends BaseController +/* */ { +/* 35 */ private String prefix = "dajs/mldr"; +/* */ +/* */ +/* */ @Autowired +/* */ private IMldrService mldrService; +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ +/* */ @RequiresPermissions({"dajs:mldr"}) +/* */ @GetMapping +/* */ public String mldr(ModelMap mmap) { +/* 48 */ return this.prefix + "/mldr"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(String key, int page, int size) throws IOException { +/* 60 */ startPage(); +/* */ +/* 62 */ List list = new ArrayList(); +/* 63 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @Log(title = "目录导入-案卷卷内关联", businessType = BusinessType.ZLRK) +/* */ @PostMapping({"/dhgl"}) +/* */ @ResponseBody +/* */ public AjaxResult dhgl(@Validated String id) { +/* 71 */ boolean flag = false; +/* */ try { +/* 73 */ flag = this.mldrService.dhgl(id); +/* 74 */ } catch (Exception ex) { +/* 75 */ System.out.println("关联出现异常:" + ex.getMessage()); +/* 76 */ return error("关联失败!"); +/* */ } +/* 78 */ if (flag) { +/* 79 */ return success("关联成功!"); +/* */ } +/* 81 */ return error("关联失败!"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\mldr\controller\MldrController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/mldr/service/IMldrService.java b/src/main/java/com/archive/project/dajs/mldr/service/IMldrService.java new file mode 100644 index 0000000..f12fc18 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/mldr/service/IMldrService.java @@ -0,0 +1,11 @@ +package com.archive.project.dajs.mldr.service-INF.classes.com.archive.project.dajs.mldr.service; + +public interface IMldrService { + boolean dhgl(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\mldr\service\IMldrService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/mldr/service/impl/MldrServiceImpl.java b/src/main/java/com/archive/project/dajs/mldr/service/impl/MldrServiceImpl.java new file mode 100644 index 0000000..e4fd3aa --- /dev/null +++ b/src/main/java/com/archive/project/dajs/mldr/service/impl/MldrServiceImpl.java @@ -0,0 +1,72 @@ +/* */ package com.archive.project.dajs.mldr.service.impl + +-INF.classes.com.archive.project.dajs.mldr.service.impl; +/* */ +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dajs.archiveimportbatch.domain.ArchiveImportBatch; +/* */ import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService; +/* */ import com.archive.project.dajs.mldr.service.IMldrService; +/* */ import com.archive.project.dasz.archivetype.mapper.ArchiveTypeMapper; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class MldrServiceImpl +/* */ implements IMldrService +/* */ { +/* */ @Autowired +/* */ private ArchiveTypeMapper archiveTypeMapper; +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private IArchiveImportBatchService archiveImportBatchService; +/* */ +/* */ public boolean dhgl(String id) { +/* 40 */ boolean res = false; +/* 41 */ ArchiveImportBatch archiveImportBatch = new ArchiveImportBatch(); +/* 42 */ archiveImportBatch.setId(Long.valueOf(Long.parseLong(id))); +/* 43 */ List list = this.archiveImportBatchService.selectArchiveImportBatchList(archiveImportBatch); +/* 44 */ if (list.size() > 0 && list.get(0) != null) { +/* 45 */ String batchNo = ((ArchiveImportBatch)list.get(0)).getBatchno(); +/* 46 */ String code = ((ArchiveImportBatch)list.get(0)).getBatcharchivetypecode(); +/* */ +/* */ +/* */ +/* */ +/* 51 */ String sql2 = "select id,dh from t_ar_" + code + "_folder where batchNo='" + batchNo + "'"; +/* 52 */ List> datalist = this.executeSqlService.queryList(sql2); +/* 53 */ for (int i = 0; i < datalist.size(); i++) { +/* 54 */ String folderid = (((LinkedHashMap)datalist.get(i)).get("id") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("id").toString(); +/* 55 */ String folderdh = (((LinkedHashMap)datalist.get(i)).get("dh") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("dh").toString(); +/* 56 */ folderdh = folderdh.trim(); +/* */ +/* 58 */ String updatesql = "update t_ar_" + code + "_file set ownerid=" + folderid + " where dh like '" + folderdh + "%'"; +/* 59 */ this.executeSqlService.update(updatesql); +/* */ } +/* */ } +/* 62 */ return res; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\mldr\service\impl\MldrServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/qwgj/controller/QwgjController.java b/src/main/java/com/archive/project/dajs/qwgj/controller/QwgjController.java new file mode 100644 index 0000000..87c26f7 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/qwgj/controller/QwgjController.java @@ -0,0 +1,68 @@ +/* */ package com.archive.project.dajs.qwgj.controller + +-INF.classes.com.archive.project.dajs.qwgj.controller; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dajs.mldr.service.IMldrService; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.io.IOException; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dajs/qwgj"}) +/* */ public class QwgjController +/* */ extends BaseController +/* */ { +/* 30 */ private String prefix = "dajs/qwgj"; +/* */ +/* */ +/* */ @Autowired +/* */ private IMldrService mldrService; +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ +/* */ @RequiresPermissions({"dajs:qwgj"}) +/* */ @GetMapping +/* */ public String mldr(ModelMap mmap) { +/* 43 */ return this.prefix + "/qwgj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(String key, int page, int size) throws IOException { +/* 55 */ startPage(); +/* */ +/* 57 */ List list = new ArrayList(); +/* 58 */ return getDataTable(list); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\qwgj\controller\QwgjController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/qwgj/service/IQwgjService.java b/src/main/java/com/archive/project/dajs/qwgj/service/IQwgjService.java new file mode 100644 index 0000000..4dce54b --- /dev/null +++ b/src/main/java/com/archive/project/dajs/qwgj/service/IQwgjService.java @@ -0,0 +1,9 @@ +package com.archive.project.dajs.qwgj.service; + +public interface IQwgjService {} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\qwgj\service\IQwgjService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/qwgj/service/impl/QwgjServiceImpl.java b/src/main/java/com/archive/project/dajs/qwgj/service/impl/QwgjServiceImpl.java new file mode 100644 index 0000000..4cb1823 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/qwgj/service/impl/QwgjServiceImpl.java @@ -0,0 +1,28 @@ +package com.archive.project.dajs.qwgj.service.impl + +-INF.classes.com.archive.project.dajs.qwgj.service.impl; + +import com.archive.project.common.service.IExecuteSqlService; +import com.archive.project.dajs.qwgj.service.IQwgjService; +import com.archive.project.dasz.archivetype.mapper.ArchiveTypeMapper; +import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class QwgjServiceImpl implements IQwgjService { + @Autowired + private ArchiveTypeMapper archiveTypeMapper; + + @Autowired + private PhysicalTableMapper physicalTableMapper; + + @Autowired + private IExecuteSqlService executeSqlService; +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\qwgj\service\impl\QwgjServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/recycle/controller/RecycleController.java b/src/main/java/com/archive/project/dajs/recycle/controller/RecycleController.java new file mode 100644 index 0000000..a480442 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/recycle/controller/RecycleController.java @@ -0,0 +1,226 @@ +/* */ package com.archive.project.dajs.recycle.controller + +-INF.classes.com.archive.project.dajs.recycle.controller; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.dajs.jsgl.service.IJsglService; +/* */ import com.archive.project.dajs.recycle.service.IRecycleService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.HashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dajs/recycle"}) +/* */ public class RecycleController +/* */ extends BaseController +/* */ { +/* 38 */ private String prefix = "dajs/recycle"; +/* */ +/* */ +/* */ @Autowired +/* */ private IArchiveTypeService archiveTypeService; +/* */ +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ @Autowired +/* */ private IJsglService jsglService; +/* */ +/* */ @Autowired +/* */ private IRecycleService recycleService; +/* */ +/* */ @Autowired +/* */ private IConfigService configService; +/* */ +/* */ +/* */ @RequiresPermissions({"dajs:recycle"}) +/* */ @GetMapping +/* */ public String recycle(ModelMap mmap) { +/* 61 */ List ztrees = this.archiveTypeService.archiveCollationTreeData(); +/* 62 */ if (ztrees != null && ztrees.size() > 2) { +/* 63 */ mmap.put("firstNode", ztrees.get(1)); +/* */ } else { +/* 65 */ mmap.put("firstNode", null); +/* */ } +/* */ +/* */ +/* 69 */ DictType dictType = new DictType(); dictType.setLabel("column_bind"); +/* 70 */ List dictTypeList = this.dictTypeService.selectDictTypeList(dictType); +/* 71 */ Map> dictDataMap = new HashMap<>(); +/* 72 */ for (DictType dictTypeTemp : dictTypeList) { +/* 73 */ List dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); +/* 74 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); +/* */ } +/* 76 */ mmap.put("dictDataMap", dictDataMap); +/* 77 */ return this.prefix + "/recycle"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/detail/{archiveId}/{type}/{id}"}) +/* */ public String detail(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) { +/* 90 */ mmap.put("archiveTypeId", archiveId); +/* 91 */ mmap.put("type", type); +/* 92 */ mmap.put("id", id); +/* 93 */ return this.prefix + "/detail"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/appendAddForm/{archiveId}/{type}"}) +/* */ @ResponseBody +/* */ public String appendAddForm(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type) { +/* 109 */ return this.jsglService.appendAddForm(archiveId, type); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "回收站-档案删除", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/delete"}) +/* */ @ResponseBody +/* */ public AjaxResult delete(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) { +/* 127 */ boolean flag = false; +/* */ +/* */ +/* */ try { +/* 131 */ flag = this.jsglService.archivePhysicalDelete(query, archiveTypeId, type, ids); +/* 132 */ } catch (Exception ex) { +/* 133 */ System.out.println("档案删除出现异常:" + ex.getMessage()); +/* 134 */ return error("删除失败!"); +/* */ } +/* 136 */ if (flag) { +/* 137 */ return success("删除成功!"); +/* */ } +/* 139 */ return error("删除失败!"); +/* */ } +/* */ +/* */ +/* */ @Log(title = "回收站-档案恢复", businessType = BusinessType.RESEST) +/* */ @PostMapping({"/hf"}) +/* */ @ResponseBody +/* */ public AjaxResult hf(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) { +/* 147 */ boolean flag = false; +/* */ try { +/* 149 */ flag = this.jsglService.archivePhysicalHf(query, archiveTypeId, type, ids); +/* 150 */ } catch (Exception ex) { +/* 151 */ System.out.println("档案恢复出现异常:" + ex.getMessage()); +/* 152 */ return error("恢复失败!"); +/* */ } +/* 154 */ if (flag) { +/* 155 */ return success("恢复成功!"); +/* */ } +/* 157 */ return error("恢复失败!"); +/* */ } +/* */ +/* */ +/* */ @Log(title = "回收站-档案清空", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/clearAll"}) +/* */ @ResponseBody +/* */ public AjaxResult clearAll(@Validated String archiveTypeId, @Validated String type) { +/* 165 */ boolean flag = false; +/* */ +/* */ +/* */ try { +/* 169 */ flag = this.recycleService.archivePhysicalDelete(archiveTypeId, type); +/* 170 */ } catch (Exception ex) { +/* 171 */ System.out.println("档案清空出现异常:" + ex.getMessage()); +/* 172 */ return error("清空失败!"); +/* */ } +/* 174 */ if (flag) { +/* 175 */ return success("清空成功!"); +/* */ } +/* 177 */ return error("清空失败!"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/appendAddFormByDataId/{archiveTypeId}/{type}/{id}/{readOnly}"}) +/* */ @ResponseBody +/* */ public String appendAddFormByDataId(@PathVariable("archiveTypeId") String archiveTypeId, @PathVariable("type") String type, @PathVariable("id") String id, @PathVariable("readOnly") String readOnly) { +/* 192 */ return this.jsglService.appendAddFormByDataId(archiveTypeId, type, id, readOnly); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/folderFile/{archiveId}/{id}"}) +/* */ public String folderFile(@PathVariable("archiveId") String archiveId, @PathVariable("id") String id, ModelMap mmap) { +/* 205 */ mmap.put("archiveId", archiveId); +/* 206 */ mmap.put("folderId", id); +/* */ +/* 208 */ DictType dictType = new DictType(); dictType.setLabel("column_bind"); +/* 209 */ List dictTypeList = this.dictTypeService.selectDictTypeList(dictType); +/* 210 */ Map> dictDataMap = new HashMap<>(); +/* 211 */ for (DictType dictTypeTemp : dictTypeList) { +/* 212 */ List dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); +/* 213 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); +/* */ } +/* 215 */ mmap.put("dictDataMap", dictDataMap); +/* 216 */ return this.prefix + "/recyclewj"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\recycle\controller\RecycleController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/recycle/service/IRecycleService.java b/src/main/java/com/archive/project/dajs/recycle/service/IRecycleService.java new file mode 100644 index 0000000..96d8c5a --- /dev/null +++ b/src/main/java/com/archive/project/dajs/recycle/service/IRecycleService.java @@ -0,0 +1,11 @@ +package com.archive.project.dajs.recycle.service-INF.classes.com.archive.project.dajs.recycle.service; + +public interface IRecycleService { + boolean archivePhysicalDelete(String paramString1, String paramString2); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\recycle\service\IRecycleService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dajs/recycle/service/impl/RecycleServiceImpl.java b/src/main/java/com/archive/project/dajs/recycle/service/impl/RecycleServiceImpl.java new file mode 100644 index 0000000..26d4527 --- /dev/null +++ b/src/main/java/com/archive/project/dajs/recycle/service/impl/RecycleServiceImpl.java @@ -0,0 +1,113 @@ +/* */ package com.archive.project.dajs.recycle.service.impl + +-INF.classes.com.archive.project.dajs.recycle.service.impl; +/* */ +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dajs.recycle.service.IRecycleService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.mapper.ArchiveTypeMapper; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import java.io.File; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class RecycleServiceImpl +/* */ implements IRecycleService +/* */ { +/* */ @Autowired +/* */ private ArchiveTypeMapper archiveTypeMapper; +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private IArchiveTypeService iArchiveTypeService; +/* */ +/* */ @Transactional +/* */ public boolean archivePhysicalDelete(String archiveTypeId, String type) { +/* 58 */ boolean res = false; +/* 59 */ ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 60 */ String archiveCode = archiveType.getArhciveCode(); +/* 61 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* */ +/* 64 */ String documentPathSql = "select filewaterpath,filepath from t_ar_" + archiveCode + "_document where is_delete='1'"; +/* 65 */ getDocumentSqlDeleteFile(documentPathSql); +/* 66 */ String documentSql = "delete from t_ar_" + archiveCode + "_document where is_delete='1'"; +/* 67 */ String filesql = "delete from t_ar_" + archiveCode + "_file where is_delete='1'"; +/* 68 */ String folderSql = "delete from t_ar_" + archiveCode + "_folder where is_delete='1'"; +/* 69 */ this.executeSqlService.delete(documentSql); +/* 70 */ this.executeSqlService.delete(filesql); +/* 71 */ this.executeSqlService.delete(folderSql); +/* 72 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* */ +/* 75 */ String documentPathSql = "select filewaterpath,filepath from t_ar_" + archiveCode + "_document where is_delete='1'"; +/* 76 */ getDocumentSqlDeleteFile(documentPathSql); +/* 77 */ String documentSql = "delete from t_ar_" + archiveCode + "_document where is_delete='1'"; +/* 78 */ String filesql = "delete from t_ar_" + archiveCode + "_file where is_delete='1'"; +/* 79 */ this.executeSqlService.delete(documentSql); +/* 80 */ this.executeSqlService.delete(filesql); +/* */ } +/* 82 */ res = true; +/* 83 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void getDocumentSqlDeleteFile(String sql) { +/* 92 */ List> list = this.executeSqlService.queryList(sql); +/* 93 */ for (int i = 0; i < list.size(); i++) { +/* 94 */ String waterPath = (((LinkedHashMap)list.get(i)).get("filewaterpath") == null) ? "" : ((LinkedHashMap)list.get(i)).get("filewaterpath").toString(); +/* 95 */ String filePath = (((LinkedHashMap)list.get(i)).get("filepath") == null) ? "" : ((LinkedHashMap)list.get(i)).get("filepath").toString(); +/* 96 */ File waterFile = new File(waterPath); +/* 97 */ if (waterFile.exists()) { +/* 98 */ waterFile.delete(); +/* */ } +/* 100 */ File file = new File(filePath); +/* 101 */ if (file.exists()) +/* 102 */ file.delete(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\recycle\service\impl\RecycleServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/controller/ArchiveListController.java b/src/main/java/com/archive/project/dasz/archivetype/controller/ArchiveListController.java new file mode 100644 index 0000000..fcac9ec --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/controller/ArchiveListController.java @@ -0,0 +1,319 @@ +/* */ package com.archive.project.dasz.archivetype.controller + +-INF.classes.com.archive.project.dasz.archivetype.controller; +/* */ +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.PageDomain; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.framework.web.page.TableSupport; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveTableColumn; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveListService; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.system.dict.service.IDictDataService; +/* */ import java.io.File; +/* */ import java.io.FileOutputStream; +/* */ import java.io.IOException; +/* */ import java.io.OutputStream; +/* */ import java.util.ArrayList; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import org.apache.poi.ss.usermodel.Cell; +/* */ import org.apache.poi.ss.usermodel.CellStyle; +/* */ import org.apache.poi.ss.usermodel.Font; +/* */ import org.apache.poi.ss.usermodel.HorizontalAlignment; +/* */ import org.apache.poi.ss.usermodel.Row; +/* */ import org.apache.poi.ss.usermodel.Sheet; +/* */ import org.apache.poi.ss.usermodel.Workbook; +/* */ import org.apache.poi.xssf.usermodel.XSSFWorkbook; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.RequestParam; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ import ucar.httpservices.HTTPSession; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/archivelist"}) +/* */ public class ArchiveListController +/* */ extends BaseController +/* */ { +/* */ @Autowired +/* */ private IArchiveListService archiveListService; +/* */ @Autowired +/* */ private IArchiveTypeService archiveTypeService; +/* */ @Autowired +/* */ private IDictDataService dictDataService; +/* 63 */ private String prefix = "dasz/archivelist"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getColumns/{id}/{code}"}) +/* */ @ResponseBody +/* */ public AjaxResult getColumns(@PathVariable("id") String id, @PathVariable("code") String code) { +/* 79 */ return AjaxResult.success(this.archiveListService.getColumns(id, code)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getOrderColumns/{id}/{code}"}) +/* */ @ResponseBody +/* */ public AjaxResult getOrderColumns(@PathVariable("id") String id, @PathVariable("code") String code) { +/* 92 */ return AjaxResult.success(this.archiveListService.getOrderColumns(id, code)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/list/{id}/{code}/{ownerid}/{isRecycle}/{status}"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(@PathVariable("id") String id, @PathVariable("code") String code, @PathVariable("ownerid") String ownerid, @RequestParam Map formData, @PathVariable("isRecycle") String isRecycle, @PathVariable("status") String status) { +/* 111 */ PageDomain pageDomain = TableSupport.buildPageRequest(); +/* 112 */ Integer pageNum = pageDomain.getPageNum(); +/* 113 */ Integer pageSize = pageDomain.getPageSize(); +/* 114 */ String orderBy = pageDomain.getOrderBy(); +/* 115 */ String orderByColumn = pageDomain.getOrderByColumn(); +/* 116 */ Map map = this.archiveListService.selectArchiveList(id, code, ownerid, pageNum, pageSize, orderBy, orderByColumn, formData, isRecycle, status); +/* 117 */ TableDataInfo tableDataInfo = new TableDataInfo((List)map.get("list"), ((Integer)map.get("count")).intValue()); +/* 118 */ return tableDataInfo; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/columnDataFormat/{dictType}/{dictValue}"}) +/* */ @ResponseBody +/* */ public String columnDataFormat(@PathVariable("dictType") String dictType, @PathVariable("dictValue") String dictValue) { +/* 135 */ return this.dictDataService.selectDictLabel(dictType, dictValue); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getSearchHtml/{id}/{code}"}) +/* */ @ResponseBody +/* */ public AjaxResult getSearchHtml(@PathVariable("id") String id, @PathVariable("code") String code) { +/* 152 */ return AjaxResult.success(this.archiveListService.getSearchHtml(id, code)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:archivelist:export"}) +/* */ @Log(title = "接收管理导出", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export/{id}/{code}/{ownerid}/{isRecycle}/{status}"}) +/* */ @ResponseBody +/* */ public AjaxResult export(HttpServletResponse response, @PathVariable("id") String id, @PathVariable("code") String code, @PathVariable("ownerid") String ownerid, @PathVariable("isRecycle") String isRecycle, @RequestParam Map formData, @PathVariable("status") String status) throws Exception { +/* 165 */ Map map = this.archiveListService.selectArchiveList(id, code, ownerid, Integer.valueOf(1), Integer.valueOf(99999999), "", "", formData, isRecycle, status); +/* 166 */ List> list = (List>)map.get("list"); +/* */ +/* */ +/* 169 */ List headsList = this.archiveListService.getColumns(id, code); +/* 170 */ String[] arr = new String[headsList.size() - 1]; +/* 171 */ for (int i = 0; i < headsList.size(); i++) { +/* 172 */ if (i != 0) +/* */ { +/* 174 */ arr[i - 1] = ((ArchiveTableColumn)headsList.get(i)).getTitle(); +/* */ } +/* */ } +/* 177 */ ArchiveType archiveType = this.archiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(id))); +/* */ +/* 179 */ List listAll = new ArrayList<>(); +/* 180 */ for (int j = 0; j < list.size(); j++) { +/* 181 */ List list1 = new ArrayList(); +/* 182 */ for (int k = 0; k < headsList.size(); k++) { +/* 183 */ if (k > 0) { +/* 184 */ String value = (((LinkedHashMap)list.get(j)).get(((ArchiveTableColumn)headsList.get(k)).getField()) == null) ? "" : ((LinkedHashMap)list.get(j)).get(((ArchiveTableColumn)headsList.get(k)).getField()).toString(); +/* 185 */ list1.add(value); +/* */ } +/* */ } +/* 188 */ listAll.add(list1); +/* */ } +/* 190 */ Workbook wb = writeToExcelByList(archiveType.getArchiveName(), arr, listAll); +/* */ +/* 192 */ String fileName = archiveType.getArchiveName() + ".xlsx"; +/* 193 */ return exportExcel(wb, fileName); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public AjaxResult exportExcel(Workbook wb, String filename) { +/* 204 */ OutputStream out = null; +/* */ +/* */ try { +/* 207 */ out = new FileOutputStream(getAbsoluteFile(filename)); +/* 208 */ wb.write(out); +/* 209 */ return AjaxResult.success(filename); +/* */ } +/* 211 */ catch (Exception e) { +/* */ +/* 213 */ HTTPSession.log.error("导出Excel异常{}", e.getMessage()); +/* 214 */ throw new BusinessException("导出Excel失败,请联系网站管理员!"); +/* */ } +/* */ finally { +/* */ +/* 218 */ if (wb != null) { +/* */ +/* */ try { +/* */ +/* 222 */ wb.close(); +/* */ } +/* 224 */ catch (IOException e1) { +/* */ +/* 226 */ e1.printStackTrace(); +/* */ } +/* */ } +/* 229 */ if (out != null) { +/* */ +/* */ try { +/* */ +/* 233 */ out.close(); +/* */ } +/* 235 */ catch (IOException e1) { +/* */ +/* 237 */ e1.printStackTrace(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getAbsoluteFile(String filename) { +/* 251 */ String downloadPath = ArchiveConfig.getInstance().getDownloadPath() + filename; +/* 252 */ File desc = new File(downloadPath); +/* 253 */ if (!desc.getParentFile().exists()) +/* */ { +/* 255 */ desc.getParentFile().mkdirs(); +/* */ } +/* 257 */ return downloadPath; +/* */ } +/* */ +/* */ +/* */ +/* */ public static Workbook writeToExcelByList(String name, String[] array, List list) { +/* 263 */ XSSFWorkbook xSSFWorkbook = new XSSFWorkbook(); +/* */ +/* 265 */ CellStyle titleStyle = xSSFWorkbook.createCellStyle(); +/* */ +/* 267 */ titleStyle.setAlignment(HorizontalAlignment.LEFT); +/* */ +/* 269 */ Font titleFont = xSSFWorkbook.createFont(); +/* */ +/* 271 */ titleFont.setFontHeightInPoints((short)12); +/* */ +/* 273 */ titleFont.setFontName("黑体"); +/* 274 */ titleStyle.setFont(titleFont); +/* */ +/* 276 */ Sheet sheet = xSSFWorkbook.createSheet(name); +/* */ +/* 278 */ sheet.autoSizeColumn(0); +/* */ +/* 280 */ Row row = sheet.createRow(0); +/* 281 */ for (int i = 0; i < array.length; i++) { +/* 282 */ Cell cell = row.createCell(i); +/* 283 */ cell.setCellValue(array[i]); +/* 284 */ cell.setCellStyle(titleStyle); +/* */ } +/* */ +/* 287 */ CellStyle dataStyle = xSSFWorkbook.createCellStyle(); +/* */ +/* 289 */ dataStyle.setAlignment(HorizontalAlignment.CENTER); +/* */ +/* */ try { +/* 292 */ int index = 1; +/* 293 */ for (List value : list) { +/* */ +/* 295 */ row = sheet.createRow(index); +/* 296 */ index++; +/* 297 */ List data = value; +/* 298 */ for (int j = 0; j < data.size(); j++) { +/* 299 */ Cell cell = row.createCell(j); +/* */ +/* 301 */ cell.setCellValue(data.get(j).toString()); +/* */ +/* 303 */ cell.setCellStyle(dataStyle); +/* */ } +/* */ } +/* 306 */ } catch (Exception e) { +/* 307 */ e.printStackTrace(); +/* */ } +/* 309 */ return (Workbook)xSSFWorkbook; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\controller\ArchiveListController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/controller/ArchiveTypeController.java b/src/main/java/com/archive/project/dasz/archivetype/controller/ArchiveTypeController.java new file mode 100644 index 0000000..e986b87 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/controller/ArchiveTypeController.java @@ -0,0 +1,238 @@ +/* */ package com.archive.project.dasz.archivetype.controller + +-INF.classes.com.archive.project.dasz.archivetype.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveTypeManageTree; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dasz.physicaltable.domain.PhysicalTable; +/* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/archivetype"}) +/* */ public class ArchiveTypeController +/* */ extends BaseController +/* */ { +/* 42 */ private String prefix = "dasz/archivetype"; +/* */ +/* */ @Autowired +/* */ private IArchiveTypeService archiveTypeService; +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ @Autowired +/* */ private IPhysicalTableService physicalTableService; +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:archivetype:view"}) +/* */ @GetMapping +/* */ public String ArchiveType(ModelMap mmap) { +/* 57 */ DictType dictType = new DictType(); +/* 58 */ dictType.setLabel("column_bind"); +/* 59 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 60 */ mmap.put("dictList", list); +/* 61 */ return this.prefix + "/archivetype"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:archivetype:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(ArchiveType archiveType) { +/* 72 */ startPage(); +/* 73 */ List list = this.archiveTypeService.selectArchiveTypeList(archiveType); +/* 74 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:archivetype:export"}) +/* */ @Log(title = "档案类型", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(ArchiveType archiveType) { +/* 86 */ List list = this.archiveTypeService.selectArchiveTypeList(archiveType); +/* 87 */ ExcelUtil util = new ExcelUtil(ArchiveType.class); +/* 88 */ return util.exportExcel(list, "archiveType"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 97 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:archivetype:add"}) +/* */ @Log(title = "档案类型", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(ArchiveType archiveType) { +/* */ try { +/* 110 */ ArchiveType ArchiveTypeTemp = new ArchiveType(); +/* 111 */ ArchiveTypeTemp.setArhciveCode(archiveType.getArhciveCode()); +/* 112 */ List ArchiveTypeList = this.archiveTypeService.selectArchiveTypeList(ArchiveTypeTemp); +/* 113 */ if (ArchiveTypeList != null && ArchiveTypeList.size() > 0) { +/* 114 */ return error("该档案类型已存在!"); +/* */ } +/* 116 */ this.archiveTypeService.insertArchiveType(archiveType); +/* 117 */ return toAjax(true); +/* */ } +/* 119 */ catch (Exception e) { +/* 120 */ e.printStackTrace(); +/* 121 */ return toAjax(false); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 131 */ ArchiveType ArchiveType = this.archiveTypeService.selectArchiveTypeById(id); +/* 132 */ mmap.put("archiveType", ArchiveType); +/* 133 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:archivetype:edit"}) +/* */ @Log(title = "档案类型", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(ArchiveType archiveType) { +/* 145 */ return toAjax(this.archiveTypeService.updateArchiveType(archiveType)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:archivetype:remove"}) +/* */ @Log(title = "档案类型", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* */ try { +/* 158 */ boolean isNotEmpty = this.archiveTypeService.checkArchiveTypeIsHaveData(ids); +/* 159 */ if (isNotEmpty) { +/* 160 */ return error("该档案类型下存在数据,不能删除!"); +/* */ } +/* 162 */ this.archiveTypeService.deleteArchiveType(ids); +/* 163 */ return success(); +/* */ } +/* 165 */ catch (Exception e) { +/* 166 */ e.printStackTrace(); +/* 167 */ return error(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/archiveCollationTreeData"}) +/* */ @ResponseBody +/* */ public List archiveCollationTreeData() { +/* 178 */ List ztrees = this.archiveTypeService.archiveCollationTreeData(); +/* 179 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/archiveTypeManageTreeData"}) +/* */ @ResponseBody +/* */ public List ArchiveTypeManageTreeData() { +/* 189 */ List ztrees = this.archiveTypeService.ArchiveTypeManageTreeData(); +/* 190 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:archivetype:formbuild"}) +/* */ @GetMapping({"/formBuild/{tableId}"}) +/* */ public String formBuild(@PathVariable("tableId") Long tableId, ModelMap mmap) { +/* 201 */ PhysicalTable physicalTable = this.physicalTableService.selectPhysicalTableById(tableId); +/* 202 */ String tableForm = physicalTable.getTableForm(); +/* 203 */ mmap.put("tableId", tableId); +/* 204 */ mmap.put("tableForm", tableForm); +/* 205 */ return this.prefix + "/formbuild"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/baseForm/{tableId}"}) +/* */ @ResponseBody +/* */ public String baseForm(@PathVariable("tableId") Long tableId) { +/* 216 */ return this.archiveTypeService.appendBaseForm(tableId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/tableForm/{tableId}"}) +/* */ @ResponseBody +/* */ public String tableForm(@PathVariable("tableId") Long tableId) { +/* 227 */ PhysicalTable physicalTable = this.physicalTableService.selectPhysicalTableById(tableId); +/* 228 */ return physicalTable.getTableFormDiv(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\controller\ArchiveTypeController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveCollationTree.java b/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveCollationTree.java new file mode 100644 index 0000000..a186087 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveCollationTree.java @@ -0,0 +1,137 @@ +/* */ package com.archive.project.dasz.archivetype.domain + +-INF.classes.com.archive.project.dasz.archivetype.domain; +/* */ +/* */ import java.io.Serializable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ArchiveCollationTree +/* */ implements Serializable +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ private Long pId; +/* */ private String name; +/* */ private String title; +/* */ private String type; +/* */ private String archiveCode; +/* */ private boolean checked = false; +/* */ private boolean open = false; +/* */ private boolean nocheck = false; +/* */ +/* */ public Long getId() { +/* 46 */ return this.id; +/* */ } +/* */ +/* */ +/* */ public void setId(Long id) { +/* 51 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getpId() { +/* 56 */ return this.pId; +/* */ } +/* */ +/* */ +/* */ public void setpId(Long pId) { +/* 61 */ this.pId = pId; +/* */ } +/* */ +/* */ +/* */ public String getName() { +/* 66 */ return this.name; +/* */ } +/* */ +/* */ +/* */ public void setName(String name) { +/* 71 */ this.name = name; +/* */ } +/* */ +/* */ +/* */ public String getTitle() { +/* 76 */ return this.title; +/* */ } +/* */ +/* */ +/* */ public void setTitle(String title) { +/* 81 */ this.title = title; +/* */ } +/* */ +/* */ +/* */ public boolean isChecked() { +/* 86 */ return this.checked; +/* */ } +/* */ +/* */ +/* */ public void setChecked(boolean checked) { +/* 91 */ this.checked = checked; +/* */ } +/* */ +/* */ +/* */ public boolean isOpen() { +/* 96 */ return this.open; +/* */ } +/* */ +/* */ +/* */ public void setOpen(boolean open) { +/* 101 */ this.open = open; +/* */ } +/* */ +/* */ +/* */ public boolean isNocheck() { +/* 106 */ return this.nocheck; +/* */ } +/* */ +/* */ +/* */ public void setNocheck(boolean nocheck) { +/* 111 */ this.nocheck = nocheck; +/* */ } +/* */ +/* */ public String getType() { +/* 115 */ return this.type; +/* */ } +/* */ +/* */ public void setType(String type) { +/* 119 */ this.type = type; +/* */ } +/* */ +/* */ public String getArchiveCode() { +/* 123 */ return this.archiveCode; +/* */ } +/* */ +/* */ public void setArchiveCode(String archiveCode) { +/* 127 */ this.archiveCode = archiveCode; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\domain\ArchiveCollationTree.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveTableColumn.java b/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveTableColumn.java new file mode 100644 index 0000000..bc2a289 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveTableColumn.java @@ -0,0 +1,76 @@ +/* */ package com.archive.project.dasz.archivetype.domain + +-INF.classes.com.archive.project.dasz.archivetype.domain; +/* */ +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ArchiveTableColumn +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private boolean checkbox = false; +/* 19 */ private String field = ""; +/* */ +/* */ +/* 22 */ private String title = ""; +/* */ +/* */ +/* */ private boolean visible = false; +/* */ +/* */ +/* 28 */ private String codeType = ""; +/* */ +/* 30 */ private int width = 50; +/* */ +/* */ public boolean isCheckbox() { +/* 33 */ return this.checkbox; +/* */ } +/* */ public void setCheckbox(boolean checkbox) { +/* 36 */ this.checkbox = checkbox; +/* */ } +/* */ public String getField() { +/* 39 */ return this.field; +/* */ } +/* */ public void setField(String field) { +/* 42 */ this.field = field; +/* */ } +/* */ public String getTitle() { +/* 45 */ return this.title; +/* */ } +/* */ public void setTitle(String title) { +/* 48 */ this.title = title; +/* */ } +/* */ public boolean isVisible() { +/* 51 */ return this.visible; +/* */ } +/* */ public void setVisible(boolean visible) { +/* 54 */ this.visible = visible; +/* */ } +/* */ public String getCodeType() { +/* 57 */ return this.codeType; +/* */ } +/* */ public void setCodeType(String codeType) { +/* 60 */ this.codeType = codeType; +/* */ } +/* */ public int getWidth() { +/* 63 */ return this.width; +/* */ } +/* */ public void setWidth(int width) { +/* 66 */ this.width = width; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\domain\ArchiveTableColumn.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveType.java b/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveType.java new file mode 100644 index 0000000..a98e495 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveType.java @@ -0,0 +1,128 @@ +/* */ package com.archive.project.dasz.archivetype.domain + +-INF.classes.com.archive.project.dasz.archivetype.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ArchiveType +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "档案类型名称") +/* */ private String archiveName; +/* */ @Excel(name = "基础类型") +/* */ private Long archiveType; +/* */ @Excel(name = "档案类型") +/* */ private String type; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "档案类型编码") +/* */ private String arhciveCode; +/* */ private String showorder; +/* */ +/* */ public void setId(Long id) { +/* 46 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 51 */ return this.id; +/* */ } +/* */ +/* */ public void setArchiveName(String archiveName) { +/* 55 */ this.archiveName = archiveName; +/* */ } +/* */ +/* */ +/* */ public String getArchiveName() { +/* 60 */ return this.archiveName; +/* */ } +/* */ +/* */ public void setArchiveType(Long archiveType) { +/* 64 */ this.archiveType = archiveType; +/* */ } +/* */ +/* */ +/* */ public Long getArchiveType() { +/* 69 */ return this.archiveType; +/* */ } +/* */ +/* */ public void setType(String type) { +/* 73 */ this.type = type; +/* */ } +/* */ +/* */ +/* */ public String getType() { +/* 78 */ return this.type; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 82 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 87 */ return this.bz; +/* */ } +/* */ +/* */ public void setArhciveCode(String arhciveCode) { +/* 91 */ this.arhciveCode = arhciveCode; +/* */ } +/* */ +/* */ +/* */ public String getArhciveCode() { +/* 96 */ return this.arhciveCode; +/* */ } +/* */ +/* */ public void setShoworder(String showorder) { +/* 100 */ this.showorder = showorder; +/* */ } +/* */ +/* */ +/* */ public String getShoworder() { +/* 105 */ return this.showorder; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 110 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 111 */ .append("id", getId()) +/* 112 */ .append("archiveName", getArchiveName()) +/* 113 */ .append("archiveType", getArchiveType()) +/* 114 */ .append("type", getType()) +/* 115 */ .append("bz", getBz()) +/* 116 */ .append("arhciveCode", getArhciveCode()) +/* 117 */ .append("order", getShoworder()) +/* 118 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\domain\ArchiveType.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveTypeManageTree.java b/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveTypeManageTree.java new file mode 100644 index 0000000..f45127e --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/domain/ArchiveTypeManageTree.java @@ -0,0 +1,123 @@ +/* */ package com.archive.project.dasz.archivetype.domain + +-INF.classes.com.archive.project.dasz.archivetype.domain; +/* */ +/* */ import java.io.Serializable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ArchiveTypeManageTree +/* */ implements Serializable +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private String id; +/* */ private String pId; +/* */ private String name; +/* */ private String title; +/* */ private String nodeType; +/* */ private String archiveTypeId; +/* */ private boolean checked = false; +/* */ private boolean open = false; +/* */ private boolean nocheck = false; +/* */ +/* */ public String getId() { +/* 45 */ return this.id; +/* */ } +/* */ +/* */ public void setId(String id) { +/* 49 */ this.id = id; +/* */ } +/* */ +/* */ public String getpId() { +/* 53 */ return this.pId; +/* */ } +/* */ +/* */ public void setpId(String pId) { +/* 57 */ this.pId = pId; +/* */ } +/* */ +/* */ public String getName() { +/* 61 */ return this.name; +/* */ } +/* */ +/* */ public void setName(String name) { +/* 65 */ this.name = name; +/* */ } +/* */ +/* */ public String getTitle() { +/* 69 */ return this.title; +/* */ } +/* */ +/* */ public void setTitle(String title) { +/* 73 */ this.title = title; +/* */ } +/* */ +/* */ public String getNodeType() { +/* 77 */ return this.nodeType; +/* */ } +/* */ +/* */ public void setNodeType(String nodeType) { +/* 81 */ this.nodeType = nodeType; +/* */ } +/* */ +/* */ public boolean isChecked() { +/* 85 */ return this.checked; +/* */ } +/* */ +/* */ public void setChecked(boolean checked) { +/* 89 */ this.checked = checked; +/* */ } +/* */ +/* */ public boolean isOpen() { +/* 93 */ return this.open; +/* */ } +/* */ +/* */ public void setOpen(boolean open) { +/* 97 */ this.open = open; +/* */ } +/* */ +/* */ public boolean isNocheck() { +/* 101 */ return this.nocheck; +/* */ } +/* */ +/* */ public void setNocheck(boolean nocheck) { +/* 105 */ this.nocheck = nocheck; +/* */ } +/* */ +/* */ public String getArchiveTypeId() { +/* 109 */ return this.archiveTypeId; +/* */ } +/* */ +/* */ public void setArchiveTypeId(String archiveTypeId) { +/* 113 */ this.archiveTypeId = archiveTypeId; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\domain\ArchiveTypeManageTree.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/mapper/ArchiveTypeMapper.java b/src/main/java/com/archive/project/dasz/archivetype/mapper/ArchiveTypeMapper.java new file mode 100644 index 0000000..343e6c6 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/mapper/ArchiveTypeMapper.java @@ -0,0 +1,30 @@ +package com.archive.project.dasz.archivetype.mapper + +-INF.classes.com.archive.project.dasz.archivetype.mapper; + +import com.archive.project.dasz.archivetype.domain.ArchiveType; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface ArchiveTypeMapper { + ArchiveType selectArchiveTypeById(Long paramLong); + + List selectArchiveTypeList(ArchiveType paramArchiveType); + + List selectArchiveTypeListSqlite(ArchiveType paramArchiveType); + + int insertArchiveType(ArchiveType paramArchiveType); + + int updateArchiveType(ArchiveType paramArchiveType); + + int deleteArchiveTypeById(Long paramLong); + + int deleteArchiveTypeByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\mapper\ArchiveTypeMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/service/IArchiveListService.java b/src/main/java/com/archive/project/dasz/archivetype/service/IArchiveListService.java new file mode 100644 index 0000000..6372d45 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/service/IArchiveListService.java @@ -0,0 +1,23 @@ +package com.archive.project.dasz.archivetype.service + +; + +import com.archive.project.dasz.archivetype.domain.ArchiveTableColumn; +import java.util.List; +import java.util.Map; + +public interface IArchiveListService { + List getColumns(String paramString1, String paramString2); + + Map getOrderColumns(String paramString1, String paramString2); + + Map selectArchiveList(String paramString1, String paramString2, String paramString3, Integer paramInteger1, Integer paramInteger2, String paramString4, String paramString5, Map paramMap, String paramString6, String paramString7); + + String getSearchHtml(String paramString1, String paramString2); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\service\IArchiveListService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/service/IArchiveTypeService.java b/src/main/java/com/archive/project/dasz/archivetype/service/IArchiveTypeService.java new file mode 100644 index 0000000..eb9e3af --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/service/IArchiveTypeService.java @@ -0,0 +1,38 @@ +package com.archive.project.dasz.archivetype.service + +-INF.classes.com.archive.project.dasz.archivetype.service; + +import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree; +import com.archive.project.dasz.archivetype.domain.ArchiveType; +import com.archive.project.dasz.archivetype.domain.ArchiveTypeManageTree; +import java.util.List; + +public interface IArchiveTypeService { + ArchiveType selectArchiveTypeById(Long paramLong); + + List selectArchiveTypeList(ArchiveType paramArchiveType); + + void insertArchiveType(ArchiveType paramArchiveType) throws Exception; + + int updateArchiveType(ArchiveType paramArchiveType); + + void deleteArchiveType(String paramString) throws Exception; + + int deleteArchiveTypeByIds(String paramString); + + int deleteArchiveTypeById(Long paramLong); + + boolean checkArchiveTypeIsHaveData(String paramString); + + List archiveCollationTreeData(); + + List ArchiveTypeManageTreeData(); + + String appendBaseForm(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\service\IArchiveTypeService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/service/impl/ArchiveListServiceImpl.java b/src/main/java/com/archive/project/dasz/archivetype/service/impl/ArchiveListServiceImpl.java new file mode 100644 index 0000000..195f2a9 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/service/impl/ArchiveListServiceImpl.java @@ -0,0 +1,428 @@ +/* */ package com.archive.project.dasz.archivetype.service.impl + +-INF.classes.com.archive.project.dasz.archivetype.service.impl; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveTableColumn; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveListService; +/* */ import com.archive.project.dasz.gridcolumns.domain.TXtpzGridColumns; +/* */ import com.archive.project.dasz.gridcolumns.service.ITXtpzGridColumnsService; +/* */ import com.archive.project.dasz.physicaltable.domain.PhysicalTable; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import com.archive.project.system.dict.mapper.DictDataMapper; +/* */ import java.util.ArrayList; +/* */ import java.util.HashMap; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import java.util.Set; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class ArchiveListServiceImpl +/* */ implements IArchiveListService +/* */ { +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private ITXtpzGridColumnsService itXtpzGridColumnsService; +/* */ @Autowired +/* */ private DictDataMapper dictDataMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public List getColumns(String id, String code) { +/* 58 */ List resultList = new ArrayList<>(); +/* */ +/* */ +/* 61 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 62 */ physicalTable.setArchivetypeid(id); +/* 63 */ physicalTable.setTableCode(code); +/* 64 */ List tablesList = this.physicalTableMapper.selectPhysicalTableList(physicalTable); +/* */ +/* 66 */ if (tablesList != null && tablesList.size() > 0) { +/* 67 */ physicalTable = tablesList.get(0); +/* 68 */ PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); +/* 69 */ physicalTableColumn.setTableId(physicalTable.getId()); +/* 70 */ physicalTableColumn.setLbx(Long.valueOf(1L)); +/* 71 */ List columnsList = new ArrayList<>(); +/* 72 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 73 */ columnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn); +/* */ } +/* 75 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 76 */ columnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn); +/* */ } +/* */ +/* 79 */ if (columnsList != null && columnsList.size() > 0) { +/* */ +/* 81 */ ArchiveTableColumn columnOne = new ArchiveTableColumn(); +/* 82 */ columnOne.setCheckbox(true); +/* 83 */ resultList.add(columnOne); +/* */ +/* */ +/* 86 */ ArchiveTableColumn columnTwo = new ArchiveTableColumn(); +/* 87 */ columnTwo.setField("id"); +/* 88 */ columnTwo.setTitle(""); +/* 89 */ columnTwo.setVisible(false); +/* 90 */ resultList.add(columnTwo); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 104 */ TXtpzGridColumns tXtpzGridColumns = new TXtpzGridColumns(); +/* 105 */ tXtpzGridColumns.setTableId(physicalTable.getId()); +/* 106 */ List tglist = this.itXtpzGridColumnsService.selectTXtpzGridColumnsList(tXtpzGridColumns); +/* 107 */ for (TXtpzGridColumns tableColumn : tglist) { +/* 108 */ ArchiveTableColumn column = new ArchiveTableColumn(); +/* */ +/* 110 */ if (StringUtils.isEmpty(tableColumn.getBy1())) { +/* 111 */ column.setField(tableColumn.getColumnname()); +/* 112 */ column.setTitle(tableColumn.getShowname()); +/* 113 */ column.setWidth(Integer.parseInt(String.valueOf(tableColumn.getWidth()))); +/* */ } else { +/* 115 */ column.setField(tableColumn.getColumnname()); +/* 116 */ column.setTitle(tableColumn.getShowname()); +/* 117 */ column.setCodeType(tableColumn.getBy1()); +/* 118 */ column.setWidth(Integer.parseInt(String.valueOf(tableColumn.getWidth()))); +/* */ } +/* 120 */ resultList.add(column); +/* */ } +/* */ } +/* */ } +/* 124 */ return resultList; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map getOrderColumns(String id, String code) { +/* 134 */ Map map = new HashMap<>(); +/* 135 */ String orderColumns = ""; +/* 136 */ String orderType = "asc"; +/* */ +/* 138 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 139 */ physicalTable.setArchivetypeid(id); +/* 140 */ physicalTable.setTableCode(code); +/* 141 */ List tablesList = this.physicalTableMapper.selectPhysicalTableList(physicalTable); +/* */ +/* 143 */ if (tablesList != null && tablesList.size() > 0) { +/* 144 */ physicalTable = tablesList.get(0); +/* 145 */ PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); +/* 146 */ physicalTableColumn.setTableId(physicalTable.getId()); +/* 147 */ physicalTableColumn.setPxx(Long.valueOf(1L)); +/* 148 */ List columnsList = new ArrayList<>(); +/* 149 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 150 */ columnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn); +/* */ } +/* 152 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 153 */ columnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn); +/* */ } +/* */ +/* 156 */ if (columnsList != null && columnsList.size() > 0) { +/* 157 */ for (PhysicalTableColumn tableColumn : columnsList) { +/* */ +/* */ +/* 160 */ if (tableColumn.getBz() != null && tableColumn.getBz().contains("倒序")) { +/* 161 */ orderType = "desc"; +/* */ } +/* 163 */ orderColumns = orderColumns + "," + tableColumn.getColumnCode() + " " + orderType; +/* */ } +/* */ } +/* */ } +/* 167 */ if (orderColumns.length() > 0) { +/* 168 */ orderColumns = orderColumns.substring(1, orderColumns.length()); +/* */ } +/* 170 */ map.put("orderColumns", orderColumns); +/* 171 */ map.put("orderType", orderType); +/* 172 */ return map; +/* */ } +/* */ +/* */ +/* */ public Map selectArchiveList(String id, String code, String ownerid, Integer pageNum, Integer pageSize, String orderBy, String orderByColumn, Map formData, String isRecycle, String status) { +/* 177 */ Map resultMap = new HashMap<>(); +/* 178 */ List> resultList = new ArrayList<>(); +/* 179 */ Integer count = Integer.valueOf(0); +/* 180 */ Integer beginNum = Integer.valueOf((pageNum.intValue() - 1) * pageSize.intValue()); +/* */ +/* */ +/* 183 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 184 */ physicalTable.setArchivetypeid(id); +/* 185 */ physicalTable.setTableCode(code); +/* 186 */ List tablesList = this.physicalTableMapper.selectPhysicalTableList(physicalTable); +/* */ +/* 188 */ if (tablesList != null && tablesList.size() > 0) { +/* 189 */ physicalTable = tablesList.get(0); +/* */ +/* */ +/* 192 */ String condition = ""; +/* */ +/* 194 */ if (!"folder".equals(code) && StringUtils.isNotEmpty(ownerid) && !"ALL".equals(ownerid) && !"0".equals(ownerid) && !"ownerid".equals(ownerid)) { +/* 195 */ condition = condition + "ownerid in (" + ownerid + ") "; +/* */ } +/* 197 */ PhysicalTableColumn physicalTableColumn1 = new PhysicalTableColumn(); +/* 198 */ physicalTableColumn1.setTableId(physicalTable.getId()); +/* 199 */ List columnsList1 = new ArrayList<>(); +/* 200 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 201 */ columnsList1 = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn1); +/* */ } +/* 203 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 204 */ columnsList1 = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn1); +/* */ } +/* */ +/* 207 */ if (columnsList1 != null && columnsList1.size() > 0) { +/* 208 */ Set keySet = formData.keySet(); +/* 209 */ for (String key : keySet) { +/* 210 */ String value = String.valueOf(formData.get(key)); +/* 211 */ for (PhysicalTableColumn tableColumn : columnsList1) { +/* 212 */ String field = tableColumn.getColumnCode(); +/* 213 */ if ((key.equals(field) || key.replaceAll("_Qazwsx13579!", "").equals(field) || key.replaceAll("_Qazwsx24680!", "").equals(field)) && +/* 214 */ !"pageNum".equals(key) && !"pageSize".equals(key) && !"isAsc".equals(key) && StringUtils.isNotEmpty(value)) { +/* 215 */ Long jsfs = tableColumn.getJsfs(); +/* */ +/* 217 */ if (jsfs.longValue() == 0L) { +/* 218 */ condition = condition + "and " + field + " like '%" + value + "%' "; +/* */ continue; +/* */ } +/* 221 */ if (jsfs.longValue() == 1L) { +/* 222 */ condition = condition + "and " + field + " = '" + value + "' "; +/* */ continue; +/* */ } +/* 225 */ if (jsfs.longValue() == 2L) { +/* 226 */ condition = condition + "and " + field + " > '" + value + "' "; +/* */ continue; +/* */ } +/* 229 */ if (jsfs.longValue() == 3L) { +/* 230 */ condition = condition + "and " + field + " < '" + value + "' "; +/* */ continue; +/* */ } +/* 233 */ if (jsfs.longValue() == 4L) { +/* 234 */ condition = condition + "and " + field + " >= '" + value + "' "; +/* */ continue; +/* */ } +/* 237 */ if (jsfs.longValue() == 5L) { +/* 238 */ condition = condition + "and " + field + " <= '" + value + "' "; +/* */ continue; +/* */ } +/* 241 */ if (jsfs.longValue() == 6L) { +/* 242 */ if (key.replaceAll("_Qazwsx13579!", "").equals(field)) { +/* 243 */ condition = condition + "and " + field + " >= '" + value + "' "; +/* */ } +/* 245 */ if (key.replaceAll("_Qazwsx24680!", "").equals(field)) { +/* 246 */ condition = condition + "and " + field + " <= '" + value + "' "; +/* */ } +/* */ continue; +/* */ } +/* 250 */ condition = condition + "and " + field + " like '%" + value + "%' "; +/* */ } +/* */ } +/* */ +/* */ +/* 255 */ if ("ids".equals(key)) { +/* 256 */ condition = condition + "and id in (" + value + ")"; +/* */ } +/* */ } +/* */ } +/* */ +/* 261 */ if (condition.startsWith("and")) { +/* 262 */ condition = condition.substring(3); +/* */ } +/* */ +/* 265 */ if (isRecycle.equals("true")) { +/* 266 */ if (condition.length() > 0) { +/* 267 */ condition = " where is_delete = '1' and " + condition; +/* */ } else { +/* 269 */ condition = " where is_delete = '1' "; +/* */ } +/* */ +/* 272 */ } else if (condition.length() > 0) { +/* 273 */ condition = " is_delete = '0' and " + condition; +/* */ } else { +/* 275 */ condition = " is_delete = '0' "; +/* */ } +/* */ +/* */ +/* */ +/* 280 */ if (status != null && !status.equals("") && !status.equals("0")) { +/* 281 */ if (condition.length() > 0) { +/* 282 */ condition = " where status = '" + status + "' and " + condition; +/* */ } else { +/* 284 */ condition = " where status = '" + status + "' "; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 290 */ PhysicalTableColumn physicalTableColumn2 = new PhysicalTableColumn(); +/* 291 */ physicalTableColumn2.setTableId(physicalTable.getId()); +/* 292 */ physicalTableColumn2.setLbx(Long.valueOf(1L)); +/* 293 */ List columnsList2 = new ArrayList<>(); +/* 294 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 295 */ columnsList2 = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn2); +/* */ } +/* 297 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 298 */ columnsList2 = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn2); +/* */ } +/* */ +/* 301 */ if (columnsList2 != null && columnsList2.size() > 0) { +/* 302 */ String sql = "select id,"; +/* 303 */ for (PhysicalTableColumn tableColumn : columnsList2) { +/* 304 */ sql = sql + tableColumn.getColumnCode() + ","; +/* */ } +/* 306 */ sql = sql.substring(0, sql.lastIndexOf(",")); +/* 307 */ sql = sql + " from " + physicalTable.getTablename() + condition; +/* 308 */ if (StringUtils.isNotEmpty(orderByColumn)) +/* */ { +/* 310 */ sql = sql + " order by " + orderByColumn; +/* */ } +/* 312 */ sql = sql + " limit " + beginNum + " , " + pageSize; +/* 313 */ resultList = this.executeSqlService.queryList(sql); +/* */ +/* 315 */ String countSql = "SELECT COUNT(*) FROM " + physicalTable.getTablename() + condition; +/* 316 */ count = this.executeSqlService.jdbcTemplateQueryCount(countSql); +/* */ } +/* */ } +/* 319 */ resultMap.put("list", resultList); +/* 320 */ resultMap.put("count", count); +/* 321 */ return resultMap; +/* */ } +/* */ +/* */ +/* */ public String getSearchHtml(String id, String code) { +/* 326 */ String html = ""; +/* 327 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 328 */ physicalTable.setArchivetypeid(id); +/* 329 */ physicalTable.setTableCode(code); +/* 330 */ List physicalTableList = this.physicalTableMapper.selectPhysicalTableList(physicalTable); +/* 331 */ if (physicalTableList != null && physicalTableList.size() > 0) { +/* 332 */ Long tableId = ((PhysicalTable)physicalTableList.get(0)).getId(); +/* 333 */ PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); +/* 334 */ physicalTableColumn.setTableId(tableId); +/* 335 */ physicalTableColumn.setJsx(Long.valueOf(1L)); +/* 336 */ List tableColumnsList = new ArrayList<>(); +/* 337 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 338 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn); +/* */ } +/* 340 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 341 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn); +/* */ } +/* 343 */ if (tableColumnsList != null && tableColumnsList.size() > 0) { +/* 344 */ StringBuffer sb = new StringBuffer(); +/* 345 */ sb.append("
"); +/* 346 */ sb.append("
"); +/* 347 */ sb.append("
"); +/* 348 */ sb.append("
    "); +/* 349 */ for (int i = 0; i < tableColumnsList.size(); i++) { +/* 350 */ PhysicalTableColumn tableColumns = tableColumnsList.get(i); +/* 351 */ String columnName = tableColumns.getColumnName(); +/* 352 */ String columnCode = tableColumns.getColumnCode(); +/* 353 */ String columnCodeType = tableColumns.getColumnCodetype(); +/* 354 */ Long jsfs = tableColumns.getJsfs(); +/* */ +/* 356 */ if (StringUtils.isEmpty(columnCodeType)) { +/* 357 */ if (jsfs.longValue() == 6L) { +/* 358 */ sb.append("
  • "); +/* 359 */ sb.append(""); +/* 360 */ sb.append("-"); +/* 361 */ sb.append(""); +/* 362 */ sb.append("
  • "); +/* */ } else { +/* 364 */ sb.append("
  • "); +/* 365 */ sb.append(""); +/* 366 */ sb.append("
  • "); +/* */ } +/* */ +/* */ } else { +/* */ +/* 371 */ DictData dictData = new DictData(); +/* 372 */ dictData.setDictType(columnCodeType); +/* 373 */ List dictDataList = this.dictDataMapper.selectDictDataList(dictData); +/* 374 */ if (jsfs.longValue() == 6L) { +/* 375 */ sb.append("
  • "); +/* 376 */ sb.append(""); +/* 383 */ sb.append("-"); +/* 384 */ sb.append(""); +/* 391 */ sb.append("
  • "); +/* */ } else { +/* 393 */ sb.append("
  • "); +/* 394 */ sb.append(""); +/* 401 */ sb.append("
  • "); +/* */ } +/* */ } +/* */ } +/* */ +/* 406 */ sb.append("
  • "); +/* 407 */ sb.append(" 搜索"); +/* 408 */ sb.append(" 重置"); +/* 409 */ sb.append("
  • "); +/* */ +/* 411 */ sb.append("
"); +/* 412 */ sb.append("
"); +/* 413 */ sb.append("
"); +/* 414 */ sb.append("
"); +/* 415 */ html = sb.toString(); +/* */ } +/* */ } +/* 418 */ return html; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\service\impl\ArchiveListServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/archivetype/service/impl/ArchiveTypeServiceImpl.java b/src/main/java/com/archive/project/dasz/archivetype/service/impl/ArchiveTypeServiceImpl.java new file mode 100644 index 0000000..ae2e525 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/archivetype/service/impl/ArchiveTypeServiceImpl.java @@ -0,0 +1,514 @@ +/* */ package com.archive.project.dasz.archivetype.service.impl + +-INF.classes.com.archive.project.dasz.archivetype.service.impl; +/* */ +/* */ import com.archive.common.archiveUtil.CreateTableAndInsertPhysicalTable; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveTypeManageTree; +/* */ import com.archive.project.dasz.archivetype.mapper.ArchiveTypeMapper; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dasz.physicaltable.domain.PhysicalTable; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class ArchiveTypeServiceImpl +/* */ implements IArchiveTypeService +/* */ { +/* */ @Autowired +/* */ private ArchiveTypeMapper archiveTypeMapper; +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public ArchiveType selectArchiveTypeById(Long id) { +/* 63 */ return this.archiveTypeMapper.selectArchiveTypeById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectArchiveTypeList(ArchiveType archiveType) { +/* 76 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 77 */ return this.archiveTypeMapper.selectArchiveTypeList(archiveType); +/* */ } +/* 79 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 80 */ return this.archiveTypeMapper.selectArchiveTypeListSqlite(archiveType); +/* */ } +/* 82 */ return this.archiveTypeMapper.selectArchiveTypeList(archiveType); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void insertArchiveType(ArchiveType archiveType) throws Exception { +/* 96 */ this.archiveTypeMapper.insertArchiveType(archiveType); +/* */ +/* 98 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 99 */ if (archiveType.getType().equals("folder")) { +/* 100 */ CreateTableAndInsertPhysicalTable.createFolderTable(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* */ } +/* 102 */ CreateTableAndInsertPhysicalTable.createFileTable(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* 103 */ CreateTableAndInsertPhysicalTable.createDocumentTable(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* 104 */ CreateTableAndInsertPhysicalTable.createInfoTable(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* */ } +/* 106 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 107 */ if (archiveType.getType().equals("folder")) { +/* 108 */ CreateTableAndInsertPhysicalTable.createFolderTableSqlite(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* */ } +/* 110 */ CreateTableAndInsertPhysicalTable.createFileTableSqlite(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* 111 */ CreateTableAndInsertPhysicalTable.createDocumentTableSqlite(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* 112 */ CreateTableAndInsertPhysicalTable.createInfoTableSqlite(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* */ } else { +/* 114 */ if (archiveType.getType().equals("folder")) { +/* 115 */ CreateTableAndInsertPhysicalTable.createFolderTable(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* */ } +/* 117 */ CreateTableAndInsertPhysicalTable.createFileTable(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* 118 */ CreateTableAndInsertPhysicalTable.createDocumentTable(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* 119 */ CreateTableAndInsertPhysicalTable.createInfoTable(archiveType.getArhciveCode(), archiveType.getArchiveName(), archiveType.getId().toString()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateArchiveType(ArchiveType archiveType) { +/* 133 */ return this.archiveTypeMapper.updateArchiveType(archiveType); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteArchiveTypeByIds(String ids) { +/* 145 */ return this.archiveTypeMapper.deleteArchiveTypeByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteArchiveTypeById(Long id) { +/* 157 */ return this.archiveTypeMapper.deleteArchiveTypeById(id); +/* */ } +/* */ +/* */ +/* */ public List archiveCollationTreeData() { +/* 162 */ List list = this.archiveTypeMapper.selectArchiveTypeList(new ArchiveType()); +/* 163 */ List treeDatas = new ArrayList<>(); +/* 164 */ ArchiveCollationTree rootNode = new ArchiveCollationTree(); +/* 165 */ rootNode.setId(Long.valueOf(0L)); +/* 166 */ rootNode.setpId(Long.valueOf(0L)); +/* 167 */ rootNode.setName("档案类型"); +/* 168 */ rootNode.setTitle("档案类型"); +/* 169 */ treeDatas.add(rootNode); +/* 170 */ for (ArchiveType ArchiveType : list) { +/* 171 */ ArchiveCollationTree node = new ArchiveCollationTree(); +/* 172 */ node.setId(ArchiveType.getId()); +/* 173 */ node.setpId(Long.valueOf(0L)); +/* 174 */ node.setName(ArchiveType.getArchiveName()); +/* 175 */ node.setTitle(ArchiveType.getArchiveName()); +/* 176 */ node.setType(ArchiveType.getType()); +/* 177 */ node.setArchiveCode(ArchiveType.getArhciveCode()); +/* 178 */ treeDatas.add(node); +/* */ } +/* 180 */ return treeDatas; +/* */ } +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void deleteArchiveType(String ids) throws Exception { +/* 187 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 188 */ physicalTable.setArchivetypeid(ids); +/* 189 */ List physicalTableList = this.physicalTableMapper.selectPhysicalTableList(physicalTable); +/* 190 */ for (PhysicalTable physicaltable : physicalTableList) { +/* 191 */ String tableName = physicaltable.getTablename(); +/* 192 */ String str1 = "drop table " + tableName; +/* 193 */ this.executeSqlService.jdbcTemplateExecute(str1); +/* */ +/* 195 */ Long tableId = physicaltable.getId(); +/* 196 */ String delColumnSql = "delete from t_xtpz_physical_table_column where table_id = " + tableId; +/* 197 */ this.executeSqlService.delete(delColumnSql); +/* */ } +/* */ +/* */ +/* 201 */ String sql = "delete from t_xtpz_physical_table where archivetypeid = '" + ids + "'"; +/* 202 */ this.executeSqlService.delete(sql); +/* */ +/* */ +/* 205 */ Long id = Long.valueOf(Long.parseLong(ids)); +/* 206 */ this.archiveTypeMapper.deleteArchiveTypeById(id); +/* */ } +/* */ +/* */ +/* */ public boolean checkArchiveTypeIsHaveData(String ids) { +/* 211 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 212 */ physicalTable.setArchivetypeid(ids); +/* 213 */ List physicalTableList = this.physicalTableMapper.selectPhysicalTableList(physicalTable); +/* 214 */ boolean flag = false; +/* 215 */ for (PhysicalTable physicaltable : physicalTableList) { +/* 216 */ String tableName = physicaltable.getTablename(); +/* 217 */ String sql = "select count(*) from " + tableName; +/* 218 */ String countStr = this.executeSqlService.getSingle(sql); +/* 219 */ int count = Integer.parseInt(countStr); +/* 220 */ if (count > 0) { +/* 221 */ flag = true; +/* */ break; +/* */ } +/* */ } +/* 225 */ return flag; +/* */ } +/* */ +/* */ +/* */ public List ArchiveTypeManageTreeData() { +/* 230 */ List list = new ArrayList<>(); +/* */ +/* 232 */ ArchiveTypeManageTree rootNode = new ArchiveTypeManageTree(); +/* 233 */ rootNode.setId("0root_node"); +/* 234 */ rootNode.setpId("0"); +/* 235 */ rootNode.setName("档案类型"); +/* 236 */ rootNode.setTitle("档案类型"); +/* 237 */ rootNode.setNodeType("root_node"); +/* 238 */ list.add(rootNode); +/* */ +/* */ +/* 241 */ List ArchiveType = this.archiveTypeMapper.selectArchiveTypeList(new ArchiveType()); +/* */ +/* 243 */ for (ArchiveType archivetype : ArchiveType) { +/* 244 */ ArchiveTypeManageTree typeNode = new ArchiveTypeManageTree(); +/* 245 */ typeNode.setId(archivetype.getId() + "type_node"); +/* 246 */ typeNode.setpId("0root_node"); +/* 247 */ typeNode.setName(archivetype.getArchiveName()); +/* 248 */ typeNode.setTitle(archivetype.getArchiveName()); +/* 249 */ typeNode.setNodeType("type_node"); +/* 250 */ typeNode.setArchiveTypeId(archivetype.getId() + ""); +/* 251 */ list.add(typeNode); +/* */ } +/* */ +/* */ +/* 255 */ List physicalTableList = this.physicalTableMapper.selectPhysicalTableList(new PhysicalTable()); +/* */ +/* 257 */ for (PhysicalTable physicalTable : physicalTableList) { +/* 258 */ ArchiveTypeManageTree tableNode = new ArchiveTypeManageTree(); +/* 259 */ String showName = ""; +/* 260 */ switch (physicalTable.getTableCode()) { +/* */ case "folder": +/* 262 */ showName = "案卷表"; +/* */ break; +/* */ case "file": +/* 265 */ showName = "文件表"; +/* */ break; +/* */ case "document": +/* 268 */ showName = "电子全文表"; +/* */ break; +/* */ case "info": +/* 271 */ showName = "过程信息表"; +/* */ break; +/* */ } +/* */ +/* */ +/* 276 */ tableNode.setId(physicalTable.getId() + "table_node"); +/* 277 */ tableNode.setpId(physicalTable.getArchivetypeid() + "type_node"); +/* 278 */ tableNode.setName(showName); +/* 279 */ tableNode.setTitle(showName); +/* 280 */ tableNode.setNodeType("table_node"); +/* 281 */ list.add(tableNode); +/* */ } +/* 283 */ return list; +/* */ } +/* */ +/* */ +/* */ public String appendBaseForm(Long tableId) { +/* 288 */ StringBuilder html = new StringBuilder(); +/* 289 */ PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); +/* 290 */ physicalTableColumn.setTableId(tableId); +/* 291 */ physicalTableColumn.setJmx(Long.valueOf(1L)); +/* 292 */ List tableColumnsList = new ArrayList<>(); +/* 293 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 294 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn); +/* */ } +/* 296 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 297 */ tableColumnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn); +/* */ } +/* 299 */ for (int i = 0; i < tableColumnsList.size(); i++) { +/* 300 */ PhysicalTableColumn tableColumn = tableColumnsList.get(i); +/* 301 */ String showType = tableColumn.getShowType(); +/* 302 */ Long isBsx = tableColumn.getBsx(); +/* 303 */ String columnName = tableColumn.getColumnName(); +/* 304 */ String columnCode = tableColumn.getColumnCode(); +/* 305 */ String columnCodetype = tableColumn.getColumnCodetype(); +/* 306 */ String columnType = tableColumn.getColumnType(); +/* */ +/* 308 */ if ("textBox".equals(showType)) { +/* 309 */ if (isBsx.longValue() == 1L) { +/* 310 */ if ("C".equals(columnType)) { +/* 311 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* 318 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 328 */ else if ("C".equals(columnType)) { +/* 329 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 337 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 347 */ else if ("dateBox".equals(showType)) { +/* 348 */ if (isBsx.longValue() == 1L) { +/* 349 */ html.append("
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* 359 */ html.append("
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 372 */ else if ("dateTimeBox".equals(showType)) { +/* 373 */ if (isBsx.longValue() == 1L) { +/* 374 */ html.append("
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* */ +/* 384 */ html.append("
\r\n\t\t\r\n\t\t
\r\n \t\t
\t\t\t\t\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 397 */ else if ("comboBox".equals(showType)) { +/* 398 */ List dictDatas = this.dictTypeService.selectDictDataByType(columnCodetype); +/* 399 */ if (isBsx.longValue() == 1L) { +/* 400 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\t\t\t\t"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 413 */ for (DictData dictData : dictDatas) { +/* 414 */ html.append("\r\n"); +/* */ } +/* */ +/* 417 */ html.append("\t\t\t\t
\r\n\t
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 423 */ else if ("multipleComboBox".equals(showType)) { +/* 424 */ List dictDatas = this.dictTypeService.selectDictDataByType(columnCodetype); +/* 425 */ if (isBsx.longValue() == 1L) { +/* 426 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 437 */ for (DictData dictData : dictDatas) { +/* 438 */ html.append("\r\n"); +/* */ } +/* */ +/* 441 */ html.append("\t\t\t\t
\r\n\t
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 447 */ else if ("textArea".equals(showType)) { +/* 448 */ if (isBsx.longValue() == 1L) { +/* 449 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* 456 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 467 */ else if (isBsx.longValue() == 1L) { +/* 468 */ if ("C".equals(columnType)) { +/* 469 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 477 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ } +/* 485 */ else if ("C".equals(columnType)) { +/* 486 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
"); +/* */ +/* */ +/* */ } +/* */ else { +/* */ +/* */ +/* */ +/* 494 */ html.append("
\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t
"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 504 */ return html.toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\archivetype\service\impl\ArchiveTypeServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnDocumentController.java b/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnDocumentController.java new file mode 100644 index 0000000..c6eed48 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnDocumentController.java @@ -0,0 +1,151 @@ +/* */ package com.archive.project.dasz.basecolumn.controller + +-INF.classes.com.archive.project.dasz.basecolumn.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.basecolumn.domain.ColumnDocument; +/* */ import com.archive.project.dasz.basecolumn.service.IColumnDocumentService; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/basecolumn/columndocument"}) +/* */ public class ColumnDocumentController +/* */ extends BaseController +/* */ { +/* 34 */ private String prefix = "dasz/basecolumn/columndocument"; +/* */ +/* */ @Autowired +/* */ private IColumnDocumentService columnDocumentService; +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columndocument:view"}) +/* */ @GetMapping +/* */ public String document(ModelMap mmap) { +/* 46 */ DictType dictType = new DictType(); +/* 47 */ dictType.setLabel("column_bind"); +/* 48 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 49 */ mmap.put("dictList", list); +/* 50 */ return this.prefix + "/document"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columndocument:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(ColumnDocument columnDocument) { +/* 61 */ startPage(); +/* 62 */ List list = this.columnDocumentService.selectColumnDocumentList(columnDocument); +/* 63 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columndocument:export"}) +/* */ @Log(title = "电子文件基础字段", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(ColumnDocument columnDocument) { +/* 75 */ List list = this.columnDocumentService.selectColumnDocumentList(columnDocument); +/* 76 */ ExcelUtil util = new ExcelUtil(ColumnDocument.class); +/* 77 */ return util.exportExcel(list, "document"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add(ModelMap mmap) { +/* 86 */ DictType dictType = new DictType(); +/* 87 */ dictType.setLabel("column_bind"); +/* 88 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 89 */ mmap.put("dictList", list); +/* 90 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columndocument:add"}) +/* */ @Log(title = "电子文件基础字段", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(ColumnDocument columnDocument) { +/* 102 */ return toAjax(this.columnDocumentService.insertColumnDocument(columnDocument)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 111 */ ColumnDocument columnDocument = this.columnDocumentService.selectColumnDocumentById(id); +/* 112 */ mmap.put("columnDocument", columnDocument); +/* 113 */ DictType dictType = new DictType(); +/* 114 */ dictType.setLabel("column_bind"); +/* 115 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 116 */ mmap.put("dictList", list); +/* 117 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columndocument:edit"}) +/* */ @Log(title = "电子文件基础字段", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(ColumnDocument columnDocument) { +/* 129 */ return toAjax(this.columnDocumentService.updateColumnDocument(columnDocument)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columndocument:remove"}) +/* */ @Log(title = "电子文件基础字段", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 141 */ return toAjax(this.columnDocumentService.deleteColumnDocumentByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\controller\ColumnDocumentController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnFileController.java b/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnFileController.java new file mode 100644 index 0000000..cdb4c80 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnFileController.java @@ -0,0 +1,151 @@ +/* */ package com.archive.project.dasz.basecolumn.controller + +-INF.classes.com.archive.project.dasz.basecolumn.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.basecolumn.domain.ColumnFile; +/* */ import com.archive.project.dasz.basecolumn.service.IColumnFileService; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/basecolumn/columnfile"}) +/* */ public class ColumnFileController +/* */ extends BaseController +/* */ { +/* 34 */ private String prefix = "dasz/basecolumn/columnfile"; +/* */ +/* */ @Autowired +/* */ private IColumnFileService columnFileService; +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfile:view"}) +/* */ @GetMapping +/* */ public String file(ModelMap mmap) { +/* 46 */ DictType dictType = new DictType(); +/* 47 */ dictType.setLabel("column_bind"); +/* 48 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 49 */ mmap.put("dictList", list); +/* 50 */ return this.prefix + "/file"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfile:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(ColumnFile columnFile) { +/* 61 */ startPage(); +/* 62 */ List list = this.columnFileService.selectColumnFileList(columnFile); +/* 63 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfile:export"}) +/* */ @Log(title = "文件基础字段", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(ColumnFile columnFile) { +/* 75 */ List list = this.columnFileService.selectColumnFileList(columnFile); +/* 76 */ ExcelUtil util = new ExcelUtil(ColumnFile.class); +/* 77 */ return util.exportExcel(list, "file"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add(ModelMap mmap) { +/* 86 */ DictType dictType = new DictType(); +/* 87 */ dictType.setLabel("column_bind"); +/* 88 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 89 */ mmap.put("dictList", list); +/* 90 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfile:add"}) +/* */ @Log(title = "文件基础字段", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(ColumnFile columnFile) { +/* 102 */ return toAjax(this.columnFileService.insertColumnFile(columnFile)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 111 */ ColumnFile columnFile = this.columnFileService.selectColumnFileById(id); +/* 112 */ mmap.put("columnFile", columnFile); +/* 113 */ DictType dictType = new DictType(); +/* 114 */ dictType.setLabel("column_bind"); +/* 115 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 116 */ mmap.put("dictList", list); +/* 117 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfile:edit"}) +/* */ @Log(title = "文件基础字段", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(ColumnFile columnFile) { +/* 129 */ return toAjax(this.columnFileService.updateColumnFile(columnFile)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfile:remove"}) +/* */ @Log(title = "文件基础字段", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 141 */ return toAjax(this.columnFileService.deleteColumnFileByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\controller\ColumnFileController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnFolderController.java b/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnFolderController.java new file mode 100644 index 0000000..1e5e9b9 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnFolderController.java @@ -0,0 +1,151 @@ +/* */ package com.archive.project.dasz.basecolumn.controller + +-INF.classes.com.archive.project.dasz.basecolumn.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.basecolumn.domain.ColumnFolder; +/* */ import com.archive.project.dasz.basecolumn.service.IColumnFolderService; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/basecolumn/columnfolder"}) +/* */ public class ColumnFolderController +/* */ extends BaseController +/* */ { +/* 34 */ private String prefix = "dasz/basecolumn/columnfolder"; +/* */ +/* */ @Autowired +/* */ private IColumnFolderService columnFolderService; +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfolder:view"}) +/* */ @GetMapping +/* */ public String folder(ModelMap mmap) { +/* 46 */ DictType dictType = new DictType(); +/* 47 */ dictType.setLabel("column_bind"); +/* 48 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 49 */ mmap.put("dictList", list); +/* 50 */ return this.prefix + "/folder"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfolder:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(ColumnFolder columnFolder) { +/* 61 */ startPage(); +/* 62 */ List list = this.columnFolderService.selectColumnFolderList(columnFolder); +/* 63 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfolder:export"}) +/* */ @Log(title = "案卷基础字段", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(ColumnFolder columnFolder) { +/* 75 */ List list = this.columnFolderService.selectColumnFolderList(columnFolder); +/* 76 */ ExcelUtil util = new ExcelUtil(ColumnFolder.class); +/* 77 */ return util.exportExcel(list, "folder"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add(ModelMap mmap) { +/* 86 */ DictType dictType = new DictType(); +/* 87 */ dictType.setLabel("column_bind"); +/* 88 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 89 */ mmap.put("dictList", list); +/* 90 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfolder:add"}) +/* */ @Log(title = "案卷基础字段", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(ColumnFolder columnFolder) { +/* 102 */ return toAjax(this.columnFolderService.insertColumnFolder(columnFolder)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 111 */ ColumnFolder columnFolder = this.columnFolderService.selectColumnFolderById(id); +/* 112 */ mmap.put("columnFolder", columnFolder); +/* 113 */ DictType dictType = new DictType(); +/* 114 */ dictType.setLabel("column_bind"); +/* 115 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 116 */ mmap.put("dictList", list); +/* 117 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfolder:edit"}) +/* */ @Log(title = "案卷基础字段", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(ColumnFolder columnFolder) { +/* 129 */ return toAjax(this.columnFolderService.updateColumnFolder(columnFolder)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columnfolder:remove"}) +/* */ @Log(title = "案卷基础字段", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 141 */ return toAjax(this.columnFolderService.deleteColumnFolderByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\controller\ColumnFolderController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnInfoController.java b/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnInfoController.java new file mode 100644 index 0000000..50b7f1c --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/controller/ColumnInfoController.java @@ -0,0 +1,150 @@ +/* */ package com.archive.project.dasz.basecolumn.controller +; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.basecolumn.domain.ColumnInfo; +/* */ import com.archive.project.dasz.basecolumn.service.IColumnInfoService; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/basecolumn/columninfo"}) +/* */ public class ColumnInfoController +/* */ extends BaseController +/* */ { +/* 34 */ private String prefix = "dasz/basecolumn/columninfo"; +/* */ +/* */ @Autowired +/* */ private IColumnInfoService columnInfoService; +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columninfo:view"}) +/* */ @GetMapping +/* */ public String info(ModelMap mmap) { +/* 46 */ DictType dictType = new DictType(); +/* 47 */ dictType.setLabel("column_bind"); +/* 48 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 49 */ mmap.put("dictList", list); +/* 50 */ return this.prefix + "/info"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columninfo:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(ColumnInfo columnInfo) { +/* 61 */ startPage(); +/* 62 */ List list = this.columnInfoService.selectColumnInfoList(columnInfo); +/* 63 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columninfo:export"}) +/* */ @Log(title = "过程信息基础字段", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(ColumnInfo columnInfo) { +/* 75 */ List list = this.columnInfoService.selectColumnInfoList(columnInfo); +/* 76 */ ExcelUtil util = new ExcelUtil(ColumnInfo.class); +/* 77 */ return util.exportExcel(list, "info"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add(ModelMap mmap) { +/* 86 */ DictType dictType = new DictType(); +/* 87 */ dictType.setLabel("column_bind"); +/* 88 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 89 */ mmap.put("dictList", list); +/* 90 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columninfo:add"}) +/* */ @Log(title = "过程信息基础字段", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(ColumnInfo columnInfo) { +/* 102 */ return toAjax(this.columnInfoService.insertColumnInfo(columnInfo)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 111 */ ColumnInfo columnInfo = this.columnInfoService.selectColumnInfoById(id); +/* 112 */ mmap.put("columnInfo", columnInfo); +/* 113 */ DictType dictType = new DictType(); +/* 114 */ dictType.setLabel("column_bind"); +/* 115 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 116 */ mmap.put("dictList", list); +/* 117 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columninfo:edit"}) +/* */ @Log(title = "过程信息基础字段", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(ColumnInfo columnInfo) { +/* 129 */ return toAjax(this.columnInfoService.updateColumnInfo(columnInfo)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:columninfo:remove"}) +/* */ @Log(title = "过程信息基础字段", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 141 */ return toAjax(this.columnInfoService.deleteColumnInfoByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\controller\ColumnInfoController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnDocument.java b/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnDocument.java new file mode 100644 index 0000000..cb164f5 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnDocument.java @@ -0,0 +1,211 @@ +/* */ package com.archive.project.dasz.basecolumn.domain + +-INF.classes.com.archive.project.dasz.basecolumn.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ColumnDocument +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "字段显示名称") +/* */ private String columnName; +/* */ @Excel(name = "字段名称") +/* */ private String columnCode; +/* */ @Excel(name = "字段长度") +/* */ private Long columnLength; +/* */ @Excel(name = "字段类型") +/* */ private String columnType; +/* */ @Excel(name = "字段绑定编码") +/* */ private String columnCodetype; +/* */ @Excel(name = "显示类型") +/* */ private String showType; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "排序项") +/* */ private Long pxx; +/* */ @Excel(name = "列表项") +/* */ private Long lbx; +/* */ @Excel(name = "界面项") +/* */ private Long jmx; +/* */ @Excel(name = "检索项") +/* */ private Long jsx; +/* */ @Excel(name = "默认值") +/* */ private String mrz; +/* */ +/* */ public void setId(Long id) { +/* 71 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 76 */ return this.id; +/* */ } +/* */ +/* */ public void setColumnName(String columnName) { +/* 80 */ this.columnName = columnName; +/* */ } +/* */ +/* */ +/* */ public String getColumnName() { +/* 85 */ return this.columnName; +/* */ } +/* */ +/* */ public void setColumnCode(String columnCode) { +/* 89 */ this.columnCode = columnCode; +/* */ } +/* */ +/* */ +/* */ public String getColumnCode() { +/* 94 */ return this.columnCode; +/* */ } +/* */ +/* */ public void setColumnLength(Long columnLength) { +/* 98 */ this.columnLength = columnLength; +/* */ } +/* */ +/* */ +/* */ public Long getColumnLength() { +/* 103 */ return this.columnLength; +/* */ } +/* */ +/* */ public void setColumnType(String columnType) { +/* 107 */ this.columnType = columnType; +/* */ } +/* */ +/* */ +/* */ public String getColumnType() { +/* 112 */ return this.columnType; +/* */ } +/* */ +/* */ public void setColumnCodetype(String columnCodetype) { +/* 116 */ this.columnCodetype = columnCodetype; +/* */ } +/* */ +/* */ +/* */ public String getColumnCodetype() { +/* 121 */ return this.columnCodetype; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 125 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 130 */ return this.bz; +/* */ } +/* */ +/* */ public void setPxx(Long pxx) { +/* 134 */ this.pxx = pxx; +/* */ } +/* */ +/* */ +/* */ public Long getPxx() { +/* 139 */ return this.pxx; +/* */ } +/* */ +/* */ public void setLbx(Long lbx) { +/* 143 */ this.lbx = lbx; +/* */ } +/* */ +/* */ +/* */ public Long getLbx() { +/* 148 */ return this.lbx; +/* */ } +/* */ +/* */ public void setJmx(Long jmx) { +/* 152 */ this.jmx = jmx; +/* */ } +/* */ +/* */ +/* */ public Long getJmx() { +/* 157 */ return this.jmx; +/* */ } +/* */ +/* */ public void setJsx(Long jsx) { +/* 161 */ this.jsx = jsx; +/* */ } +/* */ +/* */ +/* */ public Long getJsx() { +/* 166 */ return this.jsx; +/* */ } +/* */ +/* */ public void setMrz(String mrz) { +/* 170 */ this.mrz = mrz; +/* */ } +/* */ +/* */ +/* */ public String getMrz() { +/* 175 */ return this.mrz; +/* */ } +/* */ +/* */ public String getShowType() { +/* 179 */ return this.showType; +/* */ } +/* */ +/* */ public void setShowType(String showType) { +/* 183 */ this.showType = showType; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 188 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 189 */ .append("id", getId()) +/* 190 */ .append("columnName", getColumnName()) +/* 191 */ .append("columnCode", getColumnCode()) +/* 192 */ .append("columnLength", getColumnLength()) +/* 193 */ .append("columnType", getColumnType()) +/* 194 */ .append("columnCodetype", getColumnCodetype()) +/* 195 */ .append("bz", getBz()) +/* 196 */ .append("pxx", getPxx()) +/* 197 */ .append("lbx", getLbx()) +/* 198 */ .append("jmx", getJmx()) +/* 199 */ .append("jsx", getJsx()) +/* 200 */ .append("mrz", getMrz()) +/* 201 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\domain\ColumnDocument.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnFile.java b/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnFile.java new file mode 100644 index 0000000..24d3fad --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnFile.java @@ -0,0 +1,211 @@ +/* */ package com.archive.project.dasz.basecolumn.domain + +-INF.classes.com.archive.project.dasz.basecolumn.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ColumnFile +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "字段显示名称") +/* */ private String columnName; +/* */ @Excel(name = "字段名称") +/* */ private String columnCode; +/* */ @Excel(name = "字段长度") +/* */ private Long columnLength; +/* */ @Excel(name = "字段类型") +/* */ private String columnType; +/* */ @Excel(name = "字段绑定编码") +/* */ private String columnCodetype; +/* */ @Excel(name = "显示类型") +/* */ private String showType; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "排序项") +/* */ private Long pxx; +/* */ @Excel(name = "列表项") +/* */ private Long lbx; +/* */ @Excel(name = "界面项") +/* */ private Long jmx; +/* */ @Excel(name = "检索项") +/* */ private Long jsx; +/* */ @Excel(name = "默认值") +/* */ private String mrz; +/* */ +/* */ public void setId(Long id) { +/* 71 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 76 */ return this.id; +/* */ } +/* */ +/* */ public void setColumnName(String columnName) { +/* 80 */ this.columnName = columnName; +/* */ } +/* */ +/* */ +/* */ public String getColumnName() { +/* 85 */ return this.columnName; +/* */ } +/* */ +/* */ public void setColumnCode(String columnCode) { +/* 89 */ this.columnCode = columnCode; +/* */ } +/* */ +/* */ +/* */ public String getColumnCode() { +/* 94 */ return this.columnCode; +/* */ } +/* */ +/* */ public void setColumnLength(Long columnLength) { +/* 98 */ this.columnLength = columnLength; +/* */ } +/* */ +/* */ +/* */ public Long getColumnLength() { +/* 103 */ return this.columnLength; +/* */ } +/* */ +/* */ public void setColumnType(String columnType) { +/* 107 */ this.columnType = columnType; +/* */ } +/* */ +/* */ +/* */ public String getColumnType() { +/* 112 */ return this.columnType; +/* */ } +/* */ +/* */ public void setColumnCodetype(String columnCodetype) { +/* 116 */ this.columnCodetype = columnCodetype; +/* */ } +/* */ +/* */ +/* */ public String getColumnCodetype() { +/* 121 */ return this.columnCodetype; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 125 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 130 */ return this.bz; +/* */ } +/* */ +/* */ public void setPxx(Long pxx) { +/* 134 */ this.pxx = pxx; +/* */ } +/* */ +/* */ +/* */ public Long getPxx() { +/* 139 */ return this.pxx; +/* */ } +/* */ +/* */ public void setLbx(Long lbx) { +/* 143 */ this.lbx = lbx; +/* */ } +/* */ +/* */ +/* */ public Long getLbx() { +/* 148 */ return this.lbx; +/* */ } +/* */ +/* */ public void setJmx(Long jmx) { +/* 152 */ this.jmx = jmx; +/* */ } +/* */ +/* */ +/* */ public Long getJmx() { +/* 157 */ return this.jmx; +/* */ } +/* */ +/* */ public void setJsx(Long jsx) { +/* 161 */ this.jsx = jsx; +/* */ } +/* */ +/* */ +/* */ public Long getJsx() { +/* 166 */ return this.jsx; +/* */ } +/* */ +/* */ public void setMrz(String mrz) { +/* 170 */ this.mrz = mrz; +/* */ } +/* */ +/* */ +/* */ public String getMrz() { +/* 175 */ return this.mrz; +/* */ } +/* */ +/* */ public String getShowType() { +/* 179 */ return this.showType; +/* */ } +/* */ +/* */ public void setShowType(String showType) { +/* 183 */ this.showType = showType; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 188 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 189 */ .append("id", getId()) +/* 190 */ .append("columnName", getColumnName()) +/* 191 */ .append("columnCode", getColumnCode()) +/* 192 */ .append("columnLength", getColumnLength()) +/* 193 */ .append("columnType", getColumnType()) +/* 194 */ .append("columnCodetype", getColumnCodetype()) +/* 195 */ .append("bz", getBz()) +/* 196 */ .append("pxx", getPxx()) +/* 197 */ .append("lbx", getLbx()) +/* 198 */ .append("jmx", getJmx()) +/* 199 */ .append("jsx", getJsx()) +/* 200 */ .append("mrz", getMrz()) +/* 201 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\domain\ColumnFile.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnFolder.java b/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnFolder.java new file mode 100644 index 0000000..d4d2578 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnFolder.java @@ -0,0 +1,211 @@ +/* */ package com.archive.project.dasz.basecolumn.domain + +-INF.classes.com.archive.project.dasz.basecolumn.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ColumnFolder +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "字段显示名称") +/* */ private String columnName; +/* */ @Excel(name = "字段名称") +/* */ private String columnCode; +/* */ @Excel(name = "字段长度") +/* */ private Long columnLength; +/* */ @Excel(name = "字段类型", readConverterExp = "数=字、日期、文本") +/* */ private String columnType; +/* */ @Excel(name = "字段绑定编码") +/* */ private String columnCodetype; +/* */ @Excel(name = "显示类型") +/* */ private String showType; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "排序项(0:否 1:是)") +/* */ private Long pxx; +/* */ @Excel(name = "列表项(0:否 1:是)") +/* */ private Long lbx; +/* */ @Excel(name = "界面项(0:否 1:是)") +/* */ private Long jmx; +/* */ @Excel(name = "检索项(0:否 1:是)") +/* */ private Long jsx; +/* */ @Excel(name = "默认值") +/* */ private String mrz; +/* */ +/* */ public void setId(Long id) { +/* 71 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 76 */ return this.id; +/* */ } +/* */ +/* */ public void setColumnName(String columnName) { +/* 80 */ this.columnName = columnName; +/* */ } +/* */ +/* */ +/* */ public String getColumnName() { +/* 85 */ return this.columnName; +/* */ } +/* */ +/* */ public void setColumnCode(String columnCode) { +/* 89 */ this.columnCode = columnCode; +/* */ } +/* */ +/* */ +/* */ public String getColumnCode() { +/* 94 */ return this.columnCode; +/* */ } +/* */ +/* */ public void setColumnLength(Long columnLength) { +/* 98 */ this.columnLength = columnLength; +/* */ } +/* */ +/* */ +/* */ public Long getColumnLength() { +/* 103 */ return this.columnLength; +/* */ } +/* */ +/* */ public void setColumnType(String columnType) { +/* 107 */ this.columnType = columnType; +/* */ } +/* */ +/* */ +/* */ public String getColumnType() { +/* 112 */ return this.columnType; +/* */ } +/* */ +/* */ public void setColumnCodetype(String columnCodetype) { +/* 116 */ this.columnCodetype = columnCodetype; +/* */ } +/* */ +/* */ +/* */ public String getColumnCodetype() { +/* 121 */ return this.columnCodetype; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 125 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 130 */ return this.bz; +/* */ } +/* */ +/* */ public void setPxx(Long pxx) { +/* 134 */ this.pxx = pxx; +/* */ } +/* */ +/* */ +/* */ public Long getPxx() { +/* 139 */ return this.pxx; +/* */ } +/* */ +/* */ public void setLbx(Long lbx) { +/* 143 */ this.lbx = lbx; +/* */ } +/* */ +/* */ +/* */ public Long getLbx() { +/* 148 */ return this.lbx; +/* */ } +/* */ +/* */ public void setJmx(Long jmx) { +/* 152 */ this.jmx = jmx; +/* */ } +/* */ +/* */ +/* */ public Long getJmx() { +/* 157 */ return this.jmx; +/* */ } +/* */ +/* */ public void setJsx(Long jsx) { +/* 161 */ this.jsx = jsx; +/* */ } +/* */ +/* */ +/* */ public Long getJsx() { +/* 166 */ return this.jsx; +/* */ } +/* */ +/* */ public void setMrz(String mrz) { +/* 170 */ this.mrz = mrz; +/* */ } +/* */ +/* */ +/* */ public String getMrz() { +/* 175 */ return this.mrz; +/* */ } +/* */ +/* */ public String getShowType() { +/* 179 */ return this.showType; +/* */ } +/* */ +/* */ public void setShowType(String showType) { +/* 183 */ this.showType = showType; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 188 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 189 */ .append("id", getId()) +/* 190 */ .append("columnName", getColumnName()) +/* 191 */ .append("columnCode", getColumnCode()) +/* 192 */ .append("columnLength", getColumnLength()) +/* 193 */ .append("columnType", getColumnType()) +/* 194 */ .append("columnCodetype", getColumnCodetype()) +/* 195 */ .append("bz", getBz()) +/* 196 */ .append("pxx", getPxx()) +/* 197 */ .append("lbx", getLbx()) +/* 198 */ .append("jmx", getJmx()) +/* 199 */ .append("jsx", getJsx()) +/* 200 */ .append("mrz", getMrz()) +/* 201 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\domain\ColumnFolder.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnInfo.java b/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnInfo.java new file mode 100644 index 0000000..5d9b71a --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/domain/ColumnInfo.java @@ -0,0 +1,211 @@ +/* */ package com.archive.project.dasz.basecolumn.domain + +; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ColumnInfo +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "字段显示名称") +/* */ private String columnName; +/* */ @Excel(name = "字段名称") +/* */ private String columnCode; +/* */ @Excel(name = "字段长度") +/* */ private Long columnLength; +/* */ @Excel(name = "字段类型") +/* */ private String columnType; +/* */ @Excel(name = "字段绑定编码") +/* */ private String columnCodetype; +/* */ @Excel(name = "显示类型") +/* */ private String showType; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "排序项") +/* */ private Long pxx; +/* */ @Excel(name = "列表项") +/* */ private Long lbx; +/* */ @Excel(name = "界面项") +/* */ private Long jmx; +/* */ @Excel(name = "检索项") +/* */ private Long jsx; +/* */ @Excel(name = "默认值") +/* */ private String mrz; +/* */ +/* */ public void setId(Long id) { +/* 71 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 76 */ return this.id; +/* */ } +/* */ +/* */ public void setColumnName(String columnName) { +/* 80 */ this.columnName = columnName; +/* */ } +/* */ +/* */ +/* */ public String getColumnName() { +/* 85 */ return this.columnName; +/* */ } +/* */ +/* */ public void setColumnCode(String columnCode) { +/* 89 */ this.columnCode = columnCode; +/* */ } +/* */ +/* */ +/* */ public String getColumnCode() { +/* 94 */ return this.columnCode; +/* */ } +/* */ +/* */ public void setColumnLength(Long columnLength) { +/* 98 */ this.columnLength = columnLength; +/* */ } +/* */ +/* */ +/* */ public Long getColumnLength() { +/* 103 */ return this.columnLength; +/* */ } +/* */ +/* */ public void setColumnType(String columnType) { +/* 107 */ this.columnType = columnType; +/* */ } +/* */ +/* */ +/* */ public String getColumnType() { +/* 112 */ return this.columnType; +/* */ } +/* */ +/* */ public void setColumnCodetype(String columnCodetype) { +/* 116 */ this.columnCodetype = columnCodetype; +/* */ } +/* */ +/* */ +/* */ public String getColumnCodetype() { +/* 121 */ return this.columnCodetype; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 125 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 130 */ return this.bz; +/* */ } +/* */ +/* */ public void setPxx(Long pxx) { +/* 134 */ this.pxx = pxx; +/* */ } +/* */ +/* */ +/* */ public Long getPxx() { +/* 139 */ return this.pxx; +/* */ } +/* */ +/* */ public void setLbx(Long lbx) { +/* 143 */ this.lbx = lbx; +/* */ } +/* */ +/* */ +/* */ public Long getLbx() { +/* 148 */ return this.lbx; +/* */ } +/* */ +/* */ public void setJmx(Long jmx) { +/* 152 */ this.jmx = jmx; +/* */ } +/* */ +/* */ +/* */ public Long getJmx() { +/* 157 */ return this.jmx; +/* */ } +/* */ +/* */ public void setJsx(Long jsx) { +/* 161 */ this.jsx = jsx; +/* */ } +/* */ +/* */ +/* */ public Long getJsx() { +/* 166 */ return this.jsx; +/* */ } +/* */ +/* */ public void setMrz(String mrz) { +/* 170 */ this.mrz = mrz; +/* */ } +/* */ +/* */ +/* */ public String getMrz() { +/* 175 */ return this.mrz; +/* */ } +/* */ +/* */ public String getShowType() { +/* 179 */ return this.showType; +/* */ } +/* */ +/* */ public void setShowType(String showType) { +/* 183 */ this.showType = showType; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 188 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 189 */ .append("id", getId()) +/* 190 */ .append("columnName", getColumnName()) +/* 191 */ .append("columnCode", getColumnCode()) +/* 192 */ .append("columnLength", getColumnLength()) +/* 193 */ .append("columnType", getColumnType()) +/* 194 */ .append("columnCodetype", getColumnCodetype()) +/* 195 */ .append("bz", getBz()) +/* 196 */ .append("pxx", getPxx()) +/* 197 */ .append("lbx", getLbx()) +/* 198 */ .append("jmx", getJmx()) +/* 199 */ .append("jsx", getJsx()) +/* 200 */ .append("mrz", getMrz()) +/* 201 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\domain\ColumnInfo.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnDocumentMapper.java b/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnDocumentMapper.java new file mode 100644 index 0000000..04c24bb --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnDocumentMapper.java @@ -0,0 +1,30 @@ +package com.archive.project.dasz.basecolumn.mapper + +-INF.classes.com.archive.project.dasz.basecolumn.mapper; + +import com.archive.project.dasz.basecolumn.domain.ColumnDocument; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface ColumnDocumentMapper { + ColumnDocument selectColumnDocumentById(Long paramLong); + + List selectColumnDocumentList(ColumnDocument paramColumnDocument); + + List selectColumnDocumentListSqlite(ColumnDocument paramColumnDocument); + + int insertColumnDocument(ColumnDocument paramColumnDocument); + + int updateColumnDocument(ColumnDocument paramColumnDocument); + + int deleteColumnDocumentById(Long paramLong); + + int deleteColumnDocumentByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\mapper\ColumnDocumentMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnFileMapper.java b/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnFileMapper.java new file mode 100644 index 0000000..62ca039 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnFileMapper.java @@ -0,0 +1,30 @@ +package com.archive.project.dasz.basecolumn.mapper + +-INF.classes.com.archive.project.dasz.basecolumn.mapper; + +import com.archive.project.dasz.basecolumn.domain.ColumnFile; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface ColumnFileMapper { + ColumnFile selectColumnFileById(Long paramLong); + + List selectColumnFileList(ColumnFile paramColumnFile); + + List selectColumnFileListSqlite(ColumnFile paramColumnFile); + + int insertColumnFile(ColumnFile paramColumnFile); + + int updateColumnFile(ColumnFile paramColumnFile); + + int deleteColumnFileById(Long paramLong); + + int deleteColumnFileByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\mapper\ColumnFileMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnFolderMapper.java b/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnFolderMapper.java new file mode 100644 index 0000000..a014844 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnFolderMapper.java @@ -0,0 +1,30 @@ +package com.archive.project.dasz.basecolumn.mapper + +-INF.classes.com.archive.project.dasz.basecolumn.mapper; + +import com.archive.project.dasz.basecolumn.domain.ColumnFolder; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface ColumnFolderMapper { + ColumnFolder selectColumnFolderById(Long paramLong); + + List selectColumnFolderList(ColumnFolder paramColumnFolder); + + List selectColumnFolderListSqlite(ColumnFolder paramColumnFolder); + + int insertColumnFolder(ColumnFolder paramColumnFolder); + + int updateColumnFolder(ColumnFolder paramColumnFolder); + + int deleteColumnFolderById(Long paramLong); + + int deleteColumnFolderByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\mapper\ColumnFolderMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnInfoMapper.java b/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnInfoMapper.java new file mode 100644 index 0000000..f99f369 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/mapper/ColumnInfoMapper.java @@ -0,0 +1,30 @@ +package com.archive.project.dasz.basecolumn.mapper + +-INF.classes.com.archive.project.dasz.basecolumn.mapper; + +import com.archive.project.dasz.basecolumn.domain.ColumnInfo; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface ColumnInfoMapper { + ColumnInfo selectColumnInfoById(Long paramLong); + + List selectColumnInfoList(ColumnInfo paramColumnInfo); + + List selectColumnInfoListSqlite(ColumnInfo paramColumnInfo); + + int insertColumnInfo(ColumnInfo paramColumnInfo); + + int updateColumnInfo(ColumnInfo paramColumnInfo); + + int deleteColumnInfoById(Long paramLong); + + int deleteColumnInfoByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\mapper\ColumnInfoMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnDocumentService.java b/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnDocumentService.java new file mode 100644 index 0000000..7bef36c --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnDocumentService.java @@ -0,0 +1,26 @@ +package com.archive.project.dasz.basecolumn.service + +-INF.classes.com.archive.project.dasz.basecolumn.service; + +import com.archive.project.dasz.basecolumn.domain.ColumnDocument; +import java.util.List; + +public interface IColumnDocumentService { + ColumnDocument selectColumnDocumentById(Long paramLong); + + List selectColumnDocumentList(ColumnDocument paramColumnDocument); + + int insertColumnDocument(ColumnDocument paramColumnDocument); + + int updateColumnDocument(ColumnDocument paramColumnDocument); + + int deleteColumnDocumentByIds(String paramString); + + int deleteColumnDocumentById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\service\IColumnDocumentService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnFileService.java b/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnFileService.java new file mode 100644 index 0000000..e927073 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnFileService.java @@ -0,0 +1,26 @@ +package com.archive.project.dasz.basecolumn.service + +-INF.classes.com.archive.project.dasz.basecolumn.service; + +import com.archive.project.dasz.basecolumn.domain.ColumnFile; +import java.util.List; + +public interface IColumnFileService { + ColumnFile selectColumnFileById(Long paramLong); + + List selectColumnFileList(ColumnFile paramColumnFile); + + int insertColumnFile(ColumnFile paramColumnFile); + + int updateColumnFile(ColumnFile paramColumnFile); + + int deleteColumnFileByIds(String paramString); + + int deleteColumnFileById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\service\IColumnFileService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnFolderService.java b/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnFolderService.java new file mode 100644 index 0000000..647fa9e --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnFolderService.java @@ -0,0 +1,26 @@ +package com.archive.project.dasz.basecolumn.service + +-INF.classes.com.archive.project.dasz.basecolumn.service; + +import com.archive.project.dasz.basecolumn.domain.ColumnFolder; +import java.util.List; + +public interface IColumnFolderService { + ColumnFolder selectColumnFolderById(Long paramLong); + + List selectColumnFolderList(ColumnFolder paramColumnFolder); + + int insertColumnFolder(ColumnFolder paramColumnFolder); + + int updateColumnFolder(ColumnFolder paramColumnFolder); + + int deleteColumnFolderByIds(String paramString); + + int deleteColumnFolderById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\service\IColumnFolderService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnInfoService.java b/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnInfoService.java new file mode 100644 index 0000000..0eba90f --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/service/IColumnInfoService.java @@ -0,0 +1,26 @@ +package com.archive.project.dasz.basecolumn.service + +-INF.classes.com.archive.project.dasz.basecolumn.service; + +import com.archive.project.dasz.basecolumn.domain.ColumnInfo; +import java.util.List; + +public interface IColumnInfoService { + ColumnInfo selectColumnInfoById(Long paramLong); + + List selectColumnInfoList(ColumnInfo paramColumnInfo); + + int insertColumnInfo(ColumnInfo paramColumnInfo); + + int updateColumnInfo(ColumnInfo paramColumnInfo); + + int deleteColumnInfoByIds(String paramString); + + int deleteColumnInfoById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\service\IColumnInfoService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnDocumentServiceImpl.java b/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnDocumentServiceImpl.java new file mode 100644 index 0000000..23f8145 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnDocumentServiceImpl.java @@ -0,0 +1,116 @@ +/* */ package com.archive.project.dasz.basecolumn.service.impl + +-INF.classes.com.archive.project.dasz.basecolumn.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.dasz.basecolumn.domain.ColumnDocument; +/* */ import com.archive.project.dasz.basecolumn.mapper.ColumnDocumentMapper; +/* */ import com.archive.project.dasz.basecolumn.service.IColumnDocumentService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class ColumnDocumentServiceImpl +/* */ implements IColumnDocumentService +/* */ { +/* */ @Autowired +/* */ private ColumnDocumentMapper columnDocumentMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public ColumnDocument selectColumnDocumentById(Long id) { +/* 38 */ return this.columnDocumentMapper.selectColumnDocumentById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectColumnDocumentList(ColumnDocument columnDocument) { +/* 50 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 51 */ return this.columnDocumentMapper.selectColumnDocumentList(columnDocument); +/* */ } +/* 53 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 54 */ return this.columnDocumentMapper.selectColumnDocumentListSqlite(columnDocument); +/* */ } +/* 56 */ return this.columnDocumentMapper.selectColumnDocumentList(columnDocument); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertColumnDocument(ColumnDocument columnDocument) { +/* 70 */ return this.columnDocumentMapper.insertColumnDocument(columnDocument); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateColumnDocument(ColumnDocument columnDocument) { +/* 82 */ return this.columnDocumentMapper.updateColumnDocument(columnDocument); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteColumnDocumentByIds(String ids) { +/* 94 */ return this.columnDocumentMapper.deleteColumnDocumentByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteColumnDocumentById(Long id) { +/* 106 */ return this.columnDocumentMapper.deleteColumnDocumentById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\service\impl\ColumnDocumentServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnFileServiceImpl.java b/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnFileServiceImpl.java new file mode 100644 index 0000000..3738cfd --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnFileServiceImpl.java @@ -0,0 +1,116 @@ +/* */ package com.archive.project.dasz.basecolumn.service.impl + +-INF.classes.com.archive.project.dasz.basecolumn.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.dasz.basecolumn.domain.ColumnFile; +/* */ import com.archive.project.dasz.basecolumn.mapper.ColumnFileMapper; +/* */ import com.archive.project.dasz.basecolumn.service.IColumnFileService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class ColumnFileServiceImpl +/* */ implements IColumnFileService +/* */ { +/* */ @Autowired +/* */ private ColumnFileMapper columnFileMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public ColumnFile selectColumnFileById(Long id) { +/* 38 */ return this.columnFileMapper.selectColumnFileById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectColumnFileList(ColumnFile columnFile) { +/* 50 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 51 */ return this.columnFileMapper.selectColumnFileList(columnFile); +/* */ } +/* 53 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 54 */ return this.columnFileMapper.selectColumnFileListSqlite(columnFile); +/* */ } +/* 56 */ return this.columnFileMapper.selectColumnFileList(columnFile); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertColumnFile(ColumnFile columnFile) { +/* 70 */ return this.columnFileMapper.insertColumnFile(columnFile); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateColumnFile(ColumnFile columnFile) { +/* 82 */ return this.columnFileMapper.updateColumnFile(columnFile); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteColumnFileByIds(String ids) { +/* 94 */ return this.columnFileMapper.deleteColumnFileByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteColumnFileById(Long id) { +/* 106 */ return this.columnFileMapper.deleteColumnFileById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\service\impl\ColumnFileServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnFolderServiceImpl.java b/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnFolderServiceImpl.java new file mode 100644 index 0000000..4493d4c --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnFolderServiceImpl.java @@ -0,0 +1,116 @@ +/* */ package com.archive.project.dasz.basecolumn.service.impl + +-INF.classes.com.archive.project.dasz.basecolumn.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.dasz.basecolumn.domain.ColumnFolder; +/* */ import com.archive.project.dasz.basecolumn.mapper.ColumnFolderMapper; +/* */ import com.archive.project.dasz.basecolumn.service.IColumnFolderService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class ColumnFolderServiceImpl +/* */ implements IColumnFolderService +/* */ { +/* */ @Autowired +/* */ private ColumnFolderMapper columnFolderMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public ColumnFolder selectColumnFolderById(Long id) { +/* 38 */ return this.columnFolderMapper.selectColumnFolderById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectColumnFolderList(ColumnFolder columnFolder) { +/* 50 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 51 */ return this.columnFolderMapper.selectColumnFolderList(columnFolder); +/* */ } +/* 53 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 54 */ return this.columnFolderMapper.selectColumnFolderListSqlite(columnFolder); +/* */ } +/* 56 */ return this.columnFolderMapper.selectColumnFolderList(columnFolder); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertColumnFolder(ColumnFolder columnFolder) { +/* 70 */ return this.columnFolderMapper.insertColumnFolder(columnFolder); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateColumnFolder(ColumnFolder columnFolder) { +/* 82 */ return this.columnFolderMapper.updateColumnFolder(columnFolder); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteColumnFolderByIds(String ids) { +/* 94 */ return this.columnFolderMapper.deleteColumnFolderByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteColumnFolderById(Long id) { +/* 106 */ return this.columnFolderMapper.deleteColumnFolderById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\service\impl\ColumnFolderServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnInfoServiceImpl.java b/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnInfoServiceImpl.java new file mode 100644 index 0000000..5ba019b --- /dev/null +++ b/src/main/java/com/archive/project/dasz/basecolumn/service/impl/ColumnInfoServiceImpl.java @@ -0,0 +1,115 @@ +/* */ package com.archive.project.dasz.basecolumn.service.impl + +-INF.classes.com.archive.project.dasz.basecolumn.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.dasz.basecolumn.domain.ColumnInfo; +/* */ import com.archive.project.dasz.basecolumn.mapper.ColumnInfoMapper; +/* */ import com.archive.project.dasz.basecolumn.service.IColumnInfoService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class ColumnInfoServiceImpl +/* */ implements IColumnInfoService +/* */ { +/* */ @Autowired +/* */ private ColumnInfoMapper columnInfoMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public ColumnInfo selectColumnInfoById(Long id) { +/* 37 */ return this.columnInfoMapper.selectColumnInfoById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectColumnInfoList(ColumnInfo columnInfo) { +/* 49 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 50 */ return this.columnInfoMapper.selectColumnInfoList(columnInfo); +/* */ } +/* 52 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 53 */ return this.columnInfoMapper.selectColumnInfoListSqlite(columnInfo); +/* */ } +/* 55 */ return this.columnInfoMapper.selectColumnInfoList(columnInfo); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertColumnInfo(ColumnInfo columnInfo) { +/* 69 */ return this.columnInfoMapper.insertColumnInfo(columnInfo); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateColumnInfo(ColumnInfo columnInfo) { +/* 81 */ return this.columnInfoMapper.updateColumnInfo(columnInfo); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteColumnInfoByIds(String ids) { +/* 93 */ return this.columnInfoMapper.deleteColumnInfoByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteColumnInfoById(Long id) { +/* 105 */ return this.columnInfoMapper.deleteColumnInfoById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\basecolumn\service\impl\ColumnInfoServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/ccgl/controller/CcglController.java b/src/main/java/com/archive/project/dasz/ccgl/controller/CcglController.java new file mode 100644 index 0000000..cd71ed5 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/ccgl/controller/CcglController.java @@ -0,0 +1,156 @@ +/* */ package com.archive.project.dasz.ccgl.controller + +-INF.classes.com.archive.project.dasz.ccgl.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.ccgl.domain.Ccgl; +/* */ import com.archive.project.dasz.ccgl.service.ICcglService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/ccgl"}) +/* */ public class CcglController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "dasz/ccgl"; +/* */ +/* */ @Autowired +/* */ private ICcglService ccglService; +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:ccgl:view"}) +/* */ @GetMapping +/* */ public String ccgl() { +/* 41 */ return this.prefix + "/ccgl"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:ccgl:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(Ccgl ccgl) { +/* 52 */ startPage(); +/* 53 */ List list = this.ccglService.selectCcglList(ccgl); +/* 54 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:ccgl:export"}) +/* */ @Log(title = "存储管理", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(Ccgl ccgl) { +/* 66 */ List list = this.ccglService.selectCcglList(ccgl); +/* 67 */ ExcelUtil util = new ExcelUtil(Ccgl.class); +/* 68 */ return util.exportExcel(list, "ccgl"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 77 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:ccgl:add"}) +/* */ @Log(title = "存储管理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(Ccgl ccgl) { +/* 89 */ return toAjax(this.ccglService.insertCcgl(ccgl)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 98 */ Ccgl ccgl = this.ccglService.selectCcglById(id); +/* 99 */ mmap.put("ccgl", ccgl); +/* 100 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:ccgl:edit"}) +/* */ @Log(title = "存储管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(Ccgl ccgl) { +/* 112 */ return toAjax(this.ccglService.updateCcgl(ccgl)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:ccgl:remove"}) +/* */ @Log(title = "存储管理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 124 */ return toAjax(this.ccglService.deleteCcglByIds(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ @GetMapping({"/ljbsIsExit"}) +/* */ @ResponseBody +/* */ public AjaxResult ljbsIsExit(String ljbs, String ljmc) { +/* 132 */ Ccgl ccgl = new Ccgl(); +/* 133 */ ccgl.setLJMC(ljmc); +/* 134 */ List list1 = this.ccglService.selectCcglList(ccgl); +/* */ +/* 136 */ Ccgl ccgl2 = new Ccgl(); +/* 137 */ ccgl2.setLJBS(ljbs); +/* 138 */ List list2 = this.ccglService.selectCcglList(ccgl2); +/* 139 */ int res = 0; +/* 140 */ if (list1.size() > 0) { +/* 141 */ res = 1; +/* */ } +/* 143 */ if (list2.size() > 0) { +/* 144 */ res = 2; +/* */ } +/* 146 */ return AjaxResult.success(Integer.valueOf(res)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\ccgl\controller\CcglController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/ccgl/domain/Ccgl.java b/src/main/java/com/archive/project/dasz/ccgl/domain/Ccgl.java new file mode 100644 index 0000000..6efbefc --- /dev/null +++ b/src/main/java/com/archive/project/dasz/ccgl/domain/Ccgl.java @@ -0,0 +1,101 @@ +/* */ package com.archive.project.dasz.ccgl.domain + +-INF.classes.com.archive.project.dasz.ccgl.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Ccgl +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "路径名称") +/* */ private String LJMC; +/* */ @Excel(name = "路径地址") +/* */ private String LJDZ; +/* */ @Excel(name = "路径标识") +/* */ private String LJBS; +/* */ @Excel(name = "备注") +/* */ private String REMARK; +/* */ +/* */ public void setId(Long id) { +/* 39 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 44 */ return this.id; +/* */ } +/* */ +/* */ public void setLJMC(String LJMC) { +/* 48 */ this.LJMC = LJMC; +/* */ } +/* */ +/* */ +/* */ public String getLJMC() { +/* 53 */ return this.LJMC; +/* */ } +/* */ +/* */ public void setLJDZ(String LJDZ) { +/* 57 */ this.LJDZ = LJDZ; +/* */ } +/* */ +/* */ +/* */ public String getLJDZ() { +/* 62 */ return this.LJDZ; +/* */ } +/* */ +/* */ public void setLJBS(String LJBS) { +/* 66 */ this.LJBS = LJBS; +/* */ } +/* */ +/* */ +/* */ public String getLJBS() { +/* 71 */ return this.LJBS; +/* */ } +/* */ +/* */ public void setREMARK(String REMARK) { +/* 75 */ this.REMARK = REMARK; +/* */ } +/* */ +/* */ +/* */ public String getREMARK() { +/* 80 */ return this.REMARK; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 85 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 86 */ .append("id", getId()) +/* 87 */ .append("LJMC", getLJMC()) +/* 88 */ .append("LJDZ", getLJDZ()) +/* 89 */ .append("REMARK", getREMARK()) +/* 90 */ .append("LJBS", getLJBS()) +/* 91 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\ccgl\domain\Ccgl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/ccgl/mapper/CcglMapper.java b/src/main/java/com/archive/project/dasz/ccgl/mapper/CcglMapper.java new file mode 100644 index 0000000..af3fb54 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/ccgl/mapper/CcglMapper.java @@ -0,0 +1,28 @@ +package com.archive.project.dasz.ccgl.mapper + +-INF.classes.com.archive.project.dasz.ccgl.mapper; + +import com.archive.project.dasz.ccgl.domain.Ccgl; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface CcglMapper { + Ccgl selectCcglById(Long paramLong); + + List selectCcglList(Ccgl paramCcgl); + + int insertCcgl(Ccgl paramCcgl); + + int updateCcgl(Ccgl paramCcgl); + + int deleteCcglById(Long paramLong); + + int deleteCcglByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\ccgl\mapper\CcglMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/ccgl/service/ICcglService.java b/src/main/java/com/archive/project/dasz/ccgl/service/ICcglService.java new file mode 100644 index 0000000..6e4cae1 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/ccgl/service/ICcglService.java @@ -0,0 +1,30 @@ +package com.archive.project.dasz.ccgl.service + +-INF.classes.com.archive.project.dasz.ccgl.service; + +import com.archive.project.dasz.ccgl.domain.Ccgl; +import java.util.List; + +public interface ICcglService { + Ccgl selectCcglById(Long paramLong); + + List selectCcglList(Ccgl paramCcgl); + + int insertCcgl(Ccgl paramCcgl); + + int updateCcgl(Ccgl paramCcgl); + + int deleteCcglByIds(String paramString); + + int deleteCcglById(Long paramLong); + + String getPathByLjbs(String paramString); + + String getCreateDocumentPathByFile(long paramLong1, long paramLong2); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\ccgl\service\ICcglService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/ccgl/service/impl/CcglServiceImpl.java b/src/main/java/com/archive/project/dasz/ccgl/service/impl/CcglServiceImpl.java new file mode 100644 index 0000000..bfc954e --- /dev/null +++ b/src/main/java/com/archive/project/dasz/ccgl/service/impl/CcglServiceImpl.java @@ -0,0 +1,184 @@ +/* */ package com.archive.project.dasz.ccgl.service.impl + +-INF.classes.com.archive.project.dasz.ccgl.service.impl; +/* */ +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dasz.ccgl.domain.Ccgl; +/* */ import com.archive.project.dasz.ccgl.mapper.CcglMapper; +/* */ import com.archive.project.dasz.ccgl.service.ICcglService; +/* */ import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; +/* */ import java.io.File; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class CcglServiceImpl +/* */ implements ICcglService +/* */ { +/* */ @Autowired +/* */ private CcglMapper ccglMapper; +/* */ @Autowired +/* */ private IArchiveTypeService archiveTypeService; +/* */ @Autowired +/* */ private IPhysicalTableColumnService physicalTableColumnService; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ +/* */ public Ccgl selectCcglById(Long id) { +/* 49 */ return this.ccglMapper.selectCcglById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectCcglList(Ccgl ccgl) { +/* 61 */ return this.ccglMapper.selectCcglList(ccgl); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertCcgl(Ccgl ccgl) { +/* 73 */ return this.ccglMapper.insertCcgl(ccgl); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateCcgl(Ccgl ccgl) { +/* 85 */ return this.ccglMapper.updateCcgl(ccgl); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteCcglByIds(String ids) { +/* 97 */ return this.ccglMapper.deleteCcglByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteCcglById(Long id) { +/* 109 */ return this.ccglMapper.deleteCcglById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getPathByLjbs(String ljbs) { +/* 120 */ String path = ""; +/* 121 */ Ccgl ccgl = new Ccgl(); +/* 122 */ ccgl.setLJBS(ljbs); +/* 123 */ List list = selectCcglList(ccgl); +/* 124 */ if (list.size() > 0 && list.get(0) != null) { +/* 125 */ path = ((Ccgl)list.get(0)).getLJDZ(); +/* */ } +/* 127 */ return path; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getCreateDocumentPathByFile(long id, long tableId) { +/* 140 */ String resPath = ""; +/* */ +/* 142 */ String cj = getPathByLjbs("archive.documentPath"); +/* 143 */ String tableName = TableUtil.getTableName(Long.valueOf(tableId)); +/* */ +/* 145 */ long archiveTypeId = TableUtil.getArchiveTypeIdByTableId(tableId); +/* 146 */ ArchiveType archiveType = this.archiveTypeService.selectArchiveTypeById(Long.valueOf(archiveTypeId)); +/* 147 */ resPath = resPath + File.separator + archiveType.getArhciveCode(); +/* */ +/* 149 */ String[] attr = cj.split("/"); +/* 150 */ String columns = ""; +/* 151 */ for (int i = 0; i < attr.length; i++) { +/* 152 */ if (StringUtils.isNotEmpty(attr[i])) { +/* */ +/* 154 */ String name = this.physicalTableColumnService.getColumnCodeByTableIdAndShowName(attr[i], tableId); +/* 155 */ if (!name.equals("")) { +/* 156 */ columns = columns + name + ","; +/* */ } else { +/* 158 */ columns = columns + "'" + attr[i] + "',"; +/* 159 */ System.out.println("第" + i + "层级" + attr[i] + "没有找到对应字段,请检查!"); +/* */ } +/* */ } +/* */ } +/* 163 */ columns = columns.substring(0, columns.length() - 1); +/* */ +/* 165 */ String sql = "select " + columns + " from " + tableName + " where id=" + id; +/* 166 */ List> list = this.executeSqlService.queryList(sql); +/* 167 */ if (list.size() > 0 && list.get(0) != null) { +/* 168 */ String[] columnSttr = columns.split(","); +/* 169 */ for (int j = 0; j < columnSttr.length; j++) { +/* 170 */ String value = (((LinkedHashMap)list.get(0)).get(columnSttr[j]) == null) ? "" : ((LinkedHashMap)list.get(0)).get(columnSttr[j]).toString(); +/* 171 */ resPath = resPath + File.separator + value; +/* */ } +/* */ } +/* 174 */ return resPath; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\ccgl\service\impl\CcglServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/gridcolumns/controller/TXtpzGridColumnsController.java b/src/main/java/com/archive/project/dasz/gridcolumns/controller/TXtpzGridColumnsController.java new file mode 100644 index 0000000..c25eb45 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/gridcolumns/controller/TXtpzGridColumnsController.java @@ -0,0 +1,137 @@ +/* */ package com.archive.project.dasz.gridcolumns.controller + +-INF.classes.com.archive.project.dasz.gridcolumns.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.gridcolumns.domain.TXtpzGridColumns; +/* */ import com.archive.project.dasz.gridcolumns.service.ITXtpzGridColumnsService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/gridcolumns"}) +/* */ public class TXtpzGridColumnsController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "/dasz/gridcolumns"; +/* */ +/* */ +/* */ @Autowired +/* */ private ITXtpzGridColumnsService tXtpzGridColumnsService; +/* */ +/* */ +/* */ @GetMapping({"/gridcolumns/{tableId}"}) +/* */ public String columns(@PathVariable("tableId") Long tableId, ModelMap mmap) { +/* 41 */ mmap.put("tableId", tableId); +/* 42 */ return this.prefix + "/gridcolumns"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/list/{tableId}"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(@PathVariable("tableId") long tableId, TXtpzGridColumns tXtpzGridColumns) { +/* 53 */ startPage(); +/* 54 */ tXtpzGridColumns.setTableId(Long.valueOf(tableId)); +/* */ +/* 56 */ List list = this.tXtpzGridColumnsService.selectTXtpzGridColumnsList(tXtpzGridColumns); +/* 57 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "物理表列表定义", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TXtpzGridColumns tXtpzGridColumns) { +/* 69 */ List list = this.tXtpzGridColumnsService.selectTXtpzGridColumnsList(tXtpzGridColumns); +/* 70 */ ExcelUtil util = new ExcelUtil(TXtpzGridColumns.class); +/* 71 */ return util.exportExcel(list, "columns"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 80 */ return this.prefix + "/gridadd"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "物理表列表定义", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TXtpzGridColumns tXtpzGridColumns) { +/* 92 */ return toAjax(this.tXtpzGridColumnsService.insertTXtpzGridColumns(tXtpzGridColumns)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 101 */ TXtpzGridColumns tXtpzGridColumns = this.tXtpzGridColumnsService.selectTXtpzGridColumnsById(id); +/* 102 */ mmap.put("tXtpzGridColumns", tXtpzGridColumns); +/* 103 */ return this.prefix + "/gridedit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "物理表列表定义", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TXtpzGridColumns tXtpzGridColumns) { +/* 115 */ return toAjax(this.tXtpzGridColumnsService.updateTXtpzGridColumns(tXtpzGridColumns)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "物理表列表定义", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 127 */ return toAjax(this.tXtpzGridColumnsService.deleteTXtpzGridColumnsByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\gridcolumns\controller\TXtpzGridColumnsController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/gridcolumns/domain/TXtpzGridColumns.java b/src/main/java/com/archive/project/dasz/gridcolumns/domain/TXtpzGridColumns.java new file mode 100644 index 0000000..d24630f --- /dev/null +++ b/src/main/java/com/archive/project/dasz/gridcolumns/domain/TXtpzGridColumns.java @@ -0,0 +1,171 @@ +/* */ package com.archive.project.dasz.gridcolumns.domain + +-INF.classes.com.archive.project.dasz.gridcolumns.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TXtpzGridColumns +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "所属表id") +/* */ private Long tableId; +/* */ @Excel(name = "字段id") +/* */ private Long columnId; +/* */ @Excel(name = "字段名称") +/* */ private String columnname; +/* */ @Excel(name = "字段显示名称") +/* */ private String showname; +/* */ @Excel(name = "列表显示宽度") +/* */ private Long width; +/* */ @Excel(name = "显示顺序") +/* */ private Long orderInt; +/* */ @Excel(name = "档案类型id") +/* */ private Long archiveTypeId; +/* */ @Excel(name = "备用字段1") +/* */ private String by1; +/* */ @Excel(name = "备用字段2") +/* */ private String by2; +/* */ +/* */ public void setId(Long id) { +/* 59 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 64 */ return this.id; +/* */ } +/* */ +/* */ public void setTableId(Long tableId) { +/* 68 */ this.tableId = tableId; +/* */ } +/* */ +/* */ +/* */ public Long getTableId() { +/* 73 */ return this.tableId; +/* */ } +/* */ +/* */ public void setColumnId(Long columnId) { +/* 77 */ this.columnId = columnId; +/* */ } +/* */ +/* */ +/* */ public Long getColumnId() { +/* 82 */ return this.columnId; +/* */ } +/* */ +/* */ public void setColumnname(String columnname) { +/* 86 */ this.columnname = columnname; +/* */ } +/* */ +/* */ +/* */ public String getColumnname() { +/* 91 */ return this.columnname; +/* */ } +/* */ +/* */ public void setShowname(String showname) { +/* 95 */ this.showname = showname; +/* */ } +/* */ +/* */ +/* */ public String getShowname() { +/* 100 */ return this.showname; +/* */ } +/* */ +/* */ public void setWidth(Long width) { +/* 104 */ this.width = width; +/* */ } +/* */ +/* */ +/* */ public Long getWidth() { +/* 109 */ return this.width; +/* */ } +/* */ +/* */ public void setOrderInt(Long orderInt) { +/* 113 */ this.orderInt = orderInt; +/* */ } +/* */ +/* */ +/* */ public Long getOrderInt() { +/* 118 */ return this.orderInt; +/* */ } +/* */ +/* */ public void setArchiveTypeId(Long archiveTypeId) { +/* 122 */ this.archiveTypeId = archiveTypeId; +/* */ } +/* */ +/* */ +/* */ public Long getArchiveTypeId() { +/* 127 */ return this.archiveTypeId; +/* */ } +/* */ +/* */ public void setBy1(String by1) { +/* 131 */ this.by1 = by1; +/* */ } +/* */ +/* */ +/* */ public String getBy1() { +/* 136 */ return this.by1; +/* */ } +/* */ +/* */ public void setBy2(String by2) { +/* 140 */ this.by2 = by2; +/* */ } +/* */ +/* */ +/* */ public String getBy2() { +/* 145 */ return this.by2; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 150 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 151 */ .append("id", getId()) +/* 152 */ .append("tableId", getTableId()) +/* 153 */ .append("columnId", getColumnId()) +/* 154 */ .append("columnname", getColumnname()) +/* 155 */ .append("showname", getShowname()) +/* 156 */ .append("width", getWidth()) +/* 157 */ .append("orderInt", getOrderInt()) +/* 158 */ .append("archiveTypeId", getArchiveTypeId()) +/* 159 */ .append("by1", getBy1()) +/* 160 */ .append("by2", getBy2()) +/* 161 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\gridcolumns\domain\TXtpzGridColumns.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/gridcolumns/mapper/TXtpzGridColumnsMapper.java b/src/main/java/com/archive/project/dasz/gridcolumns/mapper/TXtpzGridColumnsMapper.java new file mode 100644 index 0000000..2cb120c --- /dev/null +++ b/src/main/java/com/archive/project/dasz/gridcolumns/mapper/TXtpzGridColumnsMapper.java @@ -0,0 +1,28 @@ +package com.archive.project.dasz.gridcolumns.mapper + +-INF.classes.com.archive.project.dasz.gridcolumns.mapper; + +import com.archive.project.dasz.gridcolumns.domain.TXtpzGridColumns; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface TXtpzGridColumnsMapper { + TXtpzGridColumns selectTXtpzGridColumnsById(Long paramLong); + + List selectTXtpzGridColumnsList(TXtpzGridColumns paramTXtpzGridColumns); + + int insertTXtpzGridColumns(TXtpzGridColumns paramTXtpzGridColumns); + + int updateTXtpzGridColumns(TXtpzGridColumns paramTXtpzGridColumns); + + int deleteTXtpzGridColumnsById(Long paramLong); + + int deleteTXtpzGridColumnsByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\gridcolumns\mapper\TXtpzGridColumnsMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/gridcolumns/service/ITXtpzGridColumnsService.java b/src/main/java/com/archive/project/dasz/gridcolumns/service/ITXtpzGridColumnsService.java new file mode 100644 index 0000000..2e3fcc2 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/gridcolumns/service/ITXtpzGridColumnsService.java @@ -0,0 +1,26 @@ +package com.archive.project.dasz.gridcolumns.service + +-INF.classes.com.archive.project.dasz.gridcolumns.service; + +import com.archive.project.dasz.gridcolumns.domain.TXtpzGridColumns; +import java.util.List; + +public interface ITXtpzGridColumnsService { + TXtpzGridColumns selectTXtpzGridColumnsById(Long paramLong); + + List selectTXtpzGridColumnsList(TXtpzGridColumns paramTXtpzGridColumns); + + int insertTXtpzGridColumns(TXtpzGridColumns paramTXtpzGridColumns); + + int updateTXtpzGridColumns(TXtpzGridColumns paramTXtpzGridColumns); + + int deleteTXtpzGridColumnsByIds(String paramString); + + int deleteTXtpzGridColumnsById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\gridcolumns\service\ITXtpzGridColumnsService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/gridcolumns/service/impl/TXtpzGridColumnsServiceImpl.java b/src/main/java/com/archive/project/dasz/gridcolumns/service/impl/TXtpzGridColumnsServiceImpl.java new file mode 100644 index 0000000..1c425d8 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/gridcolumns/service/impl/TXtpzGridColumnsServiceImpl.java @@ -0,0 +1,185 @@ +/* */ package com.archive.project.dasz.gridcolumns.service.impl + +-INF.classes.com.archive.project.dasz.gridcolumns.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.dasz.gridcolumns.domain.TXtpzGridColumns; +/* */ import com.archive.project.dasz.gridcolumns.mapper.TXtpzGridColumnsMapper; +/* */ import com.archive.project.dasz.gridcolumns.service.ITXtpzGridColumnsService; +/* */ import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TXtpzGridColumnsServiceImpl +/* */ implements ITXtpzGridColumnsService +/* */ { +/* */ @Autowired +/* */ private TXtpzGridColumnsMapper tXtpzGridColumnsMapper; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public TXtpzGridColumns selectTXtpzGridColumnsById(Long id) { +/* 45 */ return this.tXtpzGridColumnsMapper.selectTXtpzGridColumnsById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTXtpzGridColumnsList(TXtpzGridColumns tXtpzGridColumns) { +/* 57 */ List list = null; +/* 58 */ list = this.tXtpzGridColumnsMapper.selectTXtpzGridColumnsList(tXtpzGridColumns); +/* */ +/* */ +/* 61 */ PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); +/* 62 */ physicalTableColumn.setTableId(tXtpzGridColumns.getTableId()); +/* 63 */ physicalTableColumn.setLbx(Long.valueOf(1L)); +/* 64 */ List columnsList = new ArrayList<>(); +/* 65 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 66 */ columnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn); +/* */ } +/* 68 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 69 */ columnsList = this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn); +/* */ } +/* */ +/* 72 */ if (columnsList != null && columnsList.size() > 0) { +/* */ int i; +/* 74 */ for (i = 0; i < columnsList.size(); i++) { +/* 75 */ PhysicalTableColumn physicalTableColumn1 = columnsList.get(i); +/* 76 */ boolean isExit = false; +/* 77 */ for (int j = 0; j < list.size(); j++) { +/* 78 */ if (physicalTableColumn1.getColumnCode().equals(((TXtpzGridColumns)list.get(j)).getColumnname())) { +/* 79 */ isExit = true; +/* */ +/* */ break; +/* */ } +/* */ } +/* 84 */ if (!isExit) { +/* 85 */ int OrderInt = list.size() + i; +/* 86 */ TXtpzGridColumns tXtpzGridColumns1 = new TXtpzGridColumns(); +/* 87 */ tXtpzGridColumns1.setTableId(tXtpzGridColumns.getTableId()); +/* 88 */ tXtpzGridColumns1.setColumnId(physicalTableColumn1.getId()); +/* 89 */ tXtpzGridColumns1.setColumnname(physicalTableColumn1.getColumnCode()); +/* 90 */ tXtpzGridColumns1.setShowname(physicalTableColumn1.getColumnName()); +/* 91 */ tXtpzGridColumns1.setOrderInt(Long.valueOf(OrderInt)); +/* 92 */ tXtpzGridColumns1.setBy1(physicalTableColumn1.getColumnCodetype()); +/* 93 */ insertTXtpzGridColumns(tXtpzGridColumns1); +/* */ } +/* */ } +/* */ +/* 97 */ for (i = 0; i < list.size(); i++) { +/* 98 */ TXtpzGridColumns tXtpzGridColumns1 = list.get(i); +/* 99 */ boolean isExit = false; +/* 100 */ for (int j = 0; j < columnsList.size(); j++) { +/* 101 */ if (tXtpzGridColumns1.getColumnId().equals(((PhysicalTableColumn)columnsList.get(j)).getId())) { +/* 102 */ isExit = true; +/* */ break; +/* */ } +/* */ } +/* 106 */ if (!isExit) +/* */ { +/* 108 */ deleteTXtpzGridColumnsById(tXtpzGridColumns1.getId()); +/* */ } +/* */ } +/* */ } +/* */ +/* 113 */ list = this.tXtpzGridColumnsMapper.selectTXtpzGridColumnsList(tXtpzGridColumns); +/* 114 */ lambda(list); +/* 115 */ return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void lambda(List list) { +/* 124 */ list.sort((o1, o2) -> Integer.parseInt(String.valueOf(o1.getOrderInt())) - Integer.parseInt(String.valueOf(o2.getOrderInt()))); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTXtpzGridColumns(TXtpzGridColumns tXtpzGridColumns) { +/* 139 */ return this.tXtpzGridColumnsMapper.insertTXtpzGridColumns(tXtpzGridColumns); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTXtpzGridColumns(TXtpzGridColumns tXtpzGridColumns) { +/* 151 */ return this.tXtpzGridColumnsMapper.updateTXtpzGridColumns(tXtpzGridColumns); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTXtpzGridColumnsByIds(String ids) { +/* 163 */ return this.tXtpzGridColumnsMapper.deleteTXtpzGridColumnsByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTXtpzGridColumnsById(Long id) { +/* 175 */ return this.tXtpzGridColumnsMapper.deleteTXtpzGridColumnsById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\gridcolumns\service\impl\TXtpzGridColumnsServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/mgc/controller/MgcController.java b/src/main/java/com/archive/project/dasz/mgc/controller/MgcController.java new file mode 100644 index 0000000..5e64dca --- /dev/null +++ b/src/main/java/com/archive/project/dasz/mgc/controller/MgcController.java @@ -0,0 +1,134 @@ +/* */ package com.archive.project.dasz.mgc.controller + +-INF.classes.com.archive.project.dasz.mgc.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.mgc.domain.Mgc; +/* */ import com.archive.project.dasz.mgc.service.IMgcService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/mgc"}) +/* */ public class MgcController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "dasz/mgc"; +/* */ +/* */ @Autowired +/* */ private IMgcService mgcService; +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:mgc:view"}) +/* */ @GetMapping +/* */ public String mgc() { +/* 41 */ return this.prefix + "/mgc"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:mgc:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(Mgc mgc) { +/* 52 */ startPage(); +/* 53 */ List list = this.mgcService.selectMgcList(mgc); +/* 54 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:mgc:export"}) +/* */ @Log(title = "敏感词管理", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(Mgc mgc) { +/* 66 */ List list = this.mgcService.selectMgcList(mgc); +/* 67 */ ExcelUtil util = new ExcelUtil(Mgc.class); +/* 68 */ return util.exportExcel(list, "mgc"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 77 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:mgc:add"}) +/* */ @Log(title = "敏感词管理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(Mgc mgc) { +/* 89 */ return toAjax(this.mgcService.insertMgc(mgc)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Integer id, ModelMap mmap) { +/* 98 */ Mgc mgc = this.mgcService.selectMgcById(id); +/* 99 */ mmap.put("mgc", mgc); +/* 100 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:mgc:edit"}) +/* */ @Log(title = "敏感词管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(Mgc mgc) { +/* 112 */ return toAjax(this.mgcService.updateMgc(mgc)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:mgc:remove"}) +/* */ @Log(title = "敏感词管理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 124 */ return toAjax(this.mgcService.deleteMgcByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\mgc\controller\MgcController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/mgc/domain/Mgc.java b/src/main/java/com/archive/project/dasz/mgc/domain/Mgc.java new file mode 100644 index 0000000..40d22a6 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/mgc/domain/Mgc.java @@ -0,0 +1,74 @@ +/* */ package com.archive.project.dasz.mgc.domain + +-INF.classes.com.archive.project.dasz.mgc.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Mgc +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Integer id; +/* */ @Excel(name = "敏感词类型") +/* */ private String mgc; +/* */ @Excel(name = "敏感词类型") +/* */ private String mgclx; +/* */ +/* */ public void setId(Integer id) { +/* 31 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Integer getId() { +/* 36 */ return this.id; +/* */ } +/* */ +/* */ public void setMgc(String mgc) { +/* 40 */ this.mgc = mgc; +/* */ } +/* */ +/* */ +/* */ public String getMgc() { +/* 45 */ return this.mgc; +/* */ } +/* */ +/* */ public void setMgclx(String mgclx) { +/* 49 */ this.mgclx = mgclx; +/* */ } +/* */ +/* */ +/* */ public String getMgclx() { +/* 54 */ return this.mgclx; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 59 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 60 */ .append("id", getId()) +/* 61 */ .append("mgc", getMgc()) +/* 62 */ .append("remark", getRemark()) +/* 63 */ .append("mgclx", getMgclx()) +/* 64 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\mgc\domain\Mgc.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/mgc/mapper/MgcMapper.java b/src/main/java/com/archive/project/dasz/mgc/mapper/MgcMapper.java new file mode 100644 index 0000000..fb55ef3 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/mgc/mapper/MgcMapper.java @@ -0,0 +1,28 @@ +package com.archive.project.dasz.mgc.mapper + +-INF.classes.com.archive.project.dasz.mgc.mapper; + +import com.archive.project.dasz.mgc.domain.Mgc; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface MgcMapper { + Mgc selectMgcById(Integer paramInteger); + + List selectMgcList(Mgc paramMgc); + + int insertMgc(Mgc paramMgc); + + int updateMgc(Mgc paramMgc); + + int deleteMgcById(Integer paramInteger); + + int deleteMgcByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\mgc\mapper\MgcMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/mgc/service/IMgcService.java b/src/main/java/com/archive/project/dasz/mgc/service/IMgcService.java new file mode 100644 index 0000000..fe8f4f3 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/mgc/service/IMgcService.java @@ -0,0 +1,26 @@ +package com.archive.project.dasz.mgc.service + +-INF.classes.com.archive.project.dasz.mgc.service; + +import com.archive.project.dasz.mgc.domain.Mgc; +import java.util.List; + +public interface IMgcService { + Mgc selectMgcById(Integer paramInteger); + + List selectMgcList(Mgc paramMgc); + + int insertMgc(Mgc paramMgc); + + int updateMgc(Mgc paramMgc); + + int deleteMgcByIds(String paramString); + + int deleteMgcById(Integer paramInteger); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\mgc\service\IMgcService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/mgc/service/impl/MgcServiceImpl.java b/src/main/java/com/archive/project/dasz/mgc/service/impl/MgcServiceImpl.java new file mode 100644 index 0000000..22e1942 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/mgc/service/impl/MgcServiceImpl.java @@ -0,0 +1,102 @@ +/* */ package com.archive.project.dasz.mgc.service.impl + +; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.dasz.mgc.domain.Mgc; +/* */ import com.archive.project.dasz.mgc.mapper.MgcMapper; +/* */ import com.archive.project.dasz.mgc.service.IMgcService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class MgcServiceImpl +/* */ implements IMgcService +/* */ { +/* */ @Autowired +/* */ private MgcMapper mgcMapper; +/* */ +/* */ public Mgc selectMgcById(Integer id) { +/* 32 */ return this.mgcMapper.selectMgcById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectMgcList(Mgc mgc) { +/* 44 */ return this.mgcMapper.selectMgcList(mgc); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertMgc(Mgc mgc) { +/* 56 */ return this.mgcMapper.insertMgc(mgc); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateMgc(Mgc mgc) { +/* 68 */ return this.mgcMapper.updateMgc(mgc); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteMgcByIds(String ids) { +/* 80 */ return this.mgcMapper.deleteMgcByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteMgcById(Integer id) { +/* 92 */ return this.mgcMapper.deleteMgcById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\mgc\service\impl\MgcServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/physicaltable/controller/PhysicalTableController.java b/src/main/java/com/archive/project/dasz/physicaltable/controller/PhysicalTableController.java new file mode 100644 index 0000000..7283672 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/physicaltable/controller/PhysicalTableController.java @@ -0,0 +1,180 @@ +/* */ package com.archive.project.dasz.physicaltable.controller + +-INF.classes.com.archive.project.dasz.physicaltable.controller; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.physicaltable.domain.PhysicalTable; +/* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; +/* */ import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +/* */ import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; +/* */ import java.util.Arrays; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/physicaltable"}) +/* */ public class PhysicalTableController +/* */ extends BaseController +/* */ { +/* 37 */ private String prefix = "dasz/physicaltable"; +/* */ +/* */ @Autowired +/* */ private IPhysicalTableService physicalTableService; +/* */ +/* */ @Autowired +/* */ private IPhysicalTableColumnService physicalTableColumnService; +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltable:view"}) +/* */ @GetMapping +/* */ public String physicalTable() { +/* 49 */ return this.prefix + "/physicaltable"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltable:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(PhysicalTable physicalTable) { +/* 60 */ startPage(); +/* 61 */ List list = this.physicalTableService.selectPhysicalTableList(physicalTable); +/* 62 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltable:export"}) +/* */ @Log(title = "物理", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(PhysicalTable physicalTable) { +/* 74 */ List list = this.physicalTableService.selectPhysicalTableList(physicalTable); +/* 75 */ ExcelUtil util = new ExcelUtil(PhysicalTable.class); +/* 76 */ return util.exportExcel(list, "physicalTable"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 85 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltable:add"}) +/* */ @Log(title = "物理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(PhysicalTable physicalTable) { +/* 97 */ return toAjax(this.physicalTableService.insertPhysicalTable(physicalTable)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 106 */ PhysicalTable physicalTable = this.physicalTableService.selectPhysicalTableById(id); +/* 107 */ mmap.put("physicalTable", physicalTable); +/* 108 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltable:edit"}) +/* */ @Log(title = "物理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(PhysicalTable physicalTable) { +/* 120 */ return toAjax(this.physicalTableService.updatePhysicalTable(physicalTable)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltable:remove"}) +/* */ @Log(title = "物理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 132 */ return toAjax(this.physicalTableService.deletePhysicalTableByIds(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/isSetForm/{tableId}/{colId}"}) +/* */ @ResponseBody +/* */ public boolean isSetForm(@PathVariable("tableId") Long tableId, @PathVariable("colId") Long colId) { +/* 143 */ boolean flag = false; +/* 144 */ PhysicalTable physicalTable = this.physicalTableService.selectPhysicalTableById(tableId); +/* 145 */ String tableForm = physicalTable.getTableForm(); +/* 146 */ if (StringUtils.isNotEmpty(tableForm)) { +/* 147 */ PhysicalTableColumn physicalTableColumn = this.physicalTableColumnService.selectPhysicalTableColumnById(colId); +/* 148 */ String columnCode = physicalTableColumn.getColumnCode(); +/* 149 */ String[] split = tableForm.split(","); +/* 150 */ if (Arrays.asList(split).contains(columnCode)) { +/* 151 */ flag = true; +/* */ } +/* */ } +/* 154 */ return flag; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/cleanTableForm/{tableId}"}) +/* */ @ResponseBody +/* */ public AjaxResult cleanTableForm(@PathVariable("tableId") Long tableId) { +/* 165 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 166 */ physicalTable.setId(tableId); +/* 167 */ physicalTable.setTableForm(""); +/* 168 */ physicalTable.setTableFormDiv(""); +/* 169 */ this.physicalTableService.updatePhysicalTable(physicalTable); +/* 170 */ return AjaxResult.success(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\physicaltable\controller\PhysicalTableController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/physicaltable/domain/PhysicalTable.java b/src/main/java/com/archive/project/dasz/physicaltable/domain/PhysicalTable.java new file mode 100644 index 0000000..0c17a89 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/physicaltable/domain/PhysicalTable.java @@ -0,0 +1,167 @@ +/* */ package com.archive.project.dasz.physicaltable.domain + +-INF.classes.com.archive.project.dasz.physicaltable.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PhysicalTable +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "物理表名") +/* */ private String tablename; +/* */ @Excel(name = "显示名称") +/* */ private String showname; +/* */ @Excel(name = "表编码") +/* */ private String tableCode; +/* */ @Excel(name = "排序") +/* */ private Long showorder; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "档案类型id") +/* */ private String archivetypeid; +/* */ @Excel(name = "档案类型编码") +/* */ private String archivetypecode; +/* */ @Excel(name = "表单字段") +/* */ private String tableForm; +/* */ @Excel(name = "表单字段Div") +/* */ private String tableFormDiv; +/* */ +/* */ public String getTableFormDiv() { +/* 58 */ return this.tableFormDiv; +/* */ } +/* */ +/* */ public void setTableFormDiv(String tableFormDiv) { +/* 62 */ this.tableFormDiv = tableFormDiv; +/* */ } +/* */ +/* */ public String getTableForm() { +/* 66 */ return this.tableForm; +/* */ } +/* */ +/* */ public void setTableForm(String tableForm) { +/* 70 */ this.tableForm = tableForm; +/* */ } +/* */ +/* */ +/* */ public void setId(Long id) { +/* 75 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 80 */ return this.id; +/* */ } +/* */ +/* */ public void setTablename(String tablename) { +/* 84 */ this.tablename = tablename; +/* */ } +/* */ +/* */ +/* */ public String getTablename() { +/* 89 */ return this.tablename; +/* */ } +/* */ +/* */ public void setShowname(String showname) { +/* 93 */ this.showname = showname; +/* */ } +/* */ +/* */ +/* */ public String getShowname() { +/* 98 */ return this.showname; +/* */ } +/* */ +/* */ public void setTableCode(String tableCode) { +/* 102 */ this.tableCode = tableCode; +/* */ } +/* */ +/* */ +/* */ public String getTableCode() { +/* 107 */ return this.tableCode; +/* */ } +/* */ +/* */ public void setShoworder(Long showorder) { +/* 111 */ this.showorder = showorder; +/* */ } +/* */ +/* */ +/* */ public Long getShoworder() { +/* 116 */ return this.showorder; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 120 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 125 */ return this.bz; +/* */ } +/* */ +/* */ public void setArchivetypeid(String archivetypeid) { +/* 129 */ this.archivetypeid = archivetypeid; +/* */ } +/* */ +/* */ +/* */ public String getArchivetypeid() { +/* 134 */ return this.archivetypeid; +/* */ } +/* */ +/* */ public void setArchivetypecode(String archivetypecode) { +/* 138 */ this.archivetypecode = archivetypecode; +/* */ } +/* */ +/* */ +/* */ public String getArchivetypecode() { +/* 143 */ return this.archivetypecode; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 148 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 149 */ .append("id", getId()) +/* 150 */ .append("tablename", getTablename()) +/* 151 */ .append("showname", getShowname()) +/* 152 */ .append("tableCode", getTableCode()) +/* 153 */ .append("showorder", getShoworder()) +/* 154 */ .append("bz", getBz()) +/* 155 */ .append("archivetypeid", getArchivetypeid()) +/* 156 */ .append("archivetypecode", getArchivetypecode()) +/* 157 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\physicaltable\domain\PhysicalTable.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/physicaltable/mapper/PhysicalTableMapper.java b/src/main/java/com/archive/project/dasz/physicaltable/mapper/PhysicalTableMapper.java new file mode 100644 index 0000000..e97635a --- /dev/null +++ b/src/main/java/com/archive/project/dasz/physicaltable/mapper/PhysicalTableMapper.java @@ -0,0 +1,28 @@ +package com.archive.project.dasz.physicaltable.mapper + +; + +import com.archive.project.dasz.physicaltable.domain.PhysicalTable; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface PhysicalTableMapper { + PhysicalTable selectPhysicalTableById(Long paramLong); + + List selectPhysicalTableList(PhysicalTable paramPhysicalTable); + + int insertPhysicalTable(PhysicalTable paramPhysicalTable); + + int updatePhysicalTable(PhysicalTable paramPhysicalTable); + + int deletePhysicalTableById(Long paramLong); + + int deletePhysicalTableByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\physicaltable\mapper\PhysicalTableMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/physicaltable/service/IPhysicalTableService.java b/src/main/java/com/archive/project/dasz/physicaltable/service/IPhysicalTableService.java new file mode 100644 index 0000000..a3beeb9 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/physicaltable/service/IPhysicalTableService.java @@ -0,0 +1,31 @@ +package com.archive.project.dasz.physicaltable.service + +-INF.classes.com.archive.project.dasz.physicaltable.service; + +import com.archive.project.dasz.physicaltable.domain.PhysicalTable; +import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +import java.util.List; + +public interface IPhysicalTableService { + PhysicalTable selectPhysicalTableById(Long paramLong); + + List selectPhysicalTableList(PhysicalTable paramPhysicalTable); + + int insertPhysicalTable(PhysicalTable paramPhysicalTable); + + int updatePhysicalTable(PhysicalTable paramPhysicalTable); + + int deletePhysicalTableByIds(String paramString); + + int deletePhysicalTableById(Long paramLong); + + void removeTableFormByColumnId(Long paramLong); + + List selectTableFormColumns(Long paramLong, List paramList); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\physicaltable\service\IPhysicalTableService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/physicaltable/service/impl/PhysicalTableServiceImpl.java b/src/main/java/com/archive/project/dasz/physicaltable/service/impl/PhysicalTableServiceImpl.java new file mode 100644 index 0000000..8272c81 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/physicaltable/service/impl/PhysicalTableServiceImpl.java @@ -0,0 +1,153 @@ +/* */ package com.archive.project.dasz.physicaltable.service.impl + +-INF.classes.com.archive.project.dasz.physicaltable.service.impl; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.dasz.physicaltable.domain.PhysicalTable; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; +/* */ import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import org.apache.commons.lang3.ArrayUtils; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class PhysicalTableServiceImpl +/* */ implements IPhysicalTableService +/* */ { +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ +/* */ public PhysicalTable selectPhysicalTableById(Long id) { +/* 41 */ return this.physicalTableMapper.selectPhysicalTableById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectPhysicalTableList(PhysicalTable physicalTable) { +/* 53 */ return this.physicalTableMapper.selectPhysicalTableList(physicalTable); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertPhysicalTable(PhysicalTable physicalTable) { +/* 65 */ return this.physicalTableMapper.insertPhysicalTable(physicalTable); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updatePhysicalTable(PhysicalTable physicalTable) { +/* 77 */ return this.physicalTableMapper.updatePhysicalTable(physicalTable); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deletePhysicalTableByIds(String ids) { +/* 89 */ return this.physicalTableMapper.deletePhysicalTableByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deletePhysicalTableById(Long id) { +/* 101 */ return this.physicalTableMapper.deletePhysicalTableById(id); +/* */ } +/* */ +/* */ +/* */ public void removeTableFormByColumnId(Long columnId) { +/* 106 */ PhysicalTableColumn physicalTableColumn = this.physicalTableColumnMapper.selectPhysicalTableColumnById(columnId); +/* 107 */ if (physicalTableColumn != null) { +/* 108 */ Long tableId = physicalTableColumn.getTableId(); +/* 109 */ String columnCode = physicalTableColumn.getColumnCode(); +/* 110 */ PhysicalTable physicalTable = this.physicalTableMapper.selectPhysicalTableById(tableId); +/* 111 */ if (physicalTable == null || StringUtils.isEmpty(physicalTable.getTableForm())) { +/* */ return; +/* */ } +/* 114 */ String tableForm = physicalTable.getTableForm(); +/* 115 */ String[] split = tableForm.split(","); +/* 116 */ split = (String[])ArrayUtils.removeElement((Object[])split, columnCode); +/* 117 */ tableForm = StringUtils.join((Object[])split, ","); +/* 118 */ PhysicalTable physicalTableTemp = new PhysicalTable(); +/* 119 */ physicalTableTemp.setId(tableId); +/* 120 */ physicalTableTemp.setTableForm(tableForm); +/* 121 */ this.physicalTableMapper.updatePhysicalTable(physicalTableTemp); +/* */ } +/* */ } +/* */ +/* */ +/* */ public List selectTableFormColumns(Long tableId, List tableColumnsList) { +/* 127 */ PhysicalTable physicalTable = this.physicalTableMapper.selectPhysicalTableById(tableId); +/* 128 */ String tableForm = physicalTable.getTableForm(); +/* 129 */ if (StringUtils.isNotEmpty(tableForm)) { +/* 130 */ String[] columns = tableForm.split(","); +/* 131 */ if (columns.length > 0) { +/* 132 */ List tableColumnsListTemp = new ArrayList<>(); +/* 133 */ for (String column : columns) { +/* 134 */ for (PhysicalTableColumn physicalTableColumn : tableColumnsList) { +/* 135 */ if (physicalTableColumn.getColumnCode().equals(column)) { +/* 136 */ tableColumnsListTemp.add(physicalTableColumn); +/* */ } +/* */ } +/* */ } +/* 140 */ tableColumnsList = tableColumnsListTemp; +/* */ } +/* */ } +/* 143 */ return tableColumnsList; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\physicaltable\service\impl\PhysicalTableServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/physicaltablecolumn/controller/PhysicalTableColumnController.java b/src/main/java/com/archive/project/dasz/physicaltablecolumn/controller/PhysicalTableColumnController.java new file mode 100644 index 0000000..0ed51ef --- /dev/null +++ b/src/main/java/com/archive/project/dasz/physicaltablecolumn/controller/PhysicalTableColumnController.java @@ -0,0 +1,212 @@ +/* */ package com.archive.project.dasz.physicaltablecolumn.controller + +-INF.classes.com.archive.project.dasz.physicaltablecolumn.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +/* */ import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/physicaltablecolumn"}) +/* */ public class PhysicalTableColumnController +/* */ extends BaseController +/* */ { +/* 37 */ private String prefix = "dasz/physicaltablecolumn"; +/* */ +/* */ @Autowired +/* */ private IPhysicalTableColumnService physicalTableColumnService; +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltablecolumn:view"}) +/* */ @GetMapping +/* */ public String physicalTableColumn(ModelMap mmap) { +/* 52 */ DictType dictType = new DictType(); +/* 53 */ dictType.setLabel("column_bind"); +/* 54 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 55 */ mmap.put("dictList", list); +/* 56 */ return this.prefix + "/physicaltablecolumn"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltablecolumn:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(PhysicalTableColumn physicalTableColumn) { +/* 67 */ startPage(); +/* 68 */ List list = this.physicalTableColumnService.selectPhysicalTableColumnList(physicalTableColumn); +/* 69 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltablecolumn:export"}) +/* */ @Log(title = "物理字段", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(PhysicalTableColumn physicalTableColumn) { +/* 81 */ List list = this.physicalTableColumnService.selectPhysicalTableColumnList(physicalTableColumn); +/* 82 */ ExcelUtil util = new ExcelUtil(PhysicalTableColumn.class); +/* 83 */ return util.exportExcel(list, "physicalTableColumn"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add/{tableId}"}) +/* */ public String add(@PathVariable("tableId") String tableId, ModelMap mmap) { +/* 92 */ DictType dictType = new DictType(); +/* 93 */ dictType.setLabel("column_bind"); +/* 94 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 95 */ mmap.put("dictList", list); +/* 96 */ mmap.put("tableId", tableId); +/* 97 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltablecolumn:add"}) +/* */ @Log(title = "物理字段", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(PhysicalTableColumn physicalTableColumn) { +/* */ try { +/* 110 */ this.physicalTableColumnService.insertPhysicalTableColumn(physicalTableColumn, false); +/* 111 */ return toAjax(true); +/* 112 */ } catch (Exception e) { +/* 113 */ e.printStackTrace(); +/* 114 */ return toAjax(false); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 124 */ PhysicalTableColumn physicalTableColumn = this.physicalTableColumnService.selectPhysicalTableColumnById(id); +/* 125 */ mmap.put("physicalTableColumn", physicalTableColumn); +/* 126 */ DictType dictType = new DictType(); +/* 127 */ dictType.setLabel("column_bind"); +/* 128 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 129 */ mmap.put("dictList", list); +/* 130 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltablecolumn:edit"}) +/* */ @Log(title = "物理字段", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(PhysicalTableColumn physicalTableColumn) { +/* */ try { +/* 143 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 144 */ this.physicalTableColumnService.updatePhysicalTableColumn(physicalTableColumn); +/* */ } +/* 146 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 147 */ this.physicalTableColumnService.updatePhysicalTableColumnSqlite(physicalTableColumn); +/* */ } +/* 149 */ return toAjax(true); +/* 150 */ } catch (Exception e) { +/* 151 */ e.printStackTrace(); +/* 152 */ return toAjax(false); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:physicaltablecolumn:remove"}) +/* */ @Log(title = "物理字段", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* */ try { +/* 167 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 168 */ this.physicalTableColumnService.deletePhysicalTableColumnByIds(ids); +/* */ } +/* 170 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 171 */ this.physicalTableColumnService.deletePhysicalTableColumnByIdsSqlLite(ids); +/* */ } +/* */ +/* 174 */ return toAjax(true); +/* 175 */ } catch (Exception e) { +/* 176 */ e.printStackTrace(); +/* 177 */ return toAjax(false); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/updateSetStatus/{id}/{type}/{status}"}) +/* */ @ResponseBody +/* */ public AjaxResult updateSetStatus(@PathVariable("id") Long id, @PathVariable("type") String type, @PathVariable("status") Long status) { +/* */ try { +/* 197 */ this.physicalTableColumnService.updateSetStatus(id, type, status); +/* 198 */ return toAjax(true); +/* 199 */ } catch (Exception e) { +/* 200 */ e.printStackTrace(); +/* 201 */ return toAjax(false); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\physicaltablecolumn\controller\PhysicalTableColumnController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/physicaltablecolumn/domain/PhysicalTableColumn.java b/src/main/java/com/archive/project/dasz/physicaltablecolumn/domain/PhysicalTableColumn.java new file mode 100644 index 0000000..c672cc1 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/physicaltablecolumn/domain/PhysicalTableColumn.java @@ -0,0 +1,249 @@ +/* */ package com.archive.project.dasz.physicaltablecolumn.domain + +-INF.classes.com.archive.project.dasz.physicaltablecolumn.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PhysicalTableColumn +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "字段显示名称") +/* */ private String columnName; +/* */ @Excel(name = "字段名称") +/* */ private String columnCode; +/* */ @Excel(name = "字段长度") +/* */ private Long columnLength; +/* */ @Excel(name = "字段类型", readConverterExp = "数=字、日期、文本") +/* */ private String columnType; +/* */ @Excel(name = "字段绑定编码") +/* */ private String columnCodetype; +/* */ @Excel(name = "显示类型") +/* */ private String showType; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "排序项(0:否 1:是)") +/* */ private Long pxx; +/* */ @Excel(name = "列表项(0:否 1:是)") +/* */ private Long lbx; +/* */ @Excel(name = "界面项(0:否 1:是)") +/* */ private Long jmx; +/* */ @Excel(name = "检索项(0:否 1:是)") +/* */ private Long jsx; +/* */ @Excel(name = "必输项(0:否 1:是)") +/* */ private Long bsx; +/* */ @Excel(name = "默认值") +/* */ private String mrz; +/* */ @Excel(name = "所属物理表id") +/* */ private Long tableId; +/* */ @Excel(name = "检索方式(0:包含 1:等于 2:大于 3:小于 4:大于等于 5:小于等于 6:区间)") +/* */ private Long jsfs; +/* */ +/* */ public void setId(Long id) { +/* 83 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 88 */ return this.id; +/* */ } +/* */ +/* */ public void setColumnName(String columnName) { +/* 92 */ this.columnName = columnName; +/* */ } +/* */ +/* */ +/* */ public String getColumnName() { +/* 97 */ return this.columnName; +/* */ } +/* */ +/* */ public void setColumnCode(String columnCode) { +/* 101 */ this.columnCode = columnCode; +/* */ } +/* */ +/* */ +/* */ public String getColumnCode() { +/* 106 */ return this.columnCode; +/* */ } +/* */ +/* */ public void setColumnLength(Long columnLength) { +/* 110 */ this.columnLength = columnLength; +/* */ } +/* */ +/* */ +/* */ public Long getColumnLength() { +/* 115 */ return this.columnLength; +/* */ } +/* */ +/* */ public void setColumnType(String columnType) { +/* 119 */ this.columnType = columnType; +/* */ } +/* */ +/* */ +/* */ public String getColumnType() { +/* 124 */ return this.columnType; +/* */ } +/* */ +/* */ public void setColumnCodetype(String columnCodetype) { +/* 128 */ this.columnCodetype = columnCodetype; +/* */ } +/* */ +/* */ +/* */ public String getColumnCodetype() { +/* 133 */ return this.columnCodetype; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 137 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 142 */ return this.bz; +/* */ } +/* */ +/* */ public void setPxx(Long pxx) { +/* 146 */ this.pxx = pxx; +/* */ } +/* */ +/* */ +/* */ public Long getPxx() { +/* 151 */ return this.pxx; +/* */ } +/* */ +/* */ public void setLbx(Long lbx) { +/* 155 */ this.lbx = lbx; +/* */ } +/* */ +/* */ +/* */ public Long getLbx() { +/* 160 */ return this.lbx; +/* */ } +/* */ +/* */ public void setJmx(Long jmx) { +/* 164 */ this.jmx = jmx; +/* */ } +/* */ +/* */ +/* */ public Long getJmx() { +/* 169 */ return this.jmx; +/* */ } +/* */ +/* */ public void setJsx(Long jsx) { +/* 173 */ this.jsx = jsx; +/* */ } +/* */ +/* */ +/* */ public Long getJsx() { +/* 178 */ return this.jsx; +/* */ } +/* */ +/* */ public void setMrz(String mrz) { +/* 182 */ this.mrz = mrz; +/* */ } +/* */ +/* */ +/* */ public String getMrz() { +/* 187 */ return this.mrz; +/* */ } +/* */ +/* */ public void setTableId(Long tableId) { +/* 191 */ this.tableId = tableId; +/* */ } +/* */ +/* */ +/* */ public Long getTableId() { +/* 196 */ return this.tableId; +/* */ } +/* */ +/* */ public String getShowType() { +/* 200 */ return this.showType; +/* */ } +/* */ +/* */ public void setShowType(String showType) { +/* 204 */ this.showType = showType; +/* */ } +/* */ +/* */ public Long getBsx() { +/* 208 */ return this.bsx; +/* */ } +/* */ +/* */ public void setBsx(Long bsx) { +/* 212 */ this.bsx = bsx; +/* */ } +/* */ +/* */ public Long getJsfs() { +/* 216 */ return this.jsfs; +/* */ } +/* */ +/* */ public void setJsfs(Long jsfs) { +/* 220 */ this.jsfs = jsfs; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 225 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 226 */ .append("id", getId()) +/* 227 */ .append("columnName", getColumnName()) +/* 228 */ .append("columnCode", getColumnCode()) +/* 229 */ .append("columnLength", getColumnLength()) +/* 230 */ .append("columnType", getColumnType()) +/* 231 */ .append("columnCodetype", getColumnCodetype()) +/* 232 */ .append("bz", getBz()) +/* 233 */ .append("pxx", getPxx()) +/* 234 */ .append("lbx", getLbx()) +/* 235 */ .append("jmx", getJmx()) +/* 236 */ .append("jsx", getJsx()) +/* 237 */ .append("mrz", getMrz()) +/* 238 */ .append("tableId", getTableId()) +/* 239 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\physicaltablecolumn\domain\PhysicalTableColumn.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/physicaltablecolumn/mapper/PhysicalTableColumnMapper.java b/src/main/java/com/archive/project/dasz/physicaltablecolumn/mapper/PhysicalTableColumnMapper.java new file mode 100644 index 0000000..f05c2c3 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/physicaltablecolumn/mapper/PhysicalTableColumnMapper.java @@ -0,0 +1,30 @@ +package com.archive.project.dasz.physicaltablecolumn.mapper + +-INF.classes.com.archive.project.dasz.physicaltablecolumn.mapper; + +import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface PhysicalTableColumnMapper { + PhysicalTableColumn selectPhysicalTableColumnById(Long paramLong); + + List selectPhysicalTableColumnListSqlLite(PhysicalTableColumn paramPhysicalTableColumn); + + List selectPhysicalTableColumnListMysql(PhysicalTableColumn paramPhysicalTableColumn); + + int insertPhysicalTableColumn(PhysicalTableColumn paramPhysicalTableColumn); + + int updatePhysicalTableColumn(PhysicalTableColumn paramPhysicalTableColumn); + + int deletePhysicalTableColumnById(Long paramLong); + + int deletePhysicalTableColumnByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\physicaltablecolumn\mapper\PhysicalTableColumnMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/physicaltablecolumn/service/IPhysicalTableColumnService.java b/src/main/java/com/archive/project/dasz/physicaltablecolumn/service/IPhysicalTableColumnService.java new file mode 100644 index 0000000..a233c68 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/physicaltablecolumn/service/IPhysicalTableColumnService.java @@ -0,0 +1,34 @@ +package com.archive.project.dasz.physicaltablecolumn.service + +-INF.classes.com.archive.project.dasz.physicaltablecolumn.service; + +import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +import java.util.List; + +public interface IPhysicalTableColumnService { + PhysicalTableColumn selectPhysicalTableColumnById(Long paramLong); + + List selectPhysicalTableColumnList(PhysicalTableColumn paramPhysicalTableColumn); + + void insertPhysicalTableColumn(PhysicalTableColumn paramPhysicalTableColumn, boolean paramBoolean) throws Exception; + + void updatePhysicalTableColumn(PhysicalTableColumn paramPhysicalTableColumn) throws Exception; + + void updatePhysicalTableColumnSqlite(PhysicalTableColumn paramPhysicalTableColumn) throws Exception; + + void deletePhysicalTableColumnByIds(String paramString) throws Exception; + + void deletePhysicalTableColumnByIdsSqlLite(String paramString) throws Exception; + + int deletePhysicalTableColumnById(Long paramLong); + + void updateSetStatus(Long paramLong1, String paramString, Long paramLong2) throws Exception; + + String getColumnCodeByTableIdAndShowName(String paramString, long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\physicaltablecolumn\service\IPhysicalTableColumnService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/physicaltablecolumn/service/impl/PhysicalTableColumnServiceImpl.java b/src/main/java/com/archive/project/dasz/physicaltablecolumn/service/impl/PhysicalTableColumnServiceImpl.java new file mode 100644 index 0000000..8ced880 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/physicaltablecolumn/service/impl/PhysicalTableColumnServiceImpl.java @@ -0,0 +1,310 @@ +/* */ package com.archive.project.dasz.physicaltablecolumn.service.impl; +/* */ +/* */ import com.archive.common.archiveUtil.SqlLiteUtil; +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; +/* */ import com.archive.project.dasz.physicaltablecolumn.domain.PhysicalTableColumn; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class PhysicalTableColumnServiceImpl +/* */ implements IPhysicalTableColumnService +/* */ { +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private IPhysicalTableService physicalTableService; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public PhysicalTableColumn selectPhysicalTableColumnById(Long id) { +/* 51 */ return this.physicalTableColumnMapper.selectPhysicalTableColumnById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectPhysicalTableColumnList(PhysicalTableColumn physicalTableColumn) { +/* 63 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 64 */ return this.physicalTableColumnMapper.selectPhysicalTableColumnListMysql(physicalTableColumn); +/* */ } +/* 66 */ return this.physicalTableColumnMapper.selectPhysicalTableColumnListSqlLite(physicalTableColumn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void insertPhysicalTableColumn(PhysicalTableColumn physicalTableColumn, boolean isCreatArchiveType) throws Exception { +/* 81 */ if (!isCreatArchiveType) { +/* 82 */ String tableName = TableUtil.getTableName(physicalTableColumn.getTableId()); +/* 83 */ String sql = "ALTER TABLE " + tableName + " ADD COLUMN `" + physicalTableColumn.getColumnCode() + "` "; +/* */ +/* 85 */ String columnType = physicalTableColumn.getColumnType(); +/* 86 */ switch (columnType) { +/* */ case "D": +/* 88 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 89 */ columnType = " varchar(" + physicalTableColumn.getColumnLength() + ") "; break; +/* 90 */ } if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 91 */ columnType = " text(" + physicalTableColumn.getColumnLength() + ") "; +/* */ } +/* */ break; +/* */ case "S": +/* 95 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 96 */ columnType = " varchar(" + physicalTableColumn.getColumnLength() + ") "; break; +/* 97 */ } if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 98 */ columnType = " text(" + physicalTableColumn.getColumnLength() + ") "; +/* */ } +/* */ break; +/* */ case "C": +/* 102 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 103 */ columnType = " int "; break; +/* 104 */ } if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 105 */ columnType = " INTEGER "; +/* */ } +/* */ break; +/* */ } +/* 109 */ sql = sql + columnType; +/* 110 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 111 */ if (StringUtils.isEmpty(physicalTableColumn.getMrz())) { +/* 112 */ sql = sql + " COMMENT '" + physicalTableColumn.getColumnName() + "'"; +/* */ } else { +/* 114 */ sql = sql + " DEFAULT '" + physicalTableColumn.getMrz() + "' COMMENT '" + physicalTableColumn.getColumnName() + "'"; +/* */ } +/* 116 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* */ +/* 118 */ if (StringUtils.isNotEmpty(physicalTableColumn.getMrz())) { +/* 119 */ sql = sql + " DEFAULT '" + physicalTableColumn.getMrz() + "'"; +/* */ } +/* */ } +/* */ +/* 123 */ this.executeSqlService.jdbcTemplateExecute(sql); +/* */ } +/* 125 */ this.physicalTableColumnMapper.insertPhysicalTableColumn(physicalTableColumn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void updatePhysicalTableColumn(PhysicalTableColumn physicalTableColumn) throws Exception { +/* 138 */ String tableName = TableUtil.getTableName(physicalTableColumn.getTableId()); +/* 139 */ String sql = "ALTER TABLE " + tableName + " MODIFY COLUMN " + physicalTableColumn.getColumnCode(); +/* */ +/* 141 */ String columnType = physicalTableColumn.getColumnType(); +/* 142 */ switch (columnType) { +/* */ case "D": +/* 144 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 145 */ columnType = " varchar(" + physicalTableColumn.getColumnLength() + ") "; +/* */ } +/* */ break; +/* */ case "S": +/* 149 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 150 */ columnType = " varchar(" + physicalTableColumn.getColumnLength() + ") "; break; +/* 151 */ } if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 152 */ columnType = " text(" + physicalTableColumn.getColumnLength() + ") "; +/* */ } +/* */ break; +/* */ case "C": +/* 156 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 157 */ columnType = " int "; break; +/* 158 */ } if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 159 */ columnType = " INTEGER "; +/* */ } +/* */ break; +/* */ } +/* 163 */ sql = sql + columnType; +/* 164 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 165 */ if (StringUtils.isEmpty(physicalTableColumn.getMrz())) { +/* 166 */ sql = sql + " COMMENT '" + physicalTableColumn.getColumnName() + "'"; +/* */ } else { +/* 168 */ sql = sql + " DEFAULT '" + physicalTableColumn.getMrz() + "' COMMENT '" + physicalTableColumn.getColumnName() + "'"; +/* */ } +/* */ } +/* 171 */ this.executeSqlService.jdbcTemplateExecute(sql); +/* 172 */ this.physicalTableColumnMapper.updatePhysicalTableColumn(physicalTableColumn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void updatePhysicalTableColumnSqlite(PhysicalTableColumn physicalTableColumn) throws Exception { +/* 186 */ String tableName = TableUtil.getTableName(physicalTableColumn.getTableId()); +/* */ +/* */ +/* */ +/* */ +/* 191 */ PhysicalTableColumn ptc = this.physicalTableColumnMapper.selectPhysicalTableColumnById(physicalTableColumn.getId()); +/* 192 */ String newType = ""; +/* 193 */ String newMrz = ""; +/* */ +/* 195 */ if (!physicalTableColumn.getColumnType().equals(ptc.getColumnType())) +/* */ { +/* 197 */ if (physicalTableColumn.getColumnType().equals("C")) { +/* 198 */ newType = "INTEGER"; +/* */ } else { +/* 200 */ newType = "TEXT"; +/* */ } +/* */ } +/* */ +/* 204 */ if (!physicalTableColumn.getMrz().equals(ptc.getMrz())) +/* */ { +/* 206 */ newMrz = ptc.getMrz(); +/* */ } +/* */ +/* 209 */ if (!newType.equals("") || !newMrz.equals("")) { +/* 210 */ SqlLiteUtil.updateColumnType(tableName, physicalTableColumn.getColumnType(), physicalTableColumn.getColumnCode(), newMrz); +/* */ } +/* 212 */ this.physicalTableColumnMapper.updatePhysicalTableColumn(physicalTableColumn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void deletePhysicalTableColumnByIds(String ids) throws Exception { +/* 224 */ Long id = Long.valueOf(Long.parseLong(ids)); +/* 225 */ PhysicalTableColumn physicalTableColumn = this.physicalTableColumnMapper.selectPhysicalTableColumnById(id); +/* 226 */ String tableName = TableUtil.getTableName(physicalTableColumn.getTableId()); +/* 227 */ String columnCode = physicalTableColumn.getColumnCode(); +/* 228 */ String sql = "ALTER TABLE " + tableName + " DROP COLUMN " + columnCode; +/* 229 */ this.executeSqlService.jdbcTemplateExecute(sql); +/* 230 */ this.physicalTableColumnMapper.deletePhysicalTableColumnByIds(Convert.toStrArray(ids)); +/* */ +/* */ +/* 233 */ for (String colId : Convert.toStrArray(ids)) { +/* 234 */ this.physicalTableService.removeTableFormByColumnId(Long.valueOf(Long.parseLong(colId))); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void deletePhysicalTableColumnByIdsSqlLite(String ids) throws Exception { +/* 248 */ Long id = Long.valueOf(Long.parseLong(ids)); +/* 249 */ PhysicalTableColumn physicalTableColumn = this.physicalTableColumnMapper.selectPhysicalTableColumnById(id); +/* 250 */ String tableName = TableUtil.getTableName(physicalTableColumn.getTableId()); +/* 251 */ String columnCode = physicalTableColumn.getColumnCode(); +/* 252 */ SqlLiteUtil.deleteColumn(tableName, columnCode); +/* */ +/* 254 */ this.physicalTableColumnMapper.deletePhysicalTableColumnByIds(Convert.toStrArray(ids)); +/* */ +/* */ +/* 257 */ for (String colId : Convert.toStrArray(ids)) { +/* 258 */ this.physicalTableService.removeTableFormByColumnId(Long.valueOf(Long.parseLong(colId))); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deletePhysicalTableColumnById(Long id) { +/* 271 */ return this.physicalTableColumnMapper.deletePhysicalTableColumnById(id); +/* */ } +/* */ +/* */ +/* */ @Transactional +/* */ public void updateSetStatus(Long id, String type, Long status) throws Exception { +/* 277 */ String sql = "update t_xtpz_physical_table_column set " + type + " = " + status + " where id = " + id; +/* 278 */ this.executeSqlService.jdbcTemplateExecute(sql); +/* */ +/* 280 */ if ("jmx".equals(type) && status.longValue() == 0L) { +/* 281 */ this.physicalTableService.removeTableFormByColumnId(id); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getColumnCodeByTableIdAndShowName(String columnShowName, long tableId) { +/* 294 */ String res = ""; +/* 295 */ PhysicalTableColumn physicalTableColumn = new PhysicalTableColumn(); +/* 296 */ physicalTableColumn.setTableId(Long.valueOf(tableId)); +/* 297 */ physicalTableColumn.setColumnName(columnShowName); +/* 298 */ List list = selectPhysicalTableColumnList(physicalTableColumn); +/* 299 */ if (list.size() > 0 && list.get(0) != null) { +/* 300 */ res = ((PhysicalTableColumn)list.get(0)).getColumnCode(); +/* */ } +/* 302 */ return res; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\physicaltablecolumn\service\impl\PhysicalTableColumnServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/qzgl/controller/TPsFondsCodeController.java b/src/main/java/com/archive/project/dasz/qzgl/controller/TPsFondsCodeController.java new file mode 100644 index 0000000..6ec7167 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/qzgl/controller/TPsFondsCodeController.java @@ -0,0 +1,134 @@ +/* */ package com.archive.project.dasz.qzgl.controller + +-INF.classes.com.archive.project.dasz.qzgl.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.qzgl.domain.TPsFondsCode; +/* */ import com.archive.project.dasz.qzgl.service.ITPsFondsCodeService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dasz/qzgl"}) +/* */ public class TPsFondsCodeController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "dasz/qzgl"; +/* */ +/* */ @Autowired +/* */ private ITPsFondsCodeService tPsFondsCodeService; +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:qzgl:view"}) +/* */ @GetMapping +/* */ public String qzgl() { +/* 41 */ return this.prefix + "/qzgl"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:qzgl:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(TPsFondsCode tPsFondsCode) { +/* 52 */ startPage(); +/* 53 */ List list = this.tPsFondsCodeService.selectTPsFondsCodeList(tPsFondsCode); +/* 54 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:qzgl:export"}) +/* */ @Log(title = "全宗管理", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TPsFondsCode tPsFondsCode) { +/* 66 */ List list = this.tPsFondsCodeService.selectTPsFondsCodeList(tPsFondsCode); +/* 67 */ ExcelUtil util = new ExcelUtil(TPsFondsCode.class); +/* 68 */ return util.exportExcel(list, "qzgl"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 77 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:qzgl:add"}) +/* */ @Log(title = "全宗管理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TPsFondsCode tPsFondsCode) { +/* 89 */ return toAjax(this.tPsFondsCodeService.insertTPsFondsCode(tPsFondsCode)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 98 */ TPsFondsCode tPsFondsCode = this.tPsFondsCodeService.selectTPsFondsCodeById(id); +/* 99 */ mmap.put("tPsFondsCode", tPsFondsCode); +/* 100 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:qzgl:edit"}) +/* */ @Log(title = "全宗管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TPsFondsCode tPsFondsCode) { +/* 112 */ return toAjax(this.tPsFondsCodeService.updateTPsFondsCode(tPsFondsCode)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dasz:qzgl:remove"}) +/* */ @Log(title = "全宗管理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 124 */ return toAjax(this.tPsFondsCodeService.deleteTPsFondsCodeByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\qzgl\controller\TPsFondsCodeController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/qzgl/domain/TPsFondsCode.java b/src/main/java/com/archive/project/dasz/qzgl/domain/TPsFondsCode.java new file mode 100644 index 0000000..f7570ce --- /dev/null +++ b/src/main/java/com/archive/project/dasz/qzgl/domain/TPsFondsCode.java @@ -0,0 +1,129 @@ +/* */ package com.archive.project.dasz.qzgl.domain + +-INF.classes.com.archive.project.dasz.qzgl.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TPsFondsCode +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "全宗号") +/* */ private String fondscode; +/* */ @Excel(name = "全宗名称") +/* */ private String fondsname; +/* */ @Excel(name = "关联组织") +/* */ private String glzz; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "关联档案") +/* */ private String glda; +/* */ @Excel(name = "备用字段") +/* */ private String by1; +/* */ +/* */ public void setId(Long id) { +/* 47 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 52 */ return this.id; +/* */ } +/* */ +/* */ public void setFondscode(String fondscode) { +/* 56 */ this.fondscode = fondscode; +/* */ } +/* */ +/* */ +/* */ public String getFondscode() { +/* 61 */ return this.fondscode; +/* */ } +/* */ +/* */ public void setFondsname(String fondsname) { +/* 65 */ this.fondsname = fondsname; +/* */ } +/* */ +/* */ +/* */ public String getFondsname() { +/* 70 */ return this.fondsname; +/* */ } +/* */ +/* */ public void setGlzz(String glzz) { +/* 74 */ this.glzz = glzz; +/* */ } +/* */ +/* */ +/* */ public String getGlzz() { +/* 79 */ return this.glzz; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 83 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 88 */ return this.bz; +/* */ } +/* */ +/* */ public void setGlda(String glda) { +/* 92 */ this.glda = glda; +/* */ } +/* */ +/* */ +/* */ public String getGlda() { +/* 97 */ return this.glda; +/* */ } +/* */ +/* */ public void setBy(String by1) { +/* 101 */ this.by1 = by1; +/* */ } +/* */ +/* */ +/* */ public String getBy1() { +/* 106 */ return this.by1; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 111 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 112 */ .append("id", getId()) +/* 113 */ .append("fondscode", getFondscode()) +/* 114 */ .append("fondsname", getFondsname()) +/* 115 */ .append("glzz", getGlzz()) +/* 116 */ .append("bz", getBz()) +/* 117 */ .append("glda", getGlda()) +/* 118 */ .append("by1", getBy1()) +/* 119 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\qzgl\domain\TPsFondsCode.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/qzgl/mapper/TPsFondsCodeMapper.java b/src/main/java/com/archive/project/dasz/qzgl/mapper/TPsFondsCodeMapper.java new file mode 100644 index 0000000..35486bd --- /dev/null +++ b/src/main/java/com/archive/project/dasz/qzgl/mapper/TPsFondsCodeMapper.java @@ -0,0 +1,30 @@ +package com.archive.project.dasz.qzgl.mapper + +-INF.classes.com.archive.project.dasz.qzgl.mapper; + +import com.archive.project.dasz.qzgl.domain.TPsFondsCode; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface TPsFondsCodeMapper { + TPsFondsCode selectTPsFondsCodeById(Long paramLong); + + List selectTPsFondsCodeList(TPsFondsCode paramTPsFondsCode); + + List selectTPsFondsCodeListSqlite(TPsFondsCode paramTPsFondsCode); + + int insertTPsFondsCode(TPsFondsCode paramTPsFondsCode); + + int updateTPsFondsCode(TPsFondsCode paramTPsFondsCode); + + int deleteTPsFondsCodeById(Long paramLong); + + int deleteTPsFondsCodeByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\qzgl\mapper\TPsFondsCodeMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/qzgl/service/ITPsFondsCodeService.java b/src/main/java/com/archive/project/dasz/qzgl/service/ITPsFondsCodeService.java new file mode 100644 index 0000000..3b9af5d --- /dev/null +++ b/src/main/java/com/archive/project/dasz/qzgl/service/ITPsFondsCodeService.java @@ -0,0 +1,26 @@ +package com.archive.project.dasz.qzgl.service + +-INF.classes.com.archive.project.dasz.qzgl.service; + +import com.archive.project.dasz.qzgl.domain.TPsFondsCode; +import java.util.List; + +public interface ITPsFondsCodeService { + TPsFondsCode selectTPsFondsCodeById(Long paramLong); + + List selectTPsFondsCodeList(TPsFondsCode paramTPsFondsCode); + + int insertTPsFondsCode(TPsFondsCode paramTPsFondsCode); + + int updateTPsFondsCode(TPsFondsCode paramTPsFondsCode); + + int deleteTPsFondsCodeByIds(String paramString); + + int deleteTPsFondsCodeById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\qzgl\service\ITPsFondsCodeService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dasz/qzgl/service/impl/TPsFondsCodeServiceImpl.java b/src/main/java/com/archive/project/dasz/qzgl/service/impl/TPsFondsCodeServiceImpl.java new file mode 100644 index 0000000..497a8f1 --- /dev/null +++ b/src/main/java/com/archive/project/dasz/qzgl/service/impl/TPsFondsCodeServiceImpl.java @@ -0,0 +1,116 @@ +/* */ package com.archive.project.dasz.qzgl.service.impl + +-INF.classes.com.archive.project.dasz.qzgl.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.dasz.qzgl.domain.TPsFondsCode; +/* */ import com.archive.project.dasz.qzgl.mapper.TPsFondsCodeMapper; +/* */ import com.archive.project.dasz.qzgl.service.ITPsFondsCodeService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TPsFondsCodeServiceImpl +/* */ implements ITPsFondsCodeService +/* */ { +/* */ @Autowired +/* */ private TPsFondsCodeMapper tPsFondsCodeMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public TPsFondsCode selectTPsFondsCodeById(Long id) { +/* 37 */ return this.tPsFondsCodeMapper.selectTPsFondsCodeById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTPsFondsCodeList(TPsFondsCode tPsFondsCode) { +/* 50 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 51 */ return this.tPsFondsCodeMapper.selectTPsFondsCodeList(tPsFondsCode); +/* */ } +/* 53 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 54 */ return this.tPsFondsCodeMapper.selectTPsFondsCodeListSqlite(tPsFondsCode); +/* */ } +/* 56 */ return this.tPsFondsCodeMapper.selectTPsFondsCodeList(tPsFondsCode); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTPsFondsCode(TPsFondsCode tPsFondsCode) { +/* 70 */ return this.tPsFondsCodeMapper.insertTPsFondsCode(tPsFondsCode); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTPsFondsCode(TPsFondsCode tPsFondsCode) { +/* 82 */ return this.tPsFondsCodeMapper.updateTPsFondsCode(tPsFondsCode); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTPsFondsCodeByIds(String ids) { +/* 94 */ return this.tPsFondsCodeMapper.deleteTPsFondsCodeByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTPsFondsCodeById(Long id) { +/* 106 */ return this.tPsFondsCodeMapper.deleteTPsFondsCodeById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\qzgl\service\impl\TPsFondsCodeServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/dagl/controller/DaglController.java b/src/main/java/com/archive/project/dazl/dagl/controller/DaglController.java new file mode 100644 index 0000000..93bffed --- /dev/null +++ b/src/main/java/com/archive/project/dazl/dagl/controller/DaglController.java @@ -0,0 +1,173 @@ +/* */ package com.archive.project.dazl.dagl.controller + +; +/* */ +/* */ import com.archive.common.utils.file.FileUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dazl.dagl.service.IDaglService; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.io.OutputStream; +/* */ import java.util.HashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.RequestParam; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dazl/dagl"}) +/* */ public class DaglController +/* */ extends BaseController +/* */ { +/* */ @Autowired +/* */ private IArchiveTypeService archiveTypeService; +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ @Autowired +/* */ private IDaglService daglService; +/* */ @Autowired +/* */ private IConfigService configService; +/* 67 */ private String prefix = "dazl/dagl"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:dagl:view"}) +/* */ @GetMapping +/* */ public String dagl(ModelMap mmap) { +/* 76 */ List ztrees = this.archiveTypeService.archiveCollationTreeData(); +/* 77 */ if (ztrees != null && ztrees.size() > 2) { +/* 78 */ mmap.put("firstNode", ztrees.get(1)); +/* */ } else { +/* 80 */ mmap.put("firstNode", null); +/* */ } +/* */ +/* */ +/* 84 */ DictType dictType = new DictType(); dictType.setLabel("column_bind"); +/* 85 */ List dictTypeList = this.dictTypeService.selectDictTypeList(dictType); +/* 86 */ Map> dictDataMap = new HashMap<>(); +/* 87 */ for (DictType dictTypeTemp : dictTypeList) { +/* 88 */ List dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); +/* 89 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); +/* */ } +/* 91 */ mmap.put("dictDataMap", dictDataMap); +/* 92 */ return this.prefix + "/dagl"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "档案整理-退回接收库", businessType = BusinessType.THJSK) +/* */ @PostMapping({"/thjsk"}) +/* */ @ResponseBody +/* */ public AjaxResult thjsk(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) { +/* 109 */ boolean flag = false; +/* */ try { +/* 111 */ flag = this.daglService.thjsk(query, archiveTypeId, type, ids); +/* 112 */ } catch (Exception ex) { +/* 113 */ System.out.println("退回接收库出现异常:" + ex.getMessage()); +/* 114 */ return error("退回接收库失败!"); +/* */ } +/* 116 */ if (flag) { +/* 117 */ return success("退回接收库成功!"); +/* */ } +/* 119 */ return error("退回接收库失败!"); +/* */ } +/* */ +/* */ +/* */ @Log(title = "档案整理-编目打印", businessType = BusinessType.BMDY) +/* */ @PostMapping({"/bmdy"}) +/* */ public void bmdy(@RequestParam Map formData, @Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids, HttpServletResponse response) { +/* 126 */ String path = ""; +/* 127 */ path = this.daglService.bmdyData(query, archiveTypeId, type, ids); +/* 128 */ response.setContentType("application/octet-stream"); +/* */ try { +/* 130 */ FileUtils.setAttachmentResponseHeader(response, (new File(path)).getName()); +/* 131 */ FileUtils.writeBytes(path, (OutputStream)response.getOutputStream()); +/* 132 */ } catch (IOException e) { +/* 133 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/folderFile/{archiveId}/{id}"}) +/* */ public String folderFile(@PathVariable("archiveId") String archiveId, @PathVariable("id") String id, ModelMap mmap) { +/* 152 */ mmap.put("archiveId", archiveId); +/* 153 */ mmap.put("folderId", id); +/* */ +/* 155 */ DictType dictType = new DictType(); dictType.setLabel("column_bind"); +/* 156 */ List dictTypeList = this.dictTypeService.selectDictTypeList(dictType); +/* 157 */ Map> dictDataMap = new HashMap<>(); +/* 158 */ for (DictType dictTypeTemp : dictTypeList) { +/* 159 */ List dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); +/* 160 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); +/* */ } +/* 162 */ mmap.put("dictDataMap", dictDataMap); +/* 163 */ return this.prefix + "/dajn"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dagl\controller\DaglController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/dagl/mapper/DaglMapper.java b/src/main/java/com/archive/project/dazl/dagl/mapper/DaglMapper.java new file mode 100644 index 0000000..c031a3b --- /dev/null +++ b/src/main/java/com/archive/project/dazl/dagl/mapper/DaglMapper.java @@ -0,0 +1,14 @@ +package com.archive.project.dazl.dagl.mapper + +-INF.classes.com.archive.project.dazl.dagl.mapper; + +import org.springframework.stereotype.Repository; + +@Repository +public interface DaglMapper {} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dagl\mapper\DaglMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/dagl/service/IDaglService.java b/src/main/java/com/archive/project/dazl/dagl/service/IDaglService.java new file mode 100644 index 0000000..9f50839 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/dagl/service/IDaglService.java @@ -0,0 +1,13 @@ +package com.archive.project.dazl.dagl.service-INF.classes.com.archive.project.dazl.dagl.service; + +public interface IDaglService { + boolean thjsk(String paramString1, String paramString2, String paramString3, String paramString4); + + String bmdyData(String paramString1, String paramString2, String paramString3, String paramString4); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dagl\service\IDaglService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/dagl/service/impl/DaglServiceImpl.java b/src/main/java/com/archive/project/dazl/dagl/service/impl/DaglServiceImpl.java new file mode 100644 index 0000000..b9e9723 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/dagl/service/impl/DaglServiceImpl.java @@ -0,0 +1,285 @@ +/* */ package com.archive.project.dazl.dagl.service.impl + +; +/* */ +/* */ import com.archive.common.archiveUtil.CreatePdfUtil; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService; +/* */ import com.archive.project.dajs.jsgl.service.impl.JsglServiceImpl; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import com.archive.project.dazl.dagl.service.IDaglService; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import com.itextpdf.text.Document; +/* */ import com.itextpdf.text.PageSize; +/* */ import com.itextpdf.text.Rectangle; +/* */ import com.itextpdf.text.pdf.PdfWriter; +/* */ import java.io.File; +/* */ import java.io.FileOutputStream; +/* */ import java.text.SimpleDateFormat; +/* */ import java.util.ArrayList; +/* */ import java.util.Date; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class DaglServiceImpl +/* */ implements IDaglService +/* */ { +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private JsglServiceImpl jsglService; +/* */ @Autowired +/* */ private IArchiveTypeService iArchiveTypeService; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ @Autowired +/* */ private IArchiveImportBatchService archiveImportBatchService; +/* */ +/* */ @Transactional +/* */ public boolean thjsk(String query, String archiveTypeId, String type, String ids) { +/* 82 */ boolean res = false; +/* 83 */ ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 84 */ String archiveCode = archiveType.getArhciveCode(); +/* 85 */ if (StringUtils.isNotEmpty(ids)) { +/* 86 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 88 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (" + ids + "))"; +/* 89 */ String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and ownerid in (" + ids + ")"; +/* 90 */ String folderSql = "update t_ar_" + archiveCode + "_folder set status='60' where is_delete='0' and id in (" + ids + ")"; +/* 91 */ this.executeSqlService.update(documentSql); +/* 92 */ this.executeSqlService.update(filesql); +/* 93 */ this.executeSqlService.update(folderSql); +/* 94 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* 96 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (" + ids + ")"; +/* 97 */ String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and id in (" + ids + ")"; +/* 98 */ this.executeSqlService.update(documentSql); +/* 99 */ this.executeSqlService.update(filesql); +/* */ } +/* 101 */ res = true; +/* */ } else { +/* 103 */ String condition = this.jsglService.appendQueryCondition(query, archiveTypeId, type); +/* 104 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 106 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + "))"; +/* 107 */ String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + ")"; +/* 108 */ String folderSql = "update t_ar_" + archiveCode + "_folder set status='60' where is_delete='0' and " + condition + ""; +/* 109 */ this.executeSqlService.update(documentSql); +/* 110 */ this.executeSqlService.update(filesql); +/* 111 */ this.executeSqlService.update(folderSql); +/* 112 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* 114 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where " + condition + ")"; +/* 115 */ String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and " + condition; +/* 116 */ this.executeSqlService.update(documentSql); +/* 117 */ this.executeSqlService.update(filesql); +/* */ } +/* 119 */ res = true; +/* */ } +/* 121 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String bmdyData(String query, String archiveTypeId, String type, String ids) { +/* 135 */ String downloadPath = ""; +/* */ try { +/* 137 */ SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd"); +/* 138 */ String dateString = formatter.format(new Date()); +/* */ +/* 140 */ ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 141 */ String fileName = archiveType.getArchiveName() + "_" + dateString + ".pdf"; +/* 142 */ String title = archiveType.getArchiveName(); +/* 143 */ float[] columnWidth = null; +/* 144 */ String[] heads = null; +/* 145 */ List resDataList = new ArrayList(); +/* 146 */ String selectDataSql = ""; +/* 147 */ if (StringUtils.isNotEmpty(ids)) { +/* 148 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 150 */ title = title + "-案卷目录"; +/* 151 */ columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; +/* 152 */ heads = new String[] { "序号", "档号", "题名", "起始日期", "截止日期", "备注" }; +/* */ +/* 154 */ selectDataSql = "select id,dh,tm,qs_time,zz_time,bz from t_ar_" + archiveType.getArhciveCode() + "_folder where id in (" + ids + ")"; +/* */ +/* 156 */ List> datalist = this.executeSqlService.queryList(selectDataSql); +/* 157 */ for (int i = 0; i < datalist.size(); i++) { +/* 158 */ if (datalist.get(i) != null) { +/* 159 */ Object[] objects = new Object[6]; +/* 160 */ objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); +/* 161 */ objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); +/* 162 */ objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); +/* 163 */ objects[3] = ((LinkedHashMap)datalist.get(i)).get("qs_time"); +/* 164 */ objects[4] = ((LinkedHashMap)datalist.get(i)).get("zz_time"); +/* 165 */ objects[5] = ((LinkedHashMap)datalist.get(i)).get("bz"); +/* 166 */ resDataList.add(objects); +/* */ } +/* */ } +/* 169 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* 171 */ if (archiveType.getType().equals("folder")) { +/* */ +/* 173 */ title = title + "-卷内目录"; +/* */ } else { +/* */ +/* 176 */ title = title + "-文件目录"; +/* */ } +/* 178 */ columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; +/* 179 */ heads = new String[] { "序号", "档号", "题名", "保管期限", "日期", "开放情况" }; +/* */ +/* 181 */ selectDataSql = "select id,dh,tm,bgqx,wjrq,kfqk from t_ar_" + archiveType.getArhciveCode() + "_file where id in (" + ids + ")"; +/* */ +/* 183 */ List> datalist = this.executeSqlService.queryList(selectDataSql); +/* 184 */ for (int i = 0; i < datalist.size(); i++) { +/* 185 */ if (datalist.get(i) != null) { +/* 186 */ Object[] objects = new Object[6]; +/* 187 */ objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); +/* 188 */ objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); +/* 189 */ objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); +/* 190 */ objects[3] = ((LinkedHashMap)datalist.get(i)).get("bgqx"); +/* 191 */ objects[4] = ((LinkedHashMap)datalist.get(i)).get("wjrq"); +/* 192 */ objects[5] = ((LinkedHashMap)datalist.get(i)).get("kfqk"); +/* */ +/* 194 */ resDataList.add(objects); +/* */ } +/* */ } +/* */ } +/* */ } else { +/* 199 */ String condition = this.jsglService.appendQueryCondition(query, archiveTypeId, type); +/* 200 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 202 */ title = title + "-案卷目录"; +/* 203 */ columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; +/* 204 */ heads = new String[] { "序号", "档号", "题名", "起始日期", "截止日期", "备注" }; +/* */ +/* 206 */ selectDataSql = "select id,dh,tm,qs_time,zz_time,bz from t_ar_" + archiveType.getArhciveCode() + "_folder where is_delete='0' and " + condition + ""; +/* */ +/* 208 */ List> datalist = this.executeSqlService.queryList(selectDataSql); +/* 209 */ for (int i = 0; i < datalist.size(); i++) { +/* 210 */ if (datalist.get(i) != null) { +/* 211 */ Object[] objects = new Object[6]; +/* 212 */ objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); +/* 213 */ objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); +/* 214 */ objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); +/* 215 */ objects[3] = ((LinkedHashMap)datalist.get(i)).get("qs_time"); +/* 216 */ objects[4] = ((LinkedHashMap)datalist.get(i)).get("zz_time"); +/* 217 */ objects[5] = ((LinkedHashMap)datalist.get(i)).get("bz"); +/* 218 */ resDataList.add(objects); +/* */ } +/* */ } +/* 221 */ } else if (type.toLowerCase().equals("file")) { +/* */ +/* 223 */ if (archiveType.getType().equals("folder")) { +/* */ +/* 225 */ title = title + "-卷内目录"; +/* */ } else { +/* */ +/* 228 */ title = title + "-文件目录"; +/* */ } +/* 230 */ columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; +/* 231 */ heads = new String[] { "序号", "档号", "题名", "保管期限", "日期", "开放情况" }; +/* */ +/* 233 */ selectDataSql = "select id,dh,tm,bgqx,wjrq,kfqk from t_ar_" + archiveType.getArhciveCode() + "_file where is_delete='0' and " + condition + ""; +/* */ +/* 235 */ List> datalist = this.executeSqlService.queryList(selectDataSql); +/* 236 */ for (int i = 0; i < datalist.size(); i++) { +/* 237 */ if (datalist.get(i) != null) { +/* 238 */ Object[] objects = new Object[6]; +/* 239 */ objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); +/* 240 */ objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); +/* 241 */ objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); +/* 242 */ objects[3] = ((LinkedHashMap)datalist.get(i)).get("bgqx"); +/* 243 */ objects[4] = ((LinkedHashMap)datalist.get(i)).get("wjrq"); +/* 244 */ objects[5] = ((LinkedHashMap)datalist.get(i)).get("kfqk"); +/* */ +/* 246 */ resDataList.add(objects); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* 252 */ downloadPath = ArchiveConfig.getInstance().getDownloadPath() + fileName; +/* 253 */ File desc = new File(downloadPath); +/* 254 */ if (desc.exists()) { +/* 255 */ desc.delete(); +/* */ } +/* 257 */ if (!desc.getParentFile().exists()) +/* */ { +/* 259 */ desc.getParentFile().mkdirs(); +/* */ } +/* */ +/* */ +/* 263 */ Rectangle rect = new Rectangle(PageSize.A4); +/* */ +/* 265 */ Document doc = new Document(rect); +/* 266 */ PdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream(new File(downloadPath))); +/* 267 */ doc.open(); +/* 268 */ doc.newPage(); +/* 269 */ CreatePdfUtil.createTableByData(writer, doc, columnWidth, title, heads, resDataList); +/* 270 */ doc.close(); +/* 271 */ } catch (Exception ex) { +/* 272 */ ex.printStackTrace(); +/* */ } +/* */ +/* 275 */ return downloadPath; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dagl\service\impl\DaglServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/dajd/controller/TJdTaskController.java b/src/main/java/com/archive/project/dazl/dajd/controller/TJdTaskController.java new file mode 100644 index 0000000..ccf7d16 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/dajd/controller/TJdTaskController.java @@ -0,0 +1,152 @@ +/* */ package com.archive.project.dazl.dajd.controller + +-INF.classes.com.archive.project.dazl.dajd.controller; +/* */ +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dazl.dajd.domain.TJdTask; +/* */ import com.archive.project.dazl.dajd.service.ITJdTaskService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dazl/dajd"}) +/* */ public class TJdTaskController +/* */ extends BaseController +/* */ { +/* 36 */ private String prefix = "dazl/dajd"; +/* */ +/* */ @Autowired +/* */ private ITJdTaskService tJdTaskService; +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:dajd:view"}) +/* */ @GetMapping +/* */ public String dajd() { +/* 45 */ return this.prefix + "/dajd"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:dajd:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(TJdTask tJdTask) { +/* 56 */ startPage(); +/* 57 */ List list = this.tJdTaskService.selectTJdTaskList(tJdTask); +/* 58 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:dajd:export"}) +/* */ @Log(title = "档案鉴定", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TJdTask tJdTask) { +/* 70 */ List list = this.tJdTaskService.selectTJdTaskList(tJdTask); +/* 71 */ ExcelUtil util = new ExcelUtil(TJdTask.class); +/* 72 */ return util.exportExcel(list, "dajd"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add(ModelMap mmap) { +/* 82 */ List archiveTypeList = TableUtil.getAllArchiveType(); +/* 83 */ mmap.put("archiveTypeList", archiveTypeList); +/* 84 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:dajd:add"}) +/* */ @Log(title = "档案鉴定", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TJdTask tJdTask) { +/* 96 */ return toAjax(this.tJdTaskService.insertTJdTask(tJdTask)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 105 */ TJdTask tJdTask = this.tJdTaskService.selectTJdTaskById(id); +/* 106 */ mmap.put("tJdTask", tJdTask); +/* */ +/* 108 */ List archiveTypeList = TableUtil.getAllArchiveType(); +/* 109 */ mmap.put("archiveTypeList", archiveTypeList); +/* 110 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:dajd:edit"}) +/* */ @Log(title = "档案鉴定", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TJdTask tJdTask) { +/* 122 */ return toAjax(this.tJdTaskService.updateTJdTask(tJdTask)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:dajd:remove"}) +/* */ @Log(title = "档案鉴定", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 134 */ return toAjax(this.tJdTaskService.deleteTJdTaskByIds(ids)); +/* */ } +/* */ +/* */ @Log(title = "档案鉴定-鉴定生效", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/jdsx"}) +/* */ @ResponseBody +/* */ public AjaxResult jdsx(@Validated String ids) { +/* 141 */ int a = this.tJdTaskService.jdsx(ids); +/* 142 */ return success(String.valueOf(a)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dajd\controller\TJdTaskController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/dajd/domain/TJdTask.java b/src/main/java/com/archive/project/dazl/dajd/domain/TJdTask.java new file mode 100644 index 0000000..471483d --- /dev/null +++ b/src/main/java/com/archive/project/dazl/dajd/domain/TJdTask.java @@ -0,0 +1,171 @@ +/* */ package com.archive.project.dazl.dajd.domain + +-INF.classes.com.archive.project.dazl.dajd.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TJdTask +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "鉴定任务名称") +/* */ private String taskName; +/* */ @Excel(name = "任务创建时间") +/* */ private String taskSj; +/* */ @Excel(name = "鉴定类型") +/* */ private String taskType; +/* */ @Excel(name = "鉴定档案类型id") +/* */ private String taskArchiveTypeId; +/* */ @Excel(name = "鉴定档案类型名称") +/* */ private String taskArchiveTypeName; +/* */ @Excel(name = "鉴定主表id") +/* */ private String taskTableId; +/* */ @Excel(name = "鉴定任务状态") +/* */ private String taskStatus; +/* */ @Excel(name = "鉴定人员") +/* */ private String taskRy; +/* */ @Excel(name = "任务备注") +/* */ private String taskBz; +/* */ +/* */ public void setId(Long id) { +/* 59 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 64 */ return this.id; +/* */ } +/* */ +/* */ public void setTaskName(String taskName) { +/* 68 */ this.taskName = taskName; +/* */ } +/* */ +/* */ +/* */ public String getTaskName() { +/* 73 */ return this.taskName; +/* */ } +/* */ +/* */ public void setTaskSj(String taskSj) { +/* 77 */ this.taskSj = taskSj; +/* */ } +/* */ +/* */ +/* */ public String getTaskSj() { +/* 82 */ return this.taskSj; +/* */ } +/* */ +/* */ public void setTaskType(String taskType) { +/* 86 */ this.taskType = taskType; +/* */ } +/* */ +/* */ +/* */ public String getTaskType() { +/* 91 */ return this.taskType; +/* */ } +/* */ +/* */ public void setTaskArchiveTypeId(String taskArchiveTypeId) { +/* 95 */ this.taskArchiveTypeId = taskArchiveTypeId; +/* */ } +/* */ +/* */ +/* */ public String getTaskArchiveTypeId() { +/* 100 */ return this.taskArchiveTypeId; +/* */ } +/* */ +/* */ public void setTaskArchiveTypeName(String taskArchiveTypeName) { +/* 104 */ this.taskArchiveTypeName = taskArchiveTypeName; +/* */ } +/* */ +/* */ +/* */ public String getTaskArchiveTypeName() { +/* 109 */ return this.taskArchiveTypeName; +/* */ } +/* */ +/* */ public void setTaskTableId(String taskTableId) { +/* 113 */ this.taskTableId = taskTableId; +/* */ } +/* */ +/* */ +/* */ public String getTaskTableId() { +/* 118 */ return this.taskTableId; +/* */ } +/* */ +/* */ public void setTaskStatus(String taskStatus) { +/* 122 */ this.taskStatus = taskStatus; +/* */ } +/* */ +/* */ +/* */ public String getTaskStatus() { +/* 127 */ return this.taskStatus; +/* */ } +/* */ +/* */ public void setTaskRy(String taskRy) { +/* 131 */ this.taskRy = taskRy; +/* */ } +/* */ +/* */ +/* */ public String getTaskRy() { +/* 136 */ return this.taskRy; +/* */ } +/* */ +/* */ public void setTaskBz(String taskBz) { +/* 140 */ this.taskBz = taskBz; +/* */ } +/* */ +/* */ +/* */ public String getTaskBz() { +/* 145 */ return this.taskBz; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 150 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 151 */ .append("id", getId()) +/* 152 */ .append("taskName", getTaskName()) +/* 153 */ .append("taskSj", getTaskSj()) +/* 154 */ .append("taskType", getTaskType()) +/* 155 */ .append("taskArchiveTypeId", getTaskArchiveTypeId()) +/* 156 */ .append("taskArchiveTypeName", getTaskArchiveTypeName()) +/* 157 */ .append("taskTableId", getTaskTableId()) +/* 158 */ .append("taskStatus", getTaskStatus()) +/* 159 */ .append("taskRy", getTaskRy()) +/* 160 */ .append("taskBz", getTaskBz()) +/* 161 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dajd\domain\TJdTask.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/dajd/mapper/TJdTaskMapper.java b/src/main/java/com/archive/project/dazl/dajd/mapper/TJdTaskMapper.java new file mode 100644 index 0000000..39e48c1 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/dajd/mapper/TJdTaskMapper.java @@ -0,0 +1,28 @@ +package com.archive.project.dazl.dajd.mapper + +-INF.classes.com.archive.project.dazl.dajd.mapper; + +import com.archive.project.dazl.dajd.domain.TJdTask; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface TJdTaskMapper { + TJdTask selectTJdTaskById(Long paramLong); + + List selectTJdTaskList(TJdTask paramTJdTask); + + int insertTJdTask(TJdTask paramTJdTask); + + int updateTJdTask(TJdTask paramTJdTask); + + int deleteTJdTaskById(Long paramLong); + + int deleteTJdTaskByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dajd\mapper\TJdTaskMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/dajd/service/ITJdTaskService.java b/src/main/java/com/archive/project/dazl/dajd/service/ITJdTaskService.java new file mode 100644 index 0000000..e879a80 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/dajd/service/ITJdTaskService.java @@ -0,0 +1,28 @@ +package com.archive.project.dazl.dajd.service + +-INF.classes.com.archive.project.dazl.dajd.service; + +import com.archive.project.dazl.dajd.domain.TJdTask; +import java.util.List; + +public interface ITJdTaskService { + TJdTask selectTJdTaskById(Long paramLong); + + List selectTJdTaskList(TJdTask paramTJdTask); + + int insertTJdTask(TJdTask paramTJdTask); + + int updateTJdTask(TJdTask paramTJdTask); + + int deleteTJdTaskByIds(String paramString); + + int deleteTJdTaskById(Long paramLong); + + int jdsx(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dajd\service\ITJdTaskService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/dajd/service/impl/TJdTaskServiceImpl.java b/src/main/java/com/archive/project/dazl/dajd/service/impl/TJdTaskServiceImpl.java new file mode 100644 index 0000000..5e29610 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/dajd/service/impl/TJdTaskServiceImpl.java @@ -0,0 +1,185 @@ +/* */ package com.archive.project.dazl.dajd.service.impl + +; +/* */ +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dazl.dajd.domain.TJdTask; +/* */ import com.archive.project.dazl.dajd.mapper.TJdTaskMapper; +/* */ import com.archive.project.dazl.dajd.service.ITJdTaskService; +/* */ import com.archive.project.dazl.jdmx.domain.TJdTaskDetail; +/* */ import com.archive.project.dazl.jdmx.service.ITJdTaskDetailService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TJdTaskServiceImpl +/* */ implements ITJdTaskService +/* */ { +/* */ @Autowired +/* */ private TJdTaskMapper tJdTaskMapper; +/* */ @Autowired +/* */ private IArchiveTypeService archiveTypeService; +/* */ @Autowired +/* */ private ITJdTaskDetailService jdTaskDetailService; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ +/* */ public TJdTask selectTJdTaskById(Long id) { +/* 47 */ return this.tJdTaskMapper.selectTJdTaskById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTJdTaskList(TJdTask tJdTask) { +/* 59 */ return this.tJdTaskMapper.selectTJdTaskList(tJdTask); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTJdTask(TJdTask tJdTask) { +/* 73 */ String archiveTypeId = tJdTask.getTaskArchiveTypeId(); +/* 74 */ ArchiveType archiveType = this.archiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 75 */ String archiveTypeName = archiveType.getArchiveName(); +/* 76 */ String taskStatus = "WSX"; +/* 77 */ long tableId = TableUtil.getTableIdByArchiveTypeId(archiveType.getId().longValue()); +/* */ +/* 79 */ tJdTask.setTaskArchiveTypeName(archiveTypeName); +/* 80 */ tJdTask.setTaskTableId(String.valueOf(tableId)); +/* 81 */ tJdTask.setTaskStatus(taskStatus); +/* 82 */ return this.tJdTaskMapper.insertTJdTask(tJdTask); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTJdTask(TJdTask tJdTask) { +/* 96 */ String archiveTypeId = tJdTask.getTaskArchiveTypeId(); +/* 97 */ ArchiveType archiveType = this.archiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 98 */ String archiveTypeName = archiveType.getArchiveName(); +/* 99 */ String taskStatus = "WSX"; +/* 100 */ long tableId = TableUtil.getTableIdByArchiveTypeId(archiveType.getId().longValue()); +/* */ +/* 102 */ tJdTask.setTaskArchiveTypeName(archiveTypeName); +/* 103 */ tJdTask.setTaskTableId(String.valueOf(tableId)); +/* 104 */ tJdTask.setTaskStatus(taskStatus); +/* 105 */ return this.tJdTaskMapper.updateTJdTask(tJdTask); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTJdTaskByIds(String ids) { +/* 117 */ return this.tJdTaskMapper.deleteTJdTaskByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTJdTaskById(Long id) { +/* 129 */ return this.tJdTaskMapper.deleteTJdTaskById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int jdsx(String ids) { +/* 139 */ int a = 0; +/* 140 */ String[] idsttr = ids.split(","); +/* 141 */ for (int i = 0; i < idsttr.length && +/* 142 */ a == 0; i++) { +/* 143 */ TJdTask tJdTask = this.tJdTaskMapper.selectTJdTaskById(Long.valueOf(Long.parseLong(idsttr[i]))); +/* */ +/* 145 */ TJdTaskDetail jdTaskDetail = new TJdTaskDetail(); +/* 146 */ jdTaskDetail.setOwnerId(Long.valueOf(Long.parseLong(idsttr[i]))); +/* 147 */ List list = this.jdTaskDetailService.selectTJdTaskDetailList(jdTaskDetail); +/* 148 */ for (int j = 0; j < list.size(); j++) { +/* 149 */ jdTaskDetail = list.get(j); +/* 150 */ String value = jdTaskDetail.getJdjg(); +/* 151 */ if (value == null || value.equals("")) { +/* 152 */ a = 2; +/* */ break; +/* */ } +/* 155 */ String columns = ""; +/* 156 */ if (tJdTask.getTaskType().equals("MJJD")) { +/* 157 */ columns = "mj"; +/* 158 */ } else if (tJdTask.getTaskType().equals("KFJD")) { +/* 159 */ columns = "kfqk"; +/* */ } +/* 161 */ String tableName = TableUtil.getTableName(jdTaskDetail.getArchiveTableId()); +/* 162 */ String updatesql = "update " + tableName + " set " + columns + "='" + value + "' where id=" + jdTaskDetail.getArchiveId(); +/* 163 */ this.executeSqlService.update(updatesql); +/* */ } +/* */ +/* */ +/* 167 */ if (a == 0) { +/* 168 */ tJdTask.setTaskStatus("YSX"); +/* 169 */ this.tJdTaskMapper.updateTJdTask(tJdTask); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 175 */ return a; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dajd\service\impl\TJdTaskServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/ggfj/controller/TGgfjController.java b/src/main/java/com/archive/project/dazl/ggfj/controller/TGgfjController.java new file mode 100644 index 0000000..a1fcf1f --- /dev/null +++ b/src/main/java/com/archive/project/dazl/ggfj/controller/TGgfjController.java @@ -0,0 +1,134 @@ +/* */ package com.archive.project.dazl.ggfj.controller + +-INF.classes.com.archive.project.dazl.ggfj.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dazl.ggfj.domain.TGgfj; +/* */ import com.archive.project.dazl.ggfj.service.ITGgfjService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/fjgl/ggfj"}) +/* */ public class TGgfjController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "fjgl/ggfj"; +/* */ +/* */ @Autowired +/* */ private ITGgfjService tGgfjService; +/* */ +/* */ +/* */ @RequiresPermissions({"fjgl:ggfj:view"}) +/* */ @GetMapping +/* */ public String ggfj() { +/* 41 */ return this.prefix + "/ggfj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"fjgl:ggfj:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(TGgfj tGgfj) { +/* 52 */ startPage(); +/* 53 */ List list = this.tGgfjService.selectTGgfjList(tGgfj); +/* 54 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"fjgl:ggfj:export"}) +/* */ @Log(title = "附件管理", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TGgfj tGgfj) { +/* 66 */ List list = this.tGgfjService.selectTGgfjList(tGgfj); +/* 67 */ ExcelUtil util = new ExcelUtil(TGgfj.class); +/* 68 */ return util.exportExcel(list, "ggfj"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 77 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"fjgl:ggfj:add"}) +/* */ @Log(title = "附件管理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TGgfj tGgfj) { +/* 89 */ return toAjax(this.tGgfjService.insertTGgfj(tGgfj)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 98 */ TGgfj tGgfj = this.tGgfjService.selectTGgfjById(id); +/* 99 */ mmap.put("tGgfj", tGgfj); +/* 100 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"fjgl:ggfj:edit"}) +/* */ @Log(title = "附件管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TGgfj tGgfj) { +/* 112 */ return toAjax(this.tGgfjService.updateTGgfj(tGgfj)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"fjgl:ggfj:remove"}) +/* */ @Log(title = "附件管理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 124 */ return toAjax(this.tGgfjService.deleteTGgfjByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\ggfj\controller\TGgfjController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/ggfj/domain/TGgfj.java b/src/main/java/com/archive/project/dazl/ggfj/domain/TGgfj.java new file mode 100644 index 0000000..dd93c3e --- /dev/null +++ b/src/main/java/com/archive/project/dazl/ggfj/domain/TGgfj.java @@ -0,0 +1,171 @@ +/* */ package com.archive.project.dazl.ggfj.domain + +-INF.classes.com.archive.project.dazl.ggfj.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TGgfj +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "所属类型") +/* */ private String ssType; +/* */ @Excel(name = "所属ID") +/* */ private Long ssId; +/* */ @Excel(name = "所属表名") +/* */ private String ssTableName; +/* */ @Excel(name = "文件名称") +/* */ private String fileName; +/* */ @Excel(name = "文件格式") +/* */ private String fileFormat; +/* */ @Excel(name = "文件大小") +/* */ private Long fileSize; +/* */ @Excel(name = "文件路径") +/* */ private String filePath; +/* */ @Excel(name = "文件缩略图路径") +/* */ private String fileMiniPath; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ +/* */ public void setId(Long id) { +/* 59 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 64 */ return this.id; +/* */ } +/* */ +/* */ public void setSsType(String ssType) { +/* 68 */ this.ssType = ssType; +/* */ } +/* */ +/* */ +/* */ public String getSsType() { +/* 73 */ return this.ssType; +/* */ } +/* */ +/* */ public void setSsId(Long ssId) { +/* 77 */ this.ssId = ssId; +/* */ } +/* */ +/* */ +/* */ public Long getSsId() { +/* 82 */ return this.ssId; +/* */ } +/* */ +/* */ public void setSsTableName(String ssTableName) { +/* 86 */ this.ssTableName = ssTableName; +/* */ } +/* */ +/* */ +/* */ public String getSsTableName() { +/* 91 */ return this.ssTableName; +/* */ } +/* */ +/* */ public void setFileName(String fileName) { +/* 95 */ this.fileName = fileName; +/* */ } +/* */ +/* */ +/* */ public String getFileName() { +/* 100 */ return this.fileName; +/* */ } +/* */ +/* */ public void setFileFormat(String fileFormat) { +/* 104 */ this.fileFormat = fileFormat; +/* */ } +/* */ +/* */ +/* */ public String getFileFormat() { +/* 109 */ return this.fileFormat; +/* */ } +/* */ +/* */ public void setFileSize(Long fileSize) { +/* 113 */ this.fileSize = fileSize; +/* */ } +/* */ +/* */ +/* */ public Long getFileSize() { +/* 118 */ return this.fileSize; +/* */ } +/* */ +/* */ public void setFilePath(String filePath) { +/* 122 */ this.filePath = filePath; +/* */ } +/* */ +/* */ +/* */ public String getFilePath() { +/* 127 */ return this.filePath; +/* */ } +/* */ +/* */ public void setFileMiniPath(String fileMiniPath) { +/* 131 */ this.fileMiniPath = fileMiniPath; +/* */ } +/* */ +/* */ +/* */ public String getFileMiniPath() { +/* 136 */ return this.fileMiniPath; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 140 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 145 */ return this.bz; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 150 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 151 */ .append("id", getId()) +/* 152 */ .append("ssType", getSsType()) +/* 153 */ .append("ssId", getSsId()) +/* 154 */ .append("ssTableName", getSsTableName()) +/* 155 */ .append("fileName", getFileName()) +/* 156 */ .append("fileFormat", getFileFormat()) +/* 157 */ .append("fileSize", getFileSize()) +/* 158 */ .append("filePath", getFilePath()) +/* 159 */ .append("fileMiniPath", getFileMiniPath()) +/* 160 */ .append("bz", getBz()) +/* 161 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\ggfj\domain\TGgfj.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/ggfj/mapper/TGgfjMapper.java b/src/main/java/com/archive/project/dazl/ggfj/mapper/TGgfjMapper.java new file mode 100644 index 0000000..74e9363 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/ggfj/mapper/TGgfjMapper.java @@ -0,0 +1,26 @@ +package com.archive.project.dazl.ggfj.mapper + +-INF.classes.com.archive.project.dazl.ggfj.mapper; + +import com.archive.project.dazl.ggfj.domain.TGgfj; +import java.util.List; + +public interface TGgfjMapper { + TGgfj selectTGgfjById(Long paramLong); + + List selectTGgfjList(TGgfj paramTGgfj); + + int insertTGgfj(TGgfj paramTGgfj); + + int updateTGgfj(TGgfj paramTGgfj); + + int deleteTGgfjById(Long paramLong); + + int deleteTGgfjByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\ggfj\mapper\TGgfjMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/ggfj/service/ITGgfjService.java b/src/main/java/com/archive/project/dazl/ggfj/service/ITGgfjService.java new file mode 100644 index 0000000..4aeee89 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/ggfj/service/ITGgfjService.java @@ -0,0 +1,26 @@ +package com.archive.project.dazl.ggfj.service + +-INF.classes.com.archive.project.dazl.ggfj.service; + +import com.archive.project.dazl.ggfj.domain.TGgfj; +import java.util.List; + +public interface ITGgfjService { + TGgfj selectTGgfjById(Long paramLong); + + List selectTGgfjList(TGgfj paramTGgfj); + + int insertTGgfj(TGgfj paramTGgfj); + + int updateTGgfj(TGgfj paramTGgfj); + + int deleteTGgfjByIds(String paramString); + + int deleteTGgfjById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\ggfj\service\ITGgfjService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/ggfj/service/impl/TGgfjServiceImpl.java b/src/main/java/com/archive/project/dazl/ggfj/service/impl/TGgfjServiceImpl.java new file mode 100644 index 0000000..33d9e5f --- /dev/null +++ b/src/main/java/com/archive/project/dazl/ggfj/service/impl/TGgfjServiceImpl.java @@ -0,0 +1,102 @@ +/* */ package com.archive.project.dazl.ggfj.service.impl + +-INF.classes.com.archive.project.dazl.ggfj.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.dazl.ggfj.domain.TGgfj; +/* */ import com.archive.project.dazl.ggfj.mapper.TGgfjMapper; +/* */ import com.archive.project.dazl.ggfj.service.ITGgfjService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TGgfjServiceImpl +/* */ implements ITGgfjService +/* */ { +/* */ @Autowired +/* */ private TGgfjMapper tGgfjMapper; +/* */ +/* */ public TGgfj selectTGgfjById(Long id) { +/* 32 */ return this.tGgfjMapper.selectTGgfjById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTGgfjList(TGgfj tGgfj) { +/* 44 */ return this.tGgfjMapper.selectTGgfjList(tGgfj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTGgfj(TGgfj tGgfj) { +/* 56 */ return this.tGgfjMapper.insertTGgfj(tGgfj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTGgfj(TGgfj tGgfj) { +/* 68 */ return this.tGgfjMapper.updateTGgfj(tGgfj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTGgfjByIds(String ids) { +/* 80 */ return this.tGgfjMapper.deleteTGgfjByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTGgfjById(Long id) { +/* 92 */ return this.tGgfjMapper.deleteTGgfjById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\ggfj\service\impl\TGgfjServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/jdmx/controller/TJdTaskDetailController.java b/src/main/java/com/archive/project/dazl/jdmx/controller/TJdTaskDetailController.java new file mode 100644 index 0000000..e5e66a2 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/jdmx/controller/TJdTaskDetailController.java @@ -0,0 +1,213 @@ +/* */ package com.archive.project.dazl.jdmx.controller + +-INF.classes.com.archive.project.dazl.jdmx.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dazl.dajd.domain.TJdTask; +/* */ import com.archive.project.dazl.dajd.service.ITJdTaskService; +/* */ import com.archive.project.dazl.jdmx.domain.TJdTaskDetail; +/* */ import com.archive.project.dazl.jdmx.service.ITJdTaskDetailService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dazl/jdmx"}) +/* */ public class TJdTaskDetailController +/* */ extends BaseController +/* */ { +/* 36 */ private String prefix = "dazl/jdmx"; +/* */ +/* */ @Autowired +/* */ private ITJdTaskDetailService tJdTaskDetailService; +/* */ +/* */ @Autowired +/* */ private ITJdTaskService jdTaskService; +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:jdmx:view"}) +/* */ @GetMapping({"/{id}"}) +/* */ public String jdmx(@PathVariable("id") Long id, ModelMap mmap) { +/* 48 */ mmap.put("ownerId", id); +/* */ +/* 50 */ TJdTask jdTask = this.jdTaskService.selectTJdTaskById(id); +/* 51 */ mmap.put("jdType", jdTask.getTaskType()); +/* 52 */ mmap.put("jdStatus", jdTask.getTaskStatus()); +/* 53 */ return this.prefix + "/jdmx"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:jdmx:list"}) +/* */ @PostMapping({"/list/{ownerId}"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(@PathVariable("ownerId") Long ownerId, TJdTaskDetail tJdTaskDetail) { +/* 64 */ startPage(); +/* 65 */ tJdTaskDetail.setOwnerId(ownerId); +/* 66 */ List list = this.tJdTaskDetailService.selectTJdTaskDetailList(tJdTaskDetail); +/* 67 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:jdmx:export"}) +/* */ @Log(title = "鉴定明细", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TJdTaskDetail tJdTaskDetail) { +/* 79 */ List list = this.tJdTaskDetailService.selectTJdTaskDetailList(tJdTaskDetail); +/* 80 */ ExcelUtil util = new ExcelUtil(TJdTaskDetail.class); +/* 81 */ return util.exportExcel(list, "jdmx"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 90 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:jdmx:add"}) +/* */ @Log(title = "鉴定明细", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TJdTaskDetail tJdTaskDetail) { +/* 102 */ return toAjax(this.tJdTaskDetailService.insertTJdTaskDetail(tJdTaskDetail)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 111 */ TJdTaskDetail tJdTaskDetail = this.tJdTaskDetailService.selectTJdTaskDetailById(id); +/* 112 */ mmap.put("tJdTaskDetail", tJdTaskDetail); +/* 113 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:jdmx:edit"}) +/* */ @Log(title = "鉴定明细", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TJdTaskDetail tJdTaskDetail) { +/* 125 */ return toAjax(this.tJdTaskDetailService.updateTJdTaskDetail(tJdTaskDetail)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:jdmx:remove"}) +/* */ @Log(title = "鉴定明细", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 137 */ return toAjax(this.tJdTaskDetailService.deleteTJdTaskDetailByIds(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/jdsearch/{ownerId}"}) +/* */ public String borrowsearch(@PathVariable("ownerId") Long ownerId, ModelMap mmap) { +/* 147 */ mmap.put("ownerId", ownerId); +/* 148 */ return this.prefix + "/jdsearch"; +/* */ } +/* */ +/* */ @Log(title = "档案鉴定-明细调档保存", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/saveJdDetail"}) +/* */ @ResponseBody +/* */ public AjaxResult saveJdDetail(@Validated String ownerId, @Validated String ids) { +/* 155 */ boolean res = this.tJdTaskDetailService.saveJdDetail(ownerId, ids); +/* 156 */ if (res) { +/* 157 */ return success(); +/* */ } +/* 159 */ return error(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "档案整理-档案鉴定-单条鉴定", businessType = BusinessType.ZLRK) +/* */ @PostMapping({"/dtjd"}) +/* */ @ResponseBody +/* */ public AjaxResult dtjd(@Validated long id, @Validated String field, @Validated String value) { +/* 172 */ int flag = 0; +/* */ try { +/* 174 */ TJdTaskDetail jdTaskDetail = this.tJdTaskDetailService.selectTJdTaskDetailById(Long.valueOf(id)); +/* 175 */ if (field.equals("jdjg")) { +/* 176 */ jdTaskDetail.setJdjg(value); +/* */ } +/* 178 */ if (field.equals("jdyj")) { +/* 179 */ jdTaskDetail.setJdyj(value); +/* */ } +/* 181 */ this.tJdTaskDetailService.updateTJdTaskDetail(jdTaskDetail); +/* 182 */ } catch (Exception ex) { +/* 183 */ flag = 1; +/* 184 */ System.out.println("单条鉴定出现异常:" + ex.getMessage()); +/* 185 */ return error("鉴定结果保存失败!"); +/* */ } +/* 187 */ if (flag == 0) { +/* 188 */ return success("鉴定结果保存成功!"); +/* */ } +/* 190 */ return error("鉴定结果保存失败!"); +/* */ } +/* */ +/* */ +/* */ +/* */ @Log(title = "档案鉴定-批量鉴定保存", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/savePLJdDetail"}) +/* */ @ResponseBody +/* */ public AjaxResult savePLJdDetail(@Validated String value, @Validated String ids) { +/* 199 */ boolean res = this.tJdTaskDetailService.saveJdPljdDetail(value, ids); +/* 200 */ if (res) { +/* 201 */ return success(); +/* */ } +/* 203 */ return error(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\jdmx\controller\TJdTaskDetailController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/jdmx/domain/TJdTaskDetail.java b/src/main/java/com/archive/project/dazl/jdmx/domain/TJdTaskDetail.java new file mode 100644 index 0000000..be1fed4 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/jdmx/domain/TJdTaskDetail.java @@ -0,0 +1,297 @@ +/* */ package com.archive.project.dazl.jdmx.domain + +-INF.classes.com.archive.project.dazl.jdmx.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TJdTaskDetail +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "任务单id") +/* */ private Long ownerId; +/* */ @Excel(name = "鉴定类型") +/* */ private String ownerType; +/* */ @Excel(name = "档案类型id") +/* */ private Long archiveTypeId; +/* */ @Excel(name = "档案类型名称") +/* */ private String archiveTypeName; +/* */ @Excel(name = "表id") +/* */ private Long archiveTableId; +/* */ @Excel(name = "条目id") +/* */ private Long archiveId; +/* */ @Excel(name = "档号") +/* */ private String dh; +/* */ @Excel(name = "题名") +/* */ private String tm; +/* */ @Excel(name = "责任者") +/* */ private String zrz; +/* */ @Excel(name = "年度") +/* */ private String nd; +/* */ @Excel(name = "全宗号") +/* */ private String qzh; +/* */ @Excel(name = "保管期限") +/* */ private String bgqx; +/* */ @Excel(name = "密级") +/* */ private String mj; +/* */ @Excel(name = "开放情况") +/* */ private String kfqk; +/* */ @Excel(name = "鉴定结果") +/* */ private String jdjg; +/* */ @Excel(name = "鉴定意见") +/* */ private String jdyj; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ @Excel(name = "日期") +/* */ private String rq; +/* */ +/* */ public void setId(Long id) { +/* 95 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 100 */ return this.id; +/* */ } +/* */ +/* */ public void setOwnerId(Long ownerId) { +/* 104 */ this.ownerId = ownerId; +/* */ } +/* */ +/* */ +/* */ public Long getOwnerId() { +/* 109 */ return this.ownerId; +/* */ } +/* */ +/* */ public void setOwnerType(String ownerType) { +/* 113 */ this.ownerType = ownerType; +/* */ } +/* */ +/* */ +/* */ public String getOwnerType() { +/* 118 */ return this.ownerType; +/* */ } +/* */ +/* */ public void setArchiveTypeId(Long archiveTypeId) { +/* 122 */ this.archiveTypeId = archiveTypeId; +/* */ } +/* */ +/* */ +/* */ public Long getArchiveTypeId() { +/* 127 */ return this.archiveTypeId; +/* */ } +/* */ +/* */ public void setArchiveTypeName(String archiveTypeName) { +/* 131 */ this.archiveTypeName = archiveTypeName; +/* */ } +/* */ +/* */ +/* */ public String getArchiveTypeName() { +/* 136 */ return this.archiveTypeName; +/* */ } +/* */ +/* */ public void setArchiveTableId(Long archiveTableId) { +/* 140 */ this.archiveTableId = archiveTableId; +/* */ } +/* */ +/* */ +/* */ public Long getArchiveTableId() { +/* 145 */ return this.archiveTableId; +/* */ } +/* */ +/* */ public void setArchiveId(Long archiveId) { +/* 149 */ this.archiveId = archiveId; +/* */ } +/* */ +/* */ +/* */ public Long getArchiveId() { +/* 154 */ return this.archiveId; +/* */ } +/* */ +/* */ public void setDh(String dh) { +/* 158 */ this.dh = dh; +/* */ } +/* */ +/* */ +/* */ public String getDh() { +/* 163 */ return this.dh; +/* */ } +/* */ +/* */ public void setTm(String tm) { +/* 167 */ this.tm = tm; +/* */ } +/* */ +/* */ +/* */ public String getTm() { +/* 172 */ return this.tm; +/* */ } +/* */ +/* */ public void setZrz(String zrz) { +/* 176 */ this.zrz = zrz; +/* */ } +/* */ +/* */ +/* */ public String getZrz() { +/* 181 */ return this.zrz; +/* */ } +/* */ +/* */ public void setNd(String nd) { +/* 185 */ this.nd = nd; +/* */ } +/* */ +/* */ +/* */ public String getNd() { +/* 190 */ return this.nd; +/* */ } +/* */ +/* */ public void setQzh(String qzh) { +/* 194 */ this.qzh = qzh; +/* */ } +/* */ +/* */ +/* */ public String getQzh() { +/* 199 */ return this.qzh; +/* */ } +/* */ +/* */ public void setBgqx(String bgqx) { +/* 203 */ this.bgqx = bgqx; +/* */ } +/* */ +/* */ +/* */ public String getBgqx() { +/* 208 */ return this.bgqx; +/* */ } +/* */ +/* */ public void setMj(String mj) { +/* 212 */ this.mj = mj; +/* */ } +/* */ +/* */ +/* */ public String getMj() { +/* 217 */ return this.mj; +/* */ } +/* */ +/* */ public void setKfqk(String kfqk) { +/* 221 */ this.kfqk = kfqk; +/* */ } +/* */ +/* */ +/* */ public String getKfqk() { +/* 226 */ return this.kfqk; +/* */ } +/* */ +/* */ public void setJdjg(String jdjg) { +/* 230 */ this.jdjg = jdjg; +/* */ } +/* */ +/* */ +/* */ public String getJdjg() { +/* 235 */ return this.jdjg; +/* */ } +/* */ +/* */ public void setJdyj(String jdyj) { +/* 239 */ this.jdyj = jdyj; +/* */ } +/* */ +/* */ +/* */ public String getJdyj() { +/* 244 */ return this.jdyj; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 248 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 253 */ return this.bz; +/* */ } +/* */ +/* */ public void setRq(String rq) { +/* 257 */ this.rq = rq; +/* */ } +/* */ +/* */ +/* */ public String getRq() { +/* 262 */ return this.rq; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 267 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 268 */ .append("id", getId()) +/* 269 */ .append("ownerId", getOwnerId()) +/* 270 */ .append("ownerType", getOwnerType()) +/* 271 */ .append("archiveTypeId", getArchiveTypeId()) +/* 272 */ .append("archiveTypeName", getArchiveTypeName()) +/* 273 */ .append("archiveTableId", getArchiveTableId()) +/* 274 */ .append("archiveId", getArchiveId()) +/* 275 */ .append("dh", getDh()) +/* 276 */ .append("tm", getTm()) +/* 277 */ .append("zrz", getZrz()) +/* 278 */ .append("nd", getNd()) +/* 279 */ .append("qzh", getQzh()) +/* 280 */ .append("bgqx", getBgqx()) +/* 281 */ .append("mj", getMj()) +/* 282 */ .append("kfqk", getKfqk()) +/* 283 */ .append("jdjg", getJdjg()) +/* 284 */ .append("jdyj", getJdyj()) +/* 285 */ .append("bz", getBz()) +/* 286 */ .append("rq", getRq()) +/* 287 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\jdmx\domain\TJdTaskDetail.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/jdmx/mapper/TJdTaskDetailMapper.java b/src/main/java/com/archive/project/dazl/jdmx/mapper/TJdTaskDetailMapper.java new file mode 100644 index 0000000..6d27a50 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/jdmx/mapper/TJdTaskDetailMapper.java @@ -0,0 +1,28 @@ +package com.archive.project.dazl.jdmx.mapper + +-INF.classes.com.archive.project.dazl.jdmx.mapper; + +import com.archive.project.dazl.jdmx.domain.TJdTaskDetail; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface TJdTaskDetailMapper { + TJdTaskDetail selectTJdTaskDetailById(Long paramLong); + + List selectTJdTaskDetailList(TJdTaskDetail paramTJdTaskDetail); + + int insertTJdTaskDetail(TJdTaskDetail paramTJdTaskDetail); + + int updateTJdTaskDetail(TJdTaskDetail paramTJdTaskDetail); + + int deleteTJdTaskDetailById(Long paramLong); + + int deleteTJdTaskDetailByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\jdmx\mapper\TJdTaskDetailMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/jdmx/service/ITJdTaskDetailService.java b/src/main/java/com/archive/project/dazl/jdmx/service/ITJdTaskDetailService.java new file mode 100644 index 0000000..f45fa58 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/jdmx/service/ITJdTaskDetailService.java @@ -0,0 +1,30 @@ +package com.archive.project.dazl.jdmx.service + +-INF.classes.com.archive.project.dazl.jdmx.service; + +import com.archive.project.dazl.jdmx.domain.TJdTaskDetail; +import java.util.List; + +public interface ITJdTaskDetailService { + TJdTaskDetail selectTJdTaskDetailById(Long paramLong); + + List selectTJdTaskDetailList(TJdTaskDetail paramTJdTaskDetail); + + int insertTJdTaskDetail(TJdTaskDetail paramTJdTaskDetail); + + int updateTJdTaskDetail(TJdTaskDetail paramTJdTaskDetail); + + int deleteTJdTaskDetailByIds(String paramString); + + int deleteTJdTaskDetailById(Long paramLong); + + boolean saveJdDetail(String paramString1, String paramString2); + + boolean saveJdPljdDetail(String paramString1, String paramString2); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\jdmx\service\ITJdTaskDetailService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/jdmx/service/impl/TJdTaskDetailServiceImpl.java b/src/main/java/com/archive/project/dazl/jdmx/service/impl/TJdTaskDetailServiceImpl.java new file mode 100644 index 0000000..c06dcfb --- /dev/null +++ b/src/main/java/com/archive/project/dazl/jdmx/service/impl/TJdTaskDetailServiceImpl.java @@ -0,0 +1,189 @@ +/* */ package com.archive.project.dazl.jdmx.service.impl + +-INF.classes.com.archive.project.dazl.jdmx.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dazl.dajd.domain.TJdTask; +/* */ import com.archive.project.dazl.dajd.service.ITJdTaskService; +/* */ import com.archive.project.dazl.jdmx.domain.TJdTaskDetail; +/* */ import com.archive.project.dazl.jdmx.mapper.TJdTaskDetailMapper; +/* */ import com.archive.project.dazl.jdmx.service.ITJdTaskDetailService; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TJdTaskDetailServiceImpl +/* */ implements ITJdTaskDetailService +/* */ { +/* */ @Autowired +/* */ private TJdTaskDetailMapper tJdTaskDetailMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private ITJdTaskService jdTaskService; +/* */ +/* */ public TJdTaskDetail selectTJdTaskDetailById(Long id) { +/* 47 */ return this.tJdTaskDetailMapper.selectTJdTaskDetailById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTJdTaskDetailList(TJdTaskDetail tJdTaskDetail) { +/* 59 */ return this.tJdTaskDetailMapper.selectTJdTaskDetailList(tJdTaskDetail); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTJdTaskDetail(TJdTaskDetail tJdTaskDetail) { +/* 71 */ return this.tJdTaskDetailMapper.insertTJdTaskDetail(tJdTaskDetail); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTJdTaskDetail(TJdTaskDetail tJdTaskDetail) { +/* 83 */ return this.tJdTaskDetailMapper.updateTJdTaskDetail(tJdTaskDetail); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTJdTaskDetailByIds(String ids) { +/* 95 */ return this.tJdTaskDetailMapper.deleteTJdTaskDetailByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTJdTaskDetailById(Long id) { +/* 107 */ return this.tJdTaskDetailMapper.deleteTJdTaskDetailById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean saveJdDetail(String ownerId, String ids) { +/* 118 */ boolean res = false; +/* */ try { +/* 120 */ String[] sttr = ids.split(","); +/* 121 */ for (int i = 0; i < sttr.length; i++) { +/* 122 */ String[] idcode = sttr[i].split("-"); +/* 123 */ String archiveId = idcode[0]; +/* 124 */ String tableId = idcode[1]; +/* 125 */ String sql = "select qzh,dh,tm,ys,bgqx,zrz,archiveTypeId,archiveTypeName,kfkz,mj,rq,yearCode from t_ar_total where archiveId='" + archiveId + "' and tableId='" + tableId + "'"; +/* */ +/* 127 */ List> datalist = this.executeSqlService.queryList(sql); +/* 128 */ if (datalist.size() > 0 && datalist.get(0) != null) { +/* 129 */ TJdTaskDetail jdTaskDetail = new TJdTaskDetail(); +/* 130 */ jdTaskDetail.setOwnerId(Long.valueOf(Long.parseLong(ownerId))); +/* 131 */ jdTaskDetail.setArchiveId(Long.valueOf(Long.parseLong(archiveId))); +/* 132 */ jdTaskDetail.setArchiveTableId(Long.valueOf(Long.parseLong(tableId))); +/* */ +/* 134 */ TJdTask jdTask = new TJdTask(); +/* 135 */ jdTask.setId(Long.valueOf(Long.parseLong(ownerId))); +/* 136 */ List jdTaskList = this.jdTaskService.selectTJdTaskList(jdTask); +/* 137 */ if (jdTaskList != null && jdTaskList.size() > 0 && jdTaskList.get(0) != null) { +/* 138 */ jdTaskDetail.setOwnerType(((TJdTask)jdTaskList.get(0)).getTaskType()); +/* */ } +/* 140 */ String archiveTypeId = (((LinkedHashMap)datalist.get(0)).get("archiveTypeId") == null) ? "0" : ((LinkedHashMap)datalist.get(0)).get("archiveTypeId").toString(); +/* 141 */ jdTaskDetail.setArchiveTypeId(Long.valueOf(Long.parseLong(archiveTypeId))); +/* 142 */ jdTaskDetail.setArchiveTypeName((((LinkedHashMap)datalist.get(0)).get("archiveTypeName") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("archiveTypeName").toString()); +/* 143 */ jdTaskDetail.setZrz((((LinkedHashMap)datalist.get(0)).get("zrz") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("zrz").toString()); +/* 144 */ jdTaskDetail.setBgqx((((LinkedHashMap)datalist.get(0)).get("bgqx") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("bgqx").toString()); +/* 145 */ jdTaskDetail.setDh((((LinkedHashMap)datalist.get(0)).get("dh") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("dh").toString()); +/* 146 */ jdTaskDetail.setQzh((((LinkedHashMap)datalist.get(0)).get("qzh") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("qzh").toString()); +/* 147 */ jdTaskDetail.setKfqk((((LinkedHashMap)datalist.get(0)).get("kfkz") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("kfkz").toString()); +/* 148 */ jdTaskDetail.setTm((((LinkedHashMap)datalist.get(0)).get("tm") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("tm").toString()); +/* 149 */ jdTaskDetail.setMj((((LinkedHashMap)datalist.get(0)).get("mj") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("mj").toString()); +/* 150 */ jdTaskDetail.setNd((((LinkedHashMap)datalist.get(0)).get("yearCode") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("yearCode").toString()); +/* 151 */ jdTaskDetail.setRq((((LinkedHashMap)datalist.get(0)).get("rq") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("rq").toString()); +/* 152 */ this.tJdTaskDetailMapper.insertTJdTaskDetail(jdTaskDetail); +/* */ } else { +/* 154 */ System.out.println("没有查询到数据"); +/* */ } +/* */ } +/* 157 */ res = true; +/* 158 */ } catch (Exception ex) { +/* 159 */ System.out.println("ERROR出现异常:" + ex.getMessage()); +/* */ } +/* 161 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean saveJdPljdDetail(String value, String ids) { +/* 172 */ boolean res = false; +/* 173 */ String[] idsttr = ids.split(","); +/* 174 */ for (int i = 0; i < idsttr.length; i++) { +/* 175 */ TJdTaskDetail jdTaskDetail = this.tJdTaskDetailMapper.selectTJdTaskDetailById(Long.valueOf(Long.parseLong(idsttr[i]))); +/* 176 */ jdTaskDetail.setJdjg(value); +/* 177 */ this.tJdTaskDetailMapper.updateTJdTaskDetail(jdTaskDetail); +/* */ } +/* 179 */ return res; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\jdmx\service\impl\TJdTaskDetailServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/wsnj/controller/TWsnjController.java b/src/main/java/com/archive/project/dazl/wsnj/controller/TWsnjController.java new file mode 100644 index 0000000..6e81a22 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/wsnj/controller/TWsnjController.java @@ -0,0 +1,135 @@ +/* */ package com.archive.project.dazl.wsnj.controller + +-INF.classes.com.archive.project.dazl.wsnj.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dazl.wsnj.domain.TWsnj; +/* */ import com.archive.project.dazl.wsnj.service.ITWsnjService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/dazl/wsnj"}) +/* */ public class TWsnjController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "dazl/wsnj"; +/* */ +/* */ @Autowired +/* */ private ITWsnjService tWsnjService; +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:wsnj:view"}) +/* */ @GetMapping +/* */ public String wsnj() { +/* 41 */ return this.prefix + "/wsnj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:wsnj:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(TWsnj tWsnj) { +/* 52 */ startPage(); +/* 53 */ List list = this.tWsnjService.selectTWsnjList(tWsnj); +/* 54 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:wsnj:export"}) +/* */ @Log(title = "年检通知", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TWsnj tWsnj) { +/* 66 */ List list = this.tWsnjService.selectTWsnjList(tWsnj); +/* 67 */ ExcelUtil util = new ExcelUtil(TWsnj.class); +/* 68 */ return util.exportExcel(list, "wsnj"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 77 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:wsnj:add"}) +/* */ @Log(title = "年检通知", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TWsnj tWsnj) { +/* 89 */ tWsnj.setXfzt("0"); +/* 90 */ return toAjax(this.tWsnjService.insertTWsnj(tWsnj)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 99 */ TWsnj tWsnj = this.tWsnjService.selectTWsnjById(id); +/* 100 */ mmap.put("tWsnj", tWsnj); +/* 101 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:wsnj:edit"}) +/* */ @Log(title = "年检通知", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TWsnj tWsnj) { +/* 113 */ return toAjax(this.tWsnjService.updateTWsnj(tWsnj)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"dazl:wsnj:remove"}) +/* */ @Log(title = "年检通知", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 125 */ return toAjax(this.tWsnjService.deleteTWsnjByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\wsnj\controller\TWsnjController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/wsnj/domain/TWsnj.java b/src/main/java/com/archive/project/dazl/wsnj/domain/TWsnj.java new file mode 100644 index 0000000..4d3f40e --- /dev/null +++ b/src/main/java/com/archive/project/dazl/wsnj/domain/TWsnj.java @@ -0,0 +1,143 @@ +/* */ package com.archive.project.dazl.wsnj.domain + +-INF.classes.com.archive.project.dazl.wsnj.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TWsnj +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "年检名称") +/* */ private String njmc; +/* */ @Excel(name = "通知内容") +/* */ private String tznr; +/* */ @Excel(name = "年检时间") +/* */ private String njsj; +/* */ @Excel(name = "下发单位") +/* */ private String xfdw; +/* */ @Excel(name = "创建单位") +/* */ private String cjdw; +/* */ @Excel(name = "下发状态") +/* */ private String xfzt; +/* */ @Excel(name = "备注") +/* */ private String bz; +/* */ +/* */ public void setId(Long id) { +/* 51 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 56 */ return this.id; +/* */ } +/* */ +/* */ public void setNjmc(String njmc) { +/* 60 */ this.njmc = njmc; +/* */ } +/* */ +/* */ +/* */ public String getNjmc() { +/* 65 */ return this.njmc; +/* */ } +/* */ +/* */ public void setTznr(String tznr) { +/* 69 */ this.tznr = tznr; +/* */ } +/* */ +/* */ +/* */ public String getTznr() { +/* 74 */ return this.tznr; +/* */ } +/* */ +/* */ public void setNjsj(String njsj) { +/* 78 */ this.njsj = njsj; +/* */ } +/* */ +/* */ +/* */ public String getNjsj() { +/* 83 */ return this.njsj; +/* */ } +/* */ +/* */ public void setXfdw(String xfdw) { +/* 87 */ this.xfdw = xfdw; +/* */ } +/* */ +/* */ +/* */ public String getXfdw() { +/* 92 */ return this.xfdw; +/* */ } +/* */ +/* */ public void setCjdw(String cjdw) { +/* 96 */ this.cjdw = cjdw; +/* */ } +/* */ +/* */ +/* */ public String getCjdw() { +/* 101 */ return this.cjdw; +/* */ } +/* */ +/* */ public void setXfzt(String xfzt) { +/* 105 */ this.xfzt = xfzt; +/* */ } +/* */ +/* */ +/* */ public String getXfzt() { +/* 110 */ return this.xfzt; +/* */ } +/* */ +/* */ public void setBz(String bz) { +/* 114 */ this.bz = bz; +/* */ } +/* */ +/* */ +/* */ public String getBz() { +/* 119 */ return this.bz; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 124 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 125 */ .append("id", getId()) +/* 126 */ .append("njmc", getNjmc()) +/* 127 */ .append("tznr", getTznr()) +/* 128 */ .append("njsj", getNjsj()) +/* 129 */ .append("xfdw", getXfdw()) +/* 130 */ .append("cjdw", getCjdw()) +/* 131 */ .append("xfzt", getXfzt()) +/* 132 */ .append("bz", getBz()) +/* 133 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\wsnj\domain\TWsnj.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/wsnj/mapper/TWsnjMapper.java b/src/main/java/com/archive/project/dazl/wsnj/mapper/TWsnjMapper.java new file mode 100644 index 0000000..7519e75 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/wsnj/mapper/TWsnjMapper.java @@ -0,0 +1,26 @@ +package com.archive.project.dazl.wsnj.mapper + +-INF.classes.com.archive.project.dazl.wsnj.mapper; + +import com.archive.project.dazl.wsnj.domain.TWsnj; +import java.util.List; + +public interface TWsnjMapper { + TWsnj selectTWsnjById(Long paramLong); + + List selectTWsnjList(TWsnj paramTWsnj); + + int insertTWsnj(TWsnj paramTWsnj); + + int updateTWsnj(TWsnj paramTWsnj); + + int deleteTWsnjById(Long paramLong); + + int deleteTWsnjByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\wsnj\mapper\TWsnjMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/wsnj/service/ITWsnjService.java b/src/main/java/com/archive/project/dazl/wsnj/service/ITWsnjService.java new file mode 100644 index 0000000..f687299 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/wsnj/service/ITWsnjService.java @@ -0,0 +1,24 @@ +package com.archive.project.dazl.wsnj.service; + +import com.archive.project.dazl.wsnj.domain.TWsnj; +import java.util.List; + +public interface ITWsnjService { + TWsnj selectTWsnjById(Long paramLong); + + List selectTWsnjList(TWsnj paramTWsnj); + + int insertTWsnj(TWsnj paramTWsnj); + + int updateTWsnj(TWsnj paramTWsnj); + + int deleteTWsnjByIds(String paramString); + + int deleteTWsnjById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\wsnj\service\ITWsnjService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/dazl/wsnj/service/impl/TWsnjServiceImpl.java b/src/main/java/com/archive/project/dazl/wsnj/service/impl/TWsnjServiceImpl.java new file mode 100644 index 0000000..775f913 --- /dev/null +++ b/src/main/java/com/archive/project/dazl/wsnj/service/impl/TWsnjServiceImpl.java @@ -0,0 +1,102 @@ +/* */ package com.archive.project.dazl.wsnj.service.impl + +-INF.classes.com.archive.project.dazl.wsnj.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.dazl.wsnj.domain.TWsnj; +/* */ import com.archive.project.dazl.wsnj.mapper.TWsnjMapper; +/* */ import com.archive.project.dazl.wsnj.service.ITWsnjService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TWsnjServiceImpl +/* */ implements ITWsnjService +/* */ { +/* */ @Autowired +/* */ private TWsnjMapper tWsnjMapper; +/* */ +/* */ public TWsnj selectTWsnjById(Long id) { +/* 32 */ return this.tWsnjMapper.selectTWsnjById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTWsnjList(TWsnj tWsnj) { +/* 44 */ return this.tWsnjMapper.selectTWsnjList(tWsnj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTWsnj(TWsnj tWsnj) { +/* 56 */ return this.tWsnjMapper.insertTWsnj(tWsnj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTWsnj(TWsnj tWsnj) { +/* 68 */ return this.tWsnjMapper.updateTWsnj(tWsnj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTWsnjByIds(String ids) { +/* 80 */ return this.tWsnjMapper.deleteTWsnjByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTWsnjById(Long id) { +/* 92 */ return this.tWsnjMapper.deleteTWsnjById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\wsnj\service\impl\TWsnjServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/controller/DemoDialogController.java b/src/main/java/com/archive/project/demo/controller/DemoDialogController.java new file mode 100644 index 0000000..1e178e2 --- /dev/null +++ b/src/main/java/com/archive/project/demo/controller/DemoDialogController.java @@ -0,0 +1,88 @@ +/* */ package com.archive.project.demo.controller + +-INF.classes.com.archive.project.demo.controller; +/* */ +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/demo/modal"}) +/* */ public class DemoDialogController +/* */ { +/* 16 */ private String prefix = "demo/modal"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/dialog"}) +/* */ public String dialog() { +/* 24 */ return this.prefix + "/dialog"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/layer"}) +/* */ public String layer() { +/* 33 */ return this.prefix + "/layer"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/form"}) +/* */ public String form() { +/* 42 */ return this.prefix + "/form"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/table"}) +/* */ public String table() { +/* 51 */ return this.prefix + "/table"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/check"}) +/* */ public String check() { +/* 60 */ return this.prefix + "/table/check"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/radio"}) +/* */ public String radio() { +/* 69 */ return this.prefix + "/table/radio"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/parent"}) +/* */ public String parent() { +/* 78 */ return this.prefix + "/table/parent"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\controller\DemoDialogController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/controller/DemoFormController.java b/src/main/java/com/archive/project/demo/controller/DemoFormController.java new file mode 100644 index 0000000..8833fde --- /dev/null +++ b/src/main/java/com/archive/project/demo/controller/DemoFormController.java @@ -0,0 +1,327 @@ +/* */ package com.archive.project.demo.controller; +/* */ +/* */ import com.alibaba.fastjson.JSON; +/* */ import com.alibaba.fastjson.JSONArray; +/* */ import com.alibaba.fastjson.JSONObject; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.domain.CxSelect; +/* */ import com.archive.project.demo.controller.UserFormModel; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/demo/form"}) +/* */ public class DemoFormController +/* */ { +/* */ private String prefix; +/* */ +/* */ public DemoFormController() { +/* 27 */ this.prefix = "demo/form"; +/* */ +/* */ +/* */ +/* 31 */ users.add(new UserFormModel(1, "1000001", "测试1", "15888888888")); +/* 32 */ users.add(new UserFormModel(2, "1000002", "测试2", "15666666666")); +/* 33 */ users.add(new UserFormModel(3, "1000003", "测试3", "15666666666")); +/* 34 */ users.add(new UserFormModel(4, "1000004", "测试4", "15666666666")); +/* 35 */ users.add(new UserFormModel(5, "1000005", "测试5", "15666666666")); +/* */ } +/* */ +/* */ +/* */ private static final List users = new ArrayList<>(); +/* */ +/* */ +/* */ @GetMapping({"/button"}) +/* */ public String button() { +/* 44 */ return this.prefix + "/button"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/select"}) +/* */ public String select() { +/* 53 */ return this.prefix + "/select"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/timeline"}) +/* */ public String timeline() { +/* 62 */ return this.prefix + "/timeline"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/validate"}) +/* */ public String validate() { +/* 71 */ return this.prefix + "/validate"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/jasny"}) +/* */ public String jasny() { +/* 80 */ return this.prefix + "/jasny"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/sortable"}) +/* */ public String sortable() { +/* 89 */ return this.prefix + "/sortable"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/invoice"}) +/* */ public String invoice() { +/* 98 */ return this.prefix + "/invoice"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/labels_tips"}) +/* */ public String labels_tips() { +/* 107 */ return this.prefix + "/labels_tips"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/tabs_panels"}) +/* */ public String tabs_panels() { +/* 116 */ return this.prefix + "/tabs_panels"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/grid"}) +/* */ public String grid() { +/* 125 */ return this.prefix + "/grid"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/wizard"}) +/* */ public String wizard() { +/* 134 */ return this.prefix + "/wizard"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/upload"}) +/* */ public String upload() { +/* 143 */ return this.prefix + "/upload"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/datetime"}) +/* */ public String datetime() { +/* 152 */ return this.prefix + "/datetime"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/duallistbox"}) +/* */ public String duallistbox() { +/* 161 */ return this.prefix + "/duallistbox"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/basic"}) +/* */ public String basic() { +/* 170 */ return this.prefix + "/basic"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/cards"}) +/* */ public String cards() { +/* 179 */ return this.prefix + "/cards"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/summernote"}) +/* */ public String summernote() { +/* 188 */ return this.prefix + "/summernote"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/autocomplete"}) +/* */ public String autocomplete() { +/* 197 */ return this.prefix + "/autocomplete"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/cxselect"}) +/* */ public String cxselect(ModelMap mmap) { +/* 206 */ CxSelect cxSelectTB = new CxSelect(); +/* 207 */ cxSelectTB.setN("淘宝"); +/* 208 */ cxSelectTB.setV("taobao"); +/* 209 */ CxSelect cxSelectTm = new CxSelect(); +/* 210 */ cxSelectTm.setN("天猫"); +/* 211 */ cxSelectTm.setV("tm"); +/* 212 */ CxSelect cxSelectJhs = new CxSelect(); +/* 213 */ cxSelectJhs.setN("聚划算"); +/* 214 */ cxSelectJhs.setV("jhs"); +/* 215 */ List tmList = new ArrayList<>(); +/* 216 */ tmList.add(cxSelectTm); +/* 217 */ tmList.add(cxSelectJhs); +/* 218 */ cxSelectTB.setS(tmList); +/* */ +/* 220 */ CxSelect cxSelectJD = new CxSelect(); +/* 221 */ cxSelectJD.setN("京东"); +/* 222 */ cxSelectJD.setV("jd"); +/* 223 */ CxSelect cxSelectCs = new CxSelect(); +/* 224 */ cxSelectCs.setN("京东超市"); +/* 225 */ cxSelectCs.setV("jdcs"); +/* 226 */ CxSelect cxSelectSx = new CxSelect(); +/* 227 */ cxSelectSx.setN("京东生鲜"); +/* 228 */ cxSelectSx.setV("jdsx"); +/* 229 */ List jdList = new ArrayList<>(); +/* 230 */ jdList.add(cxSelectCs); +/* 231 */ jdList.add(cxSelectSx); +/* 232 */ cxSelectJD.setS(jdList); +/* */ +/* 234 */ List cxList = new ArrayList<>(); +/* 235 */ cxList.add(cxSelectTB); +/* 236 */ cxList.add(cxSelectJD); +/* */ +/* 238 */ mmap.put("data", JSON.toJSON(cxList)); +/* 239 */ return this.prefix + "/cxselect"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/localrefresh"}) +/* */ public String localRefresh(ModelMap mmap) { +/* 248 */ JSONArray list = new JSONArray(); +/* 249 */ JSONObject item = new JSONObject(); +/* 250 */ item.put("name", "这条任务数据是由ModelMap传递到页面的,点击添加按钮后会将这条数据替换为新数据"); +/* 251 */ item.put("type", "默认"); +/* 252 */ item.put("date", "2020.06.10"); +/* 253 */ list.add(item); +/* 254 */ mmap.put("tasks", list); +/* 255 */ mmap.put("min", Integer.valueOf(2)); +/* 256 */ mmap.put("max", Integer.valueOf(10)); +/* 257 */ return this.prefix + "/localrefresh"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/localrefresh/task"}) +/* */ public String localRefreshTask(String fragment, String taskName, ModelMap mmap) { +/* 269 */ JSONArray list = new JSONArray(); +/* 270 */ JSONObject item = new JSONObject(); +/* 271 */ item.put("name", StringUtils.defaultIfBlank(taskName, "通过电话销售过程中了解各盛市的设备仪器使用、采购情况及相关重要追踪人")); +/* 272 */ item.put("type", "新增"); +/* 273 */ item.put("date", "2018.06.10"); +/* 274 */ list.add(item); +/* 275 */ item = new JSONObject(); +/* 276 */ item.put("name", "提高自己电话营销技巧,灵活专业地与客户进行电话交流"); +/* 277 */ item.put("type", "新增"); +/* 278 */ item.put("date", "2018.06.12"); +/* 279 */ list.add(item); +/* 280 */ mmap.put("tasks", list); +/* 281 */ return this.prefix + "/localrefresh::" + fragment; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/cityData"}) +/* */ @ResponseBody +/* */ public String cityData() { +/* 291 */ String data = "[{\"n\":\"湖南省\",\"s\":[{\"n\":\"长沙市\",\"s\":[{\"n\":\"芙蓉区\"},{\"n\":\"天心区\"},{\"n\":\"岳麓区\"},{\"n\":\"开福区\"},{\"n\":\"雨花区\"},{\"n\":\"望城区\"},{\"n\":\"长沙县\"},{\"n\":\"宁乡县\"},{\"n\":\"浏阳市\"}]},{\"n\":\"株洲市\",\"s\":[{\"n\":\"荷塘区\"},{\"n\":\"芦淞区\"},{\"n\":\"石峰区\"},{\"n\":\"天元区\"},{\"n\":\"株洲县\"},{\"n\":\"攸县\"},{\"n\":\"茶陵县\"},{\"n\":\"炎陵县\"},{\"n\":\"醴陵市\"}]},{\"n\":\"湘潭市\",\"s\":[{\"n\":\"雨湖区\"},{\"n\":\"岳塘区\"},{\"n\":\"湘潭县\"},{\"n\":\"湘乡市\"},{\"n\":\"韶山市\"}]},{\"n\":\"衡阳市\",\"s\":[{\"n\":\"珠晖区\"},{\"n\":\"雁峰区\"},{\"n\":\"石鼓区\"},{\"n\":\"蒸湘区\"},{\"n\":\"南岳区\"},{\"n\":\"衡阳县\"},{\"n\":\"衡南县\"},{\"n\":\"衡山县\"},{\"n\":\"衡东县\"},{\"n\":\"祁东县\"},{\"n\":\"耒阳市\"},{\"n\":\"常宁市\"}]},{\"n\":\"邵阳市\",\"s\":[{\"n\":\"双清区\"},{\"n\":\"大祥区\"},{\"n\":\"北塔区\"},{\"n\":\"邵东县\"},{\"n\":\"新邵县\"},{\"n\":\"邵阳县\"},{\"n\":\"隆回县\"},{\"n\":\"洞口县\"},{\"n\":\"绥宁县\"},{\"n\":\"新宁县\"},{\"n\":\"城步苗族自治县\"},{\"n\":\"武冈市\"}]},{\"n\":\"岳阳市\",\"s\":[{\"n\":\"岳阳楼区\"},{\"n\":\"云溪区\"},{\"n\":\"君山区\"},{\"n\":\"岳阳县\"},{\"n\":\"华容县\"},{\"n\":\"湘阴县\"},{\"n\":\"平江县\"},{\"n\":\"汨罗市\"},{\"n\":\"临湘市\"}]},{\"n\":\"常德市\",\"s\":[{\"n\":\"武陵区\"},{\"n\":\"鼎城区\"},{\"n\":\"安乡县\"},{\"n\":\"汉寿县\"},{\"n\":\"澧县\"},{\"n\":\"临澧县\"},{\"n\":\"桃源县\"},{\"n\":\"石门县\"},{\"n\":\"津市市\"}]},{\"n\":\"张家界市\",\"s\":[{\"n\":\"永定区\"},{\"n\":\"武陵源区\"},{\"n\":\"慈利县\"},{\"n\":\"桑植县\"}]},{\"n\":\"益阳市\",\"s\":[{\"n\":\"资阳区\"},{\"n\":\"赫山区\"},{\"n\":\"南县\"},{\"n\":\"桃江县\"},{\"n\":\"安化县\"},{\"n\":\"沅江市\"}]},{\"n\":\"郴州市\",\"s\":[{\"n\":\"北湖区\"},{\"n\":\"苏仙区\"},{\"n\":\"桂阳县\"},{\"n\":\"宜章县\"},{\"n\":\"永兴县\"},{\"n\":\"嘉禾县\"},{\"n\":\"临武县\"},{\"n\":\"汝城县\"},{\"n\":\"桂东县\"},{\"n\":\"安仁县\"},{\"n\":\"资兴市\"}]},{\"n\":\"永州市\",\"s\":[{\"n\":\"零陵区\"},{\"n\":\"冷水滩区\"},{\"n\":\"祁阳县\"},{\"n\":\"东安县\"},{\"n\":\"双牌县\"},{\"n\":\"道县\"},{\"n\":\"江永县\"},{\"n\":\"宁远县\"},{\"n\":\"蓝山县\"},{\"n\":\"新田县\"},{\"n\":\"江华瑶族自治县\"}]},{\"n\":\"怀化市\",\"s\":[{\"n\":\"鹤城区\"},{\"n\":\"中方县\"},{\"n\":\"沅陵县\"},{\"n\":\"辰溪县\"},{\"n\":\"溆浦县\"},{\"n\":\"会同县\"},{\"n\":\"麻阳苗族自治县\"},{\"n\":\"新晃侗族自治县\"},{\"n\":\"芷江侗族自治县\"},{\"n\":\"靖州苗族侗族自治县\"},{\"n\":\"通道侗族自治县\"},{\"n\":\"洪江市\"}]},{\"n\":\"娄底市\",\"s\":[{\"n\":\"娄星区\"},{\"n\":\"双峰县\"},{\"n\":\"新化县\"},{\"n\":\"冷水江市\"},{\"n\":\"涟源市\"}]},{\"n\":\"湘西土家族苗族自治州\",\"s\":[{\"n\":\"吉首市\"},{\"n\":\"泸溪县\"},{\"n\":\"凤凰县\"},{\"n\":\"花垣县\"},{\"n\":\"保靖县\"},{\"n\":\"古丈县\"},{\"n\":\"永顺县\"},{\"n\":\"龙山县\"}]}]},{\"n\":\"广东省\",\"s\":[{\"n\":\"广州市\",\"s\":[{\"n\":\"荔湾区\"},{\"n\":\"越秀区\"},{\"n\":\"海珠区\"},{\"n\":\"天河区\"},{\"n\":\"白云区\"},{\"n\":\"黄埔区\"},{\"n\":\"番禺区\"},{\"n\":\"花都区\"},{\"n\":\"南沙区\"},{\"n\":\"萝岗区\"},{\"n\":\"增城市\"},{\"n\":\"从化市\"}]},{\"n\":\"韶关市\",\"s\":[{\"n\":\"武江区\"},{\"n\":\"浈江区\"},{\"n\":\"曲江区\"},{\"n\":\"始兴县\"},{\"n\":\"仁化县\"},{\"n\":\"翁源县\"},{\"n\":\"乳源瑶族自治县\"},{\"n\":\"新丰县\"},{\"n\":\"乐昌市\"},{\"n\":\"南雄市\"}]},{\"n\":\"深圳市\",\"s\":[{\"n\":\"罗湖区\"},{\"n\":\"福田区\"},{\"n\":\"南山区\"},{\"n\":\"宝安区\"},{\"n\":\"龙岗区\"},{\"n\":\"盐田区\"}]},{\"n\":\"珠海市\",\"s\":[{\"n\":\"香洲区\"},{\"n\":\"斗门区\"},{\"n\":\"金湾区\"}]},{\"n\":\"汕头市\",\"s\":[{\"n\":\"龙湖区\"},{\"n\":\"金平区\"},{\"n\":\"濠江区\"},{\"n\":\"潮阳区\"},{\"n\":\"潮南区\"},{\"n\":\"澄海区\"},{\"n\":\"南澳县\"}]},{\"n\":\"佛山市\",\"s\":[{\"n\":\"禅城区\"},{\"n\":\"南海区\"},{\"n\":\"顺德区\"},{\"n\":\"三水区\"},{\"n\":\"高明区\"}]},{\"n\":\"江门市\",\"s\":[{\"n\":\"蓬江区\"},{\"n\":\"江海区\"},{\"n\":\"新会区\"},{\"n\":\"台山市\"},{\"n\":\"开平市\"},{\"n\":\"鹤山市\"},{\"n\":\"恩平市\"}]},{\"n\":\"湛江市\",\"s\":[{\"n\":\"赤坎区\"},{\"n\":\"霞山区\"},{\"n\":\"坡头区\"},{\"n\":\"麻章区\"},{\"n\":\"遂溪县\"},{\"n\":\"徐闻县\"},{\"n\":\"廉江市\"},{\"n\":\"雷州市\"},{\"n\":\"吴川市\"}]},{\"n\":\"茂名市\",\"s\":[{\"n\":\"茂南区\"},{\"n\":\"茂港区\"},{\"n\":\"电白县\"},{\"n\":\"高州市\"},{\"n\":\"化州市\"},{\"n\":\"信宜市\"}]},{\"n\":\"肇庆市\",\"s\":[{\"n\":\"端州区\"},{\"n\":\"鼎湖区\"},{\"n\":\"广宁县\"},{\"n\":\"怀集县\"},{\"n\":\"封开县\"},{\"n\":\"德庆县\"},{\"n\":\"高要市\"},{\"n\":\"四会市\"}]},{\"n\":\"惠州市\",\"s\":[{\"n\":\"惠城区\"},{\"n\":\"惠阳区\"},{\"n\":\"博罗县\"},{\"n\":\"惠东县\"},{\"n\":\"龙门县\"}]},{\"n\":\"梅州市\",\"s\":[{\"n\":\"梅江区\"},{\"n\":\"梅县\"},{\"n\":\"大埔县\"},{\"n\":\"丰顺县\"},{\"n\":\"五华县\"},{\"n\":\"平远县\"},{\"n\":\"蕉岭县\"},{\"n\":\"兴宁市\"}]},{\"n\":\"汕尾市\",\"s\":[{\"n\":\"城区\"},{\"n\":\"海丰县\"},{\"n\":\"陆河县\"},{\"n\":\"陆丰市\"}]},{\"n\":\"河源市\",\"s\":[{\"n\":\"源城区\"},{\"n\":\"紫金县\"},{\"n\":\"龙川县\"},{\"n\":\"连平县\"},{\"n\":\"和平县\"},{\"n\":\"东源县\"}]},{\"n\":\"阳江市\",\"s\":[{\"n\":\"江城区\"},{\"n\":\"阳西县\"},{\"n\":\"阳东县\"},{\"n\":\"阳春市\"}]},{\"n\":\"清远市\",\"s\":[{\"n\":\"清城区\"},{\"n\":\"清新区\"},{\"n\":\"佛冈县\"},{\"n\":\"阳山县\"},{\"n\":\"连山壮族瑶族自治县\"},{\"n\":\"连南瑶族自治县\"},{\"n\":\"英德市\"},{\"n\":\"连州市\"}]},{\"n\":\"东莞市\"},{\"n\":\"中山市\"},{\"n\":\"潮州市\",\"s\":[{\"n\":\"湘桥区\"},{\"n\":\"潮安区\"},{\"n\":\"饶平县\"}]},{\"n\":\"揭阳市\",\"s\":[{\"n\":\"榕城区\"},{\"n\":\"揭东区\"},{\"n\":\"揭西县\"},{\"n\":\"惠来县\"},{\"n\":\"普宁市\"}]},{\"n\":\"云浮市\",\"s\":[{\"n\":\"云城区\"},{\"n\":\"新兴县\"},{\"n\":\"郁南县\"},{\"n\":\"云安县\"},{\"n\":\"罗定市\"}]}]}]"; +/* 292 */ return data; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/userModel"}) +/* */ @ResponseBody +/* */ public AjaxResult userModel() { +/* 302 */ AjaxResult ajax = new AjaxResult(); +/* */ +/* 304 */ ajax.put("code", Integer.valueOf(200)); +/* 305 */ ajax.put("value", users); +/* 306 */ return ajax; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/collection"}) +/* */ @ResponseBody +/* */ public AjaxResult collection() { +/* 316 */ String[] array = { "archive 1", "archive 2", "archive 3", "archive 4", "archive 5" }; +/* 317 */ AjaxResult ajax = new AjaxResult(); +/* 318 */ ajax.put("value", array); +/* 319 */ return ajax; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\controller\DemoFormController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/controller/DemoIconController.java b/src/main/java/com/archive/project/demo/controller/DemoIconController.java new file mode 100644 index 0000000..00bcdbc --- /dev/null +++ b/src/main/java/com/archive/project/demo/controller/DemoIconController.java @@ -0,0 +1,43 @@ +/* */ package com.archive.project.demo.controller + +-INF.classes.com.archive.project.demo.controller; +/* */ +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/demo/icon"}) +/* */ public class DemoIconController +/* */ { +/* 16 */ private String prefix = "demo/icon"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/fontawesome"}) +/* */ public String fontAwesome() { +/* 24 */ return this.prefix + "/fontawesome"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/glyphicons"}) +/* */ public String glyphicons() { +/* 33 */ return this.prefix + "/glyphicons"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\controller\DemoIconController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/controller/DemoOperateController.java b/src/main/java/com/archive/project/demo/controller/DemoOperateController.java new file mode 100644 index 0000000..c842154 --- /dev/null +++ b/src/main/java/com/archive/project/demo/controller/DemoOperateController.java @@ -0,0 +1,334 @@ +/* */ package com.archive.project.demo.controller + +-INF.classes.com.archive.project.demo.controller; +/* */ +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.PageDomain; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.framework.web.page.TableSupport; +/* */ import com.archive.project.demo.domain.CustomerModel; +/* */ import com.archive.project.demo.domain.UserOperateModel; +/* */ import java.util.ArrayList; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ import org.springframework.web.multipart.MultipartFile; +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/demo/operate"}) +/* */ public class DemoOperateController +/* */ extends BaseController +/* */ { +/* */ private String prefix; +/* */ +/* */ public DemoOperateController() { +/* 36 */ this.prefix = "demo/operate"; +/* */ +/* */ +/* */ +/* 40 */ users.put(Integer.valueOf(1), new UserOperateModel(1, "1000001", "测试1", "0", "15888888888", "ry@qq.com", 150.0D, "0")); +/* 41 */ users.put(Integer.valueOf(2), new UserOperateModel(2, "1000002", "测试2", "1", "15666666666", "ry@qq.com", 180.0D, "1")); +/* 42 */ users.put(Integer.valueOf(3), new UserOperateModel(3, "1000003", "测试3", "0", "15666666666", "ry@qq.com", 110.0D, "1")); +/* 43 */ users.put(Integer.valueOf(4), new UserOperateModel(4, "1000004", "测试4", "1", "15666666666", "ry@qq.com", 220.0D, "1")); +/* 44 */ users.put(Integer.valueOf(5), new UserOperateModel(5, "1000005", "测试5", "0", "15666666666", "ry@qq.com", 140.0D, "1")); +/* 45 */ users.put(Integer.valueOf(6), new UserOperateModel(6, "1000006", "测试6", "1", "15666666666", "ry@qq.com", 330.0D, "1")); +/* 46 */ users.put(Integer.valueOf(7), new UserOperateModel(7, "1000007", "测试7", "0", "15666666666", "ry@qq.com", 160.0D, "1")); +/* 47 */ users.put(Integer.valueOf(8), new UserOperateModel(8, "1000008", "测试8", "1", "15666666666", "ry@qq.com", 170.0D, "1")); +/* 48 */ users.put(Integer.valueOf(9), new UserOperateModel(9, "1000009", "测试9", "0", "15666666666", "ry@qq.com", 180.0D, "1")); +/* 49 */ users.put(Integer.valueOf(10), new UserOperateModel(10, "1000010", "测试10", "0", "15666666666", "ry@qq.com", 210.0D, "1")); +/* 50 */ users.put(Integer.valueOf(11), new UserOperateModel(11, "1000011", "测试11", "1", "15666666666", "ry@qq.com", 110.0D, "1")); +/* 51 */ users.put(Integer.valueOf(12), new UserOperateModel(12, "1000012", "测试12", "0", "15666666666", "ry@qq.com", 120.0D, "1")); +/* 52 */ users.put(Integer.valueOf(13), new UserOperateModel(13, "1000013", "测试13", "1", "15666666666", "ry@qq.com", 380.0D, "1")); +/* 53 */ users.put(Integer.valueOf(14), new UserOperateModel(14, "1000014", "测试14", "0", "15666666666", "ry@qq.com", 280.0D, "1")); +/* 54 */ users.put(Integer.valueOf(15), new UserOperateModel(15, "1000015", "测试15", "0", "15666666666", "ry@qq.com", 570.0D, "1")); +/* 55 */ users.put(Integer.valueOf(16), new UserOperateModel(16, "1000016", "测试16", "1", "15666666666", "ry@qq.com", 260.0D, "1")); +/* 56 */ users.put(Integer.valueOf(17), new UserOperateModel(17, "1000017", "测试17", "1", "15666666666", "ry@qq.com", 210.0D, "1")); +/* 57 */ users.put(Integer.valueOf(18), new UserOperateModel(18, "1000018", "测试18", "1", "15666666666", "ry@qq.com", 340.0D, "1")); +/* 58 */ users.put(Integer.valueOf(19), new UserOperateModel(19, "1000019", "测试19", "1", "15666666666", "ry@qq.com", 160.0D, "1")); +/* 59 */ users.put(Integer.valueOf(20), new UserOperateModel(20, "1000020", "测试20", "1", "15666666666", "ry@qq.com", 220.0D, "1")); +/* 60 */ users.put(Integer.valueOf(21), new UserOperateModel(21, "1000021", "测试21", "1", "15666666666", "ry@qq.com", 120.0D, "1")); +/* 61 */ users.put(Integer.valueOf(22), new UserOperateModel(22, "1000022", "测试22", "1", "15666666666", "ry@qq.com", 130.0D, "1")); +/* 62 */ users.put(Integer.valueOf(23), new UserOperateModel(23, "1000023", "测试23", "1", "15666666666", "ry@qq.com", 490.0D, "1")); +/* 63 */ users.put(Integer.valueOf(24), new UserOperateModel(24, "1000024", "测试24", "1", "15666666666", "ry@qq.com", 570.0D, "1")); +/* 64 */ users.put(Integer.valueOf(25), new UserOperateModel(25, "1000025", "测试25", "1", "15666666666", "ry@qq.com", 250.0D, "1")); +/* 65 */ users.put(Integer.valueOf(26), new UserOperateModel(26, "1000026", "测试26", "1", "15666666666", "ry@qq.com", 250.0D, "1")); +/* */ } +/* */ +/* */ +/* */ private static final Map users = new LinkedHashMap<>(); +/* */ +/* */ +/* */ @GetMapping({"/table"}) +/* */ public String table() { +/* 74 */ return this.prefix + "/table"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/other"}) +/* */ public String other() { +/* 83 */ return this.prefix + "/other"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(UserOperateModel userModel) { +/* 93 */ TableDataInfo rspData = new TableDataInfo(); +/* 94 */ List userList = new ArrayList<>(users.values()); +/* */ +/* 96 */ if (StringUtils.isNotEmpty(userModel.getSearchValue())) { +/* */ +/* 98 */ userList.clear(); +/* 99 */ for (Map.Entry entry : users.entrySet()) +/* */ { +/* 101 */ if (((UserOperateModel)entry.getValue()).getUserName().equals(userModel.getSearchValue())) +/* */ { +/* 103 */ userList.add(entry.getValue()); +/* */ } +/* */ } +/* */ +/* 107 */ } else if (StringUtils.isNotEmpty(userModel.getUserName())) { +/* */ +/* 109 */ userList.clear(); +/* 110 */ for (Map.Entry entry : users.entrySet()) { +/* */ +/* 112 */ if (((UserOperateModel)entry.getValue()).getUserName().equals(userModel.getUserName())) +/* */ { +/* 114 */ userList.add(entry.getValue()); +/* */ } +/* */ } +/* */ } +/* 118 */ PageDomain pageDomain = TableSupport.buildPageRequest(); +/* 119 */ if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize()) { +/* */ +/* 121 */ rspData.setRows(userList); +/* 122 */ rspData.setTotal(userList.size()); +/* 123 */ return rspData; +/* */ } +/* 125 */ Integer pageNum = Integer.valueOf((pageDomain.getPageNum().intValue() - 1) * 10); +/* 126 */ Integer pageSize = Integer.valueOf(pageDomain.getPageNum().intValue() * 10); +/* 127 */ if (pageSize.intValue() > userList.size()) +/* */ { +/* 129 */ pageSize = Integer.valueOf(userList.size()); +/* */ } +/* 131 */ rspData.setRows(userList.subList(pageNum.intValue(), pageSize.intValue())); +/* 132 */ rspData.setTotal(userList.size()); +/* 133 */ return rspData; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add(ModelMap mmap) { +/* 142 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(UserOperateModel user) { +/* 152 */ Integer userId = Integer.valueOf(users.size() + 1); +/* 153 */ user.setUserId(userId.intValue()); +/* 154 */ return AjaxResult.success(users.put(userId, user)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/customer/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(CustomerModel customerModel) { +/* 164 */ System.out.println(customerModel.toString()); +/* 165 */ return AjaxResult.success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{userId}"}) +/* */ public String edit(@PathVariable("userId") Integer userId, ModelMap mmap) { +/* 174 */ mmap.put("user", users.get(userId)); +/* 175 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(UserOperateModel user) { +/* 185 */ return AjaxResult.success(users.put(Integer.valueOf(user.getUserId()), user)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(UserOperateModel user) { +/* 195 */ List list = new ArrayList<>(users.values()); +/* 196 */ ExcelUtil util = new ExcelUtil(UserOperateModel.class); +/* 197 */ return util.exportExcel(list, "用户数据"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/importTemplate"}) +/* */ @ResponseBody +/* */ public AjaxResult importTemplate() { +/* 207 */ ExcelUtil util = new ExcelUtil(UserOperateModel.class); +/* 208 */ return util.importTemplateExcel("用户数据"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/importData"}) +/* */ @ResponseBody +/* */ public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { +/* 218 */ ExcelUtil util = new ExcelUtil(UserOperateModel.class); +/* 219 */ List userList = util.importExcel(file.getInputStream()); +/* 220 */ String message = importUser(userList, Boolean.valueOf(updateSupport)); +/* 221 */ return AjaxResult.success(message); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 231 */ Integer[] userIds = Convert.toIntArray(ids); +/* 232 */ for (Integer userId : userIds) +/* */ { +/* 234 */ users.remove(userId); +/* */ } +/* 236 */ return AjaxResult.success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/detail/{userId}"}) +/* */ public String detail(@PathVariable("userId") Integer userId, ModelMap mmap) { +/* 245 */ mmap.put("user", users.get(userId)); +/* 246 */ return this.prefix + "/detail"; +/* */ } +/* */ +/* */ +/* */ @PostMapping({"/clean"}) +/* */ @ResponseBody +/* */ public AjaxResult clean() { +/* 253 */ users.clear(); +/* 254 */ return success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String importUser(List userList, Boolean isUpdateSupport) { +/* 266 */ if (StringUtils.isNull(userList) || userList.size() == 0) +/* */ { +/* 268 */ throw new BusinessException("导入用户数据不能为空!"); +/* */ } +/* 270 */ int successNum = 0; +/* 271 */ int failureNum = 0; +/* 272 */ StringBuilder successMsg = new StringBuilder(); +/* 273 */ StringBuilder failureMsg = new StringBuilder(); +/* 274 */ for (UserOperateModel user : userList) { +/* */ +/* */ +/* */ try { +/* */ +/* 279 */ boolean userFlag = false; +/* 280 */ for (Map.Entry entry : users.entrySet()) { +/* */ +/* 282 */ if (((UserOperateModel)entry.getValue()).getUserName().equals(user.getUserName())) { +/* */ +/* 284 */ userFlag = true; +/* */ break; +/* */ } +/* */ } +/* 288 */ if (!userFlag) { +/* */ +/* 290 */ Integer userId = Integer.valueOf(users.size() + 1); +/* 291 */ user.setUserId(userId.intValue()); +/* 292 */ users.put(userId, user); +/* 293 */ successNum++; +/* 294 */ successMsg.append("
" + successNum + "、用户 " + user.getUserName() + " 导入成功"); continue; +/* */ } +/* 296 */ if (isUpdateSupport.booleanValue()) { +/* */ +/* 298 */ users.put(Integer.valueOf(user.getUserId()), user); +/* 299 */ successNum++; +/* 300 */ successMsg.append("
" + successNum + "、用户 " + user.getUserName() + " 更新成功"); +/* */ +/* */ continue; +/* */ } +/* 304 */ failureNum++; +/* 305 */ failureMsg.append("
" + failureNum + "、用户 " + user.getUserName() + " 已存在"); +/* */ +/* */ } +/* 308 */ catch (Exception e) { +/* */ +/* 310 */ failureNum++; +/* 311 */ String msg = "
" + failureNum + "、账号 " + user.getUserName() + " 导入失败:"; +/* 312 */ failureMsg.append(msg + e.getMessage()); +/* */ } +/* */ } +/* 315 */ if (failureNum > 0) { +/* */ +/* 317 */ failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); +/* 318 */ throw new BusinessException(failureMsg.toString()); +/* */ } +/* */ +/* */ +/* 322 */ successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); +/* */ +/* 324 */ return successMsg.toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\controller\DemoOperateController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/controller/DemoReportController.java b/src/main/java/com/archive/project/demo/controller/DemoReportController.java new file mode 100644 index 0000000..6cd5f5a --- /dev/null +++ b/src/main/java/com/archive/project/demo/controller/DemoReportController.java @@ -0,0 +1,61 @@ +/* */ package com.archive.project.demo.controller + +-INF.classes.com.archive.project.demo.controller; +/* */ +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/demo/report"}) +/* */ public class DemoReportController +/* */ { +/* 16 */ private String prefix = "demo/report"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/echarts"}) +/* */ public String echarts() { +/* 24 */ return this.prefix + "/echarts"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/peity"}) +/* */ public String peity() { +/* 33 */ return this.prefix + "/peity"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/sparkline"}) +/* */ public String sparkline() { +/* 42 */ return this.prefix + "/sparkline"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/metrics"}) +/* */ public String metrics() { +/* 51 */ return this.prefix + "/metrics"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\controller\DemoReportController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/controller/DemoTableController.java b/src/main/java/com/archive/project/demo/controller/DemoTableController.java new file mode 100644 index 0000000..de9a1f9 --- /dev/null +++ b/src/main/java/com/archive/project/demo/controller/DemoTableController.java @@ -0,0 +1,363 @@ +/* */ package com.archive.project.demo.controller + +-INF.classes.com.archive.project.demo.controller; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.PageDomain; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.framework.web.page.TableSupport; +/* */ import com.archive.project.demo.controller.UserTableColumn; +/* */ import com.archive.project.demo.controller.UserTableModel; +/* */ import java.util.ArrayList; +/* */ import java.util.Arrays; +/* */ import java.util.Collections; +/* */ import java.util.List; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/demo/table"}) +/* */ public class DemoTableController +/* */ extends BaseController +/* */ { +/* */ private String prefix; +/* */ +/* */ public DemoTableController() { +/* 32 */ this.prefix = "demo/table"; +/* */ +/* */ +/* */ +/* 36 */ users.add(new UserTableModel(1, "1000001", "测试1", "0", "15888888888", "ry@qq.com", 150.0D, "0")); +/* 37 */ users.add(new UserTableModel(2, "1000002", "测试2", "1", "15666666666", "ry@qq.com", 180.0D, "1")); +/* 38 */ users.add(new UserTableModel(3, "1000003", "测试3", "0", "15666666666", "ry@qq.com", 110.0D, "1")); +/* 39 */ users.add(new UserTableModel(4, "1000004", "测试4", "1", "15666666666", "ry@qq.com", 220.0D, "1")); +/* 40 */ users.add(new UserTableModel(5, "1000005", "测试5", "0", "15666666666", "ry@qq.com", 140.0D, "1")); +/* 41 */ users.add(new UserTableModel(6, "1000006", "测试6", "1", "15666666666", "ry@qq.com", 330.0D, "1")); +/* 42 */ users.add(new UserTableModel(7, "1000007", "测试7", "0", "15666666666", "ry@qq.com", 160.0D, "1")); +/* 43 */ users.add(new UserTableModel(8, "1000008", "测试8", "1", "15666666666", "ry@qq.com", 170.0D, "1")); +/* 44 */ users.add(new UserTableModel(9, "1000009", "测试9", "0", "15666666666", "ry@qq.com", 180.0D, "1")); +/* 45 */ users.add(new UserTableModel(10, "1000010", "测试10", "0", "15666666666", "ry@qq.com", 210.0D, "1")); +/* 46 */ users.add(new UserTableModel(11, "1000011", "测试11", "1", "15666666666", "ry@qq.com", 110.0D, "1")); +/* 47 */ users.add(new UserTableModel(12, "1000012", "测试12", "0", "15666666666", "ry@qq.com", 120.0D, "1")); +/* 48 */ users.add(new UserTableModel(13, "1000013", "测试13", "1", "15666666666", "ry@qq.com", 380.0D, "1")); +/* 49 */ users.add(new UserTableModel(14, "1000014", "测试14", "0", "15666666666", "ry@qq.com", 280.0D, "1")); +/* 50 */ users.add(new UserTableModel(15, "1000015", "测试15", "0", "15666666666", "ry@qq.com", 570.0D, "1")); +/* 51 */ users.add(new UserTableModel(16, "1000016", "测试16", "1", "15666666666", "ry@qq.com", 260.0D, "1")); +/* 52 */ users.add(new UserTableModel(17, "1000017", "测试17", "1", "15666666666", "ry@qq.com", 210.0D, "1")); +/* 53 */ users.add(new UserTableModel(18, "1000018", "测试18", "1", "15666666666", "ry@qq.com", 340.0D, "1")); +/* 54 */ users.add(new UserTableModel(19, "1000019", "测试19", "1", "15666666666", "ry@qq.com", 160.0D, "1")); +/* 55 */ users.add(new UserTableModel(20, "1000020", "测试20", "1", "15666666666", "ry@qq.com", 220.0D, "1")); +/* 56 */ users.add(new UserTableModel(21, "1000021", "测试21", "1", "15666666666", "ry@qq.com", 120.0D, "1")); +/* 57 */ users.add(new UserTableModel(22, "1000022", "测试22", "1", "15666666666", "ry@qq.com", 130.0D, "1")); +/* 58 */ users.add(new UserTableModel(23, "1000023", "测试23", "1", "15666666666", "ry@qq.com", 490.0D, "1")); +/* 59 */ users.add(new UserTableModel(24, "1000024", "测试24", "1", "15666666666", "ry@qq.com", 570.0D, "1")); +/* 60 */ users.add(new UserTableModel(25, "1000025", "测试25", "1", "15666666666", "ry@qq.com", 250.0D, "1")); +/* 61 */ users.add(new UserTableModel(26, "1000026", "测试26", "1", "15666666666", "ry@qq.com", 250.0D, "1")); +/* */ +/* */ +/* */ +/* */ +/* 66 */ columns.add(new UserTableColumn("用户ID", "userId")); +/* 67 */ columns.add(new UserTableColumn("用户编号", "userCode")); +/* 68 */ columns.add(new UserTableColumn("用户姓名", "userName")); +/* 69 */ columns.add(new UserTableColumn("用户手机", "userPhone")); +/* 70 */ columns.add(new UserTableColumn("用户邮箱", "userEmail")); +/* 71 */ columns.add(new UserTableColumn("用户状态", "status")); +/* */ } +/* */ +/* */ +/* */ private static final List users = new ArrayList<>(); +/* */ private static final List columns = new ArrayList<>(); +/* */ +/* */ @GetMapping({"/search"}) +/* */ public String search() { +/* 80 */ return this.prefix + "/search"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/footer"}) +/* */ public String footer() { +/* 89 */ return this.prefix + "/footer"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/groupHeader"}) +/* */ public String groupHeader() { +/* 98 */ return this.prefix + "/groupHeader"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/export"}) +/* */ public String export() { +/* 107 */ return this.prefix + "/export"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/remember"}) +/* */ public String remember() { +/* 116 */ return this.prefix + "/remember"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/pageGo"}) +/* */ public String pageGo() { +/* 125 */ return this.prefix + "/pageGo"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/params"}) +/* */ public String params() { +/* 134 */ return this.prefix + "/params"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/multi"}) +/* */ public String multi() { +/* 143 */ return this.prefix + "/multi"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/button"}) +/* */ public String button() { +/* 152 */ return this.prefix + "/button"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/data"}) +/* */ public String data(ModelMap mmap) { +/* 161 */ mmap.put("users", users); +/* 162 */ return this.prefix + "/data"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/fixedColumns"}) +/* */ public String fixedColumns() { +/* 171 */ return this.prefix + "/fixedColumns"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/event"}) +/* */ public String event() { +/* 180 */ return this.prefix + "/event"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/detail"}) +/* */ public String detail() { +/* 189 */ return this.prefix + "/detail"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/child"}) +/* */ public String child() { +/* 198 */ return this.prefix + "/child"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/image"}) +/* */ public String image() { +/* 207 */ return this.prefix + "/image"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/curd"}) +/* */ public String curd() { +/* 216 */ return this.prefix + "/curd"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/reorder"}) +/* */ public String reorder() { +/* 225 */ return this.prefix + "/reorder"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/resizable"}) +/* */ public String resizable() { +/* 234 */ return this.prefix + "/resizable"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/editable"}) +/* */ public String editable() { +/* 243 */ return this.prefix + "/editable"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/subdata"}) +/* */ public String subdata() { +/* 252 */ return this.prefix + "/subdata"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/refresh"}) +/* */ public String refresh() { +/* 261 */ return this.prefix + "/refresh"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/print"}) +/* */ public String print() { +/* 270 */ return this.prefix + "/print"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/headerStyle"}) +/* */ public String headerStyle() { +/* 279 */ return this.prefix + "/headerStyle"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/dynamicColumns"}) +/* */ public String dynamicColumns() { +/* 288 */ return this.prefix + "/dynamicColumns"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/other"}) +/* */ public String other() { +/* 297 */ return this.prefix + "/other"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/ajaxColumns"}) +/* */ @ResponseBody +/* */ public AjaxResult ajaxColumns(UserTableColumn userColumn) { +/* 307 */ List columnList = new ArrayList<>(Arrays.asList(new UserTableColumn[columns.size()])); +/* 308 */ Collections.copy(columnList, columns); +/* 309 */ if (userColumn != null && "userBalance".equals(userColumn.getField())) +/* */ { +/* 311 */ columnList.add(new UserTableColumn("用户余额", "userBalance")); +/* */ } +/* 313 */ return AjaxResult.success(columnList); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(UserTableModel userModel) { +/* 323 */ TableDataInfo rspData = new TableDataInfo(); +/* 324 */ List userList = new ArrayList<>(Arrays.asList(new UserTableModel[users.size()])); +/* 325 */ Collections.copy(userList, users); +/* */ +/* 327 */ if (StringUtils.isNotEmpty(userModel.getUserName())) { +/* */ +/* 329 */ userList.clear(); +/* 330 */ for (UserTableModel user : users) { +/* */ +/* 332 */ if (user.getUserName().equals(userModel.getUserName())) +/* */ { +/* 334 */ userList.add(user); +/* */ } +/* */ } +/* */ } +/* 338 */ PageDomain pageDomain = TableSupport.buildPageRequest(); +/* 339 */ if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize()) { +/* */ +/* 341 */ rspData.setRows(userList); +/* 342 */ rspData.setTotal(userList.size()); +/* 343 */ return rspData; +/* */ } +/* 345 */ Integer pageNum = Integer.valueOf((pageDomain.getPageNum().intValue() - 1) * 10); +/* 346 */ Integer pageSize = Integer.valueOf(pageDomain.getPageNum().intValue() * 10); +/* 347 */ if (pageSize.intValue() > userList.size()) +/* */ { +/* 349 */ pageSize = Integer.valueOf(userList.size()); +/* */ } +/* 351 */ rspData.setRows(userList.subList(pageNum.intValue(), pageSize.intValue())); +/* 352 */ rspData.setTotal(userList.size()); +/* 353 */ return rspData; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\controller\DemoTableController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/controller/UserFormModel.java b/src/main/java/com/archive/project/demo/controller/UserFormModel.java new file mode 100644 index 0000000..6436854 --- /dev/null +++ b/src/main/java/com/archive/project/demo/controller/UserFormModel.java @@ -0,0 +1,395 @@ +/* */ package com.archive.project.demo.controller; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class UserFormModel +/* */ { +/* */ private int userId; +/* */ private String userCode; +/* */ private String userName; +/* */ private String userPhone; +/* */ +/* */ public UserFormModel() {} +/* */ +/* */ public UserFormModel(int userId, String userCode, String userName, String userPhone) { +/* 344 */ this.userId = userId; +/* 345 */ this.userCode = userCode; +/* 346 */ this.userName = userName; +/* 347 */ this.userPhone = userPhone; +/* */ } +/* */ +/* */ +/* */ public int getUserId() { +/* 352 */ return this.userId; +/* */ } +/* */ +/* */ +/* */ public void setUserId(int userId) { +/* 357 */ this.userId = userId; +/* */ } +/* */ +/* */ +/* */ public String getUserCode() { +/* 362 */ return this.userCode; +/* */ } +/* */ +/* */ +/* */ public void setUserCode(String userCode) { +/* 367 */ this.userCode = userCode; +/* */ } +/* */ +/* */ +/* */ public String getUserName() { +/* 372 */ return this.userName; +/* */ } +/* */ +/* */ +/* */ public void setUserName(String userName) { +/* 377 */ this.userName = userName; +/* */ } +/* */ +/* */ +/* */ public String getUserPhone() { +/* 382 */ return this.userPhone; +/* */ } +/* */ +/* */ +/* */ public void setUserPhone(String userPhone) { +/* 387 */ this.userPhone = userPhone; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\controller\UserFormModel.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/controller/UserTableColumn.java b/src/main/java/com/archive/project/demo/controller/UserTableColumn.java new file mode 100644 index 0000000..5be1e7e --- /dev/null +++ b/src/main/java/com/archive/project/demo/controller/UserTableColumn.java @@ -0,0 +1,400 @@ +/* */ package com.archive.project.demo.controller-INF.classes.com.archive.project.demo.controller; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class UserTableColumn +/* */ { +/* */ private String title; +/* */ private String field; +/* */ +/* */ public UserTableColumn() {} +/* */ +/* */ public UserTableColumn(String title, String field) { +/* 371 */ this.title = title; +/* 372 */ this.field = field; +/* */ } +/* */ +/* */ +/* */ public String getTitle() { +/* 377 */ return this.title; +/* */ } +/* */ +/* */ +/* */ public void setTitle(String title) { +/* 382 */ this.title = title; +/* */ } +/* */ +/* */ +/* */ public String getField() { +/* 387 */ return this.field; +/* */ } +/* */ +/* */ +/* */ public void setField(String field) { +/* 392 */ this.field = field; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\controller\UserTableColumn.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/controller/UserTableModel.java b/src/main/java/com/archive/project/demo/controller/UserTableModel.java new file mode 100644 index 0000000..fda1dd0 --- /dev/null +++ b/src/main/java/com/archive/project/demo/controller/UserTableModel.java @@ -0,0 +1,542 @@ +/* */ package com.archive.project.demo.controller + +-INF.classes.com.archive.project.demo.controller; +/* */ +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.fasterxml.jackson.annotation.JsonFormat; +/* */ import java.util.Date; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class UserTableModel +/* */ { +/* */ private int userId; +/* */ private String userCode; +/* */ private String userName; +/* */ private String userSex; +/* */ private String userPhone; +/* */ private String userEmail; +/* */ private double userBalance; +/* */ private String status; +/* */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") +/* */ private Date createTime; +/* */ +/* */ public UserTableModel() {} +/* */ +/* */ public UserTableModel(int userId, String userCode, String userName, String userSex, String userPhone, String userEmail, double userBalance, String status) { +/* 434 */ this.userId = userId; +/* 435 */ this.userCode = userCode; +/* 436 */ this.userName = userName; +/* 437 */ this.userSex = userSex; +/* 438 */ this.userPhone = userPhone; +/* 439 */ this.userEmail = userEmail; +/* 440 */ this.userBalance = userBalance; +/* 441 */ this.status = status; +/* 442 */ this.createTime = DateUtils.getNowDate(); +/* */ } +/* */ +/* */ +/* */ public int getUserId() { +/* 447 */ return this.userId; +/* */ } +/* */ +/* */ +/* */ public void setUserId(int userId) { +/* 452 */ this.userId = userId; +/* */ } +/* */ +/* */ +/* */ public String getUserCode() { +/* 457 */ return this.userCode; +/* */ } +/* */ +/* */ +/* */ public void setUserCode(String userCode) { +/* 462 */ this.userCode = userCode; +/* */ } +/* */ +/* */ +/* */ public String getUserName() { +/* 467 */ return this.userName; +/* */ } +/* */ +/* */ +/* */ public void setUserName(String userName) { +/* 472 */ this.userName = userName; +/* */ } +/* */ +/* */ +/* */ public String getUserSex() { +/* 477 */ return this.userSex; +/* */ } +/* */ +/* */ +/* */ public void setUserSex(String userSex) { +/* 482 */ this.userSex = userSex; +/* */ } +/* */ +/* */ +/* */ public String getUserPhone() { +/* 487 */ return this.userPhone; +/* */ } +/* */ +/* */ +/* */ public void setUserPhone(String userPhone) { +/* 492 */ this.userPhone = userPhone; +/* */ } +/* */ +/* */ +/* */ public String getUserEmail() { +/* 497 */ return this.userEmail; +/* */ } +/* */ +/* */ +/* */ public void setUserEmail(String userEmail) { +/* 502 */ this.userEmail = userEmail; +/* */ } +/* */ +/* */ +/* */ public double getUserBalance() { +/* 507 */ return this.userBalance; +/* */ } +/* */ +/* */ +/* */ public void setUserBalance(double userBalance) { +/* 512 */ this.userBalance = userBalance; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 517 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 522 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public Date getCreateTime() { +/* 527 */ return this.createTime; +/* */ } +/* */ +/* */ +/* */ public void setCreateTime(Date createTime) { +/* 532 */ this.createTime = createTime; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\controller\UserTableModel.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/domain/CustomerModel.java b/src/main/java/com/archive/project/demo/domain/CustomerModel.java new file mode 100644 index 0000000..29cad5b --- /dev/null +++ b/src/main/java/com/archive/project/demo/domain/CustomerModel.java @@ -0,0 +1,124 @@ +/* */ package com.archive.project.demo.domain + +-INF.classes.com.archive.project.demo.domain; +/* */ +/* */ import com.archive.project.demo.domain.GoodsModel; +/* */ import java.util.List; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CustomerModel +/* */ { +/* */ private String name; +/* */ private String phonenumber; +/* */ private String sex; +/* */ private String birthday; +/* */ private String remark; +/* */ private List goods; +/* */ +/* */ public String getName() { +/* 46 */ return this.name; +/* */ } +/* */ +/* */ +/* */ public void setName(String name) { +/* 51 */ this.name = name; +/* */ } +/* */ +/* */ +/* */ public String getPhonenumber() { +/* 56 */ return this.phonenumber; +/* */ } +/* */ +/* */ +/* */ public void setPhonenumber(String phonenumber) { +/* 61 */ this.phonenumber = phonenumber; +/* */ } +/* */ +/* */ +/* */ +/* */ public String getSex() { +/* 67 */ return this.sex; +/* */ } +/* */ +/* */ +/* */ public void setSex(String sex) { +/* 72 */ this.sex = sex; +/* */ } +/* */ +/* */ +/* */ public String getBirthday() { +/* 77 */ return this.birthday; +/* */ } +/* */ +/* */ +/* */ public void setBirthday(String birthday) { +/* 82 */ this.birthday = birthday; +/* */ } +/* */ +/* */ +/* */ public String getRemark() { +/* 87 */ return this.remark; +/* */ } +/* */ +/* */ +/* */ public void setRemark(String remark) { +/* 92 */ this.remark = remark; +/* */ } +/* */ +/* */ +/* */ public List getGoods() { +/* 97 */ return this.goods; +/* */ } +/* */ +/* */ +/* */ public void setGoods(List goods) { +/* 102 */ this.goods = goods; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 107 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 108 */ .append("name", getName()) +/* 109 */ .append("phonenumber", getPhonenumber()) +/* 110 */ .append("sex", getSex()) +/* 111 */ .append("birthday", getBirthday()) +/* 112 */ .append("goods", getGoods()) +/* 113 */ .append("remark", getRemark()) +/* 114 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\domain\CustomerModel.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/domain/GoodsModel.java b/src/main/java/com/archive/project/demo/domain/GoodsModel.java new file mode 100644 index 0000000..a49a700 --- /dev/null +++ b/src/main/java/com/archive/project/demo/domain/GoodsModel.java @@ -0,0 +1,107 @@ +/* */ package com.archive.project.demo.domain + +-INF.classes.com.archive.project.demo.domain; +/* */ +/* */ import java.util.Date; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class GoodsModel +/* */ { +/* */ private String name; +/* */ private Integer weight; +/* */ private Double price; +/* */ private Date date; +/* */ private String type; +/* */ +/* */ public String getName() { +/* 41 */ return this.name; +/* */ } +/* */ +/* */ +/* */ public void setName(String name) { +/* 46 */ this.name = name; +/* */ } +/* */ +/* */ +/* */ public Integer getWeight() { +/* 51 */ return this.weight; +/* */ } +/* */ +/* */ +/* */ public void setWeight(Integer weight) { +/* 56 */ this.weight = weight; +/* */ } +/* */ +/* */ +/* */ public Double getPrice() { +/* 61 */ return this.price; +/* */ } +/* */ +/* */ +/* */ public void setPrice(Double price) { +/* 66 */ this.price = price; +/* */ } +/* */ +/* */ +/* */ public Date getDate() { +/* 71 */ return this.date; +/* */ } +/* */ +/* */ +/* */ public void setDate(Date date) { +/* 76 */ this.date = date; +/* */ } +/* */ +/* */ +/* */ public String getType() { +/* 81 */ return this.type; +/* */ } +/* */ +/* */ +/* */ public void setType(String type) { +/* 86 */ this.type = type; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 91 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 92 */ .append("name", getName()) +/* 93 */ .append("weight", getWeight()) +/* 94 */ .append("price", getPrice()) +/* 95 */ .append("date", getDate()) +/* 96 */ .append("type", getType()) +/* 97 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\domain\GoodsModel.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/demo/domain/UserOperateModel.java b/src/main/java/com/archive/project/demo/domain/UserOperateModel.java new file mode 100644 index 0000000..fb0da6f --- /dev/null +++ b/src/main/java/com/archive/project/demo/domain/UserOperateModel.java @@ -0,0 +1,155 @@ +/* */ package com.archive.project.demo.domain + +-INF.classes.com.archive.project.demo.domain; +/* */ +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import java.util.Date; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class UserOperateModel +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private int userId; +/* */ @Excel(name = "用户编号") +/* */ private String userCode; +/* */ @Excel(name = "用户姓名") +/* */ private String userName; +/* */ @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知") +/* */ private String userSex; +/* */ @Excel(name = "用户手机") +/* */ private String userPhone; +/* */ @Excel(name = "用户邮箱") +/* */ private String userEmail; +/* */ @Excel(name = "用户余额") +/* */ private double userBalance; +/* */ @Excel(name = "用户状态", readConverterExp = "0=正常,1=停用") +/* */ private String status; +/* */ @Excel(name = "创建时间", width = 30.0D, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT) +/* */ private Date createTime; +/* */ +/* */ public UserOperateModel() {} +/* */ +/* */ public UserOperateModel(int userId, String userCode, String userName, String userSex, String userPhone, String userEmail, double userBalance, String status) { +/* 47 */ this.userId = userId; +/* 48 */ this.userCode = userCode; +/* 49 */ this.userName = userName; +/* 50 */ this.userSex = userSex; +/* 51 */ this.userPhone = userPhone; +/* 52 */ this.userEmail = userEmail; +/* 53 */ this.userBalance = userBalance; +/* 54 */ this.status = status; +/* 55 */ this.createTime = DateUtils.getNowDate(); +/* */ } +/* */ +/* */ +/* */ public int getUserId() { +/* 60 */ return this.userId; +/* */ } +/* */ +/* */ +/* */ public void setUserId(int userId) { +/* 65 */ this.userId = userId; +/* */ } +/* */ +/* */ +/* */ public String getUserCode() { +/* 70 */ return this.userCode; +/* */ } +/* */ +/* */ +/* */ public void setUserCode(String userCode) { +/* 75 */ this.userCode = userCode; +/* */ } +/* */ +/* */ +/* */ public String getUserName() { +/* 80 */ return this.userName; +/* */ } +/* */ +/* */ +/* */ public void setUserName(String userName) { +/* 85 */ this.userName = userName; +/* */ } +/* */ +/* */ +/* */ public String getUserSex() { +/* 90 */ return this.userSex; +/* */ } +/* */ +/* */ +/* */ public void setUserSex(String userSex) { +/* 95 */ this.userSex = userSex; +/* */ } +/* */ +/* */ +/* */ public String getUserPhone() { +/* 100 */ return this.userPhone; +/* */ } +/* */ +/* */ +/* */ public void setUserPhone(String userPhone) { +/* 105 */ this.userPhone = userPhone; +/* */ } +/* */ +/* */ +/* */ public String getUserEmail() { +/* 110 */ return this.userEmail; +/* */ } +/* */ +/* */ +/* */ public void setUserEmail(String userEmail) { +/* 115 */ this.userEmail = userEmail; +/* */ } +/* */ +/* */ +/* */ public double getUserBalance() { +/* 120 */ return this.userBalance; +/* */ } +/* */ +/* */ +/* */ public void setUserBalance(double userBalance) { +/* 125 */ this.userBalance = userBalance; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 130 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 135 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public Date getCreateTime() { +/* 140 */ return this.createTime; +/* */ } +/* */ +/* */ +/* */ public void setCreateTime(Date createTime) { +/* 145 */ this.createTime = createTime; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\demo\domain\UserOperateModel.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/document/controller/DocumentController.java b/src/main/java/com/archive/project/document/controller/DocumentController.java new file mode 100644 index 0000000..5d6b9f1 --- /dev/null +++ b/src/main/java/com/archive/project/document/controller/DocumentController.java @@ -0,0 +1,116 @@ +/* */ package com.archive.project.document.controller + +-INF.classes.com.archive.project.document.controller; +/* */ +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; +/* */ import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; +/* */ import com.archive.project.document.domain.Document; +/* */ import com.archive.project.document.service.IDocumentService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/document"}) +/* */ public class DocumentController +/* */ extends BaseController +/* */ { +/* 47 */ private String prefix = "document"; +/* */ +/* */ @Autowired +/* */ private IDocumentService documentService; +/* */ +/* */ @Autowired +/* */ private IArchiveTypeService archiveTypeService; +/* */ +/* */ @Autowired +/* */ private IPhysicalTableColumnService physicalTableColumnService; +/* */ +/* */ @Autowired +/* */ private IPhysicalTableService physicalTableService; +/* */ +/* */ +/* */ @RequiresPermissions({"document"}) +/* */ @GetMapping +/* */ public String document() { +/* 65 */ return this.prefix + "/document"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"document:qwgl"}) +/* */ @GetMapping({"/qwgl/{archiveId}/{type}/{id}"}) +/* */ public String qwgl(@PathVariable("archiveId") long archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) { +/* 72 */ long tableId = TableUtil.getTableIdByArchiveTypeId(archiveId); +/* 73 */ mmap.put("tableId", Long.valueOf(tableId)); +/* 74 */ mmap.put("fileId", id); +/* 75 */ mmap.put("archiveTypeId", Long.valueOf(archiveId)); +/* 76 */ return this.prefix + "/document"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"document:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(String ownerId, String tableId) { +/* 86 */ startPage(); +/* 87 */ Document document = new Document(); +/* 88 */ document.setTableId(tableId); +/* 89 */ document.setOwnerid(ownerId); +/* 90 */ List list = this.documentService.selectDocumentList(document); +/* 91 */ return getDataTable(list); +/* */ } +/* */ +/* */ @PostMapping({"/delete"}) +/* */ @ResponseBody +/* */ public AjaxResult delete(String id, String tableId) throws Exception { +/* 97 */ boolean res = this.documentService.deleteDocument(id, tableId); +/* */ +/* 99 */ return AjaxResult.success(!res ? "false" : "true"); +/* */ } +/* */ +/* */ @PostMapping({"/getArchiveTypeByTableId"}) +/* */ @ResponseBody +/* */ public AjaxResult getArchiveTypeByTableId(String tableId) { +/* 105 */ ArchiveType archiveType = this.documentService.selectArchiveTypeByTableId(tableId); +/* 106 */ return AjaxResult.success(archiveType); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\controller\DocumentController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/document/domain/Document.java b/src/main/java/com/archive/project/document/domain/Document.java new file mode 100644 index 0000000..cd0be64 --- /dev/null +++ b/src/main/java/com/archive/project/document/domain/Document.java @@ -0,0 +1,143 @@ +/* */ package com.archive.project.document.domain-INF.classes.com.archive.project.document.domain; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Document +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ private String createTime; +/* */ private String createUser; +/* */ private String fileName; +/* */ private String filehz; +/* */ private String filesize; +/* */ private String filepath; +/* */ private String filewaterpath; +/* */ private Long batcharchivetypeid; +/* */ private String ownerid; +/* */ private String tableId; +/* */ +/* */ public Long getId() { +/* 51 */ return this.id; +/* */ } +/* */ +/* */ public void setId(Long id) { +/* 55 */ this.id = id; +/* */ } +/* */ +/* */ public String getCreateTime() { +/* 59 */ return this.createTime; +/* */ } +/* */ +/* */ public void setCreateTime(String createTime) { +/* 63 */ this.createTime = createTime; +/* */ } +/* */ +/* */ public String getCreateUser() { +/* 67 */ return this.createUser; +/* */ } +/* */ +/* */ public void setCreateUser(String createUser) { +/* 71 */ this.createUser = createUser; +/* */ } +/* */ +/* */ public String getFileName() { +/* 75 */ return this.fileName; +/* */ } +/* */ +/* */ public void setFileName(String fileName) { +/* 79 */ this.fileName = fileName; +/* */ } +/* */ +/* */ public String getFilehz() { +/* 83 */ return this.filehz; +/* */ } +/* */ +/* */ public void setFilehz(String filehz) { +/* 87 */ this.filehz = filehz; +/* */ } +/* */ +/* */ public String getFilesize() { +/* 91 */ return this.filesize; +/* */ } +/* */ +/* */ public void setFilesize(String filesize) { +/* 95 */ this.filesize = filesize; +/* */ } +/* */ +/* */ public String getFilepath() { +/* 99 */ return this.filepath; +/* */ } +/* */ +/* */ public void setFilepath(String filepath) { +/* 103 */ this.filepath = filepath; +/* */ } +/* */ +/* */ public String getFilewaterpath() { +/* 107 */ return this.filewaterpath; +/* */ } +/* */ +/* */ public void setFilewaterpath(String filewaterpath) { +/* 111 */ this.filewaterpath = filewaterpath; +/* */ } +/* */ +/* */ public Long getBatcharchivetypeid() { +/* 115 */ return this.batcharchivetypeid; +/* */ } +/* */ +/* */ public void setBatcharchivetypeid(Long batcharchivetypeid) { +/* 119 */ this.batcharchivetypeid = batcharchivetypeid; +/* */ } +/* */ +/* */ public String getOwnerid() { +/* 123 */ return this.ownerid; +/* */ } +/* */ +/* */ public void setOwnerid(String ownerid) { +/* 127 */ this.ownerid = ownerid; +/* */ } +/* */ +/* */ public String getTableId() { +/* 131 */ return this.tableId; +/* */ } +/* */ +/* */ public void setTableId(String tableId) { +/* 135 */ this.tableId = tableId; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\domain\Document.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/document/service/IDocumentService.java b/src/main/java/com/archive/project/document/service/IDocumentService.java new file mode 100644 index 0000000..79defbf --- /dev/null +++ b/src/main/java/com/archive/project/document/service/IDocumentService.java @@ -0,0 +1,25 @@ +package com.archive.project.document.service + +-INF.classes.com.archive.project.document.service; + +import com.archive.project.dasz.archivetype.domain.ArchiveType; +import com.archive.project.document.domain.Document; +import java.io.IOException; +import java.util.List; +import org.springframework.web.multipart.MultipartFile; + +public interface IDocumentService { + boolean deleteDocument(String paramString1, String paramString2) throws Exception; + + List selectDocumentList(Document paramDocument); + + boolean uploadFile(MultipartFile[] paramArrayOfMultipartFile, long paramLong1, long paramLong2) throws IOException; + + ArchiveType selectArchiveTypeByTableId(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\service\IDocumentService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/document/service/impl/DocumentServiceImpl.java b/src/main/java/com/archive/project/document/service/impl/DocumentServiceImpl.java new file mode 100644 index 0000000..9fc6a0d --- /dev/null +++ b/src/main/java/com/archive/project/document/service/impl/DocumentServiceImpl.java @@ -0,0 +1,214 @@ +/* */ package com.archive.project.document.service.impl + +; +/* */ +/* */ import com.archive.common.archiveUtil.FileUtils; +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.mapper.ArchiveTypeMapper; +/* */ import com.archive.project.dasz.ccgl.service.ICcglService; +/* */ import com.archive.project.dasz.physicaltable.domain.PhysicalTable; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import com.archive.project.document.domain.Document; +/* */ import com.archive.project.document.service.IDocumentService; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.util.ArrayList; +/* */ import java.util.HashMap; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.web.multipart.MultipartFile; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class DocumentServiceImpl +/* */ implements IDocumentService +/* */ { +/* */ @Autowired +/* */ private ArchiveTypeMapper archiveTypeMapper; +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private ICcglService ccglService; +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ @Autowired +/* */ private IArchiveImportBatchService iArchiveImportBatchService; +/* */ +/* */ public List selectDocumentList(Document document) { +/* 64 */ List list = new ArrayList<>(); +/* 65 */ if (document.getOwnerid() != null && document.getTableId() != null) { +/* 66 */ String ownerid = document.getOwnerid(); +/* 67 */ String tableId = document.getTableId(); +/* 68 */ String tableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(tableId))); +/* 69 */ String docuumentTableName = tableName.toLowerCase().replace("_folder", "_document"); +/* 70 */ docuumentTableName = docuumentTableName.toLowerCase().replace("_file", "_document"); +/* 71 */ String docTableId = TableUtil.getTableId(docuumentTableName); +/* 72 */ String sql = "select id,create_Time,create_User,fileName,filehz,filesize,filepath,filewaterpath,batcharchivetypeid,ownerid,tableId from " + docuumentTableName + " where ownerid='" + ownerid + "' and tableId='" + tableId + "'"; +/* */ +/* 74 */ List> datalist = this.executeSqlService.queryList(sql); +/* 75 */ for (int i = 0; i < datalist.size(); i++) { +/* 76 */ Document dc = new Document(); +/* 77 */ dc.setId(Long.valueOf((((LinkedHashMap)datalist.get(i)).get("id") == null) ? 0L : Long.parseLong(((LinkedHashMap)datalist.get(i)).get("id").toString()))); +/* 78 */ dc.setCreateTime((((LinkedHashMap)datalist.get(i)).get("create_Time") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("create_Time").toString()); +/* 79 */ dc.setCreateUser((((LinkedHashMap)datalist.get(i)).get("create_User") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("create_User").toString()); +/* 80 */ dc.setFileName((((LinkedHashMap)datalist.get(i)).get("fileName") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("fileName").toString()); +/* 81 */ dc.setFilehz((((LinkedHashMap)datalist.get(i)).get("filehz") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filehz").toString()); +/* 82 */ dc.setFilesize((((LinkedHashMap)datalist.get(i)).get("filesize") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filesize").toString()); +/* 83 */ dc.setFilepath((((LinkedHashMap)datalist.get(i)).get("filepath") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filepath").toString()); +/* 84 */ dc.setFilewaterpath((((LinkedHashMap)datalist.get(i)).get("filewaterpath") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filewaterpath").toString()); +/* 85 */ dc.setBatcharchivetypeid(Long.valueOf((((LinkedHashMap)datalist.get(i)).get("batcharchivetypeid") == null) ? 0L : Long.parseLong(((LinkedHashMap)datalist.get(i)).get("batcharchivetypeid").toString()))); +/* 86 */ dc.setOwnerid((((LinkedHashMap)datalist.get(i)).get("ownerid") == null) ? "0" : ((LinkedHashMap)datalist.get(i)).get("ownerid").toString()); +/* 87 */ dc.setTableId((((LinkedHashMap)datalist.get(i)).get("tableId") == null) ? "0" : ((LinkedHashMap)datalist.get(i)).get("tableId").toString()); +/* 88 */ list.add(dc); +/* */ } +/* */ } +/* 91 */ return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map getTableIdByArchiveTypeId(String archiveTypeId, String type) { +/* 105 */ Map map = new HashMap<>(); +/* 106 */ PhysicalTable physicalTable = new PhysicalTable(); +/* 107 */ physicalTable.setTableCode(type); +/* 108 */ physicalTable.setArchivetypeid(archiveTypeId); +/* 109 */ List tablesList = this.physicalTableMapper.selectPhysicalTableList(physicalTable); +/* 110 */ if (tablesList != null && tablesList.size() > 0) { +/* 111 */ String tableName = ((PhysicalTable)tablesList.get(0)).getTablename(); +/* 112 */ Long tableId = ((PhysicalTable)tablesList.get(0)).getId(); +/* 113 */ map.put("tableId", tableId); +/* 114 */ map.put("tableName", tableName); +/* */ } +/* 116 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean uploadFile(MultipartFile[] files, long tableId, long id) throws IOException { +/* 128 */ boolean res = false; +/* 129 */ if (files != null) { +/* 130 */ for (int i = 0; i < files.length; i++) { +/* 131 */ String fileName = files[i].getOriginalFilename(); +/* */ +/* */ +/* 134 */ String xdlj = this.ccglService.getCreateDocumentPathByFile(id, tableId); +/* 135 */ String filepath = ArchiveConfig.getInstance().getUploadPath() + File.separator + "DocumentFile" + File.separator + xdlj; +/* */ +/* 137 */ File localFile = new File(filepath); +/* 138 */ if (!localFile.exists()) { +/* 139 */ localFile.mkdirs(); +/* */ } +/* 141 */ String path = filepath + File.separator + fileName; +/* 142 */ File server_file = new File(path); +/* 143 */ files[i].transferTo(server_file); +/* 144 */ String newfileName = server_file.getName().substring(0, server_file.getName().lastIndexOf(".")); +/* 145 */ String hz = server_file.getName().substring(server_file.getName().lastIndexOf(".") + 1, server_file.getName().length()); +/* 146 */ String fileSize = FileUtils.changeValueType(Long.valueOf(server_file.length())); +/* */ +/* 148 */ String tableName = TableUtil.getTableName(Long.valueOf(tableId)); +/* 149 */ String docuumentTableName = tableName.toLowerCase().replace("_file", "_document"); +/* 150 */ String docTableId = TableUtil.getTableId(docuumentTableName); +/* 151 */ long newId = this.iArchiveImportBatchService.getTableNewId(Long.parseLong(docTableId)); +/* 152 */ User user = ShiroUtils.getSysUser(); +/* 153 */ String loginName = user.getLoginName(); +/* */ +/* */ +/* 156 */ String inserSql = "insert into " + docuumentTableName + "(id,ownerid,filename,filesize,filepath,filehz,tableId,create_user,create_time) values(" + newId + "," + id + ",'" + newfileName + "','" + fileSize + "','" + server_file.getPath().replaceAll("\\\\", "\\\\\\\\") + "','" + hz + "','" + tableId + "','" + loginName + "','" + DateUtils.getTime() + "')"; +/* 157 */ res = this.executeSqlService.insert(inserSql); +/* 158 */ System.out.println("文件" + path + "上传成功"); +/* */ } +/* */ } +/* 161 */ return res; +/* */ } +/* */ +/* */ +/* */ public boolean deleteDocument(String id, String tableId) throws Exception { +/* 166 */ boolean res = false; +/* 167 */ String fileTableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(tableId))); +/* 168 */ String docTableName = fileTableName.toUpperCase().replace("_FOLDER", "_DOCUMENT"); +/* 169 */ docTableName = docTableName.toUpperCase().replace("_FILE", "_DOCUMENT"); +/* */ +/* */ +/* 172 */ String selectSql = "select filepath,filewaterpath,ownerid from " + docTableName + " where id=" + id; +/* 173 */ List> datalist = this.executeSqlService.queryList(selectSql); +/* 174 */ if (datalist != null && datalist.size() > 0 && datalist.get(0) != null) { +/* 175 */ String path = (((LinkedHashMap)datalist.get(0)).get("filepath") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("filepath").toString(); +/* */ +/* 177 */ String waterPath = (((LinkedHashMap)datalist.get(0)).get("filewaterpath") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("filewaterpath").toString(); +/* 178 */ String ownerId = (((LinkedHashMap)datalist.get(0)).get("ownerid") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("ownerid").toString(); +/* 179 */ File file = new File(path); +/* 180 */ if (file.exists()) { +/* 181 */ file.delete(); +/* */ } +/* 183 */ File waterFile = new File(waterPath); +/* 184 */ if (waterFile.exists()) { +/* 185 */ waterFile.delete(); +/* */ } +/* 187 */ String sql = "delete from " + docTableName + " where id=" + id; +/* 188 */ res = this.executeSqlService.delete(sql); +/* */ +/* 190 */ String updateSql = "update " + fileTableName + " set dqzws=dqzws-1 where id=" + ownerId; +/* 191 */ this.executeSqlService.update(updateSql); +/* */ } +/* 193 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public ArchiveType selectArchiveTypeByTableId(String tableId) { +/* 203 */ long archiveTypeId = TableUtil.getArchiveTypeIdByTableId(Long.parseLong(tableId)); +/* 204 */ return this.archiveTypeMapper.selectArchiveTypeById(Long.valueOf(archiveTypeId)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\service\impl\DocumentServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/borrow/controller/TArchiveBorrowController.java b/src/main/java/com/archive/project/jyly/borrow/controller/TArchiveBorrowController.java new file mode 100644 index 0000000..e8a2ec5 --- /dev/null +++ b/src/main/java/com/archive/project/jyly/borrow/controller/TArchiveBorrowController.java @@ -0,0 +1,172 @@ +/* */ package com.archive.project.jyly.borrow.controller + +-INF.classes.com.archive.project.jyly.borrow.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.jyly.borrow.domain.TArchiveBorrow; +/* */ import com.archive.project.jyly.borrow.service.ITArchiveBorrowService; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.text.SimpleDateFormat; +/* */ import java.util.Date; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/jyly/borrow"}) +/* */ public class TArchiveBorrowController +/* */ extends BaseController +/* */ { +/* 44 */ private String prefix = "jyly/borrow"; +/* */ +/* */ @Autowired +/* */ private ITArchiveBorrowService tArchiveBorrowService; +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:borrow:view"}) +/* */ @GetMapping +/* */ public String borrow() { +/* 53 */ return this.prefix + "/borrow"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:borrow:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(TArchiveBorrow tArchiveBorrow) { +/* 64 */ startPage(); +/* 65 */ List list = this.tArchiveBorrowService.selectTArchiveBorrowList(tArchiveBorrow); +/* 66 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:borrow:export"}) +/* */ @Log(title = "档案借阅登记", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TArchiveBorrow tArchiveBorrow) { +/* 78 */ List list = this.tArchiveBorrowService.selectTArchiveBorrowList(tArchiveBorrow); +/* 79 */ ExcelUtil util = new ExcelUtil(TArchiveBorrow.class); +/* 80 */ return util.exportExcel(list, "borrow"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add(ModelMap mmap) { +/* 89 */ Date date = new Date(); +/* 90 */ SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd"); +/* 91 */ String data = formatter.format(date); +/* 92 */ int in = (int)(Math.random() * 900.0D) + 100; +/* 93 */ String borrowId = "JY" + data + in; +/* */ +/* 95 */ mmap.put("batchNo", borrowId); +/* 96 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:borrow:add"}) +/* */ @Log(title = "档案借阅登记", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TArchiveBorrow tArchiveBorrow) { +/* 109 */ User currentUser = ShiroUtils.getSysUser(); +/* 110 */ tArchiveBorrow.setRecordperson(currentUser.getUserName()); +/* 111 */ return toAjax(this.tArchiveBorrowService.insertTArchiveBorrow(tArchiveBorrow)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 120 */ TArchiveBorrow tArchiveBorrow = this.tArchiveBorrowService.selectTArchiveBorrowById(id); +/* 121 */ mmap.put("tArchiveBorrow", tArchiveBorrow); +/* 122 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:borrow:edit"}) +/* */ @Log(title = "档案借阅登记", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TArchiveBorrow tArchiveBorrow) { +/* 135 */ if (tArchiveBorrow.getUsingEffect() != null) { +/* 136 */ tArchiveBorrow.setExborrowState("1"); +/* */ } +/* 138 */ return toAjax(this.tArchiveBorrowService.updateTArchiveBorrow(tArchiveBorrow)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:borrow:remove"}) +/* */ @Log(title = "档案借阅登记", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 150 */ return toAjax(this.tArchiveBorrowService.deleteTArchiveBorrowByIds(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/lywb/{id}"}) +/* */ public String lywb(@PathVariable("id") Long id, ModelMap mmap) { +/* 160 */ TArchiveBorrow tArchiveBorrow = this.tArchiveBorrowService.selectTArchiveBorrowById(id); +/* 161 */ mmap.put("tArchiveBorrow", tArchiveBorrow); +/* 162 */ return this.prefix + "/lywb"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\borrow\controller\TArchiveBorrowController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/borrow/domain/TArchiveBorrow.java b/src/main/java/com/archive/project/jyly/borrow/domain/TArchiveBorrow.java new file mode 100644 index 0000000..5fcf75d --- /dev/null +++ b/src/main/java/com/archive/project/jyly/borrow/domain/TArchiveBorrow.java @@ -0,0 +1,567 @@ +/* */ package com.archive.project.jyly.borrow.domain + +-INF.classes.com.archive.project.jyly.borrow.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import com.fasterxml.jackson.annotation.JsonFormat; +/* */ import java.util.Date; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TArchiveBorrow +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "登记编号") +/* */ private String borrowNo; +/* */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") +/* */ @Excel(name = "登记时间", width = 30.0D, dateFormat = "yyyy-MM-dd HH:mm:ss") +/* */ private Date borrowData; +/* */ @Excel(name = "部门") +/* */ private String depatment; +/* */ @Excel(name = "姓名") +/* */ private String name; +/* */ @Excel(name = "电话") +/* */ private String phone; +/* */ @Excel(name = "证件名称:0身份证1军官证2护照") +/* */ private String cardName; +/* */ @Excel(name = "证件编号") +/* */ private String cardNo; +/* */ @Excel(name = "性别:1男2女") +/* */ private String gender; +/* */ @JsonFormat(pattern = "yyyy-MM-dd") +/* */ @Excel(name = "出生年月", width = 30.0D, dateFormat = "yyyy-MM-dd") +/* */ private Date birthday; +/* */ @Excel(name = "联系地址") +/* */ private String address; +/* */ @Excel(name = "类型:1个人2单位") +/* */ private String userType; +/* */ @Excel(name = "利用方式:1查阅2外借3电询") +/* */ private String usingType; +/* */ @Excel(name = "利用目的:1工作查考2学术研究3咨询4其他") +/* */ private String usingAim; +/* */ @Excel(name = "查阅内容") +/* */ private String usingContent; +/* */ @Excel(name = "借阅天数") +/* */ private String usingDate; +/* */ @Excel(name = "利用效果:1全部满意2部分满意3不满意") +/* */ private String usingEffect; +/* */ @Excel(name = "借阅类型:1电子2纸质") +/* */ private String borrowType; +/* */ @Excel(name = "身份证照片存放路径") +/* */ private String cardPhoto; +/* */ @Excel(name = "借阅状态:1借阅2完毕") +/* */ private String exborrowState; +/* */ @Excel(name = "人次") +/* */ private int pborrowState; +/* */ @Excel(name = "电子总数") +/* */ private String dzSum; +/* */ @Excel(name = "纸质总数") +/* */ private String zzSum; +/* */ @Excel(name = "是否查到:0否1是") +/* */ private String isSelected; +/* */ @Excel(name = "登记人") +/* */ private String recordperson; +/* */ @Excel(name = "卷数") +/* */ private Integer juanpage; +/* */ @Excel(name = "件数") +/* */ private Integer jianpage; +/* */ @Excel(name = "页数") +/* */ private Integer page; +/* */ @Excel(name = "拍摄数") +/* */ private Integer photopage; +/* */ @Excel(name = "复印数") +/* */ private Integer copypage; +/* */ @Excel(name = "摘抄数") +/* */ private Integer writepage; +/* */ @Excel(name = "是否审批:0否,2是") +/* */ private String isApprove; +/* */ @Excel(name = "电子授权审核:0未生效1生效") +/* */ private String dzStatus; +/* */ @Excel(name = "实物授权审核:0未生效1生效") +/* */ private String swStatus; +/* */ @Excel(name = "是否授权") +/* */ private String sqFlag; +/* */ @Excel(name = "介绍信说明") +/* */ private String reference; +/* */ @Excel(name = "领导意见") +/* */ private String reviewidea; +/* */ private String flagBy; +/* */ +/* */ public void setId(Long id) { +/* 174 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 179 */ return this.id; +/* */ } +/* */ +/* */ public void setBorrowNo(String borrowNo) { +/* 183 */ this.borrowNo = borrowNo; +/* */ } +/* */ +/* */ +/* */ public String getBorrowNo() { +/* 188 */ return this.borrowNo; +/* */ } +/* */ +/* */ public void setBorrowData(Date borrowData) { +/* 192 */ this.borrowData = borrowData; +/* */ } +/* */ +/* */ +/* */ public Date getBorrowData() { +/* 197 */ return this.borrowData; +/* */ } +/* */ +/* */ public void setDepatment(String depatment) { +/* 201 */ this.depatment = depatment; +/* */ } +/* */ +/* */ +/* */ public String getDepatment() { +/* 206 */ return this.depatment; +/* */ } +/* */ +/* */ public void setName(String name) { +/* 210 */ this.name = name; +/* */ } +/* */ +/* */ +/* */ public String getName() { +/* 215 */ return this.name; +/* */ } +/* */ +/* */ public void setPhone(String phone) { +/* 219 */ this.phone = phone; +/* */ } +/* */ +/* */ +/* */ public String getPhone() { +/* 224 */ return this.phone; +/* */ } +/* */ +/* */ public void setCardName(String cardName) { +/* 228 */ this.cardName = cardName; +/* */ } +/* */ +/* */ +/* */ public String getCardName() { +/* 233 */ return this.cardName; +/* */ } +/* */ +/* */ public void setCardNo(String cardNo) { +/* 237 */ this.cardNo = cardNo; +/* */ } +/* */ +/* */ +/* */ public String getCardNo() { +/* 242 */ return this.cardNo; +/* */ } +/* */ +/* */ public void setGender(String gender) { +/* 246 */ this.gender = gender; +/* */ } +/* */ +/* */ +/* */ public String getGender() { +/* 251 */ return this.gender; +/* */ } +/* */ +/* */ public void setBirthday(Date birthday) { +/* 255 */ this.birthday = birthday; +/* */ } +/* */ +/* */ +/* */ public Date getBirthday() { +/* 260 */ return this.birthday; +/* */ } +/* */ +/* */ public void setAddress(String address) { +/* 264 */ this.address = address; +/* */ } +/* */ +/* */ +/* */ public String getAddress() { +/* 269 */ return this.address; +/* */ } +/* */ +/* */ public void setUserType(String userType) { +/* 273 */ this.userType = userType; +/* */ } +/* */ +/* */ +/* */ public String getUserType() { +/* 278 */ return this.userType; +/* */ } +/* */ +/* */ public void setUsingType(String usingType) { +/* 282 */ this.usingType = usingType; +/* */ } +/* */ +/* */ +/* */ public String getUsingType() { +/* 287 */ return this.usingType; +/* */ } +/* */ +/* */ public void setUsingAim(String usingAim) { +/* 291 */ this.usingAim = usingAim; +/* */ } +/* */ +/* */ +/* */ public String getUsingAim() { +/* 296 */ return this.usingAim; +/* */ } +/* */ +/* */ public void setUsingContent(String usingContent) { +/* 300 */ this.usingContent = usingContent; +/* */ } +/* */ +/* */ +/* */ public String getUsingContent() { +/* 305 */ return this.usingContent; +/* */ } +/* */ +/* */ public void setUsingDate(String usingDate) { +/* 309 */ this.usingDate = usingDate; +/* */ } +/* */ +/* */ +/* */ public String getUsingDate() { +/* 314 */ return this.usingDate; +/* */ } +/* */ +/* */ public void setUsingEffect(String usingEffect) { +/* 318 */ this.usingEffect = usingEffect; +/* */ } +/* */ +/* */ +/* */ public String getUsingEffect() { +/* 323 */ return this.usingEffect; +/* */ } +/* */ +/* */ public void setBorrowType(String borrowType) { +/* 327 */ this.borrowType = borrowType; +/* */ } +/* */ +/* */ +/* */ public String getBorrowType() { +/* 332 */ return this.borrowType; +/* */ } +/* */ +/* */ public void setCardPhoto(String cardPhoto) { +/* 336 */ this.cardPhoto = cardPhoto; +/* */ } +/* */ +/* */ +/* */ public String getCardPhoto() { +/* 341 */ return this.cardPhoto; +/* */ } +/* */ +/* */ public void setExborrowState(String exborrowState) { +/* 345 */ this.exborrowState = exborrowState; +/* */ } +/* */ +/* */ +/* */ public String getExborrowState() { +/* 350 */ return this.exborrowState; +/* */ } +/* */ +/* */ public void setPborrowState(int pborrowState) { +/* 354 */ this.pborrowState = pborrowState; +/* */ } +/* */ +/* */ +/* */ public int getPborrowState() { +/* 359 */ return this.pborrowState; +/* */ } +/* */ +/* */ public void setDzSum(String dzSum) { +/* 363 */ this.dzSum = dzSum; +/* */ } +/* */ +/* */ +/* */ public String getDzSum() { +/* 368 */ return this.dzSum; +/* */ } +/* */ +/* */ public void setZzSum(String zzSum) { +/* 372 */ this.zzSum = zzSum; +/* */ } +/* */ +/* */ +/* */ public String getZzSum() { +/* 377 */ return this.zzSum; +/* */ } +/* */ +/* */ public void setIsSelected(String isSelected) { +/* 381 */ this.isSelected = isSelected; +/* */ } +/* */ +/* */ +/* */ public String getIsSelected() { +/* 386 */ return this.isSelected; +/* */ } +/* */ +/* */ public void setRecordperson(String recordperson) { +/* 390 */ this.recordperson = recordperson; +/* */ } +/* */ +/* */ +/* */ public String getRecordperson() { +/* 395 */ return this.recordperson; +/* */ } +/* */ +/* */ public void setJuanpage(Integer juanpage) { +/* 399 */ this.juanpage = juanpage; +/* */ } +/* */ +/* */ +/* */ public Integer getJuanpage() { +/* 404 */ return this.juanpage; +/* */ } +/* */ +/* */ public void setJianpage(Integer jianpage) { +/* 408 */ this.jianpage = jianpage; +/* */ } +/* */ +/* */ +/* */ public Integer getJianpage() { +/* 413 */ return this.jianpage; +/* */ } +/* */ +/* */ public void setPage(Integer page) { +/* 417 */ this.page = page; +/* */ } +/* */ +/* */ +/* */ public Integer getPage() { +/* 422 */ return this.page; +/* */ } +/* */ +/* */ public void setPhotopage(Integer photopage) { +/* 426 */ this.photopage = photopage; +/* */ } +/* */ +/* */ +/* */ public Integer getPhotopage() { +/* 431 */ return this.photopage; +/* */ } +/* */ +/* */ public void setCopypage(Integer copypage) { +/* 435 */ this.copypage = copypage; +/* */ } +/* */ +/* */ +/* */ public Integer getCopypage() { +/* 440 */ return this.copypage; +/* */ } +/* */ +/* */ public void setWritepage(Integer writepage) { +/* 444 */ this.writepage = writepage; +/* */ } +/* */ +/* */ +/* */ public Integer getWritepage() { +/* 449 */ return this.writepage; +/* */ } +/* */ +/* */ public void setIsApprove(String isApprove) { +/* 453 */ this.isApprove = isApprove; +/* */ } +/* */ +/* */ +/* */ public String getIsApprove() { +/* 458 */ return this.isApprove; +/* */ } +/* */ +/* */ public void setDzStatus(String dzStatus) { +/* 462 */ this.dzStatus = dzStatus; +/* */ } +/* */ +/* */ +/* */ public String getDzStatus() { +/* 467 */ return this.dzStatus; +/* */ } +/* */ +/* */ public void setSwStatus(String swStatus) { +/* 471 */ this.swStatus = swStatus; +/* */ } +/* */ +/* */ +/* */ public String getSwStatus() { +/* 476 */ return this.swStatus; +/* */ } +/* */ +/* */ public void setSqFlag(String sqFlag) { +/* 480 */ this.sqFlag = sqFlag; +/* */ } +/* */ +/* */ +/* */ public String getSqFlag() { +/* 485 */ return this.sqFlag; +/* */ } +/* */ +/* */ public void setReference(String reference) { +/* 489 */ this.reference = reference; +/* */ } +/* */ +/* */ +/* */ public String getReference() { +/* 494 */ return this.reference; +/* */ } +/* */ +/* */ public void setReviewidea(String reviewidea) { +/* 498 */ this.reviewidea = reviewidea; +/* */ } +/* */ +/* */ +/* */ public String getReviewidea() { +/* 503 */ return this.reviewidea; +/* */ } +/* */ +/* */ public void setFlagBy(String flagBy) { +/* 507 */ this.flagBy = flagBy; +/* */ } +/* */ +/* */ +/* */ public String getFlagBy() { +/* 512 */ return this.flagBy; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 517 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 518 */ .append("id", getId()) +/* 519 */ .append("borrowNo", getBorrowNo()) +/* 520 */ .append("borrowData", getBorrowData()) +/* 521 */ .append("depatment", getDepatment()) +/* 522 */ .append("name", getName()) +/* 523 */ .append("phone", getPhone()) +/* 524 */ .append("cardName", getCardName()) +/* 525 */ .append("cardNo", getCardNo()) +/* 526 */ .append("gender", getGender()) +/* 527 */ .append("birthday", getBirthday()) +/* 528 */ .append("address", getAddress()) +/* 529 */ .append("userType", getUserType()) +/* 530 */ .append("usingType", getUsingType()) +/* 531 */ .append("usingAim", getUsingAim()) +/* 532 */ .append("usingContent", getUsingContent()) +/* 533 */ .append("usingDate", getUsingDate()) +/* 534 */ .append("usingEffect", getUsingEffect()) +/* 535 */ .append("borrowType", getBorrowType()) +/* 536 */ .append("cardPhoto", getCardPhoto()) +/* 537 */ .append("exborrowState", getExborrowState()) +/* 538 */ .append("pborrowState", getPborrowState()) +/* 539 */ .append("dzSum", getDzSum()) +/* 540 */ .append("zzSum", getZzSum()) +/* 541 */ .append("isSelected", getIsSelected()) +/* 542 */ .append("recordperson", getRecordperson()) +/* 543 */ .append("juanpage", getJuanpage()) +/* 544 */ .append("jianpage", getJianpage()) +/* 545 */ .append("remark", getRemark()) +/* 546 */ .append("page", getPage()) +/* 547 */ .append("photopage", getPhotopage()) +/* 548 */ .append("copypage", getCopypage()) +/* 549 */ .append("writepage", getWritepage()) +/* 550 */ .append("isApprove", getIsApprove()) +/* 551 */ .append("dzStatus", getDzStatus()) +/* 552 */ .append("swStatus", getSwStatus()) +/* 553 */ .append("sqFlag", getSqFlag()) +/* 554 */ .append("reference", getReference()) +/* 555 */ .append("reviewidea", getReviewidea()) +/* 556 */ .append("flagBy", getFlagBy()) +/* 557 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\borrow\domain\TArchiveBorrow.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/borrow/mapper/TArchiveBorrowMapper.java b/src/main/java/com/archive/project/jyly/borrow/mapper/TArchiveBorrowMapper.java new file mode 100644 index 0000000..a0731de --- /dev/null +++ b/src/main/java/com/archive/project/jyly/borrow/mapper/TArchiveBorrowMapper.java @@ -0,0 +1,30 @@ +package com.archive.project.jyly.borrow.mapper + +-INF.classes.com.archive.project.jyly.borrow.mapper; + +import com.archive.project.jyly.borrow.domain.TArchiveBorrow; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface TArchiveBorrowMapper { + TArchiveBorrow selectTArchiveBorrowById(Long paramLong); + + List selectTArchiveBorrowList(TArchiveBorrow paramTArchiveBorrow); + + List selectTArchiveBorrowListSqlite(TArchiveBorrow paramTArchiveBorrow); + + int insertTArchiveBorrow(TArchiveBorrow paramTArchiveBorrow); + + int updateTArchiveBorrow(TArchiveBorrow paramTArchiveBorrow); + + int deleteTArchiveBorrowById(Long paramLong); + + int deleteTArchiveBorrowByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\borrow\mapper\TArchiveBorrowMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/borrow/service/ITArchiveBorrowService.java b/src/main/java/com/archive/project/jyly/borrow/service/ITArchiveBorrowService.java new file mode 100644 index 0000000..9933fc9 --- /dev/null +++ b/src/main/java/com/archive/project/jyly/borrow/service/ITArchiveBorrowService.java @@ -0,0 +1,26 @@ +package com.archive.project.jyly.borrow.service + +-INF.classes.com.archive.project.jyly.borrow.service; + +import com.archive.project.jyly.borrow.domain.TArchiveBorrow; +import java.util.List; + +public interface ITArchiveBorrowService { + TArchiveBorrow selectTArchiveBorrowById(Long paramLong); + + List selectTArchiveBorrowList(TArchiveBorrow paramTArchiveBorrow); + + int insertTArchiveBorrow(TArchiveBorrow paramTArchiveBorrow); + + int updateTArchiveBorrow(TArchiveBorrow paramTArchiveBorrow); + + int deleteTArchiveBorrowByIds(String paramString); + + int deleteTArchiveBorrowById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\borrow\service\ITArchiveBorrowService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/borrow/service/impl/TArchiveBorrowServiceImpl.java b/src/main/java/com/archive/project/jyly/borrow/service/impl/TArchiveBorrowServiceImpl.java new file mode 100644 index 0000000..d829784 --- /dev/null +++ b/src/main/java/com/archive/project/jyly/borrow/service/impl/TArchiveBorrowServiceImpl.java @@ -0,0 +1,117 @@ +/* */ package com.archive.project.jyly.borrow.service.impl + +-INF.classes.com.archive.project.jyly.borrow.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.jyly.borrow.domain.TArchiveBorrow; +/* */ import com.archive.project.jyly.borrow.mapper.TArchiveBorrowMapper; +/* */ import com.archive.project.jyly.borrow.service.ITArchiveBorrowService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TArchiveBorrowServiceImpl +/* */ implements ITArchiveBorrowService +/* */ { +/* */ @Autowired +/* */ private TArchiveBorrowMapper tArchiveBorrowMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public TArchiveBorrow selectTArchiveBorrowById(Long id) { +/* 39 */ return this.tArchiveBorrowMapper.selectTArchiveBorrowById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTArchiveBorrowList(TArchiveBorrow tArchiveBorrow) { +/* 51 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 52 */ return this.tArchiveBorrowMapper.selectTArchiveBorrowList(tArchiveBorrow); +/* */ } +/* 54 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 55 */ return this.tArchiveBorrowMapper.selectTArchiveBorrowListSqlite(tArchiveBorrow); +/* */ } +/* 57 */ return this.tArchiveBorrowMapper.selectTArchiveBorrowList(tArchiveBorrow); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTArchiveBorrow(TArchiveBorrow tArchiveBorrow) { +/* 71 */ return this.tArchiveBorrowMapper.insertTArchiveBorrow(tArchiveBorrow); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTArchiveBorrow(TArchiveBorrow tArchiveBorrow) { +/* 83 */ return this.tArchiveBorrowMapper.updateTArchiveBorrow(tArchiveBorrow); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTArchiveBorrowByIds(String ids) { +/* 95 */ return this.tArchiveBorrowMapper.deleteTArchiveBorrowByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTArchiveBorrowById(Long id) { +/* 107 */ return this.tArchiveBorrowMapper.deleteTArchiveBorrowById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\borrow\service\impl\TArchiveBorrowServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/detail/controller/TArchiveBorrowDetailController.java b/src/main/java/com/archive/project/jyly/detail/controller/TArchiveBorrowDetailController.java new file mode 100644 index 0000000..973333a --- /dev/null +++ b/src/main/java/com/archive/project/jyly/detail/controller/TArchiveBorrowDetailController.java @@ -0,0 +1,166 @@ +/* */ package com.archive.project.jyly.detail.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.jyly.borrow.domain.TArchiveBorrow; +/* */ import com.archive.project.jyly.borrow.service.ITArchiveBorrowService; +/* */ import com.archive.project.jyly.detail.domain.TArchiveBorrowDetail; +/* */ import com.archive.project.jyly.detail.service.ITArchiveBorrowDetailService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/jyly/detail"}) +/* */ public class TArchiveBorrowDetailController +/* */ extends BaseController +/* */ { +/* 36 */ private String prefix = "jyly/detail"; +/* */ +/* */ @Autowired +/* */ private ITArchiveBorrowDetailService tArchiveBorrowDetailService; +/* */ +/* */ @Autowired +/* */ private ITArchiveBorrowService archiveBorrowService; +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:detail:view"}) +/* */ @GetMapping({"/{ownerid}"}) +/* */ public String detail(@PathVariable("ownerid") Long ownerid, ModelMap mmap) { +/* 48 */ TArchiveBorrow archiveBorrow = this.archiveBorrowService.selectTArchiveBorrowById(ownerid); +/* 49 */ mmap.put("ownerId", String.valueOf(ownerid)); +/* 50 */ mmap.put("exborrowState", archiveBorrow.getExborrowState()); +/* 51 */ return this.prefix + "/detail"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:detail:list"}) +/* */ @PostMapping({"/list/{ownerId}"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(@PathVariable("ownerId") Long ownerId, TArchiveBorrowDetail tArchiveBorrowDetail) { +/* 62 */ startPage(); +/* 63 */ tArchiveBorrowDetail.setOwnerId(ownerId); +/* 64 */ List list = this.tArchiveBorrowDetailService.selectTArchiveBorrowDetailList(tArchiveBorrowDetail); +/* 65 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:detail:export"}) +/* */ @Log(title = "档案借阅登记明细导出", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TArchiveBorrowDetail tArchiveBorrowDetail) { +/* 77 */ List list = this.tArchiveBorrowDetailService.selectTArchiveBorrowDetailList(tArchiveBorrowDetail); +/* 78 */ ExcelUtil util = new ExcelUtil(TArchiveBorrowDetail.class); +/* 79 */ return util.exportExcel(list, "detail"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add/{ownerId}"}) +/* */ public String add(@PathVariable("ownerId") Long ownerId, ModelMap mmap) { +/* 88 */ mmap.put("ownerId", ownerId); +/* 89 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:detail:add"}) +/* */ @Log(title = "档案借阅登记实体登记", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TArchiveBorrowDetail tArchiveBorrowDetail) { +/* 101 */ return toAjax(this.tArchiveBorrowDetailService.insertTArchiveBorrowDetail(tArchiveBorrowDetail)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 110 */ TArchiveBorrowDetail tArchiveBorrowDetail = this.tArchiveBorrowDetailService.selectTArchiveBorrowDetailById(id); +/* 111 */ mmap.put("tArchiveBorrowDetail", tArchiveBorrowDetail); +/* 112 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:detail:edit"}) +/* */ @Log(title = "档案借阅登记明细修改", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TArchiveBorrowDetail tArchiveBorrowDetail) { +/* 124 */ return toAjax(this.tArchiveBorrowDetailService.updateTArchiveBorrowDetail(tArchiveBorrowDetail)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:detail:remove"}) +/* */ @Log(title = "档案借阅登记明细删除", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 136 */ return toAjax(this.tArchiveBorrowDetailService.deleteTArchiveBorrowDetailByIds(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/borrowsearch/{ownerId}"}) +/* */ public String borrowsearch(@PathVariable("ownerId") Long ownerId, ModelMap mmap) { +/* 146 */ mmap.put("ownerId", ownerId); +/* 147 */ return this.prefix + "/borrowsearch"; +/* */ } +/* */ +/* */ @Log(title = "档案利用-明细调档保存", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/saveBorrowDetail"}) +/* */ @ResponseBody +/* */ public AjaxResult saveBorrowDetail(@Validated String ownerId, @Validated String ids) { +/* 154 */ boolean res = this.tArchiveBorrowDetailService.saveBorrowDetail(ownerId, ids); +/* 155 */ if (res) { +/* 156 */ return success(); +/* */ } +/* 158 */ return error(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\detail\controller\TArchiveBorrowDetailController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/detail/domain/TArchiveBorrowDetail.java b/src/main/java/com/archive/project/jyly/detail/domain/TArchiveBorrowDetail.java new file mode 100644 index 0000000..ea25701 --- /dev/null +++ b/src/main/java/com/archive/project/jyly/detail/domain/TArchiveBorrowDetail.java @@ -0,0 +1,369 @@ +/* */ package com.archive.project.jyly.detail.domain + +-INF.classes.com.archive.project.jyly.detail.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TArchiveBorrowDetail +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "借阅单ID") +/* */ private Long ownerId; +/* */ @Excel(name = "创建人") +/* */ private String createUser; +/* */ @Excel(name = "借阅状态") +/* */ private String status; +/* */ @Excel(name = "档号") +/* */ private String dh; +/* */ private String tableId; +/* */ private String tableName; +/* */ private Long archiveId; +/* */ @Excel(name = "全宗") +/* */ private String fondsCode; +/* */ @Excel(name = "题名") +/* */ private String titleProper; +/* */ @Excel(name = "页数") +/* */ private Integer pageNumber; +/* */ @Excel(name = "保管期限") +/* */ private String bgqx; +/* */ @Excel(name = "电子全文数") +/* */ private Integer documentNumber; +/* */ private String isOpen; +/* */ private String borrowType; +/* */ private String showOrder; +/* */ private String isOut; +/* */ @Excel(name = "责任者") +/* */ private String author; +/* */ private String copy; +/* */ private String excerpt; +/* */ private String shot; +/* */ private String scan; +/* */ private String printTime; +/* */ private String uploadTime; +/* */ private String flag1; +/* */ +/* */ public void setId(Long id) { +/* 105 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 110 */ return this.id; +/* */ } +/* */ +/* */ public void setOwnerId(Long ownerId) { +/* 114 */ this.ownerId = ownerId; +/* */ } +/* */ +/* */ +/* */ public Long getOwnerId() { +/* 119 */ return this.ownerId; +/* */ } +/* */ +/* */ public void setCreateUser(String createUser) { +/* 123 */ this.createUser = createUser; +/* */ } +/* */ +/* */ +/* */ public String getCreateUser() { +/* 128 */ return this.createUser; +/* */ } +/* */ +/* */ public void setStatus(String status) { +/* 132 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 137 */ return this.status; +/* */ } +/* */ +/* */ public void setDh(String dh) { +/* 141 */ this.dh = dh; +/* */ } +/* */ +/* */ +/* */ public String getDh() { +/* 146 */ return this.dh; +/* */ } +/* */ +/* */ public void setTableId(String tableId) { +/* 150 */ this.tableId = tableId; +/* */ } +/* */ +/* */ +/* */ public String getTableId() { +/* 155 */ return this.tableId; +/* */ } +/* */ +/* */ public void setTableName(String tableName) { +/* 159 */ this.tableName = tableName; +/* */ } +/* */ +/* */ +/* */ public String getTableName() { +/* 164 */ return this.tableName; +/* */ } +/* */ +/* */ public void setArchiveId(Long archiveId) { +/* 168 */ this.archiveId = archiveId; +/* */ } +/* */ +/* */ +/* */ public Long getArchiveId() { +/* 173 */ return this.archiveId; +/* */ } +/* */ +/* */ public void setFondsCode(String fondsCode) { +/* 177 */ this.fondsCode = fondsCode; +/* */ } +/* */ +/* */ +/* */ public String getFondsCode() { +/* 182 */ return this.fondsCode; +/* */ } +/* */ +/* */ public void setTitleProper(String titleProper) { +/* 186 */ this.titleProper = titleProper; +/* */ } +/* */ +/* */ +/* */ public String getTitleProper() { +/* 191 */ return this.titleProper; +/* */ } +/* */ +/* */ public void setPageNumber(Integer pageNumber) { +/* 195 */ this.pageNumber = pageNumber; +/* */ } +/* */ +/* */ +/* */ public Integer getPageNumber() { +/* 200 */ return this.pageNumber; +/* */ } +/* */ +/* */ public void setBgqx(String bgqx) { +/* 204 */ this.bgqx = bgqx; +/* */ } +/* */ +/* */ +/* */ public String getBgqx() { +/* 209 */ return this.bgqx; +/* */ } +/* */ +/* */ public void setDocumentNumber(Integer documentNumber) { +/* 213 */ this.documentNumber = documentNumber; +/* */ } +/* */ +/* */ +/* */ public Integer getDocumentNumber() { +/* 218 */ return this.documentNumber; +/* */ } +/* */ +/* */ public void setIsOpen(String isOpen) { +/* 222 */ this.isOpen = isOpen; +/* */ } +/* */ +/* */ +/* */ public String getIsOpen() { +/* 227 */ return this.isOpen; +/* */ } +/* */ +/* */ public void setBorrowType(String borrowType) { +/* 231 */ this.borrowType = borrowType; +/* */ } +/* */ +/* */ +/* */ public String getBorrowType() { +/* 236 */ return this.borrowType; +/* */ } +/* */ +/* */ public void setShowOrder(String showOrder) { +/* 240 */ this.showOrder = showOrder; +/* */ } +/* */ +/* */ +/* */ public String getShowOrder() { +/* 245 */ return this.showOrder; +/* */ } +/* */ +/* */ public void setIsOut(String isOut) { +/* 249 */ this.isOut = isOut; +/* */ } +/* */ +/* */ +/* */ public String getIsOut() { +/* 254 */ return this.isOut; +/* */ } +/* */ +/* */ public void setAuthor(String author) { +/* 258 */ this.author = author; +/* */ } +/* */ +/* */ +/* */ public String getAuthor() { +/* 263 */ return this.author; +/* */ } +/* */ +/* */ public void setCopy(String copy) { +/* 267 */ this.copy = copy; +/* */ } +/* */ +/* */ +/* */ public String getCopy() { +/* 272 */ return this.copy; +/* */ } +/* */ +/* */ public void setExcerpt(String excerpt) { +/* 276 */ this.excerpt = excerpt; +/* */ } +/* */ +/* */ +/* */ public String getExcerpt() { +/* 281 */ return this.excerpt; +/* */ } +/* */ +/* */ public void setShot(String shot) { +/* 285 */ this.shot = shot; +/* */ } +/* */ +/* */ +/* */ public String getShot() { +/* 290 */ return this.shot; +/* */ } +/* */ +/* */ public void setScan(String scan) { +/* 294 */ this.scan = scan; +/* */ } +/* */ +/* */ +/* */ public String getScan() { +/* 299 */ return this.scan; +/* */ } +/* */ +/* */ public void setPrintTime(String printTime) { +/* 303 */ this.printTime = printTime; +/* */ } +/* */ +/* */ +/* */ public String getPrintTime() { +/* 308 */ return this.printTime; +/* */ } +/* */ +/* */ public void setUploadTime(String uploadTime) { +/* 312 */ this.uploadTime = uploadTime; +/* */ } +/* */ +/* */ +/* */ public String getUploadTime() { +/* 317 */ return this.uploadTime; +/* */ } +/* */ +/* */ public void setFlag1(String flag1) { +/* 321 */ this.flag1 = flag1; +/* */ } +/* */ +/* */ +/* */ public String getFlag1() { +/* 326 */ return this.flag1; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 331 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 332 */ .append("id", getId()) +/* 333 */ .append("ownerId", getOwnerId()) +/* 334 */ .append("createUser", getCreateUser()) +/* 335 */ .append("createTime", getCreateTime()) +/* 336 */ .append("status", getStatus()) +/* 337 */ .append("dh", getDh()) +/* 338 */ .append("tableId", getTableId()) +/* 339 */ .append("tableName", getTableName()) +/* 340 */ .append("archiveId", getArchiveId()) +/* 341 */ .append("fondsCode", getFondsCode()) +/* 342 */ .append("titleProper", getTitleProper()) +/* 343 */ .append("pageNumber", getPageNumber()) +/* 344 */ .append("bgqx", getBgqx()) +/* 345 */ .append("documentNumber", getDocumentNumber()) +/* 346 */ .append("remark", getRemark()) +/* 347 */ .append("isOpen", getIsOpen()) +/* 348 */ .append("borrowType", getBorrowType()) +/* 349 */ .append("showOrder", getShowOrder()) +/* 350 */ .append("isOut", getIsOut()) +/* 351 */ .append("author", getAuthor()) +/* 352 */ .append("copy", getCopy()) +/* 353 */ .append("excerpt", getExcerpt()) +/* 354 */ .append("shot", getShot()) +/* 355 */ .append("scan", getScan()) +/* 356 */ .append("printTime", getPrintTime()) +/* 357 */ .append("uploadTime", getUploadTime()) +/* 358 */ .append("flag1", getFlag1()) +/* 359 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\detail\domain\TArchiveBorrowDetail.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/detail/mapper/TArchiveBorrowDetailMapper.java b/src/main/java/com/archive/project/jyly/detail/mapper/TArchiveBorrowDetailMapper.java new file mode 100644 index 0000000..c35b374 --- /dev/null +++ b/src/main/java/com/archive/project/jyly/detail/mapper/TArchiveBorrowDetailMapper.java @@ -0,0 +1,28 @@ +package com.archive.project.jyly.detail.mapper + +; + +import com.archive.project.jyly.detail.domain.TArchiveBorrowDetail; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface TArchiveBorrowDetailMapper { + TArchiveBorrowDetail selectTArchiveBorrowDetailById(Long paramLong); + + List selectTArchiveBorrowDetailList(TArchiveBorrowDetail paramTArchiveBorrowDetail); + + int insertTArchiveBorrowDetail(TArchiveBorrowDetail paramTArchiveBorrowDetail); + + int updateTArchiveBorrowDetail(TArchiveBorrowDetail paramTArchiveBorrowDetail); + + int deleteTArchiveBorrowDetailById(Long paramLong); + + int deleteTArchiveBorrowDetailByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\detail\mapper\TArchiveBorrowDetailMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/detail/service/ITArchiveBorrowDetailService.java b/src/main/java/com/archive/project/jyly/detail/service/ITArchiveBorrowDetailService.java new file mode 100644 index 0000000..2a8d249 --- /dev/null +++ b/src/main/java/com/archive/project/jyly/detail/service/ITArchiveBorrowDetailService.java @@ -0,0 +1,28 @@ +package com.archive.project.jyly.detail.service + +-INF.classes.com.archive.project.jyly.detail.service; + +import com.archive.project.jyly.detail.domain.TArchiveBorrowDetail; +import java.util.List; + +public interface ITArchiveBorrowDetailService { + TArchiveBorrowDetail selectTArchiveBorrowDetailById(Long paramLong); + + List selectTArchiveBorrowDetailList(TArchiveBorrowDetail paramTArchiveBorrowDetail); + + int insertTArchiveBorrowDetail(TArchiveBorrowDetail paramTArchiveBorrowDetail); + + int updateTArchiveBorrowDetail(TArchiveBorrowDetail paramTArchiveBorrowDetail); + + int deleteTArchiveBorrowDetailByIds(String paramString); + + int deleteTArchiveBorrowDetailById(Long paramLong); + + boolean saveBorrowDetail(String paramString1, String paramString2); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\detail\service\ITArchiveBorrowDetailService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/detail/service/impl/TArchiveBorrowDetailServiceImpl.java b/src/main/java/com/archive/project/jyly/detail/service/impl/TArchiveBorrowDetailServiceImpl.java new file mode 100644 index 0000000..6ee12d5 --- /dev/null +++ b/src/main/java/com/archive/project/jyly/detail/service/impl/TArchiveBorrowDetailServiceImpl.java @@ -0,0 +1,162 @@ +/* */ package com.archive.project.jyly.detail.service.impl + +-INF.classes.com.archive.project.jyly.detail.service.impl; +/* */ +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.jyly.detail.domain.TArchiveBorrowDetail; +/* */ import com.archive.project.jyly.detail.mapper.TArchiveBorrowDetailMapper; +/* */ import com.archive.project.jyly.detail.service.ITArchiveBorrowDetailService; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TArchiveBorrowDetailServiceImpl +/* */ implements ITArchiveBorrowDetailService +/* */ { +/* */ @Autowired +/* */ private TArchiveBorrowDetailMapper tArchiveBorrowDetailMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ +/* */ public TArchiveBorrowDetail selectTArchiveBorrowDetailById(Long id) { +/* 42 */ return this.tArchiveBorrowDetailMapper.selectTArchiveBorrowDetailById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTArchiveBorrowDetailList(TArchiveBorrowDetail tArchiveBorrowDetail) { +/* 54 */ return this.tArchiveBorrowDetailMapper.selectTArchiveBorrowDetailList(tArchiveBorrowDetail); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTArchiveBorrowDetail(TArchiveBorrowDetail tArchiveBorrowDetail) { +/* 66 */ tArchiveBorrowDetail.setCreateTime(DateUtils.getNowDate()); +/* 67 */ return this.tArchiveBorrowDetailMapper.insertTArchiveBorrowDetail(tArchiveBorrowDetail); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTArchiveBorrowDetail(TArchiveBorrowDetail tArchiveBorrowDetail) { +/* 79 */ return this.tArchiveBorrowDetailMapper.updateTArchiveBorrowDetail(tArchiveBorrowDetail); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTArchiveBorrowDetailByIds(String ids) { +/* 91 */ return this.tArchiveBorrowDetailMapper.deleteTArchiveBorrowDetailByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTArchiveBorrowDetailById(Long id) { +/* 103 */ return this.tArchiveBorrowDetailMapper.deleteTArchiveBorrowDetailById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean saveBorrowDetail(String ownerId, String ids) { +/* 115 */ boolean res = false; +/* */ try { +/* 117 */ String[] sttr = ids.split(","); +/* 118 */ for (int i = 0; i < sttr.length; i++) { +/* 119 */ String[] idcode = sttr[i].split("-"); +/* 120 */ String archiveId = idcode[0]; +/* 121 */ String tableId = idcode[1]; +/* 122 */ String sql = "select qzh,dh,tm,ys,bgqx,zrz,archiveTypeName,kfkz from t_ar_total where archiveId='" + archiveId + "' and tableId='" + tableId + "'"; +/* */ +/* 124 */ List> datalist = this.executeSqlService.queryList(sql); +/* 125 */ if (datalist.size() > 0 && datalist.get(0) != null) { +/* 126 */ TArchiveBorrowDetail tArchiveBorrowDetail = new TArchiveBorrowDetail(); +/* 127 */ tArchiveBorrowDetail.setOwnerId(Long.valueOf(Long.parseLong(ownerId))); +/* 128 */ tArchiveBorrowDetail.setArchiveId(Long.valueOf(Long.parseLong(archiveId))); +/* 129 */ tArchiveBorrowDetail.setTableId(tableId); +/* 130 */ tArchiveBorrowDetail.setTableName((((LinkedHashMap)datalist.get(0)).get("archiveTypeName") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("archiveTypeName").toString()); +/* 131 */ tArchiveBorrowDetail.setAuthor((((LinkedHashMap)datalist.get(0)).get("zrz") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("zrz").toString()); +/* 132 */ tArchiveBorrowDetail.setBgqx((((LinkedHashMap)datalist.get(0)).get("bgqx") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("bgqx").toString()); +/* 133 */ tArchiveBorrowDetail.setDh((((LinkedHashMap)datalist.get(0)).get("dh") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("dh").toString()); +/* 134 */ tArchiveBorrowDetail.setFondsCode((((LinkedHashMap)datalist.get(0)).get("qzh") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("qzh").toString()); +/* 135 */ tArchiveBorrowDetail.setIsOpen((((LinkedHashMap)datalist.get(0)).get("kfkz") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("kfkz").toString()); +/* 136 */ tArchiveBorrowDetail.setTitleProper((((LinkedHashMap)datalist.get(0)).get("tm") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("tm").toString()); +/* 137 */ tArchiveBorrowDetail.setPageNumber(Integer.valueOf((((LinkedHashMap)datalist.get(0)).get("ys") == null) ? 0 : Integer.parseInt(((LinkedHashMap)datalist.get(0)).get("ys").toString().equals("") ? "0" : ((LinkedHashMap)datalist.get(0)).get("ys").toString()))); +/* 138 */ tArchiveBorrowDetail.setCreateTime(DateUtils.getNowDate()); +/* 139 */ User currentUser = ShiroUtils.getSysUser(); +/* 140 */ if (currentUser != null) { +/* 141 */ tArchiveBorrowDetail.setCreateUser(currentUser.getUserName()); +/* */ } +/* 143 */ this.tArchiveBorrowDetailMapper.insertTArchiveBorrowDetail(tArchiveBorrowDetail); +/* */ } else { +/* 145 */ System.out.println("没有查询到数据"); +/* */ } +/* */ } +/* 148 */ res = true; +/* 149 */ } catch (Exception ex) { +/* 150 */ System.out.println("ERROR出现异常:" + ex.getMessage()); +/* */ } +/* 152 */ return res; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\detail\service\impl\TArchiveBorrowDetailServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/person/controller/TArchivePersonController.java b/src/main/java/com/archive/project/jyly/person/controller/TArchivePersonController.java new file mode 100644 index 0000000..8a69c29 --- /dev/null +++ b/src/main/java/com/archive/project/jyly/person/controller/TArchivePersonController.java @@ -0,0 +1,134 @@ +/* */ package com.archive.project.jyly.person.controller + +-INF.classes.com.archive.project.jyly.person.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.jyly.person.domain.TArchivePerson; +/* */ import com.archive.project.jyly.person.service.ITArchivePersonService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/jyly/person"}) +/* */ public class TArchivePersonController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "jyly/person"; +/* */ +/* */ @Autowired +/* */ private ITArchivePersonService tArchivePersonService; +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:person:view"}) +/* */ @GetMapping +/* */ public String person() { +/* 41 */ return this.prefix + "/person"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:person:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(TArchivePerson tArchivePerson) { +/* 52 */ startPage(); +/* 53 */ List list = this.tArchivePersonService.selectTArchivePersonList(tArchivePerson); +/* 54 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:person:export"}) +/* */ @Log(title = "查档者管理", businessType = BusinessType.EXPORT) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(TArchivePerson tArchivePerson) { +/* 66 */ List list = this.tArchivePersonService.selectTArchivePersonList(tArchivePerson); +/* 67 */ ExcelUtil util = new ExcelUtil(TArchivePerson.class); +/* 68 */ return util.exportExcel(list, "person"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 77 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:person:add"}) +/* */ @Log(title = "查档者管理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(TArchivePerson tArchivePerson) { +/* 89 */ return toAjax(this.tArchivePersonService.insertTArchivePerson(tArchivePerson)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{id}"}) +/* */ public String edit(@PathVariable("id") Long id, ModelMap mmap) { +/* 98 */ TArchivePerson tArchivePerson = this.tArchivePersonService.selectTArchivePersonById(id); +/* 99 */ mmap.put("tArchivePerson", tArchivePerson); +/* 100 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:person:edit"}) +/* */ @Log(title = "查档者管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(TArchivePerson tArchivePerson) { +/* 112 */ return toAjax(this.tArchivePersonService.updateTArchivePerson(tArchivePerson)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"jyly:person:remove"}) +/* */ @Log(title = "查档者管理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 124 */ return toAjax(this.tArchivePersonService.deleteTArchivePersonByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\person\controller\TArchivePersonController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/person/domain/TArchivePerson.java b/src/main/java/com/archive/project/jyly/person/domain/TArchivePerson.java new file mode 100644 index 0000000..9768241 --- /dev/null +++ b/src/main/java/com/archive/project/jyly/person/domain/TArchivePerson.java @@ -0,0 +1,272 @@ +/* */ package com.archive.project.jyly.person.domain + +-INF.classes.com.archive.project.jyly.person.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import com.fasterxml.jackson.annotation.JsonFormat; +/* */ import java.util.Date; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TArchivePerson +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long id; +/* */ @Excel(name = "状态") +/* */ private String status; +/* */ @Excel(name = "姓名") +/* */ private String name; +/* */ @Excel(name = "电话") +/* */ private String phone; +/* */ @Excel(name = "证件类型") +/* */ private String cardName; +/* */ @Excel(name = "证件号码") +/* */ private String cardNo; +/* */ @Excel(name = "性别") +/* */ private String gender; +/* */ @Excel(name = "住址") +/* */ private String address; +/* */ @Excel(name = "民族") +/* */ private String nation; +/* */ @JsonFormat(pattern = "yyyy-MM-dd") +/* */ @Excel(name = "生日", width = 30.0D, dateFormat = "yyyy-MM-dd") +/* */ private Date birthday; +/* */ @Excel(name = "最后访问日期") +/* */ private String lastDate; +/* */ @Excel(name = "所属数据ID") +/* */ private Long ownerId; +/* */ @Excel(name = "公司名称") +/* */ private String compantname; +/* */ @Excel(name = "登陆密码") +/* */ private String password; +/* */ @Excel(name = "授权状态") +/* */ private String enablestatus; +/* */ @Excel(name = "照片路径") +/* */ private String photo; +/* */ @Excel(name = "BASE64照片") +/* */ private String photobase64; +/* */ +/* */ public void setId(Long id) { +/* 90 */ this.id = id; +/* */ } +/* */ +/* */ +/* */ public Long getId() { +/* 95 */ return this.id; +/* */ } +/* */ +/* */ public void setStatus(String status) { +/* 99 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 104 */ return this.status; +/* */ } +/* */ +/* */ public void setName(String name) { +/* 108 */ this.name = name; +/* */ } +/* */ +/* */ +/* */ public String getName() { +/* 113 */ return this.name; +/* */ } +/* */ +/* */ public void setPhone(String phone) { +/* 117 */ this.phone = phone; +/* */ } +/* */ +/* */ +/* */ public String getPhone() { +/* 122 */ return this.phone; +/* */ } +/* */ +/* */ public void setCardName(String cardName) { +/* 126 */ this.cardName = cardName; +/* */ } +/* */ +/* */ +/* */ public String getCardName() { +/* 131 */ return this.cardName; +/* */ } +/* */ +/* */ public void setCardNo(String cardNo) { +/* 135 */ this.cardNo = cardNo; +/* */ } +/* */ +/* */ +/* */ public String getCardNo() { +/* 140 */ return this.cardNo; +/* */ } +/* */ +/* */ public void setGender(String gender) { +/* 144 */ this.gender = gender; +/* */ } +/* */ +/* */ +/* */ public String getGender() { +/* 149 */ return this.gender; +/* */ } +/* */ +/* */ public void setAddress(String address) { +/* 153 */ this.address = address; +/* */ } +/* */ +/* */ +/* */ public String getAddress() { +/* 158 */ return this.address; +/* */ } +/* */ +/* */ public void setNation(String nation) { +/* 162 */ this.nation = nation; +/* */ } +/* */ +/* */ +/* */ public String getNation() { +/* 167 */ return this.nation; +/* */ } +/* */ +/* */ public void setBirthday(Date birthday) { +/* 171 */ this.birthday = birthday; +/* */ } +/* */ +/* */ +/* */ public Date getBirthday() { +/* 176 */ return this.birthday; +/* */ } +/* */ +/* */ public void setLastDate(String lastDate) { +/* 180 */ this.lastDate = lastDate; +/* */ } +/* */ +/* */ +/* */ public String getLastDate() { +/* 185 */ return this.lastDate; +/* */ } +/* */ +/* */ public void setOwnerId(Long ownerId) { +/* 189 */ this.ownerId = ownerId; +/* */ } +/* */ +/* */ +/* */ public Long getOwnerId() { +/* 194 */ return this.ownerId; +/* */ } +/* */ +/* */ public void setCompantname(String compantname) { +/* 198 */ this.compantname = compantname; +/* */ } +/* */ +/* */ +/* */ public String getCompantname() { +/* 203 */ return this.compantname; +/* */ } +/* */ +/* */ public void setPassword(String password) { +/* 207 */ this.password = password; +/* */ } +/* */ +/* */ +/* */ public String getPassword() { +/* 212 */ return this.password; +/* */ } +/* */ +/* */ public void setEnablestatus(String enablestatus) { +/* 216 */ this.enablestatus = enablestatus; +/* */ } +/* */ +/* */ +/* */ public String getEnablestatus() { +/* 221 */ return this.enablestatus; +/* */ } +/* */ +/* */ public void setPhoto(String photo) { +/* 225 */ this.photo = photo; +/* */ } +/* */ +/* */ +/* */ public String getPhoto() { +/* 230 */ return this.photo; +/* */ } +/* */ +/* */ public void setPhotobase64(String photobase64) { +/* 234 */ this.photobase64 = photobase64; +/* */ } +/* */ +/* */ +/* */ public String getPhotobase64() { +/* 239 */ return this.photobase64; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 244 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 245 */ .append("id", getId()) +/* 246 */ .append("status", getStatus()) +/* 247 */ .append("name", getName()) +/* 248 */ .append("phone", getPhone()) +/* 249 */ .append("cardName", getCardName()) +/* 250 */ .append("cardNo", getCardNo()) +/* 251 */ .append("gender", getGender()) +/* 252 */ .append("address", getAddress()) +/* 253 */ .append("nation", getNation()) +/* 254 */ .append("birthday", getBirthday()) +/* 255 */ .append("lastDate", getLastDate()) +/* 256 */ .append("ownerId", getOwnerId()) +/* 257 */ .append("compantname", getCompantname()) +/* 258 */ .append("password", getPassword()) +/* 259 */ .append("enablestatus", getEnablestatus()) +/* 260 */ .append("photo", getPhoto()) +/* 261 */ .append("photobase64", getPhotobase64()) +/* 262 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\person\domain\TArchivePerson.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/person/mapper/TArchivePersonMapper.java b/src/main/java/com/archive/project/jyly/person/mapper/TArchivePersonMapper.java new file mode 100644 index 0000000..f9daebf --- /dev/null +++ b/src/main/java/com/archive/project/jyly/person/mapper/TArchivePersonMapper.java @@ -0,0 +1,26 @@ +package com.archive.project.jyly.person.mapper + +-INF.classes.com.archive.project.jyly.person.mapper; + +import com.archive.project.jyly.person.domain.TArchivePerson; +import java.util.List; + +public interface TArchivePersonMapper { + TArchivePerson selectTArchivePersonById(Long paramLong); + + List selectTArchivePersonList(TArchivePerson paramTArchivePerson); + + int insertTArchivePerson(TArchivePerson paramTArchivePerson); + + int updateTArchivePerson(TArchivePerson paramTArchivePerson); + + int deleteTArchivePersonById(Long paramLong); + + int deleteTArchivePersonByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\person\mapper\TArchivePersonMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/person/service/ITArchivePersonService.java b/src/main/java/com/archive/project/jyly/person/service/ITArchivePersonService.java new file mode 100644 index 0000000..e99eb2e --- /dev/null +++ b/src/main/java/com/archive/project/jyly/person/service/ITArchivePersonService.java @@ -0,0 +1,26 @@ +package com.archive.project.jyly.person.service + +; + +import com.archive.project.jyly.person.domain.TArchivePerson; +import java.util.List; + +public interface ITArchivePersonService { + TArchivePerson selectTArchivePersonById(Long paramLong); + + List selectTArchivePersonList(TArchivePerson paramTArchivePerson); + + int insertTArchivePerson(TArchivePerson paramTArchivePerson); + + int updateTArchivePerson(TArchivePerson paramTArchivePerson); + + int deleteTArchivePersonByIds(String paramString); + + int deleteTArchivePersonById(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\person\service\ITArchivePersonService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/jyly/person/service/impl/TArchivePersonServiceImpl.java b/src/main/java/com/archive/project/jyly/person/service/impl/TArchivePersonServiceImpl.java new file mode 100644 index 0000000..f6ae033 --- /dev/null +++ b/src/main/java/com/archive/project/jyly/person/service/impl/TArchivePersonServiceImpl.java @@ -0,0 +1,102 @@ +/* */ package com.archive.project.jyly.person.service.impl + +-INF.classes.com.archive.project.jyly.person.service.impl; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.jyly.person.domain.TArchivePerson; +/* */ import com.archive.project.jyly.person.mapper.TArchivePersonMapper; +/* */ import com.archive.project.jyly.person.service.ITArchivePersonService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class TArchivePersonServiceImpl +/* */ implements ITArchivePersonService +/* */ { +/* */ @Autowired +/* */ private TArchivePersonMapper tArchivePersonMapper; +/* */ +/* */ public TArchivePerson selectTArchivePersonById(Long id) { +/* 32 */ return this.tArchivePersonMapper.selectTArchivePersonById(id); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectTArchivePersonList(TArchivePerson tArchivePerson) { +/* 44 */ return this.tArchivePersonMapper.selectTArchivePersonList(tArchivePerson); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertTArchivePerson(TArchivePerson tArchivePerson) { +/* 56 */ return this.tArchivePersonMapper.insertTArchivePerson(tArchivePerson); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateTArchivePerson(TArchivePerson tArchivePerson) { +/* 68 */ return this.tArchivePersonMapper.updateTArchivePerson(tArchivePerson); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTArchivePersonByIds(String ids) { +/* 80 */ return this.tArchivePersonMapper.deleteTArchivePersonByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteTArchivePersonById(Long id) { +/* 92 */ return this.tArchivePersonMapper.deleteTArchivePersonById(id); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\jyly\person\service\impl\TArchivePersonServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/cache/CacheController.java b/src/main/java/com/archive/project/monitor/cache/CacheController.java new file mode 100644 index 0000000..3157f7f --- /dev/null +++ b/src/main/java/com/archive/project/monitor/cache/CacheController.java @@ -0,0 +1,90 @@ +/* */ package com.archive.project.monitor.cache + +-INF.classes.com.archive.project.monitor.cache; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.service.CacheService; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/monitor/cache"}) +/* */ public class CacheController +/* */ extends BaseController +/* */ { +/* 23 */ private String prefix = "monitor/cache"; +/* */ +/* */ @Autowired +/* */ private CacheService cacheService; +/* */ +/* */ +/* */ @GetMapping +/* */ public String cache(ModelMap mmap) { +/* 31 */ mmap.put("cacheNames", this.cacheService.getCacheNames()); +/* 32 */ return this.prefix + "/cache"; +/* */ } +/* */ +/* */ +/* */ @PostMapping({"/getNames"}) +/* */ public String getCacheNames(String fragment, ModelMap mmap) { +/* 38 */ mmap.put("cacheNames", this.cacheService.getCacheNames()); +/* 39 */ return this.prefix + "/cache::" + fragment; +/* */ } +/* */ +/* */ +/* */ @PostMapping({"/getKeys"}) +/* */ public String getCacheKeys(String fragment, String cacheName, ModelMap mmap) { +/* 45 */ mmap.put("cacheName", cacheName); +/* 46 */ mmap.put("cacheKyes", this.cacheService.getCacheKeys(cacheName)); +/* 47 */ return this.prefix + "/cache::" + fragment; +/* */ } +/* */ +/* */ +/* */ @PostMapping({"/getValue"}) +/* */ public String getCacheValue(String fragment, String cacheName, String cacheKey, ModelMap mmap) { +/* 53 */ mmap.put("cacheName", cacheName); +/* 54 */ mmap.put("cacheKey", cacheKey); +/* 55 */ mmap.put("cacheValue", this.cacheService.getCacheValue(cacheName, cacheKey)); +/* 56 */ return this.prefix + "/cache::" + fragment; +/* */ } +/* */ +/* */ +/* */ @PostMapping({"/clearCacheName"}) +/* */ @ResponseBody +/* */ public AjaxResult clearCacheName(String cacheName, ModelMap mmap) { +/* 63 */ this.cacheService.clearCacheName(cacheName); +/* 64 */ return AjaxResult.success(); +/* */ } +/* */ +/* */ +/* */ @PostMapping({"/clearCacheKey"}) +/* */ @ResponseBody +/* */ public AjaxResult clearCacheKey(String cacheName, String cacheKey, ModelMap mmap) { +/* 71 */ this.cacheService.clearCacheKey(cacheName, cacheKey); +/* 72 */ return AjaxResult.success(); +/* */ } +/* */ +/* */ +/* */ @GetMapping({"/clearAll"}) +/* */ @ResponseBody +/* */ public AjaxResult clearAll(ModelMap mmap) { +/* 79 */ this.cacheService.clearAll(); +/* 80 */ return AjaxResult.success(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\cache\CacheController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/druid/DruidController.java b/src/main/java/com/archive/project/monitor/druid/DruidController.java new file mode 100644 index 0000000..ae3a751 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/druid/DruidController.java @@ -0,0 +1,34 @@ +/* */ package com.archive.project.monitor.druid + +-INF.classes.com.archive.project.monitor.druid; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/monitor/data"}) +/* */ public class DruidController +/* */ extends BaseController +/* */ { +/* 18 */ private String prefix = "/druid"; +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:data:view"}) +/* */ @GetMapping +/* */ public String index() { +/* 24 */ return redirect(this.prefix + "/index"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\druid\DruidController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/controller/JobController.java b/src/main/java/com/archive/project/monitor/job/controller/JobController.java new file mode 100644 index 0000000..e512347 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/controller/JobController.java @@ -0,0 +1,185 @@ +/* */ package com.archive.project.monitor.job.controller + +-INF.classes.com.archive.project.monitor.job.controller; +/* */ +/* */ import com.archive.common.exception.job.TaskException; +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.monitor.job.domain.Job; +/* */ import com.archive.project.monitor.job.service.IJobService; +/* */ import com.archive.project.monitor.job.util.CronUtils; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.quartz.SchedulerException; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/monitor/job"}) +/* */ public class JobController +/* */ extends BaseController +/* */ { +/* 36 */ private String prefix = "monitor/job"; +/* */ +/* */ @Autowired +/* */ private IJobService jobService; +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:job:view"}) +/* */ @GetMapping +/* */ public String job() { +/* 45 */ return this.prefix + "/job"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:job:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(Job job) { +/* 53 */ startPage(); +/* 54 */ List list = this.jobService.selectJobList(job); +/* 55 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @Log(title = "定时任务", businessType = BusinessType.EXPORT) +/* */ @RequiresPermissions({"monitor:job:export"}) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(Job job) { +/* 64 */ List list = this.jobService.selectJobList(job); +/* 65 */ ExcelUtil util = new ExcelUtil(Job.class); +/* 66 */ return util.exportExcel(list, "定时任务"); +/* */ } +/* */ +/* */ +/* */ @Log(title = "定时任务", businessType = BusinessType.DELETE) +/* */ @RequiresPermissions({"monitor:job:remove"}) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) throws SchedulerException { +/* 75 */ this.jobService.deleteJobByIds(ids); +/* 76 */ return success(); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:job:detail"}) +/* */ @GetMapping({"/detail/{jobId}"}) +/* */ public String detail(@PathVariable("jobId") Long jobId, ModelMap mmap) { +/* 83 */ mmap.put("name", "job"); +/* 84 */ mmap.put("job", this.jobService.selectJobById(jobId)); +/* 85 */ return this.prefix + "/detail"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "定时任务", businessType = BusinessType.UPDATE) +/* */ @RequiresPermissions({"monitor:job:changeStatus"}) +/* */ @PostMapping({"/changeStatus"}) +/* */ @ResponseBody +/* */ public AjaxResult changeStatus(Job job) throws SchedulerException { +/* 97 */ Job newJob = this.jobService.selectJobById(job.getJobId()); +/* 98 */ newJob.setStatus(job.getStatus()); +/* 99 */ return toAjax(this.jobService.changeStatus(newJob)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "定时任务", businessType = BusinessType.UPDATE) +/* */ @RequiresPermissions({"monitor:job:changeStatus"}) +/* */ @PostMapping({"/run"}) +/* */ @ResponseBody +/* */ public AjaxResult run(Job job) throws SchedulerException { +/* 111 */ this.jobService.run(job); +/* 112 */ return success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 121 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "定时任务", businessType = BusinessType.INSERT) +/* */ @RequiresPermissions({"monitor:job:add"}) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(@Validated Job job) throws SchedulerException, TaskException { +/* 133 */ if (!CronUtils.isValid(job.getCronExpression())) +/* */ { +/* 135 */ return AjaxResult.error("cron表达式不正确"); +/* */ } +/* 137 */ job.setCreateBy(ShiroUtils.getLoginName()); +/* 138 */ return toAjax(this.jobService.insertJob(job)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{jobId}"}) +/* */ public String edit(@PathVariable("jobId") Long jobId, ModelMap mmap) { +/* 147 */ mmap.put("job", this.jobService.selectJobById(jobId)); +/* 148 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "定时任务", businessType = BusinessType.UPDATE) +/* */ @RequiresPermissions({"monitor:job:edit"}) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(@Validated Job job) throws SchedulerException, TaskException { +/* 160 */ if (!CronUtils.isValid(job.getCronExpression())) +/* */ { +/* 162 */ return AjaxResult.error("cron表达式不正确"); +/* */ } +/* 164 */ job.setUpdateBy(ShiroUtils.getLoginName()); +/* 165 */ return toAjax(this.jobService.updateJob(job)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkCronExpressionIsValid"}) +/* */ @ResponseBody +/* */ public boolean checkCronExpressionIsValid(Job job) { +/* 175 */ return this.jobService.checkCronExpressionIsValid(job.getCronExpression()); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\controller\JobController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/controller/JobLogController.java b/src/main/java/com/archive/project/monitor/job/controller/JobLogController.java new file mode 100644 index 0000000..5c222f9 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/controller/JobLogController.java @@ -0,0 +1,111 @@ +/* */ package com.archive.project.monitor.job.controller + +-INF.classes.com.archive.project.monitor.job.controller; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.monitor.job.domain.Job; +/* */ import com.archive.project.monitor.job.domain.JobLog; +/* */ import com.archive.project.monitor.job.service.IJobLogService; +/* */ import com.archive.project.monitor.job.service.IJobService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.RequestParam; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/monitor/jobLog"}) +/* */ public class JobLogController +/* */ extends BaseController +/* */ { +/* 35 */ private String prefix = "monitor/job"; +/* */ +/* */ @Autowired +/* */ private IJobService jobService; +/* */ +/* */ @Autowired +/* */ private IJobLogService jobLogService; +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:job:view"}) +/* */ @GetMapping +/* */ public String jobLog(@RequestParam(value = "jobId", required = false) Long jobId, ModelMap mmap) { +/* 47 */ if (StringUtils.isNotNull(jobId)) { +/* */ +/* 49 */ Job job = this.jobService.selectJobById(jobId); +/* 50 */ mmap.put("job", job); +/* */ } +/* 52 */ return this.prefix + "/jobLog"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:job:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(JobLog jobLog) { +/* 60 */ startPage(); +/* 61 */ List list = this.jobLogService.selectJobLogList(jobLog); +/* 62 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @Log(title = "调度日志", businessType = BusinessType.EXPORT) +/* */ @RequiresPermissions({"monitor:job:export"}) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(JobLog jobLog) { +/* 71 */ List list = this.jobLogService.selectJobLogList(jobLog); +/* 72 */ ExcelUtil util = new ExcelUtil(JobLog.class); +/* 73 */ return util.exportExcel(list, "调度日志"); +/* */ } +/* */ +/* */ +/* */ @Log(title = "调度日志", businessType = BusinessType.DELETE) +/* */ @RequiresPermissions({"monitor:job:remove"}) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 82 */ return toAjax(this.jobLogService.deleteJobLogByIds(ids)); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:job:detail"}) +/* */ @GetMapping({"/detail/{jobLogId}"}) +/* */ public String detail(@PathVariable("jobLogId") Long jobLogId, ModelMap mmap) { +/* 89 */ mmap.put("name", "jobLog"); +/* 90 */ mmap.put("jobLog", this.jobLogService.selectJobLogById(jobLogId)); +/* 91 */ return this.prefix + "/detail"; +/* */ } +/* */ +/* */ +/* */ @Log(title = "调度日志", businessType = BusinessType.CLEAN) +/* */ @RequiresPermissions({"monitor:job:remove"}) +/* */ @PostMapping({"/clean"}) +/* */ @ResponseBody +/* */ public AjaxResult clean() { +/* 100 */ this.jobLogService.cleanJobLog(); +/* 101 */ return success(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\controller\JobLogController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/domain/Job.java b/src/main/java/com/archive/project/monitor/job/domain/Job.java new file mode 100644 index 0000000..47d2bdb --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/domain/Job.java @@ -0,0 +1,177 @@ +/* */ package com.archive.project.monitor.job.domain + +-INF.classes.com.archive.project.monitor.job.domain; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import com.archive.project.monitor.job.util.CronUtils; +/* */ import java.io.Serializable; +/* */ import java.util.Date; +/* */ import javax.validation.constraints.NotBlank; +/* */ import javax.validation.constraints.Size; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Job +/* */ extends BaseEntity +/* */ implements Serializable +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ @Excel(name = "任务序号", cellType = Excel.ColumnType.NUMERIC) +/* */ private Long jobId; +/* */ @Excel(name = "任务名称") +/* */ private String jobName; +/* */ @Excel(name = "任务组名") +/* */ private String jobGroup; +/* */ @Excel(name = "调用目标字符串") +/* */ private String invokeTarget; +/* */ @Excel(name = "执行表达式 ") +/* */ private String cronExpression; +/* */ @Excel(name = "计划策略 ", readConverterExp = "0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行") +/* 45 */ private String misfirePolicy = "0"; +/* */ +/* */ +/* */ @Excel(name = "并发执行", readConverterExp = "0=允许,1=禁止") +/* */ private String concurrent; +/* */ +/* */ +/* */ @Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停") +/* */ private String status; +/* */ +/* */ +/* */ +/* */ public Long getJobId() { +/* 58 */ return this.jobId; +/* */ } +/* */ +/* */ +/* */ public void setJobId(Long jobId) { +/* 63 */ this.jobId = jobId; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "任务名称不能为空") +/* */ @Size(min = 0, max = 64, message = "任务名称不能超过64个字符") +/* */ public String getJobName() { +/* 70 */ return this.jobName; +/* */ } +/* */ +/* */ +/* */ public void setJobName(String jobName) { +/* 75 */ this.jobName = jobName; +/* */ } +/* */ +/* */ +/* */ public String getJobGroup() { +/* 80 */ return this.jobGroup; +/* */ } +/* */ +/* */ +/* */ public void setJobGroup(String jobGroup) { +/* 85 */ this.jobGroup = jobGroup; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "调用目标字符串不能为空") +/* */ @Size(min = 0, max = 1000, message = "调用目标字符串长度不能超过500个字符") +/* */ public String getInvokeTarget() { +/* 92 */ return this.invokeTarget; +/* */ } +/* */ +/* */ +/* */ public void setInvokeTarget(String invokeTarget) { +/* 97 */ this.invokeTarget = invokeTarget; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "Cron执行表达式不能为空") +/* */ @Size(min = 0, max = 255, message = "Cron执行表达式不能超过255个字符") +/* */ public String getCronExpression() { +/* 104 */ return this.cronExpression; +/* */ } +/* */ +/* */ +/* */ public void setCronExpression(String cronExpression) { +/* 109 */ this.cronExpression = cronExpression; +/* */ } +/* */ +/* */ +/* */ public Date getNextValidTime() { +/* 114 */ if (StringUtils.isNotEmpty(this.cronExpression)) +/* */ { +/* 116 */ return CronUtils.getNextExecution(this.cronExpression); +/* */ } +/* 118 */ return null; +/* */ } +/* */ +/* */ +/* */ public String getMisfirePolicy() { +/* 123 */ return this.misfirePolicy; +/* */ } +/* */ +/* */ +/* */ public void setMisfirePolicy(String misfirePolicy) { +/* 128 */ this.misfirePolicy = misfirePolicy; +/* */ } +/* */ +/* */ +/* */ public String getConcurrent() { +/* 133 */ return this.concurrent; +/* */ } +/* */ +/* */ +/* */ public void setConcurrent(String concurrent) { +/* 138 */ this.concurrent = concurrent; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 143 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 148 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 153 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 154 */ .append("jobId", getJobId()) +/* 155 */ .append("jobName", getJobName()) +/* 156 */ .append("jobGroup", getJobGroup()) +/* 157 */ .append("cronExpression", getCronExpression()) +/* 158 */ .append("nextValidTime", getNextValidTime()) +/* 159 */ .append("misfirePolicy", getMisfirePolicy()) +/* 160 */ .append("concurrent", getConcurrent()) +/* 161 */ .append("status", getStatus()) +/* 162 */ .append("createBy", getCreateBy()) +/* 163 */ .append("createTime", getCreateTime()) +/* 164 */ .append("updateBy", getUpdateBy()) +/* 165 */ .append("updateTime", getUpdateTime()) +/* 166 */ .append("remark", getRemark()) +/* 167 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\domain\Job.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/domain/JobLog.java b/src/main/java/com/archive/project/monitor/job/domain/JobLog.java new file mode 100644 index 0000000..fac8d8c --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/domain/JobLog.java @@ -0,0 +1,161 @@ +/* */ package com.archive.project.monitor.job.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import java.util.Date; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class JobLog +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ @Excel(name = "日志序号") +/* */ private Long jobLogId; +/* */ @Excel(name = "任务名称") +/* */ private String jobName; +/* */ @Excel(name = "任务组名") +/* */ private String jobGroup; +/* */ @Excel(name = "调用目标字符串") +/* */ private String invokeTarget; +/* */ @Excel(name = "日志信息") +/* */ private String jobMessage; +/* */ @Excel(name = "执行状态", readConverterExp = "0=正常,1=失败") +/* */ private String status; +/* */ @Excel(name = "异常信息") +/* */ private String exceptionInfo; +/* */ private Date startTime; +/* */ private Date endTime; +/* */ +/* */ public Long getJobLogId() { +/* 54 */ return this.jobLogId; +/* */ } +/* */ +/* */ +/* */ public void setJobLogId(Long jobLogId) { +/* 59 */ this.jobLogId = jobLogId; +/* */ } +/* */ +/* */ +/* */ public String getJobName() { +/* 64 */ return this.jobName; +/* */ } +/* */ +/* */ +/* */ public void setJobName(String jobName) { +/* 69 */ this.jobName = jobName; +/* */ } +/* */ +/* */ +/* */ public String getJobGroup() { +/* 74 */ return this.jobGroup; +/* */ } +/* */ +/* */ +/* */ public void setJobGroup(String jobGroup) { +/* 79 */ this.jobGroup = jobGroup; +/* */ } +/* */ +/* */ +/* */ public String getInvokeTarget() { +/* 84 */ return this.invokeTarget; +/* */ } +/* */ +/* */ +/* */ public void setInvokeTarget(String invokeTarget) { +/* 89 */ this.invokeTarget = invokeTarget; +/* */ } +/* */ +/* */ +/* */ public String getJobMessage() { +/* 94 */ return this.jobMessage; +/* */ } +/* */ +/* */ +/* */ public void setJobMessage(String jobMessage) { +/* 99 */ this.jobMessage = jobMessage; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 104 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 109 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String getExceptionInfo() { +/* 114 */ return this.exceptionInfo; +/* */ } +/* */ +/* */ +/* */ public void setExceptionInfo(String exceptionInfo) { +/* 119 */ this.exceptionInfo = exceptionInfo; +/* */ } +/* */ +/* */ +/* */ public Date getStartTime() { +/* 124 */ return this.startTime; +/* */ } +/* */ +/* */ +/* */ public void setStartTime(Date startTime) { +/* 129 */ this.startTime = startTime; +/* */ } +/* */ +/* */ +/* */ public Date getEndTime() { +/* 134 */ return this.endTime; +/* */ } +/* */ +/* */ +/* */ public void setEndTime(Date endTime) { +/* 139 */ this.endTime = endTime; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 144 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 145 */ .append("jobLogId", getJobLogId()) +/* 146 */ .append("jobName", getJobName()) +/* 147 */ .append("jobGroup", getJobGroup()) +/* 148 */ .append("jobMessage", getJobMessage()) +/* 149 */ .append("status", getStatus()) +/* 150 */ .append("exceptionInfo", getExceptionInfo()) +/* 151 */ .append("startTime", getStartTime()) +/* 152 */ .append("endTime", getEndTime()) +/* 153 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\domain\JobLog.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/mapper/JobLogMapper.java b/src/main/java/com/archive/project/monitor/job/mapper/JobLogMapper.java new file mode 100644 index 0000000..a51e13b --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/mapper/JobLogMapper.java @@ -0,0 +1,32 @@ +package com.archive.project.monitor.job.mapper + +-INF.classes.com.archive.project.monitor.job.mapper; + +import com.archive.project.monitor.job.domain.JobLog; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface JobLogMapper { + List selectJobLogList(JobLog paramJobLog); + + List selectJobLogAll(); + + JobLog selectJobLogById(Long paramLong); + + int insertJobLog(JobLog paramJobLog); + + int insertJobLogSqlite(JobLog paramJobLog); + + int deleteJobLogByIds(String[] paramArrayOfString); + + int deleteJobLogById(Long paramLong); + + void cleanJobLog(); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\mapper\JobLogMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/mapper/JobMapper.java b/src/main/java/com/archive/project/monitor/job/mapper/JobMapper.java new file mode 100644 index 0000000..bb325d6 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/mapper/JobMapper.java @@ -0,0 +1,36 @@ +package com.archive.project.monitor.job.mapper + +-INF.classes.com.archive.project.monitor.job.mapper; + +import com.archive.project.monitor.job.domain.Job; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface JobMapper { + List selectJobList(Job paramJob); + + List selectJobListSqlite(Job paramJob); + + List selectJobAll(); + + Job selectJobById(Long paramLong); + + int deleteJobById(Long paramLong); + + int deleteJobByIds(Long[] paramArrayOfLong); + + int updateJob(Job paramJob); + + int updateJobSqlite(Job paramJob); + + int insertJob(Job paramJob); + + int insertJobSqlite(Job paramJob); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\mapper\JobMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/service/IJobLogService.java b/src/main/java/com/archive/project/monitor/job/service/IJobLogService.java new file mode 100644 index 0000000..48c7970 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/service/IJobLogService.java @@ -0,0 +1,26 @@ +package com.archive.project.monitor.job.service + +-INF.classes.com.archive.project.monitor.job.service; + +import com.archive.project.monitor.job.domain.JobLog; +import java.util.List; + +public interface IJobLogService { + List selectJobLogList(JobLog paramJobLog); + + JobLog selectJobLogById(Long paramLong); + + void addJobLog(JobLog paramJobLog); + + int deleteJobLogByIds(String paramString); + + int deleteJobLogById(Long paramLong); + + void cleanJobLog(); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\service\IJobLogService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/service/IJobService.java b/src/main/java/com/archive/project/monitor/job/service/IJobService.java new file mode 100644 index 0000000..4e312a9 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/service/IJobService.java @@ -0,0 +1,38 @@ +package com.archive.project.monitor.job.service + +-INF.classes.com.archive.project.monitor.job.service; + +import com.archive.common.exception.job.TaskException; +import com.archive.project.monitor.job.domain.Job; +import java.util.List; +import org.quartz.SchedulerException; + +public interface IJobService { + List selectJobList(Job paramJob); + + Job selectJobById(Long paramLong); + + int pauseJob(Job paramJob) throws SchedulerException; + + int resumeJob(Job paramJob) throws SchedulerException; + + int deleteJob(Job paramJob) throws SchedulerException; + + void deleteJobByIds(String paramString) throws SchedulerException; + + int changeStatus(Job paramJob) throws SchedulerException; + + void run(Job paramJob) throws SchedulerException; + + int insertJob(Job paramJob) throws SchedulerException, TaskException; + + int updateJob(Job paramJob) throws SchedulerException, TaskException; + + boolean checkCronExpressionIsValid(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\service\IJobService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/service/JobLogServiceImpl.java b/src/main/java/com/archive/project/monitor/job/service/JobLogServiceImpl.java new file mode 100644 index 0000000..f39a8b9 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/service/JobLogServiceImpl.java @@ -0,0 +1,106 @@ +/* */ package com.archive.project.monitor.job.service + +-INF.classes.com.archive.project.monitor.job.service; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.monitor.job.domain.JobLog; +/* */ import com.archive.project.monitor.job.mapper.JobLogMapper; +/* */ import com.archive.project.monitor.job.service.IJobLogService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class JobLogServiceImpl +/* */ implements IJobLogService +/* */ { +/* */ @Autowired +/* */ private JobLogMapper jobLogMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public List selectJobLogList(JobLog jobLog) { +/* 36 */ return this.jobLogMapper.selectJobLogList(jobLog); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public JobLog selectJobLogById(Long jobLogId) { +/* 48 */ return this.jobLogMapper.selectJobLogById(jobLogId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addJobLog(JobLog jobLog) { +/* 59 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 60 */ this.jobLogMapper.insertJobLog(jobLog); +/* 61 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 62 */ this.jobLogMapper.insertJobLogSqlite(jobLog); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteJobLogByIds(String ids) { +/* 76 */ return this.jobLogMapper.deleteJobLogByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteJobLogById(Long jobId) { +/* 87 */ return this.jobLogMapper.deleteJobLogById(jobId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void cleanJobLog() { +/* 96 */ this.jobLogMapper.cleanJobLog(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\service\JobLogServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/service/JobServiceImpl.java b/src/main/java/com/archive/project/monitor/job/service/JobServiceImpl.java new file mode 100644 index 0000000..3a0f259 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/service/JobServiceImpl.java @@ -0,0 +1,305 @@ +/* */ package com.archive.project.monitor.job.service + +-INF.classes.com.archive.project.monitor.job.service; +/* */ +/* */ import com.archive.common.constant.ScheduleConstants; +/* */ import com.archive.common.exception.job.TaskException; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.monitor.job.domain.Job; +/* */ import com.archive.project.monitor.job.mapper.JobMapper; +/* */ import com.archive.project.monitor.job.service.IJobService; +/* */ import com.archive.project.monitor.job.util.CronUtils; +/* */ import com.archive.project.monitor.job.util.ScheduleUtils; +/* */ import java.util.List; +/* */ import javax.annotation.PostConstruct; +/* */ import org.quartz.JobDataMap; +/* */ import org.quartz.JobKey; +/* */ import org.quartz.Scheduler; +/* */ import org.quartz.SchedulerException; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class JobServiceImpl +/* */ implements IJobService +/* */ { +/* */ @Autowired +/* */ private Scheduler scheduler; +/* */ @Autowired +/* */ private JobMapper jobMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ @PostConstruct +/* */ public void init() throws SchedulerException, TaskException { +/* 47 */ this.scheduler.clear(); +/* 48 */ List jobList = this.jobMapper.selectJobAll(); +/* 49 */ for (Job job : jobList) +/* */ { +/* 51 */ ScheduleUtils.createScheduleJob(this.scheduler, job); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectJobList(Job job) { +/* 64 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 65 */ return this.jobMapper.selectJobList(job); +/* */ } +/* 67 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 68 */ return this.jobMapper.selectJobListSqlite(job); +/* */ } +/* 70 */ return this.jobMapper.selectJobList(job); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Job selectJobById(Long jobId) { +/* 84 */ return this.jobMapper.selectJobById(jobId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int pauseJob(Job job) throws SchedulerException { +/* 96 */ Long jobId = job.getJobId(); +/* 97 */ String jobGroup = job.getJobGroup(); +/* 98 */ job.setStatus(ScheduleConstants.Status.PAUSE.getValue()); +/* 99 */ int rows = 0; +/* 100 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 101 */ rows = this.jobMapper.updateJob(job); +/* */ } +/* 103 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 104 */ rows = this.jobMapper.updateJobSqlite(job); +/* */ } +/* 106 */ if (rows > 0) +/* */ { +/* 108 */ this.scheduler.pauseJob(ScheduleUtils.getJobKey(jobId, jobGroup)); +/* */ } +/* 110 */ return rows; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int resumeJob(Job job) throws SchedulerException { +/* 122 */ Long jobId = job.getJobId(); +/* 123 */ String jobGroup = job.getJobGroup(); +/* 124 */ job.setStatus(ScheduleConstants.Status.NORMAL.getValue()); +/* 125 */ int rows = 0; +/* 126 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 127 */ rows = this.jobMapper.updateJob(job); +/* */ } +/* 129 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 130 */ rows = this.jobMapper.updateJobSqlite(job); +/* */ } +/* */ +/* 133 */ if (rows > 0) +/* */ { +/* 135 */ this.scheduler.resumeJob(ScheduleUtils.getJobKey(jobId, jobGroup)); +/* */ } +/* 137 */ return rows; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int deleteJob(Job job) throws SchedulerException { +/* 149 */ Long jobId = job.getJobId(); +/* 150 */ String jobGroup = job.getJobGroup(); +/* 151 */ int rows = this.jobMapper.deleteJobById(jobId); +/* 152 */ if (rows > 0) +/* */ { +/* 154 */ this.scheduler.deleteJob(ScheduleUtils.getJobKey(jobId, jobGroup)); +/* */ } +/* 156 */ return rows; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void deleteJobByIds(String ids) throws SchedulerException { +/* 169 */ Long[] jobIds = Convert.toLongArray(ids); +/* 170 */ for (Long jobId : jobIds) { +/* */ +/* 172 */ Job job = this.jobMapper.selectJobById(jobId); +/* 173 */ deleteJob(job); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int changeStatus(Job job) throws SchedulerException { +/* 186 */ int rows = 0; +/* 187 */ String status = job.getStatus(); +/* 188 */ if (ScheduleConstants.Status.NORMAL.getValue().equals(status)) { +/* */ +/* 190 */ rows = resumeJob(job); +/* */ } +/* 192 */ else if (ScheduleConstants.Status.PAUSE.getValue().equals(status)) { +/* */ +/* 194 */ rows = pauseJob(job); +/* */ } +/* 196 */ return rows; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void run(Job job) throws SchedulerException { +/* 208 */ Long jobId = job.getJobId(); +/* 209 */ Job tmpObj = selectJobById(job.getJobId()); +/* */ +/* 211 */ JobDataMap dataMap = new JobDataMap(); +/* 212 */ dataMap.put("TASK_PROPERTIES", tmpObj); +/* 213 */ this.scheduler.triggerJob(ScheduleUtils.getJobKey(jobId, tmpObj.getJobGroup()), dataMap); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int insertJob(Job job) throws SchedulerException, TaskException { +/* 225 */ job.setStatus(ScheduleConstants.Status.PAUSE.getValue()); +/* 226 */ int rows = 0; +/* 227 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 228 */ rows = this.jobMapper.insertJob(job); +/* */ } +/* 230 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 231 */ rows = this.jobMapper.insertJobSqlite(job); +/* */ } +/* */ +/* 234 */ if (rows > 0) +/* */ { +/* 236 */ ScheduleUtils.createScheduleJob(this.scheduler, job); +/* */ } +/* 238 */ return rows; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int updateJob(Job job) throws SchedulerException, TaskException { +/* 250 */ Job properties = selectJobById(job.getJobId()); +/* */ +/* 252 */ int rows = 0; +/* 253 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 254 */ rows = this.jobMapper.updateJob(job); +/* */ } +/* 256 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 257 */ rows = this.jobMapper.updateJobSqlite(job); +/* */ } +/* */ +/* 260 */ if (rows > 0) +/* */ { +/* 262 */ updateSchedulerJob(job, properties.getJobGroup()); +/* */ } +/* 264 */ return rows; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void updateSchedulerJob(Job job, String jobGroup) throws SchedulerException, TaskException { +/* 275 */ Long jobId = job.getJobId(); +/* */ +/* 277 */ JobKey jobKey = ScheduleUtils.getJobKey(jobId, jobGroup); +/* 278 */ if (this.scheduler.checkExists(jobKey)) +/* */ { +/* */ +/* 281 */ this.scheduler.deleteJob(jobKey); +/* */ } +/* 283 */ ScheduleUtils.createScheduleJob(this.scheduler, job); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean checkCronExpressionIsValid(String cronExpression) { +/* 295 */ return CronUtils.isValid(cronExpression); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\service\JobServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/task/ArchiveDataTask.java b/src/main/java/com/archive/project/monitor/job/task/ArchiveDataTask.java new file mode 100644 index 0000000..8615076 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/task/ArchiveDataTask.java @@ -0,0 +1,275 @@ +/* */ package com.archive.project.monitor.job.task + +-INF.classes.com.archive.project.monitor.job.task; +/* */ +/* */ import com.archive.common.archiveUtil.TableUtil; +/* */ import com.archive.common.convert.ZHConvert; +/* */ import com.archive.common.ocr.PdfOcr; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveTableColumn; +/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveListService; +/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; +/* */ import com.archive.project.dasz.ccgl.service.ICcglService; +/* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; +/* */ import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import net.sourceforge.tess4j.Tesseract; +/* */ import net.sourceforge.tess4j.util.LoadLibs; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component("archiveDataTask") +/* */ public class ArchiveDataTask +/* */ { +/* */ @Autowired +/* */ public IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ public IPhysicalTableService physicalTableService; +/* */ @Autowired +/* */ public IPhysicalTableColumnService physicalTableColumnService; +/* */ @Autowired +/* */ public IArchiveTypeService ArchiveTypeService; +/* */ @Autowired +/* */ private IConfigService configService; +/* */ @Autowired +/* */ private IArchiveListService archiveListService; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ @Autowired +/* */ private ICcglService ccglService; +/* */ +/* */ public void createDataToTotal() throws IOException { +/* 65 */ String deleteSql = "delete from t_ar_total"; +/* 66 */ this.executeSqlService.delete(deleteSql); +/* */ +/* 68 */ List achiveList = this.ArchiveTypeService.selectArchiveTypeList(new ArchiveType()); +/* 69 */ for (int i = 0; i < achiveList.size(); i++) { +/* 70 */ ArchiveType archivetype = achiveList.get(i); +/* 71 */ if (archivetype != null) { +/* 72 */ String code = archivetype.getArhciveCode(); +/* 73 */ String name = archivetype.getArchiveName(); +/* 74 */ String type = archivetype.getType(); +/* 75 */ long archivaTypeId = archivetype.getId().longValue(); +/* 76 */ if (type.toLowerCase().equals("folder")) { +/* */ +/* 78 */ String str1 = "T_AR_" + code + "_FOLDER"; +/* 79 */ String str2 = TableUtil.getTableId(str1); +/* */ +/* 81 */ String str3 = ""; +/* */ +/* 83 */ List list = this.archiveListService.getColumns(String.valueOf(archivetype.getId()), "folder"); +/* 84 */ if (list.size() > 0) { +/* 85 */ String columns = ""; +/* 86 */ for (int j = 0; j < list.size(); j++) { +/* 87 */ String columnname = ((ArchiveTableColumn)list.get(j)).getField(); +/* 88 */ if (columnname != null && !columnname.trim().equals("") && !columnname.trim().equals("id") && !columnname.trim().equals("status") && !columnname.trim().equals("create_time")) { +/* 89 */ if (j == list.size() - 1) { +/* 90 */ columns = columns + columnname; +/* */ } else { +/* 92 */ columns = columns + columnname + ","; +/* */ } +/* */ } +/* */ } +/* 96 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 97 */ str3 = "insert into t_ar_total(archiveId,tableId,archiveTypeId,archiveTypeCode,qzh,qzmc,ys,mj,kfkz,tableName,yearCode,bgqx,tm,zrz,dh,archiveTypeName,rowContext,archiveType) select id," + str2 + "," + archivaTypeId + ",'" + code + "',fonds_code,fondsName,ys,mj,kfqk,'" + str1 + "',year_code,bgqx,tm,zrz,dh,'" + name + "',concat_ws('|'," + columns + ") ,'" + type + "' from " + str1 + " where is_delete='0' and status='80'"; +/* */ +/* */ +/* */ } +/* 101 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* */ +/* */ +/* 104 */ String newColumns = ""; +/* 105 */ String[] sttr = columns.split(","); +/* 106 */ for (int k = 0; k < sttr.length; k++) { +/* 107 */ if (k == sttr.length - 1) { +/* 108 */ newColumns = newColumns + "COALESCE(" + sttr[k] + ",'')"; +/* */ } else { +/* 110 */ newColumns = newColumns + "COALESCE(" + sttr[k] + ",'')||'|'||"; +/* */ } +/* */ } +/* 113 */ str3 = "insert into t_ar_total(archiveId,tableId,archiveTypeId,archiveTypeCode,qzh,qzmc,ys,mj,kfkz,tableName,yearCode,bgqx,tm,zrz,dh,archiveTypeName,rowContext,archiveType) select id," + str2 + "," + archivaTypeId + ",'" + code + "',fonds_code,fondsName,ys,mj,kfqk,'" + str1 + "',year_code,bgqx,tm,zrz,dh,'" + name + "'," + newColumns + ",'" + type + "' from " + str1 + " where is_delete='0' and status='80'"; +/* */ +/* */ } +/* */ +/* */ } +/* 118 */ else if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 119 */ str3 = "insert into t_ar_total(archiveId,tableId,archiveTypeId,archiveTypeCode,qzh,qzmc,ys,mj,kfkz,tableName,yearCode,bgqx,tm,zrz,dh,archiveTypeName,rowContext,archiveType) select id," + str2 + "," + archivaTypeId + ",'" + code + "',fonds_code,fondsName,ys,mj,kfqk,'" + str1 + "',year_code,bgqx,tm,zrz,dh,'" + name + "',concat_ws('|',fonds_code,fondsName,year_code,bgqx,tm,zrz,dh) ,'" + type + "' from " + str1 + " where is_delete='0' and status='80'"; +/* */ +/* */ } +/* 122 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 123 */ str3 = "insert into t_ar_total(archiveId,tableId,archiveTypeId,archiveTypeCode,qzh,qzmc,ys,mj,kfkz,tableName,yearCode,bgqx,tm,zrz,dh,archiveTypeName,rowContext,archiveType) select id," + str2 + "," + archivaTypeId + ",'" + code + "',fonds_code,fondsName,ys,mj,kfqk,'" + str1 + "',year_code,bgqx,tm,zrz,dh,'" + name + "',COALESCE(fonds_code,'')||'|'||COALESCE(fondsName,'')||'|'||COALESCE(year_code,'')||'|'||COALESCE(bgqx,'')||'|'||COALESCE(tm,'')||'|'||COALESCE(zrz,'')||'|'||COALESCE(dh,'') ,'" + type + "' from " + str1 + " where is_delete='0' and status='80'"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 130 */ System.out.println("-----------" + str3); +/* 131 */ this.executeSqlService.insert(str3); +/* */ } +/* */ +/* 134 */ String tableName = "T_AR_" + code + "_FILE"; +/* 135 */ String tableId = TableUtil.getTableId(tableName); +/* */ +/* 137 */ String sql = ""; +/* */ +/* 139 */ List list1 = this.archiveListService.getColumns(String.valueOf(archivetype.getId()), "file"); +/* 140 */ if (list1.size() > 0) { +/* 141 */ String columns = ""; +/* 142 */ for (int j = 0; j < list1.size(); j++) { +/* 143 */ String columnname = ((ArchiveTableColumn)list1.get(j)).getField(); +/* 144 */ if (columnname != null && !columnname.trim().equals("") && !columnname.trim().equals("id") && !columnname.trim().equals("status") && !columnname.trim().equals("create_time")) { +/* 145 */ if (j == list1.size() - 1) { +/* 146 */ columns = columns + columnname; +/* */ } else { +/* 148 */ columns = columns + columnname + ","; +/* */ } +/* */ } +/* */ } +/* 152 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 153 */ sql = "insert into t_ar_total(archiveId,tableId,archiveTypeId,archiveTypeCode,qzh,qzmc,ys,mj,kfkz,tableName,yearCode,bgqx,tm,zrz,rq,dh,archiveTypeName,dzqw,rowContext,archiveType) select id," + tableId + "," + archivaTypeId + ",'" + code + "',fonds_code,fondsName,ys,mj,kfqk,'" + tableName + "',year_code,bgqx,tm,zrz,wjrq,dh,'" + name + "',dqzws,concat_ws('|'," + columns + "),'" + type + "' from " + tableName + " where is_delete='0' and status='80'"; +/* */ +/* */ } +/* 156 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* */ +/* */ +/* */ +/* 160 */ String newColumns = ""; +/* 161 */ String[] sttr = columns.split(","); +/* 162 */ for (int k = 0; k < sttr.length; k++) { +/* 163 */ if (k == sttr.length - 1) { +/* 164 */ newColumns = newColumns + "COALESCE(" + sttr[k] + ",'')"; +/* */ } else { +/* 166 */ newColumns = newColumns + "COALESCE(" + sttr[k] + ",'')||'|'||"; +/* */ } +/* */ } +/* 169 */ sql = "insert into t_ar_total(archiveId,tableId,archiveTypeId,archiveTypeCode,qzh,qzmc,ys,mj,kfkz,tableName,yearCode,bgqx,tm,zrz,rq,dh,archiveTypeName,dzqw,rowContext,archiveType) select id," + tableId + "," + archivaTypeId + ",'" + code + "',fonds_code,fondsName,ys,mj,kfqk,'" + tableName + "',year_code,bgqx,tm,zrz,wjrq,dh,'" + name + "',dqzws," + newColumns + ",'" + type + "' from " + tableName + " where is_delete='0' and status='80'"; +/* */ +/* */ } +/* */ +/* */ } +/* 174 */ else if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 175 */ sql = "insert into t_ar_total(archiveId,tableId,archiveTypeId,archiveTypeCode,qzh,qzmc,ys,mj,kfkz,tableName,yearCode,bgqx,tm,zrz,rq,dh,archiveTypeName,dzqw,rowContext,archiveType) select id," + tableId + "," + archivaTypeId + ",'" + code + "',fonds_code,fondsName,ys,mj,kfqk,'" + tableName + "',year_code,bgqx,tm,zrz,wjrq,dh,'" + name + "',dqzws,concat_ws('|',fonds_code,fondsName,year_code,bgqx,tm,zrz,wjrq,dh),'" + type + "' from " + tableName + " where is_delete='0' and status='80'"; +/* */ +/* */ } +/* 178 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 179 */ sql = "insert into t_ar_total(archiveId,tableId,archiveTypeId,archiveTypeCode,qzh,qzmc,ys,mj,kfkz,tableName,yearCode,bgqx,tm,zrz,rq,dh,archiveTypeName,dzqw,rowContext,archiveType) select id," + tableId + "," + archivaTypeId + ",'" + code + "',fonds_code,fondsName,ys,mj,kfqk,'" + tableName + "',year_code,bgqx,tm,zrz,wjrq,dh,'" + name + "',dqzws,COALESCE(fonds_code,'')||'|'||COALESCE(fondsName,'')||'|'||COALESCE(year_code,'')||'|'||COALESCE(bgqx,'')||'|'||COALESCE(tm,'')||'|'||COALESCE(zrz,'')||'|'||COALESCE(wjrq,'')||'|'||COALESCE(dh,''),'" + type + "' from " + tableName + " where is_delete='0' and status='80'"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 186 */ System.out.println("-----------" + sql); +/* 187 */ this.executeSqlService.insert(sql); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void updateContextDataToTotal() { +/* 197 */ String sql = "select id,archiveId,archiveTypeCode,rowContext from t_ar_total where dzqw>0"; +/* 198 */ List> list = this.executeSqlService.queryList(sql); +/* 199 */ for (int i = 0; i < list.size(); i++) { +/* 200 */ String id = (((LinkedHashMap)list.get(i)).get("id") == null) ? "" : ((LinkedHashMap)list.get(i)).get("id").toString(); +/* 201 */ String archiveId = (((LinkedHashMap)list.get(i)).get("archiveId") == null) ? "" : ((LinkedHashMap)list.get(i)).get("archiveId").toString(); +/* 202 */ String archiveTypeCode = (((LinkedHashMap)list.get(i)).get("archiveTypeCode") == null) ? "" : ((LinkedHashMap)list.get(i)).get("archiveTypeCode").toString(); +/* 203 */ String rowContext = (((LinkedHashMap)list.get(i)).get("rowContext") == null) ? "" : ((LinkedHashMap)list.get(i)).get("rowContext").toString(); +/* */ +/* */ +/* 206 */ String allValueTraditional = ZHConvert.convert(rowContext, 0); +/* */ +/* 208 */ String allValuePinyin = ZHConvert.getPingYin(rowContext); +/* */ +/* 210 */ String ocrText = ""; +/* 211 */ String tableName = "t_ar_" + archiveTypeCode + "_document"; +/* 212 */ String docsql = "select filepath,filehz from " + tableName + " where ownerid=" + archiveId; +/* 213 */ List> doclist = this.executeSqlService.queryList(docsql); +/* */ +/* */ +/* 216 */ String pdfSpiltImagePath = this.ccglService.getPathByLjbs("archive.pdfSpiltImagePath"); +/* 217 */ for (int j = 0; j < doclist.size(); j++) { +/* */ try { +/* 219 */ String path = (((LinkedHashMap)doclist.get(j)).get("filepath") == null) ? "" : ((LinkedHashMap)doclist.get(j)).get("filepath").toString(); +/* 220 */ String hz = (((LinkedHashMap)doclist.get(j)).get("filehz") == null) ? "" : ((LinkedHashMap)doclist.get(j)).get("filehz").toString(); +/* 221 */ if ((new File(path)).exists()) { +/* 222 */ if (hz.toLowerCase().equals("ofd")) { +/* */ +/* 224 */ ocrText = ""; break; +/* */ } +/* 226 */ if (hz.toLowerCase().equals("pdf")) { +/* 227 */ ocrText = PdfOcr.getTextFromPdf(path, pdfSpiltImagePath); break; +/* */ } +/* 229 */ if (hz.toLowerCase().equals("jpg") || hz.toLowerCase().equals("png") || hz.toLowerCase().equals("jpeg")) { +/* 230 */ Tesseract tesseract = new Tesseract(); +/* */ +/* 232 */ File tessDataFolder = LoadLibs.extractTessResources("tessdata"); +/* 233 */ tesseract.setDatapath(tessDataFolder.getAbsolutePath()); +/* */ +/* 235 */ tesseract.setLanguage("chi_sim"); +/* */ +/* 237 */ String result = tesseract.doOCR(new File(path)); +/* */ +/* 239 */ ocrText = result.replaceAll("\\r|\\n", "-").replaceAll(" ", ""); +/* */ +/* */ +/* */ break; +/* */ } +/* */ } else { +/* 245 */ System.out.println("文件不存在:" + path); +/* */ } +/* */ +/* 248 */ } catch (Exception e) { +/* 249 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 259 */ ocrText = ocrText.replaceAll(",", "").replaceAll("\"", "").replaceAll(";", "").replaceAll("'", "").replaceAll("/n", "").replaceAll("/r", "").replaceAll("\n", "").replaceAll("\r", "").replaceAll("\t", "").replaceAll("‘", "").replaceAll("\\[", "").replaceAll("]", "").replaceAll("\\{", "").replaceAll("}", ""); +/* */ +/* 261 */ String updatesql = "update t_ar_total set fantiContext='" + allValueTraditional + "',pinyinContext='" + allValuePinyin + "',fileContext='" + ocrText + "' where id=" + id; +/* */ +/* */ +/* 264 */ this.executeSqlService.update(updatesql); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\task\ArchiveDataTask.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/task/RyTask.java b/src/main/java/com/archive/project/monitor/job/task/RyTask.java new file mode 100644 index 0000000..d3330d0 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/task/RyTask.java @@ -0,0 +1,36 @@ +/* */ package com.archive.project.monitor.job.task + +-INF.classes.com.archive.project.monitor.job.task; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component("ryTask") +/* */ public class RyTask +/* */ { +/* */ public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) { +/* 16 */ System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", new Object[] { s, b, l, d, i })); +/* */ } +/* */ +/* */ +/* */ public void ryParams(String params) { +/* 21 */ System.out.println("执行有参方法:" + params); +/* */ } +/* */ +/* */ +/* */ public void ryNoParams() { +/* 26 */ System.out.println("执行无参方法"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\task\RyTask.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/task/SqliteBackTask.java b/src/main/java/com/archive/project/monitor/job/task/SqliteBackTask.java new file mode 100644 index 0000000..6a8ff3d --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/task/SqliteBackTask.java @@ -0,0 +1,49 @@ +/* */ package com.archive.project.monitor.job.task; +/* */ +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.file.FileUtils; +/* */ import com.archive.project.dasz.ccgl.service.ICcglService; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Component; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Component("sqliteBackTask") +/* */ public class SqliteBackTask +/* */ { +/* */ @Autowired +/* */ private IConfigService configService; +/* */ @Autowired +/* */ private ICcglService ccglService; +/* */ +/* */ public void Back() { +/* 28 */ String path = this.configService.selectConfigByKey("archive.SqliteAddress"); +/* 29 */ if ((new File(path)).exists()) { +/* */ +/* 31 */ String time = DateUtils.dateTimeNow(); +/* 32 */ String backPath = this.ccglService.getPathByLjbs("archive.SqliteBackPath"); +/* */ try { +/* 34 */ FileUtils.copyFile(new File(path), new File(backPath + File.separator + "archive_sqlite" + time + ".db")); +/* 35 */ } catch (IOException e) { +/* 36 */ e.printStackTrace(); +/* */ } +/* 38 */ System.out.println("数据库备份完毕:" + backPath + File.separator + "archive_sqlite" + time + ".db"); +/* */ } else { +/* 40 */ System.out.println("数据库文件不存在,请检查参数管理中-Sqlite数据存放位置-的参数值是否正确"); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\task\SqliteBackTask.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/util/AbstractQuartzJob.java b/src/main/java/com/archive/project/monitor/job/util/AbstractQuartzJob.java new file mode 100644 index 0000000..b44fe33 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/util/AbstractQuartzJob.java @@ -0,0 +1,107 @@ +/* */ package com.archive.project.monitor.job.util + +-INF.classes.com.archive.project.monitor.job.util; +/* */ +/* */ import com.archive.common.utils.ExceptionUtil; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.bean.BeanUtils; +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import com.archive.project.monitor.job.domain.Job; +/* */ import com.archive.project.monitor.job.domain.JobLog; +/* */ import com.archive.project.monitor.job.service.IJobLogService; +/* */ import java.util.Date; +/* */ import org.quartz.Job; +/* */ import org.quartz.JobExecutionContext; +/* */ import org.quartz.JobExecutionException; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class AbstractQuartzJob +/* */ implements Job +/* */ { +/* 25 */ private static final Logger log = LoggerFactory.getLogger(com.archive.project.monitor.job.util.AbstractQuartzJob.class); +/* */ +/* */ +/* */ +/* */ +/* 30 */ private static ThreadLocal threadLocal = new ThreadLocal<>(); +/* */ +/* */ +/* */ +/* */ public void execute(JobExecutionContext context) throws JobExecutionException { +/* 35 */ Job job = new Job(); +/* 36 */ BeanUtils.copyBeanProp(job, context.getMergedJobDataMap().get("TASK_PROPERTIES")); +/* */ +/* */ try { +/* 39 */ before(context, job); +/* 40 */ if (job != null) +/* */ { +/* 42 */ doExecute(context, job); +/* */ } +/* 44 */ after(context, job, null); +/* */ } +/* 46 */ catch (Exception e) { +/* */ +/* 48 */ log.error("任务执行异常 - :", e); +/* 49 */ after(context, job, e); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void before(JobExecutionContext context, Job job) { +/* 61 */ threadLocal.set(new Date()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void after(JobExecutionContext context, Job job, Exception e) { +/* 72 */ Date startTime = threadLocal.get(); +/* 73 */ threadLocal.remove(); +/* */ +/* 75 */ JobLog jobLog = new JobLog(); +/* 76 */ jobLog.setJobName(job.getJobName()); +/* 77 */ jobLog.setJobGroup(job.getJobGroup()); +/* 78 */ jobLog.setInvokeTarget(job.getInvokeTarget()); +/* 79 */ jobLog.setStartTime(startTime); +/* 80 */ jobLog.setEndTime(new Date()); +/* 81 */ long runMs = jobLog.getEndTime().getTime() - jobLog.getStartTime().getTime(); +/* 82 */ jobLog.setJobMessage(jobLog.getJobName() + " 总共耗时:" + runMs + "毫秒"); +/* 83 */ if (e != null) { +/* */ +/* 85 */ jobLog.setStatus("1"); +/* 86 */ String errorMsg = StringUtils.substring(ExceptionUtil.getExceptionMessage(e), 0, 2000); +/* 87 */ jobLog.setExceptionInfo(errorMsg); +/* */ } +/* */ else { +/* */ +/* 91 */ jobLog.setStatus("0"); +/* */ } +/* */ +/* */ +/* 95 */ ((IJobLogService)SpringUtils.getBean(IJobLogService.class)).addJobLog(jobLog); +/* */ } +/* */ +/* */ protected abstract void doExecute(JobExecutionContext paramJobExecutionContext, Job paramJob) throws Exception; +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\jo\\util\AbstractQuartzJob.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/util/CronUtils.java b/src/main/java/com/archive/project/monitor/job/util/CronUtils.java new file mode 100644 index 0000000..7d8d35b --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/util/CronUtils.java @@ -0,0 +1,71 @@ +/* */ package com.archive.project.monitor.job.util + +-INF.classes.com.archive.project.monitor.job.util; +/* */ +/* */ import java.text.ParseException; +/* */ import java.util.Date; +/* */ import org.quartz.CronExpression; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CronUtils +/* */ { +/* */ public static boolean isValid(String cronExpression) { +/* 23 */ return CronExpression.isValidExpression(cronExpression); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getInvalidMessage(String cronExpression) { +/* */ try { +/* 36 */ new CronExpression(cronExpression); +/* 37 */ return null; +/* */ } +/* 39 */ catch (ParseException pe) { +/* */ +/* 41 */ return pe.getMessage(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Date getNextExecution(String cronExpression) { +/* */ try { +/* 55 */ CronExpression cron = new CronExpression(cronExpression); +/* 56 */ return cron.getNextValidTimeAfter(new Date(System.currentTimeMillis())); +/* */ } +/* 58 */ catch (ParseException e) { +/* */ +/* 60 */ throw new IllegalArgumentException(e.getMessage()); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\jo\\util\CronUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/util/JobInvokeUtil.java b/src/main/java/com/archive/project/monitor/job/util/JobInvokeUtil.java new file mode 100644 index 0000000..f7a7e22 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/util/JobInvokeUtil.java @@ -0,0 +1,190 @@ +/* */ package com.archive.project.monitor.job.util + +; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import com.archive.project.monitor.job.domain.Job; +/* */ import java.lang.reflect.InvocationTargetException; +/* */ import java.lang.reflect.Method; +/* */ import java.util.LinkedList; +/* */ import java.util.List; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class JobInvokeUtil +/* */ { +/* */ public static void invokeMethod(Job job) throws Exception { +/* 25 */ String invokeTarget = job.getInvokeTarget(); +/* 26 */ String beanName = getBeanName(invokeTarget); +/* 27 */ String methodName = getMethodName(invokeTarget); +/* 28 */ List methodParams = getMethodParams(invokeTarget); +/* */ +/* 30 */ if (!isValidClassName(beanName)) { +/* */ +/* 32 */ Object bean = SpringUtils.getBean(beanName); +/* 33 */ invokeMethod(bean, methodName, methodParams); +/* */ } +/* */ else { +/* */ +/* 37 */ Object bean = Class.forName(beanName).newInstance(); +/* 38 */ invokeMethod(bean, methodName, methodParams); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static void invokeMethod(Object bean, String methodName, List methodParams) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { +/* 53 */ if (StringUtils.isNotNull(methodParams) && methodParams.size() > 0) { +/* */ +/* 55 */ Method method = bean.getClass().getDeclaredMethod(methodName, getMethodParamsType(methodParams)); +/* 56 */ method.invoke(bean, getMethodParamsValue(methodParams)); +/* */ } +/* */ else { +/* */ +/* 60 */ Method method = bean.getClass().getDeclaredMethod(methodName, new Class[0]); +/* 61 */ method.invoke(bean, new Object[0]); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isValidClassName(String invokeTarget) { +/* 73 */ return (StringUtils.countMatches(invokeTarget, ".") > 1); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getBeanName(String invokeTarget) { +/* 84 */ String beanName = StringUtils.substringBefore(invokeTarget, "("); +/* 85 */ return StringUtils.substringBeforeLast(beanName, "."); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getMethodName(String invokeTarget) { +/* 96 */ String methodName = StringUtils.substringBefore(invokeTarget, "("); +/* 97 */ return StringUtils.substringAfterLast(methodName, "."); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static List getMethodParams(String invokeTarget) { +/* 108 */ String methodStr = StringUtils.substringBetween(invokeTarget, "(", ")"); +/* 109 */ if (StringUtils.isEmpty(methodStr)) +/* */ { +/* 111 */ return null; +/* */ } +/* 113 */ String[] methodParams = methodStr.split(","); +/* 114 */ List classs = new LinkedList(); +/* 115 */ for (int i = 0; i < methodParams.length; i++) { +/* */ +/* 117 */ String str = StringUtils.trimToEmpty(methodParams[i]); +/* */ +/* 119 */ if (StringUtils.contains(str, "'")) { +/* */ +/* 121 */ classs.add(new Object[] { StringUtils.replace(str, "'", ""), String.class }); +/* */ +/* */ } +/* 124 */ else if (StringUtils.equals(str, "true") || StringUtils.equalsIgnoreCase(str, "false")) { +/* */ +/* 126 */ classs.add(new Object[] { Boolean.valueOf(str), Boolean.class }); +/* */ +/* */ } +/* 129 */ else if (StringUtils.containsIgnoreCase(str, "L")) { +/* */ +/* 131 */ classs.add(new Object[] { Long.valueOf(StringUtils.replaceIgnoreCase(str, "L", "")), Long.class }); +/* */ +/* */ } +/* 134 */ else if (StringUtils.containsIgnoreCase(str, "D")) { +/* */ +/* 136 */ classs.add(new Object[] { Double.valueOf(StringUtils.replaceIgnoreCase(str, "D", "")), Double.class }); +/* */ +/* */ } +/* */ else { +/* */ +/* 141 */ classs.add(new Object[] { Integer.valueOf(str), Integer.class }); +/* */ } +/* */ } +/* 144 */ return classs; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Class[] getMethodParamsType(List methodParams) { +/* 155 */ Class[] classs = new Class[methodParams.size()]; +/* 156 */ int index = 0; +/* 157 */ for (Object[] os : methodParams) { +/* */ +/* 159 */ classs[index] = (Class)os[1]; +/* 160 */ index++; +/* */ } +/* 162 */ return classs; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Object[] getMethodParamsValue(List methodParams) { +/* 173 */ Object[] classs = new Object[methodParams.size()]; +/* 174 */ int index = 0; +/* 175 */ for (Object[] os : methodParams) { +/* */ +/* 177 */ classs[index] = os[0]; +/* 178 */ index++; +/* */ } +/* 180 */ return classs; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\jo\\util\JobInvokeUtil.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/util/QuartzDisallowConcurrentExecution.java b/src/main/java/com/archive/project/monitor/job/util/QuartzDisallowConcurrentExecution.java new file mode 100644 index 0000000..1177452 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/util/QuartzDisallowConcurrentExecution.java @@ -0,0 +1,29 @@ +/* */ package com.archive.project.monitor.job.util + +; +/* */ +/* */ import com.archive.project.monitor.job.domain.Job; +/* */ import com.archive.project.monitor.job.util.AbstractQuartzJob; +/* */ import com.archive.project.monitor.job.util.JobInvokeUtil; +/* */ import org.quartz.DisallowConcurrentExecution; +/* */ import org.quartz.JobExecutionContext; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @DisallowConcurrentExecution +/* */ public class QuartzDisallowConcurrentExecution +/* */ extends AbstractQuartzJob +/* */ { +/* */ protected void doExecute(JobExecutionContext context, Job job) throws Exception { +/* 19 */ JobInvokeUtil.invokeMethod(job); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\jo\\util\QuartzDisallowConcurrentExecution.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/util/QuartzJobExecution.java b/src/main/java/com/archive/project/monitor/job/util/QuartzJobExecution.java new file mode 100644 index 0000000..908ba70 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/util/QuartzJobExecution.java @@ -0,0 +1,27 @@ +/* */ package com.archive.project.monitor.job.util + +-INF.classes.com.archive.project.monitor.job.util; +/* */ +/* */ import com.archive.project.monitor.job.domain.Job; +/* */ import com.archive.project.monitor.job.util.AbstractQuartzJob; +/* */ import com.archive.project.monitor.job.util.JobInvokeUtil; +/* */ import org.quartz.JobExecutionContext; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class QuartzJobExecution +/* */ extends AbstractQuartzJob +/* */ { +/* */ protected void doExecute(JobExecutionContext context, Job job) throws Exception { +/* 17 */ JobInvokeUtil.invokeMethod(job); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\jo\\util\QuartzJobExecution.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/job/util/ScheduleUtils.java b/src/main/java/com/archive/project/monitor/job/util/ScheduleUtils.java new file mode 100644 index 0000000..fa30760 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/job/util/ScheduleUtils.java @@ -0,0 +1,118 @@ +/* */ package com.archive.project.monitor.job.util + +-INF.classes.com.archive.project.monitor.job.util; +/* */ +/* */ import com.archive.common.constant.ScheduleConstants; +/* */ import com.archive.common.exception.job.TaskException; +/* */ import com.archive.project.monitor.job.domain.Job; +/* */ import com.archive.project.monitor.job.util.QuartzDisallowConcurrentExecution; +/* */ import com.archive.project.monitor.job.util.QuartzJobExecution; +/* */ import org.quartz.CronScheduleBuilder; +/* */ import org.quartz.CronTrigger; +/* */ import org.quartz.Job; +/* */ import org.quartz.JobBuilder; +/* */ import org.quartz.JobDetail; +/* */ import org.quartz.JobKey; +/* */ import org.quartz.ScheduleBuilder; +/* */ import org.quartz.Scheduler; +/* */ import org.quartz.SchedulerException; +/* */ import org.quartz.Trigger; +/* */ import org.quartz.TriggerBuilder; +/* */ import org.quartz.TriggerKey; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ScheduleUtils +/* */ { +/* */ private static Class getQuartzJobClass(Job job) { +/* 33 */ boolean isConcurrent = "0".equals(job.getConcurrent()); +/* 34 */ return isConcurrent ? (Class)QuartzJobExecution.class : (Class)QuartzDisallowConcurrentExecution.class; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static TriggerKey getTriggerKey(Long jobId, String jobGroup) { +/* 42 */ return TriggerKey.triggerKey("TASK_CLASS_NAME" + jobId, jobGroup); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static JobKey getJobKey(Long jobId, String jobGroup) { +/* 50 */ return JobKey.jobKey("TASK_CLASS_NAME" + jobId, jobGroup); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void createScheduleJob(Scheduler scheduler, Job job) throws SchedulerException, TaskException { +/* 58 */ Class jobClass = getQuartzJobClass(job); +/* */ +/* 60 */ Long jobId = job.getJobId(); +/* 61 */ String jobGroup = job.getJobGroup(); +/* 62 */ JobDetail jobDetail = JobBuilder.newJob(jobClass).withIdentity(getJobKey(jobId, jobGroup)).build(); +/* */ +/* */ +/* 65 */ CronScheduleBuilder cronScheduleBuilder = CronScheduleBuilder.cronSchedule(job.getCronExpression()); +/* 66 */ cronScheduleBuilder = handleCronScheduleMisfirePolicy(job, cronScheduleBuilder); +/* */ +/* */ +/* */ +/* 70 */ CronTrigger trigger = (CronTrigger)TriggerBuilder.newTrigger().withIdentity(getTriggerKey(jobId, jobGroup)).withSchedule((ScheduleBuilder)cronScheduleBuilder).build(); +/* */ +/* */ +/* 73 */ jobDetail.getJobDataMap().put("TASK_PROPERTIES", job); +/* */ +/* */ +/* 76 */ if (scheduler.checkExists(getJobKey(jobId, jobGroup))) +/* */ { +/* */ +/* 79 */ scheduler.deleteJob(getJobKey(jobId, jobGroup)); +/* */ } +/* */ +/* 82 */ scheduler.scheduleJob(jobDetail, (Trigger)trigger); +/* */ +/* */ +/* 85 */ if (job.getStatus().equals(ScheduleConstants.Status.PAUSE.getValue())) +/* */ { +/* 87 */ scheduler.pauseJob(getJobKey(jobId, jobGroup)); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static CronScheduleBuilder handleCronScheduleMisfirePolicy(Job job, CronScheduleBuilder cb) throws TaskException { +/* 97 */ switch (job.getMisfirePolicy()) { +/* */ +/* */ case "0": +/* 100 */ return cb; +/* */ case "1": +/* 102 */ return cb.withMisfireHandlingInstructionIgnoreMisfires(); +/* */ case "2": +/* 104 */ return cb.withMisfireHandlingInstructionFireAndProceed(); +/* */ case "3": +/* 106 */ return cb.withMisfireHandlingInstructionDoNothing(); +/* */ } +/* 108 */ throw new TaskException("The task misfire policy '" + job.getMisfirePolicy() + "' cannot be used in cron schedule tasks", TaskException.Code.CONFIG_ERROR); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\jo\\util\ScheduleUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/logininfor/controller/LogininforController.java b/src/main/java/com/archive/project/monitor/logininfor/controller/LogininforController.java new file mode 100644 index 0000000..3e3100e --- /dev/null +++ b/src/main/java/com/archive/project/monitor/logininfor/controller/LogininforController.java @@ -0,0 +1,102 @@ +/* */ package com.archive.project.monitor.logininfor.controller + +-INF.classes.com.archive.project.monitor.logininfor.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.shiro.service.PasswordService; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.monitor.logininfor.domain.Logininfor; +/* */ import com.archive.project.monitor.logininfor.service.ILogininforService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/monitor/logininfor"}) +/* */ public class LogininforController +/* */ extends BaseController +/* */ { +/* 30 */ private String prefix = "monitor/logininfor"; +/* */ +/* */ @Autowired +/* */ private ILogininforService logininforService; +/* */ +/* */ @Autowired +/* */ private PasswordService passwordService; +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:logininfor:view"}) +/* */ @GetMapping +/* */ public String logininfor() { +/* 42 */ return this.prefix + "/logininfor"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:logininfor:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(Logininfor logininfor) { +/* 50 */ startPage(); +/* 51 */ List list = this.logininforService.selectLogininforList(logininfor); +/* 52 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @Log(title = "登录日志", businessType = BusinessType.EXPORT) +/* */ @RequiresPermissions({"monitor:logininfor:export"}) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(Logininfor logininfor) { +/* 61 */ List list = this.logininforService.selectLogininforList(logininfor); +/* 62 */ ExcelUtil util = new ExcelUtil(Logininfor.class); +/* 63 */ return util.exportExcel(list, "登录日志"); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:logininfor:remove"}) +/* */ @Log(title = "登录日志", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 72 */ return toAjax(this.logininforService.deleteLogininforByIds(ids)); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:logininfor:remove"}) +/* */ @Log(title = "登录日志", businessType = BusinessType.CLEAN) +/* */ @PostMapping({"/clean"}) +/* */ @ResponseBody +/* */ public AjaxResult clean() { +/* 81 */ this.logininforService.cleanLogininfor(); +/* 82 */ return success(); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:logininfor:unlock"}) +/* */ @Log(title = "账户解锁", businessType = BusinessType.OTHER) +/* */ @PostMapping({"/unlock"}) +/* */ @ResponseBody +/* */ public AjaxResult unlock(String loginName) { +/* 91 */ this.passwordService.clearLoginRecordCache(loginName); +/* 92 */ return success(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\logininfor\controller\LogininforController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/logininfor/domain/Logininfor.java b/src/main/java/com/archive/project/monitor/logininfor/domain/Logininfor.java new file mode 100644 index 0000000..eb77b9a --- /dev/null +++ b/src/main/java/com/archive/project/monitor/logininfor/domain/Logininfor.java @@ -0,0 +1,167 @@ +/* */ package com.archive.project.monitor.logininfor.domain + +-INF.classes.com.archive.project.monitor.logininfor.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import java.util.Date; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Logininfor +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC) +/* */ private Long infoId; +/* */ @Excel(name = "用户账号") +/* */ private String loginName; +/* */ @Excel(name = "登录状态", readConverterExp = "0=成功,1=失败") +/* */ private String status; +/* */ @Excel(name = "登录地址") +/* */ private String ipaddr; +/* */ @Excel(name = "登录地点") +/* */ private String loginLocation; +/* */ @Excel(name = "浏览器") +/* */ private String browser; +/* */ @Excel(name = "操作系统") +/* */ private String os; +/* */ @Excel(name = "提示消息") +/* */ private String msg; +/* */ @Excel(name = "访问时间", width = 30.0D, dateFormat = "yyyy-MM-dd HH:mm:ss") +/* */ private Date loginTime; +/* */ +/* */ public Long getInfoId() { +/* 57 */ return this.infoId; +/* */ } +/* */ +/* */ +/* */ public void setInfoId(Long infoId) { +/* 62 */ this.infoId = infoId; +/* */ } +/* */ +/* */ +/* */ public String getLoginName() { +/* 67 */ return this.loginName; +/* */ } +/* */ +/* */ +/* */ public void setLoginName(String loginName) { +/* 72 */ this.loginName = loginName; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 77 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 82 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String getIpaddr() { +/* 87 */ return this.ipaddr; +/* */ } +/* */ +/* */ +/* */ public void setIpaddr(String ipaddr) { +/* 92 */ this.ipaddr = ipaddr; +/* */ } +/* */ +/* */ +/* */ public String getLoginLocation() { +/* 97 */ return this.loginLocation; +/* */ } +/* */ +/* */ +/* */ public void setLoginLocation(String loginLocation) { +/* 102 */ this.loginLocation = loginLocation; +/* */ } +/* */ +/* */ +/* */ public String getBrowser() { +/* 107 */ return this.browser; +/* */ } +/* */ +/* */ +/* */ public void setBrowser(String browser) { +/* 112 */ this.browser = browser; +/* */ } +/* */ +/* */ +/* */ public String getOs() { +/* 117 */ return this.os; +/* */ } +/* */ +/* */ +/* */ public void setOs(String os) { +/* 122 */ this.os = os; +/* */ } +/* */ +/* */ +/* */ public String getMsg() { +/* 127 */ return this.msg; +/* */ } +/* */ +/* */ +/* */ public void setMsg(String msg) { +/* 132 */ this.msg = msg; +/* */ } +/* */ +/* */ +/* */ public Date getLoginTime() { +/* 137 */ return this.loginTime; +/* */ } +/* */ +/* */ +/* */ public void setLoginTime(Date loginTime) { +/* 142 */ this.loginTime = loginTime; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 147 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 148 */ .append("infoId", getInfoId()) +/* 149 */ .append("loginName", getLoginName()) +/* 150 */ .append("ipaddr", getIpaddr()) +/* 151 */ .append("loginLocation", getLoginLocation()) +/* 152 */ .append("browser", getBrowser()) +/* 153 */ .append("os", getOs()) +/* 154 */ .append("status", getStatus()) +/* 155 */ .append("msg", getMsg()) +/* 156 */ .append("loginTime", getLoginTime()) +/* 157 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\logininfor\domain\Logininfor.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/logininfor/mapper/LogininforMapper.java b/src/main/java/com/archive/project/monitor/logininfor/mapper/LogininforMapper.java new file mode 100644 index 0000000..1ccf02b --- /dev/null +++ b/src/main/java/com/archive/project/monitor/logininfor/mapper/LogininforMapper.java @@ -0,0 +1,26 @@ +package com.archive.project.monitor.logininfor.mapper + +-INF.classes.com.archive.project.monitor.logininfor.mapper; + +import com.archive.project.monitor.logininfor.domain.Logininfor; +import java.util.List; + +public interface LogininforMapper { + void insertLogininfor(Logininfor paramLogininfor); + + void insertLogininforSqlite(Logininfor paramLogininfor); + + List selectLogininforList(Logininfor paramLogininfor); + + List selectLogininforListSqlite(Logininfor paramLogininfor); + + int deleteLogininforByIds(String[] paramArrayOfString); + + int cleanLogininfor(); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\logininfor\mapper\LogininforMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/logininfor/service/ILogininforService.java b/src/main/java/com/archive/project/monitor/logininfor/service/ILogininforService.java new file mode 100644 index 0000000..6695acd --- /dev/null +++ b/src/main/java/com/archive/project/monitor/logininfor/service/ILogininforService.java @@ -0,0 +1,22 @@ +package com.archive.project.monitor.logininfor.service + +; + +import com.archive.project.monitor.logininfor.domain.Logininfor; +import java.util.List; + +public interface ILogininforService { + void insertLogininfor(Logininfor paramLogininfor); + + List selectLogininforList(Logininfor paramLogininfor); + + int deleteLogininforByIds(String paramString); + + void cleanLogininfor(); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\logininfor\service\ILogininforService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/logininfor/service/LogininforServiceImpl.java b/src/main/java/com/archive/project/monitor/logininfor/service/LogininforServiceImpl.java new file mode 100644 index 0000000..0f05bfd --- /dev/null +++ b/src/main/java/com/archive/project/monitor/logininfor/service/LogininforServiceImpl.java @@ -0,0 +1,93 @@ +/* */ package com.archive.project.monitor.logininfor.service + +-INF.classes.com.archive.project.monitor.logininfor.service; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.monitor.logininfor.domain.Logininfor; +/* */ import com.archive.project.monitor.logininfor.mapper.LogininforMapper; +/* */ import com.archive.project.monitor.logininfor.service.ILogininforService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class LogininforServiceImpl +/* */ implements ILogininforService +/* */ { +/* */ @Autowired +/* */ private LogininforMapper logininforMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public void insertLogininfor(Logininfor logininfor) { +/* 35 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 36 */ this.logininforMapper.insertLogininfor(logininfor); +/* */ } +/* 38 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 39 */ this.logininforMapper.insertLogininforSqlite(logininfor); +/* */ } else { +/* 41 */ this.logininforMapper.insertLogininfor(logininfor); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectLogininforList(Logininfor logininfor) { +/* 54 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 55 */ return this.logininforMapper.selectLogininforList(logininfor); +/* */ } +/* 57 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 58 */ return this.logininforMapper.selectLogininforListSqlite(logininfor); +/* */ } +/* 60 */ return this.logininforMapper.selectLogininforList(logininfor); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteLogininforByIds(String ids) { +/* 74 */ return this.logininforMapper.deleteLogininforByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void cleanLogininfor() { +/* 83 */ this.logininforMapper.cleanLogininfor(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\logininfor\service\LogininforServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/online/controller/UserOnlineController.java b/src/main/java/com/archive/project/monitor/online/controller/UserOnlineController.java new file mode 100644 index 0000000..79e94da --- /dev/null +++ b/src/main/java/com/archive/project/monitor/online/controller/UserOnlineController.java @@ -0,0 +1,96 @@ +/* */ package com.archive.project.monitor.online.controller + +-INF.classes.com.archive.project.monitor.online.controller; +/* */ +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.shiro.session.OnlineSessionDAO; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.monitor.online.domain.OnlineSession; +/* */ import com.archive.project.monitor.online.domain.UserOnline; +/* */ import com.archive.project.monitor.online.service.IUserOnlineService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.Logical; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.apache.shiro.session.Session; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/monitor/online"}) +/* */ public class UserOnlineController +/* */ extends BaseController +/* */ { +/* 34 */ private String prefix = "monitor/online"; +/* */ +/* */ @Autowired +/* */ private IUserOnlineService userOnlineService; +/* */ +/* */ @Autowired +/* */ private OnlineSessionDAO onlineSessionDAO; +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:online:view"}) +/* */ @GetMapping +/* */ public String online() { +/* 46 */ return this.prefix + "/online"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:online:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(UserOnline userOnline) { +/* 54 */ startPage(); +/* 55 */ List list = this.userOnlineService.selectUserOnlineList(userOnline); +/* 56 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions(value = {"monitor:online:batchForceLogout", "monitor:online:forceLogout"}, logical = Logical.OR) +/* */ @Log(title = "在线用户", businessType = BusinessType.FORCE) +/* */ @PostMapping({"/batchForceLogout"}) +/* */ @ResponseBody +/* */ public AjaxResult batchForceLogout(String ids) { +/* 65 */ for (String sessionId : Convert.toStrArray(ids)) { +/* */ +/* 67 */ UserOnline online = this.userOnlineService.selectOnlineById(sessionId); +/* 68 */ if (online == null) +/* */ { +/* 70 */ return error("用户已下线"); +/* */ } +/* 72 */ OnlineSession onlineSession = (OnlineSession)this.onlineSessionDAO.readSession(online.getSessionId()); +/* 73 */ if (onlineSession == null) +/* */ { +/* 75 */ return error("用户已下线"); +/* */ } +/* 77 */ if (sessionId.equals(ShiroUtils.getSessionId())) +/* */ { +/* 79 */ return error("当前登录用户无法强退"); +/* */ } +/* 81 */ this.onlineSessionDAO.delete((Session)onlineSession); +/* 82 */ online.setStatus(OnlineSession.OnlineStatus.off_line); +/* 83 */ this.userOnlineService.saveOnline(online); +/* 84 */ this.userOnlineService.removeUserCache(online.getLoginName(), sessionId); +/* */ } +/* 86 */ return success(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\online\controller\UserOnlineController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/online/domain/OnlineSession$OnlineStatus.java b/src/main/java/com/archive/project/monitor/online/domain/OnlineSession$OnlineStatus.java new file mode 100644 index 0000000..bb4d998 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/online/domain/OnlineSession$OnlineStatus.java @@ -0,0 +1,190 @@ +/* */ package com.archive.project.monitor.online.domain + +-INF.classes.com.archive.project.monitor.online.domain; +/* */ +/* */ import com.archive.project.monitor.online.domain.OnlineSession; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum OnlineStatus +/* */ { +/* 170 */ on_line("在线"), off_line("离线"); +/* */ +/* */ private final String info; +/* */ +/* */ OnlineStatus(String info) { +/* 175 */ this.info = info; +/* */ } +/* */ +/* */ +/* */ public String getInfo() { +/* 180 */ return this.info; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\online\domain\OnlineSession$OnlineStatus.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/online/domain/OnlineSession.java b/src/main/java/com/archive/project/monitor/online/domain/OnlineSession.java new file mode 100644 index 0000000..89c55a1 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/online/domain/OnlineSession.java @@ -0,0 +1,174 @@ +/* */ package com.archive.project.monitor.online.domain + +-INF.classes.com.archive.project.monitor.online.domain; +/* */ +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ import org.apache.shiro.session.mgt.SimpleSession; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class OnlineSession +/* */ extends SimpleSession +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long userId; +/* */ private String loginName; +/* */ private String deptName; +/* */ private String avatar; +/* */ private String host; +/* */ private String browser; +/* */ private String os; +/* 38 */ private OnlineStatus status = OnlineStatus.on_line; +/* */ +/* */ +/* */ private transient boolean attributeChanged = false; +/* */ +/* */ +/* */ +/* */ public String getHost() { +/* 46 */ return this.host; +/* */ } +/* */ +/* */ +/* */ +/* */ public void setHost(String host) { +/* 52 */ this.host = host; +/* */ } +/* */ +/* */ +/* */ public String getBrowser() { +/* 57 */ return this.browser; +/* */ } +/* */ +/* */ +/* */ public void setBrowser(String browser) { +/* 62 */ this.browser = browser; +/* */ } +/* */ +/* */ +/* */ public String getOs() { +/* 67 */ return this.os; +/* */ } +/* */ +/* */ +/* */ public void setOs(String os) { +/* 72 */ this.os = os; +/* */ } +/* */ +/* */ +/* */ public Long getUserId() { +/* 77 */ return this.userId; +/* */ } +/* */ +/* */ +/* */ public void setUserId(Long userId) { +/* 82 */ this.userId = userId; +/* */ } +/* */ +/* */ +/* */ public String getLoginName() { +/* 87 */ return this.loginName; +/* */ } +/* */ +/* */ +/* */ public void setLoginName(String loginName) { +/* 92 */ this.loginName = loginName; +/* */ } +/* */ +/* */ +/* */ public String getDeptName() { +/* 97 */ return this.deptName; +/* */ } +/* */ +/* */ +/* */ public void setDeptName(String deptName) { +/* 102 */ this.deptName = deptName; +/* */ } +/* */ +/* */ +/* */ public OnlineStatus getStatus() { +/* 107 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(OnlineStatus status) { +/* 112 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public void markAttributeChanged() { +/* 117 */ this.attributeChanged = true; +/* */ } +/* */ +/* */ +/* */ public void resetAttributeChanged() { +/* 122 */ this.attributeChanged = false; +/* */ } +/* */ +/* */ +/* */ public boolean isAttributeChanged() { +/* 127 */ return this.attributeChanged; +/* */ } +/* */ +/* */ +/* */ public String getAvatar() { +/* 132 */ return this.avatar; +/* */ } +/* */ +/* */ +/* */ public void setAvatar(String avatar) { +/* 137 */ this.avatar = avatar; +/* */ } +/* */ +/* */ +/* */ +/* */ public void setAttribute(Object key, Object value) { +/* 143 */ super.setAttribute(key, value); +/* */ } +/* */ +/* */ +/* */ +/* */ public Object removeAttribute(Object key) { +/* 149 */ return super.removeAttribute(key); +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 154 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 155 */ .append("userId", getUserId()) +/* 156 */ .append("loginName", getLoginName()) +/* 157 */ .append("deptName", getDeptName()) +/* 158 */ .append("avatar", getAvatar()) +/* 159 */ .append("host", getHost()) +/* 160 */ .append("browser", getBrowser()) +/* 161 */ .append("os", getOs()) +/* 162 */ .append("status", getStatus()) +/* 163 */ .append("attributeChanged", isAttributeChanged()) +/* 164 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\online\domain\OnlineSession.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/online/domain/UserOnline.java b/src/main/java/com/archive/project/monitor/online/domain/UserOnline.java new file mode 100644 index 0000000..9cfdec3 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/online/domain/UserOnline.java @@ -0,0 +1,198 @@ +/* */ package com.archive.project.monitor.online.domain + +-INF.classes.com.archive.project.monitor.online.domain; +/* */ +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import com.archive.project.monitor.online.domain.OnlineSession; +/* */ import java.util.Date; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class UserOnline +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private String sessionId; +/* */ private String deptName; +/* */ private String loginName; +/* */ private String ipaddr; +/* */ private String loginLocation; +/* */ private String browser; +/* */ private String os; +/* */ private Date startTimestamp; +/* */ private Date lastAccessTime; +/* */ private Long expireTime; +/* 49 */ private OnlineSession.OnlineStatus status = OnlineSession.OnlineStatus.on_line; +/* */ +/* */ +/* */ private OnlineSession session; +/* */ +/* */ +/* */ public String getSessionId() { +/* 56 */ return this.sessionId; +/* */ } +/* */ +/* */ +/* */ public void setSessionId(String sessionId) { +/* 61 */ this.sessionId = sessionId; +/* */ } +/* */ +/* */ +/* */ public String getDeptName() { +/* 66 */ return this.deptName; +/* */ } +/* */ +/* */ +/* */ public void setDeptName(String deptName) { +/* 71 */ this.deptName = deptName; +/* */ } +/* */ +/* */ +/* */ public String getLoginName() { +/* 76 */ return this.loginName; +/* */ } +/* */ +/* */ +/* */ public void setLoginName(String loginName) { +/* 81 */ this.loginName = loginName; +/* */ } +/* */ +/* */ +/* */ public String getIpaddr() { +/* 86 */ return this.ipaddr; +/* */ } +/* */ +/* */ +/* */ public void setIpaddr(String ipaddr) { +/* 91 */ this.ipaddr = ipaddr; +/* */ } +/* */ +/* */ +/* */ public String getLoginLocation() { +/* 96 */ return this.loginLocation; +/* */ } +/* */ +/* */ +/* */ public void setLoginLocation(String loginLocation) { +/* 101 */ this.loginLocation = loginLocation; +/* */ } +/* */ +/* */ +/* */ public String getBrowser() { +/* 106 */ return this.browser; +/* */ } +/* */ +/* */ +/* */ public void setBrowser(String browser) { +/* 111 */ this.browser = browser; +/* */ } +/* */ +/* */ +/* */ public String getOs() { +/* 116 */ return this.os; +/* */ } +/* */ +/* */ +/* */ public void setOs(String os) { +/* 121 */ this.os = os; +/* */ } +/* */ +/* */ +/* */ public Date getStartTimestamp() { +/* 126 */ return this.startTimestamp; +/* */ } +/* */ +/* */ +/* */ public void setStartTimestamp(Date startTimestamp) { +/* 131 */ this.startTimestamp = startTimestamp; +/* */ } +/* */ +/* */ +/* */ public Date getLastAccessTime() { +/* 136 */ return this.lastAccessTime; +/* */ } +/* */ +/* */ +/* */ public void setLastAccessTime(Date lastAccessTime) { +/* 141 */ this.lastAccessTime = lastAccessTime; +/* */ } +/* */ +/* */ +/* */ public Long getExpireTime() { +/* 146 */ return this.expireTime; +/* */ } +/* */ +/* */ +/* */ public void setExpireTime(Long expireTime) { +/* 151 */ this.expireTime = expireTime; +/* */ } +/* */ +/* */ +/* */ public OnlineSession.OnlineStatus getStatus() { +/* 156 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(OnlineSession.OnlineStatus status) { +/* 161 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public OnlineSession getSession() { +/* 166 */ return this.session; +/* */ } +/* */ +/* */ +/* */ public void setSession(OnlineSession session) { +/* 171 */ this.session = session; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 176 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 177 */ .append("sessionId", getSessionId()) +/* 178 */ .append("loginName", getLoginName()) +/* 179 */ .append("deptName", getDeptName()) +/* 180 */ .append("ipaddr", getIpaddr()) +/* 181 */ .append("loginLocation", getLoginLocation()) +/* 182 */ .append("browser", getBrowser()) +/* 183 */ .append("os", getOs()) +/* 184 */ .append("status", getStatus()) +/* 185 */ .append("startTimestamp", getStartTimestamp()) +/* 186 */ .append("lastAccessTime", getLastAccessTime()) +/* 187 */ .append("expireTime", getExpireTime()) +/* 188 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\online\domain\UserOnline.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/online/mapper/UserOnlineMapper.java b/src/main/java/com/archive/project/monitor/online/mapper/UserOnlineMapper.java new file mode 100644 index 0000000..d72e689 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/online/mapper/UserOnlineMapper.java @@ -0,0 +1,24 @@ +package com.archive.project.monitor.online.mapper + +-INF.classes.com.archive.project.monitor.online.mapper; + +import com.archive.project.monitor.online.domain.UserOnline; +import java.util.List; + +public interface UserOnlineMapper { + UserOnline selectOnlineById(String paramString); + + int deleteOnlineById(String paramString); + + int saveOnline(UserOnline paramUserOnline); + + List selectUserOnlineList(UserOnline paramUserOnline); + + List selectOnlineByExpired(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\online\mapper\UserOnlineMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/online/service/IUserOnlineService.java b/src/main/java/com/archive/project/monitor/online/service/IUserOnlineService.java new file mode 100644 index 0000000..6efd66c --- /dev/null +++ b/src/main/java/com/archive/project/monitor/online/service/IUserOnlineService.java @@ -0,0 +1,31 @@ +package com.archive.project.monitor.online.service + +-INF.classes.com.archive.project.monitor.online.service; + +import com.archive.project.monitor.online.domain.UserOnline; +import java.util.Date; +import java.util.List; + +public interface IUserOnlineService { + UserOnline selectOnlineById(String paramString); + + void deleteOnlineById(String paramString); + + void batchDeleteOnline(List paramList); + + void saveOnline(UserOnline paramUserOnline); + + List selectUserOnlineList(UserOnline paramUserOnline); + + void forceLogout(String paramString); + + void removeUserCache(String paramString1, String paramString2); + + List selectOnlineByExpired(Date paramDate); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\online\service\IUserOnlineService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/online/service/UserOnlineServiceImpl.java b/src/main/java/com/archive/project/monitor/online/service/UserOnlineServiceImpl.java new file mode 100644 index 0000000..53e47ad --- /dev/null +++ b/src/main/java/com/archive/project/monitor/online/service/UserOnlineServiceImpl.java @@ -0,0 +1,159 @@ +/* */ package com.archive.project.monitor.online.service + +-INF.classes.com.archive.project.monitor.online.service; +/* */ +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.shiro.session.OnlineSessionDAO; +/* */ import com.archive.project.monitor.online.domain.UserOnline; +/* */ import com.archive.project.monitor.online.mapper.UserOnlineMapper; +/* */ import com.archive.project.monitor.online.service.IUserOnlineService; +/* */ import java.io.Serializable; +/* */ import java.util.Date; +/* */ import java.util.Deque; +/* */ import java.util.List; +/* */ import org.apache.shiro.cache.Cache; +/* */ import org.apache.shiro.cache.ehcache.EhCacheManager; +/* */ import org.apache.shiro.session.Session; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class UserOnlineServiceImpl +/* */ implements IUserOnlineService +/* */ { +/* */ @Autowired +/* */ private UserOnlineMapper userOnlineDao; +/* */ @Autowired +/* */ private OnlineSessionDAO onlineSessionDAO; +/* */ @Autowired +/* */ private EhCacheManager ehCacheManager; +/* */ +/* */ public UserOnline selectOnlineById(String sessionId) { +/* 45 */ return this.userOnlineDao.selectOnlineById(sessionId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void deleteOnlineById(String sessionId) { +/* 57 */ UserOnline userOnline = selectOnlineById(sessionId); +/* 58 */ if (StringUtils.isNotNull(userOnline)) +/* */ { +/* 60 */ this.userOnlineDao.deleteOnlineById(sessionId); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void batchDeleteOnline(List sessions) { +/* 73 */ for (String sessionId : sessions) { +/* */ +/* 75 */ UserOnline userOnline = selectOnlineById(sessionId); +/* 76 */ if (StringUtils.isNotNull(userOnline)) +/* */ { +/* 78 */ this.userOnlineDao.deleteOnlineById(sessionId); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void saveOnline(UserOnline online) { +/* 91 */ this.userOnlineDao.saveOnline(online); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectUserOnlineList(UserOnline userOnline) { +/* 102 */ return this.userOnlineDao.selectUserOnlineList(userOnline); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void forceLogout(String sessionId) { +/* 113 */ Session session = this.onlineSessionDAO.readSession(sessionId); +/* 114 */ if (session == null) { +/* */ return; +/* */ } +/* */ +/* 118 */ session.setTimeout(1000L); +/* 119 */ this.userOnlineDao.deleteOnlineById(sessionId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void removeUserCache(String loginName, String sessionId) { +/* 131 */ Cache> cache = this.ehCacheManager.getCache("sys-userCache"); +/* 132 */ Deque deque = (Deque)cache.get(loginName); +/* 133 */ if (StringUtils.isEmpty(deque) || deque.size() == 0) { +/* */ return; +/* */ } +/* */ +/* 137 */ deque.remove(sessionId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectOnlineByExpired(Date expiredDate) { +/* 148 */ String lastAccessTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, expiredDate); +/* 149 */ return this.userOnlineDao.selectOnlineByExpired(lastAccessTime); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\online\service\UserOnlineServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/operlog/controller/OperlogController.java b/src/main/java/com/archive/project/monitor/operlog/controller/OperlogController.java new file mode 100644 index 0000000..81d36cc --- /dev/null +++ b/src/main/java/com/archive/project/monitor/operlog/controller/OperlogController.java @@ -0,0 +1,97 @@ +/* */ package com.archive.project.monitor.operlog.controller + +; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.monitor.operlog.domain.OperLog; +/* */ import com.archive.project.monitor.operlog.service.IOperLogService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/monitor/operlog"}) +/* */ public class OperlogController +/* */ extends BaseController +/* */ { +/* 31 */ private String prefix = "monitor/operlog"; +/* */ +/* */ @Autowired +/* */ private IOperLogService operLogService; +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:operlog:view"}) +/* */ @GetMapping +/* */ public String operlog() { +/* 40 */ return this.prefix + "/operlog"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:operlog:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(OperLog operLog) { +/* 48 */ startPage(); +/* 49 */ List list = this.operLogService.selectOperLogList(operLog); +/* 50 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @Log(title = "操作日志", businessType = BusinessType.EXPORT) +/* */ @RequiresPermissions({"monitor:operlog:export"}) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(OperLog operLog) { +/* 59 */ List list = this.operLogService.selectOperLogList(operLog); +/* 60 */ ExcelUtil util = new ExcelUtil(OperLog.class); +/* 61 */ return util.exportExcel(list, "操作日志"); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:operlog:remove"}) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 69 */ return toAjax(this.operLogService.deleteOperLogByIds(ids)); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:operlog:detail"}) +/* */ @GetMapping({"/detail/{operId}"}) +/* */ public String detail(@PathVariable("operId") Long operId, ModelMap mmap) { +/* 76 */ mmap.put("operLog", this.operLogService.selectOperLogById(operId)); +/* 77 */ return this.prefix + "/detail"; +/* */ } +/* */ +/* */ +/* */ @Log(title = "操作日志", businessType = BusinessType.CLEAN) +/* */ @RequiresPermissions({"monitor:operlog:remove"}) +/* */ @PostMapping({"/clean"}) +/* */ @ResponseBody +/* */ public AjaxResult clean() { +/* 86 */ this.operLogService.cleanOperLog(); +/* 87 */ return success(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\operlog\controller\OperlogController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/operlog/domain/OperLog.java b/src/main/java/com/archive/project/monitor/operlog/domain/OperLog.java new file mode 100644 index 0000000..2adb7f2 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/operlog/domain/OperLog.java @@ -0,0 +1,285 @@ +/* */ package com.archive.project.monitor.operlog.domain + +-INF.classes.com.archive.project.monitor.operlog.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import java.util.Date; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class OperLog +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ @Excel(name = "操作序号", cellType = Excel.ColumnType.NUMERIC) +/* */ private Long operId; +/* */ @Excel(name = "操作模块") +/* */ private String title; +/* */ @Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据") +/* */ private Integer businessType; +/* */ private Integer[] businessTypes; +/* */ @Excel(name = "请求方法") +/* */ private String method; +/* */ @Excel(name = "请求方式") +/* */ private String requestMethod; +/* */ @Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户") +/* */ private Integer operatorType; +/* */ @Excel(name = "操作人员") +/* */ private String operName; +/* */ @Excel(name = "部门名称") +/* */ private String deptName; +/* */ @Excel(name = "请求地址") +/* */ private String operUrl; +/* */ @Excel(name = "操作地址") +/* */ private String operIp; +/* */ @Excel(name = "操作地点") +/* */ private String operLocation; +/* */ @Excel(name = "请求参数") +/* */ private String operParam; +/* */ @Excel(name = "返回参数") +/* */ private String jsonResult; +/* */ @Excel(name = "状态", readConverterExp = "0=正常,1=异常") +/* */ private Integer status; +/* */ @Excel(name = "错误消息") +/* */ private String errorMsg; +/* */ @Excel(name = "操作时间", width = 30.0D, dateFormat = "yyyy-MM-dd HH:mm:ss") +/* */ private Date operTime; +/* */ +/* */ public Long getOperId() { +/* 88 */ return this.operId; +/* */ } +/* */ +/* */ +/* */ public void setOperId(Long operId) { +/* 93 */ this.operId = operId; +/* */ } +/* */ +/* */ +/* */ public String getTitle() { +/* 98 */ return this.title; +/* */ } +/* */ +/* */ +/* */ public void setTitle(String title) { +/* 103 */ this.title = title; +/* */ } +/* */ +/* */ +/* */ public Integer getBusinessType() { +/* 108 */ return this.businessType; +/* */ } +/* */ +/* */ +/* */ public void setBusinessType(Integer businessType) { +/* 113 */ this.businessType = businessType; +/* */ } +/* */ +/* */ +/* */ public Integer[] getBusinessTypes() { +/* 118 */ return this.businessTypes; +/* */ } +/* */ +/* */ +/* */ public void setBusinessTypes(Integer[] businessTypes) { +/* 123 */ this.businessTypes = businessTypes; +/* */ } +/* */ +/* */ +/* */ public String getMethod() { +/* 128 */ return this.method; +/* */ } +/* */ +/* */ +/* */ public void setMethod(String method) { +/* 133 */ this.method = method; +/* */ } +/* */ +/* */ +/* */ public String getRequestMethod() { +/* 138 */ return this.requestMethod; +/* */ } +/* */ +/* */ +/* */ public void setRequestMethod(String requestMethod) { +/* 143 */ this.requestMethod = requestMethod; +/* */ } +/* */ +/* */ +/* */ public Integer getOperatorType() { +/* 148 */ return this.operatorType; +/* */ } +/* */ +/* */ +/* */ public void setOperatorType(Integer operatorType) { +/* 153 */ this.operatorType = operatorType; +/* */ } +/* */ +/* */ +/* */ public String getOperName() { +/* 158 */ return this.operName; +/* */ } +/* */ +/* */ +/* */ public void setOperName(String operName) { +/* 163 */ this.operName = operName; +/* */ } +/* */ +/* */ +/* */ public String getDeptName() { +/* 168 */ return this.deptName; +/* */ } +/* */ +/* */ +/* */ public void setDeptName(String deptName) { +/* 173 */ this.deptName = deptName; +/* */ } +/* */ +/* */ +/* */ public String getOperUrl() { +/* 178 */ return this.operUrl; +/* */ } +/* */ +/* */ +/* */ public void setOperUrl(String operUrl) { +/* 183 */ this.operUrl = operUrl; +/* */ } +/* */ +/* */ +/* */ public String getOperIp() { +/* 188 */ return this.operIp; +/* */ } +/* */ +/* */ +/* */ public void setOperIp(String operIp) { +/* 193 */ this.operIp = operIp; +/* */ } +/* */ +/* */ +/* */ public String getOperLocation() { +/* 198 */ return this.operLocation; +/* */ } +/* */ +/* */ +/* */ public void setOperLocation(String operLocation) { +/* 203 */ this.operLocation = operLocation; +/* */ } +/* */ +/* */ +/* */ public String getOperParam() { +/* 208 */ return this.operParam; +/* */ } +/* */ +/* */ +/* */ public void setOperParam(String operParam) { +/* 213 */ this.operParam = operParam; +/* */ } +/* */ +/* */ +/* */ public String getJsonResult() { +/* 218 */ return this.jsonResult; +/* */ } +/* */ +/* */ +/* */ public void setJsonResult(String jsonResult) { +/* 223 */ this.jsonResult = jsonResult; +/* */ } +/* */ +/* */ +/* */ public Integer getStatus() { +/* 228 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(Integer status) { +/* 233 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String getErrorMsg() { +/* 238 */ return this.errorMsg; +/* */ } +/* */ +/* */ +/* */ public void setErrorMsg(String errorMsg) { +/* 243 */ this.errorMsg = errorMsg; +/* */ } +/* */ +/* */ +/* */ public Date getOperTime() { +/* 248 */ return this.operTime; +/* */ } +/* */ +/* */ +/* */ public void setOperTime(Date operTime) { +/* 253 */ this.operTime = operTime; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 258 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 259 */ .append("operId", getOperId()) +/* 260 */ .append("title", getTitle()) +/* 261 */ .append("businessType", getBusinessType()) +/* 262 */ .append("businessTypes", (Object[])getBusinessTypes()) +/* 263 */ .append("method", getMethod()) +/* 264 */ .append("requestMethod", getRequestMethod()) +/* 265 */ .append("operatorType", getOperatorType()) +/* 266 */ .append("operName", getOperName()) +/* 267 */ .append("deptName", getDeptName()) +/* 268 */ .append("operUrl", getOperUrl()) +/* 269 */ .append("operIp", getOperIp()) +/* 270 */ .append("operLocation", getOperLocation()) +/* 271 */ .append("operParam", getOperParam()) +/* 272 */ .append("status", getStatus()) +/* 273 */ .append("errorMsg", getErrorMsg()) +/* 274 */ .append("operTime", getOperTime()) +/* 275 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\operlog\domain\OperLog.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/operlog/mapper/OperLogMapper.java b/src/main/java/com/archive/project/monitor/operlog/mapper/OperLogMapper.java new file mode 100644 index 0000000..e1dc7bd --- /dev/null +++ b/src/main/java/com/archive/project/monitor/operlog/mapper/OperLogMapper.java @@ -0,0 +1,30 @@ +package com.archive.project.monitor.operlog.mapper + +-INF.classes.com.archive.project.monitor.operlog.mapper; + +import com.archive.project.monitor.operlog.domain.OperLog; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface OperLogMapper { + void insertOperlog(OperLog paramOperLog); + + void insertOperlogSqlite(OperLog paramOperLog); + + List selectOperLogList(OperLog paramOperLog); + + List selectOperLogListSqlite(OperLog paramOperLog); + + int deleteOperLogByIds(String[] paramArrayOfString); + + OperLog selectOperLogById(Long paramLong); + + void cleanOperLog(); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\operlog\mapper\OperLogMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/operlog/service/IOperLogService.java b/src/main/java/com/archive/project/monitor/operlog/service/IOperLogService.java new file mode 100644 index 0000000..c42d4e2 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/operlog/service/IOperLogService.java @@ -0,0 +1,24 @@ +package com.archive.project.monitor.operlog.service + +-INF.classes.com.archive.project.monitor.operlog.service; + +import com.archive.project.monitor.operlog.domain.OperLog; +import java.util.List; + +public interface IOperLogService { + void insertOperlog(OperLog paramOperLog); + + List selectOperLogList(OperLog paramOperLog); + + int deleteOperLogByIds(String paramString); + + OperLog selectOperLogById(Long paramLong); + + void cleanOperLog(); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\operlog\service\IOperLogService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/operlog/service/OperLogServiceImpl.java b/src/main/java/com/archive/project/monitor/operlog/service/OperLogServiceImpl.java new file mode 100644 index 0000000..54d9885 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/operlog/service/OperLogServiceImpl.java @@ -0,0 +1,105 @@ +/* */ package com.archive.project.monitor.operlog.service + +-INF.classes.com.archive.project.monitor.operlog.service; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.monitor.operlog.domain.OperLog; +/* */ import com.archive.project.monitor.operlog.mapper.OperLogMapper; +/* */ import com.archive.project.monitor.operlog.service.IOperLogService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class OperLogServiceImpl +/* */ implements IOperLogService +/* */ { +/* */ @Autowired +/* */ private OperLogMapper operLogMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public void insertOperlog(OperLog operLog) { +/* 35 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 36 */ this.operLogMapper.insertOperlog(operLog); +/* */ } +/* 38 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 39 */ this.operLogMapper.insertOperlogSqlite(operLog); +/* */ } else { +/* 41 */ this.operLogMapper.insertOperlog(operLog); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectOperLogList(OperLog operLog) { +/* 54 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 55 */ return this.operLogMapper.selectOperLogList(operLog); +/* */ } +/* 57 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 58 */ return this.operLogMapper.selectOperLogListSqlite(operLog); +/* */ } +/* 60 */ return this.operLogMapper.selectOperLogList(operLog); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteOperLogByIds(String ids) { +/* 74 */ return this.operLogMapper.deleteOperLogByIds(Convert.toStrArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public OperLog selectOperLogById(Long operId) { +/* 86 */ return this.operLogMapper.selectOperLogById(operId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void cleanOperLog() { +/* 95 */ this.operLogMapper.cleanOperLog(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\operlog\service\OperLogServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/server/controller/ServerController.java b/src/main/java/com/archive/project/monitor/server/controller/ServerController.java new file mode 100644 index 0000000..41d07a6 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/server/controller/ServerController.java @@ -0,0 +1,39 @@ +/* */ package com.archive.project.monitor.server.controller + +; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.project.monitor.server.domain.Server; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/monitor/server"}) +/* */ public class ServerController +/* */ extends BaseController +/* */ { +/* 20 */ private String prefix = "monitor/server"; +/* */ +/* */ +/* */ @RequiresPermissions({"monitor:server:view"}) +/* */ @GetMapping +/* */ public String server(ModelMap mmap) throws Exception { +/* 26 */ Server server = new Server(); +/* 27 */ server.copyTo(); +/* 28 */ mmap.put("server", server); +/* 29 */ return this.prefix + "/server"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\controller\ServerController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/server/domain/Cpu.java b/src/main/java/com/archive/project/monitor/server/domain/Cpu.java new file mode 100644 index 0000000..6861546 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/server/domain/Cpu.java @@ -0,0 +1,109 @@ +/* */ package com.archive.project.monitor.server.domain + +-INF.classes.com.archive.project.monitor.server.domain; +/* */ +/* */ import com.archive.common.utils.Arith; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Cpu +/* */ { +/* */ private int cpuNum; +/* */ private double total; +/* */ private double sys; +/* */ private double used; +/* */ private double wait; +/* */ private double free; +/* */ +/* */ public int getCpuNum() { +/* 44 */ return this.cpuNum; +/* */ } +/* */ +/* */ +/* */ public void setCpuNum(int cpuNum) { +/* 49 */ this.cpuNum = cpuNum; +/* */ } +/* */ +/* */ +/* */ public double getTotal() { +/* 54 */ return Arith.round(Arith.mul(this.total, 100.0D), 2); +/* */ } +/* */ +/* */ +/* */ public void setTotal(double total) { +/* 59 */ this.total = total; +/* */ } +/* */ +/* */ +/* */ public double getSys() { +/* 64 */ return Arith.round(Arith.mul(this.sys / this.total, 100.0D), 2); +/* */ } +/* */ +/* */ +/* */ public void setSys(double sys) { +/* 69 */ this.sys = sys; +/* */ } +/* */ +/* */ +/* */ public double getUsed() { +/* 74 */ return Arith.round(Arith.mul(this.used / this.total, 100.0D), 2); +/* */ } +/* */ +/* */ +/* */ public void setUsed(double used) { +/* 79 */ this.used = used; +/* */ } +/* */ +/* */ +/* */ public double getWait() { +/* 84 */ return Arith.round(Arith.mul(this.wait / this.total, 100.0D), 2); +/* */ } +/* */ +/* */ +/* */ public void setWait(double wait) { +/* 89 */ this.wait = wait; +/* */ } +/* */ +/* */ +/* */ public double getFree() { +/* 94 */ return Arith.round(Arith.mul(this.free / this.total, 100.0D), 2); +/* */ } +/* */ +/* */ +/* */ public void setFree(double free) { +/* 99 */ this.free = free; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\domain\Cpu.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/server/domain/Jvm.java b/src/main/java/com/archive/project/monitor/server/domain/Jvm.java new file mode 100644 index 0000000..3c453ee --- /dev/null +++ b/src/main/java/com/archive/project/monitor/server/domain/Jvm.java @@ -0,0 +1,130 @@ +/* */ package com.archive.project.monitor.server.domain + +-INF.classes.com.archive.project.monitor.server.domain; +/* */ +/* */ import com.archive.common.utils.Arith; +/* */ import com.archive.common.utils.DateUtils; +/* */ import java.lang.management.ManagementFactory; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Jvm +/* */ { +/* */ private double total; +/* */ private double max; +/* */ private double free; +/* */ private String version; +/* */ private String home; +/* */ +/* */ public double getTotal() { +/* 41 */ return Arith.div(this.total, 1048576.0D, 2); +/* */ } +/* */ +/* */ +/* */ public void setTotal(double total) { +/* 46 */ this.total = total; +/* */ } +/* */ +/* */ +/* */ public double getMax() { +/* 51 */ return Arith.div(this.max, 1048576.0D, 2); +/* */ } +/* */ +/* */ +/* */ public void setMax(double max) { +/* 56 */ this.max = max; +/* */ } +/* */ +/* */ +/* */ public double getFree() { +/* 61 */ return Arith.div(this.free, 1048576.0D, 2); +/* */ } +/* */ +/* */ +/* */ public void setFree(double free) { +/* 66 */ this.free = free; +/* */ } +/* */ +/* */ +/* */ public double getUsed() { +/* 71 */ return Arith.div(this.total - this.free, 1048576.0D, 2); +/* */ } +/* */ +/* */ +/* */ public double getUsage() { +/* 76 */ return Arith.mul(Arith.div(this.total - this.free, this.total, 4), 100.0D); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getName() { +/* 84 */ return ManagementFactory.getRuntimeMXBean().getVmName(); +/* */ } +/* */ +/* */ +/* */ public String getVersion() { +/* 89 */ return this.version; +/* */ } +/* */ +/* */ +/* */ public void setVersion(String version) { +/* 94 */ this.version = version; +/* */ } +/* */ +/* */ +/* */ public String getHome() { +/* 99 */ return this.home; +/* */ } +/* */ +/* */ +/* */ public void setHome(String home) { +/* 104 */ this.home = home; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getStartTime() { +/* 112 */ return DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.getServerStartDate()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getRunTime() { +/* 120 */ return DateUtils.getDatePoor(DateUtils.getNowDate(), DateUtils.getServerStartDate()); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\domain\Jvm.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/server/domain/Mem.java b/src/main/java/com/archive/project/monitor/server/domain/Mem.java new file mode 100644 index 0000000..1443e79 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/server/domain/Mem.java @@ -0,0 +1,69 @@ +/* */ package com.archive.project.monitor.server.domain + +-INF.classes.com.archive.project.monitor.server.domain; +/* */ +/* */ import com.archive.common.utils.Arith; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Mem +/* */ { +/* */ private double total; +/* */ private double used; +/* */ private double free; +/* */ +/* */ public double getTotal() { +/* 29 */ return Arith.div(this.total, 1.073741824E9D, 2); +/* */ } +/* */ +/* */ +/* */ public void setTotal(long total) { +/* 34 */ this.total = total; +/* */ } +/* */ +/* */ +/* */ public double getUsed() { +/* 39 */ return Arith.div(this.used, 1.073741824E9D, 2); +/* */ } +/* */ +/* */ +/* */ public void setUsed(long used) { +/* 44 */ this.used = used; +/* */ } +/* */ +/* */ +/* */ public double getFree() { +/* 49 */ return Arith.div(this.free, 1.073741824E9D, 2); +/* */ } +/* */ +/* */ +/* */ public void setFree(long free) { +/* 54 */ this.free = free; +/* */ } +/* */ +/* */ +/* */ public double getUsage() { +/* 59 */ return Arith.mul(Arith.div(this.used, this.total, 4), 100.0D); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\domain\Mem.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/server/domain/Server.java b/src/main/java/com/archive/project/monitor/server/domain/Server.java new file mode 100644 index 0000000..0d59ba4 --- /dev/null +++ b/src/main/java/com/archive/project/monitor/server/domain/Server.java @@ -0,0 +1,242 @@ +/* */ package com.archive.project.monitor.server.domain + +; +/* */ +/* */ import com.archive.common.utils.Arith; +/* */ import com.archive.common.utils.IpUtils; +/* */ import com.archive.project.monitor.server.domain.Cpu; +/* */ import com.archive.project.monitor.server.domain.Jvm; +/* */ import com.archive.project.monitor.server.domain.Mem; +/* */ import com.archive.project.monitor.server.domain.Sys; +/* */ import com.archive.project.monitor.server.domain.SysFile; +/* */ import java.net.UnknownHostException; +/* */ import java.util.LinkedList; +/* */ import java.util.List; +/* */ import java.util.Properties; +/* */ import oshi.SystemInfo; +/* */ import oshi.hardware.CentralProcessor; +/* */ import oshi.hardware.GlobalMemory; +/* */ import oshi.hardware.HardwareAbstractionLayer; +/* */ import oshi.software.os.FileSystem; +/* */ import oshi.software.os.OSFileStore; +/* */ import oshi.software.os.OperatingSystem; +/* */ import oshi.util.Util; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Server +/* */ { +/* */ private static final int OSHI_WAIT_SECOND = 1000; +/* 31 */ private Cpu cpu = new Cpu(); +/* */ +/* */ +/* */ +/* */ +/* 36 */ private Mem mem = new Mem(); +/* */ +/* */ +/* */ +/* */ +/* 41 */ private Jvm jvm = new Jvm(); +/* */ +/* */ +/* */ +/* */ +/* 46 */ private Sys sys = new Sys(); +/* */ +/* */ +/* */ +/* */ +/* 51 */ private List sysFiles = new LinkedList<>(); +/* */ +/* */ +/* */ public Cpu getCpu() { +/* 55 */ return this.cpu; +/* */ } +/* */ +/* */ +/* */ public void setCpu(Cpu cpu) { +/* 60 */ this.cpu = cpu; +/* */ } +/* */ +/* */ +/* */ public Mem getMem() { +/* 65 */ return this.mem; +/* */ } +/* */ +/* */ +/* */ public void setMem(Mem mem) { +/* 70 */ this.mem = mem; +/* */ } +/* */ +/* */ +/* */ public Jvm getJvm() { +/* 75 */ return this.jvm; +/* */ } +/* */ +/* */ +/* */ public void setJvm(Jvm jvm) { +/* 80 */ this.jvm = jvm; +/* */ } +/* */ +/* */ +/* */ public Sys getSys() { +/* 85 */ return this.sys; +/* */ } +/* */ +/* */ +/* */ public void setSys(Sys sys) { +/* 90 */ this.sys = sys; +/* */ } +/* */ +/* */ +/* */ public List getSysFiles() { +/* 95 */ return this.sysFiles; +/* */ } +/* */ +/* */ +/* */ public void setSysFiles(List sysFiles) { +/* 100 */ this.sysFiles = sysFiles; +/* */ } +/* */ +/* */ +/* */ public void copyTo() throws Exception { +/* 105 */ SystemInfo si = new SystemInfo(); +/* 106 */ HardwareAbstractionLayer hal = si.getHardware(); +/* */ +/* 108 */ setCpuInfo(hal.getProcessor()); +/* */ +/* 110 */ setMemInfo(hal.getMemory()); +/* */ +/* 112 */ setSysInfo(); +/* */ +/* 114 */ setJvmInfo(); +/* */ +/* 116 */ setSysFiles(si.getOperatingSystem()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void setCpuInfo(CentralProcessor processor) { +/* 125 */ long[] prevTicks = processor.getSystemCpuLoadTicks(); +/* 126 */ Util.sleep(1000L); +/* 127 */ long[] ticks = processor.getSystemCpuLoadTicks(); +/* 128 */ long nice = ticks[CentralProcessor.TickType.NICE.getIndex()] - prevTicks[CentralProcessor.TickType.NICE.getIndex()]; +/* 129 */ long irq = ticks[CentralProcessor.TickType.IRQ.getIndex()] - prevTicks[CentralProcessor.TickType.IRQ.getIndex()]; +/* 130 */ long softirq = ticks[CentralProcessor.TickType.SOFTIRQ.getIndex()] - prevTicks[CentralProcessor.TickType.SOFTIRQ.getIndex()]; +/* 131 */ long steal = ticks[CentralProcessor.TickType.STEAL.getIndex()] - prevTicks[CentralProcessor.TickType.STEAL.getIndex()]; +/* 132 */ long cSys = ticks[CentralProcessor.TickType.SYSTEM.getIndex()] - prevTicks[CentralProcessor.TickType.SYSTEM.getIndex()]; +/* 133 */ long user = ticks[CentralProcessor.TickType.USER.getIndex()] - prevTicks[CentralProcessor.TickType.USER.getIndex()]; +/* 134 */ long iowait = ticks[CentralProcessor.TickType.IOWAIT.getIndex()] - prevTicks[CentralProcessor.TickType.IOWAIT.getIndex()]; +/* 135 */ long idle = ticks[CentralProcessor.TickType.IDLE.getIndex()] - prevTicks[CentralProcessor.TickType.IDLE.getIndex()]; +/* 136 */ long totalCpu = user + nice + cSys + idle + iowait + irq + softirq + steal; +/* 137 */ this.cpu.setCpuNum(processor.getLogicalProcessorCount()); +/* 138 */ this.cpu.setTotal(totalCpu); +/* 139 */ this.cpu.setSys(cSys); +/* 140 */ this.cpu.setUsed(user); +/* 141 */ this.cpu.setWait(iowait); +/* 142 */ this.cpu.setFree(idle); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void setMemInfo(GlobalMemory memory) { +/* 150 */ this.mem.setTotal(memory.getTotal()); +/* 151 */ this.mem.setUsed(memory.getTotal() - memory.getAvailable()); +/* 152 */ this.mem.setFree(memory.getAvailable()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void setSysInfo() { +/* 160 */ Properties props = System.getProperties(); +/* 161 */ this.sys.setComputerName(IpUtils.getHostName()); +/* 162 */ this.sys.setComputerIp(IpUtils.getHostIp()); +/* 163 */ this.sys.setOsName(props.getProperty("os.name")); +/* 164 */ this.sys.setOsArch(props.getProperty("os.arch")); +/* 165 */ this.sys.setUserDir(props.getProperty("user.dir")); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void setJvmInfo() throws UnknownHostException { +/* 173 */ Properties props = System.getProperties(); +/* 174 */ this.jvm.setTotal(Runtime.getRuntime().totalMemory()); +/* 175 */ this.jvm.setMax(Runtime.getRuntime().maxMemory()); +/* 176 */ this.jvm.setFree(Runtime.getRuntime().freeMemory()); +/* 177 */ this.jvm.setVersion(props.getProperty("java.version")); +/* 178 */ this.jvm.setHome(props.getProperty("java.home")); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void setSysFiles(OperatingSystem os) { +/* 186 */ FileSystem fileSystem = os.getFileSystem(); +/* 187 */ List fsArray = fileSystem.getFileStores(); +/* 188 */ for (OSFileStore fs : fsArray) { +/* */ +/* 190 */ long free = fs.getUsableSpace(); +/* 191 */ long total = fs.getTotalSpace(); +/* 192 */ long used = total - free; +/* 193 */ SysFile sysFile = new SysFile(); +/* 194 */ sysFile.setDirName(fs.getMount()); +/* 195 */ sysFile.setSysTypeName(fs.getType()); +/* 196 */ sysFile.setTypeName(fs.getName()); +/* 197 */ sysFile.setTotal(convertFileSize(total)); +/* 198 */ sysFile.setFree(convertFileSize(free)); +/* 199 */ sysFile.setUsed(convertFileSize(used)); +/* 200 */ sysFile.setUsage(Arith.mul(Arith.div(used, total, 4), 100.0D)); +/* 201 */ this.sysFiles.add(sysFile); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String convertFileSize(long size) { +/* 213 */ long kb = 1024L; +/* 214 */ long mb = kb * 1024L; +/* 215 */ long gb = mb * 1024L; +/* 216 */ if (size >= gb) +/* */ { +/* 218 */ return String.format("%.1f GB", new Object[] { Float.valueOf((float)size / (float)gb) }); +/* */ } +/* 220 */ if (size >= mb) { +/* */ +/* 222 */ float f = (float)size / (float)mb; +/* 223 */ return String.format((f > 100.0F) ? "%.0f MB" : "%.1f MB", new Object[] { Float.valueOf(f) }); +/* */ } +/* 225 */ if (size >= kb) { +/* */ +/* 227 */ float f = (float)size / (float)kb; +/* 228 */ return String.format((f > 100.0F) ? "%.0f KB" : "%.1f KB", new Object[] { Float.valueOf(f) }); +/* */ } +/* */ +/* */ +/* 232 */ return String.format("%d B", new Object[] { Long.valueOf(size) }); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\domain\Server.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/server/domain/Sys.java b/src/main/java/com/archive/project/monitor/server/domain/Sys.java new file mode 100644 index 0000000..b4c1cfc --- /dev/null +++ b/src/main/java/com/archive/project/monitor/server/domain/Sys.java @@ -0,0 +1,90 @@ +/* */ package com.archive.project.monitor.server.domain; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Sys +/* */ { +/* */ private String computerName; +/* */ private String computerIp; +/* */ private String userDir; +/* */ private String osName; +/* */ private String osArch; +/* */ +/* */ public String getComputerName() { +/* 37 */ return this.computerName; +/* */ } +/* */ +/* */ +/* */ public void setComputerName(String computerName) { +/* 42 */ this.computerName = computerName; +/* */ } +/* */ +/* */ +/* */ public String getComputerIp() { +/* 47 */ return this.computerIp; +/* */ } +/* */ +/* */ +/* */ public void setComputerIp(String computerIp) { +/* 52 */ this.computerIp = computerIp; +/* */ } +/* */ +/* */ +/* */ public String getUserDir() { +/* 57 */ return this.userDir; +/* */ } +/* */ +/* */ +/* */ public void setUserDir(String userDir) { +/* 62 */ this.userDir = userDir; +/* */ } +/* */ +/* */ +/* */ public String getOsName() { +/* 67 */ return this.osName; +/* */ } +/* */ +/* */ +/* */ public void setOsName(String osName) { +/* 72 */ this.osName = osName; +/* */ } +/* */ +/* */ +/* */ public String getOsArch() { +/* 77 */ return this.osArch; +/* */ } +/* */ +/* */ +/* */ public void setOsArch(String osArch) { +/* 82 */ this.osArch = osArch; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\domain\Sys.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/monitor/server/domain/SysFile.java b/src/main/java/com/archive/project/monitor/server/domain/SysFile.java new file mode 100644 index 0000000..a68bbbd --- /dev/null +++ b/src/main/java/com/archive/project/monitor/server/domain/SysFile.java @@ -0,0 +1,120 @@ +/* */ package com.archive.project.monitor.server.domain-INF.classes.com.archive.project.monitor.server.domain; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SysFile +/* */ { +/* */ private String dirName; +/* */ private String sysTypeName; +/* */ private String typeName; +/* */ private String total; +/* */ private String free; +/* */ private String used; +/* */ private double usage; +/* */ +/* */ public String getDirName() { +/* 47 */ return this.dirName; +/* */ } +/* */ +/* */ +/* */ public void setDirName(String dirName) { +/* 52 */ this.dirName = dirName; +/* */ } +/* */ +/* */ +/* */ public String getSysTypeName() { +/* 57 */ return this.sysTypeName; +/* */ } +/* */ +/* */ +/* */ public void setSysTypeName(String sysTypeName) { +/* 62 */ this.sysTypeName = sysTypeName; +/* */ } +/* */ +/* */ +/* */ public String getTypeName() { +/* 67 */ return this.typeName; +/* */ } +/* */ +/* */ +/* */ public void setTypeName(String typeName) { +/* 72 */ this.typeName = typeName; +/* */ } +/* */ +/* */ +/* */ public String getTotal() { +/* 77 */ return this.total; +/* */ } +/* */ +/* */ +/* */ public void setTotal(String total) { +/* 82 */ this.total = total; +/* */ } +/* */ +/* */ +/* */ public String getFree() { +/* 87 */ return this.free; +/* */ } +/* */ +/* */ +/* */ public void setFree(String free) { +/* 92 */ this.free = free; +/* */ } +/* */ +/* */ +/* */ public String getUsed() { +/* 97 */ return this.used; +/* */ } +/* */ +/* */ +/* */ public void setUsed(String used) { +/* 102 */ this.used = used; +/* */ } +/* */ +/* */ +/* */ public double getUsage() { +/* 107 */ return this.usage; +/* */ } +/* */ +/* */ +/* */ public void setUsage(double usage) { +/* 112 */ this.usage = usage; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\domain\SysFile.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/plugins/controller/PluginsController.java b/src/main/java/com/archive/project/plugins/controller/PluginsController.java new file mode 100644 index 0000000..bc04c08 --- /dev/null +++ b/src/main/java/com/archive/project/plugins/controller/PluginsController.java @@ -0,0 +1,45 @@ +/* */ package com.archive.project.plugins.controller + +-INF.classes.com.archive.project.plugins.controller; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.project.dajs.jsgl.service.IJsglService; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/plugins"}) +/* */ public class PluginsController +/* */ extends BaseController +/* */ { +/* 26 */ private String prefix = "plugins"; +/* */ +/* */ +/* */ @Autowired +/* */ private IJsglService jsglService; +/* */ +/* */ +/* */ @GetMapping({"/pdfjs"}) +/* */ public String pdfjs(ModelMap mmap) { +/* 35 */ return this.prefix + "/pdfjs/web/viewer"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\plugins\controller\PluginsController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/plugins/service/IPluginsService.java b/src/main/java/com/archive/project/plugins/service/IPluginsService.java new file mode 100644 index 0000000..e96d83a --- /dev/null +++ b/src/main/java/com/archive/project/plugins/service/IPluginsService.java @@ -0,0 +1,9 @@ +package com.archive.project.plugins.service-INF.classes.com.archive.project.plugins.service; + +public interface IPluginsService {} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\plugins\service\IPluginsService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/plugins/service/impl/PluginsServiceImpl.java b/src/main/java/com/archive/project/plugins/service/impl/PluginsServiceImpl.java new file mode 100644 index 0000000..5b2d318 --- /dev/null +++ b/src/main/java/com/archive/project/plugins/service/impl/PluginsServiceImpl.java @@ -0,0 +1,119 @@ +/* */ package com.archive.project.plugins.service.impl + +; +/* */ +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import com.archive.project.plugins.service.IPluginsService; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.awt.Color; +/* */ import java.awt.Graphics2D; +/* */ import java.awt.Image; +/* */ import java.awt.image.BufferedImage; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import javax.imageio.ImageIO; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class PluginsServiceImpl +/* */ implements IPluginsService +/* */ { +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private IConfigService configService; +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ public static void main(String[] args) throws Exception { +/* 48 */ BufferedImage image = resizeImage("D://3.png", 150); +/* 49 */ printImage(image); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void printImage(BufferedImage image) throws IOException { +/* 59 */ char[] PIXEL_CHAR_ARRAY = { '*', 'o', ':', '.', ' ' }; +/* 60 */ int width = image.getWidth(); +/* 61 */ int height = image.getHeight(); +/* 62 */ for (int i = 0; i < height; i++) { +/* 63 */ for (int j = 0; j < width; j++) { +/* 64 */ int rgb = image.getRGB(j, i); +/* 65 */ Color color = new Color(rgb); +/* 66 */ int red = color.getRed(); +/* 67 */ int green = color.getGreen(); +/* 68 */ int blue = color.getBlue(); +/* */ +/* 70 */ Double grayscale = Double.valueOf(0.2126D * red + 0.7152D * green + 0.0722D * blue); +/* 71 */ double index = grayscale.doubleValue() / (Math.ceil((255 / PIXEL_CHAR_ARRAY.length)) + 0.5D); +/* 72 */ System.out.print(PIXEL_CHAR_ARRAY[(int)Math.floor(index)]); +/* */ } +/* 74 */ System.out.println(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static BufferedImage resizeImage(String srcImagePath, int targetWidth) throws IOException { +/* 88 */ Image srcImage = ImageIO.read(new File(srcImagePath)); +/* 89 */ int targetHeight = getTargetHeight(targetWidth, srcImage); +/* 90 */ BufferedImage resizedImage = new BufferedImage(targetWidth, targetHeight, 1); +/* 91 */ Graphics2D graphics2D = resizedImage.createGraphics(); +/* 92 */ graphics2D.drawImage(srcImage, 0, 0, targetWidth, targetHeight, null); +/* 93 */ graphics2D.dispose(); +/* 94 */ return resizedImage; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static int getTargetHeight(int targetWidth, Image srcImage) { +/* 105 */ int targetHeight = srcImage.getHeight(null); +/* 106 */ if (targetWidth < srcImage.getWidth(null)) { +/* 107 */ targetHeight = Math.round(targetHeight / srcImage.getWidth(null) / targetWidth); +/* */ } +/* 109 */ return targetHeight; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\plugins\service\impl\PluginsServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/config/controller/ConfigController.java b/src/main/java/com/archive/project/system/config/controller/ConfigController.java new file mode 100644 index 0000000..92e2863 --- /dev/null +++ b/src/main/java/com/archive/project/system/config/controller/ConfigController.java @@ -0,0 +1,162 @@ +/* */ package com.archive.project.system.config.controller + +-INF.classes.com.archive.project.system.config.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.system.config.domain.Config; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/system/config"}) +/* */ public class ConfigController +/* */ extends BaseController +/* */ { +/* 33 */ private String prefix = "system/config"; +/* */ +/* */ @Autowired +/* */ private IConfigService configService; +/* */ +/* */ +/* */ @RequiresPermissions({"system:config:view"}) +/* */ @GetMapping +/* */ public String config() { +/* 42 */ return this.prefix + "/config"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:config:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(Config config) { +/* 53 */ startPage(); +/* 54 */ List list = this.configService.selectConfigList(config); +/* 55 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @Log(title = "参数管理", businessType = BusinessType.EXPORT) +/* */ @RequiresPermissions({"system:config:export"}) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(Config config) { +/* 64 */ List list = this.configService.selectConfigList(config); +/* 65 */ ExcelUtil util = new ExcelUtil(Config.class); +/* 66 */ return util.exportExcel(list, "参数数据"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 75 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:config:add"}) +/* */ @Log(title = "参数管理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(@Validated Config config) { +/* 87 */ if ("1".equals(this.configService.checkConfigKeyUnique(config))) +/* */ { +/* 89 */ return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在"); +/* */ } +/* 91 */ return toAjax(this.configService.insertConfig(config)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{configId}"}) +/* */ public String edit(@PathVariable("configId") Long configId, ModelMap mmap) { +/* 100 */ mmap.put("config", this.configService.selectConfigById(configId)); +/* 101 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:config:edit"}) +/* */ @Log(title = "参数管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(@Validated Config config) { +/* 113 */ if ("1".equals(this.configService.checkConfigKeyUnique(config))) +/* */ { +/* 115 */ return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在"); +/* */ } +/* 117 */ return toAjax(this.configService.updateConfig(config)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:config:remove"}) +/* */ @Log(title = "参数管理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 129 */ return toAjax(this.configService.deleteConfigByIds(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:config:remove"}) +/* */ @Log(title = "参数管理", businessType = BusinessType.CLEAN) +/* */ @GetMapping({"/clearCache"}) +/* */ @ResponseBody +/* */ public AjaxResult clearCache() { +/* 141 */ this.configService.clearCache(); +/* 142 */ return success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkConfigKeyUnique"}) +/* */ @ResponseBody +/* */ public String checkConfigKeyUnique(Config config) { +/* 152 */ return this.configService.checkConfigKeyUnique(config); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\config\controller\ConfigController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/config/domain/Config.java b/src/main/java/com/archive/project/system/config/domain/Config.java new file mode 100644 index 0000000..29c8dbd --- /dev/null +++ b/src/main/java/com/archive/project/system/config/domain/Config.java @@ -0,0 +1,118 @@ +/* */ package com.archive.project.system.config.domain + +-INF.classes.com.archive.project.system.config.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import javax.validation.constraints.NotBlank; +/* */ import javax.validation.constraints.Size; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Config +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ @Excel(name = "参数主键", cellType = Excel.ColumnType.NUMERIC) +/* */ private Long configId; +/* */ @Excel(name = "参数名称") +/* */ private String configName; +/* */ @Excel(name = "参数键名") +/* */ private String configKey; +/* */ @Excel(name = "参数键值") +/* */ private String configValue; +/* */ @Excel(name = "系统内置", readConverterExp = "Y=是,N=否") +/* */ private String configType; +/* */ +/* */ public Long getConfigId() { +/* 41 */ return this.configId; +/* */ } +/* */ +/* */ +/* */ public void setConfigId(Long configId) { +/* 46 */ this.configId = configId; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "参数名称不能为空") +/* */ @Size(min = 0, max = 100, message = "参数名称不能超过100个字符") +/* */ public String getConfigName() { +/* 53 */ return this.configName; +/* */ } +/* */ +/* */ +/* */ public void setConfigName(String configName) { +/* 58 */ this.configName = configName; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "参数键名长度不能为空") +/* */ @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符") +/* */ public String getConfigKey() { +/* 65 */ return this.configKey; +/* */ } +/* */ +/* */ +/* */ public void setConfigKey(String configKey) { +/* 70 */ this.configKey = configKey; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "参数键值不能为空") +/* */ @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符") +/* */ public String getConfigValue() { +/* 77 */ return this.configValue; +/* */ } +/* */ +/* */ +/* */ public void setConfigValue(String configValue) { +/* 82 */ this.configValue = configValue; +/* */ } +/* */ +/* */ +/* */ public String getConfigType() { +/* 87 */ return this.configType; +/* */ } +/* */ +/* */ +/* */ public void setConfigType(String configType) { +/* 92 */ this.configType = configType; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 97 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 98 */ .append("configId", getConfigId()) +/* 99 */ .append("configName", getConfigName()) +/* 100 */ .append("configKey", getConfigKey()) +/* 101 */ .append("configValue", getConfigValue()) +/* 102 */ .append("configType", getConfigType()) +/* 103 */ .append("createBy", getCreateBy()) +/* 104 */ .append("createTime", getCreateTime()) +/* 105 */ .append("updateBy", getUpdateBy()) +/* 106 */ .append("updateTime", getUpdateTime()) +/* 107 */ .append("remark", getRemark()) +/* 108 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\config\domain\Config.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/config/mapper/ConfigMapper.java b/src/main/java/com/archive/project/system/config/mapper/ConfigMapper.java new file mode 100644 index 0000000..66a590c --- /dev/null +++ b/src/main/java/com/archive/project/system/config/mapper/ConfigMapper.java @@ -0,0 +1,34 @@ +package com.archive.project.system.config.mapper + +-INF.classes.com.archive.project.system.config.mapper; + +import com.archive.project.system.config.domain.Config; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface ConfigMapper { + Config selectConfig(Config paramConfig); + + List selectConfigList(Config paramConfig); + + List selectConfigListSqlite(Config paramConfig); + + Config checkConfigKeyUnique(String paramString); + + int insertConfig(Config paramConfig); + + int insertConfigSqlite(Config paramConfig); + + int updateConfig(Config paramConfig); + + int updateConfigSqlite(Config paramConfig); + + int deleteConfigByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\config\mapper\ConfigMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/config/service/ConfigServiceImpl.java b/src/main/java/com/archive/project/system/config/service/ConfigServiceImpl.java new file mode 100644 index 0000000..1909da0 --- /dev/null +++ b/src/main/java/com/archive/project/system/config/service/ConfigServiceImpl.java @@ -0,0 +1,236 @@ +/* */ package com.archive.project.system.config.service + +-INF.classes.com.archive.project.system.config.service; +/* */ +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.common.utils.CacheUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.system.config.domain.Config; +/* */ import com.archive.project.system.config.mapper.ConfigMapper; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import java.util.List; +/* */ import javax.annotation.PostConstruct; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class ConfigServiceImpl +/* */ implements IConfigService +/* */ { +/* */ @Autowired +/* */ private ConfigMapper configMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ @PostConstruct +/* */ public void init() { +/* 39 */ List configsList = this.configMapper.selectConfigList(new Config()); +/* 40 */ for (Config config : configsList) +/* */ { +/* 42 */ CacheUtils.put(getCacheName(), getCacheKey(config.getConfigKey()), config.getConfigValue()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Config selectConfigById(Long configId) { +/* 55 */ Config config = new Config(); +/* 56 */ config.setConfigId(configId); +/* 57 */ return this.configMapper.selectConfig(config); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String selectConfigByKey(String configKey) { +/* 69 */ String configValue = Convert.toStr(CacheUtils.get(getCacheName(), getCacheKey(configKey))); +/* 70 */ if (StringUtils.isNotEmpty(configValue)) +/* */ { +/* 72 */ return configValue; +/* */ } +/* 74 */ Config config = new Config(); +/* 75 */ config.setConfigKey(configKey); +/* 76 */ Config retConfig = this.configMapper.selectConfig(config); +/* 77 */ if (StringUtils.isNotNull(retConfig)) { +/* */ +/* 79 */ CacheUtils.put(getCacheName(), getCacheKey(configKey), retConfig.getConfigValue()); +/* 80 */ return retConfig.getConfigValue(); +/* */ } +/* 82 */ return ""; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectConfigList(Config config) { +/* 94 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 95 */ return this.configMapper.selectConfigList(config); +/* */ } +/* 97 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 98 */ return this.configMapper.selectConfigListSqlite(config); +/* */ } +/* 100 */ return this.configMapper.selectConfigList(config); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertConfig(Config config) { +/* 114 */ config.setCreateBy(ShiroUtils.getLoginName()); +/* */ +/* 116 */ int row = 0; +/* 117 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 118 */ row = this.configMapper.insertConfig(config); +/* 119 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 120 */ row = this.configMapper.insertConfigSqlite(config); +/* */ } +/* */ +/* 123 */ if (row > 0) +/* */ { +/* 125 */ CacheUtils.put(getCacheName(), getCacheKey(config.getConfigKey()), config.getConfigValue()); +/* */ } +/* 127 */ return row; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateConfig(Config config) { +/* 139 */ config.setUpdateBy(ShiroUtils.getLoginName()); +/* 140 */ int row = 0; +/* 141 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 142 */ row = this.configMapper.updateConfig(config); +/* 143 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 144 */ row = this.configMapper.updateConfigSqlite(config); +/* */ } +/* */ +/* 147 */ if (row > 0) +/* */ { +/* 149 */ CacheUtils.put(getCacheName(), getCacheKey(config.getConfigKey()), config.getConfigValue()); +/* */ } +/* 151 */ return row; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteConfigByIds(String ids) { +/* 163 */ Long[] configIds = Convert.toLongArray(ids); +/* 164 */ for (Long configId : configIds) { +/* */ +/* 166 */ Config config = selectConfigById(configId); +/* 167 */ if (StringUtils.equals("Y", config.getConfigType())) +/* */ { +/* 169 */ throw new BusinessException(String.format("内置参数【%1$s】不能删除 ", new Object[] { config.getConfigKey() })); +/* */ } +/* */ } +/* 172 */ int count = this.configMapper.deleteConfigByIds(Convert.toStrArray(ids)); +/* 173 */ if (count > 0) +/* */ { +/* */ +/* 176 */ CacheUtils.removeAll(getCacheName()); +/* */ } +/* 178 */ return count; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void clearCache() { +/* 187 */ CacheUtils.removeAll(getCacheName()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkConfigKeyUnique(Config config) { +/* 199 */ Long configId = Long.valueOf(StringUtils.isNull(config.getConfigId()) ? -1L : config.getConfigId().longValue()); +/* 200 */ Config info = this.configMapper.checkConfigKeyUnique(config.getConfigKey()); +/* 201 */ if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != configId.longValue()) +/* */ { +/* 203 */ return "1"; +/* */ } +/* 205 */ return "0"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private String getCacheName() { +/* 215 */ return "sys-config"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private String getCacheKey(String configKey) { +/* 226 */ return "sys_config:" + configKey; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\config\service\ConfigServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/config/service/IConfigService.java b/src/main/java/com/archive/project/system/config/service/IConfigService.java new file mode 100644 index 0000000..6c47ee5 --- /dev/null +++ b/src/main/java/com/archive/project/system/config/service/IConfigService.java @@ -0,0 +1,30 @@ +package com.archive.project.system.config.service + +; + +import com.archive.project.system.config.domain.Config; +import java.util.List; + +public interface IConfigService { + Config selectConfigById(Long paramLong); + + String selectConfigByKey(String paramString); + + List selectConfigList(Config paramConfig); + + int insertConfig(Config paramConfig); + + int updateConfig(Config paramConfig); + + int deleteConfigByIds(String paramString); + + void clearCache(); + + String checkConfigKeyUnique(Config paramConfig); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\config\service\IConfigService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dept/controller/DeptController.java b/src/main/java/com/archive/project/system/dept/controller/DeptController.java new file mode 100644 index 0000000..2f6719f --- /dev/null +++ b/src/main/java/com/archive/project/system/dept/controller/DeptController.java @@ -0,0 +1,206 @@ +/* */ package com.archive.project.system.dept.controller; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.domain.Ztree; +/* */ import com.archive.project.system.dept.domain.Dept; +/* */ import com.archive.project.system.dept.service.IDeptService; +/* */ import com.archive.project.system.role.domain.Role; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/system/dept"}) +/* */ public class DeptController +/* */ extends BaseController +/* */ { +/* 34 */ private String prefix = "system/dept"; +/* */ +/* */ @Autowired +/* */ private IDeptService deptService; +/* */ +/* */ +/* */ @RequiresPermissions({"system:dept:view"}) +/* */ @GetMapping +/* */ public String dept() { +/* 43 */ return this.prefix + "/dept"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"system:dept:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public List list(Dept dept) { +/* 51 */ List deptList = this.deptService.selectDeptList(dept); +/* 52 */ return deptList; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add/{parentId}"}) +/* */ public String add(@PathVariable("parentId") Long parentId, ModelMap mmap) { +/* 61 */ mmap.put("dept", this.deptService.selectDeptById(parentId)); +/* 62 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "部门管理", businessType = BusinessType.INSERT) +/* */ @RequiresPermissions({"system:dept:add"}) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(@Validated Dept dept) { +/* 74 */ if ("1".equals(this.deptService.checkDeptNameUnique(dept))) +/* */ { +/* 76 */ return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在"); +/* */ } +/* 78 */ return toAjax(this.deptService.insertDept(dept)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{deptId}"}) +/* */ public String edit(@PathVariable("deptId") Long deptId, ModelMap mmap) { +/* 87 */ Dept dept = this.deptService.selectDeptById(deptId); +/* 88 */ if (StringUtils.isNotNull(dept) && 100L == deptId.longValue()) +/* */ { +/* 90 */ dept.setParentName("无"); +/* */ } +/* 92 */ mmap.put("dept", dept); +/* 93 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "部门管理", businessType = BusinessType.UPDATE) +/* */ @RequiresPermissions({"system:dept:edit"}) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(@Validated Dept dept) { +/* 105 */ if ("1".equals(this.deptService.checkDeptNameUnique(dept))) +/* */ { +/* 107 */ return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在"); +/* */ } +/* 109 */ if (dept.getParentId().equals(dept.getDeptId())) +/* */ { +/* 111 */ return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己"); +/* */ } +/* 113 */ if (StringUtils.equals("1", dept.getStatus()) && this.deptService +/* 114 */ .selectNormalChildrenDeptById(dept.getDeptId()) > 0) +/* */ { +/* 116 */ return AjaxResult.error("该部门包含未停用的子部门!"); +/* */ } +/* 118 */ return toAjax(this.deptService.updateDept(dept)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "部门管理", businessType = BusinessType.DELETE) +/* */ @RequiresPermissions({"system:dept:remove"}) +/* */ @GetMapping({"/remove/{deptId}"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(@PathVariable("deptId") Long deptId) { +/* 130 */ if (this.deptService.selectDeptCount(deptId) > 0) +/* */ { +/* 132 */ return AjaxResult.warn("存在下级部门,不允许删除"); +/* */ } +/* 134 */ if (this.deptService.checkDeptExistUser(deptId)) +/* */ { +/* 136 */ return AjaxResult.warn("部门存在用户,不允许删除"); +/* */ } +/* 138 */ return toAjax(this.deptService.deleteDeptById(deptId)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkDeptNameUnique"}) +/* */ @ResponseBody +/* */ public String checkDeptNameUnique(Dept dept) { +/* 148 */ return this.deptService.checkDeptNameUnique(dept); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/selectDeptTree/{deptId}", "/selectDeptTree/{deptId}/{excludeId}"}) +/* */ public String selectDeptTree(@PathVariable("deptId") Long deptId, @PathVariable(value = "excludeId", required = false) String excludeId, ModelMap mmap) { +/* 161 */ mmap.put("dept", this.deptService.selectDeptById(deptId)); +/* 162 */ mmap.put("excludeId", excludeId); +/* 163 */ return this.prefix + "/tree"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/treeData"}) +/* */ @ResponseBody +/* */ public List treeData() { +/* 173 */ List ztrees = this.deptService.selectDeptTree(new Dept()); +/* 174 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/treeData/{excludeId}"}) +/* */ @ResponseBody +/* */ public List treeDataExcludeChild(@PathVariable(value = "excludeId", required = false) Long excludeId) { +/* 184 */ Dept dept = new Dept(); +/* 185 */ dept.setDeptId(excludeId); +/* 186 */ List ztrees = this.deptService.selectDeptTreeExcludeChild(dept); +/* 187 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/roleDeptTreeData"}) +/* */ @ResponseBody +/* */ public List deptTreeData(Role role) { +/* 197 */ List ztrees = this.deptService.roleDeptTreeData(role); +/* 198 */ return ztrees; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dept\controller\DeptController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dept/domain/Dept.java b/src/main/java/com/archive/project/system/dept/domain/Dept.java new file mode 100644 index 0000000..11797b3 --- /dev/null +++ b/src/main/java/com/archive/project/system/dept/domain/Dept.java @@ -0,0 +1,193 @@ +/* */ package com.archive.project.system.dept.domain + +; +/* */ +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import javax.validation.constraints.Email; +/* */ import javax.validation.constraints.NotBlank; +/* */ import javax.validation.constraints.Size; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Dept +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long deptId; +/* */ private Long parentId; +/* */ private String ancestors; +/* */ private String deptName; +/* */ private String orderNum; +/* */ private String leader; +/* */ private String phone; +/* */ private String email; +/* */ private String status; +/* */ private String delFlag; +/* */ private String parentName; +/* */ +/* */ public Long getDeptId() { +/* 52 */ return this.deptId; +/* */ } +/* */ +/* */ +/* */ public void setDeptId(Long deptId) { +/* 57 */ this.deptId = deptId; +/* */ } +/* */ +/* */ +/* */ public Long getParentId() { +/* 62 */ return this.parentId; +/* */ } +/* */ +/* */ +/* */ public void setParentId(Long parentId) { +/* 67 */ this.parentId = parentId; +/* */ } +/* */ +/* */ +/* */ public String getAncestors() { +/* 72 */ return this.ancestors; +/* */ } +/* */ +/* */ +/* */ public void setAncestors(String ancestors) { +/* 77 */ this.ancestors = ancestors; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "部门名称不能为空") +/* */ @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符") +/* */ public String getDeptName() { +/* 84 */ return this.deptName; +/* */ } +/* */ +/* */ +/* */ public void setDeptName(String deptName) { +/* 89 */ this.deptName = deptName; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "显示顺序不能为空") +/* */ public String getOrderNum() { +/* 95 */ return this.orderNum; +/* */ } +/* */ +/* */ +/* */ public void setOrderNum(String orderNum) { +/* 100 */ this.orderNum = orderNum; +/* */ } +/* */ +/* */ +/* */ public String getLeader() { +/* 105 */ return this.leader; +/* */ } +/* */ +/* */ +/* */ public void setLeader(String leader) { +/* 110 */ this.leader = leader; +/* */ } +/* */ +/* */ +/* */ @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符") +/* */ public String getPhone() { +/* 116 */ return this.phone; +/* */ } +/* */ +/* */ +/* */ public void setPhone(String phone) { +/* 121 */ this.phone = phone; +/* */ } +/* */ +/* */ +/* */ @Email(message = "邮箱格式不正确") +/* */ @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") +/* */ public String getEmail() { +/* 128 */ return this.email; +/* */ } +/* */ +/* */ +/* */ public void setEmail(String email) { +/* 133 */ this.email = email; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 138 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 143 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String getDelFlag() { +/* 148 */ return this.delFlag; +/* */ } +/* */ +/* */ +/* */ public void setDelFlag(String delFlag) { +/* 153 */ this.delFlag = delFlag; +/* */ } +/* */ +/* */ +/* */ public String getParentName() { +/* 158 */ return this.parentName; +/* */ } +/* */ +/* */ +/* */ public void setParentName(String parentName) { +/* 163 */ this.parentName = parentName; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 168 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 169 */ .append("deptId", getDeptId()) +/* 170 */ .append("parentId", getParentId()) +/* 171 */ .append("ancestors", getAncestors()) +/* 172 */ .append("deptName", getDeptName()) +/* 173 */ .append("orderNum", getOrderNum()) +/* 174 */ .append("leader", getLeader()) +/* 175 */ .append("phone", getPhone()) +/* 176 */ .append("email", getEmail()) +/* 177 */ .append("status", getStatus()) +/* 178 */ .append("delFlag", getDelFlag()) +/* 179 */ .append("createBy", getCreateBy()) +/* 180 */ .append("createTime", getCreateTime()) +/* 181 */ .append("updateBy", getUpdateBy()) +/* 182 */ .append("updateTime", getUpdateTime()) +/* 183 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dept\domain\Dept.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dept/mapper/DeptMapper.java b/src/main/java/com/archive/project/system/dept/mapper/DeptMapper.java new file mode 100644 index 0000000..99465f8 --- /dev/null +++ b/src/main/java/com/archive/project/system/dept/mapper/DeptMapper.java @@ -0,0 +1,57 @@ +package com.archive.project.system.dept.mapper + +-INF.classes.com.archive.project.system.dept.mapper; + +import com.archive.project.system.dept.domain.Dept; +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +@Repository +public interface DeptMapper { + int selectDeptCount(Dept paramDept); + + int checkDeptExistUser(Long paramLong); + + List selectDeptList(Dept paramDept); + + List selectDeptListSqlite(Dept paramDept); + + int deleteDeptById(Long paramLong); + + int insertDept(Dept paramDept); + + int insertDeptSqlite(Dept paramDept); + + int updateDept(Dept paramDept); + + int updateDeptSqlite(Dept paramDept); + + int updateDeptChildren(@Param("depts") List paramList); + + Dept selectDeptById(Long paramLong); + + Dept checkDeptNameUnique(@Param("deptName") String paramString, @Param("parentId") Long paramLong); + + List selectRoleDeptTree(Long paramLong); + + List selectRoleDeptTreeSqlite(Long paramLong); + + void updateDeptStatus(Dept paramDept); + + void updateDeptStatusSqlite(Dept paramDept); + + List selectChildrenDeptById(Long paramLong); + + List selectChildrenDeptByIdSqlite(Long paramLong); + + int selectNormalChildrenDeptById(Long paramLong); + + int selectNormalChildrenDeptByIdSqlite(Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dept\mapper\DeptMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dept/service/DeptServiceImpl.java b/src/main/java/com/archive/project/system/dept/service/DeptServiceImpl.java new file mode 100644 index 0000000..3eddb9b --- /dev/null +++ b/src/main/java/com/archive/project/system/dept/service/DeptServiceImpl.java @@ -0,0 +1,411 @@ +/* */ package com.archive.project.system.dept.service + +-INF.classes.com.archive.project.system.dept.service; +/* */ +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.DataScope; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.web.domain.Ztree; +/* */ import com.archive.project.system.dept.domain.Dept; +/* */ import com.archive.project.system.dept.mapper.DeptMapper; +/* */ import com.archive.project.system.dept.service.IDeptService; +/* */ import com.archive.project.system.role.domain.Role; +/* */ import java.util.ArrayList; +/* */ import java.util.Iterator; +/* */ import java.util.List; +/* */ import org.apache.commons.lang3.ArrayUtils; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class DeptServiceImpl +/* */ implements IDeptService +/* */ { +/* */ @Autowired +/* */ private DeptMapper deptMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ @DataScope(deptAlias = "d") +/* */ public List selectDeptList(Dept dept) { +/* 47 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 48 */ return this.deptMapper.selectDeptList(dept); +/* */ } +/* 50 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 51 */ return this.deptMapper.selectDeptListSqlite(dept); +/* */ } +/* 53 */ return this.deptMapper.selectDeptList(dept); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @DataScope(deptAlias = "d") +/* */ public List selectDeptTree(Dept dept) { +/* 68 */ List deptList = null; +/* 69 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 70 */ deptList = this.deptMapper.selectDeptList(dept); +/* */ } +/* 72 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 73 */ deptList = this.deptMapper.selectDeptListSqlite(dept); +/* */ } +/* 75 */ List ztrees = initZtree(deptList); +/* 76 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @DataScope(deptAlias = "d") +/* */ public List selectDeptTreeExcludeChild(Dept dept) { +/* 89 */ Long deptId = dept.getDeptId(); +/* 90 */ List deptList = null; +/* 91 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 92 */ deptList = this.deptMapper.selectDeptList(dept); +/* */ } +/* 94 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 95 */ deptList = this.deptMapper.selectDeptListSqlite(dept); +/* */ } +/* 97 */ Iterator it = deptList.iterator(); +/* 98 */ while (it.hasNext()) { +/* */ +/* 100 */ Dept d = it.next(); +/* 101 */ if (d.getDeptId().intValue() == deptId.longValue() || +/* 102 */ ArrayUtils.contains((Object[])StringUtils.split(d.getAncestors(), ","), deptId + "")) +/* */ { +/* 104 */ it.remove(); +/* */ } +/* */ } +/* 107 */ List ztrees = initZtree(deptList); +/* 108 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List roleDeptTreeData(Role role) { +/* 120 */ Long roleId = role.getRoleId(); +/* 121 */ List ztrees = new ArrayList<>(); +/* 122 */ List deptList = selectDeptList(new Dept()); +/* 123 */ if (StringUtils.isNotNull(roleId)) { +/* */ +/* 125 */ List roleDeptList = null; +/* 126 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 127 */ roleDeptList = this.deptMapper.selectRoleDeptTreeSqlite(roleId); +/* */ } else { +/* 129 */ roleDeptList = this.deptMapper.selectRoleDeptTree(roleId); +/* */ } +/* */ +/* 132 */ ztrees = initZtree(deptList, roleDeptList); +/* */ } +/* */ else { +/* */ +/* 136 */ ztrees = initZtree(deptList); +/* */ } +/* 138 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List initZtree(List deptList) { +/* 149 */ return initZtree(deptList, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List initZtree(List deptList, List roleDeptList) { +/* 161 */ List ztrees = new ArrayList<>(); +/* 162 */ boolean isCheck = StringUtils.isNotNull(roleDeptList); +/* 163 */ for (Dept dept : deptList) { +/* */ +/* 165 */ if ("0".equals(dept.getStatus())) { +/* */ +/* 167 */ Ztree ztree = new Ztree(); +/* 168 */ ztree.setId(dept.getDeptId()); +/* 169 */ ztree.setpId(dept.getParentId()); +/* 170 */ ztree.setName(dept.getDeptName()); +/* 171 */ ztree.setTitle(dept.getDeptName()); +/* 172 */ if (isCheck) +/* */ { +/* 174 */ ztree.setChecked(roleDeptList.contains(dept.getDeptId() + dept.getDeptName())); +/* */ } +/* 176 */ ztrees.add(ztree); +/* */ } +/* */ } +/* 179 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int selectDeptCount(Long parentId) { +/* 191 */ Dept dept = new Dept(); +/* 192 */ dept.setParentId(parentId); +/* 193 */ return this.deptMapper.selectDeptCount(dept); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean checkDeptExistUser(Long deptId) { +/* 205 */ int result = this.deptMapper.checkDeptExistUser(deptId); +/* 206 */ return (result > 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteDeptById(Long deptId) { +/* 218 */ return this.deptMapper.deleteDeptById(deptId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertDept(Dept dept) { +/* 230 */ Dept info = this.deptMapper.selectDeptById(dept.getParentId()); +/* */ +/* 232 */ if (!"0".equals(info.getStatus())) +/* */ { +/* 234 */ throw new BusinessException("部门停用,不允许新增"); +/* */ } +/* 236 */ dept.setCreateBy(ShiroUtils.getLoginName()); +/* 237 */ dept.setAncestors(info.getAncestors() + "," + dept.getParentId()); +/* 238 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 239 */ return this.deptMapper.insertDeptSqlite(dept); +/* */ } +/* 241 */ return this.deptMapper.insertDept(dept); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int updateDept(Dept dept) { +/* 255 */ Dept newParentDept = this.deptMapper.selectDeptById(dept.getParentId()); +/* 256 */ Dept oldDept = selectDeptById(dept.getDeptId()); +/* 257 */ if (StringUtils.isNotNull(newParentDept) && StringUtils.isNotNull(oldDept)) { +/* */ +/* 259 */ String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId(); +/* 260 */ String oldAncestors = oldDept.getAncestors(); +/* 261 */ dept.setAncestors(newAncestors); +/* 262 */ updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); +/* */ } +/* 264 */ dept.setUpdateBy(ShiroUtils.getLoginName()); +/* 265 */ int result = 0; +/* 266 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 267 */ result = this.deptMapper.updateDept(dept); +/* */ } +/* 269 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 270 */ result = this.deptMapper.updateDeptSqlite(dept); +/* */ } +/* */ +/* 273 */ if ("0".equals(dept.getStatus())) +/* */ { +/* */ +/* 276 */ updateParentDeptStatus(dept); +/* */ } +/* 278 */ return result; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void updateParentDeptStatus(Dept dept) { +/* 288 */ String updateBy = dept.getUpdateBy(); +/* 289 */ dept = this.deptMapper.selectDeptById(dept.getDeptId()); +/* 290 */ dept.setUpdateBy(updateBy); +/* 291 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 292 */ this.deptMapper.updateDeptStatus(dept); +/* */ } +/* 294 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 295 */ this.deptMapper.updateDeptStatusSqlite(dept); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) { +/* 309 */ List children = null; +/* 310 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 311 */ children = this.deptMapper.selectChildrenDeptById(deptId); +/* */ } +/* 313 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 314 */ children = this.deptMapper.selectChildrenDeptByIdSqlite(deptId); +/* */ } +/* */ +/* 317 */ for (Dept child : children) +/* */ { +/* 319 */ child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors)); +/* */ } +/* 321 */ if (children.size() > 0) +/* */ { +/* 323 */ this.deptMapper.updateDeptChildren(children); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void updateDeptChildren(Long deptId, String ancestors) { +/* 335 */ Dept dept = new Dept(); +/* 336 */ dept.setParentId(deptId); +/* 337 */ List childrens = null; +/* 338 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 339 */ childrens = this.deptMapper.selectDeptList(dept); +/* */ } +/* 341 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 342 */ childrens = this.deptMapper.selectDeptListSqlite(dept); +/* */ } +/* 344 */ for (Dept children : childrens) +/* */ { +/* 346 */ children.setAncestors(ancestors + "," + dept.getParentId()); +/* */ } +/* 348 */ if (childrens.size() > 0) +/* */ { +/* 350 */ this.deptMapper.updateDeptChildren(childrens); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Dept selectDeptById(Long deptId) { +/* 363 */ return this.deptMapper.selectDeptById(deptId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int selectNormalChildrenDeptById(Long deptId) { +/* 375 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 376 */ return this.deptMapper.selectNormalChildrenDeptById(deptId); +/* */ } +/* 378 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 379 */ return this.deptMapper.selectNormalChildrenDeptByIdSqlite(deptId); +/* */ } +/* 381 */ return this.deptMapper.selectNormalChildrenDeptById(deptId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkDeptNameUnique(Dept dept) { +/* 395 */ Long deptId = Long.valueOf(StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId().longValue()); +/* 396 */ Dept info = this.deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId()); +/* 397 */ if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue()) +/* */ { +/* 399 */ return "1"; +/* */ } +/* 401 */ return "0"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dept\service\DeptServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dept/service/IDeptService.java b/src/main/java/com/archive/project/system/dept/service/IDeptService.java new file mode 100644 index 0000000..9c1ceb1 --- /dev/null +++ b/src/main/java/com/archive/project/system/dept/service/IDeptService.java @@ -0,0 +1,40 @@ +package com.archive.project.system.dept.service + +; + +import com.archive.framework.web.domain.Ztree; +import com.archive.project.system.dept.domain.Dept; +import com.archive.project.system.role.domain.Role; +import java.util.List; + +public interface IDeptService { + List selectDeptList(Dept paramDept); + + List selectDeptTree(Dept paramDept); + + List selectDeptTreeExcludeChild(Dept paramDept); + + List roleDeptTreeData(Role paramRole); + + int selectDeptCount(Long paramLong); + + boolean checkDeptExistUser(Long paramLong); + + int deleteDeptById(Long paramLong); + + int insertDept(Dept paramDept); + + int updateDept(Dept paramDept); + + Dept selectDeptById(Long paramLong); + + int selectNormalChildrenDeptById(Long paramLong); + + String checkDeptNameUnique(Dept paramDept); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dept\service\IDeptService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/controller/DictDataController.java b/src/main/java/com/archive/project/system/dict/controller/DictDataController.java new file mode 100644 index 0000000..0ecded3 --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/controller/DictDataController.java @@ -0,0 +1,125 @@ +/* */ package com.archive.project.system.dict.controller + +-INF.classes.com.archive.project.system.dict.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import com.archive.project.system.dict.service.IDictDataService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/system/dict/data"}) +/* */ public class DictDataController +/* */ extends BaseController +/* */ { +/* 32 */ private String prefix = "system/dict/data"; +/* */ +/* */ @Autowired +/* */ private IDictDataService dictDataService; +/* */ +/* */ +/* */ @RequiresPermissions({"system:dict:view"}) +/* */ @GetMapping +/* */ public String dictData() { +/* 41 */ return this.prefix + "/data"; +/* */ } +/* */ +/* */ +/* */ @PostMapping({"/list"}) +/* */ @RequiresPermissions({"system:dict:list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(DictData dictData) { +/* 49 */ startPage(); +/* 50 */ List list = this.dictDataService.selectDictDataList(dictData); +/* 51 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @Log(title = "字典数据", businessType = BusinessType.EXPORT) +/* */ @RequiresPermissions({"system:dict:export"}) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(DictData dictData) { +/* 60 */ List list = this.dictDataService.selectDictDataList(dictData); +/* 61 */ ExcelUtil util = new ExcelUtil(DictData.class); +/* 62 */ return util.exportExcel(list, "字典数据"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add/{dictType}"}) +/* */ public String add(@PathVariable("dictType") String dictType, ModelMap mmap) { +/* 71 */ mmap.put("dictType", dictType); +/* 72 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "字典数据", businessType = BusinessType.INSERT) +/* */ @RequiresPermissions({"system:dict:add"}) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(@Validated DictData dict) { +/* 84 */ return toAjax(this.dictDataService.insertDictData(dict)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{dictCode}"}) +/* */ public String edit(@PathVariable("dictCode") Long dictCode, ModelMap mmap) { +/* 93 */ mmap.put("dict", this.dictDataService.selectDictDataById(dictCode)); +/* 94 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "字典数据", businessType = BusinessType.UPDATE) +/* */ @RequiresPermissions({"system:dict:edit"}) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(@Validated DictData dict) { +/* 106 */ return toAjax(this.dictDataService.updateDictData(dict)); +/* */ } +/* */ +/* */ +/* */ @Log(title = "字典数据", businessType = BusinessType.DELETE) +/* */ @RequiresPermissions({"system:dict:remove"}) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 115 */ return toAjax(this.dictDataService.deleteDictDataByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\controller\DictDataController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/controller/DictTypeController.java b/src/main/java/com/archive/project/system/dict/controller/DictTypeController.java new file mode 100644 index 0000000..7b9d32f --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/controller/DictTypeController.java @@ -0,0 +1,193 @@ +/* */ package com.archive.project.system.dict.controller + +-INF.classes.com.archive.project.system.dict.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.domain.Ztree; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/system/dict"}) +/* */ public class DictTypeController +/* */ extends BaseController +/* */ { +/* 34 */ private String prefix = "system/dict/type"; +/* */ +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ +/* */ +/* */ @RequiresPermissions({"system:dict:view"}) +/* */ @GetMapping +/* */ public String dictType() { +/* 43 */ return this.prefix + "/type"; +/* */ } +/* */ +/* */ +/* */ @PostMapping({"/list"}) +/* */ @RequiresPermissions({"system:dict:list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(DictType dictType) { +/* 51 */ startPage(); +/* 52 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 53 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ @Log(title = "字典类型", businessType = BusinessType.EXPORT) +/* */ @RequiresPermissions({"system:dict:export"}) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(DictType dictType) { +/* 63 */ List list = this.dictTypeService.selectDictTypeList(dictType); +/* 64 */ ExcelUtil util = new ExcelUtil(DictType.class); +/* 65 */ return util.exportExcel(list, "字典类型"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 74 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "字典类型", businessType = BusinessType.INSERT) +/* */ @RequiresPermissions({"system:dict:add"}) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(@Validated DictType dict) { +/* 86 */ if ("1".equals(this.dictTypeService.checkDictTypeUnique(dict))) +/* */ { +/* 88 */ return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在"); +/* */ } +/* 90 */ return toAjax(this.dictTypeService.insertDictType(dict)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{dictId}"}) +/* */ public String edit(@PathVariable("dictId") Long dictId, ModelMap mmap) { +/* 99 */ mmap.put("dict", this.dictTypeService.selectDictTypeById(dictId)); +/* 100 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "字典类型", businessType = BusinessType.UPDATE) +/* */ @RequiresPermissions({"system:dict:edit"}) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(@Validated DictType dict) { +/* 112 */ if ("1".equals(this.dictTypeService.checkDictTypeUnique(dict))) +/* */ { +/* 114 */ return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在"); +/* */ } +/* 116 */ return toAjax(this.dictTypeService.updateDictType(dict)); +/* */ } +/* */ +/* */ +/* */ @Log(title = "字典类型", businessType = BusinessType.DELETE) +/* */ @RequiresPermissions({"system:dict:remove"}) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 125 */ return toAjax(this.dictTypeService.deleteDictTypeByIds(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:dict:remove"}) +/* */ @Log(title = "字典类型", businessType = BusinessType.CLEAN) +/* */ @GetMapping({"/clearCache"}) +/* */ @ResponseBody +/* */ public AjaxResult clearCache() { +/* 137 */ this.dictTypeService.clearCache(); +/* 138 */ return success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:dict:list"}) +/* */ @GetMapping({"/detail/{dictId}"}) +/* */ public String detail(@PathVariable("dictId") Long dictId, ModelMap mmap) { +/* 148 */ mmap.put("dict", this.dictTypeService.selectDictTypeById(dictId)); +/* 149 */ mmap.put("dictList", this.dictTypeService.selectDictTypeAll()); +/* 150 */ return "system/dict/data/data"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkDictTypeUnique"}) +/* */ @ResponseBody +/* */ public String checkDictTypeUnique(DictType dictType) { +/* 160 */ return this.dictTypeService.checkDictTypeUnique(dictType); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/selectDictTree/{columnId}/{dictType}"}) +/* */ public String selectDeptTree(@PathVariable("columnId") Long columnId, @PathVariable("dictType") String dictType, ModelMap mmap) { +/* 170 */ mmap.put("columnId", columnId); +/* 171 */ mmap.put("dict", this.dictTypeService.selectDictTypeByType(dictType)); +/* 172 */ return this.prefix + "/tree"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/treeData"}) +/* */ @ResponseBody +/* */ public List treeData() { +/* 182 */ List ztrees = this.dictTypeService.selectDictTree(new DictType()); +/* 183 */ return ztrees; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\controller\DictTypeController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/domain/DictData.java b/src/main/java/com/archive/project/system/dict/domain/DictData.java new file mode 100644 index 0000000..559b844 --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/domain/DictData.java @@ -0,0 +1,184 @@ +/* */ package com.archive.project.system.dict.domain + +-INF.classes.com.archive.project.system.dict.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import javax.validation.constraints.NotBlank; +/* */ import javax.validation.constraints.Size; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DictData +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ @Excel(name = "字典编码", cellType = Excel.ColumnType.NUMERIC) +/* */ private Long dictCode; +/* */ @Excel(name = "字典排序", cellType = Excel.ColumnType.NUMERIC) +/* */ private Long dictSort; +/* */ @Excel(name = "字典标签") +/* */ private String dictLabel; +/* */ @Excel(name = "字典键值") +/* */ private String dictValue; +/* */ @Excel(name = "字典类型") +/* */ private String dictType; +/* */ @Excel(name = "字典样式") +/* */ private String cssClass; +/* */ private String listClass; +/* */ @Excel(name = "是否默认", readConverterExp = "Y=是,N=否") +/* */ private String isDefault; +/* */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") +/* */ private String status; +/* */ +/* */ public Long getDictCode() { +/* 57 */ return this.dictCode; +/* */ } +/* */ +/* */ +/* */ public void setDictCode(Long dictCode) { +/* 62 */ this.dictCode = dictCode; +/* */ } +/* */ +/* */ +/* */ public Long getDictSort() { +/* 67 */ return this.dictSort; +/* */ } +/* */ +/* */ +/* */ public void setDictSort(Long dictSort) { +/* 72 */ this.dictSort = dictSort; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "字典标签不能为空") +/* */ @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符") +/* */ public String getDictLabel() { +/* 79 */ return this.dictLabel; +/* */ } +/* */ +/* */ +/* */ public void setDictLabel(String dictLabel) { +/* 84 */ this.dictLabel = dictLabel; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "字典键值不能为空") +/* */ @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符") +/* */ public String getDictValue() { +/* 91 */ return this.dictValue; +/* */ } +/* */ +/* */ +/* */ public void setDictValue(String dictValue) { +/* 96 */ this.dictValue = dictValue; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "字典类型不能为空") +/* */ @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符") +/* */ public String getDictType() { +/* 103 */ return this.dictType; +/* */ } +/* */ +/* */ +/* */ public void setDictType(String dictType) { +/* 108 */ this.dictType = dictType; +/* */ } +/* */ +/* */ +/* */ @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符") +/* */ public String getCssClass() { +/* 114 */ return this.cssClass; +/* */ } +/* */ +/* */ +/* */ public void setCssClass(String cssClass) { +/* 119 */ this.cssClass = cssClass; +/* */ } +/* */ +/* */ +/* */ public String getListClass() { +/* 124 */ return this.listClass; +/* */ } +/* */ +/* */ +/* */ public void setListClass(String listClass) { +/* 129 */ this.listClass = listClass; +/* */ } +/* */ +/* */ +/* */ public boolean getDefault() { +/* 134 */ return "Y".equals(this.isDefault); +/* */ } +/* */ +/* */ +/* */ public String getIsDefault() { +/* 139 */ return this.isDefault; +/* */ } +/* */ +/* */ +/* */ public void setIsDefault(String isDefault) { +/* 144 */ this.isDefault = isDefault; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 149 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 154 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 159 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 160 */ .append("dictCode", getDictCode()) +/* 161 */ .append("dictSort", getDictSort()) +/* 162 */ .append("dictLabel", getDictLabel()) +/* 163 */ .append("dictValue", getDictValue()) +/* 164 */ .append("dictType", getDictType()) +/* 165 */ .append("cssClass", getCssClass()) +/* 166 */ .append("listClass", getListClass()) +/* 167 */ .append("isDefault", getIsDefault()) +/* 168 */ .append("status", getStatus()) +/* 169 */ .append("createBy", getCreateBy()) +/* 170 */ .append("createTime", getCreateTime()) +/* 171 */ .append("updateBy", getUpdateBy()) +/* 172 */ .append("updateTime", getUpdateTime()) +/* 173 */ .append("remark", getRemark()) +/* 174 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\domain\DictData.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/domain/DictType.java b/src/main/java/com/archive/project/system/dict/domain/DictType.java new file mode 100644 index 0000000..2d89a3f --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/domain/DictType.java @@ -0,0 +1,113 @@ +/* */ package com.archive.project.system.dict.domain + +-INF.classes.com.archive.project.system.dict.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import javax.validation.constraints.NotBlank; +/* */ import javax.validation.constraints.Size; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DictType +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ @Excel(name = "字典主键", cellType = Excel.ColumnType.NUMERIC) +/* */ private Long dictId; +/* */ @Excel(name = "字典名称") +/* */ private String dictName; +/* */ @Excel(name = "字典类型") +/* */ private String dictType; +/* */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") +/* */ private String status; +/* */ @Excel(name = "标签") +/* */ private String label; +/* */ +/* */ public Long getDictId() { +/* 41 */ return this.dictId; +/* */ } +/* */ +/* */ +/* */ public void setDictId(Long dictId) { +/* 46 */ this.dictId = dictId; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "字典名称不能为空") +/* */ @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符") +/* */ public String getDictName() { +/* 53 */ return this.dictName; +/* */ } +/* */ +/* */ +/* */ public void setDictName(String dictName) { +/* 58 */ this.dictName = dictName; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "字典类型不能为空") +/* */ @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符") +/* */ public String getDictType() { +/* 65 */ return this.dictType; +/* */ } +/* */ +/* */ +/* */ public void setDictType(String dictType) { +/* 70 */ this.dictType = dictType; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 75 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 80 */ this.status = status; +/* */ } +/* */ +/* */ public String getLabel() { +/* 84 */ return this.label; +/* */ } +/* */ +/* */ public void setLabel(String label) { +/* 88 */ this.label = label; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 93 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 94 */ .append("dictId", getDictId()) +/* 95 */ .append("dictName", getDictName()) +/* 96 */ .append("dictType", getDictType()) +/* 97 */ .append("status", getStatus()) +/* 98 */ .append("createBy", getCreateBy()) +/* 99 */ .append("createTime", getCreateTime()) +/* 100 */ .append("updateBy", getUpdateBy()) +/* 101 */ .append("updateTime", getUpdateTime()) +/* 102 */ .append("remark", getRemark()) +/* 103 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\domain\DictType.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/mapper/DictDataMapper.java b/src/main/java/com/archive/project/system/dict/mapper/DictDataMapper.java new file mode 100644 index 0000000..1aadced --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/mapper/DictDataMapper.java @@ -0,0 +1,41 @@ +package com.archive.project.system.dict.mapper; + +import com.archive.project.system.dict.domain.DictData; +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +@Repository +public interface DictDataMapper { + List selectDictDataList(DictData paramDictData); + + List selectDictDataListSqlite(DictData paramDictData); + + List selectDictDataByType(String paramString); + + String selectDictLabel(@Param("dictType") String paramString1, @Param("dictValue") String paramString2); + + DictData selectDictDataById(Long paramLong); + + int countDictDataByType(String paramString); + + int deleteDictDataById(Long paramLong); + + int deleteDictDataByIds(String[] paramArrayOfString); + + int insertDictData(DictData paramDictData); + + int insertDictDataSqlite(DictData paramDictData); + + int updateDictData(DictData paramDictData); + + int updateDictDataSqlite(DictData paramDictData); + + int updateDictDataType(@Param("oldDictType") String paramString1, @Param("newDictType") String paramString2); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\mapper\DictDataMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/mapper/DictTypeMapper.java b/src/main/java/com/archive/project/system/dict/mapper/DictTypeMapper.java new file mode 100644 index 0000000..3c37fa0 --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/mapper/DictTypeMapper.java @@ -0,0 +1,40 @@ +package com.archive.project.system.dict.mapper + +-INF.classes.com.archive.project.system.dict.mapper; + +import com.archive.project.system.dict.domain.DictType; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface DictTypeMapper { + List selectDictTypeList(DictType paramDictType); + + List selectDictTypeListSqlite(DictType paramDictType); + + List selectDictTypeAll(); + + DictType selectDictTypeById(Long paramLong); + + DictType selectDictTypeByType(String paramString); + + int deleteDictTypeById(Long paramLong); + + int deleteDictTypeByIds(Long[] paramArrayOfLong); + + int insertDictType(DictType paramDictType); + + int insertDictTypeSqlite(DictType paramDictType); + + int updateDictType(DictType paramDictType); + + int updateDictTypeSqlite(DictType paramDictType); + + DictType checkDictTypeUnique(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\mapper\DictTypeMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/service/DictDataServiceImpl.java b/src/main/java/com/archive/project/system/dict/service/DictDataServiceImpl.java new file mode 100644 index 0000000..152493a --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/service/DictDataServiceImpl.java @@ -0,0 +1,149 @@ +/* */ package com.archive.project.system.dict.service + +-INF.classes.com.archive.project.system.dict.service; +/* */ +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import com.archive.project.system.dict.mapper.DictDataMapper; +/* */ import com.archive.project.system.dict.service.IDictDataService; +/* */ import com.archive.project.system.dict.utils.DictUtils; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class DictDataServiceImpl +/* */ implements IDictDataService +/* */ { +/* */ @Autowired +/* */ private DictDataMapper dictDataMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public List selectDictDataList(DictData dictData) { +/* 40 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 41 */ return this.dictDataMapper.selectDictDataList(dictData); +/* */ } +/* 43 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 44 */ return this.dictDataMapper.selectDictDataListSqlite(dictData); +/* */ } +/* 46 */ return this.dictDataMapper.selectDictDataList(dictData); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String selectDictLabel(String dictType, String dictValue) { +/* 60 */ return this.dictDataMapper.selectDictLabel(dictType, dictValue); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public DictData selectDictDataById(Long dictCode) { +/* 72 */ return this.dictDataMapper.selectDictDataById(dictCode); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteDictDataByIds(String ids) { +/* 84 */ int row = this.dictDataMapper.deleteDictDataByIds(Convert.toStrArray(ids)); +/* 85 */ if (row > 0) +/* */ { +/* 87 */ DictUtils.clearDictCache(); +/* */ } +/* 89 */ return row; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertDictData(DictData dictData) { +/* 101 */ dictData.setCreateBy(ShiroUtils.getLoginName()); +/* 102 */ int row = 0; +/* 103 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 104 */ row = this.dictDataMapper.insertDictData(dictData); +/* */ } +/* 106 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 107 */ row = this.dictDataMapper.insertDictDataSqlite(dictData); +/* */ } +/* */ +/* 110 */ if (row > 0) +/* */ { +/* 112 */ DictUtils.clearDictCache(); +/* */ } +/* 114 */ return row; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateDictData(DictData dictData) { +/* 126 */ dictData.setUpdateBy(ShiroUtils.getLoginName()); +/* 127 */ int row = 0; +/* 128 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 129 */ row = this.dictDataMapper.updateDictData(dictData); +/* */ } +/* 131 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 132 */ row = this.dictDataMapper.updateDictDataSqlite(dictData); +/* */ } +/* */ +/* 135 */ if (row > 0) +/* */ { +/* 137 */ DictUtils.clearDictCache(); +/* */ } +/* 139 */ return row; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\service\DictDataServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/service/DictTypeServiceImpl.java b/src/main/java/com/archive/project/system/dict/service/DictTypeServiceImpl.java new file mode 100644 index 0000000..ff8b5ff --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/service/DictTypeServiceImpl.java @@ -0,0 +1,280 @@ +/* */ package com.archive.project.system.dict.service + +-INF.classes.com.archive.project.system.dict.service; +/* */ +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.web.domain.Ztree; +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import com.archive.project.system.dict.domain.DictType; +/* */ import com.archive.project.system.dict.mapper.DictDataMapper; +/* */ import com.archive.project.system.dict.mapper.DictTypeMapper; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import com.archive.project.system.dict.utils.DictUtils; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import javax.annotation.PostConstruct; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class DictTypeServiceImpl +/* */ implements IDictTypeService +/* */ { +/* */ @Autowired +/* */ private DictTypeMapper dictTypeMapper; +/* */ @Autowired +/* */ private DictDataMapper dictDataMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ @PostConstruct +/* */ public void init() { +/* 48 */ List dictTypeList = this.dictTypeMapper.selectDictTypeAll(); +/* 49 */ for (DictType dictType : dictTypeList) { +/* */ +/* 51 */ List dictDatas = this.dictDataMapper.selectDictDataByType(dictType.getDictType()); +/* 52 */ DictUtils.setDictCache(dictType.getDictType(), dictDatas); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectDictTypeList(DictType dictType) { +/* 65 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 66 */ return this.dictTypeMapper.selectDictTypeList(dictType); +/* */ } +/* 68 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 69 */ return this.dictTypeMapper.selectDictTypeListSqlite(dictType); +/* */ } +/* 71 */ return this.dictTypeMapper.selectDictTypeList(dictType); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectDictTypeAll() { +/* 84 */ return this.dictTypeMapper.selectDictTypeAll(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectDictDataByType(String dictType) { +/* 96 */ List dictDatas = DictUtils.getDictCache(dictType); +/* 97 */ if (StringUtils.isNotEmpty(dictDatas)) +/* */ { +/* 99 */ return dictDatas; +/* */ } +/* 101 */ dictDatas = this.dictDataMapper.selectDictDataByType(dictType); +/* 102 */ if (StringUtils.isNotEmpty(dictDatas)) { +/* */ +/* 104 */ DictUtils.setDictCache(dictType, dictDatas); +/* 105 */ return dictDatas; +/* */ } +/* 107 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public DictType selectDictTypeById(Long dictId) { +/* 119 */ return this.dictTypeMapper.selectDictTypeById(dictId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public DictType selectDictTypeByType(String dictType) { +/* 131 */ return this.dictTypeMapper.selectDictTypeByType(dictType); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteDictTypeByIds(String ids) { +/* 143 */ Long[] dictIds = Convert.toLongArray(ids); +/* 144 */ for (Long dictId : dictIds) { +/* */ +/* 146 */ DictType dictType = selectDictTypeById(dictId); +/* 147 */ if (this.dictDataMapper.countDictDataByType(dictType.getDictType()) > 0) +/* */ { +/* 149 */ throw new BusinessException(String.format("%1$s已分配,不能删除", new Object[] { dictType.getDictName() })); +/* */ } +/* */ } +/* 152 */ int count = this.dictTypeMapper.deleteDictTypeByIds(dictIds); +/* 153 */ if (count > 0) +/* */ { +/* 155 */ DictUtils.clearDictCache(); +/* */ } +/* 157 */ return count; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void clearCache() { +/* 166 */ DictUtils.clearDictCache(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertDictType(DictType dictType) { +/* 178 */ dictType.setCreateBy(ShiroUtils.getLoginName()); +/* 179 */ int row = 0; +/* 180 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 181 */ row = this.dictTypeMapper.insertDictType(dictType); +/* */ } +/* 183 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 184 */ row = this.dictTypeMapper.insertDictTypeSqlite(dictType); +/* */ } +/* */ +/* 187 */ if (row > 0) +/* */ { +/* 189 */ DictUtils.clearDictCache(); +/* */ } +/* 191 */ return row; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int updateDictType(DictType dictType) { +/* 204 */ dictType.setUpdateBy(ShiroUtils.getLoginName()); +/* 205 */ DictType oldDict = this.dictTypeMapper.selectDictTypeById(dictType.getDictId()); +/* 206 */ this.dictDataMapper.updateDictDataType(oldDict.getDictType(), dictType.getDictType()); +/* 207 */ int row = 0; +/* 208 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 209 */ row = this.dictTypeMapper.updateDictType(dictType); +/* */ } +/* 211 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 212 */ row = this.dictTypeMapper.updateDictTypeSqlite(dictType); +/* */ } +/* */ +/* 215 */ if (row > 0) +/* */ { +/* 217 */ DictUtils.clearDictCache(); +/* */ } +/* 219 */ return row; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkDictTypeUnique(DictType dict) { +/* 231 */ Long dictId = Long.valueOf(StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId().longValue()); +/* 232 */ DictType dictType = this.dictTypeMapper.checkDictTypeUnique(dict.getDictType()); +/* 233 */ if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue()) +/* */ { +/* 235 */ return "1"; +/* */ } +/* 237 */ return "0"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectDictTree(DictType dictType) { +/* 249 */ List ztrees = new ArrayList<>(); +/* 250 */ List dictList = this.dictTypeMapper.selectDictTypeList(dictType); +/* 251 */ for (DictType dict : dictList) { +/* */ +/* 253 */ if ("0".equals(dict.getStatus())) { +/* */ +/* 255 */ Ztree ztree = new Ztree(); +/* 256 */ ztree.setId(dict.getDictId()); +/* 257 */ ztree.setName(transDictName(dict)); +/* 258 */ ztree.setTitle(dict.getDictType()); +/* 259 */ ztrees.add(ztree); +/* */ } +/* */ } +/* 262 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ public String transDictName(DictType dictType) { +/* 267 */ StringBuffer sb = new StringBuffer(); +/* 268 */ sb.append("(" + dictType.getDictName() + ")"); +/* 269 */ sb.append("   " + dictType.getDictType()); +/* 270 */ return sb.toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\service\DictTypeServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/service/IDictDataService.java b/src/main/java/com/archive/project/system/dict/service/IDictDataService.java new file mode 100644 index 0000000..f1a40b5 --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/service/IDictDataService.java @@ -0,0 +1,26 @@ +package com.archive.project.system.dict.service + +-INF.classes.com.archive.project.system.dict.service; + +import com.archive.project.system.dict.domain.DictData; +import java.util.List; + +public interface IDictDataService { + List selectDictDataList(DictData paramDictData); + + String selectDictLabel(String paramString1, String paramString2); + + DictData selectDictDataById(Long paramLong); + + int deleteDictDataByIds(String paramString); + + int insertDictData(DictData paramDictData); + + int updateDictData(DictData paramDictData); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\service\IDictDataService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/service/IDictTypeService.java b/src/main/java/com/archive/project/system/dict/service/IDictTypeService.java new file mode 100644 index 0000000..b66e51d --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/service/IDictTypeService.java @@ -0,0 +1,38 @@ +package com.archive.project.system.dict.service + +-INF.classes.com.archive.project.system.dict.service; + +import com.archive.framework.web.domain.Ztree; +import com.archive.project.system.dict.domain.DictData; +import com.archive.project.system.dict.domain.DictType; +import java.util.List; + +public interface IDictTypeService { + List selectDictTypeList(DictType paramDictType); + + List selectDictTypeAll(); + + List selectDictDataByType(String paramString); + + DictType selectDictTypeById(Long paramLong); + + DictType selectDictTypeByType(String paramString); + + int deleteDictTypeByIds(String paramString); + + void clearCache(); + + int insertDictType(DictType paramDictType); + + int updateDictType(DictType paramDictType); + + String checkDictTypeUnique(DictType paramDictType); + + List selectDictTree(DictType paramDictType); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\service\IDictTypeService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/dict/utils/DictUtils.java b/src/main/java/com/archive/project/system/dict/utils/DictUtils.java new file mode 100644 index 0000000..edab171 --- /dev/null +++ b/src/main/java/com/archive/project/system/dict/utils/DictUtils.java @@ -0,0 +1,189 @@ +/* */ package com.archive.project.system.dict.utils + +-INF.classes.com.archive.project.system.dict.utils; +/* */ +/* */ import com.archive.common.utils.CacheUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.project.system.dict.domain.DictData; +/* */ import java.util.List; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DictUtils +/* */ { +/* */ public static final String SEPARATOR = ","; +/* */ +/* */ public static void setDictCache(String key, List dictDatas) { +/* 29 */ CacheUtils.put(getCacheName(), getCacheKey(key), dictDatas); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static List getDictCache(String key) { +/* 40 */ Object cacheObj = CacheUtils.get(getCacheName(), getCacheKey(key)); +/* 41 */ if (StringUtils.isNotNull(cacheObj)) { +/* */ +/* 43 */ List DictDatas = (List)StringUtils.cast(cacheObj); +/* 44 */ return DictDatas; +/* */ } +/* 46 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getDictLabel(String dictType, String dictValue) { +/* 58 */ return getDictLabel(dictType, dictValue, ","); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getDictValue(String dictType, String dictLabel) { +/* 70 */ return getDictValue(dictType, dictLabel, ","); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getDictLabel(String dictType, String dictValue, String separator) { +/* 83 */ StringBuilder propertyString = new StringBuilder(); +/* 84 */ List datas = getDictCache(dictType); +/* */ +/* 86 */ if (StringUtils.containsAny(separator, dictValue) && StringUtils.isNotEmpty(datas)) { +/* */ +/* 88 */ for (DictData dict : datas) { +/* */ +/* 90 */ for (String value : dictValue.split(separator)) { +/* */ +/* 92 */ if (value.equals(dict.getDictValue())) { +/* */ +/* 94 */ propertyString.append(dict.getDictLabel() + separator); +/* */ +/* */ +/* */ break; +/* */ } +/* */ } +/* */ } +/* */ } else { +/* 102 */ for (DictData dict : datas) { +/* */ +/* 104 */ if (dictValue.equals(dict.getDictValue())) +/* */ { +/* 106 */ return dict.getDictLabel(); +/* */ } +/* */ } +/* */ } +/* 110 */ return StringUtils.stripEnd(propertyString.toString(), separator); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getDictValue(String dictType, String dictLabel, String separator) { +/* 123 */ StringBuilder propertyString = new StringBuilder(); +/* 124 */ List datas = getDictCache(dictType); +/* */ +/* 126 */ if (StringUtils.containsAny(separator, dictLabel) && StringUtils.isNotEmpty(datas)) { +/* */ +/* 128 */ for (DictData dict : datas) { +/* */ +/* 130 */ for (String label : dictLabel.split(separator)) { +/* */ +/* 132 */ if (label.equals(dict.getDictLabel())) { +/* */ +/* 134 */ propertyString.append(dict.getDictValue() + separator); +/* */ +/* */ +/* */ break; +/* */ } +/* */ } +/* */ } +/* */ } else { +/* 142 */ for (DictData dict : datas) { +/* */ +/* 144 */ if (dictLabel.equals(dict.getDictLabel())) +/* */ { +/* 146 */ return dict.getDictValue(); +/* */ } +/* */ } +/* */ } +/* 150 */ return StringUtils.stripEnd(propertyString.toString(), separator); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void clearDictCache() { +/* 158 */ CacheUtils.removeAll(getCacheName()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getCacheName() { +/* 168 */ return "sys-dict"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getCacheKey(String configKey) { +/* 179 */ return "sys_dict:" + configKey; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dic\\utils\DictUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/menu/controller/MenuController.java b/src/main/java/com/archive/project/system/menu/controller/MenuController.java new file mode 100644 index 0000000..eb55204 --- /dev/null +++ b/src/main/java/com/archive/project/system/menu/controller/MenuController.java @@ -0,0 +1,199 @@ +/* */ package com.archive.project.system.menu.controller + +-INF.classes.com.archive.project.system.menu.controller; +/* */ +/* */ import com.archive.common.utils.security.AuthorizationUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.domain.Ztree; +/* */ import com.archive.project.system.menu.domain.Menu; +/* */ import com.archive.project.system.menu.service.IMenuService; +/* */ import com.archive.project.system.role.domain.Role; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/system/menu"}) +/* */ public class MenuController +/* */ extends BaseController +/* */ { +/* 34 */ private String prefix = "system/menu"; +/* */ +/* */ @Autowired +/* */ private IMenuService menuService; +/* */ +/* */ +/* */ @RequiresPermissions({"system:menu:view"}) +/* */ @GetMapping +/* */ public String menu() { +/* 43 */ return this.prefix + "/menu"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"system:menu:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public List list(Menu menu) { +/* 51 */ List menuList = this.menuService.selectMenuList(menu); +/* 52 */ return menuList; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "菜单管理", businessType = BusinessType.DELETE) +/* */ @RequiresPermissions({"system:menu:remove"}) +/* */ @GetMapping({"/remove/{menuId}"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(@PathVariable("menuId") Long menuId) { +/* 64 */ if (this.menuService.selectCountMenuByParentId(menuId) > 0) +/* */ { +/* 66 */ return AjaxResult.warn("存在子菜单,不允许删除"); +/* */ } +/* 68 */ if (this.menuService.selectCountRoleMenuByMenuId(menuId) > 0) +/* */ { +/* 70 */ return AjaxResult.warn("菜单已分配,不允许删除"); +/* */ } +/* 72 */ AuthorizationUtils.clearAllCachedAuthorizationInfo(); +/* 73 */ return toAjax(this.menuService.deleteMenuById(menuId)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add/{parentId}"}) +/* */ public String add(@PathVariable("parentId") Long parentId, ModelMap mmap) { +/* 82 */ Menu menu = null; +/* 83 */ if (0L != parentId.longValue()) { +/* */ +/* 85 */ menu = this.menuService.selectMenuById(parentId); +/* */ } +/* */ else { +/* */ +/* 89 */ menu = new Menu(); +/* 90 */ menu.setMenuId(Long.valueOf(0L)); +/* 91 */ menu.setMenuName("主目录"); +/* */ } +/* 93 */ mmap.put("menu", menu); +/* 94 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "菜单管理", businessType = BusinessType.INSERT) +/* */ @RequiresPermissions({"system:menu:add"}) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(@Validated Menu menu) { +/* 106 */ if ("1".equals(this.menuService.checkMenuNameUnique(menu))) +/* */ { +/* 108 */ return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在"); +/* */ } +/* 110 */ AuthorizationUtils.clearAllCachedAuthorizationInfo(); +/* 111 */ return toAjax(this.menuService.insertMenu(menu)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{menuId}"}) +/* */ public String edit(@PathVariable("menuId") Long menuId, ModelMap mmap) { +/* 120 */ mmap.put("menu", this.menuService.selectMenuById(menuId)); +/* 121 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "菜单管理", businessType = BusinessType.UPDATE) +/* */ @RequiresPermissions({"system:menu:edit"}) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(@Validated Menu menu) { +/* 133 */ if ("1".equals(this.menuService.checkMenuNameUnique(menu))) +/* */ { +/* 135 */ return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在"); +/* */ } +/* 137 */ AuthorizationUtils.clearAllCachedAuthorizationInfo(); +/* 138 */ return toAjax(this.menuService.updateMenu(menu)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/icon"}) +/* */ public String icon() { +/* 147 */ return this.prefix + "/icon"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkMenuNameUnique"}) +/* */ @ResponseBody +/* */ public String checkMenuNameUnique(Menu menu) { +/* 157 */ return this.menuService.checkMenuNameUnique(menu); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/roleMenuTreeData"}) +/* */ @ResponseBody +/* */ public List roleMenuTreeData(Role role) { +/* 167 */ List ztrees = this.menuService.roleMenuTreeData(role); +/* 168 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/menuTreeData"}) +/* */ @ResponseBody +/* */ public List menuTreeData(Role role) { +/* 178 */ List ztrees = this.menuService.menuTreeData(); +/* 179 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/selectMenuTree/{menuId}"}) +/* */ public String selectMenuTree(@PathVariable("menuId") Long menuId, ModelMap mmap) { +/* 188 */ mmap.put("menu", this.menuService.selectMenuById(menuId)); +/* 189 */ return this.prefix + "/tree"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\menu\controller\MenuController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/menu/domain/Menu.java b/src/main/java/com/archive/project/system/menu/domain/Menu.java new file mode 100644 index 0000000..8fb8d75 --- /dev/null +++ b/src/main/java/com/archive/project/system/menu/domain/Menu.java @@ -0,0 +1,222 @@ +/* */ package com.archive.project.system.menu.domain + +; +/* */ +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import javax.validation.constraints.NotBlank; +/* */ import javax.validation.constraints.Size; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Menu +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long menuId; +/* */ private String menuName; +/* */ private String parentName; +/* */ private Long parentId; +/* */ private String orderNum; +/* */ private String url; +/* */ private String target; +/* */ private String menuType; +/* */ private String visible; +/* */ private String isRefresh; +/* */ private String perms; +/* */ private String icon; +/* 56 */ private List children = new ArrayList<>(); +/* */ +/* */ +/* */ public Long getMenuId() { +/* 60 */ return this.menuId; +/* */ } +/* */ +/* */ +/* */ public void setMenuId(Long menuId) { +/* 65 */ this.menuId = menuId; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "菜单名称不能为空") +/* */ @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符") +/* */ public String getMenuName() { +/* 72 */ return this.menuName; +/* */ } +/* */ +/* */ +/* */ public void setMenuName(String menuName) { +/* 77 */ this.menuName = menuName; +/* */ } +/* */ +/* */ +/* */ public String getParentName() { +/* 82 */ return this.parentName; +/* */ } +/* */ +/* */ +/* */ public void setParentName(String parentName) { +/* 87 */ this.parentName = parentName; +/* */ } +/* */ +/* */ +/* */ public Long getParentId() { +/* 92 */ return this.parentId; +/* */ } +/* */ +/* */ +/* */ public void setParentId(Long parentId) { +/* 97 */ this.parentId = parentId; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "显示顺序不能为空") +/* */ public String getOrderNum() { +/* 103 */ return this.orderNum; +/* */ } +/* */ +/* */ +/* */ public void setOrderNum(String orderNum) { +/* 108 */ this.orderNum = orderNum; +/* */ } +/* */ +/* */ +/* */ @Size(min = 0, max = 200, message = "请求地址不能超过200个字符") +/* */ public String getUrl() { +/* 114 */ return this.url; +/* */ } +/* */ +/* */ +/* */ public void setUrl(String url) { +/* 119 */ this.url = url; +/* */ } +/* */ +/* */ +/* */ public String getTarget() { +/* 124 */ return this.target; +/* */ } +/* */ +/* */ +/* */ public void setTarget(String target) { +/* 129 */ this.target = target; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "菜单类型不能为空") +/* */ public String getMenuType() { +/* 135 */ return this.menuType; +/* */ } +/* */ +/* */ +/* */ public void setMenuType(String menuType) { +/* 140 */ this.menuType = menuType; +/* */ } +/* */ +/* */ +/* */ public String getVisible() { +/* 145 */ return this.visible; +/* */ } +/* */ +/* */ +/* */ public void setVisible(String visible) { +/* 150 */ this.visible = visible; +/* */ } +/* */ +/* */ +/* */ public String getIsRefresh() { +/* 155 */ return this.isRefresh; +/* */ } +/* */ +/* */ +/* */ public void setIsRefresh(String isRefresh) { +/* 160 */ this.isRefresh = isRefresh; +/* */ } +/* */ +/* */ +/* */ @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符") +/* */ public String getPerms() { +/* 166 */ return this.perms; +/* */ } +/* */ +/* */ +/* */ public void setPerms(String perms) { +/* 171 */ this.perms = perms; +/* */ } +/* */ +/* */ +/* */ public String getIcon() { +/* 176 */ return this.icon; +/* */ } +/* */ +/* */ +/* */ public void setIcon(String icon) { +/* 181 */ this.icon = icon; +/* */ } +/* */ +/* */ +/* */ public List getChildren() { +/* 186 */ return this.children; +/* */ } +/* */ +/* */ +/* */ public void setChildren(List children) { +/* 191 */ this.children = children; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 196 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 197 */ .append("menuId", getMenuId()) +/* 198 */ .append("menuName", getMenuName()) +/* 199 */ .append("parentId", getParentId()) +/* 200 */ .append("orderNum", getOrderNum()) +/* 201 */ .append("url", getUrl()) +/* 202 */ .append("target", getTarget()) +/* 203 */ .append("menuType", getMenuType()) +/* 204 */ .append("visible", getVisible()) +/* 205 */ .append("perms", getPerms()) +/* 206 */ .append("icon", getIcon()) +/* 207 */ .append("createBy", getCreateBy()) +/* 208 */ .append("createTime", getCreateTime()) +/* 209 */ .append("updateBy", getUpdateBy()) +/* 210 */ .append("updateTime", getUpdateTime()) +/* 211 */ .append("remark", getRemark()) +/* 212 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\menu\domain\Menu.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/menu/mapper/MenuMapper.java b/src/main/java/com/archive/project/system/menu/mapper/MenuMapper.java new file mode 100644 index 0000000..a6f84b4 --- /dev/null +++ b/src/main/java/com/archive/project/system/menu/mapper/MenuMapper.java @@ -0,0 +1,45 @@ +package com.archive.project.system.menu.mapper + +-INF.classes.com.archive.project.system.menu.mapper; + +import com.archive.project.system.menu.domain.Menu; +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +@Repository +public interface MenuMapper { + List selectMenuAll(); + + List selectMenuAllByUserId(Long paramLong); + + List selectMenuNormalAll(); + + List selectMenusByUserId(Long paramLong); + + List selectPermsByUserId(Long paramLong); + + List selectMenuTree(Long paramLong); + + List selectMenuList(Menu paramMenu); + + List selectMenuListByUserId(Menu paramMenu); + + int deleteMenuById(Long paramLong); + + Menu selectMenuById(Long paramLong); + + int selectCountMenuByParentId(Long paramLong); + + int insertMenu(Menu paramMenu); + + int updateMenu(Menu paramMenu); + + Menu checkMenuNameUnique(@Param("menuName") String paramString, @Param("parentId") Long paramLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\menu\mapper\MenuMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/menu/service/IMenuService.java b/src/main/java/com/archive/project/system/menu/service/IMenuService.java new file mode 100644 index 0000000..d83d8c6 --- /dev/null +++ b/src/main/java/com/archive/project/system/menu/service/IMenuService.java @@ -0,0 +1,49 @@ +package com.archive.project.system.menu.service + +; + +import com.archive.framework.web.domain.Ztree; +import com.archive.project.system.menu.domain.Menu; +import com.archive.project.system.role.domain.Role; +import com.archive.project.system.user.domain.User; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.springframework.stereotype.Repository; + +@Repository +public interface IMenuService { + List selectMenusByUser(User paramUser); + + List selectMenuList(Menu paramMenu); + + List selectMenuAll(); + + Set selectPermsByUserId(Long paramLong); + + List roleMenuTreeData(Role paramRole); + + List menuTreeData(); + + Map selectPermsAll(); + + int deleteMenuById(Long paramLong); + + Menu selectMenuById(Long paramLong); + + int selectCountMenuByParentId(Long paramLong); + + int selectCountRoleMenuByMenuId(Long paramLong); + + int insertMenu(Menu paramMenu); + + int updateMenu(Menu paramMenu); + + String checkMenuNameUnique(Menu paramMenu); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\menu\service\IMenuService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/menu/service/MenuServiceImpl.java b/src/main/java/com/archive/project/system/menu/service/MenuServiceImpl.java new file mode 100644 index 0000000..6bad18d --- /dev/null +++ b/src/main/java/com/archive/project/system/menu/service/MenuServiceImpl.java @@ -0,0 +1,332 @@ +/* */ package com.archive.project.system.menu.service + +-INF.classes.com.archive.project.system.menu.service; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.TreeUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.web.domain.Ztree; +/* */ import com.archive.project.system.menu.domain.Menu; +/* */ import com.archive.project.system.menu.mapper.MenuMapper; +/* */ import com.archive.project.system.menu.service.IMenuService; +/* */ import com.archive.project.system.role.domain.Role; +/* */ import com.archive.project.system.role.mapper.RoleMenuMapper; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.text.MessageFormat; +/* */ import java.util.ArrayList; +/* */ import java.util.Arrays; +/* */ import java.util.HashSet; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.LinkedList; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import java.util.Set; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class MenuServiceImpl +/* */ implements IMenuService +/* */ { +/* */ public static final String PREMISSION_STRING = "perms[\"{0}\"]"; +/* */ @Autowired +/* */ private MenuMapper menuMapper; +/* */ @Autowired +/* */ private RoleMenuMapper roleMenuMapper; +/* */ +/* */ public List selectMenusByUser(User user) { +/* 49 */ List menus = new LinkedList<>(); +/* */ +/* 51 */ if (user.isAdmin()) { +/* */ +/* 53 */ menus = this.menuMapper.selectMenuNormalAll(); +/* */ } +/* */ else { +/* */ +/* 57 */ menus = this.menuMapper.selectMenusByUserId(user.getUserId()); +/* */ } +/* 59 */ return TreeUtils.getChildPerms(menus, 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectMenuList(Menu menu) { +/* 70 */ List menuList = null; +/* 71 */ User user = ShiroUtils.getSysUser(); +/* 72 */ if (user.isAdmin()) { +/* */ +/* 74 */ menuList = this.menuMapper.selectMenuList(menu); +/* */ } +/* */ else { +/* */ +/* 78 */ menu.getParams().put("userId", user.getUserId()); +/* 79 */ menuList = this.menuMapper.selectMenuListByUserId(menu); +/* */ } +/* 81 */ return menuList; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectMenuAll() { +/* 92 */ List menuList = null; +/* 93 */ User user = ShiroUtils.getSysUser(); +/* 94 */ if (user.isAdmin()) { +/* */ +/* 96 */ menuList = this.menuMapper.selectMenuAll(); +/* */ } +/* */ else { +/* */ +/* 100 */ menuList = this.menuMapper.selectMenuAllByUserId(user.getUserId()); +/* */ } +/* 102 */ return menuList; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Set selectPermsByUserId(Long userId) { +/* 114 */ List perms = this.menuMapper.selectPermsByUserId(userId); +/* 115 */ Set permsSet = new HashSet<>(); +/* 116 */ for (String perm : perms) { +/* */ +/* 118 */ if (StringUtils.isNotEmpty(perm)) +/* */ { +/* 120 */ permsSet.addAll(Arrays.asList(perm.trim().split(","))); +/* */ } +/* */ } +/* 123 */ return permsSet; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List roleMenuTreeData(Role role) { +/* 135 */ Long roleId = role.getRoleId(); +/* 136 */ List ztrees = new ArrayList<>(); +/* 137 */ List menuList = selectMenuAll(); +/* 138 */ if (StringUtils.isNotNull(roleId)) { +/* */ +/* 140 */ List roleMenuList = this.menuMapper.selectMenuTree(roleId); +/* 141 */ ztrees = initZtree(menuList, roleMenuList, true); +/* */ } +/* */ else { +/* */ +/* 145 */ ztrees = initZtree(menuList, null, true); +/* */ } +/* 147 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List menuTreeData() { +/* 158 */ List menuList = selectMenuAll(); +/* 159 */ List ztrees = initZtree(menuList); +/* 160 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public LinkedHashMap selectPermsAll() { +/* 171 */ LinkedHashMap section = new LinkedHashMap<>(); +/* 172 */ List permissions = selectMenuAll(); +/* 173 */ if (StringUtils.isNotEmpty(permissions)) +/* */ { +/* 175 */ for (Menu menu : permissions) { +/* */ +/* 177 */ section.put(menu.getUrl(), MessageFormat.format("perms[\"{0}\"]", new Object[] { menu.getPerms() })); +/* */ } +/* */ } +/* 180 */ return section; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List initZtree(List menuList) { +/* 191 */ return initZtree(menuList, null, false); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List initZtree(List menuList, List roleMenuList, boolean permsFlag) { +/* 204 */ List ztrees = new ArrayList<>(); +/* 205 */ boolean isCheck = StringUtils.isNotNull(roleMenuList); +/* 206 */ for (Menu menu : menuList) { +/* */ +/* 208 */ Ztree ztree = new Ztree(); +/* 209 */ ztree.setId(menu.getMenuId()); +/* 210 */ ztree.setpId(menu.getParentId()); +/* 211 */ ztree.setName(transMenuName(menu, permsFlag)); +/* 212 */ ztree.setTitle(menu.getMenuName()); +/* 213 */ if (isCheck) +/* */ { +/* 215 */ ztree.setChecked(roleMenuList.contains(menu.getMenuId() + menu.getPerms())); +/* */ } +/* 217 */ ztrees.add(ztree); +/* */ } +/* 219 */ return ztrees; +/* */ } +/* */ +/* */ +/* */ public String transMenuName(Menu menu, boolean permsFlag) { +/* 224 */ StringBuffer sb = new StringBuffer(); +/* 225 */ sb.append(menu.getMenuName()); +/* 226 */ if (permsFlag) +/* */ { +/* 228 */ sb.append("   " + menu.getPerms() + ""); +/* */ } +/* 230 */ return sb.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteMenuById(Long menuId) { +/* 242 */ return this.menuMapper.deleteMenuById(menuId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Menu selectMenuById(Long menuId) { +/* 254 */ return this.menuMapper.selectMenuById(menuId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int selectCountMenuByParentId(Long parentId) { +/* 266 */ return this.menuMapper.selectCountMenuByParentId(parentId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int selectCountRoleMenuByMenuId(Long menuId) { +/* 278 */ return this.roleMenuMapper.selectCountRoleMenuByMenuId(menuId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertMenu(Menu menu) { +/* 290 */ menu.setCreateBy(ShiroUtils.getLoginName()); +/* 291 */ return this.menuMapper.insertMenu(menu); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateMenu(Menu menu) { +/* 303 */ menu.setUpdateBy(ShiroUtils.getLoginName()); +/* 304 */ return this.menuMapper.updateMenu(menu); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkMenuNameUnique(Menu menu) { +/* 316 */ Long menuId = Long.valueOf(StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId().longValue()); +/* 317 */ Menu info = this.menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId()); +/* 318 */ if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue()) +/* */ { +/* 320 */ return "1"; +/* */ } +/* 322 */ return "0"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\menu\service\MenuServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/notice/controller/NoticeController.java b/src/main/java/com/archive/project/system/notice/controller/NoticeController.java new file mode 100644 index 0000000..d041d91 --- /dev/null +++ b/src/main/java/com/archive/project/system/notice/controller/NoticeController.java @@ -0,0 +1,117 @@ +/* */ package com.archive.project.system.notice.controller + +-INF.classes.com.archive.project.system.notice.controller; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.system.notice.domain.Notice; +/* */ import com.archive.project.system.notice.service.INoticeService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/system/notice"}) +/* */ public class NoticeController +/* */ extends BaseController +/* */ { +/* 30 */ private String prefix = "system/notice"; +/* */ +/* */ @Autowired +/* */ private INoticeService noticeService; +/* */ +/* */ +/* */ @RequiresPermissions({"system:notice:view"}) +/* */ @GetMapping +/* */ public String notice() { +/* 39 */ return this.prefix + "/notice"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:notice:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(Notice notice) { +/* 50 */ startPage(); +/* 51 */ List list = this.noticeService.selectNoticeList(notice); +/* 52 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 61 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:notice:add"}) +/* */ @Log(title = "通知公告", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(Notice notice) { +/* 73 */ return toAjax(this.noticeService.insertNotice(notice)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{noticeId}"}) +/* */ public String edit(@PathVariable("noticeId") Long noticeId, ModelMap mmap) { +/* 82 */ mmap.put("notice", this.noticeService.selectNoticeById(noticeId)); +/* 83 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:notice:edit"}) +/* */ @Log(title = "通知公告", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(Notice notice) { +/* 95 */ return toAjax(this.noticeService.updateNotice(notice)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:notice:remove"}) +/* */ @Log(title = "通知公告", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 107 */ return toAjax(this.noticeService.deleteNoticeByIds(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\notice\controller\NoticeController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/notice/domain/Notice.java b/src/main/java/com/archive/project/system/notice/domain/Notice.java new file mode 100644 index 0000000..59aac28 --- /dev/null +++ b/src/main/java/com/archive/project/system/notice/domain/Notice.java @@ -0,0 +1,108 @@ +/* */ package com.archive.project.system.notice.domain + +-INF.classes.com.archive.project.system.notice.domain; +/* */ +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import javax.validation.constraints.NotBlank; +/* */ import javax.validation.constraints.Size; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Notice +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long noticeId; +/* */ private String noticeTitle; +/* */ private String noticeType; +/* */ private String noticeContent; +/* */ private String status; +/* */ +/* */ public Long getNoticeId() { +/* 35 */ return this.noticeId; +/* */ } +/* */ +/* */ +/* */ public void setNoticeId(Long noticeId) { +/* 40 */ this.noticeId = noticeId; +/* */ } +/* */ +/* */ +/* */ public void setNoticeTitle(String noticeTitle) { +/* 45 */ this.noticeTitle = noticeTitle; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "公告标题不能为空") +/* */ @Size(min = 0, max = 50, message = "公告标题不能超过50个字符") +/* */ public String getNoticeTitle() { +/* 52 */ return this.noticeTitle; +/* */ } +/* */ +/* */ +/* */ public void setNoticeType(String noticeType) { +/* 57 */ this.noticeType = noticeType; +/* */ } +/* */ +/* */ +/* */ public String getNoticeType() { +/* 62 */ return this.noticeType; +/* */ } +/* */ +/* */ +/* */ public void setNoticeContent(String noticeContent) { +/* 67 */ this.noticeContent = noticeContent; +/* */ } +/* */ +/* */ +/* */ public String getNoticeContent() { +/* 72 */ return this.noticeContent; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 77 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 82 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 87 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 88 */ .append("noticeId", getNoticeId()) +/* 89 */ .append("noticeTitle", getNoticeTitle()) +/* 90 */ .append("noticeType", getNoticeType()) +/* 91 */ .append("noticeContent", getNoticeContent()) +/* 92 */ .append("status", getStatus()) +/* 93 */ .append("createBy", getCreateBy()) +/* 94 */ .append("createTime", getCreateTime()) +/* 95 */ .append("updateBy", getUpdateBy()) +/* 96 */ .append("updateTime", getUpdateTime()) +/* 97 */ .append("remark", getRemark()) +/* 98 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\notice\domain\Notice.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/notice/mapper/NoticeMapper.java b/src/main/java/com/archive/project/system/notice/mapper/NoticeMapper.java new file mode 100644 index 0000000..f406c52 --- /dev/null +++ b/src/main/java/com/archive/project/system/notice/mapper/NoticeMapper.java @@ -0,0 +1,32 @@ +package com.archive.project.system.notice.mapper + +-INF.classes.com.archive.project.system.notice.mapper; + +import com.archive.project.system.notice.domain.Notice; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface NoticeMapper { + Notice selectNoticeById(Long paramLong); + + List selectNoticeList(Notice paramNotice); + + List selectNoticeListSqlite(Notice paramNotice); + + int insertNotice(Notice paramNotice); + + int insertNoticeSqlite(Notice paramNotice); + + int updateNotice(Notice paramNotice); + + int updateNoticeSqlite(Notice paramNotice); + + int deleteNoticeByIds(String[] paramArrayOfString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\notice\mapper\NoticeMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/notice/service/INoticeService.java b/src/main/java/com/archive/project/system/notice/service/INoticeService.java new file mode 100644 index 0000000..ee9059f --- /dev/null +++ b/src/main/java/com/archive/project/system/notice/service/INoticeService.java @@ -0,0 +1,24 @@ +package com.archive.project.system.notice.service + +-INF.classes.com.archive.project.system.notice.service; + +import com.archive.project.system.notice.domain.Notice; +import java.util.List; + +public interface INoticeService { + Notice selectNoticeById(Long paramLong); + + List selectNoticeList(Notice paramNotice); + + int insertNotice(Notice paramNotice); + + int updateNotice(Notice paramNotice); + + int deleteNoticeByIds(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\notice\service\INoticeService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/notice/service/NoticeServiceImpl.java b/src/main/java/com/archive/project/system/notice/service/NoticeServiceImpl.java new file mode 100644 index 0000000..03bf60a --- /dev/null +++ b/src/main/java/com/archive/project/system/notice/service/NoticeServiceImpl.java @@ -0,0 +1,123 @@ +/* */ package com.archive.project.system.notice.service + +-INF.classes.com.archive.project.system.notice.service; +/* */ +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.system.notice.domain.Notice; +/* */ import com.archive.project.system.notice.mapper.NoticeMapper; +/* */ import com.archive.project.system.notice.service.INoticeService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class NoticeServiceImpl +/* */ implements INoticeService +/* */ { +/* */ @Autowired +/* */ private NoticeMapper noticeMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public Notice selectNoticeById(Long noticeId) { +/* 39 */ return this.noticeMapper.selectNoticeById(noticeId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectNoticeList(Notice notice) { +/* 51 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 52 */ return this.noticeMapper.selectNoticeList(notice); +/* */ } +/* 54 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 55 */ return this.noticeMapper.selectNoticeListSqlite(notice); +/* */ } +/* 57 */ return this.noticeMapper.selectNoticeList(notice); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertNotice(Notice notice) { +/* 71 */ notice.setCreateBy(ShiroUtils.getLoginName()); +/* 72 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 73 */ return this.noticeMapper.insertNotice(notice); +/* */ } +/* 75 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 76 */ return this.noticeMapper.insertNoticeSqlite(notice); +/* */ } +/* 78 */ return this.noticeMapper.insertNotice(notice); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateNotice(Notice notice) { +/* 92 */ notice.setUpdateBy(ShiroUtils.getLoginName()); +/* 93 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 94 */ return this.noticeMapper.updateNotice(notice); +/* */ } +/* 96 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 97 */ return this.noticeMapper.updateNoticeSqlite(notice); +/* */ } +/* 99 */ return this.noticeMapper.updateNotice(notice); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteNoticeByIds(String ids) { +/* 113 */ return this.noticeMapper.deleteNoticeByIds(Convert.toStrArray(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\notice\service\NoticeServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/post/controller/PostController.java b/src/main/java/com/archive/project/system/post/controller/PostController.java new file mode 100644 index 0000000..ab3830c --- /dev/null +++ b/src/main/java/com/archive/project/system/post/controller/PostController.java @@ -0,0 +1,168 @@ +/* */ package com.archive.project.system.post.controller + +-INF.classes.com.archive.project.system.post.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.system.post.domain.Post; +/* */ import com.archive.project.system.post.service.IPostService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/system/post"}) +/* */ public class PostController +/* */ extends BaseController +/* */ { +/* 33 */ private String prefix = "system/post"; +/* */ +/* */ @Autowired +/* */ private IPostService postService; +/* */ +/* */ +/* */ @RequiresPermissions({"system:post:view"}) +/* */ @GetMapping +/* */ public String operlog() { +/* 42 */ return this.prefix + "/post"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"system:post:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(Post post) { +/* 50 */ startPage(); +/* 51 */ List list = this.postService.selectPostList(post); +/* 52 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @Log(title = "岗位管理", businessType = BusinessType.EXPORT) +/* */ @RequiresPermissions({"system:post:export"}) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(Post post) { +/* 61 */ List list = this.postService.selectPostList(post); +/* 62 */ ExcelUtil util = new ExcelUtil(Post.class); +/* 63 */ return util.exportExcel(list, "岗位数据"); +/* */ } +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:post:remove"}) +/* */ @Log(title = "岗位管理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* */ try { +/* 74 */ return toAjax(this.postService.deletePostByIds(ids)); +/* */ } +/* 76 */ catch (Exception e) { +/* */ +/* 78 */ return error(e.getMessage()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 88 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:post:add"}) +/* */ @Log(title = "岗位管理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(@Validated Post post) { +/* 100 */ if ("1".equals(this.postService.checkPostNameUnique(post))) +/* */ { +/* 102 */ return error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在"); +/* */ } +/* 104 */ if ("1".equals(this.postService.checkPostCodeUnique(post))) +/* */ { +/* 106 */ return error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在"); +/* */ } +/* 108 */ return toAjax(this.postService.insertPost(post)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{postId}"}) +/* */ public String edit(@PathVariable("postId") Long postId, ModelMap mmap) { +/* 117 */ mmap.put("post", this.postService.selectPostById(postId)); +/* 118 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:post:edit"}) +/* */ @Log(title = "岗位管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(@Validated Post post) { +/* 130 */ if ("1".equals(this.postService.checkPostNameUnique(post))) +/* */ { +/* 132 */ return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在"); +/* */ } +/* 134 */ if ("1".equals(this.postService.checkPostCodeUnique(post))) +/* */ { +/* 136 */ return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在"); +/* */ } +/* 138 */ return toAjax(this.postService.updatePost(post)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkPostNameUnique"}) +/* */ @ResponseBody +/* */ public String checkPostNameUnique(Post post) { +/* 148 */ return this.postService.checkPostNameUnique(post); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkPostCodeUnique"}) +/* */ @ResponseBody +/* */ public String checkPostCodeUnique(Post post) { +/* 158 */ return this.postService.checkPostCodeUnique(post); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\post\controller\PostController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/post/domain/Post.java b/src/main/java/com/archive/project/system/post/domain/Post.java new file mode 100644 index 0000000..aa65010 --- /dev/null +++ b/src/main/java/com/archive/project/system/post/domain/Post.java @@ -0,0 +1,130 @@ +/* */ package com.archive.project.system.post.domain + +-INF.classes.com.archive.project.system.post.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import javax.validation.constraints.NotBlank; +/* */ import javax.validation.constraints.Size; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Post +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ @Excel(name = "岗位序号", cellType = Excel.ColumnType.NUMERIC) +/* */ private Long postId; +/* */ @Excel(name = "岗位编码") +/* */ private String postCode; +/* */ @Excel(name = "岗位名称") +/* */ private String postName; +/* */ @Excel(name = "岗位排序") +/* */ private String postSort; +/* */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") +/* */ private String status; +/* */ private boolean flag = false; +/* */ +/* */ public Long getPostId() { +/* 44 */ return this.postId; +/* */ } +/* */ +/* */ +/* */ public void setPostId(Long postId) { +/* 49 */ this.postId = postId; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "岗位编码不能为空") +/* */ @Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符") +/* */ public String getPostCode() { +/* 56 */ return this.postCode; +/* */ } +/* */ +/* */ +/* */ public void setPostCode(String postCode) { +/* 61 */ this.postCode = postCode; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "岗位名称不能为空") +/* */ @Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符") +/* */ public String getPostName() { +/* 68 */ return this.postName; +/* */ } +/* */ +/* */ +/* */ public void setPostName(String postName) { +/* 73 */ this.postName = postName; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "显示顺序不能为空") +/* */ public String getPostSort() { +/* 79 */ return this.postSort; +/* */ } +/* */ +/* */ +/* */ public void setPostSort(String postSort) { +/* 84 */ this.postSort = postSort; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 89 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 94 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public boolean isFlag() { +/* 99 */ return this.flag; +/* */ } +/* */ +/* */ +/* */ public void setFlag(boolean flag) { +/* 104 */ this.flag = flag; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 109 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 110 */ .append("postId", getPostId()) +/* 111 */ .append("postCode", getPostCode()) +/* 112 */ .append("postName", getPostName()) +/* 113 */ .append("postSort", getPostSort()) +/* 114 */ .append("status", getStatus()) +/* 115 */ .append("createBy", getCreateBy()) +/* 116 */ .append("createTime", getCreateTime()) +/* 117 */ .append("updateBy", getUpdateBy()) +/* 118 */ .append("updateTime", getUpdateTime()) +/* 119 */ .append("remark", getRemark()) +/* 120 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\post\domain\Post.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/post/mapper/PostMapper.java b/src/main/java/com/archive/project/system/post/mapper/PostMapper.java new file mode 100644 index 0000000..b10e61f --- /dev/null +++ b/src/main/java/com/archive/project/system/post/mapper/PostMapper.java @@ -0,0 +1,40 @@ +package com.archive.project.system.post.mapper + +-INF.classes.com.archive.project.system.post.mapper; + +import com.archive.project.system.post.domain.Post; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface PostMapper { + List selectPostList(Post paramPost); + + List selectPostListSqlite(Post paramPost); + + List selectPostAll(); + + List selectPostsByUserId(Long paramLong); + + Post selectPostById(Long paramLong); + + int deletePostByIds(Long[] paramArrayOfLong); + + int updatePost(Post paramPost); + + int updatePostSqlite(Post paramPost); + + int insertPost(Post paramPost); + + int insertPostSqlite(Post paramPost); + + Post checkPostNameUnique(String paramString); + + Post checkPostCodeUnique(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\post\mapper\PostMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/post/service/IPostService.java b/src/main/java/com/archive/project/system/post/service/IPostService.java new file mode 100644 index 0000000..ec0d4f1 --- /dev/null +++ b/src/main/java/com/archive/project/system/post/service/IPostService.java @@ -0,0 +1,34 @@ +package com.archive.project.system.post.service + +-INF.classes.com.archive.project.system.post.service; + +import com.archive.project.system.post.domain.Post; +import java.util.List; + +public interface IPostService { + List selectPostList(Post paramPost); + + List selectPostAll(); + + List selectPostsByUserId(Long paramLong); + + Post selectPostById(Long paramLong); + + int deletePostByIds(String paramString) throws Exception; + + int insertPost(Post paramPost); + + int updatePost(Post paramPost); + + int countUserPostById(Long paramLong); + + String checkPostNameUnique(Post paramPost); + + String checkPostCodeUnique(Post paramPost); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\post\service\IPostService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/post/service/PostServiceImpl.java b/src/main/java/com/archive/project/system/post/service/PostServiceImpl.java new file mode 100644 index 0000000..c07376b --- /dev/null +++ b/src/main/java/com/archive/project/system/post/service/PostServiceImpl.java @@ -0,0 +1,221 @@ +/* */ package com.archive.project.system.post.service + +-INF.classes.com.archive.project.system.post.service; +/* */ +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.system.post.domain.Post; +/* */ import com.archive.project.system.post.mapper.PostMapper; +/* */ import com.archive.project.system.post.service.IPostService; +/* */ import com.archive.project.system.user.mapper.UserPostMapper; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class PostServiceImpl +/* */ implements IPostService +/* */ { +/* */ @Autowired +/* */ private PostMapper postMapper; +/* */ @Autowired +/* */ private UserPostMapper userPostMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public List selectPostList(Post post) { +/* 44 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 45 */ return this.postMapper.selectPostList(post); +/* */ } +/* 47 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 48 */ return this.postMapper.selectPostListSqlite(post); +/* */ } +/* 50 */ return this.postMapper.selectPostList(post); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectPostAll() { +/* 63 */ return this.postMapper.selectPostAll(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectPostsByUserId(Long userId) { +/* 75 */ List userPosts = this.postMapper.selectPostsByUserId(userId); +/* 76 */ List posts = this.postMapper.selectPostAll(); +/* 77 */ for (Post post : posts) { +/* */ +/* 79 */ for (Post userRole : userPosts) { +/* */ +/* 81 */ if (post.getPostId().longValue() == userRole.getPostId().longValue()) +/* */ { +/* 83 */ post.setFlag(true); +/* */ } +/* */ } +/* */ } +/* */ +/* 88 */ return posts; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Post selectPostById(Long postId) { +/* 100 */ return this.postMapper.selectPostById(postId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deletePostByIds(String ids) throws BusinessException { +/* 112 */ Long[] postIds = Convert.toLongArray(ids); +/* 113 */ for (Long postId : postIds) { +/* */ +/* 115 */ Post post = selectPostById(postId); +/* 116 */ if (countUserPostById(postId) > 0) +/* */ { +/* 118 */ throw new BusinessException(String.format("%1$s已分配,不能删除", new Object[] { post.getPostName() })); +/* */ } +/* */ } +/* 121 */ return this.postMapper.deletePostByIds(postIds); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertPost(Post post) { +/* 133 */ post.setCreateBy(ShiroUtils.getLoginName()); +/* 134 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 135 */ return this.postMapper.insertPost(post); +/* */ } +/* 137 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 138 */ return this.postMapper.insertPostSqlite(post); +/* */ } +/* 140 */ return this.postMapper.insertPost(post); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updatePost(Post post) { +/* 154 */ post.setUpdateBy(ShiroUtils.getLoginName()); +/* 155 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 156 */ return this.postMapper.updatePost(post); +/* */ } +/* 158 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 159 */ return this.postMapper.updatePostSqlite(post); +/* */ } +/* 161 */ return this.postMapper.updatePost(post); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int countUserPostById(Long postId) { +/* 175 */ return this.userPostMapper.countUserPostById(postId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkPostNameUnique(Post post) { +/* 187 */ Long postId = Long.valueOf(StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId().longValue()); +/* 188 */ Post info = this.postMapper.checkPostNameUnique(post.getPostName()); +/* 189 */ if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue()) +/* */ { +/* 191 */ return "1"; +/* */ } +/* 193 */ return "0"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkPostCodeUnique(Post post) { +/* 205 */ Long postId = Long.valueOf(StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId().longValue()); +/* 206 */ Post info = this.postMapper.checkPostCodeUnique(post.getPostCode()); +/* 207 */ if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue()) +/* */ { +/* 209 */ return "1"; +/* */ } +/* 211 */ return "0"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\post\service\PostServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/role/controller/RoleController.java b/src/main/java/com/archive/project/system/role/controller/RoleController.java new file mode 100644 index 0000000..3f9ce95 --- /dev/null +++ b/src/main/java/com/archive/project/system/role/controller/RoleController.java @@ -0,0 +1,302 @@ +/* */ package com.archive.project.system.role.controller + +-INF.classes.com.archive.project.system.role.controller; +/* */ +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.common.utils.security.AuthorizationUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.system.role.domain.Role; +/* */ import com.archive.project.system.role.service.IRoleService; +/* */ import com.archive.project.system.user.domain.User; +/* */ import com.archive.project.system.user.domain.UserRole; +/* */ import com.archive.project.system.user.service.IUserService; +/* */ import java.util.List; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/system/role"}) +/* */ public class RoleController +/* */ extends BaseController +/* */ { +/* 37 */ private String prefix = "system/role"; +/* */ +/* */ @Autowired +/* */ private IRoleService roleService; +/* */ +/* */ @Autowired +/* */ private IUserService userService; +/* */ +/* */ +/* */ @RequiresPermissions({"system:role:view"}) +/* */ @GetMapping +/* */ public String role() { +/* 49 */ return this.prefix + "/role"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"system:role:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(Role role) { +/* 57 */ startPage(); +/* 58 */ List list = this.roleService.selectRoleList(role); +/* 59 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @Log(title = "角色管理", businessType = BusinessType.EXPORT) +/* */ @RequiresPermissions({"system:role:export"}) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(Role role) { +/* 68 */ List list = this.roleService.selectRoleList(role); +/* 69 */ ExcelUtil util = new ExcelUtil(Role.class); +/* 70 */ return util.exportExcel(list, "角色数据"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add() { +/* 79 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:role:add"}) +/* */ @Log(title = "角色管理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(@Validated Role role) { +/* 91 */ if ("1".equals(this.roleService.checkRoleNameUnique(role))) +/* */ { +/* 93 */ return error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在"); +/* */ } +/* 95 */ if ("1".equals(this.roleService.checkRoleKeyUnique(role))) +/* */ { +/* 97 */ return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在"); +/* */ } +/* 99 */ AuthorizationUtils.clearAllCachedAuthorizationInfo(); +/* 100 */ return toAjax(this.roleService.insertRole(role)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{roleId}"}) +/* */ public String edit(@PathVariable("roleId") Long roleId, ModelMap mmap) { +/* 110 */ mmap.put("role", this.roleService.selectRoleById(roleId)); +/* 111 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:role:edit"}) +/* */ @Log(title = "角色管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(@Validated Role role) { +/* 123 */ this.roleService.checkRoleAllowed(role); +/* 124 */ if ("1".equals(this.roleService.checkRoleNameUnique(role))) +/* */ { +/* 126 */ return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在"); +/* */ } +/* 128 */ if ("1".equals(this.roleService.checkRoleKeyUnique(role))) +/* */ { +/* 130 */ return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在"); +/* */ } +/* 132 */ AuthorizationUtils.clearAllCachedAuthorizationInfo(); +/* 133 */ return toAjax(this.roleService.updateRole(role)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/authDataScope/{roleId}"}) +/* */ public String authDataScope(@PathVariable("roleId") Long roleId, ModelMap mmap) { +/* 142 */ mmap.put("role", this.roleService.selectRoleById(roleId)); +/* 143 */ return this.prefix + "/dataScope"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:role:edit"}) +/* */ @Log(title = "角色管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/authDataScope"}) +/* */ @ResponseBody +/* */ public AjaxResult authDataScopeSave(Role role) { +/* 155 */ this.roleService.checkRoleAllowed(role); +/* 156 */ if (this.roleService.authDataScope(role) > 0) { +/* */ +/* 158 */ setSysUser(this.userService.selectUserById(getSysUser().getUserId())); +/* 159 */ return success(); +/* */ } +/* 161 */ return error(); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"system:role:remove"}) +/* */ @Log(title = "角色管理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 170 */ return toAjax(this.roleService.deleteRoleByIds(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkRoleNameUnique"}) +/* */ @ResponseBody +/* */ public String checkRoleNameUnique(Role role) { +/* 180 */ return this.roleService.checkRoleNameUnique(role); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkRoleKeyUnique"}) +/* */ @ResponseBody +/* */ public String checkRoleKeyUnique(Role role) { +/* 190 */ return this.roleService.checkRoleKeyUnique(role); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/selectMenuTree"}) +/* */ public String selectMenuTree() { +/* 199 */ return this.prefix + "/tree"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "角色管理", businessType = BusinessType.UPDATE) +/* */ @RequiresPermissions({"system:role:edit"}) +/* */ @PostMapping({"/changeStatus"}) +/* */ @ResponseBody +/* */ public AjaxResult changeStatus(Role role) { +/* 211 */ this.roleService.checkRoleAllowed(role); +/* 212 */ return toAjax(this.roleService.changeStatus(role)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:role:edit"}) +/* */ @GetMapping({"/authUser/{roleId}"}) +/* */ public String authUser(@PathVariable("roleId") Long roleId, ModelMap mmap) { +/* 222 */ mmap.put("role", this.roleService.selectRoleById(roleId)); +/* 223 */ return this.prefix + "/authUser"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:role:list"}) +/* */ @PostMapping({"/authUser/allocatedList"}) +/* */ @ResponseBody +/* */ public TableDataInfo allocatedList(User user) { +/* 234 */ startPage(); +/* 235 */ List list = this.userService.selectAllocatedList(user); +/* 236 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "角色管理", businessType = BusinessType.GRANT) +/* */ @PostMapping({"/authUser/cancel"}) +/* */ @ResponseBody +/* */ public AjaxResult cancelAuthUser(UserRole userRole) { +/* 247 */ return toAjax(this.roleService.deleteAuthUser(userRole)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "角色管理", businessType = BusinessType.GRANT) +/* */ @PostMapping({"/authUser/cancelAll"}) +/* */ @ResponseBody +/* */ public AjaxResult cancelAuthUserAll(Long roleId, String userIds) { +/* 258 */ return toAjax(this.roleService.deleteAuthUsers(roleId, userIds)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/authUser/selectUser/{roleId}"}) +/* */ public String selectUser(@PathVariable("roleId") Long roleId, ModelMap mmap) { +/* 267 */ mmap.put("role", this.roleService.selectRoleById(roleId)); +/* 268 */ return this.prefix + "/selectUser"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:role:list"}) +/* */ @PostMapping({"/authUser/unallocatedList"}) +/* */ @ResponseBody +/* */ public TableDataInfo unallocatedList(User user) { +/* 279 */ startPage(); +/* 280 */ List list = this.userService.selectUnallocatedList(user); +/* 281 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "角色管理", businessType = BusinessType.GRANT) +/* */ @PostMapping({"/authUser/selectAll"}) +/* */ @ResponseBody +/* */ public AjaxResult selectAuthUserAll(Long roleId, String userIds) { +/* 292 */ return toAjax(this.roleService.insertAuthUsers(roleId, userIds)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\role\controller\RoleController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/role/domain/Role.java b/src/main/java/com/archive/project/system/role/domain/Role.java new file mode 100644 index 0000000..db13331 --- /dev/null +++ b/src/main/java/com/archive/project/system/role/domain/Role.java @@ -0,0 +1,205 @@ +/* */ package com.archive.project.system.role.domain + +-INF.classes.com.archive.project.system.role.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import javax.validation.constraints.NotBlank; +/* */ import javax.validation.constraints.Size; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Role +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ @Excel(name = "角色序号", cellType = Excel.ColumnType.NUMERIC) +/* */ private Long roleId; +/* */ @Excel(name = "角色名称") +/* */ private String roleName; +/* */ @Excel(name = "角色权限") +/* */ private String roleKey; +/* */ @Excel(name = "角色排序") +/* */ private String roleSort; +/* */ @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限") +/* */ private String dataScope; +/* */ @Excel(name = "角色状态", readConverterExp = "0=正常,1=停用") +/* */ private String status; +/* */ private String delFlag; +/* */ private boolean flag = false; +/* */ private Long[] menuIds; +/* */ private Long[] deptIds; +/* */ +/* */ public Role() {} +/* */ +/* */ public Role(Long roleId) { +/* 62 */ this.roleId = roleId; +/* */ } +/* */ +/* */ +/* */ public Long getRoleId() { +/* 67 */ return this.roleId; +/* */ } +/* */ +/* */ +/* */ public void setRoleId(Long roleId) { +/* 72 */ this.roleId = roleId; +/* */ } +/* */ +/* */ +/* */ public boolean isAdmin() { +/* 77 */ return isAdmin(this.roleId); +/* */ } +/* */ +/* */ +/* */ public static boolean isAdmin(Long roleId) { +/* 82 */ return (roleId != null && 1L == roleId.longValue()); +/* */ } +/* */ +/* */ +/* */ public String getDataScope() { +/* 87 */ return this.dataScope; +/* */ } +/* */ +/* */ +/* */ public void setDataScope(String dataScope) { +/* 92 */ this.dataScope = dataScope; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "角色名称不能为空") +/* */ @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符") +/* */ public String getRoleName() { +/* 99 */ return this.roleName; +/* */ } +/* */ +/* */ +/* */ public void setRoleName(String roleName) { +/* 104 */ this.roleName = roleName; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "权限字符不能为空") +/* */ @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符") +/* */ public String getRoleKey() { +/* 111 */ return this.roleKey; +/* */ } +/* */ +/* */ +/* */ public void setRoleKey(String roleKey) { +/* 116 */ this.roleKey = roleKey; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "显示顺序不能为空") +/* */ public String getRoleSort() { +/* 122 */ return this.roleSort; +/* */ } +/* */ +/* */ +/* */ public void setRoleSort(String roleSort) { +/* 127 */ this.roleSort = roleSort; +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 132 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public String getDelFlag() { +/* 137 */ return this.delFlag; +/* */ } +/* */ +/* */ +/* */ public void setDelFlag(String delFlag) { +/* 142 */ this.delFlag = delFlag; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 147 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public boolean isFlag() { +/* 152 */ return this.flag; +/* */ } +/* */ +/* */ +/* */ public void setFlag(boolean flag) { +/* 157 */ this.flag = flag; +/* */ } +/* */ +/* */ +/* */ public Long[] getMenuIds() { +/* 162 */ return this.menuIds; +/* */ } +/* */ +/* */ +/* */ public void setMenuIds(Long[] menuIds) { +/* 167 */ this.menuIds = menuIds; +/* */ } +/* */ +/* */ +/* */ public Long[] getDeptIds() { +/* 172 */ return this.deptIds; +/* */ } +/* */ +/* */ +/* */ public void setDeptIds(Long[] deptIds) { +/* 177 */ this.deptIds = deptIds; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 182 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 183 */ .append("roleId", getRoleId()) +/* 184 */ .append("roleName", getRoleName()) +/* 185 */ .append("roleKey", getRoleKey()) +/* 186 */ .append("roleSort", getRoleSort()) +/* 187 */ .append("dataScope", getDataScope()) +/* 188 */ .append("status", getStatus()) +/* 189 */ .append("delFlag", getDelFlag()) +/* 190 */ .append("createBy", getCreateBy()) +/* 191 */ .append("createTime", getCreateTime()) +/* 192 */ .append("updateBy", getUpdateBy()) +/* 193 */ .append("updateTime", getUpdateTime()) +/* 194 */ .append("remark", getRemark()) +/* 195 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\role\domain\Role.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/role/domain/RoleDept.java b/src/main/java/com/archive/project/system/role/domain/RoleDept.java new file mode 100644 index 0000000..3c6848f --- /dev/null +++ b/src/main/java/com/archive/project/system/role/domain/RoleDept.java @@ -0,0 +1,54 @@ +/* */ package com.archive.project.system.role.domain + +-INF.classes.com.archive.project.system.role.domain; +/* */ +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RoleDept +/* */ { +/* */ private Long roleId; +/* */ private Long deptId; +/* */ +/* */ public Long getRoleId() { +/* 21 */ return this.roleId; +/* */ } +/* */ +/* */ +/* */ public void setRoleId(Long roleId) { +/* 26 */ this.roleId = roleId; +/* */ } +/* */ +/* */ +/* */ public Long getDeptId() { +/* 31 */ return this.deptId; +/* */ } +/* */ +/* */ +/* */ public void setDeptId(Long deptId) { +/* 36 */ this.deptId = deptId; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 41 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 42 */ .append("roleId", getRoleId()) +/* 43 */ .append("deptId", getDeptId()) +/* 44 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\role\domain\RoleDept.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/role/domain/RoleMenu.java b/src/main/java/com/archive/project/system/role/domain/RoleMenu.java new file mode 100644 index 0000000..8167292 --- /dev/null +++ b/src/main/java/com/archive/project/system/role/domain/RoleMenu.java @@ -0,0 +1,54 @@ +/* */ package com.archive.project.system.role.domain + +-INF.classes.com.archive.project.system.role.domain; +/* */ +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RoleMenu +/* */ { +/* */ private Long roleId; +/* */ private Long menuId; +/* */ +/* */ public Long getRoleId() { +/* 21 */ return this.roleId; +/* */ } +/* */ +/* */ +/* */ public void setRoleId(Long roleId) { +/* 26 */ this.roleId = roleId; +/* */ } +/* */ +/* */ +/* */ public Long getMenuId() { +/* 31 */ return this.menuId; +/* */ } +/* */ +/* */ +/* */ public void setMenuId(Long menuId) { +/* 36 */ this.menuId = menuId; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 41 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 42 */ .append("roleId", getRoleId()) +/* 43 */ .append("menuId", getMenuId()) +/* 44 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\role\domain\RoleMenu.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/role/mapper/RoleDeptMapper.java b/src/main/java/com/archive/project/system/role/mapper/RoleDeptMapper.java new file mode 100644 index 0000000..c61360a --- /dev/null +++ b/src/main/java/com/archive/project/system/role/mapper/RoleDeptMapper.java @@ -0,0 +1,24 @@ +package com.archive.project.system.role.mapper + +-INF.classes.com.archive.project.system.role.mapper; + +import com.archive.project.system.role.domain.RoleDept; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface RoleDeptMapper { + int deleteRoleDeptByRoleId(Long paramLong); + + int deleteRoleDept(Long[] paramArrayOfLong); + + int selectCountRoleDeptByDeptId(Long paramLong); + + int batchRoleDept(List paramList); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\role\mapper\RoleDeptMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/role/mapper/RoleMapper.java b/src/main/java/com/archive/project/system/role/mapper/RoleMapper.java new file mode 100644 index 0000000..117161f --- /dev/null +++ b/src/main/java/com/archive/project/system/role/mapper/RoleMapper.java @@ -0,0 +1,36 @@ +package com.archive.project.system.role.mapper; + +import com.archive.project.system.role.domain.Role; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface RoleMapper { + List selectRoleList(Role paramRole); + + List selectRoleListSqlite(Role paramRole); + + List selectRolesByUserId(Long paramLong); + + Role selectRoleById(Long paramLong); + + int deleteRoleById(Long paramLong); + + int deleteRoleByIds(Long[] paramArrayOfLong); + + int updateRole(Role paramRole); + + int updateRoleSqlite(Role paramRole); + + int insertRole(Role paramRole); + + Role checkRoleNameUnique(String paramString); + + Role checkRoleKeyUnique(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\role\mapper\RoleMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/role/mapper/RoleMenuMapper.java b/src/main/java/com/archive/project/system/role/mapper/RoleMenuMapper.java new file mode 100644 index 0000000..b875463 --- /dev/null +++ b/src/main/java/com/archive/project/system/role/mapper/RoleMenuMapper.java @@ -0,0 +1,24 @@ +package com.archive.project.system.role.mapper + +-INF.classes.com.archive.project.system.role.mapper; + +import com.archive.project.system.role.domain.RoleMenu; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface RoleMenuMapper { + int deleteRoleMenuByRoleId(Long paramLong); + + int deleteRoleMenu(Long[] paramArrayOfLong); + + int selectCountRoleMenuByMenuId(Long paramLong); + + int batchRoleMenu(List paramList); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\role\mapper\RoleMenuMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/role/service/IRoleService.java b/src/main/java/com/archive/project/system/role/service/IRoleService.java new file mode 100644 index 0000000..49b9f50 --- /dev/null +++ b/src/main/java/com/archive/project/system/role/service/IRoleService.java @@ -0,0 +1,52 @@ +package com.archive.project.system.role.service + +-INF.classes.com.archive.project.system.role.service; + +import com.archive.project.system.role.domain.Role; +import com.archive.project.system.user.domain.UserRole; +import java.util.List; +import java.util.Set; + +public interface IRoleService { + List selectRoleList(Role paramRole); + + Set selectRoleKeys(Long paramLong); + + List selectRolesByUserId(Long paramLong); + + List selectRoleAll(); + + Role selectRoleById(Long paramLong); + + boolean deleteRoleById(Long paramLong); + + int deleteRoleByIds(String paramString); + + int insertRole(Role paramRole); + + int updateRole(Role paramRole); + + int authDataScope(Role paramRole); + + String checkRoleNameUnique(Role paramRole); + + String checkRoleKeyUnique(Role paramRole); + + void checkRoleAllowed(Role paramRole); + + int countUserRoleByRoleId(Long paramLong); + + int changeStatus(Role paramRole); + + int deleteAuthUser(UserRole paramUserRole); + + int deleteAuthUsers(Long paramLong, String paramString); + + int insertAuthUsers(Long paramLong, String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\role\service\IRoleService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/role/service/RoleServiceImpl.java b/src/main/java/com/archive/project/system/role/service/RoleServiceImpl.java new file mode 100644 index 0000000..9b5cffc --- /dev/null +++ b/src/main/java/com/archive/project/system/role/service/RoleServiceImpl.java @@ -0,0 +1,439 @@ +/* */ package com.archive.project.system.role.service + +-INF.classes.com.archive.project.system.role.service; +/* */ +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.spring.SpringUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.aspectj.lang.annotation.DataScope; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.system.role.domain.Role; +/* */ import com.archive.project.system.role.domain.RoleDept; +/* */ import com.archive.project.system.role.domain.RoleMenu; +/* */ import com.archive.project.system.role.mapper.RoleDeptMapper; +/* */ import com.archive.project.system.role.mapper.RoleMapper; +/* */ import com.archive.project.system.role.mapper.RoleMenuMapper; +/* */ import com.archive.project.system.role.service.IRoleService; +/* */ import com.archive.project.system.user.domain.UserRole; +/* */ import com.archive.project.system.user.mapper.UserRoleMapper; +/* */ import java.util.ArrayList; +/* */ import java.util.Arrays; +/* */ import java.util.HashSet; +/* */ import java.util.List; +/* */ import java.util.Set; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class RoleServiceImpl +/* */ implements IRoleService +/* */ { +/* */ @Autowired +/* */ private RoleMapper roleMapper; +/* */ @Autowired +/* */ private RoleMenuMapper roleMenuMapper; +/* */ @Autowired +/* */ private UserRoleMapper userRoleMapper; +/* */ @Autowired +/* */ private RoleDeptMapper roleDeptMapper; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ @DataScope(deptAlias = "d") +/* */ public List selectRoleList(Role role) { +/* 63 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 64 */ return this.roleMapper.selectRoleList(role); +/* */ } +/* 66 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 67 */ return this.roleMapper.selectRoleListSqlite(role); +/* */ } +/* 69 */ return this.roleMapper.selectRoleList(role); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Set selectRoleKeys(Long userId) { +/* 86 */ List perms = this.roleMapper.selectRolesByUserId(userId); +/* 87 */ Set permsSet = new HashSet<>(); +/* 88 */ for (Role perm : perms) { +/* */ +/* 90 */ if (StringUtils.isNotNull(perm)) +/* */ { +/* 92 */ permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(","))); +/* */ } +/* */ } +/* 95 */ return permsSet; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectRolesByUserId(Long userId) { +/* 107 */ List userRoles = this.roleMapper.selectRolesByUserId(userId); +/* 108 */ List roles = selectRoleAll(); +/* 109 */ for (Role role : roles) { +/* */ +/* 111 */ for (Role userRole : userRoles) { +/* */ +/* 113 */ if (role.getRoleId().longValue() == userRole.getRoleId().longValue()) +/* */ { +/* 115 */ role.setFlag(true); +/* */ } +/* */ } +/* */ } +/* */ +/* 120 */ return roles; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectRoleAll() { +/* 131 */ return ((com.archive.project.system.role.service.RoleServiceImpl)SpringUtils.getAopProxy(this)).selectRoleList(new Role()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Role selectRoleById(Long roleId) { +/* 143 */ return this.roleMapper.selectRoleById(roleId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public boolean deleteRoleById(Long roleId) { +/* 157 */ this.roleMenuMapper.deleteRoleMenuByRoleId(roleId); +/* */ +/* 159 */ this.roleDeptMapper.deleteRoleDeptByRoleId(roleId); +/* 160 */ return (this.roleMapper.deleteRoleById(roleId) > 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int deleteRoleByIds(String ids) { +/* 173 */ Long[] roleIds = Convert.toLongArray(ids); +/* 174 */ for (Long roleId : roleIds) { +/* */ +/* 176 */ checkRoleAllowed(new Role(roleId)); +/* 177 */ Role role = selectRoleById(roleId); +/* 178 */ if (countUserRoleByRoleId(roleId) > 0) +/* */ { +/* 180 */ throw new BusinessException(String.format("%1$s已分配,不能删除", new Object[] { role.getRoleName() })); +/* */ } +/* */ } +/* */ +/* 184 */ this.roleMenuMapper.deleteRoleMenu(roleIds); +/* */ +/* 186 */ this.roleDeptMapper.deleteRoleDept(roleIds); +/* 187 */ return this.roleMapper.deleteRoleByIds(roleIds); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int insertRole(Role role) { +/* 200 */ role.setCreateBy(ShiroUtils.getLoginName()); +/* */ +/* 202 */ this.roleMapper.insertRole(role); +/* 203 */ return insertRoleMenu(role); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int updateRole(Role role) { +/* 216 */ role.setUpdateBy(ShiroUtils.getLoginName()); +/* */ +/* 218 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 219 */ this.roleMapper.updateRole(role); +/* */ } +/* 221 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 222 */ this.roleMapper.updateRoleSqlite(role); +/* */ } +/* */ +/* */ +/* 226 */ this.roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId()); +/* 227 */ return insertRoleMenu(role); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int authDataScope(Role role) { +/* 240 */ role.setUpdateBy(ShiroUtils.getLoginName()); +/* */ +/* 242 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 243 */ this.roleMapper.updateRole(role); +/* */ } +/* 245 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 246 */ this.roleMapper.updateRoleSqlite(role); +/* */ } +/* */ +/* 249 */ this.roleDeptMapper.deleteRoleDeptByRoleId(role.getRoleId()); +/* */ +/* 251 */ return insertRoleDept(role); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertRoleMenu(Role role) { +/* 261 */ int rows = 1; +/* */ +/* 263 */ List list = new ArrayList<>(); +/* 264 */ for (Long menuId : role.getMenuIds()) { +/* */ +/* 266 */ RoleMenu rm = new RoleMenu(); +/* 267 */ rm.setRoleId(role.getRoleId()); +/* 268 */ rm.setMenuId(menuId); +/* 269 */ list.add(rm); +/* */ } +/* 271 */ if (list.size() > 0) +/* */ { +/* 273 */ rows = this.roleMenuMapper.batchRoleMenu(list); +/* */ } +/* 275 */ return rows; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertRoleDept(Role role) { +/* 285 */ int rows = 1; +/* */ +/* 287 */ List list = new ArrayList<>(); +/* 288 */ for (Long deptId : role.getDeptIds()) { +/* */ +/* 290 */ RoleDept rd = new RoleDept(); +/* 291 */ rd.setRoleId(role.getRoleId()); +/* 292 */ rd.setDeptId(deptId); +/* 293 */ list.add(rd); +/* */ } +/* 295 */ if (list.size() > 0) +/* */ { +/* 297 */ rows = this.roleDeptMapper.batchRoleDept(list); +/* */ } +/* 299 */ return rows; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkRoleNameUnique(Role role) { +/* 311 */ Long roleId = Long.valueOf(StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId().longValue()); +/* 312 */ Role info = this.roleMapper.checkRoleNameUnique(role.getRoleName()); +/* 313 */ if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) +/* */ { +/* 315 */ return "1"; +/* */ } +/* 317 */ return "0"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkRoleKeyUnique(Role role) { +/* 329 */ Long roleId = Long.valueOf(StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId().longValue()); +/* 330 */ Role info = this.roleMapper.checkRoleKeyUnique(role.getRoleKey()); +/* 331 */ if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) +/* */ { +/* 333 */ return "1"; +/* */ } +/* 335 */ return "0"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void checkRoleAllowed(Role role) { +/* 346 */ if (StringUtils.isNotNull(role.getRoleId()) && role.isAdmin()) +/* */ { +/* 348 */ throw new BusinessException("不允许操作超级管理员角色"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int countUserRoleByRoleId(Long roleId) { +/* 361 */ return this.userRoleMapper.countUserRoleByRoleId(roleId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int changeStatus(Role role) { +/* 373 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 374 */ return this.roleMapper.updateRole(role); +/* */ } +/* 376 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 377 */ return this.roleMapper.updateRoleSqlite(role); +/* */ } +/* 379 */ return this.roleMapper.updateRole(role); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteAuthUser(UserRole userRole) { +/* 393 */ return this.userRoleMapper.deleteUserRoleInfo(userRole); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteAuthUsers(Long roleId, String userIds) { +/* 406 */ return this.userRoleMapper.deleteUserRoleInfos(roleId, Convert.toLongArray(userIds)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertAuthUsers(Long roleId, String userIds) { +/* 419 */ Long[] users = Convert.toLongArray(userIds); +/* */ +/* 421 */ List list = new ArrayList<>(); +/* 422 */ for (Long userId : users) { +/* */ +/* 424 */ UserRole ur = new UserRole(); +/* 425 */ ur.setUserId(userId); +/* 426 */ ur.setRoleId(roleId); +/* 427 */ list.add(ur); +/* */ } +/* 429 */ return this.userRoleMapper.batchUserRole(list); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\role\service\RoleServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/controller/CaptchaController.java b/src/main/java/com/archive/project/system/user/controller/CaptchaController.java new file mode 100644 index 0000000..2e59147 --- /dev/null +++ b/src/main/java/com/archive/project/system/user/controller/CaptchaController.java @@ -0,0 +1,100 @@ +/* */ package com.archive.project.system.user.controller + +-INF.classes.com.archive.project.system.user.controller; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.google.code.kaptcha.Producer; +/* */ import java.awt.image.BufferedImage; +/* */ import java.io.IOException; +/* */ import java.io.OutputStream; +/* */ import javax.annotation.Resource; +/* */ import javax.imageio.ImageIO; +/* */ import javax.servlet.ServletOutputStream; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import javax.servlet.http.HttpSession; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.servlet.ModelAndView; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/captcha"}) +/* */ public class CaptchaController +/* */ extends BaseController +/* */ { +/* */ @Resource(name = "captchaProducer") +/* */ private Producer captchaProducer; +/* */ @Resource(name = "captchaProducerMath") +/* */ private Producer captchaProducerMath; +/* */ +/* */ @GetMapping({"/captchaImage"}) +/* */ public ModelAndView getKaptchaImage(HttpServletRequest request, HttpServletResponse response) { +/* 40 */ ServletOutputStream out = null; +/* */ +/* */ try { +/* 43 */ HttpSession session = request.getSession(); +/* 44 */ response.setDateHeader("Expires", 0L); +/* 45 */ response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate"); +/* 46 */ response.addHeader("Cache-Control", "post-check=0, pre-check=0"); +/* 47 */ response.setHeader("Pragma", "no-cache"); +/* 48 */ response.setContentType("image/jpeg"); +/* */ +/* 50 */ String type = request.getParameter("type"); +/* 51 */ String capStr = null; +/* 52 */ String code = null; +/* 53 */ BufferedImage bi = null; +/* 54 */ if ("math".equals(type)) { +/* */ +/* 56 */ String capText = this.captchaProducerMath.createText(); +/* 57 */ capStr = capText.substring(0, capText.lastIndexOf("@")); +/* 58 */ code = capText.substring(capText.lastIndexOf("@") + 1); +/* 59 */ bi = this.captchaProducerMath.createImage(capStr); +/* */ } +/* 61 */ else if ("char".equals(type)) { +/* */ +/* 63 */ capStr = code = this.captchaProducer.createText(); +/* 64 */ bi = this.captchaProducer.createImage(capStr); +/* */ } +/* 66 */ session.setAttribute("KAPTCHA_SESSION_KEY", code); +/* 67 */ out = response.getOutputStream(); +/* 68 */ ImageIO.write(bi, "jpg", (OutputStream)out); +/* 69 */ out.flush(); +/* */ +/* */ } +/* 72 */ catch (Exception e) { +/* */ +/* 74 */ e.printStackTrace(); +/* */ } finally { +/* */ +/* */ +/* */ try { +/* */ +/* 80 */ if (out != null) +/* */ { +/* 82 */ out.close(); +/* */ } +/* */ } +/* 85 */ catch (IOException e) { +/* */ +/* 87 */ e.printStackTrace(); +/* */ } +/* */ } +/* 90 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\controller\CaptchaController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/controller/IndexController.java b/src/main/java/com/archive/project/system/user/controller/IndexController.java new file mode 100644 index 0000000..ba1b99a --- /dev/null +++ b/src/main/java/com/archive/project/system/user/controller/IndexController.java @@ -0,0 +1,167 @@ +/* */ package com.archive.project.system.user.controller + +-INF.classes.com.archive.project.system.user.controller; +/* */ +/* */ import com.archive.common.utils.CookieUtils; +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.shiro.service.PasswordService; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import com.archive.project.system.menu.domain.Menu; +/* */ import com.archive.project.system.menu.service.IMenuService; +/* */ import com.archive.project.system.user.domain.User; +/* */ import java.util.Date; +/* */ import java.util.List; +/* */ import javax.servlet.http.Cookie; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ public class IndexController +/* */ extends BaseController +/* */ { +/* */ @Autowired +/* */ private IMenuService menuService; +/* */ @Autowired +/* */ private IConfigService configService; +/* */ @Autowired +/* */ private PasswordService passwordService; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ @GetMapping({"/index"}) +/* */ public String index(ModelMap mmap) { +/* 53 */ String systemName = this.configService.selectConfigByKey("archive.SystemName"); +/* */ +/* 55 */ User user = getSysUser(); +/* */ +/* 57 */ List menus = this.menuService.selectMenusByUser(user); +/* 58 */ mmap.put("menus", menus); +/* 59 */ mmap.put("user", user); +/* 60 */ mmap.put("sideTheme", this.configService.selectConfigByKey("sys.index.sideTheme")); +/* 61 */ mmap.put("skinName", this.configService.selectConfigByKey("sys.index.skinName")); +/* 62 */ mmap.put("ignoreFooter", this.configService.selectConfigByKey("sys.index.ignoreFooter")); +/* 63 */ mmap.put("copyrightYear", this.archiveConfig.getCopyrightYear()); +/* 64 */ mmap.put("demoEnabled", Boolean.valueOf(this.archiveConfig.isDemoEnabled())); +/* 65 */ mmap.put("isDefaultModifyPwd", Boolean.valueOf(initPasswordIsModify(user.getPwdUpdateDate()))); +/* 66 */ mmap.put("isPasswordExpired", Boolean.valueOf(passwordIsExpiration(user.getPwdUpdateDate()))); +/* 67 */ mmap.put("SystemName", systemName); +/* */ +/* 69 */ String menuStyle = this.configService.selectConfigByKey("sys.index.menuStyle"); +/* */ +/* 71 */ String indexStyle = ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent")) ? "index" : menuStyle; +/* */ +/* */ +/* 74 */ Cookie[] cookies = ServletUtils.getRequest().getCookies(); +/* 75 */ for (Cookie cookie : cookies) { +/* */ +/* 77 */ if (StringUtils.isNotEmpty(cookie.getName()) && "nav-style".equalsIgnoreCase(cookie.getName())) { +/* */ +/* 79 */ indexStyle = cookie.getValue(); +/* */ break; +/* */ } +/* */ } +/* 83 */ String webIndex = "topnav".equalsIgnoreCase(indexStyle) ? "index-topnav" : "index"; +/* 84 */ return webIndex; +/* */ } +/* */ +/* */ +/* */ +/* */ @GetMapping({"/lockscreen"}) +/* */ public String lockscreen(ModelMap mmap) { +/* 91 */ mmap.put("user", getSysUser()); +/* 92 */ ServletUtils.getSession().setAttribute("lockscreen", Boolean.valueOf(true)); +/* 93 */ return "lock"; +/* */ } +/* */ +/* */ +/* */ +/* */ @PostMapping({"/unlockscreen"}) +/* */ @ResponseBody +/* */ public AjaxResult unlockscreen(String password) { +/* 101 */ User user = getSysUser(); +/* 102 */ if (StringUtils.isNull(user)) +/* */ { +/* 104 */ return AjaxResult.error("服务器超时,请重新登陆"); +/* */ } +/* 106 */ if (this.passwordService.matches(user, password)) { +/* */ +/* 108 */ ServletUtils.getSession().removeAttribute("lockscreen"); +/* 109 */ return AjaxResult.success(); +/* */ } +/* 111 */ return AjaxResult.error("密码不正确,请重新输入。"); +/* */ } +/* */ +/* */ +/* */ +/* */ @GetMapping({"/system/switchSkin"}) +/* */ public String switchSkin() { +/* 118 */ return "skin"; +/* */ } +/* */ +/* */ +/* */ +/* */ @GetMapping({"/system/menuStyle/{style}"}) +/* */ public void menuStyle(@PathVariable String style, HttpServletResponse response) { +/* 125 */ CookieUtils.setCookie(response, "nav-style", style); +/* */ } +/* */ +/* */ +/* */ +/* */ @GetMapping({"/system/main"}) +/* */ public String main(ModelMap mmap) { +/* 132 */ mmap.put("version", this.archiveConfig.getVersion()); +/* 133 */ return "main"; +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean initPasswordIsModify(Date pwdUpdateDate) { +/* 139 */ Integer initPasswordModify = Convert.toInt(this.configService.selectConfigByKey("sys.account.initPasswordModify")); +/* 140 */ return (initPasswordModify != null && initPasswordModify.intValue() == 1 && pwdUpdateDate == null); +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean passwordIsExpiration(Date pwdUpdateDate) { +/* 146 */ Integer passwordValidateDays = Convert.toInt(this.configService.selectConfigByKey("sys.account.passwordValidateDays")); +/* 147 */ if (passwordValidateDays != null && passwordValidateDays.intValue() > 0) { +/* */ +/* 149 */ if (StringUtils.isNull(pwdUpdateDate)) +/* */ { +/* */ +/* 152 */ return true; +/* */ } +/* 154 */ Date nowDate = DateUtils.getNowDate(); +/* 155 */ return (DateUtils.differentDaysByMillisecond(nowDate, pwdUpdateDate) > passwordValidateDays.intValue()); +/* */ } +/* 157 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\controller\IndexController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/controller/LoginController.java b/src/main/java/com/archive/project/system/user/controller/LoginController.java new file mode 100644 index 0000000..0c52d06 --- /dev/null +++ b/src/main/java/com/archive/project/system/user/controller/LoginController.java @@ -0,0 +1,83 @@ +/* */ package com.archive.project.system.user.controller + +-INF.classes.com.archive.project.system.user.controller; +/* */ +/* */ import com.archive.common.utils.ServletUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import javax.servlet.http.HttpServletRequest; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import org.apache.shiro.SecurityUtils; +/* */ import org.apache.shiro.authc.AuthenticationException; +/* */ import org.apache.shiro.authc.AuthenticationToken; +/* */ import org.apache.shiro.authc.UsernamePasswordToken; +/* */ import org.apache.shiro.subject.Subject; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ public class LoginController +/* */ extends BaseController +/* */ { +/* */ @Autowired +/* */ private IConfigService configService; +/* */ +/* */ @GetMapping({"/login"}) +/* */ public String login(HttpServletRequest request, HttpServletResponse response, ModelMap mmap) { +/* 37 */ String systemName = this.configService.selectConfigByKey("archive.SystemName"); +/* 38 */ mmap.put("SystemName", systemName); +/* */ +/* 40 */ if (ServletUtils.isAjaxRequest(request)) +/* */ { +/* 42 */ return ServletUtils.renderString(response, "{\"code\":\"1\",\"msg\":\"未登录或登录超时。请重新登录\"}"); +/* */ } +/* */ +/* 45 */ return "login"; +/* */ } +/* */ +/* */ +/* */ @PostMapping({"/login"}) +/* */ @ResponseBody +/* */ public AjaxResult ajaxLogin(String username, String password, Boolean rememberMe) { +/* 52 */ UsernamePasswordToken token = new UsernamePasswordToken(username, password, rememberMe.booleanValue()); +/* 53 */ Subject subject = SecurityUtils.getSubject(); +/* */ +/* */ try { +/* 56 */ subject.login((AuthenticationToken)token); +/* 57 */ return success(); +/* */ } +/* 59 */ catch (AuthenticationException e) { +/* */ +/* 61 */ String msg = "用户或密码错误"; +/* 62 */ if (StringUtils.isNotEmpty(e.getMessage())) +/* */ { +/* 64 */ msg = e.getMessage(); +/* */ } +/* 66 */ return error(msg); +/* */ } +/* */ } +/* */ +/* */ +/* */ @GetMapping({"/unauth"}) +/* */ public String unauth() { +/* 73 */ return "error/unauth"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\controller\LoginController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/controller/ProfileController.java b/src/main/java/com/archive/project/system/user/controller/ProfileController.java new file mode 100644 index 0000000..776affc --- /dev/null +++ b/src/main/java/com/archive/project/system/user/controller/ProfileController.java @@ -0,0 +1,181 @@ +/* */ package com.archive.project.system.user.controller + +-INF.classes.com.archive.project.system.user.controller; +/* */ +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.file.FileUploadUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.shiro.service.PasswordService; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.system.user.domain.User; +/* */ import com.archive.project.system.user.service.IUserService; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.RequestParam; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ import org.springframework.web.multipart.MultipartFile; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/system/user/profile"}) +/* */ public class ProfileController +/* */ extends BaseController +/* */ { +/* 34 */ private static final Logger log = LoggerFactory.getLogger(com.archive.project.system.user.controller.ProfileController.class); +/* */ +/* 36 */ private String prefix = "system/user/profile"; +/* */ +/* */ +/* */ @Autowired +/* */ private IUserService userService; +/* */ +/* */ +/* */ @Autowired +/* */ private PasswordService passwordService; +/* */ +/* */ +/* */ +/* */ @GetMapping +/* */ public String profile(ModelMap mmap) { +/* 50 */ User user = getSysUser(); +/* 51 */ mmap.put("user", user); +/* 52 */ mmap.put("roleGroup", this.userService.selectUserRoleGroup(user.getUserId())); +/* 53 */ mmap.put("postGroup", this.userService.selectUserPostGroup(user.getUserId())); +/* 54 */ return this.prefix + "/profile"; +/* */ } +/* */ +/* */ +/* */ @GetMapping({"/checkPassword"}) +/* */ @ResponseBody +/* */ public boolean checkPassword(String password) { +/* 61 */ User user = getSysUser(); +/* 62 */ if (this.passwordService.matches(user, password)) +/* */ { +/* 64 */ return true; +/* */ } +/* 66 */ return false; +/* */ } +/* */ +/* */ +/* */ @GetMapping({"/resetPwd"}) +/* */ public String resetPwd(ModelMap mmap) { +/* 72 */ User user = getSysUser(); +/* 73 */ mmap.put("user", this.userService.selectUserById(user.getUserId())); +/* 74 */ return this.prefix + "/resetPwd"; +/* */ } +/* */ +/* */ +/* */ @Log(title = "重置密码", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/resetPwd"}) +/* */ @ResponseBody +/* */ public AjaxResult resetPwd(String oldPassword, String newPassword) { +/* 82 */ User user = getSysUser(); +/* 83 */ if (!this.passwordService.matches(user, oldPassword)) +/* */ { +/* 85 */ return error("修改密码失败,旧密码错误"); +/* */ } +/* 87 */ if (this.passwordService.matches(user, newPassword)) +/* */ { +/* 89 */ return error("新密码不能与旧密码相同"); +/* */ } +/* 91 */ user.setPassword(newPassword); +/* 92 */ user.setPwdUpdateDate(DateUtils.getNowDate()); +/* 93 */ if (this.userService.resetUserPwd(user) > 0) { +/* */ +/* 95 */ setSysUser(this.userService.selectUserById(user.getUserId())); +/* 96 */ return success(); +/* */ } +/* 98 */ return error("修改密码异常,请联系管理员"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit"}) +/* */ public String edit(ModelMap mmap) { +/* 107 */ User user = getSysUser(); +/* 108 */ mmap.put("user", this.userService.selectUserById(user.getUserId())); +/* 109 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/avatar"}) +/* */ public String avatar(ModelMap mmap) { +/* 118 */ User user = getSysUser(); +/* 119 */ mmap.put("user", this.userService.selectUserById(user.getUserId())); +/* 120 */ return this.prefix + "/avatar"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "个人信息", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/update"}) +/* */ @ResponseBody +/* */ public AjaxResult update(User user) { +/* 131 */ User currentUser = getSysUser(); +/* 132 */ currentUser.setUserName(user.getUserName()); +/* 133 */ currentUser.setEmail(user.getEmail()); +/* 134 */ currentUser.setPhonenumber(user.getPhonenumber()); +/* 135 */ currentUser.setSex(user.getSex()); +/* 136 */ if (this.userService.updateUserInfo(currentUser) > 0) { +/* */ +/* 138 */ setSysUser(this.userService.selectUserById(currentUser.getUserId())); +/* 139 */ return success(); +/* */ } +/* 141 */ return error(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "个人信息", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/updateAvatar"}) +/* */ @ResponseBody +/* */ public AjaxResult updateAvatar(@RequestParam("avatarfile") MultipartFile file) { +/* 152 */ User currentUser = getSysUser(); +/* */ +/* */ try { +/* 155 */ if (!file.isEmpty()) { +/* */ +/* 157 */ String avatar = FileUploadUtils.upload(ArchiveConfig.getInstance().getAvatarPath(), file); +/* 158 */ currentUser.setAvatar(avatar); +/* 159 */ if (this.userService.updateUserInfo(currentUser) > 0) { +/* */ +/* 161 */ setSysUser(this.userService.selectUserById(currentUser.getUserId())); +/* 162 */ return success(); +/* */ } +/* */ } +/* 165 */ return error(); +/* */ } +/* 167 */ catch (Exception e) { +/* */ +/* 169 */ log.error("修改头像失败!", e); +/* 170 */ return error(e.getMessage()); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\controller\ProfileController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/controller/RegisterController.java b/src/main/java/com/archive/project/system/user/controller/RegisterController.java new file mode 100644 index 0000000..2f23c9a --- /dev/null +++ b/src/main/java/com/archive/project/system/user/controller/RegisterController.java @@ -0,0 +1,54 @@ +/* */ package com.archive.project.system.user.controller + +-INF.classes.com.archive.project.system.user.controller; +/* */ +/* */ import com.archive.framework.shiro.service.RegisterService; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import com.archive.project.system.user.domain.User; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.util.StringUtils; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ public class RegisterController +/* */ extends BaseController +/* */ { +/* */ @Autowired +/* */ private RegisterService registerService; +/* */ @Autowired +/* */ private IConfigService configService; +/* */ +/* */ @GetMapping({"/register"}) +/* */ public String register() { +/* 32 */ return "register"; +/* */ } +/* */ +/* */ +/* */ @PostMapping({"/register"}) +/* */ @ResponseBody +/* */ public AjaxResult ajaxRegister(User user) { +/* 39 */ if (!"true".equals(this.configService.selectConfigByKey("sys.account.registerUser"))) +/* */ { +/* 41 */ return error("当前系统没有开启注册功能!"); +/* */ } +/* 43 */ String msg = this.registerService.register(user); +/* 44 */ return StringUtils.isEmpty(msg) ? success() : error(msg); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\controller\RegisterController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/controller/UserController.java b/src/main/java/com/archive/project/system/user/controller/UserController.java new file mode 100644 index 0000000..b1812a8 --- /dev/null +++ b/src/main/java/com/archive/project/system/user/controller/UserController.java @@ -0,0 +1,285 @@ +/* */ package com.archive.project.system.user.controller + +-INF.classes.com.archive.project.system.user.controller; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.poi.ExcelUtil; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.system.post.service.IPostService; +/* */ import com.archive.project.system.role.domain.Role; +/* */ import com.archive.project.system.role.service.IRoleService; +/* */ import com.archive.project.system.user.domain.User; +/* */ import com.archive.project.system.user.service.IUserService; +/* */ import java.util.List; +/* */ import java.util.stream.Collectors; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ import org.springframework.web.multipart.MultipartFile; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/system/user"}) +/* */ public class UserController +/* */ extends BaseController +/* */ { +/* 40 */ private String prefix = "system/user"; +/* */ +/* */ @Autowired +/* */ private IUserService userService; +/* */ +/* */ @Autowired +/* */ private IRoleService roleService; +/* */ +/* */ @Autowired +/* */ private IPostService postService; +/* */ +/* */ +/* */ @RequiresPermissions({"system:user:view"}) +/* */ @GetMapping +/* */ public String user() { +/* 55 */ return this.prefix + "/user"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"system:user:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo list(User user) { +/* 63 */ startPage(); +/* 64 */ List list = this.userService.selectUserList(user); +/* 65 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ @Log(title = "用户管理", businessType = BusinessType.EXPORT) +/* */ @RequiresPermissions({"system:user:export"}) +/* */ @PostMapping({"/export"}) +/* */ @ResponseBody +/* */ public AjaxResult export(User user) { +/* 74 */ List list = this.userService.selectUserList(user); +/* 75 */ ExcelUtil util = new ExcelUtil(User.class); +/* 76 */ return util.exportExcel(list, "用户数据"); +/* */ } +/* */ +/* */ +/* */ @Log(title = "用户管理", businessType = BusinessType.IMPORT) +/* */ @RequiresPermissions({"system:user:import"}) +/* */ @PostMapping({"/importData"}) +/* */ @ResponseBody +/* */ public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { +/* 85 */ ExcelUtil util = new ExcelUtil(User.class); +/* 86 */ List userList = util.importExcel(file.getInputStream()); +/* 87 */ String message = this.userService.importUser(userList, Boolean.valueOf(updateSupport)); +/* 88 */ return AjaxResult.success(message); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"system:user:view"}) +/* */ @GetMapping({"/importTemplate"}) +/* */ @ResponseBody +/* */ public AjaxResult importTemplate() { +/* 96 */ ExcelUtil util = new ExcelUtil(User.class); +/* 97 */ return util.importTemplateExcel("用户数据"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/add"}) +/* */ public String add(ModelMap mmap) { +/* 106 */ mmap.put("roles", this.roleService.selectRoleAll().stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); +/* 107 */ mmap.put("posts", this.postService.selectPostAll()); +/* 108 */ return this.prefix + "/add"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:user:add"}) +/* */ @Log(title = "用户管理", businessType = BusinessType.INSERT) +/* */ @PostMapping({"/add"}) +/* */ @ResponseBody +/* */ public AjaxResult addSave(@Validated User user) { +/* 120 */ if ("1".equals(this.userService.checkLoginNameUnique(user.getLoginName()))) +/* */ { +/* 122 */ return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在"); +/* */ } +/* 124 */ if (StringUtils.isNotEmpty(user.getPhonenumber()) && "1" +/* 125 */ .equals(this.userService.checkPhoneUnique(user))) +/* */ { +/* 127 */ return error("新增用户'" + user.getLoginName() + "'失败,手机号码已存在"); +/* */ } +/* 129 */ if (StringUtils.isNotEmpty(user.getEmail()) && "1" +/* 130 */ .equals(this.userService.checkEmailUnique(user))) +/* */ { +/* 132 */ return error("新增用户'" + user.getLoginName() + "'失败,邮箱账号已存在"); +/* */ } +/* 134 */ return toAjax(this.userService.insertUser(user)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{userId}"}) +/* */ public String edit(@PathVariable("userId") Long userId, ModelMap mmap) { +/* 143 */ List roles = this.roleService.selectRolesByUserId(userId); +/* 144 */ mmap.put("user", this.userService.selectUserById(userId)); +/* 145 */ mmap.put("roles", User.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); +/* 146 */ mmap.put("posts", this.postService.selectPostsByUserId(userId)); +/* 147 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:user:edit"}) +/* */ @Log(title = "用户管理", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(@Validated User user) { +/* 159 */ this.userService.checkUserAllowed(user); +/* 160 */ if (StringUtils.isNotEmpty(user.getPhonenumber()) && "1" +/* 161 */ .equals(this.userService.checkPhoneUnique(user))) +/* */ { +/* 163 */ return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在"); +/* */ } +/* 165 */ if (StringUtils.isNotEmpty(user.getEmail()) && "1" +/* 166 */ .equals(this.userService.checkEmailUnique(user))) +/* */ { +/* 168 */ return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在"); +/* */ } +/* 170 */ return toAjax(this.userService.updateUser(user)); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"system:user:resetPwd"}) +/* */ @GetMapping({"/resetPwd/{userId}"}) +/* */ public String resetPwd(@PathVariable("userId") Long userId, ModelMap mmap) { +/* 177 */ mmap.put("user", this.userService.selectUserById(userId)); +/* 178 */ return this.prefix + "/resetPwd"; +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"system:user:resetPwd"}) +/* */ @Log(title = "重置密码", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/resetPwd"}) +/* */ @ResponseBody +/* */ public AjaxResult resetPwdSave(User user) { +/* 187 */ this.userService.checkUserAllowed(user); +/* 188 */ if (this.userService.resetUserPwd(user) > 0) { +/* */ +/* 190 */ if (ShiroUtils.getUserId().longValue() == user.getUserId().longValue()) +/* */ { +/* 192 */ setSysUser(this.userService.selectUserById(user.getUserId())); +/* */ } +/* 194 */ return success(); +/* */ } +/* 196 */ return error(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/authRole/{userId}"}) +/* */ public String authRole(@PathVariable("userId") Long userId, ModelMap mmap) { +/* 205 */ User user = this.userService.selectUserById(userId); +/* */ +/* 207 */ List roles = this.roleService.selectRolesByUserId(userId); +/* 208 */ mmap.put("user", user); +/* 209 */ mmap.put("roles", User.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); +/* 210 */ return this.prefix + "/authRole"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"system:user:add"}) +/* */ @Log(title = "用户管理", businessType = BusinessType.GRANT) +/* */ @PostMapping({"/authRole/insertAuthRole"}) +/* */ @ResponseBody +/* */ public AjaxResult insertAuthRole(Long userId, Long[] roleIds) { +/* 222 */ this.userService.insertUserAuth(userId, roleIds); +/* 223 */ return success(); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"system:user:remove"}) +/* */ @Log(title = "用户管理", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 232 */ return toAjax(this.userService.deleteUserByIds(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkLoginNameUnique"}) +/* */ @ResponseBody +/* */ public String checkLoginNameUnique(User user) { +/* 242 */ return this.userService.checkLoginNameUnique(user.getLoginName()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkPhoneUnique"}) +/* */ @ResponseBody +/* */ public String checkPhoneUnique(User user) { +/* 252 */ return this.userService.checkPhoneUnique(user); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @PostMapping({"/checkEmailUnique"}) +/* */ @ResponseBody +/* */ public String checkEmailUnique(User user) { +/* 262 */ return this.userService.checkEmailUnique(user); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Log(title = "用户管理", businessType = BusinessType.UPDATE) +/* */ @RequiresPermissions({"system:user:edit"}) +/* */ @PostMapping({"/changeStatus"}) +/* */ @ResponseBody +/* */ public AjaxResult changeStatus(User user) { +/* 274 */ this.userService.checkUserAllowed(user); +/* 275 */ return toAjax(this.userService.changeStatus(user)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\controller\UserController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/domain/User.java b/src/main/java/com/archive/project/system/user/domain/User.java new file mode 100644 index 0000000..56b46ac --- /dev/null +++ b/src/main/java/com/archive/project/system/user/domain/User.java @@ -0,0 +1,403 @@ +/* */ package com.archive.project.system.user.domain + +-INF.classes.com.archive.project.system.user.domain; +/* */ +/* */ import com.archive.framework.aspectj.lang.annotation.Excel; +/* */ import com.archive.framework.aspectj.lang.annotation.Excels; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import com.archive.project.system.dept.domain.Dept; +/* */ import com.archive.project.system.role.domain.Role; +/* */ import com.fasterxml.jackson.annotation.JsonIgnore; +/* */ import java.util.Date; +/* */ import java.util.List; +/* */ import javax.validation.constraints.Email; +/* */ import javax.validation.constraints.NotBlank; +/* */ import javax.validation.constraints.Size; +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ import org.apache.shiro.crypto.SecureRandomNumberGenerator; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class User +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ @Excel(name = "用户序号", cellType = Excel.ColumnType.NUMERIC, prompt = "用户编号") +/* */ private Long userId; +/* */ @Excel(name = "部门编号", type = Excel.Type.IMPORT) +/* */ private Long deptId; +/* */ private Long parentId; +/* */ private Long roleId; +/* */ @Excel(name = "登录名称") +/* */ private String loginName; +/* */ @Excel(name = "用户名称") +/* */ private String userName; +/* */ private String userType; +/* */ @Excel(name = "用户邮箱") +/* */ private String email; +/* */ @Excel(name = "手机号码") +/* */ private String phonenumber; +/* */ @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知") +/* */ private String sex; +/* */ private String avatar; +/* */ private String password; +/* */ private String salt; +/* */ @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用") +/* */ private String status; +/* */ private String delFlag; +/* */ @Excel(name = "最后登录IP", type = Excel.Type.EXPORT) +/* */ private String loginIp; +/* */ @Excel(name = "最后登录时间", width = 30.0D, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT) +/* */ private Date loginDate; +/* */ private Date pwdUpdateDate; +/* */ @Excels({@Excel(name = "部门名称", targetAttr = "deptName", type = Excel.Type.EXPORT), @Excel(name = "部门负责人", targetAttr = "leader", type = Excel.Type.EXPORT)}) +/* */ private Dept dept; +/* */ private List roles; +/* */ private Long[] roleIds; +/* */ private Long[] postIds; +/* */ +/* */ public User() {} +/* */ +/* */ public User(Long userId) { +/* 113 */ this.userId = userId; +/* */ } +/* */ +/* */ +/* */ public Long getUserId() { +/* 118 */ return this.userId; +/* */ } +/* */ +/* */ +/* */ public void setUserId(Long userId) { +/* 123 */ this.userId = userId; +/* */ } +/* */ +/* */ +/* */ public boolean isAdmin() { +/* 128 */ return isAdmin(this.userId); +/* */ } +/* */ +/* */ +/* */ public static boolean isAdmin(Long userId) { +/* 133 */ return (userId != null && 1L == userId.longValue()); +/* */ } +/* */ +/* */ +/* */ public Long getDeptId() { +/* 138 */ return this.deptId; +/* */ } +/* */ +/* */ +/* */ public void setDeptId(Long deptId) { +/* 143 */ this.deptId = deptId; +/* */ } +/* */ +/* */ +/* */ public Long getParentId() { +/* 148 */ return this.parentId; +/* */ } +/* */ +/* */ +/* */ public void setParentId(Long parentId) { +/* 153 */ this.parentId = parentId; +/* */ } +/* */ +/* */ +/* */ public Long getRoleId() { +/* 158 */ return this.roleId; +/* */ } +/* */ +/* */ +/* */ public void setRoleId(Long roleId) { +/* 163 */ this.roleId = roleId; +/* */ } +/* */ +/* */ +/* */ @NotBlank(message = "登录账号不能为空") +/* */ @Size(min = 0, max = 30, message = "登录账号长度不能超过30个字符") +/* */ public String getLoginName() { +/* 170 */ return this.loginName; +/* */ } +/* */ +/* */ +/* */ public void setLoginName(String loginName) { +/* 175 */ this.loginName = loginName; +/* */ } +/* */ +/* */ +/* */ @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符") +/* */ public String getUserName() { +/* 181 */ return this.userName; +/* */ } +/* */ +/* */ +/* */ public void setUserName(String userName) { +/* 186 */ this.userName = userName; +/* */ } +/* */ +/* */ +/* */ public String getUserType() { +/* 191 */ return this.userType; +/* */ } +/* */ +/* */ +/* */ public void setUserType(String userType) { +/* 196 */ this.userType = userType; +/* */ } +/* */ +/* */ +/* */ @Email(message = "邮箱格式不正确") +/* */ @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") +/* */ public String getEmail() { +/* 203 */ return this.email; +/* */ } +/* */ +/* */ +/* */ public void setEmail(String email) { +/* 208 */ this.email = email; +/* */ } +/* */ +/* */ +/* */ @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符") +/* */ public String getPhonenumber() { +/* 214 */ return this.phonenumber; +/* */ } +/* */ +/* */ +/* */ public void setPhonenumber(String phonenumber) { +/* 219 */ this.phonenumber = phonenumber; +/* */ } +/* */ +/* */ +/* */ public String getSex() { +/* 224 */ return this.sex; +/* */ } +/* */ +/* */ +/* */ public void setSex(String sex) { +/* 229 */ this.sex = sex; +/* */ } +/* */ +/* */ +/* */ public String getAvatar() { +/* 234 */ return this.avatar; +/* */ } +/* */ +/* */ +/* */ public void setAvatar(String avatar) { +/* 239 */ this.avatar = avatar; +/* */ } +/* */ +/* */ +/* */ @JsonIgnore +/* */ public String getPassword() { +/* 245 */ return this.password; +/* */ } +/* */ +/* */ +/* */ public void setPassword(String password) { +/* 250 */ this.password = password; +/* */ } +/* */ +/* */ +/* */ public String getSalt() { +/* 255 */ return this.salt; +/* */ } +/* */ +/* */ +/* */ public void setSalt(String salt) { +/* 260 */ this.salt = salt; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void randomSalt() { +/* 269 */ SecureRandomNumberGenerator secureRandom = new SecureRandomNumberGenerator(); +/* 270 */ String hex = secureRandom.nextBytes(3).toHex(); +/* 271 */ setSalt(hex); +/* */ } +/* */ +/* */ +/* */ public String getStatus() { +/* 276 */ return this.status; +/* */ } +/* */ +/* */ +/* */ public void setStatus(String status) { +/* 281 */ this.status = status; +/* */ } +/* */ +/* */ +/* */ public String getDelFlag() { +/* 286 */ return this.delFlag; +/* */ } +/* */ +/* */ +/* */ public void setDelFlag(String delFlag) { +/* 291 */ this.delFlag = delFlag; +/* */ } +/* */ +/* */ +/* */ public String getLoginIp() { +/* 296 */ return this.loginIp; +/* */ } +/* */ +/* */ +/* */ public void setLoginIp(String loginIp) { +/* 301 */ this.loginIp = loginIp; +/* */ } +/* */ +/* */ +/* */ public Date getLoginDate() { +/* 306 */ return this.loginDate; +/* */ } +/* */ +/* */ +/* */ public void setLoginDate(Date loginDate) { +/* 311 */ this.loginDate = loginDate; +/* */ } +/* */ +/* */ +/* */ public Date getPwdUpdateDate() { +/* 316 */ return this.pwdUpdateDate; +/* */ } +/* */ +/* */ +/* */ public void setPwdUpdateDate(Date pwdUpdateDate) { +/* 321 */ this.pwdUpdateDate = pwdUpdateDate; +/* */ } +/* */ +/* */ +/* */ public Dept getDept() { +/* 326 */ if (this.dept == null) +/* */ { +/* 328 */ this.dept = new Dept(); +/* */ } +/* 330 */ return this.dept; +/* */ } +/* */ +/* */ +/* */ public void setDept(Dept dept) { +/* 335 */ this.dept = dept; +/* */ } +/* */ +/* */ +/* */ public List getRoles() { +/* 340 */ return this.roles; +/* */ } +/* */ +/* */ +/* */ public void setRoles(List roles) { +/* 345 */ this.roles = roles; +/* */ } +/* */ +/* */ +/* */ public Long[] getRoleIds() { +/* 350 */ return this.roleIds; +/* */ } +/* */ +/* */ +/* */ public void setRoleIds(Long[] roleIds) { +/* 355 */ this.roleIds = roleIds; +/* */ } +/* */ +/* */ +/* */ public Long[] getPostIds() { +/* 360 */ return this.postIds; +/* */ } +/* */ +/* */ +/* */ public void setPostIds(Long[] postIds) { +/* 365 */ this.postIds = postIds; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 370 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 371 */ .append("userId", getUserId()) +/* 372 */ .append("deptId", getDeptId()) +/* 373 */ .append("loginName", getLoginName()) +/* 374 */ .append("userName", getUserName()) +/* 375 */ .append("userType", getUserType()) +/* 376 */ .append("email", getEmail()) +/* 377 */ .append("phonenumber", getPhonenumber()) +/* 378 */ .append("sex", getSex()) +/* 379 */ .append("avatar", getAvatar()) +/* 380 */ .append("password", getPassword()) +/* 381 */ .append("salt", getSalt()) +/* 382 */ .append("status", getStatus()) +/* 383 */ .append("delFlag", getDelFlag()) +/* 384 */ .append("loginIp", getLoginIp()) +/* 385 */ .append("loginDate", getLoginDate()) +/* 386 */ .append("createBy", getCreateBy()) +/* 387 */ .append("createTime", getCreateTime()) +/* 388 */ .append("updateBy", getUpdateBy()) +/* 389 */ .append("updateTime", getUpdateTime()) +/* 390 */ .append("remark", getRemark()) +/* 391 */ .append("dept", getDept()) +/* 392 */ .append("roles", getRoles()) +/* 393 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\domain\User.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/domain/UserPost.java b/src/main/java/com/archive/project/system/user/domain/UserPost.java new file mode 100644 index 0000000..8c32ce8 --- /dev/null +++ b/src/main/java/com/archive/project/system/user/domain/UserPost.java @@ -0,0 +1,53 @@ +/* */ package com.archive.project.system.user.domain + +-INF.classes.com.archive.project.system.user.domain; +/* */ +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class UserPost +/* */ { +/* */ private Long userId; +/* */ private Long postId; +/* */ +/* */ public Long getUserId() { +/* 20 */ return this.userId; +/* */ } +/* */ +/* */ +/* */ public void setUserId(Long userId) { +/* 25 */ this.userId = userId; +/* */ } +/* */ +/* */ +/* */ public Long getPostId() { +/* 30 */ return this.postId; +/* */ } +/* */ +/* */ +/* */ public void setPostId(Long postId) { +/* 35 */ this.postId = postId; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 40 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 41 */ .append("userId", getUserId()) +/* 42 */ .append("postId", getPostId()) +/* 43 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\domain\UserPost.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/domain/UserRole.java b/src/main/java/com/archive/project/system/user/domain/UserRole.java new file mode 100644 index 0000000..b608379 --- /dev/null +++ b/src/main/java/com/archive/project/system/user/domain/UserRole.java @@ -0,0 +1,54 @@ +/* */ package com.archive.project.system.user.domain + +-INF.classes.com.archive.project.system.user.domain; +/* */ +/* */ import org.apache.commons.lang3.builder.ToStringBuilder; +/* */ import org.apache.commons.lang3.builder.ToStringStyle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class UserRole +/* */ { +/* */ private Long userId; +/* */ private Long roleId; +/* */ +/* */ public Long getUserId() { +/* 21 */ return this.userId; +/* */ } +/* */ +/* */ +/* */ public void setUserId(Long userId) { +/* 26 */ this.userId = userId; +/* */ } +/* */ +/* */ +/* */ public Long getRoleId() { +/* 31 */ return this.roleId; +/* */ } +/* */ +/* */ +/* */ public void setRoleId(Long roleId) { +/* 36 */ this.roleId = roleId; +/* */ } +/* */ +/* */ +/* */ public String toString() { +/* 41 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) +/* 42 */ .append("userId", getUserId()) +/* 43 */ .append("roleId", getRoleId()) +/* 44 */ .toString(); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\domain\UserRole.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/domain/UserStatus.java b/src/main/java/com/archive/project/system/user/domain/UserStatus.java new file mode 100644 index 0000000..2edcff1 --- /dev/null +++ b/src/main/java/com/archive/project/system/user/domain/UserStatus.java @@ -0,0 +1,37 @@ +/* */ package com.archive.project.system.user.domain-INF.classes.com.archive.project.system.user.domain; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public enum UserStatus +/* */ { +/* 11 */ OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除"); +/* */ +/* */ private final String info; +/* */ +/* */ private final String code; +/* */ +/* */ UserStatus(String code, String info) { +/* 18 */ this.code = code; +/* 19 */ this.info = info; +/* */ } +/* */ +/* */ +/* */ public String getCode() { +/* 24 */ return this.code; +/* */ } +/* */ +/* */ +/* */ public String getInfo() { +/* 29 */ return this.info; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\domain\UserStatus.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/mapper/UserMapper.java b/src/main/java/com/archive/project/system/user/mapper/UserMapper.java new file mode 100644 index 0000000..be49bdc --- /dev/null +++ b/src/main/java/com/archive/project/system/user/mapper/UserMapper.java @@ -0,0 +1,54 @@ +package com.archive.project.system.user.mapper + +-INF.classes.com.archive.project.system.user.mapper; + +import com.archive.project.system.user.domain.User; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface UserMapper { + List selectUserList(User paramUser); + + List selectUserListSqlite(User paramUser); + + List selectAllocatedList(User paramUser); + + List selectAllocatedListSqlite(User paramUser); + + List selectUnallocatedList(User paramUser); + + List selectUnallocatedListSqlite(User paramUser); + + User selectUserByLoginName(String paramString); + + User selectUserByPhoneNumber(String paramString); + + User selectUserByEmail(String paramString); + + User selectUserById(Long paramLong); + + int deleteUserById(Long paramLong); + + int deleteUserByIds(Long[] paramArrayOfLong); + + int updateUser(User paramUser); + + int updateUserSqlite(User paramUser); + + int insertUser(User paramUser); + + int insertUserSqlite(User paramUser); + + int checkLoginNameUnique(String paramString); + + User checkPhoneUnique(String paramString); + + User checkEmailUnique(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\mapper\UserMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/mapper/UserPostMapper.java b/src/main/java/com/archive/project/system/user/mapper/UserPostMapper.java new file mode 100644 index 0000000..97dd13c --- /dev/null +++ b/src/main/java/com/archive/project/system/user/mapper/UserPostMapper.java @@ -0,0 +1,22 @@ +package com.archive.project.system.user.mapper; + +import com.archive.project.system.user.domain.UserPost; +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository +public interface UserPostMapper { + int deleteUserPostByUserId(Long paramLong); + + int countUserPostById(Long paramLong); + + int deleteUserPost(Long[] paramArrayOfLong); + + int batchUserPost(List paramList); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\mapper\UserPostMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/mapper/UserRoleMapper.java b/src/main/java/com/archive/project/system/user/mapper/UserRoleMapper.java new file mode 100644 index 0000000..2434de0 --- /dev/null +++ b/src/main/java/com/archive/project/system/user/mapper/UserRoleMapper.java @@ -0,0 +1,31 @@ +package com.archive.project.system.user.mapper + +-INF.classes.com.archive.project.system.user.mapper; + +import com.archive.project.system.user.domain.UserRole; +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +@Repository +public interface UserRoleMapper { + List selectUserRoleByUserId(Long paramLong); + + int deleteUserRoleByUserId(Long paramLong); + + int deleteUserRole(Long[] paramArrayOfLong); + + int countUserRoleByRoleId(Long paramLong); + + int batchUserRole(List paramList); + + int deleteUserRoleInfo(UserRole paramUserRole); + + int deleteUserRoleInfos(@Param("roleId") Long paramLong, @Param("userIds") Long[] paramArrayOfLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\mapper\UserRoleMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/service/IUserService.java b/src/main/java/com/archive/project/system/user/service/IUserService.java new file mode 100644 index 0000000..95686c0 --- /dev/null +++ b/src/main/java/com/archive/project/system/user/service/IUserService.java @@ -0,0 +1,63 @@ +package com.archive.project.system.user.service + +-INF.classes.com.archive.project.system.user.service; + +import com.archive.project.system.user.domain.User; +import com.archive.project.system.user.domain.UserRole; +import java.util.List; + +public interface IUserService { + List selectUserList(User paramUser); + + List selectAllocatedList(User paramUser); + + List selectUnallocatedList(User paramUser); + + User selectUserByLoginName(String paramString); + + User selectUserByPhoneNumber(String paramString); + + User selectUserByEmail(String paramString); + + User selectUserById(Long paramLong); + + List selectUserRoleByUserId(Long paramLong); + + int deleteUserById(Long paramLong); + + int deleteUserByIds(String paramString); + + int insertUser(User paramUser); + + boolean registerUser(User paramUser); + + int updateUser(User paramUser); + + int updateUserInfo(User paramUser); + + void insertUserAuth(Long paramLong, Long[] paramArrayOfLong); + + int resetUserPwd(User paramUser); + + String checkLoginNameUnique(String paramString); + + String checkPhoneUnique(User paramUser); + + String checkEmailUnique(User paramUser); + + void checkUserAllowed(User paramUser); + + String selectUserRoleGroup(Long paramLong); + + String selectUserPostGroup(Long paramLong); + + String importUser(List paramList, Boolean paramBoolean); + + int changeStatus(User paramUser); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\service\IUserService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/system/user/service/UserServiceImpl.java b/src/main/java/com/archive/project/system/user/service/UserServiceImpl.java new file mode 100644 index 0000000..3c1f940 --- /dev/null +++ b/src/main/java/com/archive/project/system/user/service/UserServiceImpl.java @@ -0,0 +1,603 @@ +/* */ package com.archive.project.system.user.service + +-INF.classes.com.archive.project.system.user.service; +/* */ +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.aspectj.lang.annotation.DataScope; +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.framework.shiro.service.PasswordService; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import com.archive.project.system.post.domain.Post; +/* */ import com.archive.project.system.post.mapper.PostMapper; +/* */ import com.archive.project.system.role.domain.Role; +/* */ import com.archive.project.system.role.mapper.RoleMapper; +/* */ import com.archive.project.system.user.domain.User; +/* */ import com.archive.project.system.user.domain.UserPost; +/* */ import com.archive.project.system.user.domain.UserRole; +/* */ import com.archive.project.system.user.mapper.UserMapper; +/* */ import com.archive.project.system.user.mapper.UserPostMapper; +/* */ import com.archive.project.system.user.mapper.UserRoleMapper; +/* */ import com.archive.project.system.user.service.IUserService; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class UserServiceImpl +/* */ implements IUserService +/* */ { +/* 40 */ private static final Logger log = LoggerFactory.getLogger(com.archive.project.system.user.service.UserServiceImpl.class); +/* */ +/* */ +/* */ @Autowired +/* */ private UserMapper userMapper; +/* */ +/* */ +/* */ @Autowired +/* */ private RoleMapper roleMapper; +/* */ +/* */ +/* */ @Autowired +/* */ private PostMapper postMapper; +/* */ +/* */ +/* */ @Autowired +/* */ private UserPostMapper userPostMapper; +/* */ +/* */ +/* */ @Autowired +/* */ private UserRoleMapper userRoleMapper; +/* */ +/* */ +/* */ @Autowired +/* */ private IConfigService configService; +/* */ +/* */ +/* */ @Autowired +/* */ private PasswordService passwordService; +/* */ +/* */ +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ +/* */ @DataScope(deptAlias = "d", userAlias = "u") +/* */ public List selectUserList(User user) { +/* 77 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 78 */ return this.userMapper.selectUserList(user); +/* */ } +/* 80 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 81 */ return this.userMapper.selectUserListSqlite(user); +/* */ } +/* 83 */ return this.userMapper.selectUserList(user); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @DataScope(deptAlias = "d", userAlias = "u") +/* */ public List selectAllocatedList(User user) { +/* 98 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 99 */ return this.userMapper.selectAllocatedList(user); +/* */ } +/* 101 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 102 */ return this.userMapper.selectAllocatedListSqlite(user); +/* */ } +/* 104 */ return this.userMapper.selectAllocatedList(user); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @DataScope(deptAlias = "d", userAlias = "u") +/* */ public List selectUnallocatedList(User user) { +/* 119 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 120 */ return this.userMapper.selectUnallocatedList(user); +/* */ } +/* 122 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 123 */ return this.userMapper.selectUnallocatedListSqlite(user); +/* */ } +/* 125 */ return this.userMapper.selectUnallocatedList(user); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public User selectUserByLoginName(String userName) { +/* 139 */ return this.userMapper.selectUserByLoginName(userName); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public User selectUserByPhoneNumber(String phoneNumber) { +/* 151 */ return this.userMapper.selectUserByPhoneNumber(phoneNumber); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public User selectUserByEmail(String email) { +/* 163 */ return this.userMapper.selectUserByEmail(email); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public User selectUserById(Long userId) { +/* 175 */ return this.userMapper.selectUserById(userId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectUserRoleByUserId(Long userId) { +/* 187 */ return this.userRoleMapper.selectUserRoleByUserId(userId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int deleteUserById(Long userId) { +/* 201 */ this.userRoleMapper.deleteUserRoleByUserId(userId); +/* */ +/* 203 */ this.userPostMapper.deleteUserPostByUserId(userId); +/* 204 */ return this.userMapper.deleteUserById(userId); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int deleteUserByIds(String ids) { +/* 217 */ Long[] userIds = Convert.toLongArray(ids); +/* 218 */ for (Long userId : userIds) +/* */ { +/* 220 */ checkUserAllowed(new User(userId)); +/* */ } +/* */ +/* 223 */ this.userRoleMapper.deleteUserRole(userIds); +/* */ +/* 225 */ this.userPostMapper.deleteUserPost(userIds); +/* 226 */ return this.userMapper.deleteUserByIds(userIds); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int insertUser(User user) { +/* 239 */ user.randomSalt(); +/* 240 */ user.setPassword(this.passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt())); +/* 241 */ user.setCreateBy(ShiroUtils.getLoginName()); +/* */ +/* 243 */ int rows = 0; +/* 244 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 245 */ rows = this.userMapper.insertUser(user); +/* */ } +/* 247 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 248 */ rows = this.userMapper.insertUserSqlite(user); +/* */ } else { +/* 250 */ rows = this.userMapper.insertUser(user); +/* */ } +/* */ +/* */ +/* 254 */ insertUserPost(user); +/* */ +/* 256 */ insertUserRole(user.getUserId(), user.getRoleIds()); +/* 257 */ return rows; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean registerUser(User user) { +/* 269 */ user.setUserType("01"); +/* 270 */ user.randomSalt(); +/* 271 */ user.setPassword(this.passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt())); +/* 272 */ return (this.userMapper.insertUser(user) > 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public int updateUser(User user) { +/* 285 */ Long userId = user.getUserId(); +/* 286 */ user.setUpdateBy(ShiroUtils.getLoginName()); +/* */ +/* 288 */ this.userRoleMapper.deleteUserRoleByUserId(userId); +/* */ +/* 290 */ insertUserRole(user.getUserId(), user.getRoleIds()); +/* */ +/* 292 */ this.userPostMapper.deleteUserPostByUserId(userId); +/* */ +/* 294 */ insertUserPost(user); +/* 295 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 296 */ return this.userMapper.updateUser(user); +/* */ } +/* 298 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 299 */ return this.userMapper.updateUserSqlite(user); +/* */ } +/* 301 */ return this.userMapper.updateUser(user); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateUserInfo(User user) { +/* 313 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 314 */ return this.userMapper.updateUser(user); +/* */ } +/* 316 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 317 */ return this.userMapper.updateUserSqlite(user); +/* */ } +/* 319 */ return this.userMapper.updateUser(user); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void insertUserAuth(Long userId, Long[] roleIds) { +/* 331 */ this.userRoleMapper.deleteUserRoleByUserId(userId); +/* 332 */ insertUserRole(userId, roleIds); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int resetUserPwd(User user) { +/* 344 */ user.randomSalt(); +/* 345 */ user.setPassword(this.passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt())); +/* 346 */ return updateUserInfo(user); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void insertUserRole(Long userId, Long[] roleIds) { +/* 356 */ if (StringUtils.isNotNull(roleIds)) { +/* */ +/* */ +/* 359 */ List list = new ArrayList<>(); +/* 360 */ for (Long roleId : roleIds) { +/* */ +/* 362 */ UserRole ur = new UserRole(); +/* 363 */ ur.setUserId(userId); +/* 364 */ ur.setRoleId(roleId); +/* 365 */ list.add(ur); +/* */ } +/* 367 */ if (list.size() > 0) +/* */ { +/* 369 */ this.userRoleMapper.batchUserRole(list); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void insertUserPost(User user) { +/* 381 */ Long[] posts = user.getPostIds(); +/* 382 */ if (StringUtils.isNotNull(posts)) { +/* */ +/* */ +/* 385 */ List list = new ArrayList<>(); +/* 386 */ for (Long postId : user.getPostIds()) { +/* */ +/* 388 */ UserPost up = new UserPost(); +/* 389 */ up.setUserId(user.getUserId()); +/* 390 */ up.setPostId(postId); +/* 391 */ list.add(up); +/* */ } +/* 393 */ if (list.size() > 0) +/* */ { +/* 395 */ this.userPostMapper.batchUserPost(list); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkLoginNameUnique(String loginName) { +/* 409 */ int count = this.userMapper.checkLoginNameUnique(loginName); +/* 410 */ if (count > 0) +/* */ { +/* 412 */ return "1"; +/* */ } +/* 414 */ return "0"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkPhoneUnique(User user) { +/* 426 */ Long userId = Long.valueOf(StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId().longValue()); +/* 427 */ User info = this.userMapper.checkPhoneUnique(user.getPhonenumber()); +/* 428 */ if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) +/* */ { +/* 430 */ return "1"; +/* */ } +/* 432 */ return "0"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String checkEmailUnique(User user) { +/* 444 */ Long userId = Long.valueOf(StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId().longValue()); +/* 445 */ User info = this.userMapper.checkEmailUnique(user.getEmail()); +/* 446 */ if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) +/* */ { +/* 448 */ return "1"; +/* */ } +/* 450 */ return "0"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void checkUserAllowed(User user) { +/* 461 */ if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin()) +/* */ { +/* 463 */ throw new BusinessException("不允许操作超级管理员用户"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String selectUserRoleGroup(Long userId) { +/* 476 */ List list = this.roleMapper.selectRolesByUserId(userId); +/* 477 */ StringBuffer idsStr = new StringBuffer(); +/* 478 */ for (Role role : list) +/* */ { +/* 480 */ idsStr.append(role.getRoleName()).append(","); +/* */ } +/* 482 */ if (StringUtils.isNotEmpty(idsStr.toString())) +/* */ { +/* 484 */ return idsStr.substring(0, idsStr.length() - 1); +/* */ } +/* 486 */ return idsStr.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String selectUserPostGroup(Long userId) { +/* 498 */ List list = this.postMapper.selectPostsByUserId(userId); +/* 499 */ StringBuffer idsStr = new StringBuffer(); +/* 500 */ for (Post post : list) +/* */ { +/* 502 */ idsStr.append(post.getPostName()).append(","); +/* */ } +/* 504 */ if (StringUtils.isNotEmpty(idsStr.toString())) +/* */ { +/* 506 */ return idsStr.substring(0, idsStr.length() - 1); +/* */ } +/* 508 */ return idsStr.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String importUser(List userList, Boolean isUpdateSupport) { +/* 521 */ if (StringUtils.isNull(userList) || userList.size() == 0) +/* */ { +/* 523 */ throw new BusinessException("导入用户数据不能为空!"); +/* */ } +/* 525 */ int successNum = 0; +/* 526 */ int failureNum = 0; +/* 527 */ StringBuilder successMsg = new StringBuilder(); +/* 528 */ StringBuilder failureMsg = new StringBuilder(); +/* 529 */ String operName = ShiroUtils.getLoginName(); +/* 530 */ String password = this.configService.selectConfigByKey("sys.user.initPassword"); +/* 531 */ for (User user : userList) { +/* */ +/* */ +/* */ try { +/* */ +/* 536 */ User u = this.userMapper.selectUserByLoginName(user.getLoginName()); +/* 537 */ if (StringUtils.isNull(u)) { +/* */ +/* 539 */ user.setPassword(password); +/* 540 */ user.setCreateBy(operName); +/* 541 */ insertUser(user); +/* 542 */ successNum++; +/* 543 */ successMsg.append("
" + successNum + "、账号 " + user.getLoginName() + " 导入成功"); continue; +/* */ } +/* 545 */ if (isUpdateSupport.booleanValue()) { +/* */ +/* 547 */ user.setUpdateBy(operName); +/* 548 */ updateUser(user); +/* 549 */ successNum++; +/* 550 */ successMsg.append("
" + successNum + "、账号 " + user.getLoginName() + " 更新成功"); +/* */ +/* */ continue; +/* */ } +/* 554 */ failureNum++; +/* 555 */ failureMsg.append("
" + failureNum + "、账号 " + user.getLoginName() + " 已存在"); +/* */ +/* */ } +/* 558 */ catch (Exception e) { +/* */ +/* 560 */ failureNum++; +/* 561 */ String msg = "
" + failureNum + "、账号 " + user.getLoginName() + " 导入失败:"; +/* 562 */ failureMsg.append(msg + e.getMessage()); +/* 563 */ log.error(msg, e); +/* */ } +/* */ } +/* 566 */ if (failureNum > 0) { +/* */ +/* 568 */ failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); +/* 569 */ throw new BusinessException(failureMsg.toString()); +/* */ } +/* */ +/* */ +/* 573 */ successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); +/* */ +/* 575 */ return successMsg.toString(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int changeStatus(User user) { +/* 587 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 588 */ return this.userMapper.updateUser(user); +/* */ } +/* 590 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 591 */ return this.userMapper.updateUserSqlite(user); +/* */ } +/* 593 */ return this.userMapper.updateUser(user); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\service\UserServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/build/BuildController.java b/src/main/java/com/archive/project/tool/build/BuildController.java new file mode 100644 index 0000000..ef2a943 --- /dev/null +++ b/src/main/java/com/archive/project/tool/build/BuildController.java @@ -0,0 +1,34 @@ +/* */ package com.archive.project.tool.build + +-INF.classes.com.archive.project.tool.build; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/tool/build"}) +/* */ public class BuildController +/* */ extends BaseController +/* */ { +/* 18 */ private String prefix = "tool/build"; +/* */ +/* */ +/* */ @RequiresPermissions({"tool:build:view"}) +/* */ @GetMapping +/* */ public String build() { +/* 24 */ return this.prefix + "/build"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\build\BuildController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/controller/GenController.java b/src/main/java/com/archive/project/tool/gen/controller/GenController.java new file mode 100644 index 0000000..951fcd3 --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/controller/GenController.java @@ -0,0 +1,259 @@ +/* */ package com.archive.project.tool.gen.controller + +-INF.classes.com.archive.project.tool.gen.controller; +/* */ +/* */ import com.alibaba.fastjson.JSON; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.framework.aspectj.lang.annotation.Log; +/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.framework.web.domain.CxSelect; +/* */ import com.archive.framework.web.page.TableDataInfo; +/* */ import com.archive.project.tool.gen.domain.GenTable; +/* */ import com.archive.project.tool.gen.domain.GenTableColumn; +/* */ import com.archive.project.tool.gen.service.IGenTableColumnService; +/* */ import com.archive.project.tool.gen.service.IGenTableService; +/* */ import java.io.IOException; +/* */ import java.io.OutputStream; +/* */ import java.util.ArrayList; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import javax.servlet.http.HttpServletResponse; +/* */ import org.apache.commons.io.IOUtils; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.validation.annotation.Validated; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/tool/gen"}) +/* */ public class GenController +/* */ extends BaseController +/* */ { +/* 42 */ private String prefix = "tool/gen"; +/* */ +/* */ @Autowired +/* */ private IGenTableService genTableService; +/* */ +/* */ @Autowired +/* */ private IGenTableColumnService genTableColumnService; +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:view"}) +/* */ @GetMapping +/* */ public String gen() { +/* 54 */ return this.prefix + "/gen"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:list"}) +/* */ @PostMapping({"/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo genList(GenTable genTable) { +/* 65 */ startPage(); +/* 66 */ List list = this.genTableService.selectGenTableList(genTable); +/* 67 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:list"}) +/* */ @PostMapping({"/db/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo dataList(GenTable genTable) { +/* 78 */ startPage(); +/* 79 */ List list = this.genTableService.selectDbTableList(genTable); +/* 80 */ return getDataTable(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:list"}) +/* */ @PostMapping({"/column/list"}) +/* */ @ResponseBody +/* */ public TableDataInfo columnList(GenTableColumn genTableColumn) { +/* 91 */ TableDataInfo dataInfo = new TableDataInfo(); +/* 92 */ List list = this.genTableColumnService.selectGenTableColumnListByTableId(genTableColumn); +/* 93 */ dataInfo.setRows(list); +/* 94 */ dataInfo.setTotal(list.size()); +/* 95 */ return dataInfo; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:list"}) +/* */ @GetMapping({"/importTable"}) +/* */ public String importTable() { +/* 105 */ return this.prefix + "/importTable"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:list"}) +/* */ @Log(title = "代码生成", businessType = BusinessType.IMPORT) +/* */ @PostMapping({"/importTable"}) +/* */ @ResponseBody +/* */ public AjaxResult importTableSave(String tables) { +/* 117 */ String[] tableNames = Convert.toStrArray(tables); +/* */ +/* 119 */ List tableList = this.genTableService.selectDbTableListByNames(tableNames); +/* 120 */ this.genTableService.importGenTable(tableList); +/* 121 */ return AjaxResult.success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/edit/{tableId}"}) +/* */ public String edit(@PathVariable("tableId") Long tableId, ModelMap mmap) { +/* 130 */ GenTable table = this.genTableService.selectGenTableById(tableId); +/* 131 */ List genTables = this.genTableService.selectGenTableAll(); +/* 132 */ List cxSelect = new ArrayList<>(); +/* 133 */ for (GenTable genTable : genTables) { +/* */ +/* 135 */ if (!StringUtils.equals(table.getTableName(), genTable.getTableName())) { +/* */ +/* 137 */ CxSelect cxTable = new CxSelect(genTable.getTableName(), genTable.getTableName() + ':' + genTable.getTableComment()); +/* 138 */ List cxColumns = new ArrayList<>(); +/* 139 */ for (GenTableColumn tableColumn : genTable.getColumns()) +/* */ { +/* 141 */ cxColumns.add(new CxSelect(tableColumn.getColumnName(), tableColumn.getColumnName() + ':' + tableColumn.getColumnComment())); +/* */ } +/* 143 */ cxTable.setS(cxColumns); +/* 144 */ cxSelect.add(cxTable); +/* */ } +/* */ } +/* 147 */ mmap.put("table", table); +/* 148 */ mmap.put("data", JSON.toJSON(cxSelect)); +/* 149 */ return this.prefix + "/edit"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:edit"}) +/* */ @Log(title = "代码生成", businessType = BusinessType.UPDATE) +/* */ @PostMapping({"/edit"}) +/* */ @ResponseBody +/* */ public AjaxResult editSave(@Validated GenTable genTable) { +/* 161 */ this.genTableService.validateEdit(genTable); +/* 162 */ this.genTableService.updateGenTable(genTable); +/* 163 */ return AjaxResult.success(); +/* */ } +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:remove"}) +/* */ @Log(title = "代码生成", businessType = BusinessType.DELETE) +/* */ @PostMapping({"/remove"}) +/* */ @ResponseBody +/* */ public AjaxResult remove(String ids) { +/* 172 */ this.genTableService.deleteGenTableByIds(ids); +/* 173 */ return AjaxResult.success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:preview"}) +/* */ @GetMapping({"/preview/{tableId}"}) +/* */ @ResponseBody +/* */ public AjaxResult preview(@PathVariable("tableId") Long tableId) throws IOException { +/* 184 */ Map dataMap = this.genTableService.previewCode(tableId); +/* 185 */ return AjaxResult.success(dataMap); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:code"}) +/* */ @Log(title = "代码生成", businessType = BusinessType.GENCODE) +/* */ @GetMapping({"/download/{tableName}"}) +/* */ public void download(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException { +/* 196 */ byte[] data = this.genTableService.downloadCode(tableName); +/* 197 */ genCode(response, data); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:code"}) +/* */ @Log(title = "代码生成", businessType = BusinessType.GENCODE) +/* */ @GetMapping({"/genCode/{tableName}"}) +/* */ @ResponseBody +/* */ public AjaxResult genCode(@PathVariable("tableName") String tableName) { +/* 209 */ this.genTableService.generatorCode(tableName); +/* 210 */ return AjaxResult.success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:edit"}) +/* */ @Log(title = "代码生成", businessType = BusinessType.UPDATE) +/* */ @GetMapping({"/synchDb/{tableName}"}) +/* */ @ResponseBody +/* */ public AjaxResult synchDb(@PathVariable("tableName") String tableName) { +/* 222 */ this.genTableService.synchDb(tableName); +/* 223 */ return AjaxResult.success(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"tool:gen:code"}) +/* */ @Log(title = "代码生成", businessType = BusinessType.GENCODE) +/* */ @GetMapping({"/batchGenCode"}) +/* */ @ResponseBody +/* */ public void batchGenCode(HttpServletResponse response, String tables) throws IOException { +/* 235 */ String[] tableNames = Convert.toStrArray(tables); +/* 236 */ byte[] data = this.genTableService.downloadCode(tableNames); +/* 237 */ genCode(response, data); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void genCode(HttpServletResponse response, byte[] data) throws IOException { +/* 245 */ response.reset(); +/* 246 */ response.setHeader("Content-Disposition", "attachment; filename=\"archive.zip\""); +/* 247 */ response.addHeader("Content-Length", "" + data.length); +/* 248 */ response.setContentType("application/octet-stream; charset=UTF-8"); +/* 249 */ IOUtils.write(data, (OutputStream)response.getOutputStream()); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\gen\controller\GenController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/domain/GenTable.java b/src/main/java/com/archive/project/tool/gen/domain/GenTable.java new file mode 100644 index 0000000..9d45981 --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/domain/GenTable.java @@ -0,0 +1,380 @@ +/* */ package com.archive.project.tool.gen.domain + +-INF.classes.com.archive.project.tool.gen.domain; +/* */ +/* */ import com.archive.common.constant.GenConstants; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import com.archive.project.tool.gen.domain.GenTableColumn; +/* */ import java.util.List; +/* */ import javax.validation.Valid; +/* */ import javax.validation.constraints.NotBlank; +/* */ import org.apache.commons.lang3.ArrayUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class GenTable +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long tableId; +/* */ @NotBlank(message = "表名称不能为空") +/* */ private String tableName; +/* */ @NotBlank(message = "表描述不能为空") +/* */ private String tableComment; +/* */ private String subTableName; +/* */ private String subTableFkName; +/* */ @NotBlank(message = "实体类名称不能为空") +/* */ private String className; +/* */ private String tplCategory; +/* */ @NotBlank(message = "生成包路径不能为空") +/* */ private String packageName; +/* */ @NotBlank(message = "生成模块名不能为空") +/* */ private String moduleName; +/* */ @NotBlank(message = "生成业务名不能为空") +/* */ private String businessName; +/* */ @NotBlank(message = "生成功能名不能为空") +/* */ private String functionName; +/* */ @NotBlank(message = "作者不能为空") +/* */ private String functionAuthor; +/* */ private String genType; +/* */ private String genPath; +/* */ private GenTableColumn pkColumn; +/* */ private com.archive.project.tool.gen.domain.GenTable subTable; +/* */ @Valid +/* */ private List columns; +/* */ private String options; +/* */ private String treeCode; +/* */ private String treeParentCode; +/* */ private String treeName; +/* */ private String parentMenuId; +/* */ private String parentMenuName; +/* */ +/* */ public Long getTableId() { +/* 100 */ return this.tableId; +/* */ } +/* */ +/* */ +/* */ public void setTableId(Long tableId) { +/* 105 */ this.tableId = tableId; +/* */ } +/* */ +/* */ +/* */ public String getTableName() { +/* 110 */ return this.tableName; +/* */ } +/* */ +/* */ +/* */ public void setTableName(String tableName) { +/* 115 */ this.tableName = tableName; +/* */ } +/* */ +/* */ +/* */ public String getTableComment() { +/* 120 */ return this.tableComment; +/* */ } +/* */ +/* */ +/* */ public void setTableComment(String tableComment) { +/* 125 */ this.tableComment = tableComment; +/* */ } +/* */ +/* */ +/* */ public String getSubTableName() { +/* 130 */ return this.subTableName; +/* */ } +/* */ +/* */ +/* */ public void setSubTableName(String subTableName) { +/* 135 */ this.subTableName = subTableName; +/* */ } +/* */ +/* */ +/* */ public String getSubTableFkName() { +/* 140 */ return this.subTableFkName; +/* */ } +/* */ +/* */ +/* */ public void setSubTableFkName(String subTableFkName) { +/* 145 */ this.subTableFkName = subTableFkName; +/* */ } +/* */ +/* */ +/* */ public String getClassName() { +/* 150 */ return this.className; +/* */ } +/* */ +/* */ +/* */ public void setClassName(String className) { +/* 155 */ this.className = className; +/* */ } +/* */ +/* */ +/* */ public String getTplCategory() { +/* 160 */ return this.tplCategory; +/* */ } +/* */ +/* */ +/* */ public void setTplCategory(String tplCategory) { +/* 165 */ this.tplCategory = tplCategory; +/* */ } +/* */ +/* */ +/* */ public String getPackageName() { +/* 170 */ return this.packageName; +/* */ } +/* */ +/* */ +/* */ public void setPackageName(String packageName) { +/* 175 */ this.packageName = packageName; +/* */ } +/* */ +/* */ +/* */ public String getModuleName() { +/* 180 */ return this.moduleName; +/* */ } +/* */ +/* */ +/* */ public void setModuleName(String moduleName) { +/* 185 */ this.moduleName = moduleName; +/* */ } +/* */ +/* */ +/* */ public String getBusinessName() { +/* 190 */ return this.businessName; +/* */ } +/* */ +/* */ +/* */ public void setBusinessName(String businessName) { +/* 195 */ this.businessName = businessName; +/* */ } +/* */ +/* */ +/* */ public String getFunctionName() { +/* 200 */ return this.functionName; +/* */ } +/* */ +/* */ +/* */ public void setFunctionName(String functionName) { +/* 205 */ this.functionName = functionName; +/* */ } +/* */ +/* */ +/* */ public String getFunctionAuthor() { +/* 210 */ return this.functionAuthor; +/* */ } +/* */ +/* */ +/* */ public void setFunctionAuthor(String functionAuthor) { +/* 215 */ this.functionAuthor = functionAuthor; +/* */ } +/* */ +/* */ +/* */ public String getGenType() { +/* 220 */ return this.genType; +/* */ } +/* */ +/* */ +/* */ public void setGenType(String genType) { +/* 225 */ this.genType = genType; +/* */ } +/* */ +/* */ +/* */ public String getGenPath() { +/* 230 */ return this.genPath; +/* */ } +/* */ +/* */ +/* */ public void setGenPath(String genPath) { +/* 235 */ this.genPath = genPath; +/* */ } +/* */ +/* */ +/* */ public GenTableColumn getPkColumn() { +/* 240 */ return this.pkColumn; +/* */ } +/* */ +/* */ +/* */ public void setPkColumn(GenTableColumn pkColumn) { +/* 245 */ this.pkColumn = pkColumn; +/* */ } +/* */ +/* */ +/* */ public com.archive.project.tool.gen.domain.GenTable getSubTable() { +/* 250 */ return this.subTable; +/* */ } +/* */ +/* */ +/* */ public void setSubTable(com.archive.project.tool.gen.domain.GenTable subTable) { +/* 255 */ this.subTable = subTable; +/* */ } +/* */ +/* */ +/* */ public List getColumns() { +/* 260 */ return this.columns; +/* */ } +/* */ +/* */ +/* */ public void setColumns(List columns) { +/* 265 */ this.columns = columns; +/* */ } +/* */ +/* */ +/* */ public String getOptions() { +/* 270 */ return this.options; +/* */ } +/* */ +/* */ +/* */ public void setOptions(String options) { +/* 275 */ this.options = options; +/* */ } +/* */ +/* */ +/* */ public String getTreeCode() { +/* 280 */ return this.treeCode; +/* */ } +/* */ +/* */ +/* */ public void setTreeCode(String treeCode) { +/* 285 */ this.treeCode = treeCode; +/* */ } +/* */ +/* */ +/* */ public String getTreeParentCode() { +/* 290 */ return this.treeParentCode; +/* */ } +/* */ +/* */ +/* */ public void setTreeParentCode(String treeParentCode) { +/* 295 */ this.treeParentCode = treeParentCode; +/* */ } +/* */ +/* */ +/* */ public String getTreeName() { +/* 300 */ return this.treeName; +/* */ } +/* */ +/* */ +/* */ public void setTreeName(String treeName) { +/* 305 */ this.treeName = treeName; +/* */ } +/* */ +/* */ +/* */ public String getParentMenuId() { +/* 310 */ return this.parentMenuId; +/* */ } +/* */ +/* */ +/* */ public void setParentMenuId(String parentMenuId) { +/* 315 */ this.parentMenuId = parentMenuId; +/* */ } +/* */ +/* */ +/* */ public String getParentMenuName() { +/* 320 */ return this.parentMenuName; +/* */ } +/* */ +/* */ +/* */ public void setParentMenuName(String parentMenuName) { +/* 325 */ this.parentMenuName = parentMenuName; +/* */ } +/* */ +/* */ +/* */ public boolean isSub() { +/* 330 */ return isSub(this.tplCategory); +/* */ } +/* */ +/* */ +/* */ public static boolean isSub(String tplCategory) { +/* 335 */ return (tplCategory != null && StringUtils.equals("sub", tplCategory)); +/* */ } +/* */ +/* */ +/* */ public boolean isTree() { +/* 340 */ return isTree(this.tplCategory); +/* */ } +/* */ +/* */ +/* */ public static boolean isTree(String tplCategory) { +/* 345 */ return (tplCategory != null && StringUtils.equals("tree", tplCategory)); +/* */ } +/* */ +/* */ +/* */ public boolean isCrud() { +/* 350 */ return isCrud(this.tplCategory); +/* */ } +/* */ +/* */ +/* */ public static boolean isCrud(String tplCategory) { +/* 355 */ return (tplCategory != null && StringUtils.equals("crud", tplCategory)); +/* */ } +/* */ +/* */ +/* */ public boolean isSuperColumn(String javaField) { +/* 360 */ return isSuperColumn(this.tplCategory, javaField); +/* */ } +/* */ +/* */ +/* */ public static boolean isSuperColumn(String tplCategory, String javaField) { +/* 365 */ if (isTree(tplCategory)) +/* */ { +/* 367 */ return StringUtils.equalsAnyIgnoreCase(javaField, +/* 368 */ (CharSequence[])ArrayUtils.addAll((Object[])GenConstants.TREE_ENTITY, (Object[])GenConstants.BASE_ENTITY)); +/* */ } +/* 370 */ return StringUtils.equalsAnyIgnoreCase(javaField, (CharSequence[])GenConstants.BASE_ENTITY); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\gen\domain\GenTable.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/domain/GenTableColumn.java b/src/main/java/com/archive/project/tool/gen/domain/GenTableColumn.java new file mode 100644 index 0000000..20469e8 --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/domain/GenTableColumn.java @@ -0,0 +1,380 @@ +/* */ package com.archive.project.tool.gen.domain + +-INF.classes.com.archive.project.tool.gen.domain; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.web.domain.BaseEntity; +/* */ import javax.validation.constraints.NotBlank; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class GenTableColumn +/* */ extends BaseEntity +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Long columnId; +/* */ private Long tableId; +/* */ private String columnName; +/* */ private String columnComment; +/* */ private String columnType; +/* */ private String javaType; +/* */ @NotBlank(message = "Java属性不能为空") +/* */ private String javaField; +/* */ private String isPk; +/* */ private String isIncrement; +/* */ private String isRequired; +/* */ private String isInsert; +/* */ private String isEdit; +/* */ private String isList; +/* */ private String isQuery; +/* */ private String queryType; +/* */ private String htmlType; +/* */ private String dictType; +/* */ private Integer sort; +/* */ +/* */ public void setColumnId(Long columnId) { +/* 73 */ this.columnId = columnId; +/* */ } +/* */ +/* */ +/* */ public Long getColumnId() { +/* 78 */ return this.columnId; +/* */ } +/* */ +/* */ +/* */ public void setTableId(Long tableId) { +/* 83 */ this.tableId = tableId; +/* */ } +/* */ +/* */ +/* */ public Long getTableId() { +/* 88 */ return this.tableId; +/* */ } +/* */ +/* */ +/* */ public void setColumnName(String columnName) { +/* 93 */ this.columnName = columnName; +/* */ } +/* */ +/* */ +/* */ public String getColumnName() { +/* 98 */ return this.columnName; +/* */ } +/* */ +/* */ +/* */ public void setColumnComment(String columnComment) { +/* 103 */ this.columnComment = columnComment; +/* */ } +/* */ +/* */ +/* */ public String getColumnComment() { +/* 108 */ return this.columnComment; +/* */ } +/* */ +/* */ +/* */ public void setColumnType(String columnType) { +/* 113 */ this.columnType = columnType; +/* */ } +/* */ +/* */ +/* */ public String getColumnType() { +/* 118 */ return this.columnType; +/* */ } +/* */ +/* */ +/* */ public void setJavaType(String javaType) { +/* 123 */ this.javaType = javaType; +/* */ } +/* */ +/* */ +/* */ public String getJavaType() { +/* 128 */ return this.javaType; +/* */ } +/* */ +/* */ +/* */ public void setJavaField(String javaField) { +/* 133 */ this.javaField = javaField; +/* */ } +/* */ +/* */ +/* */ public String getJavaField() { +/* 138 */ return this.javaField; +/* */ } +/* */ +/* */ +/* */ public String getCapJavaField() { +/* 143 */ return StringUtils.capitalize(this.javaField); +/* */ } +/* */ +/* */ +/* */ public void setIsPk(String isPk) { +/* 148 */ this.isPk = isPk; +/* */ } +/* */ +/* */ +/* */ public String getIsPk() { +/* 153 */ return this.isPk; +/* */ } +/* */ +/* */ +/* */ public boolean isPk() { +/* 158 */ return isPk(this.isPk); +/* */ } +/* */ +/* */ +/* */ public boolean isPk(String isPk) { +/* 163 */ return (isPk != null && StringUtils.equals("1", isPk)); +/* */ } +/* */ +/* */ +/* */ public String getIsIncrement() { +/* 168 */ return this.isIncrement; +/* */ } +/* */ +/* */ +/* */ public void setIsIncrement(String isIncrement) { +/* 173 */ this.isIncrement = isIncrement; +/* */ } +/* */ +/* */ +/* */ public boolean isIncrement() { +/* 178 */ return isIncrement(this.isIncrement); +/* */ } +/* */ +/* */ +/* */ public boolean isIncrement(String isIncrement) { +/* 183 */ return (isIncrement != null && StringUtils.equals("1", isIncrement)); +/* */ } +/* */ +/* */ +/* */ public void setIsRequired(String isRequired) { +/* 188 */ this.isRequired = isRequired; +/* */ } +/* */ +/* */ +/* */ public String getIsRequired() { +/* 193 */ return this.isRequired; +/* */ } +/* */ +/* */ +/* */ public boolean isRequired() { +/* 198 */ return isRequired(this.isRequired); +/* */ } +/* */ +/* */ +/* */ public boolean isRequired(String isRequired) { +/* 203 */ return (isRequired != null && StringUtils.equals("1", isRequired)); +/* */ } +/* */ +/* */ +/* */ public void setIsInsert(String isInsert) { +/* 208 */ this.isInsert = isInsert; +/* */ } +/* */ +/* */ +/* */ public String getIsInsert() { +/* 213 */ return this.isInsert; +/* */ } +/* */ +/* */ +/* */ public boolean isInsert() { +/* 218 */ return isInsert(this.isInsert); +/* */ } +/* */ +/* */ +/* */ public boolean isInsert(String isInsert) { +/* 223 */ return (isInsert != null && StringUtils.equals("1", isInsert)); +/* */ } +/* */ +/* */ +/* */ public void setIsEdit(String isEdit) { +/* 228 */ this.isEdit = isEdit; +/* */ } +/* */ +/* */ +/* */ public String getIsEdit() { +/* 233 */ return this.isEdit; +/* */ } +/* */ +/* */ +/* */ public boolean isEdit() { +/* 238 */ return isInsert(this.isEdit); +/* */ } +/* */ +/* */ +/* */ public boolean isEdit(String isEdit) { +/* 243 */ return (isEdit != null && StringUtils.equals("1", isEdit)); +/* */ } +/* */ +/* */ +/* */ public void setIsList(String isList) { +/* 248 */ this.isList = isList; +/* */ } +/* */ +/* */ +/* */ public String getIsList() { +/* 253 */ return this.isList; +/* */ } +/* */ +/* */ +/* */ public boolean isList() { +/* 258 */ return isList(this.isList); +/* */ } +/* */ +/* */ +/* */ public boolean isList(String isList) { +/* 263 */ return (isList != null && StringUtils.equals("1", isList)); +/* */ } +/* */ +/* */ +/* */ public void setIsQuery(String isQuery) { +/* 268 */ this.isQuery = isQuery; +/* */ } +/* */ +/* */ +/* */ public String getIsQuery() { +/* 273 */ return this.isQuery; +/* */ } +/* */ +/* */ +/* */ public boolean isQuery() { +/* 278 */ return isQuery(this.isQuery); +/* */ } +/* */ +/* */ +/* */ public boolean isQuery(String isQuery) { +/* 283 */ return (isQuery != null && StringUtils.equals("1", isQuery)); +/* */ } +/* */ +/* */ +/* */ public void setQueryType(String queryType) { +/* 288 */ this.queryType = queryType; +/* */ } +/* */ +/* */ +/* */ public String getQueryType() { +/* 293 */ return this.queryType; +/* */ } +/* */ +/* */ +/* */ public String getHtmlType() { +/* 298 */ return this.htmlType; +/* */ } +/* */ +/* */ +/* */ public void setHtmlType(String htmlType) { +/* 303 */ this.htmlType = htmlType; +/* */ } +/* */ +/* */ +/* */ public void setDictType(String dictType) { +/* 308 */ this.dictType = dictType; +/* */ } +/* */ +/* */ +/* */ public String getDictType() { +/* 313 */ return this.dictType; +/* */ } +/* */ +/* */ +/* */ public void setSort(Integer sort) { +/* 318 */ this.sort = sort; +/* */ } +/* */ +/* */ +/* */ public Integer getSort() { +/* 323 */ return this.sort; +/* */ } +/* */ +/* */ +/* */ public boolean isSuperColumn() { +/* 328 */ return isSuperColumn(this.javaField); +/* */ } +/* */ +/* */ +/* */ public static boolean isSuperColumn(String javaField) { +/* 333 */ return StringUtils.equalsAnyIgnoreCase(javaField, new CharSequence[] { "createBy", "createTime", "updateBy", "updateTime", "remark", "parentName", "parentId", "orderNum", "ancestors" }); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isUsableColumn() { +/* 342 */ return isUsableColumn(this.javaField); +/* */ } +/* */ +/* */ +/* */ +/* */ public static boolean isUsableColumn(String javaField) { +/* 348 */ return StringUtils.equalsAnyIgnoreCase(javaField, new CharSequence[] { "parentId", "orderNum", "remark" }); +/* */ } +/* */ +/* */ +/* */ public String readConverterExp() { +/* 353 */ String remarks = StringUtils.substringBetween(this.columnComment, "(", ")"); +/* 354 */ StringBuffer sb = new StringBuffer(); +/* 355 */ if (StringUtils.isNotEmpty(remarks)) { +/* */ +/* 357 */ for (String value : remarks.split(" ")) { +/* */ +/* 359 */ if (StringUtils.isNotEmpty(value)) { +/* */ +/* 361 */ Object startStr = value.subSequence(0, 1); +/* 362 */ String endStr = value.substring(1); +/* 363 */ sb.append("").append(startStr).append("=").append(endStr).append(","); +/* */ } +/* */ } +/* 366 */ return sb.deleteCharAt(sb.length() - 1).toString(); +/* */ } +/* */ +/* */ +/* 370 */ return this.columnComment; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\gen\domain\GenTableColumn.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/mapper/GenTableColumnMapper.java b/src/main/java/com/archive/project/tool/gen/mapper/GenTableColumnMapper.java new file mode 100644 index 0000000..2a16379 --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/mapper/GenTableColumnMapper.java @@ -0,0 +1,26 @@ +package com.archive.project.tool.gen.mapper + +-INF.classes.com.archive.project.tool.gen.mapper; + +import com.archive.project.tool.gen.domain.GenTableColumn; +import java.util.List; + +public interface GenTableColumnMapper { + List selectDbTableColumnsByName(String paramString); + + List selectGenTableColumnListByTableId(GenTableColumn paramGenTableColumn); + + int insertGenTableColumn(GenTableColumn paramGenTableColumn); + + int updateGenTableColumn(GenTableColumn paramGenTableColumn); + + int deleteGenTableColumns(List paramList); + + int deleteGenTableColumnByIds(Long[] paramArrayOfLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\gen\mapper\GenTableColumnMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/mapper/GenTableMapper.java b/src/main/java/com/archive/project/tool/gen/mapper/GenTableMapper.java new file mode 100644 index 0000000..148a654 --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/mapper/GenTableMapper.java @@ -0,0 +1,32 @@ +package com.archive.project.tool.gen.mapper + +-INF.classes.com.archive.project.tool.gen.mapper; + +import com.archive.project.tool.gen.domain.GenTable; +import java.util.List; + +public interface GenTableMapper { + List selectGenTableList(GenTable paramGenTable); + + List selectDbTableList(GenTable paramGenTable); + + List selectDbTableListByNames(String[] paramArrayOfString); + + List selectGenTableAll(); + + GenTable selectGenTableById(Long paramLong); + + GenTable selectGenTableByName(String paramString); + + int insertGenTable(GenTable paramGenTable); + + int updateGenTable(GenTable paramGenTable); + + int deleteGenTableByIds(Long[] paramArrayOfLong); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\gen\mapper\GenTableMapper.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/service/GenTableColumnServiceImpl.java b/src/main/java/com/archive/project/tool/gen/service/GenTableColumnServiceImpl.java new file mode 100644 index 0000000..5197ef2 --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/service/GenTableColumnServiceImpl.java @@ -0,0 +1,76 @@ +/* */ package com.archive.project.tool.gen.service + +-INF.classes.com.archive.project.tool.gen.service; +/* */ +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.tool.gen.domain.GenTableColumn; +/* */ import com.archive.project.tool.gen.mapper.GenTableColumnMapper; +/* */ import com.archive.project.tool.gen.service.IGenTableColumnService; +/* */ import java.util.List; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class GenTableColumnServiceImpl +/* */ implements IGenTableColumnService +/* */ { +/* */ @Autowired +/* */ private GenTableColumnMapper genTableColumnMapper; +/* */ +/* */ public List selectGenTableColumnListByTableId(GenTableColumn genTableColumn) { +/* 30 */ return this.genTableColumnMapper.selectGenTableColumnListByTableId(genTableColumn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int insertGenTableColumn(GenTableColumn genTableColumn) { +/* 42 */ return this.genTableColumnMapper.insertGenTableColumn(genTableColumn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int updateGenTableColumn(GenTableColumn genTableColumn) { +/* 54 */ return this.genTableColumnMapper.updateGenTableColumn(genTableColumn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int deleteGenTableColumnByIds(String ids) { +/* 66 */ return this.genTableColumnMapper.deleteGenTableColumnByIds(Convert.toLongArray(ids)); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\gen\service\GenTableColumnServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/service/GenTableServiceImpl.java b/src/main/java/com/archive/project/tool/gen/service/GenTableServiceImpl.java new file mode 100644 index 0000000..0bc116b --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/service/GenTableServiceImpl.java @@ -0,0 +1,509 @@ +/* */ package com.archive.project.tool.gen.service + +; +/* */ +/* */ import com.alibaba.fastjson.JSON; +/* */ import com.alibaba.fastjson.JSONObject; +/* */ import com.archive.common.exception.BusinessException; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.common.utils.file.FileUtils; +/* */ import com.archive.common.utils.security.ShiroUtils; +/* */ import com.archive.common.utils.text.Convert; +/* */ import com.archive.project.tool.gen.domain.GenTable; +/* */ import com.archive.project.tool.gen.domain.GenTableColumn; +/* */ import com.archive.project.tool.gen.mapper.GenTableColumnMapper; +/* */ import com.archive.project.tool.gen.mapper.GenTableMapper; +/* */ import com.archive.project.tool.gen.service.IGenTableService; +/* */ import com.archive.project.tool.gen.util.GenUtils; +/* */ import com.archive.project.tool.gen.util.VelocityInitializer; +/* */ import com.archive.project.tool.gen.util.VelocityUtils; +/* */ import java.io.ByteArrayOutputStream; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.io.StringWriter; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import java.util.stream.Collectors; +/* */ import java.util.zip.ZipEntry; +/* */ import java.util.zip.ZipOutputStream; +/* */ import org.apache.commons.io.IOUtils; +/* */ import org.apache.velocity.Template; +/* */ import org.apache.velocity.VelocityContext; +/* */ import org.apache.velocity.app.Velocity; +/* */ import org.apache.velocity.context.Context; +/* */ import org.slf4j.Logger; +/* */ import org.slf4j.LoggerFactory; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ import org.springframework.transaction.annotation.Transactional; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class GenTableServiceImpl +/* */ implements IGenTableService +/* */ { +/* 48 */ private static final Logger log = LoggerFactory.getLogger(com.archive.project.tool.gen.service.GenTableServiceImpl.class); +/* */ +/* */ +/* */ +/* */ +/* */ @Autowired +/* */ private GenTableMapper genTableMapper; +/* */ +/* */ +/* */ +/* */ @Autowired +/* */ private GenTableColumnMapper genTableColumnMapper; +/* */ +/* */ +/* */ +/* */ +/* */ public GenTable selectGenTableById(Long id) { +/* 65 */ GenTable genTable = this.genTableMapper.selectGenTableById(id); +/* 66 */ setTableFromOptions(genTable); +/* 67 */ return genTable; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectGenTableList(GenTable genTable) { +/* 79 */ return this.genTableMapper.selectGenTableList(genTable); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectDbTableList(GenTable genTable) { +/* 91 */ return this.genTableMapper.selectDbTableList(genTable); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectDbTableListByNames(String[] tableNames) { +/* 103 */ return this.genTableMapper.selectDbTableListByNames(tableNames); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List selectGenTableAll() { +/* 114 */ return this.genTableMapper.selectGenTableAll(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void updateGenTable(GenTable genTable) { +/* 127 */ String options = JSON.toJSONString(genTable.getParams()); +/* 128 */ genTable.setOptions(options); +/* 129 */ int row = this.genTableMapper.updateGenTable(genTable); +/* 130 */ if (row > 0) +/* */ { +/* 132 */ for (GenTableColumn cenTableColumn : genTable.getColumns()) +/* */ { +/* 134 */ this.genTableColumnMapper.updateGenTableColumn(cenTableColumn); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void deleteGenTableByIds(String ids) { +/* 149 */ this.genTableMapper.deleteGenTableByIds(Convert.toLongArray(ids)); +/* 150 */ this.genTableColumnMapper.deleteGenTableColumnByIds(Convert.toLongArray(ids)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void importGenTable(List tableList) { +/* 162 */ String operName = ShiroUtils.getLoginName(); +/* */ +/* */ try { +/* 165 */ for (GenTable table : tableList) { +/* */ +/* 167 */ String tableName = table.getTableName(); +/* 168 */ GenUtils.initTable(table, operName); +/* 169 */ int row = this.genTableMapper.insertGenTable(table); +/* 170 */ if (row > 0) { +/* */ +/* */ +/* 173 */ List genTableColumns = this.genTableColumnMapper.selectDbTableColumnsByName(tableName); +/* 174 */ for (GenTableColumn column : genTableColumns) +/* */ { +/* 176 */ GenUtils.initColumnField(column, table); +/* 177 */ this.genTableColumnMapper.insertGenTableColumn(column); +/* */ } +/* */ +/* */ } +/* */ } +/* 182 */ } catch (Exception e) { +/* */ +/* 184 */ throw new BusinessException("导入失败:" + e.getMessage()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map previewCode(Long tableId) { +/* 197 */ Map dataMap = new LinkedHashMap<>(); +/* */ +/* 199 */ GenTable table = this.genTableMapper.selectGenTableById(tableId); +/* */ +/* 201 */ setSubTable(table); +/* */ +/* 203 */ setPkColumn(table); +/* 204 */ VelocityInitializer.initVelocity(); +/* */ +/* 206 */ VelocityContext context = VelocityUtils.prepareContext(table); +/* */ +/* */ +/* 209 */ List templates = VelocityUtils.getTemplateList(table.getTplCategory()); +/* 210 */ for (String template : templates) { +/* */ +/* */ +/* 213 */ StringWriter sw = new StringWriter(); +/* 214 */ Template tpl = Velocity.getTemplate(template, "UTF-8"); +/* 215 */ tpl.merge((Context)context, sw); +/* 216 */ dataMap.put(template, sw.toString()); +/* */ } +/* 218 */ return dataMap; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public byte[] downloadCode(String tableName) { +/* 230 */ ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); +/* 231 */ ZipOutputStream zip = new ZipOutputStream(outputStream); +/* 232 */ generatorCode(tableName, zip); +/* 233 */ IOUtils.closeQuietly(zip); +/* 234 */ return outputStream.toByteArray(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void generatorCode(String tableName) { +/* 246 */ GenTable table = this.genTableMapper.selectGenTableByName(tableName); +/* */ +/* 248 */ setSubTable(table); +/* */ +/* 250 */ setPkColumn(table); +/* */ +/* 252 */ VelocityInitializer.initVelocity(); +/* */ +/* 254 */ VelocityContext context = VelocityUtils.prepareContext(table); +/* */ +/* */ +/* 257 */ List templates = VelocityUtils.getTemplateList(table.getTplCategory()); +/* 258 */ for (String template : templates) { +/* */ +/* 260 */ if (!StringUtils.contains(template, "sql.vm")) { +/* */ +/* */ +/* 263 */ StringWriter sw = new StringWriter(); +/* 264 */ Template tpl = Velocity.getTemplate(template, "UTF-8"); +/* 265 */ tpl.merge((Context)context, sw); +/* */ +/* */ try { +/* 268 */ String path = getGenPath(table, template); +/* 269 */ FileUtils.writeStringToFile(new File(path), sw.toString(), "UTF-8"); +/* */ } +/* 271 */ catch (IOException e) { +/* */ +/* 273 */ throw new BusinessException("渲染模板失败,表名:" + table.getTableName()); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Transactional +/* */ public void synchDb(String tableName) { +/* 288 */ GenTable table = this.genTableMapper.selectGenTableByName(tableName); +/* 289 */ List tableColumns = table.getColumns(); +/* 290 */ List tableColumnNames = (List)tableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList()); +/* */ +/* 292 */ List dbTableColumns = this.genTableColumnMapper.selectDbTableColumnsByName(tableName); +/* 293 */ if (StringUtils.isEmpty(dbTableColumns)) +/* */ { +/* 295 */ throw new BusinessException("同步数据失败,原表结构不存在"); +/* */ } +/* 297 */ List dbTableColumnNames = (List)dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList()); +/* */ +/* 299 */ dbTableColumns.forEach(column -> { +/* */ if (!tableColumnNames.contains(column.getColumnName())) { +/* */ GenUtils.initColumnField(column, table); +/* */ +/* */ this.genTableColumnMapper.insertGenTableColumn(column); +/* */ } +/* */ }); +/* */ +/* 307 */ List delColumns = (List)tableColumns.stream().filter(column -> !dbTableColumnNames.contains(column.getColumnName())).collect(Collectors.toList()); +/* 308 */ if (StringUtils.isNotEmpty(delColumns)) +/* */ { +/* 310 */ this.genTableColumnMapper.deleteGenTableColumns(delColumns); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public byte[] downloadCode(String[] tableNames) { +/* 323 */ ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); +/* 324 */ ZipOutputStream zip = new ZipOutputStream(outputStream); +/* 325 */ for (String tableName : tableNames) +/* */ { +/* 327 */ generatorCode(tableName, zip); +/* */ } +/* 329 */ IOUtils.closeQuietly(zip); +/* 330 */ return outputStream.toByteArray(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void generatorCode(String tableName, ZipOutputStream zip) { +/* 339 */ GenTable table = this.genTableMapper.selectGenTableByName(tableName); +/* */ +/* 341 */ setSubTable(table); +/* */ +/* 343 */ setPkColumn(table); +/* */ +/* 345 */ VelocityInitializer.initVelocity(); +/* */ +/* 347 */ VelocityContext context = VelocityUtils.prepareContext(table); +/* */ +/* */ +/* 350 */ List templates = VelocityUtils.getTemplateList(table.getTplCategory()); +/* 351 */ for (String template : templates) { +/* */ +/* */ +/* 354 */ StringWriter sw = new StringWriter(); +/* 355 */ Template tpl = Velocity.getTemplate(template, "UTF-8"); +/* 356 */ tpl.merge((Context)context, sw); +/* */ +/* */ +/* */ try { +/* 360 */ zip.putNextEntry(new ZipEntry(VelocityUtils.getFileName(template, table))); +/* 361 */ IOUtils.write(sw.toString(), zip, "UTF-8"); +/* 362 */ IOUtils.closeQuietly(sw); +/* 363 */ zip.flush(); +/* 364 */ zip.closeEntry(); +/* */ } +/* 366 */ catch (IOException e) { +/* */ +/* 368 */ log.error("渲染模板失败,表名:" + table.getTableName(), e); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void validateEdit(GenTable genTable) { +/* 381 */ if ("tree".equals(genTable.getTplCategory())) { +/* */ +/* 383 */ String options = JSON.toJSONString(genTable.getParams()); +/* 384 */ JSONObject paramsObj = JSONObject.parseObject(options); +/* 385 */ if (StringUtils.isEmpty(paramsObj.getString("treeCode"))) +/* */ { +/* 387 */ throw new BusinessException("树编码字段不能为空"); +/* */ } +/* 389 */ if (StringUtils.isEmpty(paramsObj.getString("treeParentCode"))) +/* */ { +/* 391 */ throw new BusinessException("树父编码字段不能为空"); +/* */ } +/* 393 */ if (StringUtils.isEmpty(paramsObj.getString("treeName"))) +/* */ { +/* 395 */ throw new BusinessException("树名称字段不能为空"); +/* */ } +/* */ } +/* 398 */ else if ("sub".equals(genTable.getTplCategory())) { +/* */ +/* 400 */ if (StringUtils.isEmpty(genTable.getSubTableName())) +/* */ { +/* 402 */ throw new BusinessException("关联子表的表名不能为空"); +/* */ } +/* 404 */ if (StringUtils.isEmpty(genTable.getSubTableFkName())) +/* */ { +/* 406 */ throw new BusinessException("子表关联的外键名不能为空"); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setPkColumn(GenTable table) { +/* 418 */ for (GenTableColumn column : table.getColumns()) { +/* */ +/* 420 */ if (column.isPk()) { +/* */ +/* 422 */ table.setPkColumn(column); +/* */ break; +/* */ } +/* */ } +/* 426 */ if (StringUtils.isNull(table.getPkColumn())) +/* */ { +/* 428 */ table.setPkColumn(table.getColumns().get(0)); +/* */ } +/* 430 */ if ("sub".equals(table.getTplCategory())) { +/* */ +/* 432 */ for (GenTableColumn column : table.getSubTable().getColumns()) { +/* */ +/* 434 */ if (column.isPk()) { +/* */ +/* 436 */ table.getSubTable().setPkColumn(column); +/* */ break; +/* */ } +/* */ } +/* 440 */ if (StringUtils.isNull(table.getSubTable().getPkColumn())) +/* */ { +/* 442 */ table.getSubTable().setPkColumn(table.getSubTable().getColumns().get(0)); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setSubTable(GenTable table) { +/* 454 */ String subTableName = table.getSubTableName(); +/* 455 */ if (StringUtils.isNotEmpty(subTableName)) +/* */ { +/* 457 */ table.setSubTable(this.genTableMapper.selectGenTableByName(subTableName)); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setTableFromOptions(GenTable genTable) { +/* 468 */ JSONObject paramsObj = JSONObject.parseObject(genTable.getOptions()); +/* 469 */ if (StringUtils.isNotNull(paramsObj)) { +/* */ +/* 471 */ String treeCode = paramsObj.getString("treeCode"); +/* 472 */ String treeParentCode = paramsObj.getString("treeParentCode"); +/* 473 */ String treeName = paramsObj.getString("treeName"); +/* 474 */ String parentMenuId = paramsObj.getString("parentMenuId"); +/* 475 */ String parentMenuName = paramsObj.getString("parentMenuName"); +/* */ +/* 477 */ genTable.setTreeCode(treeCode); +/* 478 */ genTable.setTreeParentCode(treeParentCode); +/* 479 */ genTable.setTreeName(treeName); +/* 480 */ genTable.setParentMenuId(parentMenuId); +/* 481 */ genTable.setParentMenuName(parentMenuName); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getGenPath(GenTable table, String template) { +/* 494 */ String genPath = table.getGenPath(); +/* 495 */ if (StringUtils.equals(genPath, "/")) +/* */ { +/* 497 */ return System.getProperty("user.dir") + File.separator + "src" + File.separator + VelocityUtils.getFileName(template, table); +/* */ } +/* 499 */ return genPath + File.separator + VelocityUtils.getFileName(template, table); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\gen\service\GenTableServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/service/IGenTableColumnService.java b/src/main/java/com/archive/project/tool/gen/service/IGenTableColumnService.java new file mode 100644 index 0000000..765317f --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/service/IGenTableColumnService.java @@ -0,0 +1,22 @@ +package com.archive.project.tool.gen.service + +-INF.classes.com.archive.project.tool.gen.service; + +import com.archive.project.tool.gen.domain.GenTableColumn; +import java.util.List; + +public interface IGenTableColumnService { + List selectGenTableColumnListByTableId(GenTableColumn paramGenTableColumn); + + int insertGenTableColumn(GenTableColumn paramGenTableColumn); + + int updateGenTableColumn(GenTableColumn paramGenTableColumn); + + int deleteGenTableColumnByIds(String paramString); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\gen\service\IGenTableColumnService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/service/IGenTableService.java b/src/main/java/com/archive/project/tool/gen/service/IGenTableService.java new file mode 100644 index 0000000..0d809f7 --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/service/IGenTableService.java @@ -0,0 +1,43 @@ +package com.archive.project.tool.gen.service + +-INF.classes.com.archive.project.tool.gen.service; + +import com.archive.project.tool.gen.domain.GenTable; +import java.util.List; +import java.util.Map; + +public interface IGenTableService { + List selectGenTableList(GenTable paramGenTable); + + List selectDbTableList(GenTable paramGenTable); + + List selectDbTableListByNames(String[] paramArrayOfString); + + List selectGenTableAll(); + + GenTable selectGenTableById(Long paramLong); + + void updateGenTable(GenTable paramGenTable); + + void deleteGenTableByIds(String paramString); + + void importGenTable(List paramList); + + Map previewCode(Long paramLong); + + byte[] downloadCode(String paramString); + + void generatorCode(String paramString); + + void synchDb(String paramString); + + byte[] downloadCode(String[] paramArrayOfString); + + void validateEdit(GenTable paramGenTable); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\gen\service\IGenTableService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/util/GenUtils.java b/src/main/java/com/archive/project/tool/gen/util/GenUtils.java new file mode 100644 index 0000000..756a500 --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/util/GenUtils.java @@ -0,0 +1,260 @@ +/* */ package com.archive.project.tool.gen.util + +-INF.classes.com.archive.project.tool.gen.util; +/* */ +/* */ import com.archive.common.constant.GenConstants; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.config.GenConfig; +/* */ import com.archive.project.tool.gen.domain.GenTable; +/* */ import com.archive.project.tool.gen.domain.GenTableColumn; +/* */ import java.util.Arrays; +/* */ import org.apache.commons.lang3.RegExUtils; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class GenUtils +/* */ { +/* */ public static void initTable(GenTable genTable, String operName) { +/* 23 */ genTable.setClassName(convertClassName(genTable.getTableName())); +/* 24 */ genTable.setPackageName(GenConfig.getPackageName()); +/* 25 */ genTable.setModuleName(getModuleName(GenConfig.getPackageName())); +/* 26 */ genTable.setBusinessName(getBusinessName(genTable.getTableName())); +/* 27 */ genTable.setFunctionName(replaceText(genTable.getTableComment())); +/* 28 */ genTable.setFunctionAuthor(GenConfig.getAuthor()); +/* 29 */ genTable.setCreateBy(operName); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void initColumnField(GenTableColumn column, GenTable table) { +/* 37 */ String dataType = getDbType(column.getColumnType()); +/* 38 */ String columnName = column.getColumnName(); +/* 39 */ column.setTableId(table.getTableId()); +/* 40 */ column.setCreateBy(table.getCreateBy()); +/* */ +/* 42 */ column.setJavaField(StringUtils.toCamelCase(columnName)); +/* */ +/* 44 */ column.setJavaType("String"); +/* */ +/* 46 */ if (arraysContains(GenConstants.COLUMNTYPE_STR, dataType) || arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType)) { +/* */ +/* */ +/* 49 */ Integer columnLength = getColumnLength(column.getColumnType()); +/* 50 */ String htmlType = (columnLength.intValue() >= 500 || arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType)) ? "textarea" : "input"; +/* 51 */ column.setHtmlType(htmlType); +/* */ } +/* 53 */ else if (arraysContains(GenConstants.COLUMNTYPE_TIME, dataType)) { +/* */ +/* 55 */ column.setJavaType("Date"); +/* 56 */ column.setHtmlType("datetime"); +/* */ } +/* 58 */ else if (arraysContains(GenConstants.COLUMNTYPE_NUMBER, dataType)) { +/* */ +/* 60 */ column.setHtmlType("input"); +/* */ +/* */ +/* 63 */ String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ","); +/* 64 */ if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0) { +/* */ +/* 66 */ column.setJavaType("BigDecimal"); +/* */ +/* */ } +/* 69 */ else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10) { +/* */ +/* 71 */ column.setJavaType("Integer"); +/* */ +/* */ } +/* */ else { +/* */ +/* 76 */ column.setJavaType("Long"); +/* */ } +/* */ } +/* */ +/* */ +/* 81 */ column.setIsInsert("1"); +/* */ +/* */ +/* 84 */ if (!arraysContains(GenConstants.COLUMNNAME_NOT_EDIT, columnName) && !column.isPk()) +/* */ { +/* 86 */ column.setIsEdit("1"); +/* */ } +/* */ +/* 89 */ if (!arraysContains(GenConstants.COLUMNNAME_NOT_LIST, columnName) && !column.isPk()) +/* */ { +/* 91 */ column.setIsList("1"); +/* */ } +/* */ +/* 94 */ if (!arraysContains(GenConstants.COLUMNNAME_NOT_QUERY, columnName) && !column.isPk()) +/* */ { +/* 96 */ column.setIsQuery("1"); +/* */ } +/* */ +/* */ +/* 100 */ if (StringUtils.endsWithIgnoreCase(columnName, "name")) +/* */ { +/* 102 */ column.setQueryType("LIKE"); +/* */ } +/* */ +/* 105 */ if (StringUtils.endsWithIgnoreCase(columnName, "status")) { +/* */ +/* 107 */ column.setHtmlType("radio"); +/* */ +/* */ } +/* 110 */ else if (StringUtils.endsWithIgnoreCase(columnName, "type") || +/* 111 */ StringUtils.endsWithIgnoreCase(columnName, "sex")) { +/* */ +/* 113 */ column.setHtmlType("select"); +/* */ +/* */ } +/* 116 */ else if (StringUtils.endsWithIgnoreCase(columnName, "file")) { +/* */ +/* 118 */ column.setHtmlType("upload"); +/* */ +/* */ } +/* 121 */ else if (StringUtils.endsWithIgnoreCase(columnName, "content")) { +/* */ +/* 123 */ column.setHtmlType("summernote"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean arraysContains(String[] arr, String targetValue) { +/* 136 */ return Arrays.asList(arr).contains(targetValue); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getModuleName(String packageName) { +/* 147 */ int lastIndex = packageName.lastIndexOf("."); +/* 148 */ int nameLength = packageName.length(); +/* 149 */ String moduleName = StringUtils.substring(packageName, lastIndex + 1, nameLength); +/* 150 */ return moduleName; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getBusinessName(String tableName) { +/* 161 */ int lastIndex = tableName.lastIndexOf("_"); +/* 162 */ int nameLength = tableName.length(); +/* 163 */ String businessName = StringUtils.substring(tableName, lastIndex + 1, nameLength); +/* 164 */ return businessName; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String convertClassName(String tableName) { +/* 175 */ boolean autoRemovePre = GenConfig.getAutoRemovePre(); +/* 176 */ String tablePrefix = GenConfig.getTablePrefix(); +/* 177 */ if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix)) { +/* */ +/* 179 */ String[] searchList = StringUtils.split(tablePrefix, ","); +/* 180 */ tableName = replaceFirst(tableName, searchList); +/* */ } +/* 182 */ return StringUtils.convertToCamelCase(tableName); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String replaceFirst(String replacementm, String[] searchList) { +/* 194 */ String text = replacementm; +/* 195 */ for (String searchString : searchList) { +/* */ +/* 197 */ if (replacementm.startsWith(searchString)) { +/* */ +/* 199 */ text = replacementm.replaceFirst(searchString, ""); +/* */ break; +/* */ } +/* */ } +/* 203 */ return text; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String replaceText(String text) { +/* 214 */ return RegExUtils.replaceAll(text, "(?:表|Tale)", ""); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getDbType(String columnType) { +/* 225 */ if (StringUtils.indexOf(columnType, "(") > 0) +/* */ { +/* 227 */ return StringUtils.substringBefore(columnType, "("); +/* */ } +/* */ +/* */ +/* 231 */ return columnType; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Integer getColumnLength(String columnType) { +/* 243 */ if (StringUtils.indexOf(columnType, "(") > 0) { +/* */ +/* 245 */ String length = StringUtils.substringBetween(columnType, "(", ")"); +/* 246 */ return Integer.valueOf(length); +/* */ } +/* */ +/* */ +/* 250 */ return Integer.valueOf(0); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\ge\\util\GenUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/util/VelocityInitializer.java b/src/main/java/com/archive/project/tool/gen/util/VelocityInitializer.java new file mode 100644 index 0000000..8e864d1 --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/util/VelocityInitializer.java @@ -0,0 +1,43 @@ +/* */ package com.archive.project.tool.gen.util + +-INF.classes.com.archive.project.tool.gen.util; +/* */ +/* */ import java.util.Properties; +/* */ import org.apache.velocity.app.Velocity; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VelocityInitializer +/* */ { +/* */ public static void initVelocity() { +/* 19 */ Properties p = new Properties(); +/* */ +/* */ +/* */ try { +/* 23 */ p.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); +/* */ +/* 25 */ p.setProperty("ISO-8859-1", "UTF-8"); +/* 26 */ p.setProperty("output.encoding", "UTF-8"); +/* */ +/* 28 */ Velocity.init(p); +/* */ } +/* 30 */ catch (Exception e) { +/* */ +/* 32 */ throw new RuntimeException(e); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\ge\\util\VelocityInitializer.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/gen/util/VelocityUtils.java b/src/main/java/com/archive/project/tool/gen/util/VelocityUtils.java new file mode 100644 index 0000000..e1eb625 --- /dev/null +++ b/src/main/java/com/archive/project/tool/gen/util/VelocityUtils.java @@ -0,0 +1,376 @@ +/* */ package com.archive.project.tool.gen.util + +-INF.classes.com.archive.project.tool.gen.util; +/* */ +/* */ import com.alibaba.fastjson.JSONObject; +/* */ import com.archive.common.utils.DateUtils; +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.project.tool.gen.domain.GenTable; +/* */ import com.archive.project.tool.gen.domain.GenTableColumn; +/* */ import java.util.ArrayList; +/* */ import java.util.HashSet; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.apache.velocity.VelocityContext; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VelocityUtils +/* */ { +/* */ private static final String PROJECT_PATH = "main/java"; +/* */ private static final String MYBATIS_PATH = "main/resources/mybatis"; +/* */ private static final String TEMPLATES_PATH = "main/resources/templates"; +/* */ private static final String DEFAULT_PARENT_MENU_ID = "3"; +/* */ +/* */ public static VelocityContext prepareContext(GenTable genTable) { +/* 35 */ String moduleName = genTable.getModuleName(); +/* 36 */ String businessName = genTable.getBusinessName(); +/* 37 */ String packageName = genTable.getPackageName(); +/* 38 */ String tplCategory = genTable.getTplCategory(); +/* 39 */ String functionName = genTable.getFunctionName(); +/* */ +/* 41 */ VelocityContext velocityContext = new VelocityContext(); +/* 42 */ velocityContext.put("tplCategory", genTable.getTplCategory()); +/* 43 */ velocityContext.put("tableName", genTable.getTableName()); +/* 44 */ velocityContext.put("functionName", StringUtils.isNotEmpty(functionName) ? functionName : "【请填写功能名称】"); +/* 45 */ velocityContext.put("ClassName", genTable.getClassName()); +/* 46 */ velocityContext.put("className", StringUtils.uncapitalize(genTable.getClassName())); +/* 47 */ velocityContext.put("moduleName", genTable.getModuleName()); +/* 48 */ velocityContext.put("businessName", genTable.getBusinessName()); +/* 49 */ velocityContext.put("basePackage", getPackagePrefix(packageName)); +/* 50 */ velocityContext.put("packageName", packageName); +/* 51 */ velocityContext.put("author", genTable.getFunctionAuthor()); +/* 52 */ velocityContext.put("datetime", DateUtils.getDate()); +/* 53 */ velocityContext.put("pkColumn", genTable.getPkColumn()); +/* 54 */ velocityContext.put("importList", getImportList(genTable)); +/* 55 */ velocityContext.put("permissionPrefix", getPermissionPrefix(moduleName, businessName)); +/* 56 */ velocityContext.put("columns", genTable.getColumns()); +/* 57 */ velocityContext.put("table", genTable); +/* 58 */ setMenuVelocityContext(velocityContext, genTable); +/* 59 */ if ("tree".equals(tplCategory)) +/* */ { +/* 61 */ setTreeVelocityContext(velocityContext, genTable); +/* */ } +/* 63 */ if ("sub".equals(tplCategory)) +/* */ { +/* 65 */ setSubVelocityContext(velocityContext, genTable); +/* */ } +/* 67 */ return velocityContext; +/* */ } +/* */ +/* */ +/* */ public static void setMenuVelocityContext(VelocityContext context, GenTable genTable) { +/* 72 */ String options = genTable.getOptions(); +/* 73 */ JSONObject paramsObj = JSONObject.parseObject(options); +/* 74 */ String parentMenuId = getParentMenuId(paramsObj); +/* 75 */ context.put("parentMenuId", parentMenuId); +/* */ } +/* */ +/* */ +/* */ public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) { +/* 80 */ String options = genTable.getOptions(); +/* 81 */ JSONObject paramsObj = JSONObject.parseObject(options); +/* 82 */ String treeCode = getTreecode(paramsObj); +/* 83 */ String treeParentCode = getTreeParentCode(paramsObj); +/* 84 */ String treeName = getTreeName(paramsObj); +/* */ +/* 86 */ context.put("treeCode", treeCode); +/* 87 */ context.put("treeParentCode", treeParentCode); +/* 88 */ context.put("treeName", treeName); +/* 89 */ context.put("expandColumn", Integer.valueOf(getExpandColumn(genTable))); +/* 90 */ if (paramsObj.containsKey("treeParentCode")) +/* */ { +/* 92 */ context.put("tree_parent_code", paramsObj.getString("treeParentCode")); +/* */ } +/* 94 */ if (paramsObj.containsKey("treeName")) +/* */ { +/* 96 */ context.put("tree_name", paramsObj.getString("treeName")); +/* */ } +/* */ } +/* */ +/* */ +/* */ public static void setSubVelocityContext(VelocityContext context, GenTable genTable) { +/* 102 */ GenTable subTable = genTable.getSubTable(); +/* 103 */ String subTableName = genTable.getSubTableName(); +/* 104 */ String subTableFkName = genTable.getSubTableFkName(); +/* 105 */ String subClassName = genTable.getSubTable().getClassName(); +/* 106 */ String subTableFkClassName = StringUtils.convertToCamelCase(subTableFkName); +/* */ +/* 108 */ context.put("subTable", subTable); +/* 109 */ context.put("subTableName", subTableName); +/* 110 */ context.put("subTableFkName", subTableFkName); +/* 111 */ context.put("subTableFkClassName", subTableFkClassName); +/* 112 */ context.put("subTableFkclassName", StringUtils.uncapitalize(subTableFkClassName)); +/* 113 */ context.put("subClassName", subClassName); +/* 114 */ context.put("subclassName", StringUtils.uncapitalize(subClassName)); +/* 115 */ context.put("subImportList", getImportList(genTable.getSubTable())); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static List getTemplateList(String tplCategory) { +/* 125 */ List templates = new ArrayList<>(); +/* 126 */ templates.add("vm/java/domain.java.vm"); +/* 127 */ templates.add("vm/java/mapper.java.vm"); +/* 128 */ templates.add("vm/java/service.java.vm"); +/* 129 */ templates.add("vm/java/serviceImpl.java.vm"); +/* 130 */ templates.add("vm/java/controller.java.vm"); +/* 131 */ templates.add("vm/xml/mapper.xml.vm"); +/* 132 */ if ("crud".equals(tplCategory)) { +/* */ +/* 134 */ templates.add("vm/html/list.html.vm"); +/* */ } +/* 136 */ else if ("tree".equals(tplCategory)) { +/* */ +/* 138 */ templates.add("vm/html/tree.html.vm"); +/* 139 */ templates.add("vm/html/list-tree.html.vm"); +/* */ } +/* 141 */ else if ("sub".equals(tplCategory)) { +/* */ +/* 143 */ templates.add("vm/html/list.html.vm"); +/* 144 */ templates.add("vm/java/sub-domain.java.vm"); +/* */ } +/* 146 */ templates.add("vm/html/add.html.vm"); +/* 147 */ templates.add("vm/html/edit.html.vm"); +/* 148 */ templates.add("vm/sql/sql.vm"); +/* 149 */ return templates; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getFileName(String template, GenTable genTable) { +/* 158 */ String fileName = ""; +/* */ +/* 160 */ String packageName = genTable.getPackageName(); +/* */ +/* 162 */ String moduleName = genTable.getModuleName(); +/* */ +/* 164 */ String className = genTable.getClassName(); +/* */ +/* 166 */ String businessName = genTable.getBusinessName(); +/* */ +/* 168 */ String javaPath = "main/java/" + StringUtils.replace(packageName, ".", "/"); +/* 169 */ String mybatisPath = "main/resources/mybatis/" + moduleName; +/* 170 */ String htmlPath = "main/resources/templates/" + moduleName + "/" + businessName; +/* */ +/* 172 */ if (template.contains("domain.java.vm")) +/* */ { +/* 174 */ fileName = StringUtils.format("{}/{}/domain/{}.java", new Object[] { javaPath, businessName, className }); +/* */ } +/* 176 */ if (template.contains("sub-domain.java.vm") && StringUtils.equals("sub", genTable.getTplCategory())) { +/* */ +/* 178 */ fileName = StringUtils.format("{}/{}/domain/{}.java", new Object[] { javaPath, businessName, genTable.getSubTable().getClassName() }); +/* */ } +/* 180 */ else if (template.contains("mapper.java.vm")) { +/* */ +/* 182 */ fileName = StringUtils.format("{}/{}/mapper/{}Mapper.java", new Object[] { javaPath, businessName, className }); +/* */ } +/* 184 */ else if (template.contains("service.java.vm")) { +/* */ +/* 186 */ fileName = StringUtils.format("{}/{}/service/I{}Service.java", new Object[] { javaPath, businessName, className }); +/* */ } +/* 188 */ else if (template.contains("serviceImpl.java.vm")) { +/* */ +/* 190 */ fileName = StringUtils.format("{}/{}/service/impl/{}ServiceImpl.java", new Object[] { javaPath, businessName, className }); +/* */ } +/* 192 */ else if (template.contains("controller.java.vm")) { +/* */ +/* 194 */ fileName = StringUtils.format("{}/{}/controller/{}Controller.java", new Object[] { javaPath, businessName, className }); +/* */ } +/* 196 */ else if (template.contains("mapper.xml.vm")) { +/* */ +/* 198 */ fileName = StringUtils.format("{}/{}Mapper.xml", new Object[] { mybatisPath, className }); +/* */ } +/* 200 */ else if (template.contains("list.html.vm")) { +/* */ +/* 202 */ fileName = StringUtils.format("{}/{}.html", new Object[] { htmlPath, businessName }); +/* */ } +/* 204 */ else if (template.contains("list-tree.html.vm")) { +/* */ +/* 206 */ fileName = StringUtils.format("{}/{}.html", new Object[] { htmlPath, businessName }); +/* */ } +/* 208 */ else if (template.contains("tree.html.vm")) { +/* */ +/* 210 */ fileName = StringUtils.format("{}/tree.html", new Object[] { htmlPath }); +/* */ } +/* 212 */ else if (template.contains("add.html.vm")) { +/* */ +/* 214 */ fileName = StringUtils.format("{}/add.html", new Object[] { htmlPath }); +/* */ } +/* 216 */ else if (template.contains("edit.html.vm")) { +/* */ +/* 218 */ fileName = StringUtils.format("{}/edit.html", new Object[] { htmlPath }); +/* */ } +/* 220 */ else if (template.contains("sql.vm")) { +/* */ +/* 222 */ fileName = businessName + "Menu.sql"; +/* */ } +/* 224 */ return fileName; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getPackagePrefix(String packageName) { +/* 235 */ int lastIndex = packageName.lastIndexOf("."); +/* 236 */ String basePackage = StringUtils.substring(packageName, 0, lastIndex); +/* 237 */ return basePackage; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static HashSet getImportList(GenTable genTable) { +/* 248 */ List columns = genTable.getColumns(); +/* 249 */ GenTable subGenTable = genTable.getSubTable(); +/* 250 */ HashSet importList = new HashSet<>(); +/* 251 */ if (StringUtils.isNotNull(subGenTable)) +/* */ { +/* 253 */ importList.add("java.util.List"); +/* */ } +/* 255 */ for (GenTableColumn column : columns) { +/* */ +/* 257 */ if (!column.isSuperColumn() && "Date".equals(column.getJavaType())) { +/* */ +/* 259 */ importList.add("java.util.Date"); +/* 260 */ importList.add("com.fasterxml.jackson.annotation.JsonFormat"); continue; +/* */ } +/* 262 */ if (!column.isSuperColumn() && "BigDecimal".equals(column.getJavaType())) +/* */ { +/* 264 */ importList.add("java.math.BigDecimal"); +/* */ } +/* */ } +/* 267 */ return importList; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getPermissionPrefix(String moduleName, String businessName) { +/* 279 */ return StringUtils.format("{}:{}", new Object[] { moduleName, businessName }); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getParentMenuId(JSONObject paramsObj) { +/* 290 */ if (StringUtils.isNotEmpty((Map)paramsObj) && paramsObj.containsKey("parentMenuId")) +/* */ { +/* 292 */ return paramsObj.getString("parentMenuId"); +/* */ } +/* 294 */ return "3"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getTreecode(JSONObject paramsObj) { +/* 305 */ if (paramsObj.containsKey("treeCode")) +/* */ { +/* 307 */ return StringUtils.toCamelCase(paramsObj.getString("treeCode")); +/* */ } +/* 309 */ return ""; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getTreeParentCode(JSONObject paramsObj) { +/* 320 */ if (paramsObj.containsKey("treeParentCode")) +/* */ { +/* 322 */ return StringUtils.toCamelCase(paramsObj.getString("treeParentCode")); +/* */ } +/* 324 */ return ""; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getTreeName(JSONObject paramsObj) { +/* 335 */ if (paramsObj.containsKey("treeName")) +/* */ { +/* 337 */ return StringUtils.toCamelCase(paramsObj.getString("treeName")); +/* */ } +/* 339 */ return ""; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static int getExpandColumn(GenTable genTable) { +/* 350 */ String options = genTable.getOptions(); +/* 351 */ JSONObject paramsObj = JSONObject.parseObject(options); +/* 352 */ String treeName = paramsObj.getString("treeName"); +/* 353 */ int num = 0; +/* 354 */ for (GenTableColumn column : genTable.getColumns()) { +/* */ +/* 356 */ if (column.isList()) { +/* */ +/* 358 */ num++; +/* 359 */ String columnName = column.getColumnName(); +/* 360 */ if (columnName.equals(treeName)) { +/* */ break; +/* */ } +/* */ } +/* */ } +/* */ +/* 366 */ return num; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\ge\\util\VelocityUtils.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/swagger/SwaggerController.java b/src/main/java/com/archive/project/tool/swagger/SwaggerController.java new file mode 100644 index 0000000..782fb6d --- /dev/null +++ b/src/main/java/com/archive/project/tool/swagger/SwaggerController.java @@ -0,0 +1,32 @@ +/* */ package com.archive.project.tool.swagger + +-INF.classes.com.archive.project.tool.swagger; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/tool/swagger"}) +/* */ public class SwaggerController +/* */ extends BaseController +/* */ { +/* */ @RequiresPermissions({"tool:swagger:view"}) +/* */ @GetMapping +/* */ public String index() { +/* 22 */ return redirect("/swagger-ui.html"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\swagger\SwaggerController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/swagger/TestController.java b/src/main/java/com/archive/project/tool/swagger/TestController.java new file mode 100644 index 0000000..b25c5b9 --- /dev/null +++ b/src/main/java/com/archive/project/tool/swagger/TestController.java @@ -0,0 +1,113 @@ +/* */ package com.archive.project.tool.swagger + +-INF.classes.com.archive.project.tool.swagger; +/* */ +/* */ import com.archive.common.utils.StringUtils; +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.tool.swagger.UserEntity; +/* */ import io.swagger.annotations.Api; +/* */ import io.swagger.annotations.ApiImplicitParam; +/* */ import io.swagger.annotations.ApiOperation; +/* */ import java.util.ArrayList; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.springframework.web.bind.annotation.DeleteMapping; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.PathVariable; +/* */ import org.springframework.web.bind.annotation.PostMapping; +/* */ import org.springframework.web.bind.annotation.PutMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.RestController; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Api("用户信息管理") +/* */ @RestController +/* */ @RequestMapping({"/test/user"}) +/* */ public class TestController +/* */ extends BaseController +/* */ { +/* */ public TestController() { +/* 35 */ users.put(Integer.valueOf(1), new UserEntity(Integer.valueOf(1), "admin", "admin123", "15888888888")); +/* 36 */ users.put(Integer.valueOf(2), new UserEntity(Integer.valueOf(2), "ry", "admin123", "15666666666")); +/* */ } +/* */ +/* */ +/* */ @ApiOperation("获取用户列表") +/* */ @GetMapping({"/list"}) +/* */ public AjaxResult userList() { +/* 43 */ List userList = new ArrayList<>(users.values()); +/* 44 */ return AjaxResult.success(userList); +/* */ } +/* */ private static final Map users = new LinkedHashMap<>(); +/* */ +/* */ @ApiOperation("获取用户详细") +/* */ @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") +/* */ @GetMapping({"/{userId}"}) +/* */ public AjaxResult getUser(@PathVariable Integer userId) { +/* 52 */ if (!users.isEmpty() && users.containsKey(userId)) +/* */ { +/* 54 */ return AjaxResult.success(users.get(userId)); +/* */ } +/* */ +/* */ +/* 58 */ return error("用户不存在"); +/* */ } +/* */ +/* */ +/* */ +/* */ @ApiOperation("新增用户") +/* */ @ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity") +/* */ @PostMapping({"/save"}) +/* */ public AjaxResult save(UserEntity user) { +/* 67 */ if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) +/* */ { +/* 69 */ return error("用户ID不能为空"); +/* */ } +/* 71 */ return AjaxResult.success(users.put(user.getUserId(), user)); +/* */ } +/* */ +/* */ +/* */ @ApiOperation("更新用户") +/* */ @ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity") +/* */ @PutMapping({"/update"}) +/* */ public AjaxResult update(UserEntity user) { +/* 79 */ if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) +/* */ { +/* 81 */ return error("用户ID不能为空"); +/* */ } +/* 83 */ if (users.isEmpty() || !users.containsKey(user.getUserId())) +/* */ { +/* 85 */ return error("用户不存在"); +/* */ } +/* 87 */ users.remove(user.getUserId()); +/* 88 */ return AjaxResult.success(users.put(user.getUserId(), user)); +/* */ } +/* */ +/* */ +/* */ @ApiOperation("删除用户信息") +/* */ @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") +/* */ @DeleteMapping({"/{userId}"}) +/* */ public AjaxResult delete(@PathVariable Integer userId) { +/* 96 */ if (!users.isEmpty() && users.containsKey(userId)) { +/* */ +/* 98 */ users.remove(userId); +/* 99 */ return success(); +/* */ } +/* */ +/* */ +/* 103 */ return error("用户不存在"); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\swagger\TestController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/tool/swagger/UserEntity.java b/src/main/java/com/archive/project/tool/swagger/UserEntity.java new file mode 100644 index 0000000..cf7b739 --- /dev/null +++ b/src/main/java/com/archive/project/tool/swagger/UserEntity.java @@ -0,0 +1,183 @@ +/* */ package com.archive.project.tool.swagger + +-INF.classes.com.archive.project.tool.swagger; +/* */ +/* */ import io.swagger.annotations.ApiModel; +/* */ import io.swagger.annotations.ApiModelProperty; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @ApiModel("用户实体") +/* */ class UserEntity +/* */ { +/* */ @ApiModelProperty("用户ID") +/* */ private Integer userId; +/* */ @ApiModelProperty("用户名称") +/* */ private String username; +/* */ @ApiModelProperty("用户密码") +/* */ private String password; +/* */ @ApiModelProperty("用户手机") +/* */ private String mobile; +/* */ +/* */ public UserEntity() {} +/* */ +/* */ public UserEntity(Integer userId, String username, String password, String mobile) { +/* 130 */ this.userId = userId; +/* 131 */ this.username = username; +/* 132 */ this.password = password; +/* 133 */ this.mobile = mobile; +/* */ } +/* */ +/* */ +/* */ public Integer getUserId() { +/* 138 */ return this.userId; +/* */ } +/* */ +/* */ +/* */ public void setUserId(Integer userId) { +/* 143 */ this.userId = userId; +/* */ } +/* */ +/* */ +/* */ public String getUsername() { +/* 148 */ return this.username; +/* */ } +/* */ +/* */ +/* */ public void setUsername(String username) { +/* 153 */ this.username = username; +/* */ } +/* */ +/* */ +/* */ public String getPassword() { +/* 158 */ return this.password; +/* */ } +/* */ +/* */ +/* */ public void setPassword(String password) { +/* 163 */ this.password = password; +/* */ } +/* */ +/* */ +/* */ public String getMobile() { +/* 168 */ return this.mobile; +/* */ } +/* */ +/* */ +/* */ public void setMobile(String mobile) { +/* 173 */ this.mobile = mobile; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\tool\swagger\UserEntity.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/ycts/ExceptionInfoController.java b/src/main/java/com/archive/project/ycts/ExceptionInfoController.java new file mode 100644 index 0000000..c056f73 --- /dev/null +++ b/src/main/java/com/archive/project/ycts/ExceptionInfoController.java @@ -0,0 +1,37 @@ +/* */ package com.archive.project.ycts + +-INF.classes.com.archive.project.ycts; +/* */ +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/ycts"}) +/* */ public class ExceptionInfoController +/* */ { +/* 19 */ private String prefix = "ycts"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/fileNotExists"}) +/* */ public String fileNotExists() { +/* 27 */ return this.prefix + "/fileNotExists"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\ycts\ExceptionInfoController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/zhtj/datj/controller/DatjController.java b/src/main/java/com/archive/project/zhtj/datj/controller/DatjController.java new file mode 100644 index 0000000..f0532b1 --- /dev/null +++ b/src/main/java/com/archive/project/zhtj/datj/controller/DatjController.java @@ -0,0 +1,229 @@ +/* */ package com.archive.project.zhtj.datj.controller + +-INF.classes.com.archive.project.zhtj.datj.controller; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.zhtj.datj.service.IDatjService; +/* */ import java.util.ArrayList; +/* */ import java.util.HashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/zhtj/datj"}) +/* */ public class DatjController +/* */ extends BaseController +/* */ { +/* 26 */ private String prefix = "zhtj/datj"; +/* */ +/* */ @Autowired +/* */ private IDatjService datjService; +/* */ +/* */ +/* */ @RequiresPermissions({"zhtj:datj:view"}) +/* */ @GetMapping +/* */ public String archivesearch(ModelMap mmap) { +/* 35 */ return this.prefix + "/datj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"zhtj:datj:view"}) +/* */ @GetMapping({"/mlsltj"}) +/* */ public String mlsltj(ModelMap mmap) { +/* 47 */ return this.prefix + "/mlsltj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/qztj"}) +/* */ public String qztj(ModelMap mmap) { +/* 58 */ return this.prefix + "/qztj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/bgqxtj"}) +/* */ public String bgqxtj(ModelMap mmap) { +/* 69 */ return this.prefix + "/bgqxtj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getMlslData"}) +/* */ @ResponseBody +/* */ public Map getMlslData() { +/* 80 */ return this.datjService.getMlslData(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getMlslTableData"}) +/* */ @ResponseBody +/* */ public AjaxResult getMlslTableData() { +/* 90 */ List> list = new ArrayList<>(); +/* */ try { +/* 92 */ list = this.datjService.getMlslTableData(); +/* 93 */ } catch (Exception e) { +/* 94 */ e.printStackTrace(); +/* */ } +/* 96 */ return AjaxResult.success(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getMlslTxData"}) +/* */ @ResponseBody +/* */ public AjaxResult getMlslTxData() { +/* 107 */ Map> map = new HashMap<>(); +/* */ try { +/* 109 */ map = this.datjService.getMlslTxData(); +/* 110 */ } catch (Exception e) { +/* 111 */ e.printStackTrace(); +/* */ } +/* 113 */ return AjaxResult.success(map); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getQztjTableData"}) +/* */ @ResponseBody +/* */ public AjaxResult getQztjTableData() { +/* 124 */ List> list = new ArrayList<>(); +/* */ try { +/* 126 */ list = this.datjService.getQztjTableData(); +/* 127 */ } catch (Exception e) { +/* 128 */ e.printStackTrace(); +/* */ } +/* 130 */ return AjaxResult.success(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getQzTxData"}) +/* */ @ResponseBody +/* */ public AjaxResult getQzTxData() { +/* 140 */ Map> map = new HashMap<>(); +/* */ try { +/* 142 */ map = this.datjService.getQzTxData(); +/* 143 */ } catch (Exception e) { +/* 144 */ e.printStackTrace(); +/* */ } +/* 146 */ return AjaxResult.success(map); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getBgqx"}) +/* */ @ResponseBody +/* */ public AjaxResult getBgqx() { +/* 156 */ List list = this.datjService.getBgqx(); +/* 157 */ List res = new ArrayList<>(); +/* 158 */ for (int i = 0; i < list.size(); i++) { +/* 159 */ String bgqx = list.get(i); +/* 160 */ if (bgqx.equals("Y")) { +/* 161 */ res.add("永久"); +/* 162 */ } else if (bgqx.equals("C")) { +/* 163 */ res.add("长期"); +/* 164 */ } else if (bgqx.equals("D")) { +/* 165 */ res.add("短期"); +/* 166 */ } else if (bgqx.equals("D100")) { +/* 167 */ res.add("100年"); +/* 168 */ } else if (bgqx.equals("D50")) { +/* 169 */ res.add("50年"); +/* 170 */ } else if (bgqx.equals("D30")) { +/* 171 */ res.add("30年"); +/* 172 */ } else if (bgqx.equals("D20")) { +/* 173 */ res.add("20年"); +/* 174 */ } else if (bgqx.equals("D15")) { +/* 175 */ res.add("15年"); +/* 176 */ } else if (bgqx.equals("D10")) { +/* 177 */ res.add("10年"); +/* 178 */ } else if (bgqx.equals("D5")) { +/* 179 */ res.add("5年"); +/* */ } else { +/* 181 */ res.add(bgqx); +/* */ } +/* */ } +/* 184 */ return AjaxResult.success(res); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getBgqxtjTableData"}) +/* */ @ResponseBody +/* */ public AjaxResult getBgqxtjTableData() { +/* 195 */ List> list = new ArrayList<>(); +/* */ try { +/* 197 */ list = this.datjService.getBgqxtjTableData(); +/* 198 */ } catch (Exception e) { +/* 199 */ e.printStackTrace(); +/* */ } +/* 201 */ return AjaxResult.success(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getArchiveCount"}) +/* */ @ResponseBody +/* */ public AjaxResult getArchiveCount() { +/* 213 */ Map map = new HashMap<>(); +/* */ try { +/* 215 */ map = this.datjService.getArchiveCount(); +/* 216 */ } catch (Exception e) { +/* 217 */ e.printStackTrace(); +/* */ } +/* 219 */ return AjaxResult.success(map); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\datj\controller\DatjController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/zhtj/datj/service/IDatjService.java b/src/main/java/com/archive/project/zhtj/datj/service/IDatjService.java new file mode 100644 index 0000000..9939870 --- /dev/null +++ b/src/main/java/com/archive/project/zhtj/datj/service/IDatjService.java @@ -0,0 +1,30 @@ +package com.archive.project.zhtj.datj.service + +-INF.classes.com.archive.project.zhtj.datj.service; + +import java.util.List; +import java.util.Map; + +public interface IDatjService { + Map getMlslData(); + + List> getMlslTableData(); + + Map> getMlslTxData(); + + List> getQztjTableData(); + + Map> getQzTxData(); + + List> getBgqxtjTableData(); + + List getBgqx(); + + Map getArchiveCount(); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\datj\service\IDatjService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/zhtj/datj/service/impl/DatjServiceImpl.java b/src/main/java/com/archive/project/zhtj/datj/service/impl/DatjServiceImpl.java new file mode 100644 index 0000000..97a970f --- /dev/null +++ b/src/main/java/com/archive/project/zhtj/datj/service/impl/DatjServiceImpl.java @@ -0,0 +1,401 @@ +/* */ package com.archive.project.zhtj.datj.service.impl + +-INF.classes.com.archive.project.zhtj.datj.service.impl; +/* */ +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import com.archive.project.zhtj.datj.service.IDatjService; +/* */ import java.text.NumberFormat; +/* */ import java.util.ArrayList; +/* */ import java.util.HashMap; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class DatjServiceImpl +/* */ implements IDatjService +/* */ { +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private IConfigService configService; +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public List> getMlslTableData() { +/* 57 */ List> list = new ArrayList<>(); +/* 58 */ int zjs = 0; +/* 59 */ int zjns = 0; +/* 60 */ int zjas = 0; +/* 61 */ int zyws = 0; +/* */ +/* 63 */ String sql = "SELECT type,arhcive_code,archive_name FROM t_xtpz_archive_type order by show_order"; +/* 64 */ List> datalist = this.executeSqlService.queryList(sql); +/* 65 */ for (int i = 0; i < datalist.size(); i++) { +/* 66 */ String type = (((LinkedHashMap)datalist.get(i)).get("type") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("type").toString(); +/* 67 */ String code = (((LinkedHashMap)datalist.get(i)).get("arhcive_code") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("arhcive_code").toString(); +/* 68 */ String name = (((LinkedHashMap)datalist.get(i)).get("archive_name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archive_name").toString(); +/* 69 */ Map map1 = new HashMap<>(); +/* 70 */ map1.put("name", name); +/* 71 */ if (type.toLowerCase().equals("file")) { +/* */ +/* */ +/* 74 */ String zsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; +/* 75 */ String zsS = this.executeSqlService.getSingle(zsSql); +/* 76 */ map1.put("jas", zsS); +/* 77 */ zjas += Integer.parseInt(zsS); +/* */ +/* 79 */ String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; +/* 80 */ String ywS = this.executeSqlService.getSingle(ywSql); +/* 81 */ zyws += Integer.parseInt(ywS); +/* 82 */ map1.put("yws", ywS); +/* 83 */ map1.put("js", "0"); +/* 84 */ map1.put("jns", "0"); +/* 85 */ } else if (type.toLowerCase().equals("folder")) { +/* */ +/* */ +/* 88 */ String zsSql = "select count(1) from t_ar_" + code + "_folder where is_delete='0' and status='80'"; +/* 89 */ String zsS = this.executeSqlService.getSingle(zsSql); +/* 90 */ map1.put("js", zsS); +/* 91 */ zjs += Integer.parseInt(zsS); +/* */ +/* 93 */ String zjnsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; +/* 94 */ String jns = this.executeSqlService.getSingle(zjnsSql); +/* 95 */ map1.put("jns", jns); +/* 96 */ zjns += Integer.parseInt(jns); +/* */ +/* 98 */ String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; +/* 99 */ String yws = this.executeSqlService.getSingle(ywSql); +/* 100 */ map1.put("yws", yws); +/* 101 */ zyws += Integer.parseInt(yws); +/* */ +/* 103 */ map1.put("jas", "0"); +/* */ } +/* 105 */ list.add(map1); +/* */ } +/* */ +/* 108 */ Map map = new HashMap<>(); +/* 109 */ map.put("name", "合计"); +/* 110 */ map.put("js", String.valueOf(zjs)); +/* 111 */ map.put("jns", String.valueOf(zjns)); +/* 112 */ map.put("jas", String.valueOf(zjas)); +/* 113 */ map.put("yws", String.valueOf(zyws)); +/* 114 */ list.add(map); +/* 115 */ return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map> getMlslTxData() { +/* 124 */ Map> map = new HashMap<>(); +/* */ +/* 126 */ String sql = "SELECT type,arhcive_code,archive_name FROM t_xtpz_archive_type order by show_order"; +/* 127 */ List> datalist = this.executeSqlService.queryList(sql); +/* 128 */ List jssttr = new ArrayList<>(); +/* 129 */ List jnsttr = new ArrayList<>(); +/* 130 */ List jasttr = new ArrayList<>(); +/* 131 */ List ywsttr = new ArrayList<>(); +/* 132 */ List nameSttr = new ArrayList<>(); +/* 133 */ for (int i = 0; i < datalist.size(); i++) { +/* 134 */ String type = (((LinkedHashMap)datalist.get(i)).get("type") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("type").toString(); +/* 135 */ String code = (((LinkedHashMap)datalist.get(i)).get("arhcive_code") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("arhcive_code").toString(); +/* 136 */ String name = (((LinkedHashMap)datalist.get(i)).get("archive_name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archive_name").toString(); +/* 137 */ nameSttr.add(name); +/* 138 */ if (type.toLowerCase().equals("file")) { +/* */ +/* */ +/* 141 */ String zsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; +/* 142 */ String zsS = this.executeSqlService.getSingle(zsSql); +/* 143 */ jasttr.add(zsS); +/* */ +/* 145 */ String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; +/* 146 */ String ywS = this.executeSqlService.getSingle(ywSql); +/* 147 */ ywsttr.add(ywS); +/* 148 */ jssttr.add("0"); +/* 149 */ jnsttr.add("0"); +/* 150 */ } else if (type.toLowerCase().equals("folder")) { +/* */ +/* */ +/* 153 */ String zsSql = "select count(1) from t_ar_" + code + "_folder where is_delete='0' and status='80'"; +/* 154 */ String zsS = this.executeSqlService.getSingle(zsSql); +/* 155 */ jssttr.add(zsS); +/* */ +/* 157 */ String zjnsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; +/* 158 */ String jns = this.executeSqlService.getSingle(zjnsSql); +/* 159 */ jnsttr.add(jns); +/* */ +/* 161 */ String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; +/* 162 */ String yws = this.executeSqlService.getSingle(ywSql); +/* 163 */ ywsttr.add(yws); +/* */ +/* 165 */ jasttr.add("0"); +/* */ } +/* */ } +/* 168 */ map.put("name", nameSttr); +/* 169 */ map.put("js", jssttr); +/* 170 */ map.put("jns", jnsttr); +/* 171 */ map.put("jas", jasttr); +/* 172 */ map.put("yws", ywsttr); +/* 173 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List> getQztjTableData() { +/* 183 */ List> list = new ArrayList<>(); +/* */ +/* 185 */ String sql = ""; +/* 186 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 187 */ sql = "select concat_ws('-',qzh,qzmc) as qz from t_ar_total group by concat_ws('-',qzh,qzmc) "; +/* */ } +/* 189 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 190 */ sql = "select qzh||'-'||qzmc as qz from t_ar_total group by qzh||'-'||qzmc "; +/* */ } +/* */ +/* */ +/* 194 */ List> datalist = this.executeSqlService.queryList(sql); +/* 195 */ for (int i = 0; i < datalist.size(); i++) { +/* 196 */ if (datalist.get(i) != null) { +/* 197 */ Map map = new HashMap<>(); +/* 198 */ String qz = (((LinkedHashMap)datalist.get(i)).get("qz") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("qz").toString(); +/* 199 */ if (!qz.equals("")) { +/* 200 */ map.put("name", qz); +/* 201 */ String qzh = qz.split("-")[0]; +/* 202 */ String jsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FOLDER' and archiveType='folder' "; +/* 203 */ String zsS = this.executeSqlService.getSingle(jsql); +/* 204 */ map.put("js", zsS); +/* 205 */ String jnsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='folder'"; +/* 206 */ String jns = this.executeSqlService.getSingle(jnsql); +/* 207 */ map.put("jns", jns); +/* 208 */ String jasql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='file'"; +/* 209 */ String jas = this.executeSqlService.getSingle(jasql); +/* 210 */ map.put("jas", jas); +/* 211 */ String ywsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and dzqw>0"; +/* 212 */ String yws = this.executeSqlService.getSingle(ywsql); +/* 213 */ map.put("yws", yws); +/* 214 */ list.add(map); +/* */ } +/* */ } +/* */ } +/* 218 */ return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map> getQzTxData() { +/* 229 */ Map> map = new HashMap<>(); +/* */ +/* 231 */ String sql = ""; +/* 232 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 233 */ sql = "select concat_ws('-',qzh,qzmc) as qz from t_ar_total group by concat_ws('-',qzh,qzmc) "; +/* */ } +/* 235 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 236 */ sql = "select qzh||'-'||qzmc as qz from t_ar_total group by qzh||'-'||qzmc "; +/* */ } +/* */ +/* 239 */ List> datalist = this.executeSqlService.queryList(sql); +/* 240 */ List jssttr = new ArrayList<>(); +/* 241 */ List jnsttr = new ArrayList<>(); +/* 242 */ List jasttr = new ArrayList<>(); +/* 243 */ List ywsttr = new ArrayList<>(); +/* 244 */ List nameSttr = new ArrayList<>(); +/* 245 */ for (int i = 0; i < datalist.size(); i++) { +/* 246 */ if (datalist.get(i) != null) { +/* 247 */ String qz = (((LinkedHashMap)datalist.get(i)).get("qz") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("qz").toString(); +/* 248 */ nameSttr.add(qz); +/* 249 */ String qzh = qz.split("-")[0]; +/* 250 */ String jsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FOLDER' and archiveType='folder' "; +/* 251 */ String zsS = this.executeSqlService.getSingle(jsql); +/* 252 */ jssttr.add(zsS); +/* 253 */ String jnsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='folder'"; +/* 254 */ String jns = this.executeSqlService.getSingle(jnsql); +/* 255 */ jnsttr.add(jns); +/* 256 */ String jasql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='file'"; +/* 257 */ String jas = this.executeSqlService.getSingle(jasql); +/* 258 */ jasttr.add(jas); +/* 259 */ String ywsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and dzqw>0"; +/* 260 */ String yws = this.executeSqlService.getSingle(ywsql); +/* 261 */ ywsttr.add(yws); +/* */ } +/* */ } +/* 264 */ map.put("name", nameSttr); +/* 265 */ map.put("js", jssttr); +/* 266 */ map.put("jns", jnsttr); +/* 267 */ map.put("jas", jasttr); +/* 268 */ map.put("yws", ywsttr); +/* 269 */ return map; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List getBgqx() { +/* 279 */ List list = new ArrayList<>(); +/* 280 */ String sql = "select bgqx from t_ar_total group by bgqx order by bgqx"; +/* 281 */ List> datalist = this.executeSqlService.queryList(sql); +/* 282 */ for (int i = 0; i < datalist.size(); i++) { +/* 283 */ String bgqx = (((LinkedHashMap)datalist.get(i)).get("bgqx") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("bgqx").toString(); +/* 284 */ if (!bgqx.equals("")) { +/* 285 */ list.add(bgqx); +/* */ } +/* */ } +/* 288 */ return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List> getBgqxtjTableData() { +/* 297 */ List> list = new ArrayList<>(); +/* 298 */ List bgqxList = getBgqx(); +/* 299 */ String sql = "select archiveTypeName,archiveType from t_ar_total group by archiveTypeName,archiveType "; +/* 300 */ List> datalist = this.executeSqlService.queryList(sql); +/* 301 */ for (int i = 0; i < datalist.size(); i++) { +/* 302 */ List rowList = new ArrayList<>(); +/* 303 */ String archiveTypeName = (((LinkedHashMap)datalist.get(i)).get("archiveTypeName") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archiveTypeName").toString(); +/* 304 */ String archiveType = (((LinkedHashMap)datalist.get(i)).get("archiveType") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archiveType").toString(); +/* 305 */ if (!archiveTypeName.equals("")) { +/* 306 */ rowList.add(archiveTypeName); +/* 307 */ for (int j = 0; j < bgqxList.size(); j++) { +/* 308 */ if (archiveType.toLowerCase().equals("folder")) { +/* 309 */ String jsql = "select count(1) from t_ar_total where archiveTypeName='" + archiveTypeName + "' and tableName like '%_FOLDER' and bgqx='" + (String)bgqxList.get(j) + "' "; +/* 310 */ String js = this.executeSqlService.getSingle(jsql); +/* 311 */ rowList.add(js); +/* 312 */ String jnsql = "select count(1) from t_ar_total where archiveTypeName='" + archiveTypeName + "' and tableName like '%_FILE' and bgqx='" + (String)bgqxList.get(j) + "' "; +/* 313 */ String jns = this.executeSqlService.getSingle(jnsql); +/* 314 */ rowList.add(jns); +/* 315 */ rowList.add("0"); +/* */ } else { +/* */ +/* 318 */ rowList.add("0"); +/* 319 */ rowList.add("0"); +/* 320 */ String jasql = "select count(1) from t_ar_total where archiveTypeName='" + archiveTypeName + "' and tableName like '%_FILE' and bgqx='" + (String)bgqxList.get(j) + "' "; +/* 321 */ String jas = this.executeSqlService.getSingle(jasql); +/* 322 */ rowList.add(jas); +/* */ } +/* */ } +/* 325 */ list.add(rowList); +/* */ } +/* */ } +/* 328 */ return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map getArchiveCount() { +/* 339 */ Map map = new HashMap<>(); +/* 340 */ String jsql = "select count(1) from t_ar_total where tableName like '%_FOLDER' and archiveType='folder' "; +/* 341 */ String zsS = this.executeSqlService.getSingle(jsql); +/* 342 */ map.put("js", zsS); +/* 343 */ String jnsql = "select count(1) from t_ar_total where tableName like '%_FILE' and archiveType='folder'"; +/* 344 */ String jns = this.executeSqlService.getSingle(jnsql); +/* 345 */ map.put("jns", jns); +/* 346 */ String jasql = "select count(1) from t_ar_total where tableName like '%_FILE' and archiveType='file'"; +/* 347 */ String jas = this.executeSqlService.getSingle(jasql); +/* 348 */ map.put("jas", jas); +/* 349 */ String ywsql = "select count(1) from t_ar_total where tableName like '%_FILE' and dzqw>0"; +/* 350 */ String yws = this.executeSqlService.getSingle(ywsql); +/* 351 */ map.put("yws", yws); +/* */ +/* */ +/* 354 */ int count = Integer.parseInt(jns) + Integer.parseInt(jas); +/* 355 */ NumberFormat numberFormat = NumberFormat.getInstance(); +/* */ +/* 357 */ numberFormat.setMaximumFractionDigits(2); +/* 358 */ String result = numberFormat.format((Integer.parseInt(yws) / count * 100.0F)); +/* 359 */ System.out.println("百分比为:" + result + "%"); +/* 360 */ map.put("szhl", result + "%"); +/* 361 */ return map; +/* */ } +/* */ +/* */ +/* */ public Map getMlslData() { +/* 366 */ Map resultMap = new HashMap<>(); +/* */ +/* 368 */ String sql = "SELECT type,arhcive_code,archive_name FROM t_xtpz_archive_type order by show_order"; +/* 369 */ List> datalist = this.executeSqlService.queryList(sql); +/* */ +/* 371 */ Object[] xAxisData = new Object[datalist.size()]; +/* 372 */ Object[] seriesJsData = new Object[datalist.size()]; +/* 373 */ Object[] seriesDzqwData = new Object[datalist.size()]; +/* 374 */ for (int i = 0; i < datalist.size(); i++) { +/* 375 */ LinkedHashMap tempMap = datalist.get(i); +/* 376 */ xAxisData[i] = tempMap.get("archive_name"); +/* */ +/* 378 */ String code = (((LinkedHashMap)datalist.get(i)).get("arhcive_code") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("arhcive_code").toString(); +/* */ +/* 380 */ String jsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; +/* 381 */ String js = this.executeSqlService.getSingle(jsSql); +/* 382 */ seriesJsData[i] = js; +/* */ +/* 384 */ String dzqwsSql = "select count(dqzws) from t_ar_" + code + "_file where is_delete='0' and status='80'"; +/* 385 */ String dzqws = this.executeSqlService.getSingle(dzqwsSql); +/* 386 */ seriesDzqwData[i] = dzqws; +/* */ } +/* 388 */ resultMap.put("xAxisData", xAxisData); +/* 389 */ resultMap.put("seriesJsData", seriesJsData); +/* 390 */ resultMap.put("seriesDzqwData", seriesDzqwData); +/* 391 */ return resultMap; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\datj\service\impl\DatjServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/zhtj/lytj/controller/LytjController.java b/src/main/java/com/archive/project/zhtj/lytj/controller/LytjController.java new file mode 100644 index 0000000..31abad7 --- /dev/null +++ b/src/main/java/com/archive/project/zhtj/lytj/controller/LytjController.java @@ -0,0 +1,189 @@ +/* */ package com.archive.project.zhtj.lytj.controller + +-INF.classes.com.archive.project.zhtj.lytj.controller; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import com.archive.framework.web.domain.AjaxResult; +/* */ import com.archive.project.jyly.borrow.domain.TArchiveBorrow; +/* */ import com.archive.project.jyly.borrow.service.ITArchiveBorrowService; +/* */ import com.archive.project.zhtj.lytj.service.ILytjService; +/* */ import java.text.ParseException; +/* */ import java.util.ArrayList; +/* */ import java.util.HashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ import org.springframework.web.bind.annotation.ResponseBody; +/* */ +/* */ @Controller +/* */ @RequestMapping({"/zhtj/lytj"}) +/* */ public class LytjController extends BaseController { +/* 24 */ private String prefix = "zhtj/lytj"; +/* */ +/* */ @Autowired +/* */ private ILytjService lytjService; +/* */ +/* */ @Autowired +/* */ private ITArchiveBorrowService tArchiveBorrowService; +/* */ +/* */ +/* */ @RequiresPermissions({"zhtj:lytj:view"}) +/* */ @GetMapping +/* */ public String archivesearch(ModelMap mmap) { +/* 36 */ return this.prefix + "/lytj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"zhtj:datj:view"}) +/* */ @GetMapping({"/lyrcndtj"}) +/* */ public String lyrcndtj(ModelMap mmap) { +/* 48 */ return this.prefix + "/lyrcndtj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"zhtj:datj:view"}) +/* */ @GetMapping({"/lymxtj"}) +/* */ public String lymxtj(ModelMap mmap) { +/* 60 */ return this.prefix + "/lymxtj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @RequiresPermissions({"zhtj:datj:view"}) +/* */ @GetMapping({"/mydtj"}) +/* */ public String mydtj(ModelMap mmap) { +/* 72 */ return this.prefix + "/mydtj"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getRctjTableData"}) +/* */ @ResponseBody +/* */ public AjaxResult getRctjTableData() { +/* 83 */ List> list = new ArrayList<>(); +/* */ try { +/* 85 */ list = this.lytjService.getRctjTableData(); +/* 86 */ } catch (Exception e) { +/* 87 */ e.printStackTrace(); +/* */ } +/* 89 */ return AjaxResult.success(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getLymxtjTableData"}) +/* */ @ResponseBody +/* */ public AjaxResult getLymxtjTableData() { +/* 100 */ List> list = new ArrayList<>(); +/* */ try { +/* 102 */ list = this.lytjService.getLymxtjTableData(); +/* 103 */ } catch (Exception e) { +/* 104 */ e.printStackTrace(); +/* */ } +/* 106 */ return AjaxResult.success(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getLymxtjTxData"}) +/* */ @ResponseBody +/* */ public AjaxResult getLymxtjTxData() { +/* 116 */ Map list = new HashMap<>(); +/* */ try { +/* 118 */ list = this.lytjService.getLymxtjTxData(); +/* 119 */ } catch (Exception e) { +/* 120 */ e.printStackTrace(); +/* */ } +/* 122 */ return AjaxResult.success(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getMydTableData"}) +/* */ @ResponseBody +/* */ public AjaxResult getMydTableData() { +/* 133 */ List> list = new ArrayList<>(); +/* */ try { +/* 135 */ list = this.lytjService.getMydTableData(); +/* 136 */ } catch (Exception e) { +/* 137 */ e.printStackTrace(); +/* */ } +/* 139 */ return AjaxResult.success(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getMydTxData"}) +/* */ @ResponseBody +/* */ public AjaxResult getMydTxData() { +/* 149 */ List> list = new ArrayList<>(); +/* */ try { +/* 151 */ list = this.lytjService.getMydTxData(); +/* 152 */ } catch (Exception e) { +/* 153 */ e.printStackTrace(); +/* */ } +/* 155 */ return AjaxResult.success(list); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @GetMapping({"/getLyjl"}) +/* */ @ResponseBody +/* */ public AjaxResult getLyjl() throws ParseException { +/* 165 */ TArchiveBorrow tArchiveBorrow = new TArchiveBorrow(); +/* 166 */ List list = this.tArchiveBorrowService.selectTArchiveBorrowList(tArchiveBorrow); +/* 167 */ if (list.size() > 15) { +/* 168 */ for (int i = 0; i < list.size(); i++) { +/* 169 */ if (list.size() - i > 15) { +/* 170 */ list.remove(i); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 179 */ return AjaxResult.success(list); +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\lytj\controller\LytjController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/zhtj/lytj/service/ILytjService.java b/src/main/java/com/archive/project/zhtj/lytj/service/ILytjService.java new file mode 100644 index 0000000..8077ad3 --- /dev/null +++ b/src/main/java/com/archive/project/zhtj/lytj/service/ILytjService.java @@ -0,0 +1,24 @@ +package com.archive.project.zhtj.lytj.service + +-INF.classes.com.archive.project.zhtj.lytj.service; + +import java.util.List; +import java.util.Map; + +public interface ILytjService { + List> getRctjTableData(); + + List> getLymxtjTableData(); + + Map getLymxtjTxData(); + + List> getMydTableData(); + + List> getMydTxData(); +} + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\lytj\service\ILytjService.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/zhtj/lytj/service/impl/LytjServiceImpl.java b/src/main/java/com/archive/project/zhtj/lytj/service/impl/LytjServiceImpl.java new file mode 100644 index 0000000..6b5cbd6 --- /dev/null +++ b/src/main/java/com/archive/project/zhtj/lytj/service/impl/LytjServiceImpl.java @@ -0,0 +1,325 @@ +/* */ package com.archive.project.zhtj.lytj.service.impl + +; +/* */ +/* */ import com.archive.framework.config.ArchiveConfig; +/* */ import com.archive.project.common.service.IExecuteSqlService; +/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; +/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; +/* */ import com.archive.project.system.config.service.IConfigService; +/* */ import com.archive.project.system.dict.service.IDictTypeService; +/* */ import com.archive.project.zhtj.lytj.service.ILytjService; +/* */ import java.util.ArrayList; +/* */ import java.util.HashMap; +/* */ import java.util.LinkedHashMap; +/* */ import java.util.List; +/* */ import java.util.Map; +/* */ import org.springframework.beans.factory.annotation.Autowired; +/* */ import org.springframework.stereotype.Service; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Service +/* */ public class LytjServiceImpl +/* */ implements ILytjService +/* */ { +/* */ @Autowired +/* */ private PhysicalTableMapper physicalTableMapper; +/* */ @Autowired +/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; +/* */ @Autowired +/* */ private IExecuteSqlService executeSqlService; +/* */ @Autowired +/* */ private IConfigService configService; +/* */ @Autowired +/* */ private IDictTypeService dictTypeService; +/* */ @Autowired +/* */ private ArchiveConfig archiveConfig; +/* */ +/* */ public List> getRctjTableData() { +/* 53 */ List> list = new ArrayList<>(); +/* 54 */ String sql = ""; +/* 55 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 56 */ sql = "SELECT SUBSTRING(borrow_data,1,4) as nd,SUBSTRING(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2) ORDER BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2)"; +/* */ } +/* 58 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 59 */ sql = "SELECT SUBSTR(borrow_data,1,4) as nd,SUBSTR(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2) ORDER BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2)"; +/* */ } +/* */ +/* */ +/* 63 */ List> datalist = this.executeSqlService.queryList(sql); +/* 64 */ for (int i = 0; i < datalist.size(); i++) { +/* 65 */ String nd = (((LinkedHashMap)datalist.get(i)).get("nd") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("nd").toString(); +/* 66 */ String yf = (((LinkedHashMap)datalist.get(i)).get("yf") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("yf").toString(); +/* 67 */ Map map1 = new HashMap<>(); +/* 68 */ map1.put("nd", nd); +/* 69 */ map1.put("yf", yf); +/* */ +/* 71 */ String str1 = ""; +/* 72 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 73 */ str1 = "select SUM(pborrow_state) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' "; +/* 74 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 75 */ str1 = "select SUM(pborrow_state) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' "; +/* */ } +/* 77 */ String str2 = this.executeSqlService.getSingle(str1); +/* 78 */ if (str2.equals("")) { +/* 79 */ str2 = "0"; +/* */ } +/* 81 */ map1.put("rc", str2); +/* */ +/* 83 */ String str3 = ""; +/* 84 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 85 */ str3 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='1'"; +/* 86 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 87 */ str3 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='1'"; +/* */ } +/* 89 */ String str4 = this.executeSqlService.getSingle(str3); +/* 90 */ map1.put("dzjy", str4); +/* */ +/* 92 */ String str5 = ""; +/* 93 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 94 */ str5 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='2'"; +/* 95 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 96 */ str5 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='2'"; +/* */ } +/* 98 */ String str6 = this.executeSqlService.getSingle(str5); +/* 99 */ map1.put("stjy", str6); +/* 100 */ list.add(map1); +/* */ } +/* */ +/* 103 */ Map map = new HashMap<>(); +/* 104 */ map.put("nd", "合计"); +/* 105 */ map.put("yf", ""); +/* */ +/* 107 */ String rcsql = "select SUM(pborrow_state) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id "; +/* 108 */ String rc = this.executeSqlService.getSingle(rcsql); +/* 109 */ if (rc.equals("")) { +/* 110 */ rc = "0"; +/* */ } +/* 112 */ map.put("rc", rc); +/* */ +/* 114 */ String dzsql = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='1'"; +/* 115 */ String dzjy = this.executeSqlService.getSingle(dzsql); +/* 116 */ map.put("dzjy", dzjy); +/* */ +/* 118 */ String stsql = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='2'"; +/* 119 */ String stjy = this.executeSqlService.getSingle(stsql); +/* 120 */ map.put("stjy", stjy); +/* 121 */ list.add(map); +/* 122 */ return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List> getLymxtjTableData() { +/* 132 */ List> list = new ArrayList<>(); +/* 133 */ String sql = "select b.table_name as name,count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id group by b.table_name"; +/* 134 */ List> datalist = this.executeSqlService.queryList(sql); +/* 135 */ for (int i = 0; i < datalist.size(); i++) { +/* 136 */ String name = (((LinkedHashMap)datalist.get(i)).get("name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("name").toString(); +/* 137 */ String str1 = (((LinkedHashMap)datalist.get(i)).get("zs") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("zs").toString(); +/* 138 */ Map map1 = new HashMap<>(); +/* 139 */ map1.put("name", name); +/* 140 */ map1.put("zs", str1); +/* */ +/* */ +/* 143 */ String str2 = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where b.table_name='" + name + "' and a.borrow_type='1'"; +/* 144 */ String str3 = this.executeSqlService.getSingle(str2); +/* 145 */ map1.put("dzjy", str3); +/* */ +/* 147 */ String str4 = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where b.table_name='" + name + "' and a.borrow_type='2'"; +/* 148 */ String str5 = this.executeSqlService.getSingle(str4); +/* 149 */ map1.put("stjy", str5); +/* 150 */ list.add(map1); +/* */ } +/* */ +/* 153 */ Map map = new HashMap<>(); +/* 154 */ map.put("name", "合计"); +/* */ +/* 156 */ String rcsql = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id "; +/* 157 */ String zs = this.executeSqlService.getSingle(rcsql); +/* 158 */ map.put("zs", zs); +/* */ +/* */ +/* 161 */ String dzsql = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='1'"; +/* 162 */ String dzjy = this.executeSqlService.getSingle(dzsql); +/* 163 */ map.put("dzjy", dzjy); +/* */ +/* 165 */ String stsql = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='2'"; +/* 166 */ String stjy = this.executeSqlService.getSingle(stsql); +/* 167 */ map.put("stjy", stjy); +/* 168 */ list.add(map); +/* 169 */ return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Map getLymxtjTxData() { +/* 179 */ Map res = new HashMap<>(); +/* 180 */ List nameList = new ArrayList<>(); +/* 181 */ List> list = new ArrayList<>(); +/* 182 */ String sql = "select b.table_name as name,count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id group by b.table_name"; +/* 183 */ List> datalist = this.executeSqlService.queryList(sql); +/* 184 */ for (int i = 0; i < datalist.size(); i++) { +/* 185 */ String name = (((LinkedHashMap)datalist.get(i)).get("name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("name").toString(); +/* 186 */ String zs = (((LinkedHashMap)datalist.get(i)).get("zs") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("zs").toString(); +/* 187 */ Map map = new HashMap<>(); +/* 188 */ map.put("name", name); +/* 189 */ map.put("value", Integer.valueOf(Integer.parseInt(zs))); +/* 190 */ nameList.add(name); +/* 191 */ list.add(map); +/* */ } +/* 193 */ res.put("names", nameList); +/* 194 */ res.put("mapData", list); +/* 195 */ return res; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List> getMydTableData() { +/* 205 */ List> list = new ArrayList<>(); +/* */ +/* 207 */ String sql = ""; +/* 208 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 209 */ sql = "SELECT SUBSTRING(borrow_data,1,4) as nd,SUBSTRING(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2) ORDER BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2)"; +/* */ } +/* 211 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 212 */ sql = "SELECT SUBSTR(borrow_data,1,4) as nd,SUBSTR(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2) ORDER BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2)"; +/* */ } +/* 214 */ List> datalist = this.executeSqlService.queryList(sql); +/* 215 */ for (int i = 0; i < datalist.size(); i++) { +/* 216 */ String nd = (((LinkedHashMap)datalist.get(i)).get("nd") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("nd").toString(); +/* 217 */ String yf = (((LinkedHashMap)datalist.get(i)).get("yf") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("yf").toString(); +/* 218 */ Map map1 = new HashMap<>(); +/* 219 */ map1.put("nd", nd); +/* 220 */ map1.put("yf", yf); +/* */ +/* */ +/* 223 */ String str1 = ""; +/* 224 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 225 */ str1 = "select SUM(pborrow_state) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' "; +/* 226 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 227 */ str1 = "select SUM(pborrow_state) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' "; +/* */ } +/* 229 */ String str2 = this.executeSqlService.getSingle(str1); +/* 230 */ map1.put("rc", str2); +/* */ +/* 232 */ String str3 = ""; +/* 233 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 234 */ str3 = "select count(1) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and (a.using_effect='1' or a.using_effect='' or a.using_effect is null)"; +/* 235 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 236 */ str3 = "select count(1) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and (a.using_effect='1' or a.using_effect='' or a.using_effect is null)"; +/* */ } +/* 238 */ String str4 = this.executeSqlService.getSingle(str3); +/* 239 */ map1.put("fcmy", str4); +/* */ +/* 241 */ String str5 = ""; +/* 242 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 243 */ str5 = "select count(1) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.using_effect='2'"; +/* 244 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 245 */ str5 = "select count(1) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.using_effect='2'"; +/* */ } +/* 247 */ String str6 = this.executeSqlService.getSingle(str5); +/* 248 */ map1.put("my", str6); +/* */ +/* 250 */ String str7 = ""; +/* 251 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { +/* 252 */ str7 = "select count(1) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.using_effect='3'"; +/* 253 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { +/* 254 */ str7 = "select count(1) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.using_effect='3'"; +/* */ } +/* 256 */ String str8 = this.executeSqlService.getSingle(str7); +/* 257 */ map1.put("bmy", str8); +/* 258 */ list.add(map1); +/* */ } +/* */ +/* 261 */ Map map = new HashMap<>(); +/* 262 */ map.put("nd", "合计"); +/* 263 */ map.put("yf", ""); +/* */ +/* 265 */ String rcsql = "select SUM(pborrow_state) from t_archive_borrow "; +/* 266 */ String rc = this.executeSqlService.getSingle(rcsql); +/* 267 */ if (rc.equals("")) { +/* 268 */ rc = "0"; +/* */ } +/* 270 */ map.put("rc", rc); +/* */ +/* 272 */ String fcmysql = "select count(1) from t_archive_borrow a where (a.using_effect='1' or a.using_effect='' or a.using_effect is null)"; +/* 273 */ String fcmy = this.executeSqlService.getSingle(fcmysql); +/* 274 */ map.put("fcmy", fcmy); +/* */ +/* 276 */ String mysql = "select count(1) from t_archive_borrow a where a.using_effect='2'"; +/* 277 */ String my = this.executeSqlService.getSingle(mysql); +/* 278 */ map.put("my", my); +/* */ +/* 280 */ String bmysql = "select count(1) from t_archive_borrow a where a.using_effect='3'"; +/* 281 */ String bmy = this.executeSqlService.getSingle(bmysql); +/* 282 */ map.put("bmy", bmy); +/* 283 */ list.add(map); +/* 284 */ return list; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public List> getMydTxData() { +/* 293 */ List> list = new ArrayList<>(); +/* */ +/* 295 */ Map fcmymap = new HashMap<>(); +/* 296 */ String fcmysql = "select count(1) from t_archive_borrow a where (a.using_effect='1' or a.using_effect='' or a.using_effect is null)"; +/* 297 */ String fcmy = this.executeSqlService.getSingle(fcmysql); +/* 298 */ fcmymap.put("name", "非常满意"); +/* 299 */ fcmymap.put("value", Integer.valueOf(Integer.parseInt(fcmy))); +/* 300 */ list.add(fcmymap); +/* */ +/* 302 */ Map mymap = new HashMap<>(); +/* 303 */ String mysql = "select count(1) from t_archive_borrow a where a.using_effect='2'"; +/* 304 */ String my = this.executeSqlService.getSingle(mysql); +/* 305 */ mymap.put("name", "满意"); +/* 306 */ mymap.put("value", Integer.valueOf(Integer.parseInt(my))); +/* 307 */ list.add(mymap); +/* */ +/* 309 */ Map bmymap = new HashMap<>(); +/* 310 */ String bmysql = "select count(1) from t_archive_borrow a where a.using_effect='3'"; +/* 311 */ String bmy = this.executeSqlService.getSingle(bmysql); +/* 312 */ bmymap.put("name", "不满意"); +/* 313 */ bmymap.put("value", Integer.valueOf(Integer.parseInt(bmy))); +/* 314 */ list.add(bmymap); +/* 315 */ return list; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\lytj\service\impl\LytjServiceImpl.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/java/com/archive/project/zhtj/nbtj/controller/NbtjController.java b/src/main/java/com/archive/project/zhtj/nbtj/controller/NbtjController.java new file mode 100644 index 0000000..1097103 --- /dev/null +++ b/src/main/java/com/archive/project/zhtj/nbtj/controller/NbtjController.java @@ -0,0 +1,39 @@ +/* */ package com.archive.project.zhtj.nbtj.controller + +-INF.classes.com.archive.project.zhtj.nbtj.controller; +/* */ +/* */ import com.archive.framework.web.controller.BaseController; +/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; +/* */ import org.springframework.stereotype.Controller; +/* */ import org.springframework.ui.ModelMap; +/* */ import org.springframework.web.bind.annotation.GetMapping; +/* */ import org.springframework.web.bind.annotation.RequestMapping; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Controller +/* */ @RequestMapping({"/zhtj/nbtj"}) +/* */ public class NbtjController +/* */ extends BaseController +/* */ { +/* 23 */ private String prefix = "zhtj/nbtj"; +/* */ +/* */ +/* */ @RequiresPermissions({"zhtj:nbtj:view"}) +/* */ @GetMapping +/* */ public String nbtj(ModelMap mmap) { +/* 29 */ return this.prefix + "/nbtj"; +/* */ } +/* */ } + + +/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\nbtj\controller\NbtjController.class + * Java compiler version: 8 (52.0) + * JD-Core Version: 1.1.3 + */ \ No newline at end of file diff --git a/src/main/resources/application-druid.yml b/src/main/resources/application-druid.yml new file mode 100644 index 0000000..ddd1261 --- /dev/null +++ b/src/main/resources/application-druid.yml @@ -0,0 +1,56 @@ +# 数据源配置 +spring: + datasource: + driverClassName: org.sqlite.JDBC + druid: + # 主库数据源 + master: + url: jdbc:sqlite:D://archive_sqlite.db?date_string_format=yyyy-MM-dd HH:mm:ss + username: + password: + # 从库数据源 + slave: + # 从数据源开关/默认关闭 + enabled: false + url: + username: + password: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 DUAL + validationQuery: SELECT 1 FROM sys_user + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: ruoyi + login-password: 123456 + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: false #merge sql error, dbType sqlite, druid-1.2.5, sql + wall: + config: + multi-statement-allow: true \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..5a5f60c --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,165 @@ +# 项目相关配置 +archive: + # 名称 + name: archive + # 版本 + version: 1.0.0 + # 版权年份 + copyrightYear: 2023 + # 实例演示开关 + demoEnabled: false + # 文件路径 示例( Windows配置D:/archive/uploadPath,Linux配置 /home/archive/uploadPath) + #已作废,现在从存储管理数据库中设置 + #profile: D:/archive/uploadPath + # 获取ip地址开关 + addressEnabled: false + # 是否启用文件浏览服务 + browseServerEnabled: false + # 文件浏览服务地址 + browseServer: http://192.168.0.106:8012/ + # 数据库类别 + #databaseType: mysql + databaseType: sqlite + +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为80 + port: 8080 + servlet: + # 应用的访问路径 + context-path: / + tomcat: + # tomcat的URI编码 + uri-encoding: UTF-8 + # tomcat最大线程数,默认为200 + max-threads: 800 + # Tomcat启动初始化的线程数,默认值25 + min-spare-threads: 30 + # 配置为127.0.0.1只能本机访问,配置为0.0.0.0则所有机器都能访问 + address: 0.0.0.0 +# 日志配置 +logging: + level: + com.archive: debug + org.springframework: warn + +# 用户配置 +user: + password: + # 密码错误{maxRetryCount}次锁定10分钟 + maxRetryCount: 5 + +# Spring配置 +spring: + # 模板引擎 + thymeleaf: + mode: HTML + encoding: utf-8 + # 禁用缓存 + cache: false + # 资源信息 + messages: + # 国际化资源文件路径 + basename: static/i18n/messages + jackson: + time-zone: GMT+8 + date-format: yyyy-MM-dd HH:mm:ss + profiles: + active: druid + # 文件上传 + servlet: + multipart: + # 单个文件大小 + max-file-size: 10000MB + # 设置总上传的文件大小 + max-request-size: 2000000MB + # 服务模块 + devtools: + restart: + # 热部署开关 + enabled: true + #打开cmd 进入solr-6.0.0\bin目录下,将solr.cmd拖入cmd窗口,在后面加上 start 回车启动,默认端口8983,访问地址http://127.0.0.1:8983/solr + #ik分词是solr6.0自带的,但是词库和配置放在solr-6.0.0\server\solr-webapp\webapp\WEB-INF\classes下,可以添加维护; + data: + solr: + host: http://127.0.0.1:8983/solr/new_core +# MyBatis +mybatis: + # 搜索指定包别名 + typeAliasesPackage: com.archive.project.**.domain + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapperLocations: classpath:mybatis/**/*Mapper.xml + # 加载全局的配置文件 + configLocation: classpath:mybatis/mybatis-config.xml + +# PageHelper分页插件 +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Shiro +shiro: + user: + # 登录地址 + loginUrl: /login + # 权限认证失败地址 + unauthorizedUrl: /unauth + # 首页地址 + indexUrl: /index + # 验证码开关 + captchaEnabled: false + # 验证码类型 math 数组计算 char 字符 + captchaType: math + cookie: + # 设置Cookie的域名 默认空,即当前访问的域名 + domain: + # 设置cookie的有效访问路径 + path: / + # 设置HttpOnly属性 + httpOnly: true + # 设置Cookie的过期时间,天为单位 + maxAge: 30 + # 设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)KeyGenerator keygen = KeyGenerator.getInstance("AES"); SecretKey deskey = keygen.generateKey(); System.out.println(Base64.encodeToString(deskey.getEncoded())); + cipherKey: N3xZgbD91LjXgdyzJWaVbQ== + session: + # Session超时时间,-1代表永不过期(默认30分钟) + expireTime: 30 + # 同步session到数据库的周期(默认1分钟) + dbSyncPeriod: 1 + # 相隔多久检查一次session的有效性,默认就是10分钟 + validationInterval: 10 + # 同一个用户最大会话数,比如2的意思是同一个账号允许最多同时两个人登录(默认-1不限制) + maxSession: -1 + # 踢出之前登录的/之后登录的用户,默认踢出之前登录的用户 + kickoutAfter: false + +# 防止XSS攻击 +xss: + # 过滤开关 + enabled: true + # 排除链接(多个用逗号分隔) + excludes: /system/notice/* + # 匹配链接 + urlPatterns: /system/*,/monitor/*,/tool/* + +# Swagger配置 +swagger: + # 是否开启swagger + enabled: true + +# 代码生成 +gen: + # 作者 + author: archive + # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool + packageName: com.archive.project.system + # 自动去除表前缀,默认是true + autoRemovePre: true + # 表前缀(生成类名不会包含表前缀,多个用逗号分隔) + tablePrefix: sys_ +#tess4j 文字识别插件中文字体库 +tess4j: + data-path: /static/plugins/tessdata + language: chi_sim diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt new file mode 100644 index 0000000..7a3aac5 --- /dev/null +++ b/src/main/resources/banner.txt @@ -0,0 +1,3 @@ +Application Version: ${archive.version} +Spring Boot Version: ${spring-boot.version} +(•‾̑⌣‾̑•)✧˖° (๑´ڡ`๑) (๑¯ิε ¯ิ๑) (๑•́ ₃ •̀๑) ( ∙̆ .̯ ∙̆ ) (๑˘ ˘๑) (●′ω`●) ︶ε╰✿ ✿◡‿◡ (●・̆⍛・̆●) \ No newline at end of file diff --git a/src/main/resources/ehcache/ehcache-shiro.xml b/src/main/resources/ehcache/ehcache-shiro.xml new file mode 100644 index 0000000..3354cbd --- /dev/null +++ b/src/main/resources/ehcache/ehcache-shiro.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/lib/Spire.Office.jar b/src/main/resources/lib/Spire.Office.jar new file mode 100644 index 0000000..de4ce7b Binary files /dev/null and b/src/main/resources/lib/Spire.Office.jar differ diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..7b1ca27 --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/sys-info.log + + + + ${log.path}/sys-info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/sys-error.log + + + + ${log.path}/sys-error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + ${log.path}/sys-user.log + + + ${log.path}/sys-user.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/common/ExecuteSqlMapper.xml b/src/main/resources/mybatis/common/ExecuteSqlMapper.xml new file mode 100644 index 0000000..5c20162 --- /dev/null +++ b/src/main/resources/mybatis/common/ExecuteSqlMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + ${value} + + + + ${value} + + + + ${value} + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dabg/TKfBfglMapper.xml b/src/main/resources/mybatis/dabg/TKfBfglMapper.xml new file mode 100644 index 0000000..798e25d --- /dev/null +++ b/src/main/resources/mybatis/dabg/TKfBfglMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + select id, kfmc, kfh, jclx, status, jcsj, bz,jcr from t_kf_bfgl + + + + + + + + insert into t_kf_bfgl + + kfmc, + kfh, + jclx, + status, + jcsj, + bz, + jcr, + + + #{kfmc}, + #{kfh}, + #{jclx}, + #{status}, + #{jcsj}, + #{bz}, + #{jcr}, + + + + + update t_kf_bfgl + + kfmc = #{kfmc}, + kfh = #{kfh}, + jclx = #{jclx}, + status = #{status}, + jcsj = #{jcsj}, + bz = #{bz}, + jcr = #{jcr}, + + where id = #{id} + + + + delete from t_kf_bfgl where id = #{id} + + + + delete from t_kf_bfgl where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dabg/TKfWsddjMapper.xml b/src/main/resources/mybatis/dabg/TKfWsddjMapper.xml new file mode 100644 index 0000000..32c0782 --- /dev/null +++ b/src/main/resources/mybatis/dabg/TKfWsddjMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + select id, rqsj, jcr, kfmc, kfh, wd, sd, bz, status from t_kf_wsddj + + + + + + + + insert into t_kf_wsddj + + rqsj, + jcr, + kfmc, + kfh, + wd, + sd, + bz, + status, + + + #{rqsj}, + #{jcr}, + #{kfmc}, + #{kfh}, + #{wd}, + #{sd}, + #{bz}, + #{status}, + + + + + update t_kf_wsddj + + rqsj = #{rqsj}, + jcr = #{jcr}, + kfmc = #{kfmc}, + kfh = #{kfh}, + wd = #{wd}, + sd = #{sd}, + bz = #{bz}, + status = #{status}, + + where id = #{id} + + + + delete from t_kf_wsddj where id = #{id} + + + + delete from t_kf_wsddj where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dajs/ArchivedataimportMapper.xml b/src/main/resources/mybatis/dajs/ArchivedataimportMapper.xml new file mode 100644 index 0000000..7028dcb --- /dev/null +++ b/src/main/resources/mybatis/dajs/ArchivedataimportMapper.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + select id, create_time, batchno, batchname, create_userid, create_username, batchcontent, batchmessage, bz, batcharchivetypeid, batcharchivetypename, batcharchivetypecode, importtype, tempfilepath from t_ps_archive_import_batch + + + + + + + + insert into t_ps_archive_import_batch + + create_time, + batchno, + batchname, + create_userid, + create_username, + batchcontent, + batchmessage, + bz, + batcharchivetypeid, + batcharchivetypename, + batcharchivetypecode, + importtype, + tempfilepath, + + + #{createTime}, + #{batchno}, + #{batchname}, + #{createUserid}, + #{createUsername}, + #{batchcontent}, + #{batchmessage}, + #{bz}, + #{batcharchivetypeid}, + #{batcharchivetypename}, + #{batcharchivetypecode}, + #{importtype}, + #{tempfilepath}, + + + + + update t_ps_archive_import_batch + + create_time = #{createTime}, + batchno = #{batchno}, + batchname = #{batchname}, + create_userid = #{createUserid}, + create_username = #{createUsername}, + batchcontent = #{batchcontent}, + batchmessage = #{batchmessage}, + bz = #{bz}, + batcharchivetypeid = #{batcharchivetypeid}, + batcharchivetypename = #{batcharchivetypename}, + batcharchivetypecode = #{batcharchivetypecode}, + importtype = #{importtype}, + tempfilepath = #{tempfilepath}, + + where id = #{id} + + + + delete from t_ps_archive_import_batch where id = #{id} + + + + delete from t_ps_archive_import_batch where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dajs/JsglMapper.xml b/src/main/resources/mybatis/dajs/JsglMapper.xml new file mode 100644 index 0000000..71a7a0d --- /dev/null +++ b/src/main/resources/mybatis/dajs/JsglMapper.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/ArchiveTypeMapper.xml b/src/main/resources/mybatis/dasz/ArchiveTypeMapper.xml new file mode 100644 index 0000000..b853e7f --- /dev/null +++ b/src/main/resources/mybatis/dasz/ArchiveTypeMapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + select id, archive_name, archive_type, type, bz, arhcive_code, show_order from t_xtpz_archive_type + + + + + + + + + + + insert into t_xtpz_archive_type + + archive_name, + archive_type, + type, + bz, + arhcive_code, + show_order, + + + #{archiveName}, + #{archiveType}, + #{type}, + #{bz}, + #{arhciveCode}, + #{showorder}, + + + + + update t_xtpz_archive_type + + archive_name = #{archiveName}, + archive_type = #{archiveType}, + type = #{type}, + bz = #{bz}, + arhcive_code = #{arhciveCode}, + show_order = #{showorder}, + + where id = #{id} + + + + delete from t_xtpz_archive_type where id = #{id} + + + + delete from t_xtpz_archive_type where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/CcglMapper.xml b/src/main/resources/mybatis/dasz/CcglMapper.xml new file mode 100644 index 0000000..d09dc34 --- /dev/null +++ b/src/main/resources/mybatis/dasz/CcglMapper.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + select id, LJMC, LJDZ, REMARK, LJBS from t_ps_ccgl + + + + + + + + insert into t_ps_ccgl + + LJMC, + LJDZ, + REMARK, + LJBS, + + + #{LJMC}, + #{LJDZ}, + #{REMARK}, + #{LJBS}, + + + + + update t_ps_ccgl + + LJMC = #{LJMC}, + LJDZ = #{LJDZ}, + REMARK = #{REMARK}, + LJBS = #{LJBS}, + + where id = #{id} + + + + delete from t_ps_ccgl where id = #{id} + + + + delete from t_ps_ccgl where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/ColumnDocumentMapper.xml b/src/main/resources/mybatis/dasz/ColumnDocumentMapper.xml new file mode 100644 index 0000000..c7b11ea --- /dev/null +++ b/src/main/resources/mybatis/dasz/ColumnDocumentMapper.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + select id, column_name, column_code, column_length, column_type, column_codetype, show_type, bz, pxx, lbx, jmx, jsx, mrz from t_xtpz_column_document + + + + + + + + + + insert into t_xtpz_column_document + + column_name, + column_code, + column_length, + column_type, + column_codetype, + show_type, + bz, + pxx, + lbx, + jmx, + jsx, + mrz, + + + #{columnName}, + #{columnCode}, + #{columnLength}, + #{columnType}, + #{columnCodetype}, + #{showType}, + #{bz}, + #{pxx}, + #{lbx}, + #{jmx}, + #{jsx}, + #{mrz}, + + + + + update t_xtpz_column_document + + column_name = #{columnName}, + column_code = #{columnCode}, + column_length = #{columnLength}, + column_type = #{columnType}, + column_codetype = #{columnCodetype}, + show_type = #{showType}, + bz = #{bz}, + pxx = #{pxx}, + lbx = #{lbx}, + jmx = #{jmx}, + jsx = #{jsx}, + mrz = #{mrz}, + + where id = #{id} + + + + delete from t_xtpz_column_document where id = #{id} + + + + delete from t_xtpz_column_document where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/ColumnFileMapper.xml b/src/main/resources/mybatis/dasz/ColumnFileMapper.xml new file mode 100644 index 0000000..d1fbe73 --- /dev/null +++ b/src/main/resources/mybatis/dasz/ColumnFileMapper.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + select id, column_name, column_code, column_length, column_type, column_codetype, show_type, bz, pxx, lbx, jmx, jsx, mrz from t_xtpz_column_file + + + + + + + + + + insert into t_xtpz_column_file + + column_name, + column_code, + column_length, + column_type, + column_codetype, + show_type, + bz, + pxx, + lbx, + jmx, + jsx, + mrz, + + + #{columnName}, + #{columnCode}, + #{columnLength}, + #{columnType}, + #{columnCodetype}, + #{showType}, + #{bz}, + #{pxx}, + #{lbx}, + #{jmx}, + #{jsx}, + #{mrz}, + + + + + update t_xtpz_column_file + + column_name = #{columnName}, + column_code = #{columnCode}, + column_length = #{columnLength}, + column_type = #{columnType}, + column_codetype = #{columnCodetype}, + show_type = #{showType}, + bz = #{bz}, + pxx = #{pxx}, + lbx = #{lbx}, + jmx = #{jmx}, + jsx = #{jsx}, + mrz = #{mrz}, + + where id = #{id} + + + + delete from t_xtpz_column_file where id = #{id} + + + + delete from t_xtpz_column_file where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/ColumnFolderMapper.xml b/src/main/resources/mybatis/dasz/ColumnFolderMapper.xml new file mode 100644 index 0000000..35b064b --- /dev/null +++ b/src/main/resources/mybatis/dasz/ColumnFolderMapper.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + select id, column_name, column_code, column_length, column_type, column_codetype, show_type, bz, pxx, lbx, jmx, jsx, mrz from t_xtpz_column_folder + + + + + + + + + + insert into t_xtpz_column_folder + + column_name, + column_code, + column_length, + column_type, + column_codetype, + show_type, + bz, + pxx, + lbx, + jmx, + jsx, + mrz, + + + #{columnName}, + #{columnCode}, + #{columnLength}, + #{columnType}, + #{columnCodetype}, + #{showType}, + #{bz}, + #{pxx}, + #{lbx}, + #{jmx}, + #{jsx}, + #{mrz}, + + + + + update t_xtpz_column_folder + + column_name = #{columnName}, + column_code = #{columnCode}, + column_length = #{columnLength}, + column_type = #{columnType}, + column_codetype = #{columnCodetype}, + show_type = #{showType}, + bz = #{bz}, + pxx = #{pxx}, + lbx = #{lbx}, + jmx = #{jmx}, + jsx = #{jsx}, + mrz = #{mrz}, + + where id = #{id} + + + + delete from t_xtpz_column_folder where id = #{id} + + + + delete from t_xtpz_column_folder where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/ColumnInfoMapper.xml b/src/main/resources/mybatis/dasz/ColumnInfoMapper.xml new file mode 100644 index 0000000..50a88f5 --- /dev/null +++ b/src/main/resources/mybatis/dasz/ColumnInfoMapper.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + select id, column_name, column_code, column_length, column_type, column_codetype, show_type, bz, pxx, lbx, jmx, jsx, mrz from t_xtpz_column_info + + + + + + + + + + + + insert into t_xtpz_column_info + + column_name, + column_code, + column_length, + column_type, + column_codetype, + show_type, + bz, + pxx, + lbx, + jmx, + jsx, + mrz, + + + #{columnName}, + #{columnCode}, + #{columnLength}, + #{columnType}, + #{columnCodetype}, + #{showType}, + #{bz}, + #{pxx}, + #{lbx}, + #{jmx}, + #{jsx}, + #{mrz}, + + + + + update t_xtpz_column_info + + column_name = #{columnName}, + column_code = #{columnCode}, + column_length = #{columnLength}, + column_type = #{columnType}, + column_codetype = #{columnCodetype}, + show_type = #{showType}, + bz = #{bz}, + pxx = #{pxx}, + lbx = #{lbx}, + jmx = #{jmx}, + jsx = #{jsx}, + mrz = #{mrz}, + + where id = #{id} + + + + delete from t_xtpz_column_info where id = #{id} + + + + delete from t_xtpz_column_info where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/MgcMapper.xml b/src/main/resources/mybatis/dasz/MgcMapper.xml new file mode 100644 index 0000000..45086d9 --- /dev/null +++ b/src/main/resources/mybatis/dasz/MgcMapper.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + select id, mgc, remark, mgclx from t_ps_mgc + + + + + + + + insert into t_ps_mgc + + mgc, + remark, + mgclx, + + + #{mgc}, + #{remark}, + #{mgclx}, + + + + + update t_ps_mgc + + mgc = #{mgc}, + remark = #{remark}, + mgclx = #{mgclx}, + + where id = #{id} + + + + delete from t_ps_mgc where id = #{id} + + + + delete from t_ps_mgc where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/PhysicalTableColumnMapper.xml b/src/main/resources/mybatis/dasz/PhysicalTableColumnMapper.xml new file mode 100644 index 0000000..d01c052 --- /dev/null +++ b/src/main/resources/mybatis/dasz/PhysicalTableColumnMapper.xml @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, column_name, column_code, column_length, column_type, column_codetype, show_type, bz, pxx, lbx, jmx, jsx, mrz, bsx, table_id, jsfs from t_xtpz_physical_table_column + + + + + + + + insert into t_xtpz_physical_table_column + + column_name, + column_code, + column_length, + column_type, + column_codetype, + show_type, + bz, + pxx, + lbx, + jmx, + jsx, + mrz, + table_id, + bsx, + jsfs, + + + #{columnName}, + #{columnCode}, + #{columnLength}, + #{columnType}, + #{columnCodetype}, + #{showType}, + #{bz}, + #{pxx}, + #{lbx}, + #{jmx}, + #{jsx}, + #{mrz}, + #{tableId}, + #{bsx}, + #{jsfs}, + + + + + update t_xtpz_physical_table_column + + column_name = #{columnName}, + column_code = #{columnCode}, + column_length = #{columnLength}, + column_type = #{columnType}, + column_codetype = #{columnCodetype}, + show_type = #{showType}, + bz = #{bz}, + pxx = #{pxx}, + lbx = #{lbx}, + jmx = #{jmx}, + jsx = #{jsx}, + mrz = #{mrz}, + table_id = #{tableId}, + bsx = #{bsx}, + jsfs = #{jsfs}, + + where id = #{id} + + + + delete from t_xtpz_physical_table_column where id = #{id} + + + + delete from t_xtpz_physical_table_column where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/PhysicalTableMapper.xml b/src/main/resources/mybatis/dasz/PhysicalTableMapper.xml new file mode 100644 index 0000000..a2c849c --- /dev/null +++ b/src/main/resources/mybatis/dasz/PhysicalTableMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + select id, tablename, showname, table_code, showorder, bz, archivetypeid, archivetypecode, table_form, table_form_div from t_xtpz_physical_table + + + + + + + + insert into t_xtpz_physical_table + + tablename, + showname, + table_code, + showorder, + bz, + archivetypeid, + archivetypecode, + table_form, + table_form_div, + + + #{tablename}, + #{showname}, + #{tableCode}, + #{showorder}, + #{bz}, + #{archivetypeid}, + #{archivetypecode}, + #{tableForm}, + #{tableFormDiv}, + + + + + update t_xtpz_physical_table + + tablename = #{tablename}, + showname = #{showname}, + table_code = #{tableCode}, + showorder = #{showorder}, + bz = #{bz}, + archivetypeid = #{archivetypeid}, + archivetypecode = #{archivetypecode}, + table_form = #{tableForm}, + table_form_div = #{tableFormDiv}, + + where id = #{id} + + + + delete from t_xtpz_physical_table where id = #{id} + + + + delete from t_xtpz_physical_table where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/TPsFondsCodeMapper.xml b/src/main/resources/mybatis/dasz/TPsFondsCodeMapper.xml new file mode 100644 index 0000000..47ad37b --- /dev/null +++ b/src/main/resources/mybatis/dasz/TPsFondsCodeMapper.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + select id, fondscode, fondsname, glzz, bz, glda, by1 from t_ps_fonds_code + + + + + + + + + + insert into t_ps_fonds_code + + fondscode, + fondsname, + glzz, + bz, + glda, + by1, + + + #{fondscode}, + #{fondsname}, + #{glzz}, + #{bz}, + #{glda}, + #{by1}, + + + + + update t_ps_fonds_code + + fondscode = #{fondscode}, + fondsname = #{fondsname}, + glzz = #{glzz}, + bz = #{bz}, + glda = #{glda}, + by1 = #{by1}, + + where id = #{id} + + + + delete from t_ps_fonds_code where id = #{id} + + + + delete from t_ps_fonds_code where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dasz/TXtpzGridColumnsMapper.xml b/src/main/resources/mybatis/dasz/TXtpzGridColumnsMapper.xml new file mode 100644 index 0000000..4e1ced2 --- /dev/null +++ b/src/main/resources/mybatis/dasz/TXtpzGridColumnsMapper.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + select id, tableId, columnId, columnname, showname, width, orderInt, archiveTypeId, by1, by2 from t_xtpz_grid_columns + + + + + + + + insert into t_xtpz_grid_columns + + tableId, + columnId, + columnname, + showname, + width, + orderInt, + archiveTypeId, + by1, + by2, + + + #{tableId}, + #{columnId}, + #{columnname}, + #{showname}, + #{width}, + #{orderInt}, + #{archiveTypeId}, + #{by1}, + #{by2}, + + + + + update t_xtpz_grid_columns + + tableId = #{tableId}, + columnId = #{columnId}, + columnname = #{columnname}, + showname = #{showname}, + width = #{width}, + orderInt = #{orderInt}, + archiveTypeId = #{archiveTypeId}, + by1 = #{by1}, + by2 = #{by2}, + + where id = #{id} + + + + delete from t_xtpz_grid_columns where id = #{id} + + + + delete from t_xtpz_grid_columns where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dazl/TGgfjMapper.xml b/src/main/resources/mybatis/dazl/TGgfjMapper.xml new file mode 100644 index 0000000..96d6e3f --- /dev/null +++ b/src/main/resources/mybatis/dazl/TGgfjMapper.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + select id, ssType, ssId, ssTableName, fileName, fileFormat, fileSize, filePath, fileMiniPath, bz from t_ggfj + + + + + + + + insert into t_ggfj + + ssType, + ssId, + ssTableName, + fileName, + fileFormat, + fileSize, + filePath, + fileMiniPath, + bz, + + + #{ssType}, + #{ssId}, + #{ssTableName}, + #{fileName}, + #{fileFormat}, + #{fileSize}, + #{filePath}, + #{fileMiniPath}, + #{bz}, + + + + + update t_ggfj + + ssType = #{ssType}, + ssId = #{ssId}, + ssTableName = #{ssTableName}, + fileName = #{fileName}, + fileFormat = #{fileFormat}, + fileSize = #{fileSize}, + filePath = #{filePath}, + fileMiniPath = #{fileMiniPath}, + bz = #{bz}, + + where id = #{id} + + + + delete from t_ggfj where id = #{id} + + + + delete from t_ggfj where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dazl/TJdTaskDetailMapper.xml b/src/main/resources/mybatis/dazl/TJdTaskDetailMapper.xml new file mode 100644 index 0000000..bfe5a50 --- /dev/null +++ b/src/main/resources/mybatis/dazl/TJdTaskDetailMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, ownerId, ownerType, archiveTypeId, archiveTypeName, archiveTableId, archiveId, dh, tm, zrz, nd, qzh, bgqx, mj, kfqk, jdjg, jdyj, bz, rq from t_jd_task_detail + + + + + + + + insert into t_jd_task_detail + + ownerId, + ownerType, + archiveTypeId, + archiveTypeName, + archiveTableId, + archiveId, + dh, + tm, + zrz, + nd, + qzh, + bgqx, + mj, + kfqk, + jdjg, + jdyj, + bz, + rq, + + + #{ownerId}, + #{ownerType}, + #{archiveTypeId}, + #{archiveTypeName}, + #{archiveTableId}, + #{archiveId}, + #{dh}, + #{tm}, + #{zrz}, + #{nd}, + #{qzh}, + #{bgqx}, + #{mj}, + #{kfqk}, + #{jdjg}, + #{jdyj}, + #{bz}, + #{rq}, + + + + + update t_jd_task_detail + + ownerId = #{ownerId}, + ownerType = #{ownerType}, + archiveTypeId = #{archiveTypeId}, + archiveTypeName = #{archiveTypeName}, + archiveTableId = #{archiveTableId}, + archiveId = #{archiveId}, + dh = #{dh}, + tm = #{tm}, + zrz = #{zrz}, + nd = #{nd}, + qzh = #{qzh}, + bgqx = #{bgqx}, + mj = #{mj}, + kfqk = #{kfqk}, + jdjg = #{jdjg}, + jdyj = #{jdyj}, + bz = #{bz}, + rq = #{rq}, + + where id = #{id} + + + + delete from t_jd_task_detail where id = #{id} + + + + delete from t_jd_task_detail where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dazl/TJdTaskMapper.xml b/src/main/resources/mybatis/dazl/TJdTaskMapper.xml new file mode 100644 index 0000000..153030e --- /dev/null +++ b/src/main/resources/mybatis/dazl/TJdTaskMapper.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + select id, taskName, taskSj, taskType, taskArchiveTypeId, taskArchiveTypeName, taskTableId, taskStatus, taskRy, taskBz from t_jd_task + + + + + + + + insert into t_jd_task + + taskName, + taskSj, + taskType, + taskArchiveTypeId, + taskArchiveTypeName, + taskTableId, + taskStatus, + taskRy, + taskBz, + + + #{taskName}, + #{taskSj}, + #{taskType}, + #{taskArchiveTypeId}, + #{taskArchiveTypeName}, + #{taskTableId}, + #{taskStatus}, + #{taskRy}, + #{taskBz}, + + + + + update t_jd_task + + taskName = #{taskName}, + taskSj = #{taskSj}, + taskType = #{taskType}, + taskArchiveTypeId = #{taskArchiveTypeId}, + taskArchiveTypeName = #{taskArchiveTypeName}, + taskTableId = #{taskTableId}, + taskStatus = #{taskStatus}, + taskRy = #{taskRy}, + taskBz = #{taskBz}, + + where id = #{id} + + + + delete from t_jd_task where id = #{id} + + + + delete from t_jd_task where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/dazl/TWsnjMapper.xml b/src/main/resources/mybatis/dazl/TWsnjMapper.xml new file mode 100644 index 0000000..eed9f03 --- /dev/null +++ b/src/main/resources/mybatis/dazl/TWsnjMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + select id, njmc, tznr, njsj, xfdw, cjdw, xfzt, bz from t_wsnj + + + + + + + + insert into t_wsnj + + njmc, + tznr, + njsj, + xfdw, + cjdw, + xfzt, + bz, + + + #{njmc}, + #{tznr}, + #{njsj}, + #{xfdw}, + #{cjdw}, + #{xfzt}, + #{bz}, + + + + + update t_wsnj + + njmc = #{njmc}, + tznr = #{tznr}, + njsj = #{njsj}, + xfdw = #{xfdw}, + cjdw = #{cjdw}, + xfzt = #{xfzt}, + bz = #{bz}, + + where id = #{id} + + + + delete from t_wsnj where id = #{id} + + + + delete from t_wsnj where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/jyly/TArchiveBorrowDetailMapper.xml b/src/main/resources/mybatis/jyly/TArchiveBorrowDetailMapper.xml new file mode 100644 index 0000000..f09967a --- /dev/null +++ b/src/main/resources/mybatis/jyly/TArchiveBorrowDetailMapper.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, owner_id, create_user, create_time, status, dh, table_id, table_name, archive_id, fonds_code, title_proper, page_number, bgqx, document_number, remark, is_open, borrow_type, show_order, is_out, author, copy, excerpt, shot, scan, print_time, upload_time, flag1 from t_archive_borrow_detail + + + + + + + + insert into t_archive_borrow_detail + + owner_id, + create_user, + create_time, + status, + dh, + table_id, + table_name, + archive_id, + fonds_code, + title_proper, + page_number, + bgqx, + document_number, + remark, + is_open, + borrow_type, + show_order, + is_out, + author, + copy, + excerpt, + shot, + scan, + print_time, + upload_time, + flag1, + + + #{ownerId}, + #{createUser}, + #{createTime}, + #{status}, + #{dh}, + #{tableId}, + #{tableName}, + #{archiveId}, + #{fondsCode}, + #{titleProper}, + #{pageNumber}, + #{bgqx}, + #{documentNumber}, + #{remark}, + #{isOpen}, + #{borrowType}, + #{showOrder}, + #{isOut}, + #{author}, + #{copy}, + #{excerpt}, + #{shot}, + #{scan}, + #{printTime}, + #{uploadTime}, + #{flag1}, + + + + + update t_archive_borrow_detail + + owner_id = #{ownerId}, + create_user = #{createUser}, + create_time = #{createTime}, + status = #{status}, + dh = #{dh}, + table_id = #{tableId}, + table_name = #{tableName}, + archive_id = #{archiveId}, + fonds_code = #{fondsCode}, + title_proper = #{titleProper}, + page_number = #{pageNumber}, + bgqx = #{bgqx}, + document_number = #{documentNumber}, + remark = #{remark}, + is_open = #{isOpen}, + borrow_type = #{borrowType}, + show_order = #{showOrder}, + is_out = #{isOut}, + author = #{author}, + copy = #{copy}, + excerpt = #{excerpt}, + shot = #{shot}, + scan = #{scan}, + print_time = #{printTime}, + upload_time = #{uploadTime}, + flag1 = #{flag1}, + + where id = #{id} + + + + delete from t_archive_borrow_detail where id = #{id} + + + + delete from t_archive_borrow_detail where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/jyly/TArchiveBorrowMapper.xml b/src/main/resources/mybatis/jyly/TArchiveBorrowMapper.xml new file mode 100644 index 0000000..65cd593 --- /dev/null +++ b/src/main/resources/mybatis/jyly/TArchiveBorrowMapper.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, borrow_no, borrow_data, depatment, name, phone, card_name, card_no, gender, birthday, address, user_type, using_type, using_aim, using_content, using_date, using_effect, borrow_type, card_photo, exborrow_state, pborrow_state, dz_sum, zz_sum, is_selected, recordperson, juanpage, jianpage, remark, page, photopage, copypage, writepage, is_approve, dz_status, sw_status, sq_flag, reference, reviewidea, flag_by from t_archive_borrow + + + + + + + + + insert into t_archive_borrow + + id, + borrow_no, + borrow_data, + depatment, + name, + phone, + card_name, + card_no, + gender, + birthday, + address, + user_type, + using_type, + using_aim, + using_content, + using_date, + using_effect, + borrow_type, + card_photo, + exborrow_state, + pborrow_state, + dz_sum, + zz_sum, + is_selected, + recordperson, + juanpage, + jianpage, + remark, + page, + photopage, + copypage, + writepage, + is_approve, + dz_status, + sw_status, + sq_flag, + reference, + reviewidea, + flag_by, + + + #{id}, + #{borrowNo}, + #{borrowData}, + #{depatment}, + #{name}, + #{phone}, + #{cardName}, + #{cardNo}, + #{gender}, + #{birthday}, + #{address}, + #{userType}, + #{usingType}, + #{usingAim}, + #{usingContent}, + #{usingDate}, + #{usingEffect}, + #{borrowType}, + #{cardPhoto}, + #{exborrowState}, + #{pborrowState}, + #{dzSum}, + #{zzSum}, + #{isSelected}, + #{recordperson}, + #{juanpage}, + #{jianpage}, + #{remark}, + #{page}, + #{photopage}, + #{copypage}, + #{writepage}, + #{isApprove}, + #{dzStatus}, + #{swStatus}, + #{sqFlag}, + #{reference}, + #{reviewidea}, + #{flagBy}, + + + + + update t_archive_borrow + + borrow_no = #{borrowNo}, + borrow_data = #{borrowData}, + depatment = #{depatment}, + name = #{name}, + phone = #{phone}, + card_name = #{cardName}, + card_no = #{cardNo}, + gender = #{gender}, + birthday = #{birthday}, + address = #{address}, + user_type = #{userType}, + using_type = #{usingType}, + using_aim = #{usingAim}, + using_content = #{usingContent}, + using_date = #{usingDate}, + using_effect = #{usingEffect}, + borrow_type = #{borrowType}, + card_photo = #{cardPhoto}, + exborrow_state = #{exborrowState}, + pborrow_state = #{pborrowState}, + dz_sum = #{dzSum}, + zz_sum = #{zzSum}, + is_selected = #{isSelected}, + recordperson = #{recordperson}, + juanpage = #{juanpage}, + jianpage = #{jianpage}, + remark = #{remark}, + page = #{page}, + photopage = #{photopage}, + copypage = #{copypage}, + writepage = #{writepage}, + is_approve = #{isApprove}, + dz_status = #{dzStatus}, + sw_status = #{swStatus}, + sq_flag = #{sqFlag}, + reference = #{reference}, + reviewidea = #{reviewidea}, + flag_by = #{flagBy}, + + where id = #{id} + + + + delete from t_archive_borrow where id = #{id} + + + + delete from t_archive_borrow where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/jyly/TArchivePersonMapper.xml b/src/main/resources/mybatis/jyly/TArchivePersonMapper.xml new file mode 100644 index 0000000..da83d0b --- /dev/null +++ b/src/main/resources/mybatis/jyly/TArchivePersonMapper.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select id, status, name, phone, card_name, card_no, gender, address, nation, birthday, last_date, owner_id, compantname, password, enablestatus, photo, photobase64 from t_archive_person + + + + + + + + insert into t_archive_person + + status, + name, + phone, + card_name, + card_no, + gender, + address, + nation, + birthday, + last_date, + owner_id, + compantname, + password, + enablestatus, + photo, + photobase64, + + + #{status}, + #{name}, + #{phone}, + #{cardName}, + #{cardNo}, + #{gender}, + #{address}, + #{nation}, + #{birthday}, + #{lastDate}, + #{ownerId}, + #{compantname}, + #{password}, + #{enablestatus}, + #{photo}, + #{photobase64}, + + + + + update t_archive_person + + status = #{status}, + name = #{name}, + phone = #{phone}, + card_name = #{cardName}, + card_no = #{cardNo}, + gender = #{gender}, + address = #{address}, + nation = #{nation}, + birthday = #{birthday}, + last_date = #{lastDate}, + owner_id = #{ownerId}, + compantname = #{compantname}, + password = #{password}, + enablestatus = #{enablestatus}, + photo = #{photo}, + photobase64 = #{photobase64}, + + where id = #{id} + + + + delete from t_archive_person where id = #{id} + + + + delete from t_archive_person where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/monitor/JobLogMapper.xml b/src/main/resources/mybatis/monitor/JobLogMapper.xml new file mode 100644 index 0000000..d1c49ee --- /dev/null +++ b/src/main/resources/mybatis/monitor/JobLogMapper.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time + from sys_job_log + + + + + + + + + + delete from sys_job_log where job_log_id = #{jobLogId} + + + + delete from sys_job_log where job_log_id in + + #{jobLogId} + + + + + truncate table sys_job_log + + + + insert into sys_job_log( + job_log_id, + job_name, + job_group, + invoke_target, + job_message, + status, + exception_info, + create_time + )values( + #{jobLogId}, + #{jobName}, + #{jobGroup}, + #{invokeTarget}, + #{jobMessage}, + #{status}, + #{exceptionInfo}, + sysdate() + ) + + + + insert into sys_job_log( + job_log_id, + job_name, + job_group, + invoke_target, + job_message, + status, + exception_info, + create_time + )values( + #{jobLogId}, + #{jobName}, + #{jobGroup}, + #{invokeTarget}, + #{jobMessage}, + #{status}, + #{exceptionInfo}, + (datetime(CURRENT_TIMESTAMP,'localtime')) + ) + + \ No newline at end of file diff --git a/src/main/resources/mybatis/monitor/JobMapper.xml b/src/main/resources/mybatis/monitor/JobMapper.xml new file mode 100644 index 0000000..2a36780 --- /dev/null +++ b/src/main/resources/mybatis/monitor/JobMapper.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark + from sys_job + + + + + + + + + + + + delete from sys_job where job_id = #{jobId} + + + + delete from sys_job where job_id in + + #{jobId} + + + + + update sys_job + + job_name = #{jobName}, + job_group = #{jobGroup}, + invoke_target = #{invokeTarget}, + cron_expression = #{cronExpression}, + misfire_policy = #{misfirePolicy}, + concurrent = #{concurrent}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where job_id = #{jobId} + + + + update sys_job + + job_name = #{jobName}, + job_group = #{jobGroup}, + invoke_target = #{invokeTarget}, + cron_expression = #{cronExpression}, + misfire_policy = #{misfirePolicy}, + concurrent = #{concurrent}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = datetime(CURRENT_TIMESTAMP,'localtime') + + where job_id = #{jobId} + + + + insert into sys_job( + job_id, + job_name, + job_group, + invoke_target, + cron_expression, + misfire_policy, + concurrent, + status, + remark, + create_by, + create_time + )values( + #{jobId}, + #{jobName}, + #{jobGroup}, + #{invokeTarget}, + #{cronExpression}, + #{misfirePolicy}, + #{concurrent}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + insert into sys_job( + job_id, + job_name, + job_group, + invoke_target, + cron_expression, + misfire_policy, + concurrent, + status, + remark, + create_by, + create_time + )values( + #{jobId}, + #{jobName}, + #{jobGroup}, + #{invokeTarget}, + #{cronExpression}, + #{misfirePolicy}, + #{concurrent}, + #{status}, + #{remark}, + #{createBy}, + datetime(CURRENT_TIMESTAMP,'localtime') + ) + + \ No newline at end of file diff --git a/src/main/resources/mybatis/monitor/LogininforMapper.xml b/src/main/resources/mybatis/monitor/LogininforMapper.xml new file mode 100644 index 0000000..85fc889 --- /dev/null +++ b/src/main/resources/mybatis/monitor/LogininforMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + insert into sys_logininfor (login_name, status, ipaddr, login_location, browser, os, msg, login_time) + values (#{loginName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate()) + + + + insert into sys_logininfor (login_name, status, ipaddr, login_location, browser, os, msg, login_time) + values (#{loginName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, (datetime(CURRENT_TIMESTAMP,'localtime'))) + + + + + + + + delete from sys_logininfor where info_id in + + #{infoId} + + + + + truncate table sys_logininfor + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/monitor/OnlineMapper.xml b/src/main/resources/mybatis/monitor/OnlineMapper.xml new file mode 100644 index 0000000..5ce4b35 --- /dev/null +++ b/src/main/resources/mybatis/monitor/OnlineMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + select sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time + from sys_user_online + + + + + + replace into sys_user_online(sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time) + values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime}) + + + + delete from sys_user_online where sessionId = #{sessionId} + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/monitor/OperLogMapper.xml b/src/main/resources/mybatis/monitor/OperLogMapper.xml new file mode 100644 index 0000000..f1fd8db --- /dev/null +++ b/src/main/resources/mybatis/monitor/OperLogMapper.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time + from sys_oper_log + + + + insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time) + values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate()) + + + + insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time) + values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, (datetime(CURRENT_TIMESTAMP,'localtime'))) + + + + + + + + delete from sys_oper_log where oper_id in + + #{operId} + + + + + + + truncate table sys_oper_log + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mybatis-config.xml b/src/main/resources/mybatis/mybatis-config.xml new file mode 100644 index 0000000..e8b52be --- /dev/null +++ b/src/main/resources/mybatis/mybatis-config.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/mybatis/system/ConfigMapper.xml b/src/main/resources/mybatis/system/ConfigMapper.xml new file mode 100644 index 0000000..df43ca7 --- /dev/null +++ b/src/main/resources/mybatis/system/ConfigMapper.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark + from sys_config + + + + + + + and config_id = #{configId} + + + and config_key = #{configKey} + + + + + + + + + + + + + + insert into sys_config ( + config_name, + config_key, + config_value, + config_type, + create_by, + remark, + create_time + )values( + #{configName}, + #{configKey}, + #{configValue}, + #{configType}, + #{createBy}, + #{remark}, + sysdate() + ) + + + + insert into sys_config ( + config_name, + config_key, + config_value, + config_type, + create_by, + remark, + create_time + )values( + #{configName}, + #{configKey}, + #{configValue}, + #{configType}, + #{createBy}, + #{remark}, + datetime('now') + ) + + + + update sys_config + + config_name = #{configName}, + config_key = #{configKey}, + config_value = #{configValue}, + config_type = #{configType}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = sysdate() + + where config_id = #{configId} + + + + + update sys_config + + config_name = #{configName}, + config_key = #{configKey}, + config_value = #{configValue}, + config_type = #{configType}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = datetime('now') + + where config_id = #{configId} + + + + delete from sys_config where config_id in + + #{configId} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/DeptMapper.xml b/src/main/resources/mybatis/system/DeptMapper.xml new file mode 100644 index 0000000..496a0d3 --- /dev/null +++ b/src/main/resources/mybatis/system/DeptMapper.xml @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time + from sys_dept d + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into sys_dept( + dept_id, + parent_id, + dept_name, + ancestors, + order_num, + leader, + phone, + email, + status, + create_by, + create_time + )values( + #{deptId}, + #{parentId}, + #{deptName}, + #{ancestors}, + #{orderNum}, + #{leader}, + #{phone}, + #{email}, + #{status}, + #{createBy}, + sysdate() + ) + + + + insert into sys_dept( + dept_id, + parent_id, + dept_name, + ancestors, + order_num, + leader, + phone, + email, + status, + create_by, + create_time + )values( + #{deptId}, + #{parentId}, + #{deptName}, + #{ancestors}, + #{orderNum}, + #{leader}, + #{phone}, + #{email}, + #{status}, + #{createBy}, + datetime(CURRENT_TIMESTAMP,'localtime') + ) + + + + + update sys_dept + + parent_id = #{parentId}, + dept_name = #{deptName}, + ancestors = #{ancestors}, + order_num = #{orderNum}, + leader = #{leader}, + phone = #{phone}, + email = #{email}, + status = #{status}, + update_by = #{updateBy}, + update_time = sysdate() + + where dept_id = #{deptId} + + + + update sys_dept + + parent_id = #{parentId}, + dept_name = #{deptName}, + ancestors = #{ancestors}, + order_num = #{orderNum}, + leader = #{leader}, + phone = #{phone}, + email = #{email}, + status = #{status}, + update_by = #{updateBy}, + update_time = (datetime(CURRENT_TIMESTAMP,'localtime')) + + where dept_id = #{deptId} + + + + update sys_dept set ancestors = + + when #{item.deptId} then #{item.ancestors} + + where dept_id in + + #{item.deptId} + + + + + update sys_dept set del_flag = '2' where dept_id = #{deptId} + + + + update sys_dept + + status = #{status}, + update_by = #{updateBy}, + update_time = sysdate() + + where dept_id in (${ancestors}) + + + + + update sys_dept + + status = #{status}, + update_by = #{updateBy}, + update_time = (datetime(CURRENT_TIMESTAMP,'localtime')) + + where dept_id in (${ancestors}) + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/DictDataMapper.xml b/src/main/resources/mybatis/system/DictDataMapper.xml new file mode 100644 index 0000000..2b62094 --- /dev/null +++ b/src/main/resources/mybatis/system/DictDataMapper.xml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark + from sys_dict_data + + + + + + + + + + + + + + + + delete from sys_dict_data where dict_code = #{dictCode} + + + + delete from sys_dict_data where dict_code in + + #{dictCode} + + + + + update sys_dict_data + + dict_sort = #{dictSort}, + dict_label = #{dictLabel}, + dict_value = #{dictValue}, + dict_type = #{dictType}, + css_class = #{cssClass}, + list_class = #{listClass}, + is_default = #{isDefault}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where dict_code = #{dictCode} + + + + + update sys_dict_data + + dict_sort = #{dictSort}, + dict_label = #{dictLabel}, + dict_value = #{dictValue}, + dict_type = #{dictType}, + css_class = #{cssClass}, + list_class = #{listClass}, + is_default = #{isDefault}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = datetime('now') + + where dict_code = #{dictCode} + + + + update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} + + + + insert into sys_dict_data( + dict_sort, + dict_label, + dict_value, + dict_type, + css_class, + list_class, + is_default, + status, + remark, + create_by, + create_time + )values( + #{dictSort}, + #{dictLabel}, + #{dictValue}, + #{dictType}, + #{cssClass}, + #{listClass}, + #{isDefault}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + insert into sys_dict_data( + dict_sort, + dict_label, + dict_value, + dict_type, + css_class, + list_class, + is_default, + status, + remark, + create_by, + create_time + )values( + #{dictSort}, + #{dictLabel}, + #{dictValue}, + #{dictType}, + #{cssClass}, + #{listClass}, + #{isDefault}, + #{status}, + #{remark}, + #{createBy}, + datetime('now') + ) + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/DictTypeMapper.xml b/src/main/resources/mybatis/system/DictTypeMapper.xml new file mode 100644 index 0000000..0de0c12 --- /dev/null +++ b/src/main/resources/mybatis/system/DictTypeMapper.xml @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + select dict_id, dict_name, dict_type, status, create_by, create_time, remark, label + from sys_dict_type + + + + + + + + + + + + + + + + + + delete from sys_dict_type where dict_id = #{dictId} + + + + delete from sys_dict_type where dict_id in + + #{dictId} + + + + + update sys_dict_type + + dict_name = #{dictName}, + dict_type = #{dictType}, + status = #{status}, + update_by = #{updateBy}, + remark = #{remark}, + label = #{label}, + update_time = sysdate() + + where dict_id = #{dictId} + + + + update sys_dict_type + + dict_name = #{dictName}, + dict_type = #{dictType}, + status = #{status}, + update_by = #{updateBy}, + remark = #{remark}, + label = #{label}, + update_time = datetime('now') + + where dict_id = #{dictId} + + + + insert into sys_dict_type( + dict_name, + dict_type, + status, + remark, + create_by, + label, + create_time + )values( + #{dictName}, + #{dictType}, + #{status}, + #{remark}, + #{createBy}, + #{label}, + sysdate() + ) + + + + + insert into sys_dict_type( + dict_name, + dict_type, + status, + remark, + create_by, + label, + create_time + )values( + #{dictName}, + #{dictType}, + #{status}, + #{remark}, + #{createBy}, + #{label}, + datetime('now') + ) + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/MenuMapper.xml b/src/main/resources/mybatis/system/MenuMapper.xml new file mode 100644 index 0000000..9e3d4e4 --- /dev/null +++ b/src/main/resources/mybatis/system/MenuMapper.xml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, ifnull(perms,'') as perms, icon, create_by, create_time + from sys_menu + + + + + + + + + + + + + + + + + + + + delete from sys_menu where menu_id = #{menuId} or parent_id = #{menuId} + + + + + + + + + + update sys_menu + + menu_name = #{menuName}, + parent_id = #{parentId}, + order_num = #{orderNum}, + url = #{url}, + target = #{target}, + menu_type = #{menuType}, + visible = #{visible}, + is_refresh = #{isRefresh}, + perms = #{perms}, + icon = #{icon}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where menu_id = #{menuId} + + + + insert into sys_menu( + menu_id, + parent_id, + menu_name, + order_num, + url, + target, + menu_type, + visible, + is_refresh, + perms, + icon, + remark, + create_by, + create_time + )values( + #{menuId}, + #{parentId}, + #{menuName}, + #{orderNum}, + #{url}, + #{target}, + #{menuType}, + #{visible}, + #{isRefresh}, + #{perms}, + #{icon}, + #{remark}, + #{createBy}, + sysdate() + ) + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/NoticeMapper.xml b/src/main/resources/mybatis/system/NoticeMapper.xml new file mode 100644 index 0000000..106b775 --- /dev/null +++ b/src/main/resources/mybatis/system/NoticeMapper.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark + from sys_notice + + + + + + + + + + insert into sys_notice ( + notice_title, + notice_type, + notice_content, + status, + remark, + create_by, + create_time + )values( + #{noticeTitle}, + #{noticeType}, + #{noticeContent}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + insert into sys_notice ( + notice_title, + notice_type, + notice_content, + status, + remark, + create_by, + create_time + )values( + #{noticeTitle}, + #{noticeType}, + #{noticeContent}, + #{status}, + #{remark}, + #{createBy}, + datetime(CURRENT_TIMESTAMP,'localtime') + ) + + + + update sys_notice + + notice_title = #{noticeTitle}, + notice_type = #{noticeType}, + notice_content = #{noticeContent}, + status = #{status}, + update_by = #{updateBy}, + update_time = sysdate() + + where notice_id = #{noticeId} + + + + update sys_notice + + notice_title = #{noticeTitle}, + notice_type = #{noticeType}, + notice_content = #{noticeContent}, + status = #{status}, + update_by = #{updateBy}, + update_time = datetime(CURRENT_TIMESTAMP,'localtime') + + where notice_id = #{noticeId} + + + + delete from sys_notice where notice_id in + + #{noticeId} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/PostMapper.xml b/src/main/resources/mybatis/system/PostMapper.xml new file mode 100644 index 0000000..af5be71 --- /dev/null +++ b/src/main/resources/mybatis/system/PostMapper.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark + from sys_post + + + + + + + + + + + + + + + + + + delete from sys_post where post_id in + + #{postId} + + + + + update sys_post + + post_code = #{postCode}, + post_name = #{postName}, + post_sort = #{postSort}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where post_id = #{postId} + + + + update sys_post + + post_code = #{postCode}, + post_name = #{postName}, + post_sort = #{postSort}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = datetime(CURRENT_TIMESTAMP,'localtime') + + where post_id = #{postId} + + + + insert into sys_post( + post_id, + post_code, + post_name, + post_sort, + status, + remark, + create_by, + create_time + )values( + #{postId}, + #{postCode}, + #{postName}, + #{postSort}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + insert into sys_post( + post_id, + post_code, + post_name, + post_sort, + status, + remark, + create_by, + create_time + )values( + #{postId}, + #{postCode}, + #{postName}, + #{postSort}, + #{status}, + #{remark}, + #{createBy}, + datetime(CURRENT_TIMESTAMP,'localtime') + ) + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/RoleDeptMapper.xml b/src/main/resources/mybatis/system/RoleDeptMapper.xml new file mode 100644 index 0000000..cdbe2d3 --- /dev/null +++ b/src/main/resources/mybatis/system/RoleDeptMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + delete from sys_role_dept where role_id=#{roleId} + + + + + + delete from sys_role_dept where role_id in + + #{roleId} + + + + + insert into sys_role_dept(role_id, dept_id) values + + (#{item.roleId},#{item.deptId}) + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/RoleMapper.xml b/src/main/resources/mybatis/system/RoleMapper.xml new file mode 100644 index 0000000..b148492 --- /dev/null +++ b/src/main/resources/mybatis/system/RoleMapper.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, + r.status, r.del_flag, r.create_time, r.remark + from sys_role r + left join sys_user_role ur on ur.role_id = r.role_id + left join sys_user u on u.user_id = ur.user_id + left join sys_dept d on u.dept_id = d.dept_id + + + + select r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status, r.del_flag, r.create_time, r.remark + from sys_role r + + + + + + + + + + + + + + + + + delete from sys_role where role_id = #{roleId} + + + + update sys_role set del_flag = '2' where role_id in + + #{roleId} + + + + + update sys_role + + role_name = #{roleName}, + role_key = #{roleKey}, + role_sort = #{roleSort}, + data_scope = #{dataScope}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where role_id = #{roleId} + + + + update sys_role + + role_name = #{roleName}, + role_key = #{roleKey}, + role_sort = #{roleSort}, + data_scope = #{dataScope}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = datetime(CURRENT_TIMESTAMP,'localtime') + + where role_id = #{roleId} + + + + insert into sys_role( + role_id, + role_name, + role_key, + role_sort, + data_scope, + status, + remark, + create_by, + create_time + )values( + #{roleId}, + #{roleName}, + #{roleKey}, + #{roleSort}, + #{dataScope}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/RoleMenuMapper.xml b/src/main/resources/mybatis/system/RoleMenuMapper.xml new file mode 100644 index 0000000..6f39286 --- /dev/null +++ b/src/main/resources/mybatis/system/RoleMenuMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + delete from sys_role_menu where role_id=#{roleId} + + + + + + delete from sys_role_menu where role_id in + + #{roleId} + + + + + insert into sys_role_menu(role_id, menu_id) values + + (#{item.roleId},#{item.menuId}) + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/UserMapper.xml b/src/main/resources/mybatis/system/UserMapper.xml new file mode 100644 index 0000000..5fec4a1 --- /dev/null +++ b/src/main/resources/mybatis/system/UserMapper.xml @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_time, u.remark, + d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status, + r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status + from sys_user u + left join sys_dept d on u.dept_id = d.dept_id + left join sys_user_role ur on u.user_id = ur.user_id + left join sys_role r on r.role_id = ur.role_id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + update sys_user set del_flag = '2' where user_id = #{userId} + + + + update sys_user set del_flag = '2' where user_id in + + #{userId} + + + + + update sys_user + + dept_id = #{deptId}, + login_name = #{loginName}, + user_name = #{userName}, + user_type = #{userType}, + email = #{email}, + phonenumber = #{phonenumber}, + sex = #{sex}, + avatar = #{avatar}, + password = #{password}, + salt = #{salt}, + status = #{status}, + login_ip = #{loginIp}, + login_date = #{loginDate}, + pwd_update_date = #{pwdUpdateDate}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = sysdate() + + where user_id = #{userId} + + + + update sys_user + + dept_id = #{deptId}, + login_name = #{loginName}, + user_name = #{userName}, + user_type = #{userType}, + email = #{email}, + phonenumber = #{phonenumber}, + sex = #{sex}, + avatar = #{avatar}, + password = #{password}, + salt = #{salt}, + status = #{status}, + login_ip = #{loginIp}, + login_date = #{loginDate}, + pwd_update_date = #{pwdUpdateDate}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = (datetime(CURRENT_TIMESTAMP,'localtime')) + + where user_id = #{userId} + + + + insert into sys_user( + user_id, + dept_id, + login_name, + user_name, + user_type, + email, + avatar, + phonenumber, + sex, + password, + salt, + status, + pwd_update_date, + create_by, + remark, + create_time + )values( + #{userId}, + #{deptId}, + #{loginName}, + #{userName}, + #{userType}, + #{email}, + #{avatar}, + #{phonenumber}, + #{sex}, + #{password}, + #{salt}, + #{status}, + #{pwdUpdateDate}, + #{createBy}, + #{remark}, + sysdate() + ) + + + + insert into sys_user( + user_id, + dept_id, + login_name, + user_name, + user_type, + email, + avatar, + phonenumber, + sex, + password, + salt, + status, + pwd_update_date, + create_by, + remark, + create_time + )values( + #{userId}, + #{deptId}, + #{loginName}, + #{userName}, + #{userType}, + #{email}, + #{avatar}, + #{phonenumber}, + #{sex}, + #{password}, + #{salt}, + #{status}, + #{pwdUpdateDate}, + #{createBy}, + #{remark}, + datetime('now') + ) + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/UserPostMapper.xml b/src/main/resources/mybatis/system/UserPostMapper.xml new file mode 100644 index 0000000..2adf9ee --- /dev/null +++ b/src/main/resources/mybatis/system/UserPostMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + delete from sys_user_post where user_id=#{userId} + + + + + + delete from sys_user_post where user_id in + + #{userId} + + + + + insert into sys_user_post(user_id, post_id) values + + (#{item.userId},#{item.postId}) + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/system/UserRoleMapper.xml b/src/main/resources/mybatis/system/UserRoleMapper.xml new file mode 100644 index 0000000..0c79840 --- /dev/null +++ b/src/main/resources/mybatis/system/UserRoleMapper.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + delete from sys_user_role where user_id = #{userId} + + + + + + delete from sys_user_role where user_id in + + #{userId} + + + + + insert into sys_user_role(user_id, role_id) values + + (#{item.userId},#{item.roleId}) + + + + + delete from sys_user_role where user_id=#{userId} and role_id=#{roleId} + + + + delete from sys_user_role where role_id=#{roleId} and user_id in + + #{userId} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/tool/GenTableColumnMapper.xml b/src/main/resources/mybatis/tool/GenTableColumnMapper.xml new file mode 100644 index 0000000..5862cf9 --- /dev/null +++ b/src/main/resources/mybatis/tool/GenTableColumnMapper.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column + + + + + + + + insert into gen_table_column ( + table_id, + column_name, + column_comment, + column_type, + java_type, + java_field, + is_pk, + is_increment, + is_required, + is_insert, + is_edit, + is_list, + is_query, + query_type, + html_type, + dict_type, + sort, + create_by, + create_time + )values( + #{tableId}, + #{columnName}, + #{columnComment}, + #{columnType}, + #{javaType}, + #{javaField}, + #{isPk}, + #{isIncrement}, + #{isRequired}, + #{isInsert}, + #{isEdit}, + #{isList}, + #{isQuery}, + #{queryType}, + #{htmlType}, + #{dictType}, + #{sort}, + #{createBy}, + sysdate() + ) + + + + update gen_table_column + + column_comment = #{columnComment}, + java_type = #{javaType}, + java_field = #{javaField}, + is_insert = #{isInsert}, + is_edit = #{isEdit}, + is_list = #{isList}, + is_query = #{isQuery}, + is_required = #{isRequired}, + query_type = #{queryType}, + html_type = #{htmlType}, + dict_type = #{dictType}, + sort = #{sort}, + update_by = #{updateBy}, + update_time = sysdate() + + where column_id = #{columnId} + + + + delete from gen_table_column where table_id in + + #{tableId} + + + + + delete from gen_table_column where column_id in + + #{item.columnId} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/tool/GenTableMapper.xml b/src/main/resources/mybatis/tool/GenTableMapper.xml new file mode 100644 index 0000000..4e3402a --- /dev/null +++ b/src/main/resources/mybatis/tool/GenTableMapper.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table + + + + + + + + + + + + + + + + + + insert into gen_table ( + table_name, + table_comment, + class_name, + tpl_category, + package_name, + module_name, + business_name, + function_name, + function_author, + gen_type, + gen_path, + remark, + create_by, + create_time + )values( + #{tableName}, + #{tableComment}, + #{className}, + #{tplCategory}, + #{packageName}, + #{moduleName}, + #{businessName}, + #{functionName}, + #{functionAuthor}, + #{genType}, + #{genPath}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + update gen_table + + table_name = #{tableName}, + table_comment = #{tableComment}, + sub_table_name = #{subTableName}, + sub_table_fk_name = #{subTableFkName}, + class_name = #{className}, + function_author = #{functionAuthor}, + gen_type = #{genType}, + gen_path = #{genPath}, + tpl_category = #{tplCategory}, + package_name = #{packageName}, + module_name = #{moduleName}, + business_name = #{businessName}, + function_name = #{functionName}, + options = #{options}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = sysdate() + + where table_id = #{tableId} + + + + delete from gen_table where table_id in + + #{tableId} + + + + \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/base64/base64.min.js b/src/main/resources/static/ajax/libs/base64/base64.min.js new file mode 100644 index 0000000..d08c123 --- /dev/null +++ b/src/main/resources/static/ajax/libs/base64/base64.min.js @@ -0,0 +1 @@ +(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory(global):typeof define==="function"&&define.amd?define(factory):factory(global)}((typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:this),function(global){global=global||{};var _Base64=global.Base64;var version="2.6.3";var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var b64tab=function(bin){var t={};for(var i=0,l=bin.length;i>>6))+fromCharCode(128|(cc&63))):(fromCharCode(224|((cc>>>12)&15))+fromCharCode(128|((cc>>>6)&63))+fromCharCode(128|(cc&63)))}else{var cc=65536+(c.charCodeAt(0)-55296)*1024+(c.charCodeAt(1)-56320);return(fromCharCode(240|((cc>>>18)&7))+fromCharCode(128|((cc>>>12)&63))+fromCharCode(128|((cc>>>6)&63))+fromCharCode(128|(cc&63)))}};var re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;var utob=function(u){return u.replace(re_utob,cb_utob)};var cb_encode=function(ccc){var padlen=[0,2,1][ccc.length%3],ord=ccc.charCodeAt(0)<<16|((ccc.length>1?ccc.charCodeAt(1):0)<<8)|((ccc.length>2?ccc.charCodeAt(2):0)),chars=[b64chars.charAt(ord>>>18),b64chars.charAt((ord>>>12)&63),padlen>=2?"=":b64chars.charAt((ord>>>6)&63),padlen>=1?"=":b64chars.charAt(ord&63)];return chars.join("")};var btoa=global.btoa&&typeof global.btoa=="function"?function(b){return global.btoa(b)}:function(b){if(b.match(/[^\x00-\xFF]/)){throw new RangeError("The string contains invalid characters.")}return b.replace(/[\s\S]{1,3}/g,cb_encode)};var _encode=function(u){return btoa(utob(String(u)))};var mkUriSafe=function(b64){return b64.replace(/[+\/]/g,function(m0){return m0=="+"?"-":"_"}).replace(/=/g,"")};var encode=function(u,urisafe){return urisafe?mkUriSafe(_encode(u)):_encode(u)};var encodeURI=function(u){return encode(u,true)};var fromUint8Array;if(global.Uint8Array){fromUint8Array=function(a,urisafe){var b64="";for(var i=0,l=a.length;i>>18)+b64chars.charAt((ord>>>12)&63)+(typeof a1!="undefined"?b64chars.charAt((ord>>>6)&63):"=")+(typeof a2!="undefined"?b64chars.charAt(ord&63):"=")}return urisafe?mkUriSafe(b64):b64}}var re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;var cb_btou=function(cccc){switch(cccc.length){case 4:var cp=((7&cccc.charCodeAt(0))<<18)|((63&cccc.charCodeAt(1))<<12)|((63&cccc.charCodeAt(2))<<6)|(63&cccc.charCodeAt(3)),offset=cp-65536;return(fromCharCode((offset>>>10)+55296)+fromCharCode((offset&1023)+56320));case 3:return fromCharCode(((15&cccc.charCodeAt(0))<<12)|((63&cccc.charCodeAt(1))<<6)|(63&cccc.charCodeAt(2)));default:return fromCharCode(((31&cccc.charCodeAt(0))<<6)|(63&cccc.charCodeAt(1)))}};var btou=function(b){return b.replace(re_btou,cb_btou)};var cb_decode=function(cccc){var len=cccc.length,padlen=len%4,n=(len>0?b64tab[cccc.charAt(0)]<<18:0)|(len>1?b64tab[cccc.charAt(1)]<<12:0)|(len>2?b64tab[cccc.charAt(2)]<<6:0)|(len>3?b64tab[cccc.charAt(3)]:0),chars=[fromCharCode(n>>>16),fromCharCode((n>>>8)&255),fromCharCode(n&255)];chars.length-=[0,0,2,1][padlen];return chars.join("")};var _atob=global.atob&&typeof global.atob=="function"?function(a){return global.atob(a)}:function(a){return a.replace(/\S{1,4}/g,cb_decode)};var atob=function(a){return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g,""))};var _decode=function(a){return btou(_atob(a))};var _fromURI=function(a){return String(a).replace(/[-_]/g,function(m0){return m0=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")};var decode=function(a){return _decode(_fromURI(a))};var toUint8Array;if(global.Uint8Array){toUint8Array=function(a){return Uint8Array.from(atob(_fromURI(a)),function(c){return c.charCodeAt(0)})}}var noConflict=function(){var Base64=global.Base64;global.Base64=_Base64;return Base64};global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,fromUint8Array:fromUint8Array,toUint8Array:toUint8Array};if(typeof Object.defineProperty==="function"){var noEnum=function(v){return{value:v,enumerable:false,writable:true,configurable:true}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)}));Object.defineProperty(String.prototype,"toBase64",noEnum(function(urisafe){return encode(this,urisafe)}));Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,true)}))}}if(global["Meteor"]){Base64=global.Base64}if(typeof module!=="undefined"&&module.exports){module.exports.Base64=global.Base64}else{if(typeof define==="function"&&define.amd){define([],function(){return global.Base64})}}return{Base64:global.Base64}})); \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/beautifyhtml/beautifyhtml.js b/src/main/resources/static/ajax/libs/beautifyhtml/beautifyhtml.js new file mode 100644 index 0000000..ea69dec --- /dev/null +++ b/src/main/resources/static/ajax/libs/beautifyhtml/beautifyhtml.js @@ -0,0 +1,617 @@ +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2013 Einar Lielmanis and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + Style HTML +--------------- + + Written by Nochum Sossonko, (nsossonko@hotmail.com) + + Based on code initially developed by: Einar Lielmanis, + http://jsbeautifier.org/ + + Usage: + style_html(html_source); + + style_html(html_source, options); + + The options are: + indent_size (default 4) — indentation size, + indent_char (default space) — character to indent with, + max_char (default 250) - maximum amount of characters per line (0 = disable) + brace_style (default "collapse") - "collapse" | "expand" | "end-expand" + put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line. + unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted + indent_scripts (default normal) - "keep"|"separate"|"normal" + + e.g. + + style_html(html_source, { + 'indent_size': 2, + 'indent_char': ' ', + 'max_char': 78, + 'brace_style': 'expand', + 'unformatted': ['a', 'sub', 'sup', 'b', 'i', 'u'] + }); +*/ + +(function() { + + function style_html(html_source, options, js_beautify, css_beautify) { + //Wrapper function to invoke all the necessary constructors and deal with the output. + + var multi_parser, + indent_size, + indent_character, + max_char, + brace_style, + unformatted; + + options = options || {}; + indent_size = options.indent_size || 4; + indent_character = options.indent_char || ' '; + brace_style = options.brace_style || 'collapse'; + max_char = options.max_char === 0 ? Infinity : options.max_char || 250; + unformatted = options.unformatted || ['a', 'span', 'bdo', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'sub', 'sup', 'tt', 'i', 'b', 'big', 'small', 'u', 's', 'strike', 'font', 'ins', 'del', 'pre', 'address', 'dt', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']; + + function Parser() { + + this.pos = 0; //Parser position + this.token = ''; + this.current_mode = 'CONTENT'; //reflects the current Parser mode: TAG/CONTENT + this.tags = { //An object to hold tags, their position, and their parent-tags, initiated with default values + parent: 'parent1', + parentcount: 1, + parent1: '' + }; + this.tag_type = ''; + this.token_text = this.last_token = this.last_text = this.token_type = ''; + + this.Utils = { //Uilities made available to the various functions + whitespace: "\n\r\t ".split(''), + single_token: 'br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?='.split(','), //all the single tags for HTML + extra_liners: 'head,body,/html'.split(','), //for tags that need a line of whitespace before them + in_array: function (what, arr) { + for (var i=0; i= this.input.length) { + return content.length?content.join(''):['', 'TK_EOF']; + } + + input_char = this.input.charAt(this.pos); + this.pos++; + this.line_char_count++; + + if (this.Utils.in_array(input_char, this.Utils.whitespace)) { + if (content.length) { + space = true; + } + this.line_char_count--; + continue; //don't want to insert unnecessary space + } + else if (space) { + if (this.line_char_count >= this.max_char) { //insert a line when the max_char is reached + content.push('\n'); + for (var i=0; i', 'igm'); + reg_match.lastIndex = this.pos; + var reg_array = reg_match.exec(this.input); + var end_script = reg_array?reg_array.index:this.input.length; //absolute end of script + if(this.pos < end_script) { //get everything in between the script tags + content = this.input.substring(this.pos, end_script); + this.pos = end_script; + } + return content; + }; + + this.record_tag = function (tag){ //function to record a tag and its parent in this.tags Object + if (this.tags[tag + 'count']) { //check for the existence of this tag type + this.tags[tag + 'count']++; + this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level + } + else { //otherwise initialize this tag type + this.tags[tag + 'count'] = 1; + this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level + } + this.tags[tag + this.tags[tag + 'count'] + 'parent'] = this.tags.parent; //set the parent (i.e. in the case of a div this.tags.div1parent) + this.tags.parent = tag + this.tags[tag + 'count']; //and make this the current parent (i.e. in the case of a div 'div1') + }; + + this.retrieve_tag = function (tag) { //function to retrieve the opening tag to the corresponding closer + if (this.tags[tag + 'count']) { //if the openener is not in the Object we ignore it + var temp_parent = this.tags.parent; //check to see if it's a closable tag. + while (temp_parent) { //till we reach '' (the initial value); + if (tag + this.tags[tag + 'count'] === temp_parent) { //if this is it use it + break; + } + temp_parent = this.tags[temp_parent + 'parent']; //otherwise keep on climbing up the DOM Tree + } + if (temp_parent) { //if we caught something + this.indent_level = this.tags[tag + this.tags[tag + 'count']]; //set the indent_level accordingly + this.tags.parent = this.tags[temp_parent + 'parent']; //and set the current parent + } + delete this.tags[tag + this.tags[tag + 'count'] + 'parent']; //delete the closed tags parent reference... + delete this.tags[tag + this.tags[tag + 'count']]; //...and the tag itself + if (this.tags[tag + 'count'] === 1) { + delete this.tags[tag + 'count']; + } + else { + this.tags[tag + 'count']--; + } + } + }; + + this.get_tag = function (peek) { //function to get a full tag and parse its type + var input_char = '', + content = [], + comment = '', + space = false, + tag_start, tag_end, + orig_pos = this.pos, + orig_line_char_count = this.line_char_count; + + peek = peek !== undefined ? peek : false; + + do { + if (this.pos >= this.input.length) { + if (peek) { + this.pos = orig_pos; + this.line_char_count = orig_line_char_count; + } + return content.length?content.join(''):['', 'TK_EOF']; + } + + input_char = this.input.charAt(this.pos); + this.pos++; + this.line_char_count++; + + if (this.Utils.in_array(input_char, this.Utils.whitespace)) { //don't want to insert unnecessary space + space = true; + this.line_char_count--; + continue; + } + + if (input_char === "'" || input_char === '"') { + if (!content[1] || content[1] !== '!') { //if we're in a comment strings don't get treated specially + input_char += this.get_unformatted(input_char); + space = true; + } + } + + if (input_char === '=') { //no space before = + space = false; + } + + if (content.length && content[content.length-1] !== '=' && input_char !== '>' && space) { + //no space after = or before > + if (this.line_char_count >= this.max_char) { + this.print_newline(false, content); + this.line_char_count = 0; + } + else { + content.push(' '); + this.line_char_count++; + } + space = false; + } + if (input_char === '<') { + tag_start = this.pos - 1; + } + content.push(input_char); //inserts character at-a-time (or string) + } while (input_char !== '>'); + + var tag_complete = content.join(''); + var tag_index; + if (tag_complete.indexOf(' ') !== -1) { //if there's whitespace, thats where the tag name ends + tag_index = tag_complete.indexOf(' '); + } + else { //otherwise go with the tag ending + tag_index = tag_complete.indexOf('>'); + } + var tag_check = tag_complete.substring(1, tag_index).toLowerCase(); + if (tag_complete.charAt(tag_complete.length-2) === '/' || + this.Utils.in_array(tag_check, this.Utils.single_token)) { //if this tag name is a single tag type (either in the list or has a closing /) + if ( ! peek) { + this.tag_type = 'SINGLE'; + } + } + else if (tag_check === 'script') { //for later script handling + if ( ! peek) { + this.record_tag(tag_check); + this.tag_type = 'SCRIPT'; + } + } + else if (tag_check === 'style') { //for future style handling (for now it justs uses get_content) + if ( ! peek) { + this.record_tag(tag_check); + this.tag_type = 'STYLE'; + } + } + else if (this.is_unformatted(tag_check, unformatted)) { // do not reformat the "unformatted" tags + comment = this.get_unformatted('', tag_complete); //...delegate to get_unformatted function + content.push(comment); + // Preserve collapsed whitespace either before or after this tag. + if (tag_start > 0 && this.Utils.in_array(this.input.charAt(tag_start - 1), this.Utils.whitespace)){ + content.splice(0, 0, this.input.charAt(tag_start - 1)); + } + tag_end = this.pos - 1; + if (this.Utils.in_array(this.input.charAt(tag_end + 1), this.Utils.whitespace)){ + content.push(this.input.charAt(tag_end + 1)); + } + this.tag_type = 'SINGLE'; + } + else if (tag_check.charAt(0) === '!') { //peek for so... + comment = this.get_unformatted('-->', tag_complete); //...delegate to get_unformatted + content.push(comment); + } + if ( ! peek) { + this.tag_type = 'START'; + } + } + else if (tag_check.indexOf('[endif') !== -1) {//peek for ', tag_complete); + content.push(comment); + this.tag_type = 'SINGLE'; + } + } + else if ( ! peek) { + if (tag_check.charAt(0) === '/') { //this tag is a double tag so check for tag-ending + this.retrieve_tag(tag_check.substring(1)); //remove it and all ancestors + this.tag_type = 'END'; + } + else { //otherwise it's a start-tag + this.record_tag(tag_check); //push it on the tag stack + this.tag_type = 'START'; + } + if (this.Utils.in_array(tag_check, this.Utils.extra_liners)) { //check if this double needs an extra line + this.print_newline(true, this.output); + } + } + + if (peek) { + this.pos = orig_pos; + this.line_char_count = orig_line_char_count; + } + + return content.join(''); //returns fully formatted tag + }; + + this.get_unformatted = function (delimiter, orig_tag) { //function to return unformatted content in its entirety + + if (orig_tag && orig_tag.toLowerCase().indexOf(delimiter) !== -1) { + return ''; + } + var input_char = ''; + var content = ''; + var space = true; + do { + + if (this.pos >= this.input.length) { + return content; + } + + input_char = this.input.charAt(this.pos); + this.pos++; + + if (this.Utils.in_array(input_char, this.Utils.whitespace)) { + if (!space) { + this.line_char_count--; + continue; + } + if (input_char === '\n' || input_char === '\r') { + content += '\n'; + /* Don't change tab indention for unformatted blocks. If using code for html editing, this will greatly affect
 tags if they are specified in the 'unformatted array'
+                for (var i=0; i]*>\s*$/);
+
+            // if next_tag comes back but is not an isolated tag, then
+            // let's treat the 'a' tag as having content
+            // and respect the unformatted option
+            if (!tag || this.Utils.in_array(tag, unformatted)){
+                return true;
+            } else {
+                return false;
+            }
+        };
+
+        this.printer = function (js_source, indent_character, indent_size, max_char, brace_style) { //handles input/output and some other printing functions
+
+          this.input = js_source || ''; //gets the input for the Parser
+          this.output = [];
+          this.indent_character = indent_character;
+          this.indent_string = '';
+          this.indent_size = indent_size;
+          this.brace_style = brace_style;
+          this.indent_level = 0;
+          this.max_char = max_char;
+          this.line_char_count = 0; //count to see if max_char was exceeded
+
+          for (var i=0; i 0) {
+              this.indent_level--;
+            }
+          };
+        };
+        return this;
+      }
+
+      /*_____________________--------------------_____________________*/
+
+      multi_parser = new Parser(); //wrapping functions Parser
+      multi_parser.printer(html_source, indent_character, indent_size, max_char, brace_style); //initialize starting values
+
+      while (true) {
+          var t = multi_parser.get_token();
+          multi_parser.token_text = t[0];
+          multi_parser.token_type = t[1];
+
+        if (multi_parser.token_type === 'TK_EOF') {
+          break;
+        }
+
+        switch (multi_parser.token_type) {
+          case 'TK_TAG_START':
+            multi_parser.print_newline(false, multi_parser.output);
+            multi_parser.print_token(multi_parser.token_text);
+            multi_parser.indent();
+            multi_parser.current_mode = 'CONTENT';
+            break;
+          case 'TK_TAG_STYLE':
+          case 'TK_TAG_SCRIPT':
+            multi_parser.print_newline(false, multi_parser.output);
+            multi_parser.print_token(multi_parser.token_text);
+            multi_parser.current_mode = 'CONTENT';
+            break;
+          case 'TK_TAG_END':
+            //Print new line only if the tag has no content and has child
+            if (multi_parser.last_token === 'TK_CONTENT' && multi_parser.last_text === '') {
+                var tag_name = multi_parser.token_text.match(/\w+/)[0];
+                var tag_extracted_from_last_output = multi_parser.output[multi_parser.output.length -1].match(/<\s*(\w+)/);
+                if (tag_extracted_from_last_output === null || tag_extracted_from_last_output[1] !== tag_name) {
+                    multi_parser.print_newline(true, multi_parser.output);
+                }
+            }
+            multi_parser.print_token(multi_parser.token_text);
+            multi_parser.current_mode = 'CONTENT';
+            break;
+          case 'TK_TAG_SINGLE':
+            // Don't add a newline before elements that should remain unformatted.
+            var tag_check = multi_parser.token_text.match(/^\s*<([a-z]+)/i);
+            if (!tag_check || !multi_parser.Utils.in_array(tag_check[1], unformatted)){
+                multi_parser.print_newline(false, multi_parser.output);
+            }
+            multi_parser.print_token(multi_parser.token_text);
+            multi_parser.current_mode = 'CONTENT';
+            break;
+          case 'TK_CONTENT':
+            if (multi_parser.token_text !== '') {
+              multi_parser.print_token(multi_parser.token_text);
+            }
+            multi_parser.current_mode = 'TAG';
+            break;
+          case 'TK_STYLE':
+          case 'TK_SCRIPT':
+            if (multi_parser.token_text !== '') {
+              multi_parser.output.push('\n');
+              var text = multi_parser.token_text,
+                  _beautifier,
+                  script_indent_level = 1;
+              if (multi_parser.token_type === 'TK_SCRIPT') {
+                _beautifier = typeof js_beautify === 'function' && js_beautify;
+              } else if (multi_parser.token_type === 'TK_STYLE') {
+                _beautifier = typeof css_beautify === 'function' && css_beautify;
+              }
+
+              if (options.indent_scripts === "keep") {
+                script_indent_level = 0;
+              } else if (options.indent_scripts === "separate") {
+                script_indent_level = -multi_parser.indent_level;
+              }
+
+              var indentation = multi_parser.get_full_indent(script_indent_level);
+              if (_beautifier) {
+                // call the Beautifier if avaliable
+                text = _beautifier(text.replace(/^\s*/, indentation), options);
+              } else {
+                // simply indent the string otherwise
+                var white = text.match(/^\s*/)[0];
+                var _level = white.match(/[^\n\r]*$/)[0].split(multi_parser.indent_string).length - 1;
+                var reindent = multi_parser.get_full_indent(script_indent_level -_level);
+                text = text.replace(/^\s*/, indentation)
+                       .replace(/\r\n|\r|\n/g, '\n' + reindent)
+                       .replace(/\s*$/, '');
+              }
+              if (text) {
+                multi_parser.print_token(text);
+                multi_parser.print_newline(true, multi_parser.output);
+              }
+            }
+            multi_parser.current_mode = 'TAG';
+            break;
+        }
+        multi_parser.last_token = multi_parser.token_type;
+        multi_parser.last_text = multi_parser.token_text;
+      }
+      return multi_parser.output.join('');
+    }
+
+    // If we're running a web page and don't have either of the above, add our one global
+    window.html_beautify = function(html_source, options) {
+        return style_html(html_source, options, window.js_beautify, window.css_beautify);
+    };
+
+}());
diff --git a/src/main/resources/static/ajax/libs/blockUI/jquery.blockUI.js b/src/main/resources/static/ajax/libs/blockUI/jquery.blockUI.js
new file mode 100644
index 0000000..552613d
--- /dev/null
+++ b/src/main/resources/static/ajax/libs/blockUI/jquery.blockUI.js
@@ -0,0 +1,620 @@
+/*!
+ * jQuery blockUI plugin
+ * Version 2.70.0-2014.11.23
+ * Requires jQuery v1.7 or later
+ *
+ * Examples at: http://malsup.com/jquery/block/
+ * Copyright (c) 2007-2013 M. Alsup
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Thanks to Amir-Hossein Sobhi for some excellent contributions!
+ */
+
+;(function() {
+/*jshint eqeqeq:false curly:false latedef:false */
+"use strict";
+
+	function setup($) {
+		$.fn._fadeIn = $.fn.fadeIn;
+
+		var noOp = $.noop || function() {};
+
+		// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
+		// confusing userAgent strings on Vista)
+		var msie = /MSIE/.test(navigator.userAgent);
+		var ie6  = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
+		var mode = document.documentMode || 0;
+		var setExpr = $.isFunction( document.createElement('div').style.setExpression );
+
+		// global $ methods for blocking/unblocking the entire page
+		$.blockUI   = function(opts) { install(window, opts); };
+		$.unblockUI = function(opts) { remove(window, opts); };
+
+		// convenience method for quick growl-like notifications  (http://www.google.com/search?q=growl)
+		$.growlUI = function(title, message, timeout, onClose) {
+			var $m = $('
'); + if (title) $m.append('

'+title+'

'); + if (message) $m.append('

'+message+'

'); + if (timeout === undefined) timeout = 3000; + + // Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications + var callBlock = function(opts) { + opts = opts || {}; + + $.blockUI({ + message: $m, + fadeIn : typeof opts.fadeIn !== 'undefined' ? opts.fadeIn : 700, + fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000, + timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout, + centerY: false, + showOverlay: false, + onUnblock: onClose, + css: $.blockUI.defaults.growlCSS + }); + }; + + callBlock(); + var nonmousedOpacity = $m.css('opacity'); + $m.mouseover(function() { + callBlock({ + fadeIn: 0, + timeout: 30000 + }); + + var displayBlock = $('.blockMsg'); + displayBlock.stop(); // cancel fadeout if it has started + displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency + }).mouseout(function() { + $('.blockMsg').fadeOut(1000); + }); + // End konapun additions + }; + + // plugin method for blocking element content + $.fn.block = function(opts) { + if ( this[0] === window ) { + $.blockUI( opts ); + return this; + } + var fullOpts = $.extend({}, $.blockUI.defaults, opts || {}); + this.each(function() { + var $el = $(this); + if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked')) + return; + $el.unblock({ fadeOut: 0 }); + }); + + return this.each(function() { + if ($.css(this,'position') == 'static') { + this.style.position = 'relative'; + $(this).data('blockUI.static', true); + } + this.style.zoom = 1; // force 'hasLayout' in ie + install(this, opts); + }); + }; + + // plugin method for unblocking element content + $.fn.unblock = function(opts) { + if ( this[0] === window ) { + $.unblockUI( opts ); + return this; + } + return this.each(function() { + remove(this, opts); + }); + }; + + $.blockUI.version = 2.70; // 2nd generation blocking at no extra cost! + + // override these in your code to change the default behavior and style + $.blockUI.defaults = { + // message displayed when blocking (use null for no message) + message: '
加载中......
', + + title: null, // title string; only used when theme == true + draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded) + + theme: false, // set to true to use with jQuery UI themes + + // styles for the message when blocking; if you wish to disable + // these and use an external stylesheet then do this in your code: + // $.blockUI.defaults.css = {}; + css: { + padding: 0, + margin: 0, + width: '30%', + top: '40%', + left: '35%', + textAlign: 'center', + color: '#000', + border: '0px', + backgroundColor:'transparent', + cursor: 'wait' + }, + + // minimal style set used when themes are used + themedCSS: { + width: '30%', + top: '40%', + left: '35%' + }, + + // styles for the overlay + overlayCSS: { + backgroundColor: '#000', + opacity: 0.6, + cursor: 'wait' + }, + + // style to replace wait cursor before unblocking to correct issue + // of lingering wait cursor + cursorReset: 'default', + + // styles applied when using $.growlUI + growlCSS: { + width: '350px', + top: '10px', + left: '', + right: '10px', + border: 'none', + padding: '5px', + opacity: 0.6, + cursor: 'default', + color: '#fff', + backgroundColor: '#000', + '-webkit-border-radius':'10px', + '-moz-border-radius': '10px', + 'border-radius': '10px' + }, + + // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w + // (hat tip to Jorge H. N. de Vasconcelos) + /*jshint scripturl:true */ + iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank', + + // force usage of iframe in non-IE browsers (handy for blocking applets) + forceIframe: false, + + // z-index for the blocking overlay + baseZ: 1000, + + // set these to true to have the message automatically centered + centerX: true, // <-- only effects element blocking (page block controlled via css above) + centerY: true, + + // allow body element to be stetched in ie6; this makes blocking look better + // on "short" pages. disable if you wish to prevent changes to the body height + allowBodyStretch: true, + + // enable if you want key and mouse events to be disabled for content that is blocked + bindEvents: true, + + // be default blockUI will supress tab navigation from leaving blocking content + // (if bindEvents is true) + constrainTabKey: true, + + // fadeIn time in millis; set to 0 to disable fadeIn on block + fadeIn: 200, + + // fadeOut time in millis; set to 0 to disable fadeOut on unblock + fadeOut: 400, + + // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock + timeout: 0, + + // disable if you don't want to show the overlay + showOverlay: true, + + // if true, focus will be placed in the first available input field when + // page blocking + focusInput: true, + + // elements that can receive focus + focusableElements: ':input:enabled:visible', + + // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity) + // no longer needed in 2012 + // applyPlatformOpacityRules: true, + + // callback method invoked when fadeIn has completed and blocking message is visible + onBlock: null, + + // callback method invoked when unblocking has completed; the callback is + // passed the element that has been unblocked (which is the window object for page + // blocks) and the options that were passed to the unblock call: + // onUnblock(element, options) + onUnblock: null, + + // callback method invoked when the overlay area is clicked. + // setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used. + onOverlayClick: null, + + // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493 + quirksmodeOffsetHack: 4, + + // class name of the message block + blockMsgClass: 'blockMsg', + + // if it is already blocked, then ignore it (don't unblock and reblock) + ignoreIfBlocked: false + }; + + // private data and functions follow... + + var pageBlock = null; + var pageBlockEls = []; + + function install(el, opts) { + var css, themedCSS; + var full = (el == window); + var msg = (opts && opts.message !== undefined ? opts.message : undefined); + opts = $.extend({}, $.blockUI.defaults, opts || {}); + + if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked')) + return; + + opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {}); + css = $.extend({}, $.blockUI.defaults.css, opts.css || {}); + if (opts.onOverlayClick) + opts.overlayCSS.cursor = 'pointer'; + + themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {}); + msg = msg === undefined ? opts.message : msg; + + // remove the current block (if there is one) + if (full && pageBlock) + remove(window, {fadeOut:0}); + + // if an existing element is being used as the blocking content then we capture + // its current place in the DOM (and current display style) so we can restore + // it when we unblock + if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) { + var node = msg.jquery ? msg[0] : msg; + var data = {}; + $(el).data('blockUI.history', data); + data.el = node; + data.parent = node.parentNode; + data.display = node.style.display; + data.position = node.style.position; + if (data.parent) + data.parent.removeChild(node); + } + + $(el).data('blockUI.onUnblock', opts.onUnblock); + var z = opts.baseZ; + + // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform; + // layer1 is the iframe layer which is used to supress bleed through of underlying content + // layer2 is the overlay layer which has opacity and a wait cursor (by default) + // layer3 is the message content that is displayed while blocking + var lyr1, lyr2, lyr3, s; + if (msie || opts.forceIframe) + lyr1 = $(''); + else + lyr1 = $(''); + + if (opts.theme) + lyr2 = $(''); + else + lyr2 = $(''); + + if (opts.theme && full) { + s = ''; + } + else if (opts.theme) { + s = ''; + } + else if (full) { + s = ''; + } + else { + s = ''; + } + lyr3 = $(s); + + // if we have a message, style it + if (msg) { + if (opts.theme) { + lyr3.css(themedCSS); + lyr3.addClass('ui-widget-content'); + } + else + lyr3.css(css); + } + + // style the overlay + if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/) + lyr2.css(opts.overlayCSS); + lyr2.css('position', full ? 'fixed' : 'absolute'); + + // make iframe layer transparent in IE + if (msie || opts.forceIframe) + lyr1.css('opacity',0.0); + + //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el); + var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el); + $.each(layers, function() { + this.appendTo($par); + }); + + if (opts.theme && opts.draggable && $.fn.draggable) { + lyr3.draggable({ + handle: '.ui-dialog-titlebar', + cancel: 'li' + }); + } + + // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling) + var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0); + if (ie6 || expr) { + // give body 100% height + if (full && opts.allowBodyStretch && $.support.boxModel) + $('html,body').css('height','100%'); + + // fix ie6 issue when blocked element has a border width + if ((ie6 || !$.support.boxModel) && !full) { + var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth'); + var fixT = t ? '(0 - '+t+')' : 0; + var fixL = l ? '(0 - '+l+')' : 0; + } + + // simulate fixed position + $.each(layers, function(i,o) { + var s = o[0].style; + s.position = 'absolute'; + if (i < 2) { + if (full) + s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"'); + else + s.setExpression('height','this.parentNode.offsetHeight + "px"'); + if (full) + s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'); + else + s.setExpression('width','this.parentNode.offsetWidth + "px"'); + if (fixL) s.setExpression('left', fixL); + if (fixT) s.setExpression('top', fixT); + } + else if (opts.centerY) { + if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'); + s.marginTop = 0; + } + else if (!opts.centerY && full) { + var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0; + var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"'; + s.setExpression('top',expression); + } + }); + } + + // show the message + if (msg) { + if (opts.theme) + lyr3.find('.ui-widget-content').append(msg); + else + lyr3.append(msg); + if (msg.jquery || msg.nodeType) + $(msg).show(); + } + + if ((msie || opts.forceIframe) && opts.showOverlay) + lyr1.show(); // opacity is zero + if (opts.fadeIn) { + var cb = opts.onBlock ? opts.onBlock : noOp; + var cb1 = (opts.showOverlay && !msg) ? cb : noOp; + var cb2 = msg ? cb : noOp; + if (opts.showOverlay) + lyr2._fadeIn(opts.fadeIn, cb1); + if (msg) + lyr3._fadeIn(opts.fadeIn, cb2); + } + else { + if (opts.showOverlay) + lyr2.show(); + if (msg) + lyr3.show(); + if (opts.onBlock) + opts.onBlock.bind(lyr3)(); + } + + // bind key and mouse events + bind(1, el, opts); + + if (full) { + pageBlock = lyr3[0]; + pageBlockEls = $(opts.focusableElements,pageBlock); + if (opts.focusInput) + setTimeout(focus, 20); + } + else + center(lyr3[0], opts.centerX, opts.centerY); + + if (opts.timeout) { + // auto-unblock + var to = setTimeout(function() { + if (full) + $.unblockUI(opts); + else + $(el).unblock(opts); + }, opts.timeout); + $(el).data('blockUI.timeout', to); + } + } + + // remove the block + function remove(el, opts) { + var count; + var full = (el == window); + var $el = $(el); + var data = $el.data('blockUI.history'); + var to = $el.data('blockUI.timeout'); + if (to) { + clearTimeout(to); + $el.removeData('blockUI.timeout'); + } + opts = $.extend({}, $.blockUI.defaults, opts || {}); + bind(0, el, opts); // unbind events + + if (opts.onUnblock === null) { + opts.onUnblock = $el.data('blockUI.onUnblock'); + $el.removeData('blockUI.onUnblock'); + } + + var els; + if (full) // crazy selector to handle odd field errors in ie6/7 + els = $('body').children().filter('.blockUI').add('body > .blockUI'); + else + els = $el.find('>.blockUI'); + + // fix cursor issue + if ( opts.cursorReset ) { + if ( els.length > 1 ) + els[1].style.cursor = opts.cursorReset; + if ( els.length > 2 ) + els[2].style.cursor = opts.cursorReset; + } + + if (full) + pageBlock = pageBlockEls = null; + + if (opts.fadeOut) { + count = els.length; + els.stop().fadeOut(opts.fadeOut, function() { + if ( --count === 0) + reset(els,data,opts,el); + }); + } + else + reset(els, data, opts, el); + } + + // move blocking element back into the DOM where it started + function reset(els,data,opts,el) { + var $el = $(el); + if ( $el.data('blockUI.isBlocked') ) + return; + + els.each(function(i,o) { + // remove via DOM calls so we don't lose event handlers + if (this.parentNode) + this.parentNode.removeChild(this); + }); + + if (data && data.el) { + data.el.style.display = data.display; + data.el.style.position = data.position; + data.el.style.cursor = 'default'; // #59 + if (data.parent) + data.parent.appendChild(data.el); + $el.removeData('blockUI.history'); + } + + if ($el.data('blockUI.static')) { + $el.css('position', 'static'); // #22 + } + + if (typeof opts.onUnblock == 'function') + opts.onUnblock(el,opts); + + // fix issue in Safari 6 where block artifacts remain until reflow + var body = $(document.body), w = body.width(), cssW = body[0].style.width; + body.width(w-1).width(w); + body[0].style.width = cssW; + } + + // bind/unbind the handler + function bind(b, el, opts) { + var full = el == window, $el = $(el); + + // don't bother unbinding if there is nothing to unbind + if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked'))) + return; + + $el.data('blockUI.isBlocked', b); + + // don't bind events when overlay is not in use or if bindEvents is false + if (!full || !opts.bindEvents || (b && !opts.showOverlay)) + return; + + // bind anchors and inputs for mouse and key events + var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove'; + if (b) + $(document).bind(events, opts, handler); + else + $(document).unbind(events, handler); + + // former impl... + // var $e = $('a,:input'); + // b ? $e.bind(events, opts, handler) : $e.unbind(events, handler); + } + + // event handler to suppress keyboard/mouse events when blocking + function handler(e) { + // allow tab navigation (conditionally) + if (e.type === 'keydown' && e.keyCode && e.keyCode == 9) { + if (pageBlock && e.data.constrainTabKey) { + var els = pageBlockEls; + var fwd = !e.shiftKey && e.target === els[els.length-1]; + var back = e.shiftKey && e.target === els[0]; + if (fwd || back) { + setTimeout(function(){focus(back);},10); + return false; + } + } + } + var opts = e.data; + var target = $(e.target); + if (target.hasClass('blockOverlay') && opts.onOverlayClick) + opts.onOverlayClick(e); + + // allow events within the message content + if (target.parents('div.' + opts.blockMsgClass).length > 0) + return true; + + // allow events for content that is not being blocked + return target.parents().children().filter('div.blockUI').length === 0; + } + + function focus(back) { + if (!pageBlockEls) + return; + var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0]; + if (e) + e.focus(); + } + + function center(el, x, y) { + var p = el.parentNode, s = el.style; + var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth'); + var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth'); + if (x) s.left = l > 0 ? (l+'px') : '0'; + if (y) s.top = t > 0 ? (t+'px') : '0'; + } + + function sz(el, p) { + return parseInt($.css(el,p),10)||0; + } + + } + + + /*global define:true */ + if (typeof define === 'function' && define.amd && define.amd.jQuery) { + define(['jquery'], setup); + } else { + setup(jQuery); + } + +})(); \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.css b/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.css new file mode 100644 index 0000000..2ae20ab --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.css @@ -0,0 +1,563 @@ +/*! + * bootstrap-fileinput v5.1.3 + * http://plugins.krajee.com/file-input + * + * Krajee default styling for bootstrap-fileinput. + * + * Author: Kartik Visweswaran + * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com + * + * Licensed under the BSD-3-Clause + * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md + */ +.file-loading input[type=file], input[type=file].file-loading { + width: 0; + height: 0; +} + +.file-no-browse { + position: absolute; + left: 50%; + bottom: 20%; + width: 1px; + height: 1px; + font-size: 0; + opacity: 0; + border: none; + background: none; + outline: none; + box-shadow: none; +} + +.kv-hidden, .file-caption-icon, .file-zoom-dialog .modal-header:before, .file-zoom-dialog .modal-header:after, .file-input-new .file-preview, .file-input-new .close, .file-input-new .glyphicon-file, .file-input-new .fileinput-remove-button, .file-input-new .fileinput-upload-button, .file-input-new .no-browse .input-group-btn, .file-input-ajax-new .fileinput-remove-button, .file-input-ajax-new .fileinput-upload-button, .file-input-ajax-new .no-browse .input-group-btn, .hide-content .kv-file-content, .is-locked .fileinput-upload-button, .is-locked .fileinput-remove-button { + display: none; +} + +.btn-file input[type=file], .file-caption-icon, .file-preview .fileinput-remove, .krajee-default .file-thumb-progress, .file-zoom-dialog .btn-navigate, .file-zoom-dialog .floating-buttons { + position: absolute; +} + +.file-caption-icon .kv-caption-icon { + line-height: inherit; +} + +.file-input, .file-loading:before, .btn-file, .file-caption, .file-preview, .krajee-default.file-preview-frame, .krajee-default .file-thumbnail-footer, .file-zoom-dialog .modal-dialog { + position: relative; +} + +.file-error-message pre, .file-error-message ul, .krajee-default .file-actions, .krajee-default .file-other-error { + text-align: left; +} + +.file-error-message pre, .file-error-message ul { + margin: 0; +} + +.krajee-default .file-drag-handle, .krajee-default .file-upload-indicator { + float: left; + margin-top: 10px; + width: 16px; + height: 16px; +} + +.file-thumb-progress .progress, .file-thumb-progress .progress-bar { + font-family: Verdana, Helvetica, sans-serif; + font-size: 0.7rem; +} + +.krajee-default .file-thumb-progress .progress, .kv-upload-progress .progress { + background-color: #ccc; +} + +.krajee-default .file-caption-info, .krajee-default .file-size-info { + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + width: 160px; + height: 15px; + margin: auto; +} + +.file-zoom-content > .file-object.type-video, .file-zoom-content > .file-object.type-flash, .file-zoom-content > .file-object.type-image { + max-width: 100%; + max-height: 100%; + width: auto; +} + +.file-zoom-content > .file-object.type-video, .file-zoom-content > .file-object.type-flash { + height: 100%; +} + +.file-zoom-content > .file-object.type-pdf, .file-zoom-content > .file-object.type-html, .file-zoom-content > .file-object.type-text, .file-zoom-content > .file-object.type-default { + width: 100%; +} + +.file-loading:before { + content: " Loading..."; + display: inline-block; + padding-left: 20px; + line-height: 16px; + font-size: 13px; + font-variant: small-caps; + color: #999; + background: transparent url(loading.gif) top left no-repeat; +} + +.file-object { + margin: 0 0 -5px 0; + padding: 0; +} + +.btn-file { + overflow: hidden; +} + +.btn-file input[type=file] { + top: 0; + left: 0; + min-width: 100%; + min-height: 100%; + text-align: right; + opacity: 0; + background: none repeat scroll 0 0 transparent; + cursor: inherit; + display: block; +} + +.btn-file ::-ms-browse { + font-size: 10000px; + width: 100%; + height: 100%; +} + +.file-caption .file-caption-name { + width: 100%; + margin: 0; + padding: 0; + box-shadow: none; + border: none; + background: none; + outline: none; +} + +.file-caption.icon-visible .file-caption-icon { + display: inline-block; +} + +.file-caption.icon-visible .file-caption-name { + padding-left: 15px; +} + +.file-caption-icon { + left: 8px; +} + +.file-error-message { + color: #a94442; + background-color: #f2dede; + margin: 5px; + border: 1px solid #ebccd1; + border-radius: 4px; + padding: 15px; +} + +.file-error-message pre { + margin: 5px 0; +} + +.file-caption-disabled { + background-color: #eee; + cursor: not-allowed; + opacity: 1; +} + +.file-preview { + border-radius: 5px; + border: 1px solid #ddd; + padding: 8px; + width: 100%; + margin-bottom: 5px; +} + +.file-preview .btn-xs { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} + +.file-preview .fileinput-remove { + top: 1px; + right: 1px; + line-height: 10px; +} + +.file-preview .clickable { + cursor: pointer; +} + +.file-preview-image { + font: 40px Impact, Charcoal, sans-serif; + color: #008000; + width:auto; + height:auto; + max-width:100%; + max-height:100%; +} + +.krajee-default.file-preview-frame { + margin: 8px; + border: 1px solid rgba(0, 0, 0, 0.2); + box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2); + padding: 6px; + float: left; + text-align: center; +} + +.krajee-default.file-preview-frame .kv-file-content { + width: 213px; + height: 160px; +} + +.krajee-default .file-preview-other-frame { + display: flex; + align-items: center; + justify-content: center; +} + +.krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered { + width: 400px; +} + +.krajee-default.file-preview-frame[data-template="audio"] .kv-file-content { + width: 240px; + height: 55px; +} + +.krajee-default.file-preview-frame .file-thumbnail-footer { + height: 70px; +} + +.krajee-default.file-preview-frame:not(.file-preview-error):hover { + border: 1px solid rgba(0, 0, 0, 0.3); + box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4); +} + +.krajee-default .file-preview-text { + color: #428bca; + border: 1px solid #ddd; + outline: none; + resize: none; +} + +.krajee-default .file-preview-html { + border: 1px solid #ddd; +} + +.krajee-default .file-other-icon { + font-size: 6em; + line-height: 1; +} + +.krajee-default .file-footer-buttons { + float: right; +} + +.krajee-default .file-footer-caption { + display: block; + text-align: center; + padding-top: 4px; + font-size: 11px; + color: #777; + margin-bottom: 30px; +} + +.file-upload-stats { + font-size: 10px; + text-align: center; + width: 100%; +} + +.kv-upload-progress .file-upload-stats { + font-size: 12px; + margin: -10px 0 5px; +} + +.krajee-default .file-preview-error { + opacity: 0.65; + box-shadow: none; +} + +.krajee-default .file-thumb-progress { + top: 37px; + left: 0; + right: 0; +} + +.krajee-default.kvsortable-ghost { + background: #e1edf7; + border: 2px solid #a1abff; +} + +.krajee-default .file-preview-other:hover { + opacity: 0.8; +} + +.krajee-default .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover { + color: #000; +} + +.kv-upload-progress .progress { + height: 20px; + margin: 10px 0; + overflow: hidden; +} + +.kv-upload-progress .progress-bar { + height: 20px; + font-family: Verdana, Helvetica, sans-serif; +} + +/*noinspection CssOverwrittenProperties*/ +.file-zoom-dialog .file-other-icon { + font-size: 22em; + font-size: 50vmin; +} + +.file-zoom-dialog .modal-dialog { + width: auto; +} + +.file-zoom-dialog .modal-header { + display: flex; + align-items: center; + justify-content: space-between; +} + +.file-zoom-dialog .btn-navigate { + padding: 0; + margin: -60px 0 0; + font-size: 60px; + background: transparent; + text-decoration: none; + outline: none; + opacity: 0.7; + top: 50%; + color: #1c94c4; +} + +.file-zoom-dialog .btn-navigate:not([disabled]):hover { + outline: none; + box-shadow: none; + opacity: 0.6; +} + +.file-zoom-dialog .floating-buttons { + top: 5px; + right: 10px; +} + +.file-zoom-dialog .btn-navigate[disabled] { + opacity: 0.3; +} + +.file-zoom-dialog .btn-prev { + left: 1px; +} + +.file-zoom-dialog .btn-next { + right: 1px; +} + +.file-zoom-dialog .kv-zoom-title { + font-weight: 300; + color: #999; + max-width: 50%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.file-input-new .no-browse .form-control { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} + +.file-input-ajax-new .no-browse .form-control { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} + +.file-caption-main { + width: 100%; +} + +.file-thumb-loading { + background: transparent url(loading.gif) no-repeat scroll center center content-box !important; +} + +.file-drop-zone { + border: 1px dashed #aaa; + min-height: 260px; + border-radius: 4px; + text-align: center; + vertical-align: middle; + margin: 12px 15px 12px 12px; + padding: 5px; +} + +.file-drop-zone.clickable:hover { + border: 2px dashed #999; +} + +.file-drop-zone.clickable:focus { + border: 2px solid #5acde2; +} + +.file-drop-zone .file-preview-thumbnails { + cursor: default; +} + +.file-drop-zone-title { + color: #aaa; + font-size: 1.6em; + text-align:center; + padding: 85px 10px; + cursor: default; +} + +.file-highlighted { + border: 2px dashed #999 !important; + background-color: #eee; +} + +.file-uploading { + background: url(loading-sm.gif) no-repeat center bottom 10px; + opacity: 0.65; +} + +.file-zoom-fullscreen .modal-dialog { + min-width: 100%; + margin: 0; +} + +.file-zoom-fullscreen .modal-content { + border-radius: 0; + box-shadow: none; + min-height: 100vh; +} + +.file-zoom-fullscreen .modal-body { + overflow-y: auto; +} + +.floating-buttons { + z-index: 3000; +} + +.floating-buttons .btn-kv { + margin-left: 3px; + z-index: 3000; +} + +.kv-zoom-actions .btn-kv { + margin-left: 3px; +} + +.file-zoom-content { + text-align: center; + min-height: 300px; +} + +.file-zoom-content .file-preview-image { + max-height: 100%; +} + +.file-zoom-content .file-preview-video { + max-height: 100%; +} + +.file-zoom-content > .file-object.type-image { + height: auto; + min-height: inherit; +} + +.file-zoom-content > .file-object.type-audio { + width: auto; + height: 30px; +} + +@media (min-width: 576px) { + .file-zoom-dialog .modal-dialog { + max-width: 500px; + } +} + +@media (min-width: 992px) { + .file-zoom-dialog .modal-lg { + max-width: 800px; + } +} + +@media (max-width: 767px) { + .file-preview-thumbnails { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + } + + .file-zoom-dialog .modal-header { + flex-direction: column; + } +} + +@media (max-width: 350px) { + .krajee-default.file-preview-frame:not([data-template="audio"]) .kv-file-content { + width: 160px; + } +} + +@media (max-width: 420px) { + .krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered { + width: 100%; + } +} + +.file-loading[dir=rtl]:before { + background: transparent url(loading.gif) top right no-repeat; + padding-left: 0; + padding-right: 20px; +} + +.clickable .file-drop-zone-title { + cursor: pointer; +} + +.file-sortable .file-drag-handle:hover { + opacity: 0.7; +} + +.file-sortable .file-drag-handle { + cursor: grab; + opacity: 1; +} + +.file-grabbing, .file-grabbing * { + cursor: not-allowed !important; +} + +.file-grabbing .file-preview-thumbnails * { + cursor: grabbing !important; +} + +.file-preview-frame.sortable-chosen { + background-color: #d9edf7; + border-color: #17a2b8; + box-shadow: none !important; +} + +.file-preview .kv-zoom-cache { + display: none; +} \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.js b/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.js new file mode 100644 index 0000000..e172b50 --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.js @@ -0,0 +1,6150 @@ +/*! + * bootstrap-fileinput v5.1.3 + * http://plugins.krajee.com/file-input + * + * Author: Kartik Visweswaran + * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com + * + * Licensed under the BSD-3-Clause + * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md + */ +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else { + if (typeof module === 'object' && module.exports) { + //noinspection NpmUsedModulesInstalled + module.exports = factory(require('jquery')); + } else { + factory(window.jQuery); + } + } +}(function ($) { + 'use strict'; + + $.fn.fileinputLocales = {}; + $.fn.fileinputThemes = {}; + + String.prototype.setTokens = function (replacePairs) { + var str = this.toString(), key, re; + for (key in replacePairs) { + if (replacePairs.hasOwnProperty(key)) { + re = new RegExp('\{' + key + '\}', 'g'); + str = str.replace(re, replacePairs[key]); + } + } + return str; + }; + + if (!Array.prototype.flatMap) { // polyfill flatMap + Array.prototype.flatMap = function (lambda) { + return [].concat(this.map(lambda)); + }; + } + + var $h, FileInput; + + // fileinput helper object for all global variables and internal helper methods + $h = { + FRAMES: '.kv-preview-thumb', + SORT_CSS: 'file-sortable', + INIT_FLAG: 'init-', + OBJECT_PARAMS: '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n', + DEFAULT_PREVIEW: '
\n' + + '{previewFileIcon}\n' + + '
', + MODAL_ID: 'kvFileinputModal', + MODAL_EVENTS: ['show', 'shown', 'hide', 'hidden', 'loaded'], + logMessages: { + ajaxError: '{status}: {error}. Error Details: {text}.', + badDroppedFiles: 'Error scanning dropped files!', + badExifParser: 'Error loading the piexif.js library. {details}', + badInputType: 'The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.', + exifWarning: 'To avoid this warning, either set "autoOrientImage" to "false" OR ensure you have loaded ' + + 'the "piexif.js" library correctly on your page before the "fileinput.js" script.', + invalidChunkSize: 'Invalid upload chunk size: "{chunkSize}". Resumable uploads are disabled.', + invalidThumb: 'Invalid thumb frame with id: "{id}".', + noResumableSupport: 'The browser does not support resumable or chunk uploads.', + noUploadUrl: 'The "uploadUrl" is not set. Ajax uploads and resumable uploads have been disabled.', + retryStatus: 'Retrying upload for chunk # {chunk} for {filename}... retry # {retry}.', + chunkQueueError: 'Could not push task to ajax pool for chunk index # {index}.', + resumableMaxRetriesReached: 'Maximum resumable ajax retries ({n}) reached.', + resumableRetryError: 'Could not retry the resumable request (try # {n})... aborting.', + resumableAborting: 'Aborting / cancelling the resumable request.' + + }, + objUrl: window.URL || window.webkitURL, + now: function () { + return new Date().getTime(); + }, + round: function (num) { + num = parseFloat(num); + return isNaN(num) ? 0 : Math.floor(Math.round(num)); + }, + getArray: function (obj) { + var i, arr = [], len = obj && obj.length || 0; + for (i = 0; i < len; i++) { + arr.push(obj[i]); + } + return arr; + }, + getFileRelativePath: function (file) { + /** @namespace file.relativePath */ + /** @namespace file.webkitRelativePath */ + return String(file.newPath || file.relativePath || file.webkitRelativePath || $h.getFileName(file) || null); + + }, + getFileId: function (file, generateFileId) { + var relativePath = $h.getFileRelativePath(file); + if (typeof generateFileId === 'function') { + return generateFileId(file); + } + if (!file) { + return null; + } + if (!relativePath) { + return null; + } + return (file.size + '_' + encodeURIComponent(relativePath).replace(/%/g, '_')); + }, + getFrameSelector: function (id, selector) { + selector = selector || ''; + return '[id="' + id + '"]' + selector; + }, + getZoomSelector: function (id, selector) { + return $h.getFrameSelector('zoom-' + id, selector); + }, + getFrameElement: function ($element, id, selector) { + return $element.find($h.getFrameSelector(id, selector)); + }, + getZoomElement: function ($element, id, selector) { + return $element.find($h.getZoomSelector(id, selector)); + }, + getElapsed: function (seconds) { + var delta = seconds, out = '', result = {}, structure = { + year: 31536000, + month: 2592000, + week: 604800, // uncomment row to ignore + day: 86400, // feel free to add your own row + hour: 3600, + minute: 60, + second: 1 + }; + $h.getObjectKeys(structure).forEach(function (key) { + result[key] = Math.floor(delta / structure[key]); + delta -= result[key] * structure[key]; + }); + $.each(result, function (key, value) { + if (value > 0) { + out += (out ? ' ' : '') + value + key.substring(0, 1); + } + }); + return out; + }, + debounce: function (func, delay) { + var inDebounce; + return function () { + var args = arguments, context = this; + clearTimeout(inDebounce); + inDebounce = setTimeout(function () { + func.apply(context, args); + }, delay); + }; + }, + stopEvent: function (e) { + e.stopPropagation(); + e.preventDefault(); + }, + getFileName: function (file) { + /** @namespace file.fileName */ + return file ? (file.fileName || file.name || '') : ''; // some confusion in different versions of Firefox + }, + createObjectURL: function (data) { + if ($h.objUrl && $h.objUrl.createObjectURL && data) { + return $h.objUrl.createObjectURL(data); + } + return ''; + }, + revokeObjectURL: function (data) { + if ($h.objUrl && $h.objUrl.revokeObjectURL && data) { + $h.objUrl.revokeObjectURL(data); + } + }, + compare: function (input, str, exact) { + return input !== undefined && (exact ? input === str : input.match(str)); + }, + isIE: function (ver) { + var div, status; + // check for IE versions < 11 + if (navigator.appName !== 'Microsoft Internet Explorer') { + return false; + } + if (ver === 10) { + return new RegExp('msie\\s' + ver, 'i').test(navigator.userAgent); + } + div = document.createElement('div'); + div.innerHTML = ''; + status = div.getElementsByTagName('i').length; + document.body.appendChild(div); + div.parentNode.removeChild(div); + return status; + }, + canOrientImage: function ($el) { + var $img = $(document.createElement('img')).css({width: '1px', height: '1px'}).insertAfter($el), + flag = $img.css('image-orientation'); + $img.remove(); + return !!flag; + }, + canAssignFilesToInput: function () { + var input = document.createElement('input'); + try { + input.type = 'file'; + input.files = null; + return true; + } catch (err) { + return false; + } + }, + getDragDropFolders: function (items) { + var i, item, len = items ? items.length : 0, folders = 0; + if (len > 0 && items[0].webkitGetAsEntry()) { + for (i = 0; i < len; i++) { + item = items[i].webkitGetAsEntry(); + if (item && item.isDirectory) { + folders++; + } + } + } + return folders; + }, + initModal: function ($modal) { + var $body = $('body'); + if ($body.length) { + $modal.appendTo($body); + } + }, + isFunction: function (v) { + return typeof v === 'function'; + }, + isEmpty: function (value, trim) { + return value === undefined || value === null || (!$h.isFunction( + value) && (value.length === 0 || (trim && $.trim(value) === ''))); + }, + isArray: function (a) { + return Array.isArray(a) || Object.prototype.toString.call(a) === '[object Array]'; + }, + ifSet: function (needle, haystack, def) { + def = def || ''; + return (haystack && typeof haystack === 'object' && needle in haystack) ? haystack[needle] : def; + }, + cleanArray: function (arr) { + if (!(arr instanceof Array)) { + arr = []; + } + return arr.filter(function (e) { + return (e !== undefined && e !== null); + }); + }, + spliceArray: function (arr, index, reverseOrder) { + var i, j = 0, out = [], newArr; + if (!(arr instanceof Array)) { + return []; + } + newArr = $.extend(true, [], arr); + if (reverseOrder) { + newArr.reverse(); + } + for (i = 0; i < newArr.length; i++) { + if (i !== index) { + out[j] = newArr[i]; + j++; + } + } + if (reverseOrder) { + out.reverse(); + } + return out; + }, + getNum: function (num, def) { + def = def || 0; + if (typeof num === 'number') { + return num; + } + if (typeof num === 'string') { + num = parseFloat(num); + } + return isNaN(num) ? def : num; + }, + hasFileAPISupport: function () { + return !!(window.File && window.FileReader); + }, + hasDragDropSupport: function () { + var div = document.createElement('div'); + /** @namespace div.draggable */ + /** @namespace div.ondragstart */ + /** @namespace div.ondrop */ + return !$h.isIE(9) && + (div.draggable !== undefined || (div.ondragstart !== undefined && div.ondrop !== undefined)); + }, + hasFileUploadSupport: function () { + return $h.hasFileAPISupport() && window.FormData; + }, + hasBlobSupport: function () { + try { + return !!window.Blob && Boolean(new Blob()); + } catch (e) { + return false; + } + }, + hasArrayBufferViewSupport: function () { + try { + return new Blob([new Uint8Array(100)]).size === 100; + } catch (e) { + return false; + } + }, + hasResumableUploadSupport: function () { + /** @namespace Blob.prototype.webkitSlice */ + /** @namespace Blob.prototype.mozSlice */ + return $h.hasFileUploadSupport() && $h.hasBlobSupport() && $h.hasArrayBufferViewSupport() && + (!!Blob.prototype.webkitSlice || !!Blob.prototype.mozSlice || !!Blob.prototype.slice || false); + }, + dataURI2Blob: function (dataURI) { + var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || + window.MSBlobBuilder, canBlob = $h.hasBlobSupport(), byteStr, arrayBuffer, intArray, i, mimeStr, bb, + canProceed = (canBlob || BlobBuilder) && window.atob && window.ArrayBuffer && window.Uint8Array; + if (!canProceed) { + return null; + } + if (dataURI.split(',')[0].indexOf('base64') >= 0) { + byteStr = atob(dataURI.split(',')[1]); + } else { + byteStr = decodeURIComponent(dataURI.split(',')[1]); + } + arrayBuffer = new ArrayBuffer(byteStr.length); + intArray = new Uint8Array(arrayBuffer); + for (i = 0; i < byteStr.length; i += 1) { + intArray[i] = byteStr.charCodeAt(i); + } + mimeStr = dataURI.split(',')[0].split(':')[1].split(';')[0]; + if (canBlob) { + return new Blob([$h.hasArrayBufferViewSupport() ? intArray : arrayBuffer], {type: mimeStr}); + } + bb = new BlobBuilder(); + bb.append(arrayBuffer); + return bb.getBlob(mimeStr); + }, + arrayBuffer2String: function (buffer) { + if (window.TextDecoder) { + return new TextDecoder('utf-8').decode(buffer); + } + var array = Array.prototype.slice.apply(new Uint8Array(buffer)), out = '', i = 0, len, c, char2, char3; + len = array.length; + while (i < len) { + c = array[i++]; + switch (c >> 4) { // jshint ignore:line + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + // 0xxxxxxx + out += String.fromCharCode(c); + break; + case 12: + case 13: + // 110x xxxx 10xx xxxx + char2 = array[i++]; + out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F)); // jshint ignore:line + break; + case 14: + // 1110 xxxx 10xx xxxx 10xx xxxx + char2 = array[i++]; + char3 = array[i++]; + out += String.fromCharCode(((c & 0x0F) << 12) | // jshint ignore:line + ((char2 & 0x3F) << 6) | // jshint ignore:line + ((char3 & 0x3F) << 0)); // jshint ignore:line + break; + } + } + return out; + }, + isHtml: function (str) { + var a = document.createElement('div'); + a.innerHTML = str; + for (var c = a.childNodes, i = c.length; i--;) { + if (c[i].nodeType === 1) { + return true; + } + } + return false; + }, + isSvg: function (str) { + return str.match(/^\s*<\?xml/i) && (str.match(/' + str + '')); + }, + uniqId: function () { + return (new Date().getTime() + Math.floor(Math.random() * Math.pow(10, 15))).toString(36); + }, + cspBuffer: { + CSP_ATTRIB: 'data-csp-01928735', // a randomly named temporary attribute to store the CSP elem id + domElementsStyles: {}, + stash: function (htmlString) { + var self = this, outerDom = $.parseHTML('
' + htmlString + '
'), $el = $(outerDom); + $el.find('[style]').each(function (key, elem) { + var $elem = $(elem), styleString = $elem.attr('style'), id = $h.uniqId(), styles = {}; + if (styleString && styleString.length) { + if (styleString.indexOf(';') === -1) { + styleString += ';'; + } + styleString.slice(0, styleString.length - 1).split(';').map(function (str) { + str = str.split(':'); + if (str[0]) { + styles[str[0]] = str[1] ? str[1] : ''; + } + }); + self.domElementsStyles[id] = styles; + $elem.removeAttr('style').attr(self.CSP_ATTRIB, id); + } + }); + $el.filter('*').removeAttr('style'); // make sure all style attr are removed + var values = Object.values ? Object.values(outerDom) : Object.keys(outerDom).map(function (itm) { + return outerDom[itm]; + }); + return values.flatMap(function (elem) { + return elem.innerHTML; + }).join(''); + }, + apply: function (domElement) { + var self = this, $el = $(domElement); + $el.find('[' + self.CSP_ATTRIB + ']').each(function (key, elem) { + var $elem = $(elem), id = $elem.attr(self.CSP_ATTRIB), styles = self.domElementsStyles[id]; + if (styles) { + $elem.css(styles); + } + $elem.removeAttr(self.CSP_ATTRIB); + }); + self.domElementsStyles = {}; + } + }, + setHtml: function ($elem, htmlString) { + var buf = $h.cspBuffer; + $elem.html(buf.stash(htmlString)); + buf.apply($elem); + return $elem; + }, + htmlEncode: function (str, undefVal) { + if (str === undefined) { + return undefVal || null; + } + return str.replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }, + replaceTags: function (str, tags) { + var out = str; + if (!tags) { + return out; + } + $.each(tags, function (key, value) { + if (typeof value === 'function') { + value = value(); + } + out = out.split(key).join(value); + }); + return out; + }, + cleanMemory: function ($thumb) { + var data = $thumb.is('img') ? $thumb.attr('src') : $thumb.find('source').attr('src'); + $h.revokeObjectURL(data); + }, + findFileName: function (filePath) { + var sepIndex = filePath.lastIndexOf('/'); + if (sepIndex === -1) { + sepIndex = filePath.lastIndexOf('\\'); + } + return filePath.split(filePath.substring(sepIndex, sepIndex + 1)).pop(); + }, + checkFullScreen: function () { + return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || + document.msFullscreenElement; + }, + toggleFullScreen: function (maximize) { + var doc = document, de = doc.documentElement, isFullScreen = $h.checkFullScreen(); + if (de && maximize && !isFullScreen) { + if (de.requestFullscreen) { + de.requestFullscreen(); + } else { + if (de.msRequestFullscreen) { + de.msRequestFullscreen(); + } else { + if (de.mozRequestFullScreen) { + de.mozRequestFullScreen(); + } else { + if (de.webkitRequestFullscreen) { + de.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); + } + } + } + } + } else { + if (isFullScreen) { + if (doc.exitFullscreen) { + doc.exitFullscreen(); + } else { + if (doc.msExitFullscreen) { + doc.msExitFullscreen(); + } else { + if (doc.mozCancelFullScreen) { + doc.mozCancelFullScreen(); + } else { + if (doc.webkitExitFullscreen) { + doc.webkitExitFullscreen(); + } + } + } + } + } + } + }, + moveArray: function (arr, oldIndex, newIndex, reverseOrder) { + var newArr = $.extend(true, [], arr); + if (reverseOrder) { + newArr.reverse(); + } + if (newIndex >= newArr.length) { + var k = newIndex - newArr.length; + while ((k--) + 1) { + newArr.push(undefined); + } + } + newArr.splice(newIndex, 0, newArr.splice(oldIndex, 1)[0]); + if (reverseOrder) { + newArr.reverse(); + } + return newArr; + }, + closeButton: function (css) { + css = css ? 'close ' + css : 'close'; + return ''; + }, + getRotation: function (value) { + switch (value) { + case 2: + return 'rotateY(180deg)'; + case 3: + return 'rotate(180deg)'; + case 4: + return 'rotate(180deg) rotateY(180deg)'; + case 5: + return 'rotate(270deg) rotateY(180deg)'; + case 6: + return 'rotate(90deg)'; + case 7: + return 'rotate(90deg) rotateY(180deg)'; + case 8: + return 'rotate(270deg)'; + default: + return ''; + } + }, + setTransform: function (el, val) { + if (!el) { + return; + } + el.style.transform = val; + el.style.webkitTransform = val; + el.style['-moz-transform'] = val; + el.style['-ms-transform'] = val; + el.style['-o-transform'] = val; + }, + getObjectKeys: function (obj) { + var keys = []; + if (obj) { + $.each(obj, function (key) { + keys.push(key); + }); + } + return keys; + }, + getObjectSize: function (obj) { + return $h.getObjectKeys(obj).length; + }, + /** + * Small dependency injection for the task manager + * https://gist.github.com/fearphage/4341799 + */ + whenAll: function (array) { + var s = [].slice, resolveValues = arguments.length === 1 && $h.isArray(array) ? array : s.call(arguments), + deferred = $.Deferred(), i, failed = 0, value, length = resolveValues.length, + remaining = length, rejectContexts, rejectValues, resolveContexts, updateFunc; + rejectContexts = rejectValues = resolveContexts = Array(length); + updateFunc = function (index, contexts, values) { + return function () { + if (values !== resolveValues) { + failed++; + } + deferred.notifyWith(contexts[index] = this, values[index] = s.call(arguments)); + if (!(--remaining)) { + deferred[(!failed ? 'resolve' : 'reject') + 'With'](contexts, values); + } + }; + }; + for (i = 0; i < length; i++) { + if ((value = resolveValues[i]) && $.isFunction(value.promise)) { + value.promise() + .done(updateFunc(i, resolveContexts, resolveValues)) + .fail(updateFunc(i, rejectContexts, rejectValues)); + } else { + deferred.notifyWith(this, value); + --remaining; + } + } + if (!remaining) { + deferred.resolveWith(resolveContexts, resolveValues); + } + return deferred.promise(); + } + }; + FileInput = function (element, options) { + var self = this; + self.$element = $(element); + self.$parent = self.$element.parent(); + if (!self._validate()) { + return; + } + self.isPreviewable = $h.hasFileAPISupport(); + self.isIE9 = $h.isIE(9); + self.isIE10 = $h.isIE(10); + if (self.isPreviewable || self.isIE9) { + self._init(options); + self._listen(); + } + self.$element.removeClass('file-loading'); + }; + + FileInput.prototype = { + constructor: FileInput, + _cleanup: function () { + var self = this; + self.reader = null; + self.clearFileStack(); + self.fileBatchCompleted = true; + self.isError = false; + self.isDuplicateError = false; + self.isPersistentError = false; + self.cancelling = false; + self.paused = false; + self.lastProgress = 0; + self._initAjax(); + }, + _isAborted: function () { + var self = this; + return self.cancelling || self.paused; + }, + _initAjax: function () { + var self = this, tm = self.taskManager = { + pool: {}, + addPool: function (id) { + return (tm.pool[id] = new tm.TasksPool(id)); + }, + getPool: function (id) { + return tm.pool[id]; + }, + addTask: function (id, logic) { // add standalone task directly from task manager + return new tm.Task(id, logic); + }, + TasksPool: function (id) { + var tp = this; + tp.id = id; + tp.cancelled = false; + tp.cancelledDeferrer = $.Deferred(); + tp.tasks = {}; + tp.addTask = function (id, logic) { + return (tp.tasks[id] = new tm.Task(id, logic)); + }; + tp.size = function () { + return $h.getObjectSize(tp.tasks); + }; + tp.run = function (maxThreads) { + var i = 0, failed = false, task, tasksList = $h.getObjectKeys(tp.tasks).map(function (key) { + return tp.tasks[key]; + }), tasksDone = [], deferred = $.Deferred(), enqueue, callback; + + if (tp.cancelled) { + tp.cancelledDeferrer.resolve(); + return deferred.reject(); + } + // if run all at once + if (!maxThreads) { + var tasksDeferredList = $h.getObjectKeys(tp.tasks).map(function (key) { + return tp.tasks[key].deferred; + }); + // when all are done + $h.whenAll(tasksDeferredList).done(function () { + var argv = $h.getArray(arguments); + if (!tp.cancelled) { + deferred.resolve.apply(null, argv); + tp.cancelledDeferrer.reject(); + } else { + deferred.reject.apply(null, argv); + tp.cancelledDeferrer.resolve(); + } + }).fail(function () { + var argv = $h.getArray(arguments); + deferred.reject.apply(null, argv); + if (!tp.cancelled) { + tp.cancelledDeferrer.reject(); + } else { + tp.cancelledDeferrer.resolve(); + } + }); + // run all tasks + $.each(tp.tasks, function (id) { + task = tp.tasks[id]; + task.run(); + }); + return deferred; + } + enqueue = function (task) { + $.when(task.deferred) + .fail(function () { + failed = true; + callback.apply(null, arguments); + }) + .always(callback); + }; + callback = function () { + var argv = $h.getArray(arguments); + // notify a task just ended + deferred.notify(argv); + tasksDone.push(argv); + if (tp.cancelled) { + deferred.reject.apply(null, tasksDone); + tp.cancelledDeferrer.resolve(); + return; + } + if (tasksDone.length === tp.size()) { + if (failed) { + deferred.reject.apply(null, tasksDone); + } else { + deferred.resolve.apply(null, tasksDone); + } + } + // if there are any tasks remaining + if (tasksList.length) { + task = tasksList.shift(); + enqueue(task); + task.run(); + } + }; + // run the first "maxThreads" tasks + while (tasksList.length && i++ < maxThreads) { + task = tasksList.shift(); + enqueue(task); + task.run(); + } + return deferred; + }; + tp.cancel = function () { + tp.cancelled = true; + return tp.cancelledDeferrer; + }; + }, + Task: function (id, logic) { + var tk = this; + tk.id = id; + tk.deferred = $.Deferred(); + tk.logic = logic; + tk.context = null; + tk.run = function () { + var argv = $h.getArray(arguments); + argv.unshift(tk.deferred); // add deferrer as first argument + logic.apply(tk.context, argv); // run task + return tk.deferred; // return deferrer + }; + tk.runWithContext = function (context) { + tk.context = context; + return tk.run(); + }; + } + }; + self.ajaxQueue = []; + self.ajaxRequests = []; + self.ajaxAborted = false; + }, + _init: function (options, refreshMode) { + var self = this, f, $el = self.$element, $cont, t, tmp; + self.options = options; + self.canOrientImage = $h.canOrientImage($el); + $.each(options, function (key, value) { + switch (key) { + case 'minFileCount': + case 'maxFileCount': + case 'maxTotalFileCount': + case 'minFileSize': + case 'maxFileSize': + case 'maxFilePreviewSize': + case 'resizeImageQuality': + case 'resizeIfSizeMoreThan': + case 'progressUploadThreshold': + case 'initialPreviewCount': + case 'zoomModalHeight': + case 'minImageHeight': + case 'maxImageHeight': + case 'minImageWidth': + case 'maxImageWidth': + self[key] = $h.getNum(value); + break; + default: + self[key] = value; + break; + } + }); + if (self.maxTotalFileCount > 0 && self.maxTotalFileCount < self.maxFileCount) { + self.maxTotalFileCount = self.maxFileCount; + } + if (self.rtl) { // swap buttons for rtl + tmp = self.previewZoomButtonIcons.prev; + self.previewZoomButtonIcons.prev = self.previewZoomButtonIcons.next; + self.previewZoomButtonIcons.next = tmp; + } + // validate chunk threads to not exceed maxAjaxThreads + if (!isNaN(self.maxAjaxThreads) && self.maxAjaxThreads < self.resumableUploadOptions.maxThreads) { + self.resumableUploadOptions.maxThreads = self.maxAjaxThreads; + } + self._initFileManager(); + if (typeof self.autoOrientImage === 'function') { + self.autoOrientImage = self.autoOrientImage(); + } + if (typeof self.autoOrientImageInitial === 'function') { + self.autoOrientImageInitial = self.autoOrientImageInitial(); + } + if (!refreshMode) { + self._cleanup(); + } + self.duplicateErrors = []; + self.$form = $el.closest('form'); + self._initTemplateDefaults(); + self.uploadFileAttr = !$h.isEmpty($el.attr('name')) ? $el.attr('name') : 'file_data'; + t = self._getLayoutTemplate('progress'); + self.progressTemplate = t.replace('{class}', self.progressClass); + self.progressInfoTemplate = t.replace('{class}', self.progressInfoClass); + self.progressPauseTemplate = t.replace('{class}', self.progressPauseClass); + self.progressCompleteTemplate = t.replace('{class}', self.progressCompleteClass); + self.progressErrorTemplate = t.replace('{class}', self.progressErrorClass); + self.isDisabled = $el.attr('disabled') || $el.attr('readonly'); + if (self.isDisabled) { + $el.attr('disabled', true); + } + self.isClickable = self.browseOnZoneClick && self.showPreview && + (self.dropZoneEnabled || !$h.isEmpty(self.defaultPreviewContent)); + self.isAjaxUpload = $h.hasFileUploadSupport() && !$h.isEmpty(self.uploadUrl); + self.dropZoneEnabled = $h.hasDragDropSupport() && self.dropZoneEnabled; + if (!self.isAjaxUpload) { + self.dropZoneEnabled = self.dropZoneEnabled && $h.canAssignFilesToInput(); + } + self.slug = typeof options.slugCallback === 'function' ? options.slugCallback : self._slugDefault; + self.mainTemplate = self.showCaption ? self._getLayoutTemplate('main1') : self._getLayoutTemplate('main2'); + self.captionTemplate = self._getLayoutTemplate('caption'); + self.previewGenericTemplate = self._getPreviewTemplate('generic'); + if (!self.imageCanvas && self.resizeImage && (self.maxImageWidth || self.maxImageHeight)) { + self.imageCanvas = document.createElement('canvas'); + self.imageCanvasContext = self.imageCanvas.getContext('2d'); + } + if ($h.isEmpty($el.attr('id'))) { + $el.attr('id', $h.uniqId()); + } + self.namespace = '.fileinput_' + $el.attr('id').replace(/-/g, '_'); + if (self.$container === undefined) { + self.$container = self._createContainer(); + } else { + self._refreshContainer(); + } + $cont = self.$container; + self.$dropZone = $cont.find('.file-drop-zone'); + self.$progress = $cont.find('.kv-upload-progress'); + self.$btnUpload = $cont.find('.fileinput-upload'); + self.$captionContainer = $h.getElement(options, 'elCaptionContainer', $cont.find('.file-caption')); + self.$caption = $h.getElement(options, 'elCaptionText', $cont.find('.file-caption-name')); + if (!$h.isEmpty(self.msgPlaceholder)) { + f = $el.attr('multiple') ? self.filePlural : self.fileSingle; + self.$caption.attr('placeholder', self.msgPlaceholder.replace('{files}', f)); + } + self.$captionIcon = self.$captionContainer.find('.file-caption-icon'); + self.$previewContainer = $h.getElement(options, 'elPreviewContainer', $cont.find('.file-preview')); + self.$preview = $h.getElement(options, 'elPreviewImage', $cont.find('.file-preview-thumbnails')); + self.$previewStatus = $h.getElement(options, 'elPreviewStatus', $cont.find('.file-preview-status')); + self.$errorContainer = $h.getElement(options, 'elErrorContainer', + self.$previewContainer.find('.kv-fileinput-error')); + self._validateDisabled(); + if (!$h.isEmpty(self.msgErrorClass)) { + $h.addCss(self.$errorContainer, self.msgErrorClass); + } + if (!refreshMode) { + self._resetErrors(); + self.$errorContainer.hide(); + self.previewInitId = 'thumb-' + $el.attr('id'); + self._initPreviewCache(); + self._initPreview(true); + self._initPreviewActions(); + if (self.$parent.hasClass('file-loading')) { + self.$container.insertBefore(self.$parent); + self.$parent.remove(); + } + } else { + if (!self._errorsExist()) { + self.$errorContainer.hide(); + } + } + self._setFileDropZoneTitle(); + if ($el.attr('disabled')) { + self.disable(); + } + self._initZoom(); + if (self.hideThumbnailContent) { + $h.addCss(self.$preview, 'hide-content'); + } + }, + _initFileManager: function () { + var self = this; + self.uploadStartTime = $h.now(); + self.fileManager = { + stack: {}, + filesProcessed: [], + errors: [], + loadedImages: {}, + totalImages: 0, + totalFiles: null, + totalSize: null, + uploadedSize: 0, + stats: {}, + initStats: function (id) { + var data = {started: $h.now()}; + if (id) { + self.fileManager.stats[id] = data; + } else { + self.fileManager.stats = data; + } + }, + getUploadStats: function (id, loaded, total) { + var fm = self.fileManager, + started = id ? fm.stats[id] && fm.stats[id].started || $h.now() : self.uploadStartTime; + var elapsed = ($h.now() - started) / 1000, + speeds = ['B/s', 'KB/s', 'MB/s', 'GB/s', 'TB/s', 'PB/s', 'EB/s', 'ZB/s', 'YB/s'], + bps = elapsed ? loaded / elapsed : 0, bitrate = self._getSize(bps, speeds), + pendingBytes = total - loaded, + out = { + fileId: id, + started: started, + elapsed: elapsed, + loaded: loaded, + total: total, + bps: bps, + bitrate: bitrate, + pendingBytes: pendingBytes + }; + if (id) { + fm.stats[id] = out; + } else { + fm.stats = out; + } + return out; + }, + exists: function (id) { + return $.inArray(id, self.fileManager.getIdList()) !== -1; + }, + count: function () { + return self.fileManager.getIdList().length; + }, + total: function () { + var fm = self.fileManager; + if (!fm.totalFiles) { + fm.totalFiles = fm.count(); + } + return fm.totalFiles; + }, + getTotalSize: function () { + var fm = self.fileManager; + if (fm.totalSize) { + return fm.totalSize; + } + fm.totalSize = 0; + $.each(self.fileManager.stack, function (id, f) { + var size = parseFloat(f.size); + fm.totalSize += isNaN(size) ? 0 : size; + }); + return fm.totalSize; + }, + add: function (file, id) { + if (!id) { + id = self.fileManager.getId(file); + } + if (!id) { + return; + } + self.fileManager.stack[id] = { + file: file, + name: $h.getFileName(file), + relativePath: $h.getFileRelativePath(file), + size: file.size, + nameFmt: self._getFileName(file, ''), + sizeFmt: self._getSize(file.size) + }; + }, + remove: function ($thumb) { + var id = $thumb.attr('data-fileid'); + if (id) { + self.fileManager.removeFile(id); + } + }, + removeFile: function (id) { + delete self.fileManager.stack[id]; + delete self.fileManager.loadedImages[id]; + }, + move: function (idFrom, idTo) { + var result = {}, stack = self.fileManager.stack; + if (!idFrom && !idTo || idFrom === idTo) { + return; + } + $.each(stack, function (k, v) { + if (k !== idFrom) { + result[k] = v; + } + if (k === idTo) { + result[idFrom] = stack[idFrom]; + } + }); + self.fileManager.stack = result; + }, + list: function () { + var files = []; + $.each(self.fileManager.stack, function (k, v) { + if (v && v.file) { + files.push(v.file); + } + }); + return files; + }, + isPending: function (id) { + return $.inArray(id, self.fileManager.filesProcessed) === -1 && self.fileManager.exists(id); + }, + isProcessed: function () { + var filesProcessed = true, fm = self.fileManager; + $.each(fm.stack, function (id) { + if (fm.isPending(id)) { + filesProcessed = false; + } + }); + return filesProcessed; + }, + clear: function () { + var fm = self.fileManager; + self.isDuplicateError = false; + self.isPersistentError = false; + fm.totalFiles = null; + fm.totalSize = null; + fm.uploadedSize = 0; + fm.stack = {}; + fm.errors = []; + fm.filesProcessed = []; + fm.stats = {}; + fm.clearImages(); + }, + clearImages: function () { + self.fileManager.loadedImages = {}; + self.fileManager.totalImages = 0; + }, + addImage: function (id, config) { + self.fileManager.loadedImages[id] = config; + }, + removeImage: function (id) { + delete self.fileManager.loadedImages[id]; + }, + getImageIdList: function () { + return $h.getObjectKeys(self.fileManager.loadedImages); + }, + getImageCount: function () { + return self.fileManager.getImageIdList().length; + }, + getId: function (file) { + return self._getFileId(file); + }, + getIndex: function (id) { + return self.fileManager.getIdList().indexOf(id); + }, + getThumb: function (id) { + var $thumb = null; + self._getThumbs().each(function () { + var $t = $(this); + if ($t.attr('data-fileid') === id) { + $thumb = $t; + } + }); + return $thumb; + }, + getThumbIndex: function ($thumb) { + var id = $thumb.attr('data-fileid'); + return self.fileManager.getIndex(id); + }, + getIdList: function () { + return $h.getObjectKeys(self.fileManager.stack); + }, + getFile: function (id) { + return self.fileManager.stack[id] || null; + }, + getFileName: function (id, fmt) { + var file = self.fileManager.getFile(id); + if (!file) { + return ''; + } + return fmt ? (file.nameFmt || '') : file.name || ''; + }, + getFirstFile: function () { + var ids = self.fileManager.getIdList(), id = ids && ids.length ? ids[0] : null; + return self.fileManager.getFile(id); + }, + setFile: function (id, file) { + if (self.fileManager.getFile(id)) { + self.fileManager.stack[id].file = file; + } else { + self.fileManager.add(file, id); + } + }, + setProcessed: function (id) { + self.fileManager.filesProcessed.push(id); + }, + getProgress: function () { + var total = self.fileManager.total(), filesProcessed = self.fileManager.filesProcessed.length; + if (!total) { + return 0; + } + return Math.ceil(filesProcessed / total * 100); + + }, + setProgress: function (id, pct) { + var f = self.fileManager.getFile(id); + if (!isNaN(pct) && f) { + f.progress = pct; + } + } + }; + }, + _setUploadData: function (fd, config) { + var self = this; + $.each(config, function (key, value) { + var param = self.uploadParamNames[key] || key; + if ($h.isArray(value)) { + fd.append(param, value[0], value[1]); + } else { + fd.append(param, value); + } + }); + }, + _initResumableUpload: function () { + var self = this, opts = self.resumableUploadOptions, logs = $h.logMessages, rm, fm = self.fileManager; + if (!self.enableResumableUpload) { + return; + } + if (opts.fallback !== false && typeof opts.fallback !== 'function') { + opts.fallback = function (s) { + s._log(logs.noResumableSupport); + s.enableResumableUpload = false; + }; + } + if (!$h.hasResumableUploadSupport() && opts.fallback !== false) { + opts.fallback(self); + return; + } + if (!self.uploadUrl && self.enableResumableUpload) { + self._log(logs.noUploadUrl); + self.enableResumableUpload = false; + return; + + } + opts.chunkSize = parseFloat(opts.chunkSize); + if (opts.chunkSize <= 0 || isNaN(opts.chunkSize)) { + self._log(logs.invalidChunkSize, {chunkSize: opts.chunkSize}); + self.enableResumableUpload = false; + return; + } + rm = self.resumableManager = { + init: function (id, f, index) { + rm.logs = []; + rm.stack = []; + rm.error = ''; + rm.id = id; + rm.file = f.file; + rm.fileName = f.name; + rm.fileIndex = index; + rm.completed = false; + rm.lastProgress = 0; + if (self.showPreview) { + rm.$thumb = fm.getThumb(id) || null; + rm.$progress = rm.$btnDelete = null; + if (rm.$thumb && rm.$thumb.length) { + rm.$progress = rm.$thumb.find('.file-thumb-progress'); + rm.$btnDelete = rm.$thumb.find('.kv-file-remove'); + } + } + rm.chunkSize = opts.chunkSize * 1024; + rm.chunkCount = rm.getTotalChunks(); + }, + setAjaxError: function (jqXHR, textStatus, errorThrown, isTest) { + if (jqXHR.responseJSON && jqXHR.responseJSON.error) { + errorThrown = jqXHR.responseJSON.error.toString(); + } + if (!isTest) { + rm.error = errorThrown; + } + if (opts.showErrorLog) { + self._log(logs.ajaxError, { + status: jqXHR.status, + error: errorThrown, + text: jqXHR.responseText || '' + }); + } + }, + reset: function () { + rm.stack = []; + rm.chunksProcessed = {}; + }, + setProcessed: function (status) { + var id = rm.id, msg, $thumb = rm.$thumb, $prog = rm.$progress, hasThumb = $thumb && $thumb.length, + params = {id: hasThumb ? $thumb.attr('id') : '', index: fm.getIndex(id), fileId: id}; + rm.completed = true; + rm.lastProgress = 0; + if (hasThumb) { + $thumb.removeClass('file-uploading'); + } + if (status === 'success') { + fm.uploadedSize += rm.file.size; + if (self.showPreview) { + self._setProgress(101, $prog); + self._setThumbStatus($thumb, 'Success'); + self._initUploadSuccess(rm.chunksProcessed[id].data, $thumb); + } + fm.removeFile(id); + delete rm.chunksProcessed[id]; + self._raise('fileuploaded', [params.id, params.index, params.fileId]); + if (fm.isProcessed()) { + self._setProgress(101); + } + } else { + if (status !== 'cancel') { + if (self.showPreview) { + self._setThumbStatus($thumb, 'Error'); + self._setPreviewError($thumb, true); + self._setProgress(101, $prog, self.msgProgressError); + self._setProgress(101, self.$progress, self.msgProgressError); + self.cancelling = true; + } + if (!self.$errorContainer.find('li[data-file-id="' + params.fileId + '"]').length) { + msg = self.msgResumableUploadRetriesExceeded.setTokens({ + file: rm.fileName, + max: opts.maxRetries, + error: rm.error + }); + self._showFileError(msg, params); + } + } + } + if (fm.isProcessed()) { + rm.reset(); + } + }, + check: function () { + var status = true; + $.each(rm.logs, function (index, value) { + if (!value) { + status = false; + return false; + } + }); + }, + processedResumables: function () { + var logs = rm.logs, i, count = 0; + if (!logs || !logs.length) { + return 0; + } + for (i = 0; i < logs.length; i++) { + if (logs[i] === true) { + count++; + } + } + return count; + }, + getUploadedSize: function () { + var size = rm.processedResumables() * rm.chunkSize; + return size > rm.file.size ? rm.file.size : size; + }, + getTotalChunks: function () { + var chunkSize = parseFloat(rm.chunkSize); + if (!isNaN(chunkSize) && chunkSize > 0) { + return Math.ceil(rm.file.size / chunkSize); + } + return 0; + }, + getProgress: function () { + var chunksProcessed = rm.processedResumables(), total = rm.chunkCount; + if (total === 0) { + return 0; + } + return Math.ceil(chunksProcessed / total * 100); + }, + checkAborted: function (intervalId) { + if (self._isAborted()) { + clearInterval(intervalId); + self.unlock(); + } + }, + upload: function () { + var ids = fm.getIdList(), flag = 'new', intervalId; + intervalId = setInterval(function () { + var id; + rm.checkAborted(intervalId); + if (flag === 'new') { + self.lock(); + flag = 'processing'; + id = ids.shift(); + fm.initStats(id); + if (fm.stack[id]) { + rm.init(id, fm.stack[id], fm.getIndex(id)); + rm.processUpload(); + } + } + if (!fm.isPending(id) && rm.completed) { + flag = 'new'; + } + if (fm.isProcessed()) { + var $initThumbs = self.$preview.find('.file-preview-initial'); + if ($initThumbs.length) { + $h.addCss($initThumbs, $h.SORT_CSS); + self._initSortable(); + } + clearInterval(intervalId); + self._clearFileInput(); + self.unlock(); + setTimeout(function () { + var data = self.previewCache.data; + if (data) { + self.initialPreview = data.content; + self.initialPreviewConfig = data.config; + self.initialPreviewThumbTags = data.tags; + } + self._raise('filebatchuploadcomplete', [ + self.initialPreview, + self.initialPreviewConfig, + self.initialPreviewThumbTags, + self._getExtraData() + ]); + }, self.processDelay); + } + }, self.processDelay); + }, + uploadResumable: function () { + var i, pool, tm = self.taskManager, total = rm.chunkCount; + pool = tm.addPool(rm.id); + for (i = 0; i < total; i++) { + rm.logs[i] = !!(rm.chunksProcessed[rm.id] && rm.chunksProcessed[rm.id][i]); + if (!rm.logs[i]) { + rm.pushAjax(i, 0); + } + } + pool.run(opts.maxThreads) + .done(function () { + rm.setProcessed('success'); + }) + .fail(function () { + rm.setProcessed(pool.cancelled ? 'cancel' : 'error'); + }); + }, + processUpload: function () { + var fd, f, id = rm.id, fnBefore, fnSuccess, fnError, fnComplete, outData; + if (!opts.testUrl) { + rm.uploadResumable(); + return; + } + fd = new FormData(); + f = fm.stack[id]; + self._setUploadData(fd, { + fileId: id, + fileName: f.fileName, + fileSize: f.size, + fileRelativePath: f.relativePath, + chunkSize: rm.chunkSize, + chunkCount: rm.chunkCount + }); + fnBefore = function (jqXHR) { + outData = self._getOutData(fd, jqXHR); + self._raise('filetestbeforesend', [id, fm, rm, outData]); + }; + fnSuccess = function (data, textStatus, jqXHR) { + outData = self._getOutData(fd, jqXHR, data); + var pNames = self.uploadParamNames, chunksUploaded = pNames.chunksUploaded || 'chunksUploaded', + params = [id, fm, rm, outData]; + if (!data[chunksUploaded] || !$h.isArray(data[chunksUploaded])) { + self._raise('filetesterror', params); + } else { + if (!rm.chunksProcessed[id]) { + rm.chunksProcessed[id] = {}; + } + $.each(data[chunksUploaded], function (key, index) { + rm.logs[index] = true; + rm.chunksProcessed[id][index] = true; + }); + rm.chunksProcessed[id].data = data; + self._raise('filetestsuccess', params); + } + rm.uploadResumable(); + }; + fnError = function (jqXHR, textStatus, errorThrown) { + outData = self._getOutData(fd, jqXHR); + self._raise('filetestajaxerror', [id, fm, rm, outData]); + rm.setAjaxError(jqXHR, textStatus, errorThrown, true); + rm.uploadResumable(); + }; + fnComplete = function () { + self._raise('filetestcomplete', [id, fm, rm, self._getOutData(fd)]); + }; + self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, fd, id, rm.fileIndex, opts.testUrl); + }, + pushAjax: function (index, retry) { + var tm = self.taskManager, pool = tm.getPool(rm.id); + pool.addTask(pool.size() + 1, function (deferrer) { + // use fifo chunk stack + var arr = rm.stack.shift(), index; + index = arr[0]; + if (!rm.chunksProcessed[rm.id] || !rm.chunksProcessed[rm.id][index]) { + rm.sendAjax(index, arr[1], deferrer); + } else { + self._log(logs.chunkQueueError, {index: index}); + } + }); + rm.stack.push([index, retry]); + }, + sendAjax: function (index, retry, deferrer) { + var f, chunkSize = rm.chunkSize, id = rm.id, file = rm.file, $thumb = rm.$thumb, + msgs = $h.logMessages, $btnDelete = rm.$btnDelete, logError = function (msg, tokens) { + if (tokens) { + msg = msg.setTokens(tokens); + } + msg = 'Error processing resumable ajax request. ' + msg; + self._log(msg); + deferrer.reject(msg); + }; + if (rm.chunksProcessed[id] && rm.chunksProcessed[id][index]) { + return; + } + if (retry > opts.maxRetries) { + logError(msgs.resumableMaxRetriesReached, {n: opts.maxRetries}); + rm.setProcessed('error'); + return; + } + var fd, outData, fnBefore, fnSuccess, fnError, fnComplete, slice = file.slice ? 'slice' : + (file.mozSlice ? 'mozSlice' : (file.webkitSlice ? 'webkitSlice' : 'slice')), + blob = file[slice](chunkSize * index, chunkSize * (index + 1)); + fd = new FormData(); + f = fm.stack[id]; + self._setUploadData(fd, { + chunkCount: rm.chunkCount, + chunkIndex: index, + chunkSize: chunkSize, + chunkSizeStart: chunkSize * index, + fileBlob: [blob, rm.fileName], + fileId: id, + fileName: rm.fileName, + fileRelativePath: f.relativePath, + fileSize: file.size, + retryCount: retry + }); + if (rm.$progress && rm.$progress.length) { + rm.$progress.show(); + } + fnBefore = function (jqXHR) { + outData = self._getOutData(fd, jqXHR); + if (self.showPreview) { + if (!$thumb.hasClass('file-preview-success')) { + self._setThumbStatus($thumb, 'Loading'); + $h.addCss($thumb, 'file-uploading'); + } + $btnDelete.attr('disabled', true); + } + self._raise('filechunkbeforesend', [id, index, retry, fm, rm, outData]); + }; + fnSuccess = function (data, textStatus, jqXHR) { + if (self._isAborted()) { + logError(msgs.resumableAborting); + return; + } + outData = self._getOutData(fd, jqXHR, data); + var paramNames = self.uploadParamNames, chunkIndex = paramNames.chunkIndex || 'chunkIndex', + params = [id, index, retry, fm, rm, outData]; + if (data.error) { + if (opts.showErrorLog) { + self._log(logs.retryStatus, { + retry: retry + 1, + filename: rm.fileName, + chunk: index + }); + } + rm.pushAjax(index, retry + 1); + rm.error = data.error; + self._raise('filechunkerror', params); + } else { + rm.logs[data[chunkIndex]] = true; + if (!rm.chunksProcessed[id]) { + rm.chunksProcessed[id] = {}; + } + rm.chunksProcessed[id][data[chunkIndex]] = true; + rm.chunksProcessed[id].data = data; + deferrer.resolve.call(null, data); + self._raise('filechunksuccess', params); + rm.check(); + } + }; + fnError = function (jqXHR, textStatus, errorThrown) { + if (self._isAborted()) { + logError(msgs.resumableAborting); + return; + } + outData = self._getOutData(fd, jqXHR); + rm.setAjaxError(jqXHR, textStatus, errorThrown); + self._raise('filechunkajaxerror', [id, index, retry, fm, rm, outData]); + rm.pushAjax(index, retry + 1); // push another task + logError(msgs.resumableRetryError, {n: retry - 1}); // resolve the current task + }; + fnComplete = function () { + if (!self._isAborted()) { + self._raise('filechunkcomplete', [id, index, retry, fm, rm, self._getOutData(fd)]); + } + }; + self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, fd, id, rm.fileIndex); + } + }; + rm.reset(); + }, + _initTemplateDefaults: function () { + var self = this, tMain1, tMain2, tPreview, tFileIcon, tClose, tCaption, tBtnDefault, tBtnLink, tBtnBrowse, + tModalMain, tModal, tProgress, tSize, tFooter, tActions, tActionDelete, tActionUpload, tActionDownload, + tActionZoom, tActionDrag, tIndicator, tTagBef, tTagBef1, tTagBef2, tTagAft, tGeneric, tHtml, tImage, + tText, tOffice, tGdocs, tVideo, tAudio, tFlash, tObject, tPdf, tOther, tStyle, tZoomCache, vDefaultDim, + tStats, tModalLabel, renderObject = function (type, mime) { + return '\n' + $h.DEFAULT_PREVIEW + '\n\n'; + }; + tMain1 = '{preview}\n' + + '
\n' + + '
\n' + + ' {caption}\n' + + '
\n' + + ' {remove}\n' + + ' {cancel}\n' + + ' {pause}\n' + + ' {upload}\n' + + ' {browse}\n' + + '
\n' + + '
'; + tMain2 = '{preview}\n
\n
\n' + + '{remove}\n{cancel}\n{upload}\n{browse}\n'; + tPreview = '
\n' + + ' {close}' + + '
\n' + + '
\n' + + '
\n' + + '
\n' + + '
\n' + + '
\n' + + '
'; + tClose = $h.closeButton('fileinput-remove'); + tFileIcon = ''; + // noinspection HtmlUnknownAttribute + tCaption = '
\n' + + ' \n' + + ' \n' + + '
'; + //noinspection HtmlUnknownAttribute + tBtnDefault = ''; + //noinspection HtmlUnknownTarget,HtmlUnknownAttribute + tBtnLink = '{icon} {label}'; + //noinspection HtmlUnknownAttribute + tBtnBrowse = '
{icon} {label}
'; + tModalLabel = $h.MODAL_ID + 'Label'; + tModalMain = ''; + tModal = '\n'; + tProgress = '
\n' + + '
\n' + + ' {status}\n' + + '
\n' + + '
{stats}'; + tStats = '
' + + '{pendingTime} ' + + '{uploadSpeed}' + + '
'; + tSize = ' ({sizeText})'; + tFooter = ''; + tActions = '
\n' + + ' \n' + + '
\n' + + '{drag}\n' + + '
'; + //noinspection HtmlUnknownAttribute + tActionDelete = '\n'; + tActionUpload = ''; + tActionDownload = '{downloadIcon}'; + tActionZoom = ''; + tActionDrag = '{dragIcon}'; + tIndicator = '
{indicator}
'; + tTagBef = '
\n'; + tTagBef2 = tTagBef + ' title="{caption}">
\n'; + tTagAft = '
{footer}\n{zoomCache}
\n'; + tGeneric = '{content}\n'; + tStyle = ' {style}'; + tHtml = renderObject('html', 'text/html'); + tText = renderObject('text', 'text/plain;charset=UTF-8'); + tPdf = renderObject('pdf', 'application/pdf'); + tImage = '{alt}\n'; + tOffice = ''; + tGdocs = ''; + tVideo = '\n'; + tAudio = '\n'; + tFlash = '\n'; + tObject = '\n' + '\n' + + $h.OBJECT_PARAMS + ' ' + $h.DEFAULT_PREVIEW + '\n\n'; + tOther = '
\n' + $h.DEFAULT_PREVIEW + '\n
\n'; + tZoomCache = '
{zoomContent}
'; + vDefaultDim = {width: '100%', height: '100%', 'min-height': '480px'}; + if (self._isPdfRendered()) { + tPdf = self.pdfRendererTemplate.replace('{renderer}', self._encodeURI(self.pdfRendererUrl)); + } + self.defaults = { + layoutTemplates: { + main1: tMain1, + main2: tMain2, + preview: tPreview, + close: tClose, + fileIcon: tFileIcon, + caption: tCaption, + modalMain: tModalMain, + modal: tModal, + progress: tProgress, + stats: tStats, + size: tSize, + footer: tFooter, + indicator: tIndicator, + actions: tActions, + actionDelete: tActionDelete, + actionUpload: tActionUpload, + actionDownload: tActionDownload, + actionZoom: tActionZoom, + actionDrag: tActionDrag, + btnDefault: tBtnDefault, + btnLink: tBtnLink, + btnBrowse: tBtnBrowse, + zoomCache: tZoomCache + }, + previewMarkupTags: { + tagBefore1: tTagBef1, + tagBefore2: tTagBef2, + tagAfter: tTagAft + }, + previewContentTemplates: { + generic: tGeneric, + html: tHtml, + image: tImage, + text: tText, + office: tOffice, + gdocs: tGdocs, + video: tVideo, + audio: tAudio, + flash: tFlash, + object: tObject, + pdf: tPdf, + other: tOther + }, + allowedPreviewTypes: ['image', 'html', 'text', 'video', 'audio', 'flash', 'pdf', 'object'], + previewTemplates: {}, + previewSettings: { + image: {width: 'auto', height: 'auto', 'max-width': '100%', 'max-height': '100%'}, + html: {width: '213px', height: '160px'}, + text: {width: '213px', height: '160px'}, + office: {width: '213px', height: '160px'}, + gdocs: {width: '213px', height: '160px'}, + video: {width: '213px', height: '160px'}, + audio: {width: '100%', height: '30px'}, + flash: {width: '213px', height: '160px'}, + object: {width: '213px', height: '160px'}, + pdf: {width: '100%', height: '160px', 'position': 'relative'}, + other: {width: '213px', height: '160px'} + }, + previewSettingsSmall: { + image: {width: 'auto', height: 'auto', 'max-width': '100%', 'max-height': '100%'}, + html: {width: '100%', height: '160px'}, + text: {width: '100%', height: '160px'}, + office: {width: '100%', height: '160px'}, + gdocs: {width: '100%', height: '160px'}, + video: {width: '100%', height: 'auto'}, + audio: {width: '100%', height: '30px'}, + flash: {width: '100%', height: 'auto'}, + object: {width: '100%', height: 'auto'}, + pdf: {width: '100%', height: '160px'}, + other: {width: '100%', height: '160px'} + }, + previewZoomSettings: { + image: {width: 'auto', height: 'auto', 'max-width': '100%', 'max-height': '100%'}, + html: vDefaultDim, + text: vDefaultDim, + office: {width: '100%', height: '100%', 'max-width': '100%', 'min-height': '480px'}, + gdocs: {width: '100%', height: '100%', 'max-width': '100%', 'min-height': '480px'}, + video: {width: 'auto', height: '100%', 'max-width': '100%'}, + audio: {width: '100%', height: '30px'}, + flash: {width: 'auto', height: '480px'}, + object: {width: 'auto', height: '100%', 'max-width': '100%', 'min-height': '480px'}, + pdf: vDefaultDim, + other: {width: 'auto', height: '100%', 'min-height': '480px'} + }, + mimeTypeAliases: { + 'video/quicktime': 'video/mp4' + }, + fileTypeSettings: { + image: function (vType, vName) { + return ($h.compare(vType, 'image.*') && !$h.compare(vType, /(tiff?|wmf)$/i) || + $h.compare(vName, /\.(gif|png|jpe?g)$/i)); + }, + html: function (vType, vName) { + return $h.compare(vType, 'text/html') || $h.compare(vName, /\.(htm|html)$/i); + }, + office: function (vType, vName) { + return $h.compare(vType, /(word|excel|powerpoint|office)$/i) || + $h.compare(vName, /\.(docx?|xlsx?|pptx?|pps|potx?)$/i); + }, + gdocs: function (vType, vName) { + return $h.compare(vType, /(word|excel|powerpoint|office|iwork-pages|tiff?)$/i) || + $h.compare(vName, + /\.(docx?|xlsx?|pptx?|pps|potx?|rtf|ods|odt|pages|ai|dxf|ttf|tiff?|wmf|e?ps)$/i); + }, + text: function (vType, vName) { + return $h.compare(vType, 'text.*') || $h.compare(vName, /\.(xml|javascript)$/i) || + $h.compare(vName, /\.(txt|md|nfo|ini|json|php|js|css)$/i); + }, + video: function (vType, vName) { + return $h.compare(vType, 'video.*') && ($h.compare(vType, /(ogg|mp4|mp?g|mov|webm|3gp)$/i) || + $h.compare(vName, /\.(og?|mp4|webm|mp?g|mov|3gp)$/i)); + }, + audio: function (vType, vName) { + return $h.compare(vType, 'audio.*') && ($h.compare(vName, /(ogg|mp3|mp?g|wav)$/i) || + $h.compare(vName, /\.(og?|mp3|mp?g|wav)$/i)); + }, + flash: function (vType, vName) { + return $h.compare(vType, 'application/x-shockwave-flash', true) || $h.compare(vName, + /\.(swf)$/i); + }, + pdf: function (vType, vName) { + return $h.compare(vType, 'application/pdf', true) || $h.compare(vName, /\.(pdf)$/i); + }, + object: function () { + return true; + }, + other: function () { + return true; + } + }, + fileActionSettings: { + showRemove: true, + showUpload: true, + showDownload: true, + showZoom: true, + showDrag: true, + removeIcon: '', + removeClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary', + removeErrorClass: 'btn btn-sm btn-kv btn-danger', + removeTitle: 'Remove file', + uploadIcon: '', + uploadClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary', + uploadTitle: 'Upload file', + uploadRetryIcon: '', + uploadRetryTitle: 'Retry upload', + downloadIcon: '', + downloadClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary', + downloadTitle: 'Download file', + zoomIcon: '', + zoomClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary', + zoomTitle: 'View Details', + dragIcon: '', + dragClass: 'text-info', + dragTitle: 'Move / Rearrange', + dragSettings: {}, + indicatorNew: '', + indicatorSuccess: '', + indicatorError: '', + indicatorLoading: '', + indicatorPaused: '', + indicatorNewTitle: 'Not uploaded yet', + indicatorSuccessTitle: 'Uploaded', + indicatorErrorTitle: 'Upload Error', + indicatorLoadingTitle: 'Uploading …', + indicatorPausedTitle: 'Upload Paused' + } + }; + $.each(self.defaults, function (key, setting) { + if (key === 'allowedPreviewTypes') { + if (self.allowedPreviewTypes === undefined) { + self.allowedPreviewTypes = setting; + } + return; + } + self[key] = $.extend(true, {}, setting, self[key]); + }); + self._initPreviewTemplates(); + }, + _initPreviewTemplates: function () { + var self = this, tags = self.previewMarkupTags, tagBef, tagAft = tags.tagAfter; + $.each(self.previewContentTemplates, function (key, value) { + if ($h.isEmpty(self.previewTemplates[key])) { + tagBef = tags.tagBefore2; + if (key === 'generic' || key === 'image') { + tagBef = tags.tagBefore1; + } + if (self._isPdfRendered() && key === 'pdf') { + tagBef = tagBef.replace('kv-file-content', 'kv-file-content kv-pdf-rendered'); + } + self.previewTemplates[key] = tagBef + value + tagAft; + } + }); + }, + _initPreviewCache: function () { + var self = this; + self.previewCache = { + data: {}, + init: function () { + var content = self.initialPreview; + if (content.length > 0 && !$h.isArray(content)) { + content = content.split(self.initialPreviewDelimiter); + } + self.previewCache.data = { + content: content, + config: self.initialPreviewConfig, + tags: self.initialPreviewThumbTags + }; + }, + count: function (skipNull) { + if (!self.previewCache.data || !self.previewCache.data.content) { + return 0; + } + if (skipNull) { + var chk = self.previewCache.data.content.filter(function (n) { + return n !== null; + }); + return chk.length; + } + return self.previewCache.data.content.length; + }, + get: function (i, isDisabled) { + var ind = $h.INIT_FLAG + i, data = self.previewCache.data, config = data.config[i], + content = data.content[i], out, $tmp, cat, ftr, + fname, ftype, frameClass, asData = $h.ifSet('previewAsData', config, self.initialPreviewAsData), + a = config ? {title: config.title || null, alt: config.alt || null} : {title: null, alt: null}, + parseTemplate = function (cat, dat, fname, ftype, ftr, ind, fclass, t) { + var fc = ' file-preview-initial ' + $h.SORT_CSS + (fclass ? ' ' + fclass : ''), + id = self.previewInitId + '-' + ind, + fileId = config && config.fileId || id; + /** @namespace config.zoomData */ + return self._generatePreviewTemplate(cat, dat, fname, ftype, id, fileId, false, null, fc, + ftr, ind, t, a, config && config.zoomData || dat); + }; + if (!content || !content.length) { + return ''; + } + isDisabled = isDisabled === undefined ? true : isDisabled; + cat = $h.ifSet('type', config, self.initialPreviewFileType || 'generic'); + fname = $h.ifSet('filename', config, $h.ifSet('caption', config)); + ftype = $h.ifSet('filetype', config, cat); + ftr = self.previewCache.footer(i, isDisabled, (config && config.size || null)); + frameClass = $h.ifSet('frameClass', config); + if (asData) { + out = parseTemplate(cat, content, fname, ftype, ftr, ind, frameClass); + } else { + out = parseTemplate('generic', content, fname, ftype, ftr, ind, frameClass, cat) + .setTokens({'content': data.content[i]}); + } + if (data.tags.length && data.tags[i]) { + out = $h.replaceTags(out, data.tags[i]); + } + /** @namespace config.frameAttr */ + if (!$h.isEmpty(config) && !$h.isEmpty(config.frameAttr)) { + $tmp = $h.createElement(out); + $tmp.find('.file-preview-initial').attr(config.frameAttr); + out = $tmp.html(); + $tmp.remove(); + } + return out; + }, + clean: function (data) { + data.content = $h.cleanArray(data.content); + data.config = $h.cleanArray(data.config); + data.tags = $h.cleanArray(data.tags); + self.previewCache.data = data; + }, + add: function (content, config, tags, append) { + var data = self.previewCache.data, index; + if (!content || !content.length) { + return 0; + } + index = content.length - 1; + if (!$h.isArray(content)) { + content = content.split(self.initialPreviewDelimiter); + } + if (append && data.content) { + index = data.content.push(content[0]) - 1; + data.config[index] = config; + data.tags[index] = tags; + } else { + data.content = content; + data.config = config; + data.tags = tags; + } + self.previewCache.clean(data); + return index; + }, + set: function (content, config, tags, append) { + var data = self.previewCache.data, i, chk; + if (!content || !content.length) { + return; + } + if (!$h.isArray(content)) { + content = content.split(self.initialPreviewDelimiter); + } + chk = content.filter(function (n) { + return n !== null; + }); + if (!chk.length) { + return; + } + if (data.content === undefined) { + data.content = []; + } + if (data.config === undefined) { + data.config = []; + } + if (data.tags === undefined) { + data.tags = []; + } + if (append) { + for (i = 0; i < content.length; i++) { + if (content[i]) { + data.content.push(content[i]); + } + } + for (i = 0; i < config.length; i++) { + if (config[i]) { + data.config.push(config[i]); + } + } + for (i = 0; i < tags.length; i++) { + if (tags[i]) { + data.tags.push(tags[i]); + } + } + } else { + data.content = content; + data.config = config; + data.tags = tags; + } + self.previewCache.clean(data); + }, + unset: function (index) { + var chk = self.previewCache.count(), rev = self.reversePreviewOrder; + if (!chk) { + return; + } + if (chk === 1) { + self.previewCache.data.content = []; + self.previewCache.data.config = []; + self.previewCache.data.tags = []; + self.initialPreview = []; + self.initialPreviewConfig = []; + self.initialPreviewThumbTags = []; + return; + } + self.previewCache.data.content = $h.spliceArray(self.previewCache.data.content, index, rev); + self.previewCache.data.config = $h.spliceArray(self.previewCache.data.config, index, rev); + self.previewCache.data.tags = $h.spliceArray(self.previewCache.data.tags, index, rev); + var data = $.extend(true, {}, self.previewCache.data); + self.previewCache.clean(data); + }, + out: function () { + var html = '', caption, len = self.previewCache.count(), i, content; + if (len === 0) { + return {content: '', caption: ''}; + } + for (i = 0; i < len; i++) { + content = self.previewCache.get(i); + html = self.reversePreviewOrder ? (content + html) : (html + content); + } + caption = self._getMsgSelected(len); + return {content: html, caption: caption}; + }, + footer: function (i, isDisabled, size) { + var data = self.previewCache.data || {}; + if ($h.isEmpty(data.content)) { + return ''; + } + if ($h.isEmpty(data.config) || $h.isEmpty(data.config[i])) { + data.config[i] = {}; + } + isDisabled = isDisabled === undefined ? true : isDisabled; + var config = data.config[i], caption = $h.ifSet('caption', config), a, + width = $h.ifSet('width', config, 'auto'), url = $h.ifSet('url', config, false), + key = $h.ifSet('key', config, null), fileId = $h.ifSet('fileId', config, null), + fs = self.fileActionSettings, initPreviewShowDel = self.initialPreviewShowDelete || false, + downloadInitialUrl = !self.initialPreviewDownloadUrl ? '' : + self.initialPreviewDownloadUrl + '?key=' + key + (fileId ? '&fileId=' + fileId : ''), + dUrl = config.downloadUrl || downloadInitialUrl, + dFil = config.filename || config.caption || '', + initPreviewShowDwl = !!(dUrl), + sDel = $h.ifSet('showRemove', config, initPreviewShowDel), + sDwl = $h.ifSet('showDownload', config, $h.ifSet('showDownload', fs, initPreviewShowDwl)), + sZm = $h.ifSet('showZoom', config, $h.ifSet('showZoom', fs, true)), + sDrg = $h.ifSet('showDrag', config, $h.ifSet('showDrag', fs, true)), + dis = (url === false) && isDisabled; + sDwl = sDwl && config.downloadUrl !== false && !!dUrl; + a = self._renderFileActions(config, false, sDwl, sDel, sZm, sDrg, dis, url, key, true, dUrl, dFil); + return self._getLayoutTemplate('footer').setTokens({ + 'progress': self._renderThumbProgress(), + 'actions': a, + 'caption': caption, + 'size': self._getSize(size), + 'width': width, + 'indicator': '' + }); + } + }; + self.previewCache.init(); + }, + _isPdfRendered: function () { + var self = this, useLib = self.usePdfRenderer, + flag = typeof useLib === 'function' ? useLib() : !!useLib; + return flag && self.pdfRendererUrl; + }, + _handler: function ($el, event, callback) { + var self = this, ns = self.namespace, ev = event.split(' ').join(ns + ' ') + ns; + if (!$el || !$el.length) { + return; + } + $el.off(ev).on(ev, callback); + }, + _encodeURI: function (vUrl) { + var self = this; + return self.encodeUrl ? encodeURI(vUrl) : vUrl; + }, + _log: function (msg, tokens) { + var self = this, id = self.$element.attr('id'); + if (!self.showConsoleLogs) { + return; + } + if (id) { + msg = '"' + id + '": ' + msg; + } + msg = 'bootstrap-fileinput: ' + msg; + if (typeof tokens === 'object') { + msg = msg.setTokens(tokens); + } + if (window.console && typeof window.console.log !== 'undefined') { + window.console.log(msg); + } else { + window.alert(msg); + } + }, + _validate: function () { + var self = this, status = self.$element.attr('type') === 'file'; + if (!status) { + self._log($h.logMessages.badInputType); + } + return status; + }, + _errorsExist: function () { + var self = this, $err, $errList = self.$errorContainer.find('li'); + if ($errList.length) { + return true; + } + $err = $h.createElement(self.$errorContainer.html()); + $err.find('.kv-error-close').remove(); + $err.find('ul').remove(); + return !!$.trim($err.text()).length; + }, + _errorHandler: function (evt, caption) { + var self = this, err = evt.target.error, showError = function (msg) { + self._showError(msg.replace('{name}', caption)); + }; + /** @namespace err.NOT_FOUND_ERR */ + /** @namespace err.SECURITY_ERR */ + /** @namespace err.NOT_READABLE_ERR */ + if (err.code === err.NOT_FOUND_ERR) { + showError(self.msgFileNotFound); + } else { + if (err.code === err.SECURITY_ERR) { + showError(self.msgFileSecured); + } else { + if (err.code === err.NOT_READABLE_ERR) { + showError(self.msgFileNotReadable); + } else { + if (err.code === err.ABORT_ERR) { + showError(self.msgFilePreviewAborted); + } else { + showError(self.msgFilePreviewError); + } + } + } + } + }, + _addError: function (msg) { + var self = this, $error = self.$errorContainer; + if (msg && $error.length) { + $h.setHtml($error, self.errorCloseButton + msg); + self._handler($error.find('.kv-error-close'), 'click', function () { + setTimeout(function () { + if (self.showPreview && !self.getFrames().length) { + self.clear(); + } + $error.fadeOut('slow'); + }, self.processDelay); + }); + } + }, + _setValidationError: function (css) { + var self = this; + css = (css ? css + ' ' : '') + 'has-error'; + self.$container.removeClass(css).addClass('has-error'); + $h.addCss(self.$captionContainer, 'is-invalid'); + }, + _resetErrors: function (fade) { + var self = this, $error = self.$errorContainer; + if (self.isPersistentError) { + return; + } + self.isError = false; + self.$container.removeClass('has-error'); + self.$captionContainer.removeClass('is-invalid'); + $error.html(''); + if (fade) { + $error.fadeOut('slow'); + } else { + $error.hide(); + } + }, + _showFolderError: function (folders) { + var self = this, $error = self.$errorContainer, msg; + if (!folders) { + return; + } + if (!self.isAjaxUpload) { + self._clearFileInput(); + } + msg = self.msgFoldersNotAllowed.replace('{n}', folders); + self._addError(msg); + self._setValidationError(); + $error.fadeIn(self.fadeDelay); + self._raise('filefoldererror', [folders, msg]); + }, + _showFileError: function (msg, params, event) { + var self = this, $error = self.$errorContainer, ev = event || 'fileuploaderror', + fId = params && params.fileId || '', e = params && params.id ? + '
  • ' + msg + '
  • ' : '
  • ' + msg + '
  • '; + + if ($error.find('ul').length === 0) { + self._addError('
      ' + e + '
    '); + } else { + $error.find('ul').append(e); + } + $error.fadeIn(self.fadeDelay); + self._raise(ev, [params, msg]); + self._setValidationError('file-input-new'); + return true; + }, + _showError: function (msg, params, event) { + var self = this, $error = self.$errorContainer, ev = event || 'fileerror'; + params = params || {}; + params.reader = self.reader; + self._addError(msg); + $error.fadeIn(self.fadeDelay); + self._raise(ev, [params, msg]); + if (!self.isAjaxUpload) { + self._clearFileInput(); + } + self._setValidationError('file-input-new'); + self.$btnUpload.attr('disabled', true); + return true; + }, + _noFilesError: function (params) { + var self = this, label = self.minFileCount > 1 ? self.filePlural : self.fileSingle, + msg = self.msgFilesTooLess.replace('{n}', self.minFileCount).replace('{files}', label), + $error = self.$errorContainer; + msg = '
  • ' + msg + '
  • '; + if ($error.find('ul').length === 0) { + self._addError('
      ' + msg + '
    '); + } else { + $error.find('ul').append(msg); + } + self.isError = true; + self._updateFileDetails(0); + $error.fadeIn(self.fadeDelay); + self._raise('fileerror', [params, msg]); + self._clearFileInput(); + self._setValidationError(); + }, + _parseError: function (operation, jqXHR, errorThrown, fileName) { + /** @namespace jqXHR.responseJSON */ + var self = this, errMsg = $.trim(errorThrown + ''), textPre, errText, text; + errText = jqXHR.responseJSON && jqXHR.responseJSON.error ? jqXHR.responseJSON.error.toString() : ''; + text = errText ? errText : jqXHR.responseText; + if (self.cancelling && self.msgUploadAborted) { + errMsg = self.msgUploadAborted; + } + if (self.showAjaxErrorDetails && text) { + if (errText) { + errMsg = $.trim(errText + ''); + } else { + text = $.trim(text.replace(/\n\s*\n/g, '\n')); + textPre = text.length ? '
    ' + text + '
    ' : ''; + errMsg += errMsg ? textPre : text; + } + } + if (!errMsg) { + errMsg = self.msgAjaxError.replace('{operation}', operation); + } + self.cancelling = false; + return fileName ? '' + fileName + ': ' + errMsg : errMsg; + }, + _parseFileType: function (type, name) { + var self = this, isValid, vType, cat, i, types = self.allowedPreviewTypes || []; + if (type === 'application/text-plain') { + return 'text'; + } + for (i = 0; i < types.length; i++) { + cat = types[i]; + isValid = self.fileTypeSettings[cat]; + vType = isValid(type, name) ? cat : ''; + if (!$h.isEmpty(vType)) { + return vType; + } + } + return 'other'; + }, + _getPreviewIcon: function (fname) { + var self = this, ext, out = null; + if (fname && fname.indexOf('.') > -1) { + ext = fname.split('.').pop(); + if (self.previewFileIconSettings) { + out = self.previewFileIconSettings[ext] || self.previewFileIconSettings[ext.toLowerCase()] || null; + } + if (self.previewFileExtSettings) { + $.each(self.previewFileExtSettings, function (key, func) { + if (self.previewFileIconSettings[key] && func(ext)) { + out = self.previewFileIconSettings[key]; + //noinspection UnnecessaryReturnStatementJS + return; + } + }); + } + } + return out || self.previewFileIcon; + }, + _parseFilePreviewIcon: function (content, fname) { + var self = this, icn = self._getPreviewIcon(fname), out = content; + if (out.indexOf('{previewFileIcon}') > -1) { + out = out.setTokens({'previewFileIconClass': self.previewFileIconClass, 'previewFileIcon': icn}); + } + return out; + }, + _raise: function (event, params) { + var self = this, e = $.Event(event); + if (params !== undefined) { + self.$element.trigger(e, params); + } else { + self.$element.trigger(e); + } + if (e.isDefaultPrevented() || e.result === false) { + return false; + } + switch (event) { + // ignore these events + case 'filebatchuploadcomplete': + case 'filebatchuploadsuccess': + case 'fileuploaded': + case 'fileclear': + case 'filecleared': + case 'filereset': + case 'fileerror': + case 'filefoldererror': + case 'fileuploaderror': + case 'filebatchuploaderror': + case 'filedeleteerror': + case 'filecustomerror': + case 'filesuccessremove': + break; + // receive data response via `filecustomerror` event` + default: + if (!self.ajaxAborted) { + self.ajaxAborted = e.result; + } + break; + } + return true; + }, + _listenFullScreen: function (isFullScreen) { + var self = this, $modal = self.$modal, $btnFull, $btnBord; + if (!$modal || !$modal.length) { + return; + } + $btnFull = $modal && $modal.find('.btn-fullscreen'); + $btnBord = $modal && $modal.find('.btn-borderless'); + if (!$btnFull.length || !$btnBord.length) { + return; + } + $btnFull.removeClass('active').attr('aria-pressed', 'false'); + $btnBord.removeClass('active').attr('aria-pressed', 'false'); + if (isFullScreen) { + $btnFull.addClass('active').attr('aria-pressed', 'true'); + } else { + $btnBord.addClass('active').attr('aria-pressed', 'true'); + } + if ($modal.hasClass('file-zoom-fullscreen')) { + self._maximizeZoomDialog(); + } else { + if (isFullScreen) { + self._maximizeZoomDialog(); + } else { + $btnBord.removeClass('active').attr('aria-pressed', 'false'); + } + } + }, + _listen: function () { + var self = this, $el = self.$element, $form = self.$form, $cont = self.$container, fullScreenEv, $cap, fn; + self._handler($el, 'click', function (e) { + if ($el.hasClass('file-no-browse')) { + if ($el.data('zoneClicked')) { + $el.data('zoneClicked', false); + } else { + e.preventDefault(); + } + } + }); + self._handler($el, 'change', $.proxy(self._change, self)); + if (self.showBrowse) { + self._handler(self.$btnFile, 'click', $.proxy(self._browse, self)); + } + $cap = $cont.find('.file-caption-name'); + fn = function () { + return false; + }; + self._handler($cont.find('.fileinput-remove:not([disabled])'), 'click', $.proxy(self.clear, self)); + self._handler($cont.find('.fileinput-cancel'), 'click', $.proxy(self.cancel, self)); + self._handler($cont.find('.fileinput-pause'), 'click', $.proxy(self.pause, self)); + self._handler($cap, 'keydown', fn); + self._handler($cap, 'paste', fn); + self._initDragDrop(); + self._handler($form, 'reset', $.proxy(self.clear, self)); + if (!self.isAjaxUpload) { + self._handler($form, 'submit', $.proxy(self._submitForm, self)); + } + self._handler(self.$container.find('.fileinput-upload'), 'click', $.proxy(self._uploadClick, self)); + self._handler($(window), 'resize', function () { + self._listenFullScreen(screen.width === window.innerWidth && screen.height === window.innerHeight); + }); + fullScreenEv = 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange'; + self._handler($(document), fullScreenEv, function () { + self._listenFullScreen($h.checkFullScreen()); + }); + self._autoFitContent(); + self._initClickable(); + self._refreshPreview(); + }, + _autoFitContent: function () { + var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, + self = this, config = width < 400 ? (self.previewSettingsSmall || self.defaults.previewSettingsSmall) : + (self.previewSettings || self.defaults.previewSettings), sel; + $.each(config, function (cat, settings) { + sel = '.file-preview-frame .file-preview-' + cat; + self.$preview.find(sel + '.kv-preview-data,' + sel + ' .kv-preview-data').css(settings); + }); + }, + _scanDroppedItems: function (item, files, path) { + path = path || ''; + var self = this, i, dirReader, readDir, errorHandler = function (e) { + self._log($h.logMessages.badDroppedFiles); + self._log(e); + }; + if (item.isFile) { + item.file(function (file) { + if (path) { + file.newPath = path + file.name; + } + files.push(file); + }, errorHandler); + } else { + if (item.isDirectory) { + dirReader = item.createReader(); + readDir = function () { + dirReader.readEntries(function (entries) { + if (entries && entries.length > 0) { + for (i = 0; i < entries.length; i++) { + self._scanDroppedItems(entries[i], files, path + item.name + '/'); + } + // recursively call readDir() again, since browser can only handle first 100 entries. + readDir(); + } + return null; + }, errorHandler); + }; + readDir(); + } + } + + }, + _initDragDrop: function () { + var self = this, $zone = self.$dropZone; + if (self.dropZoneEnabled && self.showPreview) { + self._handler($zone, 'dragenter dragover', $.proxy(self._zoneDragEnter, self)); + self._handler($zone, 'dragleave', $.proxy(self._zoneDragLeave, self)); + self._handler($zone, 'drop', $.proxy(self._zoneDrop, self)); + self._handler($(document), 'dragenter dragover drop', self._zoneDragDropInit); + } + }, + _zoneDragDropInit: function (e) { + e.stopPropagation(); + e.preventDefault(); + }, + _zoneDragEnter: function (e) { + var self = this, dt = e.originalEvent.dataTransfer, hasFiles = $.inArray('Files', dt.types) > -1; + self._zoneDragDropInit(e); + if (self.isDisabled || !hasFiles) { + dt.effectAllowed = 'none'; + dt.dropEffect = 'none'; + return; + } + dt.dropEffect = 'copy'; + if (self._raise('fileDragEnter', {'sourceEvent': e, 'files': dt.types.Files})) { + $h.addCss(self.$dropZone, 'file-highlighted'); + } + }, + _zoneDragLeave: function (e) { + var self = this; + self._zoneDragDropInit(e); + if (self.isDisabled) { + return; + } + if (self._raise('fileDragLeave', {'sourceEvent': e})) { + self.$dropZone.removeClass('file-highlighted'); + } + + }, + _zoneDrop: function (e) { + /** @namespace e.originalEvent.dataTransfer */ + var self = this, i, $el = self.$element, dt = e.originalEvent.dataTransfer, + files = dt.files, items = dt.items, folders = $h.getDragDropFolders(items), + processFiles = function () { + if (!self.isAjaxUpload) { + self.changeTriggered = true; + $el.get(0).files = files; + setTimeout(function () { + self.changeTriggered = false; + $el.trigger('change' + self.namespace); + }, self.processDelay); + } else { + self._change(e, files); + } + self.$dropZone.removeClass('file-highlighted'); + }; + e.preventDefault(); + if (self.isDisabled || $h.isEmpty(files)) { + return; + } + if (!self._raise('fileDragDrop', {'sourceEvent': e, 'files': files})) { + return; + } + if (folders > 0) { + if (!self.isAjaxUpload) { + self._showFolderError(folders); + return; + } + files = []; + for (i = 0; i < items.length; i++) { + var item = items[i].webkitGetAsEntry(); + if (item) { + self._scanDroppedItems(item, files); + } + } + setTimeout(function () { + processFiles(); + }, 500); + } else { + processFiles(); + } + }, + _uploadClick: function (e) { + var self = this, $btn = self.$container.find('.fileinput-upload'), $form, + isEnabled = !$btn.hasClass('disabled') && $h.isEmpty($btn.attr('disabled')); + if (e && e.isDefaultPrevented()) { + return; + } + if (!self.isAjaxUpload) { + if (isEnabled && $btn.attr('type') !== 'submit') { + $form = $btn.closest('form'); + // downgrade to normal form submit if possible + if ($form.length) { + $form.trigger('submit'); + } + e.preventDefault(); + } + return; + } + e.preventDefault(); + if (isEnabled) { + self.upload(); + } + }, + _submitForm: function () { + var self = this; + return self._isFileSelectionValid() && !self._abort({}); + }, + _clearPreview: function () { + var self = this, + $thumbs = self.showUploadedThumbs ? self.getFrames(':not(.file-preview-success)') : self.getFrames(); + $thumbs.each(function () { + var $thumb = $(this); + $thumb.remove(); + }); + if (!self.getFrames().length || !self.showPreview) { + self._resetUpload(); + } + self._validateDefaultPreview(); + }, + _initSortable: function () { + var self = this, $el = self.$preview, settings, selector = '.' + $h.SORT_CSS, $cont, $body = $('body'), + $html = $('html'), rev = self.reversePreviewOrder, Sortable = window.Sortable, beginGrab, endGrab; + if (!Sortable || $el.find(selector).length === 0) { + return; + } + $cont = $body.length ? $body : ($html.length ? $html : self.$container); + beginGrab = function () { + $cont.addClass('file-grabbing'); + }; + endGrab = function () { + $cont.removeClass('file-grabbing'); + }; + settings = { + handle: '.drag-handle-init', + dataIdAttr: 'data-fileid', + animation: 600, + draggable: selector, + scroll: false, + forceFallback: true, + onChoose: beginGrab, + onStart: beginGrab, + onUnchoose: endGrab, + onEnd: endGrab, + onSort: function (e) { + var oldIndex = e.oldIndex, newIndex = e.newIndex, i = 0, len = self.initialPreviewConfig.length, + exceedsLast = len > 0 && newIndex >= len, $item = $(e.item), $first; + if (exceedsLast) { + newIndex = len - 1; + } + self.initialPreview = $h.moveArray(self.initialPreview, oldIndex, newIndex, rev); + self.initialPreviewConfig = $h.moveArray(self.initialPreviewConfig, oldIndex, newIndex, rev); + self.previewCache.init(); + self.getFrames('.file-preview-initial').each(function () { + $(this).attr('data-fileindex', $h.INIT_FLAG + i); + i++; + }); + if (exceedsLast) { + $first = self.getFrames(':not(.file-preview-initial):first'); + if ($first.length) { + $item.slideUp(function () { + $item.insertBefore($first).slideDown(); + }); + } + } + self._raise('filesorted', { + previewId: $item.attr('id'), + 'oldIndex': oldIndex, + 'newIndex': newIndex, + stack: self.initialPreviewConfig + }); + }, + }; + $.extend(true, settings, self.fileActionSettings.dragSettings); + if (self.sortable) { + self.sortable.destroy(); + } + self.sortable = Sortable.create($el[0], settings); + }, + _setPreviewContent: function (content) { + var self = this; + $h.setHtml(self.$preview, content); + self._autoFitContent(); + }, + _initPreviewImageOrientations: function () { + var self = this, i = 0, canOrientImage = self.canOrientImage; + if (!self.autoOrientImageInitial && !canOrientImage) { + return; + } + self.getFrames('.file-preview-initial').each(function () { + var $thumb = $(this), $img, $zoomImg, id, config = self.initialPreviewConfig[i]; + /** @namespace config.exif */ + if (config && config.exif && config.exif.Orientation) { + id = $thumb.attr('id'); + $img = $thumb.find('>.kv-file-content img'); + $zoomImg = self._getZoom(id, ' >.kv-file-content img'); + if (canOrientImage) { + $img.css('image-orientation', (self.autoOrientImageInitial ? 'from-image' : 'none')); + } else { + self.setImageOrientation($img, $zoomImg, config.exif.Orientation, $thumb); + } + } + i++; + }); + }, + _initPreview: function (isInit) { + var self = this, cap = self.initialCaption || '', out; + if (!self.previewCache.count(true)) { + self._clearPreview(); + if (isInit) { + self._setCaption(cap); + } else { + self._initCaption(); + } + return; + } + out = self.previewCache.out(); + cap = isInit && self.initialCaption ? self.initialCaption : out.caption; + self._setPreviewContent(out.content); + self._setInitThumbAttr(); + self._setCaption(cap); + self._initSortable(); + if (!$h.isEmpty(out.content)) { + self.$container.removeClass('file-input-new'); + } + self._initPreviewImageOrientations(); + }, + _getZoomButton: function (type) { + var self = this, label = self.previewZoomButtonIcons[type], css = self.previewZoomButtonClasses[type], + title = ' title="' + (self.previewZoomButtonTitles[type] || '') + '" ', + params = title + (type === 'close' ? ' data-dismiss="modal" aria-hidden="true"' : ''); + if (type === 'fullscreen' || type === 'borderless' || type === 'toggleheader') { + params += ' data-toggle="button" aria-pressed="false" autocomplete="off"'; + } + return ''; + }, + _getModalContent: function () { + var self = this; + return self._getLayoutTemplate('modal').setTokens({ + 'rtl': self.rtl ? ' kv-rtl' : '', + 'zoomFrameClass': self.frameClass, + 'heading': self.msgZoomModalHeading, + 'prev': self._getZoomButton('prev'), + 'next': self._getZoomButton('next'), + 'toggleheader': self._getZoomButton('toggleheader'), + 'fullscreen': self._getZoomButton('fullscreen'), + 'borderless': self._getZoomButton('borderless'), + 'close': self._getZoomButton('close') + }); + }, + _listenModalEvent: function (event) { + var self = this, $modal = self.$modal, getParams = function (e) { + return { + sourceEvent: e, + previewId: $modal.data('previewId'), + modal: $modal + }; + }; + $modal.on(event + '.bs.modal', function (e) { + var $btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless'); + if ($modal.data('fileinputPluginId') === self.$element.attr('id')) { + self._raise('filezoom' + event, getParams(e)); + } + if (event === 'shown') { + $btnBord.removeClass('active').attr('aria-pressed', 'false'); + $btnFull.removeClass('active').attr('aria-pressed', 'false'); + if ($modal.hasClass('file-zoom-fullscreen')) { + self._maximizeZoomDialog(); + if ($h.checkFullScreen()) { + $btnFull.addClass('active').attr('aria-pressed', 'true'); + } else { + $btnBord.addClass('active').attr('aria-pressed', 'true'); + } + } + } + }); + }, + _initZoom: function () { + var self = this, $dialog, modalMain = self._getLayoutTemplate('modalMain'), modalId = '#' + $h.MODAL_ID; + if (!self.showPreview) { + return; + } + self.$modal = $(modalId); + if (!self.$modal || !self.$modal.length) { + $dialog = $h.createElement($h.cspBuffer.stash(modalMain)).insertAfter(self.$container); + self.$modal = $(modalId).insertBefore($dialog); + $h.cspBuffer.apply(self.$modal); + $dialog.remove(); + } + $h.initModal(self.$modal); + self.$modal.html($h.cspBuffer.stash(self._getModalContent())); + $h.cspBuffer.apply(self.$modal); + $.each($h.MODAL_EVENTS, function (key, event) { + self._listenModalEvent(event); + }); + }, + _initZoomButtons: function () { + var self = this, previewId = self.$modal.data('previewId') || '', $first, $last, + thumbs = self.getFrames().toArray(), len = thumbs.length, $prev = self.$modal.find('.btn-prev'), + $next = self.$modal.find('.btn-next'); + if (thumbs.length < 2) { + $prev.hide(); + $next.hide(); + return; + } else { + $prev.show(); + $next.show(); + } + if (!len) { + return; + } + $first = $(thumbs[0]); + $last = $(thumbs[len - 1]); + $prev.removeAttr('disabled'); + $next.removeAttr('disabled'); + if ($first.length && $first.attr('id') === previewId) { + $prev.attr('disabled', true); + } + if ($last.length && $last.attr('id') === previewId) { + $next.attr('disabled', true); + } + }, + _maximizeZoomDialog: function () { + var self = this, $modal = self.$modal, $head = $modal.find('.modal-header:visible'), + $foot = $modal.find('.modal-footer:visible'), $body = $modal.find('.modal-body'), + h = $(window).height(), diff = 0; + $modal.addClass('file-zoom-fullscreen'); + if ($head && $head.length) { + h -= $head.outerHeight(true); + } + if ($foot && $foot.length) { + h -= $foot.outerHeight(true); + } + if ($body && $body.length) { + diff = $body.outerHeight(true) - $body.height(); + h -= diff; + } + $modal.find('.kv-zoom-body').height(h); + }, + _resizeZoomDialog: function (fullScreen) { + var self = this, $modal = self.$modal, $btnFull = $modal.find('.btn-fullscreen'), + $btnBord = $modal.find('.btn-borderless'); + if ($modal.hasClass('file-zoom-fullscreen')) { + $h.toggleFullScreen(false); + if (!fullScreen) { + if (!$btnFull.hasClass('active')) { + $modal.removeClass('file-zoom-fullscreen'); + self.$modal.find('.kv-zoom-body').css('height', self.zoomModalHeight); + } else { + $btnFull.removeClass('active').attr('aria-pressed', 'false'); + } + } else { + if (!$btnFull.hasClass('active')) { + $modal.removeClass('file-zoom-fullscreen'); + self._resizeZoomDialog(true); + if ($btnBord.hasClass('active')) { + $btnBord.removeClass('active').attr('aria-pressed', 'false'); + } + } + } + } else { + if (!fullScreen) { + self._maximizeZoomDialog(); + return; + } + $h.toggleFullScreen(true); + } + $modal.focus(); + }, + _setZoomContent: function ($frame, animate) { + var self = this, $content, tmplt, body, title, $body, $dataEl, config, previewId = $frame.attr('id'), + $zoomPreview = self._getZoom(previewId), $modal = self.$modal, $tmp, + $btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless'), cap, size, + $btnTogh = $modal.find('.btn-toggleheader'); + tmplt = $zoomPreview.attr('data-template') || 'generic'; + $content = $zoomPreview.find('.kv-file-content'); + body = $content.length ? $content.html() : ''; + cap = $frame.data('caption') || ''; + size = $frame.data('size') || ''; + title = cap + ' ' + size; + $modal.find('.kv-zoom-title').attr('title', $('
    ').html(title).text()).html(title); + $body = $modal.find('.kv-zoom-body'); + $modal.removeClass('kv-single-content'); + if (animate) { + $tmp = $body.addClass('file-thumb-loading').clone().insertAfter($body); + $h.setHtml($body, body).hide(); + $tmp.fadeOut('fast', function () { + $body.fadeIn('fast', function () { + $body.removeClass('file-thumb-loading'); + }); + $tmp.remove(); + }); + } else { + $h.setHtml($body, body); + } + config = self.previewZoomSettings[tmplt]; + if (config) { + $dataEl = $body.find('.kv-preview-data'); + $h.addCss($dataEl, 'file-zoom-detail'); + $.each(config, function (key, value) { + $dataEl.css(key, value); + if (($dataEl.attr('width') && key === 'width') || ($dataEl.attr('height') && key === 'height')) { + $dataEl.removeAttr(key); + } + }); + } + $modal.data('previewId', previewId); + self._handler($modal.find('.btn-prev'), 'click', function () { + self._zoomSlideShow('prev', previewId); + }); + self._handler($modal.find('.btn-next'), 'click', function () { + self._zoomSlideShow('next', previewId); + }); + self._handler($btnFull, 'click', function () { + self._resizeZoomDialog(true); + }); + self._handler($btnBord, 'click', function () { + self._resizeZoomDialog(false); + }); + self._handler($btnTogh, 'click', function () { + var $header = $modal.find('.modal-header'), $floatBar = $modal.find('.modal-body .floating-buttons'), + ht, $actions = $header.find('.kv-zoom-actions'), resize = function (height) { + var $body = self.$modal.find('.kv-zoom-body'), h = self.zoomModalHeight; + if ($modal.hasClass('file-zoom-fullscreen')) { + h = $body.outerHeight(true); + if (!height) { + h = h - $header.outerHeight(true); + } + } + $body.css('height', height ? h + height : h); + }; + if ($header.is(':visible')) { + ht = $header.outerHeight(true); + $header.slideUp('slow', function () { + $actions.find('.btn').appendTo($floatBar); + resize(ht); + }); + } else { + $floatBar.find('.btn').appendTo($actions); + $header.slideDown('slow', function () { + resize(); + }); + } + $modal.focus(); + }); + self._handler($modal, 'keydown', function (e) { + var key = e.which || e.keyCode, $prev = $(this).find('.btn-prev'), $next = $(this).find('.btn-next'), + vId = $(this).data('previewId'), vPrevKey = self.rtl ? 39 : 37, vNextKey = self.rtl ? 37 : 39; + if (key === vPrevKey && $prev.length && !$prev.attr('disabled')) { + self._zoomSlideShow('prev', vId); + } + if (key === vNextKey && $next.length && !$next.attr('disabled')) { + self._zoomSlideShow('next', vId); + } + }); + }, + _showModal: function ($frame) { + var self = this, $modal = self.$modal; + if (!$frame || !$frame.length) { + return; + } + $h.initModal($modal); + $h.setHtml($modal, self._getModalContent()); + self._setZoomContent($frame); + $modal.data('fileinputPluginId', self.$element.attr('id')); + $modal.modal('show'); + self._initZoomButtons(); + }, + _zoomPreview: function ($btn) { + var self = this, $frame; + if (!$btn.length) { + throw 'Cannot zoom to detailed preview!'; + } + $frame = $btn.closest($h.FRAMES); + self._showModal($frame); + }, + _zoomSlideShow: function (dir, previewId) { + var self = this, $btn = self.$modal.find('.kv-zoom-actions .btn-' + dir), $targFrame, i, $thumb, + thumbsData = self.getFrames().toArray(), thumbs = [], len = thumbsData.length, out; + if ($btn.attr('disabled')) { + return; + } + for (i = 0; i < len; i++) { + $thumb = $(thumbsData[i]); + if ($thumb && $thumb.length && $thumb.find('.kv-file-zoom:visible').length) { + thumbs.push(thumbsData[i]); + } + } + len = thumbs.length; + for (i = 0; i < len; i++) { + if ($(thumbs[i]).attr('id') === previewId) { + out = dir === 'prev' ? i - 1 : i + 1; + break; + } + } + if (out < 0 || out >= len || !thumbs[out]) { + return; + } + $targFrame = $(thumbs[out]); + if ($targFrame.length) { + self._setZoomContent($targFrame, true); + } + self._initZoomButtons(); + self._raise('filezoom' + dir, {'previewId': previewId, modal: self.$modal}); + }, + _initZoomButton: function () { + var self = this; + self.$preview.find('.kv-file-zoom').each(function () { + var $el = $(this); + self._handler($el, 'click', function () { + self._zoomPreview($el); + }); + }); + }, + _inputFileCount: function () { + return this.$element[0].files.length; + }, + _refreshPreview: function () { + var self = this, files; + if ((!self._inputFileCount() && !self.isAjaxUpload) || !self.showPreview || !self.isPreviewable) { + return; + } + if (self.isAjaxUpload) { + if (self.fileManager.count() > 0) { + files = $.extend(true, {}, self.fileManager.stack); + self.fileManager.clear(); + self._clearFileInput(); + } else { + files = self.$element[0].files; + } + } else { + files = self.$element[0].files; + } + if (files && files.length) { + self.readFiles(files); + self._setFileDropZoneTitle(); + } + }, + _clearObjects: function ($el) { + $el.find('video audio').each(function () { + this.pause(); + $(this).remove(); + }); + $el.find('img object div').each(function () { + $(this).remove(); + }); + }, + _clearFileInput: function () { + var self = this, $el = self.$element, $srcFrm, $tmpFrm, $tmpEl; + if (!self._inputFileCount()) { + return; + } + $srcFrm = $el.closest('form'); + $tmpFrm = $(document.createElement('form')); + $tmpEl = $(document.createElement('div')); + $el.before($tmpEl); + if ($srcFrm.length) { + $srcFrm.after($tmpFrm); + } else { + $tmpEl.after($tmpFrm); + } + $tmpFrm.append($el).trigger('reset'); + $tmpEl.before($el).remove(); + $tmpFrm.remove(); + }, + _resetUpload: function () { + var self = this; + self.uploadStartTime = $h.now(); + self.uploadCache = []; + self.$btnUpload.removeAttr('disabled'); + self._setProgress(0); + self._hideProgress(); + self._resetErrors(false); + self._initAjax(); + self.fileManager.clearImages(); + self._resetCanvas(); + if (self.overwriteInitial) { + self.initialPreview = []; + self.initialPreviewConfig = []; + self.initialPreviewThumbTags = []; + self.previewCache.data = { + content: [], + config: [], + tags: [] + }; + } + }, + _resetCanvas: function () { + var self = this; + if (self.canvas && self.imageCanvasContext) { + self.imageCanvasContext.clearRect(0, 0, self.canvas.width, self.canvas.height); + } + }, + _hasInitialPreview: function () { + var self = this; + return !self.overwriteInitial && self.previewCache.count(true); + }, + _resetPreview: function () { + var self = this, out, cap, $div, hasSuc = self.showUploadedThumbs, hasErr = !self.removeFromPreviewOnError, + includeProcessed = (hasSuc || hasErr) && self.isDuplicateError; + if (self.previewCache.count(true)) { + out = self.previewCache.out(); + if (includeProcessed) { + $div = $h.createElement('').insertAfter(self.$container); + self.getFrames().each(function () { + var $thumb = $(this); + if ((hasSuc && $thumb.hasClass('file-preview-success')) || + (hasErr && $thumb.hasClass('file-preview-error'))) { + $div.append($thumb); + } + }); + } + self._setPreviewContent(out.content); + self._setInitThumbAttr(); + cap = self.initialCaption ? self.initialCaption : out.caption; + self._setCaption(cap); + if (includeProcessed) { + $div.contents().appendTo(self.$preview); + $div.remove(); + } + } else { + self._clearPreview(); + self._initCaption(); + } + if (self.showPreview) { + self._initZoom(); + self._initSortable(); + } + self.isDuplicateError = false; + }, + _clearDefaultPreview: function () { + var self = this; + self.$preview.find('.file-default-preview').remove(); + }, + _validateDefaultPreview: function () { + var self = this; + if (!self.showPreview || $h.isEmpty(self.defaultPreviewContent)) { + return; + } + self._setPreviewContent('
    ' + self.defaultPreviewContent + '
    '); + self.$container.removeClass('file-input-new'); + self._initClickable(); + }, + _resetPreviewThumbs: function (isAjax) { + var self = this, out; + if (isAjax) { + self._clearPreview(); + self.clearFileStack(); + return; + } + if (self._hasInitialPreview()) { + out = self.previewCache.out(); + self._setPreviewContent(out.content); + self._setInitThumbAttr(); + self._setCaption(out.caption); + self._initPreviewActions(); + } else { + self._clearPreview(); + } + }, + _getLayoutTemplate: function (t) { + var self = this, template = self.layoutTemplates[t]; + if ($h.isEmpty(self.customLayoutTags)) { + return template; + } + return $h.replaceTags(template, self.customLayoutTags); + }, + _getPreviewTemplate: function (t) { + var self = this, templates = self.previewTemplates, template = templates[t] || templates.other; + if ($h.isEmpty(self.customPreviewTags)) { + return template; + } + return $h.replaceTags(template, self.customPreviewTags); + }, + _getOutData: function (formdata, jqXHR, responseData, filesData) { + var self = this; + jqXHR = jqXHR || {}; + responseData = responseData || {}; + filesData = filesData || self.fileManager.list(); + return { + formdata: formdata, + files: filesData, + filenames: self.filenames, + filescount: self.getFilesCount(), + extra: self._getExtraData(), + response: responseData, + reader: self.reader, + jqXHR: jqXHR + }; + }, + _getMsgSelected: function (n) { + var self = this, strFiles = n === 1 ? self.fileSingle : self.filePlural; + return n > 0 ? self.msgSelected.replace('{n}', n).replace('{files}', strFiles) : self.msgNoFilesSelected; + }, + _getFrame: function (id, skipWarning) { + var self = this, $frame = $h.getFrameElement(self.$preview, id); + if (self.showPreview && !skipWarning && !$frame.length) { + self._log($h.logMessages.invalidThumb, {id: id}); + } + return $frame; + }, + _getZoom: function (id, selector) { + var self = this, $frame = $h.getZoomElement(self.$preview, id, selector); + if (self.showPreview && !$frame.length) { + self._log($h.logMessages.invalidThumb, {id: id}); + } + return $frame; + }, + _getThumbs: function (css) { + css = css || ''; + return this.getFrames(':not(.file-preview-initial)' + css); + }, + _getThumbId: function (fileId) { + var self = this; + return self.previewInitId + '-' + fileId; + }, + _getExtraData: function (fileId, index) { + var self = this, data = self.uploadExtraData; + if (typeof self.uploadExtraData === 'function') { + data = self.uploadExtraData(fileId, index); + } + return data; + }, + _initXhr: function (xhrobj, fileId) { + var self = this, fm = self.fileManager, func = function (event) { + var pct = 0, total = event.total, loaded = event.loaded || event.position, + stats = fm.getUploadStats(fileId, loaded, total); + /** @namespace event.lengthComputable */ + if (event.lengthComputable && !self.enableResumableUpload) { + pct = $h.round(loaded / total * 100); + } + if (fileId) { + self._setFileUploadStats(fileId, pct, stats); + } else { + self._setProgress(pct, null, null, self._getStats(stats)); + } + self._raise('fileajaxprogress', [stats]); + }; + if (xhrobj.upload) { + if (self.progressDelay) { + func = $h.debounce(func, self.progressDelay); + } + xhrobj.upload.addEventListener('progress', func, false); + } + return xhrobj; + }, + _initAjaxSettings: function () { + var self = this; + self._ajaxSettings = $.extend(true, {}, self.ajaxSettings); + self._ajaxDeleteSettings = $.extend(true, {}, self.ajaxDeleteSettings); + }, + _mergeAjaxCallback: function (funcName, srcFunc, type) { + var self = this, settings = self._ajaxSettings, flag = self.mergeAjaxCallbacks, targFunc; + if (type === 'delete') { + settings = self._ajaxDeleteSettings; + flag = self.mergeAjaxDeleteCallbacks; + } + targFunc = settings[funcName]; + if (flag && typeof targFunc === 'function') { + if (flag === 'before') { + settings[funcName] = function () { + targFunc.apply(this, arguments); + srcFunc.apply(this, arguments); + }; + } else { + settings[funcName] = function () { + srcFunc.apply(this, arguments); + targFunc.apply(this, arguments); + }; + } + } else { + settings[funcName] = srcFunc; + } + }, + _ajaxSubmit: function (fnBefore, fnSuccess, fnComplete, fnError, formdata, fileId, index, vUrl) { + var self = this, settings, defaults, data, ajaxTask; + if (!self._raise('filepreajax', [formdata, fileId, index])) { + return; + } + formdata.append('initialPreview', JSON.stringify(self.initialPreview)); + formdata.append('initialPreviewConfig', JSON.stringify(self.initialPreviewConfig)); + formdata.append('initialPreviewThumbTags', JSON.stringify(self.initialPreviewThumbTags)); + self._initAjaxSettings(); + self._mergeAjaxCallback('beforeSend', fnBefore); + self._mergeAjaxCallback('success', fnSuccess); + self._mergeAjaxCallback('complete', fnComplete); + self._mergeAjaxCallback('error', fnError); + vUrl = vUrl || self.uploadUrlThumb || self.uploadUrl; + if (typeof vUrl === 'function') { + vUrl = vUrl(); + } + data = self._getExtraData(fileId, index) || {}; + if (typeof data === 'object') { + $.each(data, function (key, value) { + formdata.append(key, value); + }); + } + defaults = { + xhr: function () { + var xhrobj = $.ajaxSettings.xhr(); + return self._initXhr(xhrobj, fileId); + }, + url: self._encodeURI(vUrl), + type: 'POST', + dataType: 'json', + data: formdata, + cache: false, + processData: false, + contentType: false + }; + settings = $.extend(true, {}, defaults, self._ajaxSettings); + ajaxTask = self.taskManager.addTask(fileId + '-' + index, function () { + var self = this.self, config, xhr; + config = self.ajaxQueue.shift(); + xhr = $.ajax(config); + self.ajaxRequests.push(xhr); + }); + self.ajaxQueue.push(settings); + ajaxTask.runWithContext({self: self}); + }, + _mergeArray: function (prop, content) { + var self = this, arr1 = $h.cleanArray(self[prop]), arr2 = $h.cleanArray(content); + self[prop] = arr1.concat(arr2); + }, + _initUploadSuccess: function (out, $thumb, allFiles) { + var self = this, append, data, index, $div, $newCache, content, config, tags, id, i; + if (!self.showPreview || typeof out !== 'object' || $.isEmptyObject(out)) { + self._resetCaption(); + return; + } + if (out.initialPreview !== undefined && out.initialPreview.length > 0) { + self.hasInitData = true; + content = out.initialPreview || []; + config = out.initialPreviewConfig || []; + tags = out.initialPreviewThumbTags || []; + append = out.append === undefined || out.append; + if (content.length > 0 && !$h.isArray(content)) { + content = content.split(self.initialPreviewDelimiter); + } + if (content.length) { + self._mergeArray('initialPreview', content); + self._mergeArray('initialPreviewConfig', config); + self._mergeArray('initialPreviewThumbTags', tags); + } + if ($thumb !== undefined) { + if (!allFiles) { + index = self.previewCache.add(content[0], config[0], tags[0], append); + data = self.previewCache.get(index, false); + $div = $h.createElement(data).hide().appendTo($thumb); + $newCache = $div.find('.kv-zoom-cache'); + if ($newCache && $newCache.length) { + $newCache.appendTo($thumb); + } + $thumb.fadeOut('slow', function () { + var $newThumb = $div.find('.file-preview-frame'); + if ($newThumb && $newThumb.length) { + $newThumb.insertBefore($thumb).fadeIn('slow').css('display:inline-block'); + } + self._initPreviewActions(); + self._clearFileInput(); + $thumb.remove(); + $div.remove(); + self._initSortable(); + }); + } else { + id = $thumb.attr('id'); + i = self._getUploadCacheIndex(id); + if (i !== null) { + self.uploadCache[i] = { + id: id, + content: content[0], + config: config[0] || [], + tags: tags[0] || [], + append: append + }; + } + } + } else { + self.previewCache.set(content, config, tags, append); + self._initPreview(); + self._initPreviewActions(); + } + } + self._resetCaption(); + }, + _getUploadCacheIndex: function (id) { + var self = this, i, len = self.uploadCache.length, config; + for (i = 0; i < len; i++) { + config = self.uploadCache[i]; + if (config.id === id) { + return i; + } + } + return null; + }, + _initSuccessThumbs: function () { + var self = this; + if (!self.showPreview) { + return; + } + self._getThumbs($h.FRAMES + '.file-preview-success').each(function () { + var $thumb = $(this), $remove = $thumb.find('.kv-file-remove'); + $remove.removeAttr('disabled'); + self._handler($remove, 'click', function () { + var id = $thumb.attr('id'), + out = self._raise('filesuccessremove', [id, $thumb.attr('data-fileindex')]); + $h.cleanMemory($thumb); + if (out === false) { + return; + } + $thumb.fadeOut('slow', function () { + $thumb.remove(); + if (!self.getFrames().length) { + self.reset(); + } + }); + }); + }); + }, + _updateInitialPreview: function () { + var self = this, u = self.uploadCache; + if (self.showPreview) { + $.each(u, function (key, setting) { + self.previewCache.add(setting.content, setting.config, setting.tags, setting.append); + }); + if (self.hasInitData) { + self._initPreview(); + self._initPreviewActions(); + } + } + }, + _uploadSingle: function (i, id, isBatch) { + var self = this, fm = self.fileManager, count = fm.count(), formdata = new FormData(), outData, + previewId = self._getThumbId(id), $thumb, chkComplete, $btnUpload, $btnDelete, + hasPostData = count > 0 || !$.isEmptyObject(self.uploadExtraData), uploadFailed, $prog, fnBefore, + errMsg, fnSuccess, fnComplete, fnError, updateUploadLog, op = self.ajaxOperations.uploadThumb, + fileObj = fm.getFile(id), params = {id: previewId, index: i, fileId: id}, + fileName = self.fileManager.getFileName(id, true); + if (self.enableResumableUpload) { // not enabled for resumable uploads + return; + } + if (self.showPreview) { + $thumb = self.fileManager.getThumb(id); + $prog = $thumb.find('.file-thumb-progress'); + $btnUpload = $thumb.find('.kv-file-upload'); + $btnDelete = $thumb.find('.kv-file-remove'); + $prog.show(); + } + if (count === 0 || !hasPostData || (self.showPreview && $btnUpload && $btnUpload.hasClass('disabled')) || + self._abort(params)) { + return; + } + updateUploadLog = function () { + if (!uploadFailed) { + fm.removeFile(id); + } else { + fm.errors.push(id); + } + fm.setProcessed(id); + if (fm.isProcessed()) { + self.fileBatchCompleted = true; + chkComplete(); + } + }; + chkComplete = function () { + var $initThumbs; + if (!self.fileBatchCompleted) { + return; + } + setTimeout(function () { + var triggerReset = fm.count() === 0, errCount = fm.errors.length; + self._updateInitialPreview(); + self.unlock(triggerReset); + if (triggerReset) { + self._clearFileInput(); + } + $initThumbs = self.$preview.find('.file-preview-initial'); + if (self.uploadAsync && $initThumbs.length) { + $h.addCss($initThumbs, $h.SORT_CSS); + self._initSortable(); + } + self._raise('filebatchuploadcomplete', [fm.stack, self._getExtraData()]); + if (!self.retryErrorUploads || errCount === 0) { + fm.clear(); + } + self._setProgress(101); + self.ajaxAborted = false; + }, self.processDelay); + }; + fnBefore = function (jqXHR) { + outData = self._getOutData(formdata, jqXHR); + fm.initStats(id); + self.fileBatchCompleted = false; + if (!isBatch) { + self.ajaxAborted = false; + } + if (self.showPreview) { + if (!$thumb.hasClass('file-preview-success')) { + self._setThumbStatus($thumb, 'Loading'); + $h.addCss($thumb, 'file-uploading'); + } + $btnUpload.attr('disabled', true); + $btnDelete.attr('disabled', true); + } + if (!isBatch) { + self.lock(); + } + if (fm.errors.indexOf(id) !== -1) { + delete fm.errors[id]; + } + self._raise('filepreupload', [outData, previewId, i]); + $.extend(true, params, outData); + if (self._abort(params)) { + jqXHR.abort(); + if (!isBatch) { + self._setThumbStatus($thumb, 'New'); + $thumb.removeClass('file-uploading'); + $btnUpload.removeAttr('disabled'); + $btnDelete.removeAttr('disabled'); + self.unlock(); + } + self._setProgressCancelled(); + } + }; + fnSuccess = function (data, textStatus, jqXHR) { + var pid = self.showPreview && $thumb.attr('id') ? $thumb.attr('id') : previewId; + outData = self._getOutData(formdata, jqXHR, data); + $.extend(true, params, outData); + setTimeout(function () { + if ($h.isEmpty(data) || $h.isEmpty(data.error)) { + if (self.showPreview) { + self._setThumbStatus($thumb, 'Success'); + $btnUpload.hide(); + self._initUploadSuccess(data, $thumb, isBatch); + self._setProgress(101, $prog); + } + self._raise('fileuploaded', [outData, pid, i]); + if (!isBatch) { + self.fileManager.remove($thumb); + } else { + updateUploadLog(); + } + } else { + uploadFailed = true; + errMsg = self._parseError(op, jqXHR, self.msgUploadError, self.fileManager.getFileName(id)); + self._showFileError(errMsg, params); + self._setPreviewError($thumb, true); + if (!self.retryErrorUploads) { + $btnUpload.hide(); + } + if (isBatch) { + updateUploadLog(); + } + self._setProgress(101, self._getFrame(pid).find('.file-thumb-progress'), + self.msgUploadError); + } + }, self.processDelay); + }; + fnComplete = function () { + if (self.showPreview) { + $btnUpload.removeAttr('disabled'); + $btnDelete.removeAttr('disabled'); + $thumb.removeClass('file-uploading'); + } + if (!isBatch) { + self.unlock(false); + self._clearFileInput(); + } else { + chkComplete(); + } + self._initSuccessThumbs(); + }; + fnError = function (jqXHR, textStatus, errorThrown) { + errMsg = self._parseError(op, jqXHR, errorThrown, self.fileManager.getFileName(id)); + uploadFailed = true; + setTimeout(function () { + var $prog; + if (isBatch) { + updateUploadLog(); + } + self.fileManager.setProgress(id, 100); + self._setPreviewError($thumb, true); + if (!self.retryErrorUploads) { + $btnUpload.hide(); + } + $.extend(true, params, self._getOutData(formdata, jqXHR)); + self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op)); + $prog = self.showPreview && $thumb ? $thumb.find('.file-thumb-progress') : ''; + self._setProgress(101, $prog, self.msgUploadError); + self._showFileError(errMsg, params); + }, self.processDelay); + }; + self._setFileData(formdata, fileObj.file, fileName, id); + self._setUploadData(formdata, {fileId: id}); + self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, formdata, id, i); + }, + _setFileData: function (formdata, file, fileName, fileId) { + var self = this, preProcess = self.preProcessUpload; + if (preProcess && typeof preProcess === 'function') { + formdata.append(self.uploadFileAttr, preProcess(fileId, file)); + } else { + formdata.append(self.uploadFileAttr, file, fileName); + } + }, + _uploadBatch: function () { + var self = this, fm = self.fileManager, total = fm.total(), params = {}, fnBefore, fnSuccess, fnError, + fnComplete, hasPostData = total > 0 || !$.isEmptyObject(self.uploadExtraData), errMsg, + setAllUploaded, formdata = new FormData(), op = self.ajaxOperations.uploadBatch; + if (total === 0 || !hasPostData || self._abort(params)) { + return; + } + setAllUploaded = function () { + self.fileManager.clear(); + self._clearFileInput(); + }; + fnBefore = function (jqXHR) { + self.lock(); + fm.initStats(); + var outData = self._getOutData(formdata, jqXHR); + self.ajaxAborted = false; + if (self.showPreview) { + self._getThumbs().each(function () { + var $thumb = $(this), $btnUpload = $thumb.find('.kv-file-upload'), + $btnDelete = $thumb.find('.kv-file-remove'); + if (!$thumb.hasClass('file-preview-success')) { + self._setThumbStatus($thumb, 'Loading'); + $h.addCss($thumb, 'file-uploading'); + } + $btnUpload.attr('disabled', true); + $btnDelete.attr('disabled', true); + }); + } + self._raise('filebatchpreupload', [outData]); + if (self._abort(outData)) { + jqXHR.abort(); + self._getThumbs().each(function () { + var $thumb = $(this), $btnUpload = $thumb.find('.kv-file-upload'), + $btnDelete = $thumb.find('.kv-file-remove'); + if ($thumb.hasClass('file-preview-loading')) { + self._setThumbStatus($thumb, 'New'); + $thumb.removeClass('file-uploading'); + } + $btnUpload.removeAttr('disabled'); + $btnDelete.removeAttr('disabled'); + }); + self._setProgressCancelled(); + } + }; + fnSuccess = function (data, textStatus, jqXHR) { + /** @namespace data.errorkeys */ + var outData = self._getOutData(formdata, jqXHR, data), key = 0, + $thumbs = self._getThumbs(':not(.file-preview-success)'), + keys = $h.isEmpty(data) || $h.isEmpty(data.errorkeys) ? [] : data.errorkeys; + + if ($h.isEmpty(data) || $h.isEmpty(data.error)) { + self._raise('filebatchuploadsuccess', [outData]); + setAllUploaded(); + if (self.showPreview) { + $thumbs.each(function () { + var $thumb = $(this); + self._setThumbStatus($thumb, 'Success'); + $thumb.removeClass('file-uploading'); + $thumb.find('.kv-file-upload').hide().removeAttr('disabled'); + }); + self._initUploadSuccess(data); + } else { + self.reset(); + } + self._setProgress(101); + } else { + if (self.showPreview) { + $thumbs.each(function () { + var $thumb = $(this); + $thumb.removeClass('file-uploading'); + $thumb.find('.kv-file-upload').removeAttr('disabled'); + $thumb.find('.kv-file-remove').removeAttr('disabled'); + if (keys.length === 0 || $.inArray(key, keys) !== -1) { + self._setPreviewError($thumb, true); + if (!self.retryErrorUploads) { + $thumb.find('.kv-file-upload').hide(); + self.fileManager.remove($thumb); + } + } else { + $thumb.find('.kv-file-upload').hide(); + self._setThumbStatus($thumb, 'Success'); + self.fileManager.remove($thumb); + } + if (!$thumb.hasClass('file-preview-error') || self.retryErrorUploads) { + key++; + } + }); + self._initUploadSuccess(data); + } + errMsg = self._parseError(op, jqXHR, self.msgUploadError); + self._showFileError(errMsg, outData, 'filebatchuploaderror'); + self._setProgress(101, self.$progress, self.msgUploadError); + } + }; + fnComplete = function () { + self.unlock(); + self._initSuccessThumbs(); + self._clearFileInput(); + self._raise('filebatchuploadcomplete', [self.fileManager.stack, self._getExtraData()]); + }; + fnError = function (jqXHR, textStatus, errorThrown) { + var outData = self._getOutData(formdata, jqXHR); + errMsg = self._parseError(op, jqXHR, errorThrown); + self._showFileError(errMsg, outData, 'filebatchuploaderror'); + self.uploadFileCount = total - 1; + if (!self.showPreview) { + return; + } + self._getThumbs().each(function () { + var $thumb = $(this); + $thumb.removeClass('file-uploading'); + if (self.fileManager.getFile($thumb.attr('data-fileid'))) { + self._setPreviewError($thumb); + } + }); + self._getThumbs().removeClass('file-uploading'); + self._getThumbs(' .kv-file-upload').removeAttr('disabled'); + self._getThumbs(' .kv-file-delete').removeAttr('disabled'); + self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op)); + }; + var ctr = 0; + $.each(self.fileManager.stack, function (key, data) { + if (!$h.isEmpty(data.file)) { + self._setFileData(formdata, data.file, (data.nameFmt || ('untitled_' + ctr)), key); + } + ctr++; + }); + self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, formdata); + }, + _uploadExtraOnly: function () { + var self = this, params = {}, fnBefore, fnSuccess, fnComplete, fnError, formdata = new FormData(), errMsg, + op = self.ajaxOperations.uploadExtra; + if (self._abort(params)) { + return; + } + fnBefore = function (jqXHR) { + self.lock(); + var outData = self._getOutData(formdata, jqXHR); + self._raise('filebatchpreupload', [outData]); + self._setProgress(50); + params.data = outData; + params.xhr = jqXHR; + if (self._abort(params)) { + jqXHR.abort(); + self._setProgressCancelled(); + } + }; + fnSuccess = function (data, textStatus, jqXHR) { + var outData = self._getOutData(formdata, jqXHR, data); + if ($h.isEmpty(data) || $h.isEmpty(data.error)) { + self._raise('filebatchuploadsuccess', [outData]); + self._clearFileInput(); + self._initUploadSuccess(data); + self._setProgress(101); + } else { + errMsg = self._parseError(op, jqXHR, self.msgUploadError); + self._showFileError(errMsg, outData, 'filebatchuploaderror'); + } + }; + fnComplete = function () { + self.unlock(); + self._clearFileInput(); + self._raise('filebatchuploadcomplete', [self.fileManager.stack, self._getExtraData()]); + }; + fnError = function (jqXHR, textStatus, errorThrown) { + var outData = self._getOutData(formdata, jqXHR); + errMsg = self._parseError(op, jqXHR, errorThrown); + params.data = outData; + self._showFileError(errMsg, outData, 'filebatchuploaderror'); + self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op)); + }; + self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, formdata); + }, + _deleteFileIndex: function ($frame) { + var self = this, ind = $frame.attr('data-fileindex'), rev = self.reversePreviewOrder; + if (ind.substring(0, 5) === $h.INIT_FLAG) { + ind = parseInt(ind.replace($h.INIT_FLAG, '')); + self.initialPreview = $h.spliceArray(self.initialPreview, ind, rev); + self.initialPreviewConfig = $h.spliceArray(self.initialPreviewConfig, ind, rev); + self.initialPreviewThumbTags = $h.spliceArray(self.initialPreviewThumbTags, ind, rev); + self.getFrames().each(function () { + var $nFrame = $(this), nInd = $nFrame.attr('data-fileindex'); + if (nInd.substring(0, 5) === $h.INIT_FLAG) { + nInd = parseInt(nInd.replace($h.INIT_FLAG, '')); + if (nInd > ind) { + nInd--; + $nFrame.attr('data-fileindex', $h.INIT_FLAG + nInd); + } + } + }); + } + }, + _resetCaption: function () { + var self = this; + setTimeout(function () { + var cap, n, chk = self.previewCache.count(true), len = self.fileManager.count(), file, + incomplete = ':not(.file-preview-success):not(.file-preview-error)', + hasThumb = self.showPreview && self.getFrames(incomplete).length; + if (len === 0 && chk === 0 && !hasThumb) { + self.reset(); + } else { + n = chk + len; + if (n > 1) { + cap = self._getMsgSelected(n); + } else { + file = self.fileManager.getFirstFile(); + cap = file ? file.nameFmt : '_'; + } + self._setCaption(cap); + } + }, self.processDelay); + }, + _initFileActions: function () { + var self = this; + if (!self.showPreview) { + return; + } + self._initZoomButton(); + self.getFrames(' .kv-file-remove').each(function () { + var $el = $(this), $frame = $el.closest($h.FRAMES), hasError, id = $frame.attr('id'), + ind = $frame.attr('data-fileindex'), status; + self._handler($el, 'click', function () { + status = self._raise('filepreremove', [id, ind]); + if (status === false || !self._validateMinCount()) { + return false; + } + hasError = $frame.hasClass('file-preview-error'); + $h.cleanMemory($frame); + $frame.fadeOut('slow', function () { + self.fileManager.remove($frame); + self._clearObjects($frame); + $frame.remove(); + if (id && hasError) { + self.$errorContainer.find('li[data-thumb-id="' + id + '"]').fadeOut('fast', function () { + $(this).remove(); + if (!self._errorsExist()) { + self._resetErrors(); + } + }); + } + self._clearFileInput(); + self._resetCaption(); + self._raise('fileremoved', [id, ind]); + }); + }); + }); + self.getFrames(' .kv-file-upload').each(function () { + var $el = $(this); + self._handler($el, 'click', function () { + var $frame = $el.closest($h.FRAMES), fileId = $frame.attr('data-fileid'); + self._hideProgress(); + if ($frame.hasClass('file-preview-error') && !self.retryErrorUploads) { + return; + } + self._uploadSingle(self.fileManager.getIndex(fileId), fileId, false); + }); + }); + }, + _initPreviewActions: function () { + var self = this, $preview = self.$preview, deleteExtraData = self.deleteExtraData || {}, + btnRemove = $h.FRAMES + ' .kv-file-remove', settings = self.fileActionSettings, + origClass = settings.removeClass, errClass = settings.removeErrorClass, + resetProgress = function () { + var hasFiles = self.isAjaxUpload ? self.previewCache.count(true) : self._inputFileCount(); + if (!self.getFrames().length && !hasFiles) { + self._setCaption(''); + self.reset(); + self.initialCaption = ''; + } + }; + self._initZoomButton(); + $preview.find(btnRemove).each(function () { + var $el = $(this), vUrl = $el.data('url') || self.deleteUrl, vKey = $el.data('key'), errMsg, fnBefore, + fnSuccess, fnError, op = self.ajaxOperations.deleteThumb; + if ($h.isEmpty(vUrl) || vKey === undefined) { + return; + } + if (typeof vUrl === 'function') { + vUrl = vUrl(); + } + var $frame = $el.closest($h.FRAMES), cache = self.previewCache.data, settings, params, config, + fileName, extraData, index = $frame.attr('data-fileindex'); + index = parseInt(index.replace($h.INIT_FLAG, '')); + config = $h.isEmpty(cache.config) && $h.isEmpty(cache.config[index]) ? null : cache.config[index]; + extraData = $h.isEmpty(config) || $h.isEmpty(config.extra) ? deleteExtraData : config.extra; + fileName = config && (config.filename || config.caption) || ''; + if (typeof extraData === 'function') { + extraData = extraData(); + } + params = {id: $el.attr('id'), key: vKey, extra: extraData}; + fnBefore = function (jqXHR) { + self.ajaxAborted = false; + self._raise('filepredelete', [vKey, jqXHR, extraData]); + if (self._abort()) { + jqXHR.abort(); + } else { + $el.removeClass(errClass); + $h.addCss($frame, 'file-uploading'); + $h.addCss($el, 'disabled ' + origClass); + } + }; + fnSuccess = function (data, textStatus, jqXHR) { + var n, cap; + if (!$h.isEmpty(data) && !$h.isEmpty(data.error)) { + params.jqXHR = jqXHR; + params.response = data; + errMsg = self._parseError(op, jqXHR, self.msgDeleteError, fileName); + self._showFileError(errMsg, params, 'filedeleteerror'); + $frame.removeClass('file-uploading'); + $el.removeClass('disabled ' + origClass).addClass(errClass); + resetProgress(); + return; + } + $frame.removeClass('file-uploading').addClass('file-deleted'); + $frame.fadeOut('slow', function () { + index = parseInt(($frame.attr('data-fileindex')).replace($h.INIT_FLAG, '')); + self.previewCache.unset(index); + self._deleteFileIndex($frame); + n = self.previewCache.count(true); + cap = n > 0 ? self._getMsgSelected(n) : ''; + self._setCaption(cap); + self._raise('filedeleted', [vKey, jqXHR, extraData]); + self._clearObjects($frame); + $frame.remove(); + resetProgress(); + }); + }; + fnError = function (jqXHR, textStatus, errorThrown) { + var errMsg = self._parseError(op, jqXHR, errorThrown, fileName); + params.jqXHR = jqXHR; + params.response = {}; + self._showFileError(errMsg, params, 'filedeleteerror'); + $frame.removeClass('file-uploading'); + $el.removeClass('disabled ' + origClass).addClass(errClass); + resetProgress(); + }; + self._initAjaxSettings(); + self._mergeAjaxCallback('beforeSend', fnBefore, 'delete'); + self._mergeAjaxCallback('success', fnSuccess, 'delete'); + self._mergeAjaxCallback('error', fnError, 'delete'); + settings = $.extend(true, {}, { + url: self._encodeURI(vUrl), + type: 'POST', + dataType: 'json', + data: $.extend(true, {}, {key: vKey}, extraData) + }, self._ajaxDeleteSettings); + self._handler($el, 'click', function () { + if (!self._validateMinCount()) { + return false; + } + self.ajaxAborted = false; + self._raise('filebeforedelete', [vKey, extraData]); + if (self.ajaxAborted instanceof Promise) { + self.ajaxAborted.then(function (result) { + if (!result) { + $.ajax(settings); + } + }); + } else { + if (!self.ajaxAborted) { + $.ajax(settings); + } + } + }); + }); + }, + _hideFileIcon: function () { + var self = this; + if (self.overwriteInitial) { + self.$captionContainer.removeClass('icon-visible'); + } + }, + _showFileIcon: function () { + var self = this; + $h.addCss(self.$captionContainer, 'icon-visible'); + }, + _getSize: function (bytes, sizes) { + var self = this, size = parseFloat(bytes), i, func = self.fileSizeGetter, out; + if (!$.isNumeric(bytes) || !$.isNumeric(size)) { + return ''; + } + if (typeof func === 'function') { + out = func(size); + } else { + if (size === 0) { + out = '0.00 B'; + } else { + i = Math.floor(Math.log(size) / Math.log(1024)); + if (!sizes) { + sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + } + out = (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i]; + } + } + return self._getLayoutTemplate('size').replace('{sizeText}', out); + }, + _getFileType: function (ftype) { + var self = this; + return self.mimeTypeAliases[ftype] || ftype; + }, + _generatePreviewTemplate: function ( + cat, + data, + fname, + ftype, + previewId, + fileId, + isError, + size, + frameClass, + foot, + ind, + templ, + attrs, + zoomData + ) { + var self = this, caption = self.slug(fname), prevContent, zoomContent = '', styleAttribs = '', + screenW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, + config, title = caption, alt = caption, typeCss = 'type-default', getContent, + footer = foot || self._renderFileFooter(cat, caption, size, 'auto', isError), + forcePrevIcon = self.preferIconicPreview, forceZoomIcon = self.preferIconicZoomPreview, + newCat = forcePrevIcon ? 'other' : cat; + config = screenW < 400 ? (self.previewSettingsSmall[newCat] || self.defaults.previewSettingsSmall[newCat]) : + (self.previewSettings[newCat] || self.defaults.previewSettings[newCat]); + if (config) { + $.each(config, function (key, val) { + styleAttribs += key + ':' + val + ';'; + }); + } + getContent = function (c, d, zoom, frameCss) { + var id = zoom ? 'zoom-' + previewId : previewId, tmplt = self._getPreviewTemplate(c), + css = (frameClass || '') + ' ' + frameCss; + if (self.frameClass) { + css = self.frameClass + ' ' + css; + } + if (zoom) { + css = css.replace(' ' + $h.SORT_CSS, ''); + } + tmplt = self._parseFilePreviewIcon(tmplt, fname); + if (cat === 'object' && !ftype) { + $.each(self.defaults.fileTypeSettings, function (key, func) { + if (key === 'object' || key === 'other') { + return; + } + if (func(fname, ftype)) { + typeCss = 'type-' + key; + } + }); + } + if (!$h.isEmpty(attrs)) { + if (attrs.title !== undefined && attrs.title !== null) { + title = attrs.title; + } + if (attrs.alt !== undefined && attrs.alt !== null) { + title = attrs.alt; + } + } + return tmplt.setTokens({ + 'previewId': id, + 'caption': caption, + 'title': title, + 'alt': alt, + 'frameClass': css, + 'type': self._getFileType(ftype), + 'fileindex': ind, + 'fileid': fileId || '', + 'typeCss': typeCss, + 'footer': footer, + 'data': d, + 'template': templ || cat, + 'style': styleAttribs ? 'style="' + styleAttribs + '"' : '' + }); + }; + ind = ind || previewId.slice(previewId.lastIndexOf('-') + 1); + if (self.fileActionSettings.showZoom) { + zoomContent = getContent((forceZoomIcon ? 'other' : cat), zoomData ? zoomData : data, true, + 'kv-zoom-thumb'); + } + zoomContent = '\n' + self._getLayoutTemplate('zoomCache').replace('{zoomContent}', zoomContent); + if (typeof self.sanitizeZoomCache === 'function') { + zoomContent = self.sanitizeZoomCache(zoomContent); + } + prevContent = getContent((forcePrevIcon ? 'other' : cat), data, false, 'kv-preview-thumb'); + return prevContent.setTokens({zoomCache: zoomContent}); + }, + _addToPreview: function ($preview, content) { + var self = this, $el; + content = $h.cspBuffer.stash(content); + $el = self.reversePreviewOrder ? $preview.prepend(content) : $preview.append(content); + $h.cspBuffer.apply($preview); + return $el; + }, + _previewDefault: function (file, isDisabled) { + var self = this, $preview = self.$preview; + if (!self.showPreview) { + return; + } + var fname = $h.getFileName(file), ftype = file ? file.type : '', content, size = file.size || 0, + caption = self._getFileName(file, ''), isError = isDisabled === true && !self.isAjaxUpload, + data = $h.createObjectURL(file), fileId = self.fileManager.getId(file), + previewId = self._getThumbId(fileId); + self._clearDefaultPreview(); + content = self._generatePreviewTemplate('other', data, fname, ftype, previewId, fileId, isError, size); + self._addToPreview($preview, content); + self._setThumbAttr(previewId, caption, size); + if (isDisabled === true && self.isAjaxUpload) { + self._setThumbStatus(self._getFrame(previewId), 'Error'); + } + }, + _previewFile: function (i, file, theFile, data, fileInfo) { + if (!this.showPreview) { + return; + } + var self = this, fname = $h.getFileName(file), ftype = fileInfo.type, caption = fileInfo.name, + cat = self._parseFileType(ftype, fname), content, $preview = self.$preview, fsize = file.size || 0, + iData = cat === 'image' ? theFile.target.result : data, + fileId = self.fileManager.getId(file), previewId = self._getThumbId(fileId); + /** @namespace window.DOMPurify */ + content = self._generatePreviewTemplate(cat, iData, fname, ftype, previewId, fileId, false, fsize); + self._clearDefaultPreview(); + self._addToPreview($preview, content); + var $thumb = self._getFrame(previewId); + self._validateImageOrientation($thumb.find('img'), file, previewId, fileId, caption, ftype, fsize, iData); + self._setThumbAttr(previewId, caption, fsize); + self._initSortable(); + }, + _setThumbAttr: function (id, caption, size) { + var self = this, $frame = self._getFrame(id); + if ($frame.length) { + size = size && size > 0 ? self._getSize(size) : ''; + $frame.data({'caption': caption, 'size': size}); + } + }, + _setInitThumbAttr: function () { + var self = this, data = self.previewCache.data, len = self.previewCache.count(true), config, + caption, size, previewId; + if (len === 0) { + return; + } + for (var i = 0; i < len; i++) { + config = data.config[i]; + previewId = self.previewInitId + '-' + $h.INIT_FLAG + i; + caption = $h.ifSet('caption', config, $h.ifSet('filename', config)); + size = $h.ifSet('size', config); + self._setThumbAttr(previewId, caption, size); + } + }, + _slugDefault: function (text) { + // noinspection RegExpRedundantEscape + return $h.isEmpty(text, true) ? '' : String(text).replace(/[\[\]\/\{}:;#%=\(\)\*\+\?\\\^\$\|<>&"']/g, '_'); + }, + _updateFileDetails: function (numFiles, skipRaiseEvent) { + var self = this, $el = self.$element, label, n, log, nFiles, file, + name = ($h.isIE(9) && $h.findFileName($el.val())) || ($el[0].files[0] && $el[0].files[0].name); + if (!name && self.fileManager.count() > 0) { + file = self.fileManager.getFirstFile(); + label = file.nameFmt; + } else { + label = name ? self.slug(name) : '_'; + } + n = self.isAjaxUpload ? self.fileManager.count() : numFiles; + nFiles = self.previewCache.count(true) + n; + log = n === 1 ? label : self._getMsgSelected(nFiles); + if (self.isError) { + self.$previewContainer.removeClass('file-thumb-loading'); + self.$previewStatus.html(''); + self.$captionContainer.removeClass('icon-visible'); + } else { + self._showFileIcon(); + } + self._setCaption(log, self.isError); + self.$container.removeClass('file-input-new file-input-ajax-new'); + if (!skipRaiseEvent) { + self._raise('fileselect', [numFiles, label]); + } + if (self.previewCache.count(true)) { + self._initPreviewActions(); + } + }, + _setThumbStatus: function ($thumb, status) { + var self = this; + if (!self.showPreview) { + return; + } + var icon = 'indicator' + status, msg = icon + 'Title', + css = 'file-preview-' + status.toLowerCase(), + $indicator = $thumb.find('.file-upload-indicator'), + config = self.fileActionSettings; + $thumb.removeClass('file-preview-success file-preview-error file-preview-paused file-preview-loading'); + if (status === 'Success') { + $thumb.find('.file-drag-handle').remove(); + } + $h.setHtml($indicator, config[icon]); + $indicator.attr('title', config[msg]); + $thumb.addClass(css); + if (status === 'Error' && !self.retryErrorUploads) { + $thumb.find('.kv-file-upload').attr('disabled', true); + } + }, + _setProgressCancelled: function () { + var self = this; + self._setProgress(101, self.$progress, self.msgCancelled); + }, + _setProgress: function (p, $el, error, stats) { + var self = this; + $el = $el || self.$progress; + if (!$el.length) { + return; + } + var pct = Math.min(p, 100), out, pctLimit = self.progressUploadThreshold, + t = p <= 100 ? self.progressTemplate : self.progressCompleteTemplate, + template = pct < 100 ? self.progressTemplate : + (error ? (self.paused ? self.progressPauseTemplate : self.progressErrorTemplate) : t); + if (p >= 100) { + stats = ''; + } + if (!$h.isEmpty(template)) { + if (pctLimit && pct > pctLimit && p <= 100) { + out = template.setTokens({'percent': pctLimit, 'status': self.msgUploadThreshold}); + } else { + out = template.setTokens({'percent': pct, 'status': (p > 100 ? self.msgUploadEnd : pct + '%')}); + } + stats = stats || ''; + out = out.setTokens({stats: stats}); + $h.setHtml($el, out); + if (error) { + $h.setHtml($el.find('[role="progressbar"]'), error); + } + } + }, + _hasFiles: function () { + var el = this.$element[0]; + return !!(el && el.files && el.files.length); + }, + _setFileDropZoneTitle: function () { + var self = this, $zone = self.$container.find('.file-drop-zone'), title = self.dropZoneTitle, strFiles; + if (self.isClickable) { + strFiles = $h.isEmpty(self.$element.attr('multiple')) ? self.fileSingle : self.filePlural; + title += self.dropZoneClickTitle.replace('{files}', strFiles); + } + $zone.find('.' + self.dropZoneTitleClass).remove(); + if (!self.showPreview || $zone.length === 0 || self.fileManager.count() > 0 || !self.dropZoneEnabled || + self.previewCache.count() > 0 || (!self.isAjaxUpload && self._hasFiles())) { + return; + } + if ($zone.find($h.FRAMES).length === 0 && $h.isEmpty(self.defaultPreviewContent)) { + $zone.prepend('
    ' + title + '
    '); + } + self.$container.removeClass('file-input-new'); + $h.addCss(self.$container, 'file-input-ajax-new'); + }, + _getStats: function (stats) { + var self = this, pendingTime, t; + if (!self.showUploadStats || !stats || !stats.bitrate) { + return ''; + } + t = self._getLayoutTemplate('stats'); + pendingTime = (!stats.elapsed || !stats.bps) ? self.msgCalculatingTime : + self.msgPendingTime.setTokens({time: $h.getElapsed(Math.ceil(stats.pendingBytes / stats.bps))}); + + return t.setTokens({ + uploadSpeed: stats.bitrate, + pendingTime: pendingTime + }); + }, + _setResumableProgress: function (pct, stats, $thumb) { + var self = this, rm = self.resumableManager, obj = $thumb ? rm : self, + $prog = $thumb ? $thumb.find('.file-thumb-progress') : null; + if (obj.lastProgress === 0) { + obj.lastProgress = pct; + } + if (pct < obj.lastProgress) { + pct = obj.lastProgress; + } + self._setProgress(pct, $prog, null, self._getStats(stats)); + obj.lastProgress = pct; + }, + _toggleResumableProgress: function (template, message) { + var self = this, $progress = self.$progress; + if ($progress && $progress.length) { + $h.setHtml($progress, template.setTokens({ + percent: 101, + status: message, + stats: '' + })); + } + }, + _setFileUploadStats: function (id, pct, stats) { + var self = this, $prog = self.$progress; + if (!self.showPreview && (!$prog || !$prog.length)) { + return; + } + var fm = self.fileManager, rm = self.resumableManager, $thumb = fm.getThumb(id), pctTot, + totUpSize = 0, totSize = fm.getTotalSize(), totStats = $.extend(true, {}, stats); + if (self.enableResumableUpload) { + var loaded = stats.loaded, currUplSize = rm.getUploadedSize(), currTotSize = rm.file.size, totLoaded; + loaded += currUplSize; + totLoaded = fm.uploadedSize + loaded; + pct = $h.round(100 * loaded / currTotSize); + stats.pendingBytes = currTotSize - currUplSize; + self._setResumableProgress(pct, stats, $thumb); + pctTot = Math.floor(100 * totLoaded / totSize); + totStats.pendingBytes = totSize - totLoaded; + self._setResumableProgress(pctTot, totStats); + } else { + fm.setProgress(id, pct); + $prog = $thumb && $thumb.length ? $thumb.find('.file-thumb-progress') : null; + self._setProgress(pct, $prog, null, self._getStats(stats)); + $.each(fm.stats, function (id, cfg) { + totUpSize += cfg.loaded; + }); + totStats.pendingBytes = totSize - totUpSize; + pctTot = $h.round(totUpSize / totSize * 100); + self._setProgress(pctTot, null, null, self._getStats(totStats)); + } + }, + _validateMinCount: function () { + var self = this, len = self.isAjaxUpload ? self.fileManager.count() : self._inputFileCount(); + if (self.validateInitialCount && self.minFileCount > 0 && self._getFileCount(len - 1) < self.minFileCount) { + self._noFilesError({}); + return false; + } + return true; + }, + _getFileCount: function (fileCount, includeInitial) { + var self = this, addCount = 0; + if (includeInitial === undefined) { + includeInitial = self.validateInitialCount && !self.overwriteInitial; + } + if (includeInitial) { + addCount = self.previewCache.count(true); + fileCount += addCount; + } + return fileCount; + }, + _getFileId: function (file) { + return $h.getFileId(file, this.generateFileId); + }, + _getFileName: function (file, defaultValue) { + var self = this, fileName = $h.getFileName(file); + return fileName ? self.slug(fileName) : defaultValue; + }, + _getFileNames: function (skipNull) { + var self = this; + return self.filenames.filter(function (n) { + return (skipNull ? n !== undefined : n !== undefined && n !== null); + }); + }, + _setPreviewError: function ($thumb, keepFile) { + var self = this, removeFrame = self.removeFromPreviewOnError && !self.retryErrorUploads; + if (!keepFile || removeFrame) { + self.fileManager.remove($thumb); + } + if (!self.showPreview) { + return; + } + if (removeFrame) { + $thumb.remove(); + return; + } else { + self._setThumbStatus($thumb, 'Error'); + } + self._refreshUploadButton($thumb); + }, + _refreshUploadButton: function ($thumb) { + var self = this, $btn = $thumb.find('.kv-file-upload'), cfg = self.fileActionSettings, + icon = cfg.uploadIcon, title = cfg.uploadTitle; + if (!$btn.length) { + return; + } + if (self.retryErrorUploads) { + icon = cfg.uploadRetryIcon; + title = cfg.uploadRetryTitle; + } + $btn.attr('title', title); + $h.setHtml($btn, icon); + }, + _checkDimensions: function (i, chk, $img, $thumb, fname, type, params) { + var self = this, msg, dim, tag = chk === 'Small' ? 'min' : 'max', limit = self[tag + 'Image' + type], + $imgEl, isValid; + if ($h.isEmpty(limit) || !$img.length) { + return; + } + $imgEl = $img[0]; + dim = (type === 'Width') ? $imgEl.naturalWidth || $imgEl.width : $imgEl.naturalHeight || $imgEl.height; + isValid = chk === 'Small' ? dim >= limit : dim <= limit; + if (isValid) { + return; + } + msg = self['msgImage' + type + chk].setTokens({'name': fname, 'size': limit}); + self._showFileError(msg, params); + self._setPreviewError($thumb); + }, + _getExifObj: function (data) { + var self = this, exifObj, error = $h.logMessages.exifWarning; + if (data.slice(0, 23) !== 'data:image/jpeg;base64,' && data.slice(0, 22) !== 'data:image/jpg;base64,') { + exifObj = null; + return; + } + try { + exifObj = window.piexif ? window.piexif.load(data) : null; + } catch (err) { + exifObj = null; + error = err && err.message || ''; + } + if (!exifObj) { + self._log($h.logMessages.badExifParser, {details: error}); + } + return exifObj; + }, + setImageOrientation: function ($img, $zoomImg, value, $thumb) { + var self = this, invalidImg = !$img || !$img.length, invalidZoomImg = !$zoomImg || !$zoomImg.length, $mark, + isHidden = false, $div, zoomOnly = invalidImg && $thumb && $thumb.attr('data-template') === 'image', ev; + if (invalidImg && invalidZoomImg) { + return; + } + ev = 'load.fileinputimageorient'; + if (zoomOnly) { + $img = $zoomImg; + $zoomImg = null; + $img.css(self.previewSettings.image); + $div = $(document.createElement('div')).appendTo($thumb.find('.kv-file-content')); + $mark = $(document.createElement('span')).insertBefore($img); + $img.css('visibility', 'hidden').removeClass('file-zoom-detail').appendTo($div); + } else { + isHidden = !$img.is(':visible'); + } + $img.off(ev).on(ev, function () { + if (isHidden) { + self.$preview.removeClass('hide-content'); + $thumb.find('.kv-file-content').css('visibility', 'hidden'); + } + var img = $img[0], zoomImg = $zoomImg && $zoomImg.length ? $zoomImg[0] : null, + h = img.offsetHeight, w = img.offsetWidth, r = $h.getRotation(value); + if (isHidden) { + $thumb.find('.kv-file-content').css('visibility', 'visible'); + self.$preview.addClass('hide-content'); + } + $img.data('orientation', value); + if (zoomImg) { + $zoomImg.data('orientation', value); + } + if (value < 5) { + $h.setTransform(img, r); + $h.setTransform(zoomImg, r); + return; + } + var offsetAngle = Math.atan(w / h), origFactor = Math.sqrt(Math.pow(h, 2) + Math.pow(w, 2)), + scale = !origFactor ? 1 : (h / Math.cos(Math.PI / 2 + offsetAngle)) / origFactor, + s = ' scale(' + Math.abs(scale) + ')'; + $h.setTransform(img, r + s); + $h.setTransform(zoomImg, r + s); + if (zoomOnly) { + $img.css('visibility', 'visible').insertAfter($mark).addClass('file-zoom-detail'); + $mark.remove(); + $div.remove(); + } + }); + }, + _validateImageOrientation: function ($img, file, previewId, fileId, caption, ftype, fsize, iData) { + var self = this, exifObj, value, autoOrientImage = self.autoOrientImage, selector; + if (self.canOrientImage) { + $img.css('image-orientation', (autoOrientImage ? 'from-image' : 'none')); + return; + } + selector = $h.getZoomSelector(previewId, ' img'); + exifObj = autoOrientImage ? self._getExifObj(iData) : null; + value = exifObj ? exifObj['0th'][piexif.ImageIFD.Orientation] : null; // jshint ignore:line + if (!value) { + self._validateImage(previewId, fileId, caption, ftype, fsize, iData, exifObj); + return; + } + self.setImageOrientation($img, $(selector), value, self._getFrame(previewId)); + self._raise('fileimageoriented', {'$img': $img, 'file': file}); + self._validateImage(previewId, fileId, caption, ftype, fsize, iData, exifObj); + }, + _validateImage: function (previewId, fileId, fname, ftype, fsize, iData, exifObj) { + var self = this, $preview = self.$preview, params, w1, w2, $thumb = self._getFrame(previewId), + i = $thumb.attr('data-fileindex'), $img = $thumb.find('img'); + fname = fname || 'Untitled'; + $img.one('load', function () { + w1 = $thumb.width(); + w2 = $preview.width(); + if (w1 > w2) { + $img.css('width', '100%'); + } + params = {ind: i, id: previewId, fileId: fileId}; + self._checkDimensions(i, 'Small', $img, $thumb, fname, 'Width', params); + self._checkDimensions(i, 'Small', $img, $thumb, fname, 'Height', params); + if (!self.resizeImage) { + self._checkDimensions(i, 'Large', $img, $thumb, fname, 'Width', params); + self._checkDimensions(i, 'Large', $img, $thumb, fname, 'Height', params); + } + self._raise('fileimageloaded', [previewId]); + self.fileManager.addImage(fileId, { + ind: i, + img: $img, + thumb: $thumb, + pid: previewId, + typ: ftype, + siz: fsize, + validated: false, + imgData: iData, + exifObj: exifObj + }); + $thumb.data('exif', exifObj); + self._validateAllImages(); + }).one('error', function () { + self._raise('fileimageloaderror', [previewId]); + }).each(function () { + if (this.complete) { + $(this).trigger('load'); + } else { + if (this.error) { + $(this).trigger('error'); + } + } + }); + }, + _validateAllImages: function () { + var self = this, counter = {val: 0}, numImgs = self.fileManager.getImageCount(), fsize, + minSize = self.resizeIfSizeMoreThan; + if (numImgs !== self.fileManager.totalImages) { + return; + } + self._raise('fileimagesloaded'); + if (!self.resizeImage) { + return; + } + $.each(self.fileManager.loadedImages, function (id, config) { + if (!config.validated) { + fsize = config.siz; + if (fsize && fsize > minSize * 1000) { + self._getResizedImage(id, config, counter, numImgs); + } + config.validated = true; + } + }); + }, + _getResizedImage: function (id, config, counter, numImgs) { + var self = this, img = $(config.img)[0], width = img.naturalWidth, height = img.naturalHeight, blob, + ratio = 1, maxWidth = self.maxImageWidth || width, maxHeight = self.maxImageHeight || height, + isValidImage = !!(width && height), chkWidth, chkHeight, canvas = self.imageCanvas, dataURI, + context = self.imageCanvasContext, type = config.typ, pid = config.pid, ind = config.ind, + $thumb = config.thumb, throwError, msg, exifObj = config.exifObj, exifStr, file, params, evParams; + throwError = function (msg, params, ev) { + if (self.isAjaxUpload) { + self._showFileError(msg, params, ev); + } else { + self._showError(msg, params, ev); + } + self._setPreviewError($thumb); + }; + file = self.fileManager.getFile(id); + params = {id: pid, 'index': ind, fileId: id}; + evParams = [id, pid, ind]; + if (!file || !isValidImage || (width <= maxWidth && height <= maxHeight)) { + if (isValidImage && file) { + self._raise('fileimageresized', evParams); + } + counter.val++; + if (counter.val === numImgs) { + self._raise('fileimagesresized'); + } + if (!isValidImage) { + throwError(self.msgImageResizeError, params, 'fileimageresizeerror'); + return; + } + } + type = type || self.resizeDefaultImageType; + chkWidth = width > maxWidth; + chkHeight = height > maxHeight; + if (self.resizePreference === 'width') { + ratio = chkWidth ? maxWidth / width : (chkHeight ? maxHeight / height : 1); + } else { + ratio = chkHeight ? maxHeight / height : (chkWidth ? maxWidth / width : 1); + } + self._resetCanvas(); + width *= ratio; + height *= ratio; + canvas.width = width; + canvas.height = height; + try { + context.drawImage(img, 0, 0, width, height); + dataURI = canvas.toDataURL(type, self.resizeQuality); + if (exifObj) { + exifStr = window.piexif.dump(exifObj); + dataURI = window.piexif.insert(exifStr, dataURI); + } + blob = $h.dataURI2Blob(dataURI); + self.fileManager.setFile(id, blob); + self._raise('fileimageresized', evParams); + counter.val++; + if (counter.val === numImgs) { + self._raise('fileimagesresized', [undefined, undefined]); + } + if (!(blob instanceof Blob)) { + throwError(self.msgImageResizeError, params, 'fileimageresizeerror'); + } + } catch (err) { + counter.val++; + if (counter.val === numImgs) { + self._raise('fileimagesresized', [undefined, undefined]); + } + msg = self.msgImageResizeException.replace('{errors}', err.message); + throwError(msg, params, 'fileimageresizeexception'); + } + }, + _showProgress: function () { + var self = this; + if (self.$progress && self.$progress.length) { + self.$progress.show(); + } + }, + _hideProgress: function () { + var self = this; + if (self.$progress && self.$progress.length) { + self.$progress.hide(); + } + }, + _initBrowse: function ($container) { + var self = this, $el = self.$element; + if (self.showBrowse) { + self.$btnFile = $container.find('.btn-file').append($el); + } else { + $el.appendTo($container).attr('tabindex', -1); + $h.addCss($el, 'file-no-browse'); + } + }, + _initClickable: function () { + var self = this, $zone, $tmpZone; + if (!self.isClickable) { + return; + } + $zone = self.$dropZone; + if (!self.isAjaxUpload) { + $tmpZone = self.$preview.find('.file-default-preview'); + if ($tmpZone.length) { + $zone = $tmpZone; + } + } + + $h.addCss($zone, 'clickable'); + $zone.attr('tabindex', -1); + self._handler($zone, 'click', function (e) { + var $tar = $(e.target); + if (!$(self.elErrorContainer + ':visible').length && + (!$tar.parents('.file-preview-thumbnails').length || $tar.parents( + '.file-default-preview').length)) { + self.$element.data('zoneClicked', true).trigger('click'); + $zone.blur(); + } + }); + }, + _initCaption: function () { + var self = this, cap = self.initialCaption || ''; + if (self.overwriteInitial || $h.isEmpty(cap)) { + self.$caption.val(''); + return false; + } + self._setCaption(cap); + return true; + }, + _setCaption: function (content, isError) { + var self = this, title, out, icon, n, cap, file; + if (!self.$caption.length) { + return; + } + self.$captionContainer.removeClass('icon-visible'); + if (isError) { + title = $('
    ' + self.msgValidationError + '
    ').text(); + n = self.fileManager.count(); + if (n) { + file = self.fileManager.getFirstFile(); + cap = n === 1 && file ? file.nameFmt : self._getMsgSelected(n); + } else { + cap = self._getMsgSelected(self.msgNo); + } + out = $h.isEmpty(content) ? cap : content; + icon = '' + self.msgValidationErrorIcon + ''; + } else { + if ($h.isEmpty(content)) { + return; + } + title = $('
    ' + content + '
    ').text(); + out = title; + icon = self._getLayoutTemplate('fileIcon'); + } + self.$captionContainer.addClass('icon-visible'); + self.$caption.attr('title', title).val(out); + $h.setHtml(self.$captionIcon, icon); + }, + _createContainer: function () { + var self = this, attribs = {'class': 'file-input file-input-new' + (self.rtl ? ' kv-rtl' : '')}, + $container = $h.createElement($h.cspBuffer.stash(self._renderMain())); + $h.cspBuffer.apply($container); + $container.insertBefore(self.$element).attr(attribs); + self._initBrowse($container); + if (self.theme) { + $container.addClass('theme-' + self.theme); + } + return $container; + }, + _refreshContainer: function () { + var self = this, $container = self.$container, $el = self.$element; + $el.insertAfter($container); + $h.setHtml($container, self._renderMain()); + self._initBrowse($container); + self._validateDisabled(); + }, + _validateDisabled: function () { + var self = this; + self.$caption.attr({readonly: self.isDisabled}); + }, + _renderMain: function () { + var self = this, + dropCss = self.dropZoneEnabled ? ' file-drop-zone' : 'file-drop-disabled', + close = !self.showClose ? '' : self._getLayoutTemplate('close'), + preview = !self.showPreview ? '' : self._getLayoutTemplate('preview') + .setTokens({'class': self.previewClass, 'dropClass': dropCss}), + css = self.isDisabled ? self.captionClass + ' file-caption-disabled' : self.captionClass, + caption = self.captionTemplate.setTokens({'class': css + ' kv-fileinput-caption'}); + return self.mainTemplate.setTokens({ + 'class': self.mainClass + (!self.showBrowse && self.showCaption ? ' no-browse' : ''), + 'preview': preview, + 'close': close, + 'caption': caption, + 'upload': self._renderButton('upload'), + 'remove': self._renderButton('remove'), + 'cancel': self._renderButton('cancel'), + 'pause': self._renderButton('pause'), + 'browse': self._renderButton('browse') + }); + + }, + _renderButton: function (type) { + var self = this, tmplt = self._getLayoutTemplate('btnDefault'), css = self[type + 'Class'], + title = self[type + 'Title'], icon = self[type + 'Icon'], label = self[type + 'Label'], + status = self.isDisabled ? ' disabled' : '', btnType = 'button'; + switch (type) { + case 'remove': + if (!self.showRemove) { + return ''; + } + break; + case 'cancel': + if (!self.showCancel) { + return ''; + } + css += ' kv-hidden'; + break; + case 'pause': + if (!self.showPause) { + return ''; + } + css += ' kv-hidden'; + break; + case 'upload': + if (!self.showUpload) { + return ''; + } + if (self.isAjaxUpload && !self.isDisabled) { + tmplt = self._getLayoutTemplate('btnLink').replace('{href}', self.uploadUrl); + } else { + btnType = 'submit'; + } + break; + case 'browse': + if (!self.showBrowse) { + return ''; + } + tmplt = self._getLayoutTemplate('btnBrowse'); + break; + default: + return ''; + } + + css += type === 'browse' ? ' btn-file' : ' fileinput-' + type + ' fileinput-' + type + '-button'; + if (!$h.isEmpty(label)) { + label = ' ' + label + ''; + } + return tmplt.setTokens({ + 'type': btnType, 'css': css, 'title': title, 'status': status, 'icon': icon, 'label': label + }); + }, + _renderThumbProgress: function () { + var self = this; + return '
    ' + + self.progressInfoTemplate.setTokens({percent: 101, status: self.msgUploadBegin, stats: ''}) + + '
    '; + }, + _renderFileFooter: function (cat, caption, size, width, isError) { + var self = this, config = self.fileActionSettings, rem = config.showRemove, drg = config.showDrag, + upl = config.showUpload, zoom = config.showZoom, out, params, + template = self._getLayoutTemplate('footer'), tInd = self._getLayoutTemplate('indicator'), + ind = isError ? config.indicatorError : config.indicatorNew, + title = isError ? config.indicatorErrorTitle : config.indicatorNewTitle, + indicator = tInd.setTokens({'indicator': ind, 'indicatorTitle': title}); + size = self._getSize(size); + params = {type: cat, caption: caption, size: size, width: width, progress: '', indicator: indicator}; + if (self.isAjaxUpload) { + params.progress = self._renderThumbProgress(); + params.actions = self._renderFileActions(params, upl, false, rem, zoom, drg, false, false, false); + } else { + params.actions = self._renderFileActions(params, false, false, false, zoom, drg, false, false, false); + } + out = template.setTokens(params); + out = $h.replaceTags(out, self.previewThumbTags); + return out; + }, + _renderFileActions: function ( + cfg, + showUpl, + showDwn, + showDel, + showZoom, + showDrag, + disabled, + url, + key, + isInit, + dUrl, + dFile + ) { + var self = this; + if (!cfg.type && isInit) { + cfg.type = 'image'; + } + if (self.enableResumableUpload) { + showUpl = false; + } else { + if (typeof showUpl === 'function') { + showUpl = showUpl(cfg); + } + } + if (typeof showDwn === 'function') { + showDwn = showDwn(cfg); + } + if (typeof showDel === 'function') { + showDel = showDel(cfg); + } + if (typeof showZoom === 'function') { + showZoom = showZoom(cfg); + } + if (typeof showDrag === 'function') { + showDrag = showDrag(cfg); + } + if (!showUpl && !showDwn && !showDel && !showZoom && !showDrag) { + return ''; + } + var vUrl = url === false ? '' : ' data-url="' + url + '"', btnZoom = '', btnDrag = '', css, + vKey = key === false ? '' : ' data-key="' + key + '"', btnDelete = '', btnUpload = '', btnDownload = '', + template = self._getLayoutTemplate('actions'), config = self.fileActionSettings, + otherButtons = self.otherActionButtons.setTokens({'dataKey': vKey, 'key': key}), + removeClass = disabled ? config.removeClass + ' disabled' : config.removeClass; + if (showDel) { + btnDelete = self._getLayoutTemplate('actionDelete').setTokens({ + 'removeClass': removeClass, + 'removeIcon': config.removeIcon, + 'removeTitle': config.removeTitle, + 'dataUrl': vUrl, + 'dataKey': vKey, + 'key': key + }); + } + if (showUpl) { + btnUpload = self._getLayoutTemplate('actionUpload').setTokens({ + 'uploadClass': config.uploadClass, + 'uploadIcon': config.uploadIcon, + 'uploadTitle': config.uploadTitle + }); + } + if (showDwn) { + btnDownload = self._getLayoutTemplate('actionDownload').setTokens({ + 'downloadClass': config.downloadClass, + 'downloadIcon': config.downloadIcon, + 'downloadTitle': config.downloadTitle, + 'downloadUrl': dUrl || self.initialPreviewDownloadUrl + }); + btnDownload = btnDownload.setTokens({'filename': dFile, 'key': key}); + } + if (showZoom) { + btnZoom = self._getLayoutTemplate('actionZoom').setTokens({ + 'zoomClass': config.zoomClass, + 'zoomIcon': config.zoomIcon, + 'zoomTitle': config.zoomTitle + }); + } + if (showDrag && isInit) { + css = 'drag-handle-init ' + config.dragClass; + btnDrag = self._getLayoutTemplate('actionDrag').setTokens({ + 'dragClass': css, + 'dragTitle': config.dragTitle, + 'dragIcon': config.dragIcon + }); + } + return template.setTokens({ + 'delete': btnDelete, + 'upload': btnUpload, + 'download': btnDownload, + 'zoom': btnZoom, + 'drag': btnDrag, + 'other': otherButtons + }); + }, + _browse: function (e) { + var self = this; + if (e && e.isDefaultPrevented() || !self._raise('filebrowse')) { + return; + } + if (self.isError && !self.isAjaxUpload) { + self.clear(); + } + if (self.focusCaptionOnBrowse) { + self.$captionContainer.focus(); + } + }, + _change: function (e) { + var self = this; + if (self.changeTriggered) { + return; + } + var $el = self.$element, isDragDrop = arguments.length > 1, isAjaxUpload = self.isAjaxUpload, + tfiles, files = isDragDrop ? arguments[1] : $el[0].files, ctr = self.fileManager.count(), + total, initCount, len, isSingleUpl = $h.isEmpty($el.attr('multiple')), + maxCount = !isAjaxUpload && isSingleUpl ? 1 : self.maxFileCount, maxTotCount = self.maxTotalFileCount, + inclAll = maxTotCount > 0 && maxTotCount > maxCount, flagSingle = (isSingleUpl && ctr > 0), + throwError = function (mesg, file, previewId, index) { + var p1 = $.extend(true, {}, self._getOutData(null, {}, {}, files), {id: previewId, index: index}), + p2 = {id: previewId, index: index, file: file, files: files}; + self.isPersistentError = true; + return isAjaxUpload ? self._showFileError(mesg, p1) : self._showError(mesg, p2); + }, + maxCountCheck = function (n, m, all) { + var msg = all ? self.msgTotalFilesTooMany : self.msgFilesTooMany; + msg = msg.replace('{m}', m).replace('{n}', n); + self.isError = throwError(msg, null, null, null); + self.$captionContainer.removeClass('icon-visible'); + self._setCaption('', true); + self.$container.removeClass('file-input-new file-input-ajax-new'); + }; + self.reader = null; + self._resetUpload(); + self._hideFileIcon(); + if (self.dropZoneEnabled) { + self.$container.find('.file-drop-zone .' + self.dropZoneTitleClass).remove(); + } + if (!isAjaxUpload) { + if (e.target && e.target.files === undefined) { + files = e.target.value ? [{name: e.target.value.replace(/^.+\\/, '')}] : []; + } else { + files = e.target.files || {}; + } + } + tfiles = files; + if ($h.isEmpty(tfiles) || tfiles.length === 0) { + if (!isAjaxUpload) { + self.clear(); + } + self._raise('fileselectnone'); + return; + } + self._resetErrors(); + len = tfiles.length; + initCount = isAjaxUpload ? (self.fileManager.count() + len) : len; + total = self._getFileCount(initCount, inclAll ? false : undefined); + if (maxCount > 0 && total > maxCount) { + if (!self.autoReplace || len > maxCount) { + maxCountCheck((self.autoReplace && len > maxCount ? len : total), maxCount); + return; + } + if (total > maxCount) { + self._resetPreviewThumbs(isAjaxUpload); + } + } else { + if (inclAll) { + total = self._getFileCount(initCount, true); + if (maxTotCount > 0 && total > maxTotCount) { + if (!self.autoReplace || len > maxCount) { + maxCountCheck((self.autoReplace && len > maxTotCount ? len : total), maxTotCount, true); + return; + } + if (total > maxCount) { + self._resetPreviewThumbs(isAjaxUpload); + } + } + } + if (!isAjaxUpload || flagSingle) { + self._resetPreviewThumbs(false); + if (flagSingle) { + self.clearFileStack(); + } + } else { + if (isAjaxUpload && ctr === 0 && (!self.previewCache.count(true) || self.overwriteInitial)) { + self._resetPreviewThumbs(true); + } + } + } + self.readFiles(tfiles); + }, + _abort: function (params) { + var self = this, data; + if (self.ajaxAborted && typeof self.ajaxAborted === 'object' && self.ajaxAborted.message !== undefined) { + data = $.extend(true, {}, self._getOutData(null), params); + data.abortData = self.ajaxAborted.data || {}; + data.abortMessage = self.ajaxAborted.message; + self._setProgress(101, self.$progress, self.msgCancelled); + self._showFileError(self.ajaxAborted.message, data, 'filecustomerror'); + self.cancel(); + return true; + } + return !!self.ajaxAborted; + }, + _resetFileStack: function () { + var self = this, i = 0; + self._getThumbs().each(function () { + var $thumb = $(this), ind = $thumb.attr('data-fileindex'), pid = $thumb.attr('id'); + if (ind === '-1' || ind === -1) { + return; + } + if (!self.fileManager.getFile($thumb.attr('data-fileid'))) { + $thumb.attr({'data-fileindex': i}); + i++; + } else { + $thumb.attr({'data-fileindex': '-1'}); + } + self._getZoom(pid).attr({ + 'data-fileindex': $thumb.attr('data-fileindex') + }); + }); + }, + _isFileSelectionValid: function (cnt) { + var self = this; + cnt = cnt || 0; + if (self.required && !self.getFilesCount()) { + self.$errorContainer.html(''); + self._showFileError(self.msgFileRequired); + return false; + } + if (self.minFileCount > 0 && self._getFileCount(cnt) < self.minFileCount) { + self._noFilesError({}); + return false; + } + return true; + }, + _canPreview: function (file) { + var self = this; + if (!file || !self.showPreview || !self.$preview || !self.$preview.length) { + return false; + } + var name = file.name || '', type = file.type || '', size = (file.size || 0) / 1000, + cat = self._parseFileType(type, name), allowedTypes, allowedMimes, allowedExts, skipPreview, + types = self.allowedPreviewTypes, mimes = self.allowedPreviewMimeTypes, + exts = self.allowedPreviewExtensions || [], dTypes = self.disabledPreviewTypes, + dMimes = self.disabledPreviewMimeTypes, dExts = self.disabledPreviewExtensions || [], + maxSize = self.maxFilePreviewSize && parseFloat(self.maxFilePreviewSize) || 0, + expAllExt = new RegExp('\\.(' + exts.join('|') + ')$', 'i'), + expDisExt = new RegExp('\\.(' + dExts.join('|') + ')$', 'i'); + allowedTypes = !types || types.indexOf(cat) !== -1; + allowedMimes = !mimes || mimes.indexOf(type) !== -1; + allowedExts = !exts.length || $h.compare(name, expAllExt); + skipPreview = (dTypes && dTypes.indexOf(cat) !== -1) || (dMimes && dMimes.indexOf(type) !== -1) || + (dExts.length && $h.compare(name, expDisExt)) || (maxSize && !isNaN(maxSize) && size > maxSize); + return !skipPreview && (allowedTypes || allowedMimes || allowedExts); + }, + addToStack: function (file, id) { + this.fileManager.add(file, id); + }, + clearFileStack: function () { + var self = this; + self.fileManager.clear(); + self._initResumableUpload(); + if (self.enableResumableUpload) { + if (self.showPause === null) { + self.showPause = true; + } + if (self.showCancel === null) { + self.showCancel = false; + } + } else { + self.showPause = false; + if (self.showCancel === null) { + self.showCancel = true; + } + } + return self.$element; + }, + getFileStack: function () { + return this.fileManager.stack; + }, + getFileList: function () { + return this.fileManager.list(); + }, + getFilesCount: function (includeInitial) { + var self = this, len = self.isAjaxUpload ? self.fileManager.count() : self._inputFileCount(); + if (includeInitial) { + len += self.previewCache.count(true); + } + return self._getFileCount(len); + }, + readFiles: function (files) { + this.reader = new FileReader(); + var self = this, reader = self.reader, $container = self.$previewContainer, + $status = self.$previewStatus, msgLoading = self.msgLoading, msgProgress = self.msgProgress, + previewInitId = self.previewInitId, numFiles = files.length, settings = self.fileTypeSettings, + readFile, fileTypes = self.allowedFileTypes, typLen = fileTypes ? fileTypes.length : 0, + fileExt = self.allowedFileExtensions, strExt = $h.isEmpty(fileExt) ? '' : fileExt.join(', '), + throwError = function (msg, file, previewId, index, fileId) { + var $thumb, p1 = $.extend(true, {}, self._getOutData(null, {}, {}, files), + {id: previewId, index: index, fileId: fileId}), + p2 = {id: previewId, index: index, fileId: fileId, file: file, files: files}; + self._previewDefault(file, true); + $thumb = self._getFrame(previewId, true); + if (self.isAjaxUpload) { + setTimeout(function () { + readFile(index + 1); + }, self.processDelay); + } else { + self.unlock(); + numFiles = 0; + } + if (self.removeFromPreviewOnError && $thumb.length) { + $thumb.remove(); + } else { + self._initFileActions(); + $thumb.find('.kv-file-upload').remove(); + } + self.isPersistentError = true; + self.isError = self.isAjaxUpload ? self._showFileError(msg, p1) : self._showError(msg, p2); + self._updateFileDetails(numFiles); + }; + self.fileManager.clearImages(); + $.each(files, function (key, file) { + var func = self.fileTypeSettings.image; + if (func && func(file.type)) { + self.fileManager.totalImages++; + } + }); + readFile = function (i) { + var $error = self.$errorContainer, errors, fm = self.fileManager; + if (i >= numFiles) { + self.unlock(); + if (self.duplicateErrors.length) { + errors = '
  • ' + self.duplicateErrors.join('
  • ') + '
  • '; + if ($error.find('ul').length === 0) { + $h.setHtml($error, self.errorCloseButton + '
      ' + errors + '
    '); + } else { + $error.find('ul').append(errors); + } + $error.fadeIn(self.fadeDelay); + self._handler($error.find('.kv-error-close'), 'click', function () { + $error.fadeOut(self.fadeDelay); + }); + self.duplicateErrors = []; + } + if (self.isAjaxUpload) { + self._raise('filebatchselected', [fm.stack]); + if (fm.count() === 0 && !self.isError) { + self.reset(); + } + } else { + self._raise('filebatchselected', [files]); + } + $container.removeClass('file-thumb-loading'); + $status.html(''); + return; + } + self.lock(true); + var file = files[i], id = self._getFileId(file), previewId = previewInitId + '-' + id, fSizeKB, j, msg, + fnText = settings.text, fnImage = settings.image, fnHtml = settings.html, typ, chk, typ1, typ2, + caption = self._getFileName(file, ''), fileSize = (file && file.size || 0) / 1000, + fileExtExpr = '', previewData = $h.createObjectURL(file), fileCount = 0, + strTypes = '', fileId, canLoad, fileReaderAborted = false, + func, knownTypes = 0, isImage, txtFlag, processFileLoaded = function () { + var msg = msgProgress.setTokens({ + 'index': i + 1, + 'files': numFiles, + 'percent': 50, + 'name': caption + }); + setTimeout(function () { + $status.html(msg); + self._updateFileDetails(numFiles); + readFile(i + 1); + }, self.processDelay); + if (self._raise('fileloaded', [file, previewId, id, i, reader]) && self.isAjaxUpload) { + fm.add(file); + } + }; + if (!file) { + return; + } + fileId = fm.getId(file); + if (typLen > 0) { + for (j = 0; j < typLen; j++) { + typ1 = fileTypes[j]; + typ2 = self.msgFileTypes[typ1] || typ1; + strTypes += j === 0 ? typ2 : ', ' + typ2; + } + } + if (caption === false) { + readFile(i + 1); + return; + } + if (caption.length === 0) { + msg = self.msgInvalidFileName.replace('{name}', $h.htmlEncode($h.getFileName(file), '[unknown]')); + throwError(msg, file, previewId, i, fileId); + return; + } + if (!$h.isEmpty(fileExt)) { + fileExtExpr = new RegExp('\\.(' + fileExt.join('|') + ')$', 'i'); + } + fSizeKB = fileSize.toFixed(2); + if (self.isAjaxUpload && fm.exists(fileId) || self._getFrame(previewId, true).length) { + var p2 = {id: previewId, index: i, fileId: fileId, file: file, files: files}; + msg = self.msgDuplicateFile.setTokens({name: caption, size: fSizeKB}); + if (self.isAjaxUpload) { + self.duplicateErrors.push(msg); + self.isDuplicateError = true; + self._raise('fileduplicateerror', [file, fileId, caption, fSizeKB, previewId, i]); + readFile(i + 1); + self._updateFileDetails(numFiles); + } else { + self._showError(msg, p2); + self.unlock(); + numFiles = 0; + self._clearFileInput(); + self.reset(); + self._updateFileDetails(numFiles); + } + return; + } + if (self.maxFileSize > 0 && fileSize > self.maxFileSize) { + msg = self.msgSizeTooLarge.setTokens({ + 'name': caption, + 'size': fSizeKB, + 'maxSize': self.maxFileSize + }); + throwError(msg, file, previewId, i, fileId); + return; + } + if (self.minFileSize !== null && fileSize <= $h.getNum(self.minFileSize)) { + msg = self.msgSizeTooSmall.setTokens({ + 'name': caption, + 'size': fSizeKB, + 'minSize': self.minFileSize + }); + throwError(msg, file, previewId, i, fileId); + return; + } + if (!$h.isEmpty(fileTypes) && $h.isArray(fileTypes)) { + for (j = 0; j < fileTypes.length; j += 1) { + typ = fileTypes[j]; + func = settings[typ]; + fileCount += !func || (typeof func !== 'function') ? 0 : (func(file.type, + $h.getFileName(file)) ? 1 : 0); + } + if (fileCount === 0) { + msg = self.msgInvalidFileType.setTokens({name: caption, types: strTypes}); + throwError(msg, file, previewId, i, fileId); + return; + } + } + if (fileCount === 0 && !$h.isEmpty(fileExt) && $h.isArray(fileExt) && !$h.isEmpty(fileExtExpr)) { + chk = $h.compare(caption, fileExtExpr); + fileCount += $h.isEmpty(chk) ? 0 : chk.length; + if (fileCount === 0) { + msg = self.msgInvalidFileExtension.setTokens({name: caption, extensions: strExt}); + throwError(msg, file, previewId, i, fileId); + return; + } + } + if (!self._canPreview(file)) { + canLoad = self.isAjaxUpload && self._raise('filebeforeload', [file, i, reader]); + if (self.isAjaxUpload && canLoad) { + fm.add(file); + } + if (self.showPreview && canLoad) { + $container.addClass('file-thumb-loading'); + self._previewDefault(file); + self._initFileActions(); + } + setTimeout(function () { + if (canLoad) { + self._updateFileDetails(numFiles); + } + readFile(i + 1); + self._raise('fileloaded', [file, previewId, id, i]); + }, 10); + return; + } + isImage = fnImage(file.type, caption); + $status.html(msgLoading.replace('{index}', i + 1).replace('{files}', numFiles)); + $container.addClass('file-thumb-loading'); + reader.onerror = function (evt) { + self._errorHandler(evt, caption); + }; + reader.onload = function (theFile) { + var hex, fileInfo, uint, byte, bytes = [], contents, mime, readImage = function () { + var newReader = new FileReader(); + newReader.onerror = function (theFileNew) { + self._errorHandler(theFileNew, caption); + }; + newReader.onload = function (theFileNew) { + if (self.isAjaxUpload && !self._raise('filebeforeload', [file, i, reader])) { + fileReaderAborted = true; + self._resetCaption(); + reader.abort(); + $status.html(''); + $container.removeClass('file-thumb-loading'); + self.enable(); + return; + } + self._previewFile(i, file, theFileNew, previewData, fileInfo); + self._initFileActions(); + processFileLoaded(); + }; + newReader.readAsDataURL(file); + }; + fileInfo = {'name': caption, 'type': file.type}; + $.each(settings, function (k, f) { + if (k !== 'object' && k !== 'other' && typeof f === 'function' && f(file.type, caption)) { + knownTypes++; + } + }); + if (knownTypes === 0) { // auto detect mime types from content if no known file types detected + uint = new Uint8Array(theFile.target.result); + for (j = 0; j < uint.length; j++) { + byte = uint[j].toString(16); + bytes.push(byte); + } + hex = bytes.join('').toLowerCase().substring(0, 8); + mime = $h.getMimeType(hex, '', ''); + if ($h.isEmpty(mime)) { // look for ascii text content + contents = $h.arrayBuffer2String(reader.result); + mime = $h.isSvg(contents) ? 'image/svg+xml' : $h.getMimeType(hex, contents, file.type); + } + fileInfo = {'name': caption, 'type': mime}; + isImage = fnImage(mime, ''); + if (isImage) { + readImage(txtFlag); + return; + } + } + if (self.isAjaxUpload && !self._raise('filebeforeload', [file, i, reader])) { + fileReaderAborted = true; + self._resetCaption(); + reader.abort(); + $status.html(''); + $container.removeClass('file-thumb-loading'); + self.enable(); + return; + } + self._previewFile(i, file, theFile, previewData, fileInfo); + self._initFileActions(); + processFileLoaded(); + }; + reader.onprogress = function (data) { + if (data.lengthComputable) { + var fact = (data.loaded / data.total) * 100, progress = Math.ceil(fact); + msg = msgProgress.setTokens({ + 'index': i + 1, + 'files': numFiles, + 'percent': progress, + 'name': caption + }); + setTimeout(function () { + if (!fileReaderAborted) { + $status.html(msg); + } + }, self.processDelay); + } + }; + if (isImage) { + reader.readAsDataURL(file); + } else { + reader.readAsArrayBuffer(file); + } + }; + + readFile(0); + self._updateFileDetails(numFiles, true); + }, + lock: function (selectMode) { + var self = this, $container = self.$container; + self._resetErrors(); + self.disable(); + if (!selectMode && self.showCancel) { + $container.find('.fileinput-cancel').show(); + } + if (!selectMode && self.showPause) { + $container.find('.fileinput-pause').show(); + } + self._raise('filelock', [self.fileManager.stack, self._getExtraData()]); + return self.$element; + }, + unlock: function (reset) { + var self = this, $container = self.$container; + if (reset === undefined) { + reset = true; + } + self.enable(); + $container.removeClass('is-locked'); + if (self.showCancel) { + $container.find('.fileinput-cancel').hide(); + } + if (self.showPause) { + $container.find('.fileinput-pause').hide(); + } + if (reset) { + self._resetFileStack(); + } + self._raise('fileunlock', [self.fileManager.stack, self._getExtraData()]); + return self.$element; + }, + resume: function () { + var self = this, flag = false, rm = self.resumableManager; + if (!self.enableResumableUpload) { + return self.$element; + } + if (self.paused) { + self._toggleResumableProgress(self.progressPauseTemplate, self.msgUploadResume); + } else { + flag = true; + } + self.paused = false; + if (flag) { + self._toggleResumableProgress(self.progressInfoTemplate, self.msgUploadBegin); + } + setTimeout(function () { + rm.upload(); + }, self.processDelay); + return self.$element; + }, + pause: function () { + var self = this, rm = self.resumableManager, xhr = self.ajaxRequests, len = xhr.length, i, + pct = rm.getProgress(), actions = self.fileActionSettings, tm = self.taskManager, + pool = tm.getPool(rm.id); + if (!self.enableResumableUpload) { + return self.$element; + } else { + if (pool) { + pool.cancel(); + } + } + self._raise('fileuploadpaused', [self.fileManager, rm]); + if (len > 0) { + for (i = 0; i < len; i += 1) { + self.paused = true; + xhr[i].abort(); + } + } + if (self.showPreview) { + self._getThumbs().each(function () { + var $thumb = $(this), fileId = $thumb.attr('data-fileid'), t = self._getLayoutTemplate('stats'), + stats, $indicator = $thumb.find('.file-upload-indicator'); + $thumb.removeClass('file-uploading'); + if ($indicator.attr('title') === actions.indicatorLoadingTitle) { + self._setThumbStatus($thumb, 'Paused'); + stats = t.setTokens({pendingTime: self.msgPaused, uploadSpeed: ''}); + self.paused = true; + self._setProgress(pct, $thumb.find('.file-thumb-progress'), pct + '%', stats); + } + if (!self.fileManager.getFile(fileId)) { + $thumb.find('.kv-file-remove').removeClass('disabled').removeAttr('disabled'); + } + }); + } + self._setProgress(101, self.$progress, self.msgPaused); + return self.$element; + }, + cancel: function () { + var self = this, xhr = self.ajaxRequests, + rm = self.resumableManager, tm = self.taskManager, + pool = rm ? tm.getPool(rm.id) : undefined, len = xhr.length, i; + + if (self.enableResumableUpload && pool) { + pool.cancel().done(function () { + self._setProgressCancelled(); + }); + rm.reset(); + self._raise('fileuploadcancelled', [self.fileManager, rm]); + } else { + self._raise('fileuploadcancelled', [self.fileManager]); + } + self._initAjax(); + if (len > 0) { + for (i = 0; i < len; i += 1) { + self.cancelling = true; + xhr[i].abort(); + } + } + self._getThumbs().each(function () { + var $thumb = $(this), fileId = $thumb.attr('data-fileid'), $prog = $thumb.find('.file-thumb-progress'); + $thumb.removeClass('file-uploading'); + self._setProgress(0, $prog); + $prog.hide(); + if (!self.fileManager.getFile(fileId)) { + $thumb.find('.kv-file-upload').removeClass('disabled').removeAttr('disabled'); + $thumb.find('.kv-file-remove').removeClass('disabled').removeAttr('disabled'); + } + self.unlock(); + }); + setTimeout(function () { + self._setProgressCancelled(); + }, self.processDelay); + return self.$element; + }, + clear: function () { + var self = this, cap; + if (!self._raise('fileclear')) { + return; + } + self.$btnUpload.removeAttr('disabled'); + self._getThumbs().find('video,audio,img').each(function () { + $h.cleanMemory($(this)); + }); + self._clearFileInput(); + self._resetUpload(); + self.clearFileStack(); + self.isDuplicateError = false; + self.isPersistentError = false; + self._resetErrors(true); + if (self._hasInitialPreview()) { + self._showFileIcon(); + self._resetPreview(); + self._initPreviewActions(); + self.$container.removeClass('file-input-new'); + } else { + self._getThumbs().each(function () { + self._clearObjects($(this)); + }); + if (self.isAjaxUpload) { + self.previewCache.data = {}; + } + self.$preview.html(''); + cap = (!self.overwriteInitial && self.initialCaption.length > 0) ? self.initialCaption : ''; + self.$caption.attr('title', '').val(cap); + $h.addCss(self.$container, 'file-input-new'); + self._validateDefaultPreview(); + } + if (self.$container.find($h.FRAMES).length === 0) { + if (!self._initCaption()) { + self.$captionContainer.removeClass('icon-visible'); + } + } + self._hideFileIcon(); + if (self.focusCaptionOnClear) { + self.$captionContainer.focus(); + } + self._setFileDropZoneTitle(); + self._raise('filecleared'); + return self.$element; + }, + reset: function () { + var self = this; + if (!self._raise('filereset')) { + return; + } + self.lastProgress = 0; + self._resetPreview(); + self.$container.find('.fileinput-filename').text(''); + $h.addCss(self.$container, 'file-input-new'); + if (self.getFrames().length) { + self.$container.removeClass('file-input-new'); + } + self.clearFileStack(); + self._setFileDropZoneTitle(); + return self.$element; + }, + disable: function () { + var self = this, $container = self.$container; + self.isDisabled = true; + self._raise('filedisabled'); + self.$element.attr('disabled', 'disabled'); + $container.addClass('is-locked'); + $h.addCss($container.find('.btn-file'), 'disabled'); + $container.find('.kv-fileinput-caption').addClass('file-caption-disabled'); + $container.find('.fileinput-remove, .fileinput-upload, .file-preview-frame button') + .attr('disabled', true); + self._initDragDrop(); + return self.$element; + }, + enable: function () { + var self = this, $container = self.$container; + self.isDisabled = false; + self._raise('fileenabled'); + self.$element.removeAttr('disabled'); + $container.removeClass('is-locked'); + $container.find('.kv-fileinput-caption').removeClass('file-caption-disabled'); + $container.find('.fileinput-remove, .fileinput-upload, .file-preview-frame button') + .removeAttr('disabled'); + $container.find('.btn-file').removeClass('disabled'); + self._initDragDrop(); + return self.$element; + }, + upload: function () { + var self = this, fm = self.fileManager, totLen = fm.count(), i, outData, + hasExtraData = !$.isEmptyObject(self._getExtraData()); + if (!self.isAjaxUpload || self.isDisabled || !self._isFileSelectionValid(totLen)) { + return; + } + self.lastProgress = 0; + self._resetUpload(); + if (totLen === 0 && !hasExtraData) { + self._showFileError(self.msgUploadEmpty); + return; + } + self.cancelling = false; + self._showProgress(); + self.lock(); + if (totLen === 0 && hasExtraData) { + self._setProgress(2); + self._uploadExtraOnly(); + return; + } + if (self.enableResumableUpload) { + return self.resume(); + } + if (self.uploadAsync || self.enableResumableUpload) { + outData = self._getOutData(null); + self._raise('filebatchpreupload', [outData]); + self.fileBatchCompleted = false; + self.uploadCache = []; + $.each(self.getFileStack(), function (id) { + var previewId = self._getThumbId(id); + self.uploadCache.push({id: previewId, content: null, config: null, tags: null, append: true}); + }); + self.$preview.find('.file-preview-initial').removeClass($h.SORT_CSS); + self._initSortable(); + } + self._setProgress(2); + self.hasInitData = false; + if (self.uploadAsync) { + i = 0; + $.each(fm.stack, function (id) { + self._uploadSingle(i, id, true); + i++; + }); + return; + } + self._uploadBatch(); + return self.$element; + }, + destroy: function () { + var self = this, $form = self.$form, $cont = self.$container, $el = self.$element, ns = self.namespace; + $(document).off(ns); + $(window).off(ns); + if ($form && $form.length) { + $form.off(ns); + } + if (self.isAjaxUpload) { + self._clearFileInput(); + } + self._cleanup(); + self._initPreviewCache(); + $el.insertBefore($cont).off(ns).removeData(); + $cont.off().remove(); + return $el; + }, + refresh: function (options) { + var self = this, $el = self.$element; + if (typeof options !== 'object' || $h.isEmpty(options)) { + options = self.options; + } else { + options = $.extend(true, {}, self.options, options); + } + self._init(options, true); + self._listen(); + return $el; + }, + zoom: function (frameId) { + var self = this, $frame = self._getFrame(frameId); + self._showModal($frame); + }, + getExif: function (frameId) { + var self = this, $frame = self._getFrame(frameId); + return $frame && $frame.data('exif') || null; + }, + getFrames: function (cssFilter) { + var self = this, $frames; + cssFilter = cssFilter || ''; + $frames = self.$preview.find($h.FRAMES + cssFilter); + if (self.reversePreviewOrder) { + $frames = $($frames.get().reverse()); + } + return $frames; + }, + getPreview: function () { + var self = this; + return { + content: self.initialPreview, + config: self.initialPreviewConfig, + tags: self.initialPreviewThumbTags + }; + } + }; + + $.fn.fileinput = function (option) { + if (!$h.hasFileAPISupport() && !$h.isIE(9)) { + return; + } + var args = Array.apply(null, arguments), retvals = []; + args.shift(); + this.each(function () { + var self = $(this), data = self.data('fileinput'), options = typeof option === 'object' && option, + theme = options.theme || self.data('theme'), l = {}, t = {}, + lang = options.language || self.data('language') || $.fn.fileinput.defaults.language || 'en', opt; + if (!data) { + if (theme) { + t = $.fn.fileinputThemes[theme] || {}; + } + if (lang !== 'en' && !$h.isEmpty($.fn.fileinputLocales[lang])) { + l = $.fn.fileinputLocales[lang] || {}; + } + opt = $.extend(true, {}, $.fn.fileinput.defaults, t, $.fn.fileinputLocales.en, l, options, self.data()); + data = new FileInput(this, opt); + self.data('fileinput', data); + } + + if (typeof option === 'string') { + retvals.push(data[option].apply(data, args)); + } + }); + switch (retvals.length) { + case 0: + return this; + case 1: + return retvals[0]; + default: + return retvals; + } + }; + + var IFRAME_ATTRIBS = 'class="kv-preview-data file-preview-pdf" src="{renderer}?file={data}" {style}'; + + $.fn.fileinput.defaults = { + language: 'zh', + showCaption: true, + showBrowse: true, + showPreview: true, + showRemove: true, + showUpload: true, + showUploadStats: true, + showCancel: null, + showPause: null, + showClose: true, + showUploadedThumbs: true, + showConsoleLogs: false, + browseOnZoneClick: false, + autoReplace: false, + autoOrientImage: function () { // applicable for JPEG images only and non ios safari + var ua = window.navigator.userAgent, webkit = !!ua.match(/WebKit/i), + iOS = !!ua.match(/iP(od|ad|hone)/i), iOSSafari = iOS && webkit && !ua.match(/CriOS/i); + return !iOSSafari; + }, + autoOrientImageInitial: true, + required: false, + rtl: false, + hideThumbnailContent: false, + encodeUrl: true, + focusCaptionOnBrowse: true, + focusCaptionOnClear: true, + generateFileId: null, + previewClass: '', + captionClass: '', + frameClass: 'krajee-default', + mainClass: 'file-caption-main', + mainTemplate: null, + fileSizeGetter: null, + initialCaption: '', + initialPreview: [], + initialPreviewDelimiter: '*$$*', + initialPreviewAsData: false, + initialPreviewFileType: 'image', + initialPreviewConfig: [], + initialPreviewThumbTags: [], + previewThumbTags: {}, + initialPreviewShowDelete: true, + initialPreviewDownloadUrl: '', + removeFromPreviewOnError: false, + deleteUrl: '', + deleteExtraData: {}, + overwriteInitial: true, + sanitizeZoomCache: function (content) { + var $container = $h.createElement(content); + $container.find('input,textarea,select,datalist,form,.file-thumbnail-footer').remove(); + return $container.html(); + }, + previewZoomButtonIcons: { + prev: '', + next: '', + toggleheader: '', + fullscreen: '', + borderless: '', + close: '' + }, + previewZoomButtonClasses: { + prev: 'btn btn-navigate', + next: 'btn btn-navigate', + toggleheader: 'btn btn-sm btn-kv btn-default btn-outline-secondary', + fullscreen: 'btn btn-sm btn-kv btn-default btn-outline-secondary', + borderless: 'btn btn-sm btn-kv btn-default btn-outline-secondary', + close: 'btn btn-sm btn-kv btn-default btn-outline-secondary' + }, + previewTemplates: {}, + previewContentTemplates: {}, + preferIconicPreview: false, + preferIconicZoomPreview: false, + allowedFileTypes: null, + allowedFileExtensions: null, + allowedPreviewTypes: undefined, + allowedPreviewMimeTypes: null, + allowedPreviewExtensions: null, + disabledPreviewTypes: undefined, + disabledPreviewExtensions: ['msi', 'exe', 'com', 'zip', 'rar', 'app', 'vb', 'scr'], + disabledPreviewMimeTypes: null, + defaultPreviewContent: null, + customLayoutTags: {}, + customPreviewTags: {}, + previewFileIcon: '', + previewFileIconClass: 'file-other-icon', + previewFileIconSettings: {}, + previewFileExtSettings: {}, + buttonLabelClass: 'hidden-xs', + browseIcon: ' ', + browseClass: 'btn btn-primary', + removeIcon: '', + removeClass: 'btn btn-default btn-secondary', + cancelIcon: '', + cancelClass: 'btn btn-default btn-secondary', + pauseIcon: '', + pauseClass: 'btn btn-default btn-secondary', + uploadIcon: '', + uploadClass: 'btn btn-default btn-secondary', + uploadUrl: null, + uploadUrlThumb: null, + uploadAsync: true, + uploadParamNames: { + chunkCount: 'chunkCount', + chunkIndex: 'chunkIndex', + chunkSize: 'chunkSize', + chunkSizeStart: 'chunkSizeStart', + chunksUploaded: 'chunksUploaded', + fileBlob: 'fileBlob', + fileId: 'fileId', + fileName: 'fileName', + fileRelativePath: 'fileRelativePath', + fileSize: 'fileSize', + retryCount: 'retryCount' + }, + maxAjaxThreads: 5, + fadeDelay: 800, + processDelay: 100, + queueDelay: 10, // must be lesser than process delay + progressDelay: 0, // must be lesser than process delay + enableResumableUpload: false, + resumableUploadOptions: { + fallback: null, + testUrl: null, // used for checking status of chunks/ files previously / partially uploaded + chunkSize: 2 * 1024, // in KB + maxThreads: 4, + maxRetries: 3, + showErrorLog: true + }, + uploadExtraData: {}, + zoomModalHeight: 480, + minImageWidth: null, + minImageHeight: null, + maxImageWidth: null, + maxImageHeight: null, + resizeImage: false, + resizePreference: 'width', + resizeQuality: 0.92, + resizeDefaultImageType: 'image/jpeg', + resizeIfSizeMoreThan: 0, // in KB + minFileSize: -1, + maxFileSize: 0, + maxFilePreviewSize: 25600, // 25 MB + minFileCount: 0, + maxFileCount: 0, + maxTotalFileCount: 0, + validateInitialCount: false, + msgValidationErrorClass: 'text-danger', + msgValidationErrorIcon: ' ', + msgErrorClass: 'file-error-message', + progressThumbClass: 'progress-bar progress-bar-striped active progress-bar-animated', + progressClass: 'progress-bar bg-success progress-bar-success progress-bar-striped active progress-bar-animated', + progressInfoClass: 'progress-bar bg-info progress-bar-info progress-bar-striped active progress-bar-animated', + progressCompleteClass: 'progress-bar bg-success progress-bar-success', + progressPauseClass: 'progress-bar bg-primary progress-bar-primary progress-bar-striped active progress-bar-animated', + progressErrorClass: 'progress-bar bg-danger progress-bar-danger', + progressUploadThreshold: 99, + previewFileType: 'image', + elCaptionContainer: null, + elCaptionText: null, + elPreviewContainer: null, + elPreviewImage: null, + elPreviewStatus: null, + elErrorContainer: null, + errorCloseButton: $h.closeButton('kv-error-close'), + slugCallback: null, + dropZoneEnabled: true, + dropZoneTitleClass: 'file-drop-zone-title', + fileActionSettings: {}, + otherActionButtons: '', + textEncoding: 'UTF-8', + preProcessUpload: null, + ajaxSettings: {}, + ajaxDeleteSettings: {}, + showAjaxErrorDetails: true, + mergeAjaxCallbacks: false, + mergeAjaxDeleteCallbacks: false, + retryErrorUploads: true, + reversePreviewOrder: false, + usePdfRenderer: function () { + var isIE11 = !!window.MSInputMethodContext && !!document.documentMode; + return !!navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/i) || isIE11; + }, + pdfRendererUrl: '', + pdfRendererTemplate: '' + }; + + // noinspection HtmlUnknownAttribute + $.fn.fileinputLocales.en = { + fileSingle: 'file', + filePlural: 'files', + browseLabel: 'Browse …', + removeLabel: 'Remove', + removeTitle: 'Clear all unprocessed files', + cancelLabel: 'Cancel', + cancelTitle: 'Abort ongoing upload', + pauseLabel: 'Pause', + pauseTitle: 'Pause ongoing upload', + uploadLabel: 'Upload', + uploadTitle: 'Upload selected files', + msgNo: 'No', + msgNoFilesSelected: 'No files selected', + msgCancelled: 'Cancelled', + msgPaused: 'Paused', + msgPlaceholder: 'Select {files} ...', + msgZoomModalHeading: 'Detailed Preview', + msgFileRequired: 'You must select a file to upload.', + msgSizeTooSmall: 'File "{name}" ({size} KB) is too small and must be larger than {minSize} KB.', + msgSizeTooLarge: 'File "{name}" ({size} KB) exceeds maximum allowed upload size of {maxSize} KB.', + msgFilesTooLess: 'You must select at least {n} {files} to upload.', + msgFilesTooMany: 'Number of files selected for upload ({n}) exceeds maximum allowed limit of {m}.', + msgTotalFilesTooMany: 'You can upload a maximum of {m} files ({n} files detected).', + msgFileNotFound: 'File "{name}" not found!', + msgFileSecured: 'Security restrictions prevent reading the file "{name}".', + msgFileNotReadable: 'File "{name}" is not readable.', + msgFilePreviewAborted: 'File preview aborted for "{name}".', + msgFilePreviewError: 'An error occurred while reading the file "{name}".', + msgInvalidFileName: 'Invalid or unsupported characters in file name "{name}".', + msgInvalidFileType: 'Invalid type for file "{name}". Only "{types}" files are supported.', + msgInvalidFileExtension: 'Invalid extension for file "{name}". Only "{extensions}" files are supported.', + msgFileTypes: { + 'image': 'image', + 'html': 'HTML', + 'text': 'text', + 'video': 'video', + 'audio': 'audio', + 'flash': 'flash', + 'pdf': 'PDF', + 'object': 'object' + }, + msgUploadAborted: 'The file upload was aborted', + msgUploadThreshold: 'Processing …', + msgUploadBegin: 'Initializing …', + msgUploadEnd: 'Done', + msgUploadResume: 'Resuming upload …', + msgUploadEmpty: 'No valid data available for upload.', + msgUploadError: 'Upload Error', + msgDeleteError: 'Delete Error', + msgProgressError: 'Error', + msgValidationError: 'Validation Error', + msgLoading: 'Loading file {index} of {files} …', + msgProgress: 'Loading file {index} of {files} - {name} - {percent}% completed.', + msgSelected: '{n} {files} selected', + msgFoldersNotAllowed: 'Drag & drop files only! {n} folder(s) dropped were skipped.', + msgImageWidthSmall: 'Width of image file "{name}" must be at least {size} px.', + msgImageHeightSmall: 'Height of image file "{name}" must be at least {size} px.', + msgImageWidthLarge: 'Width of image file "{name}" cannot exceed {size} px.', + msgImageHeightLarge: 'Height of image file "{name}" cannot exceed {size} px.', + msgImageResizeError: 'Could not get the image dimensions to resize.', + msgImageResizeException: 'Error while resizing the image.
    {errors}
    ', + msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!', + msgAjaxProgressError: '{operation} failed', + msgDuplicateFile: 'File "{name}" of same size "{size} KB" has already been selected earlier. Skipping duplicate selection.', + msgResumableUploadRetriesExceeded: 'Upload aborted beyond {max} retries for file {file}! Error Details:
    {error}
    ', + msgPendingTime: '{time} remaining', + msgCalculatingTime: 'calculating time remaining', + ajaxOperations: { + deleteThumb: 'file delete', + uploadThumb: 'file upload', + uploadBatch: 'batch file upload', + uploadExtra: 'form data upload' + }, + dropZoneTitle: 'Drag & drop files here …', + dropZoneClickTitle: '
    (or click to select {files})', + previewZoomButtonTitles: { + prev: 'View previous file', + next: 'View next file', + toggleheader: 'Toggle header', + fullscreen: 'Toggle full screen', + borderless: 'Toggle borderless mode', + close: 'Close detailed preview' + } + }; + + $.fn.fileinputLocales.zh = { + fileSingle: '文件', + filePlural: '个文件', + browseLabel: '选择 …', + removeLabel: '移除', + removeTitle: '清除选中文件', + cancelLabel: '取消', + cancelTitle: '取消进行中的上传', + pauseLabel: 'Pause', + pauseTitle: 'Pause ongoing upload', + uploadLabel: '上传', + uploadTitle: '上传选中文件', + msgNo: '没有', + msgNoFilesSelected: '未选择文件', + msgPaused: 'Paused', + msgCancelled: '取消', + msgPlaceholder: '选择 {files} ...', + msgZoomModalHeading: '详细预览', + msgFileRequired: '必须选择一个文件上传.', + msgSizeTooSmall: '文件 "{name}" ({size} KB) 必须大于限定大小 {minSize} KB.', + msgSizeTooLarge: '文件 "{name}" ({size} KB) 超过了允许大小 {maxSize} KB.', + msgFilesTooLess: '你必须选择最少 {n} {files} 来上传. ', + msgFilesTooMany: '选择的上传文件个数 ({n}) 超出最大文件的限制个数 {m}.', + msgTotalFilesTooMany: 'You can upload a maximum of {m} files ({n} files detected).', + msgFileNotFound: '文件 "{name}" 未找到!', + msgFileSecured: '安全限制,为了防止读取文件 "{name}".', + msgFileNotReadable: '文件 "{name}" 不可读.', + msgFilePreviewAborted: '取消 "{name}" 的预览.', + msgFilePreviewError: '读取 "{name}" 时出现了一个错误.', + msgInvalidFileName: '文件名 "{name}" 包含非法字符.', + msgInvalidFileType: '不正确的类型 "{name}". 只支持 "{types}" 类型的文件.', + msgInvalidFileExtension: '不正确的文件扩展名 "{name}". 只支持 "{extensions}" 的文件扩展名.', + msgFileTypes: { + 'image': 'image', + 'html': 'HTML', + 'text': 'text', + 'video': 'video', + 'audio': 'audio', + 'flash': 'flash', + 'pdf': 'PDF', + 'object': 'object' + }, + msgUploadAborted: '该文件上传被中止', + msgUploadThreshold: '处理中 …', + msgUploadBegin: '正在初始化 …', + msgUploadEnd: '完成', + msgUploadResume: 'Resuming upload …', + msgUploadEmpty: '无效的文件上传.', + msgUploadError: 'Upload Error', + msgDeleteError: 'Delete Error', + msgProgressError: '上传出错', + msgValidationError: '验证错误', + msgLoading: '加载第 {index} 文件 共 {files} …', + msgProgress: '加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.', + msgSelected: '{n} {files} 选中', + msgFoldersNotAllowed: '只支持拖拽文件! 跳过 {n} 拖拽的文件夹.', + msgImageWidthSmall: '图像文件的"{name}"的宽度必须是至少{size}像素.', + msgImageHeightSmall: '图像文件的"{name}"的高度必须至少为{size}像素.', + msgImageWidthLarge: '图像文件"{name}"的宽度不能超过{size}像素.', + msgImageHeightLarge: '图像文件"{name}"的高度不能超过{size}像素.', + msgImageResizeError: '无法获取的图像尺寸调整。', + msgImageResizeException: '调整图像大小时发生错误。
    {errors}
    ', + msgAjaxError: '{operation} 发生错误. 请重试!', + msgAjaxProgressError: '{operation} 失败', + msgDuplicateFile: 'File "{name}" of same size "{size} KB" has already been selected earlier. Skipping duplicate selection.', + msgResumableUploadRetriesExceeded: 'Upload aborted beyond {max} retries for file {file}! Error Details:
    {error}
    ', + msgPendingTime: '{time} remaining', + msgCalculatingTime: 'calculating time remaining', + ajaxOperations: { + deleteThumb: '删除文件', + uploadThumb: '上传文件', + uploadBatch: '批量上传', + uploadExtra: '表单数据上传' + }, + dropZoneTitle: '拖拽文件到这里 …
    支持多文件同时上传', + dropZoneClickTitle: '
    (或点击{files}按钮选择文件)', + fileActionSettings: { + removeTitle: '删除文件', + uploadTitle: '上传文件', + downloadTitle: '下载文件', + uploadRetryTitle: '重试', + zoomTitle: '查看详情', + dragTitle: '移动 / 重置', + indicatorNewTitle: '没有上传', + indicatorSuccessTitle: '上传', + indicatorErrorTitle: '上传错误', + indicatorPausedTitle: 'Upload Paused', + indicatorLoadingTitle: '上传 …' + }, + previewZoomButtonTitles: { + prev: '预览上一个文件', + next: '预览下一个文件', + toggleheader: '缩放', + fullscreen: '全屏', + borderless: '无边界模式', + close: '关闭当前预览' + } + }; + + $.fn.fileinput.Constructor = FileInput; + + /** + * Convert automatically file inputs with class 'file' into a bootstrap fileinput control. + */ + $(document).ready(function () { + var $input = $('input.file[type=file]'); + if ($input.length) { + $input.fileinput(); + } + }); +})); \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.css b/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.css new file mode 100644 index 0000000..4d31b1d --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.css @@ -0,0 +1,13 @@ +/*! + * bootstrap-fileinput v5.1.3 + * http://plugins.krajee.com/file-input + * + * Krajee default styling for bootstrap-fileinput. + * + * Author: Kartik Visweswaran + * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com + * + * Licensed under the BSD-3-Clause + * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md + */ +.file-loading input[type=file],input[type=file].file-loading{width:0;height:0}.file-no-browse{position:absolute;left:50%;bottom:20%;width:1px;height:1px;font-size:0;opacity:0;border:0;background:0;outline:0;box-shadow:none}.kv-hidden,.file-caption-icon,.file-zoom-dialog .modal-header:before,.file-zoom-dialog .modal-header:after,.file-input-new .file-preview,.file-input-new .close,.file-input-new .glyphicon-file,.file-input-new .fileinput-remove-button,.file-input-new .fileinput-upload-button,.file-input-new .no-browse .input-group-btn,.file-input-ajax-new .fileinput-remove-button,.file-input-ajax-new .fileinput-upload-button,.file-input-ajax-new .no-browse .input-group-btn,.hide-content .kv-file-content,.is-locked .fileinput-upload-button,.is-locked .fileinput-remove-button{display:none}.btn-file input[type=file],.file-caption-icon,.file-preview .fileinput-remove,.krajee-default .file-thumb-progress,.file-zoom-dialog .btn-navigate,.file-zoom-dialog .floating-buttons{position:absolute}.file-caption-icon .kv-caption-icon{line-height:inherit}.file-input,.file-loading:before,.btn-file,.file-caption,.file-preview,.krajee-default.file-preview-frame,.krajee-default .file-thumbnail-footer,.file-zoom-dialog .modal-dialog{position:relative}.file-error-message pre,.file-error-message ul,.krajee-default .file-actions,.krajee-default .file-other-error{text-align:left}.file-error-message pre,.file-error-message ul{margin:0}.krajee-default .file-drag-handle,.krajee-default .file-upload-indicator{float:left;margin-top:10px;width:16px;height:16px}.file-thumb-progress .progress,.file-thumb-progress .progress-bar{font-family:Verdana,Helvetica,sans-serif;font-size:.7rem}.krajee-default .file-thumb-progress .progress,.kv-upload-progress .progress{background-color:#ccc}.krajee-default .file-caption-info,.krajee-default .file-size-info{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:160px;height:15px;margin:auto}.file-zoom-content>.file-object.type-video,.file-zoom-content>.file-object.type-flash,.file-zoom-content>.file-object.type-image{max-width:100%;max-height:100%;width:auto}.file-zoom-content>.file-object.type-video,.file-zoom-content>.file-object.type-flash{height:100%}.file-zoom-content>.file-object.type-pdf,.file-zoom-content>.file-object.type-html,.file-zoom-content>.file-object.type-text,.file-zoom-content>.file-object.type-default{width:100%}.file-loading:before{content:" Loading...";display:inline-block;padding-left:20px;line-height:16px;font-size:13px;font-variant:small-caps;color:#999;background:transparent url(loading.gif) top left no-repeat}.file-object{margin:0 0 -5px 0;padding:0}.btn-file{overflow:hidden}.btn-file input[type=file]{top:0;left:0;min-width:100%;min-height:100%;text-align:right;opacity:0;background:none repeat scroll 0 0 transparent;cursor:inherit;display:block}.btn-file ::-ms-browse{font-size:10000px;width:100%;height:100%}.file-caption .file-caption-name{width:100%;margin:0;padding:0;box-shadow:none;border:0;background:0;outline:0}.file-caption.icon-visible .file-caption-icon{display:inline-block}.file-caption.icon-visible .file-caption-name{padding-left:15px}.file-caption-icon{left:8px}.file-error-message{color:#a94442;background-color:#f2dede;margin:5px;border:1px solid #ebccd1;border-radius:4px;padding:15px}.file-error-message pre{margin:5px 0}.file-caption-disabled{background-color:#eee;cursor:not-allowed;opacity:1}.file-preview{border-radius:5px;border:1px solid #ddd;padding:8px;width:100%;margin-bottom:5px}.file-preview .btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.file-preview .fileinput-remove{top:1px;right:1px;line-height:10px}.file-preview .clickable{cursor:pointer}.file-preview-image{font:40px Impact,Charcoal,sans-serif;color:#008000;width:auto;height:auto;max-width:100%;max-height:100%}.krajee-default.file-preview-frame{margin:8px;border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 10px 0 rgba(0,0,0,0.2);padding:6px;float:left;text-align:center}.krajee-default.file-preview-frame .kv-file-content{width:213px;height:160px}.krajee-default .file-preview-other-frame{display:flex;align-items:center;justify-content:center}.krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered{width:400px}.krajee-default.file-preview-frame[data-template="audio"] .kv-file-content{width:240px;height:55px}.krajee-default.file-preview-frame .file-thumbnail-footer{height:70px}.krajee-default.file-preview-frame:not(.file-preview-error):hover{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 10px 0 rgba(0,0,0,0.4)}.krajee-default .file-preview-text{color:#428bca;border:1px solid #ddd;outline:0;resize:none}.krajee-default .file-preview-html{border:1px solid #ddd}.krajee-default .file-other-icon{font-size:6em;line-height:1}.krajee-default .file-footer-buttons{float:right}.krajee-default .file-footer-caption{display:block;text-align:center;padding-top:4px;font-size:11px;color:#777;margin-bottom:30px}.file-upload-stats{font-size:10px;text-align:center;width:100%}.kv-upload-progress .file-upload-stats{font-size:12px;margin:-10px 0 5px}.krajee-default .file-preview-error{opacity:.65;box-shadow:none}.krajee-default .file-thumb-progress{top:37px;left:0;right:0}.krajee-default.kvsortable-ghost{background:#e1edf7;border:2px solid #a1abff}.krajee-default .file-preview-other:hover{opacity:.8}.krajee-default .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover{color:#000}.kv-upload-progress .progress{height:20px;margin:10px 0;overflow:hidden}.kv-upload-progress .progress-bar{height:11px;font-family:Verdana,Helvetica,sans-serif}.file-zoom-dialog .file-other-icon{font-size:22em;font-size:50vmin}.file-zoom-dialog .modal-dialog{width:auto}.file-zoom-dialog .modal-header{display:flex;align-items:center;justify-content:space-between}.file-zoom-dialog .btn-navigate{padding:0;margin:-60px 0 0;font-size:60px;background:transparent;text-decoration:none;outline:0;opacity:.7;top:50%;color:#1c94c4}.file-zoom-dialog .btn-navigate:not([disabled]):hover{outline:0;box-shadow:none;opacity:.6}.file-zoom-dialog .floating-buttons{top:5px;right:10px}.file-zoom-dialog .btn-navigate[disabled]{opacity:.3}.file-zoom-dialog .btn-prev{left:1px}.file-zoom-dialog .btn-next{right:1px}.file-zoom-dialog .kv-zoom-title{font-weight:300;color:#999;max-width:50%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.file-input-new .no-browse .form-control{border-top-right-radius:4px;border-bottom-right-radius:4px}.file-input-ajax-new .no-browse .form-control{border-top-right-radius:4px;border-bottom-right-radius:4px}.file-caption-main{width:100%}.file-thumb-loading{background:transparent url(loading.gif) no-repeat scroll center center content-box!important}.file-drop-zone{border:1px dashed #aaa;min-height:260px;border-radius:4px;text-align:center;vertical-align:middle;margin:12px 15px 12px 12px;padding:5px}.file-drop-zone.clickable:hover{border:2px dashed #999}.file-drop-zone.clickable:focus{border:2px solid #5acde2}.file-drop-zone .file-preview-thumbnails{cursor:default}.file-drop-zone-title{color:#aaa;font-size:1.6em;text-align:center;padding:85px 10px;cursor:default}.file-highlighted{border:2px dashed #999!important;background-color:#eee}.file-uploading{background:url(loading-sm.gif) no-repeat center bottom 10px;opacity:.65}.file-zoom-fullscreen .modal-dialog{min-width:100%;margin:0}.file-zoom-fullscreen .modal-content{border-radius:0;box-shadow:none;min-height:100vh}.file-zoom-fullscreen .modal-body{overflow-y:auto}.floating-buttons{z-index:3000}.floating-buttons .btn-kv{margin-left:3px;z-index:3000}.kv-zoom-actions .btn-kv{margin-left:3px}.file-zoom-content{text-align:center;min-height:300px}.file-zoom-content .file-preview-image{max-height:100%}.file-zoom-content .file-preview-video{max-height:100%}.file-zoom-content>.file-object.type-image{height:auto;min-height:inherit}.file-zoom-content>.file-object.type-audio{width:auto;height:30px}@media(min-width:576px){.file-zoom-dialog .modal-dialog{max-width:500px}}@media(min-width:992px){.file-zoom-dialog .modal-lg{max-width:800px}}@media(max-width:767px){.file-preview-thumbnails{display:flex;justify-content:center;align-items:center;flex-direction:column}.file-zoom-dialog .modal-header{flex-direction:column}}@media(max-width:350px){.krajee-default.file-preview-frame:not([data-template="audio"]) .kv-file-content{width:160px}}@media(max-width:420px){.krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered{width:100%}}.file-loading[dir=rtl]:before{background:transparent url(loading.gif) top right no-repeat;padding-left:0;padding-right:20px}.clickable .file-drop-zone-title{cursor:pointer}.file-sortable .file-drag-handle:hover{opacity:.7}.file-sortable .file-drag-handle{cursor:grab;opacity:1}.file-grabbing,.file-grabbing *{cursor:not-allowed!important}.file-grabbing .file-preview-thumbnails *{cursor:grabbing!important}.file-preview-frame.sortable-chosen{background-color:#d9edf7;border-color:#17a2b8;box-shadow:none!important}.file-preview .kv-zoom-cache{display:none} \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.js b/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.js new file mode 100644 index 0000000..5d74192 --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.js @@ -0,0 +1,11 @@ +/*! + * bootstrap-fileinput v5.1.3 + * http://plugins.krajee.com/file-input + * + * Author: Kartik Visweswaran + * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com + * + * Licensed under the BSD-3-Clause + * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md + */ +!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(window.jQuery)}(function(e){e.fn.fileinputLocales={},e.fn.fileinputThemes={},String.prototype.setTokens=function(e){var t,i,a=""+this;for(t in e){e.hasOwnProperty(t)&&(i=RegExp("{"+t+"}","g"),a=a.replace(i,e[t]))}return a},Array.prototype.flatMap||(Array.prototype.flatMap=function(e){return[].concat(this.map(e))});var t,i;t={FRAMES:".kv-preview-thumb",SORT_CSS:"file-sortable",INIT_FLAG:"init-",OBJECT_PARAMS:'\n\n\n\n\n\n',DEFAULT_PREVIEW:'
    \n{previewFileIcon}\n
    ',MODAL_ID:"kvFileinputModal",MODAL_EVENTS:["show","shown","hide","hidden","loaded"],logMessages:{ajaxError:"{status}: {error}. Error Details: {text}.",badDroppedFiles:"Error scanning dropped files!",badExifParser:"Error loading the piexif.js library. {details}",badInputType:'The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.',exifWarning:'To avoid this warning, either set "autoOrientImage" to "false" OR ensure you have loaded the "piexif.js" library correctly on your page before the "fileinput.js" script.',invalidChunkSize:'Invalid upload chunk size: "{chunkSize}". Resumable uploads are disabled.',invalidThumb:'Invalid thumb frame with id: "{id}".',noResumableSupport:"The browser does not support resumable or chunk uploads.",noUploadUrl:'The "uploadUrl" is not set. Ajax uploads and resumable uploads have been disabled.',retryStatus:"Retrying upload for chunk # {chunk} for {filename}... retry # {retry}.",chunkQueueError:"Could not push task to ajax pool for chunk index # {index}.",resumableMaxRetriesReached:"Maximum resumable ajax retries ({n}) reached.",resumableRetryError:"Could not retry the resumable request (try # {n})... aborting.",resumableAborting:"Aborting / cancelling the resumable request."},objUrl:window.URL||window.webkitURL,now:function(){return(new Date).getTime()},round:function(e){return e=parseFloat(e),isNaN(e)?0:Math.floor(Math.round(e))},getArray:function(e){var t,i=[],a=e&&e.length||0;for(t=0;a>t;t++){i.push(e[t])}return i},getFileRelativePath:function(e){return(e.newPath||e.relativePath||e.webkitRelativePath||t.getFileName(e)||null)+""},getFileId:function(e,i){var a=t.getFileRelativePath(e);return"function"==typeof i?i(e):e&&a?e.size+"_"+encodeURIComponent(a).replace(/%/g,"_"):null},getFrameSelector:function(e,t){return t=t||"",'[id="'+e+'"]'+t},getZoomSelector:function(e,i){return t.getFrameSelector("zoom-"+e,i)},getFrameElement:function(e,i,a){return e.find(t.getFrameSelector(i,a))},getZoomElement:function(e,i,a){return e.find(t.getZoomSelector(i,a))},getElapsed:function(i){var a=i,r="",n={},o={year:31536000,month:2592000,week:604800,day:86400,hour:3600,minute:60,second:1};return t.getObjectKeys(o).forEach(function(e){n[e]=Math.floor(a/o[e]),a-=n[e]*o[e]}),e.each(n,function(e,t){t>0&&(r+=(r?" ":"")+t+e.substring(0,1))}),r},debounce:function(e,t){var i;return function(){var a=arguments,r=this;clearTimeout(i),i=setTimeout(function(){e.apply(r,a)},t)}},stopEvent:function(e){e.stopPropagation(),e.preventDefault()},getFileName:function(e){return e?e.fileName||e.name||"":""},createObjectURL:function(e){return t.objUrl&&t.objUrl.createObjectURL&&e?t.objUrl.createObjectURL(e):""},revokeObjectURL:function(e){t.objUrl&&t.objUrl.revokeObjectURL&&e&&t.objUrl.revokeObjectURL(e)},compare:function(e,t,i){return void 0!==e&&(i?e===t:e.match(t))},isIE:function(e){var t,i;return"Microsoft Internet Explorer"!==navigator.appName?!1:10===e?RegExp("msie\\s"+e,"i").test(navigator.userAgent):(t=document.createElement("div"),t.innerHTML="",i=t.getElementsByTagName("i").length,document.body.appendChild(t),t.parentNode.removeChild(t),i)},canOrientImage:function(t){var i=e(document.createElement("img")).css({width:"1px",height:"1px"}).insertAfter(t),a=i.css("image-orientation");return i.remove(),!!a},canAssignFilesToInput:function(){var e=document.createElement("input");try{return e.type="file",e.files=null,!0}catch(t){return !1}},getDragDropFolders:function(e){var t,i,a=e?e.length:0,r=0;if(a>0&&e[0].webkitGetAsEntry()){for(t=0;a>t;t++){i=e[t].webkitGetAsEntry(),i&&i.isDirectory&&r++}}return r},initModal:function(t){var i=e("body");i.length&&t.appendTo(i)},isFunction:function(e){return"function"==typeof e},isEmpty:function(i,a){return void 0===i||null===i||!t.isFunction(i)&&(0===i.length||a&&""===e.trim(i))},isArray:function(e){return Array.isArray(e)||"[object Array]"===Object.prototype.toString.call(e)},ifSet:function(e,t,i){return i=i||"",t&&"object"==typeof t&&e in t?t[e]:i},cleanArray:function(e){return e instanceof Array||(e=[]),e.filter(function(e){return void 0!==e&&null!==e})},spliceArray:function(t,i,a){var r,n,o=0,l=[];if(!(t instanceof Array)){return[]}for(n=e.extend(!0,[],t),a&&n.reverse(),r=0;r=0?atob(e.split(",")[1]):decodeURIComponent(e.split(",")[1]),a=new ArrayBuffer(i.length),r=new Uint8Array(a),n=0;nl;){switch(i=n[l++],i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(i);break;case 12:case 13:a=n[l++],o+=String.fromCharCode((31&i)<<6|63&a);break;case 14:a=n[l++],r=n[l++],o+=String.fromCharCode((15&i)<<12|(63&a)<<6|(63&r)<<0)}}return o},isHtml:function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=t.childNodes,a=i.length;a--;){if(1===i[a].nodeType){return !0}}return !1},isSvg:function(e){return e.match(/^\s*<\?xml/i)&&(e.match(/"+t+""))},uniqId:function(){return((new Date).getTime()+Math.floor(Math.random()*Math.pow(10,15))).toString(36)},cspBuffer:{CSP_ATTRIB:"data-csp-01928735",domElementsStyles:{},stash:function(i){var a=this,r=e.parseHTML("
    "+i+"
    "),n=e(r);n.find("[style]").each(function(i,r){var n=e(r),o=n.attr("style"),l=t.uniqId(),s={};o&&o.length&&(-1===o.indexOf(";")&&(o+=";"),o.slice(0,o.length-1).split(";").map(function(e){e=e.split(":"),e[0]&&(s[e[0]]=e[1]?e[1]:"")}),a.domElementsStyles[l]=s,n.removeAttr("style").attr(a.CSP_ATTRIB,l))}),n.filter("*").removeAttr("style");var o=Object.values?Object.values(r):Object.keys(r).map(function(e){return r[e]});return o.flatMap(function(e){return e.innerHTML}).join("")},apply:function(t){var i=this,a=e(t);a.find("["+i.CSP_ATTRIB+"]").each(function(t,a){var r=e(a),n=r.attr(i.CSP_ATTRIB),o=i.domElementsStyles[n];o&&r.css(o),r.removeAttr(i.CSP_ATTRIB)}),i.domElementsStyles={}}},setHtml:function(e,i){var a=t.cspBuffer;return e.html(a.stash(i)),a.apply(e),e},htmlEncode:function(e,t){return void 0===e?t||null:e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},replaceTags:function(t,i){var a=t;return i?(e.each(i,function(e,t){"function"==typeof t&&(t=t()),a=a.split(e).join(t)}),a):a},cleanMemory:function(e){var i=e.is("img")?e.attr("src"):e.find("source").attr("src");t.revokeObjectURL(i)},findFileName:function(e){var t=e.lastIndexOf("/");return -1===t&&(t=e.lastIndexOf("\\")),e.split(e.substring(t,t+1)).pop()},checkFullScreen:function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},toggleFullScreen:function(e){var i=document,a=i.documentElement,r=t.checkFullScreen();a&&e&&!r?a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):r&&(i.exitFullscreen?i.exitFullscreen():i.msExitFullscreen?i.msExitFullscreen():i.mozCancelFullScreen?i.mozCancelFullScreen():i.webkitExitFullscreen&&i.webkitExitFullscreen())},moveArray:function(t,i,a,r){var n=e.extend(!0,[],t);if(r&&n.reverse(),a>=n.length){for(var o=a-n.length;o--+1;){n.push(void 0)}}return n.splice(a,0,n.splice(i,1)[0]),r&&n.reverse(),n},closeButton:function(e){return e=e?"close "+e:"close",''},getRotation:function(e){switch(e){case 2:return"rotateY(180deg)";case 3:return"rotate(180deg)";case 4:return"rotate(180deg) rotateY(180deg)";case 5:return"rotate(270deg) rotateY(180deg)";case 6:return"rotate(90deg)";case 7:return"rotate(90deg) rotateY(180deg)";case 8:return"rotate(270deg)";default:return""}},setTransform:function(e,t){e&&(e.style.transform=t,e.style.webkitTransform=t,e.style["-moz-transform"]=t,e.style["-ms-transform"]=t,e.style["-o-transform"]=t)},getObjectKeys:function(t){var i=[];return t&&e.each(t,function(e){i.push(e)}),i},getObjectSize:function(e){return t.getObjectKeys(e).length},whenAll:function(i){var a,r,n,o,l,s,d=[].slice,c=1===arguments.length&&t.isArray(i)?i:d.call(arguments),u=e.Deferred(),p=0,f=c.length,g=f;for(n=o=l=Array(f),s=function(e,t,i){return function(){i!==c&&p++,u.notifyWith(t[e]=this,i[e]=d.call(arguments)),--g||u[(p?"reject":"resolve")+"With"](t,i)}},a=0;f>a;a++){(r=c[a])&&e.isFunction(r.promise)?r.promise().done(s(a,l,c)).fail(s(a,n,o)):(u.notifyWith(this,r),--g)}return g||u.resolveWith(l,c),u.promise()}},i=function(i,a){var r=this;r.$element=e(i),r.$parent=r.$element.parent(),r._validate()&&(r.isPreviewable=t.hasFileAPISupport(),r.isIE9=t.isIE(9),r.isIE10=t.isIE(10),(r.isPreviewable||r.isIE9)&&(r._init(a),r._listen()),r.$element.removeClass("file-loading"))},i.prototype={constructor:i,_cleanup:function(){var e=this;e.reader=null,e.clearFileStack(),e.fileBatchCompleted=!0,e.isError=!1,e.isDuplicateError=!1,e.isPersistentError=!1,e.cancelling=!1,e.paused=!1,e.lastProgress=0,e._initAjax()},_isAborted:function(){var e=this;return e.cancelling||e.paused},_initAjax:function(){var i=this,a=i.taskManager={pool:{},addPool:function(e){return a.pool[e]=new a.TasksPool(e)},getPool:function(e){return a.pool[e]},addTask:function(e,t){return new a.Task(e,t)},TasksPool:function(i){var r=this;r.id=i,r.cancelled=!1,r.cancelledDeferrer=e.Deferred(),r.tasks={},r.addTask=function(e,t){return r.tasks[e]=new a.Task(e,t)},r.size=function(){return t.getObjectSize(r.tasks)},r.run=function(i){var a,n,o,l=0,s=!1,d=t.getObjectKeys(r.tasks).map(function(e){return r.tasks[e]}),c=[],u=e.Deferred();if(r.cancelled){return r.cancelledDeferrer.resolve(),u.reject()}if(!i){var p=t.getObjectKeys(r.tasks).map(function(e){return r.tasks[e].deferred});return t.whenAll(p).done(function(){var e=t.getArray(arguments);r.cancelled?(u.reject.apply(null,e),r.cancelledDeferrer.resolve()):(u.resolve.apply(null,e),r.cancelledDeferrer.reject())}).fail(function(){var e=t.getArray(arguments);u.reject.apply(null,e),r.cancelled?r.cancelledDeferrer.resolve():r.cancelledDeferrer.reject()}),e.each(r.tasks,function(e){a=r.tasks[e],a.run()}),u}for(n=function(t){e.when(t.deferred).fail(function(){s=!0,o.apply(null,arguments)}).always(o)},o=function(){var e=t.getArray(arguments);return u.notify(e),c.push(e),r.cancelled?(u.reject.apply(null,c),void r.cancelledDeferrer.resolve()):(c.length===r.size()&&(s?u.reject.apply(null,c):u.resolve.apply(null,c)),void (d.length&&(a=d.shift(),n(a),a.run())))};d.length&&l++0&&s.maxTotalFileCounti.file.size?i.file.size:e},getTotalChunks:function(){var e=parseFloat(i.chunkSize);return !isNaN(e)&&e>0?Math.ceil(i.file.size/e):0},getProgress:function(){var e=i.processedResumables(),t=i.chunkCount;return 0===t?0:Math.ceil(e/t*100)},checkAborted:function(e){a._isAborted()&&(clearInterval(e),a.unlock())},upload:function(){var e,r=o.getIdList(),n="new";e=setInterval(function(){var l;if(i.checkAborted(e),"new"===n&&(a.lock(),n="processing",l=r.shift(),o.initStats(l),o.stack[l]&&(i.init(l,o.stack[l],o.getIndex(l)),i.processUpload())),!o.isPending(l)&&i.completed&&(n="new"),o.isProcessed()){var s=a.$preview.find(".file-preview-initial");s.length&&(t.addCss(s,t.SORT_CSS),a._initSortable()),clearInterval(e),a._clearFileInput(),a.unlock(),setTimeout(function(){var e=a.previewCache.data;e&&(a.initialPreview=e.content,a.initialPreviewConfig=e.config,a.initialPreviewThumbTags=e.tags),a._raise("filebatchuploadcomplete",[a.initialPreview,a.initialPreviewConfig,a.initialPreviewThumbTags,a._getExtraData()])},a.processDelay)}},a.processDelay)},uploadResumable:function(){var e,t,n=a.taskManager,o=i.chunkCount;for(t=n.addPool(i.id),e=0;o>e;e++){i.logs[e]=!(!i.chunksProcessed[i.id]||!i.chunksProcessed[i.id][e]),i.logs[e]||i.pushAjax(e,0)}t.run(r.maxThreads).done(function(){i.setProcessed("success")}).fail(function(){i.setProcessed(t.cancelled?"cancel":"error")})},processUpload:function(){var n,l,s,d,c,u,p,f=i.id;return r.testUrl?(n=new FormData,l=o.stack[f],a._setUploadData(n,{fileId:f,fileName:l.fileName,fileSize:l.size,fileRelativePath:l.relativePath,chunkSize:i.chunkSize,chunkCount:i.chunkCount}),s=function(e){p=a._getOutData(n,e),a._raise("filetestbeforesend",[f,o,i,p])},d=function(r,l,s){p=a._getOutData(n,s,r);var d=a.uploadParamNames,c=d.chunksUploaded||"chunksUploaded",u=[f,o,i,p];r[c]&&t.isArray(r[c])?(i.chunksProcessed[f]||(i.chunksProcessed[f]={}),e.each(r[c],function(e,t){i.logs[t]=!0,i.chunksProcessed[f][t]=!0}),i.chunksProcessed[f].data=r,a._raise("filetestsuccess",u)):a._raise("filetesterror",u),i.uploadResumable()},c=function(e,t,r){p=a._getOutData(n,e),a._raise("filetestajaxerror",[f,o,i,p]),i.setAjaxError(e,t,r,!0),i.uploadResumable()},u=function(){a._raise("filetestcomplete",[f,o,i,a._getOutData(n)])},void a._ajaxSubmit(s,d,u,c,n,f,i.fileIndex,r.testUrl)):void i.uploadResumable()},pushAjax:function(e,t){var r=a.taskManager,o=r.getPool(i.id);o.addTask(o.size()+1,function(e){var t,r=i.stack.shift();t=r[0],i.chunksProcessed[i.id]&&i.chunksProcessed[i.id][t]?a._log(n.chunkQueueError,{index:t}):i.sendAjax(t,r[1],e)}),i.stack.push([e,t])},sendAjax:function(e,l,s){var d,c=i.chunkSize,u=i.id,p=i.file,f=i.$thumb,g=t.logMessages,m=i.$btnDelete,h=function(e,t){t&&(e=e.setTokens(t)),e="Error processing resumable ajax request. "+e,a._log(e),s.reject(e)};if(!i.chunksProcessed[u]||!i.chunksProcessed[u][e]){if(l>r.maxRetries){return h(g.resumableMaxRetriesReached,{n:r.maxRetries}),void i.setProcessed("error")}var v,w,b,_,C,y,x=p.slice?"slice":p.mozSlice?"mozSlice":p.webkitSlice?"webkitSlice":"slice",T=p[x](c*e,c*(e+1));v=new FormData,d=o.stack[u],a._setUploadData(v,{chunkCount:i.chunkCount,chunkIndex:e,chunkSize:c,chunkSizeStart:c*e,fileBlob:[T,i.fileName],fileId:u,fileName:i.fileName,fileRelativePath:d.relativePath,fileSize:p.size,retryCount:l}),i.$progress&&i.$progress.length&&i.$progress.show(),b=function(r){w=a._getOutData(v,r),a.showPreview&&(f.hasClass("file-preview-success")||(a._setThumbStatus(f,"Loading"),t.addCss(f,"file-uploading")),m.attr("disabled",!0)),a._raise("filechunkbeforesend",[u,e,l,o,i,w])},_=function(t,d,c){if(a._isAborted()){return void h(g.resumableAborting)}w=a._getOutData(v,c,t);var p=a.uploadParamNames,f=p.chunkIndex||"chunkIndex",m=[u,e,l,o,i,w];t.error?(r.showErrorLog&&a._log(n.retryStatus,{retry:l+1,filename:i.fileName,chunk:e}),i.pushAjax(e,l+1),i.error=t.error,a._raise("filechunkerror",m)):(i.logs[t[f]]=!0,i.chunksProcessed[u]||(i.chunksProcessed[u]={}),i.chunksProcessed[u][t[f]]=!0,i.chunksProcessed[u].data=t,s.resolve.call(null,t),a._raise("filechunksuccess",m),i.check())},C=function(t,r,n){return a._isAborted()?void h(g.resumableAborting):(w=a._getOutData(v,t),i.setAjaxError(t,r,n),a._raise("filechunkajaxerror",[u,e,l,o,i,w]),i.pushAjax(e,l+1),void h(g.resumableRetryError,{n:l-1}))},y=function(){a._isAborted()||a._raise("filechunkcomplete",[u,e,l,o,i,a._getOutData(v)])},a._ajaxSubmit(b,_,y,C,v,u,i.fileIndex)}}},i.reset()}},_initTemplateDefaults:function(){var i,a,r,n,o,l,s,d,c,u,p,f,g,m,h,v,w,b,_,C,y,x,T,P,F,E,k,S,I,A,D,z,j,U,M,$,R,O,B,L,N,Z,H=this,W=function(e,i){return'\n"+t.DEFAULT_PREVIEW+"\n\n"};i='{preview}\n
    \n
    \n {caption}\n
    \n {remove}\n {cancel}\n {pause}\n {upload}\n {browse}\n
    \n
    ',a='{preview}\n
    \n
    \n{remove}\n{cancel}\n{upload}\n{browse}\n',r='
    \n {close}
    \n
    \n
    \n
    \n
    \n
    \n
    ',o=t.closeButton("fileinput-remove"),n='',l='
    \n \n \n
    ',s='',d='{icon} {label}',c='
    {icon} {label}
    ',Z=t.MODAL_ID+"Label",u='',p='\n',f='
    \n
    \n {status}\n
    \n
    {stats}',N='
    {pendingTime} {uploadSpeed}
    ',g=" ({sizeText})",m='',h='
    \n \n
    \n{drag}\n
    ',v='\n',w='',b='{downloadIcon}',_='',C='{dragIcon}',y='
    {indicator}
    ',x='
    \n',P=x+' title="{caption}">
    \n',F="
    {footer}\n{zoomCache}
    \n",E="{content}\n",O=" {style}",k=W("html","text/html"),I=W("text","text/plain;charset=UTF-8"),$=W("pdf","application/pdf"),S='{alt}\n",A='",D='",z='\n",j='\n",U='\n",M='\n\n'+t.OBJECT_PARAMS+" "+t.DEFAULT_PREVIEW+"\n\n",R='
    \n"+t.DEFAULT_PREVIEW+"\n
    \n",B='
    {zoomContent}
    ',L={width:"100%",height:"100%","min-height":"480px"},H._isPdfRendered()&&($=H.pdfRendererTemplate.replace("{renderer}",H._encodeURI(H.pdfRendererUrl))),H.defaults={layoutTemplates:{main1:i,main2:a,preview:r,close:o,fileIcon:n,caption:l,modalMain:u,modal:p,progress:f,stats:N,size:g,footer:m,indicator:y,actions:h,actionDelete:v,actionUpload:w,actionDownload:b,actionZoom:_,actionDrag:C,btnDefault:s,btnLink:d,btnBrowse:c,zoomCache:B},previewMarkupTags:{tagBefore1:T,tagBefore2:P,tagAfter:F},previewContentTemplates:{generic:E,html:k,image:S,text:I,office:A,gdocs:D,video:z,audio:j,flash:U,object:M,pdf:$,other:R},allowedPreviewTypes:["image","html","text","video","audio","flash","pdf","object"],previewTemplates:{},previewSettings:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:{width:"213px",height:"160px"},text:{width:"213px",height:"160px"},office:{width:"213px",height:"160px"},gdocs:{width:"213px",height:"160px"},video:{width:"213px",height:"160px"},audio:{width:"100%",height:"30px"},flash:{width:"213px",height:"160px"},object:{width:"213px",height:"160px"},pdf:{width:"100%",height:"160px",position:"relative"},other:{width:"213px",height:"160px"}},previewSettingsSmall:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:{width:"100%",height:"160px"},text:{width:"100%",height:"160px"},office:{width:"100%",height:"160px"},gdocs:{width:"100%",height:"160px"},video:{width:"100%",height:"auto"},audio:{width:"100%",height:"30px"},flash:{width:"100%",height:"auto"},object:{width:"100%",height:"auto"},pdf:{width:"100%",height:"160px"},other:{width:"100%",height:"160px"}},previewZoomSettings:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:L,text:L,office:{width:"100%",height:"100%","max-width":"100%","min-height":"480px"},gdocs:{width:"100%",height:"100%","max-width":"100%","min-height":"480px"},video:{width:"auto",height:"100%","max-width":"100%"},audio:{width:"100%",height:"30px"},flash:{width:"auto",height:"480px"},object:{width:"auto",height:"100%","max-width":"100%","min-height":"480px"},pdf:L,other:{width:"auto",height:"100%","min-height":"480px"}},mimeTypeAliases:{"video/quicktime":"video/mp4"},fileTypeSettings:{image:function(e,i){return t.compare(e,"image.*")&&!t.compare(e,/(tiff?|wmf)$/i)||t.compare(i,/\.(gif|png|jpe?g)$/i)},html:function(e,i){return t.compare(e,"text/html")||t.compare(i,/\.(htm|html)$/i)},office:function(e,i){return t.compare(e,/(word|excel|powerpoint|office)$/i)||t.compare(i,/\.(docx?|xlsx?|pptx?|pps|potx?)$/i)},gdocs:function(e,i){return t.compare(e,/(word|excel|powerpoint|office|iwork-pages|tiff?)$/i)||t.compare(i,/\.(docx?|xlsx?|pptx?|pps|potx?|rtf|ods|odt|pages|ai|dxf|ttf|tiff?|wmf|e?ps)$/i)},text:function(e,i){return t.compare(e,"text.*")||t.compare(i,/\.(xml|javascript)$/i)||t.compare(i,/\.(txt|md|nfo|ini|json|php|js|css)$/i)},video:function(e,i){return t.compare(e,"video.*")&&(t.compare(e,/(ogg|mp4|mp?g|mov|webm|3gp)$/i)||t.compare(i,/\.(og?|mp4|webm|mp?g|mov|3gp)$/i))},audio:function(e,i){return t.compare(e,"audio.*")&&(t.compare(i,/(ogg|mp3|mp?g|wav)$/i)||t.compare(i,/\.(og?|mp3|mp?g|wav)$/i))},flash:function(e,i){return t.compare(e,"application/x-shockwave-flash",!0)||t.compare(i,/\.(swf)$/i)},pdf:function(e,i){return t.compare(e,"application/pdf",!0)||t.compare(i,/\.(pdf)$/i)},object:function(){return !0},other:function(){return !0}},fileActionSettings:{showRemove:!0,showUpload:!0,showDownload:!0,showZoom:!0,showDrag:!0,removeIcon:'',removeClass:"btn btn-sm btn-kv btn-default btn-outline-secondary",removeErrorClass:"btn btn-sm btn-kv btn-danger",removeTitle:"Remove file",uploadIcon:'',uploadClass:"btn btn-sm btn-kv btn-default btn-outline-secondary",uploadTitle:"Upload file",uploadRetryIcon:'',uploadRetryTitle:"Retry upload",downloadIcon:'',downloadClass:"btn btn-sm btn-kv btn-default btn-outline-secondary",downloadTitle:"Download file",zoomIcon:'',zoomClass:"btn btn-sm btn-kv btn-default btn-outline-secondary",zoomTitle:"View Details",dragIcon:'',dragClass:"text-info",dragTitle:"Move / Rearrange",dragSettings:{},indicatorNew:'',indicatorSuccess:'',indicatorError:'',indicatorLoading:'',indicatorPaused:'',indicatorNewTitle:"Not uploaded yet",indicatorSuccessTitle:"Uploaded",indicatorErrorTitle:"Upload Error",indicatorLoadingTitle:"Uploading …",indicatorPausedTitle:"Upload Paused"}},e.each(H.defaults,function(t,i){return"allowedPreviewTypes"===t?void (void 0===H.allowedPreviewTypes&&(H.allowedPreviewTypes=i)):void (H[t]=e.extend(!0,{},i,H[t]))}),H._initPreviewTemplates()},_initPreviewTemplates:function(){var i,a=this,r=a.previewMarkupTags,n=r.tagAfter;e.each(a.previewContentTemplates,function(e,o){t.isEmpty(a.previewTemplates[e])&&(i=r.tagBefore2,("generic"===e||"image"===e)&&(i=r.tagBefore1),a._isPdfRendered()&&"pdf"===e&&(i=i.replace("kv-file-content","kv-file-content kv-pdf-rendered")),a.previewTemplates[e]=i+o+n)})},_initPreviewCache:function(){var i=this;i.previewCache={data:{},init:function(){var e=i.initialPreview;e.length>0&&!t.isArray(e)&&(e=e.split(i.initialPreviewDelimiter)),i.previewCache.data={content:e,config:i.initialPreviewConfig,tags:i.initialPreviewThumbTags}},count:function(e){if(!i.previewCache.data||!i.previewCache.data.content){return 0}if(e){var t=i.previewCache.data.content.filter(function(e){return null!==e});return t.length}return i.previewCache.data.content.length},get:function(e,a){var r,n,o,l,s,d,c,u=t.INIT_FLAG+e,p=i.previewCache.data,f=p.config[e],g=p.content[e],m=t.ifSet("previewAsData",f,i.initialPreviewAsData),h=f?{title:f.title||null,alt:f.alt||null}:{title:null,alt:null},v=function(e,a,r,n,o,l,s,d){var c=" file-preview-initial "+t.SORT_CSS+(s?" "+s:""),u=i.previewInitId+"-"+l,p=f&&f.fileId||u;return i._generatePreviewTemplate(e,a,r,n,u,p,!1,null,c,o,l,d,h,f&&f.zoomData||a)};return g&&g.length?(a=void 0===a?!0:a,o=t.ifSet("type",f,i.initialPreviewFileType||"generic"),s=t.ifSet("filename",f,t.ifSet("caption",f)),d=t.ifSet("filetype",f,o),l=i.previewCache.footer(e,a,f&&f.size||null),c=t.ifSet("frameClass",f),r=m?v(o,g,s,d,l,u,c):v("generic",g,s,d,l,u,c,o).setTokens({content:p.content[e]}),p.tags.length&&p.tags[e]&&(r=t.replaceTags(r,p.tags[e])),t.isEmpty(f)||t.isEmpty(f.frameAttr)||(n=t.createElement(r),n.find(".file-preview-initial").attr(f.frameAttr),r=n.html(),n.remove()),r):""},clean:function(e){e.content=t.cleanArray(e.content),e.config=t.cleanArray(e.config),e.tags=t.cleanArray(e.tags),i.previewCache.data=e},add:function(e,a,r,n){var o,l=i.previewCache.data;return e&&e.length?(o=e.length-1,t.isArray(e)||(e=e.split(i.initialPreviewDelimiter)),n&&l.content?(o=l.content.push(e[0])-1,l.config[o]=a,l.tags[o]=r):(l.content=e,l.config=a,l.tags=r),i.previewCache.clean(l),o):0},set:function(e,a,r,n){var o,l,s=i.previewCache.data;if(e&&e.length&&(t.isArray(e)||(e=e.split(i.initialPreviewDelimiter)),l=e.filter(function(e){return null!==e}),l.length)){if(void 0===s.content&&(s.content=[]),void 0===s.config&&(s.config=[]),void 0===s.tags&&(s.tags=[]),n){for(o=0;ot;t++){a=i.previewCache.get(t),r=i.reversePreviewOrder?a+r:r+a}return e=i._getMsgSelected(n),{content:r,caption:e}},footer:function(e,a,r){var n=i.previewCache.data||{};if(t.isEmpty(n.content)){return""}(t.isEmpty(n.config)||t.isEmpty(n.config[e]))&&(n.config[e]={}),a=void 0===a?!0:a;var o,l=n.config[e],s=t.ifSet("caption",l),d=t.ifSet("width",l,"auto"),c=t.ifSet("url",l,!1),u=t.ifSet("key",l,null),p=t.ifSet("fileId",l,null),f=i.fileActionSettings,g=i.initialPreviewShowDelete||!1,m=i.initialPreviewDownloadUrl?i.initialPreviewDownloadUrl+"?key="+u+(p?"&fileId="+p:""):"",h=l.downloadUrl||m,v=l.filename||l.caption||"",w=!!h,b=t.ifSet("showRemove",l,g),_=t.ifSet("showDownload",l,t.ifSet("showDownload",f,w)),C=t.ifSet("showZoom",l,t.ifSet("showZoom",f,!0)),y=t.ifSet("showDrag",l,t.ifSet("showDrag",f,!0)),x=c===!1&&a;return _=_&&l.downloadUrl!==!1&&!!h,o=i._renderFileActions(l,!1,_,b,C,y,x,c,u,!0,h,v),i._getLayoutTemplate("footer").setTokens({progress:i._renderThumbProgress(),actions:o,caption:s,size:i._getSize(r),width:d,indicator:""})}},i.previewCache.init()},_isPdfRendered:function(){var e=this,t=e.usePdfRenderer,i="function"==typeof t?t():!!t;return i&&e.pdfRendererUrl},_handler:function(e,t,i){var a=this,r=a.namespace,n=t.split(" ").join(r+" ")+r;e&&e.length&&e.off(n).on(n,i)},_encodeURI:function(e){var t=this;return t.encodeUrl?encodeURI(e):e},_log:function(e,t){var i=this,a=i.$element.attr("id");i.showConsoleLogs&&(a&&(e='"'+a+'": '+e),e="bootstrap-fileinput: "+e,"object"==typeof t&&(e=e.setTokens(t)),window.console&&void 0!==window.console.log?window.console.log(e):window.alert(e))},_validate:function(){var e=this,i="file"===e.$element.attr("type");return i||e._log(t.logMessages.badInputType),i},_errorsExist:function(){var i,a=this,r=a.$errorContainer.find("li");return r.length?!0:(i=t.createElement(a.$errorContainer.html()),i.find(".kv-error-close").remove(),i.find("ul").remove(),!!e.trim(i.text()).length)},_errorHandler:function(e,t){var i=this,a=e.target.error,r=function(e){i._showError(e.replace("{name}",t))};r(a.code===a.NOT_FOUND_ERR?i.msgFileNotFound:a.code===a.SECURITY_ERR?i.msgFileSecured:a.code===a.NOT_READABLE_ERR?i.msgFileNotReadable:a.code===a.ABORT_ERR?i.msgFilePreviewAborted:i.msgFilePreviewError)},_addError:function(e){var i=this,a=i.$errorContainer;e&&a.length&&(t.setHtml(a,i.errorCloseButton+e),i._handler(a.find(".kv-error-close"),"click",function(){setTimeout(function(){i.showPreview&&!i.getFrames().length&&i.clear(),a.fadeOut("slow")},i.processDelay)}))},_setValidationError:function(e){var i=this;e=(e?e+" ":"")+"has-error",i.$container.removeClass(e).addClass("has-error"),t.addCss(i.$captionContainer,"is-invalid")},_resetErrors:function(e){var t=this,i=t.$errorContainer;t.isPersistentError||(t.isError=!1,t.$container.removeClass("has-error"),t.$captionContainer.removeClass("is-invalid"),i.html(""),e?i.fadeOut("slow"):i.hide())},_showFolderError:function(e){var t,i=this,a=i.$errorContainer;e&&(i.isAjaxUpload||i._clearFileInput(),t=i.msgFoldersNotAllowed.replace("{n}",e),i._addError(t),i._setValidationError(),a.fadeIn(i.fadeDelay),i._raise("filefoldererror",[e,t]))},_showFileError:function(e,t,i){var a=this,r=a.$errorContainer,n=i||"fileuploaderror",o=t&&t.fileId||"",l=t&&t.id?'
  • '+e+"
  • ":"
  • "+e+"
  • ";return 0===r.find("ul").length?a._addError("
      "+l+"
    "):r.find("ul").append(l),r.fadeIn(a.fadeDelay),a._raise(n,[t,e]),a._setValidationError("file-input-new"),!0},_showError:function(e,t,i){var a=this,r=a.$errorContainer,n=i||"fileerror";return t=t||{},t.reader=a.reader,a._addError(e),r.fadeIn(a.fadeDelay),a._raise(n,[t,e]),a.isAjaxUpload||a._clearFileInput(),a._setValidationError("file-input-new"),a.$btnUpload.attr("disabled",!0),!0},_noFilesError:function(e){var t=this,i=t.minFileCount>1?t.filePlural:t.fileSingle,a=t.msgFilesTooLess.replace("{n}",t.minFileCount).replace("{files}",i),r=t.$errorContainer;a="
  • "+a+"
  • ",0===r.find("ul").length?t._addError("
      "+a+"
    "):r.find("ul").append(a),t.isError=!0,t._updateFileDetails(0),r.fadeIn(t.fadeDelay),t._raise("fileerror",[e,a]),t._clearFileInput(),t._setValidationError()},_parseError:function(t,i,a,r){var n,o,l,s=this,d=e.trim(a+"");return o=i.responseJSON&&i.responseJSON.error?""+i.responseJSON.error:"",l=o?o:i.responseText,s.cancelling&&s.msgUploadAborted&&(d=s.msgUploadAborted),s.showAjaxErrorDetails&&l&&(o?d=e.trim(o+""):(l=e.trim(l.replace(/\n\s*\n/g,"\n")),n=l.length?"
    "+l+"
    ":"",d+=d?n:l)),d||(d=s.msgAjaxError.replace("{operation}",t)),s.cancelling=!1,r?""+r+": "+d:d},_parseFileType:function(e,i){var a,r,n,o,l=this,s=l.allowedPreviewTypes||[];if("application/text-plain"===e){return"text"}for(o=0;o-1&&(i=t.split(".").pop(),a.previewFileIconSettings&&(r=a.previewFileIconSettings[i]||a.previewFileIconSettings[i.toLowerCase()]||null),a.previewFileExtSettings&&e.each(a.previewFileExtSettings,function(e,t){return a.previewFileIconSettings[e]&&t(i)?void (r=a.previewFileIconSettings[e]):void 0})),r||a.previewFileIcon},_parseFilePreviewIcon:function(e,t){var i=this,a=i._getPreviewIcon(t),r=e;return r.indexOf("{previewFileIcon}")>-1&&(r=r.setTokens({previewFileIconClass:i.previewFileIconClass,previewFileIcon:a})),r},_raise:function(t,i){var a=this,r=e.Event(t);if(void 0!==i?a.$element.trigger(r,i):a.$element.trigger(r),r.isDefaultPrevented()||r.result===!1){return !1}switch(t){case"filebatchuploadcomplete":case"filebatchuploadsuccess":case"fileuploaded":case"fileclear":case"filecleared":case"filereset":case"fileerror":case"filefoldererror":case"fileuploaderror":case"filebatchuploaderror":case"filedeleteerror":case"filecustomerror":case"filesuccessremove":break;default:a.ajaxAborted||(a.ajaxAborted=r.result)}return !0},_listenFullScreen:function(e){var t,i,a=this,r=a.$modal;r&&r.length&&(t=r&&r.find(".btn-fullscreen"),i=r&&r.find(".btn-borderless"),t.length&&i.length&&(t.removeClass("active").attr("aria-pressed","false"),i.removeClass("active").attr("aria-pressed","false"),e?t.addClass("active").attr("aria-pressed","true"):i.addClass("active").attr("aria-pressed","true"),r.hasClass("file-zoom-fullscreen")?a._maximizeZoomDialog():e?a._maximizeZoomDialog():i.removeClass("active").attr("aria-pressed","false")))},_listen:function(){var i,a,r,n=this,o=n.$element,l=n.$form,s=n.$container;n._handler(o,"click",function(e){o.hasClass("file-no-browse")&&(o.data("zoneClicked")?o.data("zoneClicked",!1):e.preventDefault())}),n._handler(o,"change",e.proxy(n._change,n)),n.showBrowse&&n._handler(n.$btnFile,"click",e.proxy(n._browse,n)),a=s.find(".file-caption-name"),r=function(){return !1},n._handler(s.find(".fileinput-remove:not([disabled])"),"click",e.proxy(n.clear,n)),n._handler(s.find(".fileinput-cancel"),"click",e.proxy(n.cancel,n)),n._handler(s.find(".fileinput-pause"),"click",e.proxy(n.pause,n)),n._handler(a,"keydown",r),n._handler(a,"paste",r),n._initDragDrop(),n._handler(l,"reset",e.proxy(n.clear,n)),n.isAjaxUpload||n._handler(l,"submit",e.proxy(n._submitForm,n)),n._handler(n.$container.find(".fileinput-upload"),"click",e.proxy(n._uploadClick,n)),n._handler(e(window),"resize",function(){n._listenFullScreen(screen.width===window.innerWidth&&screen.height===window.innerHeight)}),i="webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",n._handler(e(document),i,function(){n._listenFullScreen(t.checkFullScreen())}),n._autoFitContent(),n._initClickable(),n._refreshPreview()},_autoFitContent:function(){var t,i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=this,r=400>i?a.previewSettingsSmall||a.defaults.previewSettingsSmall:a.previewSettings||a.defaults.previewSettings;e.each(r,function(e,i){t=".file-preview-frame .file-preview-"+e,a.$preview.find(t+".kv-preview-data,"+t+" .kv-preview-data").css(i)})},_scanDroppedItems:function(e,i,a){a=a||"";var r,n,o,l=this,s=function(e){l._log(t.logMessages.badDroppedFiles),l._log(e)};e.isFile?e.file(function(e){a&&(e.newPath=a+e.name),i.push(e)},s):e.isDirectory&&(n=e.createReader(),(o=function(){n.readEntries(function(t){if(t&&t.length>0){for(r=0;r-1;return a._zoneDragDropInit(i),a.isDisabled||!n?(r.effectAllowed="none",void (r.dropEffect="none")):(r.dropEffect="copy",void (a._raise("fileDragEnter",{sourceEvent:i,files:r.types.Files})&&t.addCss(a.$dropZone,"file-highlighted")))},_zoneDragLeave:function(e){var t=this;t._zoneDragDropInit(e),t.isDisabled||t._raise("fileDragLeave",{sourceEvent:e})&&t.$dropZone.removeClass("file-highlighted")},_zoneDrop:function(e){var i,a=this,r=a.$element,n=e.originalEvent.dataTransfer,o=n.files,l=n.items,s=t.getDragDropFolders(l),d=function(){a.isAjaxUpload?a._change(e,o):(a.changeTriggered=!0,r.get(0).files=o,setTimeout(function(){a.changeTriggered=!1,r.trigger("change"+a.namespace)},a.processDelay)),a.$dropZone.removeClass("file-highlighted")};if(e.preventDefault(),!a.isDisabled&&!t.isEmpty(o)&&a._raise("fileDragDrop",{sourceEvent:e,files:o})){if(s>0){if(!a.isAjaxUpload){return void a._showFolderError(s)}for(o=[],i=0;i0&&n>=s,c=e(i.item);d&&(n=s-1),o.initialPreview=t.moveArray(o.initialPreview,r,n,u),o.initialPreviewConfig=t.moveArray(o.initialPreviewConfig,r,n,u),o.previewCache.init(),o.getFrames(".file-preview-initial").each(function(){e(this).attr("data-fileindex",t.INIT_FLAG+l),l++}),d&&(a=o.getFrames(":not(.file-preview-initial):first"),a.length&&c.slideUp(function(){c.insertBefore(a).slideDown()})),o._raise("filesorted",{previewId:c.attr("id"),oldIndex:r,newIndex:n,stack:o.initialPreviewConfig})}},e.extend(!0,i,o.fileActionSettings.dragSettings),o.sortable&&o.sortable.destroy(),o.sortable=p.create(l[0],i))},_setPreviewContent:function(e){var i=this;t.setHtml(i.$preview,e),i._autoFitContent()},_initPreviewImageOrientations:function(){var t=this,i=0,a=t.canOrientImage;(t.autoOrientImageInitial||a)&&t.getFrames(".file-preview-initial").each(function(){var r,n,o,l=e(this),s=t.initialPreviewConfig[i];s&&s.exif&&s.exif.Orientation&&(o=l.attr("id"),r=l.find(">.kv-file-content img"),n=t._getZoom(o," >.kv-file-content img"),a?r.css("image-orientation",t.autoOrientImageInitial?"from-image":"none"):t.setImageOrientation(r,n,s.exif.Orientation,l)),i++})},_initPreview:function(e){var i,a=this,r=a.initialCaption||"";return a.previewCache.count(!0)?(i=a.previewCache.out(),r=e&&a.initialCaption?a.initialCaption:i.caption,a._setPreviewContent(i.content),a._setInitThumbAttr(),a._setCaption(r),a._initSortable(),t.isEmpty(i.content)||a.$container.removeClass("file-input-new"),void a._initPreviewImageOrientations()):(a._clearPreview(),void (e?a._setCaption(r):a._initCaption()))},_getZoomButton:function(e){var t=this,i=t.previewZoomButtonIcons[e],a=t.previewZoomButtonClasses[e],r=' title="'+(t.previewZoomButtonTitles[e]||"")+'" ',n=r+("close"===e?' data-dismiss="modal" aria-hidden="true"':"");return("fullscreen"===e||"borderless"===e||"toggleheader"===e)&&(n+=' data-toggle="button" aria-pressed="false" autocomplete="off"'),'"},_getModalContent:function(){var e=this;return e._getLayoutTemplate("modal").setTokens({rtl:e.rtl?" kv-rtl":"",zoomFrameClass:e.frameClass,heading:e.msgZoomModalHeading,prev:e._getZoomButton("prev"),next:e._getZoomButton("next"),toggleheader:e._getZoomButton("toggleheader"),fullscreen:e._getZoomButton("fullscreen"),borderless:e._getZoomButton("borderless"),close:e._getZoomButton("close")})},_listenModalEvent:function(e){var i=this,a=i.$modal,r=function(e){return{sourceEvent:e,previewId:a.data("previewId"),modal:a}};a.on(e+".bs.modal",function(n){var o=a.find(".btn-fullscreen"),l=a.find(".btn-borderless");a.data("fileinputPluginId")===i.$element.attr("id")&&i._raise("filezoom"+e,r(n)),"shown"===e&&(l.removeClass("active").attr("aria-pressed","false"),o.removeClass("active").attr("aria-pressed","false"),a.hasClass("file-zoom-fullscreen")&&(i._maximizeZoomDialog(),t.checkFullScreen()?o.addClass("active").attr("aria-pressed","true"):l.addClass("active").attr("aria-pressed","true")))})},_initZoom:function(){var i,a=this,r=a._getLayoutTemplate("modalMain"),n="#"+t.MODAL_ID;a.showPreview&&(a.$modal=e(n),a.$modal&&a.$modal.length||(i=t.createElement(t.cspBuffer.stash(r)).insertAfter(a.$container),a.$modal=e(n).insertBefore(i),t.cspBuffer.apply(a.$modal),i.remove()),t.initModal(a.$modal),a.$modal.html(t.cspBuffer.stash(a._getModalContent())),t.cspBuffer.apply(a.$modal),e.each(t.MODAL_EVENTS,function(e,t){a._listenModalEvent(t)}))},_initZoomButtons:function(){var t,i,a=this,r=a.$modal.data("previewId")||"",n=a.getFrames().toArray(),o=n.length,l=a.$modal.find(".btn-prev"),s=a.$modal.find(".btn-next");return n.length<2?(l.hide(),void s.hide()):(l.show(),s.show(),void (o&&(t=e(n[0]),i=e(n[o-1]),l.removeAttr("disabled"),s.removeAttr("disabled"),t.length&&t.attr("id")===r&&l.attr("disabled",!0),i.length&&i.attr("id")===r&&s.attr("disabled",!0))))},_maximizeZoomDialog:function(){var t=this,i=t.$modal,a=i.find(".modal-header:visible"),r=i.find(".modal-footer:visible"),n=i.find(".modal-body"),o=e(window).height(),l=0;i.addClass("file-zoom-fullscreen"),a&&a.length&&(o-=a.outerHeight(!0)),r&&r.length&&(o-=r.outerHeight(!0)),n&&n.length&&(l=n.outerHeight(!0)-n.height(),o-=l),i.find(".kv-zoom-body").height(o)},_resizeZoomDialog:function(e){var i=this,a=i.$modal,r=a.find(".btn-fullscreen"),n=a.find(".btn-borderless");if(a.hasClass("file-zoom-fullscreen")){t.toggleFullScreen(!1),e?r.hasClass("active")||(a.removeClass("file-zoom-fullscreen"),i._resizeZoomDialog(!0),n.hasClass("active")&&n.removeClass("active").attr("aria-pressed","false")):r.hasClass("active")?r.removeClass("active").attr("aria-pressed","false"):(a.removeClass("file-zoom-fullscreen"),i.$modal.find(".kv-zoom-body").css("height",i.zoomModalHeight))}else{if(!e){return void i._maximizeZoomDialog()}t.toggleFullScreen(!0)}a.focus()},_setZoomContent:function(i,a){var r,n,o,l,s,d,c,u,p,f,g=this,m=i.attr("id"),h=g._getZoom(m),v=g.$modal,w=v.find(".btn-fullscreen"),b=v.find(".btn-borderless"),_=v.find(".btn-toggleheader");n=h.attr("data-template")||"generic",r=h.find(".kv-file-content"),o=r.length?r.html():"",p=i.data("caption")||"",f=i.data("size")||"",l=p+" "+f,v.find(".kv-zoom-title").attr("title",e("
    ").html(l).text()).html(l),s=v.find(".kv-zoom-body"),v.removeClass("kv-single-content"),a?(u=s.addClass("file-thumb-loading").clone().insertAfter(s),t.setHtml(s,o).hide(),u.fadeOut("fast",function(){s.fadeIn("fast",function(){s.removeClass("file-thumb-loading")}),u.remove()})):t.setHtml(s,o),c=g.previewZoomSettings[n],c&&(d=s.find(".kv-preview-data"),t.addCss(d,"file-zoom-detail"),e.each(c,function(e,t){d.css(e,t),(d.attr("width")&&"width"===e||d.attr("height")&&"height"===e)&&d.removeAttr(e)})),v.data("previewId",m),g._handler(v.find(".btn-prev"),"click",function(){g._zoomSlideShow("prev",m)}),g._handler(v.find(".btn-next"),"click",function(){g._zoomSlideShow("next",m)}),g._handler(w,"click",function(){g._resizeZoomDialog(!0)}),g._handler(b,"click",function(){g._resizeZoomDialog(!1)}),g._handler(_,"click",function(){var e,t=v.find(".modal-header"),i=v.find(".modal-body .floating-buttons"),a=t.find(".kv-zoom-actions"),r=function(e){var i=g.$modal.find(".kv-zoom-body"),a=g.zoomModalHeight;v.hasClass("file-zoom-fullscreen")&&(a=i.outerHeight(!0),e||(a-=t.outerHeight(!0))),i.css("height",e?a+e:a)};t.is(":visible")?(e=t.outerHeight(!0),t.slideUp("slow",function(){a.find(".btn").appendTo(i),r(e)})):(i.find(".btn").appendTo(a),t.slideDown("slow",function(){r()})),v.focus()}),g._handler(v,"keydown",function(t){var i=t.which||t.keyCode,a=e(this).find(".btn-prev"),r=e(this).find(".btn-next"),n=e(this).data("previewId"),o=g.rtl?39:37,l=g.rtl?37:39;i===o&&a.length&&!a.attr("disabled")&&g._zoomSlideShow("prev",n),i===l&&r.length&&!r.attr("disabled")&&g._zoomSlideShow("next",n)})},_showModal:function(e){var i=this,a=i.$modal;e&&e.length&&(t.initModal(a),t.setHtml(a,i._getModalContent()),i._setZoomContent(e),a.data("fileinputPluginId",i.$element.attr("id")),a.modal("show"),i._initZoomButtons())},_zoomPreview:function(e){var i,a=this;if(!e.length){throw"Cannot zoom to detailed preview!"}i=e.closest(t.FRAMES),a._showModal(i)},_zoomSlideShow:function(t,i){var a,r,n,o,l=this,s=l.$modal.find(".kv-zoom-actions .btn-"+t),d=l.getFrames().toArray(),c=[],u=d.length;if(!s.attr("disabled")){for(r=0;u>r;r++){n=e(d[r]),n&&n.length&&n.find(".kv-file-zoom:visible").length&&c.push(d[r])}for(u=c.length,r=0;u>r;r++){if(e(c[r]).attr("id")===i){o="prev"===t?r-1:r+1;break}}0>o||o>=u||!c[o]||(a=e(c[o]),a.length&&l._setZoomContent(a,!0),l._initZoomButtons(),l._raise("filezoom"+t,{previewId:i,modal:l.$modal}))}},_initZoomButton:function(){var t=this;t.$preview.find(".kv-file-zoom").each(function(){var i=e(this);t._handler(i,"click",function(){t._zoomPreview(i)})})},_inputFileCount:function(){return this.$element[0].files.length},_refreshPreview:function(){var t,i=this;(i._inputFileCount()||i.isAjaxUpload)&&i.showPreview&&i.isPreviewable&&(i.isAjaxUpload&&i.fileManager.count()>0?(t=e.extend(!0,{},i.fileManager.stack),i.fileManager.clear(),i._clearFileInput()):t=i.$element[0].files,t&&t.length&&(i.readFiles(t),i._setFileDropZoneTitle()))},_clearObjects:function(t){t.find("video audio").each(function(){this.pause(),e(this).remove()}),t.find("img object div").each(function(){e(this).remove()})},_clearFileInput:function(){var t,i,a,r=this,n=r.$element;r._inputFileCount()&&(t=n.closest("form"),i=e(document.createElement("form")),a=e(document.createElement("div")),n.before(a),t.length?t.after(i):a.after(i),i.append(n).trigger("reset"),a.before(n).remove(),i.remove())},_resetUpload:function(){var e=this;e.uploadStartTime=t.now(),e.uploadCache=[],e.$btnUpload.removeAttr("disabled"),e._setProgress(0),e._hideProgress(),e._resetErrors(!1),e._initAjax(),e.fileManager.clearImages(),e._resetCanvas(),e.overwriteInitial&&(e.initialPreview=[],e.initialPreviewConfig=[],e.initialPreviewThumbTags=[],e.previewCache.data={content:[],config:[],tags:[]})},_resetCanvas:function(){var e=this;e.canvas&&e.imageCanvasContext&&e.imageCanvasContext.clearRect(0,0,e.canvas.width,e.canvas.height)},_hasInitialPreview:function(){var e=this;return !e.overwriteInitial&&e.previewCache.count(!0)},_resetPreview:function(){var i,a,r,n=this,o=n.showUploadedThumbs,l=!n.removeFromPreviewOnError,s=(o||l)&&n.isDuplicateError;n.previewCache.count(!0)?(i=n.previewCache.out(),s&&(r=t.createElement("").insertAfter(n.$container),n.getFrames().each(function(){var t=e(this);(o&&t.hasClass("file-preview-success")||l&&t.hasClass("file-preview-error"))&&r.append(t)})),n._setPreviewContent(i.content),n._setInitThumbAttr(),a=n.initialCaption?n.initialCaption:i.caption,n._setCaption(a),s&&(r.contents().appendTo(n.$preview),r.remove())):(n._clearPreview(),n._initCaption()),n.showPreview&&(n._initZoom(),n._initSortable()),n.isDuplicateError=!1},_clearDefaultPreview:function(){var e=this;e.$preview.find(".file-default-preview").remove()},_validateDefaultPreview:function(){var e=this;e.showPreview&&!t.isEmpty(e.defaultPreviewContent)&&(e._setPreviewContent('
    '+e.defaultPreviewContent+"
    "),e.$container.removeClass("file-input-new"),e._initClickable())},_resetPreviewThumbs:function(e){var t,i=this;return e?(i._clearPreview(),void i.clearFileStack()):void (i._hasInitialPreview()?(t=i.previewCache.out(),i._setPreviewContent(t.content),i._setInitThumbAttr(),i._setCaption(t.caption),i._initPreviewActions()):i._clearPreview())},_getLayoutTemplate:function(e){var i=this,a=i.layoutTemplates[e];return t.isEmpty(i.customLayoutTags)?a:t.replaceTags(a,i.customLayoutTags)},_getPreviewTemplate:function(e){var i=this,a=i.previewTemplates,r=a[e]||a.other;return t.isEmpty(i.customPreviewTags)?r:t.replaceTags(r,i.customPreviewTags)},_getOutData:function(e,t,i,a){var r=this;return t=t||{},i=i||{},a=a||r.fileManager.list(),{formdata:e,files:a,filenames:r.filenames,filescount:r.getFilesCount(),extra:r._getExtraData(),response:i,reader:r.reader,jqXHR:t}},_getMsgSelected:function(e){var t=this,i=1===e?t.fileSingle:t.filePlural;return e>0?t.msgSelected.replace("{n}",e).replace("{files}",i):t.msgNoFilesSelected},_getFrame:function(e,i){var a=this,r=t.getFrameElement(a.$preview,e);return !a.showPreview||i||r.length||a._log(t.logMessages.invalidThumb,{id:e}),r},_getZoom:function(e,i){var a=this,r=t.getZoomElement(a.$preview,e,i);return a.showPreview&&!r.length&&a._log(t.logMessages.invalidThumb,{id:e}),r},_getThumbs:function(e){return e=e||"",this.getFrames(":not(.file-preview-initial)"+e)},_getThumbId:function(e){var t=this;return t.previewInitId+"-"+e},_getExtraData:function(e,t){var i=this,a=i.uploadExtraData;return"function"==typeof i.uploadExtraData&&(a=i.uploadExtraData(e,t)),a},_initXhr:function(e,i){var a=this,r=a.fileManager,n=function(e){var n=0,o=e.total,l=e.loaded||e.position,s=r.getUploadStats(i,l,o);e.lengthComputable&&!a.enableResumableUpload&&(n=t.round(l/o*100)),i?a._setFileUploadStats(i,n,s):a._setProgress(n,null,null,a._getStats(s)),a._raise("fileajaxprogress",[s])};return e.upload&&(a.progressDelay&&(n=t.debounce(n,a.progressDelay)),e.upload.addEventListener("progress",n,!1)),e},_initAjaxSettings:function(){var t=this;t._ajaxSettings=e.extend(!0,{},t.ajaxSettings),t._ajaxDeleteSettings=e.extend(!0,{},t.ajaxDeleteSettings)},_mergeAjaxCallback:function(e,t,i){var a,r=this,n=r._ajaxSettings,o=r.mergeAjaxCallbacks;"delete"===i&&(n=r._ajaxDeleteSettings,o=r.mergeAjaxDeleteCallbacks),a=n[e],o&&"function"==typeof a?"before"===o?n[e]=function(){a.apply(this,arguments),t.apply(this,arguments)}:n[e]=function(){t.apply(this,arguments),a.apply(this,arguments)}:n[e]=t},_ajaxSubmit:function(t,i,a,r,n,o,l,s){var d,c,u,p,f=this;f._raise("filepreajax",[n,o,l])&&(n.append("initialPreview",JSON.stringify(f.initialPreview)),n.append("initialPreviewConfig",JSON.stringify(f.initialPreviewConfig)),n.append("initialPreviewThumbTags",JSON.stringify(f.initialPreviewThumbTags)),f._initAjaxSettings(),f._mergeAjaxCallback("beforeSend",t),f._mergeAjaxCallback("success",i),f._mergeAjaxCallback("complete",a),f._mergeAjaxCallback("error",r),s=s||f.uploadUrlThumb||f.uploadUrl,"function"==typeof s&&(s=s()),u=f._getExtraData(o,l)||{},"object"==typeof u&&e.each(u,function(e,t){n.append(e,t)}),c={xhr:function(){var t=e.ajaxSettings.xhr();return f._initXhr(t,o)},url:f._encodeURI(s),type:"POST",dataType:"json",data:n,cache:!1,processData:!1,contentType:!1},d=e.extend(!0,{},c,f._ajaxSettings),p=f.taskManager.addTask(o+"-"+l,function(){var t,i,a=this.self;t=a.ajaxQueue.shift(),i=e.ajax(t),a.ajaxRequests.push(i)}),f.ajaxQueue.push(d),p.runWithContext({self:f}))},_mergeArray:function(e,i){var a=this,r=t.cleanArray(a[e]),n=t.cleanArray(i);a[e]=r.concat(n)},_initUploadSuccess:function(i,a,r){var n,o,l,s,d,c,u,p,f,g,m=this;return !m.showPreview||"object"!=typeof i||e.isEmptyObject(i)?void m._resetCaption():(void 0!==i.initialPreview&&i.initialPreview.length>0&&(m.hasInitData=!0,c=i.initialPreview||[],u=i.initialPreviewConfig||[],p=i.initialPreviewThumbTags||[],n=void 0===i.append||i.append,c.length>0&&!t.isArray(c)&&(c=c.split(m.initialPreviewDelimiter)),c.length&&(m._mergeArray("initialPreview",c),m._mergeArray("initialPreviewConfig",u),m._mergeArray("initialPreviewThumbTags",p)),void 0!==a?r?(f=a.attr("id"),g=m._getUploadCacheIndex(f),null!==g&&(m.uploadCache[g]={id:f,content:c[0],config:u[0]||[],tags:p[0]||[],append:n})):(l=m.previewCache.add(c[0],u[0],p[0],n),o=m.previewCache.get(l,!1),s=t.createElement(o).hide().appendTo(a),d=s.find(".kv-zoom-cache"),d&&d.length&&d.appendTo(a),a.fadeOut("slow",function(){var e=s.find(".file-preview-frame");e&&e.length&&e.insertBefore(a).fadeIn("slow").css("display:inline-block"),m._initPreviewActions(),m._clearFileInput(),a.remove(),s.remove(),m._initSortable()})):(m.previewCache.set(c,u,p,n),m._initPreview(),m._initPreviewActions())),void m._resetCaption())},_getUploadCacheIndex:function(e){var t,i,a=this,r=a.uploadCache.length;for(t=0;r>t;t++){if(i=a.uploadCache[t],i.id===e){return t}}return null},_initSuccessThumbs:function(){var i=this;i.showPreview&&i._getThumbs(t.FRAMES+".file-preview-success").each(function(){var a=e(this),r=a.find(".kv-file-remove");r.removeAttr("disabled"),i._handler(r,"click",function(){var e=a.attr("id"),r=i._raise("filesuccessremove",[e,a.attr("data-fileindex")]);t.cleanMemory(a),r!==!1&&a.fadeOut("slow",function(){a.remove(),i.getFrames().length||i.reset()})})})},_updateInitialPreview:function(){var t=this,i=t.uploadCache;t.showPreview&&(e.each(i,function(e,i){t.previewCache.add(i.content,i.config,i.tags,i.append)}),t.hasInitData&&(t._initPreview(),t._initPreviewActions()))},_uploadSingle:function(i,a,r){var n,o,l,s,d,c,u,p,f,g,m,h,v,w=this,b=w.fileManager,_=b.count(),C=new FormData,y=w._getThumbId(a),x=_>0||!e.isEmptyObject(w.uploadExtraData),T=w.ajaxOperations.uploadThumb,P=b.getFile(a),F={id:y,index:i,fileId:a},E=w.fileManager.getFileName(a,!0);w.enableResumableUpload||(w.showPreview&&(o=w.fileManager.getThumb(a),u=o.find(".file-thumb-progress"),s=o.find(".kv-file-upload"),d=o.find(".kv-file-remove"),u.show()),0===_||!x||w.showPreview&&s&&s.hasClass("disabled")||w._abort(F)||(v=function(){c?b.errors.push(a):b.removeFile(a),b.setProcessed(a),b.isProcessed()&&(w.fileBatchCompleted=!0,l())},l=function(){var e;w.fileBatchCompleted&&setTimeout(function(){var i=0===b.count(),a=b.errors.length;w._updateInitialPreview(),w.unlock(i),i&&w._clearFileInput(),e=w.$preview.find(".file-preview-initial"),w.uploadAsync&&e.length&&(t.addCss(e,t.SORT_CSS),w._initSortable()),w._raise("filebatchuploadcomplete",[b.stack,w._getExtraData()]),w.retryErrorUploads&&0!==a||b.clear(),w._setProgress(101),w.ajaxAborted=!1},w.processDelay)},p=function(l){n=w._getOutData(C,l),b.initStats(a),w.fileBatchCompleted=!1,r||(w.ajaxAborted=!1),w.showPreview&&(o.hasClass("file-preview-success")||(w._setThumbStatus(o,"Loading"),t.addCss(o,"file-uploading")),s.attr("disabled",!0),d.attr("disabled",!0)),r||w.lock(),-1!==b.errors.indexOf(a)&&delete b.errors[a],w._raise("filepreupload",[n,y,i]),e.extend(!0,F,n),w._abort(F)&&(l.abort(),r||(w._setThumbStatus(o,"New"),o.removeClass("file-uploading"),s.removeAttr("disabled"),d.removeAttr("disabled"),w.unlock()),w._setProgressCancelled())},g=function(l,d,p){var g=w.showPreview&&o.attr("id")?o.attr("id"):y;n=w._getOutData(C,p,l),e.extend(!0,F,n),setTimeout(function(){t.isEmpty(l)||t.isEmpty(l.error)?(w.showPreview&&(w._setThumbStatus(o,"Success"),s.hide(),w._initUploadSuccess(l,o,r),w._setProgress(101,u)),w._raise("fileuploaded",[n,g,i]),r?v():w.fileManager.remove(o)):(c=!0,f=w._parseError(T,p,w.msgUploadError,w.fileManager.getFileName(a)),w._showFileError(f,F),w._setPreviewError(o,!0),w.retryErrorUploads||s.hide(),r&&v(),w._setProgress(101,w._getFrame(g).find(".file-thumb-progress"),w.msgUploadError))},w.processDelay)},m=function(){w.showPreview&&(s.removeAttr("disabled"),d.removeAttr("disabled"),o.removeClass("file-uploading")),r?l():(w.unlock(!1),w._clearFileInput()),w._initSuccessThumbs()},h=function(t,i,n){f=w._parseError(T,t,n,w.fileManager.getFileName(a)),c=!0,setTimeout(function(){var i;r&&v(),w.fileManager.setProgress(a,100),w._setPreviewError(o,!0),w.retryErrorUploads||s.hide(),e.extend(!0,F,w._getOutData(C,t)),w._setProgress(101,w.$progress,w.msgAjaxProgressError.replace("{operation}",T)),i=w.showPreview&&o?o.find(".file-thumb-progress"):"",w._setProgress(101,i,w.msgUploadError),w._showFileError(f,F)},w.processDelay)},w._setFileData(C,P.file,E,a),w._setUploadData(C,{fileId:a}),w._ajaxSubmit(p,g,m,h,C,a,i)))},_setFileData:function(e,t,i,a){var r=this,n=r.preProcessUpload;n&&"function"==typeof n?e.append(r.uploadFileAttr,n(a,t)):e.append(r.uploadFileAttr,t,i)},_uploadBatch:function(){var i,a,r,n,o,l,s=this,d=s.fileManager,c=d.total(),u={},p=c>0||!e.isEmptyObject(s.uploadExtraData),f=new FormData,g=s.ajaxOperations.uploadBatch;if(0!==c&&p&&!s._abort(u)){l=function(){s.fileManager.clear(),s._clearFileInput()},i=function(i){s.lock(),d.initStats();var a=s._getOutData(f,i);s.ajaxAborted=!1,s.showPreview&&s._getThumbs().each(function(){var i=e(this),a=i.find(".kv-file-upload"),r=i.find(".kv-file-remove");i.hasClass("file-preview-success")||(s._setThumbStatus(i,"Loading"),t.addCss(i,"file-uploading")),a.attr("disabled",!0),r.attr("disabled",!0)}),s._raise("filebatchpreupload",[a]),s._abort(a)&&(i.abort(),s._getThumbs().each(function(){var t=e(this),i=t.find(".kv-file-upload"),a=t.find(".kv-file-remove");t.hasClass("file-preview-loading")&&(s._setThumbStatus(t,"New"),t.removeClass("file-uploading")),i.removeAttr("disabled"),a.removeAttr("disabled")}),s._setProgressCancelled())},a=function(i,a,r){var n=s._getOutData(f,r,i),d=0,c=s._getThumbs(":not(.file-preview-success)"),u=t.isEmpty(i)||t.isEmpty(i.errorkeys)?[]:i.errorkeys;t.isEmpty(i)||t.isEmpty(i.error)?(s._raise("filebatchuploadsuccess",[n]),l(),s.showPreview?(c.each(function(){var t=e(this);s._setThumbStatus(t,"Success"),t.removeClass("file-uploading"),t.find(".kv-file-upload").hide().removeAttr("disabled")}),s._initUploadSuccess(i)):s.reset(),s._setProgress(101)):(s.showPreview&&(c.each(function(){var t=e(this);t.removeClass("file-uploading"),t.find(".kv-file-upload").removeAttr("disabled"),t.find(".kv-file-remove").removeAttr("disabled"),0===u.length||-1!==e.inArray(d,u)?(s._setPreviewError(t,!0),s.retryErrorUploads||(t.find(".kv-file-upload").hide(),s.fileManager.remove(t))):(t.find(".kv-file-upload").hide(),s._setThumbStatus(t,"Success"),s.fileManager.remove(t)),(!t.hasClass("file-preview-error")||s.retryErrorUploads)&&d++}),s._initUploadSuccess(i)),o=s._parseError(g,r,s.msgUploadError),s._showFileError(o,n,"filebatchuploaderror"),s._setProgress(101,s.$progress,s.msgUploadError))},n=function(){s.unlock(),s._initSuccessThumbs(),s._clearFileInput(),s._raise("filebatchuploadcomplete",[s.fileManager.stack,s._getExtraData()])},r=function(t,i,a){var r=s._getOutData(f,t);o=s._parseError(g,t,a),s._showFileError(o,r,"filebatchuploaderror"),s.uploadFileCount=c-1,s.showPreview&&(s._getThumbs().each(function(){var t=e(this);t.removeClass("file-uploading"),s.fileManager.getFile(t.attr("data-fileid"))&&s._setPreviewError(t)}),s._getThumbs().removeClass("file-uploading"),s._getThumbs(" .kv-file-upload").removeAttr("disabled"),s._getThumbs(" .kv-file-delete").removeAttr("disabled"),s._setProgress(101,s.$progress,s.msgAjaxProgressError.replace("{operation}",g)))};var m=0;e.each(s.fileManager.stack,function(e,i){t.isEmpty(i.file)||s._setFileData(f,i.file,i.nameFmt||"untitled_"+m,e),m++}),s._ajaxSubmit(i,a,n,r,f)}},_uploadExtraOnly:function(){var e,i,a,r,n,o=this,l={},s=new FormData,d=o.ajaxOperations.uploadExtra;o._abort(l)||(e=function(e){o.lock();var t=o._getOutData(s,e);o._raise("filebatchpreupload",[t]),o._setProgress(50),l.data=t,l.xhr=e,o._abort(l)&&(e.abort(),o._setProgressCancelled())},i=function(e,i,a){var r=o._getOutData(s,a,e);t.isEmpty(e)||t.isEmpty(e.error)?(o._raise("filebatchuploadsuccess",[r]),o._clearFileInput(),o._initUploadSuccess(e),o._setProgress(101)):(n=o._parseError(d,a,o.msgUploadError),o._showFileError(n,r,"filebatchuploaderror"))},a=function(){o.unlock(),o._clearFileInput(),o._raise("filebatchuploadcomplete",[o.fileManager.stack,o._getExtraData()])},r=function(e,t,i){var a=o._getOutData(s,e);n=o._parseError(d,e,i),l.data=a,o._showFileError(n,a,"filebatchuploaderror"),o._setProgress(101,o.$progress,o.msgAjaxProgressError.replace("{operation}",d))},o._ajaxSubmit(e,i,a,r,s))},_deleteFileIndex:function(i){var a=this,r=i.attr("data-fileindex"),n=a.reversePreviewOrder;r.substring(0,5)===t.INIT_FLAG&&(r=parseInt(r.replace(t.INIT_FLAG,"")),a.initialPreview=t.spliceArray(a.initialPreview,r,n),a.initialPreviewConfig=t.spliceArray(a.initialPreviewConfig,r,n),a.initialPreviewThumbTags=t.spliceArray(a.initialPreviewThumbTags,r,n),a.getFrames().each(function(){var i=e(this),a=i.attr("data-fileindex");a.substring(0,5)===t.INIT_FLAG&&(a=parseInt(a.replace(t.INIT_FLAG,"")),a>r&&(a--,i.attr("data-fileindex",t.INIT_FLAG+a)))}))},_resetCaption:function(){var e=this;setTimeout(function(){var t,i,a,r=e.previewCache.count(!0),n=e.fileManager.count(),o=":not(.file-preview-success):not(.file-preview-error)",l=e.showPreview&&e.getFrames(o).length;0!==n||0!==r||l?(i=r+n,i>1?t=e._getMsgSelected(i):(a=e.fileManager.getFirstFile(),t=a?a.nameFmt:"_"),e._setCaption(t)):e.reset()},e.processDelay)},_initFileActions:function(){var i=this;i.showPreview&&(i._initZoomButton(),i.getFrames(" .kv-file-remove").each(function(){var a,r,n=e(this),o=n.closest(t.FRAMES),l=o.attr("id"),s=o.attr("data-fileindex");i._handler(n,"click",function(){return r=i._raise("filepreremove",[l,s]),r!==!1&&i._validateMinCount()?(a=o.hasClass("file-preview-error"),t.cleanMemory(o),void o.fadeOut("slow",function(){i.fileManager.remove(o),i._clearObjects(o),o.remove(),l&&a&&i.$errorContainer.find('li[data-thumb-id="'+l+'"]').fadeOut("fast",function(){e(this).remove(),i._errorsExist()||i._resetErrors()}),i._clearFileInput(),i._resetCaption(),i._raise("fileremoved",[l,s])})):!1})}),i.getFrames(" .kv-file-upload").each(function(){var a=e(this);i._handler(a,"click",function(){var e=a.closest(t.FRAMES),r=e.attr("data-fileid");i._hideProgress(),(!e.hasClass("file-preview-error")||i.retryErrorUploads)&&i._uploadSingle(i.fileManager.getIndex(r),r,!1)})}))},_initPreviewActions:function(){var i=this,a=i.$preview,r=i.deleteExtraData||{},n=t.FRAMES+" .kv-file-remove",o=i.fileActionSettings,l=o.removeClass,s=o.removeErrorClass,d=function(){var e=i.isAjaxUpload?i.previewCache.count(!0):i._inputFileCount();i.getFrames().length||e||(i._setCaption(""),i.reset(),i.initialCaption="")};i._initZoomButton(),a.find(n).each(function(){var a,n,o,c,u=e(this),p=u.data("url")||i.deleteUrl,f=u.data("key"),g=i.ajaxOperations.deleteThumb;if(!t.isEmpty(p)&&void 0!==f){"function"==typeof p&&(p=p());var m,h,v,w,b,_=u.closest(t.FRAMES),C=i.previewCache.data,y=_.attr("data-fileindex");y=parseInt(y.replace(t.INIT_FLAG,"")),v=t.isEmpty(C.config)&&t.isEmpty(C.config[y])?null:C.config[y],b=t.isEmpty(v)||t.isEmpty(v.extra)?r:v.extra,w=v&&(v.filename||v.caption)||"","function"==typeof b&&(b=b()),h={id:u.attr("id"),key:f,extra:b},n=function(e){i.ajaxAborted=!1,i._raise("filepredelete",[f,e,b]),i._abort()?e.abort():(u.removeClass(s),t.addCss(_,"file-uploading"),t.addCss(u,"disabled "+l))},o=function(e,r,n){var o,c;return t.isEmpty(e)||t.isEmpty(e.error)?(_.removeClass("file-uploading").addClass("file-deleted"),void _.fadeOut("slow",function(){y=parseInt(_.attr("data-fileindex").replace(t.INIT_FLAG,"")),i.previewCache.unset(y),i._deleteFileIndex(_),o=i.previewCache.count(!0),c=o>0?i._getMsgSelected(o):"",i._setCaption(c),i._raise("filedeleted",[f,n,b]),i._clearObjects(_),_.remove(),d()})):(h.jqXHR=n,h.response=e,a=i._parseError(g,n,i.msgDeleteError,w),i._showFileError(a,h,"filedeleteerror"),_.removeClass("file-uploading"),u.removeClass("disabled "+l).addClass(s),void d())},c=function(e,t,a){var r=i._parseError(g,e,a,w);h.jqXHR=e,h.response={},i._showFileError(r,h,"filedeleteerror"),_.removeClass("file-uploading"),u.removeClass("disabled "+l).addClass(s),d()},i._initAjaxSettings(),i._mergeAjaxCallback("beforeSend",n,"delete"),i._mergeAjaxCallback("success",o,"delete"),i._mergeAjaxCallback("error",c,"delete"),m=e.extend(!0,{},{url:i._encodeURI(p),type:"POST",dataType:"json",data:e.extend(!0,{},{key:f},b)},i._ajaxDeleteSettings),i._handler(u,"click",function(){return i._validateMinCount()?(i.ajaxAborted=!1,i._raise("filebeforedelete",[f,b]),void (i.ajaxAborted instanceof Promise?i.ajaxAborted.then(function(t){t||e.ajax(m)}):i.ajaxAborted||e.ajax(m))):!1})}})},_hideFileIcon:function(){var e=this;e.overwriteInitial&&e.$captionContainer.removeClass("icon-visible")},_showFileIcon:function(){var e=this;t.addCss(e.$captionContainer,"icon-visible")},_getSize:function(t,i){var a,r,n=this,o=parseFloat(t),l=n.fileSizeGetter;return e.isNumeric(t)&&e.isNumeric(o)?("function"==typeof l?r=l(o):0===o?r="0.00 B":(a=Math.floor(Math.log(o)/Math.log(1024)),i||(i=["B","KB","MB","GB","TB","PB","EB","ZB","YB"]),r=1*(o/Math.pow(1024,a)).toFixed(2)+" "+i[a]),n._getLayoutTemplate("size").replace("{sizeText}",r)):""},_getFileType:function(e){var t=this;return t.mimeTypeAliases[e]||e},_generatePreviewTemplate:function(i,a,r,n,o,l,s,d,c,u,p,f,g,m){var h,v,w,b=this,_=b.slug(r),C="",y="",x=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,T=_,P=_,F="type-default",E=u||b._renderFileFooter(i,_,d,"auto",s),k=b.preferIconicPreview,S=b.preferIconicZoomPreview,I=k?"other":i;return v=400>x?b.previewSettingsSmall[I]||b.defaults.previewSettingsSmall[I]:b.previewSettings[I]||b.defaults.previewSettings[I],v&&e.each(v,function(e,t){y+=e+":"+t+";"}),w=function(a,s,d,u){var m=d?"zoom-"+o:o,h=b._getPreviewTemplate(a),v=(c||"")+" "+u;return b.frameClass&&(v=b.frameClass+" "+v),d&&(v=v.replace(" "+t.SORT_CSS,"")),h=b._parseFilePreviewIcon(h,r),"object"!==i||n||e.each(b.defaults.fileTypeSettings,function(e,t){"object"!==e&&"other"!==e&&t(r,n)&&(F="type-"+e)}),t.isEmpty(g)||(void 0!==g.title&&null!==g.title&&(T=g.title),void 0!==g.alt&&null!==g.alt&&(T=g.alt)),h.setTokens({previewId:m,caption:_,title:T,alt:P,frameClass:v,type:b._getFileType(n),fileindex:p,fileid:l||"",typeCss:F,footer:E,data:s,template:f||i,style:y?'style="'+y+'"':""})},p=p||o.slice(o.lastIndexOf("-")+1),b.fileActionSettings.showZoom&&(C=w(S?"other":i,m?m:a,!0,"kv-zoom-thumb")),C="\n"+b._getLayoutTemplate("zoomCache").replace("{zoomContent}",C),"function"==typeof b.sanitizeZoomCache&&(C=b.sanitizeZoomCache(C)),h=w(k?"other":i,a,!1,"kv-preview-thumb"),h.setTokens({zoomCache:C})},_addToPreview:function(e,i){var a,r=this;return i=t.cspBuffer.stash(i),a=r.reversePreviewOrder?e.prepend(i):e.append(i),t.cspBuffer.apply(e),a},_previewDefault:function(e,i){var a=this,r=a.$preview;if(a.showPreview){var n,o=t.getFileName(e),l=e?e.type:"",s=e.size||0,d=a._getFileName(e,""),c=i===!0&&!a.isAjaxUpload,u=t.createObjectURL(e),p=a.fileManager.getId(e),f=a._getThumbId(p);a._clearDefaultPreview(),n=a._generatePreviewTemplate("other",u,o,l,f,p,c,s),a._addToPreview(r,n),a._setThumbAttr(f,d,s),i===!0&&a.isAjaxUpload&&a._setThumbStatus(a._getFrame(f),"Error")}},_previewFile:function(e,i,a,r,n){if(this.showPreview){var o,l=this,s=t.getFileName(i),d=n.type,c=n.name,u=l._parseFileType(d,s),p=l.$preview,f=i.size||0,g="image"===u?a.target.result:r,m=l.fileManager.getId(i),h=l._getThumbId(m);o=l._generatePreviewTemplate(u,g,s,d,h,m,!1,f),l._clearDefaultPreview(),l._addToPreview(p,o);var v=l._getFrame(h);l._validateImageOrientation(v.find("img"),i,h,m,c,d,f,g),l._setThumbAttr(h,c,f),l._initSortable()}},_setThumbAttr:function(e,t,i){var a=this,r=a._getFrame(e);r.length&&(i=i&&i>0?a._getSize(i):"",r.data({caption:t,size:i}))},_setInitThumbAttr:function(){var e,i,a,r,n=this,o=n.previewCache.data,l=n.previewCache.count(!0);if(0!==l){for(var s=0;l>s;s++){e=o.config[s],r=n.previewInitId+"-"+t.INIT_FLAG+s,i=t.ifSet("caption",e,t.ifSet("filename",e)),a=t.ifSet("size",e),n._setThumbAttr(r,i,a)}}},_slugDefault:function(e){return t.isEmpty(e,!0)?"":(e+"").replace(/[\[\]\/\{}:;#%=\(\)\*\+\?\\\^\$\|<>&"']/g,"_")},_updateFileDetails:function(e,i){var a,r,n,o,l,s=this,d=s.$element,c=t.isIE(9)&&t.findFileName(d.val())||d[0].files[0]&&d[0].files[0].name;!c&&s.fileManager.count()>0?(l=s.fileManager.getFirstFile(),a=l.nameFmt):a=c?s.slug(c):"_",r=s.isAjaxUpload?s.fileManager.count():e,o=s.previewCache.count(!0)+r,n=1===r?a:s._getMsgSelected(o),s.isError?(s.$previewContainer.removeClass("file-thumb-loading"),s.$previewStatus.html(""),s.$captionContainer.removeClass("icon-visible")):s._showFileIcon(),s._setCaption(n,s.isError),s.$container.removeClass("file-input-new file-input-ajax-new"),i||s._raise("fileselect",[e,a]),s.previewCache.count(!0)&&s._initPreviewActions()},_setThumbStatus:function(e,i){var a=this;if(a.showPreview){var r="indicator"+i,n=r+"Title",o="file-preview-"+i.toLowerCase(),l=e.find(".file-upload-indicator"),s=a.fileActionSettings;e.removeClass("file-preview-success file-preview-error file-preview-paused file-preview-loading"),"Success"===i&&e.find(".file-drag-handle").remove(),t.setHtml(l,s[r]),l.attr("title",s[n]),e.addClass(o),"Error"!==i||a.retryErrorUploads||e.find(".kv-file-upload").attr("disabled",!0)}},_setProgressCancelled:function(){var e=this;e._setProgress(101,e.$progress,e.msgCancelled)},_setProgress:function(e,i,a,r){var n=this;if(i=i||n.$progress,i.length){var o,l=Math.min(e,100),s=n.progressUploadThreshold,d=100>=e?n.progressTemplate:n.progressCompleteTemplate,c=100>l?n.progressTemplate:a?n.paused?n.progressPauseTemplate:n.progressErrorTemplate:d;e>=100&&(r=""),t.isEmpty(c)||(o=s&&l>s&&100>=e?c.setTokens({percent:s,status:n.msgUploadThreshold}):c.setTokens({percent:l,status:e>100?n.msgUploadEnd:l+"%"}),r=r||"",o=o.setTokens({stats:r}),t.setHtml(i,o),a&&t.setHtml(i.find('[role="progressbar"]'),a))}},_hasFiles:function(){var e=this.$element[0];return !!(e&&e.files&&e.files.length)},_setFileDropZoneTitle:function(){var e,i=this,a=i.$container.find(".file-drop-zone"),r=i.dropZoneTitle;i.isClickable&&(e=t.isEmpty(i.$element.attr("multiple"))?i.fileSingle:i.filePlural,r+=i.dropZoneClickTitle.replace("{files}",e)),a.find("."+i.dropZoneTitleClass).remove(),!i.showPreview||0===a.length||i.fileManager.count()>0||!i.dropZoneEnabled||i.previewCache.count()>0||!i.isAjaxUpload&&i._hasFiles()||(0===a.find(t.FRAMES).length&&t.isEmpty(i.defaultPreviewContent)&&a.prepend('
    '+r+"
    "),i.$container.removeClass("file-input-new"),t.addCss(i.$container,"file-input-ajax-new"))},_getStats:function(e){var i,a,r=this;return r.showUploadStats&&e&&e.bitrate?(a=r._getLayoutTemplate("stats"),i=e.elapsed&&e.bps?r.msgPendingTime.setTokens({time:t.getElapsed(Math.ceil(e.pendingBytes/e.bps))}):r.msgCalculatingTime,a.setTokens({uploadSpeed:e.bitrate,pendingTime:i})):""},_setResumableProgress:function(e,t,i){var a=this,r=a.resumableManager,n=i?r:a,o=i?i.find(".file-thumb-progress"):null;0===n.lastProgress&&(n.lastProgress=e),e0&&e._getFileCount(t-1)=g:g>=d,u||(s=p["msgImage"+o+i].setTokens({name:n,size:g}),p._showFileError(s,l),p._setPreviewError(r)))},_getExifObj:function(e){var i,a=this,r=t.logMessages.exifWarning;if("data:image/jpeg;base64,"!==e.slice(0,23)&&"data:image/jpg;base64,"!==e.slice(0,22)){return void (i=null)}try{i=window.piexif?window.piexif.load(e):null}catch(n){i=null,r=n&&n.message||""}return i||a._log(t.logMessages.badExifParser,{details:r}),i},setImageOrientation:function(i,a,r,n){var o,l,s,d=this,c=!i||!i.length,u=!a||!a.length,p=!1,f=c&&n&&"image"===n.attr("data-template");c&&u||(s="load.fileinputimageorient",f?(i=a,a=null,i.css(d.previewSettings.image),l=e(document.createElement("div")).appendTo(n.find(".kv-file-content")),o=e(document.createElement("span")).insertBefore(i),i.css("visibility","hidden").removeClass("file-zoom-detail").appendTo(l)):p=!i.is(":visible"),i.off(s).on(s,function(){p&&(d.$preview.removeClass("hide-content"),n.find(".kv-file-content").css("visibility","hidden"));var e=i[0],s=a&&a.length?a[0]:null,c=e.offsetHeight,u=e.offsetWidth,g=t.getRotation(r);if(p&&(n.find(".kv-file-content").css("visibility","visible"),d.$preview.addClass("hide-content")),i.data("orientation",r),s&&a.data("orientation",r),5>r){return t.setTransform(e,g),void t.setTransform(s,g)}var m=Math.atan(u/c),h=Math.sqrt(Math.pow(c,2)+Math.pow(u,2)),v=h?c/Math.cos(Math.PI/2+m)/h:1,w=" scale("+Math.abs(v)+")";t.setTransform(e,g+w),t.setTransform(s,g+w),f&&(i.css("visibility","visible").insertAfter(o).addClass("file-zoom-detail"),o.remove(),l.remove())}))},_validateImageOrientation:function(i,a,r,n,o,l,s,d){var c,u,p,f=this,g=f.autoOrientImage;return f.canOrientImage?void i.css("image-orientation",g?"from-image":"none"):(p=t.getZoomSelector(r," img"),c=g?f._getExifObj(d):null,(u=c?c["0th"][piexif.ImageIFD.Orientation]:null)?(f.setImageOrientation(i,e(p),u,f._getFrame(r)),f._raise("fileimageoriented",{$img:i,file:a}),void f._validateImage(r,n,o,l,s,d,c)):void f._validateImage(r,n,o,l,s,d,c))},_validateImage:function(t,i,a,r,n,o,l){var s,d,c,u=this,p=u.$preview,f=u._getFrame(t),g=f.attr("data-fileindex"),m=f.find("img");a=a||"Untitled",m.one("load",function(){d=f.width(),c=p.width(),d>c&&m.css("width","100%"),s={ind:g,id:t,fileId:i},u._checkDimensions(g,"Small",m,f,a,"Width",s),u._checkDimensions(g,"Small",m,f,a,"Height",s),u.resizeImage||(u._checkDimensions(g,"Large",m,f,a,"Width",s),u._checkDimensions(g,"Large",m,f,a,"Height",s)),u._raise("fileimageloaded",[t]),u.fileManager.addImage(i,{ind:g,img:m,thumb:f,pid:t,typ:r,siz:n,validated:!1,imgData:o,exifObj:l}),f.data("exif",l),u._validateAllImages()}).one("error",function(){u._raise("fileimageloaderror",[t])}).each(function(){this.complete?e(this).trigger("load"):this.error&&e(this).trigger("error")})},_validateAllImages:function(){var t,i=this,a={val:0},r=i.fileManager.getImageCount(),n=i.resizeIfSizeMoreThan;r===i.fileManager.totalImages&&(i._raise("fileimagesloaded"),i.resizeImage&&e.each(i.fileManager.loadedImages,function(e,o){o.validated||(t=o.siz,t&&t>1000*n&&i._getResizedImage(e,o,a,r),o.validated=!0)}))},_getResizedImage:function(i,a,r,n){var o,l,s,d,c,u,p,f,g,m,h=this,v=e(a.img)[0],w=v.naturalWidth,b=v.naturalHeight,_=1,C=h.maxImageWidth||w,y=h.maxImageHeight||b,x=!(!w||!b),T=h.imageCanvas,P=h.imageCanvasContext,F=a.typ,E=a.pid,k=a.ind,S=a.thumb,I=a.exifObj;if(c=function(e,t,i){h.isAjaxUpload?h._showFileError(e,t,i):h._showError(e,t,i),h._setPreviewError(S)},f=h.fileManager.getFile(i),g={id:E,index:k,fileId:i},m=[i,E,k],(!f||!x||C>=w&&y>=b)&&(x&&f&&h._raise("fileimageresized",m),r.val++,r.val===n&&h._raise("fileimagesresized"),!x)){return void c(h.msgImageResizeError,g,"fileimageresizeerror")}F=F||h.resizeDefaultImageType,l=w>C,s=b>y,_="width"===h.resizePreference?l?C/w:s?y/b:1:s?y/b:l?C/w:1,h._resetCanvas(),w*=_,b*=_,T.width=w,T.height=b;try{P.drawImage(v,0,0,w,b),d=T.toDataURL(F,h.resizeQuality),I&&(p=window.piexif.dump(I),d=window.piexif.insert(p,d)),o=t.dataURI2Blob(d),h.fileManager.setFile(i,o),h._raise("fileimageresized",m),r.val++,r.val===n&&h._raise("fileimagesresized",[void 0,void 0]),o instanceof Blob||c(h.msgImageResizeError,g,"fileimageresizeerror")}catch(A){r.val++,r.val===n&&h._raise("fileimagesresized",[void 0,void 0]),u=h.msgImageResizeException.replace("{errors}",A.message),c(u,g,"fileimageresizeexception")}},_showProgress:function(){var e=this;e.$progress&&e.$progress.length&&e.$progress.show()},_hideProgress:function(){var e=this;e.$progress&&e.$progress.length&&e.$progress.hide()},_initBrowse:function(e){var i=this,a=i.$element;i.showBrowse?i.$btnFile=e.find(".btn-file").append(a):(a.appendTo(e).attr("tabindex",-1),t.addCss(a,"file-no-browse"))},_initClickable:function(){var i,a,r=this;r.isClickable&&(i=r.$dropZone,r.isAjaxUpload||(a=r.$preview.find(".file-default-preview"),a.length&&(i=a)),t.addCss(i,"clickable"),i.attr("tabindex",-1),r._handler(i,"click",function(t){var a=e(t.target);e(r.elErrorContainer+":visible").length||a.parents(".file-preview-thumbnails").length&&!a.parents(".file-default-preview").length||(r.$element.data("zoneClicked",!0).trigger("click"),i.blur())}))},_initCaption:function(){var e=this,i=e.initialCaption||"";return e.overwriteInitial||t.isEmpty(i)?(e.$caption.val(""),!1):(e._setCaption(i),!0)},_setCaption:function(i,a){var r,n,o,l,s,d,c=this;if(c.$caption.length){if(c.$captionContainer.removeClass("icon-visible"),a){r=e("
    "+c.msgValidationError+"
    ").text(),l=c.fileManager.count(),l?(d=c.fileManager.getFirstFile(),s=1===l&&d?d.nameFmt:c._getMsgSelected(l)):s=c._getMsgSelected(c.msgNo),n=t.isEmpty(i)?s:i,o=''+c.msgValidationErrorIcon+""}else{if(t.isEmpty(i)){return}r=e("
    "+i+"
    ").text(),n=r,o=c._getLayoutTemplate("fileIcon")}c.$captionContainer.addClass("icon-visible"),c.$caption.attr("title",r).val(n),t.setHtml(c.$captionIcon,o)}},_createContainer:function(){var e=this,i={"class":"file-input file-input-new"+(e.rtl?" kv-rtl":"")},a=t.createElement(t.cspBuffer.stash(e._renderMain()));return t.cspBuffer.apply(a),a.insertBefore(e.$element).attr(i),e._initBrowse(a),e.theme&&a.addClass("theme-"+e.theme),a},_refreshContainer:function(){var e=this,i=e.$container,a=e.$element;a.insertAfter(i),t.setHtml(i,e._renderMain()),e._initBrowse(i),e._validateDisabled()},_validateDisabled:function(){var e=this;e.$caption.attr({readonly:e.isDisabled})},_renderMain:function(){var e=this,t=e.dropZoneEnabled?" file-drop-zone":"file-drop-disabled",i=e.showClose?e._getLayoutTemplate("close"):"",a=e.showPreview?e._getLayoutTemplate("preview").setTokens({"class":e.previewClass,dropClass:t}):"",r=e.isDisabled?e.captionClass+" file-caption-disabled":e.captionClass,n=e.captionTemplate.setTokens({"class":r+" kv-fileinput-caption"});return e.mainTemplate.setTokens({"class":e.mainClass+(!e.showBrowse&&e.showCaption?" no-browse":""),preview:a,close:i,caption:n,upload:e._renderButton("upload"),remove:e._renderButton("remove"),cancel:e._renderButton("cancel"),pause:e._renderButton("pause"),browse:e._renderButton("browse")})},_renderButton:function(e){var i=this,a=i._getLayoutTemplate("btnDefault"),r=i[e+"Class"],n=i[e+"Title"],o=i[e+"Icon"],l=i[e+"Label"],s=i.isDisabled?" disabled":"",d="button";switch(e){case"remove":if(!i.showRemove){return""}break;case"cancel":if(!i.showCancel){return""}r+=" kv-hidden";break;case"pause":if(!i.showPause){return""}r+=" kv-hidden";break;case"upload":if(!i.showUpload){return""}i.isAjaxUpload&&!i.isDisabled?a=i._getLayoutTemplate("btnLink").replace("{href}",i.uploadUrl):d="submit";break;case"browse":if(!i.showBrowse){return""}a=i._getLayoutTemplate("btnBrowse");break;default:return""}return r+="browse"===e?" btn-file":" fileinput-"+e+" fileinput-"+e+"-button",t.isEmpty(l)||(l=' '+l+""),a.setTokens({type:d,css:r,title:n,status:s,icon:o,label:l})},_renderThumbProgress:function(){var e=this;return'
    '+e.progressInfoTemplate.setTokens({percent:101,status:e.msgUploadBegin,stats:""})+"
    "},_renderFileFooter:function(e,i,a,r,n){var o,l,s=this,d=s.fileActionSettings,c=d.showRemove,u=d.showDrag,p=d.showUpload,f=d.showZoom,g=s._getLayoutTemplate("footer"),m=s._getLayoutTemplate("indicator"),h=n?d.indicatorError:d.indicatorNew,v=n?d.indicatorErrorTitle:d.indicatorNewTitle,w=m.setTokens({indicator:h,indicatorTitle:v});return a=s._getSize(a),l={type:e,caption:i,size:a,width:r,progress:"",indicator:w},s.isAjaxUpload?(l.progress=s._renderThumbProgress(),l.actions=s._renderFileActions(l,p,!1,c,f,u,!1,!1,!1)):l.actions=s._renderFileActions(l,!1,!1,!1,f,u,!1,!1,!1),o=g.setTokens(l),o=t.replaceTags(o,s.previewThumbTags)},_renderFileActions:function(e,t,i,a,r,n,o,l,s,d,c,u){var p=this;if(!e.type&&d&&(e.type="image"),p.enableResumableUpload?t=!1:"function"==typeof t&&(t=t(e)),"function"==typeof i&&(i=i(e)),"function"==typeof a&&(a=a(e)),"function"==typeof r&&(r=r(e)),"function"==typeof n&&(n=n(e)),!(t||i||a||r||n)){return""}var f,g=l===!1?"":' data-url="'+l+'"',m="",h="",v=s===!1?"":' data-key="'+s+'"',w="",b="",_="",C=p._getLayoutTemplate("actions"),y=p.fileActionSettings,x=p.otherActionButtons.setTokens({dataKey:v,key:s}),T=o?y.removeClass+" disabled":y.removeClass;return a&&(w=p._getLayoutTemplate("actionDelete").setTokens({removeClass:T,removeIcon:y.removeIcon,removeTitle:y.removeTitle,dataUrl:g,dataKey:v,key:s})),t&&(b=p._getLayoutTemplate("actionUpload").setTokens({uploadClass:y.uploadClass,uploadIcon:y.uploadIcon,uploadTitle:y.uploadTitle})),i&&(_=p._getLayoutTemplate("actionDownload").setTokens({downloadClass:y.downloadClass,downloadIcon:y.downloadIcon,downloadTitle:y.downloadTitle,downloadUrl:c||p.initialPreviewDownloadUrl}),_=_.setTokens({filename:u,key:s})),r&&(m=p._getLayoutTemplate("actionZoom").setTokens({zoomClass:y.zoomClass,zoomIcon:y.zoomIcon,zoomTitle:y.zoomTitle})),n&&d&&(f="drag-handle-init "+y.dragClass,h=p._getLayoutTemplate("actionDrag").setTokens({dragClass:f,dragTitle:y.dragTitle,dragIcon:y.dragIcon})),C.setTokens({"delete":w,upload:b,download:_,zoom:m,drag:h,other:x})},_browse:function(e){var t=this;e&&e.isDefaultPrevented()||!t._raise("filebrowse")||(t.isError&&!t.isAjaxUpload&&t.clear(),t.focusCaptionOnBrowse&&t.$captionContainer.focus())},_change:function(i){var a=this;if(!a.changeTriggered){var r,n,o,l,s=a.$element,d=arguments.length>1,c=a.isAjaxUpload,u=d?arguments[1]:s[0].files,p=a.fileManager.count(),f=t.isEmpty(s.attr("multiple")),g=!c&&f?1:a.maxFileCount,m=a.maxTotalFileCount,h=m>0&&m>g,v=f&&p>0,w=function(t,i,r,n){var o=e.extend(!0,{},a._getOutData(null,{},{},u),{id:r,index:n}),l={id:r,index:n,file:i,files:u};return a.isPersistentError=!0,c?a._showFileError(t,o):a._showError(t,l)},b=function(e,t,i){var r=i?a.msgTotalFilesTooMany:a.msgFilesTooMany;r=r.replace("{m}",t).replace("{n}",e),a.isError=w(r,null,null,null),a.$captionContainer.removeClass("icon-visible"),a._setCaption("",!0),a.$container.removeClass("file-input-new file-input-ajax-new")};if(a.reader=null,a._resetUpload(),a._hideFileIcon(),a.dropZoneEnabled&&a.$container.find(".file-drop-zone ."+a.dropZoneTitleClass).remove(),c||(u=i.target&&void 0===i.target.files?i.target.value?[{name:i.target.value.replace(/^.+\\/,"")}]:[]:i.target.files||{}),r=u,t.isEmpty(r)||0===r.length){return c||a.clear(),void a._raise("fileselectnone")}if(a._resetErrors(),l=r.length,o=c?a.fileManager.count()+l:l,n=a._getFileCount(o,h?!1:void 0),g>0&&n>g){if(!a.autoReplace||l>g){return void b(a.autoReplace&&l>g?l:n,g)}n>g&&a._resetPreviewThumbs(c)}else{if(h&&(n=a._getFileCount(o,!0),m>0&&n>m)){if(!a.autoReplace||l>g){return void b(a.autoReplace&&l>m?l:n,m,!0)}n>g&&a._resetPreviewThumbs(c)}!c||v?(a._resetPreviewThumbs(!1),v&&a.clearFileStack()):!c||0!==p||a.previewCache.count(!0)&&!a.overwriteInitial||a._resetPreviewThumbs(!0)}a.readFiles(r)}},_abort:function(t){var i,a=this;return a.ajaxAborted&&"object"==typeof a.ajaxAborted&&void 0!==a.ajaxAborted.message?(i=e.extend(!0,{},a._getOutData(null),t),i.abortData=a.ajaxAborted.data||{},i.abortMessage=a.ajaxAborted.message,a._setProgress(101,a.$progress,a.msgCancelled),a._showFileError(a.ajaxAborted.message,i,"filecustomerror"),a.cancel(),!0):!!a.ajaxAborted},_resetFileStack:function(){var t=this,i=0;t._getThumbs().each(function(){var a=e(this),r=a.attr("data-fileindex"),n=a.attr("id");"-1"!==r&&-1!==r&&(t.fileManager.getFile(a.attr("data-fileid"))?a.attr({"data-fileindex":"-1"}):(a.attr({"data-fileindex":i}),i++),t._getZoom(n).attr({"data-fileindex":a.attr("data-fileindex")}))})},_isFileSelectionValid:function(e){var t=this;return e=e||0,t.required&&!t.getFilesCount()?(t.$errorContainer.html(""),t._showFileError(t.msgFileRequired),!1):t.minFileCount>0&&t._getFileCount(e)v,!o&&(a||r||n)},addToStack:function(e,t){this.fileManager.add(e,t)},clearFileStack:function(){var e=this;return e.fileManager.clear(),e._initResumableUpload(),e.enableResumableUpload?(null===e.showPause&&(e.showPause=!0),null===e.showCancel&&(e.showCancel=!1)):(e.showPause=!1,null===e.showCancel&&(e.showCancel=!0)),e.$element},getFileStack:function(){return this.fileManager.stack},getFileList:function(){return this.fileManager.list()},getFilesCount:function(e){var t=this,i=t.isAjaxUpload?t.fileManager.count():t._inputFileCount();return e&&(i+=t.previewCache.count(!0)),t._getFileCount(i)},readFiles:function(i){this.reader=new FileReader;var a,r=this,n=r.reader,o=r.$previewContainer,l=r.$previewStatus,s=r.msgLoading,d=r.msgProgress,c=r.previewInitId,u=i.length,p=r.fileTypeSettings,f=r.allowedFileTypes,g=f?f.length:0,m=r.allowedFileExtensions,h=t.isEmpty(m)?"":m.join(", "),v=function(t,n,o,l,s){var d,c=e.extend(!0,{},r._getOutData(null,{},{},i),{id:o,index:l,fileId:s}),p={id:o,index:l,fileId:s,file:n,files:i};r._previewDefault(n,!0),d=r._getFrame(o,!0),r.isAjaxUpload?setTimeout(function(){a(l+1)},r.processDelay):(r.unlock(),u=0),r.removeFromPreviewOnError&&d.length?d.remove():(r._initFileActions(),d.find(".kv-file-upload").remove()),r.isPersistentError=!0,r.isError=r.isAjaxUpload?r._showFileError(t,c):r._showError(t,p),r._updateFileDetails(u)};r.fileManager.clearImages(),e.each(i,function(e,t){var i=r.fileTypeSettings.image;i&&i(t.type)&&r.fileManager.totalImages++}),a=function(w){var b,_=r.$errorContainer,C=r.fileManager;if(w>=u){return r.unlock(),r.duplicateErrors.length&&(b="
  • "+r.duplicateErrors.join("
  • ")+"
  • ",0===_.find("ul").length?t.setHtml(_,r.errorCloseButton+"
      "+b+"
    "):_.find("ul").append(b),_.fadeIn(r.fadeDelay),r._handler(_.find(".kv-error-close"),"click",function(){_.fadeOut(r.fadeDelay)}),r.duplicateErrors=[]),r.isAjaxUpload?(r._raise("filebatchselected",[C.stack]),0!==C.count()||r.isError||r.reset()):r._raise("filebatchselected",[i]),o.removeClass("file-thumb-loading"),void l.html("")}r.lock(!0);var y,x,T,P,F,E,k,S,I,A,D,z,j=i[w],U=r._getFileId(j),M=c+"-"+U,$=(p.text,p.image),R=(p.html,r._getFileName(j,"")),O=(j&&j.size||0)/1000,B="",L=t.createObjectURL(j),N=0,Z="",H=!1,W=0,q=function(){var e=d.setTokens({index:w+1,files:u,percent:50,name:R});setTimeout(function(){l.html(e),r._updateFileDetails(u),a(w+1)},r.processDelay),r._raise("fileloaded",[j,M,U,w,n])&&r.isAjaxUpload&&C.add(j)};if(j){if(S=C.getId(j),g>0){for(x=0;g>x;x++){E=f[x],k=r.msgFileTypes[E]||E,Z+=0===x?k:", "+k}}if(R===!1){return void a(w+1)}if(0===R.length){return T=r.msgInvalidFileName.replace("{name}",t.htmlEncode(t.getFileName(j),"[unknown]")),void v(T,j,M,w,S)}if(t.isEmpty(m)||(B=RegExp("\\.("+m.join("|")+")$","i")),y=O.toFixed(2),r.isAjaxUpload&&C.exists(S)||r._getFrame(M,!0).length){var V={id:M,index:w,fileId:S,file:j,files:i};return T=r.msgDuplicateFile.setTokens({name:R,size:y}),void (r.isAjaxUpload?(r.duplicateErrors.push(T),r.isDuplicateError=!0,r._raise("fileduplicateerror",[j,S,R,y,M,w]),a(w+1),r._updateFileDetails(u)):(r._showError(T,V),r.unlock(),u=0,r._clearFileInput(),r.reset(),r._updateFileDetails(u)))}if(r.maxFileSize>0&&O>r.maxFileSize){return T=r.msgSizeTooLarge.setTokens({name:R,size:y,maxSize:r.maxFileSize}),void v(T,j,M,w,S)}if(null!==r.minFileSize&&O<=t.getNum(r.minFileSize)){return T=r.msgSizeTooSmall.setTokens({name:R,size:y,minSize:r.minFileSize}),void v(T,j,M,w,S)}if(!t.isEmpty(f)&&t.isArray(f)){for(x=0;x0){for(t=0;n>t;t+=1){i.paused=!0,r[t].abort()}}return i.showPreview&&i._getThumbs().each(function(){var t,a=e(this),r=a.attr("data-fileid"),n=i._getLayoutTemplate("stats"),s=a.find(".file-upload-indicator");a.removeClass("file-uploading"),s.attr("title")===l.indicatorLoadingTitle&&(i._setThumbStatus(a,"Paused"),t=n.setTokens({pendingTime:i.msgPaused,uploadSpeed:""}),i.paused=!0,i._setProgress(o,a.find(".file-thumb-progress"),o+"%",t)),i.fileManager.getFile(r)||a.find(".kv-file-remove").removeClass("disabled").removeAttr("disabled")}),i._setProgress(101,i.$progress,i.msgPaused),i.$element},cancel:function(){var t,i=this,a=i.ajaxRequests,r=i.resumableManager,n=i.taskManager,o=r?n.getPool(r.id):void 0,l=a.length;if(i.enableResumableUpload&&o?(o.cancel().done(function(){i._setProgressCancelled()}),r.reset(),i._raise("fileuploadcancelled",[i.fileManager,r])):i._raise("fileuploadcancelled",[i.fileManager]),i._initAjax(),l>0){for(t=0;l>t;t+=1){i.cancelling=!0,a[t].abort()}}return i._getThumbs().each(function(){var t=e(this),a=t.attr("data-fileid"),r=t.find(".file-thumb-progress");t.removeClass("file-uploading"),i._setProgress(0,r),r.hide(),i.fileManager.getFile(a)||(t.find(".kv-file-upload").removeClass("disabled").removeAttr("disabled"),t.find(".kv-file-remove").removeClass("disabled").removeAttr("disabled")),i.unlock()}),setTimeout(function(){i._setProgressCancelled()},i.processDelay),i.$element},clear:function(){var i,a=this;if(a._raise("fileclear")){return a.$btnUpload.removeAttr("disabled"),a._getThumbs().find("video,audio,img").each(function(){t.cleanMemory(e(this))}),a._clearFileInput(),a._resetUpload(),a.clearFileStack(),a.isDuplicateError=!1,a.isPersistentError=!1,a._resetErrors(!0),a._hasInitialPreview()?(a._showFileIcon(),a._resetPreview(),a._initPreviewActions(),a.$container.removeClass("file-input-new")):(a._getThumbs().each(function(){a._clearObjects(e(this))}),a.isAjaxUpload&&(a.previewCache.data={}),a.$preview.html(""),i=!a.overwriteInitial&&a.initialCaption.length>0?a.initialCaption:"",a.$caption.attr("title","").val(i),t.addCss(a.$container,"file-input-new"),a._validateDefaultPreview()),0===a.$container.find(t.FRAMES).length&&(a._initCaption()||a.$captionContainer.removeClass("icon-visible")),a._hideFileIcon(),a.focusCaptionOnClear&&a.$captionContainer.focus(),a._setFileDropZoneTitle(),a._raise("filecleared"),a.$element}},reset:function(){var e=this;if(e._raise("filereset")){return e.lastProgress=0,e._resetPreview(),e.$container.find(".fileinput-filename").text(""),t.addCss(e.$container,"file-input-new"),e.getFrames().length&&e.$container.removeClass("file-input-new"),e.clearFileStack(),e._setFileDropZoneTitle(),e.$element}},disable:function(){var e=this,i=e.$container;return e.isDisabled=!0,e._raise("filedisabled"),e.$element.attr("disabled","disabled"),i.addClass("is-locked"),t.addCss(i.find(".btn-file"),"disabled"),i.find(".kv-fileinput-caption").addClass("file-caption-disabled"),i.find(".fileinput-remove, .fileinput-upload, .file-preview-frame button").attr("disabled",!0),e._initDragDrop(),e.$element},enable:function(){var e=this,t=e.$container;return e.isDisabled=!1,e._raise("fileenabled"),e.$element.removeAttr("disabled"),t.removeClass("is-locked"),t.find(".kv-fileinput-caption").removeClass("file-caption-disabled"),t.find(".fileinput-remove, .fileinput-upload, .file-preview-frame button").removeAttr("disabled"),t.find(".btn-file").removeClass("disabled"),e._initDragDrop(),e.$element},upload:function(){var i,a,r=this,n=r.fileManager,o=n.count(),l=!e.isEmptyObject(r._getExtraData());if(r.isAjaxUpload&&!r.isDisabled&&r._isFileSelectionValid(o)){return r.lastProgress=0,r._resetUpload(),0!==o||l?(r.cancelling=!1,r._showProgress(),r.lock(),0===o&&l?(r._setProgress(2),void r._uploadExtraOnly()):r.enableResumableUpload?r.resume():((r.uploadAsync||r.enableResumableUpload)&&(a=r._getOutData(null),r._raise("filebatchpreupload",[a]),r.fileBatchCompleted=!1,r.uploadCache=[],e.each(r.getFileStack(),function(e){var t=r._getThumbId(e);r.uploadCache.push({id:t,content:null,config:null,tags:null,append:!0})}),r.$preview.find(".file-preview-initial").removeClass(t.SORT_CSS),r._initSortable()),r._setProgress(2),r.hasInitData=!1,r.uploadAsync?(i=0,void e.each(n.stack,function(e){r._uploadSingle(i,e,!0),i++})):(r._uploadBatch(),r.$element))):void r._showFileError(r.msgUploadEmpty)}},destroy:function(){var t=this,i=t.$form,a=t.$container,r=t.$element,n=t.namespace;return e(document).off(n),e(window).off(n),i&&i.length&&i.off(n),t.isAjaxUpload&&t._clearFileInput(),t._cleanup(),t._initPreviewCache(),r.insertBefore(a).off(n).removeData(),a.off().remove(),r},refresh:function(i){var a=this,r=a.$element;return i="object"!=typeof i||t.isEmpty(i)?a.options:e.extend(!0,{},a.options,i),a._init(i,!0),a._listen(),r},zoom:function(e){var t=this,i=t._getFrame(e);t._showModal(i)},getExif:function(e){var t=this,i=t._getFrame(e);return i&&i.data("exif")||null},getFrames:function(i){var a,r=this;return i=i||"",a=r.$preview.find(t.FRAMES+i),r.reversePreviewOrder&&(a=e(a.get().reverse())),a},getPreview:function(){var e=this;return{content:e.initialPreview,config:e.initialPreviewConfig,tags:e.initialPreviewThumbTags}}},e.fn.fileinput=function(a){if(t.hasFileAPISupport()||t.isIE(9)){var r=Array.apply(null,arguments),n=[];switch(r.shift(),this.each(function(){var o,l=e(this),s=l.data("fileinput"),d="object"==typeof a&&a,c=d.theme||l.data("theme"),u={},p={},f=d.language||l.data("language")||e.fn.fileinput.defaults.language||"en";s||(c&&(p=e.fn.fileinputThemes[c]||{}),"en"===f||t.isEmpty(e.fn.fileinputLocales[f])||(u=e.fn.fileinputLocales[f]||{}),o=e.extend(!0,{},e.fn.fileinput.defaults,p,e.fn.fileinputLocales.en,u,d,l.data()),s=new i(this,o),l.data("fileinput",s)),"string"==typeof a&&n.push(s[a].apply(s,r))}),n.length){case 0:return this;case 1:return n[0];default:return n}}};var a='class="kv-preview-data file-preview-pdf" src="{renderer}?file={data}" {style}';e.fn.fileinput.defaults={language:"zh",showCaption:!0,showBrowse:!0,showPreview:!0,showRemove:!0,showUpload:!0,showUploadStats:!0,showCancel:null,showPause:null,showClose:!0,showUploadedThumbs:!0,showConsoleLogs:!1,browseOnZoneClick:!1,autoReplace:!1,autoOrientImage:function(){var e=window.navigator.userAgent,t=!!e.match(/WebKit/i),i=!!e.match(/iP(od|ad|hone)/i),a=i&&t&&!e.match(/CriOS/i);return !a},autoOrientImageInitial:!0,required:!1,rtl:!1,hideThumbnailContent:!1,encodeUrl:!0,focusCaptionOnBrowse:!0,focusCaptionOnClear:!0,generateFileId:null,previewClass:"",captionClass:"",frameClass:"krajee-default",mainClass:"file-caption-main",mainTemplate:null,fileSizeGetter:null,initialCaption:"",initialPreview:[],initialPreviewDelimiter:"*$$*",initialPreviewAsData:!1,initialPreviewFileType:"image",initialPreviewConfig:[],initialPreviewThumbTags:[],previewThumbTags:{},initialPreviewShowDelete:!0,initialPreviewDownloadUrl:"",removeFromPreviewOnError:!1,deleteUrl:"",deleteExtraData:{},overwriteInitial:!0,sanitizeZoomCache:function(e){var i=t.createElement(e);return i.find("input,textarea,select,datalist,form,.file-thumbnail-footer").remove(),i.html()},previewZoomButtonIcons:{prev:'',next:'',toggleheader:'',fullscreen:'',borderless:'',close:''},previewZoomButtonClasses:{prev:"btn btn-navigate",next:"btn btn-navigate",toggleheader:"btn btn-sm btn-kv btn-default btn-outline-secondary",fullscreen:"btn btn-sm btn-kv btn-default btn-outline-secondary",borderless:"btn btn-sm btn-kv btn-default btn-outline-secondary",close:"btn btn-sm btn-kv btn-default btn-outline-secondary"},previewTemplates:{},previewContentTemplates:{},preferIconicPreview:!1,preferIconicZoomPreview:!1,allowedFileTypes:null,allowedFileExtensions:null,allowedPreviewTypes:void 0,allowedPreviewMimeTypes:null,allowedPreviewExtensions:null,disabledPreviewTypes:void 0,disabledPreviewExtensions:["msi","exe","com","zip","rar","app","vb","scr"],disabledPreviewMimeTypes:null,defaultPreviewContent:null,customLayoutTags:{},customPreviewTags:{},previewFileIcon:'',previewFileIconClass:"file-other-icon",previewFileIconSettings:{},previewFileExtSettings:{},buttonLabelClass:"hidden-xs",browseIcon:' ',browseClass:"btn btn-primary",removeIcon:'',removeClass:"btn btn-default btn-secondary",cancelIcon:'',cancelClass:"btn btn-default btn-secondary",pauseIcon:'',pauseClass:"btn btn-default btn-secondary",uploadIcon:'',uploadClass:"btn btn-default btn-secondary",uploadUrl:null,uploadUrlThumb:null,uploadAsync:!0,uploadParamNames:{chunkCount:"chunkCount",chunkIndex:"chunkIndex",chunkSize:"chunkSize",chunkSizeStart:"chunkSizeStart",chunksUploaded:"chunksUploaded",fileBlob:"fileBlob",fileId:"fileId",fileName:"fileName",fileRelativePath:"fileRelativePath",fileSize:"fileSize",retryCount:"retryCount"},maxAjaxThreads:5,fadeDelay:800,processDelay:100,queueDelay:10,progressDelay:0,enableResumableUpload:!1,resumableUploadOptions:{fallback:null,testUrl:null,chunkSize:2048,maxThreads:4,maxRetries:3,showErrorLog:!0},uploadExtraData:{},zoomModalHeight:480,minImageWidth:null,minImageHeight:null,maxImageWidth:null,maxImageHeight:null,resizeImage:!1,resizePreference:"width",resizeQuality:0.92,resizeDefaultImageType:"image/jpeg",resizeIfSizeMoreThan:0,minFileSize:-1,maxFileSize:0,maxFilePreviewSize:25600,minFileCount:0,maxFileCount:0,maxTotalFileCount:0,validateInitialCount:!1,msgValidationErrorClass:"text-danger",msgValidationErrorIcon:' ',msgErrorClass:"file-error-message",progressThumbClass:"progress-bar progress-bar-striped active progress-bar-animated",progressClass:"progress-bar bg-success progress-bar-success progress-bar-striped active progress-bar-animated",progressInfoClass:"progress-bar bg-info progress-bar-info progress-bar-striped active progress-bar-animated",progressCompleteClass:"progress-bar bg-success progress-bar-success",progressPauseClass:"progress-bar bg-primary progress-bar-primary progress-bar-striped active progress-bar-animated",progressErrorClass:"progress-bar bg-danger progress-bar-danger",progressUploadThreshold:99,previewFileType:"image",elCaptionContainer:null,elCaptionText:null,elPreviewContainer:null,elPreviewImage:null,elPreviewStatus:null,elErrorContainer:null,errorCloseButton:t.closeButton("kv-error-close"),slugCallback:null,dropZoneEnabled:!0,dropZoneTitleClass:"file-drop-zone-title",fileActionSettings:{},otherActionButtons:"",textEncoding:"UTF-8",preProcessUpload:null,ajaxSettings:{},ajaxDeleteSettings:{},showAjaxErrorDetails:!0,mergeAjaxCallbacks:!1,mergeAjaxDeleteCallbacks:!1,retryErrorUploads:!0,reversePreviewOrder:!1,usePdfRenderer:function(){var e=!!window.MSInputMethodContext&&!!document.documentMode;return !!navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/i)||e},pdfRendererUrl:"",pdfRendererTemplate:""},e.fn.fileinputLocales.en={fileSingle:"file",filePlural:"files",browseLabel:"Browse …",removeLabel:"Remove",removeTitle:"Clear all unprocessed files",cancelLabel:"Cancel",cancelTitle:"Abort ongoing upload",pauseLabel:"Pause",pauseTitle:"Pause ongoing upload",uploadLabel:"Upload",uploadTitle:"Upload selected files",msgNo:"No",msgNoFilesSelected:"No files selected",msgCancelled:"Cancelled",msgPaused:"Paused",msgPlaceholder:"Select {files} ...",msgZoomModalHeading:"Detailed Preview",msgFileRequired:"You must select a file to upload.",msgSizeTooSmall:'File "{name}" ({size} KB) is too small and must be larger than {minSize} KB.',msgSizeTooLarge:'File "{name}" ({size} KB) exceeds maximum allowed upload size of {maxSize} KB.',msgFilesTooLess:"You must select at least {n} {files} to upload.",msgFilesTooMany:"Number of files selected for upload ({n}) exceeds maximum allowed limit of {m}.",msgTotalFilesTooMany:"You can upload a maximum of {m} files ({n} files detected).",msgFileNotFound:'File "{name}" not found!',msgFileSecured:'Security restrictions prevent reading the file "{name}".',msgFileNotReadable:'File "{name}" is not readable.',msgFilePreviewAborted:'File preview aborted for "{name}".',msgFilePreviewError:'An error occurred while reading the file "{name}".',msgInvalidFileName:'Invalid or unsupported characters in file name "{name}".',msgInvalidFileType:'Invalid type for file "{name}". Only "{types}" files are supported.',msgInvalidFileExtension:'Invalid extension for file "{name}". Only "{extensions}" files are supported.',msgFileTypes:{image:"image",html:"HTML",text:"text",video:"video",audio:"audio",flash:"flash",pdf:"PDF",object:"object"},msgUploadAborted:"The file upload was aborted",msgUploadThreshold:"Processing …",msgUploadBegin:"Initializing …",msgUploadEnd:"Done",msgUploadResume:"Resuming upload …",msgUploadEmpty:"No valid data available for upload.",msgUploadError:"Upload Error",msgDeleteError:"Delete Error",msgProgressError:"Error",msgValidationError:"Validation Error",msgLoading:"Loading file {index} of {files} …",msgProgress:"Loading file {index} of {files} - {name} - {percent}% completed.",msgSelected:"{n} {files} selected",msgFoldersNotAllowed:"Drag & drop files only! {n} folder(s) dropped were skipped.",msgImageWidthSmall:'Width of image file "{name}" must be at least {size} px.',msgImageHeightSmall:'Height of image file "{name}" must be at least {size} px.',msgImageWidthLarge:'Width of image file "{name}" cannot exceed {size} px.',msgImageHeightLarge:'Height of image file "{name}" cannot exceed {size} px.',msgImageResizeError:"Could not get the image dimensions to resize.",msgImageResizeException:"Error while resizing the image.
    {errors}
    ",msgAjaxError:"Something went wrong with the {operation} operation. Please try again later!",msgAjaxProgressError:"{operation} failed",msgDuplicateFile:'File "{name}" of same size "{size} KB" has already been selected earlier. Skipping duplicate selection.',msgResumableUploadRetriesExceeded:"Upload aborted beyond {max} retries for file {file}! Error Details:
    {error}
    ",msgPendingTime:"{time} remaining",msgCalculatingTime:"calculating time remaining",ajaxOperations:{deleteThumb:"file delete",uploadThumb:"file upload",uploadBatch:"batch file upload",uploadExtra:"form data upload"},dropZoneTitle:"Drag & drop files here …",dropZoneClickTitle:"
    (or click to select {files})",previewZoomButtonTitles:{prev:"View previous file",next:"View next file",toggleheader:"Toggle header",fullscreen:"Toggle full screen",borderless:"Toggle borderless mode",close:"Close detailed preview"}},e.fn.fileinputLocales.zh={fileSingle:"文件",filePlural:"个文件",browseLabel:"选择 …",removeLabel:"移除",removeTitle:"清除选中文件",cancelLabel:"取消",cancelTitle:"取消进行中的上传",pauseLabel:"Pause",pauseTitle:"Pause ongoing upload",uploadLabel:"上传",uploadTitle:"上传选中文件",msgNo:"没有",msgNoFilesSelected:"未选择文件",msgPaused:"Paused",msgCancelled:"取消",msgPlaceholder:"选择 {files} ...",msgZoomModalHeading:"详细预览",msgFileRequired:"必须选择一个文件上传.",msgSizeTooSmall:'文件 "{name}" ({size} KB) 必须大于限定大小 {minSize} KB.',msgSizeTooLarge:'文件 "{name}" ({size} KB) 超过了允许大小 {maxSize} KB.',msgFilesTooLess:"你必须选择最少 {n} {files} 来上传. ",msgFilesTooMany:"选择的上传文件个数 ({n}) 超出最大文件的限制个数 {m}.",msgTotalFilesTooMany:"You can upload a maximum of {m} files ({n} files detected).",msgFileNotFound:'文件 "{name}" 未找到!',msgFileSecured:'安全限制,为了防止读取文件 "{name}".',msgFileNotReadable:'文件 "{name}" 不可读.',msgFilePreviewAborted:'取消 "{name}" 的预览.',msgFilePreviewError:'读取 "{name}" 时出现了一个错误.',msgInvalidFileName:'文件名 "{name}" 包含非法字符.',msgInvalidFileType:'不正确的类型 "{name}". 只支持 "{types}" 类型的文件.',msgInvalidFileExtension:'不正确的文件扩展名 "{name}". 只支持 "{extensions}" 的文件扩展名.',msgFileTypes:{image:"image",html:"HTML",text:"text",video:"video",audio:"audio",flash:"flash",pdf:"PDF",object:"object"},msgUploadAborted:"该文件上传被中止",msgUploadThreshold:"处理中 …",msgUploadBegin:"正在初始化 …",msgUploadEnd:"完成",msgUploadResume:"Resuming upload …",msgUploadEmpty:"无效的文件上传.",msgUploadError:"Upload Error",msgDeleteError:"Delete Error",msgProgressError:"上传出错",msgValidationError:"验证错误",msgLoading:"加载第 {index} 文件 共 {files} …",msgProgress:"加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.",msgSelected:"{n} {files} 选中",msgFoldersNotAllowed:"只支持拖拽文件! 跳过 {n} 拖拽的文件夹.",msgImageWidthSmall:'图像文件的"{name}"的宽度必须是至少{size}像素.',msgImageHeightSmall:'图像文件的"{name}"的高度必须至少为{size}像素.',msgImageWidthLarge:'图像文件"{name}"的宽度不能超过{size}像素.',msgImageHeightLarge:'图像文件"{name}"的高度不能超过{size}像素.',msgImageResizeError:"无法获取的图像尺寸调整。",msgImageResizeException:"调整图像大小时发生错误。
    {errors}
    ",msgAjaxError:"{operation} 发生错误. 请重试!",msgAjaxProgressError:"{operation} 失败",msgDuplicateFile:'File "{name}" of same size "{size} KB" has already been selected earlier. Skipping duplicate selection.',msgResumableUploadRetriesExceeded:"Upload aborted beyond {max} retries for file {file}! Error Details:
    {error}
    ",msgPendingTime:"{time} remaining",msgCalculatingTime:"calculating time remaining",ajaxOperations:{deleteThumb:"删除文件",uploadThumb:"上传文件",uploadBatch:"批量上传",uploadExtra:"表单数据上传"},dropZoneTitle:"拖拽文件到这里 …
    支持多文件同时上传",dropZoneClickTitle:"
    (或点击{files}按钮选择文件)",fileActionSettings:{removeTitle:"删除文件",uploadTitle:"上传文件",downloadTitle:"下载文件",uploadRetryTitle:"重试",zoomTitle:"查看详情",dragTitle:"移动 / 重置",indicatorNewTitle:"没有上传",indicatorSuccessTitle:"上传",indicatorErrorTitle:"上传错误",indicatorPausedTitle:"Upload Paused",indicatorLoadingTitle:"上传 …"},previewZoomButtonTitles:{prev:"预览上一个文件",next:"预览下一个文件",toggleheader:"缩放",fullscreen:"全屏",borderless:"无边界模式",close:"关闭当前预览"}},e.fn.fileinput.Constructor=i,e(document).ready(function(){var t=e("input.file[type=file]");t.length&&t.fileinput()})}); \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading-sm.gif b/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading-sm.gif new file mode 100644 index 0000000..44e3b7a Binary files /dev/null and b/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading-sm.gif differ diff --git a/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading.gif b/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading.gif new file mode 100644 index 0000000..0ea146c Binary files /dev/null and b/src/main/resources/static/ajax/libs/bootstrap-fileinput/loading.gif differ diff --git a/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.css b/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.css new file mode 100644 index 0000000..b07486c --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.css @@ -0,0 +1,429 @@ +/*! + * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select) + * + * Copyright 2012-2019 SnapAppointments, LLC + * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) + */ + +select.bs-select-hidden, +.bootstrap-select > select.bs-select-hidden, +select.selectpicker { + display: none !important; +} +.bootstrap-select { + width: 220px \0; + /*IE9 and below*/ + vertical-align: middle; +} +.bootstrap-select > .dropdown-toggle { + position: relative; + width: 100%; + text-align: right; + white-space: nowrap; + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} +.bootstrap-select > .dropdown-toggle:after { + margin-top: -1px; +} +.bootstrap-select > .dropdown-toggle.bs-placeholder, +.bootstrap-select > .dropdown-toggle.bs-placeholder:hover, +.bootstrap-select > .dropdown-toggle.bs-placeholder:focus, +.bootstrap-select > .dropdown-toggle.bs-placeholder:active { + color: #999; +} +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:hover, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:hover, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:hover, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:hover, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:hover, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:hover, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:focus, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:focus, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:focus, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:focus, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:focus, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:focus, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:active, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:active, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:active, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:active, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:active, +.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:active { + color: rgba(255, 255, 255, 0.5); +} +.bootstrap-select > select { + position: absolute !important; + bottom: 0; + left: 50%; + display: block !important; + width: 0.5px !important; + height: 100% !important; + padding: 0 !important; + opacity: 0 !important; + border: none; + z-index: 0 !important; +} +.bootstrap-select > select.mobile-device { + top: 0; + left: 0; + display: block !important; + width: 100% !important; + z-index: 2 !important; +} +.has-error .bootstrap-select .dropdown-toggle, +.error .bootstrap-select .dropdown-toggle, +.bootstrap-select.is-invalid .dropdown-toggle, +.was-validated .bootstrap-select .selectpicker:invalid + .dropdown-toggle { + border-color: #b94a48; +} +.bootstrap-select.is-valid .dropdown-toggle, +.was-validated .bootstrap-select .selectpicker:valid + .dropdown-toggle { + border-color: #28a745; +} +.bootstrap-select.fit-width { + width: auto !important; +} +.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) { + width: 220px; +} +.bootstrap-select > select.mobile-device:focus + .dropdown-toggle, +.bootstrap-select .dropdown-toggle:focus { + outline: thin dotted #333333 !important; + outline: 5px auto -webkit-focus-ring-color !important; + outline-offset: -2px; +} +.bootstrap-select.form-control { + margin-bottom: 0; + padding: 0; + border: none; + height: auto; +} +:not(.input-group) > .bootstrap-select.form-control:not([class*="col-"]) { + width: 100%; +} +.bootstrap-select.form-control.input-group-btn { + float: none; + z-index: auto; +} +.form-inline .bootstrap-select, +.form-inline .bootstrap-select.form-control:not([class*="col-"]) { + width: auto; +} +.bootstrap-select:not(.input-group-btn), +.bootstrap-select[class*="col-"] { + float: none; + display: inline-block; + margin-left: 0; +} +.bootstrap-select.dropdown-menu-right, +.bootstrap-select[class*="col-"].dropdown-menu-right, +.row .bootstrap-select[class*="col-"].dropdown-menu-right { + float: right; +} +.form-inline .bootstrap-select, +.form-horizontal .bootstrap-select, +.form-group .bootstrap-select { + margin-bottom: 0; +} +.form-group-lg .bootstrap-select.form-control, +.form-group-sm .bootstrap-select.form-control { + padding: 0; +} +.form-group-lg .bootstrap-select.form-control .dropdown-toggle, +.form-group-sm .bootstrap-select.form-control .dropdown-toggle { + height: 100%; + font-size: inherit; + line-height: inherit; + border-radius: inherit; +} +.bootstrap-select.form-control-sm .dropdown-toggle, +.bootstrap-select.form-control-lg .dropdown-toggle { + font-size: inherit; + line-height: inherit; + border-radius: inherit; +} +.bootstrap-select.form-control-sm .dropdown-toggle { + padding: 0.25rem 0.5rem; +} +.bootstrap-select.form-control-lg .dropdown-toggle { + padding: 0.5rem 1rem; +} +.form-inline .bootstrap-select .form-control { + width: 100%; +} +.bootstrap-select.disabled, +.bootstrap-select > .disabled { + cursor: not-allowed; +} +.bootstrap-select.disabled:focus, +.bootstrap-select > .disabled:focus { + outline: none !important; +} +.bootstrap-select.bs-container { + position: absolute; + top: 0; + left: 0; + height: 0 !important; + padding: 0 !important; +} +.bootstrap-select.bs-container .dropdown-menu { + z-index: 1060; +} +.bootstrap-select .dropdown-toggle .filter-option { + position: static; + top: 0; + left: 0; + float: left; + height: 100%; + width: 100%; + text-align: left; + overflow: hidden; + -webkit-box-flex: 0; + -webkit-flex: 0 1 auto; + -ms-flex: 0 1 auto; + flex: 0 1 auto; +} +.bs3.bootstrap-select .dropdown-toggle .filter-option { + padding-right: inherit; +} +.input-group .bs3-has-addon.bootstrap-select .dropdown-toggle .filter-option { + position: absolute; + padding-top: inherit; + padding-bottom: inherit; + padding-left: inherit; + float: none; +} +.input-group .bs3-has-addon.bootstrap-select .dropdown-toggle .filter-option .filter-option-inner { + padding-right: inherit; +} +.bootstrap-select .dropdown-toggle .filter-option-inner-inner { + overflow: hidden; +} +.bootstrap-select .dropdown-toggle .filter-expand { + width: 0 !important; + float: left; + opacity: 0 !important; + overflow: hidden; +} +.bootstrap-select .dropdown-toggle .caret { + position: absolute; + top: 50%; + right: 12px; + margin-top: -2px; + vertical-align: middle; +} +.input-group .bootstrap-select.form-control .dropdown-toggle { + border-radius: inherit; +} +.bootstrap-select[class*="col-"] .dropdown-toggle { + width: 100%; +} +.bootstrap-select .dropdown-menu { + min-width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.bootstrap-select .dropdown-menu > .inner:focus { + outline: none !important; +} +.bootstrap-select .dropdown-menu.inner { + position: static; + float: none; + border: 0; + padding: 0; + margin: 0; + border-radius: 0; + -webkit-box-shadow: none; + box-shadow: none; +} +.bootstrap-select .dropdown-menu li { + position: relative; +} +.bootstrap-select .dropdown-menu li.active small { + color: rgba(255, 255, 255, 0.5) !important; +} +.bootstrap-select .dropdown-menu li.disabled a { + cursor: not-allowed; +} +.bootstrap-select .dropdown-menu li a { + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.bootstrap-select .dropdown-menu li a.opt { + position: relative; + padding-left: 2.25em; +} +.bootstrap-select .dropdown-menu li a span.check-mark { + display: none; +} +.bootstrap-select .dropdown-menu li a span.text { + display: inline-block; +} +.bootstrap-select .dropdown-menu li small { + padding-left: 0.5em; +} +.bootstrap-select .dropdown-menu .notify { + position: absolute; + bottom: 5px; + width: 96%; + margin: 0 2%; + min-height: 26px; + padding: 3px 5px; + background: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + pointer-events: none; + opacity: 0.9; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.bootstrap-select .no-results { + padding: 3px; + background: #f5f5f5; + margin: 0 5px; + white-space: nowrap; +} +.bootstrap-select.fit-width .dropdown-toggle .filter-option { + position: static; + display: inline; + padding: 0; +} +.bootstrap-select.fit-width .dropdown-toggle .filter-option-inner, +.bootstrap-select.fit-width .dropdown-toggle .filter-option-inner-inner { + display: inline; +} +.bootstrap-select.fit-width .dropdown-toggle .bs-caret:before { + content: '\00a0'; +} +.bootstrap-select.fit-width .dropdown-toggle .caret { + position: static; + top: auto; + margin-top: -1px; +} +.bootstrap-select.show-tick .dropdown-menu .selected span.check-mark { + position: absolute; + display: inline-block; + right: 15px; + top: 5px; +} +.bootstrap-select.show-tick .dropdown-menu li a span.text { + margin-right: 34px; +} +.bootstrap-select .bs-ok-default:after { + content: ''; + display: block; + width: 0.5em; + height: 1em; + border-style: solid; + border-width: 0 0.26em 0.26em 0; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.bootstrap-select.show-menu-arrow.open > .dropdown-toggle, +.bootstrap-select.show-menu-arrow.show > .dropdown-toggle { + z-index: 1061; +} +.bootstrap-select.show-menu-arrow .dropdown-toggle .filter-option:before { + content: ''; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid rgba(204, 204, 204, 0.2); + position: absolute; + bottom: -4px; + left: 9px; + display: none; +} +.bootstrap-select.show-menu-arrow .dropdown-toggle .filter-option:after { + content: ''; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid white; + position: absolute; + bottom: -4px; + left: 10px; + display: none; +} +.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle .filter-option:before { + bottom: auto; + top: -4px; + border-top: 7px solid rgba(204, 204, 204, 0.2); + border-bottom: 0; +} +.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle .filter-option:after { + bottom: auto; + top: -4px; + border-top: 6px solid white; + border-bottom: 0; +} +.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle .filter-option:before { + right: 12px; + left: auto; +} +.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle .filter-option:after { + right: 13px; + left: auto; +} +.bootstrap-select.show-menu-arrow.open > .dropdown-toggle .filter-option:before, +.bootstrap-select.show-menu-arrow.show > .dropdown-toggle .filter-option:before, +.bootstrap-select.show-menu-arrow.open > .dropdown-toggle .filter-option:after, +.bootstrap-select.show-menu-arrow.show > .dropdown-toggle .filter-option:after { + display: block; +} +.bs-searchbox, +.bs-actionsbox, +.bs-donebutton { + padding: 4px 8px; +} +.bs-actionsbox { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.bs-actionsbox .btn-group button { + width: 50%; +} +.bs-donebutton { + float: left; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.bs-donebutton .btn-group button { + width: 100%; +} +.bs-searchbox + .bs-actionsbox { + padding: 0 8px 4px; +} +.bs-searchbox .form-control { + margin-bottom: 0; + width: 100%; + float: none; +} +/*# sourceMappingURL=bootstrap-select.css.map */ \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.js b/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.js new file mode 100644 index 0000000..2a4b26e --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.js @@ -0,0 +1,3139 @@ +/*! + * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select) + * + * Copyright 2012-2019 SnapAppointments, LLC + * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) + */ + +(function (root, factory) { + if (root === undefined && window !== undefined) root = window; + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module unless amdModuleId is set + define(["jquery"], function (a0) { + return (factory(a0)); + }); + } else if (typeof module === 'object' && module.exports) { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(require("jquery")); + } else { + factory(root["jQuery"]); + } +}(this, function (jQuery) { + +(function ($) { + 'use strict'; + + var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']; + + var uriAttrs = [ + 'background', + 'cite', + 'href', + 'itemtype', + 'longdesc', + 'poster', + 'src', + 'xlink:href' + ]; + + var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; + + var DefaultWhitelist = { + // Global attributes allowed on any supplied element below. + '*': ['class', 'dir', 'id', 'lang', 'role', 'tabindex', 'style', ARIA_ATTRIBUTE_PATTERN], + a: ['target', 'href', 'title', 'rel'], + area: [], + b: [], + br: [], + col: [], + code: [], + div: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ['src', 'alt', 'title', 'width', 'height'], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [] + } + + /** + * A pattern that recognizes a commonly useful subset of URLs that are safe. + * + * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts + */ + var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi; + + /** + * A pattern that matches safe data URLs. Only matches image, video and audio types. + * + * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts + */ + var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i; + + function allowedAttribute (attr, allowedAttributeList) { + var attrName = attr.nodeName.toLowerCase() + + if ($.inArray(attrName, allowedAttributeList) !== -1) { + if ($.inArray(attrName, uriAttrs) !== -1) { + return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)) + } + + return true + } + + var regExp = $(allowedAttributeList).filter(function (index, value) { + return value instanceof RegExp + }) + + // Check if a regular expression validates the attribute. + for (var i = 0, l = regExp.length; i < l; i++) { + if (attrName.match(regExp[i])) { + return true + } + } + + return false + } + + function sanitizeHtml (unsafeElements, whiteList, sanitizeFn) { + if (sanitizeFn && typeof sanitizeFn === 'function') { + return sanitizeFn(unsafeElements); + } + + var whitelistKeys = Object.keys(whiteList); + + for (var i = 0, len = unsafeElements.length; i < len; i++) { + var elements = unsafeElements[i].querySelectorAll('*'); + + for (var j = 0, len2 = elements.length; j < len2; j++) { + var el = elements[j]; + var elName = el.nodeName.toLowerCase(); + + if (whitelistKeys.indexOf(elName) === -1) { + el.parentNode.removeChild(el); + + continue; + } + + var attributeList = [].slice.call(el.attributes); + var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []); + + for (var k = 0, len3 = attributeList.length; k < len3; k++) { + var attr = attributeList[k]; + + if (!allowedAttribute(attr, whitelistedAttributes)) { + el.removeAttribute(attr.nodeName); + } + } + } + } + } + + // Polyfill for browsers with no classList support + // Remove in v2 + if (!('classList' in document.createElement('_'))) { + (function (view) { + if (!('Element' in view)) return; + + var classListProp = 'classList', + protoProp = 'prototype', + elemCtrProto = view.Element[protoProp], + objCtr = Object, + classListGetter = function () { + var $elem = $(this); + + return { + add: function (classes) { + classes = Array.prototype.slice.call(arguments).join(' '); + return $elem.addClass(classes); + }, + remove: function (classes) { + classes = Array.prototype.slice.call(arguments).join(' '); + return $elem.removeClass(classes); + }, + toggle: function (classes, force) { + return $elem.toggleClass(classes, force); + }, + contains: function (classes) { + return $elem.hasClass(classes); + } + } + }; + + if (objCtr.defineProperty) { + var classListPropDesc = { + get: classListGetter, + enumerable: true, + configurable: true + }; + try { + objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc); + } catch (ex) { // IE 8 doesn't support enumerable:true + // adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36 + // modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected + if (ex.number === undefined || ex.number === -0x7FF5EC54) { + classListPropDesc.enumerable = false; + objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc); + } + } + } else if (objCtr[protoProp].__defineGetter__) { + elemCtrProto.__defineGetter__(classListProp, classListGetter); + } + }(window)); + } + + var testElement = document.createElement('_'); + + testElement.classList.add('c1', 'c2'); + + if (!testElement.classList.contains('c2')) { + var _add = DOMTokenList.prototype.add, + _remove = DOMTokenList.prototype.remove; + + DOMTokenList.prototype.add = function () { + Array.prototype.forEach.call(arguments, _add.bind(this)); + } + + DOMTokenList.prototype.remove = function () { + Array.prototype.forEach.call(arguments, _remove.bind(this)); + } + } + + testElement.classList.toggle('c3', false); + + // Polyfill for IE 10 and Firefox <24, where classList.toggle does not + // support the second argument. + if (testElement.classList.contains('c3')) { + var _toggle = DOMTokenList.prototype.toggle; + + DOMTokenList.prototype.toggle = function (token, force) { + if (1 in arguments && !this.contains(token) === !force) { + return force; + } else { + return _toggle.call(this, token); + } + }; + } + + testElement = null; + + // shallow array comparison + function isEqual (array1, array2) { + return array1.length === array2.length && array1.every(function (element, index) { + return element === array2[index]; + }); + }; + + // + if (!String.prototype.startsWith) { + (function () { + 'use strict'; // needed to support `apply`/`call` with `undefined`/`null` + var defineProperty = (function () { + // IE 8 only supports `Object.defineProperty` on DOM elements + try { + var object = {}; + var $defineProperty = Object.defineProperty; + var result = $defineProperty(object, object, object) && $defineProperty; + } catch (error) { + } + return result; + }()); + var toString = {}.toString; + var startsWith = function (search) { + if (this == null) { + throw new TypeError(); + } + var string = String(this); + if (search && toString.call(search) == '[object RegExp]') { + throw new TypeError(); + } + var stringLength = string.length; + var searchString = String(search); + var searchLength = searchString.length; + var position = arguments.length > 1 ? arguments[1] : undefined; + // `ToInteger` + var pos = position ? Number(position) : 0; + if (pos != pos) { // better `isNaN` + pos = 0; + } + var start = Math.min(Math.max(pos, 0), stringLength); + // Avoid the `indexOf` call if no match is possible + if (searchLength + start > stringLength) { + return false; + } + var index = -1; + while (++index < searchLength) { + if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) { + return false; + } + } + return true; + }; + if (defineProperty) { + defineProperty(String.prototype, 'startsWith', { + 'value': startsWith, + 'configurable': true, + 'writable': true + }); + } else { + String.prototype.startsWith = startsWith; + } + }()); + } + + if (!Object.keys) { + Object.keys = function ( + o, // object + k, // key + r // result array + ) { + // initialize object and result + r = []; + // iterate over object keys + for (k in o) { + // fill result array with non-prototypical keys + r.hasOwnProperty.call(o, k) && r.push(k); + } + // return result + return r; + }; + } + + if (HTMLSelectElement && !HTMLSelectElement.prototype.hasOwnProperty('selectedOptions')) { + Object.defineProperty(HTMLSelectElement.prototype, 'selectedOptions', { + get: function () { + return this.querySelectorAll(':checked'); + } + }); + } + + function getSelectedOptions (select, ignoreDisabled) { + var selectedOptions = select.selectedOptions, + options = [], + opt; + + if (ignoreDisabled) { + for (var i = 0, len = selectedOptions.length; i < len; i++) { + opt = selectedOptions[i]; + + if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) { + options.push(opt); + } + } + + return options; + } + + return selectedOptions; + } + + // much faster than $.val() + function getSelectValues (select, selectedOptions) { + var value = [], + options = selectedOptions || select.selectedOptions, + opt; + + for (var i = 0, len = options.length; i < len; i++) { + opt = options[i]; + + if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) { + value.push(opt.value || opt.text); + } + } + + if (!select.multiple) { + return !value.length ? null : value[0]; + } + + return value; + } + + // set data-selected on select element if the value has been programmatically selected + // prior to initialization of bootstrap-select + // * consider removing or replacing an alternative method * + var valHooks = { + useDefault: false, + _set: $.valHooks.select.set + }; + + $.valHooks.select.set = function (elem, value) { + if (value && !valHooks.useDefault) $(elem).data('selected', true); + + return valHooks._set.apply(this, arguments); + }; + + var changedArguments = null; + + var EventIsSupported = (function () { + try { + new Event('change'); + return true; + } catch (e) { + return false; + } + })(); + + $.fn.triggerNative = function (eventName) { + var el = this[0], + event; + + if (el.dispatchEvent) { // for modern browsers & IE9+ + if (EventIsSupported) { + // For modern browsers + event = new Event(eventName, { + bubbles: true + }); + } else { + // For IE since it doesn't support Event constructor + event = document.createEvent('Event'); + event.initEvent(eventName, true, false); + } + + el.dispatchEvent(event); + } else if (el.fireEvent) { // for IE8 + event = document.createEventObject(); + event.eventType = eventName; + el.fireEvent('on' + eventName, event); + } else { + // fall back to jQuery.trigger + this.trigger(eventName); + } + }; + // + + function stringSearch (li, searchString, method, normalize) { + var stringTypes = [ + 'display', + 'subtext', + 'tokens' + ], + searchSuccess = false; + + for (var i = 0; i < stringTypes.length; i++) { + var stringType = stringTypes[i], + string = li[stringType]; + + if (string) { + string = string.toString(); + + // Strip HTML tags. This isn't perfect, but it's much faster than any other method + if (stringType === 'display') { + string = string.replace(/<[^>]+>/g, ''); + } + + if (normalize) string = normalizeToBase(string); + string = string.toUpperCase(); + + if (method === 'contains') { + searchSuccess = string.indexOf(searchString) >= 0; + } else { + searchSuccess = string.startsWith(searchString); + } + + if (searchSuccess) break; + } + } + + return searchSuccess; + } + + function toInteger (value) { + return parseInt(value, 10) || 0; + } + + // Borrowed from Lodash (_.deburr) + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to compose unicode character classes. */ + var rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboMarksExtendedRange = '\\u1ab0-\\u1aff', + rsComboMarksSupplementRange = '\\u1dc0-\\u1dff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange + rsComboMarksExtendedRange + rsComboMarksSupplementRange; + + /** Used to compose unicode capture groups. */ + var rsCombo = '[' + rsComboRange + ']'; + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + function deburrLetter (key) { + return deburredLetters[key]; + }; + + function normalizeToBase (string) { + string = string.toString(); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + // List of HTML entities for escaping. + var escapeMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' + }; + + // Functions for escaping and unescaping strings to/from HTML interpolation. + var createEscaper = function (map) { + var escaper = function (match) { + return map[match]; + }; + // Regexes for identifying a key that needs to be escaped. + var source = '(?:' + Object.keys(map).join('|') + ')'; + var testRegexp = RegExp(source); + var replaceRegexp = RegExp(source, 'g'); + return function (string) { + string = string == null ? '' : '' + string; + return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; + }; + }; + + var htmlEscape = createEscaper(escapeMap); + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var keyCodeMap = { + 32: ' ', + 48: '0', + 49: '1', + 50: '2', + 51: '3', + 52: '4', + 53: '5', + 54: '6', + 55: '7', + 56: '8', + 57: '9', + 59: ';', + 65: 'A', + 66: 'B', + 67: 'C', + 68: 'D', + 69: 'E', + 70: 'F', + 71: 'G', + 72: 'H', + 73: 'I', + 74: 'J', + 75: 'K', + 76: 'L', + 77: 'M', + 78: 'N', + 79: 'O', + 80: 'P', + 81: 'Q', + 82: 'R', + 83: 'S', + 84: 'T', + 85: 'U', + 86: 'V', + 87: 'W', + 88: 'X', + 89: 'Y', + 90: 'Z', + 96: '0', + 97: '1', + 98: '2', + 99: '3', + 100: '4', + 101: '5', + 102: '6', + 103: '7', + 104: '8', + 105: '9' + }; + + var keyCodes = { + ESCAPE: 27, // KeyboardEvent.which value for Escape (Esc) key + ENTER: 13, // KeyboardEvent.which value for Enter key + SPACE: 32, // KeyboardEvent.which value for space key + TAB: 9, // KeyboardEvent.which value for tab key + ARROW_UP: 38, // KeyboardEvent.which value for up arrow key + ARROW_DOWN: 40 // KeyboardEvent.which value for down arrow key + } + + var version = { + success: false, + major: '3' + }; + + try { + version.full = ($.fn.dropdown.Constructor.VERSION || '').split(' ')[0].split('.'); + version.major = version.full[0]; + version.success = true; + } catch (err) { + // do nothing + } + + var selectId = 0; + + var EVENT_KEY = '.bs.select'; + + var classNames = { + DISABLED: 'disabled', + DIVIDER: 'divider', + SHOW: 'open', + DROPUP: 'dropup', + MENU: 'dropdown-menu', + MENURIGHT: 'dropdown-menu-right', + MENULEFT: 'dropdown-menu-left', + // to-do: replace with more advanced template/customization options + BUTTONCLASS: 'btn-default', + POPOVERHEADER: 'popover-title', + ICONBASE: 'glyphicon', + TICKICON: 'glyphicon-ok' + } + + var Selector = { + MENU: '.' + classNames.MENU + } + + var elementTemplates = { + span: document.createElement('span'), + i: document.createElement('i'), + subtext: document.createElement('small'), + a: document.createElement('a'), + li: document.createElement('li'), + whitespace: document.createTextNode('\u00A0'), + fragment: document.createDocumentFragment() + } + + elementTemplates.a.setAttribute('role', 'option'); + elementTemplates.subtext.className = 'text-muted'; + + elementTemplates.text = elementTemplates.span.cloneNode(false); + elementTemplates.text.className = 'text'; + + elementTemplates.checkMark = elementTemplates.span.cloneNode(false); + + var REGEXP_ARROW = new RegExp(keyCodes.ARROW_UP + '|' + keyCodes.ARROW_DOWN); + var REGEXP_TAB_OR_ESCAPE = new RegExp('^' + keyCodes.TAB + '$|' + keyCodes.ESCAPE); + + var generateOption = { + li: function (content, classes, optgroup) { + var li = elementTemplates.li.cloneNode(false); + + if (content) { + if (content.nodeType === 1 || content.nodeType === 11) { + li.appendChild(content); + } else { + li.innerHTML = content; + } + } + + if (typeof classes !== 'undefined' && classes !== '') li.className = classes; + if (typeof optgroup !== 'undefined' && optgroup !== null) li.classList.add('optgroup-' + optgroup); + + return li; + }, + + a: function (text, classes, inline) { + var a = elementTemplates.a.cloneNode(true); + + if (text) { + if (text.nodeType === 11) { + a.appendChild(text); + } else { + a.insertAdjacentHTML('beforeend', text); + } + } + + if (typeof classes !== 'undefined' && classes !== '') a.className = classes; + if (version.major === '4') a.classList.add('dropdown-item'); + if (inline) a.setAttribute('style', inline); + + return a; + }, + + text: function (options, useFragment) { + var textElement = elementTemplates.text.cloneNode(false), + subtextElement, + iconElement; + + if (options.content) { + textElement.innerHTML = options.content; + } else { + textElement.textContent = options.text; + + if (options.icon) { + var whitespace = elementTemplates.whitespace.cloneNode(false); + + // need to use for icons in the button to prevent a breaking change + // note: switch to span in next major release + iconElement = (useFragment === true ? elementTemplates.i : elementTemplates.span).cloneNode(false); + iconElement.className = options.iconBase + ' ' + options.icon; + + elementTemplates.fragment.appendChild(iconElement); + elementTemplates.fragment.appendChild(whitespace); + } + + if (options.subtext) { + subtextElement = elementTemplates.subtext.cloneNode(false); + subtextElement.textContent = options.subtext; + textElement.appendChild(subtextElement); + } + } + + if (useFragment === true) { + while (textElement.childNodes.length > 0) { + elementTemplates.fragment.appendChild(textElement.childNodes[0]); + } + } else { + elementTemplates.fragment.appendChild(textElement); + } + + return elementTemplates.fragment; + }, + + label: function (options) { + var textElement = elementTemplates.text.cloneNode(false), + subtextElement, + iconElement; + + textElement.innerHTML = options.label; + + if (options.icon) { + var whitespace = elementTemplates.whitespace.cloneNode(false); + + iconElement = elementTemplates.span.cloneNode(false); + iconElement.className = options.iconBase + ' ' + options.icon; + + elementTemplates.fragment.appendChild(iconElement); + elementTemplates.fragment.appendChild(whitespace); + } + + if (options.subtext) { + subtextElement = elementTemplates.subtext.cloneNode(false); + subtextElement.textContent = options.subtext; + textElement.appendChild(subtextElement); + } + + elementTemplates.fragment.appendChild(textElement); + + return elementTemplates.fragment; + } + } + + var Selectpicker = function (element, options) { + var that = this; + + // bootstrap-select has been initialized - revert valHooks.select.set back to its original function + if (!valHooks.useDefault) { + $.valHooks.select.set = valHooks._set; + valHooks.useDefault = true; + } + + this.$element = $(element); + this.$newElement = null; + this.$button = null; + this.$menu = null; + this.options = options; + this.selectpicker = { + main: {}, + search: {}, + current: {}, // current changes if a search is in progress + view: {}, + keydown: { + keyHistory: '', + resetKeyHistory: { + start: function () { + return setTimeout(function () { + that.selectpicker.keydown.keyHistory = ''; + }, 800); + } + } + } + }; + // If we have no title yet, try to pull it from the html title attribute (jQuery doesnt' pick it up as it's not a + // data-attribute) + if (this.options.title === null) { + this.options.title = this.$element.attr('title'); + } + + // Format window padding + var winPad = this.options.windowPadding; + if (typeof winPad === 'number') { + this.options.windowPadding = [winPad, winPad, winPad, winPad]; + } + + // Expose public methods + this.val = Selectpicker.prototype.val; + this.render = Selectpicker.prototype.render; + this.refresh = Selectpicker.prototype.refresh; + this.setStyle = Selectpicker.prototype.setStyle; + this.selectAll = Selectpicker.prototype.selectAll; + this.deselectAll = Selectpicker.prototype.deselectAll; + this.destroy = Selectpicker.prototype.destroy; + this.remove = Selectpicker.prototype.remove; + this.show = Selectpicker.prototype.show; + this.hide = Selectpicker.prototype.hide; + + this.init(); + }; + + Selectpicker.VERSION = '1.13.10'; + + // part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both. + Selectpicker.DEFAULTS = { + noneSelectedText: 'Nothing selected', + noneResultsText: 'No results matched {0}', + countSelectedText: function (numSelected, numTotal) { + return (numSelected == 1) ? '{0} item selected' : '{0} items selected'; + }, + maxOptionsText: function (numAll, numGroup) { + return [ + (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)', + (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)' + ]; + }, + selectAllText: 'Select All', + deselectAllText: 'Deselect All', + doneButton: false, + doneButtonText: 'Close', + multipleSeparator: ', ', + styleBase: 'btn', + style: classNames.BUTTONCLASS, + size: 'auto', + title: null, + selectedTextFormat: 'values', + width: false, + container: false, + hideDisabled: false, + showSubtext: false, + showIcon: true, + showContent: true, + dropupAuto: true, + header: false, + liveSearch: false, + liveSearchPlaceholder: null, + liveSearchNormalize: false, + liveSearchStyle: 'contains', + actionsBox: false, + iconBase: classNames.ICONBASE, + tickIcon: classNames.TICKICON, + showTick: false, + template: { + caret: '' + }, + maxOptions: false, + mobile: false, + selectOnTab: false, + dropdownAlignRight: false, + windowPadding: 0, + virtualScroll: 600, + display: false, + sanitize: true, + sanitizeFn: null, + whiteList: DefaultWhitelist + }; + + Selectpicker.prototype = { + + constructor: Selectpicker, + + init: function () { + var that = this, + id = this.$element.attr('id'); + + selectId++; + this.selectId = 'bs-select-' + selectId; + + this.$element[0].classList.add('bs-select-hidden'); + + this.multiple = this.$element.prop('multiple'); + this.autofocus = this.$element.prop('autofocus'); + + if (this.$element[0].classList.contains('show-tick')) { + this.options.showTick = true; + } + + this.$newElement = this.createDropdown(); + this.$element + .after(this.$newElement) + .prependTo(this.$newElement); + + this.$button = this.$newElement.children('button'); + this.$menu = this.$newElement.children(Selector.MENU); + this.$menuInner = this.$menu.children('.inner'); + this.$searchbox = this.$menu.find('input'); + + this.$element[0].classList.remove('bs-select-hidden'); + + if (this.options.dropdownAlignRight === true) this.$menu[0].classList.add(classNames.MENURIGHT); + + if (typeof id !== 'undefined') { + this.$button.attr('data-id', id); + } + + this.checkDisabled(); + this.clickListener(); + + if (this.options.liveSearch) { + this.liveSearchListener(); + this.focusedParent = this.$searchbox[0]; + } else { + this.focusedParent = this.$menuInner[0]; + } + + this.setStyle(); + this.render(); + this.setWidth(); + if (this.options.container) { + this.selectPosition(); + } else { + this.$element.on('hide' + EVENT_KEY, function () { + if (that.isVirtual()) { + // empty menu on close + var menuInner = that.$menuInner[0], + emptyMenu = menuInner.firstChild.cloneNode(false); + + // replace the existing UL with an empty one - this is faster than $.empty() or innerHTML = '' + menuInner.replaceChild(emptyMenu, menuInner.firstChild); + menuInner.scrollTop = 0; + } + }); + } + this.$menu.data('this', this); + this.$newElement.data('this', this); + if (this.options.mobile) this.mobile(); + + this.$newElement.on({ + 'hide.bs.dropdown': function (e) { + that.$element.trigger('hide' + EVENT_KEY, e); + }, + 'hidden.bs.dropdown': function (e) { + that.$element.trigger('hidden' + EVENT_KEY, e); + }, + 'show.bs.dropdown': function (e) { + that.$element.trigger('show' + EVENT_KEY, e); + }, + 'shown.bs.dropdown': function (e) { + that.$element.trigger('shown' + EVENT_KEY, e); + } + }); + + if (that.$element[0].hasAttribute('required')) { + this.$element.on('invalid' + EVENT_KEY, function () { + that.$button[0].classList.add('bs-invalid'); + + that.$element + .on('shown' + EVENT_KEY + '.invalid', function () { + that.$element + .val(that.$element.val()) // set the value to hide the validation message in Chrome when menu is opened + .off('shown' + EVENT_KEY + '.invalid'); + }) + .on('rendered' + EVENT_KEY, function () { + // if select is no longer invalid, remove the bs-invalid class + if (this.validity.valid) that.$button[0].classList.remove('bs-invalid'); + that.$element.off('rendered' + EVENT_KEY); + }); + + that.$button.on('blur' + EVENT_KEY, function () { + that.$element.trigger('focus').trigger('blur'); + that.$button.off('blur' + EVENT_KEY); + }); + }); + } + + setTimeout(function () { + that.createLi(); + that.$element.trigger('loaded' + EVENT_KEY); + }); + }, + + createDropdown: function () { + // Options + // If we are multiple or showTick option is set, then add the show-tick class + var showTick = (this.multiple || this.options.showTick) ? ' show-tick' : '', + multiselectable = this.multiple ? ' aria-multiselectable="true"' : '', + inputGroup = '', + autofocus = this.autofocus ? ' autofocus' : ''; + + if (version.major < 4 && this.$element.parent().hasClass('input-group')) { + inputGroup = ' input-group-btn'; + } + + // Elements + var drop, + header = '', + searchbox = '', + actionsbox = '', + donebutton = ''; + + if (this.options.header) { + header = + '
    ' + + '' + + this.options.header + + '
    '; + } + + if (this.options.liveSearch) { + searchbox = + ''; + } + + if (this.multiple && this.options.actionsBox) { + actionsbox = + '
    ' + + '
    ' + + '' + + '' + + '
    ' + + '
    '; + } + + if (this.multiple && this.options.doneButton) { + donebutton = + '
    ' + + '
    ' + + '' + + '
    ' + + '
    '; + } + + drop = + ''; + + return $(drop); + }, + + setPositionData: function () { + this.selectpicker.view.canHighlight = []; + this.selectpicker.view.size = 0; + + for (var i = 0; i < this.selectpicker.current.data.length; i++) { + var li = this.selectpicker.current.data[i], + canHighlight = true; + + if (li.type === 'divider') { + canHighlight = false; + li.height = this.sizeInfo.dividerHeight; + } else if (li.type === 'optgroup-label') { + canHighlight = false; + li.height = this.sizeInfo.dropdownHeaderHeight; + } else { + li.height = this.sizeInfo.liHeight; + } + + if (li.disabled) canHighlight = false; + + this.selectpicker.view.canHighlight.push(canHighlight); + + if (canHighlight) { + this.selectpicker.view.size++; + li.posinset = this.selectpicker.view.size; + } + + li.position = (i === 0 ? 0 : this.selectpicker.current.data[i - 1].position) + li.height; + } + }, + + isVirtual: function () { + return (this.options.virtualScroll !== false) && (this.selectpicker.main.elements.length >= this.options.virtualScroll) || this.options.virtualScroll === true; + }, + + createView: function (isSearching, setSize, refresh) { + var that = this, + scrollTop = 0, + active = [], + selected, + prevActive; + + this.selectpicker.current = isSearching ? this.selectpicker.search : this.selectpicker.main; + + this.setPositionData(); + + if (setSize) { + if (refresh) { + scrollTop = this.$menuInner[0].scrollTop; + } else if (!that.multiple) { + var element = that.$element[0], + selectedIndex = (element.options[element.selectedIndex] || {}).liIndex; + + if (typeof selectedIndex === 'number' && that.options.size !== false) { + var selectedData = that.selectpicker.main.data[selectedIndex], + position = selectedData && selectedData.position; + + if (position) { + scrollTop = position - ((that.sizeInfo.menuInnerHeight + that.sizeInfo.liHeight) / 2); + } + } + } + } + + scroll(scrollTop, true); + + this.$menuInner.off('scroll.createView').on('scroll.createView', function (e, updateValue) { + if (!that.noScroll) scroll(this.scrollTop, updateValue); + that.noScroll = false; + }); + + function scroll (scrollTop, init) { + var size = that.selectpicker.current.elements.length, + chunks = [], + chunkSize, + chunkCount, + firstChunk, + lastChunk, + currentChunk, + prevPositions, + positionIsDifferent, + previousElements, + menuIsDifferent = true, + isVirtual = that.isVirtual(); + + that.selectpicker.view.scrollTop = scrollTop; + + if (isVirtual === true) { + // if an option that is encountered that is wider than the current menu width, update the menu width accordingly + if (that.sizeInfo.hasScrollBar && that.$menu[0].offsetWidth > that.sizeInfo.totalMenuWidth) { + that.sizeInfo.menuWidth = that.$menu[0].offsetWidth; + that.sizeInfo.totalMenuWidth = that.sizeInfo.menuWidth + that.sizeInfo.scrollBarWidth; + that.$menu.css('min-width', that.sizeInfo.menuWidth); + } + } + + chunkSize = Math.ceil(that.sizeInfo.menuInnerHeight / that.sizeInfo.liHeight * 1.5); // number of options in a chunk + chunkCount = Math.round(size / chunkSize) || 1; // number of chunks + + for (var i = 0; i < chunkCount; i++) { + var endOfChunk = (i + 1) * chunkSize; + + if (i === chunkCount - 1) { + endOfChunk = size; + } + + chunks[i] = [ + (i) * chunkSize + (!i ? 0 : 1), + endOfChunk + ]; + + if (!size) break; + + if (currentChunk === undefined && scrollTop <= that.selectpicker.current.data[endOfChunk - 1].position - that.sizeInfo.menuInnerHeight) { + currentChunk = i; + } + } + + if (currentChunk === undefined) currentChunk = 0; + + prevPositions = [that.selectpicker.view.position0, that.selectpicker.view.position1]; + + // always display previous, current, and next chunks + firstChunk = Math.max(0, currentChunk - 1); + lastChunk = Math.min(chunkCount - 1, currentChunk + 1); + + that.selectpicker.view.position0 = isVirtual === false ? 0 : (Math.max(0, chunks[firstChunk][0]) || 0); + that.selectpicker.view.position1 = isVirtual === false ? size : (Math.min(size, chunks[lastChunk][1]) || 0); + + positionIsDifferent = prevPositions[0] !== that.selectpicker.view.position0 || prevPositions[1] !== that.selectpicker.view.position1; + + if (that.activeIndex !== undefined) { + prevActive = that.selectpicker.main.elements[that.prevActiveIndex]; + active = that.selectpicker.main.elements[that.activeIndex]; + selected = that.selectpicker.main.elements[that.selectedIndex]; + + if (init) { + if (that.activeIndex !== that.selectedIndex) { + that.defocusItem(active); + } + that.activeIndex = undefined; + } + + if (that.activeIndex && that.activeIndex !== that.selectedIndex) { + that.defocusItem(selected); + } + } + + if (that.prevActiveIndex !== undefined && that.prevActiveIndex !== that.activeIndex && that.prevActiveIndex !== that.selectedIndex) { + that.defocusItem(prevActive); + } + + if (init || positionIsDifferent) { + previousElements = that.selectpicker.view.visibleElements ? that.selectpicker.view.visibleElements.slice() : []; + + if (isVirtual === false) { + that.selectpicker.view.visibleElements = that.selectpicker.current.elements; + } else { + that.selectpicker.view.visibleElements = that.selectpicker.current.elements.slice(that.selectpicker.view.position0, that.selectpicker.view.position1); + } + + that.setOptionStatus(); + + // if searching, check to make sure the list has actually been updated before updating DOM + // this prevents unnecessary repaints + if (isSearching || (isVirtual === false && init)) menuIsDifferent = !isEqual(previousElements, that.selectpicker.view.visibleElements); + + // if virtual scroll is disabled and not searching, + // menu should never need to be updated more than once + if ((init || isVirtual === true) && menuIsDifferent) { + var menuInner = that.$menuInner[0], + menuFragment = document.createDocumentFragment(), + emptyMenu = menuInner.firstChild.cloneNode(false), + marginTop, + marginBottom, + elements = that.selectpicker.view.visibleElements, + toSanitize = []; + + // replace the existing UL with an empty one - this is faster than $.empty() + menuInner.replaceChild(emptyMenu, menuInner.firstChild); + + for (var i = 0, visibleElementsLen = elements.length; i < visibleElementsLen; i++) { + var element = elements[i], + elText, + elementData; + + if (that.options.sanitize) { + elText = element.lastChild; + + if (elText) { + elementData = that.selectpicker.current.data[i + that.selectpicker.view.position0]; + + if (elementData && elementData.content && !elementData.sanitized) { + toSanitize.push(elText); + elementData.sanitized = true; + } + } + } + + menuFragment.appendChild(element); + } + + if (that.options.sanitize && toSanitize.length) { + sanitizeHtml(toSanitize, that.options.whiteList, that.options.sanitizeFn); + } + + if (isVirtual === true) { + marginTop = (that.selectpicker.view.position0 === 0 ? 0 : that.selectpicker.current.data[that.selectpicker.view.position0 - 1].position); + marginBottom = (that.selectpicker.view.position1 > size - 1 ? 0 : that.selectpicker.current.data[size - 1].position - that.selectpicker.current.data[that.selectpicker.view.position1 - 1].position); + + menuInner.firstChild.style.marginTop = marginTop + 'px'; + menuInner.firstChild.style.marginBottom = marginBottom + 'px'; + } else { + menuInner.firstChild.style.marginTop = 0; + menuInner.firstChild.style.marginBottom = 0; + } + + menuInner.firstChild.appendChild(menuFragment); + } + } + + that.prevActiveIndex = that.activeIndex; + + if (!that.options.liveSearch) { + that.$menuInner.trigger('focus'); + } else if (isSearching && init) { + var index = 0, + newActive; + + if (!that.selectpicker.view.canHighlight[index]) { + index = 1 + that.selectpicker.view.canHighlight.slice(1).indexOf(true); + } + + newActive = that.selectpicker.view.visibleElements[index]; + + that.defocusItem(that.selectpicker.view.currentActive); + + that.activeIndex = (that.selectpicker.current.data[index] || {}).index; + + that.focusItem(newActive); + } + } + + $(window) + .off('resize' + EVENT_KEY + '.' + this.selectId + '.createView') + .on('resize' + EVENT_KEY + '.' + this.selectId + '.createView', function () { + var isActive = that.$newElement.hasClass(classNames.SHOW); + + if (isActive) scroll(that.$menuInner[0].scrollTop); + }); + }, + + focusItem: function (li, liData, noStyle) { + if (li) { + liData = liData || this.selectpicker.main.data[this.activeIndex]; + var a = li.firstChild; + + if (a) { + a.setAttribute('aria-setsize', this.selectpicker.view.size); + a.setAttribute('aria-posinset', liData.posinset); + + if (noStyle !== true) { + this.focusedParent.setAttribute('aria-activedescendant', a.id); + li.classList.add('active'); + a.classList.add('active'); + } + } + } + }, + + defocusItem: function (li) { + if (li) { + li.classList.remove('active'); + if (li.firstChild) li.firstChild.classList.remove('active'); + } + }, + + setPlaceholder: function () { + var updateIndex = false; + + if (this.options.title && !this.multiple) { + if (!this.selectpicker.view.titleOption) this.selectpicker.view.titleOption = document.createElement('option'); + + // this option doesn't create a new
  • element, but does add a new option at the start, + // so startIndex should increase to prevent having to check every option for the bs-title-option class + updateIndex = true; + + var element = this.$element[0], + isSelected = false, + titleNotAppended = !this.selectpicker.view.titleOption.parentNode; + + if (titleNotAppended) { + // Use native JS to prepend option (faster) + this.selectpicker.view.titleOption.className = 'bs-title-option'; + this.selectpicker.view.titleOption.value = ''; + + // Check if selected or data-selected attribute is already set on an option. If not, select the titleOption option. + // the selected item may have been changed by user or programmatically before the bootstrap select plugin runs, + // if so, the select will have the data-selected attribute + var $opt = $(element.options[element.selectedIndex]); + isSelected = $opt.attr('selected') === undefined && this.$element.data('selected') === undefined; + } + + if (titleNotAppended || this.selectpicker.view.titleOption.index !== 0) { + element.insertBefore(this.selectpicker.view.titleOption, element.firstChild); + } + + // Set selected *after* appending to select, + // otherwise the option doesn't get selected in IE + // set using selectedIndex, as setting the selected attr to true here doesn't work in IE11 + if (isSelected) element.selectedIndex = 0; + } + + return updateIndex; + }, + + createLi: function () { + var that = this, + iconBase = this.options.iconBase, + optionSelector = ':not([hidden]):not([data-hidden="true"])', + mainElements = [], + mainData = [], + widestOptionLength = 0, + optID = 0, + startIndex = this.setPlaceholder() ? 1 : 0; // append the titleOption if necessary and skip the first option in the loop + + if (this.options.hideDisabled) optionSelector += ':not(:disabled)'; + + if ((that.options.showTick || that.multiple) && !elementTemplates.checkMark.parentNode) { + elementTemplates.checkMark.className = iconBase + ' ' + that.options.tickIcon + ' check-mark'; + elementTemplates.a.appendChild(elementTemplates.checkMark); + } + + var selectOptions = this.$element[0].querySelectorAll('select > *' + optionSelector); + + function addDivider (config) { + var previousData = mainData[mainData.length - 1]; + + // ensure optgroup doesn't create back-to-back dividers + if ( + previousData && + previousData.type === 'divider' && + (previousData.optID || config.optID) + ) { + return; + } + + config = config || {}; + config.type = 'divider'; + + mainElements.push( + generateOption.li( + false, + classNames.DIVIDER, + (config.optID ? config.optID + 'div' : undefined) + ) + ); + + mainData.push(config); + } + + function addOption (option, config) { + config = config || {}; + + config.divider = option.getAttribute('data-divider') === 'true'; + + if (config.divider) { + addDivider({ + optID: config.optID + }); + } else { + var liIndex = mainData.length, + cssText = option.style.cssText, + inlineStyle = cssText ? htmlEscape(cssText) : '', + optionClass = (option.className || '') + (config.optgroupClass || ''); + + if (config.optID) optionClass = 'opt ' + optionClass; + + config.text = option.textContent; + + config.content = option.getAttribute('data-content'); + config.tokens = option.getAttribute('data-tokens'); + config.subtext = option.getAttribute('data-subtext'); + config.icon = option.getAttribute('data-icon'); + config.iconBase = iconBase; + + var textElement = generateOption.text(config); + var liElement = generateOption.li( + generateOption.a( + textElement, + optionClass, + inlineStyle + ), + '', + config.optID + ); + + if (liElement.firstChild) { + liElement.firstChild.id = that.selectId + '-' + liIndex; + } + + mainElements.push(liElement); + + option.liIndex = liIndex; + + config.display = config.content || config.text; + config.type = 'option'; + config.index = liIndex; + config.option = option; + config.disabled = config.disabled || option.disabled; + + mainData.push(config); + + var combinedLength = 0; + + // count the number of characters in the option - not perfect, but should work in most cases + if (config.display) combinedLength += config.display.length; + if (config.subtext) combinedLength += config.subtext.length; + // if there is an icon, ensure this option's width is checked + if (config.icon) combinedLength += 1; + + if (combinedLength > widestOptionLength) { + widestOptionLength = combinedLength; + + // guess which option is the widest + // use this when calculating menu width + // not perfect, but it's fast, and the width will be updating accordingly when scrolling + that.selectpicker.view.widestOption = mainElements[mainElements.length - 1]; + } + } + } + + function addOptgroup (index, selectOptions) { + var optgroup = selectOptions[index], + previous = selectOptions[index - 1], + next = selectOptions[index + 1], + options = optgroup.querySelectorAll('option' + optionSelector); + + if (!options.length) return; + + var config = { + label: htmlEscape(optgroup.label), + subtext: optgroup.getAttribute('data-subtext'), + icon: optgroup.getAttribute('data-icon'), + iconBase: iconBase + }, + optgroupClass = ' ' + (optgroup.className || ''), + headerIndex, + lastIndex; + + optID++; + + if (previous) { + addDivider({ optID: optID }); + } + + var labelElement = generateOption.label(config); + + mainElements.push( + generateOption.li(labelElement, 'dropdown-header' + optgroupClass, optID) + ); + + mainData.push({ + display: config.label, + subtext: config.subtext, + type: 'optgroup-label', + optID: optID + }); + + for (var j = 0, len = options.length; j < len; j++) { + var option = options[j]; + + if (j === 0) { + headerIndex = mainData.length - 1; + lastIndex = headerIndex + len; + } + + addOption(option, { + headerIndex: headerIndex, + lastIndex: lastIndex, + optID: optID, + optgroupClass: optgroupClass, + disabled: optgroup.disabled + }); + } + + if (next) { + addDivider({ optID: optID }); + } + } + + for (var len = selectOptions.length; startIndex < len; startIndex++) { + var item = selectOptions[startIndex]; + + if (item.tagName !== 'OPTGROUP') { + addOption(item, {}); + } else { + addOptgroup(startIndex, selectOptions); + } + } + + this.selectpicker.main.elements = mainElements; + this.selectpicker.main.data = mainData; + + this.selectpicker.current = this.selectpicker.main; + }, + + findLis: function () { + return this.$menuInner.find('.inner > li'); + }, + + render: function () { + // ensure titleOption is appended and selected (if necessary) before getting selectedOptions + this.setPlaceholder(); + + var that = this, + element = this.$element[0], + selectedOptions = getSelectedOptions(element, this.options.hideDisabled), + selectedCount = selectedOptions.length, + button = this.$button[0], + buttonInner = button.querySelector('.filter-option-inner-inner'), + multipleSeparator = document.createTextNode(this.options.multipleSeparator), + titleFragment = elementTemplates.fragment.cloneNode(false), + showCount, + countMax, + hasContent = false; + + button.classList.toggle('bs-placeholder', that.multiple ? !selectedCount : !getSelectValues(element, selectedOptions)); + + this.tabIndex(); + + if (this.options.selectedTextFormat === 'static') { + titleFragment = generateOption.text({ text: this.options.title }, true); + } else { + showCount = this.multiple && this.options.selectedTextFormat.indexOf('count') !== -1 && selectedCount > 1; + + // determine if the number of selected options will be shown (showCount === true) + if (showCount) { + countMax = this.options.selectedTextFormat.split('>'); + showCount = (countMax.length > 1 && selectedCount > countMax[1]) || (countMax.length === 1 && selectedCount >= 2); + } + + // only loop through all selected options if the count won't be shown + if (showCount === false) { + for (var selectedIndex = 0; selectedIndex < selectedCount; selectedIndex++) { + if (selectedIndex < 50) { + var option = selectedOptions[selectedIndex], + titleOptions = {}, + thisData = { + content: option.getAttribute('data-content'), + subtext: option.getAttribute('data-subtext'), + icon: option.getAttribute('data-icon') + }; + + if (this.multiple && selectedIndex > 0) { + titleFragment.appendChild(multipleSeparator.cloneNode(false)); + } + + if (option.title) { + titleOptions.text = option.title; + } else if (thisData.content && that.options.showContent) { + titleOptions.content = thisData.content.toString(); + hasContent = true; + } else { + if (that.options.showIcon) { + titleOptions.icon = thisData.icon; + titleOptions.iconBase = this.options.iconBase; + } + if (that.options.showSubtext && !that.multiple && thisData.subtext) titleOptions.subtext = ' ' + thisData.subtext; + titleOptions.text = option.textContent.trim(); + } + + titleFragment.appendChild(generateOption.text(titleOptions, true)); + } else { + break; + } + } + + // add ellipsis + if (selectedCount > 49) { + titleFragment.appendChild(document.createTextNode('...')); + } + } else { + var optionSelector = ':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])'; + if (this.options.hideDisabled) optionSelector += ':not(:disabled)'; + + // If this is a multiselect, and selectedTextFormat is count, then show 1 of 2 selected, etc. + var totalCount = this.$element[0].querySelectorAll('select > option' + optionSelector + ', optgroup' + optionSelector + ' option' + optionSelector).length, + tr8nText = (typeof this.options.countSelectedText === 'function') ? this.options.countSelectedText(selectedCount, totalCount) : this.options.countSelectedText; + + titleFragment = generateOption.text({ + text: tr8nText.replace('{0}', selectedCount.toString()).replace('{1}', totalCount.toString()) + }, true); + } + } + + if (this.options.title == undefined) { + // use .attr to ensure undefined is returned if title attribute is not set + this.options.title = this.$element.attr('title'); + } + + // If the select doesn't have a title, then use the default, or if nothing is set at all, use noneSelectedText + if (!titleFragment.childNodes.length) { + titleFragment = generateOption.text({ + text: typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText + }, true); + } + + // strip all HTML tags and trim the result, then unescape any escaped tags + button.title = titleFragment.textContent.replace(/<[^>]*>?/g, '').trim(); + + if (this.options.sanitize && hasContent) { + sanitizeHtml([titleFragment], that.options.whiteList, that.options.sanitizeFn); + } + + buttonInner.innerHTML = ''; + buttonInner.appendChild(titleFragment); + + if (version.major < 4 && this.$newElement[0].classList.contains('bs3-has-addon')) { + var filterExpand = button.querySelector('.filter-expand'), + clone = buttonInner.cloneNode(true); + + clone.className = 'filter-expand'; + + if (filterExpand) { + button.replaceChild(clone, filterExpand); + } else { + button.appendChild(clone); + } + } + + this.$element.trigger('rendered' + EVENT_KEY); + }, + + /** + * @param [style] + * @param [status] + */ + setStyle: function (newStyle, status) { + var button = this.$button[0], + newElement = this.$newElement[0], + style = this.options.style.trim(), + buttonClass; + + if (this.$element.attr('class')) { + this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi, '')); + } + + if (version.major < 4) { + newElement.classList.add('bs3'); + + if (newElement.parentNode.classList.contains('input-group') && + (newElement.previousElementSibling || newElement.nextElementSibling) && + (newElement.previousElementSibling || newElement.nextElementSibling).classList.contains('input-group-addon') + ) { + newElement.classList.add('bs3-has-addon'); + } + } + + if (newStyle) { + buttonClass = newStyle.trim(); + } else { + buttonClass = style; + } + + if (status == 'add') { + if (buttonClass) button.classList.add.apply(button.classList, buttonClass.split(' ')); + } else if (status == 'remove') { + if (buttonClass) button.classList.remove.apply(button.classList, buttonClass.split(' ')); + } else { + if (style) button.classList.remove.apply(button.classList, style.split(' ')); + if (buttonClass) button.classList.add.apply(button.classList, buttonClass.split(' ')); + } + }, + + liHeight: function (refresh) { + if (!refresh && (this.options.size === false || this.sizeInfo)) return; + + if (!this.sizeInfo) this.sizeInfo = {}; + + var newElement = document.createElement('div'), + menu = document.createElement('div'), + menuInner = document.createElement('div'), + menuInnerInner = document.createElement('ul'), + divider = document.createElement('li'), + dropdownHeader = document.createElement('li'), + li = document.createElement('li'), + a = document.createElement('a'), + text = document.createElement('span'), + header = this.options.header && this.$menu.find('.' + classNames.POPOVERHEADER).length > 0 ? this.$menu.find('.' + classNames.POPOVERHEADER)[0].cloneNode(true) : null, + search = this.options.liveSearch ? document.createElement('div') : null, + actions = this.options.actionsBox && this.multiple && this.$menu.find('.bs-actionsbox').length > 0 ? this.$menu.find('.bs-actionsbox')[0].cloneNode(true) : null, + doneButton = this.options.doneButton && this.multiple && this.$menu.find('.bs-donebutton').length > 0 ? this.$menu.find('.bs-donebutton')[0].cloneNode(true) : null, + firstOption = this.$element.find('option')[0]; + + this.sizeInfo.selectWidth = this.$newElement[0].offsetWidth; + + text.className = 'text'; + a.className = 'dropdown-item ' + (firstOption ? firstOption.className : ''); + newElement.className = this.$menu[0].parentNode.className + ' ' + classNames.SHOW; + newElement.style.width = this.sizeInfo.selectWidth + 'px'; + if (this.options.width === 'auto') menu.style.minWidth = 0; + menu.className = classNames.MENU + ' ' + classNames.SHOW; + menuInner.className = 'inner ' + classNames.SHOW; + menuInnerInner.className = classNames.MENU + ' inner ' + (version.major === '4' ? classNames.SHOW : ''); + divider.className = classNames.DIVIDER; + dropdownHeader.className = 'dropdown-header'; + + text.appendChild(document.createTextNode('\u200b')); + a.appendChild(text); + li.appendChild(a); + dropdownHeader.appendChild(text.cloneNode(true)); + + if (this.selectpicker.view.widestOption) { + menuInnerInner.appendChild(this.selectpicker.view.widestOption.cloneNode(true)); + } + + menuInnerInner.appendChild(li); + menuInnerInner.appendChild(divider); + menuInnerInner.appendChild(dropdownHeader); + if (header) menu.appendChild(header); + if (search) { + var input = document.createElement('input'); + search.className = 'bs-searchbox'; + input.className = 'form-control'; + search.appendChild(input); + menu.appendChild(search); + } + if (actions) menu.appendChild(actions); + menuInner.appendChild(menuInnerInner); + menu.appendChild(menuInner); + if (doneButton) menu.appendChild(doneButton); + newElement.appendChild(menu); + + document.body.appendChild(newElement); + + var liHeight = li.offsetHeight, + dropdownHeaderHeight = dropdownHeader ? dropdownHeader.offsetHeight : 0, + headerHeight = header ? header.offsetHeight : 0, + searchHeight = search ? search.offsetHeight : 0, + actionsHeight = actions ? actions.offsetHeight : 0, + doneButtonHeight = doneButton ? doneButton.offsetHeight : 0, + dividerHeight = $(divider).outerHeight(true), + // fall back to jQuery if getComputedStyle is not supported + menuStyle = window.getComputedStyle ? window.getComputedStyle(menu) : false, + menuWidth = menu.offsetWidth, + $menu = menuStyle ? null : $(menu), + menuPadding = { + vert: toInteger(menuStyle ? menuStyle.paddingTop : $menu.css('paddingTop')) + + toInteger(menuStyle ? menuStyle.paddingBottom : $menu.css('paddingBottom')) + + toInteger(menuStyle ? menuStyle.borderTopWidth : $menu.css('borderTopWidth')) + + toInteger(menuStyle ? menuStyle.borderBottomWidth : $menu.css('borderBottomWidth')), + horiz: toInteger(menuStyle ? menuStyle.paddingLeft : $menu.css('paddingLeft')) + + toInteger(menuStyle ? menuStyle.paddingRight : $menu.css('paddingRight')) + + toInteger(menuStyle ? menuStyle.borderLeftWidth : $menu.css('borderLeftWidth')) + + toInteger(menuStyle ? menuStyle.borderRightWidth : $menu.css('borderRightWidth')) + }, + menuExtras = { + vert: menuPadding.vert + + toInteger(menuStyle ? menuStyle.marginTop : $menu.css('marginTop')) + + toInteger(menuStyle ? menuStyle.marginBottom : $menu.css('marginBottom')) + 2, + horiz: menuPadding.horiz + + toInteger(menuStyle ? menuStyle.marginLeft : $menu.css('marginLeft')) + + toInteger(menuStyle ? menuStyle.marginRight : $menu.css('marginRight')) + 2 + }, + scrollBarWidth; + + menuInner.style.overflowY = 'scroll'; + + scrollBarWidth = menu.offsetWidth - menuWidth; + + document.body.removeChild(newElement); + + this.sizeInfo.liHeight = liHeight; + this.sizeInfo.dropdownHeaderHeight = dropdownHeaderHeight; + this.sizeInfo.headerHeight = headerHeight; + this.sizeInfo.searchHeight = searchHeight; + this.sizeInfo.actionsHeight = actionsHeight; + this.sizeInfo.doneButtonHeight = doneButtonHeight; + this.sizeInfo.dividerHeight = dividerHeight; + this.sizeInfo.menuPadding = menuPadding; + this.sizeInfo.menuExtras = menuExtras; + this.sizeInfo.menuWidth = menuWidth; + this.sizeInfo.totalMenuWidth = this.sizeInfo.menuWidth; + this.sizeInfo.scrollBarWidth = scrollBarWidth; + this.sizeInfo.selectHeight = this.$newElement[0].offsetHeight; + + this.setPositionData(); + }, + + getSelectPosition: function () { + var that = this, + $window = $(window), + pos = that.$newElement.offset(), + $container = $(that.options.container), + containerPos; + + if (that.options.container && $container.length && !$container.is('body')) { + containerPos = $container.offset(); + containerPos.top += parseInt($container.css('borderTopWidth')); + containerPos.left += parseInt($container.css('borderLeftWidth')); + } else { + containerPos = { top: 0, left: 0 }; + } + + var winPad = that.options.windowPadding; + + this.sizeInfo.selectOffsetTop = pos.top - containerPos.top - $window.scrollTop(); + this.sizeInfo.selectOffsetBot = $window.height() - this.sizeInfo.selectOffsetTop - this.sizeInfo.selectHeight - containerPos.top - winPad[2]; + this.sizeInfo.selectOffsetLeft = pos.left - containerPos.left - $window.scrollLeft(); + this.sizeInfo.selectOffsetRight = $window.width() - this.sizeInfo.selectOffsetLeft - this.sizeInfo.selectWidth - containerPos.left - winPad[1]; + this.sizeInfo.selectOffsetTop -= winPad[0]; + this.sizeInfo.selectOffsetLeft -= winPad[3]; + }, + + setMenuSize: function (isAuto) { + this.getSelectPosition(); + + var selectWidth = this.sizeInfo.selectWidth, + liHeight = this.sizeInfo.liHeight, + headerHeight = this.sizeInfo.headerHeight, + searchHeight = this.sizeInfo.searchHeight, + actionsHeight = this.sizeInfo.actionsHeight, + doneButtonHeight = this.sizeInfo.doneButtonHeight, + divHeight = this.sizeInfo.dividerHeight, + menuPadding = this.sizeInfo.menuPadding, + menuInnerHeight, + menuHeight, + divLength = 0, + minHeight, + _minHeight, + maxHeight, + menuInnerMinHeight, + estimate; + + if (this.options.dropupAuto) { + // Get the estimated height of the menu without scrollbars. + // This is useful for smaller menus, where there might be plenty of room + // below the button without setting dropup, but we can't know + // the exact height of the menu until createView is called later + estimate = liHeight * this.selectpicker.current.elements.length + menuPadding.vert; + this.$newElement.toggleClass(classNames.DROPUP, this.sizeInfo.selectOffsetTop - this.sizeInfo.selectOffsetBot > this.sizeInfo.menuExtras.vert && estimate + this.sizeInfo.menuExtras.vert + 50 > this.sizeInfo.selectOffsetBot); + } + + if (this.options.size === 'auto') { + _minHeight = this.selectpicker.current.elements.length > 3 ? this.sizeInfo.liHeight * 3 + this.sizeInfo.menuExtras.vert - 2 : 0; + menuHeight = this.sizeInfo.selectOffsetBot - this.sizeInfo.menuExtras.vert; + minHeight = _minHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight; + menuInnerMinHeight = Math.max(_minHeight - menuPadding.vert, 0); + + if (this.$newElement.hasClass(classNames.DROPUP)) { + menuHeight = this.sizeInfo.selectOffsetTop - this.sizeInfo.menuExtras.vert; + } + + maxHeight = menuHeight; + menuInnerHeight = menuHeight - headerHeight - searchHeight - actionsHeight - doneButtonHeight - menuPadding.vert; + } else if (this.options.size && this.options.size != 'auto' && this.selectpicker.current.elements.length > this.options.size) { + for (var i = 0; i < this.options.size; i++) { + if (this.selectpicker.current.data[i].type === 'divider') divLength++; + } + + menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding.vert; + menuInnerHeight = menuHeight - menuPadding.vert; + maxHeight = menuHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight; + minHeight = menuInnerMinHeight = ''; + } + + if (this.options.dropdownAlignRight === 'auto') { + this.$menu.toggleClass(classNames.MENURIGHT, this.sizeInfo.selectOffsetLeft > this.sizeInfo.selectOffsetRight && this.sizeInfo.selectOffsetRight < (this.sizeInfo.totalMenuWidth - selectWidth)); + } + + this.$menu.css({ + 'max-height': maxHeight + 'px', + 'overflow': 'hidden', + 'min-height': minHeight + 'px' + }); + + this.$menuInner.css({ + 'max-height': menuInnerHeight + 'px', + 'overflow-y': 'auto', + 'min-height': menuInnerMinHeight + 'px' + }); + + // ensure menuInnerHeight is always a positive number to prevent issues calculating chunkSize in createView + this.sizeInfo.menuInnerHeight = Math.max(menuInnerHeight, 1); + + if (this.selectpicker.current.data.length && this.selectpicker.current.data[this.selectpicker.current.data.length - 1].position > this.sizeInfo.menuInnerHeight) { + this.sizeInfo.hasScrollBar = true; + this.sizeInfo.totalMenuWidth = this.sizeInfo.menuWidth + this.sizeInfo.scrollBarWidth; + + this.$menu.css('min-width', this.sizeInfo.totalMenuWidth); + } + + if (this.dropdown && this.dropdown._popper) this.dropdown._popper.update(); + }, + + setSize: function (refresh) { + this.liHeight(refresh); + + if (this.options.header) this.$menu.css('padding-top', 0); + if (this.options.size === false) return; + + var that = this, + $window = $(window); + + this.setMenuSize(); + + if (this.options.liveSearch) { + this.$searchbox + .off('input.setMenuSize propertychange.setMenuSize') + .on('input.setMenuSize propertychange.setMenuSize', function () { + return that.setMenuSize(); + }); + } + + if (this.options.size === 'auto') { + $window + .off('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize') + .on('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize', function () { + return that.setMenuSize(); + }); + } else if (this.options.size && this.options.size != 'auto' && this.selectpicker.current.elements.length > this.options.size) { + $window.off('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize'); + } + + that.createView(false, true, refresh); + }, + + setWidth: function () { + var that = this; + + if (this.options.width === 'auto') { + requestAnimationFrame(function () { + that.$menu.css('min-width', '0'); + + that.$element.on('loaded' + EVENT_KEY, function () { + that.liHeight(); + that.setMenuSize(); + + // Get correct width if element is hidden + var $selectClone = that.$newElement.clone().appendTo('body'), + btnWidth = $selectClone.css('width', 'auto').children('button').outerWidth(); + + $selectClone.remove(); + + // Set width to whatever's larger, button title or longest option + that.sizeInfo.selectWidth = Math.max(that.sizeInfo.totalMenuWidth, btnWidth); + that.$newElement.css('width', that.sizeInfo.selectWidth + 'px'); + }); + }); + } else if (this.options.width === 'fit') { + // Remove inline min-width so width can be changed from 'auto' + this.$menu.css('min-width', ''); + this.$newElement.css('width', '').addClass('fit-width'); + } else if (this.options.width) { + // Remove inline min-width so width can be changed from 'auto' + this.$menu.css('min-width', ''); + this.$newElement.css('width', this.options.width); + } else { + // Remove inline min-width/width so width can be changed + this.$menu.css('min-width', ''); + this.$newElement.css('width', ''); + } + // Remove fit-width class if width is changed programmatically + if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') { + this.$newElement[0].classList.remove('fit-width'); + } + }, + + selectPosition: function () { + this.$bsContainer = $('
    '); + + var that = this, + $container = $(this.options.container), + pos, + containerPos, + actualHeight, + getPlacement = function ($element) { + var containerPosition = {}, + // fall back to dropdown's default display setting if display is not manually set + display = that.options.display || ( + // Bootstrap 3 doesn't have $.fn.dropdown.Constructor.Default + $.fn.dropdown.Constructor.Default ? $.fn.dropdown.Constructor.Default.display + : false + ); + + that.$bsContainer.addClass($element.attr('class').replace(/form-control|fit-width/gi, '')).toggleClass(classNames.DROPUP, $element.hasClass(classNames.DROPUP)); + pos = $element.offset(); + + if (!$container.is('body')) { + containerPos = $container.offset(); + containerPos.top += parseInt($container.css('borderTopWidth')) - $container.scrollTop(); + containerPos.left += parseInt($container.css('borderLeftWidth')) - $container.scrollLeft(); + } else { + containerPos = { top: 0, left: 0 }; + } + + actualHeight = $element.hasClass(classNames.DROPUP) ? 0 : $element[0].offsetHeight; + + // Bootstrap 4+ uses Popper for menu positioning + if (version.major < 4 || display === 'static') { + containerPosition.top = pos.top - containerPos.top + actualHeight; + containerPosition.left = pos.left - containerPos.left; + } + + containerPosition.width = $element[0].offsetWidth; + + that.$bsContainer.css(containerPosition); + }; + + this.$button.on('click.bs.dropdown.data-api', function () { + if (that.isDisabled()) { + return; + } + + getPlacement(that.$newElement); + + that.$bsContainer + .appendTo(that.options.container) + .toggleClass(classNames.SHOW, !that.$button.hasClass(classNames.SHOW)) + .append(that.$menu); + }); + + $(window) + .off('resize' + EVENT_KEY + '.' + this.selectId + ' scroll' + EVENT_KEY + '.' + this.selectId) + .on('resize' + EVENT_KEY + '.' + this.selectId + ' scroll' + EVENT_KEY + '.' + this.selectId, function () { + var isActive = that.$newElement.hasClass(classNames.SHOW); + + if (isActive) getPlacement(that.$newElement); + }); + + this.$element.on('hide' + EVENT_KEY, function () { + that.$menu.data('height', that.$menu.height()); + that.$bsContainer.detach(); + }); + }, + + setOptionStatus: function (selectedOnly) { + var that = this; + + that.noScroll = false; + + if (that.selectpicker.view.visibleElements && that.selectpicker.view.visibleElements.length) { + for (var i = 0; i < that.selectpicker.view.visibleElements.length; i++) { + var liData = that.selectpicker.current.data[i + that.selectpicker.view.position0], + option = liData.option; + + if (option) { + if (selectedOnly !== true) { + that.setDisabled( + liData.index, + liData.disabled + ); + } + + that.setSelected( + liData.index, + option.selected + ); + } + } + } + }, + + /** + * @param {number} index - the index of the option that is being changed + * @param {boolean} selected - true if the option is being selected, false if being deselected + */ + setSelected: function (index, selected) { + var li = this.selectpicker.main.elements[index], + liData = this.selectpicker.main.data[index], + activeIndexIsSet = this.activeIndex !== undefined, + thisIsActive = this.activeIndex === index, + prevActive, + a, + // if current option is already active + // OR + // if the current option is being selected, it's NOT multiple, and + // activeIndex is undefined: + // - when the menu is first being opened, OR + // - after a search has been performed, OR + // - when retainActive is false when selecting a new option (i.e. index of the newly selected option is not the same as the current activeIndex) + keepActive = thisIsActive || (selected && !this.multiple && !activeIndexIsSet); + + liData.selected = selected; + + a = li.firstChild; + + if (selected) { + this.selectedIndex = index; + } + + li.classList.toggle('selected', selected); + + if (keepActive) { + this.focusItem(li, liData); + this.selectpicker.view.currentActive = li; + this.activeIndex = index; + } else { + this.defocusItem(li); + } + + if (a) { + a.classList.toggle('selected', selected); + + if (selected) { + a.setAttribute('aria-selected', true); + } else { + if (this.multiple) { + a.setAttribute('aria-selected', false); + } else { + a.removeAttribute('aria-selected'); + } + } + } + + if (!keepActive && !activeIndexIsSet && selected && this.prevActiveIndex !== undefined) { + prevActive = this.selectpicker.main.elements[this.prevActiveIndex]; + + this.defocusItem(prevActive); + } + }, + + /** + * @param {number} index - the index of the option that is being disabled + * @param {boolean} disabled - true if the option is being disabled, false if being enabled + */ + setDisabled: function (index, disabled) { + var li = this.selectpicker.main.elements[index], + a; + + this.selectpicker.main.data[index].disabled = disabled; + + a = li.firstChild; + + li.classList.toggle(classNames.DISABLED, disabled); + + if (a) { + if (version.major === '4') a.classList.toggle(classNames.DISABLED, disabled); + + if (disabled) { + a.setAttribute('aria-disabled', disabled); + a.setAttribute('tabindex', -1); + } else { + a.removeAttribute('aria-disabled'); + a.setAttribute('tabindex', 0); + } + } + }, + + isDisabled: function () { + return this.$element[0].disabled; + }, + + checkDisabled: function () { + var that = this; + + if (this.isDisabled()) { + this.$newElement[0].classList.add(classNames.DISABLED); + this.$button.addClass(classNames.DISABLED).attr('tabindex', -1).attr('aria-disabled', true); + } else { + if (this.$button[0].classList.contains(classNames.DISABLED)) { + this.$newElement[0].classList.remove(classNames.DISABLED); + this.$button.removeClass(classNames.DISABLED).attr('aria-disabled', false); + } + + if (this.$button.attr('tabindex') == -1 && !this.$element.data('tabindex')) { + this.$button.removeAttr('tabindex'); + } + } + + this.$button.on('click', function () { + return !that.isDisabled(); + }); + }, + + tabIndex: function () { + if (this.$element.data('tabindex') !== this.$element.attr('tabindex') && + (this.$element.attr('tabindex') !== -98 && this.$element.attr('tabindex') !== '-98')) { + this.$element.data('tabindex', this.$element.attr('tabindex')); + this.$button.attr('tabindex', this.$element.data('tabindex')); + } + + this.$element.attr('tabindex', -98); + }, + + clickListener: function () { + var that = this, + $document = $(document); + + $document.data('spaceSelect', false); + + this.$button.on('keyup', function (e) { + if (/(32)/.test(e.keyCode.toString(10)) && $document.data('spaceSelect')) { + e.preventDefault(); + $document.data('spaceSelect', false); + } + }); + + this.$newElement.on('show.bs.dropdown', function () { + if (version.major > 3 && !that.dropdown) { + that.dropdown = that.$button.data('bs.dropdown'); + that.dropdown._menu = that.$menu[0]; + } + }); + + this.$button.on('click.bs.dropdown.data-api', function () { + if (!that.$newElement.hasClass(classNames.SHOW)) { + that.setSize(); + } + }); + + function setFocus () { + if (that.options.liveSearch) { + that.$searchbox.trigger('focus'); + } else { + that.$menuInner.trigger('focus'); + } + } + + function checkPopperExists () { + if (that.dropdown && that.dropdown._popper && that.dropdown._popper.state.isCreated) { + setFocus(); + } else { + requestAnimationFrame(checkPopperExists); + } + } + + this.$element.on('shown' + EVENT_KEY, function () { + if (that.$menuInner[0].scrollTop !== that.selectpicker.view.scrollTop) { + that.$menuInner[0].scrollTop = that.selectpicker.view.scrollTop; + } + + if (version.major > 3) { + requestAnimationFrame(checkPopperExists); + } else { + setFocus(); + } + }); + + // ensure posinset and setsize are correct before selecting an option via a click + this.$menuInner.on('mouseenter', 'li a', function (e) { + var hoverLi = this.parentElement, + position0 = that.isVirtual() ? that.selectpicker.view.position0 : 0, + index = Array.prototype.indexOf.call(hoverLi.parentElement.children, hoverLi), + hoverData = that.selectpicker.current.data[index + position0]; + + that.focusItem(hoverLi, hoverData, true); + }); + + this.$menuInner.on('click', 'li a', function (e, retainActive) { + var $this = $(this), + element = that.$element[0], + position0 = that.isVirtual() ? that.selectpicker.view.position0 : 0, + clickedData = that.selectpicker.current.data[$this.parent().index() + position0], + clickedIndex = clickedData.index, + prevValue = getSelectValues(element), + prevIndex = element.selectedIndex, + prevOption = element.options[prevIndex], + triggerChange = true; + + // Don't close on multi choice menu + if (that.multiple && that.options.maxOptions !== 1) { + e.stopPropagation(); + } + + e.preventDefault(); + + // Don't run if the select is disabled + if (!that.isDisabled() && !$this.parent().hasClass(classNames.DISABLED)) { + var $options = that.$element.find('option'), + option = clickedData.option, + $option = $(option), + state = option.selected, + $optgroup = $option.parent('optgroup'), + $optgroupOptions = $optgroup.find('option'), + maxOptions = that.options.maxOptions, + maxOptionsGrp = $optgroup.data('maxOptions') || false; + + if (clickedIndex === that.activeIndex) retainActive = true; + + if (!retainActive) { + that.prevActiveIndex = that.activeIndex; + that.activeIndex = undefined; + } + + if (!that.multiple) { // Deselect all others if not multi select box + prevOption.selected = false; + option.selected = true; + that.setSelected(clickedIndex, true); + } else { // Toggle the one we have chosen if we are multi select. + option.selected = !state; + + that.setSelected(clickedIndex, !state); + $this.trigger('blur'); + + if (maxOptions !== false || maxOptionsGrp !== false) { + var maxReached = maxOptions < $options.filter(':selected').length, + maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length; + + if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) { + if (maxOptions && maxOptions == 1) { + $options.prop('selected', false); + $option.prop('selected', true); + + for (var i = 0; i < $options.length; i++) { + that.setSelected(i, false); + } + + that.setSelected(clickedIndex, true); + } else if (maxOptionsGrp && maxOptionsGrp == 1) { + $optgroup.find('option:selected').prop('selected', false); + $option.prop('selected', true); + + for (var i = 0; i < $optgroupOptions.length; i++) { + var option = $optgroupOptions[i]; + that.setSelected($options.index(option), false); + } + + that.setSelected(clickedIndex, true); + } else { + var maxOptionsText = typeof that.options.maxOptionsText === 'string' ? [that.options.maxOptionsText, that.options.maxOptionsText] : that.options.maxOptionsText, + maxOptionsArr = typeof maxOptionsText === 'function' ? maxOptionsText(maxOptions, maxOptionsGrp) : maxOptionsText, + maxTxt = maxOptionsArr[0].replace('{n}', maxOptions), + maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp), + $notify = $('
    '); + // If {var} is set in array, replace it + /** @deprecated */ + if (maxOptionsArr[2]) { + maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]); + maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]); + } + + $option.prop('selected', false); + + that.$menu.append($notify); + + if (maxOptions && maxReached) { + $notify.append($('
    ' + maxTxt + '
    ')); + triggerChange = false; + that.$element.trigger('maxReached' + EVENT_KEY); + } + + if (maxOptionsGrp && maxReachedGrp) { + $notify.append($('
    ' + maxTxtGrp + '
    ')); + triggerChange = false; + that.$element.trigger('maxReachedGrp' + EVENT_KEY); + } + + setTimeout(function () { + that.setSelected(clickedIndex, false); + }, 10); + + $notify.delay(750).fadeOut(300, function () { + $(this).remove(); + }); + } + } + } + } + + if (!that.multiple || (that.multiple && that.options.maxOptions === 1)) { + that.$button.trigger('focus'); + } else if (that.options.liveSearch) { + that.$searchbox.trigger('focus'); + } + + // Trigger select 'change' + if (triggerChange) { + if (that.multiple || prevIndex !== element.selectedIndex) { + // $option.prop('selected') is current option state (selected/unselected). prevValue is the value of the select prior to being changed. + changedArguments = [option.index, $option.prop('selected'), prevValue]; + that.$element + .triggerNative('change'); + } + } + } + }); + + this.$menu.on('click', 'li.' + classNames.DISABLED + ' a, .' + classNames.POPOVERHEADER + ', .' + classNames.POPOVERHEADER + ' :not(.close)', function (e) { + if (e.currentTarget == this) { + e.preventDefault(); + e.stopPropagation(); + if (that.options.liveSearch && !$(e.target).hasClass('close')) { + that.$searchbox.trigger('focus'); + } else { + that.$button.trigger('focus'); + } + } + }); + + this.$menuInner.on('click', '.divider, .dropdown-header', function (e) { + e.preventDefault(); + e.stopPropagation(); + if (that.options.liveSearch) { + that.$searchbox.trigger('focus'); + } else { + that.$button.trigger('focus'); + } + }); + + this.$menu.on('click', '.' + classNames.POPOVERHEADER + ' .close', function () { + that.$button.trigger('click'); + }); + + this.$searchbox.on('click', function (e) { + e.stopPropagation(); + }); + + this.$menu.on('click', '.actions-btn', function (e) { + if (that.options.liveSearch) { + that.$searchbox.trigger('focus'); + } else { + that.$button.trigger('focus'); + } + + e.preventDefault(); + e.stopPropagation(); + + if ($(this).hasClass('bs-select-all')) { + that.selectAll(); + } else { + that.deselectAll(); + } + }); + + this.$element + .on('change' + EVENT_KEY, function () { + that.render(); + that.$element.trigger('changed' + EVENT_KEY, changedArguments); + changedArguments = null; + }) + .on('focus' + EVENT_KEY, function () { + if (!that.options.mobile) that.$button.trigger('focus'); + }); + }, + + liveSearchListener: function () { + var that = this, + noResults = document.createElement('li'); + + this.$button.on('click.bs.dropdown.data-api', function () { + if (!!that.$searchbox.val()) { + that.$searchbox.val(''); + } + }); + + this.$searchbox.on('click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api', function (e) { + e.stopPropagation(); + }); + + this.$searchbox.on('input propertychange', function () { + var searchValue = that.$searchbox.val(); + + that.selectpicker.search.elements = []; + that.selectpicker.search.data = []; + + if (searchValue) { + var i, + searchMatch = [], + q = searchValue.toUpperCase(), + cache = {}, + cacheArr = [], + searchStyle = that._searchStyle(), + normalizeSearch = that.options.liveSearchNormalize; + + if (normalizeSearch) q = normalizeToBase(q); + + that._$lisSelected = that.$menuInner.find('.selected'); + + for (var i = 0; i < that.selectpicker.main.data.length; i++) { + var li = that.selectpicker.main.data[i]; + + if (!cache[i]) { + cache[i] = stringSearch(li, q, searchStyle, normalizeSearch); + } + + if (cache[i] && li.headerIndex !== undefined && cacheArr.indexOf(li.headerIndex) === -1) { + if (li.headerIndex > 0) { + cache[li.headerIndex - 1] = true; + cacheArr.push(li.headerIndex - 1); + } + + cache[li.headerIndex] = true; + cacheArr.push(li.headerIndex); + + cache[li.lastIndex + 1] = true; + } + + if (cache[i] && li.type !== 'optgroup-label') cacheArr.push(i); + } + + for (var i = 0, cacheLen = cacheArr.length; i < cacheLen; i++) { + var index = cacheArr[i], + prevIndex = cacheArr[i - 1], + li = that.selectpicker.main.data[index], + liPrev = that.selectpicker.main.data[prevIndex]; + + if (li.type !== 'divider' || (li.type === 'divider' && liPrev && liPrev.type !== 'divider' && cacheLen - 1 !== i)) { + that.selectpicker.search.data.push(li); + searchMatch.push(that.selectpicker.main.elements[index]); + } + } + + that.activeIndex = undefined; + that.noScroll = true; + that.$menuInner.scrollTop(0); + that.selectpicker.search.elements = searchMatch; + that.createView(true); + + if (!searchMatch.length) { + noResults.className = 'no-results'; + noResults.innerHTML = that.options.noneResultsText.replace('{0}', '"' + htmlEscape(searchValue) + '"'); + that.$menuInner[0].firstChild.appendChild(noResults); + } + } else { + that.$menuInner.scrollTop(0); + that.createView(false); + } + }); + }, + + _searchStyle: function () { + return this.options.liveSearchStyle || 'contains'; + }, + + val: function (value) { + var element = this.$element[0]; + + if (typeof value !== 'undefined') { + var prevValue = getSelectValues(element); + + changedArguments = [null, null, prevValue]; + + this.$element + .val(value) + .trigger('changed' + EVENT_KEY, changedArguments); + + if (this.$newElement.hasClass(classNames.SHOW)) { + if (this.multiple) { + this.setOptionStatus(true); + } else { + var liSelectedIndex = (element.options[element.selectedIndex] || {}).liIndex; + + if (typeof liSelectedIndex === 'number') { + this.setSelected(this.selectedIndex, false); + this.setSelected(liSelectedIndex, true); + } + } + } + + this.render(); + + changedArguments = null; + + return this.$element; + } else { + return this.$element.val(); + } + }, + + changeAll: function (status) { + if (!this.multiple) return; + if (typeof status === 'undefined') status = true; + + var element = this.$element[0], + previousSelected = 0, + currentSelected = 0, + prevValue = getSelectValues(element); + + element.classList.add('bs-select-hidden'); + + for (var i = 0, len = this.selectpicker.current.elements.length; i < len; i++) { + var liData = this.selectpicker.current.data[i], + option = liData.option; + + if (option && !liData.disabled && liData.type !== 'divider') { + if (liData.selected) previousSelected++; + option.selected = status; + if (status) currentSelected++; + } + } + + element.classList.remove('bs-select-hidden'); + + if (previousSelected === currentSelected) return; + + this.setOptionStatus(); + + changedArguments = [null, null, prevValue]; + + this.$element + .triggerNative('change'); + }, + + selectAll: function () { + return this.changeAll(true); + }, + + deselectAll: function () { + return this.changeAll(false); + }, + + toggle: function (e) { + e = e || window.event; + + if (e) e.stopPropagation(); + + this.$button.trigger('click.bs.dropdown.data-api'); + }, + + keydown: function (e) { + var $this = $(this), + isToggle = $this.hasClass('dropdown-toggle'), + $parent = isToggle ? $this.closest('.dropdown') : $this.closest(Selector.MENU), + that = $parent.data('this'), + $items = that.findLis(), + index, + isActive, + liActive, + activeLi, + offset, + updateScroll = false, + downOnTab = e.which === keyCodes.TAB && !isToggle && !that.options.selectOnTab, + isArrowKey = REGEXP_ARROW.test(e.which) || downOnTab, + scrollTop = that.$menuInner[0].scrollTop, + isVirtual = that.isVirtual(), + position0 = isVirtual === true ? that.selectpicker.view.position0 : 0; + + isActive = that.$newElement.hasClass(classNames.SHOW); + + if ( + !isActive && + ( + isArrowKey || + (e.which >= 48 && e.which <= 57) || + (e.which >= 96 && e.which <= 105) || + (e.which >= 65 && e.which <= 90) + ) + ) { + that.$button.trigger('click.bs.dropdown.data-api'); + + if (that.options.liveSearch) { + that.$searchbox.trigger('focus'); + return; + } + } + + if (e.which === keyCodes.ESCAPE && isActive) { + e.preventDefault(); + that.$button.trigger('click.bs.dropdown.data-api').trigger('focus'); + } + + if (isArrowKey) { // if up or down + if (!$items.length) return; + + liActive = that.selectpicker.main.elements[that.activeIndex]; + index = liActive ? Array.prototype.indexOf.call(liActive.parentElement.children, liActive) : -1; + + if (index !== -1) { + that.defocusItem(liActive); + } + + if (e.which === keyCodes.ARROW_UP) { // up + if (index !== -1) index--; + if (index + position0 < 0) index += $items.length; + + if (!that.selectpicker.view.canHighlight[index + position0]) { + index = that.selectpicker.view.canHighlight.slice(0, index + position0).lastIndexOf(true) - position0; + if (index === -1) index = $items.length - 1; + } + } else if (e.which === keyCodes.ARROW_DOWN || downOnTab) { // down + index++; + if (index + position0 >= that.selectpicker.view.canHighlight.length) index = 0; + + if (!that.selectpicker.view.canHighlight[index + position0]) { + index = index + 1 + that.selectpicker.view.canHighlight.slice(index + position0 + 1).indexOf(true); + } + } + + e.preventDefault(); + + var liActiveIndex = position0 + index; + + if (e.which === keyCodes.ARROW_UP) { // up + // scroll to bottom and highlight last option + if (position0 === 0 && index === $items.length - 1) { + that.$menuInner[0].scrollTop = that.$menuInner[0].scrollHeight; + + liActiveIndex = that.selectpicker.current.elements.length - 1; + } else { + activeLi = that.selectpicker.current.data[liActiveIndex]; + offset = activeLi.position - activeLi.height; + + updateScroll = offset < scrollTop; + } + } else if (e.which === keyCodes.ARROW_DOWN || downOnTab) { // down + // scroll to top and highlight first option + if (index === 0) { + that.$menuInner[0].scrollTop = 0; + + liActiveIndex = 0; + } else { + activeLi = that.selectpicker.current.data[liActiveIndex]; + offset = activeLi.position - that.sizeInfo.menuInnerHeight; + + updateScroll = offset > scrollTop; + } + } + + liActive = that.selectpicker.current.elements[liActiveIndex]; + + that.activeIndex = that.selectpicker.current.data[liActiveIndex].index; + + that.focusItem(liActive); + + that.selectpicker.view.currentActive = liActive; + + if (updateScroll) that.$menuInner[0].scrollTop = offset; + + if (that.options.liveSearch) { + that.$searchbox.trigger('focus'); + } else { + $this.trigger('focus'); + } + } else if ( + (!$this.is('input') && !REGEXP_TAB_OR_ESCAPE.test(e.which)) || + (e.which === keyCodes.SPACE && that.selectpicker.keydown.keyHistory) + ) { + var searchMatch, + matches = [], + keyHistory; + + e.preventDefault(); + + that.selectpicker.keydown.keyHistory += keyCodeMap[e.which]; + + if (that.selectpicker.keydown.resetKeyHistory.cancel) clearTimeout(that.selectpicker.keydown.resetKeyHistory.cancel); + that.selectpicker.keydown.resetKeyHistory.cancel = that.selectpicker.keydown.resetKeyHistory.start(); + + keyHistory = that.selectpicker.keydown.keyHistory; + + // if all letters are the same, set keyHistory to just the first character when searching + if (/^(.)\1+$/.test(keyHistory)) { + keyHistory = keyHistory.charAt(0); + } + + // find matches + for (var i = 0; i < that.selectpicker.current.data.length; i++) { + var li = that.selectpicker.current.data[i], + hasMatch; + + hasMatch = stringSearch(li, keyHistory, 'startsWith', true); + + if (hasMatch && that.selectpicker.view.canHighlight[i]) { + matches.push(li.index); + } + } + + if (matches.length) { + var matchIndex = 0; + + $items.removeClass('active').find('a').removeClass('active'); + + // either only one key has been pressed or they are all the same key + if (keyHistory.length === 1) { + matchIndex = matches.indexOf(that.activeIndex); + + if (matchIndex === -1 || matchIndex === matches.length - 1) { + matchIndex = 0; + } else { + matchIndex++; + } + } + + searchMatch = matches[matchIndex]; + + activeLi = that.selectpicker.main.data[searchMatch]; + + if (scrollTop - activeLi.position > 0) { + offset = activeLi.position - activeLi.height; + updateScroll = true; + } else { + offset = activeLi.position - that.sizeInfo.menuInnerHeight; + // if the option is already visible at the current scroll position, just keep it the same + updateScroll = activeLi.position > scrollTop + that.sizeInfo.menuInnerHeight; + } + + liActive = that.selectpicker.main.elements[searchMatch]; + + that.activeIndex = matches[matchIndex]; + + that.focusItem(liActive); + + if (liActive) liActive.firstChild.focus(); + + if (updateScroll) that.$menuInner[0].scrollTop = offset; + + $this.trigger('focus'); + } + } + + // Select focused option if "Enter", "Spacebar" or "Tab" (when selectOnTab is true) are pressed inside the menu. + if ( + isActive && + ( + (e.which === keyCodes.SPACE && !that.selectpicker.keydown.keyHistory) || + e.which === keyCodes.ENTER || + (e.which === keyCodes.TAB && that.options.selectOnTab) + ) + ) { + if (e.which !== keyCodes.SPACE) e.preventDefault(); + + if (!that.options.liveSearch || e.which !== keyCodes.SPACE) { + that.$menuInner.find('.active a').trigger('click', true); // retain active class + $this.trigger('focus'); + + if (!that.options.liveSearch) { + // Prevent screen from scrolling if the user hits the spacebar + e.preventDefault(); + // Fixes spacebar selection of dropdown items in FF & IE + $(document).data('spaceSelect', true); + } + } + } + }, + + mobile: function () { + this.$element[0].classList.add('mobile-device'); + }, + + refresh: function () { + // update options if data attributes have been changed + var config = $.extend({}, this.options, this.$element.data()); + this.options = config; + + this.checkDisabled(); + this.setStyle(); + this.render(); + this.createLi(); + this.setWidth(); + + this.setSize(true); + + this.$element.trigger('refreshed' + EVENT_KEY); + }, + + hide: function () { + this.$newElement.hide(); + }, + + show: function () { + this.$newElement.show(); + }, + + remove: function () { + this.$newElement.remove(); + this.$element.remove(); + }, + + destroy: function () { + this.$newElement.before(this.$element).remove(); + + if (this.$bsContainer) { + this.$bsContainer.remove(); + } else { + this.$menu.remove(); + } + + this.$element + .off(EVENT_KEY) + .removeData('selectpicker') + .removeClass('bs-select-hidden selectpicker'); + + $(window).off(EVENT_KEY + '.' + this.selectId); + } + }; + + // SELECTPICKER PLUGIN DEFINITION + // ============================== + function Plugin (option) { + // get the args of the outer function.. + var args = arguments; + // The arguments of the function are explicitly re-defined from the argument list, because the shift causes them + // to get lost/corrupted in android 2.3 and IE9 #715 #775 + var _option = option; + + [].shift.apply(args); + + // if the version was not set successfully + if (!version.success) { + // try to retreive it again + try { + version.full = ($.fn.dropdown.Constructor.VERSION || '').split(' ')[0].split('.'); + } catch (err) { + // fall back to use BootstrapVersion if set + if (Selectpicker.BootstrapVersion) { + version.full = Selectpicker.BootstrapVersion.split(' ')[0].split('.'); + } else { + version.full = [version.major, '0', '0']; + + console.warn( + 'There was an issue retrieving Bootstrap\'s version. ' + + 'Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. ' + + 'If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.', + err + ); + } + } + + version.major = version.full[0]; + version.success = true; + } + + if (version.major === '4') { + // some defaults need to be changed if using Bootstrap 4 + // check to see if they have already been manually changed before forcing them to update + var toUpdate = []; + + if (Selectpicker.DEFAULTS.style === classNames.BUTTONCLASS) toUpdate.push({ name: 'style', className: 'BUTTONCLASS' }); + if (Selectpicker.DEFAULTS.iconBase === classNames.ICONBASE) toUpdate.push({ name: 'iconBase', className: 'ICONBASE' }); + if (Selectpicker.DEFAULTS.tickIcon === classNames.TICKICON) toUpdate.push({ name: 'tickIcon', className: 'TICKICON' }); + + classNames.DIVIDER = 'dropdown-divider'; + classNames.SHOW = 'show'; + classNames.BUTTONCLASS = 'btn-light'; + classNames.POPOVERHEADER = 'popover-header'; + classNames.ICONBASE = ''; + classNames.TICKICON = 'bs-ok-default'; + + for (var i = 0; i < toUpdate.length; i++) { + var option = toUpdate[i]; + Selectpicker.DEFAULTS[option.name] = classNames[option.className]; + } + } + + var value; + var chain = this.each(function () { + var $this = $(this); + if ($this.is('select')) { + var data = $this.data('selectpicker'), + options = typeof _option == 'object' && _option; + + if (!data) { + var dataAttributes = $this.data(); + + for (var dataAttr in dataAttributes) { + if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) { + delete dataAttributes[dataAttr]; + } + } + + var config = $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, dataAttributes, options); + config.template = $.extend({}, Selectpicker.DEFAULTS.template, ($.fn.selectpicker.defaults ? $.fn.selectpicker.defaults.template : {}), dataAttributes.template, options.template); + $this.data('selectpicker', (data = new Selectpicker(this, config))); + } else if (options) { + for (var i in options) { + if (options.hasOwnProperty(i)) { + data.options[i] = options[i]; + } + } + } + + if (typeof _option == 'string') { + if (data[_option] instanceof Function) { + value = data[_option].apply(data, args); + } else { + value = data.options[_option]; + } + } + } + }); + + if (typeof value !== 'undefined') { + // noinspection JSUnusedAssignment + return value; + } else { + return chain; + } + } + + var old = $.fn.selectpicker; + $.fn.selectpicker = Plugin; + $.fn.selectpicker.Constructor = Selectpicker; + + // SELECTPICKER NO CONFLICT + // ======================== + $.fn.selectpicker.noConflict = function () { + $.fn.selectpicker = old; + return this; + }; + + $(document) + .off('keydown.bs.dropdown.data-api') + .on('keydown' + EVENT_KEY, '.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input', Selectpicker.prototype.keydown) + .on('focusin.modal', '.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input', function (e) { + e.stopPropagation(); + }); + + // SELECTPICKER DATA-API + // ===================== + $(window).on('load' + EVENT_KEY + '.data-api', function () { + $('.selectpicker').each(function () { + var $selectpicker = $(this); + Plugin.call($selectpicker, $selectpicker.data()); + }) + }); +})(jQuery); + + +})); +//# sourceMappingURL=bootstrap-select.js.map \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.css b/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.css new file mode 100644 index 0000000..dafcce3 --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select) + * + * Copyright 2012-2019 SnapAppointments, LLC + * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) + */.bootstrap-select>select.bs-select-hidden,select.bs-select-hidden,select.selectpicker{display:none!important}.bootstrap-select{width:220px\0;vertical-align:middle}.bootstrap-select>.dropdown-toggle{position:relative;width:100%;text-align:right;white-space:nowrap;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.bootstrap-select>.dropdown-toggle:after{margin-top:-1px}.bootstrap-select>.dropdown-toggle.bs-placeholder,.bootstrap-select>.dropdown-toggle.bs-placeholder:active,.bootstrap-select>.dropdown-toggle.bs-placeholder:focus,.bootstrap-select>.dropdown-toggle.bs-placeholder:hover{color:#999}.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-danger,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-danger:active,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-danger:focus,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-danger:hover,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-dark,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-dark:active,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-dark:focus,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-dark:hover,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-info,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-info:active,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-info:focus,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-info:hover,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-primary,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-primary:active,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-primary:focus,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-primary:hover,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-secondary,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-secondary:active,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-secondary:focus,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-secondary:hover,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-success,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-success:active,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-success:focus,.bootstrap-select>.dropdown-toggle.bs-placeholder.btn-success:hover{color:rgba(255,255,255,.5)}.bootstrap-select>select{position:absolute!important;bottom:0;left:50%;display:block!important;width:.5px!important;height:100%!important;padding:0!important;opacity:0!important;border:none;z-index:0!important}.bootstrap-select>select.mobile-device{top:0;left:0;display:block!important;width:100%!important;z-index:2!important}.bootstrap-select.is-invalid .dropdown-toggle,.error .bootstrap-select .dropdown-toggle,.has-error .bootstrap-select .dropdown-toggle,.was-validated .bootstrap-select .selectpicker:invalid+.dropdown-toggle{border-color:#b94a48}.bootstrap-select.is-valid .dropdown-toggle,.was-validated .bootstrap-select .selectpicker:valid+.dropdown-toggle{border-color:#28a745}.bootstrap-select.fit-width{width:auto!important}.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn){width:220px}.bootstrap-select .dropdown-toggle:focus,.bootstrap-select>select.mobile-device:focus+.dropdown-toggle{outline:thin dotted #333!important;outline:5px auto -webkit-focus-ring-color!important;outline-offset:-2px}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:none;height:auto}:not(.input-group)>.bootstrap-select.form-control:not([class*=col-]){width:100%}.bootstrap-select.form-control.input-group-btn{float:none;z-index:auto}.form-inline .bootstrap-select,.form-inline .bootstrap-select.form-control:not([class*=col-]){width:auto}.bootstrap-select:not(.input-group-btn),.bootstrap-select[class*=col-]{float:none;display:inline-block;margin-left:0}.bootstrap-select.dropdown-menu-right,.bootstrap-select[class*=col-].dropdown-menu-right,.row .bootstrap-select[class*=col-].dropdown-menu-right{float:right}.form-group .bootstrap-select,.form-horizontal .bootstrap-select,.form-inline .bootstrap-select{margin-bottom:0}.form-group-lg .bootstrap-select.form-control,.form-group-sm .bootstrap-select.form-control{padding:0}.form-group-lg .bootstrap-select.form-control .dropdown-toggle,.form-group-sm .bootstrap-select.form-control .dropdown-toggle{height:100%;font-size:inherit;line-height:inherit;border-radius:inherit}.bootstrap-select.form-control-lg .dropdown-toggle,.bootstrap-select.form-control-sm .dropdown-toggle{font-size:inherit;line-height:inherit;border-radius:inherit}.bootstrap-select.form-control-sm .dropdown-toggle{padding:.25rem .5rem}.bootstrap-select.form-control-lg .dropdown-toggle{padding:.5rem 1rem}.form-inline .bootstrap-select .form-control{width:100%}.bootstrap-select.disabled,.bootstrap-select>.disabled{cursor:not-allowed}.bootstrap-select.disabled:focus,.bootstrap-select>.disabled:focus{outline:0!important}.bootstrap-select.bs-container{position:absolute;top:0;left:0;height:0!important;padding:0!important}.bootstrap-select.bs-container .dropdown-menu{z-index:1060}.bootstrap-select .dropdown-toggle .filter-option{position:static;top:0;left:0;float:left;height:100%;width:100%;text-align:left;overflow:hidden;-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.bs3.bootstrap-select .dropdown-toggle .filter-option{padding-right:inherit}.input-group .bs3-has-addon.bootstrap-select .dropdown-toggle .filter-option{position:absolute;padding-top:inherit;padding-bottom:inherit;padding-left:inherit;float:none}.input-group .bs3-has-addon.bootstrap-select .dropdown-toggle .filter-option .filter-option-inner{padding-right:inherit}.bootstrap-select .dropdown-toggle .filter-option-inner-inner{overflow:hidden}.bootstrap-select .dropdown-toggle .filter-expand{width:0!important;float:left;opacity:0!important;overflow:hidden}.bootstrap-select .dropdown-toggle .caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.input-group .bootstrap-select.form-control .dropdown-toggle{border-radius:inherit}.bootstrap-select[class*=col-] .dropdown-toggle{width:100%}.bootstrap-select .dropdown-menu{min-width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select .dropdown-menu>.inner:focus{outline:0!important}.bootstrap-select .dropdown-menu.inner{position:static;float:none;border:0;padding:0;margin:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none}.bootstrap-select .dropdown-menu li{position:relative}.bootstrap-select .dropdown-menu li.active small{color:rgba(255,255,255,.5)!important}.bootstrap-select .dropdown-menu li.disabled a{cursor:not-allowed}.bootstrap-select .dropdown-menu li a{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bootstrap-select .dropdown-menu li a.opt{position:relative;padding-left:2.25em}.bootstrap-select .dropdown-menu li a span.check-mark{display:none}.bootstrap-select .dropdown-menu li a span.text{display:inline-block}.bootstrap-select .dropdown-menu li small{padding-left:.5em}.bootstrap-select .dropdown-menu .notify{position:absolute;bottom:5px;width:96%;margin:0 2%;min-height:26px;padding:3px 5px;background:#f5f5f5;border:1px solid #e3e3e3;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);pointer-events:none;opacity:.9;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select .no-results{padding:3px;background:#f5f5f5;margin:0 5px;white-space:nowrap}.bootstrap-select.fit-width .dropdown-toggle .filter-option{position:static;display:inline;padding:0}.bootstrap-select.fit-width .dropdown-toggle .filter-option-inner,.bootstrap-select.fit-width .dropdown-toggle .filter-option-inner-inner{display:inline}.bootstrap-select.fit-width .dropdown-toggle .bs-caret:before{content:'\00a0'}.bootstrap-select.fit-width .dropdown-toggle .caret{position:static;top:auto;margin-top:-1px}.bootstrap-select.show-tick .dropdown-menu .selected span.check-mark{position:absolute;display:inline-block;right:15px;top:5px}.bootstrap-select.show-tick .dropdown-menu li a span.text{margin-right:34px}.bootstrap-select .bs-ok-default:after{content:'';display:block;width:.5em;height:1em;border-style:solid;border-width:0 .26em .26em 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle,.bootstrap-select.show-menu-arrow.show>.dropdown-toggle{z-index:1061}.bootstrap-select.show-menu-arrow .dropdown-toggle .filter-option:before{content:'';border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(204,204,204,.2);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow .dropdown-toggle .filter-option:after{content:'';border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle .filter-option:before{bottom:auto;top:-4px;border-top:7px solid rgba(204,204,204,.2);border-bottom:0}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle .filter-option:after{bottom:auto;top:-4px;border-top:6px solid #fff;border-bottom:0}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle .filter-option:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle .filter-option:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle .filter-option:after,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle .filter-option:before,.bootstrap-select.show-menu-arrow.show>.dropdown-toggle .filter-option:after,.bootstrap-select.show-menu-arrow.show>.dropdown-toggle .filter-option:before{display:block}.bs-actionsbox,.bs-donebutton,.bs-searchbox{padding:4px 8px}.bs-actionsbox{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-actionsbox .btn-group button{width:50%}.bs-donebutton{float:left;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-donebutton .btn-group button{width:100%}.bs-searchbox+.bs-actionsbox{padding:0 8px 4px}.bs-searchbox .form-control{margin-bottom:0;width:100%;float:none} \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.js b/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.js new file mode 100644 index 0000000..f9cb063 --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-select/bootstrap-select.min.js @@ -0,0 +1,9 @@ +/*! + * Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select) + * + * Copyright 2012-2019 SnapAppointments, LLC + * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) + */ + +!function(e,t){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jQuery)}(this,function(e){!function(z){"use strict";var d=["sanitize","whiteList","sanitizeFn"],r=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e={"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},l=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,a=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function v(e,t){var i=e.nodeName.toLowerCase();if(-1!==z.inArray(i,t))return-1===z.inArray(i,r)||Boolean(e.nodeValue.match(l)||e.nodeValue.match(a));for(var s=z(t).filter(function(e,t){return t instanceof RegExp}),n=0,o=s.length;n]+>/g,"")),s&&(a=w(a)),a=a.toUpperCase(),o="contains"===i?0<=a.indexOf(t):a.startsWith(t)))break}return o}function A(e){return parseInt(e,10)||0}z.fn.triggerNative=function(e){var t,i=this[0];i.dispatchEvent?(u?t=new Event(e,{bubbles:!0}):(t=document.createEvent("Event")).initEvent(e,!0,!1),i.dispatchEvent(t)):i.fireEvent?((t=document.createEventObject()).eventType=e,i.fireEvent("on"+e,t)):this.trigger(e)};var f={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},m=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,g=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");function b(e){return f[e]}function w(e){return(e=e.toString())&&e.replace(m,b).replace(g,"")}var I,x,$,y,S,E=(I={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},x=function(e){return I[e]},$="(?:"+Object.keys(I).join("|")+")",y=RegExp($),S=RegExp($,"g"),function(e){return e=null==e?"":""+e,y.test(e)?e.replace(S,x):e}),C={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},L=27,N=13,D=32,H=9,B=38,W=40,M={success:!1,major:"3"};try{M.full=(z.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split("."),M.major=M.full[0],M.success=!0}catch(e){}var R=0,U=".bs.select",j={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},V={MENU:"."+j.MENU},F={span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode("\xa0"),fragment:document.createDocumentFragment()};F.a.setAttribute("role","option"),F.subtext.className="text-muted",F.text=F.span.cloneNode(!1),F.text.className="text",F.checkMark=F.span.cloneNode(!1);var _=new RegExp(B+"|"+W),G=new RegExp("^"+H+"$|"+L),q=function(e,t,i){var s=F.li.cloneNode(!1);return e&&(1===e.nodeType||11===e.nodeType?s.appendChild(e):s.innerHTML=e),void 0!==t&&""!==t&&(s.className=t),null!=i&&s.classList.add("optgroup-"+i),s},K=function(e,t,i){var s=F.a.cloneNode(!0);return e&&(11===e.nodeType?s.appendChild(e):s.insertAdjacentHTML("beforeend",e)),void 0!==t&&""!==t&&(s.className=t),"4"===M.major&&s.classList.add("dropdown-item"),i&&s.setAttribute("style",i),s},Y=function(e,t){var i,s,n=F.text.cloneNode(!1);if(e.content)n.innerHTML=e.content;else{if(n.textContent=e.text,e.icon){var o=F.whitespace.cloneNode(!1);(s=(!0===t?F.i:F.span).cloneNode(!1)).className=e.iconBase+" "+e.icon,F.fragment.appendChild(s),F.fragment.appendChild(o)}e.subtext&&((i=F.subtext.cloneNode(!1)).textContent=e.subtext,n.appendChild(i))}if(!0===t)for(;0'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:e},J.prototype={constructor:J,init:function(){var i=this,e=this.$element.attr("id");R++,this.selectId="bs-select-"+R,this.$element[0].classList.add("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$element[0].classList.contains("show-tick")&&(this.options.showTick=!0),this.$newElement=this.createDropdown(),this.$element.after(this.$newElement).prependTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(V.MENU),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element[0].classList.remove("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(j.MENURIGHT),void 0!==e&&this.$button.attr("data-id",e),this.checkDisabled(),this.clickListener(),this.options.liveSearch?(this.liveSearchListener(),this.focusedParent=this.$searchbox[0]):this.focusedParent=this.$menuInner[0],this.setStyle(),this.render(),this.setWidth(),this.options.container?this.selectPosition():this.$element.on("hide"+U,function(){if(i.isVirtual()){var e=i.$menuInner[0],t=e.firstChild.cloneNode(!1);e.replaceChild(t,e.firstChild),e.scrollTop=0}}),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(e){i.$element.trigger("hide"+U,e)},"hidden.bs.dropdown":function(e){i.$element.trigger("hidden"+U,e)},"show.bs.dropdown":function(e){i.$element.trigger("show"+U,e)},"shown.bs.dropdown":function(e){i.$element.trigger("shown"+U,e)}}),i.$element[0].hasAttribute("required")&&this.$element.on("invalid"+U,function(){i.$button[0].classList.add("bs-invalid"),i.$element.on("shown"+U+".invalid",function(){i.$element.val(i.$element.val()).off("shown"+U+".invalid")}).on("rendered"+U,function(){this.validity.valid&&i.$button[0].classList.remove("bs-invalid"),i.$element.off("rendered"+U)}),i.$button.on("blur"+U,function(){i.$element.trigger("focus").trigger("blur"),i.$button.off("blur"+U)})}),setTimeout(function(){i.createLi(),i.$element.trigger("loaded"+U)})},createDropdown:function(){var e=this.multiple||this.options.showTick?" show-tick":"",t=this.multiple?' aria-multiselectable="true"':"",i="",s=this.autofocus?" autofocus":"";M.major<4&&this.$element.parent().hasClass("input-group")&&(i=" input-group-btn");var n,o="",r="",l="",a="";return this.options.header&&(o='
    '+this.options.header+"
    "),this.options.liveSearch&&(r=''),this.multiple&&this.options.actionsBox&&(l='
    "),this.multiple&&this.options.doneButton&&(a='
    "),n='",z(n)},setPositionData:function(){this.selectpicker.view.canHighlight=[];for(var e=this.selectpicker.view.size=0;e=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(A,e,t){var L,N,D=this,i=0,H=[];if(this.selectpicker.current=A?this.selectpicker.search:this.selectpicker.main,this.setPositionData(),e)if(t)i=this.$menuInner[0].scrollTop;else if(!D.multiple){var s=D.$element[0],n=(s.options[s.selectedIndex]||{}).liIndex;if("number"==typeof n&&!1!==D.options.size){var o=D.selectpicker.main.data[n],r=o&&o.position;r&&(i=r-(D.sizeInfo.menuInnerHeight+D.sizeInfo.liHeight)/2)}}function l(e,t){var i,s,n,o,r,l,a,c,d,h,p=D.selectpicker.current.elements.length,u=[],f=!0,m=D.isVirtual();D.selectpicker.view.scrollTop=e,!0===m&&D.sizeInfo.hasScrollBar&&D.$menu[0].offsetWidth>D.sizeInfo.totalMenuWidth&&(D.sizeInfo.menuWidth=D.$menu[0].offsetWidth,D.sizeInfo.totalMenuWidth=D.sizeInfo.menuWidth+D.sizeInfo.scrollBarWidth,D.$menu.css("min-width",D.sizeInfo.menuWidth)),i=Math.ceil(D.sizeInfo.menuInnerHeight/D.sizeInfo.liHeight*1.5),s=Math.round(p/i)||1;for(var v=0;vp-1?0:D.selectpicker.current.data[p-1].position-D.selectpicker.current.data[D.selectpicker.view.position1-1].position,I.firstChild.style.marginTop=b+"px",w+"px"):I.firstChild.style.marginTop=0,I.firstChild.appendChild(x)}if(D.prevActiveIndex=D.activeIndex,D.options.liveSearch){if(A&&t){var z,T=0;D.selectpicker.view.canHighlight[T]||(T=1+D.selectpicker.view.canHighlight.slice(1).indexOf(!0)),z=D.selectpicker.view.visibleElements[T],D.defocusItem(D.selectpicker.view.currentActive),D.activeIndex=(D.selectpicker.current.data[T]||{}).index,D.focusItem(z)}}else D.$menuInner.trigger("focus")}l(i,!0),this.$menuInner.off("scroll.createView").on("scroll.createView",function(e,t){D.noScroll||l(this.scrollTop,t),D.noScroll=!1}),z(window).off("resize"+U+"."+this.selectId+".createView").on("resize"+U+"."+this.selectId+".createView",function(){D.$newElement.hasClass(j.SHOW)&&l(D.$menuInner[0].scrollTop)})},focusItem:function(e,t,i){if(e){t=t||this.selectpicker.main.data[this.activeIndex];var s=e.firstChild;s&&(s.setAttribute("aria-setsize",this.selectpicker.view.size),s.setAttribute("aria-posinset",t.posinset),!0!==i&&(this.focusedParent.setAttribute("aria-activedescendant",s.id),e.classList.add("active"),s.classList.add("active")))}},defocusItem:function(e){e&&(e.classList.remove("active"),e.firstChild&&e.firstChild.classList.remove("active"))},setPlaceholder:function(){var e=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option")),e=!0;var t=this.$element[0],i=!1,s=!this.selectpicker.view.titleOption.parentNode;if(s)this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",i=void 0===z(t.options[t.selectedIndex]).attr("selected")&&void 0===this.$element.data("selected");(s||0!==this.selectpicker.view.titleOption.index)&&t.insertBefore(this.selectpicker.view.titleOption,t.firstChild),i&&(t.selectedIndex=0)}return e},createLi:function(){var c=this,f=this.options.iconBase,m=':not([hidden]):not([data-hidden="true"])',v=[],g=[],d=0,b=0,e=this.setPlaceholder()?1:0;this.options.hideDisabled&&(m+=":not(:disabled)"),!c.options.showTick&&!c.multiple||F.checkMark.parentNode||(F.checkMark.className=f+" "+c.options.tickIcon+" check-mark",F.a.appendChild(F.checkMark));var t=this.$element[0].querySelectorAll("select > *"+m);function w(e){var t=g[g.length-1];t&&"divider"===t.type&&(t.optID||e.optID)||((e=e||{}).type="divider",v.push(q(!1,j.DIVIDER,e.optID?e.optID+"div":void 0)),g.push(e))}function I(e,t){if((t=t||{}).divider="true"===e.getAttribute("data-divider"),t.divider)w({optID:t.optID});else{var i=g.length,s=e.style.cssText,n=s?E(s):"",o=(e.className||"")+(t.optgroupClass||"");t.optID&&(o="opt "+o),t.text=e.textContent,t.content=e.getAttribute("data-content"),t.tokens=e.getAttribute("data-tokens"),t.subtext=e.getAttribute("data-subtext"),t.icon=e.getAttribute("data-icon"),t.iconBase=f;var r=Y(t),l=q(K(r,o,n),"",t.optID);l.firstChild&&(l.firstChild.id=c.selectId+"-"+i),v.push(l),e.liIndex=i,t.display=t.content||t.text,t.type="option",t.index=i,t.option=e,t.disabled=t.disabled||e.disabled,g.push(t);var a=0;t.display&&(a+=t.display.length),t.subtext&&(a+=t.subtext.length),t.icon&&(a+=1),d li")},render:function(){this.setPlaceholder();var e,t,i=this,s=this.$element[0],n=function(e,t){var i,s=e.selectedOptions,n=[];if(t){for(var o=0,r=s.length;o")).length&&o>t[1]||1===t.length&&2<=o),!1===e){for(var h=0;h option"+m+", optgroup"+m+" option"+m).length,g="function"==typeof this.options.countSelectedText?this.options.countSelectedText(o,v):this.options.countSelectedText;c=Y({text:g.replace("{0}",o.toString()).replace("{1}",v.toString())},!0)}if(null==this.options.title&&(this.options.title=this.$element.attr("title")),c.childNodes.length||(c=Y({text:void 0!==this.options.title?this.options.title:this.options.noneSelectedText},!0)),r.title=c.textContent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&d&&P([c],i.options.whiteList,i.options.sanitizeFn),l.innerHTML="",l.appendChild(c),M.major<4&&this.$newElement[0].classList.contains("bs3-has-addon")){var b=r.querySelector(".filter-expand"),w=l.cloneNode(!0);w.className="filter-expand",b?r.replaceChild(w,b):r.appendChild(w)}this.$element.trigger("rendered"+U)},setStyle:function(e,t){var i,s=this.$button[0],n=this.$newElement[0],o=this.options.style.trim();this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,"")),M.major<4&&(n.classList.add("bs3"),n.parentNode.classList.contains("input-group")&&(n.previousElementSibling||n.nextElementSibling)&&(n.previousElementSibling||n.nextElementSibling).classList.contains("input-group-addon")&&n.classList.add("bs3-has-addon")),i=e?e.trim():o,"add"==t?i&&s.classList.add.apply(s.classList,i.split(" ")):"remove"==t?i&&s.classList.remove.apply(s.classList,i.split(" ")):(o&&s.classList.remove.apply(s.classList,o.split(" ")),i&&s.classList.add.apply(s.classList,i.split(" ")))},liHeight:function(e){if(e||!1!==this.options.size&&!this.sizeInfo){this.sizeInfo||(this.sizeInfo={});var t=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("ul"),o=document.createElement("li"),r=document.createElement("li"),l=document.createElement("li"),a=document.createElement("a"),c=document.createElement("span"),d=this.options.header&&0this.sizeInfo.menuExtras.vert&&l+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot)),"auto"===this.options.size)n=3this.options.size){for(var g=0;gthis.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRightthis.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth,this.$menu.css("min-width",this.sizeInfo.totalMenuWidth)),this.dropdown&&this.dropdown._popper&&this.dropdown._popper.update()},setSize:function(e){if(this.liHeight(e),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var t=this,i=z(window);this.setMenuSize(),this.options.liveSearch&&this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return t.setMenuSize()}),"auto"===this.options.size?i.off("resize"+U+"."+this.selectId+".setMenuSize scroll"+U+"."+this.selectId+".setMenuSize").on("resize"+U+"."+this.selectId+".setMenuSize scroll"+U+"."+this.selectId+".setMenuSize",function(){return t.setMenuSize()}):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&i.off("resize"+U+"."+this.selectId+".setMenuSize scroll"+U+"."+this.selectId+".setMenuSize"),t.createView(!1,!0,e)}},setWidth:function(){var i=this;"auto"===this.options.width?requestAnimationFrame(function(){i.$menu.css("min-width","0"),i.$element.on("loaded"+U,function(){i.liHeight(),i.setMenuSize();var e=i.$newElement.clone().appendTo("body"),t=e.css("width","auto").children("button").outerWidth();e.remove(),i.sizeInfo.selectWidth=Math.max(i.sizeInfo.totalMenuWidth,t),i.$newElement.css("width",i.sizeInfo.selectWidth+"px")})}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width","")),this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement[0].classList.remove("fit-width")},selectPosition:function(){this.$bsContainer=z('
    ');var s,n,o,r=this,l=z(this.options.container),e=function(e){var t={},i=r.options.display||!!z.fn.dropdown.Constructor.Default&&z.fn.dropdown.Constructor.Default.display;r.$bsContainer.addClass(e.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(j.DROPUP,e.hasClass(j.DROPUP)),s=e.offset(),l.is("body")?n={top:0,left:0}:((n=l.offset()).top+=parseInt(l.css("borderTopWidth"))-l.scrollTop(),n.left+=parseInt(l.css("borderLeftWidth"))-l.scrollLeft()),o=e.hasClass(j.DROPUP)?0:e[0].offsetHeight,(M.major<4||"static"===i)&&(t.top=s.top-n.top+o,t.left=s.left-n.left),t.width=e[0].offsetWidth,r.$bsContainer.css(t)};this.$button.on("click.bs.dropdown.data-api",function(){r.isDisabled()||(e(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass(j.SHOW,!r.$button.hasClass(j.SHOW)).append(r.$menu))}),z(window).off("resize"+U+"."+this.selectId+" scroll"+U+"."+this.selectId).on("resize"+U+"."+this.selectId+" scroll"+U+"."+this.selectId,function(){r.$newElement.hasClass(j.SHOW)&&e(r.$newElement)}),this.$element.on("hide"+U,function(){r.$menu.data("height",r.$menu.height()),r.$bsContainer.detach()})},setOptionStatus:function(e){var t=this;if(t.noScroll=!1,t.selectpicker.view.visibleElements&&t.selectpicker.view.visibleElements.length)for(var i=0;i
    ');$[2]&&(y=y.replace("{var}",$[2][1"+y+"
    ")),d=!1,C.$element.trigger("maxReached"+U)),b&&I&&(E.append(z("
    "+S+"
    ")),d=!1,C.$element.trigger("maxReachedGrp"+U)),setTimeout(function(){C.setSelected(r,!1)},10),E.delay(750).fadeOut(300,function(){z(this).remove()})}}}else c.selected=!1,p.selected=!0,C.setSelected(r,!0);!C.multiple||C.multiple&&1===C.options.maxOptions?C.$button.trigger("focus"):C.options.liveSearch&&C.$searchbox.trigger("focus"),d&&(C.multiple||a!==s.selectedIndex)&&(T=[p.index,u.prop("selected"),l],C.$element.triggerNative("change"))}}),this.$menu.on("click","li."+j.DISABLED+" a, ."+j.POPOVERHEADER+", ."+j.POPOVERHEADER+" :not(.close)",function(e){e.currentTarget==this&&(e.preventDefault(),e.stopPropagation(),C.options.liveSearch&&!z(e.target).hasClass("close")?C.$searchbox.trigger("focus"):C.$button.trigger("focus"))}),this.$menuInner.on("click",".divider, .dropdown-header",function(e){e.preventDefault(),e.stopPropagation(),C.options.liveSearch?C.$searchbox.trigger("focus"):C.$button.trigger("focus")}),this.$menu.on("click","."+j.POPOVERHEADER+" .close",function(){C.$button.trigger("click")}),this.$searchbox.on("click",function(e){e.stopPropagation()}),this.$menu.on("click",".actions-btn",function(e){C.options.liveSearch?C.$searchbox.trigger("focus"):C.$button.trigger("focus"),e.preventDefault(),e.stopPropagation(),z(this).hasClass("bs-select-all")?C.selectAll():C.deselectAll()}),this.$element.on("change"+U,function(){C.render(),C.$element.trigger("changed"+U,T),T=null}).on("focus"+U,function(){C.options.mobile||C.$button.trigger("focus")})},liveSearchListener:function(){var u=this,f=document.createElement("li");this.$button.on("click.bs.dropdown.data-api",function(){u.$searchbox.val()&&u.$searchbox.val("")}),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(e){e.stopPropagation()}),this.$searchbox.on("input propertychange",function(){var e=u.$searchbox.val();if(u.selectpicker.search.elements=[],u.selectpicker.search.data=[],e){var t=[],i=e.toUpperCase(),s={},n=[],o=u._searchStyle(),r=u.options.liveSearchNormalize;r&&(i=w(i)),u._$lisSelected=u.$menuInner.find(".selected");for(var l=0;l=a.selectpicker.view.canHighlight.length&&(t=0),a.selectpicker.view.canHighlight[t+f]||(t=t+1+a.selectpicker.view.canHighlight.slice(t+f+1).indexOf(!0))),e.preventDefault();var m=f+t;e.which===B?0===f&&t===c.length-1?(a.$menuInner[0].scrollTop=a.$menuInner[0].scrollHeight,m=a.selectpicker.current.elements.length-1):d=(o=(n=a.selectpicker.current.data[m]).position-n.height)u+a.sizeInfo.menuInnerHeight),s=a.selectpicker.main.elements[v],a.activeIndex=b[x],a.focusItem(s),s&&s.firstChild.focus(),d&&(a.$menuInner[0].scrollTop=o),r.trigger("focus")}}i&&(e.which===D&&!a.selectpicker.keydown.keyHistory||e.which===N||e.which===H&&a.options.selectOnTab)&&(e.which!==D&&e.preventDefault(),a.options.liveSearch&&e.which===D||(a.$menuInner.find(".active a").trigger("click",!0),r.trigger("focus"),a.options.liveSearch||(e.preventDefault(),z(document).data("spaceSelect",!0))))}},mobile:function(){this.$element[0].classList.add("mobile-device")},refresh:function(){var e=z.extend({},this.options,this.$element.data());this.options=e,this.checkDisabled(),this.setStyle(),this.render(),this.createLi(),this.setWidth(),this.setSize(!0),this.$element.trigger("refreshed"+U)},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(U).removeData("selectpicker").removeClass("bs-select-hidden selectpicker"),z(window).off(U+"."+this.selectId)}};var X=z.fn.selectpicker;z.fn.selectpicker=Q,z.fn.selectpicker.Constructor=J,z.fn.selectpicker.noConflict=function(){return z.fn.selectpicker=X,this},z(document).off("keydown.bs.dropdown.data-api").on("keydown"+U,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',J.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(e){e.stopPropagation()}),z(window).on("load"+U+".data-api",function(){z(".selectpicker").each(function(){var e=z(this);Q.call(e,e.data())})})}(e)}); +//# sourceMappingURL=bootstrap-select.min.js.map \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.css b/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.css new file mode 100644 index 0000000..a03a5b2 --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.css @@ -0,0 +1,6 @@ +/** + * @author zhixin wen + * version: 1.18.2 + * https://github.com/wenzhixin/bootstrap-table/ + */ +.bootstrap-table .fixed-table-toolbar::after{content:"";display:block;clear:both;}.bootstrap-table .fixed-table-toolbar .bs-bars,.bootstrap-table .fixed-table-toolbar .search,.bootstrap-table .fixed-table-toolbar .columns{position:relative;margin-top:10px;margin-bottom:10px;}.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group{display:inline-block;margin-left:-1px !important;}.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group > .btn{border-radius:0;}.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:first-child > .btn{border-top-left-radius:4px;border-bottom-left-radius:4px;}.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:last-child > .btn{border-top-right-radius:4px;border-bottom-right-radius:4px;}.bootstrap-table .fixed-table-toolbar .columns .dropdown-menu{text-align:left;max-height:300px;overflow:auto;-ms-overflow-style:scrollbar;z-index:1001;}.bootstrap-table .fixed-table-toolbar .columns label{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.428571429;}.bootstrap-table .fixed-table-toolbar .columns-left{margin-right:5px;}.bootstrap-table .fixed-table-toolbar .columns-right{margin-left:5px;}.bootstrap-table .fixed-table-toolbar .pull-right .dropdown-menu{right:0;left:auto;}.bootstrap-table .fixed-table-container{position:relative;clear:both;}.bootstrap-table .fixed-table-container .table{width:100%;margin-bottom:0 !important;}.bootstrap-table .fixed-table-container .table th,.bootstrap-table .fixed-table-container .table td{vertical-align:middle;box-sizing:border-box;}.bootstrap-table .fixed-table-container .table thead th{vertical-align:bottom;padding:0;margin:0;}.bootstrap-table .fixed-table-container .table thead th:focus{outline:0 solid transparent;}.bootstrap-table .fixed-table-container .table thead th.detail{width:30px;}.bootstrap-table .fixed-table-container .table thead th .th-inner{padding:0.75rem;vertical-align:bottom;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.bootstrap-table .fixed-table-container .table thead th .sortable{cursor:pointer;background-position:right;background-repeat:no-repeat;padding-right:30px !important;}.bootstrap-table .fixed-table-container .table thead th .both{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC");}.bootstrap-table .fixed-table-container .table thead th .asc{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==");}.bootstrap-table .fixed-table-container .table thead th .desc{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ");}.bootstrap-table .fixed-table-container .table tbody tr.selected td{background-color:rgba(0,0,0,0.075);}.bootstrap-table .fixed-table-container .table tbody tr.no-records-found td{text-align:center;}.bootstrap-table .fixed-table-container .table tbody tr .card-view{display:flex;}.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-title{font-weight:bold;display:inline-block;min-width:30%;text-align:left !important;}.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-value{width:100%;}.bootstrap-table .fixed-table-container .table .bs-checkbox{text-align:center;}.bootstrap-table .fixed-table-container .table .bs-checkbox label{margin-bottom:0;}.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type="radio"],.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type="checkbox"]{margin:0 auto !important;}.bootstrap-table .fixed-table-container .table.table-sm .th-inner{padding:0.3rem;}.bootstrap-table .fixed-table-container.fixed-height:not(.has-footer){border-bottom:1px solid #dee2e6;}.bootstrap-table .fixed-table-container.fixed-height.has-card-view{border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;}.bootstrap-table .fixed-table-container.fixed-height .fixed-table-border{border-left:1px solid #dee2e6;border-right:1px solid #dee2e6;}.bootstrap-table .fixed-table-container.fixed-height .table thead th{border-bottom:1px solid #dee2e6;}.bootstrap-table .fixed-table-container.fixed-height .table-dark thead th{border-bottom:1px solid #32383e;}.bootstrap-table .fixed-table-container .fixed-table-header{overflow:hidden;}.bootstrap-table .fixed-table-container .fixed-table-body{overflow-x:auto;overflow-y:auto;height:100%;}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading{align-items:center;background:#fff;display:flex;justify-content:center;position:absolute;bottom:0;width:100%;z-index:1000;transition:visibility 0s,opacity 0.15s ease-in-out;opacity:0;visibility:hidden;}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.open{visibility:visible;opacity:1;}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap{align-items:baseline;display:flex;justify-content:center;}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .loading-text{margin-right:6px;}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap{align-items:center;display:flex;justify-content:center;}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::before{content:"";animation-duration:1.5s;animation-iteration-count:infinite;animation-name:LOADING;background:#212529;border-radius:50%;display:block;height:5px;margin:0 4px;opacity:0;width:5px;}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot{animation-delay:0.3s;}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after{animation-delay:0.6s;}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark{background:#212529;}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-dot,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::after,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::before{background:#fff;}.bootstrap-table .fixed-table-container .fixed-table-footer{overflow:hidden;}.bootstrap-table .fixed-table-pagination::after{content:"";display:block;clear:both;}.bootstrap-table .fixed-table-pagination > .pagination-detail,.bootstrap-table .fixed-table-pagination > .pagination{margin-top:10px;margin-bottom:10px;}.bootstrap-table .fixed-table-pagination > .pagination-detail .pagination-info{line-height:34px;margin-right:5px;}.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list{display:inline-block;}.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group{position:relative;display:inline-block;vertical-align:middle;}.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group .dropdown-menu{margin-bottom:0;}.bootstrap-table .fixed-table-pagination > .pagination ul.pagination{margin:0;}.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a{color:#c8c8c8;}.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a::before{content:'\2B05';}.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a::after{content:'\27A1';}.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.disabled a{pointer-events:none;cursor:default;}.bootstrap-table.fullscreen{position:fixed;top:0;left:0;z-index:1050;width:100% !important;background:#fff;height:calc(100vh);overflow-y:scroll;}.bootstrap-table.bootstrap4 .pagination-lg .page-link,.bootstrap-table.bootstrap5 .pagination-lg .page-link{padding:.5rem 1rem;}.bootstrap-table.bootstrap5 .float-left{float:left;}.bootstrap-table.bootstrap5 .float-right{float:right;}div.fixed-table-scroll-inner{width:100%;height:200px;}div.fixed-table-scroll-outer{top:0;left:0;visibility:hidden;width:200px;height:150px;overflow:hidden;}@keyframes LOADING{0%{opacity:0;}50%{opacity:1;}to{opacity:0;}} \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js b/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js new file mode 100644 index 0000000..3aff646 --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js @@ -0,0 +1,8 @@ +/** + * @author zhixin wen + * version: 1.18.2 + * https://github.com/wenzhixin/bootstrap-table/ + */ +function getRememberRowIds(t,e){return $.isArray(t)?props=$.map(t,function(t){return t[e]}):props=[t[e]],props}function addRememberRow(t,e){var i=null==table.options.uniqueId?table.options.columns[1].field:table.options.uniqueId,n=getRememberRowIds(t,i);-1==$.inArray(e[i],n)&&(t[t.length]=e)}function removeRememberRow(t,e){var i=null==table.options.uniqueId?table.options.columns[1].field:table.options.uniqueId,n=getRememberRowIds(t,i),o=$.inArray(e[i],n);-1!=o&&t.splice(o,1)}!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,t.BootstrapTable=e(t.jQuery))}(this,function(t){function e(t){return t&&"object"==typeof t&&"default" in t?t:{"default":t}}function i(t,e){return e={exports:{}},t(e,e.exports),e.exports}function n(t,e){return RegExp(t,e)}function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}function s(t,e){for(var i=0;it.length)&&(e=t.length);for(var i=0,n=Array(e);e>i;i++){n[i]=t[i]}return n}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(t,e){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=p(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,r=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){r=!0,a=t},f:function(){try{s||null==i["return"]||i["return"]()}finally{if(r){throw a}}}}}var y=e(t),w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},S=function(t){return t&&t.Math==Math&&t},x=S("object"==typeof globalThis&&globalThis)||S("object"==typeof window&&window)||S("object"==typeof self&&self)||S("object"==typeof w&&w)||function(){return this}()||Function("return this")(),k=function(t){try{return !!t()}catch(e){return !0}},O=!k(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),C={}.propertyIsEnumerable,T=Object.getOwnPropertyDescriptor,P=T&&!C.call({1:2},1),A=P?function(t){var e=T(this,t);return !!e&&e.enumerable}:C,I={f:A},$=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},R={}.toString,E=function(t){return R.call(t).slice(8,-1)},j="".split,_=k(function(){return !Object("z").propertyIsEnumerable(0)})?function(t){return"String"==E(t)?j.call(t,""):Object(t)}:Object,N=function(t){if(void 0==t){throw TypeError("Can't call method on "+t)}return t},F=function(t){return _(N(t))},D=function(t){return"object"==typeof t?null!==t:"function"==typeof t},V=function(t,e){if(!D(t)){return t}var i,n;if(e&&"function"==typeof(i=t.toString)&&!D(n=i.call(t))){return n}if("function"==typeof(i=t.valueOf)&&!D(n=i.call(t))){return n}if(!e&&"function"==typeof(i=t.toString)&&!D(n=i.call(t))){return n}throw TypeError("Can't convert object to primitive value")},B={}.hasOwnProperty,L=function(t,e){return B.call(t,e)},H=x.document,M=D(H)&&D(H.createElement),U=function(t){return M?H.createElement(t):{}},z=!O&&!k(function(){return 7!=Object.defineProperty(U("div"),"a",{get:function(){return 7}}).a}),q=Object.getOwnPropertyDescriptor,W=O?q:function(t,e){if(t=F(t),e=V(e,!0),z){try{return q(t,e)}catch(i){}}return L(t,e)?$(!I.f.call(t,e),t[e]):void 0},G={f:W},K=function(t){if(!D(t)){throw TypeError(t+" is not an object")}return t},Y=Object.defineProperty,X=O?Y:function(t,e,i){if(K(t),e=V(e,!0),K(i),z){try{return Y(t,e,i)}catch(n){}}if("get" in i||"set" in i){throw TypeError("Accessors not supported")}return"value" in i&&(t[e]=i.value),t},J={f:X},Q=O?function(t,e,i){return J.f(t,e,$(1,i))}:function(t,e,i){return t[e]=i,t},Z=function(t,e){try{Q(x,t,e)}catch(i){x[t]=e}return e},tt="__core-js_shared__",et=x[tt]||Z(tt,{}),it=et,nt=Function.toString;"function"!=typeof it.inspectSource&&(it.inspectSource=function(t){return nt.call(t)});var ot,at,st,rt=it.inspectSource,lt=x.WeakMap,ct="function"==typeof lt&&/native code/.test(rt(lt)),ht=i(function(t){(t.exports=function(t,e){return it[t]||(it[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.1",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),ut=0,dt=Math.random(),ft=function(t){return"Symbol("+((void 0===t?"":t)+"")+")_"+(++ut+dt).toString(36)},pt=ht("keys"),gt=function(t){return pt[t]||(pt[t]=ft(t))},vt={},bt=x.WeakMap,mt=function(t){return st(t)?at(t):ot(t,{})},yt=function(t){return function(e){var i;if(!D(e)||(i=at(e)).type!==t){throw TypeError("Incompatible receiver, "+t+" required")}return i}};if(ct){var wt=it.state||(it.state=new bt),St=wt.get,xt=wt.has,kt=wt.set;ot=function(t,e){return e.facade=t,kt.call(wt,t,e),e},at=function(t){return St.call(wt,t)||{}},st=function(t){return xt.call(wt,t)}}else{var Ot=gt("state");vt[Ot]=!0,ot=function(t,e){return e.facade=t,Q(t,Ot,e),e},at=function(t){return L(t,Ot)?t[Ot]:{}},st=function(t){return L(t,Ot)}}var Ct,Tt,Pt={set:ot,get:at,has:st,enforce:mt,getterFor:yt},At=i(function(t){var e=Pt.get,i=Pt.enforce,n=(String+"").split("String");(t.exports=function(t,e,o,a){var s,r=a?!!a.unsafe:!1,l=a?!!a.enumerable:!1,c=a?!!a.noTargetGet:!1;return"function"==typeof o&&("string"!=typeof e||L(o,"name")||Q(o,"name",e),s=i(o),s.source||(s.source=n.join("string"==typeof e?e:""))),t===x?void (l?t[e]=o:Z(e,o)):(r?!c&&t[e]&&(l=!0):delete t[e],void (l?t[e]=o:Q(t,e,o)))})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||rt(this)})}),It=x,$t=function(t){return"function"==typeof t?t:void 0},Rt=function(t,e){return arguments.length<2?$t(It[t])||$t(x[t]):It[t]&&It[t][e]||x[t]&&x[t][e]},Et=Math.ceil,jt=Math.floor,_t=function(t){return isNaN(t=+t)?0:(t>0?jt:Et)(t)},Nt=Math.min,Ft=function(t){return t>0?Nt(_t(t),9007199254740991):0},Dt=Math.max,Vt=Math.min,Bt=function(t,e){var i=_t(t);return 0>i?Dt(i+e,0):Vt(i,e)},Lt=function(t){return function(e,i,n){var o,a=F(e),s=Ft(a.length),r=Bt(n,s);if(t&&i!=i){for(;s>r;){if(o=a[r++],o!=o){return !0}}}else{for(;s>r;r++){if((t||r in a)&&a[r]===i){return t||r||0}}}return !t&&-1}},Ht={includes:Lt(!0),indexOf:Lt(!1)},Mt=Ht.indexOf,Ut=function(t,e){var i,n=F(t),o=0,a=[];for(i in n){!L(vt,i)&&L(n,i)&&a.push(i)}for(;e.length>o;){L(n,i=e[o++])&&(~Mt(a,i)||a.push(i))}return a},zt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qt=zt.concat("length","prototype"),Wt=Object.getOwnPropertyNames||function(t){return Ut(t,qt)},Gt={f:Wt},Kt=Object.getOwnPropertySymbols,Yt={f:Kt},Xt=Rt("Reflect","ownKeys")||function(t){var e=Gt.f(K(t)),i=Yt.f;return i?e.concat(i(t)):e},Jt=function(t,e){for(var i=Xt(e),n=J.f,o=G.f,a=0;a=74)&&(Ct=me.match(/Chrome\/(\d+)/),Ct&&(Tt=Ct[1])));var xe=Tt&&+Tt,ke=ge("species"),Oe=function(t){return xe>=51||!k(function(){var e=[],i=e.constructor={};return i[ke]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Ce=ge("isConcatSpreadable"),Te=9007199254740991,Pe="Maximum allowed index exceeded",Ae=xe>=51||!k(function(){var t=[];return t[Ce]=!1,t.concat()[0]!==t}),Ie=Oe("concat"),$e=function(t){if(!D(t)){return !1}var e=t[Ce];return void 0!==e?!!e:re(t)},Re=!Ae||!Ie;se({target:"Array",proto:!0,forced:Re},{concat:function(t){var e,i,n,o,a,s=le(this),r=be(s,0),l=0;for(e=-1,n=arguments.length;n>e;e++){if(a=-1===e?s:arguments[e],$e(a)){if(o=Ft(a.length),l+o>Te){throw TypeError(Pe)}for(i=0;o>i;i++,l++){i in a&&ce(r,l,a[i])}}else{if(l>=Te){throw TypeError(Pe)}ce(r,l++,a)}}return r.length=l,r}});var Ee=function(t){if("function"!=typeof t){throw TypeError(t+" is not a function")}return t},je=function(t,e,i){if(Ee(t),void 0===e){return t}switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,o){return t.call(e,i,n,o)}}return function(){return t.apply(e,arguments)}},_e=[].push,Ne=function(t){var e=1==t,i=2==t,n=3==t,o=4==t,a=6==t,s=7==t,r=5==t||a;return function(l,c,h,u){for(var d,f,p=le(l),g=_(p),v=je(c,h,3),b=Ft(g.length),m=0,y=u||be,w=e?y(l,b):i||s?y(l,0):void 0;b>m;m++){if((r||m in g)&&(d=g[m],f=v(d,m,p),t)){if(e){w[m]=f}else{if(f){switch(t){case 3:return !0;case 5:return d;case 6:return m;case 2:_e.call(w,d)}}else{switch(t){case 4:return !1;case 7:_e.call(w,d)}}}}}return a?-1:n||o?o:w}},Fe={forEach:Ne(0),map:Ne(1),filter:Ne(2),some:Ne(3),every:Ne(4),find:Ne(5),findIndex:Ne(6),filterOut:Ne(7)},De=Object.defineProperty,Ve={},Be=function(t){throw t},Le=function(t,e){if(L(Ve,t)){return Ve[t]}e||(e={});var i=[][t],n=L(e,"ACCESSORS")?e.ACCESSORS:!1,o=L(e,0)?e[0]:Be,a=L(e,1)?e[1]:void 0;return Ve[t]=!!i&&!k(function(){if(n&&!O){return !0}var t={length:-1};n?De(t,1,{enumerable:!0,get:Be}):t[1]=1,i.call(t,o,a)})},He=Fe.filter,Me=Oe("filter"),Ue=Le("filter");se({target:"Array",proto:!0,forced:!Me||!Ue},{filter:function(t){return He(this,t,arguments.length>1?arguments[1]:void 0)}});var ze,qe=Object.keys||function(t){return Ut(t,zt)},We=O?Object.defineProperties:function(t,e){K(t);for(var i,n=qe(e),o=n.length,a=0;o>a;){J.f(t,i=n[a++],e[i])}return t},Ge=Rt("document","documentElement"),Ke=">",Ye="<",Xe="prototype",Je="script",Qe=gt("IE_PROTO"),Ze=function(){},ti=function(t){return Ye+Je+Ke+t+Ye+"/"+Je+Ke},ei=function(t){t.write(ti("")),t.close();var e=t.parentWindow.Object;return t=null,e},ii=function(){var t,e=U("iframe"),i="java"+Je+":";return e.style.display="none",Ge.appendChild(e),e.src=i+"",t=e.contentWindow.document,t.open(),t.write(ti("document.F=Object")),t.close(),t.F},ni=function(){try{ze=document.domain&&new ActiveXObject("htmlfile")}catch(t){}ni=ze?ei(ze):ii();for(var e=zt.length;e--;){delete ni[Xe][zt[e]]}return ni()};vt[Qe]=!0;var oi=Object.create||function(t,e){var i;return null!==t?(Ze[Xe]=K(t),i=new Ze,Ze[Xe]=null,i[Qe]=t):i=ni(),void 0===e?i:We(i,e)},ai=ge("unscopables"),si=Array.prototype;void 0==si[ai]&&J.f(si,ai,{configurable:!0,value:oi(null)});var ri=function(t){si[ai][t]=!0},li=Fe.find,ci="find",hi=!0,ui=Le(ci);ci in []&&Array(1)[ci](function(){hi=!1}),se({target:"Array",proto:!0,forced:hi||!ui},{find:function(t){return li(this,t,arguments.length>1?arguments[1]:void 0)}}),ri(ci);var di=Fe.findIndex,fi="findIndex",pi=!0,gi=Le(fi);fi in []&&Array(1)[fi](function(){pi=!1}),se({target:"Array",proto:!0,forced:pi||!gi},{findIndex:function(t){return di(this,t,arguments.length>1?arguments[1]:void 0)}}),ri(fi);var vi=function(t,e){var i=[][t];return !!i&&k(function(){i.call(null,e||function(){throw 1},1)})},bi=Fe.forEach,mi=vi("forEach"),yi=Le("forEach"),wi=mi&&yi?[].forEach:function(t){return bi(this,t,arguments.length>1?arguments[1]:void 0)};se({target:"Array",proto:!0,forced:[].forEach!=wi},{forEach:wi});var Si=Ht.includes,xi=Le("indexOf",{ACCESSORS:!0,1:0});se({target:"Array",proto:!0,forced:!xi},{includes:function(t){return Si(this,t,arguments.length>1?arguments[1]:void 0)}}),ri("includes");var ki=Ht.indexOf,Oi=[].indexOf,Ci=!!Oi&&1/[1].indexOf(1,-0)<0,Ti=vi("indexOf"),Pi=Le("indexOf",{ACCESSORS:!0,1:0});se({target:"Array",proto:!0,forced:Ci||!Ti||!Pi},{indexOf:function(t){return Ci?Oi.apply(this,arguments)||0:ki(this,t,arguments.length>1?arguments[1]:void 0)}});var Ai,Ii,$i,Ri=!k(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Ei=gt("IE_PROTO"),ji=Object.prototype,_i=Ri?Object.getPrototypeOf:function(t){return t=le(t),L(t,Ei)?t[Ei]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ji:null},Ni=ge("iterator"),Fi=!1,Di=function(){return this};[].keys&&($i=[].keys(),"next" in $i?(Ii=_i(_i($i)),Ii!==Object.prototype&&(Ai=Ii)):Fi=!0),void 0==Ai&&(Ai={}),L(Ai,Ni)||Q(Ai,Ni,Di);var Vi={IteratorPrototype:Ai,BUGGY_SAFARI_ITERATORS:Fi},Bi=J.f,Li=ge("toStringTag"),Hi=function(t,e,i){t&&!L(t=i?t:t.prototype,Li)&&Bi(t,Li,{configurable:!0,value:e})},Mi=Vi.IteratorPrototype,Ui=function(t,e,i){var n=e+" Iterator";return t.prototype=oi(Mi,{next:$(1,i)}),Hi(t,n,!1),t},zi=function(t){if(!D(t)&&null!==t){throw TypeError("Can't set "+(t+"")+" as a prototype")}return t},qi=Object.setPrototypeOf||("__proto__" in {}?function(){var t,e=!1,i={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(i,[]),e=i instanceof Array}catch(n){}return function(i,n){return K(i),zi(n),e?t.call(i,n):i.__proto__=n,i}}():void 0),Wi=Vi.IteratorPrototype,Gi=Vi.BUGGY_SAFARI_ITERATORS,Ki=ge("iterator"),Yi="keys",Xi="values",Ji="entries",Qi=function(){return this},Zi=function(t,e,i,n,o,a,s){Ui(i,e,n);var r,l,c,h=function(t){if(t===o&&g){return g}if(!Gi&&t in f){return f[t]}switch(t){case Yi:return function(){return new i(this,t)};case Xi:return function(){return new i(this,t)};case Ji:return function(){return new i(this,t)}}return function(){return new i(this)}},u=e+" Iterator",d=!1,f=t.prototype,p=f[Ki]||f["@@iterator"]||o&&f[o],g=!Gi&&p||h(o),v="Array"==e?f.entries||p:p;if(v&&(r=_i(v.call(new t)),Wi!==Object.prototype&&r.next&&(_i(r)!==Wi&&(qi?qi(r,Wi):"function"!=typeof r[Ki]&&Q(r,Ki,Qi)),Hi(r,u,!0))),o==Xi&&p&&p.name!==Xi&&(d=!0,g=function(){return p.call(this)}),f[Ki]!==g&&Q(f,Ki,g),o){if(l={values:h(Xi),keys:a?g:h(Yi),entries:h(Ji)},s){for(c in l){!Gi&&!d&&c in f||At(f,c,l[c])}}else{se({target:e,proto:!0,forced:Gi||d},l)}}return l},tn="Array Iterator",en=Pt.set,nn=Pt.getterFor(tn),on=Zi(Array,"Array",function(t,e){en(this,{type:tn,target:F(t),index:0,kind:e})},function(){var t=nn(this),e=t.target,i=t.kind,n=t.index++;return !e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}},"values");ri("keys"),ri("values"),ri("entries");var an=[].join,sn=_!=Object,rn=vi("join",",");se({target:"Array",proto:!0,forced:sn||!rn},{join:function(t){return an.call(F(this),void 0===t?",":t)}});var ln=Fe.map,cn=Oe("map"),hn=Le("map");se({target:"Array",proto:!0,forced:!cn||!hn},{map:function(t){return ln(this,t,arguments.length>1?arguments[1]:void 0)}});var un=[].reverse,dn=[1,2];se({target:"Array",proto:!0,forced:dn+""==dn.reverse()+""},{reverse:function(){return re(this)&&(this.length=this.length),un.call(this)}});var fn=Oe("slice"),pn=Le("slice",{ACCESSORS:!0,0:0,1:2}),gn=ge("species"),vn=[].slice,bn=Math.max;se({target:"Array",proto:!0,forced:!fn||!pn},{slice:function(t,e){var i,n,o,a=F(this),s=Ft(a.length),r=Bt(t,s),l=Bt(void 0===e?s:e,s);if(re(a)&&(i=a.constructor,"function"!=typeof i||i!==Array&&!re(i.prototype)?D(i)&&(i=i[gn],null===i&&(i=void 0)):i=void 0,i===Array||void 0===i)){return vn.call(a,r,l)}for(n=new (void 0===i?Array:i)(bn(l-r,0)),o=0;l>r;r++,o++){r in a&&ce(n,o,a[r])}return n.length=o,n}});var mn=[],yn=mn.sort,wn=k(function(){mn.sort(void 0)}),Sn=k(function(){mn.sort(null)}),xn=vi("sort"),kn=wn||!Sn||!xn;se({target:"Array",proto:!0,forced:kn},{sort:function(t){return void 0===t?yn.call(le(this)):yn.call(le(this),Ee(t))}});var On=Oe("splice"),Cn=Le("splice",{ACCESSORS:!0,0:0,1:2}),Tn=Math.max,Pn=Math.min,An=9007199254740991,In="Maximum allowed length exceeded";se({target:"Array",proto:!0,forced:!On||!Cn},{splice:function(t,e){var i,n,o,a,s,r,l=le(this),c=Ft(l.length),h=Bt(t,c),u=arguments.length;if(0===u?i=n=0:1===u?(i=0,n=c-h):(i=u-2,n=Pn(Tn(_t(e),0),c-h)),c+i-n>An){throw TypeError(In)}for(o=be(l,n),a=0;n>a;a++){s=h+a,s in l&&ce(o,a,l[s])}if(o.length=n,n>i){for(a=h;c-n>a;a++){s=a+n,r=a+i,s in l?l[r]=l[s]:delete l[r]}for(a=c;a>c-n+i;a--){delete l[a-1]}}else{if(i>n){for(a=c-n;a>h;a--){s=a+n-1,r=a+i-1,s in l?l[r]=l[s]:delete l[r]}}}for(a=0;i>a;a++){l[a+h]=arguments[a+2]}return l.length=c-n+i,o}});var $n=function(t,e,i){var n,o;return qi&&"function"==typeof(n=e.constructor)&&n!==i&&D(o=n.prototype)&&o!==i.prototype&&qi(t,o),t},Rn=" \n\x0B\f\r                 \u2028\u2029\ufeff",En="["+Rn+"]",jn=RegExp("^"+En+En+"*"),_n=RegExp(En+En+"*$"),Nn=function(t){return function(e){var i=N(e)+"";return 1&t&&(i=i.replace(jn,"")),2&t&&(i=i.replace(_n,"")),i}},Fn={start:Nn(1),end:Nn(2),trim:Nn(3)},Dn=Gt.f,Vn=G.f,Bn=J.f,Ln=Fn.trim,Hn="Number",Mn=x[Hn],Un=Mn.prototype,zn=E(oi(Un))==Hn,qn=function(t){var e,i,n,o,a,s,r,l,c=V(t,!1);if("string"==typeof c&&c.length>2){if(c=Ln(c),e=c.charCodeAt(0),43===e||45===e){if(i=c.charCodeAt(2),88===i||120===i){return NaN}}else{if(48===e){switch(c.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return +c}for(a=c.slice(2),s=a.length,r=0;s>r;r++){if(l=a.charCodeAt(r),48>l||l>o){return NaN}}return parseInt(a,n)}}}return +c};if(oe(Hn,!Mn(" 0o1")||!Mn("0b1")||Mn("+0x1"))){for(var Wn,Gn=function(t){var e=arguments.length<1?0:t,i=this;return i instanceof Gn&&(zn?k(function(){Un.valueOf.call(i)}):E(i)!=Hn)?$n(new Mn(qn(e)),i,Gn):qn(e)},Kn=O?Dn(Mn):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),Yn=0;Kn.length>Yn;Yn++){L(Mn,Wn=Kn[Yn])&&!L(Gn,Wn)&&Bn(Gn,Wn,Vn(Mn,Wn))}Gn.prototype=Un,Un.constructor=Gn,At(x,Hn,Gn)}var Xn=Object.assign,Jn=Object.defineProperty,Qn=!Xn||k(function(){if(O&&1!==Xn({b:1},Xn(Jn({},"a",{enumerable:!0,get:function(){Jn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b){return !0}var t={},e={},i=Symbol(),n="abcdefghijklmnopqrst";return t[i]=7,n.split("").forEach(function(t){e[t]=t}),7!=Xn({},t)[i]||qe(Xn({},e)).join("")!=n})?function(t,e){for(var i=le(t),n=arguments.length,o=1,a=Yt.f,s=I.f;n>o;){for(var r,l=_(arguments[o++]),c=a?qe(l).concat(a(l)):qe(l),h=c.length,u=0;h>u;){r=c[u++],(!O||s.call(l,r))&&(i[r]=l[r])}}return i}:Xn;se({target:"Object",stat:!0,forced:Object.assign!==Qn},{assign:Qn});var Zn=I.f,to=function(t){return function(e){for(var i,n=F(e),o=qe(n),a=o.length,s=0,r=[];a>s;){i=o[s++],(!O||Zn.call(n,i))&&r.push(t?[i,n[i]]:n[i])}return r}},eo={entries:to(!0),values:to(!1)},io=eo.entries;se({target:"Object",stat:!0},{entries:function(t){return io(t)}});var no=ge("toStringTag"),oo={};oo[no]="z";var ao=oo+""=="[object z]",so=ge("toStringTag"),ro="Arguments"==E(function(){return arguments}()),lo=function(t,e){try{return t[e]}catch(i){}},co=ao?E:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=lo(e=Object(t),so))?i:ro?E(e):"Object"==(n=E(e))&&"function"==typeof e.callee?"Arguments":n},ho=ao?{}.toString:function(){return"[object "+co(this)+"]"};ao||At(Object.prototype,"toString",ho,{unsafe:!0});var uo=Fn.trim,fo=x.parseFloat,po=1/fo(Rn+"-0")!==-(1/0),go=po?function(t){var e=uo(t+""),i=fo(e);return 0===i&&"-"==e.charAt(0)?-0:i}:fo;se({global:!0,forced:parseFloat!=go},{parseFloat:go});var vo=Fn.trim,bo=x.parseInt,mo=/^[+-]?0[Xx]/,yo=8!==bo(Rn+"08")||22!==bo(Rn+"0x16"),wo=yo?function(t,e){var i=vo(t+"");return bo(i,e>>>0||(mo.test(i)?16:10))}:bo;se({global:!0,forced:parseInt!=wo},{parseInt:wo});var So=ge("match"),xo=function(t){var e;return D(t)&&(void 0!==(e=t[So])?!!e:"RegExp"==E(t))},ko=function(){var t=K(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Oo=k(function(){var t=n("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),Co=k(function(){var t=n("^r","gy");return t.lastIndex=2,null!=t.exec("str")}),To={UNSUPPORTED_Y:Oo,BROKEN_CARET:Co},Po=ge("species"),Ao=function(t){var e=Rt(t),i=J.f;O&&e&&!e[Po]&&i(e,Po,{configurable:!0,get:function(){return this}})},Io=J.f,$o=Gt.f,Ro=Pt.set,Eo=ge("match"),jo=x.RegExp,_o=jo.prototype,No=/a/g,Fo=/a/g,Do=new jo(No)!==No,Vo=To.UNSUPPORTED_Y,Bo=O&&oe("RegExp",!Do||Vo||k(function(){return Fo[Eo]=!1,jo(No)!=No||jo(Fo)==Fo||"/a/i"!=jo(No,"i")}));if(Bo){for(var Lo=function(t,e){var i,n=this instanceof Lo,o=xo(t),a=void 0===e;if(!n&&o&&t.constructor===Lo&&a){return t}Do?o&&!a&&(t=t.source):t instanceof Lo&&(a&&(e=ko.call(t)),t=t.source),Vo&&(i=!!e&&e.indexOf("y")>-1,i&&(e=e.replace(/y/g,"")));var s=$n(Do?new jo(t,e):jo(t,e),n?this:_o,Lo);return Vo&&i&&Ro(s,{sticky:i}),s},Ho=(function(t){t in Lo||Io(Lo,t,{configurable:!0,get:function(){return jo[t]},set:function(e){jo[t]=e}})}),Mo=$o(jo),Uo=0;Mo.length>Uo;){Ho(Mo[Uo++])}_o.constructor=Lo,Lo.prototype=_o,At(x,"RegExp",Lo)}Ao("RegExp");var zo=RegExp.prototype.exec,qo=String.prototype.replace,Wo=zo,Go=function(){var t=/a/,e=/b*/g;return zo.call(t,"a"),zo.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),Ko=To.UNSUPPORTED_Y||To.BROKEN_CARET,Yo=void 0!==/()??/.exec("")[1],Xo=Go||Yo||Ko;Xo&&(Wo=function(t){var e,i,n,o,a=this,s=Ko&&a.sticky,r=ko.call(a),l=a.source,c=0,h=t;return s&&(r=r.replace("y",""),-1===r.indexOf("g")&&(r+="g"),h=(t+"").slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(l="(?: "+l+")",h=" "+h,c++),i=RegExp("^(?:"+l+")",r)),Yo&&(i=RegExp("^"+l+"$(?!\\s)",r)),Go&&(e=a.lastIndex),n=zo.call(s?i:a,h),s?n?(n.input=n.input.slice(c),n[0]=n[0].slice(c),n.index=a.lastIndex,a.lastIndex+=n[0].length):a.lastIndex=0:Go&&n&&(a.lastIndex=a.global?n.index+n[0].length:e),Yo&&n&&n.length>1&&qo.call(n[0],i,function(){for(o=1;o1?arguments[1]:void 0)}});var sa=ge("species"),ra=!k(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),la=function(){return"$0"==="a".replace(/./,"$0")}(),ca=ge("replace"),ha=function(){return/./[ca]?""===/./[ca]("a","$0"):!1}(),ua=!k(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}),da=function(t,e,i,n){var o=ge(t),a=!k(function(){var e={};return e[o]=function(){return 7},7!=""[t](e)}),s=a&&!k(function(){var e=!1,i=/a/;return"split"===t&&(i={},i.constructor={},i.constructor[sa]=function(){return i},i.flags="",i[o]=/./[o]),i.exec=function(){return e=!0,null},i[o](""),!e});if(!a||!s||"replace"===t&&(!ra||!la||ha)||"split"===t&&!ua){var r=/./[o],l=i(o,""[t],function(t,e,i,n,o){return e.exec===Jo?a&&!o?{done:!0,value:r.call(e,i,n)}:{done:!0,value:t.call(i,e,n)}:{done:!1}},{REPLACE_KEEPS_$0:la,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:ha}),c=l[0],h=l[1];At(String.prototype,t,c),At(RegExp.prototype,o,2==e?function(t,e){return h.call(t,this,e)}:function(t){return h.call(t,this)})}n&&Q(RegExp.prototype[o],"sham",!0)},fa=function(t){return function(e,i){var n,o,a=N(e)+"",s=_t(i),r=a.length;return 0>s||s>=r?t?"":void 0:(n=a.charCodeAt(s),55296>n||n>56319||s+1===r||(o=a.charCodeAt(s+1))<56320||o>57343?t?a.charAt(s):n:t?a.slice(s,s+2):(n-55296<<10)+(o-56320)+65536)}},pa={codeAt:fa(!1),charAt:fa(!0)},ga=pa.charAt,va=function(t,e,i){return e+(i?ga(t,e).length:1)},ba=function(t,e){var i=t.exec;if("function"==typeof i){var n=i.call(t,e);if("object"!=typeof n){throw TypeError("RegExp exec method returned something other than an Object or null")}return n}if("RegExp"!==E(t)){throw TypeError("RegExp#exec called on incompatible receiver")}return Jo.call(t,e)},ma=Math.max,ya=Math.min,wa=Math.floor,Sa=/\$([$&'`]|\d\d?|<[^>]*>)/g,xa=/\$([$&'`]|\d\d?)/g,ka=function(t){return void 0===t?t:t+""};da("replace",2,function(t,e,i,n){function o(t,i,n,o,a,s){var r=n+t.length,l=o.length,c=xa;return void 0!==a&&(a=le(a),c=Sa),e.call(s,c,function(e,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return i.slice(0,n);case"'":return i.slice(r);case"<":c=a[s.slice(1,-1)];break;default:var h=+s;if(0===h){return e}if(h>l){var u=wa(h/10);return 0===u?e:l>=u?void 0===o[u-1]?s.charAt(1):o[u-1]+s.charAt(1):e}c=o[h-1]}return void 0===c?"":c})}var a=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,s=n.REPLACE_KEEPS_$0,r=a?"$":"$0";return[function(i,n){var o=N(this),a=void 0==i?void 0:i[t];return void 0!==a?a.call(i,o,n):e.call(o+"",i,n)},function(t,n){if(!a&&s||"string"==typeof n&&-1===n.indexOf(r)){var l=i(e,t,this,n);if(l.done){return l.value}}var c=K(t),h=this+"",u="function"==typeof n;u||(n+="");var d=c.global;if(d){var f=c.unicode;c.lastIndex=0}for(var p=[];;){var g=ba(c,h);if(null===g){break}if(p.push(g),!d){break}var v=g[0]+"";""===v&&(c.lastIndex=va(h,Ft(c.lastIndex),f))}for(var b="",m=0,y=0;y=m&&(b+=h.slice(m,S)+T,m=S+w.length)}return b+h.slice(m)}]});var Oa=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e};da("search",1,function(t,e,i){return[function(e){var i=N(this),n=void 0==e?void 0:e[t];return void 0!==n?n.call(e,i):RegExp(e)[t](i+"")},function(t){var n=i(e,t,this);if(n.done){return n.value}var o=K(t),a=this+"",s=o.lastIndex;Oa(s,0)||(o.lastIndex=0);var r=ba(o,a);return Oa(o.lastIndex,s)||(o.lastIndex=s),null===r?-1:r.index}]});var Ca=ge("species"),Ta=function(t,e){var i,n=K(t).constructor;return void 0===n||void 0==(i=K(n)[Ca])?e:Ee(i)},Pa=[].push,Aa=Math.min,Ia=4294967295,$a=!k(function(){return !RegExp(Ia,"y")});da("split",2,function(t,e,i){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var n=N(this)+"",o=void 0===i?Ia:i>>>0;if(0===o){return[]}if(void 0===t){return[n]}if(!xo(t)){return e.call(n,t,o)}for(var a,s,r,l=[],c=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,u=RegExp(t.source,c+"g");(a=Jo.call(u,n))&&(s=u.lastIndex,!(s>h&&(l.push(n.slice(h,a.index)),a.length>1&&a.index=o)));){u.lastIndex===a.index&&u.lastIndex++}return h===n.length?(r||!u.test(""))&&l.push(""):l.push(n.slice(h)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:e.call(this,t,i)}:e,[function(e,i){var o=N(this),a=void 0==e?void 0:e[t];return void 0!==a?a.call(e,o,i):n.call(o+"",e,i)},function(t,o){var a=i(n,t,this,o,n!==e);if(a.done){return a.value}var s=K(t),r=this+"",l=Ta(s,RegExp),c=s.unicode,h=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+($a?"y":"g"),u=new l($a?s:"^(?:"+s.source+")",h),d=void 0===o?Ia:o>>>0;if(0===d){return[]}if(0===r.length){return null===ba(u,r)?[r]:[]}for(var f=0,p=0,g=[];p',""],toolbarDropdownItem:'
  • ',toolbarDropdownSeparator:'
  • ',pageDropdown:['"],pageDropdownItem:'
    ',dropdownCaret:'',pagination:['
      ',"
    "],paginationItem:'
  • %s
  • ',icon:'',inputGroup:'
    %s%s
    ',searchInput:'',searchButton:'',searchClearButton:''}},4:{iconsPrefix:"fa",icons:{paginationSwitchDown:"fa-caret-square-down",paginationSwitchUp:"fa-caret-square-up",refresh:"fa-sync",toggleOff:"fa-toggle-off",toggleOn:"fa-toggle-on",columns:"fa-th-list",detailOpen:"fa-plus",detailClose:"fa-minus",fullscreen:"fa-arrows-alt",search:"fa-search",clearSearch:"fa-trash"},classes:{buttonsPrefix:"btn",buttons:"secondary",buttonsGroup:"btn-group",buttonsDropdown:"btn-group",pull:"float",inputGroup:"btn-group",inputPrefix:"form-control-",input:"form-control",paginationDropdown:"btn-group dropdown",dropup:"dropup",dropdownActive:"active",paginationActive:"active",buttonActive:"active"},html:{toolbarDropdown:['"],toolbarDropdownItem:'',pageDropdown:['"],pageDropdownItem:'%s',toolbarDropdownSeparator:'',dropdownCaret:'',pagination:['
      ',"
    "],paginationItem:'
  • %s
  • ',icon:'',inputGroup:'
    %s
    %s
    ',searchInput:'',searchButton:'',searchClearButton:''}},5:{iconsPrefix:"fa",icons:{paginationSwitchDown:"fa-caret-square-down",paginationSwitchUp:"fa-caret-square-up",refresh:"fa-sync",toggleOff:"fa-toggle-off",toggleOn:"fa-toggle-on",columns:"fa-th-list",detailOpen:"fa-plus",detailClose:"fa-minus",fullscreen:"fa-arrows-alt",search:"fa-search",clearSearch:"fa-trash"},classes:{buttonsPrefix:"btn",buttons:"secondary",buttonsGroup:"btn-group",buttonsDropdown:"btn-group",pull:"float",inputGroup:"btn-group",inputPrefix:"form-control-",input:"form-control",paginationDropdown:"btn-group dropdown",dropup:"dropup",dropdownActive:"active",paginationActive:"active",buttonActive:"active"},html:{dataToggle:"data-bs-toggle",toolbarDropdown:['"],toolbarDropdownItem:'',pageDropdown:['"],pageDropdownItem:'%s',toolbarDropdownSeparator:'',dropdownCaret:'',pagination:['
      ',"
    "],paginationItem:'
  • %s
  • ',icon:'',inputGroup:'
    %s
    %s
    ',searchInput:'',searchButton:'',searchClearButton:''}}}[Ga],Qa={id:void 0,firstLoad:!0,height:void 0,classes:"table table-bordered table-hover",buttons:{},theadClasses:"",striped:!1,headerStyle:function(t){return{}},rowStyle:function(t,e){return{}},rowAttributes:function(t,e){return{}},undefinedText:"-",locale:void 0,virtualScroll:!1,virtualScrollItemHeight:void 0,sortable:!0,sortClass:void 0,silentSort:!0,sortName:void 0,sortOrder:void 0,sortReset:!1,sortStable:!1,rememberOrder:!1,serverSort:!0,customSort:void 0,columns:[[]],data:[],url:void 0,method:"get",cache:!0,contentType:"application/json",dataType:"json",ajax:void 0,ajaxOptions:{},queryParams:function(t){return t},queryParamsType:"limit",responseHandler:function(t){return t},totalField:"total",totalNotFilteredField:"totalNotFiltered",dataField:"rows",footerField:"footer",pagination:!1,paginationParts:["pageInfo","pageSize","pageList"],showExtendedPagination:!1,paginationLoop:!0,sidePagination:"client",totalRows:0,totalNotFiltered:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",paginationPreText:"‹",paginationNextText:"›",paginationSuccessivelySize:5,paginationPagesBySide:1,paginationUseIntermediate:!1,search:!1,searchHighlight:!1,searchOnEnterKey:!1,strictSearch:!1,searchSelector:!1,visibleSearch:!1,showButtonIcons:!0,showButtonText:!1,showSearchButton:!1,showSearchClearButton:!1,trimOnSearch:!0,searchAlign:"right",searchTimeOut:500,searchText:"",customSearch:void 0,showHeader:!0,showFooter:!1,footerStyle:function(t){return{}},searchAccentNeutralise:!1,showColumns:!1,showSearch:!1,showPageGo:!1,showColumnsToggleAll:!1,showColumnsSearch:!1,minimumCountColumns:1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,showFullscreen:!1,smartDisplay:!0,escape:!1,filterOptions:{filterAlgorithm:"and"},idField:void 0,selectItemName:"btSelectItem",clickToSelect:!1,ignoreClickToSelectOn:function(t){var e=t.tagName;return["A","BUTTON"].includes(e)},singleSelect:!1,checkboxHeader:!0,maintainMetaData:!1,multipleSelectRow:!1,uniqueId:void 0,cardView:!1,detailView:!1,detailViewIcon:!0,detailViewByClick:!1,detailViewAlign:"left",detailFormatter:function(t,e){return""},detailFilter:function(t,e){return !0},toolbar:void 0,toolbarAlign:"left",buttonsToolbar:void 0,buttonsAlign:"right",buttonsOrder:["search","paginationSwitch","refresh","toggle","fullscreen","columns"],buttonsPrefix:Ja.classes.buttonsPrefix,buttonsClass:Ja.classes.buttons,icons:Ja.icons,iconSize:void 0,iconsPrefix:Ja.iconsPrefix,loadingFontSize:"auto",loadingTemplate:function(t){return'\n '.concat(t,'\n \n \n ')},onAll:function(t,e){return !1},onClickCell:function(t,e,i,n){return !1},onDblClickCell:function(t,e,i,n){return !1},onClickRow:function(t,e){return !1},onDblClickRow:function(t,e){return !1},onSort:function(t,e){return !1},onCheck:function(t){return !1},onUncheck:function(t){return !1},onCheckAll:function(t){return !1},onUncheckAll:function(t){return !1},onCheckSome:function(t){return !1},onUncheckSome:function(t){return !1},onLoadSuccess:function(t){return !1},onLoadError:function(t){return !1},onColumnSwitch:function(t,e){return !1},onPageChange:function(t,e){return !1},onSearch:function(t){return !1},onShowSearch:function(){return !1},onToggle:function(t){return !1},onPreBody:function(t){return !1},onPostBody:function(){return !1},onPostHeader:function(){return !1},onPostFooter:function(){return !1},onExpandRow:function(t,e,i){return !1},onCollapseRow:function(t,e){return !1},onRefreshOptions:function(t){return !1},onRefresh:function(t){return !1},onResetView:function(){return !1},onScrollBody:function(){return !1}},Za={formatLoadingMessage:function(){return"Loading, please wait"},formatRecordsPerPage:function(t){return"".concat(t," rows per page")},formatShowingRows:function(t,e,i,n){return void 0!==n&&n>0&&n>i?"Showing ".concat(t," to ").concat(e," of ").concat(i," rows (filtered from ").concat(n," total rows)"):"Showing ".concat(t," to ").concat(e," of ").concat(i," rows")},formatSRPaginationPreText:function(){return"previous page"},formatSRPaginationPageText:function(t){return"to page ".concat(t)},formatSRPaginationNextText:function(){return"next page"},formatDetailPagination:function(t){return"Showing ".concat(t," rows")},formatSearch:function(){return"Search"},formatShowSearch:function(){return"Show Search"},formatPageGo:function(){return"Go"},formatClearSearch:function(){return"Clear Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatPaginationSwitchDown:function(){return"Show pagination"},formatPaginationSwitchUp:function(){return"Hide pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatToggleOn:function(){return"Show card view"},formatToggleOff:function(){return"Hide card view"},formatColumns:function(){return"Columns"},formatColumnsToggleAll:function(){return"Toggle all"},formatFullscreen:function(){return"Fullscreen"},formatAllRows:function(){return"All"}},ts={field:void 0,title:void 0,titleTooltip:void 0,"class":void 0,width:void 0,widthUnit:"px",rowspan:void 0,colspan:void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,cellStyle:void 0,radio:!1,checkbox:!1,checkboxEnabled:!0,clickToSelect:!0,showSelectTitle:!1,sortable:!1,sortName:void 0,order:"asc",sorter:void 0,visible:!0,ignore:!1,switchable:!0,cardVisible:!0,searchable:!0,formatter:void 0,footerFormatter:void 0,detailFormatter:void 0,searchFormatter:!0,searchHighlightFormatter:!1,escape:!1,events:void 0},es=["getOptions","refreshOptions","getData","getSelections","load","append","prepend","remove","removeAll","insertRow","updateRow","getRowByUniqueId","updateByUniqueId","removeByUniqueId","updateCell","updateCellByUniqueId","showRow","hideRow","getHiddenRows","showColumn","hideColumn","getVisibleColumns","getHiddenColumns","showAllColumns","hideAllColumns","mergeCells","checkAll","uncheckAll","checkInvert","check","uncheck","checkBy","uncheckBy","refresh","destroy","resetView","showLoading","hideLoading","togglePagination","toggleFullscreen","toggleView","resetSearch","filterBy","scrollTo","getScrollPosition","selectPage","prevPage","nextPage","toggleDetailView","expandRow","collapseRow","expandRowByUniqueId","collapseRowByUniqueId","expandAllRows","collapseAllRows","updateColumnTitle","updateFormatText"],is={"all.bs.table":"onAll","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","click-cell.bs.table":"onClickCell","dbl-click-cell.bs.table":"onDblClickCell","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","check-some.bs.table":"onCheckSome","uncheck-some.bs.table":"onUncheckSome","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","toggle.bs.table":"onToggle","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader","post-footer.bs.table":"onPostFooter","expand-row.bs.table":"onExpandRow","collapse-row.bs.table":"onCollapseRow","refresh-options.bs.table":"onRefreshOptions","reset-view.bs.table":"onResetView","refresh.bs.table":"onRefresh","scroll-body.bs.table":"onScrollBody"};Object.assign(Qa,Za);var ns={VERSION:Wa,THEME:"bootstrap".concat(Ga),CONSTANTS:Ja,DEFAULTS:Qa,COLUMN_DEFAULTS:ts,METHODS:es,EVENTS:is,LOCALES:{en:Za,"en-US":Za}},os=k(function(){qe(1)});se({target:"Object",stat:!0,forced:os},{keys:function(t){return qe(le(t))}});var as=G.f,ss="".endsWith,rs=Math.min,ls=aa("endsWith"),cs=!ls&&!!function(){var t=as(String.prototype,"endsWith");return t&&!t.writable}();se({target:"String",proto:!0,forced:!cs&&!ls},{endsWith:function(t){var e=N(this)+"";na(t);var i=arguments.length>1?arguments[1]:void 0,n=Ft(e.length),o=void 0===i?n:rs(Ft(i),n),a=t+"";return ss?ss.call(e,a,o):e.slice(o-a.length,o)===a}});var hs=G.f,us="".startsWith,ds=Math.min,fs=aa("startsWith"),ps=!fs&&!!function(){var t=hs(String.prototype,"startsWith");return t&&!t.writable}();se({target:"String",proto:!0,forced:!ps&&!fs},{startsWith:function(t){var e=N(this)+"";na(t);var i=Ft(ds(arguments.length>1?arguments[1]:void 0,e.length)),n=t+"";return us?us.call(e,n,i):e.slice(i,i+n.length)===n}});var gs={getSearchInput:function(t){return"string"==typeof t.options.searchSelector?y["default"](t.options.searchSelector):t.$toolbar.find(".search input")},sprintf:function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;e>n;n++){i[n-1]=arguments[n]}var o=!0,a=0,s=t.replace(/%s/g,function(){var t=i[a++];return void 0===t?(o=!1,""):t});return o?s:""},isObject:function(t){return t instanceof Object&&!Array.isArray(t)},isEmptyObject:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.entries(t).length&&t.constructor===Object},isNumeric:function(t){return !isNaN(parseFloat(t))&&isFinite(t)},getFieldTitle:function(t,e){var i,n=m(t);try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.field===e){return o.title}}}catch(a){n.e(a)}finally{n.f()}return""},setFieldIndex:function(t){var e,i=0,n=[],o=m(t[0]);try{for(o.s();!(e=o.n()).done;){var a=e.value;i+=a.colspan||1}}catch(s){o.e(s)}finally{o.f()}for(var r=0;rl;l++){n[r][l]=!1}}for(var c=0;cv;v++){for(var b=0;p>b;b++){n[c+v][g+b]=!0}}}}catch(s){u.e(s)}finally{u.f()}}},normalizeAccent:function(t){return"string"!=typeof t?t:t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")},updateFieldGroup:function(t){var e,i,n=(e=[]).concat.apply(e,c(t)),o=m(t);try{for(o.s();!(i=o.n()).done;){var a,s=i.value,r=m(s);try{for(r.s();!(a=r.n()).done;){var l=a.value;if(l.colspanGroup>1){for(var h=0,u=function(t){var e=n.find(function(e){return e.fieldIndex===t});e.visible&&h++},d=l.colspanIndex;d0}}}catch(f){r.e(f)}finally{r.f()}}}catch(f){o.e(f)}finally{o.f()}},getScrollBarWidth:function(){if(void 0===this.cachedWidth){var t=y["default"]("
    ").addClass("fixed-table-scroll-inner"),e=y["default"]("
    ").addClass("fixed-table-scroll-outer");e.append(t),y["default"]("body").append(e);var i=t[0].offsetWidth;e.css("overflow","scroll");var n=t[0].offsetWidth;i===n&&(n=e[0].clientWidth),e.remove(),this.cachedWidth=i-n}return this.cachedWidth},calculateObjectValue:function(t,e,i,n){var a=e;if("string"==typeof e){var s=e.split(".");if(s.length>1){a=window;var r,l=m(s);try{for(l.s();!(r=l.n()).done;){var h=r.value;a=a[h]}}catch(u){l.e(u)}finally{l.f()}}else{a=window[e]}}return null!==a&&"object"===o(a)?a:"function"==typeof a?a.apply(t,i||[]):!a&&"string"==typeof e&&this.sprintf.apply(this,[e].concat(c(i)))?this.sprintf.apply(this,[e].concat(c(i))):n},compareObjects:function(t,e,i){var n=Object.keys(t),o=Object.keys(e);if(i&&n.length!==o.length){return !1}for(var a=0,s=n;a/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):t},unescapeHTML:function(t){return"string"==typeof t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/`/g,"`"):t},getRealDataAttr:function(t){for(var e=0,i=Object.entries(t);etd,>th").each(function(n,a){for(var s=y["default"](a),l=+s.attr("colspan")||1,c=+s.attr("rowspan")||1,h=n;o[e]&&o[e][h];h++){}for(var u=h;h+l>u;u++){for(var d=e;e+c>d;d++){o[d]||(o[d]=[]),o[d][u]=!0}}var f=t[h].field;r[f]=s.html().trim(),r["_".concat(f,"_id")]=s.attr("id"),r["_".concat(f,"_class")]=s.attr("class"),r["_".concat(f,"_rowspan")]=s.attr("rowspan"),r["_".concat(f,"_colspan")]=s.attr("colspan"),r["_".concat(f,"_title")]=s.attr("title"),r["_".concat(f,"_data")]=i.getRealDataAttr(s.data()),r["_".concat(f,"_style")]=s.attr("style") +}),n.push(r)}),n},sort:function(t,e,i,n,o,a){return(void 0===t||null===t)&&(t=""),(void 0===e||null===e)&&(e=""),n&&t===e&&(t=o,e=a),this.isNumeric(t)&&this.isNumeric(e)?(t=parseFloat(t),e=parseFloat(e),e>t?-1*i:t>e?i:0):t===e?0:("string"!=typeof t&&(t=""+t),-1===t.localeCompare(e)?-1*i:i)},getEventName:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=e||"".concat(+new Date).concat(~~(1000000*Math.random())),"".concat(t,"-").concat(e)},hasDetailViewIcon:function(t){return t.detailView&&t.detailViewIcon&&!t.cardView},getDetailViewIndexOffset:function(t){return this.hasDetailViewIcon(t)&&"right"!==t.detailViewAlign?1:0},checkAutoMergeCells:function(t){var e,i=m(t);try{for(i.s();!(e=i.n()).done;){for(var n=e.value,o=0,a=Object.keys(n);oo&&r++;for(var l=i;n>l;l++){t[l]&&s.push(t[l])}return{topOffset:o,bottomOffset:a,rowsAbove:r,rows:s}}},{key:"checkChanges",value:function(t,e){var i=e!==this.cache[t];return this.cache[t]=e,i}},{key:"getExtra",value:function(t,e){var i=document.createElement("tr");return i.className="virtual-scroll-".concat(t),e&&(i.style.height="".concat(e,"px")),i.outerHTML}}]),t}(),ys=function(){function e(t,i){a(this,e),this.options=i,this.$el=y["default"](t),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0}return r(e,[{key:"init",value:function(){this.initConstants(),this.initLocale(),this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initHiddenRows(),this.initToolbar(),this.initPagination(),this.initBody(),this.initSearchText(),this.initServer()}},{key:"initConstants",value:function(){var t=this.options;this.constants=ns.CONSTANTS,this.constants.theme=y["default"].fn.bootstrapTable.theme,this.constants.dataToggle=this.constants.html.dataToggle||"data-toggle";var e=t.buttonsPrefix?"".concat(t.buttonsPrefix,"-"):"";this.constants.buttonsClass=[t.buttonsPrefix,e+t.buttonsClass,gs.sprintf("".concat(e,"%s"),t.iconSize)].join(" ").trim(),this.buttons=gs.calculateObjectValue(this,t.buttons,[],{}),"object"!==o(this.buttons)&&(this.buttons={}),"string"==typeof t.icons&&(t.icons=gs.calculateObjectValue(null,t.icons))}},{key:"initLocale",value:function(){if(this.options.locale){var t=y["default"].fn.bootstrapTable.locales,e=this.options.locale.split(/-|_/);e[0]=e[0].toLowerCase(),e[1]&&(e[1]=e[1].toUpperCase()),t[this.options.locale]?y["default"].extend(this.options,t[this.options.locale]):t[e.join("-")]?y["default"].extend(this.options,t[e.join("-")]):t[e[0]]&&y["default"].extend(this.options,t[e[0]])}}},{key:"initContainer",value:function(){var t=["top","both"].includes(this.options.paginationVAlign)?'
    ':"",e=["bottom","both"].includes(this.options.paginationVAlign)?'
    ':"",i=gs.calculateObjectValue(this.options,this.options.loadingTemplate,[this.options.formatLoadingMessage()]);this.$container=y["default"]('\n
    \n
    \n ').concat(t,'\n
    \n
    \n
    \n
    \n ').concat(i,'\n
    \n
    \n \n
    \n ').concat(e,"\n
    \n ")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$el.find("tfoot"),this.options.buttonsToolbar?this.$toolbar=y["default"]("body").find(this.options.buttonsToolbar):this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('
    '),this.$el.addClass(this.options.classes),this.$tableLoading.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),this.options.height&&(this.$tableContainer.addClass("fixed-height"),this.options.showFooter&&this.$tableContainer.addClass("has-footer"),this.options.classes.split(" ").includes("table-bordered")&&(this.$tableBody.append('
    '),this.$tableBorder=this.$tableBody.find(".fixed-table-border"),this.$tableLoading.addClass("fixed-table-border")),this.$tableFooter=this.$container.find(".fixed-table-footer"))}},{key:"initTable",value:function(){var t=this,i=[];if(this.$header=this.$el.find(">thead"),this.$header.length?this.options.theadClasses&&this.$header.addClass(this.options.theadClasses):this.$header=y["default"]('')).appendTo(this.$el),this._headerTrClasses=[],this._headerTrStyles=[],this.$header.find("tr").each(function(e,n){var o=y["default"](n),a=[];o.find("th").each(function(t,e){var i=y["default"](e);void 0!==i.data("field")&&i.data("field","".concat(i.data("field"))),a.push(y["default"].extend({},{title:i.html(),"class":i.attr("class"),titleTooltip:i.attr("title"),rowspan:i.attr("rowspan")?+i.attr("rowspan"):void 0,colspan:i.attr("colspan")?+i.attr("colspan"):void 0},i.data()))}),i.push(a),o.attr("class")&&t._headerTrClasses.push(o.attr("class")),o.attr("style")&&t._headerTrStyles.push(o.attr("style"))}),Array.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=y["default"].extend(!0,[],i,this.options.columns),this.columns=[],this.fieldsColumnsIndex=[],gs.setFieldIndex(this.options.columns),this.options.columns.forEach(function(i,n){i.forEach(function(i,o){var a=y["default"].extend({},e.COLUMN_DEFAULTS,i);void 0!==a.fieldIndex&&(t.columns[a.fieldIndex]=a,t.fieldsColumnsIndex[a.field]=a.fieldIndex),t.options.columns[n][o]=a})}),!this.options.data.length){var n=gs.trToData(this.columns,this.$el.find(">tbody>tr"));n.length&&(this.options.data=n,this.fromHtml=!0)}this.options.pagination&&"server"!==this.options.sidePagination||(this.footerData=gs.trToData(this.columns,this.$el.find(">tfoot>tr"))),this.footerData&&this.$el.find("tfoot").html(""),!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()}},{key:"initHeader",value:function(){var t=this,e={},i=[];this.header={fields:[],styles:[],classes:[],formatters:[],detailFormatters:[],events:[],sorters:[],sortNames:[],cellStyles:[],searchables:[]},gs.updateFieldGroup(this.options.columns),this.options.columns.forEach(function(n,o){var a=[];a.push(""));var s="";if(0===o&&gs.hasDetailViewIcon(t.options)){var r=t.options.columns.length>1?' rowspan="'.concat(t.options.columns.length,'"'):"";s='\n
    \n ')}s&&"right"!==t.options.detailViewAlign&&a.push(s),n.forEach(function(i,n){var s=gs.sprintf(' class="%s"',i["class"]),r=i.widthUnit,c=parseFloat(i.width),h=gs.sprintf("text-align: %s; ",i.halign?i.halign:i.align),u=gs.sprintf("text-align: %s; ",i.align),d=gs.sprintf("vertical-align: %s; ",i.valign);if(d+=gs.sprintf("width: %s; ",!i.checkbox&&!i.radio||c?c?c+r:void 0:i.showSelectTitle?void 0:"36px"),void 0!==i.fieldIndex||i.visible){var f=gs.calculateObjectValue(null,t.options.headerStyle,[i]),p=[],g="";if(f&&f.css){for(var v=0,b=Object.entries(f.css);v0?" data-not-first-th":"",">"),a.push(gs.sprintf('
    ',t.options.sortable&&i.sortable?"sortable both":""));var S=t.options.escape?gs.escapeHTML(i.title):i.title,x=S;i.checkbox&&(S="",!t.options.singleSelect&&t.options.checkboxHeader&&(S=''),t.header.stateField=i.field),i.radio&&(S="",t.header.stateField=i.field),!S&&i.showSelectTitle&&(S+=x),a.push(S),a.push("
    "),a.push('
    '),a.push("
    "),a.push("")}}),s&&"right"===t.options.detailViewAlign&&a.push(s),a.push(""),a.length>3&&i.push(a.join(""))}),this.$header.html(i.join("")),this.$header.find("th[data-field]").each(function(t,i){y["default"](i).data(e[y["default"](i).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(e){var i=y["default"](e.currentTarget);return t.options.detailView&&!i.parent().hasClass("bs-checkbox")&&i.closest(".bootstrap-table")[0]!==t.$container[0]?!1:void (t.options.sortable&&i.parent().data().sortable&&t.onSort(e))}),this.$header.children().children().off("keypress").on("keypress",function(e){if(t.options.sortable&&y["default"](e.currentTarget).data().sortable){var i=e.keyCode||e.which;13===i&&t.onSort(e)}});var n=gs.getEventName("resize.bootstrap-table",this.$el.attr("id"));y["default"](window).off(n),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),y["default"](window).on(n,function(){return t.resetView()})),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(e){e.stopPropagation();var i=y["default"](e.currentTarget).prop("checked");t[i?"checkAll":"uncheckAll"](),t.updateSelected()})}},{key:"initData",value:function(t,e){"append"===e?this.options.data=this.options.data.concat(t):"prepend"===e?this.options.data=[].concat(t).concat(this.options.data):(t=t||gs.deepCopy(this.options.data),this.options.data=Array.isArray(t)?t:t[this.options.dataField]),this.data=c(this.options.data),this.options.sortReset&&(this.unsortedData=c(this.data)),"server"!==this.options.sidePagination&&this.initSort()}},{key:"initSort",value:function(){var t=this,e=this.options.sortName,i="desc"===this.options.sortOrder?-1:1,n=this.header.fields.indexOf(this.options.sortName),o=0;-1!==n?(this.options.sortStable&&this.data.forEach(function(t,e){t.hasOwnProperty("_position")||(t._position=e)}),this.options.customSort?gs.calculateObjectValue(this.options,this.options.customSort,[this.options.sortName,this.options.sortOrder,this.data]):this.data.sort(function(o,a){t.header.sortNames[n]&&(e=t.header.sortNames[n]);var s=gs.getItemField(o,e,t.options.escape),r=gs.getItemField(a,e,t.options.escape),l=gs.calculateObjectValue(t.header,t.header.sorters[n],[s,r,o,a]);return void 0!==l?t.options.sortStable&&0===l?i*(o._position-a._position):i*l:gs.sort(s,r,i,t.options.sortStable,o._position,a._position)}),void 0!==this.options.sortClass&&(clearTimeout(o),o=setTimeout(function(){t.$el.removeClass(t.options.sortClass);var e=t.$header.find('[data-field="'.concat(t.options.sortName,'"]')).index();t.$el.find("tr td:nth-child(".concat(e+1,")")).addClass(t.options.sortClass)},250))):this.options.sortReset&&(this.data=c(this.unsortedData))}},{key:"onSort",value:function(t){var e=t.type,i=t.currentTarget,n="keypress"===e?y["default"](i):y["default"](i).parent(),o=this.$header.find("th").eq(n.index());if(this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===n.data("field")){var a=this.options.sortOrder;void 0===a?this.options.sortOrder="asc":"asc"===a?this.options.sortOrder="desc":"desc"===this.options.sortOrder&&(this.options.sortOrder=this.options.sortReset?void 0:"asc"),void 0===this.options.sortOrder&&(this.options.sortName=void 0)}else{this.options.sortName=n.data("field"),this.options.rememberOrder?this.options.sortOrder="asc"===n.data("order")?"desc":"asc":this.options.sortOrder=this.columns[this.fieldsColumnsIndex[n.data("field")]].sortOrder||this.columns[this.fieldsColumnsIndex[n.data("field")]].order}return this.trigger("sort",this.options.sortName,this.options.sortOrder),n.add(o).data("order",this.options.sortOrder),this.getCaret(),"server"===this.options.sidePagination&&this.options.serverSort?(this.options.pageNumber=1,void this.initServer(this.options.silentSort)):(this.initSort(),void this.initBody())}},{key:"initToolbar",value:function(){var t,e=this,i=this.options,n=[],a=0,s=0;this.$toolbar.find(".bs-bars").children().length&&y["default"]("body").append(y["default"](i.toolbar)),this.$toolbar.html(""),("string"==typeof i.toolbar||"object"===o(i.toolbar))&&y["default"](gs.sprintf('
    ',this.constants.classes.pull,i.toolbarAlign)).appendTo(this.$toolbar).append(y["default"](i.toolbar)),n=['
    ')],"string"==typeof i.buttonsOrder&&(i.buttonsOrder=i.buttonsOrder.replace(/\[|\]| |'/g,"").split(",")),this.buttons=Object.assign(this.buttons,{search:{text:i.formatSearch(),icon:i.icons.search,render:!1,event:this.toggleShowSearch,attributes:{"aria-label":i.formatShowSearch(),title:i.formatShowSearch()}},paginationSwitch:{text:i.pagination?i.formatPaginationSwitchUp():i.formatPaginationSwitchDown(),icon:i.pagination?i.icons.paginationSwitchDown:i.icons.paginationSwitchUp,render:!1,event:this.togglePagination,attributes:{"aria-label":i.formatPaginationSwitch(),title:i.formatPaginationSwitch()}},refresh:{text:i.formatRefresh(),icon:i.icons.refresh,render:!1,event:this.refresh,attributes:{"aria-label":i.formatRefresh(),title:i.formatRefresh()}},toggle:{text:i.formatToggle(),icon:i.icons.toggleOff,render:!1,event:this.toggleView,attributes:{"aria-label":i.formatToggleOn(),title:i.formatToggleOn()}},fullscreen:{text:i.formatFullscreen(),icon:i.icons.fullscreen,render:!1,event:this.toggleFullscreen,attributes:{"aria-label":i.formatFullscreen(),title:i.formatFullscreen()}},columns:{render:!1,html:function X(){var X=[];if(X.push('
    \n \n ").concat(e.constants.html.toolbarDropdown[0])),i.showColumnsSearch&&(X.push(gs.sprintf(e.constants.html.toolbarDropdownItem,gs.sprintf('',e.constants.classes.input,i.formatSearch()))),X.push(e.constants.html.toolbarDropdownSeparator)),i.showColumnsToggleAll){var t=e.getVisibleColumns().length===e.columns.filter(function(t){return !e.isSelectionColumn(t)}).length;X.push(gs.sprintf(e.constants.html.toolbarDropdownItem,gs.sprintf(' %s',t?'checked="checked"':"",i.formatColumnsToggleAll()))),X.push(e.constants.html.toolbarDropdownSeparator)}var n=0;return e.columns.forEach(function(t){t.visible&&n++}),e.columns.forEach(function(t,o){if(!e.isSelectionColumn(t)&&(!i.cardView||t.cardVisible)&&!t.ignore){var a=t.visible?' checked="checked"':"",r=n<=i.minimumCountColumns&&a?' disabled="disabled"':"";t.switchable&&(X.push(gs.sprintf(e.constants.html.toolbarDropdownItem,gs.sprintf(' %s',t.field,o,a,r,t.title))),s++)}}),X.push(e.constants.html.toolbarDropdown[1],"
    "),X.join("")}}});for(var r={},c=0,h=Object.entries(this.buttons);c"}r[d]=p;var x="show".concat(d.charAt(0).toUpperCase()).concat(d.substring(1)),k=i[x];!(!f.hasOwnProperty("render")||f.hasOwnProperty("render")&&f.render)||void 0!==k&&k!==!0||(i[x]=!0),i.buttonsOrder.includes(d)||i.buttonsOrder.push(d)}var O,C=m(i.buttonsOrder);try{for(C.s();!(O=C.n()).done;){var T=O.value,P=i["show".concat(T.charAt(0).toUpperCase()).concat(T.substring(1))];P&&n.push(r[T])}}catch(A){C.e(A)}finally{C.f()}n.push("
    "),(this.showToolbar||n.length>2)&&this.$toolbar.append(n.join("")),i.showSearch&&this.$toolbar.find('button[name="showSearch"]').off("click").on("click",function(){return e.toggleShowSearch()});for(var I=0,$=Object.entries(this.buttons);I<$.length;I++){var R=l($[I],2),E=R[0],j=R[1];if(j.hasOwnProperty("event")){if("function"==typeof j.event||"string"==typeof j.event){var _=function(){var t="string"==typeof j.event?window[j.event]:j.event;return e.$toolbar.find('button[name="'.concat(E,'"]')).off("click").on("click",function(){return t.call(e)}),"continue"}();if("continue"===_){continue}}for(var N=function(){var t=l(D[F],2),i=t[0],n=t[1],o="string"==typeof n?window[n]:n;e.$toolbar.find('button[name="'.concat(E,'"]')).off(i).on(i,function(){return o.call(e)})},F=0,D=Object.entries(j.event);F'),W=q;if(i.showSearchButton||i.showSearchClearButton){var G=(i.showSearchButton?U:"")+(i.showSearchClearButton?z:"");W=i.search?gs.sprintf(this.constants.html.inputGroup,q,G):G}n.push(gs.sprintf('\n
    \n %s\n
    \n '),W)),this.$toolbar.append(n.join(""));var K=gs.getSearchInput(this);i.showSearchButton?(this.$toolbar.find(".search button[name=search]").off("click").on("click",function(){clearTimeout(a),a=setTimeout(function(){e.onSearch({currentTarget:K})},i.searchTimeOut)}),i.searchOnEnterKey&&M(K)):M(K),i.showSearchClearButton&&this.$toolbar.find(".search button[name=clearSearch]").click(function(){e.resetSearch()})}else{if("string"==typeof i.searchSelector){var Y=gs.getSearchInput(this);M(Y)}}}},{key:"onSearch",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.currentTarget,i=t.firedByInitSearchText,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!0;if(void 0!==e&&y["default"](e).length&&n){var o=y["default"](e).val().trim();if(this.options.trimOnSearch&&y["default"](e).val()!==o&&y["default"](e).val(o),this.searchText===o){return}(e===gs.getSearchInput(this)[0]||y["default"](e).hasClass("search-input"))&&(this.searchText=o,this.options.searchText=o)}i||(this.options.pageNumber=1),this.initSearch(),i?"client"===this.options.sidePagination&&this.updatePagination():this.updatePagination(),this.trigger("search",this.searchText)}},{key:"initSearch",value:function(){var t=this;if(this.filterOptions=this.filterOptions||this.options.filterOptions,"server"!==this.options.sidePagination){if(this.options.customSearch){return this.data=gs.calculateObjectValue(this.options,this.options.customSearch,[this.options.data,this.searchText,this.filterColumns]),void (this.options.sortReset&&(this.unsortedData=c(this.data)))}var e=this.searchText&&(this.fromHtml?gs.escapeHTML(this.searchText):this.searchText).toLowerCase(),i=gs.isEmptyObject(this.filterColumns)?null:this.filterColumns;"function"==typeof this.filterOptions.filterAlgorithm?this.data=this.options.data.filter(function(e){return t.filterOptions.filterAlgorithm.apply(null,[e,i])}):"string"==typeof this.filterOptions.filterAlgorithm&&(this.data=i?this.options.data.filter(function(e){var n=t.filterOptions.filterAlgorithm;if("and"===n){for(var o in i){if(Array.isArray(i[o])&&!i[o].includes(e[o])||!Array.isArray(i[o])&&e[o]!==i[o]){return !1}}}else{if("or"===n){var a=!1;for(var s in i){(Array.isArray(i[s])&&i[s].includes(e[s])||!Array.isArray(i[s])&&e[s]===i[s])&&(a=!0)}return a}}return !0}):c(this.options.data));var n=this.getVisibleFields();this.data=e?this.data.filter(function(i,o){for(var a=0;a|=<|>=|>|<)(?:\s+)?(\d+)?|(\d+)?(\s+)?(<=|=>|=<|>=|>|<))/gm,d=u.exec(e),f=!1;if(d){var p=d[1]||"".concat(d[5],"l"),g=d[2]||d[3],v=parseInt(l,10),b=parseInt(g,10);switch(p){case">":case"b;break;case"<":case">l":f=b>v;break;case"<=":case"=<":case">=l":case"=>l":f=b>=v;break;case">=":case"=>":case"<=l":case"==b}}if(f||"".concat(l).toLowerCase().includes(e)){return !0}}}}}return !1}):this.data,this.options.sortReset&&(this.unsortedData=c(this.data)),this.initSort()}}},{key:"initPagination",value:function(){var e=this,i=this.options;if(!i.pagination){return void this.$pagination.hide()}this.$pagination.show();var n,o,a,s,r,l,c,h=[],u=!1,d=this.getData({includeHiddenRows:!1}),f=i.pageList;if("string"==typeof f&&(f=f.replace(/\[|\]| /g,"").toLowerCase().split(",")),f=f.map(function(t){return"string"==typeof t?t.toLowerCase()===i.formatAllRows().toLowerCase()||["all","unlimited"].includes(t.toLowerCase())?i.formatAllRows():+t:t}),this.paginationParts=i.paginationParts,"string"==typeof this.paginationParts&&(this.paginationParts=this.paginationParts.replace(/\[|\]| |'/g,"").split(",")),"server"!==i.sidePagination&&(i.totalRows=d.length),this.totalPages=0,i.totalRows&&(i.pageSize===i.formatAllRows()&&(i.pageSize=i.totalRows,u=!0),this.totalPages=~~((i.totalRows-1)/i.pageSize)+1,i.totalPages=this.totalPages),this.totalPages>0&&i.pageNumber>this.totalPages&&(i.pageNumber=this.totalPages),this.pageFrom=(i.pageNumber-1)*i.pageSize+1,this.pageTo=i.pageNumber*i.pageSize,this.pageTo>i.totalRows&&(this.pageTo=i.totalRows),this.options.pagination&&"server"!==this.options.sidePagination&&(this.options.totalNotFiltered=this.options.data.length),this.options.showExtendedPagination||(this.options.totalNotFiltered=void 0),(this.paginationParts.includes("pageInfo")||this.paginationParts.includes("pageInfoShort")||this.paginationParts.includes("pageSize"))&&h.push('
    ')),this.paginationParts.includes("pageInfo")||this.paginationParts.includes("pageInfoShort")){var p=this.paginationParts.includes("pageInfoShort")?i.formatDetailPagination(i.totalRows):i.formatShowingRows(this.pageFrom,this.pageTo,i.totalRows,i.totalNotFiltered);h.push('\n '.concat(p,"\n "))}if(this.paginationParts.includes("pageSize")){h.push('');var g=['\n \n ").concat(this.constants.html.pageDropdown[0])];f.forEach(function(t,n){if(!i.smartDisplay||0===n||f[n-1]")),h.push(i.formatRecordsPerPage(g.join("")))}if((this.paginationParts.includes("pageInfo")||this.paginationParts.includes("pageInfoShort")||this.paginationParts.includes("pageSize"))&&h.push("
    "),this.paginationParts.includes("pageList")){h.push('
    '),gs.sprintf(this.constants.html.pagination[0],gs.sprintf(" pagination-%s",i.iconSize)),gs.sprintf(this.constants.html.paginationItem," page-pre",i.formatSRPaginationPreText(),i.paginationPreText)),this.totalPagesthis.totalPages-o&&(o=o-(i.paginationSuccessivelySize-(this.totalPages-o))+1),1>o&&(o=1),a>this.totalPages&&(a=this.totalPages);var v=Math.round(i.paginationPagesBySide/2),b=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return gs.sprintf(e.constants.html.paginationItem,n+(t===i.pageNumber?" ".concat(e.constants.classes.paginationActive):""),i.formatSRPaginationPageText(t),t)};if(o>1){var m=i.paginationPagesBySide;for(m>=o&&(m=o-1),n=1;m>=n;n++){h.push(b(n))}o-1===m+1?(n=o-1,h.push(b(n))):o-1>m&&(o-2*i.paginationPagesBySide>i.paginationPagesBySide&&i.paginationUseIntermediate?(n=Math.round((o-v)/2+v),h.push(b(n," page-intermediate"))):h.push(gs.sprintf(this.constants.html.paginationItem," page-first-separator disabled","","...")))}for(n=o;a>=n;n++){h.push(b(n))}if(this.totalPages>a){var y=this.totalPages-(i.paginationPagesBySide-1);for(a>=y&&(y=a+1),a+1===y-1?(n=a+1,h.push(b(n))):y>a+1&&(this.totalPages-a>2*i.paginationPagesBySide&&i.paginationUseIntermediate?(n=Math.round((this.totalPages-v-a)/2+a),h.push(b(n," page-intermediate"))):h.push(gs.sprintf(this.constants.html.paginationItem," page-last-separator disabled","","..."))),n=y;n<=this.totalPages;n++){h.push(b(n))}}h.push(gs.sprintf(this.constants.html.paginationItem," page-next",i.formatSRPaginationNextText(),i.paginationNextText)),h.push(this.constants.html.pagination[1],"
    ")}this.$pagination.html(h.join(""));var w=["bottom","both"].includes(i.paginationVAlign)?" ".concat(this.constants.classes.dropup):"";if(this.$pagination.last().find(".page-list > span").addClass(w),!i.onlyInfoPagination&&(s=this.$pagination.find(".page-list a"),r=this.$pagination.find(".page-pre"),l=this.$pagination.find(".page-next"),c=this.$pagination.find(".page-item").not(".page-next, .page-pre, .page-last-separator, .page-first-separator"),this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),i.smartDisplay&&(f.length<2||i.totalRows<=f[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"](),i.paginationLoop||(1===i.pageNumber&&r.addClass("disabled"),i.pageNumber===this.totalPages&&l.addClass("disabled")),u&&(i.pageSize=i.formatAllRows()),s.off("click").on("click",function(t){return e.onPageListChange(t)}),r.off("click").on("click",function(t){return e.onPagePre(t)}),l.off("click").on("click",function(t){return e.onPageNext(t)}),c.off("click").on("click",function(t){return e.onPageNumber(t)}),this.options.showPageGo)){var S=this,x=this.$pagination.find("ul.pagination"),k=x.find("li.pageGo");k.length||(k=t('
  • '+gs.sprintf('',this.options.pageNumber)+('
  • ").appendTo(x),k.find("button").click(function(){var t=parseInt(k.find("input").val())||1;(1>t||t>S.options.totalPages)&&(t=1),S.selectPage(t)}))}}},{key:"updatePagination",value:function(t){t&&y["default"](t.currentTarget).hasClass("disabled")||(this.options.maintainMetaData||this.resetRows(),this.initPagination(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize),"server"===this.options.sidePagination?this.initServer():this.initBody())}},{key:"onPageListChange",value:function(t){t.preventDefault();var e=y["default"](t.currentTarget);return e.parent().addClass(this.constants.classes.dropdownActive).siblings().removeClass(this.constants.classes.dropdownActive),this.options.pageSize=e.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+e.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(t),!1}},{key:"onPagePre",value:function(t){return t.preventDefault(),this.options.pageNumber-1===0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(t),!1}},{key:"onPageNext",value:function(t){return t.preventDefault(),this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(t),!1}},{key:"onPageNumber",value:function(t){return t.preventDefault(),this.options.pageNumber!==+y["default"](t.currentTarget).text()?(this.options.pageNumber=+y["default"](t.currentTarget).text(),this.updatePagination(t),!1):void 0}},{key:"initRow",value:function(t,e,i,n){var a=this,s=[],r={},c=[],h="",u={},d=[];if(!(gs.findIndex(this.hiddenRows,t)>-1)){if(r=gs.calculateObjectValue(this.options,this.options.rowStyle,[t,e],r),r&&r.css){for(var f=0,p=Object.entries(r.css);f"),this.options.cardView&&s.push('
    '));var A="";return gs.hasDetailViewIcon(this.options)&&(A="",gs.calculateObjectValue(null,this.options.detailFilter,[e,t])&&(A+='\n \n '.concat(gs.sprintf(this.constants.html.icon,this.options.iconsPrefix,this.options.icons.detailOpen),"\n \n ")),A+=""),A&&"right"!==this.options.detailViewAlign&&s.push(A),this.header.fields.forEach(function(i,n){var o="",r=gs.getItemField(t,i,a.options.escape),h="",u="",d={},f="",p=a.header.classes[n],g="",v="",b="",m="",y="",w="",S=a.columns[n];if((!a.fromHtml&&!a.autoMergeCells||void 0!==r||S.checkbox||S.radio)&&S.visible&&(!a.options.cardView||S.cardVisible)){if(S.escape&&(r=gs.escapeHTML(r)),c.concat([a.header.styles[n]]).length&&(v+="".concat(c.concat([a.header.styles[n]]).join("; "))),t["_".concat(i,"_style")]&&(v+="".concat(t["_".concat(i,"_style")])),v&&(g=' style="'.concat(v,'"')),t["_".concat(i,"_id")]&&(f=gs.sprintf(' id="%s"',t["_".concat(i,"_id")])),t["_".concat(i,"_class")]&&(p=gs.sprintf(' class="%s"',t["_".concat(i,"_class")])),t["_".concat(i,"_rowspan")]&&(m=gs.sprintf(' rowspan="%s"',t["_".concat(i,"_rowspan")])),t["_".concat(i,"_colspan")]&&(y=gs.sprintf(' colspan="%s"',t["_".concat(i,"_colspan")])),t["_".concat(i,"_title")]&&(w=gs.sprintf(' title="%s"',t["_".concat(i,"_title")])),d=gs.calculateObjectValue(a.header,a.header.cellStyles[n],[r,t,e,i],d),d.classes&&(p=' class="'.concat(d.classes,'"')),d.css){for(var x=[],k=0,O=Object.entries(d.css);k$1",R=h&&/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i.test(h);if(R){var E=(new DOMParser).parseFromString(""+h,"text/html").documentElement.textContent,j=E.replace(I,$);A=h.replace(RegExp("(>\\s*)(".concat(E,")(\\s*)"),"gm"),"$1".concat(j,"$3"))}else{A=(""+h).replace(I,$)}h=gs.calculateObjectValue(S,S.searchHighlightFormatter,[h,a.searchText],A)}if(t["_".concat(i,"_data")]&&!gs.isEmptyObject(t["_".concat(i,"_data")])){for(var _=0,N=Object.entries(t["_".concat(i,"_data")]);_'):'"))+'")+(a.header.formatters[n]&&"string"==typeof h?h:"")+(a.options.cardView?"
    ":""),t[a.header.stateField]=h===!0||!!r||h&&h.checked}else{if(a.options.cardView){var M=a.options.showHeader?'").concat(gs.getFieldTitle(a.columns,i),""):"";o='
    '.concat(M,'").concat(h,"
    "),a.options.smartDisplay&&""===h&&(o='
    ')}else{o="").concat(h,"")}}s.push(o)}}),A&&"right"===this.options.detailViewAlign&&s.push(A),this.options.cardView&&s.push("
    "),s.push(""),s.join("")}}},{key:"initBody",value:function(t){var e=this,i=this.getData();this.trigger("pre-body",i),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=y["default"]("").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=i.length);var n=[],o=y["default"](document.createDocumentFragment()),a=!1;this.autoMergeCells=gs.checkAutoMergeCells(i.slice(this.pageFrom-1,this.pageTo));for(var s=this.pageFrom-1;s'.concat(gs.sprintf('%s',this.getVisibleFields().length+gs.getDetailViewIndexOffset(this.options),this.options.formatNoMatches()),"")),t||this.scrollTo(0),this.initBodyEvent(),this.updateSelected(),this.initFooter(),this.resetView(),"server"!==this.options.sidePagination&&(this.options.totalRows=i.length),this.trigger("post-body",i)}},{key:"initBodyEvent",value:function(){var t=this;this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(e){var i=y["default"](e.currentTarget),n=i.parent(),o=y["default"](e.target).parents(".card-views").children(),a=y["default"](e.target).parents(".card-view"),s=n.data("index"),r=t.data[s],l=t.options.cardView?o.index(a):i[0].cellIndex,c=t.getVisibleFields(),h=c[l-gs.getDetailViewIndexOffset(t.options)],u=t.columns[t.fieldsColumnsIndex[h]],d=gs.getItemField(r,h,t.options.escape);if(!i.find(".detail-icon").length){if(t.trigger("click"===e.type?"click-cell":"dbl-click-cell",h,d,r,i),t.trigger("click"===e.type?"click-row":"dbl-click-row",r,n,h),"click"===e.type&&t.options.clickToSelect&&u.clickToSelect&&!gs.calculateObjectValue(t.options,t.options.ignoreClickToSelectOn,[e.target])){var f=n.find(gs.sprintf('[name="%s"]',t.options.selectItemName));f.length&&f[0].click()}"click"===e.type&&t.options.detailViewByClick&&t.toggleDetailView(s,t.header.detailFormatters[t.fieldsColumnsIndex[h]])}}).off("mousedown").on("mousedown",function(e){t.multipleSelectRowCtrlKey=e.ctrlKey||e.metaKey,t.multipleSelectRowShiftKey=e.shiftKey}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(e){return e.preventDefault(),t.toggleDetailView(y["default"](e.currentTarget).parent().parent().data("index")),!1}),this.$selectItem=this.$body.find(gs.sprintf('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(e){e.stopImmediatePropagation();var i=y["default"](e.currentTarget);t._toggleCheck(i.prop("checked"),i.data("index"))}),this.header.events.forEach(function(e,i){var n=e;if(n){"string"==typeof n&&(n=gs.calculateObjectValue(null,n));var o=t.header.fields[i],a=t.getVisibleFields().indexOf(o);if(-1!==a){a+=gs.getDetailViewIndexOffset(t.options);var s=function(e){if(!n.hasOwnProperty(e)){return"continue"}var i=n[e];t.$body.find(">tr:not(.no-records-found)").each(function(n,s){var r=y["default"](s),l=r.find(t.options.cardView?".card-views>.card-view":">td").eq(a),c=e.indexOf(" "),h=e.substring(0,c),u=e.substring(c+1);l.find(u).off(h).on(h,function(e){var n=r.data("index"),a=t.data[n],s=a[o];i.apply(t,[e,s,a,n])})})};for(var r in n){s(r)}}}})}},{key:"initServer",value:function(t,e,i){var n=this,o={},a=this.header.fields.indexOf(this.options.sortName),s={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};if(this.header.sortNames[a]&&(s.sortName=this.header.sortNames[a]),this.options.pagination&&"server"===this.options.sidePagination&&(s.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,s.pageNumber=this.options.pageNumber),!this.options.firstLoad&&!firstLoadTable.includes(this.options.id)){return void firstLoadTable.push(this.options.id)}if(i||this.options.url||this.options.ajax){if("limit"===this.options.queryParamsType&&(s={search:s.searchText,sort:s.sortName,order:s.sortOrder},this.options.pagination&&"server"===this.options.sidePagination&&(s.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1),s.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,0===s.limit&&delete s.limit)),this.options.search&&"server"===this.options.sidePagination&&this.columns.filter(function(t){return !t.searchable}).length){s.searchable=[];var r,l=m(this.columns);try{for(l.s();!(r=l.n()).done;){var c=r.value;!c.checkbox&&c.searchable&&(this.options.visibleSearch&&c.visible||!this.options.visibleSearch)&&s.searchable.push(c.field)}}catch(h){l.e(h)}finally{l.f()}}if(gs.isEmptyObject(this.filterColumnsPartial)||(s.filter=JSON.stringify(this.filterColumnsPartial,null)),y["default"].extend(s,e||{}),o=gs.calculateObjectValue(this.options,this.options.queryParams,[s],o),o!==!1){t||this.showLoading();var u=y["default"].extend({},gs.calculateObjectValue(null,this.options.ajaxOptions),{type:this.options.method,url:i||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(o):o,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(e,i,o){var a=gs.calculateObjectValue(n.options,n.options.responseHandler,[e,o],e);n.load(a),n.trigger("load-success",a,o&&o.status,o),t||n.hideLoading(),"server"===n.options.sidePagination&&a[n.options.totalField]>0&&!a[n.options.dataField].length&&n.updatePagination()},error:function(e){var i=[];"server"===n.options.sidePagination&&(i={},i[n.options.totalField]=0,i[n.options.dataField]=[]),n.load(i),n.trigger("load-error",e&&e.status,e),t||n.$tableLoading.hide()}});return this.options.ajax?gs.calculateObjectValue(this,this.options.ajax,[u],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=y["default"].ajax(u)),o}}}},{key:"initSearchText",value:function(){if(this.options.search&&(this.searchText="",""!==this.options.searchText)){var t=gs.getSearchInput(this);t.val(this.options.searchText),this.onSearch({currentTarget:t,firedByInitSearchText:!0})}}},{key:"getCaret",value:function(){var t=this;this.$header.find("th").each(function(e,i){y["default"](i).find(".sortable").removeClass("desc asc").addClass(y["default"](i).data("field")===t.options.sortName?t.options.sortOrder:"both")})}},{key:"updateSelected",value:function(){var t=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",t),this.$selectItem.each(function(t,e){y["default"](e).closest("tr")[y["default"](e).prop("checked")?"addClass":"removeClass"]("selected")})}},{key:"updateRows",value:function(){var t=this;this.$selectItem.each(function(e,i){t.data[y["default"](i).data("index")][t.header.stateField]=y["default"](i).prop("checked")})}},{key:"resetRows",value:function(){var t,e=m(this.data);try{for(e.s();!(t=e.n()).done;){var i=t.value;this.$selectAll.prop("checked",!1),this.$selectItem.prop("checked",!1),this.header.stateField&&(i[this.header.stateField]=!1)}}catch(n){e.e(n)}finally{e.f()}this.initHiddenRows()}},{key:"trigger",value:function(t){for(var i,n,o="".concat(t,".bs.table"),a=arguments.length,s=Array(a>1?a-1:0),r=1;a>r;r++){s[r-1]=arguments[r]}(i=this.options)[e.EVENTS[o]].apply(i,[].concat(s,[this])),this.$el.trigger(y["default"].Event(o,{sender:this}),s),(n=this.options).onAll.apply(n,[o].concat([].concat(s,[this]))),this.$el.trigger(y["default"].Event("all.bs.table",{sender:this}),[o,s])}},{key:"resetHeader",value:function(){var t=this;clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(function(){return t.fitHeader()},this.$el.is(":hidden")?100:0)}},{key:"fitHeader",value:function(){var t=this;if(this.$el.is(":hidden")){return void (this.timeoutId_=setTimeout(function(){return t.fitHeader()},100))}var e=this.$tableBody.get(0),i=e.scrollWidth>e.clientWidth&&e.scrollHeight>e.clientHeight+this.$header.outerHeight()?gs.getScrollBarWidth():0;this.$el.css("margin-top",-this.$header.outerHeight());var n=y["default"](":focus");if(n.length>0){var o=n.parents("th");if(o.length>0){var a=o.attr("data-field");if(void 0!==a){var s=this.$header.find("[data-field='".concat(a,"']"));s.length>0&&s.find(":input").addClass("focus-temp")}}}this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css("margin-right",i).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),this.$tableLoading.css("width",this.$el.outerWidth());var r=y["default"](".focus-temp:visible:eq(0)");r.length>0&&(r.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(e,i){t.$header_.find(gs.sprintf('th[data-field="%s"]',y["default"](i).data("field"))).data(y["default"](i).data())});for(var l=this.getVisibleFields(),c=this.$header_.find("th"),h=this.$body.find(">tr:not(.no-records-found,.virtual-scroll-top)").eq(0);h.length&&h.find('>td[colspan]:not([colspan="1"])').length;){h=h.next()}var u=h.find("> *").length;h.find("> *").each(function(e,i){var n=y["default"](i);if(gs.hasDetailViewIcon(t.options)&&(0===e&&"right"!==t.options.detailViewAlign||e===u-1&&"right"===t.options.detailViewAlign)){var o=c.filter(".detail"),a=o.innerWidth()-o.find(".fht-cell").width(); +return void o.find(".fht-cell").width(n.innerWidth()-a)}var s=e-gs.getDetailViewIndexOffset(t.options),r=t.$header_.find(gs.sprintf('th[data-field="%s"]',l[s]));r.length>1&&(r=y["default"](c[n[0].cellIndex]));var h=r.innerWidth()-r.find(".fht-cell").width();r.find(".fht-cell").width(n.innerWidth()-h)}),this.horizontalScroll(),this.trigger("post-header")}},{key:"initFooter",value:function(){if(this.options.showFooter&&!this.options.cardView){var t=this.getData(),e=[],i="";gs.hasDetailViewIcon(this.options)&&(i='
    '),i&&"right"!==this.options.detailViewAlign&&e.push(i);var n,o=m(this.columns);try{for(o.s();!(n=o.n()).done;){var a=n.value,s="",r="",c=[],h={},u=gs.sprintf(' class="%s"',a["class"]);if(a.visible&&(!(this.footerData&&this.footerData.length>0)||a.field in this.footerData[0])){if(this.options.cardView&&!a.cardVisible){return}if(s=gs.sprintf("text-align: %s; ",a.falign?a.falign:a.align),r=gs.sprintf("vertical-align: %s; ",a.valign),h=gs.calculateObjectValue(null,this.options.footerStyle,[a]),h&&h.css){for(var d=0,f=Object.entries(h.css);d0&&(b=this.footerData[0]["_".concat(a.field,"_colspan")]||0),b&&e.push(' colspan="'.concat(b,'" ')),e.push(">"),e.push('
    ');var y="";this.footerData&&this.footerData.length>0&&(y=this.footerData[0][a.field]||""),e.push(gs.calculateObjectValue(a,a.footerFormatter,[t,y],y)),e.push("
    "),e.push('
    '),e.push("
    "),e.push("")}}}catch(w){o.e(w)}finally{o.f()}i&&"right"===this.options.detailViewAlign&&e.push(i),this.options.height||this.$tableFooter.length||(this.$el.append(""),this.$tableFooter=this.$el.find("tfoot")),this.$tableFooter.find("tr").html(e.join("")),this.trigger("post-footer",this.$tableFooter)}}},{key:"fitFooter",value:function(){var t=this;if(this.$el.is(":hidden")){return void setTimeout(function(){return t.fitFooter()},100)}var e=this.$tableBody.get(0),i=e.scrollWidth>e.clientWidth&&e.scrollHeight>e.clientHeight+this.$header.outerHeight()?gs.getScrollBarWidth():0;this.$tableFooter.css("margin-right",i).find("table").css("width",this.$el.outerWidth()).attr("class",this.$el.attr("class"));var n=this.$tableFooter.find("th"),o=this.$body.find(">tr:first-child:not(.no-records-found)");for(n.find(".fht-cell").width("auto");o.length&&o.find('>td[colspan]:not([colspan="1"])').length;){o=o.next()}var a=o.find("> *").length;o.find("> *").each(function(e,i){var o=y["default"](i);if(gs.hasDetailViewIcon(t.options)&&(0===e&&"left"===t.options.detailViewAlign||e===a-1&&"right"===t.options.detailViewAlign)){var s=n.filter(".detail"),r=s.innerWidth()-s.find(".fht-cell").width();return void s.find(".fht-cell").width(o.innerWidth()-r)}var l=n.eq(e),c=l.innerWidth()-l.find(".fht-cell").width();l.find(".fht-cell").width(o.innerWidth()-c)}),this.horizontalScroll()}},{key:"horizontalScroll",value:function(){var t=this;this.$tableBody.off("scroll").on("scroll",function(){var e=t.$tableBody.scrollLeft();t.options.showHeader&&t.options.height&&t.$tableHeader.scrollLeft(e),t.options.showFooter&&!t.options.cardView&&t.$tableFooter.scrollLeft(e),t.trigger("scroll-body",t.$tableBody)})}},{key:"getVisibleFields",value:function(){var t,e=[],i=m(this.header.fields);try{for(i.s();!(t=i.n()).done;){var n=t.value,o=this.columns[this.fieldsColumnsIndex[n]];o&&o.visible&&e.push(n)}}catch(a){i.e(a)}finally{i.f()}return e}},{key:"initHiddenRows",value:function(){this.hiddenRows=[]}},{key:"getOptions",value:function(){var t=y["default"].extend({},this.options);return delete t.data,y["default"].extend(!0,{},t)}},{key:"refreshOptions",value:function(t){gs.compareObjects(this.options,t,!0)||(this.options=y["default"].extend(this.options,t),this.trigger("refresh-options",this.options),this.destroy(),this.init())}},{key:"getData",value:function(t){var e=this,i=this.options.data;if(!(this.searchText||this.options.customSearch||void 0!==this.options.sortName||this.enableCustomSort)&&gs.isEmptyObject(this.filterColumns)&&gs.isEmptyObject(this.filterColumnsPartial)||t&&t.unfiltered||(i=this.data),t&&t.useCurrentPage&&(i=i.slice(this.pageFrom-1,this.pageTo)),t&&!t.includeHiddenRows){var n=this.getHiddenRows();i=i.filter(function(t){return -1===gs.findIndex(n,t)})}return t&&t.formatted&&i.forEach(function(t){for(var i=0,n=Object.entries(t);i=0;i--){var n=this.options.data[i];(n.hasOwnProperty(t.field)||"$index"===t.field)&&(!n.hasOwnProperty(t.field)&&"$index"===t.field&&t.values.includes(i)||t.values.includes(n[t.field]))&&(e++,this.options.data.splice(i,1))}e&&("server"===this.options.sidePagination&&(this.options.totalRows-=e,this.data=c(this.options.data)),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))}},{key:"removeAll",value:function(){this.options.data.length>0&&(this.options.data.splice(0,this.options.data.length),this.initSearch(),this.initPagination(),this.initBody(!0))}},{key:"insertRow",value:function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("row")&&(this.options.data.splice(t.index,0,t.row),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))}},{key:"updateRow",value:function(t){var e,i=Array.isArray(t)?t:[t],n=m(i);try{for(n.s();!(e=n.n()).done;){var o=e.value;o.hasOwnProperty("index")&&o.hasOwnProperty("row")&&(o.hasOwnProperty("replace")&&o.replace?this.options.data[o.index]=o.row:y["default"].extend(this.options.data[o.index],o.row))}}catch(a){n.e(a)}finally{n.f()}this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)}},{key:"getRowByUniqueId",value:function(t){var e,i,n,o=this.options.uniqueId,a=this.options.data.length,s=t,r=null;for(e=a-1;e>=0;e--){if(i=this.options.data[e],i.hasOwnProperty(o)){n=i[o]}else{if(!i._data||!i._data.hasOwnProperty(o)){continue}n=i._data[o]}if("string"==typeof n?s=""+s:"number"==typeof n&&(+n===n&&n%1===0?s=parseInt(s):n===+n&&0!==n&&(s=parseFloat(s))),n===s){r=i;break}}return r}},{key:"updateByUniqueId",value:function(t){var e,i=Array.isArray(t)?t:[t],n=m(i);try{for(n.s();!(e=n.n()).done;){var o=e.value;if(o.hasOwnProperty("id")&&o.hasOwnProperty("row")){var a=this.options.data.indexOf(this.getRowByUniqueId(o.id));-1!==a&&(o.hasOwnProperty("replace")&&o.replace?this.options.data[a]=o.row:y["default"].extend(this.options.data[a],o.row))}}}catch(s){n.e(s)}finally{n.f()}this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)}},{key:"removeByUniqueId",value:function(t){var e=this.options.data.length,i=this.getRowByUniqueId(t);i&&this.options.data.splice(this.options.data.indexOf(i),1),e!==this.options.data.length&&("server"===this.options.sidePagination&&(this.options.totalRows-=1,this.data=c(this.options.data)),this.initSearch(),this.initPagination(),this.initBody(!0))}},{key:"updateCell",value:function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("field")&&t.hasOwnProperty("value")&&(this.data[t.index][t.field]=t.value,t.reinit!==!1&&(this.initSort(),this.initBody(!0)))}},{key:"updateCellByUniqueId",value:function(t){var e=this,i=Array.isArray(t)?t:[t];i.forEach(function(t){var i=t.id,n=t.field,o=t.value,a=e.options.data.indexOf(e.getRowByUniqueId(i));-1!==a&&(e.options.data[a][n]=o)}),t.reinit!==!1&&(this.initSort(),this.initBody(!0))}},{key:"showRow",value:function(t){this._toggleRow(t,!0)}},{key:"hideRow",value:function(t){this._toggleRow(t,!1)}},{key:"_toggleRow",value:function(t,e){var i;if(t.hasOwnProperty("index")?i=this.getData()[t.index]:t.hasOwnProperty("uniqueId")&&(i=this.getRowByUniqueId(t.uniqueId)),i){var n=gs.findIndex(this.hiddenRows,i);e||-1!==n?e&&n>-1&&this.hiddenRows.splice(n,1):this.hiddenRows.push(i),this.initBody(!0),this.initPagination()}}},{key:"getHiddenRows",value:function(t){if(t){return this.initHiddenRows(),this.initBody(!0),void this.initPagination()}var e,i=this.getData(),n=[],o=m(i);try{for(o.s();!(e=o.n()).done;){var a=e.value;this.hiddenRows.includes(a)&&n.push(a)}}catch(s){o.e(s)}finally{o.f()}return this.hiddenRows=n,n}},{key:"showColumn",value:function(t){var e=this,i=Array.isArray(t)?t:[t];i.forEach(function(t){e._toggleColumn(e.fieldsColumnsIndex[t],!0,!0)})}},{key:"hideColumn",value:function(t){var e=this,i=Array.isArray(t)?t:[t];i.forEach(function(t){e._toggleColumn(e.fieldsColumnsIndex[t],!1,!0)})}},{key:"_toggleColumn",value:function(t,e,i){if(-1!==t&&this.columns[t].visible!==e&&(this.columns[t].visible=e,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var n=this.$toolbar.find('.keep-open input:not(".toggle-all")').prop("disabled",!1);i&&n.filter(gs.sprintf('[value="%s"]',t)).prop("checked",e),n.filter(":checked").length<=this.options.minimumCountColumns&&n.filter(":checked").prop("disabled",!0)}}},{key:"getVisibleColumns",value:function(){var t=this;return this.columns.filter(function(e){return e.visible&&!t.isSelectionColumn(e)})}},{key:"getHiddenColumns",value:function(){return this.columns.filter(function(t){var e=t.visible;return !e})}},{key:"isSelectionColumn",value:function(t){return t.radio||t.checkbox}},{key:"showAllColumns",value:function(){this._toggleAllColumns(!0)}},{key:"hideAllColumns",value:function(){this._toggleAllColumns(!1)}},{key:"_toggleAllColumns",value:function(t){var e,i=this,n=m(this.columns.slice().reverse());try{for(n.s();!(e=n.n()).done;){var o=e.value;if(o.switchable){if(!t&&this.options.showColumns&&this.getVisibleColumns().length===this.options.minimumCountColumns){continue}o.visible=t}}}catch(a){n.e(a)}finally{n.f()}if(this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns){var s=this.$toolbar.find('.keep-open input[type="checkbox"]:not(".toggle-all")').prop("disabled",!1);t?s.prop("checked",t):s.get().reverse().forEach(function(e){s.filter(":checked").length>i.options.minimumCountColumns&&y["default"](e).prop("checked",t)}),s.filter(":checked").length<=this.options.minimumCountColumns&&s.filter(":checked").prop("disabled",!0)}}},{key:"mergeCells",value:function(t){var e,i,n=t.index,o=this.getVisibleFields().indexOf(t.field),a=t.rowspan||1,s=t.colspan||1,r=this.$body.find(">tr");o+=gs.getDetailViewIndexOffset(this.options);var l=r.eq(n).find(">td").eq(o);if(!(0>n||0>o||n>=this.data.length)){for(e=n;n+a>e;e++){for(i=o;o+s>i;i++){r.eq(e).find(">td").eq(i).hide()}}l.attr("rowspan",a).attr("colspan",s).show()}}},{key:"checkAll",value:function(){this._toggleCheckAll(!0)}},{key:"uncheckAll",value:function(){this._toggleCheckAll(!1)}},{key:"_toggleCheckAll",value:function(t){var e=this.getSelections();this.$selectAll.add(this.$selectAll_).prop("checked",t),this.$selectItem.filter(":enabled").prop("checked",t),this.updateRows(),this.updateSelected();var i=this.getSelections();return t?void this.trigger("check-all",i,e):void this.trigger("uncheck-all",i,e)}},{key:"checkInvert",value:function(){var t=this.$selectItem.filter(":enabled"),e=t.filter(":checked");t.each(function(t,e){y["default"](e).prop("checked",!y["default"](e).prop("checked"))}),this.updateRows(),this.updateSelected(),this.trigger("uncheck-some",e),e=this.getSelections(),this.trigger("check-some",e)}},{key:"check",value:function(t){this._toggleCheck(!0,t)}},{key:"uncheck",value:function(t){this._toggleCheck(!1,t)}},{key:"_toggleCheck",value:function(t,e){var i=this.$selectItem.filter('[data-index="'.concat(e,'"]')),n=this.data[e];if(i.is(":radio")||this.options.singleSelect||this.options.multipleSelectRow&&!this.multipleSelectRowCtrlKey&&!this.multipleSelectRowShiftKey){var o,a=m(this.options.data);try{for(a.s();!(o=a.n()).done;){var s=o.value;s[this.header.stateField]=!1}}catch(r){a.e(r)}finally{a.f()}this.$selectItem.filter(":checked").not(i).prop("checked",!1)}if(n[this.header.stateField]=t,this.options.multipleSelectRow){if(this.multipleSelectRowShiftKey&&this.multipleSelectRowLastSelectedIndex>=0){for(var c=this.multipleSelectRowLastSelectedIndexf;f++){this.data[f][this.header.stateField]=!0,this.$selectItem.filter('[data-index="'.concat(f,'"]')).prop("checked",!0)}}this.multipleSelectRowCtrlKey=!1,this.multipleSelectRowShiftKey=!1,this.multipleSelectRowLastSelectedIndex=t?e:-1}i.prop("checked",t),this.updateSelected(),this.trigger(t?"check":"uncheck",this.data[e],i)}},{key:"checkBy",value:function(t){this._toggleCheckBy(!0,t)}},{key:"uncheckBy",value:function(t){this._toggleCheckBy(!1,t)}},{key:"_toggleCheckBy",value:function(t,e){var i=this;if(e.hasOwnProperty("field")&&e.hasOwnProperty("values")){var n=[];this.data.forEach(function(o,a){if(!o.hasOwnProperty(e.field)){return !1}if(e.values.includes(o[e.field])){var s=i.$selectItem.filter(":enabled").filter(gs.sprintf('[data-index="%s"]',a));if(s=t?s.not(":checked"):s.filter(":checked"),!s.length){return}s.prop("checked",t),o[i.header.stateField]=t,n.push(o),i.trigger(t?"check":"uncheck",o,s)}}),this.updateSelected(),this.trigger(t?"check-some":"uncheck-some",n)}}},{key:"refresh",value:function(t){t&&t.url&&(this.options.url=t.url),t&&t.pageNumber&&(this.options.pageNumber=t.pageNumber),t&&t.pageSize&&(this.options.pageSize=t.pageSize),table.rememberSelecteds={},table.rememberSelectedIds={},this.trigger("refresh",this.initServer(t&&t.silent,t&&t.query,t&&t.url))}},{key:"destroy",value:function(){this.$el.insertBefore(this.$container),y["default"](this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")}},{key:"resetView",value:function(t){var e=0;if(t&&t.height&&(this.options.height=t.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.$tableContainer.toggleClass("has-card-view",this.options.cardView),!this.options.cardView&&this.options.showHeader&&this.options.height?(this.$tableHeader.show(),this.resetHeader(),e+=this.$header.outerHeight(!0)+1):(this.$tableHeader.hide(),this.trigger("post-header")),!this.options.cardView&&this.options.showFooter&&(this.$tableFooter.show(),this.fitFooter(),this.options.height&&(e+=this.$tableFooter.outerHeight(!0))),this.$container.hasClass("fullscreen")){this.$tableContainer.css("height",""),this.$tableContainer.css("width","")}else{if(this.options.height){this.$tableBorder&&(this.$tableBorder.css("width",""),this.$tableBorder.css("height",""));var i=this.$toolbar.outerHeight(!0),n=this.$pagination.outerHeight(!0),o=this.options.height-i-n,a=this.$tableBody.find(">table"),s=a.outerHeight();if(this.$tableContainer.css("height","".concat(o,"px")),this.$tableBorder&&a.is(":visible")){var r=o-s-2;this.$tableBody[0].scrollWidth-this.$tableBody.innerWidth()&&(r-=gs.getScrollBarWidth()),this.$tableBorder.css("width","".concat(a.outerWidth(),"px")),this.$tableBorder.css("height","".concat(r,"px"))}}}this.options.cardView?(this.$el.css("margin-top","0"),this.$tableContainer.css("padding-bottom","0"),this.$tableFooter.hide()):(this.getCaret(),this.$tableContainer.css("padding-bottom","".concat(e,"px"))),this.trigger("reset-view")}},{key:"showLoading",value:function(){this.$tableLoading.toggleClass("open",!0);var t=this.options.loadingFontSize;"auto"===this.options.loadingFontSize&&(t=0.04*this.$tableLoading.width(),t=Math.max(12,t),t=Math.min(32,t),t="".concat(t,"px")),this.$tableLoading.find(".loading-text").css("font-size",t)}},{key:"hideLoading",value:function(){this.$tableLoading.toggleClass("open",!1)}},{key:"toggleShowSearch",value:function(){this.$el.parents(".select-table").siblings().slideToggle()}},{key:"togglePagination",value:function(){this.options.pagination=!this.options.pagination;var t=this.options.showButtonIcons?this.options.pagination?this.options.icons.paginationSwitchDown:this.options.icons.paginationSwitchUp:"",e=this.options.showButtonText?this.options.pagination?this.options.formatPaginationSwitchUp():this.options.formatPaginationSwitchDown():"";this.$toolbar.find('button[name="paginationSwitch"]').html("".concat(gs.sprintf(this.constants.html.icon,this.options.iconsPrefix,t)," ").concat(e)),this.updatePagination()}},{key:"toggleFullscreen",value:function(){this.$el.closest(".bootstrap-table").toggleClass("fullscreen"),this.resetView()}},{key:"toggleView",value:function(){this.options.cardView=!this.options.cardView,this.initHeader();var t=this.options.showButtonIcons?this.options.cardView?this.options.icons.toggleOn:this.options.icons.toggleOff:"",e=this.options.showButtonText?this.options.cardView?this.options.formatToggleOff():this.options.formatToggleOn():"";this.$toolbar.find('button[name="toggle"]').html("".concat(gs.sprintf(this.constants.html.icon,this.options.iconsPrefix,t)," ").concat(e)),this.initBody(),this.trigger("toggle",this.options.cardView)}},{key:"resetSearch",value:function(t){var e=gs.getSearchInput(this);e.val(t||""),this.onSearch({currentTarget:e})}},{key:"filterBy",value:function(t,e){this.filterOptions=gs.isEmptyObject(e)?this.options.filterOptions:y["default"].extend(this.options.filterOptions,e),this.filterColumns=gs.isEmptyObject(t)?{}:t,this.options.pageNumber=1,this.initSearch(),this.updatePagination()}},{key:"scrollTo",value:function i(t){var e={unit:"px",value:0};"object"===o(t)?e=Object.assign(e,t):"string"==typeof t&&"bottom"===t?e.value=this.$tableBody[0].scrollHeight:("string"==typeof t||"number"==typeof t)&&(e.value=t);var i=e.value;"rows"===e.unit&&(i=0,this.$body.find("> tr:lt(".concat(e.value,")")).each(function(t,e){i+=y["default"](e).outerHeight(!0)})),this.$tableBody.scrollTop(i)}},{key:"getScrollPosition",value:function(){return this.$tableBody.scrollTop()}},{key:"selectPage",value:function(t){t>0&&t<=this.options.totalPages&&(this.options.pageNumber=t,this.updatePagination())}},{key:"prevPage",value:function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())}},{key:"nextPage",value:function(){this.options.pageNumber tr[data-index="%s"]',t));i.next().is("tr.detail-view")?this.collapseRow(t):this.expandRow(t,e),this.resetView()}},{key:"expandRow",value:function(t,e){var i=this.data[t],n=this.$body.find(gs.sprintf('> tr[data-index="%s"][data-has-detail-view]',t));if(!n.next().is("tr.detail-view")){this.options.detailViewIcon&&n.find("a.detail-icon").html(gs.sprintf(this.constants.html.icon,this.options.iconsPrefix,this.options.icons.detailClose)),n.after(gs.sprintf('',n.children("td").length));var o=n.next().find("td"),a=e||this.options.detailFormatter,s=gs.calculateObjectValue(this.options,a,[t,i,o],"");1===o.length&&o.append(s),this.trigger("expand-row",t,i,o)}}},{key:"expandRowByUniqueId",value:function(t){var e=this.getRowByUniqueId(t);e&&this.expandRow(this.data.indexOf(e))}},{key:"collapseRow",value:function(t){var e=this.data[t],i=this.$body.find(gs.sprintf('> tr[data-index="%s"][data-has-detail-view]',t));i.next().is("tr.detail-view")&&(this.options.detailViewIcon&&i.find("a.detail-icon").html(gs.sprintf(this.constants.html.icon,this.options.iconsPrefix,this.options.icons.detailOpen)),this.trigger("collapse-row",t,e,i.next()),i.next().remove())}},{key:"collapseRowByUniqueId",value:function(t){var e=this.getRowByUniqueId(t);e&&this.collapseRow(this.data.indexOf(e))}},{key:"expandAllRows",value:function(){for(var t=this.$body.find("> tr[data-index][data-has-detail-view]"),e=0;e tr[data-index][data-has-detail-view]"),e=0;e1?e-1:0),n=1;e>n;n++){i[n-1]=arguments[n]}var a;return this.each(function(e,n){var s=y["default"](n).data("bootstrap.table"),r=y["default"].extend({},ys.DEFAULTS,y["default"](n).data(),"object"===o(t)&&t);if("string"==typeof t){var l;if(!ns.METHODS.includes(t)){throw Error("Unknown method: ".concat(t))}if(!s){return}a=(l=s)[t].apply(l,i),"destroy"===t&&y["default"](n).removeData("bootstrap.table")}s||(s=new y["default"].BootstrapTable(n,r),y["default"](n).data("bootstrap.table",s),s.init())}),void 0===a?this:a},y["default"].fn.bootstrapTable.Constructor=ys,y["default"].fn.bootstrapTable.theme=ns.THEME,y["default"].fn.bootstrapTable.VERSION=ns.VERSION,y["default"].fn.bootstrapTable.defaults=ys.DEFAULTS,y["default"].fn.bootstrapTable.columnDefaults=ys.COLUMN_DEFAULTS,y["default"].fn.bootstrapTable.events=ys.EVENTS,y["default"].fn.bootstrapTable.locales=ys.LOCALES,y["default"].fn.bootstrapTable.methods=ys.METHODS,y["default"].fn.bootstrapTable.utils=gs,y["default"](function(){y["default"]('[data-toggle="table"]').bootstrapTable()}),ys});var TABLE_EVENTS="all.bs.table click-cell.bs.table dbl-click-cell.bs.table click-row.bs.table dbl-click-row.bs.table sort.bs.table check.bs.table uncheck.bs.table onUncheck check-all.bs.table uncheck-all.bs.table check-some.bs.table uncheck-some.bs.table load-success.bs.table load-error.bs.table column-switch.bs.table page-change.bs.table search.bs.table toggle.bs.table show-search.bs.table expand-row.bs.table collapse-row.bs.table refresh-options.bs.table reset-view.bs.table refresh.bs.table",firstLoadTable=[],union=function(t,e){return $.isPlainObject(e)?addRememberRow(t,e):$.isArray(e)?$.each(e,function(e,i){$.isPlainObject(i)?addRememberRow(t,i):-1==$.inArray(i,t)&&(t[t.length]=i)}):-1==$.inArray(e,t)&&(t[t.length]=e),t},difference=function(t,e){if($.isPlainObject(e)){removeRememberRow(t,e)}else{if($.isArray(e)){$.each(e,function(e,i){if($.isPlainObject(i)){removeRememberRow(t,i)}else{var n=$.inArray(i,t);-1!=n&&t.splice(n,1)}})}else{var i=$.inArray(e,t);-1!=i&&t.splice(i,1)}}return t},_={union:union,difference:difference}; \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js b/src/main/resources/static/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js new file mode 100644 index 0000000..8a5b44d --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js @@ -0,0 +1,93 @@ +/** + * @author: Alec Fenichel + * @webSite: https://fenichelar.com + * @update: zhixin wen + */ + +var Utils = $.fn.bootstrapTable.utils + +$.extend($.fn.bootstrapTable.defaults, { + autoRefresh: false, + autoRefreshInterval: 60, + autoRefreshSilent: true, + autoRefreshStatus: true, + autoRefreshFunction: null +}) + +$.extend($.fn.bootstrapTable.defaults.icons, { + autoRefresh: { + bootstrap3: 'glyphicon-time icon-time', + materialize: 'access_time', + 'bootstrap-table': 'icon-clock' + }[$.fn.bootstrapTable.theme] || 'fa-clock' +}) + +$.extend($.fn.bootstrapTable.locales, { + formatAutoRefresh () { + return 'Auto Refresh' + } +}) + +$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales) + +$.BootstrapTable = class extends $.BootstrapTable { + init (...args) { + super.init(...args) + + if (this.options.autoRefresh && this.options.autoRefreshStatus) { + this.setupRefreshInterval() + } + } + + initToolbar (...args) { + if (this.options.autoRefresh) { + this.buttons = Object.assign(this.buttons, { + autoRefresh: { + html: ` + + `, + event: this.toggleAutoRefresh + } + }) + } + + super.initToolbar(...args) + } + + toggleAutoRefresh () { + if (this.options.autoRefresh) { + if (this.options.autoRefreshStatus) { + clearInterval(this.options.autoRefreshFunction) + this.$toolbar.find('>.columns .auto-refresh') + .removeClass(this.constants.classes.buttonActive) + } else { + this.setupRefreshInterval() + this.$toolbar.find('>.columns .auto-refresh') + .addClass(this.constants.classes.buttonActive) + } + this.options.autoRefreshStatus = !this.options.autoRefreshStatus + } + } + + destroy () { + if (this.options.autoRefresh && this.options.autoRefreshStatus) { + clearInterval(this.options.autoRefreshFunction) + } + + super.destroy() + } + + setupRefreshInterval () { + this.options.autoRefreshFunction = setInterval(() => { + if (!this.options.autoRefresh || !this.options.autoRefreshStatus) { + return + } + this.refresh({ silent: this.options.autoRefreshSilent }) + }, this.options.autoRefreshInterval * 1000) + } +} diff --git a/src/main/resources/static/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js b/src/main/resources/static/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js new file mode 100644 index 0000000..32ce476 --- /dev/null +++ b/src/main/resources/static/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js @@ -0,0 +1,10 @@ +/** + * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation) + * + * @version v1.18.2 + * @homepage https://bootstrap-table.com + * @author wenzhixin (http://wenzhixin.net.cn/) + * @license MIT + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i=function(t){return t&&t.Math==Math&&t},u=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof r&&r)||function(){return this}()||Function("return this")(),c=function(t){try{return!!t()}catch(t){return!0}},f=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,l={f:s&&!a.call({1:2},1)?function(t){var e=s(this,t);return!!e&&e.enumerable}:a},p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},h={}.toString,y=function(t){return h.call(t).slice(8,-1)},b="".split,d=c((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==y(t)?b.call(t,""):Object(t)}:Object,v=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=function(t){return d(v(t))},m=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=function(t,e){if(!m(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!m(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!m(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!m(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,j=function(t,e){return w.call(t,e)},S=u.document,R=m(S)&&m(S.createElement),T=function(t){return R?S.createElement(t):{}},P=!f&&!c((function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a})),A=Object.getOwnPropertyDescriptor,E={f:f?A:function(t,e){if(t=g(t),e=O(e,!0),P)try{return A(t,e)}catch(t){}if(j(t,e))return p(!l.f.call(t,e),t[e])}},x=function(t){if(!m(t))throw TypeError(String(t)+" is not an object");return t},_=Object.defineProperty,I={f:f?_:function(t,e,n){if(x(t),e=O(e,!0),x(n),P)try{return _(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},k=f?function(t,e,n){return I.f(t,e,p(1,n))}:function(t,e,n){return t[e]=n,t},C=function(t,e){try{k(u,t,e)}catch(n){u[t]=e}return e},F="__core-js_shared__",M=u[F]||C(F,{}),D=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(t){return D.call(t)});var q,B,L,N=M.inspectSource,z=u.WeakMap,W="function"==typeof z&&/native code/.test(N(z)),G=o((function(t){(t.exports=function(t,e){return M[t]||(M[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.1",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),$=0,K=Math.random(),Q=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++$+K).toString(36)},V=G("keys"),X=function(t){return V[t]||(V[t]=Q(t))},Y={},H=u.WeakMap;if(W){var J=M.state||(M.state=new H),U=J.get,Z=J.has,tt=J.set;q=function(t,e){return e.facade=t,tt.call(J,t,e),e},B=function(t){return U.call(J,t)||{}},L=function(t){return Z.call(J,t)}}else{var et=X("state");Y[et]=!0,q=function(t,e){return e.facade=t,k(t,et,e),e},B=function(t){return j(t,et)?t[et]:{}},L=function(t){return j(t,et)}}var nt,rt,ot={set:q,get:B,has:L,enforce:function(t){return L(t)?B(t):q(t,{})},getterFor:function(t){return function(e){var n;if(!m(e)||(n=B(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},it=o((function(t){var e=ot.get,n=ot.enforce,r=String(String).split("String");(t.exports=function(t,e,o,i){var c,f=!!i&&!!i.unsafe,a=!!i&&!!i.enumerable,s=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof e||j(o,"name")||k(o,"name",e),(c=n(o)).source||(c.source=r.join("string"==typeof e?e:""))),t!==u?(f?!s&&t[e]&&(a=!0):delete t[e],a?t[e]=o:k(t,e,o)):a?t[e]=o:C(e,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||N(this)}))})),ut=u,ct=function(t){return"function"==typeof t?t:void 0},ft=function(t,e){return arguments.length<2?ct(ut[t])||ct(u[t]):ut[t]&&ut[t][e]||u[t]&&u[t][e]},at=Math.ceil,st=Math.floor,lt=function(t){return isNaN(t=+t)?0:(t>0?st:at)(t)},pt=Math.min,ht=function(t){return t>0?pt(lt(t),9007199254740991):0},yt=Math.max,bt=Math.min,dt=function(t){return function(e,n,r){var o,i=g(e),u=ht(i.length),c=function(t,e){var n=lt(t);return n<0?yt(n+e,0):bt(n,e)}(r,u);if(t&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},vt={includes:dt(!0),indexOf:dt(!1)}.indexOf,gt=function(t,e){var n,r=g(t),o=0,i=[];for(n in r)!j(Y,n)&&j(r,n)&&i.push(n);for(;e.length>o;)j(r,n=e[o++])&&(~vt(i,n)||i.push(n));return i},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ot=mt.concat("length","prototype"),wt={f:Object.getOwnPropertyNames||function(t){return gt(t,Ot)}},jt={f:Object.getOwnPropertySymbols},St=ft("Reflect","ownKeys")||function(t){var e=wt.f(x(t)),n=jt.f;return n?e.concat(n(t)):e},Rt=function(t,e){for(var n=St(e),r=I.f,o=E.f,i=0;i=74)&&(nt=Kt.match(/Chrome\/(\d+)/))&&(rt=nt[1]);var Yt,Ht=rt&&+rt,Jt=Wt("species"),Ut=Wt("isConcatSpreadable"),Zt=9007199254740991,te="Maximum allowed index exceeded",ee=Ht>=51||!c((function(){var t=[];return t[Ut]=!1,t.concat()[0]!==t})),ne=(Yt="concat",Ht>=51||!c((function(){var t=[];return(t.constructor={})[Jt]=function(){return{foo:1}},1!==t[Yt](Boolean).foo}))),re=function(t){if(!m(t))return!1;var e=t[Ut];return void 0!==e?!!e:Ft(t)};Ct({target:"Array",proto:!0,forced:!ee||!ne},{concat:function(t){var e,n,r,o,i,u=Mt(this),c=$t(u,0),f=0;for(e=-1,r=arguments.length;eZt)throw TypeError(te);for(n=0;n=Zt)throw TypeError(te);Dt(c,f++,i)}return c.length=f,c}});var oe,ie=function(t,e,n){if(function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function")}(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},ue=[].push,ce=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=7==t,c=5==t||i;return function(f,a,s,l){for(var p,h,y=Mt(f),b=d(y),v=ie(a,s,3),g=ht(b.length),m=0,O=l||$t,w=e?O(f,g):n||u?O(f,0):void 0;g>m;m++)if((c||m in b)&&(h=v(p=b[m],m,y),t))if(e)w[m]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:ue.call(w,p)}else switch(t){case 4:return!1;case 7:ue.call(w,p)}return i?-1:r||o?o:w}},fe={forEach:ce(0),map:ce(1),filter:ce(2),some:ce(3),every:ce(4),find:ce(5),findIndex:ce(6),filterOut:ce(7)},ae=Object.keys||function(t){return gt(t,mt)},se=f?Object.defineProperties:function(t,e){x(t);for(var n,r=ae(e),o=r.length,i=0;o>i;)I.f(t,n=r[i++],e[n]);return t},le=ft("document","documentElement"),pe=X("IE_PROTO"),he=function(){},ye=function(t){return" " + printhtml); + iframe.contentDocument.close(); + }, + 100) +} + diff --git a/src/main/resources/static/plugins/ofdViewer/js/cnofd.umd.min.js b/src/main/resources/static/plugins/ofdViewer/js/cnofd.umd.min.js new file mode 100644 index 0000000..d6ba6a6 --- /dev/null +++ b/src/main/resources/static/plugins/ofdViewer/js/cnofd.umd.min.js @@ -0,0 +1,29 @@ +/* + * Copyright 2022. cnofd All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * cnofd.js - A Javascript class for reading and rendering ofd files + * + * + */ +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["cnofd"]=t():e["cnofd"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="fae3")}({"0083":function(e,t,r){"use strict";var n={};function i(){try{return new window.XMLHttpRequest}catch(e){}}function o(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}n._getBinaryFromXHR=function(e){return e.response||e.responseText};var a="undefined"!==typeof window&&window.ActiveXObject?function(){return i()||o()}:i;n.getBinaryContent=function(e,t){var r,i,o,s;t||(t={}),"function"===typeof t?(s=t,t={}):"function"===typeof t.callback&&(s=t.callback),s||"undefined"===typeof Promise?(i=function(e){s(null,e)},o=function(e){s(e,null)}):r=new Promise((function(e,t){i=e,o=t}));try{var c=a();c.open("GET",e,!0),"responseType"in c&&(c.responseType="arraybuffer"),c.overrideMimeType&&c.overrideMimeType("text/plain; charset=x-user-defined"),c.onreadystatechange=function(t){if(4===c.readyState)if(200===c.status||0===c.status)try{i(n._getBinaryFromXHR(c))}catch(r){o(new Error(r))}else o(new Error("Ajax error for "+e+" : "+this.status+" "+this.statusText))},t.progress&&(c.onprogress=function(r){t.progress({path:e,originalEvent:r,percent:r.loaded/r.total*100,loaded:r.loaded,total:r.total})}),c.send()}catch(u){o(new Error(u),null)}return r},e.exports=n},"0094":function(e,t,r){"use strict";var n,i=r("da84"),o=r("e330"),a=r("6964"),s=r("f183"),c=r("6d61"),u=r("acac"),d=r("861d"),l=r("4fad"),f=r("69f3").enforce,h=r("7f9a"),p=!i.ActiveXObject&&"ActiveXObject"in i,m=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},b=c("WeakMap",m,u);if(h&&p){n=u.getConstructor(m,"WeakMap",!0),s.enable();var g=b.prototype,y=o(g["delete"]),v=o(g.has),S=o(g.get),w=o(g.set);a(g,{delete:function(e){if(d(e)&&!l(e)){var t=f(this);return t.frozen||(t.frozen=new n),y(this,e)||t.frozen["delete"](e)}return y(this,e)},has:function(e){if(d(e)&&!l(e)){var t=f(this);return t.frozen||(t.frozen=new n),v(this,e)||t.frozen.has(e)}return v(this,e)},get:function(e){if(d(e)&&!l(e)){var t=f(this);return t.frozen||(t.frozen=new n),v(this,e)?S(this,e):t.frozen.get(e)}return S(this,e)},set:function(e,t){if(d(e)&&!l(e)){var r=f(this);r.frozen||(r.frozen=new n),v(this,e)?w(this,e,t):r.frozen.set(e,t)}else w(this,e,t);return this}})}},"00ee":function(e,t,r){var n=r("b622"),i=n("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},"01b4":function(e,t){var r=function(){this.head=null,this.tail=null};r.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=r},"0366":function(e,t,r){var n=r("e330"),i=r("59ed"),o=r("40d5"),a=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},"057f":function(e,t,r){var n=r("c6b6"),i=r("fc6a"),o=r("241c").f,a=r("4dae"),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(e){try{return o(e)}catch(t){return a(s)}};e.exports.f=function(e){return s&&"Window"==n(e)?c(e):o(i(e))}},"06cf":function(e,t,r){var n=r("83ab"),i=r("c65b"),o=r("d1e7"),a=r("5c6c"),s=r("fc6a"),c=r("a04b"),u=r("1a2d"),d=r("0cfb"),l=Object.getOwnPropertyDescriptor;t.f=n?l:function(e,t){if(e=s(e),t=c(t),d)try{return l(e,t)}catch(r){}if(u(e,t))return a(!i(o.f,e,t),e[t])}},"07ac":function(e,t,r){var n=r("23e7"),i=r("6f53").values;n({target:"Object",stat:!0},{values:function(e){return i(e)}})},"07fa":function(e,t,r){var n=r("50c4");e.exports=function(e){return n(e.length)}},"0a06":function(e,t,r){"use strict";var n=r("c532"),i=r("30b5"),o=r("f6b4"),a=r("5270"),s=r("4a7b");function c(e){this.defaults=e,this.interceptors={request:new o,response:new o}}c.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=s(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],r=Promise.resolve(e);this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));while(t.length)r=r.then(t.shift(),t.shift());return r},c.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=c},"0b42":function(e,t,r){var n=r("da84"),i=r("e8b5"),o=r("68ee"),a=r("861d"),s=r("b622"),c=s("species"),u=n.Array;e.exports=function(e){var t;return i(e)&&(t=e.constructor,o(t)&&(t===u||i(t.prototype))?t=void 0:a(t)&&(t=t[c],null===t&&(t=void 0))),void 0===t?u:t}},"0c47":function(e,t,r){var n=r("da84"),i=r("d44e");i(n.JSON,"JSON",!0)},"0ccb":function(e,t,r){var n=r("e330"),i=r("50c4"),o=r("577e"),a=r("1148"),s=r("1d80"),c=n(a),u=n("".slice),d=Math.ceil,l=function(e){return function(t,r,n){var a,l,f=o(s(t)),h=i(r),p=f.length,m=void 0===n?" ":o(n);return h<=p||""==m?f:(a=h-p,l=c(m,d(a/m.length)),l.length>a&&(l=u(l,0,a)),e?f+l:l+f)}};e.exports={start:l(!1),end:l(!0)}},"0cfb":function(e,t,r){var n=r("83ab"),i=r("d039"),o=r("cc12");e.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0d3b":function(e,t,r){var n=r("d039"),i=r("b622"),o=r("c430"),a=i("iterator");e.exports=!n((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t["delete"]("b"),r+=n+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},"0d51":function(e,t,r){var n=r("da84"),i=n.String;e.exports=function(e){try{return i(e)}catch(t){return"Object"}}},"0df6":function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},"10d1":function(e,t,r){r("0094")},1148:function(e,t,r){"use strict";var n=r("da84"),i=r("5926"),o=r("577e"),a=r("1d80"),s=n.RangeError;e.exports=function(e){var t=o(a(this)),r="",n=i(e);if(n<0||n==1/0)throw s("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r}},"13d2":function(e,t,r){var n=r("d039"),i=r("1626"),o=r("1a2d"),a=r("83ab"),s=r("5e77").CONFIGURABLE,c=r("8925"),u=r("69f3"),d=u.enforce,l=u.get,f=Object.defineProperty,h=a&&!n((function(){return 8!==f((function(){}),"length",{value:8}).length})),p=String(String).split("String"),m=e.exports=function(e,t,r){if("Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!o(e,"name")||s&&e.name!==t)&&f(e,"name",{value:t,configurable:!0}),h&&r&&o(r,"arity")&&e.length!==r.arity&&f(e,"length",{value:r.arity}),r&&o(r,"constructor")&&r.constructor){if(a)try{f(e,"prototype",{writable:!1})}catch(i){}}else e.prototype=void 0;var n=d(e);return o(n,"source")||(n.source=p.join("string"==typeof t?t:"")),e};Function.prototype.toString=m((function(){return i(this)&&l(this).source||c(this)}),"toString")},"14d8":function(e,t,r){r("2b3d"),r("bf19"),r("9861");var n=r("428f");e.exports=n.URL},"14e5":function(e,t,r){"use strict";var n=r("23e7"),i=r("c65b"),o=r("59ed"),a=r("f069"),s=r("e667"),c=r("2266"),u=r("5eed");n({target:"Promise",stat:!0,forced:u},{all:function(e){var t=this,r=a.f(t),n=r.resolve,u=r.reject,d=s((function(){var r=o(t.resolve),a=[],s=0,d=1;c(e,(function(e){var o=s++,c=!1;d++,i(r,t,e).then((function(e){c||(c=!0,a[o]=e,--d||n(a))}),u)})),--d||n(a)}));return d.error&&u(d.value),r.promise}})},1626:function(e,t){e.exports=function(e){return"function"==typeof e}},1920:function(e,t,r){r("4d90");var n=r("b109");e.exports=n("String","padStart")},"197b":function(e,t,r){var n=r("746f");n("species")},"19aa":function(e,t,r){var n=r("da84"),i=r("3a9b"),o=n.TypeError;e.exports=function(e,t){if(i(t,e))return e;throw o("Incorrect invocation")}},"1a2d":function(e,t,r){var n=r("e330"),i=r("7b0b"),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},"1be4":function(e,t,r){var n=r("d066");e.exports=n("document","documentElement")},"1c59":function(e,t,r){"use strict";var n=r("6d61"),i=r("6566");n("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},"1c7e":function(e,t,r){var n=r("b622"),i=n("iterator"),o=!1;try{var a=0,s={next:function(){return{done:!!a++}},return:function(){o=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(c){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var n={};n[i]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(c){}return r}},"1cd7":function(e,t,r){r("f6d6");var n=r("428f");e.exports=n.String.fromCodePoint},"1cdc":function(e,t,r){var n=r("342f");e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},"1d2b":function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n=51||!n((function(){var t=[],r=t.constructor={};return r[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},"1f4a":function(e,t,r){r("99af"),r("d3b7"),r("a4d3"),r("b636"),r("e01a"),r("dc8d"),r("efe9"),r("d28b"),r("2a1b"),r("8edd"),r("80e0"),r("6b9e"),r("197b"),r("2351"),r("8172"),r("944a"),r("81b8"),r("0c47"),r("23dc"),r("f8c9");var n=r("428f");e.exports=n.Symbol},"1fb5":function(e,t,r){"use strict";t.byteLength=d,t.toByteArray=f,t.fromByteArray=m;for(var n=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function d(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n}function l(e,t,r){return 3*(t+r)/4-r}function f(e){var t,r,n=u(e),a=n[0],s=n[1],c=new o(l(e,a,s)),d=0,f=s>0?a-4:a;for(r=0;r>16&255,c[d++]=t>>8&255,c[d++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[d++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t),c}function h(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function p(e,t,r){for(var n,i=[],o=t;oc?c:s+a));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"1fe2":function(e,t,r){r("7276")},2266:function(e,t,r){var n=r("da84"),i=r("0366"),o=r("c65b"),a=r("825a"),s=r("0d51"),c=r("e95a"),u=r("07fa"),d=r("3a9b"),l=r("9a1f"),f=r("35a1"),h=r("2a62"),p=n.TypeError,m=function(e,t){this.stopped=e,this.result=t},b=m.prototype;e.exports=function(e,t,r){var n,g,y,v,S,w,C,_=r&&r.that,A=!(!r||!r.AS_ENTRIES),I=!(!r||!r.IS_ITERATOR),E=!(!r||!r.INTERRUPTED),T=i(t,_),x=function(e){return n&&h(n,"normal",e),new m(!0,e)},P=function(e){return A?(a(e),E?T(e[0],e[1],x):T(e[0],e[1])):E?T(e,x):T(e)};if(I)n=e;else{if(g=f(e),!g)throw p(s(e)+" is not iterable");if(c(g)){for(y=0,v=u(e);v>y;y++)if(S=P(e[y]),S&&d(b,S))return S;return new m(!1)}n=l(e,g)}w=n.next;while(!(C=o(w,n)).done){try{S=P(C.value)}catch(k){h(n,"throw",k)}if("object"==typeof S&&S&&d(b,S))return S}return new m(!1)}},2351:function(e,t,r){var n=r("746f");n("split")},"23cb":function(e,t,r){var n=r("5926"),i=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):o(r,t)}},"23dc":function(e,t,r){var n=r("d44e");n(Math,"Math",!0)},"23e7":function(e,t,r){var n=r("da84"),i=r("06cf").f,o=r("9112"),a=r("cb2d"),s=r("ce4e"),c=r("e893"),u=r("94ca");e.exports=function(e,t){var r,d,l,f,h,p,m=e.target,b=e.global,g=e.stat;if(d=b?n:g?n[m]||s(m,{}):(n[m]||{}).prototype,d)for(l in t){if(h=t[l],e.noTargetGet?(p=i(d,l),f=p&&p.value):f=d[l],r=u(b?l:m+(g?".":"#")+l,e.forced),!r&&void 0!==f){if(typeof h==typeof f)continue;c(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(d,l,h,e)}}},2418:function(e,t,r){r("cca6");var n=r("428f");e.exports=n.Object.assign},"241c":function(e,t,r){var n=r("ca84"),i=r("7839"),o=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},2444:function(e,t,r){"use strict";(function(t){var n=r("c532"),i=r("c8af"),o={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function s(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=r("b50d")),e}var c={adapter:s(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(o)})),e.exports=c}).call(this,r("4362"))},2532:function(e,t,r){"use strict";var n=r("23e7"),i=r("e330"),o=r("5a34"),a=r("1d80"),s=r("577e"),c=r("ab13"),u=i("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(e){return!!~u(s(a(this)),s(o(e)),arguments.length>1?arguments[1]:void 0)}})},2626:function(e,t,r){"use strict";var n=r("d066"),i=r("9bf2"),o=r("b622"),a=r("83ab"),s=o("species");e.exports=function(e){var t=n(e),r=i.f;a&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},2954:function(e,t,r){"use strict";var n=r("ebb5"),i=r("b6b7"),o=r("d039"),a=r("f36a"),s=n.aTypedArray,c=n.exportTypedArrayMethod,u=o((function(){new Int8Array(1).slice()}));c("slice",(function(e,t){var r=a(s(this),e,t),n=i(this),o=0,c=r.length,u=new n(c);while(c>o)u[o]=r[o++];return u}),u)},"2a1b":function(e,t,r){var n=r("746f");n("match")},"2a62":function(e,t,r){var n=r("c65b"),i=r("825a"),o=r("dc4a");e.exports=function(e,t,r){var a,s;i(e);try{if(a=o(e,"return"),!a){if("throw"===t)throw r;return r}a=n(a,e)}catch(c){s=!0,a=c}if("throw"===t)throw r;if(s)throw a;return i(a),r}},"2b3d":function(e,t,r){r("4002")},"2ba4":function(e,t,r){var n=r("40d5"),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(o):function(){return a.apply(o,arguments)})},"2ca0":function(e,t,r){"use strict";var n=r("23e7"),i=r("e330"),o=r("06cf").f,a=r("50c4"),s=r("577e"),c=r("5a34"),u=r("1d80"),d=r("ab13"),l=r("c430"),f=i("".startsWith),h=i("".slice),p=Math.min,m=d("startsWith"),b=!l&&!m&&!!function(){var e=o(String.prototype,"startsWith");return e&&!e.writable}();n({target:"String",proto:!0,forced:!b&&!m},{startsWith:function(e){var t=s(u(this));c(e);var r=a(p(arguments.length>1?arguments[1]:void 0,t.length)),n=s(e);return f?f(t,n,r):h(t,r,r+n.length)===n}})},"2cf4":function(e,t,r){var n,i,o,a,s=r("da84"),c=r("2ba4"),u=r("0366"),d=r("1626"),l=r("1a2d"),f=r("d039"),h=r("1be4"),p=r("f36a"),m=r("cc12"),b=r("d6d6"),g=r("1cdc"),y=r("605d"),v=s.setImmediate,S=s.clearImmediate,w=s.process,C=s.Dispatch,_=s.Function,A=s.MessageChannel,I=s.String,E=0,T={},x="onreadystatechange";try{n=s.location}catch(R){}var P=function(e){if(l(T,e)){var t=T[e];delete T[e],t()}},k=function(e){return function(){P(e)}},D=function(e){P(e.data)},O=function(e){s.postMessage(I(e),n.protocol+"//"+n.host)};v&&S||(v=function(e){b(arguments.length,1);var t=d(e)?e:_(e),r=p(arguments,1);return T[++E]=function(){c(t,void 0,r)},i(E),E},S=function(e){delete T[e]},y?i=function(e){w.nextTick(k(e))}:C&&C.now?i=function(e){C.now(k(e))}:A&&!g?(o=new A,a=o.port2,o.port1.onmessage=D,i=u(a.postMessage,a)):s.addEventListener&&d(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!f(O)?(i=O,s.addEventListener("message",D,!1)):i=x in m("script")?function(e){h.appendChild(m("script"))[x]=function(){h.removeChild(this),P(e)}}:function(e){setTimeout(k(e),0)}),e.exports={set:v,clear:S}},"2d00":function(e,t,r){var n,i,o=r("da84"),a=r("342f"),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,d=u&&u.v8;d&&(n=d.split("."),i=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(n=a.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/),n&&(i=+n[1]))),e.exports=i},"2d83":function(e,t,r){"use strict";var n=r("387f");e.exports=function(e,t,r,i,o){var a=new Error(e);return n(a,t,r,i,o)}},"2e67":function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"30b5":function(e,t,r){"use strict";var n=r("c532");function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},"342f":function(e,t,r){var n=r("d066");e.exports=n("navigator","userAgent")||""},3529:function(e,t,r){"use strict";var n=r("23e7"),i=r("c65b"),o=r("59ed"),a=r("f069"),s=r("e667"),c=r("2266"),u=r("5eed");n({target:"Promise",stat:!0,forced:u},{race:function(e){var t=this,r=a.f(t),n=r.reject,u=s((function(){var a=o(t.resolve);c(e,(function(e){i(a,t,e).then(r.resolve,n)}))}));return u.error&&n(u.value),r.promise}})},"35a1":function(e,t,r){var n=r("f5df"),i=r("dc4a"),o=r("3f8c"),a=r("b622"),s=a("iterator");e.exports=function(e){if(void 0!=e)return i(e,s)||i(e,"@@iterator")||o[n(e)]}},3662:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(x){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new I(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return T()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=C(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(x){return{type:"throw",arg:x}}}e.wrap=d;var f={};function h(){}function p(){}function m(){}var b={};u(b,a,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(E([])));y&&y!==t&&r.call(y,a)&&(b=y);var v=m.prototype=h.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(o,a,s,c){var u=l(e[o],e,a);if("throw"!==u.type){var d=u.arg,f=d.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,s,c)}),(function(e){i("throw",e,s,c)})):t.resolve(f).then((function(e){d.value=e,s(d)}),(function(e){return i("throw",e,s,c)}))}c(u.arg)}var o;this._invoke=function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}}function C(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=l(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function E(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function o(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void r(u)}s.done?t(c):Promise.resolve(c).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,c,"next",e)}function c(e){o(a,n,i,s,c,"throw",e)}s(void 0)}))}}r.d(t,"a",(function(){return c})),Array.prototype.pipeline=function(){var e=a(i().mark((function e(t){var r,n,o;return i().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(null!==this&&"undefined"!==typeof this){e.next=2;break}throw new TypeError("Array.prototype.pipeline called on null or undefined");case 2:if("function"===typeof t){e.next=4;break}throw new TypeError(t+" is not a function");case 4:o=this.length>>>0,r=0;case 6:if(!(o>r)){e.next=13;break}return e.next=9,t(n,this[r],r,this);case 9:n=e.sent;case 10:++r,e.next=6;break;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();var s=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nd)o.f(e,r=i[d++],n[r]);return e}},"387f":function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},3934:function(e,t,r){"use strict";var n=r("c532");e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return function(){return!0}}()},3980:function(e,t,r){r("967a"),r("e260"),r("d3b7"),r("e6cf"),r("820e"),r("dbfa"),r("a79d"),r("3ca3");var n=r("428f");e.exports=n.Promise},"3a9b":function(e,t,r){var n=r("e330");e.exports=n({}.isPrototypeOf)},"3bbe":function(e,t,r){var n=r("da84"),i=r("1626"),o=n.String,a=n.TypeError;e.exports=function(e){if("object"==typeof e||i(e))return e;throw a("Can't set "+o(e)+" as a prototype")}},"3ca3":function(e,t,r){"use strict";var n=r("6547").charAt,i=r("577e"),o=r("69f3"),a=r("7dd0"),s="String Iterator",c=o.set,u=o.getterFor(s);a(String,"String",(function(e){c(this,{type:s,string:i(e),index:0})}),(function(){var e,t=u(this),r=t.string,i=t.index;return i>=r.length?{value:void 0,done:!0}:(e=n(r,i),t.index+=e.length,{value:e,done:!1})}))},"3d87":function(e,t,r){var n=r("4930");e.exports=n&&!!Symbol["for"]&&!!Symbol.keyFor},"3f8c":function(e,t){e.exports={}},4002:function(e,t,r){"use strict";r("3ca3");var n,i=r("23e7"),o=r("83ab"),a=r("0d3b"),s=r("da84"),c=r("0366"),u=r("e330"),d=r("cb2d"),l=r("edd0"),f=r("19aa"),h=r("1a2d"),p=r("60da"),m=r("4df4"),b=r("4dae"),g=r("6547").codeAt,y=r("5fb2"),v=r("577e"),S=r("d44e"),w=r("d6d6"),C=r("5352"),_=r("69f3"),A=_.set,I=_.getterFor("URL"),E=C.URLSearchParams,T=C.getState,x=s.URL,P=s.TypeError,k=s.parseInt,D=Math.floor,O=Math.pow,R=u("".charAt),M=u(/./.exec),N=u([].join),B=u(1..toString),F=u([].pop),j=u([].push),K=u("".replace),U=u([].shift),L=u("".split),X=u("".slice),z=u("".toLowerCase),G=u([].unshift),W="Invalid authority",q="Invalid scheme",H="Invalid host",V="Invalid port",Y=/[a-z]/i,Q=/[\d+-.a-z]/i,Z=/\d/,J=/^0x/i,$=/^[0-7]+$/,ee=/^\d+$/,te=/^[\da-f]+$/i,re=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ne=/[\0\t\n\r #/:<>?@[\\\]^|]/,ie=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,oe=/[\t\n\r]/g,ae=function(e){var t,r,n,i,o,a,s,c=L(e,".");if(c.length&&""==c[c.length-1]&&c.length--,t=c.length,t>4)return e;for(r=[],n=0;n1&&"0"==R(i,0)&&(o=M(J,i)?16:8,i=X(i,8==o?1:2)),""===i)a=0;else{if(!M(10==o?ee:8==o?$:te,i))return e;a=k(i,o)}j(r,a)}for(n=0;n=O(256,5-t))return null}else if(a>255)return null;for(s=F(r),n=0;n6)return;n=0;while(f()){if(i=null,n>0){if(!("."==f()&&n<4))return;l++}if(!M(Z,f()))return;while(M(Z,f())){if(o=k(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;l++}c[u]=256*c[u]+i,n++,2!=n&&4!=n||u++}if(4!=n)return;break}if(":"==f()){if(l++,!f())return}else if(f())return;c[u++]=t}else{if(null!==d)return;l++,u++,d=u}}if(null!==d){a=u-d,u=7;while(0!=u&&a>0)s=c[u],c[u--]=c[d+a-1],c[d+--a]=s}else if(8!=u)return;return c},ce=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t},ue=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)G(t,e%256),e=D(e/256);return N(t,".")}if("object"==typeof e){for(t="",n=ce(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=B(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},de={},le=p({},de,{" ":1,'"':1,"<":1,">":1,"`":1}),fe=p({},le,{"#":1,"?":1,"{":1,"}":1}),he=p({},fe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),pe=function(e,t){var r=g(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},me={ftp:21,file:null,http:80,https:443,ws:80,wss:443},be=function(e,t){var r;return 2==e.length&&M(Y,R(e,0))&&(":"==(r=R(e,1))||!t&&"|"==r)},ge=function(e){var t;return e.length>1&&be(X(e,0,2))&&(2==e.length||"/"===(t=R(e,2))||"\\"===t||"?"===t||"#"===t)},ye=function(e){return"."===e||"%2e"===z(e)},ve=function(e){return e=z(e),".."===e||"%2e."===e||".%2e"===e||"%2e%2e"===e},Se={},we={},Ce={},_e={},Ae={},Ie={},Ee={},Te={},xe={},Pe={},ke={},De={},Oe={},Re={},Me={},Ne={},Be={},Fe={},je={},Ke={},Ue={},Le=function(e,t,r){var n,i,o,a=v(e);if(t){if(i=this.parse(a),i)throw P(i);this.searchParams=null}else{if(void 0!==r&&(n=new Le(r,!0)),i=this.parse(a,null,n),i)throw P(i);o=T(new E),o.bindURL(this),this.searchParams=o}};Le.prototype={type:"URL",parse:function(e,t,r){var i,o,a,s,c=this,u=t||Se,d=0,l="",f=!1,p=!1,g=!1;e=v(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=K(e,ie,"")),e=K(e,oe,""),i=m(e);while(d<=i.length){switch(o=i[d],u){case Se:if(!o||!M(Y,o)){if(t)return q;u=Ce;continue}l+=z(o),u=we;break;case we:if(o&&(M(Q,o)||"+"==o||"-"==o||"."==o))l+=z(o);else{if(":"!=o){if(t)return q;l="",u=Ce,d=0;continue}if(t&&(c.isSpecial()!=h(me,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&me[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?u=Re:c.isSpecial()&&r&&r.scheme==c.scheme?u=_e:c.isSpecial()?u=Te:"/"==i[d+1]?(u=Ae,d++):(c.cannotBeABaseURL=!0,j(c.path,""),u=je)}break;case Ce:if(!r||r.cannotBeABaseURL&&"#"!=o)return q;if(r.cannotBeABaseURL&&"#"==o){c.scheme=r.scheme,c.path=b(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,u=Ue;break}u="file"==r.scheme?Re:Ie;continue;case _e:if("/"!=o||"/"!=i[d+1]){u=Ie;continue}u=xe,d++;break;case Ae:if("/"==o){u=Pe;break}u=Fe;continue;case Ie:if(c.scheme=r.scheme,o==n)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=b(r.path),c.query=r.query;else if("/"==o||"\\"==o&&c.isSpecial())u=Ee;else if("?"==o)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=b(r.path),c.query="",u=Ke;else{if("#"!=o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=b(r.path),c.path.length--,u=Fe;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=b(r.path),c.query=r.query,c.fragment="",u=Ue}break;case Ee:if(!c.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,u=Fe;continue}u=Pe}else u=xe;break;case Te:if(u=xe,"/"!=o||"/"!=R(l,d+1))continue;d++;break;case xe:if("/"!=o&&"\\"!=o){u=Pe;continue}break;case Pe:if("@"==o){f&&(l="%40"+l),f=!0,a=m(l);for(var y=0;y65535)return V;c.port=c.isSpecial()&&C===me[c.scheme]?null:C,l=""}if(t)return;u=Be;continue}return V}l+=o;break;case Re:if(c.scheme="file","/"==o||"\\"==o)u=Me;else{if(!r||"file"!=r.scheme){u=Fe;continue}if(o==n)c.host=r.host,c.path=b(r.path),c.query=r.query;else if("?"==o)c.host=r.host,c.path=b(r.path),c.query="",u=Ke;else{if("#"!=o){ge(N(b(i,d),""))||(c.host=r.host,c.path=b(r.path),c.shortenPath()),u=Fe;continue}c.host=r.host,c.path=b(r.path),c.query=r.query,c.fragment="",u=Ue}}break;case Me:if("/"==o||"\\"==o){u=Ne;break}r&&"file"==r.scheme&&!ge(N(b(i,d),""))&&(be(r.path[0],!0)?j(c.path,r.path[0]):c.host=r.host),u=Fe;continue;case Ne:if(o==n||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&be(l))u=Fe;else if(""==l){if(c.host="",t)return;u=Be}else{if(s=c.parseHost(l),s)return s;if("localhost"==c.host&&(c.host=""),t)return;l="",u=Be}continue}l+=o;break;case Be:if(c.isSpecial()){if(u=Fe,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=n&&(u=Fe,"/"!=o))continue}else c.fragment="",u=Ue;else c.query="",u=Ke;break;case Fe:if(o==n||"/"==o||"\\"==o&&c.isSpecial()||!t&&("?"==o||"#"==o)){if(ve(l)?(c.shortenPath(),"/"==o||"\\"==o&&c.isSpecial()||j(c.path,"")):ye(l)?"/"==o||"\\"==o&&c.isSpecial()||j(c.path,""):("file"==c.scheme&&!c.path.length&&be(l)&&(c.host&&(c.host=""),l=R(l,0)+":"),j(c.path,l)),l="","file"==c.scheme&&(o==n||"?"==o||"#"==o))while(c.path.length>1&&""===c.path[0])U(c.path);"?"==o?(c.query="",u=Ke):"#"==o&&(c.fragment="",u=Ue)}else l+=pe(o,fe);break;case je:"?"==o?(c.query="",u=Ke):"#"==o?(c.fragment="",u=Ue):o!=n&&(c.path[0]+=pe(o,de));break;case Ke:t||"#"!=o?o!=n&&("'"==o&&c.isSpecial()?c.query+="%27":c.query+="#"==o?"%23":pe(o,de)):(c.fragment="",u=Ue);break;case Ue:o!=n&&(c.fragment+=pe(o,le));break}d++}},parseHost:function(e){var t,r,n;if("["==R(e,0)){if("]"!=R(e,e.length-1))return H;if(t=se(X(e,1,-1)),!t)return H;this.host=t}else if(this.isSpecial()){if(e=y(e),M(re,e))return H;if(t=ae(e),null===t)return H;this.host=t}else{if(M(ne,e))return H;for(t="",r=m(e),n=0;n1?arguments[1]:void 0,n=A(t,new Le(e,!1,r));o||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},ze=Xe.prototype,Ge=function(e,t){return{get:function(){return I(this)[e]()},set:t&&function(e){return I(this)[t](e)},configurable:!0,enumerable:!0}};if(o&&(l(ze,"href",Ge("serialize","setHref")),l(ze,"origin",Ge("getOrigin")),l(ze,"protocol",Ge("getProtocol","setProtocol")),l(ze,"username",Ge("getUsername","setUsername")),l(ze,"password",Ge("getPassword","setPassword")),l(ze,"host",Ge("getHost","setHost")),l(ze,"hostname",Ge("getHostname","setHostname")),l(ze,"port",Ge("getPort","setPort")),l(ze,"pathname",Ge("getPathname","setPathname")),l(ze,"search",Ge("getSearch","setSearch")),l(ze,"searchParams",Ge("getSearchParams")),l(ze,"hash",Ge("getHash","setHash"))),d(ze,"toJSON",(function(){return I(this).serialize()}),{enumerable:!0}),d(ze,"toString",(function(){return I(this).serialize()}),{enumerable:!0}),x){var We=x.createObjectURL,qe=x.revokeObjectURL;We&&d(Xe,"createObjectURL",c(We,x)),qe&&d(Xe,"revokeObjectURL",c(qe,x))}S(Xe,"URL"),i({global:!0,constructor:!0,forced:!a,sham:!o},{URL:Xe})},"40d5":function(e,t,r){var n=r("d039");e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},"428f":function(e,t,r){var n=r("da84");e.exports=n},4362:function(e,t,r){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,n="/";t.cwd=function(){return n},t.chdir=function(t){e||(e=r("df7c")),n=e.resolve(t,n)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"44ad":function(e,t,r){var n=r("da84"),i=r("e330"),o=r("d039"),a=r("c6b6"),s=n.Object,c=i("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?c(e,""):s(e)}:s},"44d2":function(e,t,r){var n=r("b622"),i=r("7c73"),o=r("9bf2"),a=n("unscopables"),s=Array.prototype;void 0==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},"44de":function(e,t,r){var n=r("da84");e.exports=function(e,t){var r=n.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}},"44e7":function(e,t,r){var n=r("861d"),i=r("c6b6"),o=r("b622"),a=o("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},4661:function(e,t,r){r("2532");var n=r("b109");e.exports=n("String","includes")},"467f":function(e,t,r){"use strict";var n=r("2d83");e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},4738:function(e,t,r){var n=r("da84"),i=r("d256"),o=r("1626"),a=r("94ca"),s=r("8925"),c=r("b622"),u=r("6069"),d=r("c430"),l=r("2d00"),f=i&&i.prototype,h=c("species"),p=!1,m=o(n.PromiseRejectionEvent),b=a("Promise",(function(){var e=s(i),t=e!==String(i);if(!t&&66===l)return!0;if(d&&(!f["catch"]||!f["finally"]))return!0;if(l>=51&&/native code/.test(e))return!1;var r=new i((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))},o=r.constructor={};return o[h]=n,p=r.then((function(){}))instanceof n,!p||!t&&u&&!m}));e.exports={CONSTRUCTOR:b,REJECTION_EVENT:m,SUBCLASSING:p}},"476b":function(e,t,r){r("843c");var n=r("b109");e.exports=n("String","padEnd")},4840:function(e,t,r){var n=r("825a"),i=r("5087"),o=r("b622"),a=o("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||void 0==(r=n(o)[a])?t:i(r)}},"485a":function(e,t,r){var n=r("da84"),i=r("c65b"),o=r("1626"),a=r("861d"),s=n.TypeError;e.exports=function(e,t){var r,n;if("string"===t&&o(r=e.toString)&&!a(n=i(r,e)))return n;if(o(r=e.valueOf)&&!a(n=i(r,e)))return n;if("string"!==t&&o(r=e.toString)&&!a(n=i(r,e)))return n;throw s("Can't convert object to primitive value")}},4930:function(e,t,r){var n=r("2d00"),i=r("d039");e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},"4a7b":function(e,t,r){"use strict";var n=r("c532");e.exports=function(e,t){t=t||{};var r={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function u(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=c(void 0,e[i])):r[i]=c(e[i],t[i])}n.forEach(i,(function(e){n.isUndefined(t[e])||(r[e]=c(void 0,t[e]))})),n.forEach(o,u),n.forEach(a,(function(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=c(void 0,e[i])):r[i]=c(void 0,t[i])})),n.forEach(s,(function(n){n in t?r[n]=c(e[n],t[n]):n in e&&(r[n]=c(void 0,e[n]))}));var d=i.concat(o).concat(a).concat(s),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===d.indexOf(e)}));return n.forEach(l,u),r}},"4d64":function(e,t,r){var n=r("fc6a"),i=r("23cb"),o=r("07fa"),a=function(e){return function(t,r,a){var s,c=n(t),u=o(c),d=i(a,u);if(e&&r!=r){while(u>d)if(s=c[d++],s!=s)return!0}else for(;u>d;d++)if((e||d in c)&&c[d]===r)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"4d90":function(e,t,r){"use strict";var n=r("23e7"),i=r("0ccb").start,o=r("9a0c");n({target:"String",proto:!0,forced:o},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},"4dae":function(e,t,r){var n=r("da84"),i=r("23cb"),o=r("07fa"),a=r("8418"),s=n.Array,c=Math.max;e.exports=function(e,t,r){for(var n=o(e),u=i(t,n),d=i(void 0===r?n:r,n),l=s(c(d-u,0)),f=0;u1?arguments[1]:void 0,b=void 0!==m;b&&(m=i(m,n>2?arguments[2]:void 0));var g,y,v,S,w,C,_=h(t),A=0;if(!_||this==p&&c(_))for(g=d(t),y=r?new this(g):p(g);g>A;A++)C=b?m(t[A],A):t[A],l(y,A,C);else for(S=f(t,_),w=S.next,y=r?new this:[];!(v=o(w,S)).done;A++)C=b?s(S,m,[v.value,A],!0):v.value,l(y,A,C);return y.length=A,y}},"4e28":function(e,t,r){r("07ac");var n=r("428f");e.exports=n.Object.values},"4ec9":function(e,t,r){r("6f48")},"4fad":function(e,t,r){var n=r("d039"),i=r("861d"),o=r("c6b6"),a=r("d86b"),s=Object.isExtensible,c=n((function(){s(1)}));e.exports=c||a?function(e){return!!i(e)&&((!a||"ArrayBuffer"!=o(e))&&(!s||s(e)))}:s},"4fadc":function(e,t,r){var n=r("23e7"),i=r("6f53").entries;n({target:"Object",stat:!0},{entries:function(e){return i(e)}})},5087:function(e,t,r){var n=r("da84"),i=r("68ee"),o=r("0d51"),a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a constructor")}},"50c4":function(e,t,r){var n=r("5926"),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},5270:function(e,t,r){"use strict";var n=r("c532"),i=r("c401"),o=r("2e67"),a=r("2444");function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){s(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||a.adapter;return t(e).then((function(t){return s(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},5352:function(e,t,r){"use strict";r("e260");var n=r("23e7"),i=r("da84"),o=r("c65b"),a=r("e330"),s=r("83ab"),c=r("0d3b"),u=r("cb2d"),d=r("6964"),l=r("d44e"),f=r("9ed3"),h=r("69f3"),p=r("19aa"),m=r("1626"),b=r("1a2d"),g=r("0366"),y=r("f5df"),v=r("825a"),S=r("861d"),w=r("577e"),C=r("7c73"),_=r("5c6c"),A=r("9a1f"),I=r("35a1"),E=r("d6d6"),T=r("b622"),x=r("addb"),P=T("iterator"),k="URLSearchParams",D=k+"Iterator",O=h.set,R=h.getterFor(k),M=h.getterFor(D),N=Object.getOwnPropertyDescriptor,B=function(e){if(!s)return i[e];var t=N(i,e);return t&&t.value},F=B("fetch"),j=B("Request"),K=B("Headers"),U=j&&j.prototype,L=K&&K.prototype,X=i.RegExp,z=i.TypeError,G=i.decodeURIComponent,W=i.encodeURIComponent,q=a("".charAt),H=a([].join),V=a([].push),Y=a("".replace),Q=a([].shift),Z=a([].splice),J=a("".split),$=a("".slice),ee=/\+/g,te=Array(4),re=function(e){return te[e-1]||(te[e-1]=X("((?:%[\\da-f]{2}){"+e+"})","gi"))},ne=function(e){try{return G(e)}catch(t){return e}},ie=function(e){var t=Y(e,ee," "),r=4;try{return G(t)}catch(n){while(r)t=Y(t,re(r--),ne);return t}},oe=/[!'()~]|%20/g,ae={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},se=function(e){return ae[e]},ce=function(e){return Y(W(e),oe,se)},ue=f((function(e,t){O(this,{type:D,iterator:A(R(e).entries),kind:t})}),"Iterator",(function(){var e=M(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),de=function(e){this.entries=[],this.url=null,void 0!==e&&(S(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===q(e,0)?$(e,1):e:w(e)))};de.prototype={type:k,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,s,c,u=I(e);if(u){t=A(e,u),r=t.next;while(!(n=o(r,t)).done){if(i=A(v(n.value)),a=i.next,(s=o(a,i)).done||(c=o(a,i)).done||!o(a,i).done)throw z("Expected sequence with length 2");V(this.entries,{key:w(s.value),value:w(c.value)})}}else for(var d in e)b(e,d)&&V(this.entries,{key:d,value:w(e[d])})},parseQuery:function(e){if(e){var t,r,n=J(e,"&"),i=0;while(i0?arguments[0]:void 0;O(this,new de(e))},fe=le.prototype;if(d(fe,{append:function(e,t){E(arguments.length,2);var r=R(this);V(r.entries,{key:w(e),value:w(t)}),r.updateURL()},delete:function(e){E(arguments.length,1);var t=R(this),r=t.entries,n=w(e),i=0;while(it.key?1:-1})),e.updateURL()},forEach:function(e){var t,r=R(this).entries,n=g(e,arguments.length>1?arguments[1]:void 0),i=0;while(i1?me(arguments[1]):{})}}),m(j)){var be=function(e){return p(this,U),new j(e,arguments.length>1?me(arguments[1]):{})};U.constructor=be,be.prototype=U,n({global:!0,constructor:!0,noTargetGet:!0,forced:!0},{Request:be})}}e.exports={URLSearchParams:le,getState:R}},5486:function(e,t,r){"use strict";(function(e){const n=r("90da"),i=function(t,r){const o={};if(!(t.child&&!n.isEmptyObject(t.child)||t.attrsMap&&!n.isEmptyObject(t.attrsMap)))return n.isExist(t.val)?t.val:"";n.isExist(t.val)&&("string"!==typeof t.val||""!==t.val&&t.val!==r.cdataPositionChar)&&("strict"===r.arrayMode?o[r.textNodeName]=[t.val]:o[r.textNodeName]=t.val),n.merge(o,t.attrsMap,r.arrayMode);const a=Object.keys(t.child);for(let n=0;n1)for(var c in o[s]=[],t.child[s])e.xmlParseFlag=e.xmlParseFlag+1,o[s].push(i(t.child[s][c],r));else if(!0===r.arrayMode){e.xmlParseFlag=e.xmlParseFlag+1;const n=i(t.child[s][0],r);o[s]="object"===typeof n?[n]:n}else"strict"===r.arrayMode?(e.xmlParseFlag=e.xmlParseFlag+1,o[s]=[i(t.child[s][0],r)]):(e.xmlParseFlag=e.xmlParseFlag+1,o[s]=i(t.child[s][0],r))}let u=o;return"object"===typeof u&&(u["pfIndex"]=e.xmlParseFlag),o};t.convertToJson=i}).call(this,r("c8ba"))},5692:function(e,t,r){var n=r("c430"),i=r("c6cd");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.5",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(e,t,r){var n=r("d066"),i=r("e330"),o=r("241c"),a=r("7418"),s=r("825a"),c=i([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),r=a.f;return r?c(t,r(e)):t}},"577e":function(e,t,r){var n=r("da84"),i=r("f5df"),o=n.String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},"57b9":function(e,t,r){var n=r("c65b"),i=r("d066"),o=r("b622"),a=r("cb2d");e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,s=o("toPrimitive");t&&!t[s]&&a(t,s,(function(e){return n(r,this)}),{arity:1})}},5926:function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){var t=+e;return t!==t||0===t?0:(t>0?n:r)(t)}},"59ed":function(e,t,r){var n=r("da84"),i=r("1626"),o=r("0d51"),a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a function")}},"5a34":function(e,t,r){var n=r("da84"),i=r("44e7"),o=n.TypeError;e.exports=function(e){if(i(e))throw o("The method doesn't accept regular expressions");return e}},"5a47":function(e,t,r){var n=r("23e7"),i=r("4930"),o=r("d039"),a=r("7418"),s=r("7b0b"),c=!i||o((function(){a.f(1)}));n({target:"Object",stat:!0,forced:c},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},"5a79":function(e,t,r){"use strict";const n=r("90da"),i=r("90da").buildOptions,o=r("8a24"),a=function(e,t){return t=i(t,o.defaultOptions,o.props),t.indentBy=t.indentBy||"",s(e,t,0)},s=function(e,t,r){let i="{";const o=Object.keys(e.child);for(let n=0;n1){for(var u in i+='"'+a+'" : [ ',e.child[a])i+=s(e.child[a][u],t)+" , ";i=i.substr(0,i.length-1)+" ] "}else i+='"'+a+'" : '+s(e.child[a][0],t)+" ,"}return n.merge(i,e.attrsMap),n.isEmptyObject(i)?n.isExist(e.val)?e.val:"":(n.isExist(e.val)&&("string"!==typeof e.val||""!==e.val&&e.val!==t.cdataPositionChar)&&(i+='"'+t.textNodeName+'" : '+c(e.val)),","===i[i.length-1]&&(i=i.substr(0,i.length-2)),i+"}")};function c(e){return!0!==e&&!1!==e&&isNaN(e)?'"'+e+'"':e}t.convertToJsonString=a},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5e77":function(e,t,r){var n=r("83ab"),i=r("1a2d"),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},"5e7e":function(e,t,r){"use strict";var n,i,o,a,s=r("23e7"),c=r("c430"),u=r("605d"),d=r("da84"),l=r("c65b"),f=r("cb2d"),h=r("d2bb"),p=r("d44e"),m=r("2626"),b=r("59ed"),g=r("1626"),y=r("861d"),v=r("19aa"),S=r("4840"),w=r("2cf4").set,C=r("b575"),_=r("44de"),A=r("e667"),I=r("01b4"),E=r("69f3"),T=r("d256"),x=r("4738"),P=r("f069"),k="Promise",D=x.CONSTRUCTOR,O=x.REJECTION_EVENT,R=x.SUBCLASSING,M=E.getterFor(k),N=E.set,B=T&&T.prototype,F=T,j=B,K=d.TypeError,U=d.document,L=d.process,X=P.f,z=X,G=!!(U&&U.createEvent&&d.dispatchEvent),W="unhandledrejection",q="rejectionhandled",H=0,V=1,Y=2,Q=1,Z=2,J=function(e){var t;return!(!y(e)||!g(t=e.then))&&t},$=function(e,t){var r,n,i,o=t.value,a=t.state==V,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,d=e.domain;try{s?(a||(t.rejection===Z&&ie(t),t.rejection=Q),!0===s?r=o:(d&&d.enter(),r=s(o),d&&(d.exit(),i=!0)),r===e.promise?u(K("Promise-chain cycle")):(n=J(r))?l(n,r,c,u):c(r)):u(o)}catch(f){d&&!i&&d.exit(),u(f)}},ee=function(e,t){e.notified||(e.notified=!0,C((function(){var r,n=e.reactions;while(r=n.get())$(r,e);e.notified=!1,t&&!e.rejection&&re(e)})))},te=function(e,t,r){var n,i;G?(n=U.createEvent("Event"),n.promise=t,n.reason=r,n.initEvent(e,!1,!0),d.dispatchEvent(n)):n={promise:t,reason:r},!O&&(i=d["on"+e])?i(n):e===W&&_("Unhandled promise rejection",r)},re=function(e){l(w,d,(function(){var t,r=e.facade,n=e.value,i=ne(e);if(i&&(t=A((function(){u?L.emit("unhandledRejection",n,r):te(W,r,n)})),e.rejection=u||ne(e)?Z:Q,t.error))throw t.value}))},ne=function(e){return e.rejection!==Q&&!e.parent},ie=function(e){l(w,d,(function(){var t=e.facade;u?L.emit("rejectionHandled",t):te(q,t,e.value)}))},oe=function(e,t,r){return function(n){e(t,n,r)}},ae=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=Y,ee(e,!0))},se=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw K("Promise can't be resolved itself");var n=J(t);n?C((function(){var r={done:!1};try{l(n,t,oe(se,r,e),oe(ae,r,e))}catch(i){ae(r,i,e)}})):(e.value=t,e.state=V,ee(e,!1))}catch(i){ae({done:!1},i,e)}}};if(D&&(F=function(e){v(this,j),b(e),l(n,this);var t=M(this);try{e(oe(se,t),oe(ae,t))}catch(r){ae(t,r)}},j=F.prototype,n=function(e){N(this,{type:k,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:H,value:void 0})},n.prototype=f(j,"then",(function(e,t){var r=M(this),n=X(S(this,F));return r.parent=!0,n.ok=!g(e)||e,n.fail=g(t)&&t,n.domain=u?L.domain:void 0,r.state==H?r.reactions.add(n):C((function(){$(n,r)})),n.promise})),i=function(){var e=new n,t=M(e);this.promise=e,this.resolve=oe(se,t),this.reject=oe(ae,t)},P.f=X=function(e){return e===F||e===o?new i(e):z(e)},!c&&g(T)&&B!==Object.prototype)){a=B.then,R||f(B,"then",(function(e,t){var r=this;return new F((function(e,t){l(a,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete B.constructor}catch(ce){}h&&h(B,j)}s({global:!0,constructor:!0,wrap:!0,forced:D},{Promise:F}),p(F,k,!1,!0),m(k)},"5eed":function(e,t,r){var n=r("d256"),i=r("1c7e"),o=r("4738").CONSTRUCTOR;e.exports=o||!i((function(e){n.all(e).then(void 0,(function(){}))}))},"5eff":function(e,t,r){r("e260"),r("4ec9"),r("d3b7"),r("3ca3");var n=r("428f");e.exports=n.Map},"5fb2":function(e,t,r){"use strict";var n=r("da84"),i=r("e330"),o=2147483647,a=36,s=1,c=26,u=38,d=700,l=72,f=128,h="-",p=/[^\0-\u007E]/,m=/[.\u3002\uFF0E\uFF61]/g,b="Overflow: input needs wider integers to process",g=a-s,y=n.RangeError,v=i(m.exec),S=Math.floor,w=String.fromCharCode,C=i("".charCodeAt),_=i([].join),A=i([].push),I=i("".replace),E=i("".split),T=i("".toLowerCase),x=function(e){var t=[],r=0,n=e.length;while(r=55296&&i<=56319&&r>1,e+=S(e/t);while(e>g*c>>1)e=S(e/g),n+=a;return S(n+(g+1)*e/(e+u))},D=function(e){var t=[];e=x(e);var r,n,i=e.length,u=f,d=0,p=l;for(r=0;r=u&&nS((o-d)/C))throw y(b);for(d+=(v-u)*C,u=v,r=0;ro)throw y(b);if(n==u){var I=d,E=a;while(1){var T=E<=p?s:E>=p+c?c:E-p;if(Ia){var m,b=l(arguments[a++]),g=f?p(s(b),f(b)):s(b),y=g.length,v=0;while(y>v)m=g[v++],n&&!o(h,b,m)||(r[m]=b[m])}return r}:f},"64c1":function(e,t,r){var n;n=function(){"use strict";var e,t={},r="function"==typeof Uint8Array;return t.decode=function(t){var n,i="string"==typeof t;if(void 0===e){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a="= \f\n\r\t \u2028\u2029";for(e=[],n=0;n<64;++n)e[o.charCodeAt(n)]=n;for(n=0;n>2):[],c=0,u=0,d=0;for(n=0;n=4?(s[d++]=c>>16,s[d++]=c>>8&255,s[d++]=255&c,c=0,u=0):c<<=6}}switch(u){case 1:throw"Base64 encoding incomplete: at least 2 bits missing";case 2:s[d++]=c>>10;break;case 3:s[d++]=c>>16,s[d++]=c>>8&255;break}return r&&s.length>d&&(s=s.subarray(0,d)),s},t.pretty=function(e){return e.length%4>0&&(e=(e+"===").slice(0,e.length+e.length%4)),e=e.replace(/-/g,"+").replace(/_/g,"/"),e.replace(/(.{80})/g,"$1\n")},t.re=/-----BEGIN [^-]+-----([A-Za-z0-9+/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+/=\s]+)====|^([A-Za-z0-9+/=\s]+)$/,t.unarmor=function(e){var r=t.re.exec(e);if(r)if(r[1])e=r[1];else if(r[2])e=r[2];else{if(!r[3])throw"RegExp out of sync";e=r[3]}return t.decode(e)},t}.call(t,r,t,e),void 0===n||(e.exports=n)},6547:function(e,t,r){var n=r("e330"),i=r("5926"),o=r("577e"),a=r("1d80"),s=n("".charAt),c=n("".charCodeAt),u=n("".slice),d=function(e){return function(t,r){var n,d,l=o(a(t)),f=i(r),h=l.length;return f<0||f>=h?e?"":void 0:(n=c(l,f),n<55296||n>56319||f+1===h||(d=c(l,f+1))<56320||d>57343?e?s(l,f):n:e?u(l,f,f+2):d-56320+(n-55296<<10)+65536)}};e.exports={codeAt:d(!1),charAt:d(!0)}},6566:function(e,t,r){"use strict";var n=r("9bf2").f,i=r("7c73"),o=r("6964"),a=r("0366"),s=r("19aa"),c=r("2266"),u=r("7dd0"),d=r("2626"),l=r("83ab"),f=r("f183").fastKey,h=r("69f3"),p=h.set,m=h.getterFor;e.exports={getConstructor:function(e,t,r,u){var d=e((function(e,n){s(e,h),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),l||(e.size=0),void 0!=n&&c(n,e[u],{that:e,AS_ENTRIES:r})})),h=d.prototype,b=m(t),g=function(e,t,r){var n,i,o=b(e),a=y(e,t);return a?a.value=r:(o.last=a={index:i=f(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=a),n&&(n.next=a),l?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},y=function(e,t){var r,n=b(e),i=f(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return o(h,{clear:function(){var e=this,t=b(e),r=t.index,n=t.first;while(n)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete r[n.index],n=n.next;t.first=t.last=void 0,l?t.size=0:e.size=0},delete:function(e){var t=this,r=b(t),n=y(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),l?r.size--:t.size--}return!!n},forEach:function(e){var t,r=b(this),n=a(e,arguments.length>1?arguments[1]:void 0);while(t=t?t.next:r.first){n(t.value,t.key,this);while(t&&t.removed)t=t.previous}},has:function(e){return!!y(this,e)}}),o(h,r?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),l&&n(h,"size",{get:function(){return b(this).size}}),d},setStrong:function(e,t,r){var n=t+" Iterator",i=m(t),o=m(n);u(e,t,(function(e,t){p(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){var e=o(this),t=e.kind,r=e.last;while(r&&r.removed)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),d(t)}}},"65f0":function(e,t,r){var n=r("0b42");e.exports=function(e,t){return new(n(e))(0===t?0:t)}},"67d3":function(e,t,r){"use strict";(function(e){r.d(t,"d",(function(){return w})),r.d(t,"b",(function(){return C})),r.d(t,"c",(function(){return _}));var n=r("3662"),i=r("c4e3"),o=r.n(i),a=r("6b33"),s=r("73fd"),c=r("a9c6");function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function d(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){return b(e)||m(e,t)||h(e,t)||f()}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){if(e){if("string"===typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}function y(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void r(u)}s.done?t(c):Promise.resolve(c).then(n,i)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){y(o,n,i,a,s,"next",e)}function s(e){y(o,n,i,a,s,"throw",e)}a(void 0)}))}}var S=r("74db"),w=function(e){return new Promise((function(t,r){o.a.loadAsync(e).then((function(e){t(e)}),(function(e){r(e)}))}))},C=function(){var e=v(g().mark((function e(t){var r,n,i;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,U(t,"OFD.xml");case 2:return r=e.sent,n=r["json"]["ofd:OFD"]["ofd:DocBody"],i=[],i=i.concat(n),e.abrupt("return",[t,i]);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=v(g().mark((function e(t){var r,n,i,o,a,s,c,u;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=l(t,2),n=r[0],i=r[1],o=[],a=d(i),e.prev=3,a.s();case 5:if((s=a.n()).done){e.next=30;break}if(c=s.value,!c){e.next=28;break}return e.next=10,A(n,c);case 10:return u=e.sent,e.next=13,I(u);case 13:return u=e.sent,e.next=16,T(u);case 16:return u=e.sent,e.next=19,x(u);case 19:return u=e.sent,e.next=22,P(u);case 22:return u=e.sent,e.next=25,k(u);case 25:u=e.sent,u.docInfo=c["ofd:DocInfo"],o.push(u);case 28:e.next=5;break;case 30:e.next=35;break;case 32:e.prev=32,e.t0=e["catch"](3),a.e(e.t0);case 35:return e.prev=35,a.f(),e.finish(35);case 38:return e.abrupt("return",o);case 39:case"end":return e.stop()}}),e,null,[[3,32,35,38]])})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=v(g().mark((function e(t,r){var n,i,o,s,c,u,l,f,h,p,m,b,y,v,S,w,C,_;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=r["ofd:DocRoot"],n=Object(a["l"])(n),i=n.split("/")[0],o=r["ofd:Signatures"],e.next=6,B(t,o,i);case 6:s=e.sent,c={},u=d(s),e.prev=9,u.s();case 11:if((l=u.n()).done){e.next=25;break}if(f=l.value,!(f.sealObj&&Object.keys(f.sealObj).length>0)){e.next=23;break}if("ofd"!==f.sealObj.type){e.next=22;break}return e.next=17,K(f);case 17:h=e.sent,p=d(h);try{for(p.s();!(m=p.n()).done;)b=m.value,f.stampAnnot.boundary=Object(a["k"])(f.stampAnnot["@_Boundary"]),f.stampAnnot.pageRef=f.stampAnnot["@_PageRef"],c[f.stampAnnot["@_PageRef"]]||(c[f.stampAnnot["@_PageRef"]]=[]),c[f.stampAnnot["@_PageRef"]].push({type:"ofd",obj:b,stamp:f})}catch(g){p.e(g)}finally{p.f()}e.next=23;break;case 22:if("png"===f.sealObj.type||"gif"===f.sealObj.type||"jpg"===f.sealObj.type||"jpeg"===f.sealObj.type){y="data:image/png;base64,"+btoa(String.fromCharCode.apply(null,f.sealObj.ofdArray)),v=[],v=v.concat(f.stampAnnot),S=d(v);try{for(S.s();!(w=S.n()).done;)C=w.value,C&&(_={img:y,pageId:C["@_PageRef"],boundary:Object(a["k"])(C["@_Boundary"]),clip:Object(a["k"])(C["@_Clip"])},c[C["@_PageRef"]]||(c[C["@_PageRef"]]=[]),c[C["@_PageRef"]].push({type:"png",obj:_,stamp:f}))}catch(g){S.e(g)}finally{S.f()}}else console.log(f.sealObj.type);case 23:e.next=11;break;case 25:e.next=30;break;case 27:e.prev=27,e.t0=e["catch"](9),u.e(e.t0);case 30:return e.prev=30,u.f(),e.finish(30);case 33:return e.abrupt("return",[t,i,n,c]);case 34:case"end":return e.stop()}}),e,null,[[9,27,30,33]])})));return function(t,r){return e.apply(this,arguments)}}(),I=function(){var e=v(g().mark((function e(t){var r,n,i,o,a,s,c,u,d,f,h;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=l(t,4),n=r[0],i=r[1],o=r[2],a=r[3],e.next=3,U(n,o);case 3:if(s=e.sent,c=s["json"]["ofd:Document"],u=c["ofd:Annotations"],d=[],!u){e.next=15;break}if(-1!==u.indexOf("/")&&(f=u.substring(0,u.indexOf("/"))),-1===u.indexOf(i)&&(u="".concat(i,"/").concat(u)),!n.files[u]){e.next=15;break}return e.next=13,U(n,u);case 13:u=e.sent,d=d.concat(u["json"]["ofd:Annotations"]["ofd:Page"]);case 15:return e.next=17,E(f,d,i,n);case 17:return h=e.sent,e.abrupt("return",[n,i,c,a,h]);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=v(g().mark((function e(t,r,n,i){var o,s,c,u,l,f,h,p,m,b,y,v,S,w,C;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:o={},s=d(r),e.prev=2,s.s();case 4:if((c=s.n()).done){e.next=44;break}if(u=c.value,u){e.next=8;break}return e.abrupt("continue",42);case 8:if(l=u["@_PageID"],f=u["ofd:FileLoc"],f=Object(a["l"])(f),t&&-1===f.indexOf(t)&&(f="".concat(t,"/").concat(f)),-1===f.indexOf(n)&&(f="".concat(n,"/").concat(f)),!i.files[f]){e.next=42;break}return e.next=16,U(i,f);case 16:h=e.sent,p=[],p=p.concat(h["json"]["ofd:PageAnnot"]["ofd:Annot"]),o[l]||(o[l]=[]),m=d(p),e.prev=21,m.s();case 23:if((b=m.n()).done){e.next=34;break}if(y=b.value,y){e.next=27;break}return e.abrupt("continue",32);case 27:v=y["@_Type"],S=!y["@_Visible"]||y["@_Visible"],w=y["ofd:Appearance"],C={type:v,appearance:w,visible:S},o[l].push(C);case 32:e.next=23;break;case 34:e.next=39;break;case 36:e.prev=36,e.t0=e["catch"](21),m.e(e.t0);case 39:return e.prev=39,m.f(),e.finish(39);case 42:e.next=4;break;case 44:e.next=49;break;case 46:e.prev=46,e.t1=e["catch"](2),s.e(e.t1);case 49:return e.prev=49,s.f(),e.finish(49);case 52:return e.abrupt("return",o);case 53:case"end":return e.stop()}}),e,null,[[2,46,49,52],[21,36,39,42]])})));return function(t,r,n,i){return e.apply(this,arguments)}}(),T=function(){var e=v(g().mark((function e(t){var r,n,i,o,a,s,c,u,d,f,h,p,m;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=l(t,5),n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],c=o["ofd:CommonData"]["ofd:DocumentRes"],u={},d={},f={},h=[],!c){e.next=23;break}if(-1==c.indexOf(i)&&(c="".concat(i,"/").concat(c)),!n.files[c]){e.next=23;break}return e.next=11,U(n,c);case 11:return p=e.sent,m=p["json"]["ofd:Res"],e.next=15,D(m,n,i);case 15:return u=e.sent,e.next=18,O(m);case 18:return d=e.sent,e.next=21,R(n,m,i);case 21:f=e.sent,h=M(m);case 23:return e.abrupt("return",[n,i,o,a,s,u,d,f,h]);case 24:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=v(g().mark((function e(t){var r,n,i,o,a,s,c,u,f,h,p,m,b,y,v,S,w,C,_,A,I,E,T;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=l(t,9),n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],c=r[5],u=r[6],f=r[7],h=r[8],p=o["ofd:CommonData"]["ofd:PublicRes"],!p){e.next=30;break}if(m=[],p instanceof Array){b=d(p);try{for(b.s();!(y=b.n()).done;)v=y.value,v&&m.push(v)}catch(g){b.e(g)}finally{b.f()}}else m.push(p);S=0,w=m;case 6:if(!(S=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function i(e,t){if(e){if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r.1?e:.1,l=l>u?u:l,d=e},p=function(){return d},m=function(e){return c(e,96*l)},b=function(e){if(-1===e.indexOf("g")){var t,r=[],i=n(e.split(" "));try{for(i.s();!(t=i.n()).done;){var o=t.value;r.push(parseFloat(o))}}catch(m){i.e(m)}finally{i.f()}return r}var a,s=e.split(" "),c=!1,u=!1,d=0,l=[],f=n(s);try{for(f.s();!(a=f.n()).done;){var h=a.value;if("g"===h)c=!0;else{if(!h||0==h.trim().length)continue;if(c)d=parseInt(h),u=!0,c=!1;else if(u){for(var p=0;p0&&(c=b(s["@_DeltaX"])),s["@_DeltaY"]&&s["@_DeltaY"].length>0&&(u=b(s["@_DeltaY"]));var d=s["#text"];if(d){d+="",d=C(d),d=d.replace(/ /g," ");for(var l=0;l0&&c.length>0&&(t+=c[l-1]),l>0&&u.length>0&&(r+=u[l-1]);var f=d.substring(l,l+1),h={x:m(t),y:m(r),text:f};i.push(h)}}}}}catch(p){a.e(p)}finally{a.f()}return i},y=function(e){return e&&0===e.indexOf("/")&&(e=e.replace("/","")),e},v=function(e){return e||"string"===typeof e?e.substring(e.lastIndexOf(".")+1):""},S=/&\w+;|&#(\d+);/g,w={"<":"<",">":">","&":"&"," ":" ",""":'"',"©":"","'":"'"},C=function(e){return e=void 0!=e?e:this.toString(),"string"!=typeof e?e:e.replace(S,(function(e,t){var r=w[e];return void 0==r&&(r=isNaN(t)?e:String.fromCharCode(160==t?32:t)),r}))},_={"楷体":"楷体, KaiTi, Kai, simkai",kaiti:"楷体, KaiTi, Kai, simkai",Kai:"楷体, KaiTi, Kai",simsun:"SimSun, simsun, Songti SC","宋体":"SimSun, simsun, Songti SC","黑体":"SimHei, STHeiti, simhei","仿宋":"FangSong, STFangsong, simfang","小标宋体":"sSun","方正小标宋_gbk":"sSun","仿宋_gb2312":"FangSong, STFangsong, simfang","楷体_gb2312":"楷体, KaiTi, Kai, simkai",couriernew:"Courier New","courier new":"Courier New"},A=function(e){var t="simsun";"undefined"!=typeof e&&(t=e.familyName),t||(t=e.fontName),_[t.toLowerCase()]&&(t=_[t.toLowerCase()]);for(var r=0,n=Object.keys(_);r0){if(-1!==e.indexOf("#"))return e=e.replace(/#/g,""),e=e.replace(/ /g,""),e="#"+e.toString(),e;var t=e.split(" ");return"rgb(".concat(t[0],", ").concat(t[1],", ").concat(t[2],")")}return"rgb(0, 0, 0)"},x=function(e){return{x:m(e.x),y:m(e.y),w:m(e.w),h:m(e.h)}}},"6b84":function(e,t,r){r("3ca3"),r("a630");var n=r("428f");e.exports=n.Array.from},"6b9e":function(e,t,r){var n=r("746f");n("search")},"6c57":function(e,t,r){var n=r("23e7"),i=r("da84");n({global:!0},{globalThis:i})},"6d61":function(e,t,r){"use strict";var n=r("23e7"),i=r("da84"),o=r("e330"),a=r("94ca"),s=r("cb2d"),c=r("f183"),u=r("2266"),d=r("19aa"),l=r("1626"),f=r("861d"),h=r("d039"),p=r("1c7e"),m=r("d44e"),b=r("7156");e.exports=function(e,t,r){var g=-1!==e.indexOf("Map"),y=-1!==e.indexOf("Weak"),v=g?"set":"add",S=i[e],w=S&&S.prototype,C=S,_={},A=function(e){var t=o(w[e]);s(w,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(y&&!f(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return y&&!f(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!f(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})},I=a(e,!l(S)||!(y||w.forEach&&!h((function(){(new S).entries().next()}))));if(I)C=r.getConstructor(t,e,g,v),c.enable();else if(a(e,!0)){var E=new C,T=E[v](y?{}:-0,1)!=E,x=h((function(){E.has(1)})),P=p((function(e){new S(e)})),k=!y&&h((function(){var e=new S,t=5;while(t--)e[v](t,t);return!e.has(-0)}));P||(C=t((function(e,t){d(e,w);var r=b(new S,e,C);return void 0!=t&&u(t,r[v],{that:r,AS_ENTRIES:g}),r})),C.prototype=w,w.constructor=C),(x||k)&&(A("delete"),A("has"),g&&A("get")),(k||T)&&A(v),y&&w.clear&&delete w.clear}return _[e]=C,n({global:!0,constructor:!0,forced:C!=S},_),m(C,e),y||r.setStrong(C,e,g),C}},"6f48":function(e,t,r){"use strict";var n=r("6d61"),i=r("6566");n("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},"6f53":function(e,t,r){var n=r("83ab"),i=r("e330"),o=r("df75"),a=r("fc6a"),s=r("d1e7").f,c=i(s),u=i([].push),d=function(e){return function(t){var r,i=a(t),s=o(i),d=s.length,l=0,f=[];while(d>l)r=s[l++],n&&!c(i,r)||u(f,e?[r,i[r]]:i[r]);return f}};e.exports={entries:d(!0),values:d(!1)}},"6f9c":function(e,t,r){var n;n=function(){"use strict";var e,t={},r="function"==typeof Uint8Array;return t.decode=function(t){var n,i="string"==typeof t;if(void 0===e){var o="0123456789ABCDEF",a=" \f\n\r\t \u2028\u2029";for(e=[],n=0;n<16;++n)e[o.charCodeAt(n)]=n;for(o=o.toLowerCase(),n=10;n<16;++n)e[o.charCodeAt(n)]=n;for(n=0;n>1):[],c=0,u=0,d=0;for(n=0;n=2?(s[d++]=c,c=0,u=0):c<<=4}}if(u)throw"Hex encoding incomplete: 4 bits missing";return r&&s.length>d&&(s=s.subarray(0,d)),s},t}.call(t,r,t,e),void 0===n||(e.exports=n)},7149:function(e,t,r){"use strict";var n=r("23e7"),i=r("d066"),o=r("c430"),a=r("d256"),s=r("4738").CONSTRUCTOR,c=r("cdf9"),u=i("Promise"),d=o&&!s;n({target:"Promise",stat:!0,forced:o||s},{resolve:function(e){return c(d&&this===u?a:this,e)}})},7156:function(e,t,r){var n=r("1626"),i=r("861d"),o=r("d2bb");e.exports=function(e,t,r){var a,s;return o&&n(a=t.constructor)&&a!==r&&i(s=a.prototype)&&s!==r.prototype&&o(e,s),e}},7276:function(e,t,r){"use strict";var n=r("6d61"),i=r("acac");n("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},"73fd":function(e,t,r){"use strict";r.d(t,"a",(function(){return D}));r("7f3b");var n={ERRORS:0,WARNINGS:1,INFOS:5},i=n.WARNINGS;function o(e){i>=n.INFOS&&console.log("Info: ".concat(e))}function a(e){throw new Error(e)}function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var c=function(){function e(t){this.constructor===e&&a("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="})();function u(e){return e<=0?0:Math.ceil(Math.log2(e))}function d(e,t){return e[t]<<24>>24}function l(e,t){return e[t]<<8|e[t+1]}function f(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}return m(e,[{key:"byteIn",value:function(){var e=this.data,t=this.bp;255===e[t]?e[t+1]>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t):(t++,this.clow+=t65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}},{key:"readBit",value:function(e,t){var r,n=e[t]>>1,i=1&e[t],o=b[n],a=o.qe,s=this.a-a;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--}while(0===(32768&s));return this.a=s,e[t]=n<<1|i,r}}]),e}(),y=function(){var e=-2,t=-1,r=0,n=1,i=2,a=3,s=4,c=5,u=6,d=7,l=8,f=[[-1,-1],[-1,-1],[7,l],[7,d],[6,u],[6,u],[6,c],[6,c],[4,r],[4,r],[4,r],[4,r],[4,r],[4,r],[4,r],[4,r],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,n],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,s],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i],[1,i]],h=[[-1,-1],[12,e],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],p=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],m=[[-1,-1],[-1,-1],[12,e],[12,e],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],b=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],g=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"function"!==typeof e.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=e,this.eof=!1,this.encoding=t.K||0,this.eoline=t.EndOfLine||!1,this.byteAlign=t.EncodedByteAlign||!1,this.columns=t.Columns||1728,this.rows=t.Rows||0;var r,n=t.EndOfBlock;null!==n&&void 0!==n||(n=!0),this.eoblock=n,this.black=t.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;while(0===(r=this._lookBits(12)))this._eatBits(1);1===r&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}return y.prototype={readNextChar:function(){if(this.eof)return-1;var e,f,h,p,m,b=this.refLine,g=this.codingLine,y=this.columns;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;var v,S,w;if(this.err=!1,this.nextLine2D){for(p=0;g[p]=64);do{S+=w=this._getWhiteCode()}while(w>=64)}else{do{v+=w=this._getWhiteCode()}while(w>=64);do{S+=w=this._getBlackCode()}while(w>=64)}this._addPixels(g[this.codingPos]+v,f),g[this.codingPos]0?--e:++e;while(b[e]<=g[this.codingPos]&&b[e]0?--e:++e;while(b[e]<=g[this.codingPos]&&b[e]0?--e:++e;while(b[e]<=g[this.codingPos]&&b[e]=64);else do{v+=w=this._getWhiteCode()}while(w>=64);this._addPixels(g[this.codingPos]+v,f),f^=1}}var C=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(v=this._lookBits(12),this.eoline)while(v!==t&&1!==v)this._eatBits(1),v=this._lookBits(12);else while(0===v)this._eatBits(1),v=this._lookBits(12);1===v?(this._eatBits(12),C=!0):v===t&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&C&&this.byteAlign){if(v=this._lookBits(12),1===v){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(p=0;p<4;++p)v=this._lookBits(12),1!==v&&o("bad rtc code: "+v),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){while(1){if(v=this._lookBits(13),v===t)return this.eof=!0,-1;if(v>>1===1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&v))}g[0]>0?this.outputBits=g[this.codingPos=0]:this.outputBits=g[this.codingPos=1],this.row++}if(this.outputBits>=8)m=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&g[this.codingPos]h?(m<<=h,1&this.codingPos||(m|=255>>8-h),this.outputBits-=h,h=0):(m<<=this.outputBits,1&this.codingPos||(m|=255>>8-this.outputBits),h-=this.outputBits,this.outputBits=0,g[this.codingPos]0&&(m<<=h,h=0))}while(h)}return this.black&&(m^=255),m},_addPixels:function(e,t){var r=this.codingLine,n=this.codingPos;e>r[n]&&(e>this.columns&&(o("row is wrong length"),this.err=!0,e=this.columns),1&n^t&&++n,r[n]=e),this.codingPos=n},_addPixelsNeg:function(e,t){var r=this.codingLine,n=this.codingPos;if(e>r[n])e>this.columns&&(o("row is wrong length"),this.err=!0,e=this.columns),1&n^t&&++n,r[n]=e;else if(e0&&e=o){var c=n[s-o];if(c[0]===a)return this._eatBits(a),[!0,c[1],!0]}}return[!1,0,!1]},_getTwoDimCode:function(){var e,r=0;if(this.eoblock){if(r=this._lookBits(7),e=f[r],e&&e[0]>0)return this._eatBits(e[0]),e[1]}else{var n=this._findTableCode(1,7,f);if(n[0]&&n[2])return n[1]}return o("Bad two dim code"),t},_getWhiteCode:function(){var e,r=0;if(this.eoblock){if(r=this._lookBits(12),r===t)return 1;if(e=r>>5===0?h[r]:p[r>>3],e[0]>0)return this._eatBits(e[0]),e[1]}else{var n=this._findTableCode(1,9,p);if(n[0])return n[1];if(n=this._findTableCode(11,12,h),n[0])return n[1]}return o("bad white code"),this._eatBits(1),1},_getBlackCode:function(){var e,r;if(this.eoblock){if(e=this._lookBits(13),e===t)return 1;if(r=e>>7===0?m[e]:e>>9===0&&e>>7!==0?b[(e>>1)-64]:g[e>>7],r[0]>0)return this._eatBits(r[0]),r[1]}else{var n=this._findTableCode(2,6,g);if(n[0])return n[1];if(n=this._findTableCode(7,12,b,64),n[0])return n[1];if(n=this._findTableCode(10,13,m),n[0])return n[1]}return o("bad black code"),this._eatBits(1),1},_lookBits:function(e){var r;while(this.inputBits>16-e;this.inputBuf=this.inputBuf<<8|r,this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e},_eatBits:function(e){(this.inputBits-=e)<0&&(this.inputBits=0)}},y}();function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function S(e,t){for(var r=0;r>>0}var a=o(1),s=o(1)?o(1)?o(1)?o(1)?o(1)?o(32)+4436:o(12)+340:o(8)+84:o(6)+20:o(4)+4:o(2);return 0===a?s:s>0?-s:null}function n(e,t,r){for(var n=e.getContexts("IAID"),i=1,o=0;o=R&&x=M)for(z=z<<1&S,m=0;m=0&&k=0&&(D=j[P][k],D&&(z|=D<=e?M<<=1:M=M<<1|_[O][R];for(l=0;l=w||R<0||R>=S?M<<=1:M=M<<1|n[O][R];var N=A.readBit(I,M);P[D]=N}}return _}function v(e,t,i,o,a,s,c,d,l,f,h,p){if(e&&t)throw new k("symbol refinement with Huffman is not supported");var g,y,v=[],w=0,C=u(i.length+o),_=h.decoder,A=h.contextCache;e&&(g=j(1),y=[],C=Math.max(C,1));while(v.length1)P=S(e,t,E,w,0,O,1,i.concat(v),C,0,0,1,0,s,l,f,h,0,p);else{var R=n(A,_,C),M=r(A,"IARDX",_),N=r(A,"IARDY",_),B=R1&&(M=e?w.readBits(S):r(T,"IAIT",E));var N=c*x+M,B=e?m.symbolIDTable.decode(w):n(T,E,d),F=t&&(e?w.readBit():r(T,"IARI",E)),j=u[B],K=j[0].length,U=j.length;if(F){var L=r(T,"IARDW",E),X=r(T,"IARDH",E),z=r(T,"IARDX",E),G=r(T,"IARDY",E);K+=L,U+=X,j=b(K,U,g,j,(L>>1)+z,(X>>1)+G,!1,y,v)}var W,q,H,V=N-(1&h?0:U-1),Y=R-(2&h?K-1:0);if(l){for(W=0;W=0;y--)P=e?G(x,c,d,!0):m(!1,c,d,r,!1,g,T,b),L[y]=P;for(D=0;D=0;v--)R=L[v][D][O]^R,M|=R<>8,F=f+D*h-O*p>>8,B>=0&&B+A<=n&&F>=0&&F+I<=i)for(y=0;y=i))for(U=w[z],j=N[y],v=0;v=0&&X>5&7,u=[31&s],d=t+6;if(7===s){c=536870911&f(e,d-1),d+=3;var h=c+7>>3;u[0]=e[d++];while(--h>0)u.push(e[d++])}else if(5===s||6===s)throw new k("invalid referred-to flags");r.retainBits=u;var p=4;r.number<=256?p=1:r.number<=65536&&(p=2);var m,b,g=[];for(m=0;m>>24&255,_[3]=v.height>>16&255,_[4]=v.height>>8&255,_[5]=255&v.height,m=d,b=e.length;m>2&3,h.huffmanDWSelector=p>>4&3,h.bitmapSizeSelector=p>>6&1,h.aggregationInstancesSelector=p>>7&1,h.bitmapCodingContextUsed=!!(256&p),h.bitmapCodingContextRetained=!!(512&p),h.template=p>>10&3,h.refinementTemplate=p>>12&1,c+=2,!h.huffman){for(o=0===h.template?4:1,n=[],i=0;i>2&3,m.stripSize=1<>4&3,m.transposed=!!(64&b),m.combinationOperator=b>>7&3,m.defaultPixelValue=b>>9&1,m.dsOffset=b<<17>>27,m.refinementTemplate=b>>15&1,m.huffman){var g=l(s,c);c+=2,m.huffmanFS=3&g,m.huffmanDS=g>>2&3,m.huffmanDT=g>>4&3,m.huffmanRefinementDW=g>>6&3,m.huffmanRefinementDH=g>>8&3,m.huffmanRefinementDX=g>>10&3,m.huffmanRefinementDY=g>>12&3,m.huffmanRefinementSizeSelector=!!(16384&g)}if(m.refinement&&!m.refinementTemplate){for(n=[],i=0;i<2;i++)n.push({x:d(s,c),y:d(s,c+1)}),c+=2;m.refinementAt=n}m.numberOfSymbolInstances=f(s,c),c+=4,r=[m,a.referredTo,s,c,u];break;case 16:var y={},v=s[c++];y.mmr=!!(1&v),y.template=v>>1&3,y.patternWidth=s[c++],y.patternHeight=s[c++],y.maxPatternIndex=f(s,c),c+=4,r=[y,a.number,s,c,u];break;case 22:case 23:var S={};S.info=I(s,c),c+=E;var w=s[c++];S.mmr=!!(1&w),S.template=w>>1&3,S.enableSkip=!!(8&w),S.combinationOperator=w>>4&7,S.defaultPixelValue=w>>7&1,S.gridWidth=f(s,c),c+=4,S.gridHeight=f(s,c),c+=4,S.gridOffsetX=4294967295&f(s,c),c+=4,S.gridOffsetY=4294967295&f(s,c),c+=4,S.gridVectorX=l(s,c),c+=2,S.gridVectorY=l(s,c),c+=2,r=[S,a.referredTo,s,c,u];break;case 38:case 39:var C={};C.info=I(s,c),c+=E;var _=s[c++];if(C.mmr=!!(1&_),C.template=_>>1&3,C.prediction=!!(8&_),!C.mmr){for(o=0===C.template?4:1,n=[],i=0;i>2&1,A.combinationOperator=T>>3&3,A.requiresBuffer=!!(32&T),A.combinationOperatorOverride=!!(64&T),r=[A];break;case 49:break;case 50:break;case 51:break;case 53:r=[a.number,s,c,u];break;case 62:break;default:throw new k("segment type ".concat(a.typeName,"(").concat(a.type,")")+" is not implemented")}var x="on"+a.typeName;x in t&&t[x].apply(t,r)}function x(e,t){for(var r=0,n=e.length;r>=1;return{imgData:l,width:c,height:u}}function O(){}function R(e){2===e.length?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=e[0],this.rangeLength=0,this.prefixCode=e[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=e[0],this.prefixLength=e[1],this.rangeLength=e[2],this.prefixCode=e[3],this.isLowerRange="lower"===e[4])}function M(e){this.children=[],e?(this.isLeaf=!0,this.rangeLength=e.rangeLength,this.rangeLow=e.rangeLow,this.isLowerRange=e.isLowerRange,this.isOOB=e.isOOB):this.isLeaf=!1}function N(e,t){t||this.assignPrefixCodes(e),this.rootNode=new M(null);for(var r=0,n=e.length;r0&&this.rootNode.buildTree(i,i.prefixLength-1)}}function B(e,t,r){var n,i,o=e[t],a=4294967295&f(e,t+1),s=4294967295&f(e,t+5),c=new K(e,t+9,r),u=1+(o>>1&7),d=1+(o>>4&7),l=[],h=a;do{n=c.readBits(u),i=c.readBits(d),l.push(new R([h,n,i,0])),h+=1<>3,r=new Uint8ClampedArray(t*e.height);if(e.defaultPixelValue)for(var n=0,i=r.length;n>3,d=a.combinationOperatorOverride?e.combinationOperator:a.combinationOperator,l=this.buffer,f=128>>(7&e.x),h=e.y*u+(e.x>>3);switch(d){case 0:for(r=0;r>=1,i||(i=128,o++);h+=u}break;case 2:for(r=0;r>=1,i||(i=128,o++);h+=u}break;default:throw new k("operator ".concat(d," is not supported"))}},onImmediateGenericRegion:function(e,r,n,i){var o=e.info,a=new t(r,n,i),s=m(e.mmr,o.width,o.height,e.template,e.prediction,null,e.at,a);this.drawBitmap(o,s)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(e,r,n,i,o,a){var s,c;e.huffman&&(s=X(e,n,this.customTables),c=new K(i,o,a));var u=this.symbols;u||(this.symbols=u={});for(var d=[],l=0,f=n.length;l>t&1;if(t<=0)this.children[r]=new M(e);else{var n=this.children[r];n||(this.children[r]=n=new M(null)),n.buildTree(e,t-1)}},decodeNode:function(e){if(this.isLeaf){if(this.isOOB)return null;var t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}var r=this.children[e.readBit()];if(!r)throw new k("invalid Huffman data");return r.decodeNode(e)}},N.prototype={decode:function(e){return this.rootNode.decodeNode(e)},assignPrefixCodes:function(e){for(var t=e.length,r=0,n=0;n=32){var l=void 0,f=void 0,h=void 0;switch(d){case 32:if(0===u)throw new k("no previous value in symbol ID table");f=i.readBits(2)+3,l=o[u-1].prefixLength;break;case 33:f=i.readBits(3)+3,l=0;break;case 34:f=i.readBits(7)+11,l=0;break;default:throw new k("invalid code length in symbol ID table")}for(h=0;h>l&1,l--}if(n&&!c)for(var h=5,p=0;p=this.end)throw new k("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}var e=this.currentByte>>this.shift&1;return this.shift--,e},readBits:function(e){var t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<=this.end?-1:this.data[this.position++]}},W.prototype={parseChunks:function(e){return P(e)},parse:function(e){var t=D(e),r=t.imgData,n=t.width,i=t.height;return this.width=n,this.height=i,r}},W}()},7418:function(e,t){t.f=Object.getOwnPropertySymbols},"746f":function(e,t,r){var n=r("428f"),i=r("1a2d"),o=r("e538"),a=r("9bf2").f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},"74db":function(e,t,r){"use strict";const n=r("5486"),i=r("8a24"),o=r("8a24"),a=r("90da").buildOptions,s=r("adc3");t.parse=function(e,t,r){if(r){!0===r&&(r={});const t=s.validate(e,r);if(!0!==t)throw Error(t.err.msg)}t=a(t,o.defaultOptions,o.props);const c=i.getTraversalObj(e,t);return n.convertToJson(c,t)},t.convertTonimn=r("8006").convert2nimn,t.getTraversalObj=i.getTraversalObj,t.convertToJson=n.convertToJson,t.convertToJsonString=r("5a79").convertToJsonString,t.validate=s.validate,t.j2xParser=r("cd38"),t.parseToNimn=function(e,r,n){return t.convertTonimn(t.getTraversalObj(e,n),r,n)}},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7a77":function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},"7aac":function(e,t,r){"use strict";var n=r("c532");e.exports=n.isStandardBrowserEnv()?function(){return{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},"7b0b":function(e,t,r){var n=r("da84"),i=r("1d80"),o=n.Object;e.exports=function(e){return o(i(e))}},"7c73":function(e,t,r){var n,i=r("825a"),o=r("37e8"),a=r("7839"),s=r("d012"),c=r("1be4"),u=r("cc12"),d=r("f772"),l=">",f="<",h="prototype",p="script",m=d("IE_PROTO"),b=function(){},g=function(e){return f+p+l+e+f+"/"+p+l},y=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){var e,t=u("iframe"),r="java"+p+":";return t.style.display="none",c.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(g("document.F=Object")),e.close(),e.F},S=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}S="undefined"!=typeof document?document.domain&&n?y(n):v():y(n);var e=a.length;while(e--)delete S[h][a[e]];return S()};s[m]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(b[h]=i(e),r=new b,b[h]=null,r[m]=e):r=S(),void 0===t?r:o.f(r,t)}},"7dd0":function(e,t,r){"use strict";var n=r("23e7"),i=r("c65b"),o=r("c430"),a=r("5e77"),s=r("1626"),c=r("9ed3"),u=r("e163"),d=r("d2bb"),l=r("d44e"),f=r("9112"),h=r("cb2d"),p=r("b622"),m=r("3f8c"),b=r("ae93"),g=a.PROPER,y=a.CONFIGURABLE,v=b.IteratorPrototype,S=b.BUGGY_SAFARI_ITERATORS,w=p("iterator"),C="keys",_="values",A="entries",I=function(){return this};e.exports=function(e,t,r,a,p,b,E){c(r,t,a);var T,x,P,k=function(e){if(e===p&&N)return N;if(!S&&e in R)return R[e];switch(e){case C:return function(){return new r(this,e)};case _:return function(){return new r(this,e)};case A:return function(){return new r(this,e)}}return function(){return new r(this)}},D=t+" Iterator",O=!1,R=e.prototype,M=R[w]||R["@@iterator"]||p&&R[p],N=!S&&M||k(p),B="Array"==t&&R.entries||M;if(B&&(T=u(B.call(new e)),T!==Object.prototype&&T.next&&(o||u(T)===v||(d?d(T,v):s(T[w])||h(T,w,I)),l(T,D,!0,!0),o&&(m[D]=I))),g&&p==_&&M&&M.name!==_&&(!o&&y?f(R,"name",_):(O=!0,N=function(){return i(M,this)})),p)if(x={values:k(_),keys:b?N:k(C),entries:k(A)},E)for(P in x)(S||O||!(P in R))&&h(R,P,x[P]);else n({target:t,proto:!0,forced:S||O},x);return o&&!E||R[w]===N||h(R,w,N,{name:p}),m[t]=N,x}},"7efc":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return h}));var n=r("6b33"),i={parse:function(e){var t=function(e,t,r,n){i["B"];var o=i["T"],a={cmap:o.cmap,head:o.head,hhea:o.hhea,maxp:o.maxp,hmtx:o.hmtx,name:o.name,"OS/2":o.OS2,post:o.post,loca:o.loca,kern:o.kern,glyf:o.glyf,"CFF ":o.CFF,CBLC:o.CBLC,CBDT:o.CBDT,"SVG ":o.SVG,COLR:o.colr,CPAL:o.cpal,sbix:o.sbix},s={_data:e,_index:t,_offset:r};for(var c in a){var u=i["findTable"](e,c,r);if(u){var d=u[0],l=n[d];null==l&&(l=a[c].parseTab(e,d,u[1],s)),s[c]=n[d]=l}}return s},r=i["B"],n=new Uint8Array(e),o={},a=r.readASCII(n,0,4);if("ttcf"==a){var s=4;r.readUshort(n,s);s+=2;r.readUshort(n,s);s+=2;var c=r.readUint(n,s);s+=4;for(var u=[],d=0;d>8&255,e[t+1]=255&r},readUshorts:function(e,t,r){for(var n=[],o=0;o>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=r>>0&255},readUint64:function(e,t){return 4294967296*i["B"].readUint(e,t)+i["B"].readUint(e,t+4)},readASCII:function(e,t,r){for(var n="",i=0;i255?-1:i["T"].CFF.glyphByUnicode(e,i["T"].CFF.tableSE[t])},readCharset:function(e,t,r){var n=i["B"],o=[".notdef"],a=e[t];if(t++,0==a)for(var s=0;s>4,m=15&h;if(15!=p&&f.push(p),15!=m&&f.push(m),15==m)break}for(var b="",g=[0,1,2,3,4,5,6,7,8,9,".","e","e-","reserved","-","endOfNumber"],y=0;y>>1;r.searchRange=o(e,t),t+=2,r.entrySelector=o(e,t),t+=2,r.rangeShift=o(e,t),t+=2,r.endCount=a(e,t,d),t+=2*d,t+=2,r.startCount=a(e,t,d),t+=2*d,r.idDelta=[];for(var l=0;l>>1),r},parse6:function(e,t,r){var n=i["B"];t+=2;n.readUshort(e,t);t+=2;n.readUshort(e,t);t+=2,r.firstCode=n.readUshort(e,t),t+=2;var o=n.readUshort(e,t);t+=2,r.glyphIdArray=[];for(var a=0;a=s.xMax||s.yMin>=s.yMax)return null;if(s.noc>0){s.endPts=[];for(var c=0;c>>8;f&=15,0==f&&(t=a.readFormat0(e,t,u))}return u},parseV1:function(e,t,r,n){var o=i["B"],a=i["T"].kern,s=(o.readFixed(e,t),o.readUint(e,t+4));t+=8;for(var c={glyph1:[],rval:[]},u=0;u65535&&a++,o.push(i["U"]["codeToGlyph"](e,s))}var c=[];for(a=0;a>>1);e[o*t]<=r?n=o:i=o}return n*t}for(var t=[9,10,11,12,13,32,133,160,5760,6158,8232,8233,8239,8288,12288,65279],r={},n=0;n=c.map.length?0:c.map[n];else if(4==u){var l=c.endCount;if(d=0,n<=l[l.length-1]){var f=e(l,1,n);if(l[f]=c.startCount[f]){var h=0;h=0!=c.idRangeOffset[f]?c.glyphIdArray[n-c.startCount[f]+(c.idRangeOffset[f]>>1)-(c.idRangeOffset.length-f)]:n+c.idDelta[f],d=65535&h}}}else if(6==u){var p=n-c.firstCode,m=c.glyphIdArray;d=p<0||p>=m.length?0:m[p]}else{if(12!=u)throw"unknown cmap table format "+c.format;var b=c.groups;if(d=0,n<=b[b.length-2]){s=e(b,3,n);b[s]<=n&&n<=b[s+1]&&(d=b[s+2]+(n-b[s]))}}var g=t["SVG "],y=t["loca"];return 0==d||null!=t["CFF "]||null!=g&&null!=g.entries[d]||!y||y[d]!=y[d+1]||null!=r[n]||(d=0),d}return i}(),glyphToPath:function(e,t,r){var n={cmds:[],crds:[]},o=e["SVG "],a=e["CFF "],s=e["COLR"],c=e["CBLC"],u=e["CBDT"],d=e["sbix"],l=window["UPNG"],f=i["U"],h=null;if(c&&l)for(var p=0;p1){var I=function(e){var t=e.toString(16);return(1==t.length?"0":"")+t},E=e["CPAL"],T=s[0]["g"+t];for(p=0;p-1?i["U"]["_simpleGlyph"](n,r):i["U"]["_compoGlyph"](n,t,r))},_simpleGlyph:function(e,t){for(var r=i["U"]["P"],n=0;n=0&&t.push(" "),t.push(o),r=a}return t.join("")}null==t&&(t=5);for(var a=[],s=0,c={M:2,L:2,Q:4,C:6},u=0,d=0,l=0,f=0,h=0,p=0,m=0;m>1,a.length=0,c=!0;else if("o3"==x||"o23"==x){U=a.length%2!==0,U&&!c&&(u=a.shift()+E),s+=a.length>>1,a.length=0,c=!0}else if("o4"==x)a.length>1&&!c&&(u=a.shift()+E,c=!0),d&&I.ClosePath(o),h+=a.pop(),I.MoveTo(o,f,h),d=!0;else if("o5"==x)while(a.length>0)f+=a.shift(),h+=a.shift(),I.LineTo(o,f,h);else if("o6"==x||"o7"==x)for(var P=a.length,k="o6"==x,D=0;DMath.abs(w-h)?f=S+a.shift():h=w+a.shift(),I.CurveTo(o,p,m,b,g,C,_),I.CurveTo(o,y,v,S,w,f,h));else if("o14"==x){if(a.length>0&&4!=a.length&&!c&&(u=a.shift()+r["nominalWidthX"],c=!0),4==a.length){var M=a.shift(),N=a.shift(),B=a.shift(),F=a.shift(),j=A.glyphBySE(r,B),K=A.glyphBySE(r,F);i["U"]["_drawCFF"](r["CharStrings"][j],t,r,n,o),t.x=M,t.y=N,i["U"]["_drawCFF"](r["CharStrings"][K],t,r,n,o)}d&&(I.ClosePath(o),d=!1)}else if("o19"==x||"o20"==x){var U;U=a.length%2!==0,U&&!c&&(u=a.shift()+E),s+=a.length>>1,a.length=0,c=!0,l+=s+7>>3}else if("o21"==x)a.length>2&&!c&&(u=a.shift()+E,c=!0),h+=a.pop(),f+=a.pop(),d&&I.ClosePath(o),I.MoveTo(o,f,h),d=!0;else if("o22"==x)a.length>1&&!c&&(u=a.shift()+E,c=!0),f+=a.pop(),d&&I.ClosePath(o),I.MoveTo(o,f,h),d=!0;else if("o25"==x){while(a.length>6)f+=a.shift(),h+=a.shift(),I.LineTo(o,f,h);p=f+a.shift(),m=h+a.shift(),b=p+a.shift(),g=m+a.shift(),f=b+a.shift(),h=g+a.shift(),I.CurveTo(o,p,m,b,g,f,h)}else if("o26"==x){a.length%2&&(f+=a.shift());while(a.length>0)p=f,m=h+a.shift(),b=p+a.shift(),g=m+a.shift(),f=b,h=g+a.shift(),I.CurveTo(o,p,m,b,g,f,h)}else if("o27"==x){a.length%2&&(h+=a.shift());while(a.length>0)p=f+a.shift(),m=h,b=p+a.shift(),g=m+a.shift(),f=b+a.shift(),h=g,I.CurveTo(o,p,m,b,g,f,h)}else if("o10"==x||"o29"==x){var L="o10"==x?n:r;if(0==a.length)console.log("error: empty stack");else{var X=a.pop(),z=L["Subrs"][X+L["Bias"]];t.x=f,t.y=h,t.nStems=s,t.haveWidth=c,t.width=u,t.open=d,i["U"]["_drawCFF"](z,t,r,n,o),f=t.x,h=t.y,s=t.nStems,c=t.haveWidth,u=t.width,d=t.open}}else if("o30"==x||"o31"==x){var G=a.length,W=(R=0,"o31"==x);P=-3&G,R+=G-P;while(R0&&"e"!=r[o-1]&&(r=r.slice(0,o)+" "+r.slice(o),o++,i=!0)}if(r=r.split(/\s*[\s,]\s*/).map(parseFloat),"translate"==t)1==r.length?e.translate(n,r[0],0):e.translate(n,r[0],r[1]);else if("scale"==t)1==r.length?e.scale(n,r[0],r[0]):e.scale(n,r[0],r[1]);else if("rotate"==t){var s=0,c=0;1!=r.length&&(s=r[1],c=r[2]),e.translate(n,-s,-c),e.rotate(n,-Math.PI*r[0]/180),e.translate(n,s,c)}else"matrix"==t?n=r:console.log("unknown transform: ",t);return n}function o(e){var t={cmds:[],crds:[]};if(null==e)return t;var r=new DOMParser,n=r["parseFromString"](e,"image/svg+xml"),i=n.getElementsByTagName("svg")[0],o=i.getAttribute("viewBox");o=o?o.trim().split(" ").map(parseFloat):[0,0,1e3,1e3],a(i.children,t);for(var s=0;s=0?1:-1)*Math.acos(Math.max(-1,Math.min(1,a)))},Q=(F-W)/x,Z=(j-q)/P,J=Y(1,0,Q,Z),$=Y(Q,Z,(-F-W)/x,(-j-q)/P);$%=2*Math.PI;var ee=function(e,t,r,n,i,o,a){var s=function(e,t){var r=Math.sin(t),n=Math.cos(t),i=(t=e[0],e[1]),o=e[2],a=e[3];e[0]=t*n+i*r,e[1]=-t*r+i*n,e[2]=o*n+a*r,e[3]=-o*r+a*n},c=function(e,t){for(var r=0;ri)o-=2*Math.PI;else while(o>>2,i=f["hb_buffer_get_glyph_positions"](e,0)>>>2,s=0;s>>16)),n=new Uint8Array(h.buffer),o=new Uint32Array(h.buffer),a=new Int32Array(h.buffer),s!=g&&(null!=c&&(f["hb_blob_destroy"](c),f["free"](u),f["hb_face_destroy"](d),f["hb_font_destroy"](l)),u=f["malloc"](b.byteLength),n.set(b,u),c=f["hb_blob_create"](u,b.byteLength,2,0,0),d=f["hb_face_create"](c,0),l=f["hb_font_create"](d),s=g),null!=window["TextEncoder"]){null==e&&(e=new window["TextEncoder"]("utf8"));var S=f["hb_buffer_create"](),w=e["encode"](p),C=w.length,_=f["malloc"](C);n.set(w,_),f["hb_buffer_add_utf8"](S,_,C,0,C),f["free"](_),f["hb_buffer_set_direction"](S,m?4:5),f["hb_buffer_guess_segment_properties"](S),f["hb_shape"](l,S,0,0);var A=t(S);f["hb_buffer_destroy"](S);var I=A.slice(0);m||I.reverse();for(var E=0,T=0,x=1;x=1&&s.length<=3&&n(s[0])&&(0===s[0].length||t(s[0][0]))){if(!i(s[0]))throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Elements must be numbers");c=s[0];var u=s[1],d=s[2];if(t(u)||t(d))!t(u)&&r(d)?u=c.length/d:r(u)&&!t(d)&&(d=c.length/u);else{var h=Math.sqrt(c.length);u=h,d=h}if(!r(u)||!r(d))throw new f(f.ErrorCodes.OUT_OF_BOUNDS,"Array must represent square matrix if no size is given");o=u,a=d}else if(1===s.length&&r(s[0]))o=s[0],a=s[0],c=l.repeat(o*a,0);else{if(2!==s.length||!r(s[0])||!r(s[1]))throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Parameters must match a supported signature");o=s[0],a=s[1],c=l.repeat(o*a,0)}}(),this}function p(e){var t,i,o=d(arguments),a=[],s=[],c=[];return this.___get=function(e,t){for(var r=c[e-1];r=1&&o.length<=2&&r(o[0])&&(1===o.length||r(o[1])))t=o[0],i=o[1]||t,a=[],s=[],c=l.repeat(t+1,0);else{if(!(5===o.length&&r(o[0])&&r(o[1])&&n(o[2])&&n(o[3])&&n(o[4]))){if(1===o.length&&o[0]instanceof b)return o[0].build();throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Parameters must match a supported signature")}if(t=o[0],i=o[1],a=o[2],s=o[3],c=o[4],-1!==a.indexOf(0))throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Values must not be 0");if(t!=c.length-1)throw new f(f.ErrorCodes.OUT_OF_BOUNDS,"Number of rows is too small");if(a.length!==s.length)throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Arrays for values and column indicators have to be the same size");if(Math.max.apply(this,s)>i)throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Number of columns has to be bigger than the biggest column index")}}(),this}function m(e){d(arguments);var t,r=[];return this.___get=function(e,n){return r[t?e-1:n-1]},this.___set=function(e,n,i){return r[t?e-1:n-1]=i,this},this.rows=function(){return t?r.length:1},this.columns=function(){return t?1:r.length},this}function b(){var e,n,i=[];function a(e,t,r){i.push({row:e,column:t,value:r})}this.size=function(t,r){return e=t,n=o(r,t),this},this.set=function(o,s,c){if(!r(e)||!r(n))throw new f(f.ErrorCodes.SIZE_NOT_GIVEN,"Size has to be specified first");if(!t(c))throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Value is not numeric");var u=i.filter((function(e){return e.row===o&&e.column===s})).length;if(0!==u)throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Cannot set same entry multiple times");if(o>e||s>n)throw new f(f.ErrorCodes.OUT_OF_BOUNDS);return 0!==c&&a(o,s,c),this},this.build=function(){i.sort((function(e,t){return e.row!=t.row?e.row1){var n=d(arguments);return this.add.apply(this.add(n.shift()),n)}if(!this.isSameSizeAs(e))throw new f(f.ErrorCodes.DIMENSION_MISMATCH,"Matrices must be of the same size");for(var i,o,a=new h(t,r),s=1;s<=t;s++){i=this.__getRow(s),o=e.__getRow(s);for(var c=0;c1){var n=d(arguments);return this.subtract.apply(this.subtract(n.shift()),n)}if(!this.isSameSizeAs(e))throw new f(f.ErrorCodes.DIMENSION_MISMATCH,"Matrices must be of the same size");for(var i,o,a=new h(t,r),s=1;s<=t;s++){i=this.__getRow(s),o=e.__getRow(s);for(var c=0;c=s&&(a=e,s=c);if(0===i[a-1])throw new f(f.ErrorCodes.MATRIX_IS_SINGULAR);for(a!==r&&(u=l.__getRow(a),l.__setRow(a,l.__getRow(r)),l.__setRow(r,u),d++),n=l.__getRow(r),e=r+1;e<=h;e++){for(o=l.__getRow(e),t=r;t1;n--){for(t=u.__getRow(n-1),e=u.__getRow(n),a=t[n-1]/e[n-1],r=[],o=0;ot||r>n)throw new f(f.ErrorCodes.OUT_OF_BOUNDS);for(var i=t-e+1,o=n-r+1,a=new h(i,o),s=e;s<=t;s++)a.__setRow(s-e+1,this.__getRow(s).slice(r-1,n));return a},h.prototype.augment=function(e){var t=this.rows(),r=this.columns(),n=e.columns();if(t!==e.rows())throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Number of rows must match");for(var i=new h(t,r+n),o=1;o<=r;o++)i.__setColumn(o,this.__getColumn(o));for(var a=1;a<=n;a++)i.__setColumn(a+r,e.__getColumn(a));return i},h.prototype.round=function(){return this.roundTo(0)},h.prototype.roundTo=function(e){e=o(e,l.options.roundTo.digits);var t=Math.pow(10,e);return this.fun((function(e){return Math.round(e*t)/t}))},h.prototype.abs=function(){return this.fun((function(e){return Math.abs(e)}))},h.prototype.addRow=function(e){e=u(e);for(var t=this.rows(),r=new h(t+1,this.columns()),n=1;n<=t;n++)r.__setRow(n,this.__getRow(n));return r.__setRow(t+1,e),r},h.prototype.addColumn=function(e){return this.copy().augment(new h(u(e),null,1))},h.prototype.contains=function(e,r){r=o(r,0);var n,i=this.rows(),a=this.columns();if(!t(e)||!t(r))throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Parameter must be a number");for(var s=1;s<=i;s++){n=this.__getRow(s);for(var c=0;c=1&&e<=this.rows())&&(!t(r)||r>=1&&r<=this.columns())},h.prototype.toArray=function(){return d(this.___getElements())},h.zeros=function(e,t){return t=o(t,e),new h(e,t)},h.ones=function(e,t){t=o(t,e);for(var r=new h(e,t),n=1;n<=e;n++)for(var i=1;i<=t;i++)r.___set(n,i,1);return r},h.eye=function(e){for(var t=new h(e,e),r=1;r<=e;r++)t.___set(r,r,1);return t},h.diag=function(e,t){e=u(e),t=o(t,0);for(var r=new h(e.length+Math.abs(t)),n=-Math.min(t,0),i=Math.max(t,0),a=1;a<=e.length;a++)r.___set(a+n,a+i,e[a-1]);return r},h.random=function(e,t,r,n,i){t=o(t,e),r=o(r,l.options.random.minVal),n=o(n,l.options.random.maxVal),i=s(i,l.options.random.onlyInteger);for(var a,c=new h(e,t),u=n-r+(i?1:0),d=1;d<=e;d++)for(var f=1;f<=t;f++)a=r+Math.random()*u,i&&(a|=0),c.___set(d,f,a);return c},p.prototype.get=function(e,t){if(!this.isInRange(e,t))throw new f(f.ErrorCodes.OUT_OF_BOUNDS);return this.___get(e,t)},p.prototype.set=function(e,r,n){if(!this.isInRange(e,r))throw new f(f.ErrorCodes.OUT_OF_BOUNDS);if(!t(n))throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Value has to be a number");return this.___set(e,r,n)},p.prototype.getRow=function(e){if(!this.isInRange(e,null))throw new f(f.ErrorCodes.OUT_OF_BOUNDS);return this.__getRow(e)},p.prototype.__getRow=function(e){for(var t=l.repeat(this.columns(),0),r=this.___getRowPointer(),n=this.___getColumnIndicator(),i=this.___getElements(),o=r[e-1];o1){var n=d(arguments);return this.add.apply(this.add(n.shift()),n)}if(!this.isSameSizeAs(e))throw new f(f.ErrorCodes.DIMENSION_MISMATCH,"Matrices must be of the same size");for(var i,o,a=(new b).size(t,r),s=1;s<=t;s++){i=this.__getRow(s),o=e.__getRow(s);for(var c=1;c<=r;c++)a.set(s,c,i[c-1]+o[c-1])}return a.build()},p.prototype.subtract=function(e){var t=this.rows(),r=this.columns();if(arguments.length>1){var n=d(arguments);return this.subtract.apply(this.subtract(n.shift()),n)}if(!this.isSameSizeAs(e))throw new f(f.ErrorCodes.DIMENSION_MISMATCH,"Matrices must be of the same size");for(var i,o,a=(new b).size(t,r),s=1;s<=t;s++){i=this.__getRow(s),o=e.__getRow(s);for(var c=1;c<=r;c++)a.set(s,c,i[c-1]-o[c-1])}return a.build()},p.prototype.scale=function(e){if(!t(e))throw new f(f.ErrorCodes.INVALID_PARAMETERS,"Parameter must be a number");var r=this.rows(),n=this.columns();if(0===e)return new p(r,n);if(1===e)return this;for(var i=d(this.___getElements()),o=0;o=1&&e<=this.rows())&&(!t(r)||r>=1&&r<=this.columns())},p.zeros=function(e,t){return t=o(t,e),new p(e,t)},p.eye=function(e){var t=l.repeat(e,1),r=l.linspace(1,e),n=l.linspace(0,e);return new p(e,e,t,r,n)},p.diag=function(e,t){e=u(e),t=o(t,0);for(var r=(new b).size(e.length+Math.abs(t)),n=-Math.min(t,0),i=Math.max(t,0),a=1;a<=e.length;a++)r.set(a+n,a+i,e[a-1]);return r.build()},l.options={stringify:{rowSeparator:"\r\n",columnSeparator:"\t"},isTriangular:{mode:"both"},roundTo:{digits:0},norm:{which:"max"},random:{minVal:0,maxVal:1,onlyInteger:!0}},l.linspace=function(e,t,r){r=o(r,1);for(var n=[],i=e;i<=t;i+=r)n.push(i);return n},l.repeat=function(e,t){for(var r=[],n=1;n<=e;n++)r[n-1]=t;return r},l.filters={all:function(){return!0},nonZero:function(e){return 0!==e},diag:function(e,t,r){return t===r}},l.applicators={exp:function(e){return Math.exp(e)},square:function(e){return e*e}},Array.prototype.toMatrix=function(e,t){return new h(this,e,t)},Array.prototype.toVector=function(e){return e=s(e,!1),new h(this,e?1:this.length,e?this.length:1)},String.prototype.toMatrix=function(e,t){e=a(e,"\r\n"),t=a(t,"\t");for(var r,n=this.split(e),i=0,o=new h(0),s=0;s=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e,t){if(e){if("string"===typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&i[y]&&(i[y]["relative"]&&(y=i[y]["relative"],i[y]["FillColor"]&&(p=Object(n["i"])(i[y]["FillColor"])),i[y]["StrokeColor"]&&(m=Object(n["i"])(i[y]["StrokeColor"])),i[y]["LineWidth"]&&(b=Object(n["e"])(i[y]["LineWidth"]))),i[y]["FillColor"]&&(p=Object(n["i"])(i[y]["FillColor"])),i[y]["StrokeColor"]&&(m=Object(n["i"])(i[y]["StrokeColor"])),i[y]["LineWidth"]&&(b=Object(n["e"])(i[y]["LineWidth"])));var v=s["ofd:ImageObject"],C=[];C=C.concat(v);var _,A=c(C);try{for(A.s();!(_=A.n()).done;){var I=_.value;if(I){var E=I["@_ResourceID"];if(null===o[E]||void 0===o[E])continue;var T=g(t.style.width,t.style.height,o,I,u,l,h);t.appendChild(T)}}}catch(ie){A.e(ie)}finally{A.f()}var x=s["ofd:PathObject"],P=[];P=P.concat(x);var k,D=c(P);try{for(D.s();!(k=D.n()).done;){var O=k.value;if(O){var R=w(i,O,p,m,b,u,d,l,f);t.appendChild(R)}}}catch(ie){D.e(ie)}finally{D.f()}var M=s["ofd:TextObject"],N=[];N=N.concat(M);var B,F=c(N);try{for(F.s();!(B=F.n()).done;){var j=B.value;if(j){var K=S(r,j,p,m,i);t.appendChild(K)}}}catch(ie){F.e(ie)}finally{F.f()}var U=s["ofd:CompositeObject"],L=[];L=L.concat(U);var X,z=c(L);try{for(z.s();!(X=z.n()).done;){var G=X.value;if(G){var W,q=c(a);try{for(q.s();!(W=q.n()).done;){var H=W.value;if(H["@_ID"]===G["@_ResourceID"]){var V=G["@_Alpha"],Y=G["@_Boundary"],Q=G["@_CTM"];if(Y){var Z=Object(n["d"])(Object(n["k"])(Y)),J=document.createElement("div");J.setAttribute("style","position:absolute; left: ".concat(Z.x,"px; top: ").concat(Z.y,"px; width: ").concat(Z.w,"px; height: ").concat(Z.h,"px")),t.appendChild(J),e(J,r,i,o,a,H["ofd:Content"],!1,V,null,Q)}else e(t,r,i,o,a,H["ofd:Content"],!1,V,Y,Q);break}}}catch(ie){q.e(ie)}finally{q.f()}}}}catch(ie){z.e(ie)}finally{z.f()}var $=s["ofd:PageBlock"],ee=[];ee=ee.concat($);var te,re=c(ee);try{for(re.s();!(te=re.n()).done;){var ne=te.value;ne&&e(t,r,i,o,a,ne,u)}}catch(ie){re.e(ie)}finally{re.f()}},g=function(e,t,r,i,o,a,s){var c=Object(n["k"])(i["@_Boundary"]);c=Object(n["d"])(c);var u=i["@_ResourceID"];if("gbig2"===r[u].format){var d=r[u].img,l=r[u].width,f=r[u].height;return y(d,l,f,c,i["@_ID"])}var h=i["@_CTM"];return v(e,t,r[u].img,c,!1,o,null,null,i["@_ID"],h,a,s)},y=function(e,t,r,n,i){for(var o=new Uint8ClampedArray(4*t*r),a=0;ag?g:i.w,S=i.h>y?y:i.h,w="";return o&&(o=Object(n["d"])(o),w="clip: rect(".concat(o.y,"px, ").concat(o.w+o.x,"px, ").concat(o.h+o.y,"px, ").concat(o.x,"px)")),h?p.setAttribute("style","cursor: pointer; overflow: hidden; position: absolute; left: ".concat(w?i.x:i.x<0?0:i.x,"px; top: ").concat(w?i.y:i.y<0?0:i.y,"px; width: ").concat(v,"px; height: ").concat(S,"px; ").concat(w,";")):p.setAttribute("style","cursor: pointer; overflow: hidden; position: absolute; left: ".concat(w?i.x:i.x<0?0:i.x,"px; top: ").concat(w?i.y:i.y<0?0:i.y,"px; width: ").concat(v,"px; height: ").concat(S,"px; ").concat(w,";z-index: ").concat(d)),p},S=function(e,t,r,i,a){var s=1,u=Object(n["k"])(t["@_Boundary"]);u=Object(n["d"])(u);u.x,u.y;var d=t["@_CTM"],l=t["@_HScale"],f=t["@_Font"],h=t["@_Weight"],p="";"undefined"!=typeof h&&(p="font-weight:".concat(h,";"));var m=t["@_Italic"],b="";"true"==m&&(b="font-style:italic;");var g=t["@_Alpha"],y="";"undefined"!=typeof g&&(y="fill-opacity:".concat(g/255,";"));var v=Object(n["e"])(parseFloat(t["@_Size"])),S=[];S=S.concat(t["ofd:TextCode"]);var w=Object(n["b"])(S),_=document.createElementNS("http://www.w3.org/2000/svg","svg");_.setAttribute("version","1.1");var A=t["ofd:FillColor"],I=!1,E=t["@_DrawParam"];if(E&&Object.keys(a).length>0&&a[E]&&a[E]["FillColor"]&&(r=Object(n["i"])(a[E]["FillColor"])),A){A["@_Value"]&&(r=Object(n["i"])(A["@_Value"]));var T=A["@_Alpha"];T&&(s=T>1?T/255:T);var x=A["ofd:AxialShd"];if(x){I=!0;var P=document.createElement("linearGradient");P.setAttribute("id","".concat(t["@_ID"])),P.setAttribute("x1","0%"),P.setAttribute("y1","0%"),P.setAttribute("x2","100%"),P.setAttribute("y2","100%");var k,D=c(x["ofd:Segment"]);try{for(D.s();!(k=D.n()).done;){var O=k.value;if(O){var R=document.createElement("stop");R.setAttribute("offset","".concat(100*O["@_Position"],"%")),R.setAttribute("style","stop-color:".concat(Object(n["i"])(O["ofd:Color"]["@_Value"]),";stop-opacity:1")),P.appendChild(R),r=Object(n["i"])(O["ofd:Color"]["@_Value"])}}}catch(ye){D.e(ye)}finally{D.f()}_.appendChild(P)}}var M=u.w,N=u.h,B=u.x,F=u.y,j=v,K=v;if(d){var U=Object(n["j"])(d),L=U[0],X=U[1],z=U[2],G=U[3],W=function(e){return 2*(e>=0)-1},q=L>0?W(L)*Math.sqrt(L*L+z*z):Math.sqrt(L*L+z*z),H=G>0?W(G)*Math.sqrt(X*X+G*G):Math.sqrt(X*X+G*G),V=Math.atan2(-X,G);0==V&&0!=L&&1==G||(j*=q,K*=H),0==V&&l>0&&(j*=l)}var Y,Q=t["ofd:CGTransform"];if("undefined"!=typeof Q){var Z=Q["ofd:Glyphs"];Y=Z.split(" ")}var J,$=0,ee=c(w);try{for(ee.s();!(J=ee.n()).done;){var te=J.value;if(te&&!isNaN(te.x)){var re=!1;if("undefined"!=typeof Q&&te.text.charCodeAt()>32&&127!=te.text.charCodeAt()){var ne=o.parse(e[f].fontByte)[0];if(null!=ne.head){var ie=Y[$],oe=o.U.glyphToPath(ne,ie),ae=o.U.pathToSVG(oe),se=document.createElementNS("http://www.w3.org/2000/svg","g");I?se.setAttribute("style","fill:".concat(r,";stroke:none")):se.setAttribute("style","fill:".concat(r,";stroke:").concat(i,";fill-opacity:").concat(s,";"));var ce=j/ne.head.unitsPerEm,ue=K/ne.head.unitsPerEm;if(d){var de=Object(n["j"])(d),le=(te.x,de[0],te.y,de[2],te.y,de[3],Object(n["e"])(de[5]),C(l,de,u,te.x,te.y,v,ne.head.unitsPerEm));se.setAttribute("transform","matrix(".concat(le.getRow(1)[0],", ").concat(le.getRow(1)[1],", ").concat(le.getRow(2)[0],", ").concat(le.getRow(2)[1],", ").concat(le.getRow(3)[0],", ").concat(le.getRow(3)[1],")"))}else{var fe=te.x,he=te.y;se.setAttribute("transform","matrix(".concat(ce,", 0, 0, ").concat(-ue,", ").concat(fe,",").concat(he,")"))}var pe=document.createElementNS("http://www.w3.org/2000/svg","path");pe.setAttribute("d",ae),se.appendChild(pe),_.appendChild(se),re=!0}}if(!re){var me=document.createElementNS("http://www.w3.org/2000/svg","text");me.setAttribute("x",te.x),me.setAttribute("y",te.y);var be=document.createTextNode(te.text);if(me.appendChild(be),d){var ge=Object(n["j"])(d);me.setAttribute("transform","matrix(".concat(ge[0]," ").concat(ge[1]," ").concat(ge[2]," ").concat(ge[3]," ").concat(Object(n["e"])(ge[4])," ").concat(Object(n["e"])(ge[5]),")"))}l&&me.setAttribute("transform","matrix(".concat(l,", 0, 0, 1, ").concat((1-l)*te.x,", 0)")),I?me.setAttribute("fill",r):(me.setAttribute("fill",i),me.setAttribute("fill",r),me.setAttribute("fill-opacity",s)),me.setAttribute("style","".concat(b," ").concat(p," ").concat(y," font-size:").concat(v,"px;font-family: ").concat(Object(n["g"])(e[f]),";")),_.appendChild(me)}}$++}}catch(ye){ee.e(ye)}finally{ee.f()}return _.setAttribute("style","overflow:visible;position:absolute;width:".concat(M,"px;height:").concat(N,"px;left:").concat(B,"px;top:").concat(F,"px;z-index:").concat(t["@_ID"])),_},w=function(e,t,r,i,o,a,s,u,d){var l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("version","1.1");var f=Object(n["k"])(t["@_Boundary"]);if(!f)return l;f=Object(n["d"])(f);var h=t["@_LineWidth"],p=t["ofd:AbbreviatedData"],m=Object(n["a"])(Object(n["c"])(p)),b=t["@_CTM"],g=document.createElementNS("http://www.w3.org/2000/svg","path");h&&(o=Object(n["e"])(h));var y=t["@_DrawParam"];if(y&&e[y]&&(h=e[y].LineWidth,h&&(o=Object(n["e"])(h))),b){var v=Object(n["j"])(b);g.setAttribute("transform","matrix(".concat(v[0]," ").concat(v[1]," ").concat(v[2]," ").concat(v[3]," ").concat(Object(n["e"])(v[4])," ").concat(Object(n["e"])(v[5]),")"))}var S=t["ofd:StrokeColor"];if(S){S["@_Value"]&&(i=Object(n["i"])(S["@_Value"]));var w=S["ofd:AxialShd"];if(w){!0;var C=document.createElement("linearGradient");C.setAttribute("id","".concat(t["@_ID"])),C.setAttribute("x1","0%"),C.setAttribute("y1","0%"),C.setAttribute("x2","100%"),C.setAttribute("y2","100%");var _,A=c(w["ofd:Segment"]);try{for(A.s();!(_=A.n()).done;){var I=_.value;if(I){var E=document.createElement("stop");E.setAttribute("offset","".concat(100*I["@_Position"],"%")),E.setAttribute("style","stop-color:".concat(Object(n["i"])(I["ofd:Color"]["@_Value"]),";stop-opacity:1")),C.appendChild(E),i=Object(n["i"])(I["ofd:Color"]["@_Value"])}}}catch(J){A.e(J)}finally{A.f()}l.appendChild(C)}}var T=t["ofd:FillColor"];if(T){T["@_Value"]&&(r=Object(n["i"])(T["@_Value"])),T["@_Alpha"]&&0==T["@_Alpha"]&&(r="none");var x=T["ofd:AxialShd"];if(x){!0;var P=document.createElement("linearGradient");P.setAttribute("id","".concat(t["@_ID"])),P.setAttribute("x1","0%"),P.setAttribute("y1","0%"),P.setAttribute("x2","100%"),P.setAttribute("y2","100%");var k,D=c(x["ofd:Segment"]);try{for(D.s();!(k=D.n()).done;){var O=k.value;if(O){var R=document.createElement("stop");R.setAttribute("offset","".concat(100*O["@_Position"],"%")),R.setAttribute("style","stop-color:".concat(Object(n["i"])(O["ofd:Color"]["@_Value"]),";stop-opacity:1")),P.appendChild(R),r=Object(n["i"])(O["ofd:Color"]["@_Value"])}}}catch(J){D.e(J)}finally{D.f()}l.appendChild(P)}}if(o>0&&!i&&(i=r,i||(i="rgb(0, 0, 0)")),s&&g.setAttribute("fill-opacity","".concat(s/255)),"false"!=t["@_Stroke"]&&(g.setAttribute("stroke","".concat(i)),g.setAttribute("stroke-width","".concat(o,"px")),g.setAttribute("fill","none")),t.hasOwnProperty("@_Fill")||(r="none"),"false"!=t["@_Fill"]&&g.setAttribute("fill","".concat(a?"none":r||"none")),t["@_Join"]&&g.setAttribute("stroke-linejoin","".concat(t["@_Join"])),t["@_Cap"]&&g.setAttribute("stroke-linecap","".concat(t["@_Cap"])),t["@_DashPattern"]){var M=t["@_DashPattern"],N=Object(n["j"])(M),B=0;t["@_DashOffset"]&&(B=t["@_DashOffset"]),g.setAttribute("stroke-dasharray","".concat(Object(n["e"])(N[0]),",").concat(Object(n["e"])(N[1]))),g.setAttribute("stroke-dashoffset","".concat(Object(n["e"])(B),"px"))}var F,j="",K=c(m);try{for(K.s();!(F=K.n()).done;){var U=F.value;"M"===U.type?j+="M".concat(U.x," ").concat(U.y," "):"L"===U.type?j+="L".concat(U.x," ").concat(U.y," "):"B"===U.type?j+="C".concat(U.x1," ").concat(U.y1," ").concat(U.x2," ").concat(U.y2," ").concat(U.x3," ").concat(U.y3," "):"Q"===U.type?j+="Q".concat(U.x1," ").concat(U.y1," ").concat(U.x2," ").concat(U.y2," "):"A"===U.type?j+="A".concat(U.rx,",").concat(U.ry," ").concat(U.rotation," ").concat(U.arc,",").concat(U.sweep," ").concat(U.x,",").concat(U.y):"C"===U.type&&(j+="Z")}}catch(J){K.e(J)}finally{K.f()}g.setAttribute("d",j),l.appendChild(g);var L=a?f.w:Math.ceil(f.w),X=a?f.h:Math.ceil(f.h),z=f.x,G=f.y;if(l.setAttribute("style","overflow:visible;position:absolute;width:".concat(L,"px;height:").concat(X,"px;left:").concat(z,"px;top:").concat(G,"px;z-index:").concat(t["@_ID"])),u){var W=document.createElementNS("http://www.w3.org/2000/svg","svg");W.setAttribute("version","1.1");var q=Object(n["k"])(u);q=Object(n["d"])(q);var H=Math.ceil(q.w),V=Math.ceil(q.h),Y=q.x,Q=q.y;if(W.setAttribute("style","overflow:hidden;position:absolute;width:".concat(H,"px;height:").concat(V,"px;left:").concat(Y,"px;top:").concat(Q,"px;z-index:").concat(t["@_ID"])),d){var Z=Object(n["j"])(d);l.setAttribute("transform","matrix(".concat(Z[0]," ").concat(Z[1]," ").concat(Z[2]," ").concat(Z[3]," ").concat(Object(n["e"])(Z[4])," ").concat(Object(n["e"])(Z[5]),")"))}return W.appendChild(l),W}return l},C=function(e,t,r,n,i,o,s,c){var u=new a([1,0,0,0,-1,0,0,0,1]);"undefined"==typeof e&&(e=1),u=_(u,Number(e),1);var d=new a([1/s,0,0,0,1/s,0,0,0,1]);if(u=u.multiply(d),u=_(u,o/3.7795,o/3.7795),u=A(u,n/3.7795,i/3.7795),null!=t){var l=new a([Number(t[0]),Number(t[1]),0,Number(t[2]),Number(t[3]),0,Number(t[4]),Number(t[5]),1]);u=u.multiply(l)}return"undefined"==typeof c&&(c=new a([3.7795,0,0,0,3.7795,0,0,0,1])),u=u.multiply(c),u},_=function(e,t,r){var n=new a([t,0,0,0,r,0,0,0,1]);return e.multiply(n)},A=function(e,t,r){var n=new a([1,0,0,0,1,0,t,r,1]);return e.multiply(n)}},"7f3b":function(e,t,r){"use strict";(function(e){var t=r("d00a");"undefined"!==typeof PDFJSDev&&PDFJSDev.test("SKIP_BABEL")||"undefined"!==typeof globalThis&&globalThis._pdfjsCompatibilityChecked||("undefined"!==typeof globalThis&&globalThis.Math===Math||(globalThis=r("eb73")),globalThis._pdfjsCompatibilityChecked=!0,function(){!globalThis.btoa&&t["a"]&&(globalThis.btoa=function(t){return e.from(t,"binary").toString("base64")})}(),function(){!globalThis.atob&&t["a"]&&(globalThis.atob=function(t){return e.from(t,"base64").toString("binary")})}(),function(){String.prototype.startsWith||r("d2a2")}(),function(){String.prototype.endsWith||r("8f4c")}(),function(){String.prototype.includes||r("4661")}(),function(){Array.prototype.includes||r("bf2c")}(),function(){Array.from||r("6b84")}(),function(){Object.assign||r("2418")}(),function(){Object.fromEntries||r("8ac5")}(),function(){Math.log2||(Math.log2=r("dc57"))}(),function(){Number.isNaN||(Number.isNaN=r("9020"))}(),function(){Number.isInteger||(Number.isInteger=r("f2e6"))}(),function(){Uint8Array.prototype.slice||r("8f2a")}(),function(){"undefined"!==typeof PDFJSDev&&PDFJSDev.test("IMAGE_DECODERS")||!(globalThis.Promise == null) && globalThis.Promise.allSettled||(globalThis.Promise=r("3980"))}(),function(){"undefined"!==typeof PDFJSDev&&PDFJSDev.test("PRODUCTION")&&PDFJSDev.test("GENERIC")&&(PDFJSDev.test("IMAGE_DECODERS")||(globalThis.URL=r("14d8")))}(),function(){if("undefined"===typeof PDFJSDev||!PDFJSDev.test("IMAGE_DECODERS")){var e=!1;if("undefined"!==typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),e=!0}catch(t){}e||(globalThis.ReadableStream=r("87c2").ReadableStream)}}(),function(){globalThis.Map&&globalThis.Map.prototype.entries||(globalThis.Map=r("5eff"))}(),function(){globalThis.Set&&globalThis.Set.prototype.entries||(globalThis.Set=r("9a35"))}(),function(){globalThis.WeakMap||(globalThis.WeakMap=r("ad63"))}(),function(){globalThis.WeakSet||(globalThis.WeakSet=r("ee42"))}(),function(){String.prototype.codePointAt||r("d627")}(),function(){String.fromCodePoint||(String.fromCodePoint=r("1cd7"))}(),function(){globalThis.Symbol||r("1f4a")}(),function(){String.prototype.padStart||r("1920")}(),function(){String.prototype.padEnd||r("476b")}(),function(){Object.values||(Object.values=r("4e28"))}(),function(){Object.entries||(Object.entries=r("a960"))}())}).call(this,r("b639").Buffer)},"7f9a":function(e,t,r){var n=r("da84"),i=r("1626"),o=r("8925"),a=n.WeakMap;e.exports=i(a)&&/native code/.test(o(a))},8006:function(e,t,r){"use strict";const n=function(e){return String.fromCharCode(e)},i={nilChar:n(176),missingChar:n(201),nilPremitive:n(175),missingPremitive:n(200),emptyChar:n(178),emptyValue:n(177),boundryChar:n(179),objStart:n(198),arrStart:n(204),arrayEnd:n(185)},o=[i.nilChar,i.nilPremitive,i.missingChar,i.missingPremitive,i.boundryChar,i.emptyChar,i.emptyValue,i.arrayEnd,i.objStart,i.arrStart],a=function(e,t,r){if("string"===typeof t)return e&&e[0]&&void 0!==e[0].val?s(e[0].val,t):s(e,t);{const n=d(e);if(!0===n){let n="";if(Array.isArray(t)){n+=i.arrStart;const o=t[0],u=e.length;if("string"===typeof o)for(let t=0;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function f(e,t){if(e){if("string"===typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}function m(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void r(u)}s.done?t(c):Promise.resolve(c).then(n,i)}function b(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){m(o,n,i,a,s,"next",e)}function s(e){m(o,n,i,a,s,"throw",e)}a(void 0)}))}}u.a.defaults.timeout=3e4;var g=!1,y="",v=function(e){g="Server"==e},S=function(e){y=e},w=function(e){e.ofd instanceof File||e.ofd instanceof ArrayBuffer?C(e):s["getBinaryContent"](e.ofd,(function(t,r){t?e.fail&&e.fail(t):(e.ofd=r,C(e))}))},C=function(t){if(g&&""!=y){var r=new FormData;r.append("file",t.ofd),r.append("zoomScale",Object(a["h"])());var n=x(new Date,"yyyyMMddhhmmssS")+"-"+Math.round(1e4*Math.random());r.append("accessId",n);var s=x(new Date,"yyyy-MM-dd hh:mm:ss");r.append("reqTime",s),u.a.post(y+"getPageSvgInfo",r,{"Content-type":"multipart/form-data"}).then((function(e){if(console.log(e),t.success){var r=e.data.data;r.pages=e.data.data.listPageSize,r.file=t.ofd,t.success(r)}})).catch((function(e){console.log(e),t.fail&&t.fail(e)}))}else e.xmlParseFlag=0,i["a"].call(this,b(p().mark((function e(){return p().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(o["d"])(t.ofd);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),o["b"],o["c"]).then((function(e){t.success&&(e[0].pageCount=e[0].pages.length,t.success(e[0]))})).catch((function(e){console.log(e),t.fail&&t.fail(e)}))},_=function(e,t){var r=[];if(!e)return r;if(g&&""!=y){var i,o=0,s=l(e.pages);try{for(s.s();!(i=s.n()).done;){var c=i.value,u=Object(a["e"])(c[0]),d=Object(a["e"])(c[1]),f=document.createElement("div");f.id=o,f.setAttribute("style","margin-top: 15px; position: relative; width: ".concat(u,"px; height: ").concat(d,"px; background: white; box-shadow: 0px 0px 10px 3PX grey;")),f.innerHTML=e.listPageSvg[o],r.push(f),o++}}catch(C){s.e(C)}finally{s.f()}}else{var h,p=10,m=l(e.pages);try{for(m.s();!(h=m.n()).done;){var b=h.value,v=Object(n["a"])(t,e.document,b),S=Object.keys(b)[0],w=document.createElement("div");if(w.id=S,w.setAttribute("style","margin-top: 15px; position: relative; width: ".concat(v.w,"px; height: ").concat(v.h,"px; background: white; box-shadow: 0px 0px 10px 3PX grey;")),Object(n["c"])(w,b,e.tpls,e.fontResObj,e.drawParamResObj,e.multiMediaResObj,e.compositeGraphicUnits),r.push(w),p--<=1)break}}catch(C){m.e(C)}finally{m.f()}}return r},A=function(e){var t=[];if(!e)return t;if(!g||""==y){var r,i=10,o=l(e.pages);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=Object(n["b"])(e.document,a),c=Object.keys(a)[0],u=document.createElement("div");if(u.id=c,u.setAttribute("style","overflow: hidden; margin-top: 15px; position: relative; width: ".concat(s.w,"px; height: ").concat(s.h,"px; background: white; box-shadow: 0px 0px 10px 3PX grey;")),Object(n["c"])(u,a,e.tpls,e.fontResObj,e.drawParamResObj,e.multiMediaResObj,e.compositeGraphicUnits),t.push(u),i--<=1)break}}catch(d){o.e(d)}finally{o.f()}return t}},I=function(e){Object(a["n"])(e)},E=function(){return Object(a["h"])()},T=function(){return Object(o["getDocProperties"])()};function x(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd hh:mm:ss",r={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};for(var n in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[n]:("00"+r[n]).substr((""+r[n]).length)));return t}}).call(this,r("c8ba"))},"81b8":function(e,t,r){var n=r("746f");n("unscopables")},"820e":function(e,t,r){"use strict";var n=r("23e7"),i=r("c65b"),o=r("59ed"),a=r("f069"),s=r("e667"),c=r("2266");n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=a.f(t),n=r.resolve,u=r.reject,d=s((function(){var r=o(t.resolve),a=[],s=0,u=1;c(e,(function(e){var o=s++,c=!1;u++,i(r,t,e).then((function(e){c||(c=!0,a[o]={status:"fulfilled",value:e},--u||n(a))}),(function(e){c||(c=!0,a[o]={status:"rejected",reason:e},--u||n(a))}))})),--u||n(a)}));return d.error&&u(d.value),r.promise}})},"825a":function(e,t,r){var n=r("da84"),i=r("861d"),o=n.String,a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not an object")}},"83ab":function(e,t,r){var n=r("d039");e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"83b9":function(e,t,r){"use strict";var n=r("d925"),i=r("e683");e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},8418:function(e,t,r){"use strict";var n=r("a04b"),i=r("9bf2"),o=r("5c6c");e.exports=function(e,t,r){var a=n(t);a in e?i.f(e,a,o(0,r)):e[a]=r}},"843c":function(e,t,r){"use strict";var n=r("23e7"),i=r("0ccb").end,o=r("9a0c");n({target:"String",proto:!0,forced:o},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},"861d":function(e,t,r){var n=r("1626");e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},"87c2":function(e,t,r){(function(e,r){r(t)})(0,(function(e){"use strict";var t="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol:function(e){return"Symbol("+e+")"};function r(){}var n=Number.isNaN||function(e){return e!==e},i=r;function o(e){return"object"===typeof e&&null!==e||"function"===typeof e}function a(e){return e.slice()}function s(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)}function c(e){return!1!==u(e)&&e!==1/0}function u(e){return"number"===typeof e&&(!n(e)&&!(e<0))}function d(e,t,r){if("function"!==typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function l(e,t,r,n){var i=e[t];if(void 0!==i){if("function"!==typeof i)throw new TypeError(i+" is not a method");switch(r){case 0:return function(){return h(i,e,n)};case 1:return function(t){var r=[t].concat(n);return h(i,e,r)}}}return function(){return _(void 0)}}function f(e,t,r){var n=e[t];if(void 0!==n)return d(n,e,r)}function h(e,t,r){try{return _(d(e,t,r))}catch(n){return A(n)}}function p(e){return e}function m(e){return!1}function b(e){if(e=Number(e),n(e)||e<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return e}function g(e){if(void 0===e)return function(){return 1};if("function"!==typeof e)throw new TypeError("size property of a queuing strategy must be a function");return function(t){return e(t)}}var y=Promise,v=Promise.prototype.then,S=Promise.resolve.bind(y),w=Promise.reject.bind(y);function C(e){return new y(e)}function _(e){return S(e)}function A(e){return w(e)}function I(e,t,r){return v.call(e,t,r)}function E(e,t,r){I(I(e,t,r),void 0,i)}function T(e,t){E(e,t)}function x(e,t){E(e,void 0,t)}function P(e,t,r){return I(e,t,r)}function k(e){I(e,void 0,i)}var D=16384,O=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;t._elements.length===D-1&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,i=e._elements,o=i[r];return n===D&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,o},e.prototype.forEach=function(e){var t=this._cursor,r=this._front,n=r._elements;while(t!==n.length||void 0!==r._next){if(t===n.length&&(r=r._next,n=r._elements,t=0,0===n.length))break;e(n[t]),++t}},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function R(e,t,r){var n=null;!0===r&&(n=Object.prototype);var i=Object.create(n);return i.value=e,i.done=t,i}function M(e,t){e._forAuthorCode=!0,e._ownerReadableStream=t,t._reader=e,"readable"===t._state?j(e):"closed"===t._state?U(e):K(e,t._storedError)}function N(e,t){var r=e._ownerReadableStream;return Br(r,t)}function B(e){"readable"===e._ownerReadableStream._state?L(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):X(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function F(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function j(e){e._closedPromise=C((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function K(e,t){j(e),L(e,t)}function U(e){j(e),z(e)}function L(e,t){k(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function X(e,t){K(e,t)}function z(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}var G=t("[[CancelSteps]]"),W=t("[[PullSteps]]");function q(e,t){void 0===t&&(t=!1);var r=new $(e);return r._forAuthorCode=t,r}function H(e){var t=C((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}));return t}function V(e,t,r){var n=e._reader,i=n._readRequests.shift();i._resolve(R(t,r,n._forAuthorCode))}function Y(e){return e._reader._readRequests.length}function Q(e){var t=e._reader;return void 0!==t&&!!ee(t)}var Z,J,$=function(){function e(e){if(!1===Mr(e))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Nr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");M(this,e),this._readRequests=new O}return Object.defineProperty(e.prototype,"closed",{get:function(){return ee(this)?this._closedPromise:A(re("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return ee(this)?void 0===this._ownerReadableStream?A(F("cancel")):N(this,e):A(re("cancel"))},e.prototype.read=function(){return ee(this)?void 0===this._ownerReadableStream?A(F("read from")):te(this):A(re("read"))},e.prototype.releaseLock=function(){if(!ee(this))throw re("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");B(this)}},e}();function ee(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function te(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?_(R(void 0,!0,e._forAuthorCode)):"errored"===t._state?A(t._storedError):t._readableStreamController[W]()}function re(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}"symbol"===typeof t.asyncIterator&&(Z={},Z[t.asyncIterator]=function(){return this},J=Z,Object.defineProperty(J,t.asyncIterator,{enumerable:!1}));var ne={next:function(){if(!1===oe(this))return A(ae("next"));var e=this._asyncIteratorReader;return void 0===e._ownerReadableStream?A(F("iterate")):P(te(e),(function(t){var r=t.done;r&&B(e);var n=t.value;return R(n,r,!0)}))},return:function(e){if(!1===oe(this))return A(ae("next"));var t=this._asyncIteratorReader;if(void 0===t._ownerReadableStream)return A(F("finish iterating"));if(t._readRequests.length>0)return A(new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this._preventCancel){var r=N(t,e);return B(t),P(r,(function(){return R(e,!0,!0)}))}return B(t),_(R(e,!0,!0))}};function ie(e,t){void 0===t&&(t=!1);var r=q(e),n=Object.create(ne);return n._asyncIteratorReader=r,n._preventCancel=Boolean(t),n}function oe(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorReader")}function ae(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}function se(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function ce(e,t,r){if(r=Number(r),!c(r))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function ue(e){var t=e._queue.peek();return t.value}function de(e){e._queue=new O,e._queueTotalSize=0}void 0!==J&&Object.setPrototypeOf(ne,J),Object.defineProperty(ne,"next",{enumerable:!1}),Object.defineProperty(ne,"return",{enumerable:!1});var le=t("[[AbortSteps]]"),fe=t("[[ErrorSteps]]"),he=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),be(this);var r=t.size,n=t.highWaterMark,i=e.type;if(void 0!==i)throw new RangeError("Invalid type is specified");var o=g(r);void 0===n&&(n=1),n=b(n),Ve(this,e,n,o)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===ge(this))throw at("locked");return ye(this)},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===ge(this)?A(at("abort")):!0===ye(this)?A(new TypeError("Cannot abort a stream that already has a writer")):ve(this,e)},e.prototype.close=function(){return!1===ge(this)?A(at("close")):!0===ye(this)?A(new TypeError("Cannot close a stream that already has a writer")):!0===Pe(this)?A(new TypeError("Cannot close an already-closing stream")):Se(this)},e.prototype.getWriter=function(){if(!1===ge(this))throw at("getWriter");return pe(this)},e}();function pe(e){return new Ne(e)}function me(e,t,r,n,i,o){void 0===i&&(i=1),void 0===o&&(o=function(){return 1});var a=Object.create(he.prototype);be(a);var s=Object.create(We.prototype);return He(a,s,e,t,r,n,i,o),a}function be(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new O,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function ge(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function ye(e){return void 0!==e._writer}function ve(e,t){var r=e._state;if("closed"===r||"errored"===r)return _(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var n=!1;"erroring"===r&&(n=!0,t=void 0);var i=C((function(r,i){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:i,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=i,!1===n&&_e(e,t),i}function Se(e){var t=e._state;if("closed"===t||"errored"===t)return A(new TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r=C((function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;return void 0!==n&&!0===e._backpressure&&"writable"===t&&wt(n),Qe(e._writableStreamController),r}function we(e){var t=C((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}));return t}function Ce(e,t){var r=e._state;"writable"!==r?Ae(e):_e(e,t)}function _e(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&Le(n,t),!1===ke(e)&&!0===r._started&&Ae(e)}function Ae(e){e._state="errored",e._writableStreamController[fe]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new O,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===r._wasAlreadyErroring)return r._reject(t),void Re(e);var n=e._writableStreamController[le](r._reason);E(n,(function(){r._resolve(),Re(e)}),(function(t){r._reject(t),Re(e)}))}else Re(e)}function Ie(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Ee(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Ce(e,t)}function Te(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0;var t=e._state;"erroring"===t&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var r=e._writer;void 0!==r&&pt(r)}function xe(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Ce(e,t)}function Pe(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function ke(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function De(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Oe(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Re(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&ft(t,e._storedError)}function Me(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?vt(r):wt(r)),e._backpressure=t}var Ne=function(){function e(e){if(!1===ge(e))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===ye(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t=e._state;if("writable"===t)!1===Pe(e)&&!0===e._backpressure?mt(this):gt(this),ut(this);else if("erroring"===t)bt(this,e._storedError),ut(this);else if("closed"===t)gt(this),lt(this);else{var r=e._storedError;bt(this,r),dt(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return!1===Be(this)?A(st("closed")):this._closedPromise},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Be(this))throw st("desiredSize");if(void 0===this._ownerWritableStream)throw ct("desiredSize");return Xe(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return!1===Be(this)?A(st("ready")):this._readyPromise},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===Be(this)?A(st("abort")):void 0===this._ownerWritableStream?A(ct("abort")):Fe(this,e)},e.prototype.close=function(){if(!1===Be(this))return A(st("close"));var e=this._ownerWritableStream;return void 0===e?A(ct("close")):!0===Pe(e)?A(new TypeError("Cannot close an already-closing stream")):je(this)},e.prototype.releaseLock=function(){if(!1===Be(this))throw st("releaseLock");var e=this._ownerWritableStream;void 0!==e&&ze(this)},e.prototype.write=function(e){return!1===Be(this)?A(st("write")):void 0===this._ownerWritableStream?A(ct("write to")):Ge(this,e)},e}();function Be(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function Fe(e,t){var r=e._ownerWritableStream;return ve(r,t)}function je(e){var t=e._ownerWritableStream;return Se(t)}function Ke(e){var t=e._ownerWritableStream,r=t._state;return!0===Pe(t)||"closed"===r?_(void 0):"errored"===r?A(t._storedError):je(e)}function Ue(e,t){"pending"===e._closedPromiseState?ft(e,t):ht(e,t)}function Le(e,t){"pending"===e._readyPromiseState?yt(e,t):St(e,t)}function Xe(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:Je(t._writableStreamController)}function ze(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Le(e,r),Ue(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Ge(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,i=Ze(n,t);if(r!==e._ownerWritableStream)return A(ct("write to"));var o=r._state;if("errored"===o)return A(r._storedError);if(!0===Pe(r)||"closed"===o)return A(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===o)return A(r._storedError);var a=we(r);return $e(n,t,i),a}var We=function(){function e(){throw new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return e.prototype.error=function(e){if(!1===qe(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");var t=this._controlledWritableStream._state;"writable"===t&&ot(this,e)},e.prototype[le]=function(e){var t=this._abortAlgorithm(e);return Ye(this),t},e.prototype[fe]=function(){de(this)},e}();function qe(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}function He(e,t,r,n,i,o,a,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,de(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=o;var c=it(t);Me(e,c);var u=r(),d=_(u);E(d,(function(){t._started=!0,et(t)}),(function(r){t._started=!0,Ce(e,r)}))}function Ve(e,t,r,n){var i=Object.create(We.prototype);function o(){return f(t,"start",[i])}var a=l(t,"write",1,[i]),s=l(t,"close",0,[]),c=l(t,"abort",1,[]);He(e,i,o,a,s,c,r,n)}function Ye(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Qe(e){ce(e,"close",0),et(e)}function Ze(e,t){try{return e._strategySizeAlgorithm(t)}catch(r){return tt(e,r),1}}function Je(e){return e._strategyHWM-e._queueTotalSize}function $e(e,t,r){var n={chunk:t};try{ce(e,n,r)}catch(a){return void tt(e,a)}var i=e._controlledWritableStream;if(!1===Pe(i)&&"writable"===i._state){var o=it(e);Me(i,o)}et(e)}function et(e){var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest){var r=t._state;if("erroring"!==r){if(0!==e._queue.length){var n=ue(e);"close"===n?rt(e):nt(e,n.chunk)}}else Ae(t)}}function tt(e,t){"writable"===e._controlledWritableStream._state&&ot(e,t)}function rt(e){var t=e._controlledWritableStream;De(t),se(e);var r=e._closeAlgorithm();Ye(e),E(r,(function(){Te(t)}),(function(e){xe(t,e)}))}function nt(e,t){var r=e._controlledWritableStream;Oe(r);var n=e._writeAlgorithm(t);E(n,(function(){Ie(r);var t=r._state;if(se(e),!1===Pe(r)&&"writable"===t){var n=it(e);Me(r,n)}et(e)}),(function(t){"writable"===r._state&&Ye(e),Ee(r,t)}))}function it(e){var t=Je(e);return t<=0}function ot(e,t){var r=e._controlledWritableStream;Ye(e),_e(r,t)}function at(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function st(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function ct(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function ut(e){e._closedPromise=C((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function dt(e,t){ut(e),ft(e,t)}function lt(e){ut(e),pt(e)}function ft(e,t){k(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function ht(e,t){dt(e,t)}function pt(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function mt(e){e._readyPromise=C((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function bt(e,t){mt(e),yt(e,t)}function gt(e){mt(e),wt(e)}function yt(e,t){k(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function vt(e){mt(e)}function St(e,t){bt(e,t)}function wt(e){e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function Ct(e){if("object"!==typeof e||null===e)return!1;try{return"boolean"===typeof e.aborted}catch(Z){return!1}}var _t="undefined"!==typeof DOMException?DOMException:void 0;function At(e){if("function"!==typeof e&&"object"!==typeof e)return!1;try{return new e,!0}catch(Z){return!1}}function It(){var e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}var Et=At(_t)?_t:It();function Tt(e,t,n,i,o,a){var s=q(e),c=pe(t);e._disturbed=!0;var u=!1,d=_(void 0);return C((function(l,f){var h;if(void 0!==a){if(h=function(){var r=new Et("Aborted","AbortError"),n=[];!1===i&&n.push((function(){return"writable"===t._state?ve(t,r):_(void 0)})),!1===o&&n.push((function(){return"readable"===e._state?Br(e,r):_(void 0)})),S((function(){return Promise.all(n.map((function(e){return e()})))}),!0,r)},!0===a.aborted)return void h();a.addEventListener("abort",h)}function p(){return C((function(e,t){function r(n){n?e():I(m(),r,t)}r(!1)}))}function m(){return!0===u?_(!0):I(c._readyPromise,(function(){return I(te(s),(function(e){return!0===e.done||(d=I(Ge(c,e.value),void 0,r),!1)}))}))}if(y(e,s._closedPromise,(function(e){!1===i?S((function(){return ve(t,e)}),!0,e):w(!0,e)})),y(t,c._closedPromise,(function(t){!1===o?S((function(){return Br(e,t)}),!0,t):w(!0,t)})),v(e,s._closedPromise,(function(){!1===n?S((function(){return Ke(c)})):w()})),!0===Pe(t)||"closed"===t._state){var b=new TypeError("the destination writable stream closed before all data could be piped to it");!1===o?S((function(){return Br(e,b)}),!0,b):w(!0,b)}function g(){var e=d;return I(d,(function(){return e!==d?g():void 0}))}function y(e,t,r){"errored"===e._state?r(e._storedError):x(t,r)}function v(e,t,r){"closed"===e._state?r():T(t,r)}function S(e,r,n){function i(){E(e(),(function(){return A(r,n)}),(function(e){return A(!0,e)}))}!0!==u&&(u=!0,"writable"===t._state&&!1===Pe(t)?T(g(),i):i())}function w(e,r){!0!==u&&(u=!0,"writable"===t._state&&!1===Pe(t)?T(g(),(function(){return A(e,r)})):A(e,r))}function A(e,t){ze(c),B(s),void 0!==a&&a.removeEventListener("abort",h),e?f(t):l(void 0)}k(p())}))}var xt=function(){function e(){throw new TypeError}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Pt(this))throw Lt("desiredSize");return Bt(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Pt(this))throw Lt("close");if(!1===jt(this))throw new TypeError("The stream is not in a state that permits close");Rt(this)},e.prototype.enqueue=function(e){if(!1===Pt(this))throw Lt("enqueue");if(!1===jt(this))throw new TypeError("The stream is not in a state that permits enqueue");return Mt(this,e)},e.prototype.error=function(e){if(!1===Pt(this))throw Lt("error");Nt(this,e)},e.prototype[G]=function(e){de(this);var t=this._cancelAlgorithm(e);return Ot(this),t},e.prototype[W]=function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=se(this);return!0===this._closeRequested&&0===this._queue.length?(Ot(this),Fr(e)):kt(this),_(R(t,!1,e._reader._forAuthorCode))}var r=H(e);return kt(this),r},e}();function Pt(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function kt(e){var t=Dt(e);if(!1!==t)if(!0!==e._pulling){e._pulling=!0;var r=e._pullAlgorithm();E(r,(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,kt(e))}),(function(t){Nt(e,t)}))}else e._pullAgain=!0}function Dt(e){var t=e._controlledReadableStream;if(!1===jt(e))return!1;if(!1===e._started)return!1;if(!0===Nr(t)&&Y(t)>0)return!0;var r=Bt(e);return r>0}function Ot(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Rt(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(Ot(e),Fr(t))}function Mt(e,t){var r=e._controlledReadableStream;if(!0===Nr(r)&&Y(r)>0)V(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(i){throw Nt(e,i),i}try{ce(e,t,n)}catch(o){throw Nt(e,o),o}}kt(e)}function Nt(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(de(e),Ot(e),jr(r,t))}function Bt(e){var t=e._controlledReadableStream,r=t._state;return"errored"===r?null:"closed"===r?0:e._strategyHWM-e._queueTotalSize}function Ft(e){return!0!==Dt(e)}function jt(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function Kt(e,t,r,n,i,o,a){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,de(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=a,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t;var s=r();E(_(s),(function(){t._started=!0,kt(t)}),(function(e){Nt(t,e)}))}function Ut(e,t,r,n){var i=Object.create(xt.prototype);function o(){return f(t,"start",[i])}var a=l(t,"pull",0,[i]),s=l(t,"cancel",1,[]);Kt(e,i,o,a,s,r,n)}function Lt(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function Xt(e,t){var r,n,i,o,s,c=q(e),u=!1,d=!1,l=!1,f=C((function(e){s=e}));function h(){if(!0===u)return _(void 0);u=!0;var e=P(te(c),(function(e){u=!1;var t=e.done;if(!0===t)return!1===d&&Rt(i._readableStreamController),void(!1===l&&Rt(o._readableStreamController));var r=e.value,n=r,a=r;!1===d&&Mt(i._readableStreamController,n),!1===l&&Mt(o._readableStreamController,a)}));return k(e),_(void 0)}function p(t){if(d=!0,r=t,!0===l){var i=a([r,n]),o=Br(e,i);s(o)}return f}function m(t){if(l=!0,n=t,!0===d){var i=a([r,n]),o=Br(e,i);s(o)}return f}function b(){}return i=Or(b,h,p),o=Or(b,h,m),x(c._closedPromise,(function(e){Nt(i._readableStreamController,e),Nt(o._readableStreamController,e)})),[i,o]}var zt=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},Gt=function(){function e(){throw new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!1===Ht(this))throw Sr("view");return this._view},enumerable:!0,configurable:!0}),e.prototype.respond=function(e){if(!1===Ht(this))throw Sr("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");m(this._view.buffer),mr(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!1===Ht(this))throw Sr("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");m(e.buffer),br(this._associatedReadableByteStreamController,e)},e}(),Wt=function(){function e(){throw new TypeError("ReadableByteStreamController constructor cannot be used directly")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!1===qt(this))throw wr("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos.peek(),t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(Gt.prototype);vr(r,this,t),this._byobRequest=r}return this._byobRequest},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===qt(this))throw wr("desiredSize");return pr(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===qt(this))throw wr("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");lr(this)},e.prototype.enqueue=function(e){if(!1===qt(this))throw wr("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");m(e.buffer),fr(this,e)},e.prototype.error=function(e){if(!1===qt(this))throw wr("error");hr(this,e)},e.prototype[G]=function(e){if(this._pendingPullIntos.length>0){var t=this._pendingPullIntos.peek();t.bytesFilled=0}de(this);var r=this._cancelAlgorithm(e);return dr(this),r},e.prototype[W]=function(){var e=this._controlledReadableByteStream;if(this._queueTotalSize>0){var t=this._queue.shift();this._queueTotalSize-=t.byteLength,tr(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(s){return A(s)}return _(R(r,!1,e._reader._forAuthorCode))}var n=this._autoAllocateChunkSize;if(void 0!==n){var i=void 0;try{i=new ArrayBuffer(n)}catch(c){return A(c)}var o={buffer:i,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(o)}var a=H(e);return Vt(this),a},e}();function qt(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Ht(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Vt(e){var t=ur(e);if(!1!==t)if(!0!==e._pulling){e._pulling=!0;var r=e._pullAlgorithm();E(r,(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Vt(e))}),(function(t){hr(e,t)}))}else e._pullAgain=!0}function Yt(e){rr(e),e._pendingPullIntos=new O}function Qt(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=Zt(t);"default"===t.readerType?V(e,n,r):Ar(e,n,r)}function Zt(e){var t=e.bytesFilled,r=e.elementSize;return new e.ctor(e.buffer,e.byteOffset,t/r)}function Jt(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function $t(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),o=t.bytesFilled+i,a=o-o%r,c=i,u=!1;a>n&&(c=a-t.bytesFilled,u=!0);var d=e._queue;while(c>0){var l=d.peek(),f=Math.min(c,l.byteLength),h=t.byteOffset+t.bytesFilled;s(t.buffer,h,l.buffer,l.byteOffset,f),l.byteLength===f?d.shift():(l.byteOffset+=f,l.byteLength-=f),e._queueTotalSize-=f,er(e,f,t),c-=f}return u}function er(e,t,r){rr(e),r.bytesFilled+=t}function tr(e){0===e._queueTotalSize&&!0===e._closeRequested?(dr(e),Fr(e._controlledReadableByteStream)):Vt(e)}function rr(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function nr(e){while(e._pendingPullIntos.length>0){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();!0===$t(e,t)&&(cr(e),Qt(e._controlledReadableByteStream,t))}}function ir(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,o=p(t.buffer),a={buffer:o,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(a),_r(r);if("closed"===r._state){var s=new i(a.buffer,a.byteOffset,0);return _(R(s,!0,r._reader._forAuthorCode))}if(e._queueTotalSize>0){if(!0===$t(e,a)){var c=Zt(a);return tr(e),_(R(c,!1,r._reader._forAuthorCode))}if(!0===e._closeRequested){var u=new TypeError("Insufficient bytes to fill elements in the given buffer");return hr(e,u),A(u)}}e._pendingPullIntos.push(a);var d=_r(r);return Vt(e),d}function or(e,t){t.buffer=p(t.buffer);var r=e._controlledReadableByteStream;if(!0===Er(r))while(Ir(r)>0){var n=cr(e);Qt(r,n)}}function ar(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(er(e,t,r),!(r.bytesFilled0){var i=r.byteOffset+r.bytesFilled,o=r.buffer.slice(i-n,i);Jt(e,o,0,o.byteLength)}r.buffer=p(r.buffer),r.bytesFilled-=n,Qt(e._controlledReadableByteStream,r),nr(e)}}function sr(e,t){var r=e._pendingPullIntos.peek(),n=e._controlledReadableByteStream;if("closed"===n._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");or(e,r)}else ar(e,t,r);Vt(e)}function cr(e){var t=e._pendingPullIntos.shift();return rr(e),t}function ur(e){var t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(!0===e._closeRequested)return!1;if(!1===e._started)return!1;if(!0===Q(t)&&Y(t)>0)return!0;if(!0===Er(t)&&Ir(t)>0)return!0;var r=pr(e);return r>0}function dr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function lr(e){var t=e._controlledReadableByteStream;if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled>0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw hr(e,n),n}}dr(e),Fr(t)}}function fr(e,t){var r=e._controlledReadableByteStream,n=t.buffer,i=t.byteOffset,o=t.byteLength,a=p(n);if(!0===Q(r))if(0===Y(r))Jt(e,a,i,o);else{var s=new Uint8Array(a,i,o);V(r,s,!1)}else!0===Er(r)?(Jt(e,a,i,o),nr(e)):Jt(e,a,i,o);Vt(e)}function hr(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Yt(e),de(e),dr(e),jr(r,t))}function pr(e){var t=e._controlledReadableByteStream,r=t._state;return"errored"===r?null:"closed"===r?0:e._strategyHWM-e._queueTotalSize}function mr(e,t){if(t=Number(t),!1===c(t))throw new RangeError("bytesWritten must be a finite");sr(e,t)}function br(e,t){var r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,sr(e,t.byteLength)}function gr(e,t,r,n,i,o,a){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=void 0,t._queue=t._queueTotalSize=void 0,de(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=b(o),t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=a,t._pendingPullIntos=new O,e._readableStreamController=t;var s=r();E(_(s),(function(){t._started=!0,Vt(t)}),(function(e){hr(t,e)}))}function yr(e,t,r){var n=Object.create(Wt.prototype);function i(){return f(t,"start",[n])}var o=l(t,"pull",0,[n]),a=l(t,"cancel",1,[]),s=t.autoAllocateChunkSize;if(void 0!==s&&(s=Number(s),!1===zt(s)||s<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");gr(e,n,i,o,a,r,s)}function vr(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function Sr(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function wr(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Cr(e,t){void 0===t&&(t=!1);var r=new Tr(e);return r._forAuthorCode=t,r}function _r(e){var t=C((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}));return t}function Ar(e,t,r){var n=e._reader,i=n._readIntoRequests.shift();i._resolve(R(t,r,n._forAuthorCode))}function Ir(e){return e._reader._readIntoRequests.length}function Er(e){var t=e._reader;return void 0!==t&&!!xr(t)}var Tr=function(){function e(e){if(!Mr(e))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===qt(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Nr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");M(this,e),this._readIntoRequests=new O}return Object.defineProperty(e.prototype,"closed",{get:function(){return xr(this)?this._closedPromise:A(kr("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return xr(this)?void 0===this._ownerReadableStream?A(F("cancel")):N(this,e):A(kr("cancel"))},e.prototype.read=function(e){return xr(this)?void 0===this._ownerReadableStream?A(F("read from")):ArrayBuffer.isView(e)?(m(e.buffer),0===e.byteLength?A(new TypeError("view must have non-zero byteLength")):Pr(this,e)):A(new TypeError("view must be an array buffer view")):A(kr("read"))},e.prototype.releaseLock=function(){if(!xr(this))throw kr("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");B(this)}},e}();function xr(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function Pr(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?A(r._storedError):ir(r._readableStreamController,t)}function kr(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}var Dr=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Rr(this);var r=t.size,n=t.highWaterMark,i=e.type,o=String(i);if("bytes"===o){if(void 0!==r)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===n&&(n=0),n=b(n),yr(this,e,n)}else{if(void 0!==i)throw new RangeError("Invalid type is specified");var a=g(r);void 0===n&&(n=1),n=b(n),Ut(this,e,n,a)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===Mr(this))throw Kr("locked");return Nr(this)},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return!1===Mr(this)?A(Kr("cancel")):!0===Nr(this)?A(new TypeError("Cannot cancel a stream that already has a reader")):Br(this,e)},e.prototype.getReader=function(e){var t=(void 0===e?{}:e).mode;if(!1===Mr(this))throw Kr("getReader");if(void 0===t)return q(this,!0);if(t=String(t),"byob"===t)return Cr(this,!0);throw new RangeError("Invalid mode is specified")},e.prototype.pipeThrough=function(e,t){var r=e.writable,n=e.readable,i=void 0===t?{}:t,o=i.preventClose,a=i.preventAbort,s=i.preventCancel,c=i.signal;if(!1===Mr(this))throw Kr("pipeThrough");if(!1===ge(r))throw new TypeError("writable argument to pipeThrough must be a WritableStream");if(!1===Mr(n))throw new TypeError("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),a=Boolean(a),s=Boolean(s),void 0!==c&&!Ct(c))throw new TypeError("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Nr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===ye(r))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var u=Tt(this,r,o,a,s,c);return k(u),n},e.prototype.pipeTo=function(e,t){var r=void 0===t?{}:t,n=r.preventClose,i=r.preventAbort,o=r.preventCancel,a=r.signal;return!1===Mr(this)?A(Kr("pipeTo")):!1===ge(e)?A(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(n=Boolean(n),i=Boolean(i),o=Boolean(o),void 0===a||Ct(a)?!0===Nr(this)?A(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===ye(e)?A(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Tt(this,e,n,i,o,a):A(new TypeError("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},e.prototype.tee=function(){if(!1===Mr(this))throw Kr("tee");var e=Xt(this);return a(e)},e.prototype.getIterator=function(e){var t=(void 0===e?{}:e).preventCancel,r=void 0!==t&&t;if(!1===Mr(this))throw Kr("getIterator");return ie(this,r)},e}();function Or(e,t,r,n,i){void 0===n&&(n=1),void 0===i&&(i=function(){return 1});var o=Object.create(Dr.prototype);Rr(o);var a=Object.create(xt.prototype);return Kt(o,a,e,t,r,n,i),o}function Rr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Mr(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function Nr(e){return void 0!==e._reader}function Br(e,t){if(e._disturbed=!0,"closed"===e._state)return _(void 0);if("errored"===e._state)return A(e._storedError);Fr(e);var n=e._readableStreamController[G](t);return P(n,r)}function Fr(e){e._state="closed";var t=e._reader;void 0!==t&&(ee(t)&&(t._readRequests.forEach((function(e){e._resolve(R(void 0,!0,t._forAuthorCode))})),t._readRequests=new O),z(t))}function jr(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(ee(r)?(r._readRequests.forEach((function(e){e._reject(t)})),r._readRequests=new O):(r._readIntoRequests.forEach((function(e){e._reject(t)})),r._readIntoRequests=new O),L(r,t))}function Kr(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}"symbol"===typeof t.asyncIterator&&Object.defineProperty(Dr.prototype,t.asyncIterator,{value:Dr.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var Ur=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(e){return e.byteLength},e}(),Lr=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(){return 1},e}(),Xr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={});var n=t.size,i=t.highWaterMark,o=r.size,a=r.highWaterMark,s=e.writableType;if(void 0!==s)throw new RangeError("Invalid writable type specified");var c=g(n);void 0===i&&(i=1),i=b(i);var u=e.readableType;if(void 0!==u)throw new RangeError("Invalid readable type specified");var d,l=g(o);void 0===a&&(a=0),a=b(a);var h=C((function(e){d=e}));zr(this,h,i,c,a,l),Zr(this,e);var p=f(e,"start",[this._transformStreamController]);d(p)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!1===Gr(this))throw un("readable");return this._readable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!1===Gr(this))throw un("writable");return this._writable},enumerable:!0,configurable:!0}),e}();function zr(e,t,r,n,i,o){function a(){return t}function s(t){return nn(e,t)}function c(t){return on(e,t)}function u(){return an(e)}function d(){return sn(e)}function l(t){return qr(e,t),_(void 0)}e._writable=me(a,s,u,c,r,n),e._readable=Or(a,d,l,i,o),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Hr(e,!0),e._transformStreamController=void 0}function Gr(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Wr(e,t){Nt(e._readable._readableStreamController,t),qr(e,t)}function qr(e,t){Jr(e._transformStreamController),tt(e._writable._writableStreamController,t),!0===e._backpressure&&Hr(e,!1)}function Hr(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=C((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}var Vr=function(){function e(){throw new TypeError("TransformStreamDefaultController instances cannot be created directly")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Yr(this))throw cn("desiredSize");var e=this._controlledTransformStream._readable._readableStreamController;return Bt(e)},enumerable:!0,configurable:!0}),e.prototype.enqueue=function(e){if(!1===Yr(this))throw cn("enqueue");$r(this,e)},e.prototype.error=function(e){if(!1===Yr(this))throw cn("error");en(this,e)},e.prototype.terminate=function(){if(!1===Yr(this))throw cn("terminate");rn(this)},e}();function Yr(e){return!!o(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function Qr(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function Zr(e,t){var r=Object.create(Vr.prototype),n=function(e){try{return $r(r,e),_(void 0)}catch(t){return A(t)}},i=t.transform;if(void 0!==i){if("function"!==typeof i)throw new TypeError("transform is not a method");n=function(e){return h(i,t,[e,r])}}var o=l(t,"flush",0,[r]);Qr(e,r,n,o)}function Jr(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function $r(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!1===jt(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Mt(n,t)}catch(o){throw qr(r,o),r._readable._storedError}var i=Ft(n);i!==r._backpressure&&Hr(r,!0)}function en(e,t){Wr(e._controlledTransformStream,t)}function tn(e,t){var r=e._transformAlgorithm(t);return P(r,void 0,(function(t){throw Wr(e._controlledTransformStream,t),t}))}function rn(e){var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===jt(r)&&Rt(r);var n=new TypeError("TransformStream terminated");qr(t,n)}function nn(e,t){var r=e._transformStreamController;if(!0===e._backpressure){var n=e._backpressureChangePromise;return P(n,(function(){var n=e._writable,i=n._state;if("erroring"===i)throw n._storedError;return tn(r,t)}))}return tn(r,t)}function on(e,t){return Wr(e,t),_(void 0)}function an(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return Jr(r),P(n,(function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===jt(e)&&Rt(e)}),(function(r){throw Wr(e,r),t._storedError}))}function sn(e){return Hr(e,!1),e._backpressureChangePromise}function cn(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function un(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.ByteLengthQueuingStrategy=Ur,e.CountQueuingStrategy=Lr,e.ReadableStream=Dr,e.TransformStream=Xr,e.WritableStream=he,Object.defineProperty(e,"__esModule",{value:!0})}))},8875:function(e,t,r){var n,i,o;(function(r,a){i=[],n=a,o="function"===typeof n?n.apply(t,i):n,void 0===o||(e.exports=o)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(h){var r,n,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,s=o.exec(h.stack)||a.exec(h.stack),c=s&&s[1]||!1,u=s&&s[2]||!1,d=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");c===d&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(u-2)+"}[^<]* + + + + + + +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + 1/0 +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/plugins/pdfjs/build/pdf.js b/src/main/resources/static/plugins/pdfjs/build/pdf.js new file mode 100644 index 0000000..ae8d472 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/build/pdf.js @@ -0,0 +1,13489 @@ +/** + * @licstart The following is the entire license notice for the + * Javascript code in this page + * + * Copyright 2020 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @licend The above is the entire license notice for the + * Javascript code in this page + */ + +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("pdfjs/build/pdf", [], factory); + else if(typeof exports === 'object') + exports["pdfjs/build/pdf"] = factory(); + else + root["pdfjs/build/pdf"] = root.pdfjsLib = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __w_pdfjs_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __w_pdfjs_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __w_pdfjs_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __w_pdfjs_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __w_pdfjs_require__.d = function(exports, name, getter) { +/******/ if(!__w_pdfjs_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __w_pdfjs_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __w_pdfjs_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __w_pdfjs_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __w_pdfjs_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __w_pdfjs_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __w_pdfjs_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __w_pdfjs_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __w_pdfjs_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __w_pdfjs_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __w_pdfjs_require__(__w_pdfjs_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "addLinkAttributes", { + enumerable: true, + get: function () { + return _display_utils.addLinkAttributes; + } +}); +Object.defineProperty(exports, "getFilenameFromUrl", { + enumerable: true, + get: function () { + return _display_utils.getFilenameFromUrl; + } +}); +Object.defineProperty(exports, "LinkTarget", { + enumerable: true, + get: function () { + return _display_utils.LinkTarget; + } +}); +Object.defineProperty(exports, "loadScript", { + enumerable: true, + get: function () { + return _display_utils.loadScript; + } +}); +Object.defineProperty(exports, "PDFDateString", { + enumerable: true, + get: function () { + return _display_utils.PDFDateString; + } +}); +Object.defineProperty(exports, "RenderingCancelledException", { + enumerable: true, + get: function () { + return _display_utils.RenderingCancelledException; + } +}); +Object.defineProperty(exports, "build", { + enumerable: true, + get: function () { + return _api.build; + } +}); +Object.defineProperty(exports, "getDocument", { + enumerable: true, + get: function () { + return _api.getDocument; + } +}); +Object.defineProperty(exports, "LoopbackPort", { + enumerable: true, + get: function () { + return _api.LoopbackPort; + } +}); +Object.defineProperty(exports, "PDFDataRangeTransport", { + enumerable: true, + get: function () { + return _api.PDFDataRangeTransport; + } +}); +Object.defineProperty(exports, "PDFWorker", { + enumerable: true, + get: function () { + return _api.PDFWorker; + } +}); +Object.defineProperty(exports, "version", { + enumerable: true, + get: function () { + return _api.version; + } +}); +Object.defineProperty(exports, "CMapCompressionType", { + enumerable: true, + get: function () { + return _util.CMapCompressionType; + } +}); +Object.defineProperty(exports, "createObjectURL", { + enumerable: true, + get: function () { + return _util.createObjectURL; + } +}); +Object.defineProperty(exports, "createPromiseCapability", { + enumerable: true, + get: function () { + return _util.createPromiseCapability; + } +}); +Object.defineProperty(exports, "createValidAbsoluteUrl", { + enumerable: true, + get: function () { + return _util.createValidAbsoluteUrl; + } +}); +Object.defineProperty(exports, "InvalidPDFException", { + enumerable: true, + get: function () { + return _util.InvalidPDFException; + } +}); +Object.defineProperty(exports, "MissingPDFException", { + enumerable: true, + get: function () { + return _util.MissingPDFException; + } +}); +Object.defineProperty(exports, "OPS", { + enumerable: true, + get: function () { + return _util.OPS; + } +}); +Object.defineProperty(exports, "PasswordResponses", { + enumerable: true, + get: function () { + return _util.PasswordResponses; + } +}); +Object.defineProperty(exports, "PermissionFlag", { + enumerable: true, + get: function () { + return _util.PermissionFlag; + } +}); +Object.defineProperty(exports, "removeNullCharacters", { + enumerable: true, + get: function () { + return _util.removeNullCharacters; + } +}); +Object.defineProperty(exports, "shadow", { + enumerable: true, + get: function () { + return _util.shadow; + } +}); +Object.defineProperty(exports, "UnexpectedResponseException", { + enumerable: true, + get: function () { + return _util.UnexpectedResponseException; + } +}); +Object.defineProperty(exports, "UNSUPPORTED_FEATURES", { + enumerable: true, + get: function () { + return _util.UNSUPPORTED_FEATURES; + } +}); +Object.defineProperty(exports, "Util", { + enumerable: true, + get: function () { + return _util.Util; + } +}); +Object.defineProperty(exports, "VerbosityLevel", { + enumerable: true, + get: function () { + return _util.VerbosityLevel; + } +}); +Object.defineProperty(exports, "AnnotationLayer", { + enumerable: true, + get: function () { + return _annotation_layer.AnnotationLayer; + } +}); +Object.defineProperty(exports, "apiCompatibilityParams", { + enumerable: true, + get: function () { + return _api_compatibility.apiCompatibilityParams; + } +}); +Object.defineProperty(exports, "GlobalWorkerOptions", { + enumerable: true, + get: function () { + return _worker_options.GlobalWorkerOptions; + } +}); +Object.defineProperty(exports, "renderTextLayer", { + enumerable: true, + get: function () { + return _text_layer.renderTextLayer; + } +}); +Object.defineProperty(exports, "SVGGraphics", { + enumerable: true, + get: function () { + return _svg.SVGGraphics; + } +}); + +var _display_utils = __w_pdfjs_require__(1); + +var _api = __w_pdfjs_require__(5); + +var _util = __w_pdfjs_require__(2); + +var _annotation_layer = __w_pdfjs_require__(16); + +var _api_compatibility = __w_pdfjs_require__(7); + +var _worker_options = __w_pdfjs_require__(10); + +var _text_layer = __w_pdfjs_require__(17); + +var _svg = __w_pdfjs_require__(18); + +const pdfjsVersion = '2.5.207'; +const pdfjsBuild = '0974d6052'; +{ + const { + isNodeJS + } = __w_pdfjs_require__(4); + + if (isNodeJS) { + const PDFNodeStream = __w_pdfjs_require__(19).PDFNodeStream; + + (0, _api.setPDFNetworkStreamFactory)(params => { + return new PDFNodeStream(params); + }); + } else { + const PDFNetworkStream = __w_pdfjs_require__(22).PDFNetworkStream; + + let PDFFetchStream; + + if ((0, _display_utils.isFetchSupported)()) { + PDFFetchStream = __w_pdfjs_require__(23).PDFFetchStream; + } + + (0, _api.setPDFNetworkStreamFactory)(params => { + if (PDFFetchStream && (0, _display_utils.isValidFetchUrl)(params.url)) { + return new PDFFetchStream(params); + } + + return new PDFNetworkStream(params); + }); + } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.addLinkAttributes = addLinkAttributes; +exports.getFilenameFromUrl = getFilenameFromUrl; +exports.isFetchSupported = isFetchSupported; +exports.isValidFetchUrl = isValidFetchUrl; +exports.loadScript = loadScript; +exports.deprecated = deprecated; +exports.PDFDateString = exports.StatTimer = exports.DOMSVGFactory = exports.DOMCMapReaderFactory = exports.DOMCanvasFactory = exports.DEFAULT_LINK_REL = exports.LinkTarget = exports.RenderingCancelledException = exports.PageViewport = void 0; + +var _util = __w_pdfjs_require__(2); + +const DEFAULT_LINK_REL = "noopener noreferrer nofollow"; +exports.DEFAULT_LINK_REL = DEFAULT_LINK_REL; +const SVG_NS = "http://www.w3.org/2000/svg"; + +class DOMCanvasFactory { + create(width, height) { + if (width <= 0 || height <= 0) { + throw new Error("Invalid canvas size"); + } + + const canvas = document.createElement("canvas"); + const context = canvas.getContext("2d"); + canvas.width = width; + canvas.height = height; + return { + canvas, + context + }; + } + + reset(canvasAndContext, width, height) { + if (!canvasAndContext.canvas) { + throw new Error("Canvas is not specified"); + } + + if (width <= 0 || height <= 0) { + throw new Error("Invalid canvas size"); + } + + canvasAndContext.canvas.width = width; + canvasAndContext.canvas.height = height; + } + + destroy(canvasAndContext) { + if (!canvasAndContext.canvas) { + throw new Error("Canvas is not specified"); + } + + canvasAndContext.canvas.width = 0; + canvasAndContext.canvas.height = 0; + canvasAndContext.canvas = null; + canvasAndContext.context = null; + } + +} + +exports.DOMCanvasFactory = DOMCanvasFactory; + +class DOMCMapReaderFactory { + constructor({ + baseUrl = null, + isCompressed = false + }) { + this.baseUrl = baseUrl; + this.isCompressed = isCompressed; + } + + async fetch({ + name + }) { + if (!this.baseUrl) { + throw new Error('The CMap "baseUrl" parameter must be specified, ensure that ' + 'the "cMapUrl" and "cMapPacked" API parameters are provided.'); + } + + if (!name) { + throw new Error("CMap name must be specified."); + } + + const url = this.baseUrl + name + (this.isCompressed ? ".bcmap" : ""); + const compressionType = this.isCompressed ? _util.CMapCompressionType.BINARY : _util.CMapCompressionType.NONE; + + if (isFetchSupported() && isValidFetchUrl(url, document.baseURI)) { + return fetch(url).then(async response => { + if (!response.ok) { + throw new Error(response.statusText); + } + + let cMapData; + + if (this.isCompressed) { + cMapData = new Uint8Array(await response.arrayBuffer()); + } else { + cMapData = (0, _util.stringToBytes)(await response.text()); + } + + return { + cMapData, + compressionType + }; + }).catch(reason => { + throw new Error(`Unable to load ${this.isCompressed ? "binary " : ""}` + `CMap at: ${url}`); + }); + } + + return new Promise((resolve, reject) => { + const request = new XMLHttpRequest(); + request.open("GET", url, true); + + if (this.isCompressed) { + request.responseType = "arraybuffer"; + } + + request.onreadystatechange = () => { + if (request.readyState !== XMLHttpRequest.DONE) { + return; + } + + if (request.status === 200 || request.status === 0) { + let cMapData; + + if (this.isCompressed && request.response) { + cMapData = new Uint8Array(request.response); + } else if (!this.isCompressed && request.responseText) { + cMapData = (0, _util.stringToBytes)(request.responseText); + } + + if (cMapData) { + resolve({ + cMapData, + compressionType + }); + return; + } + } + + reject(new Error(request.statusText)); + }; + + request.send(null); + }).catch(reason => { + throw new Error(`Unable to load ${this.isCompressed ? "binary " : ""}` + `CMap at: ${url}`); + }); + } + +} + +exports.DOMCMapReaderFactory = DOMCMapReaderFactory; + +class DOMSVGFactory { + create(width, height) { + (0, _util.assert)(width > 0 && height > 0, "Invalid SVG dimensions"); + const svg = document.createElementNS(SVG_NS, "svg:svg"); + svg.setAttribute("version", "1.1"); + svg.setAttribute("width", width + "px"); + svg.setAttribute("height", height + "px"); + svg.setAttribute("preserveAspectRatio", "none"); + svg.setAttribute("viewBox", "0 0 " + width + " " + height); + return svg; + } + + createElement(type) { + (0, _util.assert)(typeof type === "string", "Invalid SVG element type"); + return document.createElementNS(SVG_NS, type); + } + +} + +exports.DOMSVGFactory = DOMSVGFactory; + +class PageViewport { + constructor({ + viewBox, + scale, + rotation, + offsetX = 0, + offsetY = 0, + dontFlip = false + }) { + this.viewBox = viewBox; + this.scale = scale; + this.rotation = rotation; + this.offsetX = offsetX; + this.offsetY = offsetY; + const centerX = (viewBox[2] + viewBox[0]) / 2; + const centerY = (viewBox[3] + viewBox[1]) / 2; + let rotateA, rotateB, rotateC, rotateD; + rotation = rotation % 360; + rotation = rotation < 0 ? rotation + 360 : rotation; + + switch (rotation) { + case 180: + rotateA = -1; + rotateB = 0; + rotateC = 0; + rotateD = 1; + break; + + case 90: + rotateA = 0; + rotateB = 1; + rotateC = 1; + rotateD = 0; + break; + + case 270: + rotateA = 0; + rotateB = -1; + rotateC = -1; + rotateD = 0; + break; + + case 0: + rotateA = 1; + rotateB = 0; + rotateC = 0; + rotateD = -1; + break; + + default: + throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees."); + } + + if (dontFlip) { + rotateC = -rotateC; + rotateD = -rotateD; + } + + let offsetCanvasX, offsetCanvasY; + let width, height; + + if (rotateA === 0) { + offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX; + offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY; + width = Math.abs(viewBox[3] - viewBox[1]) * scale; + height = Math.abs(viewBox[2] - viewBox[0]) * scale; + } else { + offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX; + offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY; + width = Math.abs(viewBox[2] - viewBox[0]) * scale; + height = Math.abs(viewBox[3] - viewBox[1]) * scale; + } + + this.transform = [rotateA * scale, rotateB * scale, rotateC * scale, rotateD * scale, offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY, offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY]; + this.width = width; + this.height = height; + } + + clone({ + scale = this.scale, + rotation = this.rotation, + offsetX = this.offsetX, + offsetY = this.offsetY, + dontFlip = false + } = {}) { + return new PageViewport({ + viewBox: this.viewBox.slice(), + scale, + rotation, + offsetX, + offsetY, + dontFlip + }); + } + + convertToViewportPoint(x, y) { + return _util.Util.applyTransform([x, y], this.transform); + } + + convertToViewportRectangle(rect) { + const topLeft = _util.Util.applyTransform([rect[0], rect[1]], this.transform); + + const bottomRight = _util.Util.applyTransform([rect[2], rect[3]], this.transform); + + return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]]; + } + + convertToPdfPoint(x, y) { + return _util.Util.applyInverseTransform([x, y], this.transform); + } + +} + +exports.PageViewport = PageViewport; + +class RenderingCancelledException extends _util.BaseException { + constructor(msg, type) { + super(msg); + this.type = type; + } + +} + +exports.RenderingCancelledException = RenderingCancelledException; +const LinkTarget = { + NONE: 0, + SELF: 1, + BLANK: 2, + PARENT: 3, + TOP: 4 +}; +exports.LinkTarget = LinkTarget; + +function addLinkAttributes(link, { + url, + target, + rel, + enabled = true +} = {}) { + (0, _util.assert)(url && typeof url === "string", 'addLinkAttributes: A valid "url" parameter must provided.'); + const urlNullRemoved = (0, _util.removeNullCharacters)(url); + + if (enabled) { + link.href = link.title = urlNullRemoved; + } else { + link.href = ""; + link.title = `Disabled: ${urlNullRemoved}`; + + link.onclick = () => { + return false; + }; + } + + let targetStr = ""; + + switch (target) { + case LinkTarget.NONE: + break; + + case LinkTarget.SELF: + targetStr = "_self"; + break; + + case LinkTarget.BLANK: + targetStr = "_blank"; + break; + + case LinkTarget.PARENT: + targetStr = "_parent"; + break; + + case LinkTarget.TOP: + targetStr = "_top"; + break; + } + + link.target = targetStr; + link.rel = typeof rel === "string" ? rel : DEFAULT_LINK_REL; +} + +function getFilenameFromUrl(url) { + const anchor = url.indexOf("#"); + const query = url.indexOf("?"); + const end = Math.min(anchor > 0 ? anchor : url.length, query > 0 ? query : url.length); + return url.substring(url.lastIndexOf("/", end) + 1, end); +} + +class StatTimer { + constructor() { + this.started = Object.create(null); + this.times = []; + } + + time(name) { + if (name in this.started) { + (0, _util.warn)(`Timer is already running for ${name}`); + } + + this.started[name] = Date.now(); + } + + timeEnd(name) { + if (!(name in this.started)) { + (0, _util.warn)(`Timer has not been started for ${name}`); + } + + this.times.push({ + name, + start: this.started[name], + end: Date.now() + }); + delete this.started[name]; + } + + toString() { + const outBuf = []; + let longest = 0; + + for (const time of this.times) { + const name = time.name; + + if (name.length > longest) { + longest = name.length; + } + } + + for (const time of this.times) { + const duration = time.end - time.start; + outBuf.push(`${time.name.padEnd(longest)} ${duration}ms\n`); + } + + return outBuf.join(""); + } + +} + +exports.StatTimer = StatTimer; + +function isFetchSupported() { + return typeof fetch !== "undefined" && typeof Response !== "undefined" && "body" in Response.prototype && typeof ReadableStream !== "undefined"; +} + +function isValidFetchUrl(url, baseUrl) { + try { + const { + protocol + } = baseUrl ? new URL(url, baseUrl) : new URL(url); + return protocol === "http:" || protocol === "https:"; + } catch (ex) { + return false; + } +} + +function loadScript(src) { + return new Promise((resolve, reject) => { + const script = document.createElement("script"); + script.src = src; + script.onload = resolve; + + script.onerror = function () { + reject(new Error(`Cannot load script at: ${script.src}`)); + }; + + (document.head || document.documentElement).appendChild(script); + }); +} + +function deprecated(details) { + console.log("Deprecated API usage: " + details); +} + +let pdfDateStringRegex; + +class PDFDateString { + static toDateObject(input) { + if (!input || !(0, _util.isString)(input)) { + return null; + } + + if (!pdfDateStringRegex) { + pdfDateStringRegex = new RegExp("^D:" + "(\\d{4})" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "([Z|+|-])?" + "(\\d{2})?" + "'?" + "(\\d{2})?" + "'?"); + } + + const matches = pdfDateStringRegex.exec(input); + + if (!matches) { + return null; + } + + const year = parseInt(matches[1], 10); + let month = parseInt(matches[2], 10); + month = month >= 1 && month <= 12 ? month - 1 : 0; + let day = parseInt(matches[3], 10); + day = day >= 1 && day <= 31 ? day : 1; + let hour = parseInt(matches[4], 10); + hour = hour >= 0 && hour <= 23 ? hour : 0; + let minute = parseInt(matches[5], 10); + minute = minute >= 0 && minute <= 59 ? minute : 0; + let second = parseInt(matches[6], 10); + second = second >= 0 && second <= 59 ? second : 0; + const universalTimeRelation = matches[7] || "Z"; + let offsetHour = parseInt(matches[8], 10); + offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0; + let offsetMinute = parseInt(matches[9], 10) || 0; + offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0; + + if (universalTimeRelation === "-") { + hour += offsetHour; + minute += offsetMinute; + } else if (universalTimeRelation === "+") { + hour -= offsetHour; + minute -= offsetMinute; + } + + return new Date(Date.UTC(year, month, day, hour, minute, second)); + } + +} + +exports.PDFDateString = PDFDateString; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.arrayByteLength = arrayByteLength; +exports.arraysToBytes = arraysToBytes; +exports.assert = assert; +exports.bytesToString = bytesToString; +exports.createPromiseCapability = createPromiseCapability; +exports.getVerbosityLevel = getVerbosityLevel; +exports.info = info; +exports.isArrayBuffer = isArrayBuffer; +exports.isArrayEqual = isArrayEqual; +exports.isBool = isBool; +exports.isEmptyObj = isEmptyObj; +exports.isNum = isNum; +exports.isString = isString; +exports.isSameOrigin = isSameOrigin; +exports.createValidAbsoluteUrl = createValidAbsoluteUrl; +exports.removeNullCharacters = removeNullCharacters; +exports.setVerbosityLevel = setVerbosityLevel; +exports.shadow = shadow; +exports.string32 = string32; +exports.stringToBytes = stringToBytes; +exports.stringToPDFString = stringToPDFString; +exports.stringToUTF8String = stringToUTF8String; +exports.utf8StringToString = utf8StringToString; +exports.warn = warn; +exports.unreachable = unreachable; +exports.IsEvalSupportedCached = exports.IsLittleEndianCached = exports.createObjectURL = exports.FormatError = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.MissingPDFException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationStateModelType = exports.AnnotationReviewState = exports.AnnotationReplyType = exports.AnnotationMarkedState = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = exports.BaseException = void 0; + +__w_pdfjs_require__(3); + +const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; +exports.IDENTITY_MATRIX = IDENTITY_MATRIX; +const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0]; +exports.FONT_IDENTITY_MATRIX = FONT_IDENTITY_MATRIX; +const PermissionFlag = { + PRINT: 0x04, + MODIFY_CONTENTS: 0x08, + COPY: 0x10, + MODIFY_ANNOTATIONS: 0x20, + FILL_INTERACTIVE_FORMS: 0x100, + COPY_FOR_ACCESSIBILITY: 0x200, + ASSEMBLE: 0x400, + PRINT_HIGH_QUALITY: 0x800 +}; +exports.PermissionFlag = PermissionFlag; +const TextRenderingMode = { + FILL: 0, + STROKE: 1, + FILL_STROKE: 2, + INVISIBLE: 3, + FILL_ADD_TO_PATH: 4, + STROKE_ADD_TO_PATH: 5, + FILL_STROKE_ADD_TO_PATH: 6, + ADD_TO_PATH: 7, + FILL_STROKE_MASK: 3, + ADD_TO_PATH_FLAG: 4 +}; +exports.TextRenderingMode = TextRenderingMode; +const ImageKind = { + GRAYSCALE_1BPP: 1, + RGB_24BPP: 2, + RGBA_32BPP: 3 +}; +exports.ImageKind = ImageKind; +const AnnotationType = { + TEXT: 1, + LINK: 2, + FREETEXT: 3, + LINE: 4, + SQUARE: 5, + CIRCLE: 6, + POLYGON: 7, + POLYLINE: 8, + HIGHLIGHT: 9, + UNDERLINE: 10, + SQUIGGLY: 11, + STRIKEOUT: 12, + STAMP: 13, + CARET: 14, + INK: 15, + POPUP: 16, + FILEATTACHMENT: 17, + SOUND: 18, + MOVIE: 19, + WIDGET: 20, + SCREEN: 21, + PRINTERMARK: 22, + TRAPNET: 23, + WATERMARK: 24, + THREED: 25, + REDACT: 26 +}; +exports.AnnotationType = AnnotationType; +const AnnotationStateModelType = { + MARKED: "Marked", + REVIEW: "Review" +}; +exports.AnnotationStateModelType = AnnotationStateModelType; +const AnnotationMarkedState = { + MARKED: "Marked", + UNMARKED: "Unmarked" +}; +exports.AnnotationMarkedState = AnnotationMarkedState; +const AnnotationReviewState = { + ACCEPTED: "Accepted", + REJECTED: "Rejected", + CANCELLED: "Cancelled", + COMPLETED: "Completed", + NONE: "None" +}; +exports.AnnotationReviewState = AnnotationReviewState; +const AnnotationReplyType = { + GROUP: "Group", + REPLY: "R" +}; +exports.AnnotationReplyType = AnnotationReplyType; +const AnnotationFlag = { + INVISIBLE: 0x01, + HIDDEN: 0x02, + PRINT: 0x04, + NOZOOM: 0x08, + NOROTATE: 0x10, + NOVIEW: 0x20, + READONLY: 0x40, + LOCKED: 0x80, + TOGGLENOVIEW: 0x100, + LOCKEDCONTENTS: 0x200 +}; +exports.AnnotationFlag = AnnotationFlag; +const AnnotationFieldFlag = { + READONLY: 0x0000001, + REQUIRED: 0x0000002, + NOEXPORT: 0x0000004, + MULTILINE: 0x0001000, + PASSWORD: 0x0002000, + NOTOGGLETOOFF: 0x0004000, + RADIO: 0x0008000, + PUSHBUTTON: 0x0010000, + COMBO: 0x0020000, + EDIT: 0x0040000, + SORT: 0x0080000, + FILESELECT: 0x0100000, + MULTISELECT: 0x0200000, + DONOTSPELLCHECK: 0x0400000, + DONOTSCROLL: 0x0800000, + COMB: 0x1000000, + RICHTEXT: 0x2000000, + RADIOSINUNISON: 0x2000000, + COMMITONSELCHANGE: 0x4000000 +}; +exports.AnnotationFieldFlag = AnnotationFieldFlag; +const AnnotationBorderStyleType = { + SOLID: 1, + DASHED: 2, + BEVELED: 3, + INSET: 4, + UNDERLINE: 5 +}; +exports.AnnotationBorderStyleType = AnnotationBorderStyleType; +const StreamType = { + UNKNOWN: "UNKNOWN", + FLATE: "FLATE", + LZW: "LZW", + DCT: "DCT", + JPX: "JPX", + JBIG: "JBIG", + A85: "A85", + AHX: "AHX", + CCF: "CCF", + RLX: "RLX" +}; +exports.StreamType = StreamType; +const FontType = { + UNKNOWN: "UNKNOWN", + TYPE1: "TYPE1", + TYPE1C: "TYPE1C", + CIDFONTTYPE0: "CIDFONTTYPE0", + CIDFONTTYPE0C: "CIDFONTTYPE0C", + TRUETYPE: "TRUETYPE", + CIDFONTTYPE2: "CIDFONTTYPE2", + TYPE3: "TYPE3", + OPENTYPE: "OPENTYPE", + TYPE0: "TYPE0", + MMTYPE1: "MMTYPE1" +}; +exports.FontType = FontType; +const VerbosityLevel = { + ERRORS: 0, + WARNINGS: 1, + INFOS: 5 +}; +exports.VerbosityLevel = VerbosityLevel; +const CMapCompressionType = { + NONE: 0, + BINARY: 1, + STREAM: 2 +}; +exports.CMapCompressionType = CMapCompressionType; +const OPS = { + dependency: 1, + setLineWidth: 2, + setLineCap: 3, + setLineJoin: 4, + setMiterLimit: 5, + setDash: 6, + setRenderingIntent: 7, + setFlatness: 8, + setGState: 9, + save: 10, + restore: 11, + transform: 12, + moveTo: 13, + lineTo: 14, + curveTo: 15, + curveTo2: 16, + curveTo3: 17, + closePath: 18, + rectangle: 19, + stroke: 20, + closeStroke: 21, + fill: 22, + eoFill: 23, + fillStroke: 24, + eoFillStroke: 25, + closeFillStroke: 26, + closeEOFillStroke: 27, + endPath: 28, + clip: 29, + eoClip: 30, + beginText: 31, + endText: 32, + setCharSpacing: 33, + setWordSpacing: 34, + setHScale: 35, + setLeading: 36, + setFont: 37, + setTextRenderingMode: 38, + setTextRise: 39, + moveText: 40, + setLeadingMoveText: 41, + setTextMatrix: 42, + nextLine: 43, + showText: 44, + showSpacedText: 45, + nextLineShowText: 46, + nextLineSetSpacingShowText: 47, + setCharWidth: 48, + setCharWidthAndBounds: 49, + setStrokeColorSpace: 50, + setFillColorSpace: 51, + setStrokeColor: 52, + setStrokeColorN: 53, + setFillColor: 54, + setFillColorN: 55, + setStrokeGray: 56, + setFillGray: 57, + setStrokeRGBColor: 58, + setFillRGBColor: 59, + setStrokeCMYKColor: 60, + setFillCMYKColor: 61, + shadingFill: 62, + beginInlineImage: 63, + beginImageData: 64, + endInlineImage: 65, + paintXObject: 66, + markPoint: 67, + markPointProps: 68, + beginMarkedContent: 69, + beginMarkedContentProps: 70, + endMarkedContent: 71, + beginCompat: 72, + endCompat: 73, + paintFormXObjectBegin: 74, + paintFormXObjectEnd: 75, + beginGroup: 76, + endGroup: 77, + beginAnnotations: 78, + endAnnotations: 79, + beginAnnotation: 80, + endAnnotation: 81, + paintJpegXObject: 82, + paintImageMaskXObject: 83, + paintImageMaskXObjectGroup: 84, + paintImageXObject: 85, + paintInlineImageXObject: 86, + paintInlineImageXObjectGroup: 87, + paintImageXObjectRepeat: 88, + paintImageMaskXObjectRepeat: 89, + paintSolidColorImageMask: 90, + constructPath: 91 +}; +exports.OPS = OPS; +const UNSUPPORTED_FEATURES = { + unknown: "unknown", + forms: "forms", + javaScript: "javaScript", + smask: "smask", + shadingPattern: "shadingPattern", + font: "font", + errorTilingPattern: "errorTilingPattern", + errorExtGState: "errorExtGState", + errorXObject: "errorXObject", + errorFontLoadType3: "errorFontLoadType3", + errorFontState: "errorFontState", + errorFontMissing: "errorFontMissing", + errorFontTranslate: "errorFontTranslate", + errorColorSpace: "errorColorSpace", + errorOperatorList: "errorOperatorList", + errorFontToUnicode: "errorFontToUnicode", + errorFontLoadNative: "errorFontLoadNative", + errorFontGetPath: "errorFontGetPath" +}; +exports.UNSUPPORTED_FEATURES = UNSUPPORTED_FEATURES; +const PasswordResponses = { + NEED_PASSWORD: 1, + INCORRECT_PASSWORD: 2 +}; +exports.PasswordResponses = PasswordResponses; +let verbosity = VerbosityLevel.WARNINGS; + +function setVerbosityLevel(level) { + if (Number.isInteger(level)) { + verbosity = level; + } +} + +function getVerbosityLevel() { + return verbosity; +} + +function info(msg) { + if (verbosity >= VerbosityLevel.INFOS) { + console.log(`Info: ${msg}`); + } +} + +function warn(msg) { + if (verbosity >= VerbosityLevel.WARNINGS) { + console.log(`Warning: ${msg}`); + } +} + +function unreachable(msg) { + throw new Error(msg); +} + +function assert(cond, msg) { + if (!cond) { + unreachable(msg); + } +} + +function isSameOrigin(baseUrl, otherUrl) { + let base; + + try { + base = new URL(baseUrl); + + if (!base.origin || base.origin === "null") { + return false; + } + } catch (e) { + return false; + } + + const other = new URL(otherUrl, base); + return base.origin === other.origin; +} + +function _isValidProtocol(url) { + if (!url) { + return false; + } + + switch (url.protocol) { + case "http:": + case "https:": + case "ftp:": + case "mailto:": + case "tel:": + return true; + + default: + return false; + } +} + +function createValidAbsoluteUrl(url, baseUrl) { + if (!url) { + return null; + } + + try { + const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url); + + if (_isValidProtocol(absoluteUrl)) { + return absoluteUrl; + } + } catch (ex) {} + + return null; +} + +function shadow(obj, prop, value) { + Object.defineProperty(obj, prop, { + value, + enumerable: true, + configurable: true, + writable: false + }); + return value; +} + +const BaseException = function BaseExceptionClosure() { + function BaseException(message) { + if (this.constructor === BaseException) { + unreachable("Cannot initialize BaseException."); + } + + this.message = message; + this.name = this.constructor.name; + } + + BaseException.prototype = new Error(); + BaseException.constructor = BaseException; + return BaseException; +}(); + +exports.BaseException = BaseException; + +class PasswordException extends BaseException { + constructor(msg, code) { + super(msg); + this.code = code; + } + +} + +exports.PasswordException = PasswordException; + +class UnknownErrorException extends BaseException { + constructor(msg, details) { + super(msg); + this.details = details; + } + +} + +exports.UnknownErrorException = UnknownErrorException; + +class InvalidPDFException extends BaseException {} + +exports.InvalidPDFException = InvalidPDFException; + +class MissingPDFException extends BaseException {} + +exports.MissingPDFException = MissingPDFException; + +class UnexpectedResponseException extends BaseException { + constructor(msg, status) { + super(msg); + this.status = status; + } + +} + +exports.UnexpectedResponseException = UnexpectedResponseException; + +class FormatError extends BaseException {} + +exports.FormatError = FormatError; + +class AbortException extends BaseException {} + +exports.AbortException = AbortException; +const NullCharactersRegExp = /\x00/g; + +function removeNullCharacters(str) { + if (typeof str !== "string") { + warn("The argument for removeNullCharacters must be a string."); + return str; + } + + return str.replace(NullCharactersRegExp, ""); +} + +function bytesToString(bytes) { + assert(bytes !== null && typeof bytes === "object" && bytes.length !== undefined, "Invalid argument for bytesToString"); + const length = bytes.length; + const MAX_ARGUMENT_COUNT = 8192; + + if (length < MAX_ARGUMENT_COUNT) { + return String.fromCharCode.apply(null, bytes); + } + + const strBuf = []; + + for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) { + const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length); + const chunk = bytes.subarray(i, chunkEnd); + strBuf.push(String.fromCharCode.apply(null, chunk)); + } + + return strBuf.join(""); +} + +function stringToBytes(str) { + assert(typeof str === "string", "Invalid argument for stringToBytes"); + const length = str.length; + const bytes = new Uint8Array(length); + + for (let i = 0; i < length; ++i) { + bytes[i] = str.charCodeAt(i) & 0xff; + } + + return bytes; +} + +function arrayByteLength(arr) { + if (arr.length !== undefined) { + return arr.length; + } + + assert(arr.byteLength !== undefined, "arrayByteLength - invalid argument."); + return arr.byteLength; +} + +function arraysToBytes(arr) { + const length = arr.length; + + if (length === 1 && arr[0] instanceof Uint8Array) { + return arr[0]; + } + + let resultLength = 0; + + for (let i = 0; i < length; i++) { + resultLength += arrayByteLength(arr[i]); + } + + let pos = 0; + const data = new Uint8Array(resultLength); + + for (let i = 0; i < length; i++) { + let item = arr[i]; + + if (!(item instanceof Uint8Array)) { + if (typeof item === "string") { + item = stringToBytes(item); + } else { + item = new Uint8Array(item); + } + } + + const itemLength = item.byteLength; + data.set(item, pos); + pos += itemLength; + } + + return data; +} + +function string32(value) { + return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); +} + +function isLittleEndian() { + const buffer8 = new Uint8Array(4); + buffer8[0] = 1; + const view32 = new Uint32Array(buffer8.buffer, 0, 1); + return view32[0] === 1; +} + +const IsLittleEndianCached = { + get value() { + return shadow(this, "value", isLittleEndian()); + } + +}; +exports.IsLittleEndianCached = IsLittleEndianCached; + +function isEvalSupported() { + try { + new Function(""); + return true; + } catch (e) { + return false; + } +} + +const IsEvalSupportedCached = { + get value() { + return shadow(this, "value", isEvalSupported()); + } + +}; +exports.IsEvalSupportedCached = IsEvalSupportedCached; +const rgbBuf = ["rgb(", 0, ",", 0, ",", 0, ")"]; + +class Util { + static makeCssRgb(r, g, b) { + rgbBuf[1] = r; + rgbBuf[3] = g; + rgbBuf[5] = b; + return rgbBuf.join(""); + } + + static transform(m1, m2) { + return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]]; + } + + static applyTransform(p, m) { + const xt = p[0] * m[0] + p[1] * m[2] + m[4]; + const yt = p[0] * m[1] + p[1] * m[3] + m[5]; + return [xt, yt]; + } + + static applyInverseTransform(p, m) { + const d = m[0] * m[3] - m[1] * m[2]; + const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d; + const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d; + return [xt, yt]; + } + + static getAxialAlignedBoundingBox(r, m) { + const p1 = Util.applyTransform(r, m); + const p2 = Util.applyTransform(r.slice(2, 4), m); + const p3 = Util.applyTransform([r[0], r[3]], m); + const p4 = Util.applyTransform([r[2], r[1]], m); + return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])]; + } + + static inverseTransform(m) { + const d = m[0] * m[3] - m[1] * m[2]; + return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d]; + } + + static apply3dTransform(m, v) { + return [m[0] * v[0] + m[1] * v[1] + m[2] * v[2], m[3] * v[0] + m[4] * v[1] + m[5] * v[2], m[6] * v[0] + m[7] * v[1] + m[8] * v[2]]; + } + + static singularValueDecompose2dScale(m) { + const transpose = [m[0], m[2], m[1], m[3]]; + const a = m[0] * transpose[0] + m[1] * transpose[2]; + const b = m[0] * transpose[1] + m[1] * transpose[3]; + const c = m[2] * transpose[0] + m[3] * transpose[2]; + const d = m[2] * transpose[1] + m[3] * transpose[3]; + const first = (a + d) / 2; + const second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2; + const sx = first + second || 1; + const sy = first - second || 1; + return [Math.sqrt(sx), Math.sqrt(sy)]; + } + + static normalizeRect(rect) { + const r = rect.slice(0); + + if (rect[0] > rect[2]) { + r[0] = rect[2]; + r[2] = rect[0]; + } + + if (rect[1] > rect[3]) { + r[1] = rect[3]; + r[3] = rect[1]; + } + + return r; + } + + static intersect(rect1, rect2) { + function compare(a, b) { + return a - b; + } + + const orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare); + const orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare); + const result = []; + rect1 = Util.normalizeRect(rect1); + rect2 = Util.normalizeRect(rect2); + + if (orderedX[0] === rect1[0] && orderedX[1] === rect2[0] || orderedX[0] === rect2[0] && orderedX[1] === rect1[0]) { + result[0] = orderedX[1]; + result[2] = orderedX[2]; + } else { + return null; + } + + if (orderedY[0] === rect1[1] && orderedY[1] === rect2[1] || orderedY[0] === rect2[1] && orderedY[1] === rect1[1]) { + result[1] = orderedY[1]; + result[3] = orderedY[2]; + } else { + return null; + } + + return result; + } + +} + +exports.Util = Util; +const PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C, 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160, 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC]; + +function stringToPDFString(str) { + const length = str.length, + strBuf = []; + + if (str[0] === "\xFE" && str[1] === "\xFF") { + for (let i = 2; i < length; i += 2) { + strBuf.push(String.fromCharCode(str.charCodeAt(i) << 8 | str.charCodeAt(i + 1))); + } + } else if (str[0] === "\xFF" && str[1] === "\xFE") { + for (let i = 2; i < length; i += 2) { + strBuf.push(String.fromCharCode(str.charCodeAt(i + 1) << 8 | str.charCodeAt(i))); + } + } else { + for (let i = 0; i < length; ++i) { + const code = PDFStringTranslateTable[str.charCodeAt(i)]; + strBuf.push(code ? String.fromCharCode(code) : str.charAt(i)); + } + } + + return strBuf.join(""); +} + +function stringToUTF8String(str) { + return decodeURIComponent(escape(str)); +} + +function utf8StringToString(str) { + return unescape(encodeURIComponent(str)); +} + +function isEmptyObj(obj) { + for (const key in obj) { + return false; + } + + return true; +} + +function isBool(v) { + return typeof v === "boolean"; +} + +function isNum(v) { + return typeof v === "number"; +} + +function isString(v) { + return typeof v === "string"; +} + +function isArrayBuffer(v) { + return typeof v === "object" && v !== null && v.byteLength !== undefined; +} + +function isArrayEqual(arr1, arr2) { + if (arr1.length !== arr2.length) { + return false; + } + + return arr1.every(function (element, index) { + return element === arr2[index]; + }); +} + +function createPromiseCapability() { + const capability = Object.create(null); + let isSettled = false; + Object.defineProperty(capability, "settled", { + get() { + return isSettled; + } + + }); + capability.promise = new Promise(function (resolve, reject) { + capability.resolve = function (data) { + isSettled = true; + resolve(data); + }; + + capability.reject = function (reason) { + isSettled = true; + reject(reason); + }; + }); + return capability; +} + +const createObjectURL = function createObjectURLClosure() { + const digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + return function createObjectURL(data, contentType, forceDataSchema = false) { + if (!forceDataSchema && URL.createObjectURL) { + const blob = new Blob([data], { + type: contentType + }); + return URL.createObjectURL(blob); + } + + let buffer = `data:${contentType};base64,`; + + for (let i = 0, ii = data.length; i < ii; i += 3) { + const b1 = data[i] & 0xff; + const b2 = data[i + 1] & 0xff; + const b3 = data[i + 2] & 0xff; + const d1 = b1 >> 2, + d2 = (b1 & 3) << 4 | b2 >> 4; + const d3 = i + 1 < ii ? (b2 & 0xf) << 2 | b3 >> 6 : 64; + const d4 = i + 2 < ii ? b3 & 0x3f : 64; + buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4]; + } + + return buffer; + }; +}(); + +exports.createObjectURL = createObjectURL; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +var _is_node = __w_pdfjs_require__(4); + +; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isNodeJS = void 0; +const isNodeJS = typeof process === "object" && process + "" === "[object process]" && !process.versions.nw && !process.versions.electron; +exports.isNodeJS = isNodeJS; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getDocument = getDocument; +exports.setPDFNetworkStreamFactory = setPDFNetworkStreamFactory; +exports.build = exports.version = exports.PDFPageProxy = exports.PDFDocumentProxy = exports.PDFWorker = exports.PDFDataRangeTransport = exports.LoopbackPort = void 0; + +var _util = __w_pdfjs_require__(2); + +var _display_utils = __w_pdfjs_require__(1); + +var _font_loader = __w_pdfjs_require__(6); + +var _api_compatibility = __w_pdfjs_require__(7); + +var _canvas = __w_pdfjs_require__(8); + +var _worker_options = __w_pdfjs_require__(10); + +var _is_node = __w_pdfjs_require__(4); + +var _message_handler = __w_pdfjs_require__(11); + +var _metadata = __w_pdfjs_require__(12); + +var _transport_stream = __w_pdfjs_require__(14); + +var _webgl = __w_pdfjs_require__(15); + +const DEFAULT_RANGE_CHUNK_SIZE = 65536; +const RENDERING_CANCELLED_TIMEOUT = 100; +let createPDFNetworkStream; + +function setPDFNetworkStreamFactory(pdfNetworkStreamFactory) { + createPDFNetworkStream = pdfNetworkStreamFactory; +} + +function getDocument(src) { + const task = new PDFDocumentLoadingTask(); + let source; + + if (typeof src === "string") { + source = { + url: src + }; + } else if ((0, _util.isArrayBuffer)(src)) { + source = { + data: src + }; + } else if (src instanceof PDFDataRangeTransport) { + source = { + range: src + }; + } else { + if (typeof src !== "object") { + throw new Error("Invalid parameter in getDocument, " + "need either Uint8Array, string or a parameter object"); + } + + if (!src.url && !src.data && !src.range) { + throw new Error("Invalid parameter object: need either .data, .range or .url"); + } + + source = src; + } + + const params = Object.create(null); + let rangeTransport = null, + worker = null; + + for (const key in source) { + if (key === "url" && typeof window !== "undefined") { + params[key] = new URL(source[key], window.location).href; + continue; + } else if (key === "range") { + rangeTransport = source[key]; + continue; + } else if (key === "worker") { + worker = source[key]; + continue; + } else if (key === "data" && !(source[key] instanceof Uint8Array)) { + const pdfBytes = source[key]; + + if (typeof pdfBytes === "string") { + params[key] = (0, _util.stringToBytes)(pdfBytes); + } else if (typeof pdfBytes === "object" && pdfBytes !== null && !isNaN(pdfBytes.length)) { + params[key] = new Uint8Array(pdfBytes); + } else if ((0, _util.isArrayBuffer)(pdfBytes)) { + params[key] = new Uint8Array(pdfBytes); + } else { + throw new Error("Invalid PDF binary data: either typed array, " + "string or array-like object is expected in the " + "data property."); + } + + continue; + } + + params[key] = source[key]; + } + + params.rangeChunkSize = params.rangeChunkSize || DEFAULT_RANGE_CHUNK_SIZE; + params.CMapReaderFactory = params.CMapReaderFactory || _display_utils.DOMCMapReaderFactory; + params.ignoreErrors = params.stopAtErrors !== true; + params.fontExtraProperties = params.fontExtraProperties === true; + params.pdfBug = params.pdfBug === true; + + if (!Number.isInteger(params.maxImageSize)) { + params.maxImageSize = -1; + } + + if (typeof params.isEvalSupported !== "boolean") { + params.isEvalSupported = true; + } + + if (typeof params.disableFontFace !== "boolean") { + params.disableFontFace = _api_compatibility.apiCompatibilityParams.disableFontFace || false; + } + + if (typeof params.disableRange !== "boolean") { + params.disableRange = false; + } + + if (typeof params.disableStream !== "boolean") { + params.disableStream = false; + } + + if (typeof params.disableAutoFetch !== "boolean") { + params.disableAutoFetch = false; + } + + (0, _util.setVerbosityLevel)(params.verbosity); + + if (!worker) { + const workerParams = { + verbosity: params.verbosity, + port: _worker_options.GlobalWorkerOptions.workerPort + }; + worker = workerParams.port ? PDFWorker.fromPort(workerParams) : new PDFWorker(workerParams); + task._worker = worker; + } + + const docId = task.docId; + worker.promise.then(function () { + if (task.destroyed) { + throw new Error("Loading aborted"); + } + + const workerIdPromise = _fetchDocument(worker, params, rangeTransport, docId); + + const networkStreamPromise = new Promise(function (resolve) { + let networkStream; + + if (rangeTransport) { + networkStream = new _transport_stream.PDFDataTransportStream({ + length: params.length, + initialData: params.initialData, + progressiveDone: params.progressiveDone, + disableRange: params.disableRange, + disableStream: params.disableStream + }, rangeTransport); + } else if (!params.data) { + networkStream = createPDFNetworkStream({ + url: params.url, + length: params.length, + httpHeaders: params.httpHeaders, + withCredentials: params.withCredentials, + rangeChunkSize: params.rangeChunkSize, + disableRange: params.disableRange, + disableStream: params.disableStream + }); + } + + resolve(networkStream); + }); + return Promise.all([workerIdPromise, networkStreamPromise]).then(function ([workerId, networkStream]) { + if (task.destroyed) { + throw new Error("Loading aborted"); + } + + const messageHandler = new _message_handler.MessageHandler(docId, workerId, worker.port); + messageHandler.postMessageTransfers = worker.postMessageTransfers; + const transport = new WorkerTransport(messageHandler, task, networkStream, params); + task._transport = transport; + messageHandler.send("Ready", null); + }); + }).catch(task._capability.reject); + return task; +} + +function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { + if (worker.destroyed) { + return Promise.reject(new Error("Worker was destroyed")); + } + + if (pdfDataRangeTransport) { + source.length = pdfDataRangeTransport.length; + source.initialData = pdfDataRangeTransport.initialData; + source.progressiveDone = pdfDataRangeTransport.progressiveDone; + } + + return worker.messageHandler.sendWithPromise("GetDocRequest", { + docId, + apiVersion: '2.5.207', + source: { + data: source.data, + url: source.url, + password: source.password, + disableAutoFetch: source.disableAutoFetch, + rangeChunkSize: source.rangeChunkSize, + length: source.length + }, + maxImageSize: source.maxImageSize, + disableFontFace: source.disableFontFace, + postMessageTransfers: worker.postMessageTransfers, + docBaseUrl: source.docBaseUrl, + ignoreErrors: source.ignoreErrors, + isEvalSupported: source.isEvalSupported, + fontExtraProperties: source.fontExtraProperties + }).then(function (workerId) { + if (worker.destroyed) { + throw new Error("Worker was destroyed"); + } + + return workerId; + }); +} + +const PDFDocumentLoadingTask = function PDFDocumentLoadingTaskClosure() { + let nextDocumentId = 0; + + class PDFDocumentLoadingTask { + constructor() { + this._capability = (0, _util.createPromiseCapability)(); + this._transport = null; + this._worker = null; + this.docId = "d" + nextDocumentId++; + this.destroyed = false; + this.onPassword = null; + this.onProgress = null; + this.onUnsupportedFeature = null; + } + + get promise() { + return this._capability.promise; + } + + destroy() { + this.destroyed = true; + const transportDestroyed = !this._transport ? Promise.resolve() : this._transport.destroy(); + return transportDestroyed.then(() => { + this._transport = null; + + if (this._worker) { + this._worker.destroy(); + + this._worker = null; + } + }); + } + + } + + return PDFDocumentLoadingTask; +}(); + +class PDFDataRangeTransport { + constructor(length, initialData, progressiveDone = false) { + this.length = length; + this.initialData = initialData; + this.progressiveDone = progressiveDone; + this._rangeListeners = []; + this._progressListeners = []; + this._progressiveReadListeners = []; + this._progressiveDoneListeners = []; + this._readyCapability = (0, _util.createPromiseCapability)(); + } + + addRangeListener(listener) { + this._rangeListeners.push(listener); + } + + addProgressListener(listener) { + this._progressListeners.push(listener); + } + + addProgressiveReadListener(listener) { + this._progressiveReadListeners.push(listener); + } + + addProgressiveDoneListener(listener) { + this._progressiveDoneListeners.push(listener); + } + + onDataRange(begin, chunk) { + for (const listener of this._rangeListeners) { + listener(begin, chunk); + } + } + + onDataProgress(loaded, total) { + this._readyCapability.promise.then(() => { + for (const listener of this._progressListeners) { + listener(loaded, total); + } + }); + } + + onDataProgressiveRead(chunk) { + this._readyCapability.promise.then(() => { + for (const listener of this._progressiveReadListeners) { + listener(chunk); + } + }); + } + + onDataProgressiveDone() { + this._readyCapability.promise.then(() => { + for (const listener of this._progressiveDoneListeners) { + listener(); + } + }); + } + + transportReady() { + this._readyCapability.resolve(); + } + + requestDataRange(begin, end) { + (0, _util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange"); + } + + abort() {} + +} + +exports.PDFDataRangeTransport = PDFDataRangeTransport; + +class PDFDocumentProxy { + constructor(pdfInfo, transport) { + this._pdfInfo = pdfInfo; + this._transport = transport; + } + + get numPages() { + return this._pdfInfo.numPages; + } + + get fingerprint() { + return this._pdfInfo.fingerprint; + } + + getPage(pageNumber) { + return this._transport.getPage(pageNumber); + } + + getPageIndex(ref) { + return this._transport.getPageIndex(ref); + } + + getDestinations() { + return this._transport.getDestinations(); + } + + getDestination(id) { + return this._transport.getDestination(id); + } + + getPageLabels() { + return this._transport.getPageLabels(); + } + + getPageLayout() { + return this._transport.getPageLayout(); + } + + getPageMode() { + return this._transport.getPageMode(); + } + + getViewerPreferences() { + return this._transport.getViewerPreferences(); + } + + getOpenAction() { + return this._transport.getOpenAction(); + } + + getOpenActionDestination() { + (0, _display_utils.deprecated)("getOpenActionDestination, use getOpenAction instead."); + return this.getOpenAction().then(function (openAction) { + return openAction && openAction.dest ? openAction.dest : null; + }); + } + + getAttachments() { + return this._transport.getAttachments(); + } + + getJavaScript() { + return this._transport.getJavaScript(); + } + + getOutline() { + return this._transport.getOutline(); + } + + getPermissions() { + return this._transport.getPermissions(); + } + + getMetadata() { + return this._transport.getMetadata(); + } + + getData() { + return this._transport.getData(); + } + + getDownloadInfo() { + return this._transport.downloadInfoCapability.promise; + } + + getStats() { + return this._transport.getStats(); + } + + cleanup() { + return this._transport.startCleanup(); + } + + destroy() { + return this.loadingTask.destroy(); + } + + get loadingParams() { + return this._transport.loadingParams; + } + + get loadingTask() { + return this._transport.loadingTask; + } + +} + +exports.PDFDocumentProxy = PDFDocumentProxy; + +class PDFPageProxy { + constructor(pageIndex, pageInfo, transport, pdfBug = false) { + this._pageIndex = pageIndex; + this._pageInfo = pageInfo; + this._transport = transport; + this._stats = pdfBug ? new _display_utils.StatTimer() : null; + this._pdfBug = pdfBug; + this.commonObjs = transport.commonObjs; + this.objs = new PDFObjects(); + this.cleanupAfterRender = false; + this.pendingCleanup = false; + this.intentStates = Object.create(null); + this.destroyed = false; + } + + get pageNumber() { + return this._pageIndex + 1; + } + + get rotate() { + return this._pageInfo.rotate; + } + + get ref() { + return this._pageInfo.ref; + } + + get userUnit() { + return this._pageInfo.userUnit; + } + + get view() { + return this._pageInfo.view; + } + + getViewport({ + scale, + rotation = this.rotate, + offsetX = 0, + offsetY = 0, + dontFlip = false + } = {}) { + return new _display_utils.PageViewport({ + viewBox: this.view, + scale, + rotation, + offsetX, + offsetY, + dontFlip + }); + } + + getAnnotations({ + intent = null + } = {}) { + if (!this.annotationsPromise || this.annotationsIntent !== intent) { + this.annotationsPromise = this._transport.getAnnotations(this._pageIndex, intent); + this.annotationsIntent = intent; + } + + return this.annotationsPromise; + } + + render({ + canvasContext, + viewport, + intent = "display", + enableWebGL = false, + renderInteractiveForms = false, + transform = null, + imageLayer = null, + canvasFactory = null, + background = null + }) { + if (this._stats) { + this._stats.time("Overall"); + } + + const renderingIntent = intent === "print" ? "print" : "display"; + this.pendingCleanup = false; + + if (!this.intentStates[renderingIntent]) { + this.intentStates[renderingIntent] = Object.create(null); + } + + const intentState = this.intentStates[renderingIntent]; + + if (intentState.streamReaderCancelTimeout) { + clearTimeout(intentState.streamReaderCancelTimeout); + intentState.streamReaderCancelTimeout = null; + } + + const canvasFactoryInstance = canvasFactory || new _display_utils.DOMCanvasFactory(); + const webGLContext = new _webgl.WebGLContext({ + enable: enableWebGL + }); + + if (!intentState.displayReadyCapability) { + intentState.displayReadyCapability = (0, _util.createPromiseCapability)(); + intentState.operatorList = { + fnArray: [], + argsArray: [], + lastChunk: false + }; + + if (this._stats) { + this._stats.time("Page Request"); + } + + this._pumpOperatorList({ + pageIndex: this._pageIndex, + intent: renderingIntent, + renderInteractiveForms: renderInteractiveForms === true + }); + } + + const complete = error => { + const i = intentState.renderTasks.indexOf(internalRenderTask); + + if (i >= 0) { + intentState.renderTasks.splice(i, 1); + } + + if (this.cleanupAfterRender || renderingIntent === "print") { + this.pendingCleanup = true; + } + + this._tryCleanup(); + + if (error) { + internalRenderTask.capability.reject(error); + + this._abortOperatorList({ + intentState, + reason: error + }); + } else { + internalRenderTask.capability.resolve(); + } + + if (this._stats) { + this._stats.timeEnd("Rendering"); + + this._stats.timeEnd("Overall"); + } + }; + + const internalRenderTask = new InternalRenderTask({ + callback: complete, + params: { + canvasContext, + viewport, + transform, + imageLayer, + background + }, + objs: this.objs, + commonObjs: this.commonObjs, + operatorList: intentState.operatorList, + pageIndex: this._pageIndex, + canvasFactory: canvasFactoryInstance, + webGLContext, + useRequestAnimationFrame: renderingIntent !== "print", + pdfBug: this._pdfBug + }); + + if (!intentState.renderTasks) { + intentState.renderTasks = []; + } + + intentState.renderTasks.push(internalRenderTask); + const renderTask = internalRenderTask.task; + intentState.displayReadyCapability.promise.then(transparency => { + if (this.pendingCleanup) { + complete(); + return; + } + + if (this._stats) { + this._stats.time("Rendering"); + } + + internalRenderTask.initializeGraphics(transparency); + internalRenderTask.operatorListChanged(); + }).catch(complete); + return renderTask; + } + + getOperatorList() { + function operatorListChanged() { + if (intentState.operatorList.lastChunk) { + intentState.opListReadCapability.resolve(intentState.operatorList); + const i = intentState.renderTasks.indexOf(opListTask); + + if (i >= 0) { + intentState.renderTasks.splice(i, 1); + } + } + } + + const renderingIntent = "oplist"; + + if (!this.intentStates[renderingIntent]) { + this.intentStates[renderingIntent] = Object.create(null); + } + + const intentState = this.intentStates[renderingIntent]; + let opListTask; + + if (!intentState.opListReadCapability) { + opListTask = {}; + opListTask.operatorListChanged = operatorListChanged; + intentState.opListReadCapability = (0, _util.createPromiseCapability)(); + intentState.renderTasks = []; + intentState.renderTasks.push(opListTask); + intentState.operatorList = { + fnArray: [], + argsArray: [], + lastChunk: false + }; + + if (this._stats) { + this._stats.time("Page Request"); + } + + this._pumpOperatorList({ + pageIndex: this._pageIndex, + intent: renderingIntent + }); + } + + return intentState.opListReadCapability.promise; + } + + streamTextContent({ + normalizeWhitespace = false, + disableCombineTextItems = false + } = {}) { + const TEXT_CONTENT_CHUNK_SIZE = 100; + return this._transport.messageHandler.sendWithStream("GetTextContent", { + pageIndex: this._pageIndex, + normalizeWhitespace: normalizeWhitespace === true, + combineTextItems: disableCombineTextItems !== true + }, { + highWaterMark: TEXT_CONTENT_CHUNK_SIZE, + + size(textContent) { + return textContent.items.length; + } + + }); + } + + getTextContent(params = {}) { + const readableStream = this.streamTextContent(params); + return new Promise(function (resolve, reject) { + function pump() { + reader.read().then(function ({ + value, + done + }) { + if (done) { + resolve(textContent); + return; + } + + Object.assign(textContent.styles, value.styles); + textContent.items.push(...value.items); + pump(); + }, reject); + } + + const reader = readableStream.getReader(); + const textContent = { + items: [], + styles: Object.create(null) + }; + pump(); + }); + } + + _destroy() { + this.destroyed = true; + this._transport.pageCache[this._pageIndex] = null; + const waitOn = []; + Object.keys(this.intentStates).forEach(intent => { + const intentState = this.intentStates[intent]; + + this._abortOperatorList({ + intentState, + reason: new Error("Page was destroyed."), + force: true + }); + + if (intent === "oplist") { + return; + } + + intentState.renderTasks.forEach(function (renderTask) { + const renderCompleted = renderTask.capability.promise.catch(function () {}); + waitOn.push(renderCompleted); + renderTask.cancel(); + }); + }); + this.objs.clear(); + this.annotationsPromise = null; + this.pendingCleanup = false; + return Promise.all(waitOn); + } + + cleanup(resetStats = false) { + this.pendingCleanup = true; + return this._tryCleanup(resetStats); + } + + _tryCleanup(resetStats = false) { + if (!this.pendingCleanup || Object.keys(this.intentStates).some(intent => { + const intentState = this.intentStates[intent]; + return intentState.renderTasks.length !== 0 || !intentState.operatorList.lastChunk; + })) { + return false; + } + + Object.keys(this.intentStates).forEach(intent => { + delete this.intentStates[intent]; + }); + this.objs.clear(); + this.annotationsPromise = null; + + if (resetStats && this._stats) { + this._stats = new _display_utils.StatTimer(); + } + + this.pendingCleanup = false; + return true; + } + + _startRenderPage(transparency, intent) { + const intentState = this.intentStates[intent]; + + if (!intentState) { + return; + } + + if (this._stats) { + this._stats.timeEnd("Page Request"); + } + + if (intentState.displayReadyCapability) { + intentState.displayReadyCapability.resolve(transparency); + } + } + + _renderPageChunk(operatorListChunk, intentState) { + for (let i = 0, ii = operatorListChunk.length; i < ii; i++) { + intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]); + intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]); + } + + intentState.operatorList.lastChunk = operatorListChunk.lastChunk; + + for (let i = 0; i < intentState.renderTasks.length; i++) { + intentState.renderTasks[i].operatorListChanged(); + } + + if (operatorListChunk.lastChunk) { + this._tryCleanup(); + } + } + + _pumpOperatorList(args) { + (0, _util.assert)(args.intent, 'PDFPageProxy._pumpOperatorList: Expected "intent" argument.'); + + const readableStream = this._transport.messageHandler.sendWithStream("GetOperatorList", args); + + const reader = readableStream.getReader(); + const intentState = this.intentStates[args.intent]; + intentState.streamReader = reader; + + const pump = () => { + reader.read().then(({ + value, + done + }) => { + if (done) { + intentState.streamReader = null; + return; + } + + if (this._transport.destroyed) { + return; + } + + this._renderPageChunk(value, intentState); + + pump(); + }, reason => { + intentState.streamReader = null; + + if (this._transport.destroyed) { + return; + } + + if (intentState.operatorList) { + intentState.operatorList.lastChunk = true; + + for (let i = 0; i < intentState.renderTasks.length; i++) { + intentState.renderTasks[i].operatorListChanged(); + } + + this._tryCleanup(); + } + + if (intentState.displayReadyCapability) { + intentState.displayReadyCapability.reject(reason); + } else if (intentState.opListReadCapability) { + intentState.opListReadCapability.reject(reason); + } else { + throw reason; + } + }); + }; + + pump(); + } + + _abortOperatorList({ + intentState, + reason, + force = false + }) { + (0, _util.assert)(reason instanceof Error || typeof reason === "object" && reason !== null, 'PDFPageProxy._abortOperatorList: Expected "reason" argument.'); + + if (!intentState.streamReader) { + return; + } + + if (!force) { + if (intentState.renderTasks.length !== 0) { + return; + } + + if (reason instanceof _display_utils.RenderingCancelledException) { + intentState.streamReaderCancelTimeout = setTimeout(() => { + this._abortOperatorList({ + intentState, + reason, + force: true + }); + + intentState.streamReaderCancelTimeout = null; + }, RENDERING_CANCELLED_TIMEOUT); + return; + } + } + + intentState.streamReader.cancel(new _util.AbortException(reason && reason.message)); + intentState.streamReader = null; + + if (this._transport.destroyed) { + return; + } + + Object.keys(this.intentStates).some(intent => { + if (this.intentStates[intent] === intentState) { + delete this.intentStates[intent]; + return true; + } + + return false; + }); + this.cleanup(); + } + + get stats() { + return this._stats; + } + +} + +exports.PDFPageProxy = PDFPageProxy; + +class LoopbackPort { + constructor(defer = true) { + this._listeners = []; + this._defer = defer; + this._deferred = Promise.resolve(undefined); + } + + postMessage(obj, transfers) { + function cloneValue(value) { + if (typeof value !== "object" || value === null) { + return value; + } + + if (cloned.has(value)) { + return cloned.get(value); + } + + let buffer, result; + + if ((buffer = value.buffer) && (0, _util.isArrayBuffer)(buffer)) { + const transferable = transfers && transfers.includes(buffer); + + if (transferable) { + result = new value.constructor(buffer, value.byteOffset, value.byteLength); + } else { + result = new value.constructor(value); + } + + cloned.set(value, result); + return result; + } + + result = Array.isArray(value) ? [] : {}; + cloned.set(value, result); + + for (const i in value) { + let desc, + p = value; + + while (!(desc = Object.getOwnPropertyDescriptor(p, i))) { + p = Object.getPrototypeOf(p); + } + + if (typeof desc.value === "undefined") { + continue; + } + + if (typeof desc.value === "function") { + if (value.hasOwnProperty && value.hasOwnProperty(i)) { + throw new Error(`LoopbackPort.postMessage - cannot clone: ${value[i]}`); + } + + continue; + } + + result[i] = cloneValue(desc.value); + } + + return result; + } + + if (!this._defer) { + this._listeners.forEach(listener => { + listener.call(this, { + data: obj + }); + }); + + return; + } + + const cloned = new WeakMap(); + const e = { + data: cloneValue(obj) + }; + + this._deferred.then(() => { + this._listeners.forEach(listener => { + listener.call(this, e); + }); + }); + } + + addEventListener(name, listener) { + this._listeners.push(listener); + } + + removeEventListener(name, listener) { + const i = this._listeners.indexOf(listener); + + this._listeners.splice(i, 1); + } + + terminate() { + this._listeners.length = 0; + } + +} + +exports.LoopbackPort = LoopbackPort; + +const PDFWorker = function PDFWorkerClosure() { + const pdfWorkerPorts = new WeakMap(); + let isWorkerDisabled = false; + let fallbackWorkerSrc; + let nextFakeWorkerId = 0; + let fakeWorkerCapability; + + if (_is_node.isNodeJS && typeof require === "function") { + isWorkerDisabled = true; + fallbackWorkerSrc = "/plugins/pdfjs/build/pdf.worker.js"; + } else if (typeof document === "object" && "currentScript" in document) { + const pdfjsFilePath = document.currentScript && document.currentScript.src; + + if (pdfjsFilePath) { + fallbackWorkerSrc = pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i, ".worker$1$2"); + } + } + + function getWorkerSrc() { + if (_worker_options.GlobalWorkerOptions.workerSrc) { + return _worker_options.GlobalWorkerOptions.workerSrc; + } + + if (typeof fallbackWorkerSrc !== "undefined") { + if (!_is_node.isNodeJS) { + (0, _display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'); + } + + return fallbackWorkerSrc; + } + + throw new Error('No "GlobalWorkerOptions.workerSrc" specified.'); + } + + function getMainThreadWorkerMessageHandler() { + let mainWorkerMessageHandler; + + try { + mainWorkerMessageHandler = globalThis.pdfjsWorker && globalThis.pdfjsWorker.WorkerMessageHandler; + } catch (ex) {} + + return mainWorkerMessageHandler || null; + } + + function setupFakeWorkerGlobal() { + if (fakeWorkerCapability) { + return fakeWorkerCapability.promise; + } + + fakeWorkerCapability = (0, _util.createPromiseCapability)(); + + const loader = async function () { + const mainWorkerMessageHandler = getMainThreadWorkerMessageHandler(); + + if (mainWorkerMessageHandler) { + return mainWorkerMessageHandler; + } + + if (_is_node.isNodeJS && typeof require === "function") { + const worker = eval("require")(getWorkerSrc()); + return worker.WorkerMessageHandler; + } + + await (0, _display_utils.loadScript)(getWorkerSrc()); + return window.pdfjsWorker.WorkerMessageHandler; + }; + + loader().then(fakeWorkerCapability.resolve, fakeWorkerCapability.reject); + return fakeWorkerCapability.promise; + } + + function createCDNWrapper(url) { + const wrapper = "importScripts('" + url + "');"; + return URL.createObjectURL(new Blob([wrapper])); + } + + class PDFWorker { + constructor({ + name = null, + port = null, + verbosity = (0, _util.getVerbosityLevel)() + } = {}) { + if (port && pdfWorkerPorts.has(port)) { + throw new Error("Cannot use more than one PDFWorker per port"); + } + + this.name = name; + this.destroyed = false; + this.postMessageTransfers = true; + this.verbosity = verbosity; + this._readyCapability = (0, _util.createPromiseCapability)(); + this._port = null; + this._webWorker = null; + this._messageHandler = null; + + if (port) { + pdfWorkerPorts.set(port, this); + + this._initializeFromPort(port); + + return; + } + + this._initialize(); + } + + get promise() { + return this._readyCapability.promise; + } + + get port() { + return this._port; + } + + get messageHandler() { + return this._messageHandler; + } + + _initializeFromPort(port) { + this._port = port; + this._messageHandler = new _message_handler.MessageHandler("main", "worker", port); + + this._messageHandler.on("ready", function () {}); + + this._readyCapability.resolve(); + } + + _initialize() { + if (typeof Worker !== "undefined" && !isWorkerDisabled && !getMainThreadWorkerMessageHandler()) { + let workerSrc = getWorkerSrc(); + + try { + if (!(0, _util.isSameOrigin)(window.location.href, workerSrc)) { + workerSrc = createCDNWrapper(new URL(workerSrc, window.location).href); + } + + const worker = new Worker(workerSrc); + const messageHandler = new _message_handler.MessageHandler("main", "worker", worker); + + const terminateEarly = () => { + worker.removeEventListener("error", onWorkerError); + messageHandler.destroy(); + worker.terminate(); + + if (this.destroyed) { + this._readyCapability.reject(new Error("Worker was destroyed")); + } else { + this._setupFakeWorker(); + } + }; + + const onWorkerError = () => { + if (!this._webWorker) { + terminateEarly(); + } + }; + + worker.addEventListener("error", onWorkerError); + messageHandler.on("test", data => { + worker.removeEventListener("error", onWorkerError); + + if (this.destroyed) { + terminateEarly(); + return; + } + + if (data) { + this._messageHandler = messageHandler; + this._port = worker; + this._webWorker = worker; + + if (!data.supportTransfers) { + this.postMessageTransfers = false; + } + + this._readyCapability.resolve(); + + messageHandler.send("configure", { + verbosity: this.verbosity + }); + } else { + this._setupFakeWorker(); + + messageHandler.destroy(); + worker.terminate(); + } + }); + messageHandler.on("ready", data => { + worker.removeEventListener("error", onWorkerError); + + if (this.destroyed) { + terminateEarly(); + return; + } + + try { + sendTest(); + } catch (e) { + this._setupFakeWorker(); + } + }); + + const sendTest = () => { + const testObj = new Uint8Array([this.postMessageTransfers ? 255 : 0]); + + try { + messageHandler.send("test", testObj, [testObj.buffer]); + } catch (ex) { + (0, _util.warn)("Cannot use postMessage transfers."); + testObj[0] = 0; + messageHandler.send("test", testObj); + } + }; + + sendTest(); + return; + } catch (e) { + (0, _util.info)("The worker has been disabled."); + } + } + + this._setupFakeWorker(); + } + + _setupFakeWorker() { + if (!isWorkerDisabled) { + (0, _util.warn)("Setting up fake worker."); + isWorkerDisabled = true; + } + + setupFakeWorkerGlobal().then(WorkerMessageHandler => { + if (this.destroyed) { + this._readyCapability.reject(new Error("Worker was destroyed")); + + return; + } + + const port = new LoopbackPort(); + this._port = port; + const id = "fake" + nextFakeWorkerId++; + const workerHandler = new _message_handler.MessageHandler(id + "_worker", id, port); + WorkerMessageHandler.setup(workerHandler, port); + const messageHandler = new _message_handler.MessageHandler(id, id + "_worker", port); + this._messageHandler = messageHandler; + + this._readyCapability.resolve(); + + messageHandler.send("configure", { + verbosity: this.verbosity + }); + }).catch(reason => { + this._readyCapability.reject(new Error(`Setting up fake worker failed: "${reason.message}".`)); + }); + } + + destroy() { + this.destroyed = true; + + if (this._webWorker) { + this._webWorker.terminate(); + + this._webWorker = null; + } + + pdfWorkerPorts.delete(this._port); + this._port = null; + + if (this._messageHandler) { + this._messageHandler.destroy(); + + this._messageHandler = null; + } + } + + static fromPort(params) { + if (!params || !params.port) { + throw new Error("PDFWorker.fromPort - invalid method signature."); + } + + if (pdfWorkerPorts.has(params.port)) { + return pdfWorkerPorts.get(params.port); + } + + return new PDFWorker(params); + } + + static getWorkerSrc() { + return getWorkerSrc(); + } + + } + + return PDFWorker; +}(); + +exports.PDFWorker = PDFWorker; + +class WorkerTransport { + constructor(messageHandler, loadingTask, networkStream, params) { + this.messageHandler = messageHandler; + this.loadingTask = loadingTask; + this.commonObjs = new PDFObjects(); + this.fontLoader = new _font_loader.FontLoader({ + docId: loadingTask.docId, + onUnsupportedFeature: this._onUnsupportedFeature.bind(this) + }); + this._params = params; + this.CMapReaderFactory = new params.CMapReaderFactory({ + baseUrl: params.cMapUrl, + isCompressed: true/*params.cMapPacked*/ + }); + this.destroyed = false; + this.destroyCapability = null; + this._passwordCapability = null; + this._networkStream = networkStream; + this._fullReader = null; + this._lastProgress = null; + this.pageCache = []; + this.pagePromises = []; + this.downloadInfoCapability = (0, _util.createPromiseCapability)(); + this.setupMessageHandler(); + } + + destroy() { + if (this.destroyCapability) { + return this.destroyCapability.promise; + } + + this.destroyed = true; + this.destroyCapability = (0, _util.createPromiseCapability)(); + + if (this._passwordCapability) { + this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback")); + } + + const waitOn = []; + this.pageCache.forEach(function (page) { + if (page) { + waitOn.push(page._destroy()); + } + }); + this.pageCache.length = 0; + this.pagePromises.length = 0; + const terminated = this.messageHandler.sendWithPromise("Terminate", null); + waitOn.push(terminated); + Promise.all(waitOn).then(() => { + this.fontLoader.clear(); + + if (this._networkStream) { + this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")); + } + + if (this.messageHandler) { + this.messageHandler.destroy(); + this.messageHandler = null; + } + + this.destroyCapability.resolve(); + }, this.destroyCapability.reject); + return this.destroyCapability.promise; + } + + setupMessageHandler() { + const { + messageHandler, + loadingTask + } = this; + messageHandler.on("GetReader", (data, sink) => { + (0, _util.assert)(this._networkStream, "GetReader - no `IPDFStream` instance available."); + this._fullReader = this._networkStream.getFullReader(); + + this._fullReader.onProgress = evt => { + this._lastProgress = { + loaded: evt.loaded, + total: evt.total + }; + }; + + sink.onPull = () => { + this._fullReader.read().then(function ({ + value, + done + }) { + if (done) { + sink.close(); + return; + } + + (0, _util.assert)((0, _util.isArrayBuffer)(value), "GetReader - expected an ArrayBuffer."); + sink.enqueue(new Uint8Array(value), 1, [value]); + }).catch(reason => { + sink.error(reason); + }); + }; + + sink.onCancel = reason => { + this._fullReader.cancel(reason); + }; + }); + messageHandler.on("ReaderHeadersReady", data => { + const headersCapability = (0, _util.createPromiseCapability)(); + const fullReader = this._fullReader; + fullReader.headersReady.then(() => { + if (!fullReader.isStreamingSupported || !fullReader.isRangeSupported) { + if (this._lastProgress && loadingTask.onProgress) { + loadingTask.onProgress(this._lastProgress); + } + + fullReader.onProgress = evt => { + if (loadingTask.onProgress) { + loadingTask.onProgress({ + loaded: evt.loaded, + total: evt.total + }); + } + }; + } + + headersCapability.resolve({ + isStreamingSupported: fullReader.isStreamingSupported, + isRangeSupported: fullReader.isRangeSupported, + contentLength: fullReader.contentLength + }); + }, headersCapability.reject); + return headersCapability.promise; + }); + messageHandler.on("GetRangeReader", (data, sink) => { + (0, _util.assert)(this._networkStream, "GetRangeReader - no `IPDFStream` instance available."); + + const rangeReader = this._networkStream.getRangeReader(data.begin, data.end); + + if (!rangeReader) { + sink.close(); + return; + } + + sink.onPull = () => { + rangeReader.read().then(function ({ + value, + done + }) { + if (done) { + sink.close(); + return; + } + + (0, _util.assert)((0, _util.isArrayBuffer)(value), "GetRangeReader - expected an ArrayBuffer."); + sink.enqueue(new Uint8Array(value), 1, [value]); + }).catch(reason => { + sink.error(reason); + }); + }; + + sink.onCancel = reason => { + rangeReader.cancel(reason); + }; + }); + messageHandler.on("GetDoc", ({ + pdfInfo + }) => { + this._numPages = pdfInfo.numPages; + + loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo, this)); + }); + messageHandler.on("DocException", function (ex) { + let reason; + + switch (ex.name) { + case "PasswordException": + reason = new _util.PasswordException(ex.message, ex.code); + break; + + case "InvalidPDFException": + reason = new _util.InvalidPDFException(ex.message); + break; + + case "MissingPDFException": + reason = new _util.MissingPDFException(ex.message); + break; + + case "UnexpectedResponseException": + reason = new _util.UnexpectedResponseException(ex.message, ex.status); + break; + + case "UnknownErrorException": + reason = new _util.UnknownErrorException(ex.message, ex.details); + break; + } + + loadingTask._capability.reject(reason); + }); + messageHandler.on("PasswordRequest", exception => { + this._passwordCapability = (0, _util.createPromiseCapability)(); + + if (loadingTask.onPassword) { + const updatePassword = password => { + this._passwordCapability.resolve({ + password + }); + }; + + try { + loadingTask.onPassword(updatePassword, exception.code); + } catch (ex) { + this._passwordCapability.reject(ex); + } + } else { + this._passwordCapability.reject(new _util.PasswordException(exception.message, exception.code)); + } + + return this._passwordCapability.promise; + }); + messageHandler.on("DataLoaded", data => { + if (loadingTask.onProgress) { + loadingTask.onProgress({ + loaded: data.length, + total: data.length + }); + } + + this.downloadInfoCapability.resolve(data); + }); + messageHandler.on("StartRenderPage", data => { + if (this.destroyed) { + return; + } + + const page = this.pageCache[data.pageIndex]; + + page._startRenderPage(data.transparency, data.intent); + }); + messageHandler.on("commonobj", data => { + if (this.destroyed) { + return; + } + + const [id, type, exportedData] = data; + + if (this.commonObjs.has(id)) { + return; + } + + switch (type) { + case "Font": + const params = this._params; + + if ("error" in exportedData) { + const exportedError = exportedData.error; + (0, _util.warn)(`Error during font loading: ${exportedError}`); + this.commonObjs.resolve(id, exportedError); + break; + } + + let fontRegistry = null; + + if (params.pdfBug && globalThis.FontInspector && globalThis.FontInspector.enabled) { + fontRegistry = { + registerFont(font, url) { + globalThis.FontInspector.fontAdded(font, url); + } + + }; + } + + const font = new _font_loader.FontFaceObject(exportedData, { + isEvalSupported: params.isEvalSupported, + disableFontFace: params.disableFontFace, + ignoreErrors: params.ignoreErrors, + onUnsupportedFeature: this._onUnsupportedFeature.bind(this), + fontRegistry + }); + this.fontLoader.bind(font).catch(reason => { + return messageHandler.sendWithPromise("FontFallback", { + id + }); + }).finally(() => { + if (!params.fontExtraProperties && font.data) { + font.data = null; + } + + this.commonObjs.resolve(id, font); + }); + break; + + case "FontPath": + case "FontType3Res": + case "Image": + this.commonObjs.resolve(id, exportedData); + break; + + default: + throw new Error(`Got unknown common object type ${type}`); + } + }); + messageHandler.on("obj", data => { + if (this.destroyed) { + return undefined; + } + + const [id, pageIndex, type, imageData] = data; + const pageProxy = this.pageCache[pageIndex]; + + if (pageProxy.objs.has(id)) { + return undefined; + } + + switch (type) { + case "Image": + pageProxy.objs.resolve(id, imageData); + const MAX_IMAGE_SIZE_TO_STORE = 8000000; + + if (imageData && "data" in imageData && imageData.data.length > MAX_IMAGE_SIZE_TO_STORE) { + pageProxy.cleanupAfterRender = true; + } + + break; + + default: + throw new Error(`Got unknown object type ${type}`); + } + + return undefined; + }); + messageHandler.on("DocProgress", data => { + if (this.destroyed) { + return; + } + + if (loadingTask.onProgress) { + loadingTask.onProgress({ + loaded: data.loaded, + total: data.total + }); + } + }); + messageHandler.on("UnsupportedFeature", this._onUnsupportedFeature.bind(this)); + messageHandler.on("FetchBuiltInCMap", (data, sink) => { + if (this.destroyed) { + sink.error(new Error("Worker was destroyed")); + return; + } + + let fetched = false; + + sink.onPull = () => { + if (fetched) { + sink.close(); + return; + } + + fetched = true; + this.CMapReaderFactory.fetch(data).then(function (builtInCMap) { + sink.enqueue(builtInCMap, 1, [builtInCMap.cMapData.buffer]); + }).catch(function (reason) { + sink.error(reason); + }); + }; + }); + } + + _onUnsupportedFeature({ + featureId + }) { + if (this.destroyed) { + return; + } + + if (this.loadingTask.onUnsupportedFeature) { + this.loadingTask.onUnsupportedFeature(featureId); + } + } + + getData() { + return this.messageHandler.sendWithPromise("GetData", null); + } + + getPage(pageNumber) { + if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this._numPages) { + return Promise.reject(new Error("Invalid page request")); + } + + const pageIndex = pageNumber - 1; + + if (pageIndex in this.pagePromises) { + return this.pagePromises[pageIndex]; + } + + const promise = this.messageHandler.sendWithPromise("GetPage", { + pageIndex + }).then(pageInfo => { + if (this.destroyed) { + throw new Error("Transport destroyed"); + } + + const page = new PDFPageProxy(pageIndex, pageInfo, this, this._params.pdfBug); + this.pageCache[pageIndex] = page; + return page; + }); + this.pagePromises[pageIndex] = promise; + return promise; + } + + getPageIndex(ref) { + return this.messageHandler.sendWithPromise("GetPageIndex", { + ref + }).catch(function (reason) { + return Promise.reject(new Error(reason)); + }); + } + + getAnnotations(pageIndex, intent) { + return this.messageHandler.sendWithPromise("GetAnnotations", { + pageIndex, + intent + }); + } + + getDestinations() { + return this.messageHandler.sendWithPromise("GetDestinations", null); + } + + getDestination(id) { + if (typeof id !== "string") { + return Promise.reject(new Error("Invalid destination request.")); + } + + return this.messageHandler.sendWithPromise("GetDestination", { + id + }); + } + + getPageLabels() { + return this.messageHandler.sendWithPromise("GetPageLabels", null); + } + + getPageLayout() { + return this.messageHandler.sendWithPromise("GetPageLayout", null); + } + + getPageMode() { + return this.messageHandler.sendWithPromise("GetPageMode", null); + } + + getViewerPreferences() { + return this.messageHandler.sendWithPromise("GetViewerPreferences", null); + } + + getOpenAction() { + return this.messageHandler.sendWithPromise("GetOpenAction", null); + } + + getAttachments() { + return this.messageHandler.sendWithPromise("GetAttachments", null); + } + + getJavaScript() { + return this.messageHandler.sendWithPromise("GetJavaScript", null); + } + + getOutline() { + return this.messageHandler.sendWithPromise("GetOutline", null); + } + + getPermissions() { + return this.messageHandler.sendWithPromise("GetPermissions", null); + } + + getMetadata() { + return this.messageHandler.sendWithPromise("GetMetadata", null).then(results => { + return { + info: results[0], + metadata: results[1] ? new _metadata.Metadata(results[1]) : null, + contentDispositionFilename: this._fullReader ? this._fullReader.filename : null + }; + }); + } + + getStats() { + return this.messageHandler.sendWithPromise("GetStats", null); + } + + startCleanup() { + return this.messageHandler.sendWithPromise("Cleanup", null).then(() => { + for (let i = 0, ii = this.pageCache.length; i < ii; i++) { + const page = this.pageCache[i]; + + if (page) { + const cleanupSuccessful = page.cleanup(); + + if (!cleanupSuccessful) { + throw new Error(`startCleanup: Page ${i + 1} is currently rendering.`); + } + } + } + + this.commonObjs.clear(); + this.fontLoader.clear(); + }); + } + + get loadingParams() { + const params = this._params; + return (0, _util.shadow)(this, "loadingParams", { + disableAutoFetch: params.disableAutoFetch, + disableFontFace: params.disableFontFace + }); + } + +} + +class PDFObjects { + constructor() { + this._objs = Object.create(null); + } + + _ensureObj(objId) { + if (this._objs[objId]) { + return this._objs[objId]; + } + + return this._objs[objId] = { + capability: (0, _util.createPromiseCapability)(), + data: null, + resolved: false + }; + } + + get(objId, callback = null) { + if (callback) { + this._ensureObj(objId).capability.promise.then(callback); + + return null; + } + + const obj = this._objs[objId]; + + if (!obj || !obj.resolved) { + throw new Error(`Requesting object that isn't resolved yet ${objId}.`); + } + + return obj.data; + } + + has(objId) { + const obj = this._objs[objId]; + return obj ? obj.resolved : false; + } + + resolve(objId, data) { + const obj = this._ensureObj(objId); + + obj.resolved = true; + obj.data = data; + obj.capability.resolve(data); + } + + clear() { + this._objs = Object.create(null); + } + +} + +class RenderTask { + constructor(internalRenderTask) { + this._internalRenderTask = internalRenderTask; + this.onContinue = null; + } + + get promise() { + return this._internalRenderTask.capability.promise; + } + + cancel() { + this._internalRenderTask.cancel(); + } + +} + +const InternalRenderTask = function InternalRenderTaskClosure() { + const canvasInRendering = new WeakSet(); + + class InternalRenderTask { + constructor({ + callback, + params, + objs, + commonObjs, + operatorList, + pageIndex, + canvasFactory, + webGLContext, + useRequestAnimationFrame = false, + pdfBug = false + }) { + this.callback = callback; + this.params = params; + this.objs = objs; + this.commonObjs = commonObjs; + this.operatorListIdx = null; + this.operatorList = operatorList; + this._pageIndex = pageIndex; + this.canvasFactory = canvasFactory; + this.webGLContext = webGLContext; + this._pdfBug = pdfBug; + this.running = false; + this.graphicsReadyCallback = null; + this.graphicsReady = false; + this._useRequestAnimationFrame = useRequestAnimationFrame === true && typeof window !== "undefined"; + this.cancelled = false; + this.capability = (0, _util.createPromiseCapability)(); + this.task = new RenderTask(this); + this._continueBound = this._continue.bind(this); + this._scheduleNextBound = this._scheduleNext.bind(this); + this._nextBound = this._next.bind(this); + this._canvas = params.canvasContext.canvas; + } + + initializeGraphics(transparency = false) { + if (this.cancelled) { + return; + } + + if (this._canvas) { + if (canvasInRendering.has(this._canvas)) { + throw new Error("Cannot use the same canvas during multiple render() operations. " + "Use different canvas or ensure previous operations were " + "cancelled or completed."); + } + + canvasInRendering.add(this._canvas); + } + + if (this._pdfBug && globalThis.StepperManager && globalThis.StepperManager.enabled) { + this.stepper = globalThis.StepperManager.create(this._pageIndex); + this.stepper.init(this.operatorList); + this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint(); + } + + const { + canvasContext, + viewport, + transform, + imageLayer, + background + } = this.params; + this.gfx = new _canvas.CanvasGraphics(canvasContext, this.commonObjs, this.objs, this.canvasFactory, this.webGLContext, imageLayer); + this.gfx.beginDrawing({ + transform, + viewport, + transparency, + background + }); + this.operatorListIdx = 0; + this.graphicsReady = true; + + if (this.graphicsReadyCallback) { + this.graphicsReadyCallback(); + } + } + + cancel(error = null) { + this.running = false; + this.cancelled = true; + + if (this.gfx) { + this.gfx.endDrawing(); + } + + if (this._canvas) { + canvasInRendering.delete(this._canvas); + } + + this.callback(error || new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex + 1}`, "canvas")); + } + + operatorListChanged() { + if (!this.graphicsReady) { + if (!this.graphicsReadyCallback) { + this.graphicsReadyCallback = this._continueBound; + } + + return; + } + + if (this.stepper) { + this.stepper.updateOperatorList(this.operatorList); + } + + if (this.running) { + return; + } + + this._continue(); + } + + _continue() { + this.running = true; + + if (this.cancelled) { + return; + } + + if (this.task.onContinue) { + this.task.onContinue(this._scheduleNextBound); + } else { + this._scheduleNext(); + } + } + + _scheduleNext() { + if (this._useRequestAnimationFrame) { + window.requestAnimationFrame(() => { + this._nextBound().catch(this.cancel.bind(this)); + }); + } else { + Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this)); + } + } + + async _next() { + if (this.cancelled) { + return; + } + + this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper); + + if (this.operatorListIdx === this.operatorList.argsArray.length) { + this.running = false; + + if (this.operatorList.lastChunk) { + this.gfx.endDrawing(); + + if (this._canvas) { + canvasInRendering.delete(this._canvas); + } + + this.callback(); + } + } + } + + } + + return InternalRenderTask; +}(); + +const version = '2.5.207'; +exports.version = version; +const build = '0974d6052'; +exports.build = build; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.FontLoader = exports.FontFaceObject = void 0; + +var _util = __w_pdfjs_require__(2); + +class BaseFontLoader { + constructor({ + docId, + onUnsupportedFeature + }) { + if (this.constructor === BaseFontLoader) { + (0, _util.unreachable)("Cannot initialize BaseFontLoader."); + } + + this.docId = docId; + this._onUnsupportedFeature = onUnsupportedFeature; + this.nativeFontFaces = []; + this.styleElement = null; + } + + addNativeFontFace(nativeFontFace) { + this.nativeFontFaces.push(nativeFontFace); + document.fonts.add(nativeFontFace); + } + + insertRule(rule) { + let styleElement = this.styleElement; + + if (!styleElement) { + styleElement = this.styleElement = document.createElement("style"); + styleElement.id = `PDFJS_FONT_STYLE_TAG_${this.docId}`; + document.documentElement.getElementsByTagName("head")[0].appendChild(styleElement); + } + + const styleSheet = styleElement.sheet; + styleSheet.insertRule(rule, styleSheet.cssRules.length); + } + + clear() { + this.nativeFontFaces.forEach(function (nativeFontFace) { + document.fonts.delete(nativeFontFace); + }); + this.nativeFontFaces.length = 0; + + if (this.styleElement) { + this.styleElement.remove(); + this.styleElement = null; + } + } + + async bind(font) { + if (font.attached || font.missingFile) { + return; + } + + font.attached = true; + + if (this.isFontLoadingAPISupported) { + const nativeFontFace = font.createNativeFontFace(); + + if (nativeFontFace) { + this.addNativeFontFace(nativeFontFace); + + try { + await nativeFontFace.loaded; + } catch (ex) { + this._onUnsupportedFeature({ + featureId: _util.UNSUPPORTED_FEATURES.errorFontLoadNative + }); + + (0, _util.warn)(`Failed to load font '${nativeFontFace.family}': '${ex}'.`); + font.disableFontFace = true; + throw ex; + } + } + + return; + } + + const rule = font.createFontFaceRule(); + + if (rule) { + this.insertRule(rule); + + if (this.isSyncFontLoadingSupported) { + return; + } + + await new Promise(resolve => { + const request = this._queueLoadingCallback(resolve); + + this._prepareFontLoadEvent([rule], [font], request); + }); + } + } + + _queueLoadingCallback(callback) { + (0, _util.unreachable)("Abstract method `_queueLoadingCallback`."); + } + + get isFontLoadingAPISupported() { + const supported = typeof document !== "undefined" && !!document.fonts; + return (0, _util.shadow)(this, "isFontLoadingAPISupported", supported); + } + + get isSyncFontLoadingSupported() { + (0, _util.unreachable)("Abstract method `isSyncFontLoadingSupported`."); + } + + get _loadTestFont() { + (0, _util.unreachable)("Abstract method `_loadTestFont`."); + } + + _prepareFontLoadEvent(rules, fontsToLoad, request) { + (0, _util.unreachable)("Abstract method `_prepareFontLoadEvent`."); + } + +} + +let FontLoader; +exports.FontLoader = FontLoader; +{ + exports.FontLoader = FontLoader = class GenericFontLoader extends BaseFontLoader { + constructor(docId) { + super(docId); + this.loadingContext = { + requests: [], + nextRequestId: 0 + }; + this.loadTestFontId = 0; + } + + get isSyncFontLoadingSupported() { + let supported = false; + + if (typeof navigator === "undefined") { + supported = true; + } else { + const m = /Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent); + + if (m && m[1] >= 14) { + supported = true; + } + } + + return (0, _util.shadow)(this, "isSyncFontLoadingSupported", supported); + } + + _queueLoadingCallback(callback) { + function completeRequest() { + (0, _util.assert)(!request.done, "completeRequest() cannot be called twice."); + request.done = true; + + while (context.requests.length > 0 && context.requests[0].done) { + const otherRequest = context.requests.shift(); + setTimeout(otherRequest.callback, 0); + } + } + + const context = this.loadingContext; + const request = { + id: `pdfjs-font-loading-${context.nextRequestId++}`, + done: false, + complete: completeRequest, + callback + }; + context.requests.push(request); + return request; + } + + get _loadTestFont() { + const getLoadTestFont = function () { + return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQA" + "FQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAA" + "ALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgA" + "AAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1" + "AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD" + "6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACM" + "AooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4D" + "IP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAA" + "AAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUA" + "AQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgAB" + "AAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABY" + "AAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAA" + "AC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAA" + "AAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQAC" + "AQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3" + "Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTj" + "FQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="); + }; + + return (0, _util.shadow)(this, "_loadTestFont", getLoadTestFont()); + } + + _prepareFontLoadEvent(rules, fonts, request) { + function int32(data, offset) { + return data.charCodeAt(offset) << 24 | data.charCodeAt(offset + 1) << 16 | data.charCodeAt(offset + 2) << 8 | data.charCodeAt(offset + 3) & 0xff; + } + + function spliceString(s, offset, remove, insert) { + const chunk1 = s.substring(0, offset); + const chunk2 = s.substring(offset + remove); + return chunk1 + insert + chunk2; + } + + let i, ii; + const canvas = document.createElement("canvas"); + canvas.width = 1; + canvas.height = 1; + const ctx = canvas.getContext("2d"); + let called = 0; + + function isFontReady(name, callback) { + called++; + + if (called > 30) { + (0, _util.warn)("Load test font never loaded."); + callback(); + return; + } + + ctx.font = "30px " + name; + ctx.fillText(".", 0, 20); + const imageData = ctx.getImageData(0, 0, 1, 1); + + if (imageData.data[3] > 0) { + callback(); + return; + } + + setTimeout(isFontReady.bind(null, name, callback)); + } + + const loadTestFontId = `lt${Date.now()}${this.loadTestFontId++}`; + let data = this._loadTestFont; + const COMMENT_OFFSET = 976; + data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length, loadTestFontId); + const CFF_CHECKSUM_OFFSET = 16; + const XXXX_VALUE = 0x58585858; + let checksum = int32(data, CFF_CHECKSUM_OFFSET); + + for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) { + checksum = checksum - XXXX_VALUE + int32(loadTestFontId, i) | 0; + } + + if (i < loadTestFontId.length) { + checksum = checksum - XXXX_VALUE + int32(loadTestFontId + "XXX", i) | 0; + } + + data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, (0, _util.string32)(checksum)); + const url = `url(data:font/opentype;base64,${btoa(data)});`; + const rule = `@font-face {font-family:"${loadTestFontId}";src:${url}}`; + this.insertRule(rule); + const names = []; + + for (i = 0, ii = fonts.length; i < ii; i++) { + names.push(fonts[i].loadedName); + } + + names.push(loadTestFontId); + const div = document.createElement("div"); + div.style.visibility = "hidden"; + div.style.width = div.style.height = "10px"; + div.style.position = "absolute"; + div.style.top = div.style.left = "0px"; + + for (i = 0, ii = names.length; i < ii; ++i) { + const span = document.createElement("span"); + span.textContent = "Hi"; + span.style.fontFamily = names[i]; + div.appendChild(span); + } + + document.body.appendChild(div); + isFontReady(loadTestFontId, function () { + document.body.removeChild(div); + request.complete(); + }); + } + + }; +} + +class FontFaceObject { + constructor(translatedData, { + isEvalSupported = true, + disableFontFace = false, + ignoreErrors = false, + onUnsupportedFeature = null, + fontRegistry = null + }) { + this.compiledGlyphs = Object.create(null); + + for (const i in translatedData) { + this[i] = translatedData[i]; + } + + this.isEvalSupported = isEvalSupported !== false; + this.disableFontFace = disableFontFace === true; + this.ignoreErrors = ignoreErrors === true; + this._onUnsupportedFeature = onUnsupportedFeature; + this.fontRegistry = fontRegistry; + } + + createNativeFontFace() { + if (!this.data || this.disableFontFace) { + return null; + } + + const nativeFontFace = new FontFace(this.loadedName, this.data, {}); + + if (this.fontRegistry) { + this.fontRegistry.registerFont(this); + } + + return nativeFontFace; + } + + createFontFaceRule() { + if (!this.data || this.disableFontFace) { + return null; + } + + const data = (0, _util.bytesToString)(new Uint8Array(this.data)); + const url = `url(data:${this.mimetype};base64,${btoa(data)});`; + const rule = `@font-face {font-family:"${this.loadedName}";src:${url}}`; + + if (this.fontRegistry) { + this.fontRegistry.registerFont(this, url); + } + + return rule; + } + + getPathGenerator(objs, character) { + if (this.compiledGlyphs[character] !== undefined) { + return this.compiledGlyphs[character]; + } + + let cmds, current; + + try { + cmds = objs.get(this.loadedName + "_path_" + character); + } catch (ex) { + if (!this.ignoreErrors) { + throw ex; + } + + if (this._onUnsupportedFeature) { + this._onUnsupportedFeature({ + featureId: _util.UNSUPPORTED_FEATURES.errorFontGetPath + }); + } + + (0, _util.warn)(`getPathGenerator - ignoring character: "${ex}".`); + return this.compiledGlyphs[character] = function (c, size) {}; + } + + if (this.isEvalSupported && _util.IsEvalSupportedCached.value) { + let args, + js = ""; + + for (let i = 0, ii = cmds.length; i < ii; i++) { + current = cmds[i]; + + if (current.args !== undefined) { + args = current.args.join(","); + } else { + args = ""; + } + + js += "c." + current.cmd + "(" + args + ");\n"; + } + + return this.compiledGlyphs[character] = new Function("c", "size", js); + } + + return this.compiledGlyphs[character] = function (c, size) { + for (let i = 0, ii = cmds.length; i < ii; i++) { + current = cmds[i]; + + if (current.cmd === "scale") { + current.args = [size, -size]; + } + + c[current.cmd].apply(c, current.args); + } + }; + } + +} + +exports.FontFaceObject = FontFaceObject; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.apiCompatibilityParams = void 0; + +var _is_node = __w_pdfjs_require__(4); + +const compatibilityParams = Object.create(null); +{ + (function checkFontFace() { + if (_is_node.isNodeJS) { + compatibilityParams.disableFontFace = true; + } + })(); +} +const apiCompatibilityParams = Object.freeze(compatibilityParams); +exports.apiCompatibilityParams = apiCompatibilityParams; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CanvasGraphics = void 0; + +var _util = __w_pdfjs_require__(2); + +var _pattern_helper = __w_pdfjs_require__(9); + +var MIN_FONT_SIZE = 16; +var MAX_FONT_SIZE = 100; +var MAX_GROUP_SIZE = 4096; +var MIN_WIDTH_FACTOR = 0.65; +var COMPILE_TYPE3_GLYPHS = true; +var MAX_SIZE_TO_COMPILE = 1000; +var FULL_CHUNK_HEIGHT = 16; + +function addContextCurrentTransform(ctx) { + if (!ctx.mozCurrentTransform) { + ctx._originalSave = ctx.save; + ctx._originalRestore = ctx.restore; + ctx._originalRotate = ctx.rotate; + ctx._originalScale = ctx.scale; + ctx._originalTranslate = ctx.translate; + ctx._originalTransform = ctx.transform; + ctx._originalSetTransform = ctx.setTransform; + ctx._transformMatrix = ctx._transformMatrix || [1, 0, 0, 1, 0, 0]; + ctx._transformStack = []; + Object.defineProperty(ctx, "mozCurrentTransform", { + get: function getCurrentTransform() { + return this._transformMatrix; + } + }); + Object.defineProperty(ctx, "mozCurrentTransformInverse", { + get: function getCurrentTransformInverse() { + var m = this._transformMatrix; + var a = m[0], + b = m[1], + c = m[2], + d = m[3], + e = m[4], + f = m[5]; + var ad_bc = a * d - b * c; + var bc_ad = b * c - a * d; + return [d / ad_bc, b / bc_ad, c / bc_ad, a / ad_bc, (d * e - c * f) / bc_ad, (b * e - a * f) / ad_bc]; + } + }); + + ctx.save = function ctxSave() { + var old = this._transformMatrix; + + this._transformStack.push(old); + + this._transformMatrix = old.slice(0, 6); + + this._originalSave(); + }; + + ctx.restore = function ctxRestore() { + var prev = this._transformStack.pop(); + + if (prev) { + this._transformMatrix = prev; + + this._originalRestore(); + } + }; + + ctx.translate = function ctxTranslate(x, y) { + var m = this._transformMatrix; + m[4] = m[0] * x + m[2] * y + m[4]; + m[5] = m[1] * x + m[3] * y + m[5]; + + this._originalTranslate(x, y); + }; + + ctx.scale = function ctxScale(x, y) { + var m = this._transformMatrix; + m[0] = m[0] * x; + m[1] = m[1] * x; + m[2] = m[2] * y; + m[3] = m[3] * y; + + this._originalScale(x, y); + }; + + ctx.transform = function ctxTransform(a, b, c, d, e, f) { + var m = this._transformMatrix; + this._transformMatrix = [m[0] * a + m[2] * b, m[1] * a + m[3] * b, m[0] * c + m[2] * d, m[1] * c + m[3] * d, m[0] * e + m[2] * f + m[4], m[1] * e + m[3] * f + m[5]]; + + ctx._originalTransform(a, b, c, d, e, f); + }; + + ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) { + this._transformMatrix = [a, b, c, d, e, f]; + + ctx._originalSetTransform(a, b, c, d, e, f); + }; + + ctx.rotate = function ctxRotate(angle) { + var cosValue = Math.cos(angle); + var sinValue = Math.sin(angle); + var m = this._transformMatrix; + this._transformMatrix = [m[0] * cosValue + m[2] * sinValue, m[1] * cosValue + m[3] * sinValue, m[0] * -sinValue + m[2] * cosValue, m[1] * -sinValue + m[3] * cosValue, m[4], m[5]]; + + this._originalRotate(angle); + }; + } +} + +var CachedCanvases = function CachedCanvasesClosure() { + function CachedCanvases(canvasFactory) { + this.canvasFactory = canvasFactory; + this.cache = Object.create(null); + } + + CachedCanvases.prototype = { + getCanvas: function CachedCanvases_getCanvas(id, width, height, trackTransform) { + var canvasEntry; + + if (this.cache[id] !== undefined) { + canvasEntry = this.cache[id]; + this.canvasFactory.reset(canvasEntry, width, height); + canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0); + } else { + canvasEntry = this.canvasFactory.create(width, height); + this.cache[id] = canvasEntry; + } + + if (trackTransform) { + addContextCurrentTransform(canvasEntry.context); + } + + return canvasEntry; + }, + + clear() { + for (var id in this.cache) { + var canvasEntry = this.cache[id]; + this.canvasFactory.destroy(canvasEntry); + delete this.cache[id]; + } + } + + }; + return CachedCanvases; +}(); + +function compileType3Glyph(imgData) { + var POINT_TO_PROCESS_LIMIT = 1000; + var width = imgData.width, + height = imgData.height; + var i, + j, + j0, + width1 = width + 1; + var points = new Uint8Array(width1 * (height + 1)); + var POINT_TYPES = new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]); + var lineSize = width + 7 & ~7, + data0 = imgData.data; + var data = new Uint8Array(lineSize * height), + pos = 0, + ii; + + for (i = 0, ii = data0.length; i < ii; i++) { + var mask = 128, + elem = data0[i]; + + while (mask > 0) { + data[pos++] = elem & mask ? 0 : 255; + mask >>= 1; + } + } + + var count = 0; + pos = 0; + + if (data[pos] !== 0) { + points[0] = 1; + ++count; + } + + for (j = 1; j < width; j++) { + if (data[pos] !== data[pos + 1]) { + points[j] = data[pos] ? 2 : 1; + ++count; + } + + pos++; + } + + if (data[pos] !== 0) { + points[j] = 2; + ++count; + } + + for (i = 1; i < height; i++) { + pos = i * lineSize; + j0 = i * width1; + + if (data[pos - lineSize] !== data[pos]) { + points[j0] = data[pos] ? 1 : 8; + ++count; + } + + var sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0); + + for (j = 1; j < width; j++) { + sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) + (data[pos - lineSize + 1] ? 8 : 0); + + if (POINT_TYPES[sum]) { + points[j0 + j] = POINT_TYPES[sum]; + ++count; + } + + pos++; + } + + if (data[pos - lineSize] !== data[pos]) { + points[j0 + j] = data[pos] ? 2 : 4; + ++count; + } + + if (count > POINT_TO_PROCESS_LIMIT) { + return null; + } + } + + pos = lineSize * (height - 1); + j0 = i * width1; + + if (data[pos] !== 0) { + points[j0] = 8; + ++count; + } + + for (j = 1; j < width; j++) { + if (data[pos] !== data[pos + 1]) { + points[j0 + j] = data[pos] ? 4 : 8; + ++count; + } + + pos++; + } + + if (data[pos] !== 0) { + points[j0 + j] = 4; + ++count; + } + + if (count > POINT_TO_PROCESS_LIMIT) { + return null; + } + + var steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]); + var outlines = []; + + for (i = 0; count && i <= height; i++) { + var p = i * width1; + var end = p + width; + + while (p < end && !points[p]) { + p++; + } + + if (p === end) { + continue; + } + + var coords = [p % width1, i]; + var type = points[p], + p0 = p, + pp; + + do { + var step = steps[type]; + + do { + p += step; + } while (!points[p]); + + pp = points[p]; + + if (pp !== 5 && pp !== 10) { + type = pp; + points[p] = 0; + } else { + type = pp & 0x33 * type >> 4; + points[p] &= type >> 2 | type << 2; + } + + coords.push(p % width1); + coords.push(p / width1 | 0); + + if (!points[p]) { + --count; + } + } while (p0 !== p); + + outlines.push(coords); + --i; + } + + var drawOutline = function (c) { + c.save(); + c.scale(1 / width, -1 / height); + c.translate(0, -height); + c.beginPath(); + + for (let k = 0, kk = outlines.length; k < kk; k++) { + var o = outlines[k]; + c.moveTo(o[0], o[1]); + + for (let l = 2, ll = o.length; l < ll; l += 2) { + c.lineTo(o[l], o[l + 1]); + } + } + + c.fill(); + c.beginPath(); + c.restore(); + }; + + return drawOutline; +} + +var CanvasExtraState = function CanvasExtraStateClosure() { + function CanvasExtraState() { + this.alphaIsShape = false; + this.fontSize = 0; + this.fontSizeScale = 1; + this.textMatrix = _util.IDENTITY_MATRIX; + this.textMatrixScale = 1; + this.fontMatrix = _util.FONT_IDENTITY_MATRIX; + this.leading = 0; + this.x = 0; + this.y = 0; + this.lineX = 0; + this.lineY = 0; + this.charSpacing = 0; + this.wordSpacing = 0; + this.textHScale = 1; + this.textRenderingMode = _util.TextRenderingMode.FILL; + this.textRise = 0; + this.fillColor = "#000000"; + this.strokeColor = "#000000"; + this.patternFill = false; + this.fillAlpha = 1; + this.strokeAlpha = 1; + this.lineWidth = 1; + this.activeSMask = null; + this.resumeSMaskCtx = null; + } + + CanvasExtraState.prototype = { + clone: function CanvasExtraState_clone() { + return Object.create(this); + }, + setCurrentPoint: function CanvasExtraState_setCurrentPoint(x, y) { + this.x = x; + this.y = y; + } + }; + return CanvasExtraState; +}(); + +var CanvasGraphics = function CanvasGraphicsClosure() { + var EXECUTION_TIME = 15; + var EXECUTION_STEPS = 10; + + function CanvasGraphics(canvasCtx, commonObjs, objs, canvasFactory, webGLContext, imageLayer) { + this.ctx = canvasCtx; + this.current = new CanvasExtraState(); + this.stateStack = []; + this.pendingClip = null; + this.pendingEOFill = false; + this.res = null; + this.xobjs = null; + this.commonObjs = commonObjs; + this.objs = objs; + this.canvasFactory = canvasFactory; + this.webGLContext = webGLContext; + this.imageLayer = imageLayer; + this.groupStack = []; + this.processingType3 = null; + this.baseTransform = null; + this.baseTransformStack = []; + this.groupLevel = 0; + this.smaskStack = []; + this.smaskCounter = 0; + this.tempSMask = null; + this.cachedCanvases = new CachedCanvases(this.canvasFactory); + + if (canvasCtx) { + addContextCurrentTransform(canvasCtx); + } + + this._cachedGetSinglePixelWidth = null; + } + + function putBinaryImageData(ctx, imgData) { + if (typeof ImageData !== "undefined" && imgData instanceof ImageData) { + ctx.putImageData(imgData, 0, 0); + return; + } + + var height = imgData.height, + width = imgData.width; + var partialChunkHeight = height % FULL_CHUNK_HEIGHT; + var fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT; + var totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1; + var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT); + var srcPos = 0, + destPos; + var src = imgData.data; + var dest = chunkImgData.data; + var i, j, thisChunkHeight, elemsInThisChunk; + + if (imgData.kind === _util.ImageKind.GRAYSCALE_1BPP) { + var srcLength = src.byteLength; + var dest32 = new Uint32Array(dest.buffer, 0, dest.byteLength >> 2); + var dest32DataLength = dest32.length; + var fullSrcDiff = width + 7 >> 3; + var white = 0xffffffff; + var black = _util.IsLittleEndianCached.value ? 0xff000000 : 0x000000ff; + + for (i = 0; i < totalChunks; i++) { + thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight; + destPos = 0; + + for (j = 0; j < thisChunkHeight; j++) { + var srcDiff = srcLength - srcPos; + var k = 0; + var kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7; + var kEndUnrolled = kEnd & ~7; + var mask = 0; + var srcByte = 0; + + for (; k < kEndUnrolled; k += 8) { + srcByte = src[srcPos++]; + dest32[destPos++] = srcByte & 128 ? white : black; + dest32[destPos++] = srcByte & 64 ? white : black; + dest32[destPos++] = srcByte & 32 ? white : black; + dest32[destPos++] = srcByte & 16 ? white : black; + dest32[destPos++] = srcByte & 8 ? white : black; + dest32[destPos++] = srcByte & 4 ? white : black; + dest32[destPos++] = srcByte & 2 ? white : black; + dest32[destPos++] = srcByte & 1 ? white : black; + } + + for (; k < kEnd; k++) { + if (mask === 0) { + srcByte = src[srcPos++]; + mask = 128; + } + + dest32[destPos++] = srcByte & mask ? white : black; + mask >>= 1; + } + } + + while (destPos < dest32DataLength) { + dest32[destPos++] = 0; + } + + ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT); + } + } else if (imgData.kind === _util.ImageKind.RGBA_32BPP) { + j = 0; + elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4; + + for (i = 0; i < fullChunks; i++) { + dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk)); + srcPos += elemsInThisChunk; + ctx.putImageData(chunkImgData, 0, j); + j += FULL_CHUNK_HEIGHT; + } + + if (i < totalChunks) { + elemsInThisChunk = width * partialChunkHeight * 4; + dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk)); + ctx.putImageData(chunkImgData, 0, j); + } + } else if (imgData.kind === _util.ImageKind.RGB_24BPP) { + thisChunkHeight = FULL_CHUNK_HEIGHT; + elemsInThisChunk = width * thisChunkHeight; + + for (i = 0; i < totalChunks; i++) { + if (i >= fullChunks) { + thisChunkHeight = partialChunkHeight; + elemsInThisChunk = width * thisChunkHeight; + } + + destPos = 0; + + for (j = elemsInThisChunk; j--;) { + dest[destPos++] = src[srcPos++]; + dest[destPos++] = src[srcPos++]; + dest[destPos++] = src[srcPos++]; + dest[destPos++] = 255; + } + + ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT); + } + } else { + throw new Error(`bad image kind: ${imgData.kind}`); + } + } + + function putBinaryImageMask(ctx, imgData) { + var height = imgData.height, + width = imgData.width; + var partialChunkHeight = height % FULL_CHUNK_HEIGHT; + var fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT; + var totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1; + var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT); + var srcPos = 0; + var src = imgData.data; + var dest = chunkImgData.data; + + for (var i = 0; i < totalChunks; i++) { + var thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight; + var destPos = 3; + + for (var j = 0; j < thisChunkHeight; j++) { + var mask = 0; + + for (var k = 0; k < width; k++) { + if (!mask) { + var elem = src[srcPos++]; + mask = 128; + } + + dest[destPos] = elem & mask ? 0 : 255; + destPos += 4; + mask >>= 1; + } + } + + ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT); + } + } + + function copyCtxState(sourceCtx, destCtx) { + var properties = ["strokeStyle", "fillStyle", "fillRule", "globalAlpha", "lineWidth", "lineCap", "lineJoin", "miterLimit", "globalCompositeOperation", "font"]; + + for (var i = 0, ii = properties.length; i < ii; i++) { + var property = properties[i]; + + if (sourceCtx[property] !== undefined) { + destCtx[property] = sourceCtx[property]; + } + } + + if (sourceCtx.setLineDash !== undefined) { + destCtx.setLineDash(sourceCtx.getLineDash()); + destCtx.lineDashOffset = sourceCtx.lineDashOffset; + } + } + + function resetCtxToDefault(ctx) { + ctx.strokeStyle = "#000000"; + ctx.fillStyle = "#000000"; + ctx.fillRule = "nonzero"; + ctx.globalAlpha = 1; + ctx.lineWidth = 1; + ctx.lineCap = "butt"; + ctx.lineJoin = "miter"; + ctx.miterLimit = 10; + ctx.globalCompositeOperation = "source-over"; + ctx.font = "10px sans-serif"; + + if (ctx.setLineDash !== undefined) { + ctx.setLineDash([]); + ctx.lineDashOffset = 0; + } + } + + function composeSMaskBackdrop(bytes, r0, g0, b0) { + var length = bytes.length; + + for (var i = 3; i < length; i += 4) { + var alpha = bytes[i]; + + if (alpha === 0) { + bytes[i - 3] = r0; + bytes[i - 2] = g0; + bytes[i - 1] = b0; + } else if (alpha < 255) { + var alpha_ = 255 - alpha; + bytes[i - 3] = bytes[i - 3] * alpha + r0 * alpha_ >> 8; + bytes[i - 2] = bytes[i - 2] * alpha + g0 * alpha_ >> 8; + bytes[i - 1] = bytes[i - 1] * alpha + b0 * alpha_ >> 8; + } + } + } + + function composeSMaskAlpha(maskData, layerData, transferMap) { + var length = maskData.length; + var scale = 1 / 255; + + for (var i = 3; i < length; i += 4) { + var alpha = transferMap ? transferMap[maskData[i]] : maskData[i]; + layerData[i] = layerData[i] * alpha * scale | 0; + } + } + + function composeSMaskLuminosity(maskData, layerData, transferMap) { + var length = maskData.length; + + for (var i = 3; i < length; i += 4) { + var y = maskData[i - 3] * 77 + maskData[i - 2] * 152 + maskData[i - 1] * 28; + layerData[i] = transferMap ? layerData[i] * transferMap[y >> 8] >> 8 : layerData[i] * y >> 16; + } + } + + function genericComposeSMask(maskCtx, layerCtx, width, height, subtype, backdrop, transferMap) { + var hasBackdrop = !!backdrop; + var r0 = hasBackdrop ? backdrop[0] : 0; + var g0 = hasBackdrop ? backdrop[1] : 0; + var b0 = hasBackdrop ? backdrop[2] : 0; + var composeFn; + + if (subtype === "Luminosity") { + composeFn = composeSMaskLuminosity; + } else { + composeFn = composeSMaskAlpha; + } + + var PIXELS_TO_PROCESS = 1048576; + var chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width)); + + for (var row = 0; row < height; row += chunkSize) { + var chunkHeight = Math.min(chunkSize, height - row); + var maskData = maskCtx.getImageData(0, row, width, chunkHeight); + var layerData = layerCtx.getImageData(0, row, width, chunkHeight); + + if (hasBackdrop) { + composeSMaskBackdrop(maskData.data, r0, g0, b0); + } + + composeFn(maskData.data, layerData.data, transferMap); + maskCtx.putImageData(layerData, 0, row); + } + } + + function composeSMask(ctx, smask, layerCtx, webGLContext) { + var mask = smask.canvas; + var maskCtx = smask.context; + ctx.setTransform(smask.scaleX, 0, 0, smask.scaleY, smask.offsetX, smask.offsetY); + var backdrop = smask.backdrop || null; + + if (!smask.transferMap && webGLContext.isEnabled) { + const composed = webGLContext.composeSMask({ + layer: layerCtx.canvas, + mask, + properties: { + subtype: smask.subtype, + backdrop + } + }); + ctx.setTransform(1, 0, 0, 1, 0, 0); + ctx.drawImage(composed, smask.offsetX, smask.offsetY); + return; + } + + genericComposeSMask(maskCtx, layerCtx, mask.width, mask.height, smask.subtype, backdrop, smask.transferMap); + ctx.drawImage(mask, 0, 0); + } + + var LINE_CAP_STYLES = ["butt", "round", "square"]; + var LINE_JOIN_STYLES = ["miter", "round", "bevel"]; + var NORMAL_CLIP = {}; + var EO_CLIP = {}; + CanvasGraphics.prototype = { + beginDrawing({ + transform, + viewport, + transparency = false, + background = null + }) { + var width = this.ctx.canvas.width; + var height = this.ctx.canvas.height; + this.ctx.save(); + this.ctx.fillStyle = background || "rgb(255, 255, 255)"; + this.ctx.fillRect(0, 0, width, height); + this.ctx.restore(); + + if (transparency) { + var transparentCanvas = this.cachedCanvases.getCanvas("transparent", width, height, true); + this.compositeCtx = this.ctx; + this.transparentCanvas = transparentCanvas.canvas; + this.ctx = transparentCanvas.context; + this.ctx.save(); + this.ctx.transform.apply(this.ctx, this.compositeCtx.mozCurrentTransform); + } + + this.ctx.save(); + resetCtxToDefault(this.ctx); + + if (transform) { + this.ctx.transform.apply(this.ctx, transform); + } + + this.ctx.transform.apply(this.ctx, viewport.transform); + this.baseTransform = this.ctx.mozCurrentTransform.slice(); + + if (this.imageLayer) { + this.imageLayer.beginLayout(); + } + }, + + executeOperatorList: function CanvasGraphics_executeOperatorList(operatorList, executionStartIdx, continueCallback, stepper) { + var argsArray = operatorList.argsArray; + var fnArray = operatorList.fnArray; + var i = executionStartIdx || 0; + var argsArrayLen = argsArray.length; + + if (argsArrayLen === i) { + return i; + } + + var chunkOperations = argsArrayLen - i > EXECUTION_STEPS && typeof continueCallback === "function"; + var endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0; + var steps = 0; + var commonObjs = this.commonObjs; + var objs = this.objs; + var fnId; + + while (true) { + if (stepper !== undefined && i === stepper.nextBreakPoint) { + stepper.breakIt(i, continueCallback); + return i; + } + + fnId = fnArray[i]; + + if (fnId !== _util.OPS.dependency) { + this[fnId].apply(this, argsArray[i]); + } else { + for (const depObjId of argsArray[i]) { + const objsPool = depObjId.startsWith("g_") ? commonObjs : objs; + + if (!objsPool.has(depObjId)) { + objsPool.get(depObjId, continueCallback); + return i; + } + } + } + + i++; + + if (i === argsArrayLen) { + return i; + } + + if (chunkOperations && ++steps > EXECUTION_STEPS) { + if (Date.now() > endTime) { + continueCallback(); + return i; + } + + steps = 0; + } + } + }, + endDrawing: function CanvasGraphics_endDrawing() { + if (this.current.activeSMask !== null) { + this.endSMaskGroup(); + } + + this.ctx.restore(); + + if (this.transparentCanvas) { + this.ctx = this.compositeCtx; + this.ctx.save(); + this.ctx.setTransform(1, 0, 0, 1, 0, 0); + this.ctx.drawImage(this.transparentCanvas, 0, 0); + this.ctx.restore(); + this.transparentCanvas = null; + } + + this.cachedCanvases.clear(); + this.webGLContext.clear(); + + if (this.imageLayer) { + this.imageLayer.endLayout(); + } + }, + setLineWidth: function CanvasGraphics_setLineWidth(width) { + this.current.lineWidth = width; + this.ctx.lineWidth = width; + }, + setLineCap: function CanvasGraphics_setLineCap(style) { + this.ctx.lineCap = LINE_CAP_STYLES[style]; + }, + setLineJoin: function CanvasGraphics_setLineJoin(style) { + this.ctx.lineJoin = LINE_JOIN_STYLES[style]; + }, + setMiterLimit: function CanvasGraphics_setMiterLimit(limit) { + this.ctx.miterLimit = limit; + }, + setDash: function CanvasGraphics_setDash(dashArray, dashPhase) { + var ctx = this.ctx; + + if (ctx.setLineDash !== undefined) { + ctx.setLineDash(dashArray); + ctx.lineDashOffset = dashPhase; + } + }, + + setRenderingIntent(intent) {}, + + setFlatness(flatness) {}, + + setGState: function CanvasGraphics_setGState(states) { + for (var i = 0, ii = states.length; i < ii; i++) { + var state = states[i]; + var key = state[0]; + var value = state[1]; + + switch (key) { + case "LW": + this.setLineWidth(value); + break; + + case "LC": + this.setLineCap(value); + break; + + case "LJ": + this.setLineJoin(value); + break; + + case "ML": + this.setMiterLimit(value); + break; + + case "D": + this.setDash(value[0], value[1]); + break; + + case "RI": + this.setRenderingIntent(value); + break; + + case "FL": + this.setFlatness(value); + break; + + case "Font": + this.setFont(value[0], value[1]); + break; + + case "CA": + this.current.strokeAlpha = state[1]; + break; + + case "ca": + this.current.fillAlpha = state[1]; + this.ctx.globalAlpha = state[1]; + break; + + case "BM": + this.ctx.globalCompositeOperation = value; + break; + + case "SMask": + if (this.current.activeSMask) { + if (this.stateStack.length > 0 && this.stateStack[this.stateStack.length - 1].activeSMask === this.current.activeSMask) { + this.suspendSMaskGroup(); + } else { + this.endSMaskGroup(); + } + } + + this.current.activeSMask = value ? this.tempSMask : null; + + if (this.current.activeSMask) { + this.beginSMaskGroup(); + } + + this.tempSMask = null; + break; + } + } + }, + beginSMaskGroup: function CanvasGraphics_beginSMaskGroup() { + var activeSMask = this.current.activeSMask; + var drawnWidth = activeSMask.canvas.width; + var drawnHeight = activeSMask.canvas.height; + var cacheId = "smaskGroupAt" + this.groupLevel; + var scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight, true); + var currentCtx = this.ctx; + var currentTransform = currentCtx.mozCurrentTransform; + this.ctx.save(); + var groupCtx = scratchCanvas.context; + groupCtx.scale(1 / activeSMask.scaleX, 1 / activeSMask.scaleY); + groupCtx.translate(-activeSMask.offsetX, -activeSMask.offsetY); + groupCtx.transform.apply(groupCtx, currentTransform); + activeSMask.startTransformInverse = groupCtx.mozCurrentTransformInverse; + copyCtxState(currentCtx, groupCtx); + this.ctx = groupCtx; + this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]); + this.groupStack.push(currentCtx); + this.groupLevel++; + }, + suspendSMaskGroup: function CanvasGraphics_endSMaskGroup() { + var groupCtx = this.ctx; + this.groupLevel--; + this.ctx = this.groupStack.pop(); + composeSMask(this.ctx, this.current.activeSMask, groupCtx, this.webGLContext); + this.ctx.restore(); + this.ctx.save(); + copyCtxState(groupCtx, this.ctx); + this.current.resumeSMaskCtx = groupCtx; + + var deltaTransform = _util.Util.transform(this.current.activeSMask.startTransformInverse, groupCtx.mozCurrentTransform); + + this.ctx.transform.apply(this.ctx, deltaTransform); + groupCtx.save(); + groupCtx.setTransform(1, 0, 0, 1, 0, 0); + groupCtx.clearRect(0, 0, groupCtx.canvas.width, groupCtx.canvas.height); + groupCtx.restore(); + }, + resumeSMaskGroup: function CanvasGraphics_endSMaskGroup() { + var groupCtx = this.current.resumeSMaskCtx; + var currentCtx = this.ctx; + this.ctx = groupCtx; + this.groupStack.push(currentCtx); + this.groupLevel++; + }, + endSMaskGroup: function CanvasGraphics_endSMaskGroup() { + var groupCtx = this.ctx; + this.groupLevel--; + this.ctx = this.groupStack.pop(); + composeSMask(this.ctx, this.current.activeSMask, groupCtx, this.webGLContext); + this.ctx.restore(); + copyCtxState(groupCtx, this.ctx); + + var deltaTransform = _util.Util.transform(this.current.activeSMask.startTransformInverse, groupCtx.mozCurrentTransform); + + this.ctx.transform.apply(this.ctx, deltaTransform); + }, + save: function CanvasGraphics_save() { + this.ctx.save(); + var old = this.current; + this.stateStack.push(old); + this.current = old.clone(); + this.current.resumeSMaskCtx = null; + }, + restore: function CanvasGraphics_restore() { + if (this.current.resumeSMaskCtx) { + this.resumeSMaskGroup(); + } + + if (this.current.activeSMask !== null && (this.stateStack.length === 0 || this.stateStack[this.stateStack.length - 1].activeSMask !== this.current.activeSMask)) { + this.endSMaskGroup(); + } + + if (this.stateStack.length !== 0) { + this.current = this.stateStack.pop(); + this.ctx.restore(); + this.pendingClip = null; + this._cachedGetSinglePixelWidth = null; + } + }, + transform: function CanvasGraphics_transform(a, b, c, d, e, f) { + this.ctx.transform(a, b, c, d, e, f); + this._cachedGetSinglePixelWidth = null; + }, + constructPath: function CanvasGraphics_constructPath(ops, args) { + var ctx = this.ctx; + var current = this.current; + var x = current.x, + y = current.y; + + for (var i = 0, j = 0, ii = ops.length; i < ii; i++) { + switch (ops[i] | 0) { + case _util.OPS.rectangle: + x = args[j++]; + y = args[j++]; + var width = args[j++]; + var height = args[j++]; + + if (width === 0) { + width = this.getSinglePixelWidth(); + } + + if (height === 0) { + height = this.getSinglePixelWidth(); + } + + var xw = x + width; + var yh = y + height; + this.ctx.moveTo(x, y); + this.ctx.lineTo(xw, y); + this.ctx.lineTo(xw, yh); + this.ctx.lineTo(x, yh); + this.ctx.lineTo(x, y); + this.ctx.closePath(); + break; + + case _util.OPS.moveTo: + x = args[j++]; + y = args[j++]; + ctx.moveTo(x, y); + break; + + case _util.OPS.lineTo: + x = args[j++]; + y = args[j++]; + ctx.lineTo(x, y); + break; + + case _util.OPS.curveTo: + x = args[j + 4]; + y = args[j + 5]; + ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3], x, y); + j += 6; + break; + + case _util.OPS.curveTo2: + ctx.bezierCurveTo(x, y, args[j], args[j + 1], args[j + 2], args[j + 3]); + x = args[j + 2]; + y = args[j + 3]; + j += 4; + break; + + case _util.OPS.curveTo3: + x = args[j + 2]; + y = args[j + 3]; + ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y); + j += 4; + break; + + case _util.OPS.closePath: + ctx.closePath(); + break; + } + } + + current.setCurrentPoint(x, y); + }, + closePath: function CanvasGraphics_closePath() { + this.ctx.closePath(); + }, + stroke: function CanvasGraphics_stroke(consumePath) { + consumePath = typeof consumePath !== "undefined" ? consumePath : true; + var ctx = this.ctx; + var strokeColor = this.current.strokeColor; + ctx.globalAlpha = this.current.strokeAlpha; + + if (strokeColor && strokeColor.hasOwnProperty("type") && strokeColor.type === "Pattern") { + ctx.save(); + const transform = ctx.mozCurrentTransform; + + const scale = _util.Util.singularValueDecompose2dScale(transform)[0]; + + ctx.strokeStyle = strokeColor.getPattern(ctx, this); + ctx.lineWidth = Math.max(this.getSinglePixelWidth() * MIN_WIDTH_FACTOR, this.current.lineWidth * scale); + ctx.stroke(); + ctx.restore(); + } else { + ctx.lineWidth = Math.max(this.getSinglePixelWidth() * MIN_WIDTH_FACTOR, this.current.lineWidth); + ctx.stroke(); + } + + if (consumePath) { + this.consumePath(); + } + + ctx.globalAlpha = this.current.fillAlpha; + }, + closeStroke: function CanvasGraphics_closeStroke() { + this.closePath(); + this.stroke(); + }, + fill: function CanvasGraphics_fill(consumePath) { + consumePath = typeof consumePath !== "undefined" ? consumePath : true; + var ctx = this.ctx; + var fillColor = this.current.fillColor; + var isPatternFill = this.current.patternFill; + var needRestore = false; + + if (isPatternFill) { + ctx.save(); + + if (this.baseTransform) { + ctx.setTransform.apply(ctx, this.baseTransform); + } + + ctx.fillStyle = fillColor.getPattern(ctx, this); + needRestore = true; + } + + if (this.pendingEOFill) { + ctx.fill("evenodd"); + this.pendingEOFill = false; + } else { + ctx.fill(); + } + + if (needRestore) { + ctx.restore(); + } + + if (consumePath) { + this.consumePath(); + } + }, + eoFill: function CanvasGraphics_eoFill() { + this.pendingEOFill = true; + this.fill(); + }, + fillStroke: function CanvasGraphics_fillStroke() { + this.fill(false); + this.stroke(false); + this.consumePath(); + }, + eoFillStroke: function CanvasGraphics_eoFillStroke() { + this.pendingEOFill = true; + this.fillStroke(); + }, + closeFillStroke: function CanvasGraphics_closeFillStroke() { + this.closePath(); + this.fillStroke(); + }, + closeEOFillStroke: function CanvasGraphics_closeEOFillStroke() { + this.pendingEOFill = true; + this.closePath(); + this.fillStroke(); + }, + endPath: function CanvasGraphics_endPath() { + this.consumePath(); + }, + clip: function CanvasGraphics_clip() { + this.pendingClip = NORMAL_CLIP; + }, + eoClip: function CanvasGraphics_eoClip() { + this.pendingClip = EO_CLIP; + }, + beginText: function CanvasGraphics_beginText() { + this.current.textMatrix = _util.IDENTITY_MATRIX; + this.current.textMatrixScale = 1; + this.current.x = this.current.lineX = 0; + this.current.y = this.current.lineY = 0; + }, + endText: function CanvasGraphics_endText() { + var paths = this.pendingTextPaths; + var ctx = this.ctx; + + if (paths === undefined) { + ctx.beginPath(); + return; + } + + ctx.save(); + ctx.beginPath(); + + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + ctx.setTransform.apply(ctx, path.transform); + ctx.translate(path.x, path.y); + path.addToPath(ctx, path.fontSize); + } + + ctx.restore(); + ctx.clip(); + ctx.beginPath(); + delete this.pendingTextPaths; + }, + setCharSpacing: function CanvasGraphics_setCharSpacing(spacing) { + this.current.charSpacing = spacing; + }, + setWordSpacing: function CanvasGraphics_setWordSpacing(spacing) { + this.current.wordSpacing = spacing; + }, + setHScale: function CanvasGraphics_setHScale(scale) { + this.current.textHScale = scale / 100; + }, + setLeading: function CanvasGraphics_setLeading(leading) { + this.current.leading = -leading; + }, + setFont: function CanvasGraphics_setFont(fontRefName, size) { + var fontObj = this.commonObjs.get(fontRefName); + var current = this.current; + + if (!fontObj) { + throw new Error(`Can't find font for ${fontRefName}`); + } + + current.fontMatrix = fontObj.fontMatrix ? fontObj.fontMatrix : _util.FONT_IDENTITY_MATRIX; + + if (current.fontMatrix[0] === 0 || current.fontMatrix[3] === 0) { + (0, _util.warn)("Invalid font matrix for font " + fontRefName); + } + + if (size < 0) { + size = -size; + current.fontDirection = -1; + } else { + current.fontDirection = 1; + } + + this.current.font = fontObj; + this.current.fontSize = size; + + if (fontObj.isType3Font) { + return; + } + + var name = fontObj.loadedName || "sans-serif"; + let bold = "normal"; + + if (fontObj.black) { + bold = "900"; + } else if (fontObj.bold) { + bold = "bold"; + } + + var italic = fontObj.italic ? "italic" : "normal"; + var typeface = `"${name}", ${fontObj.fallbackName}`; + let browserFontSize = size; + + if (size < MIN_FONT_SIZE) { + browserFontSize = MIN_FONT_SIZE; + } else if (size > MAX_FONT_SIZE) { + browserFontSize = MAX_FONT_SIZE; + } + + this.current.fontSizeScale = size / browserFontSize; + this.ctx.font = `${italic} ${bold} ${browserFontSize}px ${typeface}`; + }, + setTextRenderingMode: function CanvasGraphics_setTextRenderingMode(mode) { + this.current.textRenderingMode = mode; + }, + setTextRise: function CanvasGraphics_setTextRise(rise) { + this.current.textRise = rise; + }, + moveText: function CanvasGraphics_moveText(x, y) { + this.current.x = this.current.lineX += x; + this.current.y = this.current.lineY += y; + }, + setLeadingMoveText: function CanvasGraphics_setLeadingMoveText(x, y) { + this.setLeading(-y); + this.moveText(x, y); + }, + setTextMatrix: function CanvasGraphics_setTextMatrix(a, b, c, d, e, f) { + this.current.textMatrix = [a, b, c, d, e, f]; + this.current.textMatrixScale = Math.sqrt(a * a + b * b); + this.current.x = this.current.lineX = 0; + this.current.y = this.current.lineY = 0; + }, + nextLine: function CanvasGraphics_nextLine() { + this.moveText(0, this.current.leading); + }, + + paintChar(character, x, y, patternTransform) { + var ctx = this.ctx; + var current = this.current; + var font = current.font; + var textRenderingMode = current.textRenderingMode; + var fontSize = current.fontSize / current.fontSizeScale; + var fillStrokeMode = textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK; + var isAddToPathSet = !!(textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG); + const patternFill = current.patternFill && !font.missingFile; + var addToPath; + + if (font.disableFontFace || isAddToPathSet || patternFill) { + addToPath = font.getPathGenerator(this.commonObjs, character); + } + + if (font.disableFontFace || patternFill) { + ctx.save(); + ctx.translate(x, y); + ctx.beginPath(); + addToPath(ctx, fontSize); + + if (patternTransform) { + ctx.setTransform.apply(ctx, patternTransform); + } + + if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + ctx.fill(); + } + + if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + ctx.stroke(); + } + + ctx.restore(); + } else { + if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + ctx.fillText(character, x, y); + } + + if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + ctx.strokeText(character, x, y); + } + } + + if (isAddToPathSet) { + var paths = this.pendingTextPaths || (this.pendingTextPaths = []); + paths.push({ + transform: ctx.mozCurrentTransform, + x, + y, + fontSize, + addToPath + }); + } + }, + + get isFontSubpixelAAEnabled() { + const { + context: ctx + } = this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled", 10, 10); + ctx.scale(1.5, 1); + ctx.fillText("I", 0, 10); + var data = ctx.getImageData(0, 0, 10, 10).data; + var enabled = false; + + for (var i = 3; i < data.length; i += 4) { + if (data[i] > 0 && data[i] < 255) { + enabled = true; + break; + } + } + + return (0, _util.shadow)(this, "isFontSubpixelAAEnabled", enabled); + }, + + showText: function CanvasGraphics_showText(glyphs) { + var current = this.current; + var font = current.font; + + if (font.isType3Font) { + return this.showType3Text(glyphs); + } + + var fontSize = current.fontSize; + + if (fontSize === 0) { + return undefined; + } + + var ctx = this.ctx; + var fontSizeScale = current.fontSizeScale; + var charSpacing = current.charSpacing; + var wordSpacing = current.wordSpacing; + var fontDirection = current.fontDirection; + var textHScale = current.textHScale * fontDirection; + var glyphsLength = glyphs.length; + var vertical = font.vertical; + var spacingDir = vertical ? 1 : -1; + var defaultVMetrics = font.defaultVMetrics; + var widthAdvanceScale = fontSize * current.fontMatrix[0]; + var simpleFillText = current.textRenderingMode === _util.TextRenderingMode.FILL && !font.disableFontFace && !current.patternFill; + ctx.save(); + let patternTransform; + + if (current.patternFill) { + ctx.save(); + const pattern = current.fillColor.getPattern(ctx, this); + patternTransform = ctx.mozCurrentTransform; + ctx.restore(); + ctx.fillStyle = pattern; + } + + ctx.transform.apply(ctx, current.textMatrix); + ctx.translate(current.x, current.y + current.textRise); + + if (fontDirection > 0) { + ctx.scale(textHScale, -1); + } else { + ctx.scale(textHScale, 1); + } + + var lineWidth = current.lineWidth; + var scale = current.textMatrixScale; + + if (scale === 0 || lineWidth === 0) { + var fillStrokeMode = current.textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK; + + if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + this._cachedGetSinglePixelWidth = null; + lineWidth = this.getSinglePixelWidth() * MIN_WIDTH_FACTOR; + } + } else { + lineWidth /= scale; + } + + if (fontSizeScale !== 1.0) { + ctx.scale(fontSizeScale, fontSizeScale); + lineWidth /= fontSizeScale; + } + + ctx.lineWidth = lineWidth; + var x = 0, + i; + + for (i = 0; i < glyphsLength; ++i) { + var glyph = glyphs[i]; + + if ((0, _util.isNum)(glyph)) { + x += spacingDir * glyph * fontSize / 1000; + continue; + } + + var restoreNeeded = false; + var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing; + var character = glyph.fontChar; + var accent = glyph.accent; + var scaledX, scaledY, scaledAccentX, scaledAccentY; + var width = glyph.width; + + if (vertical) { + var vmetric, vx, vy; + vmetric = glyph.vmetric || defaultVMetrics; + vx = glyph.vmetric ? vmetric[1] : width * 0.5; + vx = -vx * widthAdvanceScale; + vy = vmetric[2] * widthAdvanceScale; + width = vmetric ? -vmetric[0] : width; + scaledX = vx / fontSizeScale; + scaledY = (x + vy) / fontSizeScale; + } else { + scaledX = x / fontSizeScale; + scaledY = 0; + } + + if (font.remeasure && width > 0) { + var measuredWidth = ctx.measureText(character).width * 1000 / fontSize * fontSizeScale; + + if (width < measuredWidth && this.isFontSubpixelAAEnabled) { + var characterScaleX = width / measuredWidth; + restoreNeeded = true; + ctx.save(); + ctx.scale(characterScaleX, 1); + scaledX /= characterScaleX; + } else if (width !== measuredWidth) { + scaledX += (width - measuredWidth) / 2000 * fontSize / fontSizeScale; + } + } + + if (glyph.isInFont || font.missingFile) { + if (simpleFillText && !accent) { + ctx.fillText(character, scaledX, scaledY); + } else { + this.paintChar(character, scaledX, scaledY, patternTransform); + + if (accent) { + scaledAccentX = scaledX + accent.offset.x / fontSizeScale; + scaledAccentY = scaledY - accent.offset.y / fontSizeScale; + this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY, patternTransform); + } + } + } + + var charWidth; + + if (vertical) { + charWidth = width * widthAdvanceScale - spacing * fontDirection; + } else { + charWidth = width * widthAdvanceScale + spacing * fontDirection; + } + + x += charWidth; + + if (restoreNeeded) { + ctx.restore(); + } + } + + if (vertical) { + current.y -= x; + } else { + current.x += x * textHScale; + } + + ctx.restore(); + }, + showType3Text: function CanvasGraphics_showType3Text(glyphs) { + var ctx = this.ctx; + var current = this.current; + var font = current.font; + var fontSize = current.fontSize; + var fontDirection = current.fontDirection; + var spacingDir = font.vertical ? 1 : -1; + var charSpacing = current.charSpacing; + var wordSpacing = current.wordSpacing; + var textHScale = current.textHScale * fontDirection; + var fontMatrix = current.fontMatrix || _util.FONT_IDENTITY_MATRIX; + var glyphsLength = glyphs.length; + var isTextInvisible = current.textRenderingMode === _util.TextRenderingMode.INVISIBLE; + var i, glyph, width, spacingLength; + + if (isTextInvisible || fontSize === 0) { + return; + } + + this._cachedGetSinglePixelWidth = null; + ctx.save(); + ctx.transform.apply(ctx, current.textMatrix); + ctx.translate(current.x, current.y); + ctx.scale(textHScale, fontDirection); + + for (i = 0; i < glyphsLength; ++i) { + glyph = glyphs[i]; + + if ((0, _util.isNum)(glyph)) { + spacingLength = spacingDir * glyph * fontSize / 1000; + this.ctx.translate(spacingLength, 0); + current.x += spacingLength * textHScale; + continue; + } + + var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing; + var operatorList = font.charProcOperatorList[glyph.operatorListId]; + + if (!operatorList) { + (0, _util.warn)(`Type3 character "${glyph.operatorListId}" is not available.`); + continue; + } + + this.processingType3 = glyph; + this.save(); + ctx.scale(fontSize, fontSize); + ctx.transform.apply(ctx, fontMatrix); + this.executeOperatorList(operatorList); + this.restore(); + + var transformed = _util.Util.applyTransform([glyph.width, 0], fontMatrix); + + width = transformed[0] * fontSize + spacing; + ctx.translate(width, 0); + current.x += width * textHScale; + } + + ctx.restore(); + this.processingType3 = null; + }, + setCharWidth: function CanvasGraphics_setCharWidth(xWidth, yWidth) {}, + setCharWidthAndBounds: function CanvasGraphics_setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) { + this.ctx.rect(llx, lly, urx - llx, ury - lly); + this.clip(); + this.endPath(); + }, + getColorN_Pattern: function CanvasGraphics_getColorN_Pattern(IR) { + var pattern; + + if (IR[0] === "TilingPattern") { + var color = IR[1]; + var baseTransform = this.baseTransform || this.ctx.mozCurrentTransform.slice(); + var canvasGraphicsFactory = { + createCanvasGraphics: ctx => { + return new CanvasGraphics(ctx, this.commonObjs, this.objs, this.canvasFactory, this.webGLContext); + } + }; + pattern = new _pattern_helper.TilingPattern(IR, color, this.ctx, canvasGraphicsFactory, baseTransform); + } else { + pattern = (0, _pattern_helper.getShadingPatternFromIR)(IR); + } + + return pattern; + }, + setStrokeColorN: function CanvasGraphics_setStrokeColorN() { + this.current.strokeColor = this.getColorN_Pattern(arguments); + }, + setFillColorN: function CanvasGraphics_setFillColorN() { + this.current.fillColor = this.getColorN_Pattern(arguments); + this.current.patternFill = true; + }, + setStrokeRGBColor: function CanvasGraphics_setStrokeRGBColor(r, g, b) { + var color = _util.Util.makeCssRgb(r, g, b); + + this.ctx.strokeStyle = color; + this.current.strokeColor = color; + }, + setFillRGBColor: function CanvasGraphics_setFillRGBColor(r, g, b) { + var color = _util.Util.makeCssRgb(r, g, b); + + this.ctx.fillStyle = color; + this.current.fillColor = color; + this.current.patternFill = false; + }, + shadingFill: function CanvasGraphics_shadingFill(patternIR) { + var ctx = this.ctx; + this.save(); + var pattern = (0, _pattern_helper.getShadingPatternFromIR)(patternIR); + ctx.fillStyle = pattern.getPattern(ctx, this, true); + var inv = ctx.mozCurrentTransformInverse; + + if (inv) { + var canvas = ctx.canvas; + var width = canvas.width; + var height = canvas.height; + + var bl = _util.Util.applyTransform([0, 0], inv); + + var br = _util.Util.applyTransform([0, height], inv); + + var ul = _util.Util.applyTransform([width, 0], inv); + + var ur = _util.Util.applyTransform([width, height], inv); + + var x0 = Math.min(bl[0], br[0], ul[0], ur[0]); + var y0 = Math.min(bl[1], br[1], ul[1], ur[1]); + var x1 = Math.max(bl[0], br[0], ul[0], ur[0]); + var y1 = Math.max(bl[1], br[1], ul[1], ur[1]); + this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0); + } else { + this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10); + } + + this.restore(); + }, + beginInlineImage: function CanvasGraphics_beginInlineImage() { + (0, _util.unreachable)("Should not call beginInlineImage"); + }, + beginImageData: function CanvasGraphics_beginImageData() { + (0, _util.unreachable)("Should not call beginImageData"); + }, + paintFormXObjectBegin: function CanvasGraphics_paintFormXObjectBegin(matrix, bbox) { + this.save(); + this.baseTransformStack.push(this.baseTransform); + + if (Array.isArray(matrix) && matrix.length === 6) { + this.transform.apply(this, matrix); + } + + this.baseTransform = this.ctx.mozCurrentTransform; + + if (bbox) { + var width = bbox[2] - bbox[0]; + var height = bbox[3] - bbox[1]; + this.ctx.rect(bbox[0], bbox[1], width, height); + this.clip(); + this.endPath(); + } + }, + paintFormXObjectEnd: function CanvasGraphics_paintFormXObjectEnd() { + this.restore(); + this.baseTransform = this.baseTransformStack.pop(); + }, + beginGroup: function CanvasGraphics_beginGroup(group) { + this.save(); + var currentCtx = this.ctx; + + if (!group.isolated) { + (0, _util.info)("TODO: Support non-isolated groups."); + } + + if (group.knockout) { + (0, _util.warn)("Knockout groups not supported."); + } + + var currentTransform = currentCtx.mozCurrentTransform; + + if (group.matrix) { + currentCtx.transform.apply(currentCtx, group.matrix); + } + + if (!group.bbox) { + throw new Error("Bounding box is required."); + } + + var bounds = _util.Util.getAxialAlignedBoundingBox(group.bbox, currentCtx.mozCurrentTransform); + + var canvasBounds = [0, 0, currentCtx.canvas.width, currentCtx.canvas.height]; + bounds = _util.Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0]; + var offsetX = Math.floor(bounds[0]); + var offsetY = Math.floor(bounds[1]); + var drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1); + var drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1); + var scaleX = 1, + scaleY = 1; + + if (drawnWidth > MAX_GROUP_SIZE) { + scaleX = drawnWidth / MAX_GROUP_SIZE; + drawnWidth = MAX_GROUP_SIZE; + } + + if (drawnHeight > MAX_GROUP_SIZE) { + scaleY = drawnHeight / MAX_GROUP_SIZE; + drawnHeight = MAX_GROUP_SIZE; + } + + var cacheId = "groupAt" + this.groupLevel; + + if (group.smask) { + cacheId += "_smask_" + this.smaskCounter++ % 2; + } + + var scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight, true); + var groupCtx = scratchCanvas.context; + groupCtx.scale(1 / scaleX, 1 / scaleY); + groupCtx.translate(-offsetX, -offsetY); + groupCtx.transform.apply(groupCtx, currentTransform); + + if (group.smask) { + this.smaskStack.push({ + canvas: scratchCanvas.canvas, + context: groupCtx, + offsetX, + offsetY, + scaleX, + scaleY, + subtype: group.smask.subtype, + backdrop: group.smask.backdrop, + transferMap: group.smask.transferMap || null, + startTransformInverse: null + }); + } else { + currentCtx.setTransform(1, 0, 0, 1, 0, 0); + currentCtx.translate(offsetX, offsetY); + currentCtx.scale(scaleX, scaleY); + } + + copyCtxState(currentCtx, groupCtx); + this.ctx = groupCtx; + this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]); + this.groupStack.push(currentCtx); + this.groupLevel++; + this.current.activeSMask = null; + }, + endGroup: function CanvasGraphics_endGroup(group) { + this.groupLevel--; + var groupCtx = this.ctx; + this.ctx = this.groupStack.pop(); + + if (this.ctx.imageSmoothingEnabled !== undefined) { + this.ctx.imageSmoothingEnabled = false; + } else { + this.ctx.mozImageSmoothingEnabled = false; + } + + if (group.smask) { + this.tempSMask = this.smaskStack.pop(); + } else { + this.ctx.drawImage(groupCtx.canvas, 0, 0); + } + + this.restore(); + }, + beginAnnotations: function CanvasGraphics_beginAnnotations() { + this.save(); + + if (this.baseTransform) { + this.ctx.setTransform.apply(this.ctx, this.baseTransform); + } + }, + endAnnotations: function CanvasGraphics_endAnnotations() { + this.restore(); + }, + beginAnnotation: function CanvasGraphics_beginAnnotation(rect, transform, matrix) { + this.save(); + resetCtxToDefault(this.ctx); + this.current = new CanvasExtraState(); + + if (Array.isArray(rect) && rect.length === 4) { + var width = rect[2] - rect[0]; + var height = rect[3] - rect[1]; + this.ctx.rect(rect[0], rect[1], width, height); + this.clip(); + this.endPath(); + } + + this.transform.apply(this, transform); + this.transform.apply(this, matrix); + }, + endAnnotation: function CanvasGraphics_endAnnotation() { + this.restore(); + }, + paintImageMaskXObject: function CanvasGraphics_paintImageMaskXObject(img) { + var ctx = this.ctx; + var width = img.width, + height = img.height; + var fillColor = this.current.fillColor; + var isPatternFill = this.current.patternFill; + var glyph = this.processingType3; + + if (COMPILE_TYPE3_GLYPHS && glyph && glyph.compiled === undefined) { + if (width <= MAX_SIZE_TO_COMPILE && height <= MAX_SIZE_TO_COMPILE) { + glyph.compiled = compileType3Glyph({ + data: img.data, + width, + height + }); + } else { + glyph.compiled = null; + } + } + + if (glyph && glyph.compiled) { + glyph.compiled(ctx); + return; + } + + var maskCanvas = this.cachedCanvases.getCanvas("maskCanvas", width, height); + var maskCtx = maskCanvas.context; + maskCtx.save(); + putBinaryImageMask(maskCtx, img); + maskCtx.globalCompositeOperation = "source-in"; + maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this) : fillColor; + maskCtx.fillRect(0, 0, width, height); + maskCtx.restore(); + this.paintInlineImageXObject(maskCanvas.canvas); + }, + paintImageMaskXObjectRepeat: function CanvasGraphics_paintImageMaskXObjectRepeat(imgData, scaleX, scaleY, positions) { + var width = imgData.width; + var height = imgData.height; + var fillColor = this.current.fillColor; + var isPatternFill = this.current.patternFill; + var maskCanvas = this.cachedCanvases.getCanvas("maskCanvas", width, height); + var maskCtx = maskCanvas.context; + maskCtx.save(); + putBinaryImageMask(maskCtx, imgData); + maskCtx.globalCompositeOperation = "source-in"; + maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this) : fillColor; + maskCtx.fillRect(0, 0, width, height); + maskCtx.restore(); + var ctx = this.ctx; + + for (var i = 0, ii = positions.length; i < ii; i += 2) { + ctx.save(); + ctx.transform(scaleX, 0, 0, scaleY, positions[i], positions[i + 1]); + ctx.scale(1, -1); + ctx.drawImage(maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1); + ctx.restore(); + } + }, + paintImageMaskXObjectGroup: function CanvasGraphics_paintImageMaskXObjectGroup(images) { + var ctx = this.ctx; + var fillColor = this.current.fillColor; + var isPatternFill = this.current.patternFill; + + for (var i = 0, ii = images.length; i < ii; i++) { + var image = images[i]; + var width = image.width, + height = image.height; + var maskCanvas = this.cachedCanvases.getCanvas("maskCanvas", width, height); + var maskCtx = maskCanvas.context; + maskCtx.save(); + putBinaryImageMask(maskCtx, image); + maskCtx.globalCompositeOperation = "source-in"; + maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this) : fillColor; + maskCtx.fillRect(0, 0, width, height); + maskCtx.restore(); + ctx.save(); + ctx.transform.apply(ctx, image.transform); + ctx.scale(1, -1); + ctx.drawImage(maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1); + ctx.restore(); + } + }, + paintImageXObject: function CanvasGraphics_paintImageXObject(objId) { + const imgData = objId.startsWith("g_") ? this.commonObjs.get(objId) : this.objs.get(objId); + + if (!imgData) { + (0, _util.warn)("Dependent image isn't ready yet"); + return; + } + + this.paintInlineImageXObject(imgData); + }, + paintImageXObjectRepeat: function CanvasGraphics_paintImageXObjectRepeat(objId, scaleX, scaleY, positions) { + const imgData = objId.startsWith("g_") ? this.commonObjs.get(objId) : this.objs.get(objId); + + if (!imgData) { + (0, _util.warn)("Dependent image isn't ready yet"); + return; + } + + var width = imgData.width; + var height = imgData.height; + var map = []; + + for (var i = 0, ii = positions.length; i < ii; i += 2) { + map.push({ + transform: [scaleX, 0, 0, scaleY, positions[i], positions[i + 1]], + x: 0, + y: 0, + w: width, + h: height + }); + } + + this.paintInlineImageXObjectGroup(imgData, map); + }, + paintInlineImageXObject: function CanvasGraphics_paintInlineImageXObject(imgData) { + var width = imgData.width; + var height = imgData.height; + var ctx = this.ctx; + this.save(); + ctx.scale(1 / width, -1 / height); + var currentTransform = ctx.mozCurrentTransformInverse; + var a = currentTransform[0], + b = currentTransform[1]; + var widthScale = Math.max(Math.sqrt(a * a + b * b), 1); + var c = currentTransform[2], + d = currentTransform[3]; + var heightScale = Math.max(Math.sqrt(c * c + d * d), 1); + var imgToPaint, tmpCanvas; + + if (typeof HTMLElement === "function" && imgData instanceof HTMLElement || !imgData.data) { + imgToPaint = imgData; + } else { + tmpCanvas = this.cachedCanvases.getCanvas("inlineImage", width, height); + var tmpCtx = tmpCanvas.context; + putBinaryImageData(tmpCtx, imgData); + imgToPaint = tmpCanvas.canvas; + } + + var paintWidth = width, + paintHeight = height; + var tmpCanvasId = "prescale1"; + + while (widthScale > 2 && paintWidth > 1 || heightScale > 2 && paintHeight > 1) { + var newWidth = paintWidth, + newHeight = paintHeight; + + if (widthScale > 2 && paintWidth > 1) { + newWidth = Math.ceil(paintWidth / 2); + widthScale /= paintWidth / newWidth; + } + + if (heightScale > 2 && paintHeight > 1) { + newHeight = Math.ceil(paintHeight / 2); + heightScale /= paintHeight / newHeight; + } + + tmpCanvas = this.cachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight); + tmpCtx = tmpCanvas.context; + tmpCtx.clearRect(0, 0, newWidth, newHeight); + tmpCtx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight, 0, 0, newWidth, newHeight); + imgToPaint = tmpCanvas.canvas; + paintWidth = newWidth; + paintHeight = newHeight; + tmpCanvasId = tmpCanvasId === "prescale1" ? "prescale2" : "prescale1"; + } + + ctx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight, 0, -height, width, height); + + if (this.imageLayer) { + var position = this.getCanvasPosition(0, -height); + this.imageLayer.appendImage({ + imgData, + left: position[0], + top: position[1], + width: width / currentTransform[0], + height: height / currentTransform[3] + }); + } + + this.restore(); + }, + paintInlineImageXObjectGroup: function CanvasGraphics_paintInlineImageXObjectGroup(imgData, map) { + var ctx = this.ctx; + var w = imgData.width; + var h = imgData.height; + var tmpCanvas = this.cachedCanvases.getCanvas("inlineImage", w, h); + var tmpCtx = tmpCanvas.context; + putBinaryImageData(tmpCtx, imgData); + + for (var i = 0, ii = map.length; i < ii; i++) { + var entry = map[i]; + ctx.save(); + ctx.transform.apply(ctx, entry.transform); + ctx.scale(1, -1); + ctx.drawImage(tmpCanvas.canvas, entry.x, entry.y, entry.w, entry.h, 0, -1, 1, 1); + + if (this.imageLayer) { + var position = this.getCanvasPosition(entry.x, entry.y); + this.imageLayer.appendImage({ + imgData, + left: position[0], + top: position[1], + width: w, + height: h + }); + } + + ctx.restore(); + } + }, + paintSolidColorImageMask: function CanvasGraphics_paintSolidColorImageMask() { + this.ctx.fillRect(0, 0, 1, 1); + }, + paintXObject: function CanvasGraphics_paintXObject() { + (0, _util.warn)("Unsupported 'paintXObject' command."); + }, + markPoint: function CanvasGraphics_markPoint(tag) {}, + markPointProps: function CanvasGraphics_markPointProps(tag, properties) {}, + beginMarkedContent: function CanvasGraphics_beginMarkedContent(tag) {}, + beginMarkedContentProps: function CanvasGraphics_beginMarkedContentProps(tag, properties) {}, + endMarkedContent: function CanvasGraphics_endMarkedContent() {}, + beginCompat: function CanvasGraphics_beginCompat() {}, + endCompat: function CanvasGraphics_endCompat() {}, + consumePath: function CanvasGraphics_consumePath() { + var ctx = this.ctx; + + if (this.pendingClip) { + if (this.pendingClip === EO_CLIP) { + ctx.clip("evenodd"); + } else { + ctx.clip(); + } + + this.pendingClip = null; + } + + ctx.beginPath(); + }, + + getSinglePixelWidth(scale) { + if (this._cachedGetSinglePixelWidth === null) { + const inverse = this.ctx.mozCurrentTransformInverse; + this._cachedGetSinglePixelWidth = Math.sqrt(Math.max(inverse[0] * inverse[0] + inverse[1] * inverse[1], inverse[2] * inverse[2] + inverse[3] * inverse[3])); + } + + return this._cachedGetSinglePixelWidth; + }, + + getCanvasPosition: function CanvasGraphics_getCanvasPosition(x, y) { + var transform = this.ctx.mozCurrentTransform; + return [transform[0] * x + transform[2] * y + transform[4], transform[1] * x + transform[3] * y + transform[5]]; + } + }; + + for (var op in _util.OPS) { + CanvasGraphics.prototype[_util.OPS[op]] = CanvasGraphics.prototype[op]; + } + + return CanvasGraphics; +}(); + +exports.CanvasGraphics = CanvasGraphics; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getShadingPatternFromIR = getShadingPatternFromIR; +exports.TilingPattern = void 0; + +var _util = __w_pdfjs_require__(2); + +var ShadingIRs = {}; + +function applyBoundingBox(ctx, bbox) { + if (!bbox || typeof Path2D === "undefined") { + return; + } + + const width = bbox[2] - bbox[0]; + const height = bbox[3] - bbox[1]; + const region = new Path2D(); + region.rect(bbox[0], bbox[1], width, height); + ctx.clip(region); +} + +ShadingIRs.RadialAxial = { + fromIR: function RadialAxial_fromIR(raw) { + var type = raw[1]; + var bbox = raw[2]; + var colorStops = raw[3]; + var p0 = raw[4]; + var p1 = raw[5]; + var r0 = raw[6]; + var r1 = raw[7]; + return { + type: "Pattern", + getPattern: function RadialAxial_getPattern(ctx) { + applyBoundingBox(ctx, bbox); + var grad; + + if (type === "axial") { + grad = ctx.createLinearGradient(p0[0], p0[1], p1[0], p1[1]); + } else if (type === "radial") { + grad = ctx.createRadialGradient(p0[0], p0[1], r0, p1[0], p1[1], r1); + } + + for (var i = 0, ii = colorStops.length; i < ii; ++i) { + var c = colorStops[i]; + grad.addColorStop(c[0], c[1]); + } + + return grad; + } + }; + } +}; + +var createMeshCanvas = function createMeshCanvasClosure() { + function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) { + var coords = context.coords, + colors = context.colors; + var bytes = data.data, + rowSize = data.width * 4; + var tmp; + + if (coords[p1 + 1] > coords[p2 + 1]) { + tmp = p1; + p1 = p2; + p2 = tmp; + tmp = c1; + c1 = c2; + c2 = tmp; + } + + if (coords[p2 + 1] > coords[p3 + 1]) { + tmp = p2; + p2 = p3; + p3 = tmp; + tmp = c2; + c2 = c3; + c3 = tmp; + } + + if (coords[p1 + 1] > coords[p2 + 1]) { + tmp = p1; + p1 = p2; + p2 = tmp; + tmp = c1; + c1 = c2; + c2 = tmp; + } + + var x1 = (coords[p1] + context.offsetX) * context.scaleX; + var y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY; + var x2 = (coords[p2] + context.offsetX) * context.scaleX; + var y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY; + var x3 = (coords[p3] + context.offsetX) * context.scaleX; + var y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY; + + if (y1 >= y3) { + return; + } + + var c1r = colors[c1], + c1g = colors[c1 + 1], + c1b = colors[c1 + 2]; + var c2r = colors[c2], + c2g = colors[c2 + 1], + c2b = colors[c2 + 2]; + var c3r = colors[c3], + c3g = colors[c3 + 1], + c3b = colors[c3 + 2]; + var minY = Math.round(y1), + maxY = Math.round(y3); + var xa, car, cag, cab; + var xb, cbr, cbg, cbb; + + for (var y = minY; y <= maxY; y++) { + if (y < y2) { + let k; + + if (y < y1) { + k = 0; + } else if (y1 === y2) { + k = 1; + } else { + k = (y1 - y) / (y1 - y2); + } + + xa = x1 - (x1 - x2) * k; + car = c1r - (c1r - c2r) * k; + cag = c1g - (c1g - c2g) * k; + cab = c1b - (c1b - c2b) * k; + } else { + let k; + + if (y > y3) { + k = 1; + } else if (y2 === y3) { + k = 0; + } else { + k = (y2 - y) / (y2 - y3); + } + + xa = x2 - (x2 - x3) * k; + car = c2r - (c2r - c3r) * k; + cag = c2g - (c2g - c3g) * k; + cab = c2b - (c2b - c3b) * k; + } + + let k; + + if (y < y1) { + k = 0; + } else if (y > y3) { + k = 1; + } else { + k = (y1 - y) / (y1 - y3); + } + + xb = x1 - (x1 - x3) * k; + cbr = c1r - (c1r - c3r) * k; + cbg = c1g - (c1g - c3g) * k; + cbb = c1b - (c1b - c3b) * k; + var x1_ = Math.round(Math.min(xa, xb)); + var x2_ = Math.round(Math.max(xa, xb)); + var j = rowSize * y + x1_ * 4; + + for (var x = x1_; x <= x2_; x++) { + k = (xa - x) / (xa - xb); + + if (k < 0) { + k = 0; + } else if (k > 1) { + k = 1; + } + + bytes[j++] = car - (car - cbr) * k | 0; + bytes[j++] = cag - (cag - cbg) * k | 0; + bytes[j++] = cab - (cab - cbb) * k | 0; + bytes[j++] = 255; + } + } + } + + function drawFigure(data, figure, context) { + var ps = figure.coords; + var cs = figure.colors; + var i, ii; + + switch (figure.type) { + case "lattice": + var verticesPerRow = figure.verticesPerRow; + var rows = Math.floor(ps.length / verticesPerRow) - 1; + var cols = verticesPerRow - 1; + + for (i = 0; i < rows; i++) { + var q = i * verticesPerRow; + + for (var j = 0; j < cols; j++, q++) { + drawTriangle(data, context, ps[q], ps[q + 1], ps[q + verticesPerRow], cs[q], cs[q + 1], cs[q + verticesPerRow]); + drawTriangle(data, context, ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow], cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]); + } + } + + break; + + case "triangles": + for (i = 0, ii = ps.length; i < ii; i += 3) { + drawTriangle(data, context, ps[i], ps[i + 1], ps[i + 2], cs[i], cs[i + 1], cs[i + 2]); + } + + break; + + default: + throw new Error("illegal figure"); + } + } + + function createMeshCanvas(bounds, combinesScale, coords, colors, figures, backgroundColor, cachedCanvases, webGLContext) { + var EXPECTED_SCALE = 1.1; + var MAX_PATTERN_SIZE = 3000; + var BORDER_SIZE = 2; + var offsetX = Math.floor(bounds[0]); + var offsetY = Math.floor(bounds[1]); + var boundsWidth = Math.ceil(bounds[2]) - offsetX; + var boundsHeight = Math.ceil(bounds[3]) - offsetY; + var width = Math.min(Math.ceil(Math.abs(boundsWidth * combinesScale[0] * EXPECTED_SCALE)), MAX_PATTERN_SIZE); + var height = Math.min(Math.ceil(Math.abs(boundsHeight * combinesScale[1] * EXPECTED_SCALE)), MAX_PATTERN_SIZE); + var scaleX = boundsWidth / width; + var scaleY = boundsHeight / height; + var context = { + coords, + colors, + offsetX: -offsetX, + offsetY: -offsetY, + scaleX: 1 / scaleX, + scaleY: 1 / scaleY + }; + var paddedWidth = width + BORDER_SIZE * 2; + var paddedHeight = height + BORDER_SIZE * 2; + var canvas, tmpCanvas, i, ii; + + if (webGLContext.isEnabled) { + canvas = webGLContext.drawFigures({ + width, + height, + backgroundColor, + figures, + context + }); + tmpCanvas = cachedCanvases.getCanvas("mesh", paddedWidth, paddedHeight, false); + tmpCanvas.context.drawImage(canvas, BORDER_SIZE, BORDER_SIZE); + canvas = tmpCanvas.canvas; + } else { + tmpCanvas = cachedCanvases.getCanvas("mesh", paddedWidth, paddedHeight, false); + var tmpCtx = tmpCanvas.context; + var data = tmpCtx.createImageData(width, height); + + if (backgroundColor) { + var bytes = data.data; + + for (i = 0, ii = bytes.length; i < ii; i += 4) { + bytes[i] = backgroundColor[0]; + bytes[i + 1] = backgroundColor[1]; + bytes[i + 2] = backgroundColor[2]; + bytes[i + 3] = 255; + } + } + + for (i = 0; i < figures.length; i++) { + drawFigure(data, figures[i], context); + } + + tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE); + canvas = tmpCanvas.canvas; + } + + return { + canvas, + offsetX: offsetX - BORDER_SIZE * scaleX, + offsetY: offsetY - BORDER_SIZE * scaleY, + scaleX, + scaleY + }; + } + + return createMeshCanvas; +}(); + +ShadingIRs.Mesh = { + fromIR: function Mesh_fromIR(raw) { + var coords = raw[2]; + var colors = raw[3]; + var figures = raw[4]; + var bounds = raw[5]; + var matrix = raw[6]; + var bbox = raw[7]; + var background = raw[8]; + return { + type: "Pattern", + getPattern: function Mesh_getPattern(ctx, owner, shadingFill) { + applyBoundingBox(ctx, bbox); + var scale; + + if (shadingFill) { + scale = _util.Util.singularValueDecompose2dScale(ctx.mozCurrentTransform); + } else { + scale = _util.Util.singularValueDecompose2dScale(owner.baseTransform); + + if (matrix) { + var matrixScale = _util.Util.singularValueDecompose2dScale(matrix); + + scale = [scale[0] * matrixScale[0], scale[1] * matrixScale[1]]; + } + } + + var temporaryPatternCanvas = createMeshCanvas(bounds, scale, coords, colors, figures, shadingFill ? null : background, owner.cachedCanvases, owner.webGLContext); + + if (!shadingFill) { + ctx.setTransform.apply(ctx, owner.baseTransform); + + if (matrix) { + ctx.transform.apply(ctx, matrix); + } + } + + ctx.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY); + ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY); + return ctx.createPattern(temporaryPatternCanvas.canvas, "no-repeat"); + } + }; + } +}; +ShadingIRs.Dummy = { + fromIR: function Dummy_fromIR() { + return { + type: "Pattern", + getPattern: function Dummy_fromIR_getPattern() { + return "hotpink"; + } + }; + } +}; + +function getShadingPatternFromIR(raw) { + var shadingIR = ShadingIRs[raw[0]]; + + if (!shadingIR) { + throw new Error(`Unknown IR type: ${raw[0]}`); + } + + return shadingIR.fromIR(raw); +} + +var TilingPattern = function TilingPatternClosure() { + var PaintType = { + COLORED: 1, + UNCOLORED: 2 + }; + var MAX_PATTERN_SIZE = 3000; + + function TilingPattern(IR, color, ctx, canvasGraphicsFactory, baseTransform) { + this.operatorList = IR[2]; + this.matrix = IR[3] || [1, 0, 0, 1, 0, 0]; + this.bbox = IR[4]; + this.xstep = IR[5]; + this.ystep = IR[6]; + this.paintType = IR[7]; + this.tilingType = IR[8]; + this.color = color; + this.canvasGraphicsFactory = canvasGraphicsFactory; + this.baseTransform = baseTransform; + this.type = "Pattern"; + this.ctx = ctx; + } + + TilingPattern.prototype = { + createPatternCanvas: function TilinPattern_createPatternCanvas(owner) { + var operatorList = this.operatorList; + var bbox = this.bbox; + var xstep = this.xstep; + var ystep = this.ystep; + var paintType = this.paintType; + var tilingType = this.tilingType; + var color = this.color; + var canvasGraphicsFactory = this.canvasGraphicsFactory; + (0, _util.info)("TilingType: " + tilingType); + var x0 = bbox[0], + y0 = bbox[1], + x1 = bbox[2], + y1 = bbox[3]; + + var matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix); + + var curMatrixScale = _util.Util.singularValueDecompose2dScale(this.baseTransform); + + var combinedScale = [matrixScale[0] * curMatrixScale[0], matrixScale[1] * curMatrixScale[1]]; + var dimx = this.getSizeAndScale(xstep, this.ctx.canvas.width, combinedScale[0]); + var dimy = this.getSizeAndScale(ystep, this.ctx.canvas.height, combinedScale[1]); + var tmpCanvas = owner.cachedCanvases.getCanvas("pattern", dimx.size, dimy.size, true); + var tmpCtx = tmpCanvas.context; + var graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx); + graphics.groupLevel = owner.groupLevel; + this.setFillAndStrokeStyleToContext(graphics, paintType, color); + graphics.transform(dimx.scale, 0, 0, dimy.scale, 0, 0); + graphics.transform(1, 0, 0, 1, -x0, -y0); + this.clipBbox(graphics, bbox, x0, y0, x1, y1); + graphics.executeOperatorList(operatorList); + this.ctx.transform(1, 0, 0, 1, x0, y0); + this.ctx.scale(1 / dimx.scale, 1 / dimy.scale); + return tmpCanvas.canvas; + }, + getSizeAndScale: function TilingPattern_getSizeAndScale(step, realOutputSize, scale) { + step = Math.abs(step); + var maxSize = Math.max(MAX_PATTERN_SIZE, realOutputSize); + var size = Math.ceil(step * scale); + + if (size >= maxSize) { + size = maxSize; + } else { + scale = size / step; + } + + return { + scale, + size + }; + }, + clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) { + if (Array.isArray(bbox) && bbox.length === 4) { + var bboxWidth = x1 - x0; + var bboxHeight = y1 - y0; + graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight); + graphics.clip(); + graphics.endPath(); + } + }, + setFillAndStrokeStyleToContext: function setFillAndStrokeStyleToContext(graphics, paintType, color) { + const context = graphics.ctx, + current = graphics.current; + + switch (paintType) { + case PaintType.COLORED: + var ctx = this.ctx; + context.fillStyle = ctx.fillStyle; + context.strokeStyle = ctx.strokeStyle; + current.fillColor = ctx.fillStyle; + current.strokeColor = ctx.strokeStyle; + break; + + case PaintType.UNCOLORED: + var cssColor = _util.Util.makeCssRgb(color[0], color[1], color[2]); + + context.fillStyle = cssColor; + context.strokeStyle = cssColor; + current.fillColor = cssColor; + current.strokeColor = cssColor; + break; + + default: + throw new _util.FormatError(`Unsupported paint type: ${paintType}`); + } + }, + getPattern: function TilingPattern_getPattern(ctx, owner) { + ctx = this.ctx; + ctx.setTransform.apply(ctx, this.baseTransform); + ctx.transform.apply(ctx, this.matrix); + var temporaryPatternCanvas = this.createPatternCanvas(owner); + return ctx.createPattern(temporaryPatternCanvas, "repeat"); + } + }; + return TilingPattern; +}(); + +exports.TilingPattern = TilingPattern; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GlobalWorkerOptions = void 0; +const GlobalWorkerOptions = Object.create(null); +exports.GlobalWorkerOptions = GlobalWorkerOptions; +GlobalWorkerOptions.workerPort = GlobalWorkerOptions.workerPort === undefined ? null : GlobalWorkerOptions.workerPort; +GlobalWorkerOptions.workerSrc = GlobalWorkerOptions.workerSrc === undefined ? "" : GlobalWorkerOptions.workerSrc; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MessageHandler = void 0; + +var _util = __w_pdfjs_require__(2); + +const CallbackKind = { + UNKNOWN: 0, + DATA: 1, + ERROR: 2 +}; +const StreamKind = { + UNKNOWN: 0, + CANCEL: 1, + CANCEL_COMPLETE: 2, + CLOSE: 3, + ENQUEUE: 4, + ERROR: 5, + PULL: 6, + PULL_COMPLETE: 7, + START_COMPLETE: 8 +}; + +function wrapReason(reason) { + if (typeof reason !== "object" || reason === null) { + return reason; + } + + switch (reason.name) { + case "AbortException": + return new _util.AbortException(reason.message); + + case "MissingPDFException": + return new _util.MissingPDFException(reason.message); + + case "UnexpectedResponseException": + return new _util.UnexpectedResponseException(reason.message, reason.status); + + case "UnknownErrorException": + return new _util.UnknownErrorException(reason.message, reason.details); + + default: + return new _util.UnknownErrorException(reason.message, reason.toString()); + } +} + +class MessageHandler { + constructor(sourceName, targetName, comObj) { + this.sourceName = sourceName; + this.targetName = targetName; + this.comObj = comObj; + this.callbackId = 1; + this.streamId = 1; + this.postMessageTransfers = true; + this.streamSinks = Object.create(null); + this.streamControllers = Object.create(null); + this.callbackCapabilities = Object.create(null); + this.actionHandler = Object.create(null); + + this._onComObjOnMessage = event => { + const data = event.data; + + if (data.targetName !== this.sourceName) { + return; + } + + if (data.stream) { + this._processStreamMessage(data); + + return; + } + + if (data.callback) { + const callbackId = data.callbackId; + const capability = this.callbackCapabilities[callbackId]; + + if (!capability) { + throw new Error(`Cannot resolve callback ${callbackId}`); + } + + delete this.callbackCapabilities[callbackId]; + + if (data.callback === CallbackKind.DATA) { + capability.resolve(data.data); + } else if (data.callback === CallbackKind.ERROR) { + capability.reject(wrapReason(data.reason)); + } else { + throw new Error("Unexpected callback case"); + } + + return; + } + + const action = this.actionHandler[data.action]; + + if (!action) { + throw new Error(`Unknown action from worker: ${data.action}`); + } + + if (data.callbackId) { + const cbSourceName = this.sourceName; + const cbTargetName = data.sourceName; + new Promise(function (resolve) { + resolve(action(data.data)); + }).then(function (result) { + comObj.postMessage({ + sourceName: cbSourceName, + targetName: cbTargetName, + callback: CallbackKind.DATA, + callbackId: data.callbackId, + data: result + }); + }, function (reason) { + comObj.postMessage({ + sourceName: cbSourceName, + targetName: cbTargetName, + callback: CallbackKind.ERROR, + callbackId: data.callbackId, + reason: wrapReason(reason) + }); + }); + return; + } + + if (data.streamId) { + this._createStreamSink(data); + + return; + } + + action(data.data); + }; + + comObj.addEventListener("message", this._onComObjOnMessage); + } + + on(actionName, handler) { + const ah = this.actionHandler; + + if (ah[actionName]) { + throw new Error(`There is already an actionName called "${actionName}"`); + } + + ah[actionName] = handler; + } + + send(actionName, data, transfers) { + this._postMessage({ + sourceName: this.sourceName, + targetName: this.targetName, + action: actionName, + data + }, transfers); + } + + sendWithPromise(actionName, data, transfers) { + const callbackId = this.callbackId++; + const capability = (0, _util.createPromiseCapability)(); + this.callbackCapabilities[callbackId] = capability; + + try { + this._postMessage({ + sourceName: this.sourceName, + targetName: this.targetName, + action: actionName, + callbackId, + data + }, transfers); + } catch (ex) { + capability.reject(ex); + } + + return capability.promise; + } + + sendWithStream(actionName, data, queueingStrategy, transfers) { + const streamId = this.streamId++; + const sourceName = this.sourceName; + const targetName = this.targetName; + const comObj = this.comObj; + return new ReadableStream({ + start: controller => { + const startCapability = (0, _util.createPromiseCapability)(); + this.streamControllers[streamId] = { + controller, + startCall: startCapability, + pullCall: null, + cancelCall: null, + isClosed: false + }; + + this._postMessage({ + sourceName, + targetName, + action: actionName, + streamId, + data, + desiredSize: controller.desiredSize + }, transfers); + + return startCapability.promise; + }, + pull: controller => { + const pullCapability = (0, _util.createPromiseCapability)(); + this.streamControllers[streamId].pullCall = pullCapability; + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.PULL, + streamId, + desiredSize: controller.desiredSize + }); + return pullCapability.promise; + }, + cancel: reason => { + (0, _util.assert)(reason instanceof Error, "cancel must have a valid reason"); + const cancelCapability = (0, _util.createPromiseCapability)(); + this.streamControllers[streamId].cancelCall = cancelCapability; + this.streamControllers[streamId].isClosed = true; + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.CANCEL, + streamId, + reason: wrapReason(reason) + }); + return cancelCapability.promise; + } + }, queueingStrategy); + } + + _createStreamSink(data) { + const self = this; + const action = this.actionHandler[data.action]; + const streamId = data.streamId; + const sourceName = this.sourceName; + const targetName = data.sourceName; + const comObj = this.comObj; + const streamSink = { + enqueue(chunk, size = 1, transfers) { + if (this.isCancelled) { + return; + } + + const lastDesiredSize = this.desiredSize; + this.desiredSize -= size; + + if (lastDesiredSize > 0 && this.desiredSize <= 0) { + this.sinkCapability = (0, _util.createPromiseCapability)(); + this.ready = this.sinkCapability.promise; + } + + self._postMessage({ + sourceName, + targetName, + stream: StreamKind.ENQUEUE, + streamId, + chunk + }, transfers); + }, + + close() { + if (this.isCancelled) { + return; + } + + this.isCancelled = true; + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.CLOSE, + streamId + }); + delete self.streamSinks[streamId]; + }, + + error(reason) { + (0, _util.assert)(reason instanceof Error, "error must have a valid reason"); + + if (this.isCancelled) { + return; + } + + this.isCancelled = true; + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.ERROR, + streamId, + reason: wrapReason(reason) + }); + }, + + sinkCapability: (0, _util.createPromiseCapability)(), + onPull: null, + onCancel: null, + isCancelled: false, + desiredSize: data.desiredSize, + ready: null + }; + streamSink.sinkCapability.resolve(); + streamSink.ready = streamSink.sinkCapability.promise; + this.streamSinks[streamId] = streamSink; + new Promise(function (resolve) { + resolve(action(data.data, streamSink)); + }).then(function () { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.START_COMPLETE, + streamId, + success: true + }); + }, function (reason) { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.START_COMPLETE, + streamId, + reason: wrapReason(reason) + }); + }); + } + + _processStreamMessage(data) { + const streamId = data.streamId; + const sourceName = this.sourceName; + const targetName = data.sourceName; + const comObj = this.comObj; + + switch (data.stream) { + case StreamKind.START_COMPLETE: + if (data.success) { + this.streamControllers[streamId].startCall.resolve(); + } else { + this.streamControllers[streamId].startCall.reject(wrapReason(data.reason)); + } + + break; + + case StreamKind.PULL_COMPLETE: + if (data.success) { + this.streamControllers[streamId].pullCall.resolve(); + } else { + this.streamControllers[streamId].pullCall.reject(wrapReason(data.reason)); + } + + break; + + case StreamKind.PULL: + if (!this.streamSinks[streamId]) { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.PULL_COMPLETE, + streamId, + success: true + }); + break; + } + + if (this.streamSinks[streamId].desiredSize <= 0 && data.desiredSize > 0) { + this.streamSinks[streamId].sinkCapability.resolve(); + } + + this.streamSinks[streamId].desiredSize = data.desiredSize; + const { + onPull + } = this.streamSinks[data.streamId]; + new Promise(function (resolve) { + resolve(onPull && onPull()); + }).then(function () { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.PULL_COMPLETE, + streamId, + success: true + }); + }, function (reason) { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.PULL_COMPLETE, + streamId, + reason: wrapReason(reason) + }); + }); + break; + + case StreamKind.ENQUEUE: + (0, _util.assert)(this.streamControllers[streamId], "enqueue should have stream controller"); + + if (this.streamControllers[streamId].isClosed) { + break; + } + + this.streamControllers[streamId].controller.enqueue(data.chunk); + break; + + case StreamKind.CLOSE: + (0, _util.assert)(this.streamControllers[streamId], "close should have stream controller"); + + if (this.streamControllers[streamId].isClosed) { + break; + } + + this.streamControllers[streamId].isClosed = true; + this.streamControllers[streamId].controller.close(); + + this._deleteStreamController(streamId); + + break; + + case StreamKind.ERROR: + (0, _util.assert)(this.streamControllers[streamId], "error should have stream controller"); + this.streamControllers[streamId].controller.error(wrapReason(data.reason)); + + this._deleteStreamController(streamId); + + break; + + case StreamKind.CANCEL_COMPLETE: + if (data.success) { + this.streamControllers[streamId].cancelCall.resolve(); + } else { + this.streamControllers[streamId].cancelCall.reject(wrapReason(data.reason)); + } + + this._deleteStreamController(streamId); + + break; + + case StreamKind.CANCEL: + if (!this.streamSinks[streamId]) { + break; + } + + const { + onCancel + } = this.streamSinks[data.streamId]; + new Promise(function (resolve) { + resolve(onCancel && onCancel(wrapReason(data.reason))); + }).then(function () { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.CANCEL_COMPLETE, + streamId, + success: true + }); + }, function (reason) { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.CANCEL_COMPLETE, + streamId, + reason: wrapReason(reason) + }); + }); + this.streamSinks[streamId].sinkCapability.reject(wrapReason(data.reason)); + this.streamSinks[streamId].isCancelled = true; + delete this.streamSinks[streamId]; + break; + + default: + throw new Error("Unexpected stream case"); + } + } + + async _deleteStreamController(streamId) { + await Promise.allSettled([this.streamControllers[streamId].startCall, this.streamControllers[streamId].pullCall, this.streamControllers[streamId].cancelCall].map(function (capability) { + return capability && capability.promise; + })); + delete this.streamControllers[streamId]; + } + + _postMessage(message, transfers) { + if (transfers && this.postMessageTransfers) { + this.comObj.postMessage(message, transfers); + } else { + this.comObj.postMessage(message); + } + } + + destroy() { + this.comObj.removeEventListener("message", this._onComObjOnMessage); + } + +} + +exports.MessageHandler = MessageHandler; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Metadata = void 0; + +var _util = __w_pdfjs_require__(2); + +var _xml_parser = __w_pdfjs_require__(13); + +class Metadata { + constructor(data) { + (0, _util.assert)(typeof data === "string", "Metadata: input is not a string"); + data = this._repair(data); + const parser = new _xml_parser.SimpleXMLParser(); + const xmlDocument = parser.parseFromString(data); + this._metadataMap = new Map(); + + if (xmlDocument) { + this._parse(xmlDocument); + } + } + + _repair(data) { + return data.replace(/^[^<]+/, "").replace(/>\\376\\377([^<]+)/g, function (all, codes) { + const bytes = codes.replace(/\\([0-3])([0-7])([0-7])/g, function (code, d1, d2, d3) { + return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1); + }).replace(/&(amp|apos|gt|lt|quot);/g, function (str, name) { + switch (name) { + case "amp": + return "&"; + + case "apos": + return "'"; + + case "gt": + return ">"; + + case "lt": + return "<"; + + case "quot": + return '"'; + } + + throw new Error(`_repair: ${name} isn't defined.`); + }); + let chars = ""; + + for (let i = 0, ii = bytes.length; i < ii; i += 2) { + const code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1); + + if (code >= 32 && code < 127 && code !== 60 && code !== 62 && code !== 38) { + chars += String.fromCharCode(code); + } else { + chars += "&#x" + (0x10000 + code).toString(16).substring(1) + ";"; + } + } + + return ">" + chars; + }); + } + + _parse(xmlDocument) { + let rdf = xmlDocument.documentElement; + + if (rdf.nodeName.toLowerCase() !== "rdf:rdf") { + rdf = rdf.firstChild; + + while (rdf && rdf.nodeName.toLowerCase() !== "rdf:rdf") { + rdf = rdf.nextSibling; + } + } + + const nodeName = rdf ? rdf.nodeName.toLowerCase() : null; + + if (!rdf || nodeName !== "rdf:rdf" || !rdf.hasChildNodes()) { + return; + } + + const children = rdf.childNodes; + + for (let i = 0, ii = children.length; i < ii; i++) { + const desc = children[i]; + + if (desc.nodeName.toLowerCase() !== "rdf:description") { + continue; + } + + for (let j = 0, jj = desc.childNodes.length; j < jj; j++) { + if (desc.childNodes[j].nodeName.toLowerCase() !== "#text") { + const entry = desc.childNodes[j]; + const name = entry.nodeName.toLowerCase(); + + this._metadataMap.set(name, entry.textContent.trim()); + } + } + } + } + + get(name) { + return this._metadataMap.has(name) ? this._metadataMap.get(name) : null; + } + + getAll() { + const obj = Object.create(null); + + for (const [key, value] of this._metadataMap) { + obj[key] = value; + } + + return obj; + } + + has(name) { + return this._metadataMap.has(name); + } + +} + +exports.Metadata = Metadata; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SimpleXMLParser = void 0; +const XMLParserErrorCode = { + NoError: 0, + EndOfDocument: -1, + UnterminatedCdat: -2, + UnterminatedXmlDeclaration: -3, + UnterminatedDoctypeDeclaration: -4, + UnterminatedComment: -5, + MalformedElement: -6, + OutOfMemory: -7, + UnterminatedAttributeValue: -8, + UnterminatedElement: -9, + ElementNeverBegun: -10 +}; + +function isWhitespace(s, index) { + const ch = s[index]; + return ch === " " || ch === "\n" || ch === "\r" || ch === "\t"; +} + +function isWhitespaceString(s) { + for (let i = 0, ii = s.length; i < ii; i++) { + if (!isWhitespace(s, i)) { + return false; + } + } + + return true; +} + +class XMLParserBase { + _resolveEntities(s) { + return s.replace(/&([^;]+);/g, (all, entity) => { + if (entity.substring(0, 2) === "#x") { + return String.fromCharCode(parseInt(entity.substring(2), 16)); + } else if (entity.substring(0, 1) === "#") { + return String.fromCharCode(parseInt(entity.substring(1), 10)); + } + + switch (entity) { + case "lt": + return "<"; + + case "gt": + return ">"; + + case "amp": + return "&"; + + case "quot": + return '"'; + } + + return this.onResolveEntity(entity); + }); + } + + _parseContent(s, start) { + const attributes = []; + let pos = start; + + function skipWs() { + while (pos < s.length && isWhitespace(s, pos)) { + ++pos; + } + } + + while (pos < s.length && !isWhitespace(s, pos) && s[pos] !== ">" && s[pos] !== "/") { + ++pos; + } + + const name = s.substring(start, pos); + skipWs(); + + while (pos < s.length && s[pos] !== ">" && s[pos] !== "/" && s[pos] !== "?") { + skipWs(); + let attrName = "", + attrValue = ""; + + while (pos < s.length && !isWhitespace(s, pos) && s[pos] !== "=") { + attrName += s[pos]; + ++pos; + } + + skipWs(); + + if (s[pos] !== "=") { + return null; + } + + ++pos; + skipWs(); + const attrEndChar = s[pos]; + + if (attrEndChar !== '"' && attrEndChar !== "'") { + return null; + } + + const attrEndIndex = s.indexOf(attrEndChar, ++pos); + + if (attrEndIndex < 0) { + return null; + } + + attrValue = s.substring(pos, attrEndIndex); + attributes.push({ + name: attrName, + value: this._resolveEntities(attrValue) + }); + pos = attrEndIndex + 1; + skipWs(); + } + + return { + name, + attributes, + parsed: pos - start + }; + } + + _parseProcessingInstruction(s, start) { + let pos = start; + + function skipWs() { + while (pos < s.length && isWhitespace(s, pos)) { + ++pos; + } + } + + while (pos < s.length && !isWhitespace(s, pos) && s[pos] !== ">" && s[pos] !== "/") { + ++pos; + } + + const name = s.substring(start, pos); + skipWs(); + const attrStart = pos; + + while (pos < s.length && (s[pos] !== "?" || s[pos + 1] !== ">")) { + ++pos; + } + + const value = s.substring(attrStart, pos); + return { + name, + value, + parsed: pos - start + }; + } + + parseXml(s) { + let i = 0; + + while (i < s.length) { + const ch = s[i]; + let j = i; + + if (ch === "<") { + ++j; + const ch2 = s[j]; + let q; + + switch (ch2) { + case "/": + ++j; + q = s.indexOf(">", j); + + if (q < 0) { + this.onError(XMLParserErrorCode.UnterminatedElement); + return; + } + + this.onEndElement(s.substring(j, q)); + j = q + 1; + break; + + case "?": + ++j; + + const pi = this._parseProcessingInstruction(s, j); + + if (s.substring(j + pi.parsed, j + pi.parsed + 2) !== "?>") { + this.onError(XMLParserErrorCode.UnterminatedXmlDeclaration); + return; + } + + this.onPi(pi.name, pi.value); + j += pi.parsed + 2; + break; + + case "!": + if (s.substring(j + 1, j + 3) === "--") { + q = s.indexOf("-->", j + 3); + + if (q < 0) { + this.onError(XMLParserErrorCode.UnterminatedComment); + return; + } + + this.onComment(s.substring(j + 3, q)); + j = q + 3; + } else if (s.substring(j + 1, j + 8) === "[CDATA[") { + q = s.indexOf("]]>", j + 8); + + if (q < 0) { + this.onError(XMLParserErrorCode.UnterminatedCdat); + return; + } + + this.onCdata(s.substring(j + 8, q)); + j = q + 3; + } else if (s.substring(j + 1, j + 8) === "DOCTYPE") { + const q2 = s.indexOf("[", j + 8); + let complexDoctype = false; + q = s.indexOf(">", j + 8); + + if (q < 0) { + this.onError(XMLParserErrorCode.UnterminatedDoctypeDeclaration); + return; + } + + if (q2 > 0 && q > q2) { + q = s.indexOf("]>", j + 8); + + if (q < 0) { + this.onError(XMLParserErrorCode.UnterminatedDoctypeDeclaration); + return; + } + + complexDoctype = true; + } + + const doctypeContent = s.substring(j + 8, q + (complexDoctype ? 1 : 0)); + this.onDoctype(doctypeContent); + j = q + (complexDoctype ? 2 : 1); + } else { + this.onError(XMLParserErrorCode.MalformedElement); + return; + } + + break; + + default: + const content = this._parseContent(s, j); + + if (content === null) { + this.onError(XMLParserErrorCode.MalformedElement); + return; + } + + let isClosed = false; + + if (s.substring(j + content.parsed, j + content.parsed + 2) === "/>") { + isClosed = true; + } else if (s.substring(j + content.parsed, j + content.parsed + 1) !== ">") { + this.onError(XMLParserErrorCode.UnterminatedElement); + return; + } + + this.onBeginElement(content.name, content.attributes, isClosed); + j += content.parsed + (isClosed ? 2 : 1); + break; + } + } else { + while (j < s.length && s[j] !== "<") { + j++; + } + + const text = s.substring(i, j); + this.onText(this._resolveEntities(text)); + } + + i = j; + } + } + + onResolveEntity(name) { + return `&${name};`; + } + + onPi(name, value) {} + + onComment(text) {} + + onCdata(text) {} + + onDoctype(doctypeContent) {} + + onText(text) {} + + onBeginElement(name, attributes, isEmpty) {} + + onEndElement(name) {} + + onError(code) {} + +} + +class SimpleDOMNode { + constructor(nodeName, nodeValue) { + this.nodeName = nodeName; + this.nodeValue = nodeValue; + Object.defineProperty(this, "parentNode", { + value: null, + writable: true + }); + } + + get firstChild() { + return this.childNodes && this.childNodes[0]; + } + + get nextSibling() { + const childNodes = this.parentNode.childNodes; + + if (!childNodes) { + return undefined; + } + + const index = childNodes.indexOf(this); + + if (index === -1) { + return undefined; + } + + return childNodes[index + 1]; + } + + get textContent() { + if (!this.childNodes) { + return this.nodeValue || ""; + } + + return this.childNodes.map(function (child) { + return child.textContent; + }).join(""); + } + + hasChildNodes() { + return this.childNodes && this.childNodes.length > 0; + } + +} + +class SimpleXMLParser extends XMLParserBase { + constructor() { + super(); + this._currentFragment = null; + this._stack = null; + this._errorCode = XMLParserErrorCode.NoError; + } + + parseFromString(data) { + this._currentFragment = []; + this._stack = []; + this._errorCode = XMLParserErrorCode.NoError; + this.parseXml(data); + + if (this._errorCode !== XMLParserErrorCode.NoError) { + return undefined; + } + + const [documentElement] = this._currentFragment; + + if (!documentElement) { + return undefined; + } + + return { + documentElement + }; + } + + onResolveEntity(name) { + switch (name) { + case "apos": + return "'"; + } + + return super.onResolveEntity(name); + } + + onText(text) { + if (isWhitespaceString(text)) { + return; + } + + const node = new SimpleDOMNode("#text", text); + + this._currentFragment.push(node); + } + + onCdata(text) { + const node = new SimpleDOMNode("#text", text); + + this._currentFragment.push(node); + } + + onBeginElement(name, attributes, isEmpty) { + const node = new SimpleDOMNode(name); + node.childNodes = []; + + this._currentFragment.push(node); + + if (isEmpty) { + return; + } + + this._stack.push(this._currentFragment); + + this._currentFragment = node.childNodes; + } + + onEndElement(name) { + this._currentFragment = this._stack.pop() || []; + const lastElement = this._currentFragment[this._currentFragment.length - 1]; + + if (!lastElement) { + return; + } + + for (let i = 0, ii = lastElement.childNodes.length; i < ii; i++) { + lastElement.childNodes[i].parentNode = lastElement; + } + } + + onError(code) { + this._errorCode = code; + } + +} + +exports.SimpleXMLParser = SimpleXMLParser; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFDataTransportStream = void 0; + +var _util = __w_pdfjs_require__(2); + +class PDFDataTransportStream { + constructor(params, pdfDataRangeTransport) { + (0, _util.assert)(pdfDataRangeTransport, 'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'); + this._queuedChunks = []; + this._progressiveDone = params.progressiveDone || false; + const initialData = params.initialData; + + if (initialData && initialData.length > 0) { + const buffer = new Uint8Array(initialData).buffer; + + this._queuedChunks.push(buffer); + } + + this._pdfDataRangeTransport = pdfDataRangeTransport; + this._isStreamingSupported = !params.disableStream; + this._isRangeSupported = !params.disableRange; + this._contentLength = params.length; + this._fullRequestReader = null; + this._rangeReaders = []; + + this._pdfDataRangeTransport.addRangeListener((begin, chunk) => { + this._onReceiveData({ + begin, + chunk + }); + }); + + this._pdfDataRangeTransport.addProgressListener((loaded, total) => { + this._onProgress({ + loaded, + total + }); + }); + + this._pdfDataRangeTransport.addProgressiveReadListener(chunk => { + this._onReceiveData({ + chunk + }); + }); + + this._pdfDataRangeTransport.addProgressiveDoneListener(() => { + this._onProgressiveDone(); + }); + + this._pdfDataRangeTransport.transportReady(); + } + + _onReceiveData(args) { + const buffer = new Uint8Array(args.chunk).buffer; + + if (args.begin === undefined) { + if (this._fullRequestReader) { + this._fullRequestReader._enqueue(buffer); + } else { + this._queuedChunks.push(buffer); + } + } else { + const found = this._rangeReaders.some(function (rangeReader) { + if (rangeReader._begin !== args.begin) { + return false; + } + + rangeReader._enqueue(buffer); + + return true; + }); + + (0, _util.assert)(found, "_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found."); + } + } + + get _progressiveDataLength() { + return this._fullRequestReader ? this._fullRequestReader._loaded : 0; + } + + _onProgress(evt) { + if (evt.total === undefined) { + const firstReader = this._rangeReaders[0]; + + if (firstReader && firstReader.onProgress) { + firstReader.onProgress({ + loaded: evt.loaded + }); + } + } else { + const fullReader = this._fullRequestReader; + + if (fullReader && fullReader.onProgress) { + fullReader.onProgress({ + loaded: evt.loaded, + total: evt.total + }); + } + } + } + + _onProgressiveDone() { + if (this._fullRequestReader) { + this._fullRequestReader.progressiveDone(); + } + + this._progressiveDone = true; + } + + _removeRangeReader(reader) { + const i = this._rangeReaders.indexOf(reader); + + if (i >= 0) { + this._rangeReaders.splice(i, 1); + } + } + + getFullReader() { + (0, _util.assert)(!this._fullRequestReader, "PDFDataTransportStream.getFullReader can only be called once."); + const queuedChunks = this._queuedChunks; + this._queuedChunks = null; + return new PDFDataTransportStreamReader(this, queuedChunks, this._progressiveDone); + } + + getRangeReader(begin, end) { + if (end <= this._progressiveDataLength) { + return null; + } + + const reader = new PDFDataTransportStreamRangeReader(this, begin, end); + + this._pdfDataRangeTransport.requestDataRange(begin, end); + + this._rangeReaders.push(reader); + + return reader; + } + + cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } + + const readers = this._rangeReaders.slice(0); + + readers.forEach(function (rangeReader) { + rangeReader.cancel(reason); + }); + + this._pdfDataRangeTransport.abort(); + } + +} + +exports.PDFDataTransportStream = PDFDataTransportStream; + +class PDFDataTransportStreamReader { + constructor(stream, queuedChunks, progressiveDone = false) { + this._stream = stream; + this._done = progressiveDone || false; + this._filename = null; + this._queuedChunks = queuedChunks || []; + this._loaded = 0; + + for (const chunk of this._queuedChunks) { + this._loaded += chunk.byteLength; + } + + this._requests = []; + this._headersReady = Promise.resolve(); + stream._fullRequestReader = this; + this.onProgress = null; + } + + _enqueue(chunk) { + if (this._done) { + return; + } + + if (this._requests.length > 0) { + const requestCapability = this._requests.shift(); + + requestCapability.resolve({ + value: chunk, + done: false + }); + } else { + this._queuedChunks.push(chunk); + } + + this._loaded += chunk.byteLength; + } + + get headersReady() { + return this._headersReady; + } + + get filename() { + return this._filename; + } + + get isRangeSupported() { + return this._stream._isRangeSupported; + } + + get isStreamingSupported() { + return this._stream._isStreamingSupported; + } + + get contentLength() { + return this._stream._contentLength; + } + + async read() { + if (this._queuedChunks.length > 0) { + const chunk = this._queuedChunks.shift(); + + return { + value: chunk, + done: false + }; + } + + if (this._done) { + return { + value: undefined, + done: true + }; + } + + const requestCapability = (0, _util.createPromiseCapability)(); + + this._requests.push(requestCapability); + + return requestCapability.promise; + } + + cancel(reason) { + this._done = true; + + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + } + + progressiveDone() { + if (this._done) { + return; + } + + this._done = true; + } + +} + +class PDFDataTransportStreamRangeReader { + constructor(stream, begin, end) { + this._stream = stream; + this._begin = begin; + this._end = end; + this._queuedChunk = null; + this._requests = []; + this._done = false; + this.onProgress = null; + } + + _enqueue(chunk) { + if (this._done) { + return; + } + + if (this._requests.length === 0) { + this._queuedChunk = chunk; + } else { + const requestsCapability = this._requests.shift(); + + requestsCapability.resolve({ + value: chunk, + done: false + }); + + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + } + + this._done = true; + + this._stream._removeRangeReader(this); + } + + get isStreamingSupported() { + return false; + } + + async read() { + if (this._queuedChunk) { + const chunk = this._queuedChunk; + this._queuedChunk = null; + return { + value: chunk, + done: false + }; + } + + if (this._done) { + return { + value: undefined, + done: true + }; + } + + const requestCapability = (0, _util.createPromiseCapability)(); + + this._requests.push(requestCapability); + + return requestCapability.promise; + } + + cancel(reason) { + this._done = true; + + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + + this._stream._removeRangeReader(this); + } + +} + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WebGLContext = void 0; + +var _util = __w_pdfjs_require__(2); + +class WebGLContext { + constructor({ + enable = false + }) { + this._enabled = enable === true; + } + + get isEnabled() { + let enabled = this._enabled; + + if (enabled) { + enabled = WebGLUtils.tryInitGL(); + } + + return (0, _util.shadow)(this, "isEnabled", enabled); + } + + composeSMask({ + layer, + mask, + properties + }) { + return WebGLUtils.composeSMask(layer, mask, properties); + } + + drawFigures({ + width, + height, + backgroundColor, + figures, + context + }) { + return WebGLUtils.drawFigures(width, height, backgroundColor, figures, context); + } + + clear() { + WebGLUtils.cleanup(); + } + +} + +exports.WebGLContext = WebGLContext; + +var WebGLUtils = function WebGLUtilsClosure() { + function loadShader(gl, code, shaderType) { + var shader = gl.createShader(shaderType); + gl.shaderSource(shader, code); + gl.compileShader(shader); + var compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS); + + if (!compiled) { + var errorMsg = gl.getShaderInfoLog(shader); + throw new Error("Error during shader compilation: " + errorMsg); + } + + return shader; + } + + function createVertexShader(gl, code) { + return loadShader(gl, code, gl.VERTEX_SHADER); + } + + function createFragmentShader(gl, code) { + return loadShader(gl, code, gl.FRAGMENT_SHADER); + } + + function createProgram(gl, shaders) { + var program = gl.createProgram(); + + for (var i = 0, ii = shaders.length; i < ii; ++i) { + gl.attachShader(program, shaders[i]); + } + + gl.linkProgram(program); + var linked = gl.getProgramParameter(program, gl.LINK_STATUS); + + if (!linked) { + var errorMsg = gl.getProgramInfoLog(program); + throw new Error("Error during program linking: " + errorMsg); + } + + return program; + } + + function createTexture(gl, image, textureId) { + gl.activeTexture(textureId); + var texture = gl.createTexture(); + gl.bindTexture(gl.TEXTURE_2D, texture); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image); + return texture; + } + + var currentGL, currentCanvas; + + function generateGL() { + if (currentGL) { + return; + } + + currentCanvas = document.createElement("canvas"); + currentGL = currentCanvas.getContext("webgl", { + premultipliedalpha: false + }); + } + + var smaskVertexShaderCode = "\ + attribute vec2 a_position; \ + attribute vec2 a_texCoord; \ + \ + uniform vec2 u_resolution; \ + \ + varying vec2 v_texCoord; \ + \ + void main() { \ + vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; \ + gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \ + \ + v_texCoord = a_texCoord; \ + } "; + var smaskFragmentShaderCode = "\ + precision mediump float; \ + \ + uniform vec4 u_backdrop; \ + uniform int u_subtype; \ + uniform sampler2D u_image; \ + uniform sampler2D u_mask; \ + \ + varying vec2 v_texCoord; \ + \ + void main() { \ + vec4 imageColor = texture2D(u_image, v_texCoord); \ + vec4 maskColor = texture2D(u_mask, v_texCoord); \ + if (u_backdrop.a > 0.0) { \ + maskColor.rgb = maskColor.rgb * maskColor.a + \ + u_backdrop.rgb * (1.0 - maskColor.a); \ + } \ + float lum; \ + if (u_subtype == 0) { \ + lum = maskColor.a; \ + } else { \ + lum = maskColor.r * 0.3 + maskColor.g * 0.59 + \ + maskColor.b * 0.11; \ + } \ + imageColor.a *= lum; \ + imageColor.rgb *= imageColor.a; \ + gl_FragColor = imageColor; \ + } "; + var smaskCache = null; + + function initSmaskGL() { + var canvas, gl; + generateGL(); + canvas = currentCanvas; + currentCanvas = null; + gl = currentGL; + currentGL = null; + var vertexShader = createVertexShader(gl, smaskVertexShaderCode); + var fragmentShader = createFragmentShader(gl, smaskFragmentShaderCode); + var program = createProgram(gl, [vertexShader, fragmentShader]); + gl.useProgram(program); + var cache = {}; + cache.gl = gl; + cache.canvas = canvas; + cache.resolutionLocation = gl.getUniformLocation(program, "u_resolution"); + cache.positionLocation = gl.getAttribLocation(program, "a_position"); + cache.backdropLocation = gl.getUniformLocation(program, "u_backdrop"); + cache.subtypeLocation = gl.getUniformLocation(program, "u_subtype"); + var texCoordLocation = gl.getAttribLocation(program, "a_texCoord"); + var texLayerLocation = gl.getUniformLocation(program, "u_image"); + var texMaskLocation = gl.getUniformLocation(program, "u_mask"); + var texCoordBuffer = gl.createBuffer(); + gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer); + gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0]), gl.STATIC_DRAW); + gl.enableVertexAttribArray(texCoordLocation); + gl.vertexAttribPointer(texCoordLocation, 2, gl.FLOAT, false, 0, 0); + gl.uniform1i(texLayerLocation, 0); + gl.uniform1i(texMaskLocation, 1); + smaskCache = cache; + } + + function composeSMask(layer, mask, properties) { + var width = layer.width, + height = layer.height; + + if (!smaskCache) { + initSmaskGL(); + } + + var cache = smaskCache, + canvas = cache.canvas, + gl = cache.gl; + canvas.width = width; + canvas.height = height; + gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); + gl.uniform2f(cache.resolutionLocation, width, height); + + if (properties.backdrop) { + gl.uniform4f(cache.resolutionLocation, properties.backdrop[0], properties.backdrop[1], properties.backdrop[2], 1); + } else { + gl.uniform4f(cache.resolutionLocation, 0, 0, 0, 0); + } + + gl.uniform1i(cache.subtypeLocation, properties.subtype === "Luminosity" ? 1 : 0); + var texture = createTexture(gl, layer, gl.TEXTURE0); + var maskTexture = createTexture(gl, mask, gl.TEXTURE1); + var buffer = gl.createBuffer(); + gl.bindBuffer(gl.ARRAY_BUFFER, buffer); + gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([0, 0, width, 0, 0, height, 0, height, width, 0, width, height]), gl.STATIC_DRAW); + gl.enableVertexAttribArray(cache.positionLocation); + gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0); + gl.clearColor(0, 0, 0, 0); + gl.enable(gl.BLEND); + gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); + gl.clear(gl.COLOR_BUFFER_BIT); + gl.drawArrays(gl.TRIANGLES, 0, 6); + gl.flush(); + gl.deleteTexture(texture); + gl.deleteTexture(maskTexture); + gl.deleteBuffer(buffer); + return canvas; + } + + var figuresVertexShaderCode = "\ + attribute vec2 a_position; \ + attribute vec3 a_color; \ + \ + uniform vec2 u_resolution; \ + uniform vec2 u_scale; \ + uniform vec2 u_offset; \ + \ + varying vec4 v_color; \ + \ + void main() { \ + vec2 position = (a_position + u_offset) * u_scale; \ + vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; \ + gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \ + \ + v_color = vec4(a_color / 255.0, 1.0); \ + } "; + var figuresFragmentShaderCode = "\ + precision mediump float; \ + \ + varying vec4 v_color; \ + \ + void main() { \ + gl_FragColor = v_color; \ + } "; + var figuresCache = null; + + function initFiguresGL() { + var canvas, gl; + generateGL(); + canvas = currentCanvas; + currentCanvas = null; + gl = currentGL; + currentGL = null; + var vertexShader = createVertexShader(gl, figuresVertexShaderCode); + var fragmentShader = createFragmentShader(gl, figuresFragmentShaderCode); + var program = createProgram(gl, [vertexShader, fragmentShader]); + gl.useProgram(program); + var cache = {}; + cache.gl = gl; + cache.canvas = canvas; + cache.resolutionLocation = gl.getUniformLocation(program, "u_resolution"); + cache.scaleLocation = gl.getUniformLocation(program, "u_scale"); + cache.offsetLocation = gl.getUniformLocation(program, "u_offset"); + cache.positionLocation = gl.getAttribLocation(program, "a_position"); + cache.colorLocation = gl.getAttribLocation(program, "a_color"); + figuresCache = cache; + } + + function drawFigures(width, height, backgroundColor, figures, context) { + if (!figuresCache) { + initFiguresGL(); + } + + var cache = figuresCache, + canvas = cache.canvas, + gl = cache.gl; + canvas.width = width; + canvas.height = height; + gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); + gl.uniform2f(cache.resolutionLocation, width, height); + var count = 0; + var i, ii, rows; + + for (i = 0, ii = figures.length; i < ii; i++) { + switch (figures[i].type) { + case "lattice": + rows = figures[i].coords.length / figures[i].verticesPerRow | 0; + count += (rows - 1) * (figures[i].verticesPerRow - 1) * 6; + break; + + case "triangles": + count += figures[i].coords.length; + break; + } + } + + var coords = new Float32Array(count * 2); + var colors = new Uint8Array(count * 3); + var coordsMap = context.coords, + colorsMap = context.colors; + var pIndex = 0, + cIndex = 0; + + for (i = 0, ii = figures.length; i < ii; i++) { + var figure = figures[i], + ps = figure.coords, + cs = figure.colors; + + switch (figure.type) { + case "lattice": + var cols = figure.verticesPerRow; + rows = ps.length / cols | 0; + + for (var row = 1; row < rows; row++) { + var offset = row * cols + 1; + + for (var col = 1; col < cols; col++, offset++) { + coords[pIndex] = coordsMap[ps[offset - cols - 1]]; + coords[pIndex + 1] = coordsMap[ps[offset - cols - 1] + 1]; + coords[pIndex + 2] = coordsMap[ps[offset - cols]]; + coords[pIndex + 3] = coordsMap[ps[offset - cols] + 1]; + coords[pIndex + 4] = coordsMap[ps[offset - 1]]; + coords[pIndex + 5] = coordsMap[ps[offset - 1] + 1]; + colors[cIndex] = colorsMap[cs[offset - cols - 1]]; + colors[cIndex + 1] = colorsMap[cs[offset - cols - 1] + 1]; + colors[cIndex + 2] = colorsMap[cs[offset - cols - 1] + 2]; + colors[cIndex + 3] = colorsMap[cs[offset - cols]]; + colors[cIndex + 4] = colorsMap[cs[offset - cols] + 1]; + colors[cIndex + 5] = colorsMap[cs[offset - cols] + 2]; + colors[cIndex + 6] = colorsMap[cs[offset - 1]]; + colors[cIndex + 7] = colorsMap[cs[offset - 1] + 1]; + colors[cIndex + 8] = colorsMap[cs[offset - 1] + 2]; + coords[pIndex + 6] = coords[pIndex + 2]; + coords[pIndex + 7] = coords[pIndex + 3]; + coords[pIndex + 8] = coords[pIndex + 4]; + coords[pIndex + 9] = coords[pIndex + 5]; + coords[pIndex + 10] = coordsMap[ps[offset]]; + coords[pIndex + 11] = coordsMap[ps[offset] + 1]; + colors[cIndex + 9] = colors[cIndex + 3]; + colors[cIndex + 10] = colors[cIndex + 4]; + colors[cIndex + 11] = colors[cIndex + 5]; + colors[cIndex + 12] = colors[cIndex + 6]; + colors[cIndex + 13] = colors[cIndex + 7]; + colors[cIndex + 14] = colors[cIndex + 8]; + colors[cIndex + 15] = colorsMap[cs[offset]]; + colors[cIndex + 16] = colorsMap[cs[offset] + 1]; + colors[cIndex + 17] = colorsMap[cs[offset] + 2]; + pIndex += 12; + cIndex += 18; + } + } + + break; + + case "triangles": + for (var j = 0, jj = ps.length; j < jj; j++) { + coords[pIndex] = coordsMap[ps[j]]; + coords[pIndex + 1] = coordsMap[ps[j] + 1]; + colors[cIndex] = colorsMap[cs[j]]; + colors[cIndex + 1] = colorsMap[cs[j] + 1]; + colors[cIndex + 2] = colorsMap[cs[j] + 2]; + pIndex += 2; + cIndex += 3; + } + + break; + } + } + + if (backgroundColor) { + gl.clearColor(backgroundColor[0] / 255, backgroundColor[1] / 255, backgroundColor[2] / 255, 1.0); + } else { + gl.clearColor(0, 0, 0, 0); + } + + gl.clear(gl.COLOR_BUFFER_BIT); + var coordsBuffer = gl.createBuffer(); + gl.bindBuffer(gl.ARRAY_BUFFER, coordsBuffer); + gl.bufferData(gl.ARRAY_BUFFER, coords, gl.STATIC_DRAW); + gl.enableVertexAttribArray(cache.positionLocation); + gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0); + var colorsBuffer = gl.createBuffer(); + gl.bindBuffer(gl.ARRAY_BUFFER, colorsBuffer); + gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW); + gl.enableVertexAttribArray(cache.colorLocation); + gl.vertexAttribPointer(cache.colorLocation, 3, gl.UNSIGNED_BYTE, false, 0, 0); + gl.uniform2f(cache.scaleLocation, context.scaleX, context.scaleY); + gl.uniform2f(cache.offsetLocation, context.offsetX, context.offsetY); + gl.drawArrays(gl.TRIANGLES, 0, count); + gl.flush(); + gl.deleteBuffer(coordsBuffer); + gl.deleteBuffer(colorsBuffer); + return canvas; + } + + return { + tryInitGL() { + try { + generateGL(); + return !!currentGL; + } catch (ex) {} + + return false; + }, + + composeSMask, + drawFigures, + + cleanup() { + if (smaskCache && smaskCache.canvas) { + smaskCache.canvas.width = 0; + smaskCache.canvas.height = 0; + } + + if (figuresCache && figuresCache.canvas) { + figuresCache.canvas.width = 0; + figuresCache.canvas.height = 0; + } + + smaskCache = null; + figuresCache = null; + } + + }; +}(); + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.AnnotationLayer = void 0; + +var _display_utils = __w_pdfjs_require__(1); + +var _util = __w_pdfjs_require__(2); + +class AnnotationElementFactory { + static create(parameters) { + const subtype = parameters.data.annotationType; + + switch (subtype) { + case _util.AnnotationType.LINK: + return new LinkAnnotationElement(parameters); + + case _util.AnnotationType.TEXT: + return new TextAnnotationElement(parameters); + + case _util.AnnotationType.WIDGET: + const fieldType = parameters.data.fieldType; + + switch (fieldType) { + case "Tx": + return new TextWidgetAnnotationElement(parameters); + + case "Btn": + if (parameters.data.radioButton) { + return new RadioButtonWidgetAnnotationElement(parameters); + } else if (parameters.data.checkBox) { + return new CheckboxWidgetAnnotationElement(parameters); + } + + return new PushButtonWidgetAnnotationElement(parameters); + + case "Ch": + return new ChoiceWidgetAnnotationElement(parameters); + } + + return new WidgetAnnotationElement(parameters); + + case _util.AnnotationType.POPUP: + return new PopupAnnotationElement(parameters); + + case _util.AnnotationType.FREETEXT: + return new FreeTextAnnotationElement(parameters); + + case _util.AnnotationType.LINE: + return new LineAnnotationElement(parameters); + + case _util.AnnotationType.SQUARE: + return new SquareAnnotationElement(parameters); + + case _util.AnnotationType.CIRCLE: + return new CircleAnnotationElement(parameters); + + case _util.AnnotationType.POLYLINE: + return new PolylineAnnotationElement(parameters); + + case _util.AnnotationType.CARET: + return new CaretAnnotationElement(parameters); + + case _util.AnnotationType.INK: + return new InkAnnotationElement(parameters); + + case _util.AnnotationType.POLYGON: + return new PolygonAnnotationElement(parameters); + + case _util.AnnotationType.HIGHLIGHT: + return new HighlightAnnotationElement(parameters); + + case _util.AnnotationType.UNDERLINE: + return new UnderlineAnnotationElement(parameters); + + case _util.AnnotationType.SQUIGGLY: + return new SquigglyAnnotationElement(parameters); + + case _util.AnnotationType.STRIKEOUT: + return new StrikeOutAnnotationElement(parameters); + + case _util.AnnotationType.STAMP: + return new StampAnnotationElement(parameters); + + case _util.AnnotationType.FILEATTACHMENT: + return new FileAttachmentAnnotationElement(parameters); + + default: + return new AnnotationElement(parameters); + } + } + +} + +class AnnotationElement { + constructor(parameters, isRenderable = false, ignoreBorder = false) { + this.isRenderable = isRenderable; + this.data = parameters.data; + this.layer = parameters.layer; + this.page = parameters.page; + this.viewport = parameters.viewport; + this.linkService = parameters.linkService; + this.downloadManager = parameters.downloadManager; + this.imageResourcesPath = parameters.imageResourcesPath; + this.renderInteractiveForms = parameters.renderInteractiveForms; + this.svgFactory = parameters.svgFactory; + + if (isRenderable) { + this.container = this._createContainer(ignoreBorder); + } + } + + _createContainer(ignoreBorder = false) { + const data = this.data, + page = this.page, + viewport = this.viewport; + const container = document.createElement("section"); + let width = data.rect[2] - data.rect[0]; + let height = data.rect[3] - data.rect[1]; + container.setAttribute("data-annotation-id", data.id); + + const rect = _util.Util.normalizeRect([data.rect[0], page.view[3] - data.rect[1] + page.view[1], data.rect[2], page.view[3] - data.rect[3] + page.view[1]]); + + container.style.transform = `matrix(${viewport.transform.join(",")})`; + container.style.transformOrigin = `-${rect[0]}px -${rect[1]}px`; + + if (!ignoreBorder && data.borderStyle.width > 0) { + container.style.borderWidth = `${data.borderStyle.width}px`; + + if (data.borderStyle.style !== _util.AnnotationBorderStyleType.UNDERLINE) { + width = width - 2 * data.borderStyle.width; + height = height - 2 * data.borderStyle.width; + } + + const horizontalRadius = data.borderStyle.horizontalCornerRadius; + const verticalRadius = data.borderStyle.verticalCornerRadius; + + if (horizontalRadius > 0 || verticalRadius > 0) { + const radius = `${horizontalRadius}px / ${verticalRadius}px`; + container.style.borderRadius = radius; + } + + switch (data.borderStyle.style) { + case _util.AnnotationBorderStyleType.SOLID: + container.style.borderStyle = "solid"; + break; + + case _util.AnnotationBorderStyleType.DASHED: + container.style.borderStyle = "dashed"; + break; + + case _util.AnnotationBorderStyleType.BEVELED: + (0, _util.warn)("Unimplemented border style: beveled"); + break; + + case _util.AnnotationBorderStyleType.INSET: + (0, _util.warn)("Unimplemented border style: inset"); + break; + + case _util.AnnotationBorderStyleType.UNDERLINE: + container.style.borderBottomStyle = "solid"; + break; + + default: + break; + } + + if (data.color) { + container.style.borderColor = _util.Util.makeCssRgb(data.color[0] | 0, data.color[1] | 0, data.color[2] | 0); + } else { + container.style.borderWidth = 0; + } + } + + container.style.left = `${rect[0]}px`; + container.style.top = `${rect[1]}px`; + container.style.width = `${width}px`; + container.style.height = `${height}px`; + return container; + } + + _createPopup(container, trigger, data) { + if (!trigger) { + trigger = document.createElement("div"); + trigger.style.height = container.style.height; + trigger.style.width = container.style.width; + container.appendChild(trigger); + } + + const popupElement = new PopupElement({ + container, + trigger, + color: data.color, + title: data.title, + modificationDate: data.modificationDate, + contents: data.contents, + hideWrapper: true + }); + const popup = popupElement.render(); + popup.style.left = container.style.width; + container.appendChild(popup); + } + + render() { + (0, _util.unreachable)("Abstract method `AnnotationElement.render` called"); + } + +} + +class LinkAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.url || parameters.data.dest || parameters.data.action); + super(parameters, isRenderable); + } + + render() { + this.container.className = "linkAnnotation"; + const { + data, + linkService + } = this; + const link = document.createElement("a"); + + if (data.url) { + (0, _display_utils.addLinkAttributes)(link, { + url: data.url, + target: data.newWindow ? _display_utils.LinkTarget.BLANK : linkService.externalLinkTarget, + rel: linkService.externalLinkRel, + enabled: linkService.externalLinkEnabled + }); + } else if (data.action) { + this._bindNamedAction(link, data.action); + } else { + this._bindLink(link, data.dest); + } + + this.container.appendChild(link); + return this.container; + } + + _bindLink(link, destination) { + link.href = this.linkService.getDestinationHash(destination); + + link.onclick = () => { + if (destination) { + this.linkService.navigateTo(destination); + } + + return false; + }; + + if (destination) { + link.className = "internalLink"; + } + } + + _bindNamedAction(link, action) { + link.href = this.linkService.getAnchorUrl(""); + + link.onclick = () => { + this.linkService.executeNamedAction(action); + return false; + }; + + link.className = "internalLink"; + } + +} + +class TextAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable); + } + + render() { + this.container.className = "textAnnotation"; + const image = document.createElement("img"); + image.style.height = this.container.style.height; + image.style.width = this.container.style.width; + image.src = this.imageResourcesPath + "annotation-" + this.data.name.toLowerCase() + ".svg"; + image.alt = "[{{type}} Annotation]"; + image.dataset.l10nId = "text_annotation_type"; + image.dataset.l10nArgs = JSON.stringify({ + type: this.data.name + }); + + if (!this.data.hasPopup) { + this._createPopup(this.container, image, this.data); + } + + this.container.appendChild(image); + return this.container; + } + +} + +class WidgetAnnotationElement extends AnnotationElement { + render() { + return this.container; + } + +} + +class TextWidgetAnnotationElement extends WidgetAnnotationElement { + constructor(parameters) { + const isRenderable = parameters.renderInteractiveForms || !parameters.data.hasAppearance && !!parameters.data.fieldValue; + super(parameters, isRenderable); + } + + render() { + const TEXT_ALIGNMENT = ["left", "center", "right"]; + this.container.className = "textWidgetAnnotation"; + let element = null; + + if (this.renderInteractiveForms) { + if (this.data.multiLine) { + element = document.createElement("textarea"); + element.textContent = this.data.fieldValue; + } else { + element = document.createElement("input"); + element.type = "text"; + element.setAttribute("value", this.data.fieldValue); + } + + element.disabled = this.data.readOnly; + element.name = this.data.fieldName; + + if (this.data.maxLen !== null) { + element.maxLength = this.data.maxLen; + } + + if (this.data.comb) { + const fieldWidth = this.data.rect[2] - this.data.rect[0]; + const combWidth = fieldWidth / this.data.maxLen; + element.classList.add("comb"); + element.style.letterSpacing = `calc(${combWidth}px - 1ch)`; + } + } else { + element = document.createElement("div"); + element.textContent = this.data.fieldValue; + element.style.verticalAlign = "middle"; + element.style.display = "table-cell"; + let font = null; + + if (this.data.fontRefName && this.page.commonObjs.has(this.data.fontRefName)) { + font = this.page.commonObjs.get(this.data.fontRefName); + } + + this._setTextStyle(element, font); + } + + if (this.data.textAlignment !== null) { + element.style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment]; + } + + this.container.appendChild(element); + return this.container; + } + + _setTextStyle(element, font) { + const style = element.style; + style.fontSize = `${this.data.fontSize}px`; + style.direction = this.data.fontDirection < 0 ? "rtl" : "ltr"; + + if (!font) { + return; + } + + let bold = "normal"; + + if (font.black) { + bold = "900"; + } else if (font.bold) { + bold = "bold"; + } + + style.fontWeight = bold; + style.fontStyle = font.italic ? "italic" : "normal"; + const fontFamily = font.loadedName ? `"${font.loadedName}", ` : ""; + const fallbackName = font.fallbackName || "Helvetica, sans-serif"; + style.fontFamily = fontFamily + fallbackName; + } + +} + +class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement { + constructor(parameters) { + super(parameters, parameters.renderInteractiveForms); + } + + render() { + this.container.className = "buttonWidgetAnnotation checkBox"; + const element = document.createElement("input"); + element.disabled = this.data.readOnly; + element.type = "checkbox"; + element.name = this.data.fieldName; + + if (this.data.fieldValue && this.data.fieldValue !== "Off") { + element.setAttribute("checked", true); + } + + this.container.appendChild(element); + return this.container; + } + +} + +class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement { + constructor(parameters) { + super(parameters, parameters.renderInteractiveForms); + } + + render() { + this.container.className = "buttonWidgetAnnotation radioButton"; + const element = document.createElement("input"); + element.disabled = this.data.readOnly; + element.type = "radio"; + element.name = this.data.fieldName; + + if (this.data.fieldValue === this.data.buttonValue) { + element.setAttribute("checked", true); + } + + this.container.appendChild(element); + return this.container; + } + +} + +class PushButtonWidgetAnnotationElement extends LinkAnnotationElement { + render() { + const container = super.render(); + container.className = "buttonWidgetAnnotation pushButton"; + return container; + } + +} + +class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement { + constructor(parameters) { + super(parameters, parameters.renderInteractiveForms); + } + + render() { + this.container.className = "choiceWidgetAnnotation"; + const selectElement = document.createElement("select"); + selectElement.disabled = this.data.readOnly; + selectElement.name = this.data.fieldName; + + if (!this.data.combo) { + selectElement.size = this.data.options.length; + + if (this.data.multiSelect) { + selectElement.multiple = true; + } + } + + for (const option of this.data.options) { + const optionElement = document.createElement("option"); + optionElement.textContent = option.displayValue; + optionElement.value = option.exportValue; + + if (this.data.fieldValue.includes(option.displayValue)) { + optionElement.setAttribute("selected", true); + } + + selectElement.appendChild(optionElement); + } + + this.container.appendChild(selectElement); + return this.container; + } + +} + +class PopupAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.title || parameters.data.contents); + super(parameters, isRenderable); + } + + render() { + const IGNORE_TYPES = ["Line", "Square", "Circle", "PolyLine", "Polygon", "Ink"]; + this.container.className = "popupAnnotation"; + + if (IGNORE_TYPES.includes(this.data.parentType)) { + return this.container; + } + + const selector = `[data-annotation-id="${this.data.parentId}"]`; + const parentElement = this.layer.querySelector(selector); + + if (!parentElement) { + return this.container; + } + + const popup = new PopupElement({ + container: this.container, + trigger: parentElement, + color: this.data.color, + title: this.data.title, + modificationDate: this.data.modificationDate, + contents: this.data.contents + }); + const parentLeft = parseFloat(parentElement.style.left); + const parentWidth = parseFloat(parentElement.style.width); + this.container.style.transformOrigin = `-${parentLeft + parentWidth}px -${parentElement.style.top}`; + this.container.style.left = `${parentLeft + parentWidth}px`; + this.container.appendChild(popup.render()); + return this.container; + } + +} + +class PopupElement { + constructor(parameters) { + this.container = parameters.container; + this.trigger = parameters.trigger; + this.color = parameters.color; + this.title = parameters.title; + this.modificationDate = parameters.modificationDate; + this.contents = parameters.contents; + this.hideWrapper = parameters.hideWrapper || false; + this.pinned = false; + } + + render() { + const BACKGROUND_ENLIGHT = 0.7; + const wrapper = document.createElement("div"); + wrapper.className = "popupWrapper"; + this.hideElement = this.hideWrapper ? wrapper : this.container; + this.hideElement.setAttribute("hidden", true); + const popup = document.createElement("div"); + popup.className = "popup"; + const color = this.color; + + if (color) { + const r = BACKGROUND_ENLIGHT * (255 - color[0]) + color[0]; + const g = BACKGROUND_ENLIGHT * (255 - color[1]) + color[1]; + const b = BACKGROUND_ENLIGHT * (255 - color[2]) + color[2]; + popup.style.backgroundColor = _util.Util.makeCssRgb(r | 0, g | 0, b | 0); + } + + const title = document.createElement("h1"); + title.textContent = this.title; + popup.appendChild(title); + + const dateObject = _display_utils.PDFDateString.toDateObject(this.modificationDate); + + if (dateObject) { + const modificationDate = document.createElement("span"); + modificationDate.textContent = "{{date}}, {{time}}"; + modificationDate.dataset.l10nId = "annotation_date_string"; + modificationDate.dataset.l10nArgs = JSON.stringify({ + date: dateObject.toLocaleDateString(), + time: dateObject.toLocaleTimeString() + }); + popup.appendChild(modificationDate); + } + + const contents = this._formatContents(this.contents); + + popup.appendChild(contents); + this.trigger.addEventListener("click", this._toggle.bind(this)); + this.trigger.addEventListener("mouseover", this._show.bind(this, false)); + this.trigger.addEventListener("mouseout", this._hide.bind(this, false)); + popup.addEventListener("click", this._hide.bind(this, true)); + wrapper.appendChild(popup); + return wrapper; + } + + _formatContents(contents) { + const p = document.createElement("p"); + const lines = contents.split(/(?:\r\n?|\n)/); + + for (let i = 0, ii = lines.length; i < ii; ++i) { + const line = lines[i]; + p.appendChild(document.createTextNode(line)); + + if (i < ii - 1) { + p.appendChild(document.createElement("br")); + } + } + + return p; + } + + _toggle() { + if (this.pinned) { + this._hide(true); + } else { + this._show(true); + } + } + + _show(pin = false) { + if (pin) { + this.pinned = true; + } + + if (this.hideElement.hasAttribute("hidden")) { + this.hideElement.removeAttribute("hidden"); + this.container.style.zIndex += 1; + } + } + + _hide(unpin = true) { + if (unpin) { + this.pinned = false; + } + + if (!this.hideElement.hasAttribute("hidden") && !this.pinned) { + this.hideElement.setAttribute("hidden", true); + this.container.style.zIndex -= 1; + } + } + +} + +class FreeTextAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + } + + render() { + this.container.className = "freeTextAnnotation"; + + if (!this.data.hasPopup) { + this._createPopup(this.container, null, this.data); + } + + return this.container; + } + +} + +class LineAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + } + + render() { + this.container.className = "lineAnnotation"; + const data = this.data; + const width = data.rect[2] - data.rect[0]; + const height = data.rect[3] - data.rect[1]; + const svg = this.svgFactory.create(width, height); + const line = this.svgFactory.createElement("svg:line"); + line.setAttribute("x1", data.rect[2] - data.lineCoordinates[0]); + line.setAttribute("y1", data.rect[3] - data.lineCoordinates[1]); + line.setAttribute("x2", data.rect[2] - data.lineCoordinates[2]); + line.setAttribute("y2", data.rect[3] - data.lineCoordinates[3]); + line.setAttribute("stroke-width", data.borderStyle.width || 1); + line.setAttribute("stroke", "transparent"); + svg.appendChild(line); + this.container.append(svg); + + this._createPopup(this.container, line, data); + + return this.container; + } + +} + +class SquareAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + } + + render() { + this.container.className = "squareAnnotation"; + const data = this.data; + const width = data.rect[2] - data.rect[0]; + const height = data.rect[3] - data.rect[1]; + const svg = this.svgFactory.create(width, height); + const borderWidth = data.borderStyle.width; + const square = this.svgFactory.createElement("svg:rect"); + square.setAttribute("x", borderWidth / 2); + square.setAttribute("y", borderWidth / 2); + square.setAttribute("width", width - borderWidth); + square.setAttribute("height", height - borderWidth); + square.setAttribute("stroke-width", borderWidth || 1); + square.setAttribute("stroke", "transparent"); + square.setAttribute("fill", "none"); + svg.appendChild(square); + this.container.append(svg); + + this._createPopup(this.container, square, data); + + return this.container; + } + +} + +class CircleAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + } + + render() { + this.container.className = "circleAnnotation"; + const data = this.data; + const width = data.rect[2] - data.rect[0]; + const height = data.rect[3] - data.rect[1]; + const svg = this.svgFactory.create(width, height); + const borderWidth = data.borderStyle.width; + const circle = this.svgFactory.createElement("svg:ellipse"); + circle.setAttribute("cx", width / 2); + circle.setAttribute("cy", height / 2); + circle.setAttribute("rx", width / 2 - borderWidth / 2); + circle.setAttribute("ry", height / 2 - borderWidth / 2); + circle.setAttribute("stroke-width", borderWidth || 1); + circle.setAttribute("stroke", "transparent"); + circle.setAttribute("fill", "none"); + svg.appendChild(circle); + this.container.append(svg); + + this._createPopup(this.container, circle, data); + + return this.container; + } + +} + +class PolylineAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + this.containerClassName = "polylineAnnotation"; + this.svgElementName = "svg:polyline"; + } + + render() { + this.container.className = this.containerClassName; + const data = this.data; + const width = data.rect[2] - data.rect[0]; + const height = data.rect[3] - data.rect[1]; + const svg = this.svgFactory.create(width, height); + let points = []; + + for (const coordinate of data.vertices) { + const x = coordinate.x - data.rect[0]; + const y = data.rect[3] - coordinate.y; + points.push(x + "," + y); + } + + points = points.join(" "); + const polyline = this.svgFactory.createElement(this.svgElementName); + polyline.setAttribute("points", points); + polyline.setAttribute("stroke-width", data.borderStyle.width || 1); + polyline.setAttribute("stroke", "transparent"); + polyline.setAttribute("fill", "none"); + svg.appendChild(polyline); + this.container.append(svg); + + this._createPopup(this.container, polyline, data); + + return this.container; + } + +} + +class PolygonAnnotationElement extends PolylineAnnotationElement { + constructor(parameters) { + super(parameters); + this.containerClassName = "polygonAnnotation"; + this.svgElementName = "svg:polygon"; + } + +} + +class CaretAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + } + + render() { + this.container.className = "caretAnnotation"; + + if (!this.data.hasPopup) { + this._createPopup(this.container, null, this.data); + } + + return this.container; + } + +} + +class InkAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + this.containerClassName = "inkAnnotation"; + this.svgElementName = "svg:polyline"; + } + + render() { + this.container.className = this.containerClassName; + const data = this.data; + const width = data.rect[2] - data.rect[0]; + const height = data.rect[3] - data.rect[1]; + const svg = this.svgFactory.create(width, height); + + for (const inkList of data.inkLists) { + let points = []; + + for (const coordinate of inkList) { + const x = coordinate.x - data.rect[0]; + const y = data.rect[3] - coordinate.y; + points.push(`${x},${y}`); + } + + points = points.join(" "); + const polyline = this.svgFactory.createElement(this.svgElementName); + polyline.setAttribute("points", points); + polyline.setAttribute("stroke-width", data.borderStyle.width || 1); + polyline.setAttribute("stroke", "transparent"); + polyline.setAttribute("fill", "none"); + + this._createPopup(this.container, polyline, data); + + svg.appendChild(polyline); + } + + this.container.append(svg); + return this.container; + } + +} + +class HighlightAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + } + + render() { + this.container.className = "highlightAnnotation"; + + if (!this.data.hasPopup) { + this._createPopup(this.container, null, this.data); + } + + return this.container; + } + +} + +class UnderlineAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + } + + render() { + this.container.className = "underlineAnnotation"; + + if (!this.data.hasPopup) { + this._createPopup(this.container, null, this.data); + } + + return this.container; + } + +} + +class SquigglyAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + } + + render() { + this.container.className = "squigglyAnnotation"; + + if (!this.data.hasPopup) { + this._createPopup(this.container, null, this.data); + } + + return this.container; + } + +} + +class StrikeOutAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + } + + render() { + this.container.className = "strikeoutAnnotation"; + + if (!this.data.hasPopup) { + this._createPopup(this.container, null, this.data); + } + + return this.container; + } + +} + +class StampAnnotationElement extends AnnotationElement { + constructor(parameters) { + const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + super(parameters, isRenderable, true); + } + + render() { + this.container.className = "stampAnnotation"; + + if (!this.data.hasPopup) { + this._createPopup(this.container, null, this.data); + } + + return this.container; + } + +} + +class FileAttachmentAnnotationElement extends AnnotationElement { + constructor(parameters) { + super(parameters, true); + const { + filename, + content + } = this.data.file; + this.filename = (0, _display_utils.getFilenameFromUrl)(filename); + this.content = content; + + if (this.linkService.eventBus) { + this.linkService.eventBus.dispatch("fileattachmentannotation", { + source: this, + id: (0, _util.stringToPDFString)(filename), + filename, + content + }); + } + } + + render() { + this.container.className = "fileAttachmentAnnotation"; + const trigger = document.createElement("div"); + trigger.style.height = this.container.style.height; + trigger.style.width = this.container.style.width; + trigger.addEventListener("dblclick", this._download.bind(this)); + + if (!this.data.hasPopup && (this.data.title || this.data.contents)) { + this._createPopup(this.container, trigger, this.data); + } + + this.container.appendChild(trigger); + return this.container; + } + + _download() { + if (!this.downloadManager) { + (0, _util.warn)("Download cannot be started due to unavailable download manager"); + return; + } + + this.downloadManager.downloadData(this.content, this.filename, ""); + } + +} + +class AnnotationLayer { + static render(parameters) { + const sortedAnnotations = [], + popupAnnotations = []; + + for (const data of parameters.annotations) { + if (!data) { + continue; + } + + if (data.annotationType === _util.AnnotationType.POPUP) { + popupAnnotations.push(data); + continue; + } + + sortedAnnotations.push(data); + } + + if (popupAnnotations.length) { + sortedAnnotations.push(...popupAnnotations); + } + + for (const data of sortedAnnotations) { + const element = AnnotationElementFactory.create({ + data, + layer: parameters.div, + page: parameters.page, + viewport: parameters.viewport, + linkService: parameters.linkService, + downloadManager: parameters.downloadManager, + imageResourcesPath: parameters.imageResourcesPath || "", + renderInteractiveForms: parameters.renderInteractiveForms || false, + svgFactory: new _display_utils.DOMSVGFactory() + }); + + if (element.isRenderable) { + parameters.div.appendChild(element.render()); + } + } + } + + static update(parameters) { + for (const data of parameters.annotations) { + const element = parameters.div.querySelector(`[data-annotation-id="${data.id}"]`); + + if (element) { + element.style.transform = `matrix(${parameters.viewport.transform.join(",")})`; + } + } + + parameters.div.removeAttribute("hidden"); + } + +} + +exports.AnnotationLayer = AnnotationLayer; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.renderTextLayer = void 0; + +var _util = __w_pdfjs_require__(2); + +var renderTextLayer = function renderTextLayerClosure() { + var MAX_TEXT_DIVS_TO_RENDER = 100000; + var NonWhitespaceRegexp = /\S/; + + function isAllWhitespace(str) { + return !NonWhitespaceRegexp.test(str); + } + + function appendText(task, geom, styles) { + var textDiv = document.createElement("span"); + var textDivProperties = { + angle: 0, + canvasWidth: 0, + isWhitespace: false, + originalTransform: null, + paddingBottom: 0, + paddingLeft: 0, + paddingRight: 0, + paddingTop: 0, + scale: 1 + }; + + task._textDivs.push(textDiv); + + if (isAllWhitespace(geom.str)) { + textDivProperties.isWhitespace = true; + + task._textDivProperties.set(textDiv, textDivProperties); + + return; + } + + var tx = _util.Util.transform(task._viewport.transform, geom.transform); + + var angle = Math.atan2(tx[1], tx[0]); + var style = styles[geom.fontName]; + + if (style.vertical) { + angle += Math.PI / 2; + } + + var fontHeight = Math.sqrt(tx[2] * tx[2] + tx[3] * tx[3]); + var fontAscent = fontHeight; + + if (style.ascent) { + fontAscent = style.ascent * fontAscent; + } else if (style.descent) { + fontAscent = (1 + style.descent) * fontAscent; + } + + let left, top; + + if (angle === 0) { + left = tx[4]; + top = tx[5] - fontAscent; + } else { + left = tx[4] + fontAscent * Math.sin(angle); + top = tx[5] - fontAscent * Math.cos(angle); + } + + textDiv.style.left = `${left}px`; + textDiv.style.top = `${top}px`; + textDiv.style.fontSize = `${fontHeight}px`; + textDiv.style.fontFamily = style.fontFamily; + textDiv.textContent = geom.str; + + if (task._fontInspectorEnabled) { + textDiv.dataset.fontName = geom.fontName; + } + + if (angle !== 0) { + textDivProperties.angle = angle * (180 / Math.PI); + } + + let shouldScaleText = false; + + if (geom.str.length > 1) { + shouldScaleText = true; + } else if (geom.transform[0] !== geom.transform[3]) { + const absScaleX = Math.abs(geom.transform[0]), + absScaleY = Math.abs(geom.transform[3]); + + if (absScaleX !== absScaleY && Math.max(absScaleX, absScaleY) / Math.min(absScaleX, absScaleY) > 1.5) { + shouldScaleText = true; + } + } + + if (shouldScaleText) { + if (style.vertical) { + textDivProperties.canvasWidth = geom.height * task._viewport.scale; + } else { + textDivProperties.canvasWidth = geom.width * task._viewport.scale; + } + } + + task._textDivProperties.set(textDiv, textDivProperties); + + if (task._textContentStream) { + task._layoutText(textDiv); + } + + if (task._enhanceTextSelection) { + var angleCos = 1, + angleSin = 0; + + if (angle !== 0) { + angleCos = Math.cos(angle); + angleSin = Math.sin(angle); + } + + var divWidth = (style.vertical ? geom.height : geom.width) * task._viewport.scale; + var divHeight = fontHeight; + var m, b; + + if (angle !== 0) { + m = [angleCos, angleSin, -angleSin, angleCos, left, top]; + b = _util.Util.getAxialAlignedBoundingBox([0, 0, divWidth, divHeight], m); + } else { + b = [left, top, left + divWidth, top + divHeight]; + } + + task._bounds.push({ + left: b[0], + top: b[1], + right: b[2], + bottom: b[3], + div: textDiv, + size: [divWidth, divHeight], + m + }); + } + } + + function render(task) { + if (task._canceled) { + return; + } + + var textDivs = task._textDivs; + var capability = task._capability; + var textDivsLength = textDivs.length; + + if (textDivsLength > MAX_TEXT_DIVS_TO_RENDER) { + task._renderingDone = true; + capability.resolve(); + return; + } + + if (!task._textContentStream) { + for (var i = 0; i < textDivsLength; i++) { + task._layoutText(textDivs[i]); + } + } + + task._renderingDone = true; + capability.resolve(); + } + + function findPositiveMin(ts, offset, count) { + let result = 0; + + for (let i = 0; i < count; i++) { + const t = ts[offset++]; + + if (t > 0) { + result = result ? Math.min(t, result) : t; + } + } + + return result; + } + + function expand(task) { + var bounds = task._bounds; + var viewport = task._viewport; + var expanded = expandBounds(viewport.width, viewport.height, bounds); + + for (var i = 0; i < expanded.length; i++) { + var div = bounds[i].div; + + var divProperties = task._textDivProperties.get(div); + + if (divProperties.angle === 0) { + divProperties.paddingLeft = bounds[i].left - expanded[i].left; + divProperties.paddingTop = bounds[i].top - expanded[i].top; + divProperties.paddingRight = expanded[i].right - bounds[i].right; + divProperties.paddingBottom = expanded[i].bottom - bounds[i].bottom; + + task._textDivProperties.set(div, divProperties); + + continue; + } + + var e = expanded[i], + b = bounds[i]; + var m = b.m, + c = m[0], + s = m[1]; + var points = [[0, 0], [0, b.size[1]], [b.size[0], 0], b.size]; + var ts = new Float64Array(64); + points.forEach(function (p, j) { + var t = _util.Util.applyTransform(p, m); + + ts[j + 0] = c && (e.left - t[0]) / c; + ts[j + 4] = s && (e.top - t[1]) / s; + ts[j + 8] = c && (e.right - t[0]) / c; + ts[j + 12] = s && (e.bottom - t[1]) / s; + ts[j + 16] = s && (e.left - t[0]) / -s; + ts[j + 20] = c && (e.top - t[1]) / c; + ts[j + 24] = s && (e.right - t[0]) / -s; + ts[j + 28] = c && (e.bottom - t[1]) / c; + ts[j + 32] = c && (e.left - t[0]) / -c; + ts[j + 36] = s && (e.top - t[1]) / -s; + ts[j + 40] = c && (e.right - t[0]) / -c; + ts[j + 44] = s && (e.bottom - t[1]) / -s; + ts[j + 48] = s && (e.left - t[0]) / s; + ts[j + 52] = c && (e.top - t[1]) / -c; + ts[j + 56] = s && (e.right - t[0]) / s; + ts[j + 60] = c && (e.bottom - t[1]) / -c; + }); + var boxScale = 1 + Math.min(Math.abs(c), Math.abs(s)); + divProperties.paddingLeft = findPositiveMin(ts, 32, 16) / boxScale; + divProperties.paddingTop = findPositiveMin(ts, 48, 16) / boxScale; + divProperties.paddingRight = findPositiveMin(ts, 0, 16) / boxScale; + divProperties.paddingBottom = findPositiveMin(ts, 16, 16) / boxScale; + + task._textDivProperties.set(div, divProperties); + } + } + + function expandBounds(width, height, boxes) { + var bounds = boxes.map(function (box, i) { + return { + x1: box.left, + y1: box.top, + x2: box.right, + y2: box.bottom, + index: i, + x1New: undefined, + x2New: undefined + }; + }); + expandBoundsLTR(width, bounds); + var expanded = new Array(boxes.length); + bounds.forEach(function (b) { + var i = b.index; + expanded[i] = { + left: b.x1New, + top: 0, + right: b.x2New, + bottom: 0 + }; + }); + boxes.map(function (box, i) { + var e = expanded[i], + b = bounds[i]; + b.x1 = box.top; + b.y1 = width - e.right; + b.x2 = box.bottom; + b.y2 = width - e.left; + b.index = i; + b.x1New = undefined; + b.x2New = undefined; + }); + expandBoundsLTR(height, bounds); + bounds.forEach(function (b) { + var i = b.index; + expanded[i].top = b.x1New; + expanded[i].bottom = b.x2New; + }); + return expanded; + } + + function expandBoundsLTR(width, bounds) { + bounds.sort(function (a, b) { + return a.x1 - b.x1 || a.index - b.index; + }); + var fakeBoundary = { + x1: -Infinity, + y1: -Infinity, + x2: 0, + y2: Infinity, + index: -1, + x1New: 0, + x2New: 0 + }; + var horizon = [{ + start: -Infinity, + end: Infinity, + boundary: fakeBoundary + }]; + bounds.forEach(function (boundary) { + var i = 0; + + while (i < horizon.length && horizon[i].end <= boundary.y1) { + i++; + } + + var j = horizon.length - 1; + + while (j >= 0 && horizon[j].start >= boundary.y2) { + j--; + } + + var horizonPart, affectedBoundary; + var q, + k, + maxXNew = -Infinity; + + for (q = i; q <= j; q++) { + horizonPart = horizon[q]; + affectedBoundary = horizonPart.boundary; + var xNew; + + if (affectedBoundary.x2 > boundary.x1) { + xNew = affectedBoundary.index > boundary.index ? affectedBoundary.x1New : boundary.x1; + } else if (affectedBoundary.x2New === undefined) { + xNew = (affectedBoundary.x2 + boundary.x1) / 2; + } else { + xNew = affectedBoundary.x2New; + } + + if (xNew > maxXNew) { + maxXNew = xNew; + } + } + + boundary.x1New = maxXNew; + + for (q = i; q <= j; q++) { + horizonPart = horizon[q]; + affectedBoundary = horizonPart.boundary; + + if (affectedBoundary.x2New === undefined) { + if (affectedBoundary.x2 > boundary.x1) { + if (affectedBoundary.index > boundary.index) { + affectedBoundary.x2New = affectedBoundary.x2; + } + } else { + affectedBoundary.x2New = maxXNew; + } + } else if (affectedBoundary.x2New > maxXNew) { + affectedBoundary.x2New = Math.max(maxXNew, affectedBoundary.x2); + } + } + + var changedHorizon = [], + lastBoundary = null; + + for (q = i; q <= j; q++) { + horizonPart = horizon[q]; + affectedBoundary = horizonPart.boundary; + var useBoundary = affectedBoundary.x2 > boundary.x2 ? affectedBoundary : boundary; + + if (lastBoundary === useBoundary) { + changedHorizon[changedHorizon.length - 1].end = horizonPart.end; + } else { + changedHorizon.push({ + start: horizonPart.start, + end: horizonPart.end, + boundary: useBoundary + }); + lastBoundary = useBoundary; + } + } + + if (horizon[i].start < boundary.y1) { + changedHorizon[0].start = boundary.y1; + changedHorizon.unshift({ + start: horizon[i].start, + end: boundary.y1, + boundary: horizon[i].boundary + }); + } + + if (boundary.y2 < horizon[j].end) { + changedHorizon[changedHorizon.length - 1].end = boundary.y2; + changedHorizon.push({ + start: boundary.y2, + end: horizon[j].end, + boundary: horizon[j].boundary + }); + } + + for (q = i; q <= j; q++) { + horizonPart = horizon[q]; + affectedBoundary = horizonPart.boundary; + + if (affectedBoundary.x2New !== undefined) { + continue; + } + + var used = false; + + for (k = i - 1; !used && k >= 0 && horizon[k].start >= affectedBoundary.y1; k--) { + used = horizon[k].boundary === affectedBoundary; + } + + for (k = j + 1; !used && k < horizon.length && horizon[k].end <= affectedBoundary.y2; k++) { + used = horizon[k].boundary === affectedBoundary; + } + + for (k = 0; !used && k < changedHorizon.length; k++) { + used = changedHorizon[k].boundary === affectedBoundary; + } + + if (!used) { + affectedBoundary.x2New = maxXNew; + } + } + + Array.prototype.splice.apply(horizon, [i, j - i + 1].concat(changedHorizon)); + }); + horizon.forEach(function (horizonPart) { + var affectedBoundary = horizonPart.boundary; + + if (affectedBoundary.x2New === undefined) { + affectedBoundary.x2New = Math.max(width, affectedBoundary.x2); + } + }); + } + + function TextLayerRenderTask({ + textContent, + textContentStream, + container, + viewport, + textDivs, + textContentItemsStr, + enhanceTextSelection + }) { + this._textContent = textContent; + this._textContentStream = textContentStream; + this._container = container; + this._viewport = viewport; + this._textDivs = textDivs || []; + this._textContentItemsStr = textContentItemsStr || []; + this._enhanceTextSelection = !!enhanceTextSelection; + this._fontInspectorEnabled = !!(globalThis.FontInspector && globalThis.FontInspector.enabled); + this._reader = null; + this._layoutTextLastFontSize = null; + this._layoutTextLastFontFamily = null; + this._layoutTextCtx = null; + this._textDivProperties = new WeakMap(); + this._renderingDone = false; + this._canceled = false; + this._capability = (0, _util.createPromiseCapability)(); + this._renderTimer = null; + this._bounds = []; + + this._capability.promise.finally(() => { + if (this._layoutTextCtx) { + this._layoutTextCtx.canvas.width = 0; + this._layoutTextCtx.canvas.height = 0; + this._layoutTextCtx = null; + } + }).catch(() => {}); + } + + TextLayerRenderTask.prototype = { + get promise() { + return this._capability.promise; + }, + + cancel: function TextLayer_cancel() { + this._canceled = true; + + if (this._reader) { + this._reader.cancel(new _util.AbortException("TextLayer task cancelled.")); + + this._reader = null; + } + + if (this._renderTimer !== null) { + clearTimeout(this._renderTimer); + this._renderTimer = null; + } + + this._capability.reject(new Error("TextLayer task cancelled.")); + }, + + _processItems(items, styleCache) { + for (let i = 0, len = items.length; i < len; i++) { + this._textContentItemsStr.push(items[i].str); + + appendText(this, items[i], styleCache); + } + }, + + _layoutText(textDiv) { + const textDivProperties = this._textDivProperties.get(textDiv); + + if (textDivProperties.isWhitespace) { + return; + } + + let transform = ""; + + if (textDivProperties.canvasWidth !== 0) { + const { + fontSize, + fontFamily + } = textDiv.style; + + if (fontSize !== this._layoutTextLastFontSize || fontFamily !== this._layoutTextLastFontFamily) { + this._layoutTextCtx.font = `${fontSize} ${fontFamily}`; + this._layoutTextLastFontSize = fontSize; + this._layoutTextLastFontFamily = fontFamily; + } + + const { + width + } = this._layoutTextCtx.measureText(textDiv.textContent); + + if (width > 0) { + textDivProperties.scale = textDivProperties.canvasWidth / width; + transform = `scaleX(${textDivProperties.scale})`; + } + } + + if (textDivProperties.angle !== 0) { + transform = `rotate(${textDivProperties.angle}deg) ${transform}`; + } + + if (transform.length > 0) { + if (this._enhanceTextSelection) { + textDivProperties.originalTransform = transform; + } + + textDiv.style.transform = transform; + } + + this._textDivProperties.set(textDiv, textDivProperties); + + this._container.appendChild(textDiv); + }, + + _render: function TextLayer_render(timeout) { + const capability = (0, _util.createPromiseCapability)(); + let styleCache = Object.create(null); + const canvas = document.createElement("canvas"); + canvas.mozOpaque = true; + this._layoutTextCtx = canvas.getContext("2d", { + alpha: false + }); + + if (this._textContent) { + const textItems = this._textContent.items; + const textStyles = this._textContent.styles; + + this._processItems(textItems, textStyles); + + capability.resolve(); + } else if (this._textContentStream) { + const pump = () => { + this._reader.read().then(({ + value, + done + }) => { + if (done) { + capability.resolve(); + return; + } + + Object.assign(styleCache, value.styles); + + this._processItems(value.items, styleCache); + + pump(); + }, capability.reject); + }; + + this._reader = this._textContentStream.getReader(); + pump(); + } else { + throw new Error('Neither "textContent" nor "textContentStream"' + " parameters specified."); + } + + capability.promise.then(() => { + styleCache = null; + + if (!timeout) { + render(this); + } else { + this._renderTimer = setTimeout(() => { + render(this); + this._renderTimer = null; + }, timeout); + } + }, this._capability.reject); + }, + expandTextDivs: function TextLayer_expandTextDivs(expandDivs) { + if (!this._enhanceTextSelection || !this._renderingDone) { + return; + } + + if (this._bounds !== null) { + expand(this); + this._bounds = null; + } + + const transformBuf = [], + paddingBuf = []; + + for (var i = 0, ii = this._textDivs.length; i < ii; i++) { + const div = this._textDivs[i]; + + const divProps = this._textDivProperties.get(div); + + if (divProps.isWhitespace) { + continue; + } + + if (expandDivs) { + transformBuf.length = 0; + paddingBuf.length = 0; + + if (divProps.originalTransform) { + transformBuf.push(divProps.originalTransform); + } + + if (divProps.paddingTop > 0) { + paddingBuf.push(`${divProps.paddingTop}px`); + transformBuf.push(`translateY(${-divProps.paddingTop}px)`); + } else { + paddingBuf.push(0); + } + + if (divProps.paddingRight > 0) { + paddingBuf.push(`${divProps.paddingRight / divProps.scale}px`); + } else { + paddingBuf.push(0); + } + + if (divProps.paddingBottom > 0) { + paddingBuf.push(`${divProps.paddingBottom}px`); + } else { + paddingBuf.push(0); + } + + if (divProps.paddingLeft > 0) { + paddingBuf.push(`${divProps.paddingLeft / divProps.scale}px`); + transformBuf.push(`translateX(${-divProps.paddingLeft / divProps.scale}px)`); + } else { + paddingBuf.push(0); + } + + div.style.padding = paddingBuf.join(" "); + + if (transformBuf.length) { + div.style.transform = transformBuf.join(" "); + } + } else { + div.style.padding = null; + div.style.transform = divProps.originalTransform; + } + } + } + }; + + function renderTextLayer(renderParameters) { + var task = new TextLayerRenderTask({ + textContent: renderParameters.textContent, + textContentStream: renderParameters.textContentStream, + container: renderParameters.container, + viewport: renderParameters.viewport, + textDivs: renderParameters.textDivs, + textContentItemsStr: renderParameters.textContentItemsStr, + enhanceTextSelection: renderParameters.enhanceTextSelection + }); + + task._render(renderParameters.timeout); + + return task; + } + + return renderTextLayer; +}(); + +exports.renderTextLayer = renderTextLayer; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SVGGraphics = void 0; + +var _util = __w_pdfjs_require__(2); + +var _display_utils = __w_pdfjs_require__(1); + +var _is_node = __w_pdfjs_require__(4); + +let SVGGraphics = function () { + throw new Error("Not implemented: SVGGraphics"); +}; + +exports.SVGGraphics = SVGGraphics; +{ + const SVG_DEFAULTS = { + fontStyle: "normal", + fontWeight: "normal", + fillColor: "#000000" + }; + const XML_NS = "http://www.w3.org/XML/1998/namespace"; + const XLINK_NS = "http://www.w3.org/1999/xlink"; + const LINE_CAP_STYLES = ["butt", "round", "square"]; + const LINE_JOIN_STYLES = ["miter", "round", "bevel"]; + + const convertImgDataToPng = function () { + const PNG_HEADER = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]); + const CHUNK_WRAPPER_SIZE = 12; + const crcTable = new Int32Array(256); + + for (let i = 0; i < 256; i++) { + let c = i; + + for (let h = 0; h < 8; h++) { + if (c & 1) { + c = 0xedb88320 ^ c >> 1 & 0x7fffffff; + } else { + c = c >> 1 & 0x7fffffff; + } + } + + crcTable[i] = c; + } + + function crc32(data, start, end) { + let crc = -1; + + for (let i = start; i < end; i++) { + const a = (crc ^ data[i]) & 0xff; + const b = crcTable[a]; + crc = crc >>> 8 ^ b; + } + + return crc ^ -1; + } + + function writePngChunk(type, body, data, offset) { + let p = offset; + const len = body.length; + data[p] = len >> 24 & 0xff; + data[p + 1] = len >> 16 & 0xff; + data[p + 2] = len >> 8 & 0xff; + data[p + 3] = len & 0xff; + p += 4; + data[p] = type.charCodeAt(0) & 0xff; + data[p + 1] = type.charCodeAt(1) & 0xff; + data[p + 2] = type.charCodeAt(2) & 0xff; + data[p + 3] = type.charCodeAt(3) & 0xff; + p += 4; + data.set(body, p); + p += body.length; + const crc = crc32(data, offset + 4, p); + data[p] = crc >> 24 & 0xff; + data[p + 1] = crc >> 16 & 0xff; + data[p + 2] = crc >> 8 & 0xff; + data[p + 3] = crc & 0xff; + } + + function adler32(data, start, end) { + let a = 1; + let b = 0; + + for (let i = start; i < end; ++i) { + a = (a + (data[i] & 0xff)) % 65521; + b = (b + a) % 65521; + } + + return b << 16 | a; + } + + function deflateSync(literals) { + if (!_is_node.isNodeJS) { + return deflateSyncUncompressed(literals); + } + + try { + let input; + + if (parseInt(process.versions.node) >= 8) { + input = literals; + } else { + input = Buffer.from(literals); + } + + const output = require("zlib").deflateSync(input, { + level: 9 + }); + + return output instanceof Uint8Array ? output : new Uint8Array(output); + } catch (e) { + (0, _util.warn)("Not compressing PNG because zlib.deflateSync is unavailable: " + e); + } + + return deflateSyncUncompressed(literals); + } + + function deflateSyncUncompressed(literals) { + let len = literals.length; + const maxBlockLength = 0xffff; + const deflateBlocks = Math.ceil(len / maxBlockLength); + const idat = new Uint8Array(2 + len + deflateBlocks * 5 + 4); + let pi = 0; + idat[pi++] = 0x78; + idat[pi++] = 0x9c; + let pos = 0; + + while (len > maxBlockLength) { + idat[pi++] = 0x00; + idat[pi++] = 0xff; + idat[pi++] = 0xff; + idat[pi++] = 0x00; + idat[pi++] = 0x00; + idat.set(literals.subarray(pos, pos + maxBlockLength), pi); + pi += maxBlockLength; + pos += maxBlockLength; + len -= maxBlockLength; + } + + idat[pi++] = 0x01; + idat[pi++] = len & 0xff; + idat[pi++] = len >> 8 & 0xff; + idat[pi++] = ~len & 0xffff & 0xff; + idat[pi++] = (~len & 0xffff) >> 8 & 0xff; + idat.set(literals.subarray(pos), pi); + pi += literals.length - pos; + const adler = adler32(literals, 0, literals.length); + idat[pi++] = adler >> 24 & 0xff; + idat[pi++] = adler >> 16 & 0xff; + idat[pi++] = adler >> 8 & 0xff; + idat[pi++] = adler & 0xff; + return idat; + } + + function encode(imgData, kind, forceDataSchema, isMask) { + const width = imgData.width; + const height = imgData.height; + let bitDepth, colorType, lineSize; + const bytes = imgData.data; + + switch (kind) { + case _util.ImageKind.GRAYSCALE_1BPP: + colorType = 0; + bitDepth = 1; + lineSize = width + 7 >> 3; + break; + + case _util.ImageKind.RGB_24BPP: + colorType = 2; + bitDepth = 8; + lineSize = width * 3; + break; + + case _util.ImageKind.RGBA_32BPP: + colorType = 6; + bitDepth = 8; + lineSize = width * 4; + break; + + default: + throw new Error("invalid format"); + } + + const literals = new Uint8Array((1 + lineSize) * height); + let offsetLiterals = 0, + offsetBytes = 0; + + for (let y = 0; y < height; ++y) { + literals[offsetLiterals++] = 0; + literals.set(bytes.subarray(offsetBytes, offsetBytes + lineSize), offsetLiterals); + offsetBytes += lineSize; + offsetLiterals += lineSize; + } + + if (kind === _util.ImageKind.GRAYSCALE_1BPP && isMask) { + offsetLiterals = 0; + + for (let y = 0; y < height; y++) { + offsetLiterals++; + + for (let i = 0; i < lineSize; i++) { + literals[offsetLiterals++] ^= 0xff; + } + } + } + + const ihdr = new Uint8Array([width >> 24 & 0xff, width >> 16 & 0xff, width >> 8 & 0xff, width & 0xff, height >> 24 & 0xff, height >> 16 & 0xff, height >> 8 & 0xff, height & 0xff, bitDepth, colorType, 0x00, 0x00, 0x00]); + const idat = deflateSync(literals); + const pngLength = PNG_HEADER.length + CHUNK_WRAPPER_SIZE * 3 + ihdr.length + idat.length; + const data = new Uint8Array(pngLength); + let offset = 0; + data.set(PNG_HEADER, offset); + offset += PNG_HEADER.length; + writePngChunk("IHDR", ihdr, data, offset); + offset += CHUNK_WRAPPER_SIZE + ihdr.length; + writePngChunk("IDATA", idat, data, offset); + offset += CHUNK_WRAPPER_SIZE + idat.length; + writePngChunk("IEND", new Uint8Array(0), data, offset); + return (0, _util.createObjectURL)(data, "image/png", forceDataSchema); + } + + return function convertImgDataToPng(imgData, forceDataSchema, isMask) { + const kind = imgData.kind === undefined ? _util.ImageKind.GRAYSCALE_1BPP : imgData.kind; + return encode(imgData, kind, forceDataSchema, isMask); + }; + }(); + + class SVGExtraState { + constructor() { + this.fontSizeScale = 1; + this.fontWeight = SVG_DEFAULTS.fontWeight; + this.fontSize = 0; + this.textMatrix = _util.IDENTITY_MATRIX; + this.fontMatrix = _util.FONT_IDENTITY_MATRIX; + this.leading = 0; + this.textRenderingMode = _util.TextRenderingMode.FILL; + this.textMatrixScale = 1; + this.x = 0; + this.y = 0; + this.lineX = 0; + this.lineY = 0; + this.charSpacing = 0; + this.wordSpacing = 0; + this.textHScale = 1; + this.textRise = 0; + this.fillColor = SVG_DEFAULTS.fillColor; + this.strokeColor = "#000000"; + this.fillAlpha = 1; + this.strokeAlpha = 1; + this.lineWidth = 1; + this.lineJoin = ""; + this.lineCap = ""; + this.miterLimit = 0; + this.dashArray = []; + this.dashPhase = 0; + this.dependencies = []; + this.activeClipUrl = null; + this.clipGroup = null; + this.maskId = ""; + } + + clone() { + return Object.create(this); + } + + setCurrentPoint(x, y) { + this.x = x; + this.y = y; + } + + } + + function opListToTree(opList) { + let opTree = []; + const tmp = []; + + for (const opListElement of opList) { + if (opListElement.fn === "save") { + opTree.push({ + fnId: 92, + fn: "group", + items: [] + }); + tmp.push(opTree); + opTree = opTree[opTree.length - 1].items; + continue; + } + + if (opListElement.fn === "restore") { + opTree = tmp.pop(); + } else { + opTree.push(opListElement); + } + } + + return opTree; + } + + function pf(value) { + if (Number.isInteger(value)) { + return value.toString(); + } + + const s = value.toFixed(10); + let i = s.length - 1; + + if (s[i] !== "0") { + return s; + } + + do { + i--; + } while (s[i] === "0"); + + return s.substring(0, s[i] === "." ? i : i + 1); + } + + function pm(m) { + if (m[4] === 0 && m[5] === 0) { + if (m[1] === 0 && m[2] === 0) { + if (m[0] === 1 && m[3] === 1) { + return ""; + } + + return `scale(${pf(m[0])} ${pf(m[3])})`; + } + + if (m[0] === m[3] && m[1] === -m[2]) { + const a = Math.acos(m[0]) * 180 / Math.PI; + return `rotate(${pf(a)})`; + } + } else { + if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) { + return `translate(${pf(m[4])} ${pf(m[5])})`; + } + } + + return `matrix(${pf(m[0])} ${pf(m[1])} ${pf(m[2])} ${pf(m[3])} ${pf(m[4])} ` + `${pf(m[5])})`; + } + + let clipCount = 0; + let maskCount = 0; + let shadingCount = 0; + exports.SVGGraphics = SVGGraphics = class SVGGraphics { + constructor(commonObjs, objs, forceDataSchema = false) { + this.svgFactory = new _display_utils.DOMSVGFactory(); + this.current = new SVGExtraState(); + this.transformMatrix = _util.IDENTITY_MATRIX; + this.transformStack = []; + this.extraStack = []; + this.commonObjs = commonObjs; + this.objs = objs; + this.pendingClip = null; + this.pendingEOFill = false; + this.embedFonts = false; + this.embeddedFonts = Object.create(null); + this.cssStyle = null; + this.forceDataSchema = !!forceDataSchema; + this._operatorIdMapping = []; + + for (const op in _util.OPS) { + this._operatorIdMapping[_util.OPS[op]] = op; + } + } + + save() { + this.transformStack.push(this.transformMatrix); + const old = this.current; + this.extraStack.push(old); + this.current = old.clone(); + } + + restore() { + this.transformMatrix = this.transformStack.pop(); + this.current = this.extraStack.pop(); + this.pendingClip = null; + this.tgrp = null; + } + + group(items) { + this.save(); + this.executeOpTree(items); + this.restore(); + } + + loadDependencies(operatorList) { + const fnArray = operatorList.fnArray; + const argsArray = operatorList.argsArray; + + for (let i = 0, ii = fnArray.length; i < ii; i++) { + if (fnArray[i] !== _util.OPS.dependency) { + continue; + } + + for (const obj of argsArray[i]) { + const objsPool = obj.startsWith("g_") ? this.commonObjs : this.objs; + const promise = new Promise(resolve => { + objsPool.get(obj, resolve); + }); + this.current.dependencies.push(promise); + } + } + + return Promise.all(this.current.dependencies); + } + + transform(a, b, c, d, e, f) { + const transformMatrix = [a, b, c, d, e, f]; + this.transformMatrix = _util.Util.transform(this.transformMatrix, transformMatrix); + this.tgrp = null; + } + + getSVG(operatorList, viewport) { + this.viewport = viewport; + + const svgElement = this._initialize(viewport); + + return this.loadDependencies(operatorList).then(() => { + this.transformMatrix = _util.IDENTITY_MATRIX; + this.executeOpTree(this.convertOpList(operatorList)); + return svgElement; + }); + } + + convertOpList(operatorList) { + const operatorIdMapping = this._operatorIdMapping; + const argsArray = operatorList.argsArray; + const fnArray = operatorList.fnArray; + const opList = []; + + for (let i = 0, ii = fnArray.length; i < ii; i++) { + const fnId = fnArray[i]; + opList.push({ + fnId, + fn: operatorIdMapping[fnId], + args: argsArray[i] + }); + } + + return opListToTree(opList); + } + + executeOpTree(opTree) { + for (const opTreeElement of opTree) { + const fn = opTreeElement.fn; + const fnId = opTreeElement.fnId; + const args = opTreeElement.args; + + switch (fnId | 0) { + case _util.OPS.beginText: + this.beginText(); + break; + + case _util.OPS.dependency: + break; + + case _util.OPS.setLeading: + this.setLeading(args); + break; + + case _util.OPS.setLeadingMoveText: + this.setLeadingMoveText(args[0], args[1]); + break; + + case _util.OPS.setFont: + this.setFont(args); + break; + + case _util.OPS.showText: + this.showText(args[0]); + break; + + case _util.OPS.showSpacedText: + this.showText(args[0]); + break; + + case _util.OPS.endText: + this.endText(); + break; + + case _util.OPS.moveText: + this.moveText(args[0], args[1]); + break; + + case _util.OPS.setCharSpacing: + this.setCharSpacing(args[0]); + break; + + case _util.OPS.setWordSpacing: + this.setWordSpacing(args[0]); + break; + + case _util.OPS.setHScale: + this.setHScale(args[0]); + break; + + case _util.OPS.setTextMatrix: + this.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); + break; + + case _util.OPS.setTextRise: + this.setTextRise(args[0]); + break; + + case _util.OPS.setTextRenderingMode: + this.setTextRenderingMode(args[0]); + break; + + case _util.OPS.setLineWidth: + this.setLineWidth(args[0]); + break; + + case _util.OPS.setLineJoin: + this.setLineJoin(args[0]); + break; + + case _util.OPS.setLineCap: + this.setLineCap(args[0]); + break; + + case _util.OPS.setMiterLimit: + this.setMiterLimit(args[0]); + break; + + case _util.OPS.setFillRGBColor: + this.setFillRGBColor(args[0], args[1], args[2]); + break; + + case _util.OPS.setStrokeRGBColor: + this.setStrokeRGBColor(args[0], args[1], args[2]); + break; + + case _util.OPS.setStrokeColorN: + this.setStrokeColorN(args); + break; + + case _util.OPS.setFillColorN: + this.setFillColorN(args); + break; + + case _util.OPS.shadingFill: + this.shadingFill(args[0]); + break; + + case _util.OPS.setDash: + this.setDash(args[0], args[1]); + break; + + case _util.OPS.setRenderingIntent: + this.setRenderingIntent(args[0]); + break; + + case _util.OPS.setFlatness: + this.setFlatness(args[0]); + break; + + case _util.OPS.setGState: + this.setGState(args[0]); + break; + + case _util.OPS.fill: + this.fill(); + break; + + case _util.OPS.eoFill: + this.eoFill(); + break; + + case _util.OPS.stroke: + this.stroke(); + break; + + case _util.OPS.fillStroke: + this.fillStroke(); + break; + + case _util.OPS.eoFillStroke: + this.eoFillStroke(); + break; + + case _util.OPS.clip: + this.clip("nonzero"); + break; + + case _util.OPS.eoClip: + this.clip("evenodd"); + break; + + case _util.OPS.paintSolidColorImageMask: + this.paintSolidColorImageMask(); + break; + + case _util.OPS.paintImageXObject: + this.paintImageXObject(args[0]); + break; + + case _util.OPS.paintInlineImageXObject: + this.paintInlineImageXObject(args[0]); + break; + + case _util.OPS.paintImageMaskXObject: + this.paintImageMaskXObject(args[0]); + break; + + case _util.OPS.paintFormXObjectBegin: + this.paintFormXObjectBegin(args[0], args[1]); + break; + + case _util.OPS.paintFormXObjectEnd: + this.paintFormXObjectEnd(); + break; + + case _util.OPS.closePath: + this.closePath(); + break; + + case _util.OPS.closeStroke: + this.closeStroke(); + break; + + case _util.OPS.closeFillStroke: + this.closeFillStroke(); + break; + + case _util.OPS.closeEOFillStroke: + this.closeEOFillStroke(); + break; + + case _util.OPS.nextLine: + this.nextLine(); + break; + + case _util.OPS.transform: + this.transform(args[0], args[1], args[2], args[3], args[4], args[5]); + break; + + case _util.OPS.constructPath: + this.constructPath(args[0], args[1]); + break; + + case _util.OPS.endPath: + this.endPath(); + break; + + case 92: + this.group(opTreeElement.items); + break; + + default: + (0, _util.warn)(`Unimplemented operator ${fn}`); + break; + } + } + } + + setWordSpacing(wordSpacing) { + this.current.wordSpacing = wordSpacing; + } + + setCharSpacing(charSpacing) { + this.current.charSpacing = charSpacing; + } + + nextLine() { + this.moveText(0, this.current.leading); + } + + setTextMatrix(a, b, c, d, e, f) { + const current = this.current; + current.textMatrix = current.lineMatrix = [a, b, c, d, e, f]; + current.textMatrixScale = Math.sqrt(a * a + b * b); + current.x = current.lineX = 0; + current.y = current.lineY = 0; + current.xcoords = []; + current.ycoords = []; + current.tspan = this.svgFactory.createElement("svg:tspan"); + current.tspan.setAttributeNS(null, "font-family", current.fontFamily); + current.tspan.setAttributeNS(null, "font-size", `${pf(current.fontSize)}px`); + current.tspan.setAttributeNS(null, "y", pf(-current.y)); + current.txtElement = this.svgFactory.createElement("svg:text"); + current.txtElement.appendChild(current.tspan); + } + + beginText() { + const current = this.current; + current.x = current.lineX = 0; + current.y = current.lineY = 0; + current.textMatrix = _util.IDENTITY_MATRIX; + current.lineMatrix = _util.IDENTITY_MATRIX; + current.textMatrixScale = 1; + current.tspan = this.svgFactory.createElement("svg:tspan"); + current.txtElement = this.svgFactory.createElement("svg:text"); + current.txtgrp = this.svgFactory.createElement("svg:g"); + current.xcoords = []; + current.ycoords = []; + } + + moveText(x, y) { + const current = this.current; + current.x = current.lineX += x; + current.y = current.lineY += y; + current.xcoords = []; + current.ycoords = []; + current.tspan = this.svgFactory.createElement("svg:tspan"); + current.tspan.setAttributeNS(null, "font-family", current.fontFamily); + current.tspan.setAttributeNS(null, "font-size", `${pf(current.fontSize)}px`); + current.tspan.setAttributeNS(null, "y", pf(-current.y)); + } + + showText(glyphs) { + const current = this.current; + const font = current.font; + const fontSize = current.fontSize; + + if (fontSize === 0) { + return; + } + + const fontSizeScale = current.fontSizeScale; + const charSpacing = current.charSpacing; + const wordSpacing = current.wordSpacing; + const fontDirection = current.fontDirection; + const textHScale = current.textHScale * fontDirection; + const vertical = font.vertical; + const spacingDir = vertical ? 1 : -1; + const defaultVMetrics = font.defaultVMetrics; + const widthAdvanceScale = fontSize * current.fontMatrix[0]; + let x = 0; + + for (const glyph of glyphs) { + if (glyph === null) { + x += fontDirection * wordSpacing; + continue; + } else if ((0, _util.isNum)(glyph)) { + x += spacingDir * glyph * fontSize / 1000; + continue; + } + + const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing; + const character = glyph.fontChar; + let scaledX, scaledY; + let width = glyph.width; + + if (vertical) { + let vx; + const vmetric = glyph.vmetric || defaultVMetrics; + vx = glyph.vmetric ? vmetric[1] : width * 0.5; + vx = -vx * widthAdvanceScale; + const vy = vmetric[2] * widthAdvanceScale; + width = vmetric ? -vmetric[0] : width; + scaledX = vx / fontSizeScale; + scaledY = (x + vy) / fontSizeScale; + } else { + scaledX = x / fontSizeScale; + scaledY = 0; + } + + if (glyph.isInFont || font.missingFile) { + current.xcoords.push(current.x + scaledX); + + if (vertical) { + current.ycoords.push(-current.y + scaledY); + } + + current.tspan.textContent += character; + } else {} + + let charWidth; + + if (vertical) { + charWidth = width * widthAdvanceScale - spacing * fontDirection; + } else { + charWidth = width * widthAdvanceScale + spacing * fontDirection; + } + + x += charWidth; + } + + current.tspan.setAttributeNS(null, "x", current.xcoords.map(pf).join(" ")); + + if (vertical) { + current.tspan.setAttributeNS(null, "y", current.ycoords.map(pf).join(" ")); + } else { + current.tspan.setAttributeNS(null, "y", pf(-current.y)); + } + + if (vertical) { + current.y -= x; + } else { + current.x += x * textHScale; + } + + current.tspan.setAttributeNS(null, "font-family", current.fontFamily); + current.tspan.setAttributeNS(null, "font-size", `${pf(current.fontSize)}px`); + + if (current.fontStyle !== SVG_DEFAULTS.fontStyle) { + current.tspan.setAttributeNS(null, "font-style", current.fontStyle); + } + + if (current.fontWeight !== SVG_DEFAULTS.fontWeight) { + current.tspan.setAttributeNS(null, "font-weight", current.fontWeight); + } + + const fillStrokeMode = current.textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK; + + if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + if (current.fillColor !== SVG_DEFAULTS.fillColor) { + current.tspan.setAttributeNS(null, "fill", current.fillColor); + } + + if (current.fillAlpha < 1) { + current.tspan.setAttributeNS(null, "fill-opacity", current.fillAlpha); + } + } else if (current.textRenderingMode === _util.TextRenderingMode.ADD_TO_PATH) { + current.tspan.setAttributeNS(null, "fill", "transparent"); + } else { + current.tspan.setAttributeNS(null, "fill", "none"); + } + + if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + const lineWidthScale = 1 / (current.textMatrixScale || 1); + + this._setStrokeAttributes(current.tspan, lineWidthScale); + } + + let textMatrix = current.textMatrix; + + if (current.textRise !== 0) { + textMatrix = textMatrix.slice(); + textMatrix[5] += current.textRise; + } + + current.txtElement.setAttributeNS(null, "transform", `${pm(textMatrix)} scale(${pf(textHScale)}, -1)`); + current.txtElement.setAttributeNS(XML_NS, "xml:space", "preserve"); + current.txtElement.appendChild(current.tspan); + current.txtgrp.appendChild(current.txtElement); + + this._ensureTransformGroup().appendChild(current.txtElement); + } + + setLeadingMoveText(x, y) { + this.setLeading(-y); + this.moveText(x, y); + } + + addFontStyle(fontObj) { + if (!fontObj.data) { + throw new Error("addFontStyle: No font data available, " + 'ensure that the "fontExtraProperties" API parameter is set.'); + } + + if (!this.cssStyle) { + this.cssStyle = this.svgFactory.createElement("svg:style"); + this.cssStyle.setAttributeNS(null, "type", "text/css"); + this.defs.appendChild(this.cssStyle); + } + + const url = (0, _util.createObjectURL)(fontObj.data, fontObj.mimetype, this.forceDataSchema); + this.cssStyle.textContent += `@font-face { font-family: "${fontObj.loadedName}";` + ` src: url(${url}); }\n`; + } + + setFont(details) { + const current = this.current; + const fontObj = this.commonObjs.get(details[0]); + let size = details[1]; + current.font = fontObj; + + if (this.embedFonts && !fontObj.missingFile && !this.embeddedFonts[fontObj.loadedName]) { + this.addFontStyle(fontObj); + this.embeddedFonts[fontObj.loadedName] = fontObj; + } + + current.fontMatrix = fontObj.fontMatrix ? fontObj.fontMatrix : _util.FONT_IDENTITY_MATRIX; + let bold = "normal"; + + if (fontObj.black) { + bold = "900"; + } else if (fontObj.bold) { + bold = "bold"; + } + + const italic = fontObj.italic ? "italic" : "normal"; + + if (size < 0) { + size = -size; + current.fontDirection = -1; + } else { + current.fontDirection = 1; + } + + current.fontSize = size; + current.fontFamily = fontObj.loadedName; + current.fontWeight = bold; + current.fontStyle = italic; + current.tspan = this.svgFactory.createElement("svg:tspan"); + current.tspan.setAttributeNS(null, "y", pf(-current.y)); + current.xcoords = []; + current.ycoords = []; + } + + endText() { + const current = this.current; + + if (current.textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG && current.txtElement && current.txtElement.hasChildNodes()) { + current.element = current.txtElement; + this.clip("nonzero"); + this.endPath(); + } + } + + setLineWidth(width) { + if (width > 0) { + this.current.lineWidth = width; + } + } + + setLineCap(style) { + this.current.lineCap = LINE_CAP_STYLES[style]; + } + + setLineJoin(style) { + this.current.lineJoin = LINE_JOIN_STYLES[style]; + } + + setMiterLimit(limit) { + this.current.miterLimit = limit; + } + + setStrokeAlpha(strokeAlpha) { + this.current.strokeAlpha = strokeAlpha; + } + + setStrokeRGBColor(r, g, b) { + this.current.strokeColor = _util.Util.makeCssRgb(r, g, b); + } + + setFillAlpha(fillAlpha) { + this.current.fillAlpha = fillAlpha; + } + + setFillRGBColor(r, g, b) { + this.current.fillColor = _util.Util.makeCssRgb(r, g, b); + this.current.tspan = this.svgFactory.createElement("svg:tspan"); + this.current.xcoords = []; + this.current.ycoords = []; + } + + setStrokeColorN(args) { + this.current.strokeColor = this._makeColorN_Pattern(args); + } + + setFillColorN(args) { + this.current.fillColor = this._makeColorN_Pattern(args); + } + + shadingFill(args) { + const width = this.viewport.width; + const height = this.viewport.height; + + const inv = _util.Util.inverseTransform(this.transformMatrix); + + const bl = _util.Util.applyTransform([0, 0], inv); + + const br = _util.Util.applyTransform([0, height], inv); + + const ul = _util.Util.applyTransform([width, 0], inv); + + const ur = _util.Util.applyTransform([width, height], inv); + + const x0 = Math.min(bl[0], br[0], ul[0], ur[0]); + const y0 = Math.min(bl[1], br[1], ul[1], ur[1]); + const x1 = Math.max(bl[0], br[0], ul[0], ur[0]); + const y1 = Math.max(bl[1], br[1], ul[1], ur[1]); + const rect = this.svgFactory.createElement("svg:rect"); + rect.setAttributeNS(null, "x", x0); + rect.setAttributeNS(null, "y", y0); + rect.setAttributeNS(null, "width", x1 - x0); + rect.setAttributeNS(null, "height", y1 - y0); + rect.setAttributeNS(null, "fill", this._makeShadingPattern(args)); + + if (this.current.fillAlpha < 1) { + rect.setAttributeNS(null, "fill-opacity", this.current.fillAlpha); + } + + this._ensureTransformGroup().appendChild(rect); + } + + _makeColorN_Pattern(args) { + if (args[0] === "TilingPattern") { + return this._makeTilingPattern(args); + } + + return this._makeShadingPattern(args); + } + + _makeTilingPattern(args) { + const color = args[1]; + const operatorList = args[2]; + const matrix = args[3] || _util.IDENTITY_MATRIX; + const [x0, y0, x1, y1] = args[4]; + const xstep = args[5]; + const ystep = args[6]; + const paintType = args[7]; + const tilingId = `shading${shadingCount++}`; + + const [tx0, ty0] = _util.Util.applyTransform([x0, y0], matrix); + + const [tx1, ty1] = _util.Util.applyTransform([x1, y1], matrix); + + const [xscale, yscale] = _util.Util.singularValueDecompose2dScale(matrix); + + const txstep = xstep * xscale; + const tystep = ystep * yscale; + const tiling = this.svgFactory.createElement("svg:pattern"); + tiling.setAttributeNS(null, "id", tilingId); + tiling.setAttributeNS(null, "patternUnits", "userSpaceOnUse"); + tiling.setAttributeNS(null, "width", txstep); + tiling.setAttributeNS(null, "height", tystep); + tiling.setAttributeNS(null, "x", `${tx0}`); + tiling.setAttributeNS(null, "y", `${ty0}`); + const svg = this.svg; + const transformMatrix = this.transformMatrix; + const fillColor = this.current.fillColor; + const strokeColor = this.current.strokeColor; + const bbox = this.svgFactory.create(tx1 - tx0, ty1 - ty0); + this.svg = bbox; + this.transformMatrix = matrix; + + if (paintType === 2) { + const cssColor = _util.Util.makeCssRgb(...color); + + this.current.fillColor = cssColor; + this.current.strokeColor = cssColor; + } + + this.executeOpTree(this.convertOpList(operatorList)); + this.svg = svg; + this.transformMatrix = transformMatrix; + this.current.fillColor = fillColor; + this.current.strokeColor = strokeColor; + tiling.appendChild(bbox.childNodes[0]); + this.defs.appendChild(tiling); + return `url(#${tilingId})`; + } + + _makeShadingPattern(args) { + switch (args[0]) { + case "RadialAxial": + const shadingId = `shading${shadingCount++}`; + const colorStops = args[3]; + let gradient; + + switch (args[1]) { + case "axial": + const point0 = args[4]; + const point1 = args[5]; + gradient = this.svgFactory.createElement("svg:linearGradient"); + gradient.setAttributeNS(null, "id", shadingId); + gradient.setAttributeNS(null, "gradientUnits", "userSpaceOnUse"); + gradient.setAttributeNS(null, "x1", point0[0]); + gradient.setAttributeNS(null, "y1", point0[1]); + gradient.setAttributeNS(null, "x2", point1[0]); + gradient.setAttributeNS(null, "y2", point1[1]); + break; + + case "radial": + const focalPoint = args[4]; + const circlePoint = args[5]; + const focalRadius = args[6]; + const circleRadius = args[7]; + gradient = this.svgFactory.createElement("svg:radialGradient"); + gradient.setAttributeNS(null, "id", shadingId); + gradient.setAttributeNS(null, "gradientUnits", "userSpaceOnUse"); + gradient.setAttributeNS(null, "cx", circlePoint[0]); + gradient.setAttributeNS(null, "cy", circlePoint[1]); + gradient.setAttributeNS(null, "r", circleRadius); + gradient.setAttributeNS(null, "fx", focalPoint[0]); + gradient.setAttributeNS(null, "fy", focalPoint[1]); + gradient.setAttributeNS(null, "fr", focalRadius); + break; + + default: + throw new Error(`Unknown RadialAxial type: ${args[1]}`); + } + + for (const colorStop of colorStops) { + const stop = this.svgFactory.createElement("svg:stop"); + stop.setAttributeNS(null, "offset", colorStop[0]); + stop.setAttributeNS(null, "stop-color", colorStop[1]); + gradient.appendChild(stop); + } + + this.defs.appendChild(gradient); + return `url(#${shadingId})`; + + case "Mesh": + (0, _util.warn)("Unimplemented pattern Mesh"); + return null; + + case "Dummy": + return "hotpink"; + + default: + throw new Error(`Unknown IR type: ${args[0]}`); + } + } + + setDash(dashArray, dashPhase) { + this.current.dashArray = dashArray; + this.current.dashPhase = dashPhase; + } + + constructPath(ops, args) { + const current = this.current; + let x = current.x, + y = current.y; + let d = []; + let j = 0; + + for (const op of ops) { + switch (op | 0) { + case _util.OPS.rectangle: + x = args[j++]; + y = args[j++]; + const width = args[j++]; + const height = args[j++]; + const xw = x + width; + const yh = y + height; + d.push("M", pf(x), pf(y), "L", pf(xw), pf(y), "L", pf(xw), pf(yh), "L", pf(x), pf(yh), "Z"); + break; + + case _util.OPS.moveTo: + x = args[j++]; + y = args[j++]; + d.push("M", pf(x), pf(y)); + break; + + case _util.OPS.lineTo: + x = args[j++]; + y = args[j++]; + d.push("L", pf(x), pf(y)); + break; + + case _util.OPS.curveTo: + x = args[j + 4]; + y = args[j + 5]; + d.push("C", pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]), pf(x), pf(y)); + j += 6; + break; + + case _util.OPS.curveTo2: + d.push("C", pf(x), pf(y), pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3])); + x = args[j + 2]; + y = args[j + 3]; + j += 4; + break; + + case _util.OPS.curveTo3: + x = args[j + 2]; + y = args[j + 3]; + d.push("C", pf(args[j]), pf(args[j + 1]), pf(x), pf(y), pf(x), pf(y)); + j += 4; + break; + + case _util.OPS.closePath: + d.push("Z"); + break; + } + } + + d = d.join(" "); + + if (current.path && ops.length > 0 && ops[0] !== _util.OPS.rectangle && ops[0] !== _util.OPS.moveTo) { + d = current.path.getAttributeNS(null, "d") + d; + } else { + current.path = this.svgFactory.createElement("svg:path"); + + this._ensureTransformGroup().appendChild(current.path); + } + + current.path.setAttributeNS(null, "d", d); + current.path.setAttributeNS(null, "fill", "none"); + current.element = current.path; + current.setCurrentPoint(x, y); + } + + endPath() { + const current = this.current; + current.path = null; + + if (!this.pendingClip) { + return; + } + + if (!current.element) { + this.pendingClip = null; + return; + } + + const clipId = `clippath${clipCount++}`; + const clipPath = this.svgFactory.createElement("svg:clipPath"); + clipPath.setAttributeNS(null, "id", clipId); + clipPath.setAttributeNS(null, "transform", pm(this.transformMatrix)); + const clipElement = current.element.cloneNode(true); + + if (this.pendingClip === "evenodd") { + clipElement.setAttributeNS(null, "clip-rule", "evenodd"); + } else { + clipElement.setAttributeNS(null, "clip-rule", "nonzero"); + } + + this.pendingClip = null; + clipPath.appendChild(clipElement); + this.defs.appendChild(clipPath); + + if (current.activeClipUrl) { + current.clipGroup = null; + this.extraStack.forEach(function (prev) { + prev.clipGroup = null; + }); + clipPath.setAttributeNS(null, "clip-path", current.activeClipUrl); + } + + current.activeClipUrl = `url(#${clipId})`; + this.tgrp = null; + } + + clip(type) { + this.pendingClip = type; + } + + closePath() { + const current = this.current; + + if (current.path) { + const d = `${current.path.getAttributeNS(null, "d")}Z`; + current.path.setAttributeNS(null, "d", d); + } + } + + setLeading(leading) { + this.current.leading = -leading; + } + + setTextRise(textRise) { + this.current.textRise = textRise; + } + + setTextRenderingMode(textRenderingMode) { + this.current.textRenderingMode = textRenderingMode; + } + + setHScale(scale) { + this.current.textHScale = scale / 100; + } + + setRenderingIntent(intent) {} + + setFlatness(flatness) {} + + setGState(states) { + for (const [key, value] of states) { + switch (key) { + case "LW": + this.setLineWidth(value); + break; + + case "LC": + this.setLineCap(value); + break; + + case "LJ": + this.setLineJoin(value); + break; + + case "ML": + this.setMiterLimit(value); + break; + + case "D": + this.setDash(value[0], value[1]); + break; + + case "RI": + this.setRenderingIntent(value); + break; + + case "FL": + this.setFlatness(value); + break; + + case "Font": + this.setFont(value); + break; + + case "CA": + this.setStrokeAlpha(value); + break; + + case "ca": + this.setFillAlpha(value); + break; + + default: + (0, _util.warn)(`Unimplemented graphic state operator ${key}`); + break; + } + } + } + + fill() { + const current = this.current; + + if (current.element) { + current.element.setAttributeNS(null, "fill", current.fillColor); + current.element.setAttributeNS(null, "fill-opacity", current.fillAlpha); + this.endPath(); + } + } + + stroke() { + const current = this.current; + + if (current.element) { + this._setStrokeAttributes(current.element); + + current.element.setAttributeNS(null, "fill", "none"); + this.endPath(); + } + } + + _setStrokeAttributes(element, lineWidthScale = 1) { + const current = this.current; + let dashArray = current.dashArray; + + if (lineWidthScale !== 1 && dashArray.length > 0) { + dashArray = dashArray.map(function (value) { + return lineWidthScale * value; + }); + } + + element.setAttributeNS(null, "stroke", current.strokeColor); + element.setAttributeNS(null, "stroke-opacity", current.strokeAlpha); + element.setAttributeNS(null, "stroke-miterlimit", pf(current.miterLimit)); + element.setAttributeNS(null, "stroke-linecap", current.lineCap); + element.setAttributeNS(null, "stroke-linejoin", current.lineJoin); + element.setAttributeNS(null, "stroke-width", pf(lineWidthScale * current.lineWidth) + "px"); + element.setAttributeNS(null, "stroke-dasharray", dashArray.map(pf).join(" ")); + element.setAttributeNS(null, "stroke-dashoffset", pf(lineWidthScale * current.dashPhase) + "px"); + } + + eoFill() { + if (this.current.element) { + this.current.element.setAttributeNS(null, "fill-rule", "evenodd"); + } + + this.fill(); + } + + fillStroke() { + this.stroke(); + this.fill(); + } + + eoFillStroke() { + if (this.current.element) { + this.current.element.setAttributeNS(null, "fill-rule", "evenodd"); + } + + this.fillStroke(); + } + + closeStroke() { + this.closePath(); + this.stroke(); + } + + closeFillStroke() { + this.closePath(); + this.fillStroke(); + } + + closeEOFillStroke() { + this.closePath(); + this.eoFillStroke(); + } + + paintSolidColorImageMask() { + const rect = this.svgFactory.createElement("svg:rect"); + rect.setAttributeNS(null, "x", "0"); + rect.setAttributeNS(null, "y", "0"); + rect.setAttributeNS(null, "width", "1px"); + rect.setAttributeNS(null, "height", "1px"); + rect.setAttributeNS(null, "fill", this.current.fillColor); + + this._ensureTransformGroup().appendChild(rect); + } + + paintImageXObject(objId) { + const imgData = this.objs.get(objId); + + if (!imgData) { + (0, _util.warn)(`Dependent image with object ID ${objId} is not ready yet`); + return; + } + + this.paintInlineImageXObject(imgData); + } + + paintInlineImageXObject(imgData, mask) { + const width = imgData.width; + const height = imgData.height; + const imgSrc = convertImgDataToPng(imgData, this.forceDataSchema, !!mask); + const cliprect = this.svgFactory.createElement("svg:rect"); + cliprect.setAttributeNS(null, "x", "0"); + cliprect.setAttributeNS(null, "y", "0"); + cliprect.setAttributeNS(null, "width", pf(width)); + cliprect.setAttributeNS(null, "height", pf(height)); + this.current.element = cliprect; + this.clip("nonzero"); + const imgEl = this.svgFactory.createElement("svg:image"); + imgEl.setAttributeNS(XLINK_NS, "xlink:href", imgSrc); + imgEl.setAttributeNS(null, "x", "0"); + imgEl.setAttributeNS(null, "y", pf(-height)); + imgEl.setAttributeNS(null, "width", pf(width) + "px"); + imgEl.setAttributeNS(null, "height", pf(height) + "px"); + imgEl.setAttributeNS(null, "transform", `scale(${pf(1 / width)} ${pf(-1 / height)})`); + + if (mask) { + mask.appendChild(imgEl); + } else { + this._ensureTransformGroup().appendChild(imgEl); + } + } + + paintImageMaskXObject(imgData) { + const current = this.current; + const width = imgData.width; + const height = imgData.height; + const fillColor = current.fillColor; + current.maskId = `mask${maskCount++}`; + const mask = this.svgFactory.createElement("svg:mask"); + mask.setAttributeNS(null, "id", current.maskId); + const rect = this.svgFactory.createElement("svg:rect"); + rect.setAttributeNS(null, "x", "0"); + rect.setAttributeNS(null, "y", "0"); + rect.setAttributeNS(null, "width", pf(width)); + rect.setAttributeNS(null, "height", pf(height)); + rect.setAttributeNS(null, "fill", fillColor); + rect.setAttributeNS(null, "mask", `url(#${current.maskId})`); + this.defs.appendChild(mask); + + this._ensureTransformGroup().appendChild(rect); + + this.paintInlineImageXObject(imgData, mask); + } + + paintFormXObjectBegin(matrix, bbox) { + if (Array.isArray(matrix) && matrix.length === 6) { + this.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + } + + if (bbox) { + const width = bbox[2] - bbox[0]; + const height = bbox[3] - bbox[1]; + const cliprect = this.svgFactory.createElement("svg:rect"); + cliprect.setAttributeNS(null, "x", bbox[0]); + cliprect.setAttributeNS(null, "y", bbox[1]); + cliprect.setAttributeNS(null, "width", pf(width)); + cliprect.setAttributeNS(null, "height", pf(height)); + this.current.element = cliprect; + this.clip("nonzero"); + this.endPath(); + } + } + + paintFormXObjectEnd() {} + + _initialize(viewport) { + const svg = this.svgFactory.create(viewport.width, viewport.height); + const definitions = this.svgFactory.createElement("svg:defs"); + svg.appendChild(definitions); + this.defs = definitions; + const rootGroup = this.svgFactory.createElement("svg:g"); + rootGroup.setAttributeNS(null, "transform", pm(viewport.transform)); + svg.appendChild(rootGroup); + this.svg = rootGroup; + return svg; + } + + _ensureClipGroup() { + if (!this.current.clipGroup) { + const clipGroup = this.svgFactory.createElement("svg:g"); + clipGroup.setAttributeNS(null, "clip-path", this.current.activeClipUrl); + this.svg.appendChild(clipGroup); + this.current.clipGroup = clipGroup; + } + + return this.current.clipGroup; + } + + _ensureTransformGroup() { + if (!this.tgrp) { + this.tgrp = this.svgFactory.createElement("svg:g"); + this.tgrp.setAttributeNS(null, "transform", pm(this.transformMatrix)); + + if (this.current.activeClipUrl) { + this._ensureClipGroup().appendChild(this.tgrp); + } else { + this.svg.appendChild(this.tgrp); + } + } + + return this.tgrp; + } + + }; +} + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFNodeStream = void 0; + +var _util = __w_pdfjs_require__(2); + +var _network_utils = __w_pdfjs_require__(20); + +; + +const fs = require("fs"); + +const http = require("http"); + +const https = require("https"); + +const url = require("url"); + +const fileUriRegex = /^file:\/\/\/[a-zA-Z]:\//; + +function parseUrl(sourceUrl) { + const parsedUrl = url.parse(sourceUrl); + + if (parsedUrl.protocol === "file:" || parsedUrl.host) { + return parsedUrl; + } + + if (/^[a-z]:[/\\]/i.test(sourceUrl)) { + return url.parse(`file:///${sourceUrl}`); + } + + if (!parsedUrl.host) { + parsedUrl.protocol = "file:"; + } + + return parsedUrl; +} + +class PDFNodeStream { + constructor(source) { + this.source = source; + this.url = parseUrl(source.url); + this.isHttp = this.url.protocol === "http:" || this.url.protocol === "https:"; + this.isFsUrl = this.url.protocol === "file:"; + this.httpHeaders = this.isHttp && source.httpHeaders || {}; + this._fullRequestReader = null; + this._rangeRequestReaders = []; + } + + get _progressiveDataLength() { + return this._fullRequestReader ? this._fullRequestReader._loaded : 0; + } + + getFullReader() { + (0, _util.assert)(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."); + this._fullRequestReader = this.isFsUrl ? new PDFNodeStreamFsFullReader(this) : new PDFNodeStreamFullReader(this); + return this._fullRequestReader; + } + + getRangeReader(start, end) { + if (end <= this._progressiveDataLength) { + return null; + } + + const rangeReader = this.isFsUrl ? new PDFNodeStreamFsRangeReader(this, start, end) : new PDFNodeStreamRangeReader(this, start, end); + + this._rangeRequestReaders.push(rangeReader); + + return rangeReader; + } + + cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } + + const readers = this._rangeRequestReaders.slice(0); + + readers.forEach(function (reader) { + reader.cancel(reason); + }); + } + +} + +exports.PDFNodeStream = PDFNodeStream; + +class BaseFullReader { + constructor(stream) { + this._url = stream.url; + this._done = false; + this._storedError = null; + this.onProgress = null; + const source = stream.source; + this._contentLength = source.length; + this._loaded = 0; + this._filename = null; + this._disableRange = source.disableRange || false; + this._rangeChunkSize = source.rangeChunkSize; + + if (!this._rangeChunkSize && !this._disableRange) { + this._disableRange = true; + } + + this._isStreamingSupported = !source.disableStream; + this._isRangeSupported = !source.disableRange; + this._readableStream = null; + this._readCapability = (0, _util.createPromiseCapability)(); + this._headersCapability = (0, _util.createPromiseCapability)(); + } + + get headersReady() { + return this._headersCapability.promise; + } + + get filename() { + return this._filename; + } + + get contentLength() { + return this._contentLength; + } + + get isRangeSupported() { + return this._isRangeSupported; + } + + get isStreamingSupported() { + return this._isStreamingSupported; + } + + async read() { + await this._readCapability.promise; + + if (this._done) { + return { + value: undefined, + done: true + }; + } + + if (this._storedError) { + throw this._storedError; + } + + const chunk = this._readableStream.read(); + + if (chunk === null) { + this._readCapability = (0, _util.createPromiseCapability)(); + return this.read(); + } + + this._loaded += chunk.length; + + if (this.onProgress) { + this.onProgress({ + loaded: this._loaded, + total: this._contentLength + }); + } + + const buffer = new Uint8Array(chunk).buffer; + return { + value: buffer, + done: false + }; + } + + cancel(reason) { + if (!this._readableStream) { + this._error(reason); + + return; + } + + this._readableStream.destroy(reason); + } + + _error(reason) { + this._storedError = reason; + + this._readCapability.resolve(); + } + + _setReadableStream(readableStream) { + this._readableStream = readableStream; + readableStream.on("readable", () => { + this._readCapability.resolve(); + }); + readableStream.on("end", () => { + readableStream.destroy(); + this._done = true; + + this._readCapability.resolve(); + }); + readableStream.on("error", reason => { + this._error(reason); + }); + + if (!this._isStreamingSupported && this._isRangeSupported) { + this._error(new _util.AbortException("streaming is disabled")); + } + + if (this._storedError) { + this._readableStream.destroy(this._storedError); + } + } + +} + +class BaseRangeReader { + constructor(stream) { + this._url = stream.url; + this._done = false; + this._storedError = null; + this.onProgress = null; + this._loaded = 0; + this._readableStream = null; + this._readCapability = (0, _util.createPromiseCapability)(); + const source = stream.source; + this._isStreamingSupported = !source.disableStream; + } + + get isStreamingSupported() { + return this._isStreamingSupported; + } + + async read() { + await this._readCapability.promise; + + if (this._done) { + return { + value: undefined, + done: true + }; + } + + if (this._storedError) { + throw this._storedError; + } + + const chunk = this._readableStream.read(); + + if (chunk === null) { + this._readCapability = (0, _util.createPromiseCapability)(); + return this.read(); + } + + this._loaded += chunk.length; + + if (this.onProgress) { + this.onProgress({ + loaded: this._loaded + }); + } + + const buffer = new Uint8Array(chunk).buffer; + return { + value: buffer, + done: false + }; + } + + cancel(reason) { + if (!this._readableStream) { + this._error(reason); + + return; + } + + this._readableStream.destroy(reason); + } + + _error(reason) { + this._storedError = reason; + + this._readCapability.resolve(); + } + + _setReadableStream(readableStream) { + this._readableStream = readableStream; + readableStream.on("readable", () => { + this._readCapability.resolve(); + }); + readableStream.on("end", () => { + readableStream.destroy(); + this._done = true; + + this._readCapability.resolve(); + }); + readableStream.on("error", reason => { + this._error(reason); + }); + + if (this._storedError) { + this._readableStream.destroy(this._storedError); + } + } + +} + +function createRequestOptions(parsedUrl, headers) { + return { + protocol: parsedUrl.protocol, + auth: parsedUrl.auth, + host: parsedUrl.hostname, + port: parsedUrl.port, + path: parsedUrl.path, + method: "GET", + headers + }; +} + +class PDFNodeStreamFullReader extends BaseFullReader { + constructor(stream) { + super(stream); + + const handleResponse = response => { + if (response.statusCode === 404) { + const error = new _util.MissingPDFException(`Missing PDF "${this._url}".`); + this._storedError = error; + + this._headersCapability.reject(error); + + return; + } + + this._headersCapability.resolve(); + + this._setReadableStream(response); + + const getResponseHeader = name => { + return this._readableStream.headers[name.toLowerCase()]; + }; + + const { + allowRangeRequests, + suggestedLength + } = (0, _network_utils.validateRangeRequestCapabilities)({ + getResponseHeader, + isHttp: stream.isHttp, + rangeChunkSize: this._rangeChunkSize, + disableRange: this._disableRange + }); + this._isRangeSupported = allowRangeRequests; + this._contentLength = suggestedLength || this._contentLength; + this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); + }; + + this._request = null; + + if (this._url.protocol === "http:") { + this._request = http.request(createRequestOptions(this._url, stream.httpHeaders), handleResponse); + } else { + this._request = https.request(createRequestOptions(this._url, stream.httpHeaders), handleResponse); + } + + this._request.on("error", reason => { + this._storedError = reason; + + this._headersCapability.reject(reason); + }); + + this._request.end(); + } + +} + +class PDFNodeStreamRangeReader extends BaseRangeReader { + constructor(stream, start, end) { + super(stream); + this._httpHeaders = {}; + + for (const property in stream.httpHeaders) { + const value = stream.httpHeaders[property]; + + if (typeof value === "undefined") { + continue; + } + + this._httpHeaders[property] = value; + } + + this._httpHeaders.Range = `bytes=${start}-${end - 1}`; + + const handleResponse = response => { + if (response.statusCode === 404) { + const error = new _util.MissingPDFException(`Missing PDF "${this._url}".`); + this._storedError = error; + return; + } + + this._setReadableStream(response); + }; + + this._request = null; + + if (this._url.protocol === "http:") { + this._request = http.request(createRequestOptions(this._url, this._httpHeaders), handleResponse); + } else { + this._request = https.request(createRequestOptions(this._url, this._httpHeaders), handleResponse); + } + + this._request.on("error", reason => { + this._storedError = reason; + }); + + this._request.end(); + } + +} + +class PDFNodeStreamFsFullReader extends BaseFullReader { + constructor(stream) { + super(stream); + let path = decodeURIComponent(this._url.path); + + if (fileUriRegex.test(this._url.href)) { + path = path.replace(/^\//, ""); + } + + fs.lstat(path, (error, stat) => { + if (error) { + if (error.code === "ENOENT") { + error = new _util.MissingPDFException(`Missing PDF "${path}".`); + } + + this._storedError = error; + + this._headersCapability.reject(error); + + return; + } + + this._contentLength = stat.size; + + this._setReadableStream(fs.createReadStream(path)); + + this._headersCapability.resolve(); + }); + } + +} + +class PDFNodeStreamFsRangeReader extends BaseRangeReader { + constructor(stream, start, end) { + super(stream); + let path = decodeURIComponent(this._url.path); + + if (fileUriRegex.test(this._url.href)) { + path = path.replace(/^\//, ""); + } + + this._setReadableStream(fs.createReadStream(path, { + start, + end: end - 1 + })); + } + +} + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createResponseStatusError = createResponseStatusError; +exports.extractFilenameFromHeader = extractFilenameFromHeader; +exports.validateRangeRequestCapabilities = validateRangeRequestCapabilities; +exports.validateResponseStatus = validateResponseStatus; + +var _util = __w_pdfjs_require__(2); + +var _content_disposition = __w_pdfjs_require__(21); + +function validateRangeRequestCapabilities({ + getResponseHeader, + isHttp, + rangeChunkSize, + disableRange +}) { + (0, _util.assert)(rangeChunkSize > 0, "Range chunk size must be larger than zero"); + const returnValues = { + allowRangeRequests: false, + suggestedLength: undefined + }; + const length = parseInt(getResponseHeader("Content-Length"), 10); + + if (!Number.isInteger(length)) { + return returnValues; + } + + returnValues.suggestedLength = length; + + if (length <= 2 * rangeChunkSize) { + return returnValues; + } + + if (disableRange || !isHttp) { + return returnValues; + } + + if (getResponseHeader("Accept-Ranges") !== "bytes") { + return returnValues; + } + + const contentEncoding = getResponseHeader("Content-Encoding") || "identity"; + + if (contentEncoding !== "identity") { + return returnValues; + } + + returnValues.allowRangeRequests = true; + return returnValues; +} + +function extractFilenameFromHeader(getResponseHeader) { + const contentDisposition = getResponseHeader("Content-Disposition"); + + if (contentDisposition) { + let filename = (0, _content_disposition.getFilenameFromContentDispositionHeader)(contentDisposition); + + if (filename.includes("%")) { + try { + filename = decodeURIComponent(filename); + } catch (ex) {} + } + + if (/\.pdf$/i.test(filename)) { + return filename; + } + } + + return null; +} + +function createResponseStatusError(status, url) { + if (status === 404 || status === 0 && url.startsWith("file:")) { + return new _util.MissingPDFException('Missing PDF "' + url + '".'); + } + + return new _util.UnexpectedResponseException("Unexpected server response (" + status + ') while retrieving PDF "' + url + '".', status); +} + +function validateResponseStatus(status) { + return status === 200 || status === 206; +} + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getFilenameFromContentDispositionHeader = getFilenameFromContentDispositionHeader; + +function getFilenameFromContentDispositionHeader(contentDisposition) { + let needsEncodingFixup = true; + let tmp = toParamRegExp("filename\\*", "i").exec(contentDisposition); + + if (tmp) { + tmp = tmp[1]; + let filename = rfc2616unquote(tmp); + filename = unescape(filename); + filename = rfc5987decode(filename); + filename = rfc2047decode(filename); + return fixupEncoding(filename); + } + + tmp = rfc2231getparam(contentDisposition); + + if (tmp) { + const filename = rfc2047decode(tmp); + return fixupEncoding(filename); + } + + tmp = toParamRegExp("filename", "i").exec(contentDisposition); + + if (tmp) { + tmp = tmp[1]; + let filename = rfc2616unquote(tmp); + filename = rfc2047decode(filename); + return fixupEncoding(filename); + } + + function toParamRegExp(attributePattern, flags) { + return new RegExp("(?:^|;)\\s*" + attributePattern + "\\s*=\\s*" + "(" + '[^";\\s][^;\\s]*' + "|" + '"(?:[^"\\\\]|\\\\"?)+"?' + ")", flags); + } + + function textdecode(encoding, value) { + if (encoding) { + if (!/^[\x00-\xFF]+$/.test(value)) { + return value; + } + + try { + const decoder = new TextDecoder(encoding, { + fatal: true + }); + const bytes = Array.from(value, function (ch) { + return ch.charCodeAt(0) & 0xff; + }); + value = decoder.decode(new Uint8Array(bytes)); + needsEncodingFixup = false; + } catch (e) { + if (/^utf-?8$/i.test(encoding)) { + try { + value = decodeURIComponent(escape(value)); + needsEncodingFixup = false; + } catch (err) {} + } + } + } + + return value; + } + + function fixupEncoding(value) { + if (needsEncodingFixup && /[\x80-\xff]/.test(value)) { + value = textdecode("utf-8", value); + + if (needsEncodingFixup) { + value = textdecode("iso-8859-1", value); + } + } + + return value; + } + + function rfc2231getparam(contentDispositionStr) { + const matches = []; + let match; + const iter = toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)", "ig"); + + while ((match = iter.exec(contentDispositionStr)) !== null) { + let [, n, quot, part] = match; + n = parseInt(n, 10); + + if (n in matches) { + if (n === 0) { + break; + } + + continue; + } + + matches[n] = [quot, part]; + } + + const parts = []; + + for (let n = 0; n < matches.length; ++n) { + if (!(n in matches)) { + break; + } + + let [quot, part] = matches[n]; + part = rfc2616unquote(part); + + if (quot) { + part = unescape(part); + + if (n === 0) { + part = rfc5987decode(part); + } + } + + parts.push(part); + } + + return parts.join(""); + } + + function rfc2616unquote(value) { + if (value.startsWith('"')) { + const parts = value.slice(1).split('\\"'); + + for (let i = 0; i < parts.length; ++i) { + const quotindex = parts[i].indexOf('"'); + + if (quotindex !== -1) { + parts[i] = parts[i].slice(0, quotindex); + parts.length = i + 1; + } + + parts[i] = parts[i].replace(/\\(.)/g, "$1"); + } + + value = parts.join('"'); + } + + return value; + } + + function rfc5987decode(extvalue) { + const encodingend = extvalue.indexOf("'"); + + if (encodingend === -1) { + return extvalue; + } + + const encoding = extvalue.slice(0, encodingend); + const langvalue = extvalue.slice(encodingend + 1); + const value = langvalue.replace(/^[^']*'/, ""); + return textdecode(encoding, value); + } + + function rfc2047decode(value) { + if (!value.startsWith("=?") || /[\x00-\x19\x80-\xff]/.test(value)) { + return value; + } + + return value.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g, function (matches, charset, encoding, text) { + if (encoding === "q" || encoding === "Q") { + text = text.replace(/_/g, " "); + text = text.replace(/=([0-9a-fA-F]{2})/g, function (match, hex) { + return String.fromCharCode(parseInt(hex, 16)); + }); + return textdecode(charset, text); + } + + try { + text = atob(text); + } catch (e) {} + + return textdecode(charset, text); + }); + } + + return ""; +} + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFNetworkStream = void 0; + +var _util = __w_pdfjs_require__(2); + +var _network_utils = __w_pdfjs_require__(20); + +; +const OK_RESPONSE = 200; +const PARTIAL_CONTENT_RESPONSE = 206; + +function getArrayBuffer(xhr) { + const data = xhr.response; + + if (typeof data !== "string") { + return data; + } + + const array = (0, _util.stringToBytes)(data); + return array.buffer; +} + +class NetworkManager { + constructor(url, args) { + this.url = url; + args = args || {}; + this.isHttp = /^https?:/i.test(url); + this.httpHeaders = this.isHttp && args.httpHeaders || {}; + this.withCredentials = args.withCredentials || false; + + this.getXhr = args.getXhr || function NetworkManager_getXhr() { + return new XMLHttpRequest(); + }; + + this.currXhrId = 0; + this.pendingRequests = Object.create(null); + } + + requestRange(begin, end, listeners) { + const args = { + begin, + end + }; + + for (const prop in listeners) { + args[prop] = listeners[prop]; + } + + return this.request(args); + } + + requestFull(listeners) { + return this.request(listeners); + } + + request(args) { + const xhr = this.getXhr(); + const xhrId = this.currXhrId++; + const pendingRequest = this.pendingRequests[xhrId] = { + xhr + }; + xhr.open("GET", this.url); + xhr.withCredentials = this.withCredentials; + + for (const property in this.httpHeaders) { + const value = this.httpHeaders[property]; + + if (typeof value === "undefined") { + continue; + } + + xhr.setRequestHeader(property, value); + } + + if (this.isHttp && "begin" in args && "end" in args) { + xhr.setRequestHeader("Range", `bytes=${args.begin}-${args.end - 1}`); + pendingRequest.expectedStatus = PARTIAL_CONTENT_RESPONSE; + } else { + pendingRequest.expectedStatus = OK_RESPONSE; + } + + xhr.responseType = "arraybuffer"; + + if (args.onError) { + xhr.onerror = function (evt) { + args.onError(xhr.status); + }; + } + + xhr.onreadystatechange = this.onStateChange.bind(this, xhrId); + xhr.onprogress = this.onProgress.bind(this, xhrId); + pendingRequest.onHeadersReceived = args.onHeadersReceived; + pendingRequest.onDone = args.onDone; + pendingRequest.onError = args.onError; + pendingRequest.onProgress = args.onProgress; + xhr.send(null); + return xhrId; + } + + onProgress(xhrId, evt) { + const pendingRequest = this.pendingRequests[xhrId]; + + if (!pendingRequest) { + return; + } + + if (pendingRequest.onProgress) { + pendingRequest.onProgress(evt); + } + } + + onStateChange(xhrId, evt) { + const pendingRequest = this.pendingRequests[xhrId]; + + if (!pendingRequest) { + return; + } + + const xhr = pendingRequest.xhr; + + if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) { + pendingRequest.onHeadersReceived(); + delete pendingRequest.onHeadersReceived; + } + + if (xhr.readyState !== 4) { + return; + } + + if (!(xhrId in this.pendingRequests)) { + return; + } + + delete this.pendingRequests[xhrId]; + + if (xhr.status === 0 && this.isHttp) { + if (pendingRequest.onError) { + pendingRequest.onError(xhr.status); + } + + return; + } + + const xhrStatus = xhr.status || OK_RESPONSE; + const ok_response_on_range_request = xhrStatus === OK_RESPONSE && pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE; + + if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) { + if (pendingRequest.onError) { + pendingRequest.onError(xhr.status); + } + + return; + } + + const chunk = getArrayBuffer(xhr); + + if (xhrStatus === PARTIAL_CONTENT_RESPONSE) { + const rangeHeader = xhr.getResponseHeader("Content-Range"); + const matches = /bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader); + pendingRequest.onDone({ + begin: parseInt(matches[1], 10), + chunk + }); + } else if (chunk) { + pendingRequest.onDone({ + begin: 0, + chunk + }); + } else if (pendingRequest.onError) { + pendingRequest.onError(xhr.status); + } + } + + hasPendingRequests() { + for (const xhrId in this.pendingRequests) { + return true; + } + + return false; + } + + getRequestXhr(xhrId) { + return this.pendingRequests[xhrId].xhr; + } + + isPendingRequest(xhrId) { + return xhrId in this.pendingRequests; + } + + abortAllRequests() { + for (const xhrId in this.pendingRequests) { + this.abortRequest(xhrId | 0); + } + } + + abortRequest(xhrId) { + const xhr = this.pendingRequests[xhrId].xhr; + delete this.pendingRequests[xhrId]; + xhr.abort(); + } + +} + +class PDFNetworkStream { + constructor(source) { + this._source = source; + this._manager = new NetworkManager(source.url, { + httpHeaders: source.httpHeaders, + withCredentials: source.withCredentials + }); + this._rangeChunkSize = source.rangeChunkSize; + this._fullRequestReader = null; + this._rangeRequestReaders = []; + } + + _onRangeRequestReaderClosed(reader) { + const i = this._rangeRequestReaders.indexOf(reader); + + if (i >= 0) { + this._rangeRequestReaders.splice(i, 1); + } + } + + getFullReader() { + (0, _util.assert)(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."); + this._fullRequestReader = new PDFNetworkStreamFullRequestReader(this._manager, this._source); + return this._fullRequestReader; + } + + getRangeReader(begin, end) { + const reader = new PDFNetworkStreamRangeRequestReader(this._manager, begin, end); + reader.onClosed = this._onRangeRequestReaderClosed.bind(this); + + this._rangeRequestReaders.push(reader); + + return reader; + } + + cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } + + const readers = this._rangeRequestReaders.slice(0); + + readers.forEach(function (reader) { + reader.cancel(reason); + }); + } + +} + +exports.PDFNetworkStream = PDFNetworkStream; + +class PDFNetworkStreamFullRequestReader { + constructor(manager, source) { + this._manager = manager; + const args = { + onHeadersReceived: this._onHeadersReceived.bind(this), + onDone: this._onDone.bind(this), + onError: this._onError.bind(this), + onProgress: this._onProgress.bind(this) + }; + this._url = source.url; + this._fullRequestId = manager.requestFull(args); + this._headersReceivedCapability = (0, _util.createPromiseCapability)(); + this._disableRange = source.disableRange || false; + this._contentLength = source.length; + this._rangeChunkSize = source.rangeChunkSize; + + if (!this._rangeChunkSize && !this._disableRange) { + this._disableRange = true; + } + + this._isStreamingSupported = false; + this._isRangeSupported = false; + this._cachedChunks = []; + this._requests = []; + this._done = false; + this._storedError = undefined; + this._filename = null; + this.onProgress = null; + } + + _onHeadersReceived() { + const fullRequestXhrId = this._fullRequestId; + + const fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId); + + const getResponseHeader = name => { + return fullRequestXhr.getResponseHeader(name); + }; + + const { + allowRangeRequests, + suggestedLength + } = (0, _network_utils.validateRangeRequestCapabilities)({ + getResponseHeader, + isHttp: this._manager.isHttp, + rangeChunkSize: this._rangeChunkSize, + disableRange: this._disableRange + }); + + if (allowRangeRequests) { + this._isRangeSupported = true; + } + + this._contentLength = suggestedLength || this._contentLength; + this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); + + if (this._isRangeSupported) { + this._manager.abortRequest(fullRequestXhrId); + } + + this._headersReceivedCapability.resolve(); + } + + _onDone(args) { + if (args) { + if (this._requests.length > 0) { + const requestCapability = this._requests.shift(); + + requestCapability.resolve({ + value: args.chunk, + done: false + }); + } else { + this._cachedChunks.push(args.chunk); + } + } + + this._done = true; + + if (this._cachedChunks.length > 0) { + return; + } + + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + } + + _onError(status) { + const url = this._url; + const exception = (0, _network_utils.createResponseStatusError)(status, url); + this._storedError = exception; + + this._headersReceivedCapability.reject(exception); + + this._requests.forEach(function (requestCapability) { + requestCapability.reject(exception); + }); + + this._requests = []; + this._cachedChunks = []; + } + + _onProgress(data) { + if (this.onProgress) { + this.onProgress({ + loaded: data.loaded, + total: data.lengthComputable ? data.total : this._contentLength + }); + } + } + + get filename() { + return this._filename; + } + + get isRangeSupported() { + return this._isRangeSupported; + } + + get isStreamingSupported() { + return this._isStreamingSupported; + } + + get contentLength() { + return this._contentLength; + } + + get headersReady() { + return this._headersReceivedCapability.promise; + } + + async read() { + if (this._storedError) { + throw this._storedError; + } + + if (this._cachedChunks.length > 0) { + const chunk = this._cachedChunks.shift(); + + return { + value: chunk, + done: false + }; + } + + if (this._done) { + return { + value: undefined, + done: true + }; + } + + const requestCapability = (0, _util.createPromiseCapability)(); + + this._requests.push(requestCapability); + + return requestCapability.promise; + } + + cancel(reason) { + this._done = true; + + this._headersReceivedCapability.reject(reason); + + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + + if (this._manager.isPendingRequest(this._fullRequestId)) { + this._manager.abortRequest(this._fullRequestId); + } + + this._fullRequestReader = null; + } + +} + +class PDFNetworkStreamRangeRequestReader { + constructor(manager, begin, end) { + this._manager = manager; + const args = { + onDone: this._onDone.bind(this), + onProgress: this._onProgress.bind(this) + }; + this._requestId = manager.requestRange(begin, end, args); + this._requests = []; + this._queuedChunk = null; + this._done = false; + this.onProgress = null; + this.onClosed = null; + } + + _close() { + if (this.onClosed) { + this.onClosed(this); + } + } + + _onDone(data) { + const chunk = data.chunk; + + if (this._requests.length > 0) { + const requestCapability = this._requests.shift(); + + requestCapability.resolve({ + value: chunk, + done: false + }); + } else { + this._queuedChunk = chunk; + } + + this._done = true; + + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + + this._close(); + } + + _onProgress(evt) { + if (!this.isStreamingSupported && this.onProgress) { + this.onProgress({ + loaded: evt.loaded + }); + } + } + + get isStreamingSupported() { + return false; + } + + async read() { + if (this._queuedChunk !== null) { + const chunk = this._queuedChunk; + this._queuedChunk = null; + return { + value: chunk, + done: false + }; + } + + if (this._done) { + return { + value: undefined, + done: true + }; + } + + const requestCapability = (0, _util.createPromiseCapability)(); + + this._requests.push(requestCapability); + + return requestCapability.promise; + } + + cancel(reason) { + this._done = true; + + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + + if (this._manager.isPendingRequest(this._requestId)) { + this._manager.abortRequest(this._requestId); + } + + this._close(); + } + +} + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFFetchStream = void 0; + +var _util = __w_pdfjs_require__(2); + +var _network_utils = __w_pdfjs_require__(20); + +; + +function createFetchOptions(headers, withCredentials, abortController) { + return { + method: "GET", + headers, + signal: abortController && abortController.signal, + mode: "cors", + credentials: withCredentials ? "include" : "same-origin", + redirect: "follow" + }; +} + +function createHeaders(httpHeaders) { + const headers = new Headers(); + + for (const property in httpHeaders) { + const value = httpHeaders[property]; + + if (typeof value === "undefined") { + continue; + } + + headers.append(property, value); + } + + return headers; +} + +class PDFFetchStream { + constructor(source) { + this.source = source; + this.isHttp = /^https?:/i.test(source.url); + this.httpHeaders = this.isHttp && source.httpHeaders || {}; + this._fullRequestReader = null; + this._rangeRequestReaders = []; + } + + get _progressiveDataLength() { + return this._fullRequestReader ? this._fullRequestReader._loaded : 0; + } + + getFullReader() { + (0, _util.assert)(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."); + this._fullRequestReader = new PDFFetchStreamReader(this); + return this._fullRequestReader; + } + + getRangeReader(begin, end) { + if (end <= this._progressiveDataLength) { + return null; + } + + const reader = new PDFFetchStreamRangeReader(this, begin, end); + + this._rangeRequestReaders.push(reader); + + return reader; + } + + cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } + + const readers = this._rangeRequestReaders.slice(0); + + readers.forEach(function (reader) { + reader.cancel(reason); + }); + } + +} + +exports.PDFFetchStream = PDFFetchStream; + +class PDFFetchStreamReader { + constructor(stream) { + this._stream = stream; + this._reader = null; + this._loaded = 0; + this._filename = null; + const source = stream.source; + this._withCredentials = source.withCredentials || false; + this._contentLength = source.length; + this._headersCapability = (0, _util.createPromiseCapability)(); + this._disableRange = source.disableRange || false; + this._rangeChunkSize = source.rangeChunkSize; + + if (!this._rangeChunkSize && !this._disableRange) { + this._disableRange = true; + } + + if (typeof AbortController !== "undefined") { + this._abortController = new AbortController(); + } + + this._isStreamingSupported = !source.disableStream; + this._isRangeSupported = !source.disableRange; + this._headers = createHeaders(this._stream.httpHeaders); + const url = source.url; + fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(response => { + if (!(0, _network_utils.validateResponseStatus)(response.status)) { + throw (0, _network_utils.createResponseStatusError)(response.status, url); + } + + this._reader = response.body.getReader(); + + this._headersCapability.resolve(); + + const getResponseHeader = name => { + return response.headers.get(name); + }; + + const { + allowRangeRequests, + suggestedLength + } = (0, _network_utils.validateRangeRequestCapabilities)({ + getResponseHeader, + isHttp: this._stream.isHttp, + rangeChunkSize: this._rangeChunkSize, + disableRange: this._disableRange + }); + this._isRangeSupported = allowRangeRequests; + this._contentLength = suggestedLength || this._contentLength; + this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); + + if (!this._isStreamingSupported && this._isRangeSupported) { + this.cancel(new _util.AbortException("Streaming is disabled.")); + } + }).catch(this._headersCapability.reject); + this.onProgress = null; + } + + get headersReady() { + return this._headersCapability.promise; + } + + get filename() { + return this._filename; + } + + get contentLength() { + return this._contentLength; + } + + get isRangeSupported() { + return this._isRangeSupported; + } + + get isStreamingSupported() { + return this._isStreamingSupported; + } + + async read() { + await this._headersCapability.promise; + const { + value, + done + } = await this._reader.read(); + + if (done) { + return { + value, + done + }; + } + + this._loaded += value.byteLength; + + if (this.onProgress) { + this.onProgress({ + loaded: this._loaded, + total: this._contentLength + }); + } + + const buffer = new Uint8Array(value).buffer; + return { + value: buffer, + done: false + }; + } + + cancel(reason) { + if (this._reader) { + this._reader.cancel(reason); + } + + if (this._abortController) { + this._abortController.abort(); + } + } + +} + +class PDFFetchStreamRangeReader { + constructor(stream, begin, end) { + this._stream = stream; + this._reader = null; + this._loaded = 0; + const source = stream.source; + this._withCredentials = source.withCredentials || false; + this._readCapability = (0, _util.createPromiseCapability)(); + this._isStreamingSupported = !source.disableStream; + + if (typeof AbortController !== "undefined") { + this._abortController = new AbortController(); + } + + this._headers = createHeaders(this._stream.httpHeaders); + + this._headers.append("Range", `bytes=${begin}-${end - 1}`); + + const url = source.url; + fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(response => { + if (!(0, _network_utils.validateResponseStatus)(response.status)) { + throw (0, _network_utils.createResponseStatusError)(response.status, url); + } + + this._readCapability.resolve(); + + this._reader = response.body.getReader(); + }); + this.onProgress = null; + } + + get isStreamingSupported() { + return this._isStreamingSupported; + } + + async read() { + await this._readCapability.promise; + const { + value, + done + } = await this._reader.read(); + + if (done) { + return { + value, + done + }; + } + + this._loaded += value.byteLength; + + if (this.onProgress) { + this.onProgress({ + loaded: this._loaded + }); + } + + const buffer = new Uint8Array(value).buffer; + return { + value: buffer, + done: false + }; + } + + cancel(reason) { + if (this._reader) { + this._reader.cancel(reason); + } + + if (this._abortController) { + this._abortController.abort(); + } + } + +} + +/***/ }) +/******/ ]); +}); +//# sourceMappingURL=pdf.js.map \ No newline at end of file diff --git a/src/main/resources/static/plugins/pdfjs/build/pdf.worker.js b/src/main/resources/static/plugins/pdfjs/build/pdf.worker.js new file mode 100644 index 0000000..e696bb8 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/build/pdf.worker.js @@ -0,0 +1,45971 @@ +/** + * @licstart The following is the entire license notice for the + * Javascript code in this page + * + * Copyright 2020 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @licend The above is the entire license notice for the + * Javascript code in this page + */ + +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("pdfjs/build/pdf.worker", [], factory); + else if(typeof exports === 'object') + exports["pdfjs/build/pdf.worker"] = factory(); + else + root["pdfjs/build/pdf.worker"] = root.pdfjsWorker = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __w_pdfjs_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __w_pdfjs_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __w_pdfjs_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __w_pdfjs_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __w_pdfjs_require__.d = function(exports, name, getter) { +/******/ if(!__w_pdfjs_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __w_pdfjs_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __w_pdfjs_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __w_pdfjs_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __w_pdfjs_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __w_pdfjs_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __w_pdfjs_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __w_pdfjs_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __w_pdfjs_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __w_pdfjs_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __w_pdfjs_require__(__w_pdfjs_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "WorkerMessageHandler", { + enumerable: true, + get: function () { + return _worker.WorkerMessageHandler; + } +}); + +var _worker = __w_pdfjs_require__(1); + +const pdfjsVersion = '2.5.207'; +const pdfjsBuild = '0974d6052'; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WorkerMessageHandler = exports.WorkerTask = void 0; + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +var _pdf_manager = __w_pdfjs_require__(6); + +var _is_node = __w_pdfjs_require__(4); + +var _message_handler = __w_pdfjs_require__(45); + +var _worker_stream = __w_pdfjs_require__(46); + +var _core_utils = __w_pdfjs_require__(8); + +var WorkerTask = function WorkerTaskClosure() { + function WorkerTask(name) { + this.name = name; + this.terminated = false; + this._capability = (0, _util.createPromiseCapability)(); + } + + WorkerTask.prototype = { + get finished() { + return this._capability.promise; + }, + + finish() { + this._capability.resolve(); + }, + + terminate() { + this.terminated = true; + }, + + ensureNotTerminated() { + if (this.terminated) { + throw new Error("Worker task was terminated"); + } + } + + }; + return WorkerTask; +}(); + +exports.WorkerTask = WorkerTask; +var WorkerMessageHandler = { + setup(handler, port) { + var testMessageProcessed = false; + handler.on("test", function wphSetupTest(data) { + if (testMessageProcessed) { + return; + } + + testMessageProcessed = true; + + if (!(data instanceof Uint8Array)) { + handler.send("test", null); + return; + } + + const supportTransfers = data[0] === 255; + handler.postMessageTransfers = supportTransfers; + handler.send("test", { + supportTransfers + }); + }); + handler.on("configure", function wphConfigure(data) { + (0, _util.setVerbosityLevel)(data.verbosity); + }); + handler.on("GetDocRequest", function wphSetupDoc(data) { + return WorkerMessageHandler.createDocumentHandler(data, port); + }); + }, + + createDocumentHandler(docParams, port) { + var pdfManager; + var terminated = false; + var cancelXHRs = null; + var WorkerTasks = []; + const verbosity = (0, _util.getVerbosityLevel)(); + const apiVersion = docParams.apiVersion; + const workerVersion = '2.5.207'; + + if (apiVersion !== workerVersion) { + throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`); + } + + const enumerableProperties = []; + + for (const property in []) { + enumerableProperties.push(property); + } + + if (enumerableProperties.length) { + throw new Error("The `Array.prototype` contains unexpected enumerable properties: " + enumerableProperties.join(", ") + "; thus breaking e.g. `for...in` iteration of `Array`s."); + } + + if (typeof ReadableStream === "undefined" || typeof Promise.allSettled === "undefined") { + throw new Error("The browser/environment lacks native support for critical " + "functionality used by the PDF.js library (e.g. " + "`ReadableStream` and/or `Promise.allSettled`); " + "please use an ES5-compatible build instead."); + } + + var docId = docParams.docId; + var docBaseUrl = docParams.docBaseUrl; + var workerHandlerName = docParams.docId + "_worker"; + var handler = new _message_handler.MessageHandler(workerHandlerName, docId, port); + handler.postMessageTransfers = docParams.postMessageTransfers; + + function ensureNotTerminated() { + if (terminated) { + throw new Error("Worker was terminated"); + } + } + + function startWorkerTask(task) { + WorkerTasks.push(task); + } + + function finishWorkerTask(task) { + task.finish(); + var i = WorkerTasks.indexOf(task); + WorkerTasks.splice(i, 1); + } + + async function loadDocument(recoveryMode) { + await pdfManager.ensureDoc("checkHeader"); + await pdfManager.ensureDoc("parseStartXRef"); + await pdfManager.ensureDoc("parse", [recoveryMode]); + + if (!recoveryMode) { + await pdfManager.ensureDoc("checkFirstPage"); + } + + const [numPages, fingerprint] = await Promise.all([pdfManager.ensureDoc("numPages"), pdfManager.ensureDoc("fingerprint")]); + return { + numPages, + fingerprint + }; + } + + function getPdfManager(data, evaluatorOptions) { + var pdfManagerCapability = (0, _util.createPromiseCapability)(); + let newPdfManager; + var source = data.source; + + if (source.data) { + try { + newPdfManager = new _pdf_manager.LocalPdfManager(docId, source.data, source.password, evaluatorOptions, docBaseUrl); + pdfManagerCapability.resolve(newPdfManager); + } catch (ex) { + pdfManagerCapability.reject(ex); + } + + return pdfManagerCapability.promise; + } + + var pdfStream, + cachedChunks = []; + + try { + pdfStream = new _worker_stream.PDFWorkerStream(handler); + } catch (ex) { + pdfManagerCapability.reject(ex); + return pdfManagerCapability.promise; + } + + var fullRequest = pdfStream.getFullReader(); + fullRequest.headersReady.then(function () { + if (!fullRequest.isRangeSupported) { + return; + } + + var disableAutoFetch = source.disableAutoFetch || fullRequest.isStreamingSupported; + newPdfManager = new _pdf_manager.NetworkPdfManager(docId, pdfStream, { + msgHandler: handler, + password: source.password, + length: fullRequest.contentLength, + disableAutoFetch, + rangeChunkSize: source.rangeChunkSize + }, evaluatorOptions, docBaseUrl); + + for (let i = 0; i < cachedChunks.length; i++) { + newPdfManager.sendProgressiveData(cachedChunks[i]); + } + + cachedChunks = []; + pdfManagerCapability.resolve(newPdfManager); + cancelXHRs = null; + }).catch(function (reason) { + pdfManagerCapability.reject(reason); + cancelXHRs = null; + }); + var loaded = 0; + + var flushChunks = function () { + var pdfFile = (0, _util.arraysToBytes)(cachedChunks); + + if (source.length && pdfFile.length !== source.length) { + (0, _util.warn)("reported HTTP length is different from actual"); + } + + try { + newPdfManager = new _pdf_manager.LocalPdfManager(docId, pdfFile, source.password, evaluatorOptions, docBaseUrl); + pdfManagerCapability.resolve(newPdfManager); + } catch (ex) { + pdfManagerCapability.reject(ex); + } + + cachedChunks = []; + }; + + var readPromise = new Promise(function (resolve, reject) { + var readChunk = function ({ + value, + done + }) { + try { + ensureNotTerminated(); + + if (done) { + if (!newPdfManager) { + flushChunks(); + } + + cancelXHRs = null; + return; + } + + loaded += (0, _util.arrayByteLength)(value); + + if (!fullRequest.isStreamingSupported) { + handler.send("DocProgress", { + loaded, + total: Math.max(loaded, fullRequest.contentLength || 0) + }); + } + + if (newPdfManager) { + newPdfManager.sendProgressiveData(value); + } else { + cachedChunks.push(value); + } + + fullRequest.read().then(readChunk, reject); + } catch (e) { + reject(e); + } + }; + + fullRequest.read().then(readChunk, reject); + }); + readPromise.catch(function (e) { + pdfManagerCapability.reject(e); + cancelXHRs = null; + }); + + cancelXHRs = function (reason) { + pdfStream.cancelAllRequests(reason); + }; + + return pdfManagerCapability.promise; + } + + function setupDoc(data) { + function onSuccess(doc) { + ensureNotTerminated(); + handler.send("GetDoc", { + pdfInfo: doc + }); + } + + function onFailure(ex) { + ensureNotTerminated(); + + if (ex instanceof _util.PasswordException) { + var task = new WorkerTask(`PasswordException: response ${ex.code}`); + startWorkerTask(task); + handler.sendWithPromise("PasswordRequest", ex).then(function ({ + password + }) { + finishWorkerTask(task); + pdfManager.updatePassword(password); + pdfManagerReady(); + }).catch(function () { + finishWorkerTask(task); + handler.send("DocException", ex); + }); + } else if (ex instanceof _util.InvalidPDFException || ex instanceof _util.MissingPDFException || ex instanceof _util.UnexpectedResponseException || ex instanceof _util.UnknownErrorException) { + handler.send("DocException", ex); + } else { + handler.send("DocException", new _util.UnknownErrorException(ex.message, ex.toString())); + } + } + + function pdfManagerReady() { + ensureNotTerminated(); + loadDocument(false).then(onSuccess, function loadFailure(ex) { + ensureNotTerminated(); + + if (!(ex instanceof _core_utils.XRefParseException)) { + onFailure(ex); + return; + } + + pdfManager.requestLoadedStream(); + pdfManager.onLoadedStream().then(function () { + ensureNotTerminated(); + loadDocument(true).then(onSuccess, onFailure); + }); + }, onFailure); + } + + ensureNotTerminated(); + var evaluatorOptions = { + maxImageSize: data.maxImageSize, + disableFontFace: data.disableFontFace, + ignoreErrors: data.ignoreErrors, + isEvalSupported: data.isEvalSupported, + fontExtraProperties: data.fontExtraProperties + }; + getPdfManager(data, evaluatorOptions).then(function (newPdfManager) { + if (terminated) { + newPdfManager.terminate(new _util.AbortException("Worker was terminated.")); + throw new Error("Worker was terminated"); + } + + pdfManager = newPdfManager; + pdfManager.onLoadedStream().then(function (stream) { + handler.send("DataLoaded", { + length: stream.bytes.byteLength + }); + }); + }).then(pdfManagerReady, onFailure); + } + + handler.on("GetPage", function wphSetupGetPage(data) { + return pdfManager.getPage(data.pageIndex).then(function (page) { + return Promise.all([pdfManager.ensure(page, "rotate"), pdfManager.ensure(page, "ref"), pdfManager.ensure(page, "userUnit"), pdfManager.ensure(page, "view")]).then(function ([rotate, ref, userUnit, view]) { + return { + rotate, + ref, + userUnit, + view + }; + }); + }); + }); + handler.on("GetPageIndex", function wphSetupGetPageIndex(data) { + var ref = _primitives.Ref.get(data.ref.num, data.ref.gen); + + var catalog = pdfManager.pdfDocument.catalog; + return catalog.getPageIndex(ref); + }); + handler.on("GetDestinations", function wphSetupGetDestinations(data) { + return pdfManager.ensureCatalog("destinations"); + }); + handler.on("GetDestination", function wphSetupGetDestination(data) { + return pdfManager.ensureCatalog("getDestination", [data.id]); + }); + handler.on("GetPageLabels", function wphSetupGetPageLabels(data) { + return pdfManager.ensureCatalog("pageLabels"); + }); + handler.on("GetPageLayout", function wphSetupGetPageLayout(data) { + return pdfManager.ensureCatalog("pageLayout"); + }); + handler.on("GetPageMode", function wphSetupGetPageMode(data) { + return pdfManager.ensureCatalog("pageMode"); + }); + handler.on("GetViewerPreferences", function (data) { + return pdfManager.ensureCatalog("viewerPreferences"); + }); + handler.on("GetOpenAction", function (data) { + return pdfManager.ensureCatalog("openAction"); + }); + handler.on("GetAttachments", function wphSetupGetAttachments(data) { + return pdfManager.ensureCatalog("attachments"); + }); + handler.on("GetJavaScript", function wphSetupGetJavaScript(data) { + return pdfManager.ensureCatalog("javaScript"); + }); + handler.on("GetOutline", function wphSetupGetOutline(data) { + return pdfManager.ensureCatalog("documentOutline"); + }); + handler.on("GetPermissions", function (data) { + return pdfManager.ensureCatalog("permissions"); + }); + handler.on("GetMetadata", function wphSetupGetMetadata(data) { + return Promise.all([pdfManager.ensureDoc("documentInfo"), pdfManager.ensureCatalog("metadata")]); + }); + handler.on("GetData", function wphSetupGetData(data) { + pdfManager.requestLoadedStream(); + return pdfManager.onLoadedStream().then(function (stream) { + return stream.bytes; + }); + }); + handler.on("GetStats", function wphSetupGetStats(data) { + return pdfManager.pdfDocument.xref.stats; + }); + handler.on("GetAnnotations", function ({ + pageIndex, + intent + }) { + return pdfManager.getPage(pageIndex).then(function (page) { + return page.getAnnotationsData(intent); + }); + }); + handler.on("GetOperatorList", function wphSetupRenderPage(data, sink) { + var pageIndex = data.pageIndex; + pdfManager.getPage(pageIndex).then(function (page) { + var task = new WorkerTask(`GetOperatorList: page ${pageIndex}`); + startWorkerTask(task); + const start = verbosity >= _util.VerbosityLevel.INFOS ? Date.now() : 0; + page.getOperatorList({ + handler, + sink, + task, + intent: data.intent, + renderInteractiveForms: data.renderInteractiveForms + }).then(function (operatorListInfo) { + finishWorkerTask(task); + + if (start) { + (0, _util.info)(`page=${pageIndex + 1} - getOperatorList: time=` + `${Date.now() - start}ms, len=${operatorListInfo.length}`); + } + + sink.close(); + }, function (reason) { + finishWorkerTask(task); + + if (task.terminated) { + return; + } + + handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorOperatorList + }); + sink.error(reason); + }); + }); + }, this); + handler.on("GetTextContent", function wphExtractText(data, sink) { + var pageIndex = data.pageIndex; + + sink.onPull = function (desiredSize) {}; + + sink.onCancel = function (reason) {}; + + pdfManager.getPage(pageIndex).then(function (page) { + var task = new WorkerTask("GetTextContent: page " + pageIndex); + startWorkerTask(task); + const start = verbosity >= _util.VerbosityLevel.INFOS ? Date.now() : 0; + page.extractTextContent({ + handler, + task, + sink, + normalizeWhitespace: data.normalizeWhitespace, + combineTextItems: data.combineTextItems + }).then(function () { + finishWorkerTask(task); + + if (start) { + (0, _util.info)(`page=${pageIndex + 1} - getTextContent: time=` + `${Date.now() - start}ms`); + } + + sink.close(); + }, function (reason) { + finishWorkerTask(task); + + if (task.terminated) { + return; + } + + sink.error(reason); + }); + }); + }); + handler.on("FontFallback", function (data) { + return pdfManager.fontFallback(data.id, handler); + }); + handler.on("Cleanup", function wphCleanup(data) { + return pdfManager.cleanup(true); + }); + handler.on("Terminate", function wphTerminate(data) { + terminated = true; + const waitOn = []; + + if (pdfManager) { + pdfManager.terminate(new _util.AbortException("Worker was terminated.")); + const cleanupPromise = pdfManager.cleanup(); + waitOn.push(cleanupPromise); + pdfManager = null; + } else { + (0, _primitives.clearPrimitiveCaches)(); + } + + if (cancelXHRs) { + cancelXHRs(new _util.AbortException("Worker was terminated.")); + } + + WorkerTasks.forEach(function (task) { + waitOn.push(task.finished); + task.terminate(); + }); + return Promise.all(waitOn).then(function () { + handler.destroy(); + handler = null; + }); + }); + handler.on("Ready", function wphReady(data) { + setupDoc(docParams); + docParams = null; + }); + return workerHandlerName; + }, + + initializeFromPort(port) { + var handler = new _message_handler.MessageHandler("worker", "main", port); + WorkerMessageHandler.setup(handler, port); + handler.send("ready", null); + } + +}; +exports.WorkerMessageHandler = WorkerMessageHandler; + +function isMessagePort(maybePort) { + return typeof maybePort.postMessage === "function" && "onmessage" in maybePort; +} + +if (typeof window === "undefined" && !_is_node.isNodeJS && typeof self !== "undefined" && isMessagePort(self)) { + WorkerMessageHandler.initializeFromPort(self); +} + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.arrayByteLength = arrayByteLength; +exports.arraysToBytes = arraysToBytes; +exports.assert = assert; +exports.bytesToString = bytesToString; +exports.createPromiseCapability = createPromiseCapability; +exports.getVerbosityLevel = getVerbosityLevel; +exports.info = info; +exports.isArrayBuffer = isArrayBuffer; +exports.isArrayEqual = isArrayEqual; +exports.isBool = isBool; +exports.isEmptyObj = isEmptyObj; +exports.isNum = isNum; +exports.isString = isString; +exports.isSameOrigin = isSameOrigin; +exports.createValidAbsoluteUrl = createValidAbsoluteUrl; +exports.removeNullCharacters = removeNullCharacters; +exports.setVerbosityLevel = setVerbosityLevel; +exports.shadow = shadow; +exports.string32 = string32; +exports.stringToBytes = stringToBytes; +exports.stringToPDFString = stringToPDFString; +exports.stringToUTF8String = stringToUTF8String; +exports.utf8StringToString = utf8StringToString; +exports.warn = warn; +exports.unreachable = unreachable; +exports.IsEvalSupportedCached = exports.IsLittleEndianCached = exports.createObjectURL = exports.FormatError = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.MissingPDFException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationStateModelType = exports.AnnotationReviewState = exports.AnnotationReplyType = exports.AnnotationMarkedState = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = exports.BaseException = void 0; + +__w_pdfjs_require__(3); + +const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; +exports.IDENTITY_MATRIX = IDENTITY_MATRIX; +const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0]; +exports.FONT_IDENTITY_MATRIX = FONT_IDENTITY_MATRIX; +const PermissionFlag = { + PRINT: 0x04, + MODIFY_CONTENTS: 0x08, + COPY: 0x10, + MODIFY_ANNOTATIONS: 0x20, + FILL_INTERACTIVE_FORMS: 0x100, + COPY_FOR_ACCESSIBILITY: 0x200, + ASSEMBLE: 0x400, + PRINT_HIGH_QUALITY: 0x800 +}; +exports.PermissionFlag = PermissionFlag; +const TextRenderingMode = { + FILL: 0, + STROKE: 1, + FILL_STROKE: 2, + INVISIBLE: 3, + FILL_ADD_TO_PATH: 4, + STROKE_ADD_TO_PATH: 5, + FILL_STROKE_ADD_TO_PATH: 6, + ADD_TO_PATH: 7, + FILL_STROKE_MASK: 3, + ADD_TO_PATH_FLAG: 4 +}; +exports.TextRenderingMode = TextRenderingMode; +const ImageKind = { + GRAYSCALE_1BPP: 1, + RGB_24BPP: 2, + RGBA_32BPP: 3 +}; +exports.ImageKind = ImageKind; +const AnnotationType = { + TEXT: 1, + LINK: 2, + FREETEXT: 3, + LINE: 4, + SQUARE: 5, + CIRCLE: 6, + POLYGON: 7, + POLYLINE: 8, + HIGHLIGHT: 9, + UNDERLINE: 10, + SQUIGGLY: 11, + STRIKEOUT: 12, + STAMP: 13, + CARET: 14, + INK: 15, + POPUP: 16, + FILEATTACHMENT: 17, + SOUND: 18, + MOVIE: 19, + WIDGET: 20, + SCREEN: 21, + PRINTERMARK: 22, + TRAPNET: 23, + WATERMARK: 24, + THREED: 25, + REDACT: 26 +}; +exports.AnnotationType = AnnotationType; +const AnnotationStateModelType = { + MARKED: "Marked", + REVIEW: "Review" +}; +exports.AnnotationStateModelType = AnnotationStateModelType; +const AnnotationMarkedState = { + MARKED: "Marked", + UNMARKED: "Unmarked" +}; +exports.AnnotationMarkedState = AnnotationMarkedState; +const AnnotationReviewState = { + ACCEPTED: "Accepted", + REJECTED: "Rejected", + CANCELLED: "Cancelled", + COMPLETED: "Completed", + NONE: "None" +}; +exports.AnnotationReviewState = AnnotationReviewState; +const AnnotationReplyType = { + GROUP: "Group", + REPLY: "R" +}; +exports.AnnotationReplyType = AnnotationReplyType; +const AnnotationFlag = { + INVISIBLE: 0x01, + HIDDEN: 0x02, + PRINT: 0x04, + NOZOOM: 0x08, + NOROTATE: 0x10, + NOVIEW: 0x20, + READONLY: 0x40, + LOCKED: 0x80, + TOGGLENOVIEW: 0x100, + LOCKEDCONTENTS: 0x200 +}; +exports.AnnotationFlag = AnnotationFlag; +const AnnotationFieldFlag = { + READONLY: 0x0000001, + REQUIRED: 0x0000002, + NOEXPORT: 0x0000004, + MULTILINE: 0x0001000, + PASSWORD: 0x0002000, + NOTOGGLETOOFF: 0x0004000, + RADIO: 0x0008000, + PUSHBUTTON: 0x0010000, + COMBO: 0x0020000, + EDIT: 0x0040000, + SORT: 0x0080000, + FILESELECT: 0x0100000, + MULTISELECT: 0x0200000, + DONOTSPELLCHECK: 0x0400000, + DONOTSCROLL: 0x0800000, + COMB: 0x1000000, + RICHTEXT: 0x2000000, + RADIOSINUNISON: 0x2000000, + COMMITONSELCHANGE: 0x4000000 +}; +exports.AnnotationFieldFlag = AnnotationFieldFlag; +const AnnotationBorderStyleType = { + SOLID: 1, + DASHED: 2, + BEVELED: 3, + INSET: 4, + UNDERLINE: 5 +}; +exports.AnnotationBorderStyleType = AnnotationBorderStyleType; +const StreamType = { + UNKNOWN: "UNKNOWN", + FLATE: "FLATE", + LZW: "LZW", + DCT: "DCT", + JPX: "JPX", + JBIG: "JBIG", + A85: "A85", + AHX: "AHX", + CCF: "CCF", + RLX: "RLX" +}; +exports.StreamType = StreamType; +const FontType = { + UNKNOWN: "UNKNOWN", + TYPE1: "TYPE1", + TYPE1C: "TYPE1C", + CIDFONTTYPE0: "CIDFONTTYPE0", + CIDFONTTYPE0C: "CIDFONTTYPE0C", + TRUETYPE: "TRUETYPE", + CIDFONTTYPE2: "CIDFONTTYPE2", + TYPE3: "TYPE3", + OPENTYPE: "OPENTYPE", + TYPE0: "TYPE0", + MMTYPE1: "MMTYPE1" +}; +exports.FontType = FontType; +const VerbosityLevel = { + ERRORS: 0, + WARNINGS: 1, + INFOS: 5 +}; +exports.VerbosityLevel = VerbosityLevel; +const CMapCompressionType = { + NONE: 0, + BINARY: 1, + STREAM: 2 +}; +exports.CMapCompressionType = CMapCompressionType; +const OPS = { + dependency: 1, + setLineWidth: 2, + setLineCap: 3, + setLineJoin: 4, + setMiterLimit: 5, + setDash: 6, + setRenderingIntent: 7, + setFlatness: 8, + setGState: 9, + save: 10, + restore: 11, + transform: 12, + moveTo: 13, + lineTo: 14, + curveTo: 15, + curveTo2: 16, + curveTo3: 17, + closePath: 18, + rectangle: 19, + stroke: 20, + closeStroke: 21, + fill: 22, + eoFill: 23, + fillStroke: 24, + eoFillStroke: 25, + closeFillStroke: 26, + closeEOFillStroke: 27, + endPath: 28, + clip: 29, + eoClip: 30, + beginText: 31, + endText: 32, + setCharSpacing: 33, + setWordSpacing: 34, + setHScale: 35, + setLeading: 36, + setFont: 37, + setTextRenderingMode: 38, + setTextRise: 39, + moveText: 40, + setLeadingMoveText: 41, + setTextMatrix: 42, + nextLine: 43, + showText: 44, + showSpacedText: 45, + nextLineShowText: 46, + nextLineSetSpacingShowText: 47, + setCharWidth: 48, + setCharWidthAndBounds: 49, + setStrokeColorSpace: 50, + setFillColorSpace: 51, + setStrokeColor: 52, + setStrokeColorN: 53, + setFillColor: 54, + setFillColorN: 55, + setStrokeGray: 56, + setFillGray: 57, + setStrokeRGBColor: 58, + setFillRGBColor: 59, + setStrokeCMYKColor: 60, + setFillCMYKColor: 61, + shadingFill: 62, + beginInlineImage: 63, + beginImageData: 64, + endInlineImage: 65, + paintXObject: 66, + markPoint: 67, + markPointProps: 68, + beginMarkedContent: 69, + beginMarkedContentProps: 70, + endMarkedContent: 71, + beginCompat: 72, + endCompat: 73, + paintFormXObjectBegin: 74, + paintFormXObjectEnd: 75, + beginGroup: 76, + endGroup: 77, + beginAnnotations: 78, + endAnnotations: 79, + beginAnnotation: 80, + endAnnotation: 81, + paintJpegXObject: 82, + paintImageMaskXObject: 83, + paintImageMaskXObjectGroup: 84, + paintImageXObject: 85, + paintInlineImageXObject: 86, + paintInlineImageXObjectGroup: 87, + paintImageXObjectRepeat: 88, + paintImageMaskXObjectRepeat: 89, + paintSolidColorImageMask: 90, + constructPath: 91 +}; +exports.OPS = OPS; +const UNSUPPORTED_FEATURES = { + unknown: "unknown", + forms: "forms", + javaScript: "javaScript", + smask: "smask", + shadingPattern: "shadingPattern", + font: "font", + errorTilingPattern: "errorTilingPattern", + errorExtGState: "errorExtGState", + errorXObject: "errorXObject", + errorFontLoadType3: "errorFontLoadType3", + errorFontState: "errorFontState", + errorFontMissing: "errorFontMissing", + errorFontTranslate: "errorFontTranslate", + errorColorSpace: "errorColorSpace", + errorOperatorList: "errorOperatorList", + errorFontToUnicode: "errorFontToUnicode", + errorFontLoadNative: "errorFontLoadNative", + errorFontGetPath: "errorFontGetPath" +}; +exports.UNSUPPORTED_FEATURES = UNSUPPORTED_FEATURES; +const PasswordResponses = { + NEED_PASSWORD: 1, + INCORRECT_PASSWORD: 2 +}; +exports.PasswordResponses = PasswordResponses; +let verbosity = VerbosityLevel.WARNINGS; + +function setVerbosityLevel(level) { + if (Number.isInteger(level)) { + verbosity = level; + } +} + +function getVerbosityLevel() { + return verbosity; +} + +function info(msg) { + if (verbosity >= VerbosityLevel.INFOS) { + console.log(`Info: ${msg}`); + } +} + +function warn(msg) { + if (verbosity >= VerbosityLevel.WARNINGS) { + console.log(`Warning: ${msg}`); + } +} + +function unreachable(msg) { + throw new Error(msg); +} + +function assert(cond, msg) { + if (!cond) { + unreachable(msg); + } +} + +function isSameOrigin(baseUrl, otherUrl) { + let base; + + try { + base = new URL(baseUrl); + + if (!base.origin || base.origin === "null") { + return false; + } + } catch (e) { + return false; + } + + const other = new URL(otherUrl, base); + return base.origin === other.origin; +} + +function _isValidProtocol(url) { + if (!url) { + return false; + } + + switch (url.protocol) { + case "http:": + case "https:": + case "ftp:": + case "mailto:": + case "tel:": + return true; + + default: + return false; + } +} + +function createValidAbsoluteUrl(url, baseUrl) { + if (!url) { + return null; + } + + try { + const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url); + + if (_isValidProtocol(absoluteUrl)) { + return absoluteUrl; + } + } catch (ex) {} + + return null; +} + +function shadow(obj, prop, value) { + Object.defineProperty(obj, prop, { + value, + enumerable: true, + configurable: true, + writable: false + }); + return value; +} + +const BaseException = function BaseExceptionClosure() { + function BaseException(message) { + if (this.constructor === BaseException) { + unreachable("Cannot initialize BaseException."); + } + + this.message = message; + this.name = this.constructor.name; + } + + BaseException.prototype = new Error(); + BaseException.constructor = BaseException; + return BaseException; +}(); + +exports.BaseException = BaseException; + +class PasswordException extends BaseException { + constructor(msg, code) { + super(msg); + this.code = code; + } + +} + +exports.PasswordException = PasswordException; + +class UnknownErrorException extends BaseException { + constructor(msg, details) { + super(msg); + this.details = details; + } + +} + +exports.UnknownErrorException = UnknownErrorException; + +class InvalidPDFException extends BaseException {} + +exports.InvalidPDFException = InvalidPDFException; + +class MissingPDFException extends BaseException {} + +exports.MissingPDFException = MissingPDFException; + +class UnexpectedResponseException extends BaseException { + constructor(msg, status) { + super(msg); + this.status = status; + } + +} + +exports.UnexpectedResponseException = UnexpectedResponseException; + +class FormatError extends BaseException {} + +exports.FormatError = FormatError; + +class AbortException extends BaseException {} + +exports.AbortException = AbortException; +const NullCharactersRegExp = /\x00/g; + +function removeNullCharacters(str) { + if (typeof str !== "string") { + warn("The argument for removeNullCharacters must be a string."); + return str; + } + + return str.replace(NullCharactersRegExp, ""); +} + +function bytesToString(bytes) { + assert(bytes !== null && typeof bytes === "object" && bytes.length !== undefined, "Invalid argument for bytesToString"); + const length = bytes.length; + const MAX_ARGUMENT_COUNT = 8192; + + if (length < MAX_ARGUMENT_COUNT) { + return String.fromCharCode.apply(null, bytes); + } + + const strBuf = []; + + for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) { + const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length); + const chunk = bytes.subarray(i, chunkEnd); + strBuf.push(String.fromCharCode.apply(null, chunk)); + } + + return strBuf.join(""); +} + +function stringToBytes(str) { + assert(typeof str === "string", "Invalid argument for stringToBytes"); + const length = str.length; + const bytes = new Uint8Array(length); + + for (let i = 0; i < length; ++i) { + bytes[i] = str.charCodeAt(i) & 0xff; + } + + return bytes; +} + +function arrayByteLength(arr) { + if (arr.length !== undefined) { + return arr.length; + } + + assert(arr.byteLength !== undefined, "arrayByteLength - invalid argument."); + return arr.byteLength; +} + +function arraysToBytes(arr) { + const length = arr.length; + + if (length === 1 && arr[0] instanceof Uint8Array) { + return arr[0]; + } + + let resultLength = 0; + + for (let i = 0; i < length; i++) { + resultLength += arrayByteLength(arr[i]); + } + + let pos = 0; + const data = new Uint8Array(resultLength); + + for (let i = 0; i < length; i++) { + let item = arr[i]; + + if (!(item instanceof Uint8Array)) { + if (typeof item === "string") { + item = stringToBytes(item); + } else { + item = new Uint8Array(item); + } + } + + const itemLength = item.byteLength; + data.set(item, pos); + pos += itemLength; + } + + return data; +} + +function string32(value) { + return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); +} + +function isLittleEndian() { + const buffer8 = new Uint8Array(4); + buffer8[0] = 1; + const view32 = new Uint32Array(buffer8.buffer, 0, 1); + return view32[0] === 1; +} + +const IsLittleEndianCached = { + get value() { + return shadow(this, "value", isLittleEndian()); + } + +}; +exports.IsLittleEndianCached = IsLittleEndianCached; + +function isEvalSupported() { + try { + new Function(""); + return true; + } catch (e) { + return false; + } +} + +const IsEvalSupportedCached = { + get value() { + return shadow(this, "value", isEvalSupported()); + } + +}; +exports.IsEvalSupportedCached = IsEvalSupportedCached; +const rgbBuf = ["rgb(", 0, ",", 0, ",", 0, ")"]; + +class Util { + static makeCssRgb(r, g, b) { + rgbBuf[1] = r; + rgbBuf[3] = g; + rgbBuf[5] = b; + return rgbBuf.join(""); + } + + static transform(m1, m2) { + return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]]; + } + + static applyTransform(p, m) { + const xt = p[0] * m[0] + p[1] * m[2] + m[4]; + const yt = p[0] * m[1] + p[1] * m[3] + m[5]; + return [xt, yt]; + } + + static applyInverseTransform(p, m) { + const d = m[0] * m[3] - m[1] * m[2]; + const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d; + const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d; + return [xt, yt]; + } + + static getAxialAlignedBoundingBox(r, m) { + const p1 = Util.applyTransform(r, m); + const p2 = Util.applyTransform(r.slice(2, 4), m); + const p3 = Util.applyTransform([r[0], r[3]], m); + const p4 = Util.applyTransform([r[2], r[1]], m); + return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])]; + } + + static inverseTransform(m) { + const d = m[0] * m[3] - m[1] * m[2]; + return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d]; + } + + static apply3dTransform(m, v) { + return [m[0] * v[0] + m[1] * v[1] + m[2] * v[2], m[3] * v[0] + m[4] * v[1] + m[5] * v[2], m[6] * v[0] + m[7] * v[1] + m[8] * v[2]]; + } + + static singularValueDecompose2dScale(m) { + const transpose = [m[0], m[2], m[1], m[3]]; + const a = m[0] * transpose[0] + m[1] * transpose[2]; + const b = m[0] * transpose[1] + m[1] * transpose[3]; + const c = m[2] * transpose[0] + m[3] * transpose[2]; + const d = m[2] * transpose[1] + m[3] * transpose[3]; + const first = (a + d) / 2; + const second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2; + const sx = first + second || 1; + const sy = first - second || 1; + return [Math.sqrt(sx), Math.sqrt(sy)]; + } + + static normalizeRect(rect) { + const r = rect.slice(0); + + if (rect[0] > rect[2]) { + r[0] = rect[2]; + r[2] = rect[0]; + } + + if (rect[1] > rect[3]) { + r[1] = rect[3]; + r[3] = rect[1]; + } + + return r; + } + + static intersect(rect1, rect2) { + function compare(a, b) { + return a - b; + } + + const orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare); + const orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare); + const result = []; + rect1 = Util.normalizeRect(rect1); + rect2 = Util.normalizeRect(rect2); + + if (orderedX[0] === rect1[0] && orderedX[1] === rect2[0] || orderedX[0] === rect2[0] && orderedX[1] === rect1[0]) { + result[0] = orderedX[1]; + result[2] = orderedX[2]; + } else { + return null; + } + + if (orderedY[0] === rect1[1] && orderedY[1] === rect2[1] || orderedY[0] === rect2[1] && orderedY[1] === rect1[1]) { + result[1] = orderedY[1]; + result[3] = orderedY[2]; + } else { + return null; + } + + return result; + } + +} + +exports.Util = Util; +const PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C, 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160, 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC]; + +function stringToPDFString(str) { + const length = str.length, + strBuf = []; + + if (str[0] === "\xFE" && str[1] === "\xFF") { + for (let i = 2; i < length; i += 2) { + strBuf.push(String.fromCharCode(str.charCodeAt(i) << 8 | str.charCodeAt(i + 1))); + } + } else if (str[0] === "\xFF" && str[1] === "\xFE") { + for (let i = 2; i < length; i += 2) { + strBuf.push(String.fromCharCode(str.charCodeAt(i + 1) << 8 | str.charCodeAt(i))); + } + } else { + for (let i = 0; i < length; ++i) { + const code = PDFStringTranslateTable[str.charCodeAt(i)]; + strBuf.push(code ? String.fromCharCode(code) : str.charAt(i)); + } + } + + return strBuf.join(""); +} + +function stringToUTF8String(str) { + return decodeURIComponent(escape(str)); +} + +function utf8StringToString(str) { + return unescape(encodeURIComponent(str)); +} + +function isEmptyObj(obj) { + for (const key in obj) { + return false; + } + + return true; +} + +function isBool(v) { + return typeof v === "boolean"; +} + +function isNum(v) { + return typeof v === "number"; +} + +function isString(v) { + return typeof v === "string"; +} + +function isArrayBuffer(v) { + return typeof v === "object" && v !== null && v.byteLength !== undefined; +} + +function isArrayEqual(arr1, arr2) { + if (arr1.length !== arr2.length) { + return false; + } + + return arr1.every(function (element, index) { + return element === arr2[index]; + }); +} + +function createPromiseCapability() { + const capability = Object.create(null); + let isSettled = false; + Object.defineProperty(capability, "settled", { + get() { + return isSettled; + } + + }); + capability.promise = new Promise(function (resolve, reject) { + capability.resolve = function (data) { + isSettled = true; + resolve(data); + }; + + capability.reject = function (reason) { + isSettled = true; + reject(reason); + }; + }); + return capability; +} + +const createObjectURL = function createObjectURLClosure() { + const digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + return function createObjectURL(data, contentType, forceDataSchema = false) { + if (!forceDataSchema && URL.createObjectURL) { + const blob = new Blob([data], { + type: contentType + }); + return URL.createObjectURL(blob); + } + + let buffer = `data:${contentType};base64,`; + + for (let i = 0, ii = data.length; i < ii; i += 3) { + const b1 = data[i] & 0xff; + const b2 = data[i + 1] & 0xff; + const b3 = data[i + 2] & 0xff; + const d1 = b1 >> 2, + d2 = (b1 & 3) << 4 | b2 >> 4; + const d3 = i + 1 < ii ? (b2 & 0xf) << 2 | b3 >> 6 : 64; + const d4 = i + 2 < ii ? b3 & 0x3f : 64; + buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4]; + } + + return buffer; + }; +}(); + +exports.createObjectURL = createObjectURL; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +var _is_node = __w_pdfjs_require__(4); + +; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isNodeJS = void 0; +const isNodeJS = typeof process === "object" && process + "" === "[object process]" && !process.versions.nw && !process.versions.electron; +exports.isNodeJS = isNodeJS; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.clearPrimitiveCaches = clearPrimitiveCaches; +exports.isEOF = isEOF; +exports.isCmd = isCmd; +exports.isDict = isDict; +exports.isName = isName; +exports.isRef = isRef; +exports.isRefsEqual = isRefsEqual; +exports.isStream = isStream; +exports.RefSetCache = exports.RefSet = exports.Ref = exports.Name = exports.Dict = exports.Cmd = exports.EOF = void 0; + +var _util = __w_pdfjs_require__(2); + +var EOF = {}; +exports.EOF = EOF; + +var Name = function NameClosure() { + let nameCache = Object.create(null); + + function Name(name) { + this.name = name; + } + + Name.prototype = {}; + + Name.get = function Name_get(name) { + var nameValue = nameCache[name]; + return nameValue ? nameValue : nameCache[name] = new Name(name); + }; + + Name._clearCache = function () { + nameCache = Object.create(null); + }; + + return Name; +}(); + +exports.Name = Name; + +var Cmd = function CmdClosure() { + let cmdCache = Object.create(null); + + function Cmd(cmd) { + this.cmd = cmd; + } + + Cmd.prototype = {}; + + Cmd.get = function Cmd_get(cmd) { + var cmdValue = cmdCache[cmd]; + return cmdValue ? cmdValue : cmdCache[cmd] = new Cmd(cmd); + }; + + Cmd._clearCache = function () { + cmdCache = Object.create(null); + }; + + return Cmd; +}(); + +exports.Cmd = Cmd; + +var Dict = function DictClosure() { + var nonSerializable = function nonSerializableClosure() { + return nonSerializable; + }; + + function Dict(xref) { + this._map = Object.create(null); + this.xref = xref; + this.objId = null; + this.suppressEncryption = false; + this.__nonSerializable__ = nonSerializable; + } + + Dict.prototype = { + assignXref: function Dict_assignXref(newXref) { + this.xref = newXref; + }, + + get(key1, key2, key3) { + let value = this._map[key1]; + + if (value === undefined && key2 !== undefined) { + value = this._map[key2]; + + if (value === undefined && key3 !== undefined) { + value = this._map[key3]; + } + } + + if (value instanceof Ref && this.xref) { + return this.xref.fetch(value, this.suppressEncryption); + } + + return value; + }, + + async getAsync(key1, key2, key3) { + let value = this._map[key1]; + + if (value === undefined && key2 !== undefined) { + value = this._map[key2]; + + if (value === undefined && key3 !== undefined) { + value = this._map[key3]; + } + } + + if (value instanceof Ref && this.xref) { + return this.xref.fetchAsync(value, this.suppressEncryption); + } + + return value; + }, + + getArray(key1, key2, key3) { + let value = this.get(key1, key2, key3); + + if (!Array.isArray(value) || !this.xref) { + return value; + } + + value = value.slice(); + + for (let i = 0, ii = value.length; i < ii; i++) { + if (!(value[i] instanceof Ref)) { + continue; + } + + value[i] = this.xref.fetch(value[i], this.suppressEncryption); + } + + return value; + }, + + getRaw: function Dict_getRaw(key) { + return this._map[key]; + }, + getKeys: function Dict_getKeys() { + return Object.keys(this._map); + }, + set: function Dict_set(key, value) { + this._map[key] = value; + }, + has: function Dict_has(key) { + return this._map[key] !== undefined; + }, + forEach: function Dict_forEach(callback) { + for (var key in this._map) { + callback(key, this.get(key)); + } + } + }; + Dict.empty = new Dict(null); + + Dict.merge = function (xref, dictArray) { + const mergedDict = new Dict(xref); + + for (let i = 0, ii = dictArray.length; i < ii; i++) { + const dict = dictArray[i]; + + if (!isDict(dict)) { + continue; + } + + for (const keyName in dict._map) { + if (mergedDict._map[keyName] !== undefined) { + continue; + } + + mergedDict._map[keyName] = dict._map[keyName]; + } + } + + return mergedDict; + }; + + return Dict; +}(); + +exports.Dict = Dict; + +var Ref = function RefClosure() { + let refCache = Object.create(null); + + function Ref(num, gen) { + this.num = num; + this.gen = gen; + } + + Ref.prototype = { + toString: function Ref_toString() { + if (this.gen === 0) { + return `${this.num}R`; + } + + return `${this.num}R${this.gen}`; + } + }; + + Ref.get = function (num, gen) { + const key = gen === 0 ? `${num}R` : `${num}R${gen}`; + const refValue = refCache[key]; + return refValue ? refValue : refCache[key] = new Ref(num, gen); + }; + + Ref._clearCache = function () { + refCache = Object.create(null); + }; + + return Ref; +}(); + +exports.Ref = Ref; + +var RefSet = function RefSetClosure() { + function RefSet() { + this.dict = Object.create(null); + } + + RefSet.prototype = { + has: function RefSet_has(ref) { + return ref.toString() in this.dict; + }, + put: function RefSet_put(ref) { + this.dict[ref.toString()] = true; + }, + remove: function RefSet_remove(ref) { + delete this.dict[ref.toString()]; + } + }; + return RefSet; +}(); + +exports.RefSet = RefSet; + +var RefSetCache = function RefSetCacheClosure() { + function RefSetCache() { + this.dict = Object.create(null); + } + + RefSetCache.prototype = { + get size() { + return Object.keys(this.dict).length; + }, + + get: function RefSetCache_get(ref) { + return this.dict[ref.toString()]; + }, + has: function RefSetCache_has(ref) { + return ref.toString() in this.dict; + }, + put: function RefSetCache_put(ref, obj) { + this.dict[ref.toString()] = obj; + }, + putAlias: function RefSetCache_putAlias(ref, aliasRef) { + this.dict[ref.toString()] = this.get(aliasRef); + }, + forEach: function RefSetCache_forEach(callback) { + for (const i in this.dict) { + callback(this.dict[i]); + } + }, + clear: function RefSetCache_clear() { + this.dict = Object.create(null); + } + }; + return RefSetCache; +}(); + +exports.RefSetCache = RefSetCache; + +function isEOF(v) { + return v === EOF; +} + +function isName(v, name) { + return v instanceof Name && (name === undefined || v.name === name); +} + +function isCmd(v, cmd) { + return v instanceof Cmd && (cmd === undefined || v.cmd === cmd); +} + +function isDict(v, type) { + return v instanceof Dict && (type === undefined || isName(v.get("Type"), type)); +} + +function isRef(v) { + return v instanceof Ref; +} + +function isRefsEqual(v1, v2) { + return v1.num === v2.num && v1.gen === v2.gen; +} + +function isStream(v) { + return typeof v === "object" && v !== null && v.getBytes !== undefined; +} + +function clearPrimitiveCaches() { + Cmd._clearCache(); + + Name._clearCache(); + + Ref._clearCache(); +} + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NetworkPdfManager = exports.LocalPdfManager = void 0; + +var _util = __w_pdfjs_require__(2); + +var _chunked_stream = __w_pdfjs_require__(7); + +var _core_utils = __w_pdfjs_require__(8); + +var _document = __w_pdfjs_require__(9); + +var _stream = __w_pdfjs_require__(12); + +class BasePdfManager { + constructor() { + if (this.constructor === BasePdfManager) { + (0, _util.unreachable)("Cannot initialize BasePdfManager."); + } + } + + get docId() { + return this._docId; + } + + get password() { + return this._password; + } + + get docBaseUrl() { + let docBaseUrl = null; + + if (this._docBaseUrl) { + const absoluteUrl = (0, _util.createValidAbsoluteUrl)(this._docBaseUrl); + + if (absoluteUrl) { + docBaseUrl = absoluteUrl.href; + } else { + (0, _util.warn)(`Invalid absolute docBaseUrl: "${this._docBaseUrl}".`); + } + } + + return (0, _util.shadow)(this, "docBaseUrl", docBaseUrl); + } + + onLoadedStream() { + (0, _util.unreachable)("Abstract method `onLoadedStream` called"); + } + + ensureDoc(prop, args) { + return this.ensure(this.pdfDocument, prop, args); + } + + ensureXRef(prop, args) { + return this.ensure(this.pdfDocument.xref, prop, args); + } + + ensureCatalog(prop, args) { + return this.ensure(this.pdfDocument.catalog, prop, args); + } + + getPage(pageIndex) { + return this.pdfDocument.getPage(pageIndex); + } + + fontFallback(id, handler) { + return this.pdfDocument.fontFallback(id, handler); + } + + cleanup(manuallyTriggered = false) { + return this.pdfDocument.cleanup(manuallyTriggered); + } + + async ensure(obj, prop, args) { + (0, _util.unreachable)("Abstract method `ensure` called"); + } + + requestRange(begin, end) { + (0, _util.unreachable)("Abstract method `requestRange` called"); + } + + requestLoadedStream() { + (0, _util.unreachable)("Abstract method `requestLoadedStream` called"); + } + + sendProgressiveData(chunk) { + (0, _util.unreachable)("Abstract method `sendProgressiveData` called"); + } + + updatePassword(password) { + this._password = password; + } + + terminate(reason) { + (0, _util.unreachable)("Abstract method `terminate` called"); + } + +} + +class LocalPdfManager extends BasePdfManager { + constructor(docId, data, password, evaluatorOptions, docBaseUrl) { + super(); + this._docId = docId; + this._password = password; + this._docBaseUrl = docBaseUrl; + this.evaluatorOptions = evaluatorOptions; + const stream = new _stream.Stream(data); + this.pdfDocument = new _document.PDFDocument(this, stream); + this._loadedStreamPromise = Promise.resolve(stream); + } + + async ensure(obj, prop, args) { + const value = obj[prop]; + + if (typeof value === "function") { + return value.apply(obj, args); + } + + return value; + } + + requestRange(begin, end) { + return Promise.resolve(); + } + + requestLoadedStream() {} + + onLoadedStream() { + return this._loadedStreamPromise; + } + + terminate(reason) {} + +} + +exports.LocalPdfManager = LocalPdfManager; + +class NetworkPdfManager extends BasePdfManager { + constructor(docId, pdfNetworkStream, args, evaluatorOptions, docBaseUrl) { + super(); + this._docId = docId; + this._password = args.password; + this._docBaseUrl = docBaseUrl; + this.msgHandler = args.msgHandler; + this.evaluatorOptions = evaluatorOptions; + this.streamManager = new _chunked_stream.ChunkedStreamManager(pdfNetworkStream, { + msgHandler: args.msgHandler, + length: args.length, + disableAutoFetch: args.disableAutoFetch, + rangeChunkSize: args.rangeChunkSize + }); + this.pdfDocument = new _document.PDFDocument(this, this.streamManager.getStream()); + } + + async ensure(obj, prop, args) { + try { + const value = obj[prop]; + + if (typeof value === "function") { + return value.apply(obj, args); + } + + return value; + } catch (ex) { + if (!(ex instanceof _core_utils.MissingDataException)) { + throw ex; + } + + await this.requestRange(ex.begin, ex.end); + return this.ensure(obj, prop, args); + } + } + + requestRange(begin, end) { + return this.streamManager.requestRange(begin, end); + } + + requestLoadedStream() { + this.streamManager.requestAllChunks(); + } + + sendProgressiveData(chunk) { + this.streamManager.onReceiveData({ + chunk + }); + } + + onLoadedStream() { + return this.streamManager.onLoadedStream(); + } + + terminate(reason) { + this.streamManager.abort(reason); + } + +} + +exports.NetworkPdfManager = NetworkPdfManager; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ChunkedStreamManager = exports.ChunkedStream = void 0; + +var _util = __w_pdfjs_require__(2); + +var _core_utils = __w_pdfjs_require__(8); + +class ChunkedStream { + constructor(length, chunkSize, manager) { + this.bytes = new Uint8Array(length); + this.start = 0; + this.pos = 0; + this.end = length; + this.chunkSize = chunkSize; + this.loadedChunks = []; + this.numChunksLoaded = 0; + this.numChunks = Math.ceil(length / chunkSize); + this.manager = manager; + this.progressiveDataLength = 0; + this.lastSuccessfulEnsureByteChunk = -1; + } + + getMissingChunks() { + const chunks = []; + + for (let chunk = 0, n = this.numChunks; chunk < n; ++chunk) { + if (!this.loadedChunks[chunk]) { + chunks.push(chunk); + } + } + + return chunks; + } + + getBaseStreams() { + return [this]; + } + + allChunksLoaded() { + return this.numChunksLoaded === this.numChunks; + } + + onReceiveData(begin, chunk) { + const chunkSize = this.chunkSize; + + if (begin % chunkSize !== 0) { + throw new Error(`Bad begin offset: ${begin}`); + } + + const end = begin + chunk.byteLength; + + if (end % chunkSize !== 0 && end !== this.bytes.length) { + throw new Error(`Bad end offset: ${end}`); + } + + this.bytes.set(new Uint8Array(chunk), begin); + const beginChunk = Math.floor(begin / chunkSize); + const endChunk = Math.floor((end - 1) / chunkSize) + 1; + + for (let curChunk = beginChunk; curChunk < endChunk; ++curChunk) { + if (!this.loadedChunks[curChunk]) { + this.loadedChunks[curChunk] = true; + ++this.numChunksLoaded; + } + } + } + + onReceiveProgressiveData(data) { + let position = this.progressiveDataLength; + const beginChunk = Math.floor(position / this.chunkSize); + this.bytes.set(new Uint8Array(data), position); + position += data.byteLength; + this.progressiveDataLength = position; + const endChunk = position >= this.end ? this.numChunks : Math.floor(position / this.chunkSize); + + for (let curChunk = beginChunk; curChunk < endChunk; ++curChunk) { + if (!this.loadedChunks[curChunk]) { + this.loadedChunks[curChunk] = true; + ++this.numChunksLoaded; + } + } + } + + ensureByte(pos) { + if (pos < this.progressiveDataLength) { + return; + } + + const chunk = Math.floor(pos / this.chunkSize); + + if (chunk === this.lastSuccessfulEnsureByteChunk) { + return; + } + + if (!this.loadedChunks[chunk]) { + throw new _core_utils.MissingDataException(pos, pos + 1); + } + + this.lastSuccessfulEnsureByteChunk = chunk; + } + + ensureRange(begin, end) { + if (begin >= end) { + return; + } + + if (end <= this.progressiveDataLength) { + return; + } + + const chunkSize = this.chunkSize; + const beginChunk = Math.floor(begin / chunkSize); + const endChunk = Math.floor((end - 1) / chunkSize) + 1; + + for (let chunk = beginChunk; chunk < endChunk; ++chunk) { + if (!this.loadedChunks[chunk]) { + throw new _core_utils.MissingDataException(begin, end); + } + } + } + + nextEmptyChunk(beginChunk) { + const numChunks = this.numChunks; + + for (let i = 0; i < numChunks; ++i) { + const chunk = (beginChunk + i) % numChunks; + + if (!this.loadedChunks[chunk]) { + return chunk; + } + } + + return null; + } + + hasChunk(chunk) { + return !!this.loadedChunks[chunk]; + } + + get length() { + return this.end - this.start; + } + + get isEmpty() { + return this.length === 0; + } + + getByte() { + const pos = this.pos; + + if (pos >= this.end) { + return -1; + } + + if (pos >= this.progressiveDataLength) { + this.ensureByte(pos); + } + + return this.bytes[this.pos++]; + } + + getUint16() { + const b0 = this.getByte(); + const b1 = this.getByte(); + + if (b0 === -1 || b1 === -1) { + return -1; + } + + return (b0 << 8) + b1; + } + + getInt32() { + const b0 = this.getByte(); + const b1 = this.getByte(); + const b2 = this.getByte(); + const b3 = this.getByte(); + return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; + } + + getBytes(length, forceClamped = false) { + const bytes = this.bytes; + const pos = this.pos; + const strEnd = this.end; + + if (!length) { + if (strEnd > this.progressiveDataLength) { + this.ensureRange(pos, strEnd); + } + + const subarray = bytes.subarray(pos, strEnd); + return forceClamped ? new Uint8ClampedArray(subarray) : subarray; + } + + let end = pos + length; + + if (end > strEnd) { + end = strEnd; + } + + if (end > this.progressiveDataLength) { + this.ensureRange(pos, end); + } + + this.pos = end; + const subarray = bytes.subarray(pos, end); + return forceClamped ? new Uint8ClampedArray(subarray) : subarray; + } + + peekByte() { + const peekedByte = this.getByte(); + + if (peekedByte !== -1) { + this.pos--; + } + + return peekedByte; + } + + peekBytes(length, forceClamped = false) { + const bytes = this.getBytes(length, forceClamped); + this.pos -= bytes.length; + return bytes; + } + + getByteRange(begin, end) { + if (begin < 0) { + begin = 0; + } + + if (end > this.end) { + end = this.end; + } + + if (end > this.progressiveDataLength) { + this.ensureRange(begin, end); + } + + return this.bytes.subarray(begin, end); + } + + skip(n) { + if (!n) { + n = 1; + } + + this.pos += n; + } + + reset() { + this.pos = this.start; + } + + moveStart() { + this.start = this.pos; + } + + makeSubStream(start, length, dict) { + if (length) { + if (start + length > this.progressiveDataLength) { + this.ensureRange(start, start + length); + } + } else { + if (start >= this.progressiveDataLength) { + this.ensureByte(start); + } + } + + function ChunkedStreamSubstream() {} + + ChunkedStreamSubstream.prototype = Object.create(this); + + ChunkedStreamSubstream.prototype.getMissingChunks = function () { + const chunkSize = this.chunkSize; + const beginChunk = Math.floor(this.start / chunkSize); + const endChunk = Math.floor((this.end - 1) / chunkSize) + 1; + const missingChunks = []; + + for (let chunk = beginChunk; chunk < endChunk; ++chunk) { + if (!this.loadedChunks[chunk]) { + missingChunks.push(chunk); + } + } + + return missingChunks; + }; + + ChunkedStreamSubstream.prototype.allChunksLoaded = function () { + if (this.numChunksLoaded === this.numChunks) { + return true; + } + + return this.getMissingChunks().length === 0; + }; + + const subStream = new ChunkedStreamSubstream(); + subStream.pos = subStream.start = start; + subStream.end = start + length || this.end; + subStream.dict = dict; + return subStream; + } + +} + +exports.ChunkedStream = ChunkedStream; + +class ChunkedStreamManager { + constructor(pdfNetworkStream, args) { + this.length = args.length; + this.chunkSize = args.rangeChunkSize; + this.stream = new ChunkedStream(this.length, this.chunkSize, this); + this.pdfNetworkStream = pdfNetworkStream; + this.disableAutoFetch = args.disableAutoFetch; + this.msgHandler = args.msgHandler; + this.currRequestId = 0; + this.chunksNeededByRequest = Object.create(null); + this.requestsByChunk = Object.create(null); + this.promisesByRequest = Object.create(null); + this.progressiveDataLength = 0; + this.aborted = false; + this._loadedStreamCapability = (0, _util.createPromiseCapability)(); + } + + onLoadedStream() { + return this._loadedStreamCapability.promise; + } + + sendRequest(begin, end) { + const rangeReader = this.pdfNetworkStream.getRangeReader(begin, end); + + if (!rangeReader.isStreamingSupported) { + rangeReader.onProgress = this.onProgress.bind(this); + } + + let chunks = [], + loaded = 0; + const promise = new Promise((resolve, reject) => { + const readChunk = chunk => { + try { + if (!chunk.done) { + const data = chunk.value; + chunks.push(data); + loaded += (0, _util.arrayByteLength)(data); + + if (rangeReader.isStreamingSupported) { + this.onProgress({ + loaded + }); + } + + rangeReader.read().then(readChunk, reject); + return; + } + + const chunkData = (0, _util.arraysToBytes)(chunks); + chunks = null; + resolve(chunkData); + } catch (e) { + reject(e); + } + }; + + rangeReader.read().then(readChunk, reject); + }); + promise.then(data => { + if (this.aborted) { + return; + } + + this.onReceiveData({ + chunk: data, + begin + }); + }); + } + + requestAllChunks() { + const missingChunks = this.stream.getMissingChunks(); + + this._requestChunks(missingChunks); + + return this._loadedStreamCapability.promise; + } + + _requestChunks(chunks) { + const requestId = this.currRequestId++; + const chunksNeeded = Object.create(null); + this.chunksNeededByRequest[requestId] = chunksNeeded; + + for (const chunk of chunks) { + if (!this.stream.hasChunk(chunk)) { + chunksNeeded[chunk] = true; + } + } + + if ((0, _util.isEmptyObj)(chunksNeeded)) { + return Promise.resolve(); + } + + const capability = (0, _util.createPromiseCapability)(); + this.promisesByRequest[requestId] = capability; + const chunksToRequest = []; + + for (let chunk in chunksNeeded) { + chunk = chunk | 0; + + if (!(chunk in this.requestsByChunk)) { + this.requestsByChunk[chunk] = []; + chunksToRequest.push(chunk); + } + + this.requestsByChunk[chunk].push(requestId); + } + + if (!chunksToRequest.length) { + return capability.promise; + } + + const groupedChunksToRequest = this.groupChunks(chunksToRequest); + + for (const groupedChunk of groupedChunksToRequest) { + const begin = groupedChunk.beginChunk * this.chunkSize; + const end = Math.min(groupedChunk.endChunk * this.chunkSize, this.length); + this.sendRequest(begin, end); + } + + return capability.promise; + } + + getStream() { + return this.stream; + } + + requestRange(begin, end) { + end = Math.min(end, this.length); + const beginChunk = this.getBeginChunk(begin); + const endChunk = this.getEndChunk(end); + const chunks = []; + + for (let chunk = beginChunk; chunk < endChunk; ++chunk) { + chunks.push(chunk); + } + + return this._requestChunks(chunks); + } + + requestRanges(ranges = []) { + const chunksToRequest = []; + + for (const range of ranges) { + const beginChunk = this.getBeginChunk(range.begin); + const endChunk = this.getEndChunk(range.end); + + for (let chunk = beginChunk; chunk < endChunk; ++chunk) { + if (!chunksToRequest.includes(chunk)) { + chunksToRequest.push(chunk); + } + } + } + + chunksToRequest.sort(function (a, b) { + return a - b; + }); + return this._requestChunks(chunksToRequest); + } + + groupChunks(chunks) { + const groupedChunks = []; + let beginChunk = -1; + let prevChunk = -1; + + for (let i = 0, ii = chunks.length; i < ii; ++i) { + const chunk = chunks[i]; + + if (beginChunk < 0) { + beginChunk = chunk; + } + + if (prevChunk >= 0 && prevChunk + 1 !== chunk) { + groupedChunks.push({ + beginChunk, + endChunk: prevChunk + 1 + }); + beginChunk = chunk; + } + + if (i + 1 === chunks.length) { + groupedChunks.push({ + beginChunk, + endChunk: chunk + 1 + }); + } + + prevChunk = chunk; + } + + return groupedChunks; + } + + onProgress(args) { + this.msgHandler.send("DocProgress", { + loaded: this.stream.numChunksLoaded * this.chunkSize + args.loaded, + total: this.length + }); + } + + onReceiveData(args) { + const chunk = args.chunk; + const isProgressive = args.begin === undefined; + const begin = isProgressive ? this.progressiveDataLength : args.begin; + const end = begin + chunk.byteLength; + const beginChunk = Math.floor(begin / this.chunkSize); + const endChunk = end < this.length ? Math.floor(end / this.chunkSize) : Math.ceil(end / this.chunkSize); + + if (isProgressive) { + this.stream.onReceiveProgressiveData(chunk); + this.progressiveDataLength = end; + } else { + this.stream.onReceiveData(begin, chunk); + } + + if (this.stream.allChunksLoaded()) { + this._loadedStreamCapability.resolve(this.stream); + } + + const loadedRequests = []; + + for (let curChunk = beginChunk; curChunk < endChunk; ++curChunk) { + const requestIds = this.requestsByChunk[curChunk] || []; + delete this.requestsByChunk[curChunk]; + + for (const requestId of requestIds) { + const chunksNeeded = this.chunksNeededByRequest[requestId]; + + if (curChunk in chunksNeeded) { + delete chunksNeeded[curChunk]; + } + + if (!(0, _util.isEmptyObj)(chunksNeeded)) { + continue; + } + + loadedRequests.push(requestId); + } + } + + if (!this.disableAutoFetch && (0, _util.isEmptyObj)(this.requestsByChunk)) { + let nextEmptyChunk; + + if (this.stream.numChunksLoaded === 1) { + const lastChunk = this.stream.numChunks - 1; + + if (!this.stream.hasChunk(lastChunk)) { + nextEmptyChunk = lastChunk; + } + } else { + nextEmptyChunk = this.stream.nextEmptyChunk(endChunk); + } + + if (Number.isInteger(nextEmptyChunk)) { + this._requestChunks([nextEmptyChunk]); + } + } + + for (const requestId of loadedRequests) { + const capability = this.promisesByRequest[requestId]; + delete this.promisesByRequest[requestId]; + capability.resolve(); + } + + this.msgHandler.send("DocProgress", { + loaded: this.stream.numChunksLoaded * this.chunkSize, + total: this.length + }); + } + + onError(err) { + this._loadedStreamCapability.reject(err); + } + + getBeginChunk(begin) { + return Math.floor(begin / this.chunkSize); + } + + getEndChunk(end) { + return Math.floor((end - 1) / this.chunkSize) + 1; + } + + abort(reason) { + this.aborted = true; + + if (this.pdfNetworkStream) { + this.pdfNetworkStream.cancelAllRequests(reason); + } + + for (const requestId in this.promisesByRequest) { + this.promisesByRequest[requestId].reject(reason); + } + } + +} + +exports.ChunkedStreamManager = ChunkedStreamManager; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getLookupTableFactory = getLookupTableFactory; +exports.getInheritableProperty = getInheritableProperty; +exports.toRomanNumerals = toRomanNumerals; +exports.log2 = log2; +exports.readInt8 = readInt8; +exports.readUint16 = readUint16; +exports.readUint32 = readUint32; +exports.isWhiteSpace = isWhiteSpace; +exports.XRefParseException = exports.XRefEntryException = exports.MissingDataException = void 0; + +var _util = __w_pdfjs_require__(2); + +function getLookupTableFactory(initializer) { + let lookup; + return function () { + if (initializer) { + lookup = Object.create(null); + initializer(lookup); + initializer = null; + } + + return lookup; + }; +} + +class MissingDataException extends _util.BaseException { + constructor(begin, end) { + super(`Missing data [${begin}, ${end})`); + this.begin = begin; + this.end = end; + } + +} + +exports.MissingDataException = MissingDataException; + +class XRefEntryException extends _util.BaseException {} + +exports.XRefEntryException = XRefEntryException; + +class XRefParseException extends _util.BaseException {} + +exports.XRefParseException = XRefParseException; + +function getInheritableProperty({ + dict, + key, + getArray = false, + stopWhenFound = true +}) { + const LOOP_LIMIT = 100; + let loopCount = 0; + let values; + + while (dict) { + const value = getArray ? dict.getArray(key) : dict.get(key); + + if (value !== undefined) { + if (stopWhenFound) { + return value; + } + + if (!values) { + values = []; + } + + values.push(value); + } + + if (++loopCount > LOOP_LIMIT) { + (0, _util.warn)(`getInheritableProperty: maximum loop count exceeded for "${key}"`); + break; + } + + dict = dict.get("Parent"); + } + + return values; +} + +const ROMAN_NUMBER_MAP = ["", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM", "", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC", "", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"]; + +function toRomanNumerals(number, lowerCase = false) { + (0, _util.assert)(Number.isInteger(number) && number > 0, "The number should be a positive integer."); + const romanBuf = []; + let pos; + + while (number >= 1000) { + number -= 1000; + romanBuf.push("M"); + } + + pos = number / 100 | 0; + number %= 100; + romanBuf.push(ROMAN_NUMBER_MAP[pos]); + pos = number / 10 | 0; + number %= 10; + romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]); + romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); + const romanStr = romanBuf.join(""); + return lowerCase ? romanStr.toLowerCase() : romanStr; +} + +function log2(x) { + if (x <= 0) { + return 0; + } + + return Math.ceil(Math.log2(x)); +} + +function readInt8(data, offset) { + return data[offset] << 24 >> 24; +} + +function readUint16(data, offset) { + return data[offset] << 8 | data[offset + 1]; +} + +function readUint32(data, offset) { + return (data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]) >>> 0; +} + +function isWhiteSpace(ch) { + return ch === 0x20 || ch === 0x09 || ch === 0x0d || ch === 0x0a; +} + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFDocument = exports.Page = void 0; + +var _util = __w_pdfjs_require__(2); + +var _obj = __w_pdfjs_require__(10); + +var _primitives = __w_pdfjs_require__(5); + +var _core_utils = __w_pdfjs_require__(8); + +var _stream = __w_pdfjs_require__(12); + +var _annotation = __w_pdfjs_require__(25); + +var _crypto = __w_pdfjs_require__(22); + +var _parser = __w_pdfjs_require__(11); + +var _operator_list = __w_pdfjs_require__(26); + +var _evaluator = __w_pdfjs_require__(27); + +var _function = __w_pdfjs_require__(41); + +const DEFAULT_USER_UNIT = 1.0; +const LETTER_SIZE_MEDIABOX = [0, 0, 612, 792]; + +function isAnnotationRenderable(annotation, intent) { + return intent === "display" && annotation.viewable || intent === "print" && annotation.printable; +} + +class Page { + constructor({ + pdfManager, + xref, + pageIndex, + pageDict, + ref, + fontCache, + builtInCMapCache, + globalImageCache, + pdfFunctionFactory + }) { + this.pdfManager = pdfManager; + this.pageIndex = pageIndex; + this.pageDict = pageDict; + this.xref = xref; + this.ref = ref; + this.fontCache = fontCache; + this.builtInCMapCache = builtInCMapCache; + this.globalImageCache = globalImageCache; + this.pdfFunctionFactory = pdfFunctionFactory; + this.evaluatorOptions = pdfManager.evaluatorOptions; + this.resourcesPromise = null; + const idCounters = { + obj: 0 + }; + this.idFactory = { + createObjId() { + return `p${pageIndex}_${++idCounters.obj}`; + }, + + getDocId() { + return `g_${pdfManager.docId}`; + } + + }; + } + + _getInheritableProperty(key, getArray = false) { + const value = (0, _core_utils.getInheritableProperty)({ + dict: this.pageDict, + key, + getArray, + stopWhenFound: false + }); + + if (!Array.isArray(value)) { + return value; + } + + if (value.length === 1 || !(0, _primitives.isDict)(value[0])) { + return value[0]; + } + + return _primitives.Dict.merge(this.xref, value); + } + + get content() { + return this.pageDict.get("Contents"); + } + + get resources() { + return (0, _util.shadow)(this, "resources", this._getInheritableProperty("Resources") || _primitives.Dict.empty); + } + + _getBoundingBox(name) { + const box = this._getInheritableProperty(name, true); + + if (Array.isArray(box) && box.length === 4) { + if (box[2] - box[0] !== 0 && box[3] - box[1] !== 0) { + return box; + } + + (0, _util.warn)(`Empty /${name} entry.`); + } + + return null; + } + + get mediaBox() { + return (0, _util.shadow)(this, "mediaBox", this._getBoundingBox("MediaBox") || LETTER_SIZE_MEDIABOX); + } + + get cropBox() { + return (0, _util.shadow)(this, "cropBox", this._getBoundingBox("CropBox") || this.mediaBox); + } + + get userUnit() { + let obj = this.pageDict.get("UserUnit"); + + if (!(0, _util.isNum)(obj) || obj <= 0) { + obj = DEFAULT_USER_UNIT; + } + + return (0, _util.shadow)(this, "userUnit", obj); + } + + get view() { + const { + cropBox, + mediaBox + } = this; + let view; + + if (cropBox === mediaBox || (0, _util.isArrayEqual)(cropBox, mediaBox)) { + view = mediaBox; + } else { + const box = _util.Util.intersect(cropBox, mediaBox); + + if (box && box[2] - box[0] !== 0 && box[3] - box[1] !== 0) { + view = box; + } else { + (0, _util.warn)("Empty /CropBox and /MediaBox intersection."); + } + } + + return (0, _util.shadow)(this, "view", view || mediaBox); + } + + get rotate() { + let rotate = this._getInheritableProperty("Rotate") || 0; + + if (rotate % 90 !== 0) { + rotate = 0; + } else if (rotate >= 360) { + rotate = rotate % 360; + } else if (rotate < 0) { + rotate = (rotate % 360 + 360) % 360; + } + + return (0, _util.shadow)(this, "rotate", rotate); + } + + getContentStream() { + const content = this.content; + let stream; + + if (Array.isArray(content)) { + const xref = this.xref; + const streams = []; + + for (const subStream of content) { + streams.push(xref.fetchIfRef(subStream)); + } + + stream = new _stream.StreamsSequenceStream(streams); + } else if ((0, _primitives.isStream)(content)) { + stream = content; + } else { + stream = new _stream.NullStream(); + } + + return stream; + } + + loadResources(keys) { + if (!this.resourcesPromise) { + this.resourcesPromise = this.pdfManager.ensure(this, "resources"); + } + + return this.resourcesPromise.then(() => { + const objectLoader = new _obj.ObjectLoader(this.resources, keys, this.xref); + return objectLoader.load(); + }); + } + + getOperatorList({ + handler, + sink, + task, + intent, + renderInteractiveForms + }) { + const contentStreamPromise = this.pdfManager.ensure(this, "getContentStream"); + const resourcesPromise = this.loadResources(["ExtGState", "ColorSpace", "Pattern", "Shading", "XObject", "Font"]); + const partialEvaluator = new _evaluator.PartialEvaluator({ + xref: this.xref, + handler, + pageIndex: this.pageIndex, + idFactory: this.idFactory, + fontCache: this.fontCache, + builtInCMapCache: this.builtInCMapCache, + globalImageCache: this.globalImageCache, + options: this.evaluatorOptions, + pdfFunctionFactory: this.pdfFunctionFactory + }); + const dataPromises = Promise.all([contentStreamPromise, resourcesPromise]); + const pageListPromise = dataPromises.then(([contentStream]) => { + const opList = new _operator_list.OperatorList(intent, sink, this.pageIndex); + handler.send("StartRenderPage", { + transparency: partialEvaluator.hasBlendModes(this.resources), + pageIndex: this.pageIndex, + intent + }); + return partialEvaluator.getOperatorList({ + stream: contentStream, + task, + resources: this.resources, + operatorList: opList + }).then(function () { + return opList; + }); + }); + return Promise.all([pageListPromise, this._parsedAnnotations]).then(function ([pageOpList, annotations]) { + if (annotations.length === 0) { + pageOpList.flush(true); + return { + length: pageOpList.totalLength + }; + } + + const opListPromises = []; + + for (const annotation of annotations) { + if (isAnnotationRenderable(annotation, intent)) { + opListPromises.push(annotation.getOperatorList(partialEvaluator, task, renderInteractiveForms).catch(function (reason) { + (0, _util.warn)("getOperatorList - ignoring annotation data during " + `"${task.name}" task: "${reason}".`); + return null; + })); + } + } + + return Promise.all(opListPromises).then(function (opLists) { + pageOpList.addOp(_util.OPS.beginAnnotations, []); + + for (const opList of opLists) { + pageOpList.addOpList(opList); + } + + pageOpList.addOp(_util.OPS.endAnnotations, []); + pageOpList.flush(true); + return { + length: pageOpList.totalLength + }; + }); + }); + } + + extractTextContent({ + handler, + task, + normalizeWhitespace, + sink, + combineTextItems + }) { + const contentStreamPromise = this.pdfManager.ensure(this, "getContentStream"); + const resourcesPromise = this.loadResources(["ExtGState", "XObject", "Font"]); + const dataPromises = Promise.all([contentStreamPromise, resourcesPromise]); + return dataPromises.then(([contentStream]) => { + const partialEvaluator = new _evaluator.PartialEvaluator({ + xref: this.xref, + handler, + pageIndex: this.pageIndex, + idFactory: this.idFactory, + fontCache: this.fontCache, + builtInCMapCache: this.builtInCMapCache, + globalImageCache: this.globalImageCache, + options: this.evaluatorOptions, + pdfFunctionFactory: this.pdfFunctionFactory + }); + return partialEvaluator.getTextContent({ + stream: contentStream, + task, + resources: this.resources, + normalizeWhitespace, + combineTextItems, + sink + }); + }); + } + + getAnnotationsData(intent) { + return this._parsedAnnotations.then(function (annotations) { + const annotationsData = []; + + for (let i = 0, ii = annotations.length; i < ii; i++) { + if (!intent || isAnnotationRenderable(annotations[i], intent)) { + annotationsData.push(annotations[i].data); + } + } + + return annotationsData; + }); + } + + get annotations() { + return (0, _util.shadow)(this, "annotations", this._getInheritableProperty("Annots") || []); + } + + get _parsedAnnotations() { + const parsedAnnotations = this.pdfManager.ensure(this, "annotations").then(() => { + const annotationPromises = []; + + for (const annotationRef of this.annotations) { + annotationPromises.push(_annotation.AnnotationFactory.create(this.xref, annotationRef, this.pdfManager, this.idFactory).catch(function (reason) { + (0, _util.warn)(`_parsedAnnotations: "${reason}".`); + return null; + })); + } + + return Promise.all(annotationPromises).then(function (annotations) { + return annotations.filter(annotation => !!annotation); + }); + }); + return (0, _util.shadow)(this, "_parsedAnnotations", parsedAnnotations); + } + +} + +exports.Page = Page; +const PDF_HEADER_SIGNATURE = new Uint8Array([0x25, 0x50, 0x44, 0x46, 0x2d]); +const STARTXREF_SIGNATURE = new Uint8Array([0x73, 0x74, 0x61, 0x72, 0x74, 0x78, 0x72, 0x65, 0x66]); +const ENDOBJ_SIGNATURE = new Uint8Array([0x65, 0x6e, 0x64, 0x6f, 0x62, 0x6a]); +const FINGERPRINT_FIRST_BYTES = 1024; +const EMPTY_FINGERPRINT = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; +const PDF_HEADER_VERSION_REGEXP = /^[1-9]\.[0-9]$/; + +function find(stream, signature, limit = 1024, backwards = false) { + const signatureLength = signature.length; + const scanBytes = stream.peekBytes(limit); + const scanLength = scanBytes.length - signatureLength; + + if (scanLength <= 0) { + return false; + } + + if (backwards) { + const signatureEnd = signatureLength - 1; + let pos = scanBytes.length - 1; + + while (pos >= signatureEnd) { + let j = 0; + + while (j < signatureLength && scanBytes[pos - j] === signature[signatureEnd - j]) { + j++; + } + + if (j >= signatureLength) { + stream.pos += pos - signatureEnd; + return true; + } + + pos--; + } + } else { + let pos = 0; + + while (pos <= scanLength) { + let j = 0; + + while (j < signatureLength && scanBytes[pos + j] === signature[j]) { + j++; + } + + if (j >= signatureLength) { + stream.pos += pos; + return true; + } + + pos++; + } + } + + return false; +} + +class PDFDocument { + constructor(pdfManager, arg) { + let stream; + + if ((0, _primitives.isStream)(arg)) { + stream = arg; + } else if ((0, _util.isArrayBuffer)(arg)) { + stream = new _stream.Stream(arg); + } else { + throw new Error("PDFDocument: Unknown argument type"); + } + + if (stream.length <= 0) { + throw new _util.InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes."); + } + + this.pdfManager = pdfManager; + this.stream = stream; + this.xref = new _obj.XRef(stream, pdfManager); + this.pdfFunctionFactory = new _function.PDFFunctionFactory({ + xref: this.xref, + isEvalSupported: pdfManager.evaluatorOptions.isEvalSupported + }); + this._pagePromises = []; + } + + parse(recoveryMode) { + this.setup(recoveryMode); + const version = this.catalog.catDict.get("Version"); + + if ((0, _primitives.isName)(version)) { + this.pdfFormatVersion = version.name; + } + + try { + this.acroForm = this.catalog.catDict.get("AcroForm"); + + if (this.acroForm) { + this.xfa = this.acroForm.get("XFA"); + const fields = this.acroForm.get("Fields"); + + if ((!Array.isArray(fields) || fields.length === 0) && !this.xfa) { + this.acroForm = null; + } + } + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + (0, _util.info)("Cannot fetch AcroForm entry; assuming no AcroForms are present"); + this.acroForm = null; + } + + try { + const collection = this.catalog.catDict.get("Collection"); + + if ((0, _primitives.isDict)(collection) && collection.getKeys().length > 0) { + this.collection = collection; + } + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + (0, _util.info)("Cannot fetch Collection dictionary."); + } + } + + get linearization() { + let linearization = null; + + try { + linearization = _parser.Linearization.create(this.stream); + } catch (err) { + if (err instanceof _core_utils.MissingDataException) { + throw err; + } + + (0, _util.info)(err); + } + + return (0, _util.shadow)(this, "linearization", linearization); + } + + get startXRef() { + const stream = this.stream; + let startXRef = 0; + + if (this.linearization) { + stream.reset(); + + if (find(stream, ENDOBJ_SIGNATURE)) { + startXRef = stream.pos + 6 - stream.start; + } + } else { + const step = 1024; + const startXRefLength = STARTXREF_SIGNATURE.length; + let found = false, + pos = stream.end; + + while (!found && pos > 0) { + pos -= step - startXRefLength; + + if (pos < 0) { + pos = 0; + } + + stream.pos = pos; + found = find(stream, STARTXREF_SIGNATURE, step, true); + } + + if (found) { + stream.skip(9); + let ch; + + do { + ch = stream.getByte(); + } while ((0, _core_utils.isWhiteSpace)(ch)); + + let str = ""; + + while (ch >= 0x20 && ch <= 0x39) { + str += String.fromCharCode(ch); + ch = stream.getByte(); + } + + startXRef = parseInt(str, 10); + + if (isNaN(startXRef)) { + startXRef = 0; + } + } + } + + return (0, _util.shadow)(this, "startXRef", startXRef); + } + + checkHeader() { + const stream = this.stream; + stream.reset(); + + if (!find(stream, PDF_HEADER_SIGNATURE)) { + return; + } + + stream.moveStart(); + const MAX_PDF_VERSION_LENGTH = 12; + let version = "", + ch; + + while ((ch = stream.getByte()) > 0x20) { + if (version.length >= MAX_PDF_VERSION_LENGTH) { + break; + } + + version += String.fromCharCode(ch); + } + + if (!this.pdfFormatVersion) { + this.pdfFormatVersion = version.substring(5); + } + } + + parseStartXRef() { + this.xref.setStartXRef(this.startXRef); + } + + setup(recoveryMode) { + this.xref.parse(recoveryMode); + this.catalog = new _obj.Catalog(this.pdfManager, this.xref); + } + + get numPages() { + const linearization = this.linearization; + const num = linearization ? linearization.numPages : this.catalog.numPages; + return (0, _util.shadow)(this, "numPages", num); + } + + get documentInfo() { + const DocumentInfoValidators = { + Title: _util.isString, + Author: _util.isString, + Subject: _util.isString, + Keywords: _util.isString, + Creator: _util.isString, + Producer: _util.isString, + CreationDate: _util.isString, + ModDate: _util.isString, + Trapped: _primitives.isName + }; + let version = this.pdfFormatVersion; + + if (typeof version !== "string" || !PDF_HEADER_VERSION_REGEXP.test(version)) { + (0, _util.warn)(`Invalid PDF header version number: ${version}`); + version = null; + } + + const docInfo = { + PDFFormatVersion: version, + IsLinearized: !!this.linearization, + IsAcroFormPresent: !!this.acroForm, + IsXFAPresent: !!this.xfa, + IsCollectionPresent: !!this.collection + }; + let infoDict; + + try { + infoDict = this.xref.trailer.get("Info"); + } catch (err) { + if (err instanceof _core_utils.MissingDataException) { + throw err; + } + + (0, _util.info)("The document information dictionary is invalid."); + } + + if ((0, _primitives.isDict)(infoDict)) { + for (const key of infoDict.getKeys()) { + const value = infoDict.get(key); + + if (DocumentInfoValidators[key]) { + if (DocumentInfoValidators[key](value)) { + docInfo[key] = typeof value !== "string" ? value : (0, _util.stringToPDFString)(value); + } else { + (0, _util.info)(`Bad value in document info for "${key}".`); + } + } else if (typeof key === "string") { + let customValue; + + if ((0, _util.isString)(value)) { + customValue = (0, _util.stringToPDFString)(value); + } else if ((0, _primitives.isName)(value) || (0, _util.isNum)(value) || (0, _util.isBool)(value)) { + customValue = value; + } else { + (0, _util.info)(`Unsupported value in document info for (custom) "${key}".`); + continue; + } + + if (!docInfo.Custom) { + docInfo.Custom = Object.create(null); + } + + docInfo.Custom[key] = customValue; + } + } + } + + return (0, _util.shadow)(this, "documentInfo", docInfo); + } + + get fingerprint() { + let hash; + const idArray = this.xref.trailer.get("ID"); + + if (Array.isArray(idArray) && idArray[0] && (0, _util.isString)(idArray[0]) && idArray[0] !== EMPTY_FINGERPRINT) { + hash = (0, _util.stringToBytes)(idArray[0]); + } else { + hash = (0, _crypto.calculateMD5)(this.stream.getByteRange(0, FINGERPRINT_FIRST_BYTES), 0, FINGERPRINT_FIRST_BYTES); + } + + const fingerprintBuf = []; + + for (let i = 0, ii = hash.length; i < ii; i++) { + const hex = hash[i].toString(16); + fingerprintBuf.push(hex.padStart(2, "0")); + } + + return (0, _util.shadow)(this, "fingerprint", fingerprintBuf.join("")); + } + + _getLinearizationPage(pageIndex) { + const { + catalog, + linearization + } = this; + + const ref = _primitives.Ref.get(linearization.objectNumberFirst, 0); + + return this.xref.fetchAsync(ref).then(obj => { + if ((0, _primitives.isDict)(obj, "Page") || (0, _primitives.isDict)(obj) && !obj.has("Type") && obj.has("Contents")) { + if (ref && !catalog.pageKidsCountCache.has(ref)) { + catalog.pageKidsCountCache.put(ref, 1); + } + + return [obj, ref]; + } + + throw new _util.FormatError("The Linearization dictionary doesn't point " + "to a valid Page dictionary."); + }).catch(reason => { + (0, _util.info)(reason); + return catalog.getPageDict(pageIndex); + }); + } + + getPage(pageIndex) { + if (this._pagePromises[pageIndex] !== undefined) { + return this._pagePromises[pageIndex]; + } + + const { + catalog, + linearization + } = this; + const promise = linearization && linearization.pageFirst === pageIndex ? this._getLinearizationPage(pageIndex) : catalog.getPageDict(pageIndex); + return this._pagePromises[pageIndex] = promise.then(([pageDict, ref]) => { + return new Page({ + pdfManager: this.pdfManager, + xref: this.xref, + pageIndex, + pageDict, + ref, + fontCache: catalog.fontCache, + builtInCMapCache: catalog.builtInCMapCache, + globalImageCache: catalog.globalImageCache, + pdfFunctionFactory: this.pdfFunctionFactory + }); + }); + } + + checkFirstPage() { + return this.getPage(0).catch(async reason => { + if (reason instanceof _core_utils.XRefEntryException) { + this._pagePromises.length = 0; + await this.cleanup(); + throw new _core_utils.XRefParseException(); + } + }); + } + + fontFallback(id, handler) { + return this.catalog.fontFallback(id, handler); + } + + async cleanup(manuallyTriggered = false) { + return this.catalog ? this.catalog.cleanup(manuallyTriggered) : (0, _primitives.clearPrimitiveCaches)(); + } + +} + +exports.PDFDocument = PDFDocument; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.FileSpec = exports.XRef = exports.ObjectLoader = exports.Catalog = void 0; + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +var _parser = __w_pdfjs_require__(11); + +var _core_utils = __w_pdfjs_require__(8); + +var _crypto = __w_pdfjs_require__(22); + +var _colorspace = __w_pdfjs_require__(23); + +var _image_utils = __w_pdfjs_require__(24); + +function fetchDestination(dest) { + return (0, _primitives.isDict)(dest) ? dest.get("D") : dest; +} + +class Catalog { + constructor(pdfManager, xref) { + this.pdfManager = pdfManager; + this.xref = xref; + this.catDict = xref.getCatalogObj(); + + if (!(0, _primitives.isDict)(this.catDict)) { + throw new _util.FormatError("Catalog object is not a dictionary."); + } + + this.fontCache = new _primitives.RefSetCache(); + this.builtInCMapCache = new Map(); + this.globalImageCache = new _image_utils.GlobalImageCache(); + this.pageKidsCountCache = new _primitives.RefSetCache(); + } + + get metadata() { + const streamRef = this.catDict.getRaw("Metadata"); + + if (!(0, _primitives.isRef)(streamRef)) { + return (0, _util.shadow)(this, "metadata", null); + } + + const suppressEncryption = !(this.xref.encrypt && this.xref.encrypt.encryptMetadata); + const stream = this.xref.fetch(streamRef, suppressEncryption); + let metadata; + + if (stream && (0, _primitives.isDict)(stream.dict)) { + const type = stream.dict.get("Type"); + const subtype = stream.dict.get("Subtype"); + + if ((0, _primitives.isName)(type, "Metadata") && (0, _primitives.isName)(subtype, "XML")) { + try { + metadata = (0, _util.stringToUTF8String)((0, _util.bytesToString)(stream.getBytes())); + } catch (e) { + if (e instanceof _core_utils.MissingDataException) { + throw e; + } + + (0, _util.info)("Skipping invalid metadata."); + } + } + } + + return (0, _util.shadow)(this, "metadata", metadata); + } + + get toplevelPagesDict() { + const pagesObj = this.catDict.get("Pages"); + + if (!(0, _primitives.isDict)(pagesObj)) { + throw new _util.FormatError("Invalid top-level pages dictionary."); + } + + return (0, _util.shadow)(this, "toplevelPagesDict", pagesObj); + } + + get documentOutline() { + let obj = null; + + try { + obj = this._readDocumentOutline(); + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + (0, _util.warn)("Unable to read document outline."); + } + + return (0, _util.shadow)(this, "documentOutline", obj); + } + + _readDocumentOutline() { + let obj = this.catDict.get("Outlines"); + + if (!(0, _primitives.isDict)(obj)) { + return null; + } + + obj = obj.getRaw("First"); + + if (!(0, _primitives.isRef)(obj)) { + return null; + } + + const root = { + items: [] + }; + const queue = [{ + obj, + parent: root + }]; + const processed = new _primitives.RefSet(); + processed.put(obj); + const xref = this.xref, + blackColor = new Uint8ClampedArray(3); + + while (queue.length > 0) { + const i = queue.shift(); + const outlineDict = xref.fetchIfRef(i.obj); + + if (outlineDict === null) { + continue; + } + + if (!outlineDict.has("Title")) { + throw new _util.FormatError("Invalid outline item encountered."); + } + + const data = { + url: null, + dest: null + }; + Catalog.parseDestDictionary({ + destDict: outlineDict, + resultObj: data, + docBaseUrl: this.pdfManager.docBaseUrl + }); + const title = outlineDict.get("Title"); + const flags = outlineDict.get("F") || 0; + const color = outlineDict.getArray("C"); + const count = outlineDict.get("Count"); + let rgbColor = blackColor; + + if (Array.isArray(color) && color.length === 3 && (color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) { + rgbColor = _colorspace.ColorSpace.singletons.rgb.getRgb(color, 0); + } + + const outlineItem = { + dest: data.dest, + url: data.url, + unsafeUrl: data.unsafeUrl, + newWindow: data.newWindow, + title: (0, _util.stringToPDFString)(title), + color: rgbColor, + count: Number.isInteger(count) ? count : undefined, + bold: !!(flags & 2), + italic: !!(flags & 1), + items: [] + }; + i.parent.items.push(outlineItem); + obj = outlineDict.getRaw("First"); + + if ((0, _primitives.isRef)(obj) && !processed.has(obj)) { + queue.push({ + obj, + parent: outlineItem + }); + processed.put(obj); + } + + obj = outlineDict.getRaw("Next"); + + if ((0, _primitives.isRef)(obj) && !processed.has(obj)) { + queue.push({ + obj, + parent: i.parent + }); + processed.put(obj); + } + } + + return root.items.length > 0 ? root.items : null; + } + + get permissions() { + let permissions = null; + + try { + permissions = this._readPermissions(); + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + (0, _util.warn)("Unable to read permissions."); + } + + return (0, _util.shadow)(this, "permissions", permissions); + } + + _readPermissions() { + const encrypt = this.xref.trailer.get("Encrypt"); + + if (!(0, _primitives.isDict)(encrypt)) { + return null; + } + + let flags = encrypt.get("P"); + + if (!(0, _util.isNum)(flags)) { + return null; + } + + flags += 2 ** 32; + const permissions = []; + + for (const key in _util.PermissionFlag) { + const value = _util.PermissionFlag[key]; + + if (flags & value) { + permissions.push(value); + } + } + + return permissions; + } + + get numPages() { + const obj = this.toplevelPagesDict.get("Count"); + + if (!Number.isInteger(obj)) { + throw new _util.FormatError("Page count in top-level pages dictionary is not an integer."); + } + + return (0, _util.shadow)(this, "numPages", obj); + } + + get destinations() { + const obj = this._readDests(), + dests = Object.create(null); + + if (obj instanceof NameTree) { + const names = obj.getAll(); + + for (const name in names) { + dests[name] = fetchDestination(names[name]); + } + } else if (obj instanceof _primitives.Dict) { + obj.forEach(function (key, value) { + if (value) { + dests[key] = fetchDestination(value); + } + }); + } + + return (0, _util.shadow)(this, "destinations", dests); + } + + getDestination(destinationId) { + const obj = this._readDests(); + + if (obj instanceof NameTree || obj instanceof _primitives.Dict) { + return fetchDestination(obj.get(destinationId) || null); + } + + return null; + } + + _readDests() { + const obj = this.catDict.get("Names"); + + if (obj && obj.has("Dests")) { + return new NameTree(obj.getRaw("Dests"), this.xref); + } else if (this.catDict.has("Dests")) { + return this.catDict.get("Dests"); + } + + return undefined; + } + + get pageLabels() { + let obj = null; + + try { + obj = this._readPageLabels(); + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + (0, _util.warn)("Unable to read page labels."); + } + + return (0, _util.shadow)(this, "pageLabels", obj); + } + + _readPageLabels() { + const obj = this.catDict.getRaw("PageLabels"); + + if (!obj) { + return null; + } + + const pageLabels = new Array(this.numPages); + let style = null, + prefix = ""; + const numberTree = new NumberTree(obj, this.xref); + const nums = numberTree.getAll(); + let currentLabel = "", + currentIndex = 1; + + for (let i = 0, ii = this.numPages; i < ii; i++) { + if (i in nums) { + const labelDict = nums[i]; + + if (!(0, _primitives.isDict)(labelDict)) { + throw new _util.FormatError("PageLabel is not a dictionary."); + } + + if (labelDict.has("Type") && !(0, _primitives.isName)(labelDict.get("Type"), "PageLabel")) { + throw new _util.FormatError("Invalid type in PageLabel dictionary."); + } + + if (labelDict.has("S")) { + const s = labelDict.get("S"); + + if (!(0, _primitives.isName)(s)) { + throw new _util.FormatError("Invalid style in PageLabel dictionary."); + } + + style = s.name; + } else { + style = null; + } + + if (labelDict.has("P")) { + const p = labelDict.get("P"); + + if (!(0, _util.isString)(p)) { + throw new _util.FormatError("Invalid prefix in PageLabel dictionary."); + } + + prefix = (0, _util.stringToPDFString)(p); + } else { + prefix = ""; + } + + if (labelDict.has("St")) { + const st = labelDict.get("St"); + + if (!(Number.isInteger(st) && st >= 1)) { + throw new _util.FormatError("Invalid start in PageLabel dictionary."); + } + + currentIndex = st; + } else { + currentIndex = 1; + } + } + + switch (style) { + case "D": + currentLabel = currentIndex; + break; + + case "R": + case "r": + currentLabel = (0, _core_utils.toRomanNumerals)(currentIndex, style === "r"); + break; + + case "A": + case "a": + const LIMIT = 26; + const A_UPPER_CASE = 0x41, + A_LOWER_CASE = 0x61; + const baseCharCode = style === "a" ? A_LOWER_CASE : A_UPPER_CASE; + const letterIndex = currentIndex - 1; + const character = String.fromCharCode(baseCharCode + letterIndex % LIMIT); + const charBuf = []; + + for (let j = 0, jj = letterIndex / LIMIT | 0; j <= jj; j++) { + charBuf.push(character); + } + + currentLabel = charBuf.join(""); + break; + + default: + if (style) { + throw new _util.FormatError(`Invalid style "${style}" in PageLabel dictionary.`); + } + + currentLabel = ""; + } + + pageLabels[i] = prefix + currentLabel; + currentIndex++; + } + + return pageLabels; + } + + get pageLayout() { + const obj = this.catDict.get("PageLayout"); + let pageLayout = ""; + + if ((0, _primitives.isName)(obj)) { + switch (obj.name) { + case "SinglePage": + case "OneColumn": + case "TwoColumnLeft": + case "TwoColumnRight": + case "TwoPageLeft": + case "TwoPageRight": + pageLayout = obj.name; + } + } + + return (0, _util.shadow)(this, "pageLayout", pageLayout); + } + + get pageMode() { + const obj = this.catDict.get("PageMode"); + let pageMode = "UseNone"; + + if ((0, _primitives.isName)(obj)) { + switch (obj.name) { + case "UseNone": + case "UseOutlines": + case "UseThumbs": + case "FullScreen": + case "UseOC": + case "UseAttachments": + pageMode = obj.name; + } + } + + return (0, _util.shadow)(this, "pageMode", pageMode); + } + + get viewerPreferences() { + const ViewerPreferencesValidators = { + HideToolbar: _util.isBool, + HideMenubar: _util.isBool, + HideWindowUI: _util.isBool, + FitWindow: _util.isBool, + CenterWindow: _util.isBool, + DisplayDocTitle: _util.isBool, + NonFullScreenPageMode: _primitives.isName, + Direction: _primitives.isName, + ViewArea: _primitives.isName, + ViewClip: _primitives.isName, + PrintArea: _primitives.isName, + PrintClip: _primitives.isName, + PrintScaling: _primitives.isName, + Duplex: _primitives.isName, + PickTrayByPDFSize: _util.isBool, + PrintPageRange: Array.isArray, + NumCopies: Number.isInteger + }; + const obj = this.catDict.get("ViewerPreferences"); + let prefs = null; + + if ((0, _primitives.isDict)(obj)) { + for (const key in ViewerPreferencesValidators) { + if (!obj.has(key)) { + continue; + } + + const value = obj.get(key); + + if (!ViewerPreferencesValidators[key](value)) { + (0, _util.info)(`Bad value in ViewerPreferences for "${key}".`); + continue; + } + + let prefValue; + + switch (key) { + case "NonFullScreenPageMode": + switch (value.name) { + case "UseNone": + case "UseOutlines": + case "UseThumbs": + case "UseOC": + prefValue = value.name; + break; + + default: + prefValue = "UseNone"; + } + + break; + + case "Direction": + switch (value.name) { + case "L2R": + case "R2L": + prefValue = value.name; + break; + + default: + prefValue = "L2R"; + } + + break; + + case "ViewArea": + case "ViewClip": + case "PrintArea": + case "PrintClip": + switch (value.name) { + case "MediaBox": + case "CropBox": + case "BleedBox": + case "TrimBox": + case "ArtBox": + prefValue = value.name; + break; + + default: + prefValue = "CropBox"; + } + + break; + + case "PrintScaling": + switch (value.name) { + case "None": + case "AppDefault": + prefValue = value.name; + break; + + default: + prefValue = "AppDefault"; + } + + break; + + case "Duplex": + switch (value.name) { + case "Simplex": + case "DuplexFlipShortEdge": + case "DuplexFlipLongEdge": + prefValue = value.name; + break; + + default: + prefValue = "None"; + } + + break; + + case "PrintPageRange": + const length = value.length; + + if (length % 2 !== 0) { + break; + } + + const isValid = value.every((page, i, arr) => { + return Number.isInteger(page) && page > 0 && (i === 0 || page >= arr[i - 1]) && page <= this.numPages; + }); + + if (isValid) { + prefValue = value; + } + + break; + + case "NumCopies": + if (value > 0) { + prefValue = value; + } + + break; + + default: + if (typeof value !== "boolean") { + throw new _util.FormatError(`viewerPreferences - expected a boolean value for: ${key}`); + } + + prefValue = value; + } + + if (prefValue !== undefined) { + if (!prefs) { + prefs = Object.create(null); + } + + prefs[key] = prefValue; + } else { + (0, _util.info)(`Bad value in ViewerPreferences for "${key}".`); + } + } + } + + return (0, _util.shadow)(this, "viewerPreferences", prefs); + } + + get openAction() { + const obj = this.catDict.get("OpenAction"); + let openAction = null; + + if ((0, _primitives.isDict)(obj)) { + const destDict = new _primitives.Dict(this.xref); + destDict.set("A", obj); + const resultObj = { + url: null, + dest: null, + action: null + }; + Catalog.parseDestDictionary({ + destDict, + resultObj + }); + + if (Array.isArray(resultObj.dest)) { + if (!openAction) { + openAction = Object.create(null); + } + + openAction.dest = resultObj.dest; + } else if (resultObj.action) { + if (!openAction) { + openAction = Object.create(null); + } + + openAction.action = resultObj.action; + } + } else if (Array.isArray(obj)) { + if (!openAction) { + openAction = Object.create(null); + } + + openAction.dest = obj; + } + + return (0, _util.shadow)(this, "openAction", openAction); + } + + get attachments() { + const obj = this.catDict.get("Names"); + let attachments = null; + + if (obj && obj.has("EmbeddedFiles")) { + const nameTree = new NameTree(obj.getRaw("EmbeddedFiles"), this.xref); + const names = nameTree.getAll(); + + for (const name in names) { + const fs = new FileSpec(names[name], this.xref); + + if (!attachments) { + attachments = Object.create(null); + } + + attachments[(0, _util.stringToPDFString)(name)] = fs.serializable; + } + } + + return (0, _util.shadow)(this, "attachments", attachments); + } + + get javaScript() { + const obj = this.catDict.get("Names"); + let javaScript = null; + + function appendIfJavaScriptDict(jsDict) { + const type = jsDict.get("S"); + + if (!(0, _primitives.isName)(type, "JavaScript")) { + return; + } + + let js = jsDict.get("JS"); + + if ((0, _primitives.isStream)(js)) { + js = (0, _util.bytesToString)(js.getBytes()); + } else if (!(0, _util.isString)(js)) { + return; + } + + if (!javaScript) { + javaScript = []; + } + + javaScript.push((0, _util.stringToPDFString)(js)); + } + + if (obj && obj.has("JavaScript")) { + const nameTree = new NameTree(obj.getRaw("JavaScript"), this.xref); + const names = nameTree.getAll(); + + for (const name in names) { + const jsDict = names[name]; + + if ((0, _primitives.isDict)(jsDict)) { + appendIfJavaScriptDict(jsDict); + } + } + } + + const openAction = this.catDict.get("OpenAction"); + + if ((0, _primitives.isDict)(openAction) && (0, _primitives.isName)(openAction.get("S"), "JavaScript")) { + appendIfJavaScriptDict(openAction); + } + + return (0, _util.shadow)(this, "javaScript", javaScript); + } + + fontFallback(id, handler) { + const promises = []; + this.fontCache.forEach(function (promise) { + promises.push(promise); + }); + return Promise.all(promises).then(translatedFonts => { + for (const translatedFont of translatedFonts) { + if (translatedFont.loadedName === id) { + translatedFont.fallback(handler); + return; + } + } + }); + } + + cleanup(manuallyTriggered = false) { + (0, _primitives.clearPrimitiveCaches)(); + this.globalImageCache.clear(manuallyTriggered); + this.pageKidsCountCache.clear(); + const promises = []; + this.fontCache.forEach(function (promise) { + promises.push(promise); + }); + return Promise.all(promises).then(translatedFonts => { + for (const { + dict + } of translatedFonts) { + delete dict.translated; + } + + this.fontCache.clear(); + this.builtInCMapCache.clear(); + }); + } + + getPageDict(pageIndex) { + const capability = (0, _util.createPromiseCapability)(); + const nodesToVisit = [this.catDict.getRaw("Pages")]; + const visitedNodes = new _primitives.RefSet(); + const xref = this.xref, + pageKidsCountCache = this.pageKidsCountCache; + let count, + currentPageIndex = 0; + + function next() { + while (nodesToVisit.length) { + const currentNode = nodesToVisit.pop(); + + if ((0, _primitives.isRef)(currentNode)) { + count = pageKidsCountCache.get(currentNode); + + if (count > 0 && currentPageIndex + count < pageIndex) { + currentPageIndex += count; + continue; + } + + if (visitedNodes.has(currentNode)) { + capability.reject(new _util.FormatError("Pages tree contains circular reference.")); + return; + } + + visitedNodes.put(currentNode); + xref.fetchAsync(currentNode).then(function (obj) { + if ((0, _primitives.isDict)(obj, "Page") || (0, _primitives.isDict)(obj) && !obj.has("Kids")) { + if (pageIndex === currentPageIndex) { + if (currentNode && !pageKidsCountCache.has(currentNode)) { + pageKidsCountCache.put(currentNode, 1); + } + + capability.resolve([obj, currentNode]); + } else { + currentPageIndex++; + next(); + } + + return; + } + + nodesToVisit.push(obj); + next(); + }, capability.reject); + return; + } + + if (!(0, _primitives.isDict)(currentNode)) { + capability.reject(new _util.FormatError("Page dictionary kid reference points to wrong type of object.")); + return; + } + + count = currentNode.get("Count"); + + if (Number.isInteger(count) && count >= 0) { + const objId = currentNode.objId; + + if (objId && !pageKidsCountCache.has(objId)) { + pageKidsCountCache.put(objId, count); + } + + if (currentPageIndex + count <= pageIndex) { + currentPageIndex += count; + continue; + } + } + + const kids = currentNode.get("Kids"); + + if (!Array.isArray(kids)) { + if ((0, _primitives.isName)(currentNode.get("Type"), "Page") || !currentNode.has("Type") && currentNode.has("Contents")) { + if (currentPageIndex === pageIndex) { + capability.resolve([currentNode, null]); + return; + } + + currentPageIndex++; + continue; + } + + capability.reject(new _util.FormatError("Page dictionary kids object is not an array.")); + return; + } + + for (let last = kids.length - 1; last >= 0; last--) { + nodesToVisit.push(kids[last]); + } + } + + capability.reject(new Error(`Page index ${pageIndex} not found.`)); + } + + next(); + return capability.promise; + } + + getPageIndex(pageRef) { + const xref = this.xref; + + function pagesBeforeRef(kidRef) { + let total = 0, + parentRef; + return xref.fetchAsync(kidRef).then(function (node) { + if ((0, _primitives.isRefsEqual)(kidRef, pageRef) && !(0, _primitives.isDict)(node, "Page") && !((0, _primitives.isDict)(node) && !node.has("Type") && node.has("Contents"))) { + throw new _util.FormatError("The reference does not point to a /Page dictionary."); + } + + if (!node) { + return null; + } + + if (!(0, _primitives.isDict)(node)) { + throw new _util.FormatError("Node must be a dictionary."); + } + + parentRef = node.getRaw("Parent"); + return node.getAsync("Parent"); + }).then(function (parent) { + if (!parent) { + return null; + } + + if (!(0, _primitives.isDict)(parent)) { + throw new _util.FormatError("Parent must be a dictionary."); + } + + return parent.getAsync("Kids"); + }).then(function (kids) { + if (!kids) { + return null; + } + + const kidPromises = []; + let found = false; + + for (let i = 0, ii = kids.length; i < ii; i++) { + const kid = kids[i]; + + if (!(0, _primitives.isRef)(kid)) { + throw new _util.FormatError("Kid must be a reference."); + } + + if ((0, _primitives.isRefsEqual)(kid, kidRef)) { + found = true; + break; + } + + kidPromises.push(xref.fetchAsync(kid).then(function (obj) { + if (!(0, _primitives.isDict)(obj)) { + throw new _util.FormatError("Kid node must be a dictionary."); + } + + if (obj.has("Count")) { + total += obj.get("Count"); + } else { + total++; + } + })); + } + + if (!found) { + throw new _util.FormatError("Kid reference not found in parent's kids."); + } + + return Promise.all(kidPromises).then(function () { + return [total, parentRef]; + }); + }); + } + + let total = 0; + + function next(ref) { + return pagesBeforeRef(ref).then(function (args) { + if (!args) { + return total; + } + + const [count, parentRef] = args; + total += count; + return next(parentRef); + }); + } + + return next(pageRef); + } + + static parseDestDictionary(params) { + function addDefaultProtocolToUrl(url) { + return url.startsWith("www.") ? `http://${url}` : url; + } + + function tryConvertUrlEncoding(url) { + try { + return (0, _util.stringToUTF8String)(url); + } catch (e) { + return url; + } + } + + const destDict = params.destDict; + + if (!(0, _primitives.isDict)(destDict)) { + (0, _util.warn)("parseDestDictionary: `destDict` must be a dictionary."); + return; + } + + const resultObj = params.resultObj; + + if (typeof resultObj !== "object") { + (0, _util.warn)("parseDestDictionary: `resultObj` must be an object."); + return; + } + + const docBaseUrl = params.docBaseUrl || null; + let action = destDict.get("A"), + url, + dest; + + if (!(0, _primitives.isDict)(action) && destDict.has("Dest")) { + action = destDict.get("Dest"); + } + + if ((0, _primitives.isDict)(action)) { + const actionType = action.get("S"); + + if (!(0, _primitives.isName)(actionType)) { + (0, _util.warn)("parseDestDictionary: Invalid type in Action dictionary."); + return; + } + + const actionName = actionType.name; + + switch (actionName) { + case "URI": + url = action.get("URI"); + + if ((0, _primitives.isName)(url)) { + url = "/" + url.name; + } else if ((0, _util.isString)(url)) { + url = addDefaultProtocolToUrl(url); + } + + break; + + case "GoTo": + dest = action.get("D"); + break; + + case "Launch": + case "GoToR": + const urlDict = action.get("F"); + + if ((0, _primitives.isDict)(urlDict)) { + url = urlDict.get("F") || null; + } else if ((0, _util.isString)(urlDict)) { + url = urlDict; + } + + let remoteDest = action.get("D"); + + if (remoteDest) { + if ((0, _primitives.isName)(remoteDest)) { + remoteDest = remoteDest.name; + } + + if ((0, _util.isString)(url)) { + const baseUrl = url.split("#")[0]; + + if ((0, _util.isString)(remoteDest)) { + url = baseUrl + "#" + remoteDest; + } else if (Array.isArray(remoteDest)) { + url = baseUrl + "#" + JSON.stringify(remoteDest); + } + } + } + + const newWindow = action.get("NewWindow"); + + if ((0, _util.isBool)(newWindow)) { + resultObj.newWindow = newWindow; + } + + break; + + case "Named": + const namedAction = action.get("N"); + + if ((0, _primitives.isName)(namedAction)) { + resultObj.action = namedAction.name; + } + + break; + + case "JavaScript": + const jsAction = action.get("JS"); + let js; + + if ((0, _primitives.isStream)(jsAction)) { + js = (0, _util.bytesToString)(jsAction.getBytes()); + } else if ((0, _util.isString)(jsAction)) { + js = jsAction; + } + + if (js) { + const URL_OPEN_METHODS = ["app.launchURL", "window.open"]; + const regex = new RegExp("^\\s*(" + URL_OPEN_METHODS.join("|").split(".").join("\\.") + ")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))", "i"); + const jsUrl = regex.exec((0, _util.stringToPDFString)(js)); + + if (jsUrl && jsUrl[2]) { + url = jsUrl[2]; + + if (jsUrl[3] === "true" && jsUrl[1] === "app.launchURL") { + resultObj.newWindow = true; + } + + break; + } + } + + default: + (0, _util.warn)(`parseDestDictionary: unsupported action type "${actionName}".`); + break; + } + } else if (destDict.has("Dest")) { + dest = destDict.get("Dest"); + } + + if ((0, _util.isString)(url)) { + url = tryConvertUrlEncoding(url); + const absoluteUrl = (0, _util.createValidAbsoluteUrl)(url, docBaseUrl); + + if (absoluteUrl) { + resultObj.url = absoluteUrl.href; + } + + resultObj.unsafeUrl = url; + } + + if (dest) { + if ((0, _primitives.isName)(dest)) { + dest = dest.name; + } + + if ((0, _util.isString)(dest) || Array.isArray(dest)) { + resultObj.dest = dest; + } + } + } + +} + +exports.Catalog = Catalog; + +var XRef = function XRefClosure() { + function XRef(stream, pdfManager) { + this.stream = stream; + this.pdfManager = pdfManager; + this.entries = []; + this.xrefstms = Object.create(null); + this._cacheMap = new Map(); + this.stats = { + streamTypes: Object.create(null), + fontTypes: Object.create(null) + }; + } + + XRef.prototype = { + setStartXRef: function XRef_setStartXRef(startXRef) { + this.startXRefQueue = [startXRef]; + }, + parse: function XRef_parse(recoveryMode) { + var trailerDict; + + if (!recoveryMode) { + trailerDict = this.readXRef(); + } else { + (0, _util.warn)("Indexing all PDF objects"); + trailerDict = this.indexObjects(); + } + + trailerDict.assignXref(this); + this.trailer = trailerDict; + let encrypt; + + try { + encrypt = trailerDict.get("Encrypt"); + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + (0, _util.warn)(`XRef.parse - Invalid "Encrypt" reference: "${ex}".`); + } + + if ((0, _primitives.isDict)(encrypt)) { + var ids = trailerDict.get("ID"); + var fileId = ids && ids.length ? ids[0] : ""; + encrypt.suppressEncryption = true; + this.encrypt = new _crypto.CipherTransformFactory(encrypt, fileId, this.pdfManager.password); + } + + let root; + + try { + root = trailerDict.get("Root"); + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + (0, _util.warn)(`XRef.parse - Invalid "Root" reference: "${ex}".`); + } + + if ((0, _primitives.isDict)(root) && root.has("Pages")) { + this.root = root; + } else { + if (!recoveryMode) { + throw new _core_utils.XRefParseException(); + } + + throw new _util.FormatError("Invalid root reference"); + } + }, + processXRefTable: function XRef_processXRefTable(parser) { + if (!("tableState" in this)) { + this.tableState = { + entryNum: 0, + streamPos: parser.lexer.stream.pos, + parserBuf1: parser.buf1, + parserBuf2: parser.buf2 + }; + } + + var obj = this.readXRefTable(parser); + + if (!(0, _primitives.isCmd)(obj, "trailer")) { + throw new _util.FormatError("Invalid XRef table: could not find trailer dictionary"); + } + + var dict = parser.getObj(); + + if (!(0, _primitives.isDict)(dict) && dict.dict) { + dict = dict.dict; + } + + if (!(0, _primitives.isDict)(dict)) { + throw new _util.FormatError("Invalid XRef table: could not parse trailer dictionary"); + } + + delete this.tableState; + return dict; + }, + readXRefTable: function XRef_readXRefTable(parser) { + var stream = parser.lexer.stream; + var tableState = this.tableState; + stream.pos = tableState.streamPos; + parser.buf1 = tableState.parserBuf1; + parser.buf2 = tableState.parserBuf2; + var obj; + + while (true) { + if (!("firstEntryNum" in tableState) || !("entryCount" in tableState)) { + if ((0, _primitives.isCmd)(obj = parser.getObj(), "trailer")) { + break; + } + + tableState.firstEntryNum = obj; + tableState.entryCount = parser.getObj(); + } + + var first = tableState.firstEntryNum; + var count = tableState.entryCount; + + if (!Number.isInteger(first) || !Number.isInteger(count)) { + throw new _util.FormatError("Invalid XRef table: wrong types in subsection header"); + } + + for (var i = tableState.entryNum; i < count; i++) { + tableState.streamPos = stream.pos; + tableState.entryNum = i; + tableState.parserBuf1 = parser.buf1; + tableState.parserBuf2 = parser.buf2; + var entry = {}; + entry.offset = parser.getObj(); + entry.gen = parser.getObj(); + var type = parser.getObj(); + + if (type instanceof _primitives.Cmd) { + switch (type.cmd) { + case "f": + entry.free = true; + break; + + case "n": + entry.uncompressed = true; + break; + } + } + + if (!Number.isInteger(entry.offset) || !Number.isInteger(entry.gen) || !(entry.free || entry.uncompressed)) { + throw new _util.FormatError(`Invalid entry in XRef subsection: ${first}, ${count}`); + } + + if (i === 0 && entry.free && first === 1) { + first = 0; + } + + if (!this.entries[i + first]) { + this.entries[i + first] = entry; + } + } + + tableState.entryNum = 0; + tableState.streamPos = stream.pos; + tableState.parserBuf1 = parser.buf1; + tableState.parserBuf2 = parser.buf2; + delete tableState.firstEntryNum; + delete tableState.entryCount; + } + + if (this.entries[0] && !this.entries[0].free) { + throw new _util.FormatError("Invalid XRef table: unexpected first object"); + } + + return obj; + }, + processXRefStream: function XRef_processXRefStream(stream) { + if (!("streamState" in this)) { + var streamParameters = stream.dict; + var byteWidths = streamParameters.get("W"); + var range = streamParameters.get("Index"); + + if (!range) { + range = [0, streamParameters.get("Size")]; + } + + this.streamState = { + entryRanges: range, + byteWidths, + entryNum: 0, + streamPos: stream.pos + }; + } + + this.readXRefStream(stream); + delete this.streamState; + return stream.dict; + }, + readXRefStream: function XRef_readXRefStream(stream) { + var i, j; + var streamState = this.streamState; + stream.pos = streamState.streamPos; + var byteWidths = streamState.byteWidths; + var typeFieldWidth = byteWidths[0]; + var offsetFieldWidth = byteWidths[1]; + var generationFieldWidth = byteWidths[2]; + var entryRanges = streamState.entryRanges; + + while (entryRanges.length > 0) { + var first = entryRanges[0]; + var n = entryRanges[1]; + + if (!Number.isInteger(first) || !Number.isInteger(n)) { + throw new _util.FormatError(`Invalid XRef range fields: ${first}, ${n}`); + } + + if (!Number.isInteger(typeFieldWidth) || !Number.isInteger(offsetFieldWidth) || !Number.isInteger(generationFieldWidth)) { + throw new _util.FormatError(`Invalid XRef entry fields length: ${first}, ${n}`); + } + + for (i = streamState.entryNum; i < n; ++i) { + streamState.entryNum = i; + streamState.streamPos = stream.pos; + var type = 0, + offset = 0, + generation = 0; + + for (j = 0; j < typeFieldWidth; ++j) { + type = type << 8 | stream.getByte(); + } + + if (typeFieldWidth === 0) { + type = 1; + } + + for (j = 0; j < offsetFieldWidth; ++j) { + offset = offset << 8 | stream.getByte(); + } + + for (j = 0; j < generationFieldWidth; ++j) { + generation = generation << 8 | stream.getByte(); + } + + var entry = {}; + entry.offset = offset; + entry.gen = generation; + + switch (type) { + case 0: + entry.free = true; + break; + + case 1: + entry.uncompressed = true; + break; + + case 2: + break; + + default: + throw new _util.FormatError(`Invalid XRef entry type: ${type}`); + } + + if (!this.entries[first + i]) { + this.entries[first + i] = entry; + } + } + + streamState.entryNum = 0; + streamState.streamPos = stream.pos; + entryRanges.splice(0, 2); + } + }, + indexObjects: function XRef_indexObjects() { + var TAB = 0x9, + LF = 0xa, + CR = 0xd, + SPACE = 0x20; + var PERCENT = 0x25, + LT = 0x3c; + + function readToken(data, offset) { + var token = "", + ch = data[offset]; + + while (ch !== LF && ch !== CR && ch !== LT) { + if (++offset >= data.length) { + break; + } + + token += String.fromCharCode(ch); + ch = data[offset]; + } + + return token; + } + + function skipUntil(data, offset, what) { + var length = what.length, + dataLength = data.length; + var skipped = 0; + + while (offset < dataLength) { + var i = 0; + + while (i < length && data[offset + i] === what[i]) { + ++i; + } + + if (i >= length) { + break; + } + + offset++; + skipped++; + } + + return skipped; + } + + var objRegExp = /^(\d+)\s+(\d+)\s+obj\b/; + const endobjRegExp = /\bendobj[\b\s]$/; + const nestedObjRegExp = /\s+(\d+\s+\d+\s+obj[\b\s<])$/; + const CHECK_CONTENT_LENGTH = 25; + var trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]); + var startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]); + const objBytes = new Uint8Array([111, 98, 106]); + var xrefBytes = new Uint8Array([47, 88, 82, 101, 102]); + this.entries.length = 0; + var stream = this.stream; + stream.pos = 0; + var buffer = stream.getBytes(); + var position = stream.start, + length = buffer.length; + var trailers = [], + xrefStms = []; + + while (position < length) { + var ch = buffer[position]; + + if (ch === TAB || ch === LF || ch === CR || ch === SPACE) { + ++position; + continue; + } + + if (ch === PERCENT) { + do { + ++position; + + if (position >= length) { + break; + } + + ch = buffer[position]; + } while (ch !== LF && ch !== CR); + + continue; + } + + var token = readToken(buffer, position); + var m; + + if (token.startsWith("xref") && (token.length === 4 || /\s/.test(token[4]))) { + position += skipUntil(buffer, position, trailerBytes); + trailers.push(position); + position += skipUntil(buffer, position, startxrefBytes); + } else if (m = objRegExp.exec(token)) { + const num = m[1] | 0, + gen = m[2] | 0; + + if (!this.entries[num] || this.entries[num].gen === gen) { + this.entries[num] = { + offset: position - stream.start, + gen, + uncompressed: true + }; + } + + let contentLength, + startPos = position + token.length; + + while (startPos < buffer.length) { + const endPos = startPos + skipUntil(buffer, startPos, objBytes) + 4; + contentLength = endPos - position; + const checkPos = Math.max(endPos - CHECK_CONTENT_LENGTH, startPos); + const tokenStr = (0, _util.bytesToString)(buffer.subarray(checkPos, endPos)); + + if (endobjRegExp.test(tokenStr)) { + break; + } else { + const objToken = nestedObjRegExp.exec(tokenStr); + + if (objToken && objToken[1]) { + (0, _util.warn)('indexObjects: Found new "obj" inside of another "obj", ' + 'caused by missing "endobj" -- trying to recover.'); + contentLength -= objToken[1].length; + break; + } + } + + startPos = endPos; + } + + const content = buffer.subarray(position, position + contentLength); + var xrefTagOffset = skipUntil(content, 0, xrefBytes); + + if (xrefTagOffset < contentLength && content[xrefTagOffset + 5] < 64) { + xrefStms.push(position - stream.start); + this.xrefstms[position - stream.start] = 1; + } + + position += contentLength; + } else if (token.startsWith("trailer") && (token.length === 7 || /\s/.test(token[7]))) { + trailers.push(position); + position += skipUntil(buffer, position, startxrefBytes); + } else { + position += token.length + 1; + } + } + + var i, ii; + + for (i = 0, ii = xrefStms.length; i < ii; ++i) { + this.startXRefQueue.push(xrefStms[i]); + this.readXRef(true); + } + + let trailerDict; + + for (i = 0, ii = trailers.length; i < ii; ++i) { + stream.pos = trailers[i]; + const parser = new _parser.Parser({ + lexer: new _parser.Lexer(stream), + xref: this, + allowStreams: true, + recoveryMode: true + }); + var obj = parser.getObj(); + + if (!(0, _primitives.isCmd)(obj, "trailer")) { + continue; + } + + const dict = parser.getObj(); + + if (!(0, _primitives.isDict)(dict)) { + continue; + } + + let rootDict; + + try { + rootDict = dict.get("Root"); + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + continue; + } + + if (!(0, _primitives.isDict)(rootDict) || !rootDict.has("Pages")) { + continue; + } + + if (dict.has("ID")) { + return dict; + } + + trailerDict = dict; + } + + if (trailerDict) { + return trailerDict; + } + + throw new _util.InvalidPDFException("Invalid PDF structure."); + }, + readXRef: function XRef_readXRef(recoveryMode) { + var stream = this.stream; + const startXRefParsedCache = Object.create(null); + + try { + while (this.startXRefQueue.length) { + var startXRef = this.startXRefQueue[0]; + + if (startXRefParsedCache[startXRef]) { + (0, _util.warn)("readXRef - skipping XRef table since it was already parsed."); + this.startXRefQueue.shift(); + continue; + } + + startXRefParsedCache[startXRef] = true; + stream.pos = startXRef + stream.start; + const parser = new _parser.Parser({ + lexer: new _parser.Lexer(stream), + xref: this, + allowStreams: true + }); + var obj = parser.getObj(); + var dict; + + if ((0, _primitives.isCmd)(obj, "xref")) { + dict = this.processXRefTable(parser); + + if (!this.topDict) { + this.topDict = dict; + } + + obj = dict.get("XRefStm"); + + if (Number.isInteger(obj)) { + var pos = obj; + + if (!(pos in this.xrefstms)) { + this.xrefstms[pos] = 1; + this.startXRefQueue.push(pos); + } + } + } else if (Number.isInteger(obj)) { + if (!Number.isInteger(parser.getObj()) || !(0, _primitives.isCmd)(parser.getObj(), "obj") || !(0, _primitives.isStream)(obj = parser.getObj())) { + throw new _util.FormatError("Invalid XRef stream"); + } + + dict = this.processXRefStream(obj); + + if (!this.topDict) { + this.topDict = dict; + } + + if (!dict) { + throw new _util.FormatError("Failed to read XRef stream"); + } + } else { + throw new _util.FormatError("Invalid XRef stream header"); + } + + obj = dict.get("Prev"); + + if (Number.isInteger(obj)) { + this.startXRefQueue.push(obj); + } else if ((0, _primitives.isRef)(obj)) { + this.startXRefQueue.push(obj.num); + } + + this.startXRefQueue.shift(); + } + + return this.topDict; + } catch (e) { + if (e instanceof _core_utils.MissingDataException) { + throw e; + } + + (0, _util.info)("(while reading XRef): " + e); + } + + if (recoveryMode) { + return undefined; + } + + throw new _core_utils.XRefParseException(); + }, + getEntry: function XRef_getEntry(i) { + var xrefEntry = this.entries[i]; + + if (xrefEntry && !xrefEntry.free && xrefEntry.offset) { + return xrefEntry; + } + + return null; + }, + fetchIfRef: function XRef_fetchIfRef(obj, suppressEncryption) { + if (obj instanceof _primitives.Ref) { + return this.fetch(obj, suppressEncryption); + } + + return obj; + }, + fetch: function XRef_fetch(ref, suppressEncryption) { + if (!(ref instanceof _primitives.Ref)) { + throw new Error("ref object is not a reference"); + } + + const num = ref.num; + + const cacheEntry = this._cacheMap.get(num); + + if (cacheEntry !== undefined) { + if (cacheEntry instanceof _primitives.Dict && !cacheEntry.objId) { + cacheEntry.objId = ref.toString(); + } + + return cacheEntry; + } + + let xrefEntry = this.getEntry(num); + + if (xrefEntry === null) { + this._cacheMap.set(num, xrefEntry); + + return xrefEntry; + } + + if (xrefEntry.uncompressed) { + xrefEntry = this.fetchUncompressed(ref, xrefEntry, suppressEncryption); + } else { + xrefEntry = this.fetchCompressed(ref, xrefEntry, suppressEncryption); + } + + if ((0, _primitives.isDict)(xrefEntry)) { + xrefEntry.objId = ref.toString(); + } else if ((0, _primitives.isStream)(xrefEntry)) { + xrefEntry.dict.objId = ref.toString(); + } + + return xrefEntry; + }, + + fetchUncompressed(ref, xrefEntry, suppressEncryption = false) { + var gen = ref.gen; + var num = ref.num; + + if (xrefEntry.gen !== gen) { + throw new _core_utils.XRefEntryException(`Inconsistent generation in XRef: ${ref}`); + } + + var stream = this.stream.makeSubStream(xrefEntry.offset + this.stream.start); + const parser = new _parser.Parser({ + lexer: new _parser.Lexer(stream), + xref: this, + allowStreams: true + }); + var obj1 = parser.getObj(); + var obj2 = parser.getObj(); + var obj3 = parser.getObj(); + + if (obj1 !== num || obj2 !== gen || !(obj3 instanceof _primitives.Cmd)) { + throw new _core_utils.XRefEntryException(`Bad (uncompressed) XRef entry: ${ref}`); + } + + if (obj3.cmd !== "obj") { + if (obj3.cmd.startsWith("obj")) { + num = parseInt(obj3.cmd.substring(3), 10); + + if (!Number.isNaN(num)) { + return num; + } + } + + throw new _core_utils.XRefEntryException(`Bad (uncompressed) XRef entry: ${ref}`); + } + + if (this.encrypt && !suppressEncryption) { + xrefEntry = parser.getObj(this.encrypt.createCipherTransform(num, gen)); + } else { + xrefEntry = parser.getObj(); + } + + if (!(0, _primitives.isStream)(xrefEntry)) { + this._cacheMap.set(num, xrefEntry); + } + + return xrefEntry; + }, + + fetchCompressed(ref, xrefEntry, suppressEncryption = false) { + const tableOffset = xrefEntry.offset; + const stream = this.fetch(_primitives.Ref.get(tableOffset, 0)); + + if (!(0, _primitives.isStream)(stream)) { + throw new _util.FormatError("bad ObjStm stream"); + } + + const first = stream.dict.get("First"); + const n = stream.dict.get("N"); + + if (!Number.isInteger(first) || !Number.isInteger(n)) { + throw new _util.FormatError("invalid first and n parameters for ObjStm stream"); + } + + const parser = new _parser.Parser({ + lexer: new _parser.Lexer(stream), + xref: this, + allowStreams: true + }); + const nums = new Array(n); + + for (let i = 0; i < n; ++i) { + const num = parser.getObj(); + + if (!Number.isInteger(num)) { + throw new _util.FormatError(`invalid object number in the ObjStm stream: ${num}`); + } + + const offset = parser.getObj(); + + if (!Number.isInteger(offset)) { + throw new _util.FormatError(`invalid object offset in the ObjStm stream: ${offset}`); + } + + nums[i] = num; + } + + const entries = new Array(n); + + for (let i = 0; i < n; ++i) { + const obj = parser.getObj(); + entries[i] = obj; + + if (parser.buf1 instanceof _primitives.Cmd && parser.buf1.cmd === "endobj") { + parser.shift(); + } + + if ((0, _primitives.isStream)(obj)) { + continue; + } + + const num = nums[i], + entry = this.entries[num]; + + if (entry && entry.offset === tableOffset && entry.gen === i) { + this._cacheMap.set(num, obj); + } + } + + xrefEntry = entries[xrefEntry.gen]; + + if (xrefEntry === undefined) { + throw new _core_utils.XRefEntryException(`Bad (compressed) XRef entry: ${ref}`); + } + + return xrefEntry; + }, + + async fetchIfRefAsync(obj, suppressEncryption) { + if (obj instanceof _primitives.Ref) { + return this.fetchAsync(obj, suppressEncryption); + } + + return obj; + }, + + async fetchAsync(ref, suppressEncryption) { + try { + return this.fetch(ref, suppressEncryption); + } catch (ex) { + if (!(ex instanceof _core_utils.MissingDataException)) { + throw ex; + } + + await this.pdfManager.requestRange(ex.begin, ex.end); + return this.fetchAsync(ref, suppressEncryption); + } + }, + + getCatalogObj: function XRef_getCatalogObj() { + return this.root; + } + }; + return XRef; +}(); + +exports.XRef = XRef; + +class NameOrNumberTree { + constructor(root, xref, type) { + if (this.constructor === NameOrNumberTree) { + (0, _util.unreachable)("Cannot initialize NameOrNumberTree."); + } + + this.root = root; + this.xref = xref; + this._type = type; + } + + getAll() { + const dict = Object.create(null); + + if (!this.root) { + return dict; + } + + const xref = this.xref; + const processed = new _primitives.RefSet(); + processed.put(this.root); + const queue = [this.root]; + + while (queue.length > 0) { + const obj = xref.fetchIfRef(queue.shift()); + + if (!(0, _primitives.isDict)(obj)) { + continue; + } + + if (obj.has("Kids")) { + const kids = obj.get("Kids"); + + for (let i = 0, ii = kids.length; i < ii; i++) { + const kid = kids[i]; + + if (processed.has(kid)) { + throw new _util.FormatError(`Duplicate entry in "${this._type}" tree.`); + } + + queue.push(kid); + processed.put(kid); + } + + continue; + } + + const entries = obj.get(this._type); + + if (Array.isArray(entries)) { + for (let i = 0, ii = entries.length; i < ii; i += 2) { + dict[xref.fetchIfRef(entries[i])] = xref.fetchIfRef(entries[i + 1]); + } + } + } + + return dict; + } + + get(key) { + if (!this.root) { + return null; + } + + const xref = this.xref; + let kidsOrEntries = xref.fetchIfRef(this.root); + let loopCount = 0; + const MAX_LEVELS = 10; + + while (kidsOrEntries.has("Kids")) { + if (++loopCount > MAX_LEVELS) { + (0, _util.warn)(`Search depth limit reached for "${this._type}" tree.`); + return null; + } + + const kids = kidsOrEntries.get("Kids"); + + if (!Array.isArray(kids)) { + return null; + } + + let l = 0, + r = kids.length - 1; + + while (l <= r) { + const m = l + r >> 1; + const kid = xref.fetchIfRef(kids[m]); + const limits = kid.get("Limits"); + + if (key < xref.fetchIfRef(limits[0])) { + r = m - 1; + } else if (key > xref.fetchIfRef(limits[1])) { + l = m + 1; + } else { + kidsOrEntries = xref.fetchIfRef(kids[m]); + break; + } + } + + if (l > r) { + return null; + } + } + + const entries = kidsOrEntries.get(this._type); + + if (Array.isArray(entries)) { + let l = 0, + r = entries.length - 2; + + while (l <= r) { + const tmp = l + r >> 1, + m = tmp + (tmp & 1); + const currentKey = xref.fetchIfRef(entries[m]); + + if (key < currentKey) { + r = m - 2; + } else if (key > currentKey) { + l = m + 2; + } else { + return xref.fetchIfRef(entries[m + 1]); + } + } + + (0, _util.info)(`Falling back to an exhaustive search, for key "${key}", ` + `in "${this._type}" tree.`); + + for (let m = 0, mm = entries.length; m < mm; m += 2) { + const currentKey = xref.fetchIfRef(entries[m]); + + if (currentKey === key) { + (0, _util.warn)(`The "${key}" key was found at an incorrect, ` + `i.e. out-of-order, position in "${this._type}" tree.`); + return xref.fetchIfRef(entries[m + 1]); + } + } + } + + return null; + } + +} + +class NameTree extends NameOrNumberTree { + constructor(root, xref) { + super(root, xref, "Names"); + } + +} + +class NumberTree extends NameOrNumberTree { + constructor(root, xref) { + super(root, xref, "Nums"); + } + +} + +var FileSpec = function FileSpecClosure() { + function FileSpec(root, xref) { + if (!root || !(0, _primitives.isDict)(root)) { + return; + } + + this.xref = xref; + this.root = root; + + if (root.has("FS")) { + this.fs = root.get("FS"); + } + + this.description = root.has("Desc") ? (0, _util.stringToPDFString)(root.get("Desc")) : ""; + + if (root.has("RF")) { + (0, _util.warn)("Related file specifications are not supported"); + } + + this.contentAvailable = true; + + if (!root.has("EF")) { + this.contentAvailable = false; + (0, _util.warn)("Non-embedded file specifications are not supported"); + } + } + + function pickPlatformItem(dict) { + if (dict.has("UF")) { + return dict.get("UF"); + } else if (dict.has("F")) { + return dict.get("F"); + } else if (dict.has("Unix")) { + return dict.get("Unix"); + } else if (dict.has("Mac")) { + return dict.get("Mac"); + } else if (dict.has("DOS")) { + return dict.get("DOS"); + } + + return null; + } + + FileSpec.prototype = { + get filename() { + if (!this._filename && this.root) { + var filename = pickPlatformItem(this.root) || "unnamed"; + this._filename = (0, _util.stringToPDFString)(filename).replace(/\\\\/g, "\\").replace(/\\\//g, "/").replace(/\\/g, "/"); + } + + return this._filename; + }, + + get content() { + if (!this.contentAvailable) { + return null; + } + + if (!this.contentRef && this.root) { + this.contentRef = pickPlatformItem(this.root.get("EF")); + } + + var content = null; + + if (this.contentRef) { + var xref = this.xref; + var fileObj = xref.fetchIfRef(this.contentRef); + + if (fileObj && (0, _primitives.isStream)(fileObj)) { + content = fileObj.getBytes(); + } else { + (0, _util.warn)("Embedded file specification points to non-existing/invalid " + "content"); + } + } else { + (0, _util.warn)("Embedded file specification does not have a content"); + } + + return content; + }, + + get serializable() { + return { + filename: this.filename, + content: this.content + }; + } + + }; + return FileSpec; +}(); + +exports.FileSpec = FileSpec; + +const ObjectLoader = function () { + function mayHaveChildren(value) { + return value instanceof _primitives.Ref || value instanceof _primitives.Dict || Array.isArray(value) || (0, _primitives.isStream)(value); + } + + function addChildren(node, nodesToVisit) { + if (node instanceof _primitives.Dict || (0, _primitives.isStream)(node)) { + const dict = node instanceof _primitives.Dict ? node : node.dict; + const dictKeys = dict.getKeys(); + + for (let i = 0, ii = dictKeys.length; i < ii; i++) { + const rawValue = dict.getRaw(dictKeys[i]); + + if (mayHaveChildren(rawValue)) { + nodesToVisit.push(rawValue); + } + } + } else if (Array.isArray(node)) { + for (let i = 0, ii = node.length; i < ii; i++) { + const value = node[i]; + + if (mayHaveChildren(value)) { + nodesToVisit.push(value); + } + } + } + } + + function ObjectLoader(dict, keys, xref) { + this.dict = dict; + this.keys = keys; + this.xref = xref; + this.refSet = null; + } + + ObjectLoader.prototype = { + async load() { + if (!this.xref.stream.allChunksLoaded || this.xref.stream.allChunksLoaded()) { + return undefined; + } + + const { + keys, + dict + } = this; + this.refSet = new _primitives.RefSet(); + const nodesToVisit = []; + + for (let i = 0, ii = keys.length; i < ii; i++) { + const rawValue = dict.getRaw(keys[i]); + + if (rawValue !== undefined) { + nodesToVisit.push(rawValue); + } + } + + return this._walk(nodesToVisit); + }, + + async _walk(nodesToVisit) { + const nodesToRevisit = []; + const pendingRequests = []; + + while (nodesToVisit.length) { + let currentNode = nodesToVisit.pop(); + + if (currentNode instanceof _primitives.Ref) { + if (this.refSet.has(currentNode)) { + continue; + } + + try { + this.refSet.put(currentNode); + currentNode = this.xref.fetch(currentNode); + } catch (ex) { + if (!(ex instanceof _core_utils.MissingDataException)) { + throw ex; + } + + nodesToRevisit.push(currentNode); + pendingRequests.push({ + begin: ex.begin, + end: ex.end + }); + } + } + + if (currentNode && currentNode.getBaseStreams) { + const baseStreams = currentNode.getBaseStreams(); + let foundMissingData = false; + + for (let i = 0, ii = baseStreams.length; i < ii; i++) { + const stream = baseStreams[i]; + + if (stream.allChunksLoaded && !stream.allChunksLoaded()) { + foundMissingData = true; + pendingRequests.push({ + begin: stream.start, + end: stream.end + }); + } + } + + if (foundMissingData) { + nodesToRevisit.push(currentNode); + } + } + + addChildren(currentNode, nodesToVisit); + } + + if (pendingRequests.length) { + await this.xref.stream.manager.requestRanges(pendingRequests); + + for (let i = 0, ii = nodesToRevisit.length; i < ii; i++) { + const node = nodesToRevisit[i]; + + if (node instanceof _primitives.Ref) { + this.refSet.remove(node); + } + } + + return this._walk(nodesToRevisit); + } + + this.refSet = null; + return undefined; + } + + }; + return ObjectLoader; +}(); + +exports.ObjectLoader = ObjectLoader; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Parser = exports.Linearization = exports.Lexer = void 0; + +var _stream = __w_pdfjs_require__(12); + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +var _core_utils = __w_pdfjs_require__(8); + +var _ccitt_stream = __w_pdfjs_require__(13); + +var _jbig2_stream = __w_pdfjs_require__(15); + +var _jpeg_stream = __w_pdfjs_require__(18); + +var _jpx_stream = __w_pdfjs_require__(20); + +const MAX_LENGTH_TO_CACHE = 1000; +const MAX_ADLER32_LENGTH = 5552; + +function computeAdler32(bytes) { + const bytesLength = bytes.length; + let a = 1, + b = 0; + + for (let i = 0; i < bytesLength; ++i) { + a += bytes[i] & 0xff; + b += a; + } + + return b % 65521 << 16 | a % 65521; +} + +class Parser { + constructor({ + lexer, + xref, + allowStreams = false, + recoveryMode = false + }) { + this.lexer = lexer; + this.xref = xref; + this.allowStreams = allowStreams; + this.recoveryMode = recoveryMode; + this.imageCache = Object.create(null); + this.refill(); + } + + refill() { + this.buf1 = this.lexer.getObj(); + this.buf2 = this.lexer.getObj(); + } + + shift() { + if (this.buf2 instanceof _primitives.Cmd && this.buf2.cmd === "ID") { + this.buf1 = this.buf2; + this.buf2 = null; + } else { + this.buf1 = this.buf2; + this.buf2 = this.lexer.getObj(); + } + } + + tryShift() { + try { + this.shift(); + return true; + } catch (e) { + if (e instanceof _core_utils.MissingDataException) { + throw e; + } + + return false; + } + } + + getObj(cipherTransform = null) { + const buf1 = this.buf1; + this.shift(); + + if (buf1 instanceof _primitives.Cmd) { + switch (buf1.cmd) { + case "BI": + return this.makeInlineImage(cipherTransform); + + case "[": + const array = []; + + while (!(0, _primitives.isCmd)(this.buf1, "]") && !(0, _primitives.isEOF)(this.buf1)) { + array.push(this.getObj(cipherTransform)); + } + + if ((0, _primitives.isEOF)(this.buf1)) { + if (!this.recoveryMode) { + throw new _util.FormatError("End of file inside array"); + } + + return array; + } + + this.shift(); + return array; + + case "<<": + const dict = new _primitives.Dict(this.xref); + + while (!(0, _primitives.isCmd)(this.buf1, ">>") && !(0, _primitives.isEOF)(this.buf1)) { + if (!(0, _primitives.isName)(this.buf1)) { + (0, _util.info)("Malformed dictionary: key must be a name object"); + this.shift(); + continue; + } + + const key = this.buf1.name; + this.shift(); + + if ((0, _primitives.isEOF)(this.buf1)) { + break; + } + + dict.set(key, this.getObj(cipherTransform)); + } + + if ((0, _primitives.isEOF)(this.buf1)) { + if (!this.recoveryMode) { + throw new _util.FormatError("End of file inside dictionary"); + } + + return dict; + } + + if ((0, _primitives.isCmd)(this.buf2, "stream")) { + return this.allowStreams ? this.makeStream(dict, cipherTransform) : dict; + } + + this.shift(); + return dict; + + default: + return buf1; + } + } + + if (Number.isInteger(buf1)) { + if (Number.isInteger(this.buf1) && (0, _primitives.isCmd)(this.buf2, "R")) { + const ref = _primitives.Ref.get(buf1, this.buf1); + + this.shift(); + this.shift(); + return ref; + } + + return buf1; + } + + if (typeof buf1 === "string") { + if (cipherTransform) { + return cipherTransform.decryptString(buf1); + } + + return buf1; + } + + return buf1; + } + + findDefaultInlineStreamEnd(stream) { + const E = 0x45, + I = 0x49, + SPACE = 0x20, + LF = 0xa, + CR = 0xd; + const n = 10, + NUL = 0x0; + const startPos = stream.pos; + let state = 0, + ch, + maybeEIPos; + + while ((ch = stream.getByte()) !== -1) { + if (state === 0) { + state = ch === E ? 1 : 0; + } else if (state === 1) { + state = ch === I ? 2 : 0; + } else { + (0, _util.assert)(state === 2, "findDefaultInlineStreamEnd - invalid state."); + + if (ch === SPACE || ch === LF || ch === CR) { + maybeEIPos = stream.pos; + const followingBytes = stream.peekBytes(n); + + for (let i = 0, ii = followingBytes.length; i < ii; i++) { + ch = followingBytes[i]; + + if (ch === NUL && followingBytes[i + 1] !== NUL) { + continue; + } + + if (ch !== LF && ch !== CR && (ch < SPACE || ch > 0x7f)) { + state = 0; + break; + } + } + + if (state === 2) { + break; + } + } else { + state = 0; + } + } + } + + if (ch === -1) { + (0, _util.warn)("findDefaultInlineStreamEnd: " + "Reached the end of the stream without finding a valid EI marker"); + + if (maybeEIPos) { + (0, _util.warn)('... trying to recover by using the last "EI" occurrence.'); + stream.skip(-(stream.pos - maybeEIPos)); + } + } + + let endOffset = 4; + stream.skip(-endOffset); + ch = stream.peekByte(); + stream.skip(endOffset); + + if (!(0, _core_utils.isWhiteSpace)(ch)) { + endOffset--; + } + + return stream.pos - endOffset - startPos; + } + + findDCTDecodeInlineStreamEnd(stream) { + const startPos = stream.pos; + let foundEOI = false, + b, + markerLength; + + while ((b = stream.getByte()) !== -1) { + if (b !== 0xff) { + continue; + } + + switch (stream.getByte()) { + case 0x00: + break; + + case 0xff: + stream.skip(-1); + break; + + case 0xd9: + foundEOI = true; + break; + + case 0xc0: + case 0xc1: + case 0xc2: + case 0xc3: + case 0xc5: + case 0xc6: + case 0xc7: + case 0xc9: + case 0xca: + case 0xcb: + case 0xcd: + case 0xce: + case 0xcf: + case 0xc4: + case 0xcc: + case 0xda: + case 0xdb: + case 0xdc: + case 0xdd: + case 0xde: + case 0xdf: + case 0xe0: + case 0xe1: + case 0xe2: + case 0xe3: + case 0xe4: + case 0xe5: + case 0xe6: + case 0xe7: + case 0xe8: + case 0xe9: + case 0xea: + case 0xeb: + case 0xec: + case 0xed: + case 0xee: + case 0xef: + case 0xfe: + markerLength = stream.getUint16(); + + if (markerLength > 2) { + stream.skip(markerLength - 2); + } else { + stream.skip(-2); + } + + break; + } + + if (foundEOI) { + break; + } + } + + const length = stream.pos - startPos; + + if (b === -1) { + (0, _util.warn)("Inline DCTDecode image stream: " + "EOI marker not found, searching for /EI/ instead."); + stream.skip(-length); + return this.findDefaultInlineStreamEnd(stream); + } + + this.inlineStreamSkipEI(stream); + return length; + } + + findASCII85DecodeInlineStreamEnd(stream) { + const TILDE = 0x7e, + GT = 0x3e; + const startPos = stream.pos; + let ch; + + while ((ch = stream.getByte()) !== -1) { + if (ch === TILDE) { + const tildePos = stream.pos; + ch = stream.peekByte(); + + while ((0, _core_utils.isWhiteSpace)(ch)) { + stream.skip(); + ch = stream.peekByte(); + } + + if (ch === GT) { + stream.skip(); + break; + } + + if (stream.pos > tildePos) { + const maybeEI = stream.peekBytes(2); + + if (maybeEI[0] === 0x45 && maybeEI[1] === 0x49) { + break; + } + } + } + } + + const length = stream.pos - startPos; + + if (ch === -1) { + (0, _util.warn)("Inline ASCII85Decode image stream: " + "EOD marker not found, searching for /EI/ instead."); + stream.skip(-length); + return this.findDefaultInlineStreamEnd(stream); + } + + this.inlineStreamSkipEI(stream); + return length; + } + + findASCIIHexDecodeInlineStreamEnd(stream) { + const GT = 0x3e; + const startPos = stream.pos; + let ch; + + while ((ch = stream.getByte()) !== -1) { + if (ch === GT) { + break; + } + } + + const length = stream.pos - startPos; + + if (ch === -1) { + (0, _util.warn)("Inline ASCIIHexDecode image stream: " + "EOD marker not found, searching for /EI/ instead."); + stream.skip(-length); + return this.findDefaultInlineStreamEnd(stream); + } + + this.inlineStreamSkipEI(stream); + return length; + } + + inlineStreamSkipEI(stream) { + const E = 0x45, + I = 0x49; + let state = 0, + ch; + + while ((ch = stream.getByte()) !== -1) { + if (state === 0) { + state = ch === E ? 1 : 0; + } else if (state === 1) { + state = ch === I ? 2 : 0; + } else if (state === 2) { + break; + } + } + } + + makeInlineImage(cipherTransform) { + const lexer = this.lexer; + const stream = lexer.stream; + const dict = new _primitives.Dict(this.xref); + let dictLength; + + while (!(0, _primitives.isCmd)(this.buf1, "ID") && !(0, _primitives.isEOF)(this.buf1)) { + if (!(0, _primitives.isName)(this.buf1)) { + throw new _util.FormatError("Dictionary key must be a name object"); + } + + const key = this.buf1.name; + this.shift(); + + if ((0, _primitives.isEOF)(this.buf1)) { + break; + } + + dict.set(key, this.getObj(cipherTransform)); + } + + if (lexer.beginInlineImagePos !== -1) { + dictLength = stream.pos - lexer.beginInlineImagePos; + } + + const filter = dict.get("Filter", "F"); + let filterName; + + if ((0, _primitives.isName)(filter)) { + filterName = filter.name; + } else if (Array.isArray(filter)) { + const filterZero = this.xref.fetchIfRef(filter[0]); + + if ((0, _primitives.isName)(filterZero)) { + filterName = filterZero.name; + } + } + + const startPos = stream.pos; + let length; + + if (filterName === "DCTDecode" || filterName === "DCT") { + length = this.findDCTDecodeInlineStreamEnd(stream); + } else if (filterName === "ASCII85Decode" || filterName === "A85") { + length = this.findASCII85DecodeInlineStreamEnd(stream); + } else if (filterName === "ASCIIHexDecode" || filterName === "AHx") { + length = this.findASCIIHexDecodeInlineStreamEnd(stream); + } else { + length = this.findDefaultInlineStreamEnd(stream); + } + + let imageStream = stream.makeSubStream(startPos, length, dict); + let cacheKey; + + if (length < MAX_LENGTH_TO_CACHE && dictLength < MAX_ADLER32_LENGTH) { + const imageBytes = imageStream.getBytes(); + imageStream.reset(); + const initialStreamPos = stream.pos; + stream.pos = lexer.beginInlineImagePos; + const dictBytes = stream.getBytes(dictLength); + stream.pos = initialStreamPos; + cacheKey = computeAdler32(imageBytes) + "_" + computeAdler32(dictBytes); + const cacheEntry = this.imageCache[cacheKey]; + + if (cacheEntry !== undefined) { + this.buf2 = _primitives.Cmd.get("EI"); + this.shift(); + cacheEntry.reset(); + return cacheEntry; + } + } + + if (cipherTransform) { + imageStream = cipherTransform.createStream(imageStream, length); + } + + imageStream = this.filter(imageStream, dict, length); + imageStream.dict = dict; + + if (cacheKey !== undefined) { + imageStream.cacheKey = `inline_${length}_${cacheKey}`; + this.imageCache[cacheKey] = imageStream; + } + + this.buf2 = _primitives.Cmd.get("EI"); + this.shift(); + return imageStream; + } + + _findStreamLength(startPos, signature) { + const { + stream + } = this.lexer; + stream.pos = startPos; + const SCAN_BLOCK_LENGTH = 2048; + const signatureLength = signature.length; + + while (stream.pos < stream.end) { + const scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH); + const scanLength = scanBytes.length - signatureLength; + + if (scanLength <= 0) { + break; + } + + let pos = 0; + + while (pos < scanLength) { + let j = 0; + + while (j < signatureLength && scanBytes[pos + j] === signature[j]) { + j++; + } + + if (j >= signatureLength) { + stream.pos += pos; + return stream.pos - startPos; + } + + pos++; + } + + stream.pos += scanLength; + } + + return -1; + } + + makeStream(dict, cipherTransform) { + const lexer = this.lexer; + let stream = lexer.stream; + lexer.skipToNextLine(); + const startPos = stream.pos - 1; + let length = dict.get("Length"); + + if (!Number.isInteger(length)) { + (0, _util.info)(`Bad length "${length}" in stream`); + length = 0; + } + + stream.pos = startPos + length; + lexer.nextChar(); + + if (this.tryShift() && (0, _primitives.isCmd)(this.buf2, "endstream")) { + this.shift(); + } else { + const ENDSTREAM_SIGNATURE = new Uint8Array([0x65, 0x6E, 0x64, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6D]); + + let actualLength = this._findStreamLength(startPos, ENDSTREAM_SIGNATURE); + + if (actualLength < 0) { + const MAX_TRUNCATION = 1; + + for (let i = 1; i <= MAX_TRUNCATION; i++) { + const end = ENDSTREAM_SIGNATURE.length - i; + const TRUNCATED_SIGNATURE = ENDSTREAM_SIGNATURE.slice(0, end); + + const maybeLength = this._findStreamLength(startPos, TRUNCATED_SIGNATURE); + + if (maybeLength >= 0) { + const lastByte = stream.peekBytes(end + 1)[end]; + + if (!(0, _core_utils.isWhiteSpace)(lastByte)) { + break; + } + + (0, _util.info)(`Found "${(0, _util.bytesToString)(TRUNCATED_SIGNATURE)}" when ` + "searching for endstream command."); + actualLength = maybeLength; + break; + } + } + + if (actualLength < 0) { + throw new _util.FormatError("Missing endstream command."); + } + } + + length = actualLength; + lexer.nextChar(); + this.shift(); + this.shift(); + } + + this.shift(); + stream = stream.makeSubStream(startPos, length, dict); + + if (cipherTransform) { + stream = cipherTransform.createStream(stream, length); + } + + stream = this.filter(stream, dict, length); + stream.dict = dict; + return stream; + } + + filter(stream, dict, length) { + let filter = dict.get("Filter", "F"); + let params = dict.get("DecodeParms", "DP"); + + if ((0, _primitives.isName)(filter)) { + if (Array.isArray(params)) { + (0, _util.warn)("/DecodeParms should not contain an Array, " + "when /Filter contains a Name."); + } + + return this.makeFilter(stream, filter.name, length, params); + } + + let maybeLength = length; + + if (Array.isArray(filter)) { + const filterArray = filter; + const paramsArray = params; + + for (let i = 0, ii = filterArray.length; i < ii; ++i) { + filter = this.xref.fetchIfRef(filterArray[i]); + + if (!(0, _primitives.isName)(filter)) { + throw new _util.FormatError(`Bad filter name "${filter}"`); + } + + params = null; + + if (Array.isArray(paramsArray) && i in paramsArray) { + params = this.xref.fetchIfRef(paramsArray[i]); + } + + stream = this.makeFilter(stream, filter.name, maybeLength, params); + maybeLength = null; + } + } + + return stream; + } + + makeFilter(stream, name, maybeLength, params) { + if (maybeLength === 0) { + (0, _util.warn)(`Empty "${name}" stream.`); + return new _stream.NullStream(); + } + + try { + const xrefStreamStats = this.xref.stats.streamTypes; + + if (name === "FlateDecode" || name === "Fl") { + xrefStreamStats[_util.StreamType.FLATE] = true; + + if (params) { + return new _stream.PredictorStream(new _stream.FlateStream(stream, maybeLength), maybeLength, params); + } + + return new _stream.FlateStream(stream, maybeLength); + } + + if (name === "LZWDecode" || name === "LZW") { + xrefStreamStats[_util.StreamType.LZW] = true; + let earlyChange = 1; + + if (params) { + if (params.has("EarlyChange")) { + earlyChange = params.get("EarlyChange"); + } + + return new _stream.PredictorStream(new _stream.LZWStream(stream, maybeLength, earlyChange), maybeLength, params); + } + + return new _stream.LZWStream(stream, maybeLength, earlyChange); + } + + if (name === "DCTDecode" || name === "DCT") { + xrefStreamStats[_util.StreamType.DCT] = true; + return new _jpeg_stream.JpegStream(stream, maybeLength, stream.dict, params); + } + + if (name === "JPXDecode" || name === "JPX") { + xrefStreamStats[_util.StreamType.JPX] = true; + return new _jpx_stream.JpxStream(stream, maybeLength, stream.dict, params); + } + + if (name === "ASCII85Decode" || name === "A85") { + xrefStreamStats[_util.StreamType.A85] = true; + return new _stream.Ascii85Stream(stream, maybeLength); + } + + if (name === "ASCIIHexDecode" || name === "AHx") { + xrefStreamStats[_util.StreamType.AHX] = true; + return new _stream.AsciiHexStream(stream, maybeLength); + } + + if (name === "CCITTFaxDecode" || name === "CCF") { + xrefStreamStats[_util.StreamType.CCF] = true; + return new _ccitt_stream.CCITTFaxStream(stream, maybeLength, params); + } + + if (name === "RunLengthDecode" || name === "RL") { + xrefStreamStats[_util.StreamType.RLX] = true; + return new _stream.RunLengthStream(stream, maybeLength); + } + + if (name === "JBIG2Decode") { + xrefStreamStats[_util.StreamType.JBIG] = true; + return new _jbig2_stream.Jbig2Stream(stream, maybeLength, stream.dict, params); + } + + (0, _util.warn)(`Filter "${name}" is not supported.`); + return stream; + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + (0, _util.warn)(`Invalid stream: "${ex}"`); + return new _stream.NullStream(); + } + } + +} + +exports.Parser = Parser; +const specialChars = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + +function toHexDigit(ch) { + if (ch >= 0x30 && ch <= 0x39) { + return ch & 0x0f; + } + + if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { + return (ch & 0x0f) + 9; + } + + return -1; +} + +class Lexer { + constructor(stream, knownCommands = null) { + this.stream = stream; + this.nextChar(); + this.strBuf = []; + this.knownCommands = knownCommands; + this._hexStringNumWarn = 0; + this.beginInlineImagePos = -1; + } + + nextChar() { + return this.currentChar = this.stream.getByte(); + } + + peekChar() { + return this.stream.peekByte(); + } + + getNumber() { + let ch = this.currentChar; + let eNotation = false; + let divideBy = 0; + let sign = 0; + + if (ch === 0x2d) { + sign = -1; + ch = this.nextChar(); + + if (ch === 0x2d) { + ch = this.nextChar(); + } + } else if (ch === 0x2b) { + sign = 1; + ch = this.nextChar(); + } + + if (ch === 0x0a || ch === 0x0d) { + do { + ch = this.nextChar(); + } while (ch === 0x0a || ch === 0x0d); + } + + if (ch === 0x2e) { + divideBy = 10; + ch = this.nextChar(); + } + + if (ch < 0x30 || ch > 0x39) { + if (divideBy === 10 && sign === 0 && ((0, _core_utils.isWhiteSpace)(ch) || ch === -1)) { + (0, _util.warn)("Lexer.getNumber - treating a single decimal point as zero."); + return 0; + } + + throw new _util.FormatError(`Invalid number: ${String.fromCharCode(ch)} (charCode ${ch})`); + } + + sign = sign || 1; + let baseValue = ch - 0x30; + let powerValue = 0; + let powerValueSign = 1; + + while ((ch = this.nextChar()) >= 0) { + if (ch >= 0x30 && ch <= 0x39) { + const currentDigit = ch - 0x30; + + if (eNotation) { + powerValue = powerValue * 10 + currentDigit; + } else { + if (divideBy !== 0) { + divideBy *= 10; + } + + baseValue = baseValue * 10 + currentDigit; + } + } else if (ch === 0x2e) { + if (divideBy === 0) { + divideBy = 1; + } else { + break; + } + } else if (ch === 0x2d) { + (0, _util.warn)("Badly formatted number: minus sign in the middle"); + } else if (ch === 0x45 || ch === 0x65) { + ch = this.peekChar(); + + if (ch === 0x2b || ch === 0x2d) { + powerValueSign = ch === 0x2d ? -1 : 1; + this.nextChar(); + } else if (ch < 0x30 || ch > 0x39) { + break; + } + + eNotation = true; + } else { + break; + } + } + + if (divideBy !== 0) { + baseValue /= divideBy; + } + + if (eNotation) { + baseValue *= 10 ** (powerValueSign * powerValue); + } + + return sign * baseValue; + } + + getString() { + let numParen = 1; + let done = false; + const strBuf = this.strBuf; + strBuf.length = 0; + let ch = this.nextChar(); + + while (true) { + let charBuffered = false; + + switch (ch | 0) { + case -1: + (0, _util.warn)("Unterminated string"); + done = true; + break; + + case 0x28: + ++numParen; + strBuf.push("("); + break; + + case 0x29: + if (--numParen === 0) { + this.nextChar(); + done = true; + } else { + strBuf.push(")"); + } + + break; + + case 0x5c: + ch = this.nextChar(); + + switch (ch) { + case -1: + (0, _util.warn)("Unterminated string"); + done = true; + break; + + case 0x6e: + strBuf.push("\n"); + break; + + case 0x72: + strBuf.push("\r"); + break; + + case 0x74: + strBuf.push("\t"); + break; + + case 0x62: + strBuf.push("\b"); + break; + + case 0x66: + strBuf.push("\f"); + break; + + case 0x5c: + case 0x28: + case 0x29: + strBuf.push(String.fromCharCode(ch)); + break; + + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + let x = ch & 0x0f; + ch = this.nextChar(); + charBuffered = true; + + if (ch >= 0x30 && ch <= 0x37) { + x = (x << 3) + (ch & 0x0f); + ch = this.nextChar(); + + if (ch >= 0x30 && ch <= 0x37) { + charBuffered = false; + x = (x << 3) + (ch & 0x0f); + } + } + + strBuf.push(String.fromCharCode(x)); + break; + + case 0x0d: + if (this.peekChar() === 0x0a) { + this.nextChar(); + } + + break; + + case 0x0a: + break; + + default: + strBuf.push(String.fromCharCode(ch)); + break; + } + + break; + + default: + strBuf.push(String.fromCharCode(ch)); + break; + } + + if (done) { + break; + } + + if (!charBuffered) { + ch = this.nextChar(); + } + } + + return strBuf.join(""); + } + + getName() { + let ch, previousCh; + const strBuf = this.strBuf; + strBuf.length = 0; + + while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) { + if (ch === 0x23) { + ch = this.nextChar(); + + if (specialChars[ch]) { + (0, _util.warn)("Lexer_getName: " + "NUMBER SIGN (#) should be followed by a hexadecimal number."); + strBuf.push("#"); + break; + } + + const x = toHexDigit(ch); + + if (x !== -1) { + previousCh = ch; + ch = this.nextChar(); + const x2 = toHexDigit(ch); + + if (x2 === -1) { + (0, _util.warn)(`Lexer_getName: Illegal digit (${String.fromCharCode(ch)}) ` + "in hexadecimal number."); + strBuf.push("#", String.fromCharCode(previousCh)); + + if (specialChars[ch]) { + break; + } + + strBuf.push(String.fromCharCode(ch)); + continue; + } + + strBuf.push(String.fromCharCode(x << 4 | x2)); + } else { + strBuf.push("#", String.fromCharCode(ch)); + } + } else { + strBuf.push(String.fromCharCode(ch)); + } + } + + if (strBuf.length > 127) { + (0, _util.warn)(`Name token is longer than allowed by the spec: ${strBuf.length}`); + } + + return _primitives.Name.get(strBuf.join("")); + } + + _hexStringWarn(ch) { + const MAX_HEX_STRING_NUM_WARN = 5; + + if (this._hexStringNumWarn++ === MAX_HEX_STRING_NUM_WARN) { + (0, _util.warn)("getHexString - ignoring additional invalid characters."); + return; + } + + if (this._hexStringNumWarn > MAX_HEX_STRING_NUM_WARN) { + return; + } + + (0, _util.warn)(`getHexString - ignoring invalid character: ${ch}`); + } + + getHexString() { + const strBuf = this.strBuf; + strBuf.length = 0; + let ch = this.currentChar; + let isFirstHex = true; + let firstDigit, secondDigit; + this._hexStringNumWarn = 0; + + while (true) { + if (ch < 0) { + (0, _util.warn)("Unterminated hex string"); + break; + } else if (ch === 0x3e) { + this.nextChar(); + break; + } else if (specialChars[ch] === 1) { + ch = this.nextChar(); + continue; + } else { + if (isFirstHex) { + firstDigit = toHexDigit(ch); + + if (firstDigit === -1) { + this._hexStringWarn(ch); + + ch = this.nextChar(); + continue; + } + } else { + secondDigit = toHexDigit(ch); + + if (secondDigit === -1) { + this._hexStringWarn(ch); + + ch = this.nextChar(); + continue; + } + + strBuf.push(String.fromCharCode(firstDigit << 4 | secondDigit)); + } + + isFirstHex = !isFirstHex; + ch = this.nextChar(); + } + } + + return strBuf.join(""); + } + + getObj() { + let comment = false; + let ch = this.currentChar; + + while (true) { + if (ch < 0) { + return _primitives.EOF; + } + + if (comment) { + if (ch === 0x0a || ch === 0x0d) { + comment = false; + } + } else if (ch === 0x25) { + comment = true; + } else if (specialChars[ch] !== 1) { + break; + } + + ch = this.nextChar(); + } + + switch (ch | 0) { + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x2b: + case 0x2d: + case 0x2e: + return this.getNumber(); + + case 0x28: + return this.getString(); + + case 0x2f: + return this.getName(); + + case 0x5b: + this.nextChar(); + return _primitives.Cmd.get("["); + + case 0x5d: + this.nextChar(); + return _primitives.Cmd.get("]"); + + case 0x3c: + ch = this.nextChar(); + + if (ch === 0x3c) { + this.nextChar(); + return _primitives.Cmd.get("<<"); + } + + return this.getHexString(); + + case 0x3e: + ch = this.nextChar(); + + if (ch === 0x3e) { + this.nextChar(); + return _primitives.Cmd.get(">>"); + } + + return _primitives.Cmd.get(">"); + + case 0x7b: + this.nextChar(); + return _primitives.Cmd.get("{"); + + case 0x7d: + this.nextChar(); + return _primitives.Cmd.get("}"); + + case 0x29: + this.nextChar(); + throw new _util.FormatError(`Illegal character: ${ch}`); + } + + let str = String.fromCharCode(ch); + const knownCommands = this.knownCommands; + let knownCommandFound = knownCommands && knownCommands[str] !== undefined; + + while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) { + const possibleCommand = str + String.fromCharCode(ch); + + if (knownCommandFound && knownCommands[possibleCommand] === undefined) { + break; + } + + if (str.length === 128) { + throw new _util.FormatError(`Command token too long: ${str.length}`); + } + + str = possibleCommand; + knownCommandFound = knownCommands && knownCommands[str] !== undefined; + } + + if (str === "true") { + return true; + } + + if (str === "false") { + return false; + } + + if (str === "null") { + return null; + } + + if (str === "BI") { + this.beginInlineImagePos = this.stream.pos; + } + + return _primitives.Cmd.get(str); + } + + skipToNextLine() { + let ch = this.currentChar; + + while (ch >= 0) { + if (ch === 0x0d) { + ch = this.nextChar(); + + if (ch === 0x0a) { + this.nextChar(); + } + + break; + } else if (ch === 0x0a) { + this.nextChar(); + break; + } + + ch = this.nextChar(); + } + } + +} + +exports.Lexer = Lexer; + +class Linearization { + static create(stream) { + function getInt(linDict, name, allowZeroValue = false) { + const obj = linDict.get(name); + + if (Number.isInteger(obj) && (allowZeroValue ? obj >= 0 : obj > 0)) { + return obj; + } + + throw new Error(`The "${name}" parameter in the linearization ` + "dictionary is invalid."); + } + + function getHints(linDict) { + const hints = linDict.get("H"); + let hintsLength; + + if (Array.isArray(hints) && ((hintsLength = hints.length) === 2 || hintsLength === 4)) { + for (let index = 0; index < hintsLength; index++) { + const hint = hints[index]; + + if (!(Number.isInteger(hint) && hint > 0)) { + throw new Error(`Hint (${index}) in the linearization dictionary is invalid.`); + } + } + + return hints; + } + + throw new Error("Hint array in the linearization dictionary is invalid."); + } + + const parser = new Parser({ + lexer: new Lexer(stream), + xref: null + }); + const obj1 = parser.getObj(); + const obj2 = parser.getObj(); + const obj3 = parser.getObj(); + const linDict = parser.getObj(); + let obj, length; + + if (!(Number.isInteger(obj1) && Number.isInteger(obj2) && (0, _primitives.isCmd)(obj3, "obj") && (0, _primitives.isDict)(linDict) && (0, _util.isNum)(obj = linDict.get("Linearized")) && obj > 0)) { + return null; + } else if ((length = getInt(linDict, "L")) !== stream.length) { + throw new Error('The "L" parameter in the linearization dictionary ' + "does not equal the stream length."); + } + + return { + length, + hints: getHints(linDict), + objectNumberFirst: getInt(linDict, "O"), + endFirst: getInt(linDict, "E"), + numPages: getInt(linDict, "N"), + mainXRefEntriesOffset: getInt(linDict, "T"), + pageFirst: linDict.has("P") ? getInt(linDict, "P", true) : 0 + }; + } + +} + +exports.Linearization = Linearization; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.LZWStream = exports.StringStream = exports.StreamsSequenceStream = exports.Stream = exports.RunLengthStream = exports.PredictorStream = exports.NullStream = exports.FlateStream = exports.DecodeStream = exports.DecryptStream = exports.AsciiHexStream = exports.Ascii85Stream = void 0; + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +var _core_utils = __w_pdfjs_require__(8); + +var Stream = function StreamClosure() { + function Stream(arrayBuffer, start, length, dict) { + this.bytes = arrayBuffer instanceof Uint8Array ? arrayBuffer : new Uint8Array(arrayBuffer); + this.start = start || 0; + this.pos = this.start; + this.end = start + length || this.bytes.length; + this.dict = dict; + } + + Stream.prototype = { + get length() { + return this.end - this.start; + }, + + get isEmpty() { + return this.length === 0; + }, + + getByte: function Stream_getByte() { + if (this.pos >= this.end) { + return -1; + } + + return this.bytes[this.pos++]; + }, + getUint16: function Stream_getUint16() { + var b0 = this.getByte(); + var b1 = this.getByte(); + + if (b0 === -1 || b1 === -1) { + return -1; + } + + return (b0 << 8) + b1; + }, + getInt32: function Stream_getInt32() { + var b0 = this.getByte(); + var b1 = this.getByte(); + var b2 = this.getByte(); + var b3 = this.getByte(); + return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; + }, + + getBytes(length, forceClamped = false) { + var bytes = this.bytes; + var pos = this.pos; + var strEnd = this.end; + + if (!length) { + const subarray = bytes.subarray(pos, strEnd); + return forceClamped ? new Uint8ClampedArray(subarray) : subarray; + } + + var end = pos + length; + + if (end > strEnd) { + end = strEnd; + } + + this.pos = end; + const subarray = bytes.subarray(pos, end); + return forceClamped ? new Uint8ClampedArray(subarray) : subarray; + }, + + peekByte: function Stream_peekByte() { + var peekedByte = this.getByte(); + + if (peekedByte !== -1) { + this.pos--; + } + + return peekedByte; + }, + + peekBytes(length, forceClamped = false) { + var bytes = this.getBytes(length, forceClamped); + this.pos -= bytes.length; + return bytes; + }, + + getByteRange(begin, end) { + if (begin < 0) { + begin = 0; + } + + if (end > this.end) { + end = this.end; + } + + return this.bytes.subarray(begin, end); + }, + + skip: function Stream_skip(n) { + if (!n) { + n = 1; + } + + this.pos += n; + }, + reset: function Stream_reset() { + this.pos = this.start; + }, + moveStart: function Stream_moveStart() { + this.start = this.pos; + }, + makeSubStream: function Stream_makeSubStream(start, length, dict) { + return new Stream(this.bytes.buffer, start, length, dict); + } + }; + return Stream; +}(); + +exports.Stream = Stream; + +var StringStream = function StringStreamClosure() { + function StringStream(str) { + const bytes = (0, _util.stringToBytes)(str); + Stream.call(this, bytes); + } + + StringStream.prototype = Stream.prototype; + return StringStream; +}(); + +exports.StringStream = StringStream; + +var DecodeStream = function DecodeStreamClosure() { + var emptyBuffer = new Uint8Array(0); + + function DecodeStream(maybeMinBufferLength) { + this._rawMinBufferLength = maybeMinBufferLength || 0; + this.pos = 0; + this.bufferLength = 0; + this.eof = false; + this.buffer = emptyBuffer; + this.minBufferLength = 512; + + if (maybeMinBufferLength) { + while (this.minBufferLength < maybeMinBufferLength) { + this.minBufferLength *= 2; + } + } + } + + DecodeStream.prototype = { + get isEmpty() { + while (!this.eof && this.bufferLength === 0) { + this.readBlock(); + } + + return this.bufferLength === 0; + }, + + ensureBuffer: function DecodeStream_ensureBuffer(requested) { + var buffer = this.buffer; + + if (requested <= buffer.byteLength) { + return buffer; + } + + var size = this.minBufferLength; + + while (size < requested) { + size *= 2; + } + + var buffer2 = new Uint8Array(size); + buffer2.set(buffer); + return this.buffer = buffer2; + }, + getByte: function DecodeStream_getByte() { + var pos = this.pos; + + while (this.bufferLength <= pos) { + if (this.eof) { + return -1; + } + + this.readBlock(); + } + + return this.buffer[this.pos++]; + }, + getUint16: function DecodeStream_getUint16() { + var b0 = this.getByte(); + var b1 = this.getByte(); + + if (b0 === -1 || b1 === -1) { + return -1; + } + + return (b0 << 8) + b1; + }, + getInt32: function DecodeStream_getInt32() { + var b0 = this.getByte(); + var b1 = this.getByte(); + var b2 = this.getByte(); + var b3 = this.getByte(); + return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; + }, + + getBytes(length, forceClamped = false) { + var end, + pos = this.pos; + + if (length) { + this.ensureBuffer(pos + length); + end = pos + length; + + while (!this.eof && this.bufferLength < end) { + this.readBlock(); + } + + var bufEnd = this.bufferLength; + + if (end > bufEnd) { + end = bufEnd; + } + } else { + while (!this.eof) { + this.readBlock(); + } + + end = this.bufferLength; + } + + this.pos = end; + const subarray = this.buffer.subarray(pos, end); + return forceClamped && !(subarray instanceof Uint8ClampedArray) ? new Uint8ClampedArray(subarray) : subarray; + }, + + peekByte: function DecodeStream_peekByte() { + var peekedByte = this.getByte(); + + if (peekedByte !== -1) { + this.pos--; + } + + return peekedByte; + }, + + peekBytes(length, forceClamped = false) { + var bytes = this.getBytes(length, forceClamped); + this.pos -= bytes.length; + return bytes; + }, + + makeSubStream: function DecodeStream_makeSubStream(start, length, dict) { + var end = start + length; + + while (this.bufferLength <= end && !this.eof) { + this.readBlock(); + } + + return new Stream(this.buffer, start, length, dict); + }, + + getByteRange(begin, end) { + (0, _util.unreachable)("Should not call DecodeStream.getByteRange"); + }, + + skip: function DecodeStream_skip(n) { + if (!n) { + n = 1; + } + + this.pos += n; + }, + reset: function DecodeStream_reset() { + this.pos = 0; + }, + getBaseStreams: function DecodeStream_getBaseStreams() { + if (this.str && this.str.getBaseStreams) { + return this.str.getBaseStreams(); + } + + return []; + } + }; + return DecodeStream; +}(); + +exports.DecodeStream = DecodeStream; + +var StreamsSequenceStream = function StreamsSequenceStreamClosure() { + function StreamsSequenceStream(streams) { + this.streams = streams; + let maybeLength = 0; + + for (let i = 0, ii = streams.length; i < ii; i++) { + const stream = streams[i]; + + if (stream instanceof DecodeStream) { + maybeLength += stream._rawMinBufferLength; + } else { + maybeLength += stream.length; + } + } + + DecodeStream.call(this, maybeLength); + } + + StreamsSequenceStream.prototype = Object.create(DecodeStream.prototype); + + StreamsSequenceStream.prototype.readBlock = function streamSequenceStreamReadBlock() { + var streams = this.streams; + + if (streams.length === 0) { + this.eof = true; + return; + } + + var stream = streams.shift(); + var chunk = stream.getBytes(); + var bufferLength = this.bufferLength; + var newLength = bufferLength + chunk.length; + var buffer = this.ensureBuffer(newLength); + buffer.set(chunk, bufferLength); + this.bufferLength = newLength; + }; + + StreamsSequenceStream.prototype.getBaseStreams = function StreamsSequenceStream_getBaseStreams() { + var baseStreams = []; + + for (var i = 0, ii = this.streams.length; i < ii; i++) { + var stream = this.streams[i]; + + if (stream.getBaseStreams) { + baseStreams.push(...stream.getBaseStreams()); + } + } + + return baseStreams; + }; + + return StreamsSequenceStream; +}(); + +exports.StreamsSequenceStream = StreamsSequenceStream; + +var FlateStream = function FlateStreamClosure() { + var codeLenCodeMap = new Int32Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); + var lengthDecode = new Int32Array([0x00003, 0x00004, 0x00005, 0x00006, 0x00007, 0x00008, 0x00009, 0x0000a, 0x1000b, 0x1000d, 0x1000f, 0x10011, 0x20013, 0x20017, 0x2001b, 0x2001f, 0x30023, 0x3002b, 0x30033, 0x3003b, 0x40043, 0x40053, 0x40063, 0x40073, 0x50083, 0x500a3, 0x500c3, 0x500e3, 0x00102, 0x00102, 0x00102]); + var distDecode = new Int32Array([0x00001, 0x00002, 0x00003, 0x00004, 0x10005, 0x10007, 0x20009, 0x2000d, 0x30011, 0x30019, 0x40021, 0x40031, 0x50041, 0x50061, 0x60081, 0x600c1, 0x70101, 0x70181, 0x80201, 0x80301, 0x90401, 0x90601, 0xa0801, 0xa0c01, 0xb1001, 0xb1801, 0xc2001, 0xc3001, 0xd4001, 0xd6001]); + var fixedLitCodeTab = [new Int32Array([0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c0, 0x70108, 0x80060, 0x80020, 0x900a0, 0x80000, 0x80080, 0x80040, 0x900e0, 0x70104, 0x80058, 0x80018, 0x90090, 0x70114, 0x80078, 0x80038, 0x900d0, 0x7010c, 0x80068, 0x80028, 0x900b0, 0x80008, 0x80088, 0x80048, 0x900f0, 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c8, 0x7010a, 0x80064, 0x80024, 0x900a8, 0x80004, 0x80084, 0x80044, 0x900e8, 0x70106, 0x8005c, 0x8001c, 0x90098, 0x70116, 0x8007c, 0x8003c, 0x900d8, 0x7010e, 0x8006c, 0x8002c, 0x900b8, 0x8000c, 0x8008c, 0x8004c, 0x900f8, 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c4, 0x70109, 0x80062, 0x80022, 0x900a4, 0x80002, 0x80082, 0x80042, 0x900e4, 0x70105, 0x8005a, 0x8001a, 0x90094, 0x70115, 0x8007a, 0x8003a, 0x900d4, 0x7010d, 0x8006a, 0x8002a, 0x900b4, 0x8000a, 0x8008a, 0x8004a, 0x900f4, 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cc, 0x7010b, 0x80066, 0x80026, 0x900ac, 0x80006, 0x80086, 0x80046, 0x900ec, 0x70107, 0x8005e, 0x8001e, 0x9009c, 0x70117, 0x8007e, 0x8003e, 0x900dc, 0x7010f, 0x8006e, 0x8002e, 0x900bc, 0x8000e, 0x8008e, 0x8004e, 0x900fc, 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c2, 0x70108, 0x80061, 0x80021, 0x900a2, 0x80001, 0x80081, 0x80041, 0x900e2, 0x70104, 0x80059, 0x80019, 0x90092, 0x70114, 0x80079, 0x80039, 0x900d2, 0x7010c, 0x80069, 0x80029, 0x900b2, 0x80009, 0x80089, 0x80049, 0x900f2, 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900ca, 0x7010a, 0x80065, 0x80025, 0x900aa, 0x80005, 0x80085, 0x80045, 0x900ea, 0x70106, 0x8005d, 0x8001d, 0x9009a, 0x70116, 0x8007d, 0x8003d, 0x900da, 0x7010e, 0x8006d, 0x8002d, 0x900ba, 0x8000d, 0x8008d, 0x8004d, 0x900fa, 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c6, 0x70109, 0x80063, 0x80023, 0x900a6, 0x80003, 0x80083, 0x80043, 0x900e6, 0x70105, 0x8005b, 0x8001b, 0x90096, 0x70115, 0x8007b, 0x8003b, 0x900d6, 0x7010d, 0x8006b, 0x8002b, 0x900b6, 0x8000b, 0x8008b, 0x8004b, 0x900f6, 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900ce, 0x7010b, 0x80067, 0x80027, 0x900ae, 0x80007, 0x80087, 0x80047, 0x900ee, 0x70107, 0x8005f, 0x8001f, 0x9009e, 0x70117, 0x8007f, 0x8003f, 0x900de, 0x7010f, 0x8006f, 0x8002f, 0x900be, 0x8000f, 0x8008f, 0x8004f, 0x900fe, 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c1, 0x70108, 0x80060, 0x80020, 0x900a1, 0x80000, 0x80080, 0x80040, 0x900e1, 0x70104, 0x80058, 0x80018, 0x90091, 0x70114, 0x80078, 0x80038, 0x900d1, 0x7010c, 0x80068, 0x80028, 0x900b1, 0x80008, 0x80088, 0x80048, 0x900f1, 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c9, 0x7010a, 0x80064, 0x80024, 0x900a9, 0x80004, 0x80084, 0x80044, 0x900e9, 0x70106, 0x8005c, 0x8001c, 0x90099, 0x70116, 0x8007c, 0x8003c, 0x900d9, 0x7010e, 0x8006c, 0x8002c, 0x900b9, 0x8000c, 0x8008c, 0x8004c, 0x900f9, 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c5, 0x70109, 0x80062, 0x80022, 0x900a5, 0x80002, 0x80082, 0x80042, 0x900e5, 0x70105, 0x8005a, 0x8001a, 0x90095, 0x70115, 0x8007a, 0x8003a, 0x900d5, 0x7010d, 0x8006a, 0x8002a, 0x900b5, 0x8000a, 0x8008a, 0x8004a, 0x900f5, 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cd, 0x7010b, 0x80066, 0x80026, 0x900ad, 0x80006, 0x80086, 0x80046, 0x900ed, 0x70107, 0x8005e, 0x8001e, 0x9009d, 0x70117, 0x8007e, 0x8003e, 0x900dd, 0x7010f, 0x8006e, 0x8002e, 0x900bd, 0x8000e, 0x8008e, 0x8004e, 0x900fd, 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c3, 0x70108, 0x80061, 0x80021, 0x900a3, 0x80001, 0x80081, 0x80041, 0x900e3, 0x70104, 0x80059, 0x80019, 0x90093, 0x70114, 0x80079, 0x80039, 0x900d3, 0x7010c, 0x80069, 0x80029, 0x900b3, 0x80009, 0x80089, 0x80049, 0x900f3, 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900cb, 0x7010a, 0x80065, 0x80025, 0x900ab, 0x80005, 0x80085, 0x80045, 0x900eb, 0x70106, 0x8005d, 0x8001d, 0x9009b, 0x70116, 0x8007d, 0x8003d, 0x900db, 0x7010e, 0x8006d, 0x8002d, 0x900bb, 0x8000d, 0x8008d, 0x8004d, 0x900fb, 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c7, 0x70109, 0x80063, 0x80023, 0x900a7, 0x80003, 0x80083, 0x80043, 0x900e7, 0x70105, 0x8005b, 0x8001b, 0x90097, 0x70115, 0x8007b, 0x8003b, 0x900d7, 0x7010d, 0x8006b, 0x8002b, 0x900b7, 0x8000b, 0x8008b, 0x8004b, 0x900f7, 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900cf, 0x7010b, 0x80067, 0x80027, 0x900af, 0x80007, 0x80087, 0x80047, 0x900ef, 0x70107, 0x8005f, 0x8001f, 0x9009f, 0x70117, 0x8007f, 0x8003f, 0x900df, 0x7010f, 0x8006f, 0x8002f, 0x900bf, 0x8000f, 0x8008f, 0x8004f, 0x900ff]), 9]; + var fixedDistCodeTab = [new Int32Array([0x50000, 0x50010, 0x50008, 0x50018, 0x50004, 0x50014, 0x5000c, 0x5001c, 0x50002, 0x50012, 0x5000a, 0x5001a, 0x50006, 0x50016, 0x5000e, 0x00000, 0x50001, 0x50011, 0x50009, 0x50019, 0x50005, 0x50015, 0x5000d, 0x5001d, 0x50003, 0x50013, 0x5000b, 0x5001b, 0x50007, 0x50017, 0x5000f, 0x00000]), 5]; + + function FlateStream(str, maybeLength) { + this.str = str; + this.dict = str.dict; + var cmf = str.getByte(); + var flg = str.getByte(); + + if (cmf === -1 || flg === -1) { + throw new _util.FormatError(`Invalid header in flate stream: ${cmf}, ${flg}`); + } + + if ((cmf & 0x0f) !== 0x08) { + throw new _util.FormatError(`Unknown compression method in flate stream: ${cmf}, ${flg}`); + } + + if (((cmf << 8) + flg) % 31 !== 0) { + throw new _util.FormatError(`Bad FCHECK in flate stream: ${cmf}, ${flg}`); + } + + if (flg & 0x20) { + throw new _util.FormatError(`FDICT bit set in flate stream: ${cmf}, ${flg}`); + } + + this.codeSize = 0; + this.codeBuf = 0; + DecodeStream.call(this, maybeLength); + } + + FlateStream.prototype = Object.create(DecodeStream.prototype); + + FlateStream.prototype.getBits = function FlateStream_getBits(bits) { + var str = this.str; + var codeSize = this.codeSize; + var codeBuf = this.codeBuf; + var b; + + while (codeSize < bits) { + if ((b = str.getByte()) === -1) { + throw new _util.FormatError("Bad encoding in flate stream"); + } + + codeBuf |= b << codeSize; + codeSize += 8; + } + + b = codeBuf & (1 << bits) - 1; + this.codeBuf = codeBuf >> bits; + this.codeSize = codeSize -= bits; + return b; + }; + + FlateStream.prototype.getCode = function FlateStream_getCode(table) { + var str = this.str; + var codes = table[0]; + var maxLen = table[1]; + var codeSize = this.codeSize; + var codeBuf = this.codeBuf; + var b; + + while (codeSize < maxLen) { + if ((b = str.getByte()) === -1) { + break; + } + + codeBuf |= b << codeSize; + codeSize += 8; + } + + var code = codes[codeBuf & (1 << maxLen) - 1]; + var codeLen = code >> 16; + var codeVal = code & 0xffff; + + if (codeLen < 1 || codeSize < codeLen) { + throw new _util.FormatError("Bad encoding in flate stream"); + } + + this.codeBuf = codeBuf >> codeLen; + this.codeSize = codeSize - codeLen; + return codeVal; + }; + + FlateStream.prototype.generateHuffmanTable = function flateStreamGenerateHuffmanTable(lengths) { + var n = lengths.length; + var maxLen = 0; + var i; + + for (i = 0; i < n; ++i) { + if (lengths[i] > maxLen) { + maxLen = lengths[i]; + } + } + + var size = 1 << maxLen; + var codes = new Int32Array(size); + + for (var len = 1, code = 0, skip = 2; len <= maxLen; ++len, code <<= 1, skip <<= 1) { + for (var val = 0; val < n; ++val) { + if (lengths[val] === len) { + var code2 = 0; + var t = code; + + for (i = 0; i < len; ++i) { + code2 = code2 << 1 | t & 1; + t >>= 1; + } + + for (i = code2; i < size; i += skip) { + codes[i] = len << 16 | val; + } + + ++code; + } + } + } + + return [codes, maxLen]; + }; + + FlateStream.prototype.readBlock = function FlateStream_readBlock() { + var buffer, len; + var str = this.str; + var hdr = this.getBits(3); + + if (hdr & 1) { + this.eof = true; + } + + hdr >>= 1; + + if (hdr === 0) { + var b; + + if ((b = str.getByte()) === -1) { + throw new _util.FormatError("Bad block header in flate stream"); + } + + var blockLen = b; + + if ((b = str.getByte()) === -1) { + throw new _util.FormatError("Bad block header in flate stream"); + } + + blockLen |= b << 8; + + if ((b = str.getByte()) === -1) { + throw new _util.FormatError("Bad block header in flate stream"); + } + + var check = b; + + if ((b = str.getByte()) === -1) { + throw new _util.FormatError("Bad block header in flate stream"); + } + + check |= b << 8; + + if (check !== (~blockLen & 0xffff) && (blockLen !== 0 || check !== 0)) { + throw new _util.FormatError("Bad uncompressed block length in flate stream"); + } + + this.codeBuf = 0; + this.codeSize = 0; + const bufferLength = this.bufferLength, + end = bufferLength + blockLen; + buffer = this.ensureBuffer(end); + this.bufferLength = end; + + if (blockLen === 0) { + if (str.peekByte() === -1) { + this.eof = true; + } + } else { + const block = str.getBytes(blockLen); + buffer.set(block, bufferLength); + + if (block.length < blockLen) { + this.eof = true; + } + } + + return; + } + + var litCodeTable; + var distCodeTable; + + if (hdr === 1) { + litCodeTable = fixedLitCodeTab; + distCodeTable = fixedDistCodeTab; + } else if (hdr === 2) { + var numLitCodes = this.getBits(5) + 257; + var numDistCodes = this.getBits(5) + 1; + var numCodeLenCodes = this.getBits(4) + 4; + var codeLenCodeLengths = new Uint8Array(codeLenCodeMap.length); + var i; + + for (i = 0; i < numCodeLenCodes; ++i) { + codeLenCodeLengths[codeLenCodeMap[i]] = this.getBits(3); + } + + var codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths); + len = 0; + i = 0; + var codes = numLitCodes + numDistCodes; + var codeLengths = new Uint8Array(codes); + var bitsLength, bitsOffset, what; + + while (i < codes) { + var code = this.getCode(codeLenCodeTab); + + if (code === 16) { + bitsLength = 2; + bitsOffset = 3; + what = len; + } else if (code === 17) { + bitsLength = 3; + bitsOffset = 3; + what = len = 0; + } else if (code === 18) { + bitsLength = 7; + bitsOffset = 11; + what = len = 0; + } else { + codeLengths[i++] = len = code; + continue; + } + + var repeatLength = this.getBits(bitsLength) + bitsOffset; + + while (repeatLength-- > 0) { + codeLengths[i++] = what; + } + } + + litCodeTable = this.generateHuffmanTable(codeLengths.subarray(0, numLitCodes)); + distCodeTable = this.generateHuffmanTable(codeLengths.subarray(numLitCodes, codes)); + } else { + throw new _util.FormatError("Unknown block type in flate stream"); + } + + buffer = this.buffer; + var limit = buffer ? buffer.length : 0; + var pos = this.bufferLength; + + while (true) { + var code1 = this.getCode(litCodeTable); + + if (code1 < 256) { + if (pos + 1 >= limit) { + buffer = this.ensureBuffer(pos + 1); + limit = buffer.length; + } + + buffer[pos++] = code1; + continue; + } + + if (code1 === 256) { + this.bufferLength = pos; + return; + } + + code1 -= 257; + code1 = lengthDecode[code1]; + var code2 = code1 >> 16; + + if (code2 > 0) { + code2 = this.getBits(code2); + } + + len = (code1 & 0xffff) + code2; + code1 = this.getCode(distCodeTable); + code1 = distDecode[code1]; + code2 = code1 >> 16; + + if (code2 > 0) { + code2 = this.getBits(code2); + } + + var dist = (code1 & 0xffff) + code2; + + if (pos + len >= limit) { + buffer = this.ensureBuffer(pos + len); + limit = buffer.length; + } + + for (var k = 0; k < len; ++k, ++pos) { + buffer[pos] = buffer[pos - dist]; + } + } + }; + + return FlateStream; +}(); + +exports.FlateStream = FlateStream; + +var PredictorStream = function PredictorStreamClosure() { + function PredictorStream(str, maybeLength, params) { + if (!(0, _primitives.isDict)(params)) { + return str; + } + + var predictor = this.predictor = params.get("Predictor") || 1; + + if (predictor <= 1) { + return str; + } + + if (predictor !== 2 && (predictor < 10 || predictor > 15)) { + throw new _util.FormatError(`Unsupported predictor: ${predictor}`); + } + + if (predictor === 2) { + this.readBlock = this.readBlockTiff; + } else { + this.readBlock = this.readBlockPng; + } + + this.str = str; + this.dict = str.dict; + var colors = this.colors = params.get("Colors") || 1; + var bits = this.bits = params.get("BitsPerComponent") || 8; + var columns = this.columns = params.get("Columns") || 1; + this.pixBytes = colors * bits + 7 >> 3; + this.rowBytes = columns * colors * bits + 7 >> 3; + DecodeStream.call(this, maybeLength); + return this; + } + + PredictorStream.prototype = Object.create(DecodeStream.prototype); + + PredictorStream.prototype.readBlockTiff = function predictorStreamReadBlockTiff() { + var rowBytes = this.rowBytes; + var bufferLength = this.bufferLength; + var buffer = this.ensureBuffer(bufferLength + rowBytes); + var bits = this.bits; + var colors = this.colors; + var rawBytes = this.str.getBytes(rowBytes); + this.eof = !rawBytes.length; + + if (this.eof) { + return; + } + + var inbuf = 0, + outbuf = 0; + var inbits = 0, + outbits = 0; + var pos = bufferLength; + var i; + + if (bits === 1 && colors === 1) { + for (i = 0; i < rowBytes; ++i) { + var c = rawBytes[i] ^ inbuf; + c ^= c >> 1; + c ^= c >> 2; + c ^= c >> 4; + inbuf = (c & 1) << 7; + buffer[pos++] = c; + } + } else if (bits === 8) { + for (i = 0; i < colors; ++i) { + buffer[pos++] = rawBytes[i]; + } + + for (; i < rowBytes; ++i) { + buffer[pos] = buffer[pos - colors] + rawBytes[i]; + pos++; + } + } else if (bits === 16) { + var bytesPerPixel = colors * 2; + + for (i = 0; i < bytesPerPixel; ++i) { + buffer[pos++] = rawBytes[i]; + } + + for (; i < rowBytes; i += 2) { + var sum = ((rawBytes[i] & 0xff) << 8) + (rawBytes[i + 1] & 0xff) + ((buffer[pos - bytesPerPixel] & 0xff) << 8) + (buffer[pos - bytesPerPixel + 1] & 0xff); + buffer[pos++] = sum >> 8 & 0xff; + buffer[pos++] = sum & 0xff; + } + } else { + var compArray = new Uint8Array(colors + 1); + var bitMask = (1 << bits) - 1; + var j = 0, + k = bufferLength; + var columns = this.columns; + + for (i = 0; i < columns; ++i) { + for (var kk = 0; kk < colors; ++kk) { + if (inbits < bits) { + inbuf = inbuf << 8 | rawBytes[j++] & 0xff; + inbits += 8; + } + + compArray[kk] = compArray[kk] + (inbuf >> inbits - bits) & bitMask; + inbits -= bits; + outbuf = outbuf << bits | compArray[kk]; + outbits += bits; + + if (outbits >= 8) { + buffer[k++] = outbuf >> outbits - 8 & 0xff; + outbits -= 8; + } + } + } + + if (outbits > 0) { + buffer[k++] = (outbuf << 8 - outbits) + (inbuf & (1 << 8 - outbits) - 1); + } + } + + this.bufferLength += rowBytes; + }; + + PredictorStream.prototype.readBlockPng = function predictorStreamReadBlockPng() { + var rowBytes = this.rowBytes; + var pixBytes = this.pixBytes; + var predictor = this.str.getByte(); + var rawBytes = this.str.getBytes(rowBytes); + this.eof = !rawBytes.length; + + if (this.eof) { + return; + } + + var bufferLength = this.bufferLength; + var buffer = this.ensureBuffer(bufferLength + rowBytes); + var prevRow = buffer.subarray(bufferLength - rowBytes, bufferLength); + + if (prevRow.length === 0) { + prevRow = new Uint8Array(rowBytes); + } + + var i, + j = bufferLength, + up, + c; + + switch (predictor) { + case 0: + for (i = 0; i < rowBytes; ++i) { + buffer[j++] = rawBytes[i]; + } + + break; + + case 1: + for (i = 0; i < pixBytes; ++i) { + buffer[j++] = rawBytes[i]; + } + + for (; i < rowBytes; ++i) { + buffer[j] = buffer[j - pixBytes] + rawBytes[i] & 0xff; + j++; + } + + break; + + case 2: + for (i = 0; i < rowBytes; ++i) { + buffer[j++] = prevRow[i] + rawBytes[i] & 0xff; + } + + break; + + case 3: + for (i = 0; i < pixBytes; ++i) { + buffer[j++] = (prevRow[i] >> 1) + rawBytes[i]; + } + + for (; i < rowBytes; ++i) { + buffer[j] = (prevRow[i] + buffer[j - pixBytes] >> 1) + rawBytes[i] & 0xff; + j++; + } + + break; + + case 4: + for (i = 0; i < pixBytes; ++i) { + up = prevRow[i]; + c = rawBytes[i]; + buffer[j++] = up + c; + } + + for (; i < rowBytes; ++i) { + up = prevRow[i]; + var upLeft = prevRow[i - pixBytes]; + var left = buffer[j - pixBytes]; + var p = left + up - upLeft; + var pa = p - left; + + if (pa < 0) { + pa = -pa; + } + + var pb = p - up; + + if (pb < 0) { + pb = -pb; + } + + var pc = p - upLeft; + + if (pc < 0) { + pc = -pc; + } + + c = rawBytes[i]; + + if (pa <= pb && pa <= pc) { + buffer[j++] = left + c; + } else if (pb <= pc) { + buffer[j++] = up + c; + } else { + buffer[j++] = upLeft + c; + } + } + + break; + + default: + throw new _util.FormatError(`Unsupported predictor: ${predictor}`); + } + + this.bufferLength += rowBytes; + }; + + return PredictorStream; +}(); + +exports.PredictorStream = PredictorStream; + +var DecryptStream = function DecryptStreamClosure() { + function DecryptStream(str, maybeLength, decrypt) { + this.str = str; + this.dict = str.dict; + this.decrypt = decrypt; + this.nextChunk = null; + this.initialized = false; + DecodeStream.call(this, maybeLength); + } + + var chunkSize = 512; + DecryptStream.prototype = Object.create(DecodeStream.prototype); + + DecryptStream.prototype.readBlock = function DecryptStream_readBlock() { + var chunk; + + if (this.initialized) { + chunk = this.nextChunk; + } else { + chunk = this.str.getBytes(chunkSize); + this.initialized = true; + } + + if (!chunk || chunk.length === 0) { + this.eof = true; + return; + } + + this.nextChunk = this.str.getBytes(chunkSize); + var hasMoreData = this.nextChunk && this.nextChunk.length > 0; + var decrypt = this.decrypt; + chunk = decrypt(chunk, !hasMoreData); + var bufferLength = this.bufferLength; + var i, + n = chunk.length; + var buffer = this.ensureBuffer(bufferLength + n); + + for (i = 0; i < n; i++) { + buffer[bufferLength++] = chunk[i]; + } + + this.bufferLength = bufferLength; + }; + + return DecryptStream; +}(); + +exports.DecryptStream = DecryptStream; + +var Ascii85Stream = function Ascii85StreamClosure() { + function Ascii85Stream(str, maybeLength) { + this.str = str; + this.dict = str.dict; + this.input = new Uint8Array(5); + + if (maybeLength) { + maybeLength = 0.8 * maybeLength; + } + + DecodeStream.call(this, maybeLength); + } + + Ascii85Stream.prototype = Object.create(DecodeStream.prototype); + + Ascii85Stream.prototype.readBlock = function Ascii85Stream_readBlock() { + var TILDA_CHAR = 0x7e; + var Z_LOWER_CHAR = 0x7a; + var EOF = -1; + var str = this.str; + var c = str.getByte(); + + while ((0, _core_utils.isWhiteSpace)(c)) { + c = str.getByte(); + } + + if (c === EOF || c === TILDA_CHAR) { + this.eof = true; + return; + } + + var bufferLength = this.bufferLength, + buffer; + var i; + + if (c === Z_LOWER_CHAR) { + buffer = this.ensureBuffer(bufferLength + 4); + + for (i = 0; i < 4; ++i) { + buffer[bufferLength + i] = 0; + } + + this.bufferLength += 4; + } else { + var input = this.input; + input[0] = c; + + for (i = 1; i < 5; ++i) { + c = str.getByte(); + + while ((0, _core_utils.isWhiteSpace)(c)) { + c = str.getByte(); + } + + input[i] = c; + + if (c === EOF || c === TILDA_CHAR) { + break; + } + } + + buffer = this.ensureBuffer(bufferLength + i - 1); + this.bufferLength += i - 1; + + if (i < 5) { + for (; i < 5; ++i) { + input[i] = 0x21 + 84; + } + + this.eof = true; + } + + var t = 0; + + for (i = 0; i < 5; ++i) { + t = t * 85 + (input[i] - 0x21); + } + + for (i = 3; i >= 0; --i) { + buffer[bufferLength + i] = t & 0xff; + t >>= 8; + } + } + }; + + return Ascii85Stream; +}(); + +exports.Ascii85Stream = Ascii85Stream; + +var AsciiHexStream = function AsciiHexStreamClosure() { + function AsciiHexStream(str, maybeLength) { + this.str = str; + this.dict = str.dict; + this.firstDigit = -1; + + if (maybeLength) { + maybeLength = 0.5 * maybeLength; + } + + DecodeStream.call(this, maybeLength); + } + + AsciiHexStream.prototype = Object.create(DecodeStream.prototype); + + AsciiHexStream.prototype.readBlock = function AsciiHexStream_readBlock() { + var UPSTREAM_BLOCK_SIZE = 8000; + var bytes = this.str.getBytes(UPSTREAM_BLOCK_SIZE); + + if (!bytes.length) { + this.eof = true; + return; + } + + var maxDecodeLength = bytes.length + 1 >> 1; + var buffer = this.ensureBuffer(this.bufferLength + maxDecodeLength); + var bufferLength = this.bufferLength; + var firstDigit = this.firstDigit; + + for (var i = 0, ii = bytes.length; i < ii; i++) { + var ch = bytes[i], + digit; + + if (ch >= 0x30 && ch <= 0x39) { + digit = ch & 0x0f; + } else if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { + digit = (ch & 0x0f) + 9; + } else if (ch === 0x3e) { + this.eof = true; + break; + } else { + continue; + } + + if (firstDigit < 0) { + firstDigit = digit; + } else { + buffer[bufferLength++] = firstDigit << 4 | digit; + firstDigit = -1; + } + } + + if (firstDigit >= 0 && this.eof) { + buffer[bufferLength++] = firstDigit << 4; + firstDigit = -1; + } + + this.firstDigit = firstDigit; + this.bufferLength = bufferLength; + }; + + return AsciiHexStream; +}(); + +exports.AsciiHexStream = AsciiHexStream; + +var RunLengthStream = function RunLengthStreamClosure() { + function RunLengthStream(str, maybeLength) { + this.str = str; + this.dict = str.dict; + DecodeStream.call(this, maybeLength); + } + + RunLengthStream.prototype = Object.create(DecodeStream.prototype); + + RunLengthStream.prototype.readBlock = function RunLengthStream_readBlock() { + var repeatHeader = this.str.getBytes(2); + + if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] === 128) { + this.eof = true; + return; + } + + var buffer; + var bufferLength = this.bufferLength; + var n = repeatHeader[0]; + + if (n < 128) { + buffer = this.ensureBuffer(bufferLength + n + 1); + buffer[bufferLength++] = repeatHeader[1]; + + if (n > 0) { + var source = this.str.getBytes(n); + buffer.set(source, bufferLength); + bufferLength += n; + } + } else { + n = 257 - n; + var b = repeatHeader[1]; + buffer = this.ensureBuffer(bufferLength + n + 1); + + for (var i = 0; i < n; i++) { + buffer[bufferLength++] = b; + } + } + + this.bufferLength = bufferLength; + }; + + return RunLengthStream; +}(); + +exports.RunLengthStream = RunLengthStream; + +var LZWStream = function LZWStreamClosure() { + function LZWStream(str, maybeLength, earlyChange) { + this.str = str; + this.dict = str.dict; + this.cachedData = 0; + this.bitsCached = 0; + var maxLzwDictionarySize = 4096; + var lzwState = { + earlyChange, + codeLength: 9, + nextCode: 258, + dictionaryValues: new Uint8Array(maxLzwDictionarySize), + dictionaryLengths: new Uint16Array(maxLzwDictionarySize), + dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize), + currentSequence: new Uint8Array(maxLzwDictionarySize), + currentSequenceLength: 0 + }; + + for (var i = 0; i < 256; ++i) { + lzwState.dictionaryValues[i] = i; + lzwState.dictionaryLengths[i] = 1; + } + + this.lzwState = lzwState; + DecodeStream.call(this, maybeLength); + } + + LZWStream.prototype = Object.create(DecodeStream.prototype); + + LZWStream.prototype.readBits = function LZWStream_readBits(n) { + var bitsCached = this.bitsCached; + var cachedData = this.cachedData; + + while (bitsCached < n) { + var c = this.str.getByte(); + + if (c === -1) { + this.eof = true; + return null; + } + + cachedData = cachedData << 8 | c; + bitsCached += 8; + } + + this.bitsCached = bitsCached -= n; + this.cachedData = cachedData; + this.lastCode = null; + return cachedData >>> bitsCached & (1 << n) - 1; + }; + + LZWStream.prototype.readBlock = function LZWStream_readBlock() { + var blockSize = 512; + var estimatedDecodedSize = blockSize * 2, + decodedSizeDelta = blockSize; + var i, j, q; + var lzwState = this.lzwState; + + if (!lzwState) { + return; + } + + var earlyChange = lzwState.earlyChange; + var nextCode = lzwState.nextCode; + var dictionaryValues = lzwState.dictionaryValues; + var dictionaryLengths = lzwState.dictionaryLengths; + var dictionaryPrevCodes = lzwState.dictionaryPrevCodes; + var codeLength = lzwState.codeLength; + var prevCode = lzwState.prevCode; + var currentSequence = lzwState.currentSequence; + var currentSequenceLength = lzwState.currentSequenceLength; + var decodedLength = 0; + var currentBufferLength = this.bufferLength; + var buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); + + for (i = 0; i < blockSize; i++) { + var code = this.readBits(codeLength); + var hasPrev = currentSequenceLength > 0; + + if (code < 256) { + currentSequence[0] = code; + currentSequenceLength = 1; + } else if (code >= 258) { + if (code < nextCode) { + currentSequenceLength = dictionaryLengths[code]; + + for (j = currentSequenceLength - 1, q = code; j >= 0; j--) { + currentSequence[j] = dictionaryValues[q]; + q = dictionaryPrevCodes[q]; + } + } else { + currentSequence[currentSequenceLength++] = currentSequence[0]; + } + } else if (code === 256) { + codeLength = 9; + nextCode = 258; + currentSequenceLength = 0; + continue; + } else { + this.eof = true; + delete this.lzwState; + break; + } + + if (hasPrev) { + dictionaryPrevCodes[nextCode] = prevCode; + dictionaryLengths[nextCode] = dictionaryLengths[prevCode] + 1; + dictionaryValues[nextCode] = currentSequence[0]; + nextCode++; + codeLength = nextCode + earlyChange & nextCode + earlyChange - 1 ? codeLength : Math.min(Math.log(nextCode + earlyChange) / 0.6931471805599453 + 1, 12) | 0; + } + + prevCode = code; + decodedLength += currentSequenceLength; + + if (estimatedDecodedSize < decodedLength) { + do { + estimatedDecodedSize += decodedSizeDelta; + } while (estimatedDecodedSize < decodedLength); + + buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); + } + + for (j = 0; j < currentSequenceLength; j++) { + buffer[currentBufferLength++] = currentSequence[j]; + } + } + + lzwState.nextCode = nextCode; + lzwState.codeLength = codeLength; + lzwState.prevCode = prevCode; + lzwState.currentSequenceLength = currentSequenceLength; + this.bufferLength = currentBufferLength; + }; + + return LZWStream; +}(); + +exports.LZWStream = LZWStream; + +var NullStream = function NullStreamClosure() { + function NullStream() { + Stream.call(this, new Uint8Array(0)); + } + + NullStream.prototype = Stream.prototype; + return NullStream; +}(); + +exports.NullStream = NullStream; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CCITTFaxStream = void 0; + +var _primitives = __w_pdfjs_require__(5); + +var _ccitt = __w_pdfjs_require__(14); + +var _stream = __w_pdfjs_require__(12); + +var CCITTFaxStream = function CCITTFaxStreamClosure() { + function CCITTFaxStream(str, maybeLength, params) { + this.str = str; + this.dict = str.dict; + + if (!(0, _primitives.isDict)(params)) { + params = _primitives.Dict.empty; + } + + const source = { + next() { + return str.getByte(); + } + + }; + this.ccittFaxDecoder = new _ccitt.CCITTFaxDecoder(source, { + K: params.get("K"), + EndOfLine: params.get("EndOfLine"), + EncodedByteAlign: params.get("EncodedByteAlign"), + Columns: params.get("Columns"), + Rows: params.get("Rows"), + EndOfBlock: params.get("EndOfBlock"), + BlackIs1: params.get("BlackIs1") + }); + + _stream.DecodeStream.call(this, maybeLength); + } + + CCITTFaxStream.prototype = Object.create(_stream.DecodeStream.prototype); + + CCITTFaxStream.prototype.readBlock = function () { + while (!this.eof) { + const c = this.ccittFaxDecoder.readNextChar(); + + if (c === -1) { + this.eof = true; + return; + } + + this.ensureBuffer(this.bufferLength + 1); + this.buffer[this.bufferLength++] = c; + } + }; + + return CCITTFaxStream; +}(); + +exports.CCITTFaxStream = CCITTFaxStream; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CCITTFaxDecoder = void 0; + +var _util = __w_pdfjs_require__(2); + +const CCITTFaxDecoder = function CCITTFaxDecoder() { + const ccittEOL = -2; + const ccittEOF = -1; + const twoDimPass = 0; + const twoDimHoriz = 1; + const twoDimVert0 = 2; + const twoDimVertR1 = 3; + const twoDimVertL1 = 4; + const twoDimVertR2 = 5; + const twoDimVertL2 = 6; + const twoDimVertR3 = 7; + const twoDimVertL3 = 8; + const twoDimTable = [[-1, -1], [-1, -1], [7, twoDimVertL3], [7, twoDimVertR3], [6, twoDimVertL2], [6, twoDimVertL2], [6, twoDimVertR2], [6, twoDimVertR2], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0]]; + const whiteTable1 = [[-1, -1], [12, ccittEOL], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [11, 1792], [11, 1792], [12, 1984], [12, 2048], [12, 2112], [12, 2176], [12, 2240], [12, 2304], [11, 1856], [11, 1856], [11, 1920], [11, 1920], [12, 2368], [12, 2432], [12, 2496], [12, 2560]]; + const whiteTable2 = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [8, 29], [8, 29], [8, 30], [8, 30], [8, 45], [8, 45], [8, 46], [8, 46], [7, 22], [7, 22], [7, 22], [7, 22], [7, 23], [7, 23], [7, 23], [7, 23], [8, 47], [8, 47], [8, 48], [8, 48], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [7, 20], [7, 20], [7, 20], [7, 20], [8, 33], [8, 33], [8, 34], [8, 34], [8, 35], [8, 35], [8, 36], [8, 36], [8, 37], [8, 37], [8, 38], [8, 38], [7, 19], [7, 19], [7, 19], [7, 19], [8, 31], [8, 31], [8, 32], [8, 32], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [8, 53], [8, 53], [8, 54], [8, 54], [7, 26], [7, 26], [7, 26], [7, 26], [8, 39], [8, 39], [8, 40], [8, 40], [8, 41], [8, 41], [8, 42], [8, 42], [8, 43], [8, 43], [8, 44], [8, 44], [7, 21], [7, 21], [7, 21], [7, 21], [7, 28], [7, 28], [7, 28], [7, 28], [8, 61], [8, 61], [8, 62], [8, 62], [8, 63], [8, 63], [8, 0], [8, 0], [8, 320], [8, 320], [8, 384], [8, 384], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [7, 27], [7, 27], [7, 27], [7, 27], [8, 59], [8, 59], [8, 60], [8, 60], [9, 1472], [9, 1536], [9, 1600], [9, 1728], [7, 18], [7, 18], [7, 18], [7, 18], [7, 24], [7, 24], [7, 24], [7, 24], [8, 49], [8, 49], [8, 50], [8, 50], [8, 51], [8, 51], [8, 52], [8, 52], [7, 25], [7, 25], [7, 25], [7, 25], [8, 55], [8, 55], [8, 56], [8, 56], [8, 57], [8, 57], [8, 58], [8, 58], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [8, 448], [8, 448], [8, 512], [8, 512], [9, 704], [9, 768], [8, 640], [8, 640], [8, 576], [8, 576], [9, 832], [9, 896], [9, 960], [9, 1024], [9, 1088], [9, 1152], [9, 1216], [9, 1280], [9, 1344], [9, 1408], [7, 256], [7, 256], [7, 256], [7, 256], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7]]; + const blackTable1 = [[-1, -1], [-1, -1], [12, ccittEOL], [12, ccittEOL], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [11, 1792], [11, 1792], [11, 1792], [11, 1792], [12, 1984], [12, 1984], [12, 2048], [12, 2048], [12, 2112], [12, 2112], [12, 2176], [12, 2176], [12, 2240], [12, 2240], [12, 2304], [12, 2304], [11, 1856], [11, 1856], [11, 1856], [11, 1856], [11, 1920], [11, 1920], [11, 1920], [11, 1920], [12, 2368], [12, 2368], [12, 2432], [12, 2432], [12, 2496], [12, 2496], [12, 2560], [12, 2560], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [12, 52], [12, 52], [13, 640], [13, 704], [13, 768], [13, 832], [12, 55], [12, 55], [12, 56], [12, 56], [13, 1280], [13, 1344], [13, 1408], [13, 1472], [12, 59], [12, 59], [12, 60], [12, 60], [13, 1536], [13, 1600], [11, 24], [11, 24], [11, 24], [11, 24], [11, 25], [11, 25], [11, 25], [11, 25], [13, 1664], [13, 1728], [12, 320], [12, 320], [12, 384], [12, 384], [12, 448], [12, 448], [13, 512], [13, 576], [12, 53], [12, 53], [12, 54], [12, 54], [13, 896], [13, 960], [13, 1024], [13, 1088], [13, 1152], [13, 1216], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64]]; + const blackTable2 = [[8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [11, 23], [11, 23], [12, 50], [12, 51], [12, 44], [12, 45], [12, 46], [12, 47], [12, 57], [12, 58], [12, 61], [12, 256], [10, 16], [10, 16], [10, 16], [10, 16], [10, 17], [10, 17], [10, 17], [10, 17], [12, 48], [12, 49], [12, 62], [12, 63], [12, 30], [12, 31], [12, 32], [12, 33], [12, 40], [12, 41], [11, 22], [11, 22], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [12, 128], [12, 192], [12, 26], [12, 27], [12, 28], [12, 29], [11, 19], [11, 19], [11, 20], [11, 20], [12, 34], [12, 35], [12, 36], [12, 37], [12, 38], [12, 39], [11, 21], [11, 21], [12, 42], [12, 43], [10, 0], [10, 0], [10, 0], [10, 0], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12]]; + const blackTable3 = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [6, 9], [6, 8], [5, 7], [5, 7], [4, 6], [4, 6], [4, 6], [4, 6], [4, 5], [4, 5], [4, 5], [4, 5], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2]]; + + function CCITTFaxDecoder(source, options = {}) { + if (!source || typeof source.next !== "function") { + throw new Error('CCITTFaxDecoder - invalid "source" parameter.'); + } + + this.source = source; + this.eof = false; + this.encoding = options.K || 0; + this.eoline = options.EndOfLine || false; + this.byteAlign = options.EncodedByteAlign || false; + this.columns = options.Columns || 1728; + this.rows = options.Rows || 0; + let eoblock = options.EndOfBlock; + + if (eoblock === null || eoblock === undefined) { + eoblock = true; + } + + this.eoblock = eoblock; + this.black = options.BlackIs1 || false; + this.codingLine = new Uint32Array(this.columns + 1); + this.refLine = new Uint32Array(this.columns + 2); + this.codingLine[0] = this.columns; + this.codingPos = 0; + this.row = 0; + this.nextLine2D = this.encoding < 0; + this.inputBits = 0; + this.inputBuf = 0; + this.outputBits = 0; + this.rowsDone = false; + let code1; + + while ((code1 = this._lookBits(12)) === 0) { + this._eatBits(1); + } + + if (code1 === 1) { + this._eatBits(12); + } + + if (this.encoding > 0) { + this.nextLine2D = !this._lookBits(1); + + this._eatBits(1); + } + } + + CCITTFaxDecoder.prototype = { + readNextChar() { + if (this.eof) { + return -1; + } + + const refLine = this.refLine; + const codingLine = this.codingLine; + const columns = this.columns; + let refPos, blackPixels, bits, i; + + if (this.outputBits === 0) { + if (this.rowsDone) { + this.eof = true; + } + + if (this.eof) { + return -1; + } + + this.err = false; + let code1, code2, code3; + + if (this.nextLine2D) { + for (i = 0; codingLine[i] < columns; ++i) { + refLine[i] = codingLine[i]; + } + + refLine[i++] = columns; + refLine[i] = columns; + codingLine[0] = 0; + this.codingPos = 0; + refPos = 0; + blackPixels = 0; + + while (codingLine[this.codingPos] < columns) { + code1 = this._getTwoDimCode(); + + switch (code1) { + case twoDimPass: + this._addPixels(refLine[refPos + 1], blackPixels); + + if (refLine[refPos + 1] < columns) { + refPos += 2; + } + + break; + + case twoDimHoriz: + code1 = code2 = 0; + + if (blackPixels) { + do { + code1 += code3 = this._getBlackCode(); + } while (code3 >= 64); + + do { + code2 += code3 = this._getWhiteCode(); + } while (code3 >= 64); + } else { + do { + code1 += code3 = this._getWhiteCode(); + } while (code3 >= 64); + + do { + code2 += code3 = this._getBlackCode(); + } while (code3 >= 64); + } + + this._addPixels(codingLine[this.codingPos] + code1, blackPixels); + + if (codingLine[this.codingPos] < columns) { + this._addPixels(codingLine[this.codingPos] + code2, blackPixels ^ 1); + } + + while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { + refPos += 2; + } + + break; + + case twoDimVertR3: + this._addPixels(refLine[refPos] + 3, blackPixels); + + blackPixels ^= 1; + + if (codingLine[this.codingPos] < columns) { + ++refPos; + + while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { + refPos += 2; + } + } + + break; + + case twoDimVertR2: + this._addPixels(refLine[refPos] + 2, blackPixels); + + blackPixels ^= 1; + + if (codingLine[this.codingPos] < columns) { + ++refPos; + + while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { + refPos += 2; + } + } + + break; + + case twoDimVertR1: + this._addPixels(refLine[refPos] + 1, blackPixels); + + blackPixels ^= 1; + + if (codingLine[this.codingPos] < columns) { + ++refPos; + + while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { + refPos += 2; + } + } + + break; + + case twoDimVert0: + this._addPixels(refLine[refPos], blackPixels); + + blackPixels ^= 1; + + if (codingLine[this.codingPos] < columns) { + ++refPos; + + while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { + refPos += 2; + } + } + + break; + + case twoDimVertL3: + this._addPixelsNeg(refLine[refPos] - 3, blackPixels); + + blackPixels ^= 1; + + if (codingLine[this.codingPos] < columns) { + if (refPos > 0) { + --refPos; + } else { + ++refPos; + } + + while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { + refPos += 2; + } + } + + break; + + case twoDimVertL2: + this._addPixelsNeg(refLine[refPos] - 2, blackPixels); + + blackPixels ^= 1; + + if (codingLine[this.codingPos] < columns) { + if (refPos > 0) { + --refPos; + } else { + ++refPos; + } + + while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { + refPos += 2; + } + } + + break; + + case twoDimVertL1: + this._addPixelsNeg(refLine[refPos] - 1, blackPixels); + + blackPixels ^= 1; + + if (codingLine[this.codingPos] < columns) { + if (refPos > 0) { + --refPos; + } else { + ++refPos; + } + + while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { + refPos += 2; + } + } + + break; + + case ccittEOF: + this._addPixels(columns, 0); + + this.eof = true; + break; + + default: + (0, _util.info)("bad 2d code"); + + this._addPixels(columns, 0); + + this.err = true; + } + } + } else { + codingLine[0] = 0; + this.codingPos = 0; + blackPixels = 0; + + while (codingLine[this.codingPos] < columns) { + code1 = 0; + + if (blackPixels) { + do { + code1 += code3 = this._getBlackCode(); + } while (code3 >= 64); + } else { + do { + code1 += code3 = this._getWhiteCode(); + } while (code3 >= 64); + } + + this._addPixels(codingLine[this.codingPos] + code1, blackPixels); + + blackPixels ^= 1; + } + } + + let gotEOL = false; + + if (this.byteAlign) { + this.inputBits &= ~7; + } + + if (!this.eoblock && this.row === this.rows - 1) { + this.rowsDone = true; + } else { + code1 = this._lookBits(12); + + if (this.eoline) { + while (code1 !== ccittEOF && code1 !== 1) { + this._eatBits(1); + + code1 = this._lookBits(12); + } + } else { + while (code1 === 0) { + this._eatBits(1); + + code1 = this._lookBits(12); + } + } + + if (code1 === 1) { + this._eatBits(12); + + gotEOL = true; + } else if (code1 === ccittEOF) { + this.eof = true; + } + } + + if (!this.eof && this.encoding > 0 && !this.rowsDone) { + this.nextLine2D = !this._lookBits(1); + + this._eatBits(1); + } + + if (this.eoblock && gotEOL && this.byteAlign) { + code1 = this._lookBits(12); + + if (code1 === 1) { + this._eatBits(12); + + if (this.encoding > 0) { + this._lookBits(1); + + this._eatBits(1); + } + + if (this.encoding >= 0) { + for (i = 0; i < 4; ++i) { + code1 = this._lookBits(12); + + if (code1 !== 1) { + (0, _util.info)("bad rtc code: " + code1); + } + + this._eatBits(12); + + if (this.encoding > 0) { + this._lookBits(1); + + this._eatBits(1); + } + } + } + + this.eof = true; + } + } else if (this.err && this.eoline) { + while (true) { + code1 = this._lookBits(13); + + if (code1 === ccittEOF) { + this.eof = true; + return -1; + } + + if (code1 >> 1 === 1) { + break; + } + + this._eatBits(1); + } + + this._eatBits(12); + + if (this.encoding > 0) { + this._eatBits(1); + + this.nextLine2D = !(code1 & 1); + } + } + + if (codingLine[0] > 0) { + this.outputBits = codingLine[this.codingPos = 0]; + } else { + this.outputBits = codingLine[this.codingPos = 1]; + } + + this.row++; + } + + let c; + + if (this.outputBits >= 8) { + c = this.codingPos & 1 ? 0 : 0xff; + this.outputBits -= 8; + + if (this.outputBits === 0 && codingLine[this.codingPos] < columns) { + this.codingPos++; + this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; + } + } else { + bits = 8; + c = 0; + + do { + if (this.outputBits > bits) { + c <<= bits; + + if (!(this.codingPos & 1)) { + c |= 0xff >> 8 - bits; + } + + this.outputBits -= bits; + bits = 0; + } else { + c <<= this.outputBits; + + if (!(this.codingPos & 1)) { + c |= 0xff >> 8 - this.outputBits; + } + + bits -= this.outputBits; + this.outputBits = 0; + + if (codingLine[this.codingPos] < columns) { + this.codingPos++; + this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; + } else if (bits > 0) { + c <<= bits; + bits = 0; + } + } + } while (bits); + } + + if (this.black) { + c ^= 0xff; + } + + return c; + }, + + _addPixels(a1, blackPixels) { + const codingLine = this.codingLine; + let codingPos = this.codingPos; + + if (a1 > codingLine[codingPos]) { + if (a1 > this.columns) { + (0, _util.info)("row is wrong length"); + this.err = true; + a1 = this.columns; + } + + if (codingPos & 1 ^ blackPixels) { + ++codingPos; + } + + codingLine[codingPos] = a1; + } + + this.codingPos = codingPos; + }, + + _addPixelsNeg(a1, blackPixels) { + const codingLine = this.codingLine; + let codingPos = this.codingPos; + + if (a1 > codingLine[codingPos]) { + if (a1 > this.columns) { + (0, _util.info)("row is wrong length"); + this.err = true; + a1 = this.columns; + } + + if (codingPos & 1 ^ blackPixels) { + ++codingPos; + } + + codingLine[codingPos] = a1; + } else if (a1 < codingLine[codingPos]) { + if (a1 < 0) { + (0, _util.info)("invalid code"); + this.err = true; + a1 = 0; + } + + while (codingPos > 0 && a1 < codingLine[codingPos - 1]) { + --codingPos; + } + + codingLine[codingPos] = a1; + } + + this.codingPos = codingPos; + }, + + _findTableCode(start, end, table, limit) { + const limitValue = limit || 0; + + for (let i = start; i <= end; ++i) { + let code = this._lookBits(i); + + if (code === ccittEOF) { + return [true, 1, false]; + } + + if (i < end) { + code <<= end - i; + } + + if (!limitValue || code >= limitValue) { + const p = table[code - limitValue]; + + if (p[0] === i) { + this._eatBits(i); + + return [true, p[1], true]; + } + } + } + + return [false, 0, false]; + }, + + _getTwoDimCode() { + let code = 0; + let p; + + if (this.eoblock) { + code = this._lookBits(7); + p = twoDimTable[code]; + + if (p && p[0] > 0) { + this._eatBits(p[0]); + + return p[1]; + } + } else { + const result = this._findTableCode(1, 7, twoDimTable); + + if (result[0] && result[2]) { + return result[1]; + } + } + + (0, _util.info)("Bad two dim code"); + return ccittEOF; + }, + + _getWhiteCode() { + let code = 0; + let p; + + if (this.eoblock) { + code = this._lookBits(12); + + if (code === ccittEOF) { + return 1; + } + + if (code >> 5 === 0) { + p = whiteTable1[code]; + } else { + p = whiteTable2[code >> 3]; + } + + if (p[0] > 0) { + this._eatBits(p[0]); + + return p[1]; + } + } else { + let result = this._findTableCode(1, 9, whiteTable2); + + if (result[0]) { + return result[1]; + } + + result = this._findTableCode(11, 12, whiteTable1); + + if (result[0]) { + return result[1]; + } + } + + (0, _util.info)("bad white code"); + + this._eatBits(1); + + return 1; + }, + + _getBlackCode() { + let code, p; + + if (this.eoblock) { + code = this._lookBits(13); + + if (code === ccittEOF) { + return 1; + } + + if (code >> 7 === 0) { + p = blackTable1[code]; + } else if (code >> 9 === 0 && code >> 7 !== 0) { + p = blackTable2[(code >> 1) - 64]; + } else { + p = blackTable3[code >> 7]; + } + + if (p[0] > 0) { + this._eatBits(p[0]); + + return p[1]; + } + } else { + let result = this._findTableCode(2, 6, blackTable3); + + if (result[0]) { + return result[1]; + } + + result = this._findTableCode(7, 12, blackTable2, 64); + + if (result[0]) { + return result[1]; + } + + result = this._findTableCode(10, 13, blackTable1); + + if (result[0]) { + return result[1]; + } + } + + (0, _util.info)("bad black code"); + + this._eatBits(1); + + return 1; + }, + + _lookBits(n) { + let c; + + while (this.inputBits < n) { + if ((c = this.source.next()) === -1) { + if (this.inputBits === 0) { + return ccittEOF; + } + + return this.inputBuf << n - this.inputBits & 0xffff >> 16 - n; + } + + this.inputBuf = this.inputBuf << 8 | c; + this.inputBits += 8; + } + + return this.inputBuf >> this.inputBits - n & 0xffff >> 16 - n; + }, + + _eatBits(n) { + if ((this.inputBits -= n) < 0) { + this.inputBits = 0; + } + } + + }; + return CCITTFaxDecoder; +}(); + +exports.CCITTFaxDecoder = CCITTFaxDecoder; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Jbig2Stream = void 0; + +var _primitives = __w_pdfjs_require__(5); + +var _stream = __w_pdfjs_require__(12); + +var _jbig = __w_pdfjs_require__(16); + +var _util = __w_pdfjs_require__(2); + +const Jbig2Stream = function Jbig2StreamClosure() { + function Jbig2Stream(stream, maybeLength, dict, params) { + this.stream = stream; + this.maybeLength = maybeLength; + this.dict = dict; + this.params = params; + + _stream.DecodeStream.call(this, maybeLength); + } + + Jbig2Stream.prototype = Object.create(_stream.DecodeStream.prototype); + Object.defineProperty(Jbig2Stream.prototype, "bytes", { + get() { + return (0, _util.shadow)(this, "bytes", this.stream.getBytes(this.maybeLength)); + }, + + configurable: true + }); + + Jbig2Stream.prototype.ensureBuffer = function (requested) {}; + + Jbig2Stream.prototype.readBlock = function () { + if (this.eof) { + return; + } + + const jbig2Image = new _jbig.Jbig2Image(); + const chunks = []; + + if ((0, _primitives.isDict)(this.params)) { + const globalsStream = this.params.get("JBIG2Globals"); + + if ((0, _primitives.isStream)(globalsStream)) { + const globals = globalsStream.getBytes(); + chunks.push({ + data: globals, + start: 0, + end: globals.length + }); + } + } + + chunks.push({ + data: this.bytes, + start: 0, + end: this.bytes.length + }); + const data = jbig2Image.parseChunks(chunks); + const dataLength = data.length; + + for (let i = 0; i < dataLength; i++) { + data[i] ^= 0xff; + } + + this.buffer = data; + this.bufferLength = dataLength; + this.eof = true; + }; + + return Jbig2Stream; +}(); + +exports.Jbig2Stream = Jbig2Stream; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Jbig2Image = void 0; + +var _util = __w_pdfjs_require__(2); + +var _core_utils = __w_pdfjs_require__(8); + +var _arithmetic_decoder = __w_pdfjs_require__(17); + +var _ccitt = __w_pdfjs_require__(14); + +class Jbig2Error extends _util.BaseException { + constructor(msg) { + super(`JBIG2 error: ${msg}`); + } + +} + +var Jbig2Image = function Jbig2ImageClosure() { + function ContextCache() {} + + ContextCache.prototype = { + getContexts(id) { + if (id in this) { + return this[id]; + } + + return this[id] = new Int8Array(1 << 16); + } + + }; + + function DecodingContext(data, start, end) { + this.data = data; + this.start = start; + this.end = end; + } + + DecodingContext.prototype = { + get decoder() { + var decoder = new _arithmetic_decoder.ArithmeticDecoder(this.data, this.start, this.end); + return (0, _util.shadow)(this, "decoder", decoder); + }, + + get contextCache() { + var cache = new ContextCache(); + return (0, _util.shadow)(this, "contextCache", cache); + } + + }; + + function decodeInteger(contextCache, procedure, decoder) { + var contexts = contextCache.getContexts(procedure); + var prev = 1; + + function readBits(length) { + var v = 0; + + for (var i = 0; i < length; i++) { + var bit = decoder.readBit(contexts, prev); + prev = prev < 256 ? prev << 1 | bit : (prev << 1 | bit) & 511 | 256; + v = v << 1 | bit; + } + + return v >>> 0; + } + + var sign = readBits(1); + var value = readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(32) + 4436 : readBits(12) + 340 : readBits(8) + 84 : readBits(6) + 20 : readBits(4) + 4 : readBits(2); + + if (sign === 0) { + return value; + } else if (value > 0) { + return -value; + } + + return null; + } + + function decodeIAID(contextCache, decoder, codeLength) { + var contexts = contextCache.getContexts("IAID"); + var prev = 1; + + for (var i = 0; i < codeLength; i++) { + var bit = decoder.readBit(contexts, prev); + prev = prev << 1 | bit; + } + + if (codeLength < 31) { + return prev & (1 << codeLength) - 1; + } + + return prev & 0x7fffffff; + } + + var SegmentTypes = ["SymbolDictionary", null, null, null, "IntermediateTextRegion", null, "ImmediateTextRegion", "ImmediateLosslessTextRegion", null, null, null, null, null, null, null, null, "PatternDictionary", null, null, null, "IntermediateHalftoneRegion", null, "ImmediateHalftoneRegion", "ImmediateLosslessHalftoneRegion", null, null, null, null, null, null, null, null, null, null, null, null, "IntermediateGenericRegion", null, "ImmediateGenericRegion", "ImmediateLosslessGenericRegion", "IntermediateGenericRefinementRegion", null, "ImmediateGenericRefinementRegion", "ImmediateLosslessGenericRefinementRegion", null, null, null, null, "PageInformation", "EndOfPage", "EndOfStripe", "EndOfFile", "Profiles", "Tables", null, null, null, null, null, null, null, null, "Extension"]; + var CodingTemplates = [[{ + x: -1, + y: -2 + }, { + x: 0, + y: -2 + }, { + x: 1, + y: -2 + }, { + x: -2, + y: -1 + }, { + x: -1, + y: -1 + }, { + x: 0, + y: -1 + }, { + x: 1, + y: -1 + }, { + x: 2, + y: -1 + }, { + x: -4, + y: 0 + }, { + x: -3, + y: 0 + }, { + x: -2, + y: 0 + }, { + x: -1, + y: 0 + }], [{ + x: -1, + y: -2 + }, { + x: 0, + y: -2 + }, { + x: 1, + y: -2 + }, { + x: 2, + y: -2 + }, { + x: -2, + y: -1 + }, { + x: -1, + y: -1 + }, { + x: 0, + y: -1 + }, { + x: 1, + y: -1 + }, { + x: 2, + y: -1 + }, { + x: -3, + y: 0 + }, { + x: -2, + y: 0 + }, { + x: -1, + y: 0 + }], [{ + x: -1, + y: -2 + }, { + x: 0, + y: -2 + }, { + x: 1, + y: -2 + }, { + x: -2, + y: -1 + }, { + x: -1, + y: -1 + }, { + x: 0, + y: -1 + }, { + x: 1, + y: -1 + }, { + x: -2, + y: 0 + }, { + x: -1, + y: 0 + }], [{ + x: -3, + y: -1 + }, { + x: -2, + y: -1 + }, { + x: -1, + y: -1 + }, { + x: 0, + y: -1 + }, { + x: 1, + y: -1 + }, { + x: -4, + y: 0 + }, { + x: -3, + y: 0 + }, { + x: -2, + y: 0 + }, { + x: -1, + y: 0 + }]]; + var RefinementTemplates = [{ + coding: [{ + x: 0, + y: -1 + }, { + x: 1, + y: -1 + }, { + x: -1, + y: 0 + }], + reference: [{ + x: 0, + y: -1 + }, { + x: 1, + y: -1 + }, { + x: -1, + y: 0 + }, { + x: 0, + y: 0 + }, { + x: 1, + y: 0 + }, { + x: -1, + y: 1 + }, { + x: 0, + y: 1 + }, { + x: 1, + y: 1 + }] + }, { + coding: [{ + x: -1, + y: -1 + }, { + x: 0, + y: -1 + }, { + x: 1, + y: -1 + }, { + x: -1, + y: 0 + }], + reference: [{ + x: 0, + y: -1 + }, { + x: -1, + y: 0 + }, { + x: 0, + y: 0 + }, { + x: 1, + y: 0 + }, { + x: 0, + y: 1 + }, { + x: 1, + y: 1 + }] + }]; + var ReusedContexts = [0x9b25, 0x0795, 0x00e5, 0x0195]; + var RefinementReusedContexts = [0x0020, 0x0008]; + + function decodeBitmapTemplate0(width, height, decodingContext) { + var decoder = decodingContext.decoder; + var contexts = decodingContext.contextCache.getContexts("GB"); + var contextLabel, + i, + j, + pixel, + row, + row1, + row2, + bitmap = []; + var OLD_PIXEL_MASK = 0x7bf7; + + for (i = 0; i < height; i++) { + row = bitmap[i] = new Uint8Array(width); + row1 = i < 1 ? row : bitmap[i - 1]; + row2 = i < 2 ? row : bitmap[i - 2]; + contextLabel = row2[0] << 13 | row2[1] << 12 | row2[2] << 11 | row1[0] << 7 | row1[1] << 6 | row1[2] << 5 | row1[3] << 4; + + for (j = 0; j < width; j++) { + row[j] = pixel = decoder.readBit(contexts, contextLabel); + contextLabel = (contextLabel & OLD_PIXEL_MASK) << 1 | (j + 3 < width ? row2[j + 3] << 11 : 0) | (j + 4 < width ? row1[j + 4] << 4 : 0) | pixel; + } + } + + return bitmap; + } + + function decodeBitmap(mmr, width, height, templateIndex, prediction, skip, at, decodingContext) { + if (mmr) { + const input = new Reader(decodingContext.data, decodingContext.start, decodingContext.end); + return decodeMMRBitmap(input, width, height, false); + } + + if (templateIndex === 0 && !skip && !prediction && at.length === 4 && at[0].x === 3 && at[0].y === -1 && at[1].x === -3 && at[1].y === -1 && at[2].x === 2 && at[2].y === -2 && at[3].x === -2 && at[3].y === -2) { + return decodeBitmapTemplate0(width, height, decodingContext); + } + + var useskip = !!skip; + var template = CodingTemplates[templateIndex].concat(at); + template.sort(function (a, b) { + return a.y - b.y || a.x - b.x; + }); + var templateLength = template.length; + var templateX = new Int8Array(templateLength); + var templateY = new Int8Array(templateLength); + var changingTemplateEntries = []; + var reuseMask = 0, + minX = 0, + maxX = 0, + minY = 0; + var c, k; + + for (k = 0; k < templateLength; k++) { + templateX[k] = template[k].x; + templateY[k] = template[k].y; + minX = Math.min(minX, template[k].x); + maxX = Math.max(maxX, template[k].x); + minY = Math.min(minY, template[k].y); + + if (k < templateLength - 1 && template[k].y === template[k + 1].y && template[k].x === template[k + 1].x - 1) { + reuseMask |= 1 << templateLength - 1 - k; + } else { + changingTemplateEntries.push(k); + } + } + + var changingEntriesLength = changingTemplateEntries.length; + var changingTemplateX = new Int8Array(changingEntriesLength); + var changingTemplateY = new Int8Array(changingEntriesLength); + var changingTemplateBit = new Uint16Array(changingEntriesLength); + + for (c = 0; c < changingEntriesLength; c++) { + k = changingTemplateEntries[c]; + changingTemplateX[c] = template[k].x; + changingTemplateY[c] = template[k].y; + changingTemplateBit[c] = 1 << templateLength - 1 - k; + } + + var sbb_left = -minX; + var sbb_top = -minY; + var sbb_right = width - maxX; + var pseudoPixelContext = ReusedContexts[templateIndex]; + var row = new Uint8Array(width); + var bitmap = []; + var decoder = decodingContext.decoder; + var contexts = decodingContext.contextCache.getContexts("GB"); + var ltp = 0, + j, + i0, + j0, + contextLabel = 0, + bit, + shift; + + for (var i = 0; i < height; i++) { + if (prediction) { + var sltp = decoder.readBit(contexts, pseudoPixelContext); + ltp ^= sltp; + + if (ltp) { + bitmap.push(row); + continue; + } + } + + row = new Uint8Array(row); + bitmap.push(row); + + for (j = 0; j < width; j++) { + if (useskip && skip[i][j]) { + row[j] = 0; + continue; + } + + if (j >= sbb_left && j < sbb_right && i >= sbb_top) { + contextLabel = contextLabel << 1 & reuseMask; + + for (k = 0; k < changingEntriesLength; k++) { + i0 = i + changingTemplateY[k]; + j0 = j + changingTemplateX[k]; + bit = bitmap[i0][j0]; + + if (bit) { + bit = changingTemplateBit[k]; + contextLabel |= bit; + } + } + } else { + contextLabel = 0; + shift = templateLength - 1; + + for (k = 0; k < templateLength; k++, shift--) { + j0 = j + templateX[k]; + + if (j0 >= 0 && j0 < width) { + i0 = i + templateY[k]; + + if (i0 >= 0) { + bit = bitmap[i0][j0]; + + if (bit) { + contextLabel |= bit << shift; + } + } + } + } + } + + var pixel = decoder.readBit(contexts, contextLabel); + row[j] = pixel; + } + } + + return bitmap; + } + + function decodeRefinement(width, height, templateIndex, referenceBitmap, offsetX, offsetY, prediction, at, decodingContext) { + var codingTemplate = RefinementTemplates[templateIndex].coding; + + if (templateIndex === 0) { + codingTemplate = codingTemplate.concat([at[0]]); + } + + var codingTemplateLength = codingTemplate.length; + var codingTemplateX = new Int32Array(codingTemplateLength); + var codingTemplateY = new Int32Array(codingTemplateLength); + var k; + + for (k = 0; k < codingTemplateLength; k++) { + codingTemplateX[k] = codingTemplate[k].x; + codingTemplateY[k] = codingTemplate[k].y; + } + + var referenceTemplate = RefinementTemplates[templateIndex].reference; + + if (templateIndex === 0) { + referenceTemplate = referenceTemplate.concat([at[1]]); + } + + var referenceTemplateLength = referenceTemplate.length; + var referenceTemplateX = new Int32Array(referenceTemplateLength); + var referenceTemplateY = new Int32Array(referenceTemplateLength); + + for (k = 0; k < referenceTemplateLength; k++) { + referenceTemplateX[k] = referenceTemplate[k].x; + referenceTemplateY[k] = referenceTemplate[k].y; + } + + var referenceWidth = referenceBitmap[0].length; + var referenceHeight = referenceBitmap.length; + var pseudoPixelContext = RefinementReusedContexts[templateIndex]; + var bitmap = []; + var decoder = decodingContext.decoder; + var contexts = decodingContext.contextCache.getContexts("GR"); + var ltp = 0; + + for (var i = 0; i < height; i++) { + if (prediction) { + var sltp = decoder.readBit(contexts, pseudoPixelContext); + ltp ^= sltp; + + if (ltp) { + throw new Jbig2Error("prediction is not supported"); + } + } + + var row = new Uint8Array(width); + bitmap.push(row); + + for (var j = 0; j < width; j++) { + var i0, j0; + var contextLabel = 0; + + for (k = 0; k < codingTemplateLength; k++) { + i0 = i + codingTemplateY[k]; + j0 = j + codingTemplateX[k]; + + if (i0 < 0 || j0 < 0 || j0 >= width) { + contextLabel <<= 1; + } else { + contextLabel = contextLabel << 1 | bitmap[i0][j0]; + } + } + + for (k = 0; k < referenceTemplateLength; k++) { + i0 = i + referenceTemplateY[k] - offsetY; + j0 = j + referenceTemplateX[k] - offsetX; + + if (i0 < 0 || i0 >= referenceHeight || j0 < 0 || j0 >= referenceWidth) { + contextLabel <<= 1; + } else { + contextLabel = contextLabel << 1 | referenceBitmap[i0][j0]; + } + } + + var pixel = decoder.readBit(contexts, contextLabel); + row[j] = pixel; + } + } + + return bitmap; + } + + function decodeSymbolDictionary(huffman, refinement, symbols, numberOfNewSymbols, numberOfExportedSymbols, huffmanTables, templateIndex, at, refinementTemplateIndex, refinementAt, decodingContext, huffmanInput) { + if (huffman && refinement) { + throw new Jbig2Error("symbol refinement with Huffman is not supported"); + } + + var newSymbols = []; + var currentHeight = 0; + var symbolCodeLength = (0, _core_utils.log2)(symbols.length + numberOfNewSymbols); + var decoder = decodingContext.decoder; + var contextCache = decodingContext.contextCache; + let tableB1, symbolWidths; + + if (huffman) { + tableB1 = getStandardTable(1); + symbolWidths = []; + symbolCodeLength = Math.max(symbolCodeLength, 1); + } + + while (newSymbols.length < numberOfNewSymbols) { + var deltaHeight = huffman ? huffmanTables.tableDeltaHeight.decode(huffmanInput) : decodeInteger(contextCache, "IADH", decoder); + currentHeight += deltaHeight; + let currentWidth = 0, + totalWidth = 0; + const firstSymbol = huffman ? symbolWidths.length : 0; + + while (true) { + var deltaWidth = huffman ? huffmanTables.tableDeltaWidth.decode(huffmanInput) : decodeInteger(contextCache, "IADW", decoder); + + if (deltaWidth === null) { + break; + } + + currentWidth += deltaWidth; + totalWidth += currentWidth; + var bitmap; + + if (refinement) { + var numberOfInstances = decodeInteger(contextCache, "IAAI", decoder); + + if (numberOfInstances > 1) { + bitmap = decodeTextRegion(huffman, refinement, currentWidth, currentHeight, 0, numberOfInstances, 1, symbols.concat(newSymbols), symbolCodeLength, 0, 0, 1, 0, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext, 0, huffmanInput); + } else { + var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength); + var rdx = decodeInteger(contextCache, "IARDX", decoder); + var rdy = decodeInteger(contextCache, "IARDY", decoder); + var symbol = symbolId < symbols.length ? symbols[symbolId] : newSymbols[symbolId - symbols.length]; + bitmap = decodeRefinement(currentWidth, currentHeight, refinementTemplateIndex, symbol, rdx, rdy, false, refinementAt, decodingContext); + } + + newSymbols.push(bitmap); + } else if (huffman) { + symbolWidths.push(currentWidth); + } else { + bitmap = decodeBitmap(false, currentWidth, currentHeight, templateIndex, false, null, at, decodingContext); + newSymbols.push(bitmap); + } + } + + if (huffman && !refinement) { + const bitmapSize = huffmanTables.tableBitmapSize.decode(huffmanInput); + huffmanInput.byteAlign(); + let collectiveBitmap; + + if (bitmapSize === 0) { + collectiveBitmap = readUncompressedBitmap(huffmanInput, totalWidth, currentHeight); + } else { + const originalEnd = huffmanInput.end; + const bitmapEnd = huffmanInput.position + bitmapSize; + huffmanInput.end = bitmapEnd; + collectiveBitmap = decodeMMRBitmap(huffmanInput, totalWidth, currentHeight, false); + huffmanInput.end = originalEnd; + huffmanInput.position = bitmapEnd; + } + + const numberOfSymbolsDecoded = symbolWidths.length; + + if (firstSymbol === numberOfSymbolsDecoded - 1) { + newSymbols.push(collectiveBitmap); + } else { + let i, + y, + xMin = 0, + xMax, + bitmapWidth, + symbolBitmap; + + for (i = firstSymbol; i < numberOfSymbolsDecoded; i++) { + bitmapWidth = symbolWidths[i]; + xMax = xMin + bitmapWidth; + symbolBitmap = []; + + for (y = 0; y < currentHeight; y++) { + symbolBitmap.push(collectiveBitmap[y].subarray(xMin, xMax)); + } + + newSymbols.push(symbolBitmap); + xMin = xMax; + } + } + } + } + + var exportedSymbols = []; + var flags = [], + currentFlag = false; + var totalSymbolsLength = symbols.length + numberOfNewSymbols; + + while (flags.length < totalSymbolsLength) { + var runLength = huffman ? tableB1.decode(huffmanInput) : decodeInteger(contextCache, "IAEX", decoder); + + while (runLength--) { + flags.push(currentFlag); + } + + currentFlag = !currentFlag; + } + + for (var i = 0, ii = symbols.length; i < ii; i++) { + if (flags[i]) { + exportedSymbols.push(symbols[i]); + } + } + + for (var j = 0; j < numberOfNewSymbols; i++, j++) { + if (flags[i]) { + exportedSymbols.push(newSymbols[j]); + } + } + + return exportedSymbols; + } + + function decodeTextRegion(huffman, refinement, width, height, defaultPixelValue, numberOfSymbolInstances, stripSize, inputSymbols, symbolCodeLength, transposed, dsOffset, referenceCorner, combinationOperator, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext, logStripSize, huffmanInput) { + if (huffman && refinement) { + throw new Jbig2Error("refinement with Huffman is not supported"); + } + + var bitmap = []; + var i, row; + + for (i = 0; i < height; i++) { + row = new Uint8Array(width); + + if (defaultPixelValue) { + for (var j = 0; j < width; j++) { + row[j] = defaultPixelValue; + } + } + + bitmap.push(row); + } + + var decoder = decodingContext.decoder; + var contextCache = decodingContext.contextCache; + var stripT = huffman ? -huffmanTables.tableDeltaT.decode(huffmanInput) : -decodeInteger(contextCache, "IADT", decoder); + var firstS = 0; + i = 0; + + while (i < numberOfSymbolInstances) { + var deltaT = huffman ? huffmanTables.tableDeltaT.decode(huffmanInput) : decodeInteger(contextCache, "IADT", decoder); + stripT += deltaT; + var deltaFirstS = huffman ? huffmanTables.tableFirstS.decode(huffmanInput) : decodeInteger(contextCache, "IAFS", decoder); + firstS += deltaFirstS; + var currentS = firstS; + + do { + let currentT = 0; + + if (stripSize > 1) { + currentT = huffman ? huffmanInput.readBits(logStripSize) : decodeInteger(contextCache, "IAIT", decoder); + } + + var t = stripSize * stripT + currentT; + var symbolId = huffman ? huffmanTables.symbolIDTable.decode(huffmanInput) : decodeIAID(contextCache, decoder, symbolCodeLength); + var applyRefinement = refinement && (huffman ? huffmanInput.readBit() : decodeInteger(contextCache, "IARI", decoder)); + var symbolBitmap = inputSymbols[symbolId]; + var symbolWidth = symbolBitmap[0].length; + var symbolHeight = symbolBitmap.length; + + if (applyRefinement) { + var rdw = decodeInteger(contextCache, "IARDW", decoder); + var rdh = decodeInteger(contextCache, "IARDH", decoder); + var rdx = decodeInteger(contextCache, "IARDX", decoder); + var rdy = decodeInteger(contextCache, "IARDY", decoder); + symbolWidth += rdw; + symbolHeight += rdh; + symbolBitmap = decodeRefinement(symbolWidth, symbolHeight, refinementTemplateIndex, symbolBitmap, (rdw >> 1) + rdx, (rdh >> 1) + rdy, false, refinementAt, decodingContext); + } + + var offsetT = t - (referenceCorner & 1 ? 0 : symbolHeight - 1); + var offsetS = currentS - (referenceCorner & 2 ? symbolWidth - 1 : 0); + var s2, t2, symbolRow; + + if (transposed) { + for (s2 = 0; s2 < symbolHeight; s2++) { + row = bitmap[offsetS + s2]; + + if (!row) { + continue; + } + + symbolRow = symbolBitmap[s2]; + var maxWidth = Math.min(width - offsetT, symbolWidth); + + switch (combinationOperator) { + case 0: + for (t2 = 0; t2 < maxWidth; t2++) { + row[offsetT + t2] |= symbolRow[t2]; + } + + break; + + case 2: + for (t2 = 0; t2 < maxWidth; t2++) { + row[offsetT + t2] ^= symbolRow[t2]; + } + + break; + + default: + throw new Jbig2Error(`operator ${combinationOperator} is not supported`); + } + } + + currentS += symbolHeight - 1; + } else { + for (t2 = 0; t2 < symbolHeight; t2++) { + row = bitmap[offsetT + t2]; + + if (!row) { + continue; + } + + symbolRow = symbolBitmap[t2]; + + switch (combinationOperator) { + case 0: + for (s2 = 0; s2 < symbolWidth; s2++) { + row[offsetS + s2] |= symbolRow[s2]; + } + + break; + + case 2: + for (s2 = 0; s2 < symbolWidth; s2++) { + row[offsetS + s2] ^= symbolRow[s2]; + } + + break; + + default: + throw new Jbig2Error(`operator ${combinationOperator} is not supported`); + } + } + + currentS += symbolWidth - 1; + } + + i++; + var deltaS = huffman ? huffmanTables.tableDeltaS.decode(huffmanInput) : decodeInteger(contextCache, "IADS", decoder); + + if (deltaS === null) { + break; + } + + currentS += deltaS + dsOffset; + } while (true); + } + + return bitmap; + } + + function decodePatternDictionary(mmr, patternWidth, patternHeight, maxPatternIndex, template, decodingContext) { + const at = []; + + if (!mmr) { + at.push({ + x: -patternWidth, + y: 0 + }); + + if (template === 0) { + at.push({ + x: -3, + y: -1 + }); + at.push({ + x: 2, + y: -2 + }); + at.push({ + x: -2, + y: -2 + }); + } + } + + const collectiveWidth = (maxPatternIndex + 1) * patternWidth; + const collectiveBitmap = decodeBitmap(mmr, collectiveWidth, patternHeight, template, false, null, at, decodingContext); + const patterns = []; + + for (let i = 0; i <= maxPatternIndex; i++) { + const patternBitmap = []; + const xMin = patternWidth * i; + const xMax = xMin + patternWidth; + + for (let y = 0; y < patternHeight; y++) { + patternBitmap.push(collectiveBitmap[y].subarray(xMin, xMax)); + } + + patterns.push(patternBitmap); + } + + return patterns; + } + + function decodeHalftoneRegion(mmr, patterns, template, regionWidth, regionHeight, defaultPixelValue, enableSkip, combinationOperator, gridWidth, gridHeight, gridOffsetX, gridOffsetY, gridVectorX, gridVectorY, decodingContext) { + const skip = null; + + if (enableSkip) { + throw new Jbig2Error("skip is not supported"); + } + + if (combinationOperator !== 0) { + throw new Jbig2Error("operator " + combinationOperator + " is not supported in halftone region"); + } + + const regionBitmap = []; + let i, j, row; + + for (i = 0; i < regionHeight; i++) { + row = new Uint8Array(regionWidth); + + if (defaultPixelValue) { + for (j = 0; j < regionWidth; j++) { + row[j] = defaultPixelValue; + } + } + + regionBitmap.push(row); + } + + const numberOfPatterns = patterns.length; + const pattern0 = patterns[0]; + const patternWidth = pattern0[0].length, + patternHeight = pattern0.length; + const bitsPerValue = (0, _core_utils.log2)(numberOfPatterns); + const at = []; + + if (!mmr) { + at.push({ + x: template <= 1 ? 3 : 2, + y: -1 + }); + + if (template === 0) { + at.push({ + x: -3, + y: -1 + }); + at.push({ + x: 2, + y: -2 + }); + at.push({ + x: -2, + y: -2 + }); + } + } + + const grayScaleBitPlanes = []; + let mmrInput, bitmap; + + if (mmr) { + mmrInput = new Reader(decodingContext.data, decodingContext.start, decodingContext.end); + } + + for (i = bitsPerValue - 1; i >= 0; i--) { + if (mmr) { + bitmap = decodeMMRBitmap(mmrInput, gridWidth, gridHeight, true); + } else { + bitmap = decodeBitmap(false, gridWidth, gridHeight, template, false, skip, at, decodingContext); + } + + grayScaleBitPlanes[i] = bitmap; + } + + let mg, ng, bit, patternIndex, patternBitmap, x, y, patternRow, regionRow; + + for (mg = 0; mg < gridHeight; mg++) { + for (ng = 0; ng < gridWidth; ng++) { + bit = 0; + patternIndex = 0; + + for (j = bitsPerValue - 1; j >= 0; j--) { + bit = grayScaleBitPlanes[j][mg][ng] ^ bit; + patternIndex |= bit << j; + } + + patternBitmap = patterns[patternIndex]; + x = gridOffsetX + mg * gridVectorY + ng * gridVectorX >> 8; + y = gridOffsetY + mg * gridVectorX - ng * gridVectorY >> 8; + + if (x >= 0 && x + patternWidth <= regionWidth && y >= 0 && y + patternHeight <= regionHeight) { + for (i = 0; i < patternHeight; i++) { + regionRow = regionBitmap[y + i]; + patternRow = patternBitmap[i]; + + for (j = 0; j < patternWidth; j++) { + regionRow[x + j] |= patternRow[j]; + } + } + } else { + let regionX, regionY; + + for (i = 0; i < patternHeight; i++) { + regionY = y + i; + + if (regionY < 0 || regionY >= regionHeight) { + continue; + } + + regionRow = regionBitmap[regionY]; + patternRow = patternBitmap[i]; + + for (j = 0; j < patternWidth; j++) { + regionX = x + j; + + if (regionX >= 0 && regionX < regionWidth) { + regionRow[regionX] |= patternRow[j]; + } + } + } + } + } + } + + return regionBitmap; + } + + function readSegmentHeader(data, start) { + var segmentHeader = {}; + segmentHeader.number = (0, _core_utils.readUint32)(data, start); + var flags = data[start + 4]; + var segmentType = flags & 0x3f; + + if (!SegmentTypes[segmentType]) { + throw new Jbig2Error("invalid segment type: " + segmentType); + } + + segmentHeader.type = segmentType; + segmentHeader.typeName = SegmentTypes[segmentType]; + segmentHeader.deferredNonRetain = !!(flags & 0x80); + var pageAssociationFieldSize = !!(flags & 0x40); + var referredFlags = data[start + 5]; + var referredToCount = referredFlags >> 5 & 7; + var retainBits = [referredFlags & 31]; + var position = start + 6; + + if (referredFlags === 7) { + referredToCount = (0, _core_utils.readUint32)(data, position - 1) & 0x1fffffff; + position += 3; + var bytes = referredToCount + 7 >> 3; + retainBits[0] = data[position++]; + + while (--bytes > 0) { + retainBits.push(data[position++]); + } + } else if (referredFlags === 5 || referredFlags === 6) { + throw new Jbig2Error("invalid referred-to flags"); + } + + segmentHeader.retainBits = retainBits; + let referredToSegmentNumberSize = 4; + + if (segmentHeader.number <= 256) { + referredToSegmentNumberSize = 1; + } else if (segmentHeader.number <= 65536) { + referredToSegmentNumberSize = 2; + } + + var referredTo = []; + var i, ii; + + for (i = 0; i < referredToCount; i++) { + let number; + + if (referredToSegmentNumberSize === 1) { + number = data[position]; + } else if (referredToSegmentNumberSize === 2) { + number = (0, _core_utils.readUint16)(data, position); + } else { + number = (0, _core_utils.readUint32)(data, position); + } + + referredTo.push(number); + position += referredToSegmentNumberSize; + } + + segmentHeader.referredTo = referredTo; + + if (!pageAssociationFieldSize) { + segmentHeader.pageAssociation = data[position++]; + } else { + segmentHeader.pageAssociation = (0, _core_utils.readUint32)(data, position); + position += 4; + } + + segmentHeader.length = (0, _core_utils.readUint32)(data, position); + position += 4; + + if (segmentHeader.length === 0xffffffff) { + if (segmentType === 38) { + var genericRegionInfo = readRegionSegmentInformation(data, position); + var genericRegionSegmentFlags = data[position + RegionSegmentInformationFieldLength]; + var genericRegionMmr = !!(genericRegionSegmentFlags & 1); + var searchPatternLength = 6; + var searchPattern = new Uint8Array(searchPatternLength); + + if (!genericRegionMmr) { + searchPattern[0] = 0xff; + searchPattern[1] = 0xac; + } + + searchPattern[2] = genericRegionInfo.height >>> 24 & 0xff; + searchPattern[3] = genericRegionInfo.height >> 16 & 0xff; + searchPattern[4] = genericRegionInfo.height >> 8 & 0xff; + searchPattern[5] = genericRegionInfo.height & 0xff; + + for (i = position, ii = data.length; i < ii; i++) { + var j = 0; + + while (j < searchPatternLength && searchPattern[j] === data[i + j]) { + j++; + } + + if (j === searchPatternLength) { + segmentHeader.length = i + searchPatternLength; + break; + } + } + + if (segmentHeader.length === 0xffffffff) { + throw new Jbig2Error("segment end was not found"); + } + } else { + throw new Jbig2Error("invalid unknown segment length"); + } + } + + segmentHeader.headerEnd = position; + return segmentHeader; + } + + function readSegments(header, data, start, end) { + var segments = []; + var position = start; + + while (position < end) { + var segmentHeader = readSegmentHeader(data, position); + position = segmentHeader.headerEnd; + var segment = { + header: segmentHeader, + data + }; + + if (!header.randomAccess) { + segment.start = position; + position += segmentHeader.length; + segment.end = position; + } + + segments.push(segment); + + if (segmentHeader.type === 51) { + break; + } + } + + if (header.randomAccess) { + for (var i = 0, ii = segments.length; i < ii; i++) { + segments[i].start = position; + position += segments[i].header.length; + segments[i].end = position; + } + } + + return segments; + } + + function readRegionSegmentInformation(data, start) { + return { + width: (0, _core_utils.readUint32)(data, start), + height: (0, _core_utils.readUint32)(data, start + 4), + x: (0, _core_utils.readUint32)(data, start + 8), + y: (0, _core_utils.readUint32)(data, start + 12), + combinationOperator: data[start + 16] & 7 + }; + } + + var RegionSegmentInformationFieldLength = 17; + + function processSegment(segment, visitor) { + var header = segment.header; + var data = segment.data, + position = segment.start, + end = segment.end; + var args, at, i, atLength; + + switch (header.type) { + case 0: + var dictionary = {}; + var dictionaryFlags = (0, _core_utils.readUint16)(data, position); + dictionary.huffman = !!(dictionaryFlags & 1); + dictionary.refinement = !!(dictionaryFlags & 2); + dictionary.huffmanDHSelector = dictionaryFlags >> 2 & 3; + dictionary.huffmanDWSelector = dictionaryFlags >> 4 & 3; + dictionary.bitmapSizeSelector = dictionaryFlags >> 6 & 1; + dictionary.aggregationInstancesSelector = dictionaryFlags >> 7 & 1; + dictionary.bitmapCodingContextUsed = !!(dictionaryFlags & 256); + dictionary.bitmapCodingContextRetained = !!(dictionaryFlags & 512); + dictionary.template = dictionaryFlags >> 10 & 3; + dictionary.refinementTemplate = dictionaryFlags >> 12 & 1; + position += 2; + + if (!dictionary.huffman) { + atLength = dictionary.template === 0 ? 4 : 1; + at = []; + + for (i = 0; i < atLength; i++) { + at.push({ + x: (0, _core_utils.readInt8)(data, position), + y: (0, _core_utils.readInt8)(data, position + 1) + }); + position += 2; + } + + dictionary.at = at; + } + + if (dictionary.refinement && !dictionary.refinementTemplate) { + at = []; + + for (i = 0; i < 2; i++) { + at.push({ + x: (0, _core_utils.readInt8)(data, position), + y: (0, _core_utils.readInt8)(data, position + 1) + }); + position += 2; + } + + dictionary.refinementAt = at; + } + + dictionary.numberOfExportedSymbols = (0, _core_utils.readUint32)(data, position); + position += 4; + dictionary.numberOfNewSymbols = (0, _core_utils.readUint32)(data, position); + position += 4; + args = [dictionary, header.number, header.referredTo, data, position, end]; + break; + + case 6: + case 7: + var textRegion = {}; + textRegion.info = readRegionSegmentInformation(data, position); + position += RegionSegmentInformationFieldLength; + var textRegionSegmentFlags = (0, _core_utils.readUint16)(data, position); + position += 2; + textRegion.huffman = !!(textRegionSegmentFlags & 1); + textRegion.refinement = !!(textRegionSegmentFlags & 2); + textRegion.logStripSize = textRegionSegmentFlags >> 2 & 3; + textRegion.stripSize = 1 << textRegion.logStripSize; + textRegion.referenceCorner = textRegionSegmentFlags >> 4 & 3; + textRegion.transposed = !!(textRegionSegmentFlags & 64); + textRegion.combinationOperator = textRegionSegmentFlags >> 7 & 3; + textRegion.defaultPixelValue = textRegionSegmentFlags >> 9 & 1; + textRegion.dsOffset = textRegionSegmentFlags << 17 >> 27; + textRegion.refinementTemplate = textRegionSegmentFlags >> 15 & 1; + + if (textRegion.huffman) { + var textRegionHuffmanFlags = (0, _core_utils.readUint16)(data, position); + position += 2; + textRegion.huffmanFS = textRegionHuffmanFlags & 3; + textRegion.huffmanDS = textRegionHuffmanFlags >> 2 & 3; + textRegion.huffmanDT = textRegionHuffmanFlags >> 4 & 3; + textRegion.huffmanRefinementDW = textRegionHuffmanFlags >> 6 & 3; + textRegion.huffmanRefinementDH = textRegionHuffmanFlags >> 8 & 3; + textRegion.huffmanRefinementDX = textRegionHuffmanFlags >> 10 & 3; + textRegion.huffmanRefinementDY = textRegionHuffmanFlags >> 12 & 3; + textRegion.huffmanRefinementSizeSelector = !!(textRegionHuffmanFlags & 0x4000); + } + + if (textRegion.refinement && !textRegion.refinementTemplate) { + at = []; + + for (i = 0; i < 2; i++) { + at.push({ + x: (0, _core_utils.readInt8)(data, position), + y: (0, _core_utils.readInt8)(data, position + 1) + }); + position += 2; + } + + textRegion.refinementAt = at; + } + + textRegion.numberOfSymbolInstances = (0, _core_utils.readUint32)(data, position); + position += 4; + args = [textRegion, header.referredTo, data, position, end]; + break; + + case 16: + const patternDictionary = {}; + const patternDictionaryFlags = data[position++]; + patternDictionary.mmr = !!(patternDictionaryFlags & 1); + patternDictionary.template = patternDictionaryFlags >> 1 & 3; + patternDictionary.patternWidth = data[position++]; + patternDictionary.patternHeight = data[position++]; + patternDictionary.maxPatternIndex = (0, _core_utils.readUint32)(data, position); + position += 4; + args = [patternDictionary, header.number, data, position, end]; + break; + + case 22: + case 23: + const halftoneRegion = {}; + halftoneRegion.info = readRegionSegmentInformation(data, position); + position += RegionSegmentInformationFieldLength; + const halftoneRegionFlags = data[position++]; + halftoneRegion.mmr = !!(halftoneRegionFlags & 1); + halftoneRegion.template = halftoneRegionFlags >> 1 & 3; + halftoneRegion.enableSkip = !!(halftoneRegionFlags & 8); + halftoneRegion.combinationOperator = halftoneRegionFlags >> 4 & 7; + halftoneRegion.defaultPixelValue = halftoneRegionFlags >> 7 & 1; + halftoneRegion.gridWidth = (0, _core_utils.readUint32)(data, position); + position += 4; + halftoneRegion.gridHeight = (0, _core_utils.readUint32)(data, position); + position += 4; + halftoneRegion.gridOffsetX = (0, _core_utils.readUint32)(data, position) & 0xffffffff; + position += 4; + halftoneRegion.gridOffsetY = (0, _core_utils.readUint32)(data, position) & 0xffffffff; + position += 4; + halftoneRegion.gridVectorX = (0, _core_utils.readUint16)(data, position); + position += 2; + halftoneRegion.gridVectorY = (0, _core_utils.readUint16)(data, position); + position += 2; + args = [halftoneRegion, header.referredTo, data, position, end]; + break; + + case 38: + case 39: + var genericRegion = {}; + genericRegion.info = readRegionSegmentInformation(data, position); + position += RegionSegmentInformationFieldLength; + var genericRegionSegmentFlags = data[position++]; + genericRegion.mmr = !!(genericRegionSegmentFlags & 1); + genericRegion.template = genericRegionSegmentFlags >> 1 & 3; + genericRegion.prediction = !!(genericRegionSegmentFlags & 8); + + if (!genericRegion.mmr) { + atLength = genericRegion.template === 0 ? 4 : 1; + at = []; + + for (i = 0; i < atLength; i++) { + at.push({ + x: (0, _core_utils.readInt8)(data, position), + y: (0, _core_utils.readInt8)(data, position + 1) + }); + position += 2; + } + + genericRegion.at = at; + } + + args = [genericRegion, data, position, end]; + break; + + case 48: + var pageInfo = { + width: (0, _core_utils.readUint32)(data, position), + height: (0, _core_utils.readUint32)(data, position + 4), + resolutionX: (0, _core_utils.readUint32)(data, position + 8), + resolutionY: (0, _core_utils.readUint32)(data, position + 12) + }; + + if (pageInfo.height === 0xffffffff) { + delete pageInfo.height; + } + + var pageSegmentFlags = data[position + 16]; + (0, _core_utils.readUint16)(data, position + 17); + pageInfo.lossless = !!(pageSegmentFlags & 1); + pageInfo.refinement = !!(pageSegmentFlags & 2); + pageInfo.defaultPixelValue = pageSegmentFlags >> 2 & 1; + pageInfo.combinationOperator = pageSegmentFlags >> 3 & 3; + pageInfo.requiresBuffer = !!(pageSegmentFlags & 32); + pageInfo.combinationOperatorOverride = !!(pageSegmentFlags & 64); + args = [pageInfo]; + break; + + case 49: + break; + + case 50: + break; + + case 51: + break; + + case 53: + args = [header.number, data, position, end]; + break; + + case 62: + break; + + default: + throw new Jbig2Error(`segment type ${header.typeName}(${header.type})` + " is not implemented"); + } + + var callbackName = "on" + header.typeName; + + if (callbackName in visitor) { + visitor[callbackName].apply(visitor, args); + } + } + + function processSegments(segments, visitor) { + for (var i = 0, ii = segments.length; i < ii; i++) { + processSegment(segments[i], visitor); + } + } + + function parseJbig2Chunks(chunks) { + var visitor = new SimpleSegmentVisitor(); + + for (var i = 0, ii = chunks.length; i < ii; i++) { + var chunk = chunks[i]; + var segments = readSegments({}, chunk.data, chunk.start, chunk.end); + processSegments(segments, visitor); + } + + return visitor.buffer; + } + + function parseJbig2(data) { + const end = data.length; + let position = 0; + + if (data[position] !== 0x97 || data[position + 1] !== 0x4a || data[position + 2] !== 0x42 || data[position + 3] !== 0x32 || data[position + 4] !== 0x0d || data[position + 5] !== 0x0a || data[position + 6] !== 0x1a || data[position + 7] !== 0x0a) { + throw new Jbig2Error("parseJbig2 - invalid header."); + } + + const header = Object.create(null); + position += 8; + const flags = data[position++]; + header.randomAccess = !(flags & 1); + + if (!(flags & 2)) { + header.numberOfPages = (0, _core_utils.readUint32)(data, position); + position += 4; + } + + const segments = readSegments(header, data, position, end); + const visitor = new SimpleSegmentVisitor(); + processSegments(segments, visitor); + const { + width, + height + } = visitor.currentPageInfo; + const bitPacked = visitor.buffer; + const imgData = new Uint8ClampedArray(width * height); + let q = 0, + k = 0; + + for (let i = 0; i < height; i++) { + let mask = 0, + buffer; + + for (let j = 0; j < width; j++) { + if (!mask) { + mask = 128; + buffer = bitPacked[k++]; + } + + imgData[q++] = buffer & mask ? 0 : 255; + mask >>= 1; + } + } + + return { + imgData, + width, + height + }; + } + + function SimpleSegmentVisitor() {} + + SimpleSegmentVisitor.prototype = { + onPageInformation: function SimpleSegmentVisitor_onPageInformation(info) { + this.currentPageInfo = info; + var rowSize = info.width + 7 >> 3; + var buffer = new Uint8ClampedArray(rowSize * info.height); + + if (info.defaultPixelValue) { + for (var i = 0, ii = buffer.length; i < ii; i++) { + buffer[i] = 0xff; + } + } + + this.buffer = buffer; + }, + drawBitmap: function SimpleSegmentVisitor_drawBitmap(regionInfo, bitmap) { + var pageInfo = this.currentPageInfo; + var width = regionInfo.width, + height = regionInfo.height; + var rowSize = pageInfo.width + 7 >> 3; + var combinationOperator = pageInfo.combinationOperatorOverride ? regionInfo.combinationOperator : pageInfo.combinationOperator; + var buffer = this.buffer; + var mask0 = 128 >> (regionInfo.x & 7); + var offset0 = regionInfo.y * rowSize + (regionInfo.x >> 3); + var i, j, mask, offset; + + switch (combinationOperator) { + case 0: + for (i = 0; i < height; i++) { + mask = mask0; + offset = offset0; + + for (j = 0; j < width; j++) { + if (bitmap[i][j]) { + buffer[offset] |= mask; + } + + mask >>= 1; + + if (!mask) { + mask = 128; + offset++; + } + } + + offset0 += rowSize; + } + + break; + + case 2: + for (i = 0; i < height; i++) { + mask = mask0; + offset = offset0; + + for (j = 0; j < width; j++) { + if (bitmap[i][j]) { + buffer[offset] ^= mask; + } + + mask >>= 1; + + if (!mask) { + mask = 128; + offset++; + } + } + + offset0 += rowSize; + } + + break; + + default: + throw new Jbig2Error(`operator ${combinationOperator} is not supported`); + } + }, + onImmediateGenericRegion: function SimpleSegmentVisitor_onImmediateGenericRegion(region, data, start, end) { + var regionInfo = region.info; + var decodingContext = new DecodingContext(data, start, end); + var bitmap = decodeBitmap(region.mmr, regionInfo.width, regionInfo.height, region.template, region.prediction, null, region.at, decodingContext); + this.drawBitmap(regionInfo, bitmap); + }, + onImmediateLosslessGenericRegion: function SimpleSegmentVisitor_onImmediateLosslessGenericRegion() { + this.onImmediateGenericRegion.apply(this, arguments); + }, + onSymbolDictionary: function SimpleSegmentVisitor_onSymbolDictionary(dictionary, currentSegment, referredSegments, data, start, end) { + let huffmanTables, huffmanInput; + + if (dictionary.huffman) { + huffmanTables = getSymbolDictionaryHuffmanTables(dictionary, referredSegments, this.customTables); + huffmanInput = new Reader(data, start, end); + } + + var symbols = this.symbols; + + if (!symbols) { + this.symbols = symbols = {}; + } + + var inputSymbols = []; + + for (var i = 0, ii = referredSegments.length; i < ii; i++) { + const referredSymbols = symbols[referredSegments[i]]; + + if (referredSymbols) { + inputSymbols = inputSymbols.concat(referredSymbols); + } + } + + var decodingContext = new DecodingContext(data, start, end); + symbols[currentSegment] = decodeSymbolDictionary(dictionary.huffman, dictionary.refinement, inputSymbols, dictionary.numberOfNewSymbols, dictionary.numberOfExportedSymbols, huffmanTables, dictionary.template, dictionary.at, dictionary.refinementTemplate, dictionary.refinementAt, decodingContext, huffmanInput); + }, + onImmediateTextRegion: function SimpleSegmentVisitor_onImmediateTextRegion(region, referredSegments, data, start, end) { + var regionInfo = region.info; + let huffmanTables, huffmanInput; + var symbols = this.symbols; + var inputSymbols = []; + + for (var i = 0, ii = referredSegments.length; i < ii; i++) { + const referredSymbols = symbols[referredSegments[i]]; + + if (referredSymbols) { + inputSymbols = inputSymbols.concat(referredSymbols); + } + } + + var symbolCodeLength = (0, _core_utils.log2)(inputSymbols.length); + + if (region.huffman) { + huffmanInput = new Reader(data, start, end); + huffmanTables = getTextRegionHuffmanTables(region, referredSegments, this.customTables, inputSymbols.length, huffmanInput); + } + + var decodingContext = new DecodingContext(data, start, end); + var bitmap = decodeTextRegion(region.huffman, region.refinement, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.numberOfSymbolInstances, region.stripSize, inputSymbols, symbolCodeLength, region.transposed, region.dsOffset, region.referenceCorner, region.combinationOperator, huffmanTables, region.refinementTemplate, region.refinementAt, decodingContext, region.logStripSize, huffmanInput); + this.drawBitmap(regionInfo, bitmap); + }, + onImmediateLosslessTextRegion: function SimpleSegmentVisitor_onImmediateLosslessTextRegion() { + this.onImmediateTextRegion.apply(this, arguments); + }, + + onPatternDictionary(dictionary, currentSegment, data, start, end) { + let patterns = this.patterns; + + if (!patterns) { + this.patterns = patterns = {}; + } + + const decodingContext = new DecodingContext(data, start, end); + patterns[currentSegment] = decodePatternDictionary(dictionary.mmr, dictionary.patternWidth, dictionary.patternHeight, dictionary.maxPatternIndex, dictionary.template, decodingContext); + }, + + onImmediateHalftoneRegion(region, referredSegments, data, start, end) { + const patterns = this.patterns[referredSegments[0]]; + const regionInfo = region.info; + const decodingContext = new DecodingContext(data, start, end); + const bitmap = decodeHalftoneRegion(region.mmr, patterns, region.template, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.enableSkip, region.combinationOperator, region.gridWidth, region.gridHeight, region.gridOffsetX, region.gridOffsetY, region.gridVectorX, region.gridVectorY, decodingContext); + this.drawBitmap(regionInfo, bitmap); + }, + + onImmediateLosslessHalftoneRegion() { + this.onImmediateHalftoneRegion.apply(this, arguments); + }, + + onTables(currentSegment, data, start, end) { + let customTables = this.customTables; + + if (!customTables) { + this.customTables = customTables = {}; + } + + customTables[currentSegment] = decodeTablesSegment(data, start, end); + } + + }; + + function HuffmanLine(lineData) { + if (lineData.length === 2) { + this.isOOB = true; + this.rangeLow = 0; + this.prefixLength = lineData[0]; + this.rangeLength = 0; + this.prefixCode = lineData[1]; + this.isLowerRange = false; + } else { + this.isOOB = false; + this.rangeLow = lineData[0]; + this.prefixLength = lineData[1]; + this.rangeLength = lineData[2]; + this.prefixCode = lineData[3]; + this.isLowerRange = lineData[4] === "lower"; + } + } + + function HuffmanTreeNode(line) { + this.children = []; + + if (line) { + this.isLeaf = true; + this.rangeLength = line.rangeLength; + this.rangeLow = line.rangeLow; + this.isLowerRange = line.isLowerRange; + this.isOOB = line.isOOB; + } else { + this.isLeaf = false; + } + } + + HuffmanTreeNode.prototype = { + buildTree(line, shift) { + const bit = line.prefixCode >> shift & 1; + + if (shift <= 0) { + this.children[bit] = new HuffmanTreeNode(line); + } else { + let node = this.children[bit]; + + if (!node) { + this.children[bit] = node = new HuffmanTreeNode(null); + } + + node.buildTree(line, shift - 1); + } + }, + + decodeNode(reader) { + if (this.isLeaf) { + if (this.isOOB) { + return null; + } + + const htOffset = reader.readBits(this.rangeLength); + return this.rangeLow + (this.isLowerRange ? -htOffset : htOffset); + } + + const node = this.children[reader.readBit()]; + + if (!node) { + throw new Jbig2Error("invalid Huffman data"); + } + + return node.decodeNode(reader); + } + + }; + + function HuffmanTable(lines, prefixCodesDone) { + if (!prefixCodesDone) { + this.assignPrefixCodes(lines); + } + + this.rootNode = new HuffmanTreeNode(null); + + for (let i = 0, ii = lines.length; i < ii; i++) { + const line = lines[i]; + + if (line.prefixLength > 0) { + this.rootNode.buildTree(line, line.prefixLength - 1); + } + } + } + + HuffmanTable.prototype = { + decode(reader) { + return this.rootNode.decodeNode(reader); + }, + + assignPrefixCodes(lines) { + const linesLength = lines.length; + let prefixLengthMax = 0; + + for (let i = 0; i < linesLength; i++) { + prefixLengthMax = Math.max(prefixLengthMax, lines[i].prefixLength); + } + + const histogram = new Uint32Array(prefixLengthMax + 1); + + for (let i = 0; i < linesLength; i++) { + histogram[lines[i].prefixLength]++; + } + + let currentLength = 1, + firstCode = 0, + currentCode, + currentTemp, + line; + histogram[0] = 0; + + while (currentLength <= prefixLengthMax) { + firstCode = firstCode + histogram[currentLength - 1] << 1; + currentCode = firstCode; + currentTemp = 0; + + while (currentTemp < linesLength) { + line = lines[currentTemp]; + + if (line.prefixLength === currentLength) { + line.prefixCode = currentCode; + currentCode++; + } + + currentTemp++; + } + + currentLength++; + } + } + + }; + + function decodeTablesSegment(data, start, end) { + const flags = data[start]; + const lowestValue = (0, _core_utils.readUint32)(data, start + 1) & 0xffffffff; + const highestValue = (0, _core_utils.readUint32)(data, start + 5) & 0xffffffff; + const reader = new Reader(data, start + 9, end); + const prefixSizeBits = (flags >> 1 & 7) + 1; + const rangeSizeBits = (flags >> 4 & 7) + 1; + const lines = []; + let prefixLength, + rangeLength, + currentRangeLow = lowestValue; + + do { + prefixLength = reader.readBits(prefixSizeBits); + rangeLength = reader.readBits(rangeSizeBits); + lines.push(new HuffmanLine([currentRangeLow, prefixLength, rangeLength, 0])); + currentRangeLow += 1 << rangeLength; + } while (currentRangeLow < highestValue); + + prefixLength = reader.readBits(prefixSizeBits); + lines.push(new HuffmanLine([lowestValue - 1, prefixLength, 32, 0, "lower"])); + prefixLength = reader.readBits(prefixSizeBits); + lines.push(new HuffmanLine([highestValue, prefixLength, 32, 0])); + + if (flags & 1) { + prefixLength = reader.readBits(prefixSizeBits); + lines.push(new HuffmanLine([prefixLength, 0])); + } + + return new HuffmanTable(lines, false); + } + + const standardTablesCache = {}; + + function getStandardTable(number) { + let table = standardTablesCache[number]; + + if (table) { + return table; + } + + let lines; + + switch (number) { + case 1: + lines = [[0, 1, 4, 0x0], [16, 2, 8, 0x2], [272, 3, 16, 0x6], [65808, 3, 32, 0x7]]; + break; + + case 2: + lines = [[0, 1, 0, 0x0], [1, 2, 0, 0x2], [2, 3, 0, 0x6], [3, 4, 3, 0xe], [11, 5, 6, 0x1e], [75, 6, 32, 0x3e], [6, 0x3f]]; + break; + + case 3: + lines = [[-256, 8, 8, 0xfe], [0, 1, 0, 0x0], [1, 2, 0, 0x2], [2, 3, 0, 0x6], [3, 4, 3, 0xe], [11, 5, 6, 0x1e], [-257, 8, 32, 0xff, "lower"], [75, 7, 32, 0x7e], [6, 0x3e]]; + break; + + case 4: + lines = [[1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 0, 0x6], [4, 4, 3, 0xe], [12, 5, 6, 0x1e], [76, 5, 32, 0x1f]]; + break; + + case 5: + lines = [[-255, 7, 8, 0x7e], [1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 0, 0x6], [4, 4, 3, 0xe], [12, 5, 6, 0x1e], [-256, 7, 32, 0x7f, "lower"], [76, 6, 32, 0x3e]]; + break; + + case 6: + lines = [[-2048, 5, 10, 0x1c], [-1024, 4, 9, 0x8], [-512, 4, 8, 0x9], [-256, 4, 7, 0xa], [-128, 5, 6, 0x1d], [-64, 5, 5, 0x1e], [-32, 4, 5, 0xb], [0, 2, 7, 0x0], [128, 3, 7, 0x2], [256, 3, 8, 0x3], [512, 4, 9, 0xc], [1024, 4, 10, 0xd], [-2049, 6, 32, 0x3e, "lower"], [2048, 6, 32, 0x3f]]; + break; + + case 7: + lines = [[-1024, 4, 9, 0x8], [-512, 3, 8, 0x0], [-256, 4, 7, 0x9], [-128, 5, 6, 0x1a], [-64, 5, 5, 0x1b], [-32, 4, 5, 0xa], [0, 4, 5, 0xb], [32, 5, 5, 0x1c], [64, 5, 6, 0x1d], [128, 4, 7, 0xc], [256, 3, 8, 0x1], [512, 3, 9, 0x2], [1024, 3, 10, 0x3], [-1025, 5, 32, 0x1e, "lower"], [2048, 5, 32, 0x1f]]; + break; + + case 8: + lines = [[-15, 8, 3, 0xfc], [-7, 9, 1, 0x1fc], [-5, 8, 1, 0xfd], [-3, 9, 0, 0x1fd], [-2, 7, 0, 0x7c], [-1, 4, 0, 0xa], [0, 2, 1, 0x0], [2, 5, 0, 0x1a], [3, 6, 0, 0x3a], [4, 3, 4, 0x4], [20, 6, 1, 0x3b], [22, 4, 4, 0xb], [38, 4, 5, 0xc], [70, 5, 6, 0x1b], [134, 5, 7, 0x1c], [262, 6, 7, 0x3c], [390, 7, 8, 0x7d], [646, 6, 10, 0x3d], [-16, 9, 32, 0x1fe, "lower"], [1670, 9, 32, 0x1ff], [2, 0x1]]; + break; + + case 9: + lines = [[-31, 8, 4, 0xfc], [-15, 9, 2, 0x1fc], [-11, 8, 2, 0xfd], [-7, 9, 1, 0x1fd], [-5, 7, 1, 0x7c], [-3, 4, 1, 0xa], [-1, 3, 1, 0x2], [1, 3, 1, 0x3], [3, 5, 1, 0x1a], [5, 6, 1, 0x3a], [7, 3, 5, 0x4], [39, 6, 2, 0x3b], [43, 4, 5, 0xb], [75, 4, 6, 0xc], [139, 5, 7, 0x1b], [267, 5, 8, 0x1c], [523, 6, 8, 0x3c], [779, 7, 9, 0x7d], [1291, 6, 11, 0x3d], [-32, 9, 32, 0x1fe, "lower"], [3339, 9, 32, 0x1ff], [2, 0x0]]; + break; + + case 10: + lines = [[-21, 7, 4, 0x7a], [-5, 8, 0, 0xfc], [-4, 7, 0, 0x7b], [-3, 5, 0, 0x18], [-2, 2, 2, 0x0], [2, 5, 0, 0x19], [3, 6, 0, 0x36], [4, 7, 0, 0x7c], [5, 8, 0, 0xfd], [6, 2, 6, 0x1], [70, 5, 5, 0x1a], [102, 6, 5, 0x37], [134, 6, 6, 0x38], [198, 6, 7, 0x39], [326, 6, 8, 0x3a], [582, 6, 9, 0x3b], [1094, 6, 10, 0x3c], [2118, 7, 11, 0x7d], [-22, 8, 32, 0xfe, "lower"], [4166, 8, 32, 0xff], [2, 0x2]]; + break; + + case 11: + lines = [[1, 1, 0, 0x0], [2, 2, 1, 0x2], [4, 4, 0, 0xc], [5, 4, 1, 0xd], [7, 5, 1, 0x1c], [9, 5, 2, 0x1d], [13, 6, 2, 0x3c], [17, 7, 2, 0x7a], [21, 7, 3, 0x7b], [29, 7, 4, 0x7c], [45, 7, 5, 0x7d], [77, 7, 6, 0x7e], [141, 7, 32, 0x7f]]; + break; + + case 12: + lines = [[1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 1, 0x6], [5, 5, 0, 0x1c], [6, 5, 1, 0x1d], [8, 6, 1, 0x3c], [10, 7, 0, 0x7a], [11, 7, 1, 0x7b], [13, 7, 2, 0x7c], [17, 7, 3, 0x7d], [25, 7, 4, 0x7e], [41, 8, 5, 0xfe], [73, 8, 32, 0xff]]; + break; + + case 13: + lines = [[1, 1, 0, 0x0], [2, 3, 0, 0x4], [3, 4, 0, 0xc], [4, 5, 0, 0x1c], [5, 4, 1, 0xd], [7, 3, 3, 0x5], [15, 6, 1, 0x3a], [17, 6, 2, 0x3b], [21, 6, 3, 0x3c], [29, 6, 4, 0x3d], [45, 6, 5, 0x3e], [77, 7, 6, 0x7e], [141, 7, 32, 0x7f]]; + break; + + case 14: + lines = [[-2, 3, 0, 0x4], [-1, 3, 0, 0x5], [0, 1, 0, 0x0], [1, 3, 0, 0x6], [2, 3, 0, 0x7]]; + break; + + case 15: + lines = [[-24, 7, 4, 0x7c], [-8, 6, 2, 0x3c], [-4, 5, 1, 0x1c], [-2, 4, 0, 0xc], [-1, 3, 0, 0x4], [0, 1, 0, 0x0], [1, 3, 0, 0x5], [2, 4, 0, 0xd], [3, 5, 1, 0x1d], [5, 6, 2, 0x3d], [9, 7, 4, 0x7d], [-25, 7, 32, 0x7e, "lower"], [25, 7, 32, 0x7f]]; + break; + + default: + throw new Jbig2Error(`standard table B.${number} does not exist`); + } + + for (let i = 0, ii = lines.length; i < ii; i++) { + lines[i] = new HuffmanLine(lines[i]); + } + + table = new HuffmanTable(lines, true); + standardTablesCache[number] = table; + return table; + } + + function Reader(data, start, end) { + this.data = data; + this.start = start; + this.end = end; + this.position = start; + this.shift = -1; + this.currentByte = 0; + } + + Reader.prototype = { + readBit() { + if (this.shift < 0) { + if (this.position >= this.end) { + throw new Jbig2Error("end of data while reading bit"); + } + + this.currentByte = this.data[this.position++]; + this.shift = 7; + } + + const bit = this.currentByte >> this.shift & 1; + this.shift--; + return bit; + }, + + readBits(numBits) { + let result = 0, + i; + + for (i = numBits - 1; i >= 0; i--) { + result |= this.readBit() << i; + } + + return result; + }, + + byteAlign() { + this.shift = -1; + }, + + next() { + if (this.position >= this.end) { + return -1; + } + + return this.data[this.position++]; + } + + }; + + function getCustomHuffmanTable(index, referredTo, customTables) { + let currentIndex = 0; + + for (let i = 0, ii = referredTo.length; i < ii; i++) { + const table = customTables[referredTo[i]]; + + if (table) { + if (index === currentIndex) { + return table; + } + + currentIndex++; + } + } + + throw new Jbig2Error("can't find custom Huffman table"); + } + + function getTextRegionHuffmanTables(textRegion, referredTo, customTables, numberOfSymbols, reader) { + const codes = []; + + for (let i = 0; i <= 34; i++) { + const codeLength = reader.readBits(4); + codes.push(new HuffmanLine([i, codeLength, 0, 0])); + } + + const runCodesTable = new HuffmanTable(codes, false); + codes.length = 0; + + for (let i = 0; i < numberOfSymbols;) { + const codeLength = runCodesTable.decode(reader); + + if (codeLength >= 32) { + let repeatedLength, numberOfRepeats, j; + + switch (codeLength) { + case 32: + if (i === 0) { + throw new Jbig2Error("no previous value in symbol ID table"); + } + + numberOfRepeats = reader.readBits(2) + 3; + repeatedLength = codes[i - 1].prefixLength; + break; + + case 33: + numberOfRepeats = reader.readBits(3) + 3; + repeatedLength = 0; + break; + + case 34: + numberOfRepeats = reader.readBits(7) + 11; + repeatedLength = 0; + break; + + default: + throw new Jbig2Error("invalid code length in symbol ID table"); + } + + for (j = 0; j < numberOfRepeats; j++) { + codes.push(new HuffmanLine([i, repeatedLength, 0, 0])); + i++; + } + } else { + codes.push(new HuffmanLine([i, codeLength, 0, 0])); + i++; + } + } + + reader.byteAlign(); + const symbolIDTable = new HuffmanTable(codes, false); + let customIndex = 0, + tableFirstS, + tableDeltaS, + tableDeltaT; + + switch (textRegion.huffmanFS) { + case 0: + case 1: + tableFirstS = getStandardTable(textRegion.huffmanFS + 6); + break; + + case 3: + tableFirstS = getCustomHuffmanTable(customIndex, referredTo, customTables); + customIndex++; + break; + + default: + throw new Jbig2Error("invalid Huffman FS selector"); + } + + switch (textRegion.huffmanDS) { + case 0: + case 1: + case 2: + tableDeltaS = getStandardTable(textRegion.huffmanDS + 8); + break; + + case 3: + tableDeltaS = getCustomHuffmanTable(customIndex, referredTo, customTables); + customIndex++; + break; + + default: + throw new Jbig2Error("invalid Huffman DS selector"); + } + + switch (textRegion.huffmanDT) { + case 0: + case 1: + case 2: + tableDeltaT = getStandardTable(textRegion.huffmanDT + 11); + break; + + case 3: + tableDeltaT = getCustomHuffmanTable(customIndex, referredTo, customTables); + customIndex++; + break; + + default: + throw new Jbig2Error("invalid Huffman DT selector"); + } + + if (textRegion.refinement) { + throw new Jbig2Error("refinement with Huffman is not supported"); + } + + return { + symbolIDTable, + tableFirstS, + tableDeltaS, + tableDeltaT + }; + } + + function getSymbolDictionaryHuffmanTables(dictionary, referredTo, customTables) { + let customIndex = 0, + tableDeltaHeight, + tableDeltaWidth; + + switch (dictionary.huffmanDHSelector) { + case 0: + case 1: + tableDeltaHeight = getStandardTable(dictionary.huffmanDHSelector + 4); + break; + + case 3: + tableDeltaHeight = getCustomHuffmanTable(customIndex, referredTo, customTables); + customIndex++; + break; + + default: + throw new Jbig2Error("invalid Huffman DH selector"); + } + + switch (dictionary.huffmanDWSelector) { + case 0: + case 1: + tableDeltaWidth = getStandardTable(dictionary.huffmanDWSelector + 2); + break; + + case 3: + tableDeltaWidth = getCustomHuffmanTable(customIndex, referredTo, customTables); + customIndex++; + break; + + default: + throw new Jbig2Error("invalid Huffman DW selector"); + } + + let tableBitmapSize, tableAggregateInstances; + + if (dictionary.bitmapSizeSelector) { + tableBitmapSize = getCustomHuffmanTable(customIndex, referredTo, customTables); + customIndex++; + } else { + tableBitmapSize = getStandardTable(1); + } + + if (dictionary.aggregationInstancesSelector) { + tableAggregateInstances = getCustomHuffmanTable(customIndex, referredTo, customTables); + } else { + tableAggregateInstances = getStandardTable(1); + } + + return { + tableDeltaHeight, + tableDeltaWidth, + tableBitmapSize, + tableAggregateInstances + }; + } + + function readUncompressedBitmap(reader, width, height) { + const bitmap = []; + + for (let y = 0; y < height; y++) { + const row = new Uint8Array(width); + bitmap.push(row); + + for (let x = 0; x < width; x++) { + row[x] = reader.readBit(); + } + + reader.byteAlign(); + } + + return bitmap; + } + + function decodeMMRBitmap(input, width, height, endOfBlock) { + const params = { + K: -1, + Columns: width, + Rows: height, + BlackIs1: true, + EndOfBlock: endOfBlock + }; + const decoder = new _ccitt.CCITTFaxDecoder(input, params); + const bitmap = []; + let currentByte, + eof = false; + + for (let y = 0; y < height; y++) { + const row = new Uint8Array(width); + bitmap.push(row); + let shift = -1; + + for (let x = 0; x < width; x++) { + if (shift < 0) { + currentByte = decoder.readNextChar(); + + if (currentByte === -1) { + currentByte = 0; + eof = true; + } + + shift = 7; + } + + row[x] = currentByte >> shift & 1; + shift--; + } + } + + if (endOfBlock && !eof) { + const lookForEOFLimit = 5; + + for (let i = 0; i < lookForEOFLimit; i++) { + if (decoder.readNextChar() === -1) { + break; + } + } + } + + return bitmap; + } + + function Jbig2Image() {} + + Jbig2Image.prototype = { + parseChunks(chunks) { + return parseJbig2Chunks(chunks); + }, + + parse(data) { + const { + imgData, + width, + height + } = parseJbig2(data); + this.width = width; + this.height = height; + return imgData; + } + + }; + return Jbig2Image; +}(); + +exports.Jbig2Image = Jbig2Image; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ArithmeticDecoder = void 0; +const QeTable = [{ + qe: 0x5601, + nmps: 1, + nlps: 1, + switchFlag: 1 +}, { + qe: 0x3401, + nmps: 2, + nlps: 6, + switchFlag: 0 +}, { + qe: 0x1801, + nmps: 3, + nlps: 9, + switchFlag: 0 +}, { + qe: 0x0ac1, + nmps: 4, + nlps: 12, + switchFlag: 0 +}, { + qe: 0x0521, + nmps: 5, + nlps: 29, + switchFlag: 0 +}, { + qe: 0x0221, + nmps: 38, + nlps: 33, + switchFlag: 0 +}, { + qe: 0x5601, + nmps: 7, + nlps: 6, + switchFlag: 1 +}, { + qe: 0x5401, + nmps: 8, + nlps: 14, + switchFlag: 0 +}, { + qe: 0x4801, + nmps: 9, + nlps: 14, + switchFlag: 0 +}, { + qe: 0x3801, + nmps: 10, + nlps: 14, + switchFlag: 0 +}, { + qe: 0x3001, + nmps: 11, + nlps: 17, + switchFlag: 0 +}, { + qe: 0x2401, + nmps: 12, + nlps: 18, + switchFlag: 0 +}, { + qe: 0x1c01, + nmps: 13, + nlps: 20, + switchFlag: 0 +}, { + qe: 0x1601, + nmps: 29, + nlps: 21, + switchFlag: 0 +}, { + qe: 0x5601, + nmps: 15, + nlps: 14, + switchFlag: 1 +}, { + qe: 0x5401, + nmps: 16, + nlps: 14, + switchFlag: 0 +}, { + qe: 0x5101, + nmps: 17, + nlps: 15, + switchFlag: 0 +}, { + qe: 0x4801, + nmps: 18, + nlps: 16, + switchFlag: 0 +}, { + qe: 0x3801, + nmps: 19, + nlps: 17, + switchFlag: 0 +}, { + qe: 0x3401, + nmps: 20, + nlps: 18, + switchFlag: 0 +}, { + qe: 0x3001, + nmps: 21, + nlps: 19, + switchFlag: 0 +}, { + qe: 0x2801, + nmps: 22, + nlps: 19, + switchFlag: 0 +}, { + qe: 0x2401, + nmps: 23, + nlps: 20, + switchFlag: 0 +}, { + qe: 0x2201, + nmps: 24, + nlps: 21, + switchFlag: 0 +}, { + qe: 0x1c01, + nmps: 25, + nlps: 22, + switchFlag: 0 +}, { + qe: 0x1801, + nmps: 26, + nlps: 23, + switchFlag: 0 +}, { + qe: 0x1601, + nmps: 27, + nlps: 24, + switchFlag: 0 +}, { + qe: 0x1401, + nmps: 28, + nlps: 25, + switchFlag: 0 +}, { + qe: 0x1201, + nmps: 29, + nlps: 26, + switchFlag: 0 +}, { + qe: 0x1101, + nmps: 30, + nlps: 27, + switchFlag: 0 +}, { + qe: 0x0ac1, + nmps: 31, + nlps: 28, + switchFlag: 0 +}, { + qe: 0x09c1, + nmps: 32, + nlps: 29, + switchFlag: 0 +}, { + qe: 0x08a1, + nmps: 33, + nlps: 30, + switchFlag: 0 +}, { + qe: 0x0521, + nmps: 34, + nlps: 31, + switchFlag: 0 +}, { + qe: 0x0441, + nmps: 35, + nlps: 32, + switchFlag: 0 +}, { + qe: 0x02a1, + nmps: 36, + nlps: 33, + switchFlag: 0 +}, { + qe: 0x0221, + nmps: 37, + nlps: 34, + switchFlag: 0 +}, { + qe: 0x0141, + nmps: 38, + nlps: 35, + switchFlag: 0 +}, { + qe: 0x0111, + nmps: 39, + nlps: 36, + switchFlag: 0 +}, { + qe: 0x0085, + nmps: 40, + nlps: 37, + switchFlag: 0 +}, { + qe: 0x0049, + nmps: 41, + nlps: 38, + switchFlag: 0 +}, { + qe: 0x0025, + nmps: 42, + nlps: 39, + switchFlag: 0 +}, { + qe: 0x0015, + nmps: 43, + nlps: 40, + switchFlag: 0 +}, { + qe: 0x0009, + nmps: 44, + nlps: 41, + switchFlag: 0 +}, { + qe: 0x0005, + nmps: 45, + nlps: 42, + switchFlag: 0 +}, { + qe: 0x0001, + nmps: 45, + nlps: 43, + switchFlag: 0 +}, { + qe: 0x5601, + nmps: 46, + nlps: 46, + switchFlag: 0 +}]; + +class ArithmeticDecoder { + constructor(data, start, end) { + this.data = data; + this.bp = start; + this.dataEnd = end; + this.chigh = data[start]; + this.clow = 0; + this.byteIn(); + this.chigh = this.chigh << 7 & 0xffff | this.clow >> 9 & 0x7f; + this.clow = this.clow << 7 & 0xffff; + this.ct -= 7; + this.a = 0x8000; + } + + byteIn() { + const data = this.data; + let bp = this.bp; + + if (data[bp] === 0xff) { + if (data[bp + 1] > 0x8f) { + this.clow += 0xff00; + this.ct = 8; + } else { + bp++; + this.clow += data[bp] << 9; + this.ct = 7; + this.bp = bp; + } + } else { + bp++; + this.clow += bp < this.dataEnd ? data[bp] << 8 : 0xff00; + this.ct = 8; + this.bp = bp; + } + + if (this.clow > 0xffff) { + this.chigh += this.clow >> 16; + this.clow &= 0xffff; + } + } + + readBit(contexts, pos) { + let cx_index = contexts[pos] >> 1, + cx_mps = contexts[pos] & 1; + const qeTableIcx = QeTable[cx_index]; + const qeIcx = qeTableIcx.qe; + let d; + let a = this.a - qeIcx; + + if (this.chigh < qeIcx) { + if (a < qeIcx) { + a = qeIcx; + d = cx_mps; + cx_index = qeTableIcx.nmps; + } else { + a = qeIcx; + d = 1 ^ cx_mps; + + if (qeTableIcx.switchFlag === 1) { + cx_mps = d; + } + + cx_index = qeTableIcx.nlps; + } + } else { + this.chigh -= qeIcx; + + if ((a & 0x8000) !== 0) { + this.a = a; + return cx_mps; + } + + if (a < qeIcx) { + d = 1 ^ cx_mps; + + if (qeTableIcx.switchFlag === 1) { + cx_mps = d; + } + + cx_index = qeTableIcx.nlps; + } else { + d = cx_mps; + cx_index = qeTableIcx.nmps; + } + } + + do { + if (this.ct === 0) { + this.byteIn(); + } + + a <<= 1; + this.chigh = this.chigh << 1 & 0xffff | this.clow >> 15 & 1; + this.clow = this.clow << 1 & 0xffff; + this.ct--; + } while ((a & 0x8000) === 0); + + this.a = a; + contexts[pos] = cx_index << 1 | cx_mps; + return d; + } + +} + +exports.ArithmeticDecoder = ArithmeticDecoder; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.JpegStream = void 0; + +var _stream = __w_pdfjs_require__(12); + +var _primitives = __w_pdfjs_require__(5); + +var _jpg = __w_pdfjs_require__(19); + +var _util = __w_pdfjs_require__(2); + +const JpegStream = function JpegStreamClosure() { + function JpegStream(stream, maybeLength, dict, params) { + let ch; + + while ((ch = stream.getByte()) !== -1) { + if (ch === 0xff) { + stream.skip(-1); + break; + } + } + + this.stream = stream; + this.maybeLength = maybeLength; + this.dict = dict; + this.params = params; + + _stream.DecodeStream.call(this, maybeLength); + } + + JpegStream.prototype = Object.create(_stream.DecodeStream.prototype); + Object.defineProperty(JpegStream.prototype, "bytes", { + get: function JpegStream_bytes() { + return (0, _util.shadow)(this, "bytes", this.stream.getBytes(this.maybeLength)); + }, + configurable: true + }); + + JpegStream.prototype.ensureBuffer = function (requested) {}; + + JpegStream.prototype.readBlock = function () { + if (this.eof) { + return; + } + + const jpegOptions = { + decodeTransform: undefined, + colorTransform: undefined + }; + const decodeArr = this.dict.getArray("Decode", "D"); + + if (this.forceRGB && Array.isArray(decodeArr)) { + const bitsPerComponent = this.dict.get("BitsPerComponent") || 8; + const decodeArrLength = decodeArr.length; + const transform = new Int32Array(decodeArrLength); + let transformNeeded = false; + const maxValue = (1 << bitsPerComponent) - 1; + + for (let i = 0; i < decodeArrLength; i += 2) { + transform[i] = (decodeArr[i + 1] - decodeArr[i]) * 256 | 0; + transform[i + 1] = decodeArr[i] * maxValue | 0; + + if (transform[i] !== 256 || transform[i + 1] !== 0) { + transformNeeded = true; + } + } + + if (transformNeeded) { + jpegOptions.decodeTransform = transform; + } + } + + if ((0, _primitives.isDict)(this.params)) { + const colorTransform = this.params.get("ColorTransform"); + + if (Number.isInteger(colorTransform)) { + jpegOptions.colorTransform = colorTransform; + } + } + + const jpegImage = new _jpg.JpegImage(jpegOptions); + jpegImage.parse(this.bytes); + const data = jpegImage.getData({ + width: this.drawWidth, + height: this.drawHeight, + forceRGB: this.forceRGB, + isSourcePDF: true + }); + this.buffer = data; + this.bufferLength = data.length; + this.eof = true; + }; + + return JpegStream; +}(); + +exports.JpegStream = JpegStream; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.JpegImage = void 0; + +var _util = __w_pdfjs_require__(2); + +var _core_utils = __w_pdfjs_require__(8); + +class JpegError extends _util.BaseException { + constructor(msg) { + super(`JPEG error: ${msg}`); + } + +} + +class DNLMarkerError extends _util.BaseException { + constructor(message, scanLines) { + super(message); + this.scanLines = scanLines; + } + +} + +class EOIMarkerError extends _util.BaseException {} + +var JpegImage = function JpegImageClosure() { + var dctZigZag = new Uint8Array([0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63]); + var dctCos1 = 4017; + var dctSin1 = 799; + var dctCos3 = 3406; + var dctSin3 = 2276; + var dctCos6 = 1567; + var dctSin6 = 3784; + var dctSqrt2 = 5793; + var dctSqrt1d2 = 2896; + + function JpegImage({ + decodeTransform = null, + colorTransform = -1 + } = {}) { + this._decodeTransform = decodeTransform; + this._colorTransform = colorTransform; + } + + function buildHuffmanTable(codeLengths, values) { + var k = 0, + code = [], + i, + j, + length = 16; + + while (length > 0 && !codeLengths[length - 1]) { + length--; + } + + code.push({ + children: [], + index: 0 + }); + var p = code[0], + q; + + for (i = 0; i < length; i++) { + for (j = 0; j < codeLengths[i]; j++) { + p = code.pop(); + p.children[p.index] = values[k]; + + while (p.index > 0) { + p = code.pop(); + } + + p.index++; + code.push(p); + + while (code.length <= i) { + code.push(q = { + children: [], + index: 0 + }); + p.children[p.index] = q.children; + p = q; + } + + k++; + } + + if (i + 1 < length) { + code.push(q = { + children: [], + index: 0 + }); + p.children[p.index] = q.children; + p = q; + } + } + + return code[0].children; + } + + function getBlockBufferOffset(component, row, col) { + return 64 * ((component.blocksPerLine + 1) * row + col); + } + + function decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive, parseDNLMarker = false) { + var mcusPerLine = frame.mcusPerLine; + var progressive = frame.progressive; + const startOffset = offset; + let bitsData = 0, + bitsCount = 0; + + function readBit() { + if (bitsCount > 0) { + bitsCount--; + return bitsData >> bitsCount & 1; + } + + bitsData = data[offset++]; + + if (bitsData === 0xff) { + var nextByte = data[offset++]; + + if (nextByte) { + if (nextByte === 0xdc && parseDNLMarker) { + offset += 2; + const scanLines = (0, _core_utils.readUint16)(data, offset); + offset += 2; + + if (scanLines > 0 && scanLines !== frame.scanLines) { + throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data", scanLines); + } + } else if (nextByte === 0xd9) { + if (parseDNLMarker) { + const maybeScanLines = blockRow * 8; + + if (maybeScanLines > 0 && maybeScanLines < frame.scanLines / 10) { + throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, " + "possibly caused by incorrect `scanLines` parameter", maybeScanLines); + } + } + + throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data"); + } + + throw new JpegError(`unexpected marker ${(bitsData << 8 | nextByte).toString(16)}`); + } + } + + bitsCount = 7; + return bitsData >>> 7; + } + + function decodeHuffman(tree) { + var node = tree; + + while (true) { + node = node[readBit()]; + + switch (typeof node) { + case "number": + return node; + + case "object": + continue; + } + + throw new JpegError("invalid huffman sequence"); + } + } + + function receive(length) { + var n = 0; + + while (length > 0) { + n = n << 1 | readBit(); + length--; + } + + return n; + } + + function receiveAndExtend(length) { + if (length === 1) { + return readBit() === 1 ? 1 : -1; + } + + var n = receive(length); + + if (n >= 1 << length - 1) { + return n; + } + + return n + (-1 << length) + 1; + } + + function decodeBaseline(component, blockOffset) { + var t = decodeHuffman(component.huffmanTableDC); + var diff = t === 0 ? 0 : receiveAndExtend(t); + component.blockData[blockOffset] = component.pred += diff; + var k = 1; + + while (k < 64) { + var rs = decodeHuffman(component.huffmanTableAC); + var s = rs & 15, + r = rs >> 4; + + if (s === 0) { + if (r < 15) { + break; + } + + k += 16; + continue; + } + + k += r; + var z = dctZigZag[k]; + component.blockData[blockOffset + z] = receiveAndExtend(s); + k++; + } + } + + function decodeDCFirst(component, blockOffset) { + var t = decodeHuffman(component.huffmanTableDC); + var diff = t === 0 ? 0 : receiveAndExtend(t) << successive; + component.blockData[blockOffset] = component.pred += diff; + } + + function decodeDCSuccessive(component, blockOffset) { + component.blockData[blockOffset] |= readBit() << successive; + } + + var eobrun = 0; + + function decodeACFirst(component, blockOffset) { + if (eobrun > 0) { + eobrun--; + return; + } + + var k = spectralStart, + e = spectralEnd; + + while (k <= e) { + var rs = decodeHuffman(component.huffmanTableAC); + var s = rs & 15, + r = rs >> 4; + + if (s === 0) { + if (r < 15) { + eobrun = receive(r) + (1 << r) - 1; + break; + } + + k += 16; + continue; + } + + k += r; + var z = dctZigZag[k]; + component.blockData[blockOffset + z] = receiveAndExtend(s) * (1 << successive); + k++; + } + } + + var successiveACState = 0, + successiveACNextValue; + + function decodeACSuccessive(component, blockOffset) { + var k = spectralStart; + var e = spectralEnd; + var r = 0; + var s; + var rs; + + while (k <= e) { + const offsetZ = blockOffset + dctZigZag[k]; + const sign = component.blockData[offsetZ] < 0 ? -1 : 1; + + switch (successiveACState) { + case 0: + rs = decodeHuffman(component.huffmanTableAC); + s = rs & 15; + r = rs >> 4; + + if (s === 0) { + if (r < 15) { + eobrun = receive(r) + (1 << r); + successiveACState = 4; + } else { + r = 16; + successiveACState = 1; + } + } else { + if (s !== 1) { + throw new JpegError("invalid ACn encoding"); + } + + successiveACNextValue = receiveAndExtend(s); + successiveACState = r ? 2 : 3; + } + + continue; + + case 1: + case 2: + if (component.blockData[offsetZ]) { + component.blockData[offsetZ] += sign * (readBit() << successive); + } else { + r--; + + if (r === 0) { + successiveACState = successiveACState === 2 ? 3 : 0; + } + } + + break; + + case 3: + if (component.blockData[offsetZ]) { + component.blockData[offsetZ] += sign * (readBit() << successive); + } else { + component.blockData[offsetZ] = successiveACNextValue << successive; + successiveACState = 0; + } + + break; + + case 4: + if (component.blockData[offsetZ]) { + component.blockData[offsetZ] += sign * (readBit() << successive); + } + + break; + } + + k++; + } + + if (successiveACState === 4) { + eobrun--; + + if (eobrun === 0) { + successiveACState = 0; + } + } + } + + let blockRow = 0; + + function decodeMcu(component, decode, mcu, row, col) { + var mcuRow = mcu / mcusPerLine | 0; + var mcuCol = mcu % mcusPerLine; + blockRow = mcuRow * component.v + row; + var blockCol = mcuCol * component.h + col; + const blockOffset = getBlockBufferOffset(component, blockRow, blockCol); + decode(component, blockOffset); + } + + function decodeBlock(component, decode, mcu) { + blockRow = mcu / component.blocksPerLine | 0; + var blockCol = mcu % component.blocksPerLine; + const blockOffset = getBlockBufferOffset(component, blockRow, blockCol); + decode(component, blockOffset); + } + + var componentsLength = components.length; + var component, i, j, k, n; + var decodeFn; + + if (progressive) { + if (spectralStart === 0) { + decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; + } else { + decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; + } + } else { + decodeFn = decodeBaseline; + } + + var mcu = 0, + fileMarker; + var mcuExpected; + + if (componentsLength === 1) { + mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn; + } else { + mcuExpected = mcusPerLine * frame.mcusPerColumn; + } + + var h, v; + + while (mcu <= mcuExpected) { + var mcuToRead = resetInterval ? Math.min(mcuExpected - mcu, resetInterval) : mcuExpected; + + if (mcuToRead > 0) { + for (i = 0; i < componentsLength; i++) { + components[i].pred = 0; + } + + eobrun = 0; + + if (componentsLength === 1) { + component = components[0]; + + for (n = 0; n < mcuToRead; n++) { + decodeBlock(component, decodeFn, mcu); + mcu++; + } + } else { + for (n = 0; n < mcuToRead; n++) { + for (i = 0; i < componentsLength; i++) { + component = components[i]; + h = component.h; + v = component.v; + + for (j = 0; j < v; j++) { + for (k = 0; k < h; k++) { + decodeMcu(component, decodeFn, mcu, j, k); + } + } + } + + mcu++; + } + } + } + + bitsCount = 0; + fileMarker = findNextFileMarker(data, offset); + + if (!fileMarker) { + break; + } + + if (fileMarker.invalid) { + const partialMsg = mcuToRead > 0 ? "unexpected" : "excessive"; + (0, _util.warn)(`decodeScan - ${partialMsg} MCU data, current marker is: ${fileMarker.invalid}`); + offset = fileMarker.offset; + } + + if (fileMarker.marker >= 0xffd0 && fileMarker.marker <= 0xffd7) { + offset += 2; + } else { + break; + } + } + + return offset - startOffset; + } + + function quantizeAndInverse(component, blockBufferOffset, p) { + var qt = component.quantizationTable, + blockData = component.blockData; + var v0, v1, v2, v3, v4, v5, v6, v7; + var p0, p1, p2, p3, p4, p5, p6, p7; + var t; + + if (!qt) { + throw new JpegError("missing required Quantization Table."); + } + + for (var row = 0; row < 64; row += 8) { + p0 = blockData[blockBufferOffset + row]; + p1 = blockData[blockBufferOffset + row + 1]; + p2 = blockData[blockBufferOffset + row + 2]; + p3 = blockData[blockBufferOffset + row + 3]; + p4 = blockData[blockBufferOffset + row + 4]; + p5 = blockData[blockBufferOffset + row + 5]; + p6 = blockData[blockBufferOffset + row + 6]; + p7 = blockData[blockBufferOffset + row + 7]; + p0 *= qt[row]; + + if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) { + t = dctSqrt2 * p0 + 512 >> 10; + p[row] = t; + p[row + 1] = t; + p[row + 2] = t; + p[row + 3] = t; + p[row + 4] = t; + p[row + 5] = t; + p[row + 6] = t; + p[row + 7] = t; + continue; + } + + p1 *= qt[row + 1]; + p2 *= qt[row + 2]; + p3 *= qt[row + 3]; + p4 *= qt[row + 4]; + p5 *= qt[row + 5]; + p6 *= qt[row + 6]; + p7 *= qt[row + 7]; + v0 = dctSqrt2 * p0 + 128 >> 8; + v1 = dctSqrt2 * p4 + 128 >> 8; + v2 = p2; + v3 = p6; + v4 = dctSqrt1d2 * (p1 - p7) + 128 >> 8; + v7 = dctSqrt1d2 * (p1 + p7) + 128 >> 8; + v5 = p3 << 4; + v6 = p5 << 4; + v0 = v0 + v1 + 1 >> 1; + v1 = v0 - v1; + t = v2 * dctSin6 + v3 * dctCos6 + 128 >> 8; + v2 = v2 * dctCos6 - v3 * dctSin6 + 128 >> 8; + v3 = t; + v4 = v4 + v6 + 1 >> 1; + v6 = v4 - v6; + v7 = v7 + v5 + 1 >> 1; + v5 = v7 - v5; + v0 = v0 + v3 + 1 >> 1; + v3 = v0 - v3; + v1 = v1 + v2 + 1 >> 1; + v2 = v1 - v2; + t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; + v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; + v7 = t; + t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; + v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; + v6 = t; + p[row] = v0 + v7; + p[row + 7] = v0 - v7; + p[row + 1] = v1 + v6; + p[row + 6] = v1 - v6; + p[row + 2] = v2 + v5; + p[row + 5] = v2 - v5; + p[row + 3] = v3 + v4; + p[row + 4] = v3 - v4; + } + + for (var col = 0; col < 8; ++col) { + p0 = p[col]; + p1 = p[col + 8]; + p2 = p[col + 16]; + p3 = p[col + 24]; + p4 = p[col + 32]; + p5 = p[col + 40]; + p6 = p[col + 48]; + p7 = p[col + 56]; + + if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) { + t = dctSqrt2 * p0 + 8192 >> 14; + + if (t < -2040) { + t = 0; + } else if (t >= 2024) { + t = 255; + } else { + t = t + 2056 >> 4; + } + + blockData[blockBufferOffset + col] = t; + blockData[blockBufferOffset + col + 8] = t; + blockData[blockBufferOffset + col + 16] = t; + blockData[blockBufferOffset + col + 24] = t; + blockData[blockBufferOffset + col + 32] = t; + blockData[blockBufferOffset + col + 40] = t; + blockData[blockBufferOffset + col + 48] = t; + blockData[blockBufferOffset + col + 56] = t; + continue; + } + + v0 = dctSqrt2 * p0 + 2048 >> 12; + v1 = dctSqrt2 * p4 + 2048 >> 12; + v2 = p2; + v3 = p6; + v4 = dctSqrt1d2 * (p1 - p7) + 2048 >> 12; + v7 = dctSqrt1d2 * (p1 + p7) + 2048 >> 12; + v5 = p3; + v6 = p5; + v0 = (v0 + v1 + 1 >> 1) + 4112; + v1 = v0 - v1; + t = v2 * dctSin6 + v3 * dctCos6 + 2048 >> 12; + v2 = v2 * dctCos6 - v3 * dctSin6 + 2048 >> 12; + v3 = t; + v4 = v4 + v6 + 1 >> 1; + v6 = v4 - v6; + v7 = v7 + v5 + 1 >> 1; + v5 = v7 - v5; + v0 = v0 + v3 + 1 >> 1; + v3 = v0 - v3; + v1 = v1 + v2 + 1 >> 1; + v2 = v1 - v2; + t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; + v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; + v7 = t; + t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; + v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; + v6 = t; + p0 = v0 + v7; + p7 = v0 - v7; + p1 = v1 + v6; + p6 = v1 - v6; + p2 = v2 + v5; + p5 = v2 - v5; + p3 = v3 + v4; + p4 = v3 - v4; + + if (p0 < 16) { + p0 = 0; + } else if (p0 >= 4080) { + p0 = 255; + } else { + p0 >>= 4; + } + + if (p1 < 16) { + p1 = 0; + } else if (p1 >= 4080) { + p1 = 255; + } else { + p1 >>= 4; + } + + if (p2 < 16) { + p2 = 0; + } else if (p2 >= 4080) { + p2 = 255; + } else { + p2 >>= 4; + } + + if (p3 < 16) { + p3 = 0; + } else if (p3 >= 4080) { + p3 = 255; + } else { + p3 >>= 4; + } + + if (p4 < 16) { + p4 = 0; + } else if (p4 >= 4080) { + p4 = 255; + } else { + p4 >>= 4; + } + + if (p5 < 16) { + p5 = 0; + } else if (p5 >= 4080) { + p5 = 255; + } else { + p5 >>= 4; + } + + if (p6 < 16) { + p6 = 0; + } else if (p6 >= 4080) { + p6 = 255; + } else { + p6 >>= 4; + } + + if (p7 < 16) { + p7 = 0; + } else if (p7 >= 4080) { + p7 = 255; + } else { + p7 >>= 4; + } + + blockData[blockBufferOffset + col] = p0; + blockData[blockBufferOffset + col + 8] = p1; + blockData[blockBufferOffset + col + 16] = p2; + blockData[blockBufferOffset + col + 24] = p3; + blockData[blockBufferOffset + col + 32] = p4; + blockData[blockBufferOffset + col + 40] = p5; + blockData[blockBufferOffset + col + 48] = p6; + blockData[blockBufferOffset + col + 56] = p7; + } + } + + function buildComponentData(frame, component) { + var blocksPerLine = component.blocksPerLine; + var blocksPerColumn = component.blocksPerColumn; + var computationBuffer = new Int16Array(64); + + for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) { + for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) { + var offset = getBlockBufferOffset(component, blockRow, blockCol); + quantizeAndInverse(component, offset, computationBuffer); + } + } + + return component.blockData; + } + + function findNextFileMarker(data, currentPos, startPos = currentPos) { + const maxPos = data.length - 1; + var newPos = startPos < currentPos ? startPos : currentPos; + + if (currentPos >= maxPos) { + return null; + } + + var currentMarker = (0, _core_utils.readUint16)(data, currentPos); + + if (currentMarker >= 0xffc0 && currentMarker <= 0xfffe) { + return { + invalid: null, + marker: currentMarker, + offset: currentPos + }; + } + + var newMarker = (0, _core_utils.readUint16)(data, newPos); + + while (!(newMarker >= 0xffc0 && newMarker <= 0xfffe)) { + if (++newPos >= maxPos) { + return null; + } + + newMarker = (0, _core_utils.readUint16)(data, newPos); + } + + return { + invalid: currentMarker.toString(16), + marker: newMarker, + offset: newPos + }; + } + + JpegImage.prototype = { + parse(data, { + dnlScanLines = null + } = {}) { + function readDataBlock() { + const length = (0, _core_utils.readUint16)(data, offset); + offset += 2; + let endOffset = offset + length - 2; + var fileMarker = findNextFileMarker(data, endOffset, offset); + + if (fileMarker && fileMarker.invalid) { + (0, _util.warn)("readDataBlock - incorrect length, current marker is: " + fileMarker.invalid); + endOffset = fileMarker.offset; + } + + var array = data.subarray(offset, endOffset); + offset += array.length; + return array; + } + + function prepareComponents(frame) { + var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / frame.maxH); + var mcusPerColumn = Math.ceil(frame.scanLines / 8 / frame.maxV); + + for (var i = 0; i < frame.components.length; i++) { + component = frame.components[i]; + var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / frame.maxH); + var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / frame.maxV); + var blocksPerLineForMcu = mcusPerLine * component.h; + var blocksPerColumnForMcu = mcusPerColumn * component.v; + var blocksBufferSize = 64 * blocksPerColumnForMcu * (blocksPerLineForMcu + 1); + component.blockData = new Int16Array(blocksBufferSize); + component.blocksPerLine = blocksPerLine; + component.blocksPerColumn = blocksPerColumn; + } + + frame.mcusPerLine = mcusPerLine; + frame.mcusPerColumn = mcusPerColumn; + } + + var offset = 0; + var jfif = null; + var adobe = null; + var frame, resetInterval; + let numSOSMarkers = 0; + var quantizationTables = []; + var huffmanTablesAC = [], + huffmanTablesDC = []; + let fileMarker = (0, _core_utils.readUint16)(data, offset); + offset += 2; + + if (fileMarker !== 0xffd8) { + throw new JpegError("SOI not found"); + } + + fileMarker = (0, _core_utils.readUint16)(data, offset); + offset += 2; + + markerLoop: while (fileMarker !== 0xffd9) { + var i, j, l; + + switch (fileMarker) { + case 0xffe0: + case 0xffe1: + case 0xffe2: + case 0xffe3: + case 0xffe4: + case 0xffe5: + case 0xffe6: + case 0xffe7: + case 0xffe8: + case 0xffe9: + case 0xffea: + case 0xffeb: + case 0xffec: + case 0xffed: + case 0xffee: + case 0xffef: + case 0xfffe: + var appData = readDataBlock(); + + if (fileMarker === 0xffe0) { + if (appData[0] === 0x4a && appData[1] === 0x46 && appData[2] === 0x49 && appData[3] === 0x46 && appData[4] === 0) { + jfif = { + version: { + major: appData[5], + minor: appData[6] + }, + densityUnits: appData[7], + xDensity: appData[8] << 8 | appData[9], + yDensity: appData[10] << 8 | appData[11], + thumbWidth: appData[12], + thumbHeight: appData[13], + thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) + }; + } + } + + if (fileMarker === 0xffee) { + if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6f && appData[3] === 0x62 && appData[4] === 0x65) { + adobe = { + version: appData[5] << 8 | appData[6], + flags0: appData[7] << 8 | appData[8], + flags1: appData[9] << 8 | appData[10], + transformCode: appData[11] + }; + } + } + + break; + + case 0xffdb: + const quantizationTablesLength = (0, _core_utils.readUint16)(data, offset); + offset += 2; + var quantizationTablesEnd = quantizationTablesLength + offset - 2; + var z; + + while (offset < quantizationTablesEnd) { + var quantizationTableSpec = data[offset++]; + var tableData = new Uint16Array(64); + + if (quantizationTableSpec >> 4 === 0) { + for (j = 0; j < 64; j++) { + z = dctZigZag[j]; + tableData[z] = data[offset++]; + } + } else if (quantizationTableSpec >> 4 === 1) { + for (j = 0; j < 64; j++) { + z = dctZigZag[j]; + tableData[z] = (0, _core_utils.readUint16)(data, offset); + offset += 2; + } + } else { + throw new JpegError("DQT - invalid table spec"); + } + + quantizationTables[quantizationTableSpec & 15] = tableData; + } + + break; + + case 0xffc0: + case 0xffc1: + case 0xffc2: + if (frame) { + throw new JpegError("Only single frame JPEGs supported"); + } + + offset += 2; + frame = {}; + frame.extended = fileMarker === 0xffc1; + frame.progressive = fileMarker === 0xffc2; + frame.precision = data[offset++]; + const sofScanLines = (0, _core_utils.readUint16)(data, offset); + offset += 2; + frame.scanLines = dnlScanLines || sofScanLines; + frame.samplesPerLine = (0, _core_utils.readUint16)(data, offset); + offset += 2; + frame.components = []; + frame.componentIds = {}; + var componentsCount = data[offset++], + componentId; + var maxH = 0, + maxV = 0; + + for (i = 0; i < componentsCount; i++) { + componentId = data[offset]; + var h = data[offset + 1] >> 4; + var v = data[offset + 1] & 15; + + if (maxH < h) { + maxH = h; + } + + if (maxV < v) { + maxV = v; + } + + var qId = data[offset + 2]; + l = frame.components.push({ + h, + v, + quantizationId: qId, + quantizationTable: null + }); + frame.componentIds[componentId] = l - 1; + offset += 3; + } + + frame.maxH = maxH; + frame.maxV = maxV; + prepareComponents(frame); + break; + + case 0xffc4: + const huffmanLength = (0, _core_utils.readUint16)(data, offset); + offset += 2; + + for (i = 2; i < huffmanLength;) { + var huffmanTableSpec = data[offset++]; + var codeLengths = new Uint8Array(16); + var codeLengthSum = 0; + + for (j = 0; j < 16; j++, offset++) { + codeLengthSum += codeLengths[j] = data[offset]; + } + + var huffmanValues = new Uint8Array(codeLengthSum); + + for (j = 0; j < codeLengthSum; j++, offset++) { + huffmanValues[j] = data[offset]; + } + + i += 17 + codeLengthSum; + (huffmanTableSpec >> 4 === 0 ? huffmanTablesDC : huffmanTablesAC)[huffmanTableSpec & 15] = buildHuffmanTable(codeLengths, huffmanValues); + } + + break; + + case 0xffdd: + offset += 2; + resetInterval = (0, _core_utils.readUint16)(data, offset); + offset += 2; + break; + + case 0xffda: + const parseDNLMarker = ++numSOSMarkers === 1 && !dnlScanLines; + offset += 2; + var selectorsCount = data[offset++]; + var components = [], + component; + + for (i = 0; i < selectorsCount; i++) { + var componentIndex = frame.componentIds[data[offset++]]; + component = frame.components[componentIndex]; + var tableSpec = data[offset++]; + component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; + component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; + components.push(component); + } + + var spectralStart = data[offset++]; + var spectralEnd = data[offset++]; + var successiveApproximation = data[offset++]; + + try { + var processed = decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15, parseDNLMarker); + offset += processed; + } catch (ex) { + if (ex instanceof DNLMarkerError) { + (0, _util.warn)(`${ex.message} -- attempting to re-parse the JPEG image.`); + return this.parse(data, { + dnlScanLines: ex.scanLines + }); + } else if (ex instanceof EOIMarkerError) { + (0, _util.warn)(`${ex.message} -- ignoring the rest of the image data.`); + break markerLoop; + } + + throw ex; + } + + break; + + case 0xffdc: + offset += 4; + break; + + case 0xffff: + if (data[offset] !== 0xff) { + offset--; + } + + break; + + default: + const nextFileMarker = findNextFileMarker(data, offset - 2, offset - 3); + + if (nextFileMarker && nextFileMarker.invalid) { + (0, _util.warn)("JpegImage.parse - unexpected data, current marker is: " + nextFileMarker.invalid); + offset = nextFileMarker.offset; + break; + } + + if (offset >= data.length - 1) { + (0, _util.warn)("JpegImage.parse - reached the end of the image data " + "without finding an EOI marker (0xFFD9)."); + break markerLoop; + } + + throw new JpegError("JpegImage.parse - unknown marker: " + fileMarker.toString(16)); + } + + fileMarker = (0, _core_utils.readUint16)(data, offset); + offset += 2; + } + + this.width = frame.samplesPerLine; + this.height = frame.scanLines; + this.jfif = jfif; + this.adobe = adobe; + this.components = []; + + for (i = 0; i < frame.components.length; i++) { + component = frame.components[i]; + var quantizationTable = quantizationTables[component.quantizationId]; + + if (quantizationTable) { + component.quantizationTable = quantizationTable; + } + + this.components.push({ + output: buildComponentData(frame, component), + scaleX: component.h / frame.maxH, + scaleY: component.v / frame.maxV, + blocksPerLine: component.blocksPerLine, + blocksPerColumn: component.blocksPerColumn + }); + } + + this.numComponents = this.components.length; + return undefined; + }, + + _getLinearizedBlockData(width, height, isSourcePDF = false) { + var scaleX = this.width / width, + scaleY = this.height / height; + var component, componentScaleX, componentScaleY, blocksPerScanline; + var x, y, i, j, k; + var index; + var offset = 0; + var output; + var numComponents = this.components.length; + var dataLength = width * height * numComponents; + var data = new Uint8ClampedArray(dataLength); + var xScaleBlockOffset = new Uint32Array(width); + var mask3LSB = 0xfffffff8; + let lastComponentScaleX; + + for (i = 0; i < numComponents; i++) { + component = this.components[i]; + componentScaleX = component.scaleX * scaleX; + componentScaleY = component.scaleY * scaleY; + offset = i; + output = component.output; + blocksPerScanline = component.blocksPerLine + 1 << 3; + + if (componentScaleX !== lastComponentScaleX) { + for (x = 0; x < width; x++) { + j = 0 | x * componentScaleX; + xScaleBlockOffset[x] = (j & mask3LSB) << 3 | j & 7; + } + + lastComponentScaleX = componentScaleX; + } + + for (y = 0; y < height; y++) { + j = 0 | y * componentScaleY; + index = blocksPerScanline * (j & mask3LSB) | (j & 7) << 3; + + for (x = 0; x < width; x++) { + data[offset] = output[index + xScaleBlockOffset[x]]; + offset += numComponents; + } + } + } + + let transform = this._decodeTransform; + + if (!isSourcePDF && numComponents === 4 && !transform) { + transform = new Int32Array([-256, 255, -256, 255, -256, 255, -256, 255]); + } + + if (transform) { + for (i = 0; i < dataLength;) { + for (j = 0, k = 0; j < numComponents; j++, i++, k += 2) { + data[i] = (data[i] * transform[k] >> 8) + transform[k + 1]; + } + } + } + + return data; + }, + + get _isColorConversionNeeded() { + if (this.adobe) { + return !!this.adobe.transformCode; + } + + if (this.numComponents === 3) { + if (this._colorTransform === 0) { + return false; + } + + return true; + } + + if (this._colorTransform === 1) { + return true; + } + + return false; + }, + + _convertYccToRgb: function convertYccToRgb(data) { + var Y, Cb, Cr; + + for (var i = 0, length = data.length; i < length; i += 3) { + Y = data[i]; + Cb = data[i + 1]; + Cr = data[i + 2]; + data[i] = Y - 179.456 + 1.402 * Cr; + data[i + 1] = Y + 135.459 - 0.344 * Cb - 0.714 * Cr; + data[i + 2] = Y - 226.816 + 1.772 * Cb; + } + + return data; + }, + _convertYcckToRgb: function convertYcckToRgb(data) { + var Y, Cb, Cr, k; + var offset = 0; + + for (var i = 0, length = data.length; i < length; i += 4) { + Y = data[i]; + Cb = data[i + 1]; + Cr = data[i + 2]; + k = data[i + 3]; + data[offset++] = -122.67195406894 + Cb * (-6.60635669420364e-5 * Cb + 0.000437130475926232 * Cr - 5.4080610064599e-5 * Y + 0.00048449797120281 * k - 0.154362151871126) + Cr * (-0.000957964378445773 * Cr + 0.000817076911346625 * Y - 0.00477271405408747 * k + 1.53380253221734) + Y * (0.000961250184130688 * Y - 0.00266257332283933 * k + 0.48357088451265) + k * (-0.000336197177618394 * k + 0.484791561490776); + data[offset++] = 107.268039397724 + Cb * (2.19927104525741e-5 * Cb - 0.000640992018297945 * Cr + 0.000659397001245577 * Y + 0.000426105652938837 * k - 0.176491792462875) + Cr * (-0.000778269941513683 * Cr + 0.00130872261408275 * Y + 0.000770482631801132 * k - 0.151051492775562) + Y * (0.00126935368114843 * Y - 0.00265090189010898 * k + 0.25802910206845) + k * (-0.000318913117588328 * k - 0.213742400323665); + data[offset++] = -20.810012546947 + Cb * (-0.000570115196973677 * Cb - 2.63409051004589e-5 * Cr + 0.0020741088115012 * Y - 0.00288260236853442 * k + 0.814272968359295) + Cr * (-1.53496057440975e-5 * Cr - 0.000132689043961446 * Y + 0.000560833691242812 * k - 0.195152027534049) + Y * (0.00174418132927582 * Y - 0.00255243321439347 * k + 0.116935020465145) + k * (-0.000343531996510555 * k + 0.24165260232407); + } + + return data.subarray(0, offset); + }, + _convertYcckToCmyk: function convertYcckToCmyk(data) { + var Y, Cb, Cr; + + for (var i = 0, length = data.length; i < length; i += 4) { + Y = data[i]; + Cb = data[i + 1]; + Cr = data[i + 2]; + data[i] = 434.456 - Y - 1.402 * Cr; + data[i + 1] = 119.541 - Y + 0.344 * Cb + 0.714 * Cr; + data[i + 2] = 481.816 - Y - 1.772 * Cb; + } + + return data; + }, + _convertCmykToRgb: function convertCmykToRgb(data) { + var c, m, y, k; + var offset = 0; + + for (var i = 0, length = data.length; i < length; i += 4) { + c = data[i]; + m = data[i + 1]; + y = data[i + 2]; + k = data[i + 3]; + data[offset++] = 255 + c * (-0.00006747147073602441 * c + 0.0008379262121013727 * m + 0.0002894718188643294 * y + 0.003264231057537806 * k - 1.1185611867203937) + m * (0.000026374107616089405 * m - 0.00008626949158638572 * y - 0.0002748769067499491 * k - 0.02155688794978967) + y * (-0.00003878099212869363 * y - 0.0003267808279485286 * k + 0.0686742238595345) - k * (0.0003361971776183937 * k + 0.7430659151342254); + data[offset++] = 255 + c * (0.00013596372813588848 * c + 0.000924537132573585 * m + 0.00010567359618683593 * y + 0.0004791864687436512 * k - 0.3109689587515875) + m * (-0.00023545346108370344 * m + 0.0002702845253534714 * y + 0.0020200308977307156 * k - 0.7488052167015494) + y * (0.00006834815998235662 * y + 0.00015168452363460973 * k - 0.09751927774728933) - k * (0.00031891311758832814 * k + 0.7364883807733168); + data[offset++] = 255 + c * (0.000013598650411385307 * c + 0.00012423956175490851 * m + 0.0004751985097583589 * y - 0.0000036729317476630422 * k - 0.05562186980264034) + m * (0.00016141380598724676 * m + 0.0009692239130725186 * y + 0.0007782692450036253 * k - 0.44015232367526463) + y * (5.068882914068769e-7 * y + 0.0017778369011375071 * k - 0.7591454649749609) - k * (0.0003435319965105553 * k + 0.7063770186160144); + } + + return data.subarray(0, offset); + }, + + getData({ + width, + height, + forceRGB = false, + isSourcePDF = false + }) { + if (this.numComponents > 4) { + throw new JpegError("Unsupported color mode"); + } + + var data = this._getLinearizedBlockData(width, height, isSourcePDF); + + if (this.numComponents === 1 && forceRGB) { + var dataLength = data.length; + var rgbData = new Uint8ClampedArray(dataLength * 3); + var offset = 0; + + for (var i = 0; i < dataLength; i++) { + var grayColor = data[i]; + rgbData[offset++] = grayColor; + rgbData[offset++] = grayColor; + rgbData[offset++] = grayColor; + } + + return rgbData; + } else if (this.numComponents === 3 && this._isColorConversionNeeded) { + return this._convertYccToRgb(data); + } else if (this.numComponents === 4) { + if (this._isColorConversionNeeded) { + if (forceRGB) { + return this._convertYcckToRgb(data); + } + + return this._convertYcckToCmyk(data); + } else if (forceRGB) { + return this._convertCmykToRgb(data); + } + } + + return data; + } + + }; + return JpegImage; +}(); + +exports.JpegImage = JpegImage; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.JpxStream = void 0; + +var _stream = __w_pdfjs_require__(12); + +var _jpx = __w_pdfjs_require__(21); + +var _util = __w_pdfjs_require__(2); + +const JpxStream = function JpxStreamClosure() { + function JpxStream(stream, maybeLength, dict, params) { + this.stream = stream; + this.maybeLength = maybeLength; + this.dict = dict; + this.params = params; + + _stream.DecodeStream.call(this, maybeLength); + } + + JpxStream.prototype = Object.create(_stream.DecodeStream.prototype); + Object.defineProperty(JpxStream.prototype, "bytes", { + get: function JpxStream_bytes() { + return (0, _util.shadow)(this, "bytes", this.stream.getBytes(this.maybeLength)); + }, + configurable: true + }); + + JpxStream.prototype.ensureBuffer = function (requested) {}; + + JpxStream.prototype.readBlock = function () { + if (this.eof) { + return; + } + + const jpxImage = new _jpx.JpxImage(); + jpxImage.parse(this.bytes); + const width = jpxImage.width; + const height = jpxImage.height; + const componentsCount = jpxImage.componentsCount; + const tileCount = jpxImage.tiles.length; + + if (tileCount === 1) { + this.buffer = jpxImage.tiles[0].items; + } else { + const data = new Uint8ClampedArray(width * height * componentsCount); + + for (let k = 0; k < tileCount; k++) { + const tileComponents = jpxImage.tiles[k]; + const tileWidth = tileComponents.width; + const tileHeight = tileComponents.height; + const tileLeft = tileComponents.left; + const tileTop = tileComponents.top; + const src = tileComponents.items; + let srcPosition = 0; + let dataPosition = (width * tileTop + tileLeft) * componentsCount; + const imgRowSize = width * componentsCount; + const tileRowSize = tileWidth * componentsCount; + + for (let j = 0; j < tileHeight; j++) { + const rowBytes = src.subarray(srcPosition, srcPosition + tileRowSize); + data.set(rowBytes, dataPosition); + srcPosition += tileRowSize; + dataPosition += imgRowSize; + } + } + + this.buffer = data; + } + + this.bufferLength = this.buffer.length; + this.eof = true; + }; + + return JpxStream; +}(); + +exports.JpxStream = JpxStream; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.JpxImage = void 0; + +var _util = __w_pdfjs_require__(2); + +var _core_utils = __w_pdfjs_require__(8); + +var _arithmetic_decoder = __w_pdfjs_require__(17); + +class JpxError extends _util.BaseException { + constructor(msg) { + super(`JPX error: ${msg}`); + } + +} + +var JpxImage = function JpxImageClosure() { + var SubbandsGainLog2 = { + LL: 0, + LH: 1, + HL: 1, + HH: 2 + }; + + function JpxImage() { + this.failOnCorruptedImage = false; + } + + JpxImage.prototype = { + parse: function JpxImage_parse(data) { + var head = (0, _core_utils.readUint16)(data, 0); + + if (head === 0xff4f) { + this.parseCodestream(data, 0, data.length); + return; + } + + var position = 0, + length = data.length; + + while (position < length) { + var headerSize = 8; + var lbox = (0, _core_utils.readUint32)(data, position); + var tbox = (0, _core_utils.readUint32)(data, position + 4); + position += headerSize; + + if (lbox === 1) { + lbox = (0, _core_utils.readUint32)(data, position) * 4294967296 + (0, _core_utils.readUint32)(data, position + 4); + position += 8; + headerSize += 8; + } + + if (lbox === 0) { + lbox = length - position + headerSize; + } + + if (lbox < headerSize) { + throw new JpxError("Invalid box field size"); + } + + var dataLength = lbox - headerSize; + var jumpDataLength = true; + + switch (tbox) { + case 0x6a703268: + jumpDataLength = false; + break; + + case 0x636f6c72: + var method = data[position]; + + if (method === 1) { + var colorspace = (0, _core_utils.readUint32)(data, position + 3); + + switch (colorspace) { + case 16: + case 17: + case 18: + break; + + default: + (0, _util.warn)("Unknown colorspace " + colorspace); + break; + } + } else if (method === 2) { + (0, _util.info)("ICC profile not supported"); + } + + break; + + case 0x6a703263: + this.parseCodestream(data, position, position + dataLength); + break; + + case 0x6a502020: + if ((0, _core_utils.readUint32)(data, position) !== 0x0d0a870a) { + (0, _util.warn)("Invalid JP2 signature"); + } + + break; + + case 0x6a501a1a: + case 0x66747970: + case 0x72726571: + case 0x72657320: + case 0x69686472: + break; + + default: + var headerType = String.fromCharCode(tbox >> 24 & 0xff, tbox >> 16 & 0xff, tbox >> 8 & 0xff, tbox & 0xff); + (0, _util.warn)("Unsupported header type " + tbox + " (" + headerType + ")"); + break; + } + + if (jumpDataLength) { + position += dataLength; + } + } + }, + parseImageProperties: function JpxImage_parseImageProperties(stream) { + var newByte = stream.getByte(); + + while (newByte >= 0) { + var oldByte = newByte; + newByte = stream.getByte(); + var code = oldByte << 8 | newByte; + + if (code === 0xff51) { + stream.skip(4); + var Xsiz = stream.getInt32() >>> 0; + var Ysiz = stream.getInt32() >>> 0; + var XOsiz = stream.getInt32() >>> 0; + var YOsiz = stream.getInt32() >>> 0; + stream.skip(16); + var Csiz = stream.getUint16(); + this.width = Xsiz - XOsiz; + this.height = Ysiz - YOsiz; + this.componentsCount = Csiz; + this.bitsPerComponent = 8; + return; + } + } + + throw new JpxError("No size marker found in JPX stream"); + }, + parseCodestream: function JpxImage_parseCodestream(data, start, end) { + var context = {}; + var doNotRecover = false; + + try { + var position = start; + + while (position + 1 < end) { + var code = (0, _core_utils.readUint16)(data, position); + position += 2; + var length = 0, + j, + sqcd, + spqcds, + spqcdSize, + scalarExpounded, + tile; + + switch (code) { + case 0xff4f: + context.mainHeader = true; + break; + + case 0xffd9: + break; + + case 0xff51: + length = (0, _core_utils.readUint16)(data, position); + var siz = {}; + siz.Xsiz = (0, _core_utils.readUint32)(data, position + 4); + siz.Ysiz = (0, _core_utils.readUint32)(data, position + 8); + siz.XOsiz = (0, _core_utils.readUint32)(data, position + 12); + siz.YOsiz = (0, _core_utils.readUint32)(data, position + 16); + siz.XTsiz = (0, _core_utils.readUint32)(data, position + 20); + siz.YTsiz = (0, _core_utils.readUint32)(data, position + 24); + siz.XTOsiz = (0, _core_utils.readUint32)(data, position + 28); + siz.YTOsiz = (0, _core_utils.readUint32)(data, position + 32); + var componentsCount = (0, _core_utils.readUint16)(data, position + 36); + siz.Csiz = componentsCount; + var components = []; + j = position + 38; + + for (var i = 0; i < componentsCount; i++) { + var component = { + precision: (data[j] & 0x7f) + 1, + isSigned: !!(data[j] & 0x80), + XRsiz: data[j + 1], + YRsiz: data[j + 2] + }; + j += 3; + calculateComponentDimensions(component, siz); + components.push(component); + } + + context.SIZ = siz; + context.components = components; + calculateTileGrids(context, components); + context.QCC = []; + context.COC = []; + break; + + case 0xff5c: + length = (0, _core_utils.readUint16)(data, position); + var qcd = {}; + j = position + 2; + sqcd = data[j++]; + + switch (sqcd & 0x1f) { + case 0: + spqcdSize = 8; + scalarExpounded = true; + break; + + case 1: + spqcdSize = 16; + scalarExpounded = false; + break; + + case 2: + spqcdSize = 16; + scalarExpounded = true; + break; + + default: + throw new Error("Invalid SQcd value " + sqcd); + } + + qcd.noQuantization = spqcdSize === 8; + qcd.scalarExpounded = scalarExpounded; + qcd.guardBits = sqcd >> 5; + spqcds = []; + + while (j < length + position) { + var spqcd = {}; + + if (spqcdSize === 8) { + spqcd.epsilon = data[j++] >> 3; + spqcd.mu = 0; + } else { + spqcd.epsilon = data[j] >> 3; + spqcd.mu = (data[j] & 0x7) << 8 | data[j + 1]; + j += 2; + } + + spqcds.push(spqcd); + } + + qcd.SPqcds = spqcds; + + if (context.mainHeader) { + context.QCD = qcd; + } else { + context.currentTile.QCD = qcd; + context.currentTile.QCC = []; + } + + break; + + case 0xff5d: + length = (0, _core_utils.readUint16)(data, position); + var qcc = {}; + j = position + 2; + var cqcc; + + if (context.SIZ.Csiz < 257) { + cqcc = data[j++]; + } else { + cqcc = (0, _core_utils.readUint16)(data, j); + j += 2; + } + + sqcd = data[j++]; + + switch (sqcd & 0x1f) { + case 0: + spqcdSize = 8; + scalarExpounded = true; + break; + + case 1: + spqcdSize = 16; + scalarExpounded = false; + break; + + case 2: + spqcdSize = 16; + scalarExpounded = true; + break; + + default: + throw new Error("Invalid SQcd value " + sqcd); + } + + qcc.noQuantization = spqcdSize === 8; + qcc.scalarExpounded = scalarExpounded; + qcc.guardBits = sqcd >> 5; + spqcds = []; + + while (j < length + position) { + spqcd = {}; + + if (spqcdSize === 8) { + spqcd.epsilon = data[j++] >> 3; + spqcd.mu = 0; + } else { + spqcd.epsilon = data[j] >> 3; + spqcd.mu = (data[j] & 0x7) << 8 | data[j + 1]; + j += 2; + } + + spqcds.push(spqcd); + } + + qcc.SPqcds = spqcds; + + if (context.mainHeader) { + context.QCC[cqcc] = qcc; + } else { + context.currentTile.QCC[cqcc] = qcc; + } + + break; + + case 0xff52: + length = (0, _core_utils.readUint16)(data, position); + var cod = {}; + j = position + 2; + var scod = data[j++]; + cod.entropyCoderWithCustomPrecincts = !!(scod & 1); + cod.sopMarkerUsed = !!(scod & 2); + cod.ephMarkerUsed = !!(scod & 4); + cod.progressionOrder = data[j++]; + cod.layersCount = (0, _core_utils.readUint16)(data, j); + j += 2; + cod.multipleComponentTransform = data[j++]; + cod.decompositionLevelsCount = data[j++]; + cod.xcb = (data[j++] & 0xf) + 2; + cod.ycb = (data[j++] & 0xf) + 2; + var blockStyle = data[j++]; + cod.selectiveArithmeticCodingBypass = !!(blockStyle & 1); + cod.resetContextProbabilities = !!(blockStyle & 2); + cod.terminationOnEachCodingPass = !!(blockStyle & 4); + cod.verticallyStripe = !!(blockStyle & 8); + cod.predictableTermination = !!(blockStyle & 16); + cod.segmentationSymbolUsed = !!(blockStyle & 32); + cod.reversibleTransformation = data[j++]; + + if (cod.entropyCoderWithCustomPrecincts) { + var precinctsSizes = []; + + while (j < length + position) { + var precinctsSize = data[j++]; + precinctsSizes.push({ + PPx: precinctsSize & 0xf, + PPy: precinctsSize >> 4 + }); + } + + cod.precinctsSizes = precinctsSizes; + } + + var unsupported = []; + + if (cod.selectiveArithmeticCodingBypass) { + unsupported.push("selectiveArithmeticCodingBypass"); + } + + if (cod.resetContextProbabilities) { + unsupported.push("resetContextProbabilities"); + } + + if (cod.terminationOnEachCodingPass) { + unsupported.push("terminationOnEachCodingPass"); + } + + if (cod.verticallyStripe) { + unsupported.push("verticallyStripe"); + } + + if (cod.predictableTermination) { + unsupported.push("predictableTermination"); + } + + if (unsupported.length > 0) { + doNotRecover = true; + throw new Error("Unsupported COD options (" + unsupported.join(", ") + ")"); + } + + if (context.mainHeader) { + context.COD = cod; + } else { + context.currentTile.COD = cod; + context.currentTile.COC = []; + } + + break; + + case 0xff90: + length = (0, _core_utils.readUint16)(data, position); + tile = {}; + tile.index = (0, _core_utils.readUint16)(data, position + 2); + tile.length = (0, _core_utils.readUint32)(data, position + 4); + tile.dataEnd = tile.length + position - 2; + tile.partIndex = data[position + 8]; + tile.partsCount = data[position + 9]; + context.mainHeader = false; + + if (tile.partIndex === 0) { + tile.COD = context.COD; + tile.COC = context.COC.slice(0); + tile.QCD = context.QCD; + tile.QCC = context.QCC.slice(0); + } + + context.currentTile = tile; + break; + + case 0xff93: + tile = context.currentTile; + + if (tile.partIndex === 0) { + initializeTile(context, tile.index); + buildPackets(context); + } + + length = tile.dataEnd - position; + parseTilePackets(context, data, position, length); + break; + + case 0xff55: + case 0xff57: + case 0xff58: + case 0xff64: + length = (0, _core_utils.readUint16)(data, position); + break; + + case 0xff53: + throw new Error("Codestream code 0xFF53 (COC) is not implemented"); + + default: + throw new Error("Unknown codestream code: " + code.toString(16)); + } + + position += length; + } + } catch (e) { + if (doNotRecover || this.failOnCorruptedImage) { + throw new JpxError(e.message); + } else { + (0, _util.warn)("JPX: Trying to recover from: " + e.message); + } + } + + this.tiles = transformComponents(context); + this.width = context.SIZ.Xsiz - context.SIZ.XOsiz; + this.height = context.SIZ.Ysiz - context.SIZ.YOsiz; + this.componentsCount = context.SIZ.Csiz; + } + }; + + function calculateComponentDimensions(component, siz) { + component.x0 = Math.ceil(siz.XOsiz / component.XRsiz); + component.x1 = Math.ceil(siz.Xsiz / component.XRsiz); + component.y0 = Math.ceil(siz.YOsiz / component.YRsiz); + component.y1 = Math.ceil(siz.Ysiz / component.YRsiz); + component.width = component.x1 - component.x0; + component.height = component.y1 - component.y0; + } + + function calculateTileGrids(context, components) { + var siz = context.SIZ; + var tile, + tiles = []; + var numXtiles = Math.ceil((siz.Xsiz - siz.XTOsiz) / siz.XTsiz); + var numYtiles = Math.ceil((siz.Ysiz - siz.YTOsiz) / siz.YTsiz); + + for (var q = 0; q < numYtiles; q++) { + for (var p = 0; p < numXtiles; p++) { + tile = {}; + tile.tx0 = Math.max(siz.XTOsiz + p * siz.XTsiz, siz.XOsiz); + tile.ty0 = Math.max(siz.YTOsiz + q * siz.YTsiz, siz.YOsiz); + tile.tx1 = Math.min(siz.XTOsiz + (p + 1) * siz.XTsiz, siz.Xsiz); + tile.ty1 = Math.min(siz.YTOsiz + (q + 1) * siz.YTsiz, siz.Ysiz); + tile.width = tile.tx1 - tile.tx0; + tile.height = tile.ty1 - tile.ty0; + tile.components = []; + tiles.push(tile); + } + } + + context.tiles = tiles; + var componentsCount = siz.Csiz; + + for (var i = 0, ii = componentsCount; i < ii; i++) { + var component = components[i]; + + for (var j = 0, jj = tiles.length; j < jj; j++) { + var tileComponent = {}; + tile = tiles[j]; + tileComponent.tcx0 = Math.ceil(tile.tx0 / component.XRsiz); + tileComponent.tcy0 = Math.ceil(tile.ty0 / component.YRsiz); + tileComponent.tcx1 = Math.ceil(tile.tx1 / component.XRsiz); + tileComponent.tcy1 = Math.ceil(tile.ty1 / component.YRsiz); + tileComponent.width = tileComponent.tcx1 - tileComponent.tcx0; + tileComponent.height = tileComponent.tcy1 - tileComponent.tcy0; + tile.components[i] = tileComponent; + } + } + } + + function getBlocksDimensions(context, component, r) { + var codOrCoc = component.codingStyleParameters; + var result = {}; + + if (!codOrCoc.entropyCoderWithCustomPrecincts) { + result.PPx = 15; + result.PPy = 15; + } else { + result.PPx = codOrCoc.precinctsSizes[r].PPx; + result.PPy = codOrCoc.precinctsSizes[r].PPy; + } + + result.xcb_ = r > 0 ? Math.min(codOrCoc.xcb, result.PPx - 1) : Math.min(codOrCoc.xcb, result.PPx); + result.ycb_ = r > 0 ? Math.min(codOrCoc.ycb, result.PPy - 1) : Math.min(codOrCoc.ycb, result.PPy); + return result; + } + + function buildPrecincts(context, resolution, dimensions) { + var precinctWidth = 1 << dimensions.PPx; + var precinctHeight = 1 << dimensions.PPy; + var isZeroRes = resolution.resLevel === 0; + var precinctWidthInSubband = 1 << dimensions.PPx + (isZeroRes ? 0 : -1); + var precinctHeightInSubband = 1 << dimensions.PPy + (isZeroRes ? 0 : -1); + var numprecinctswide = resolution.trx1 > resolution.trx0 ? Math.ceil(resolution.trx1 / precinctWidth) - Math.floor(resolution.trx0 / precinctWidth) : 0; + var numprecinctshigh = resolution.try1 > resolution.try0 ? Math.ceil(resolution.try1 / precinctHeight) - Math.floor(resolution.try0 / precinctHeight) : 0; + var numprecincts = numprecinctswide * numprecinctshigh; + resolution.precinctParameters = { + precinctWidth, + precinctHeight, + numprecinctswide, + numprecinctshigh, + numprecincts, + precinctWidthInSubband, + precinctHeightInSubband + }; + } + + function buildCodeblocks(context, subband, dimensions) { + var xcb_ = dimensions.xcb_; + var ycb_ = dimensions.ycb_; + var codeblockWidth = 1 << xcb_; + var codeblockHeight = 1 << ycb_; + var cbx0 = subband.tbx0 >> xcb_; + var cby0 = subband.tby0 >> ycb_; + var cbx1 = subband.tbx1 + codeblockWidth - 1 >> xcb_; + var cby1 = subband.tby1 + codeblockHeight - 1 >> ycb_; + var precinctParameters = subband.resolution.precinctParameters; + var codeblocks = []; + var precincts = []; + var i, j, codeblock, precinctNumber; + + for (j = cby0; j < cby1; j++) { + for (i = cbx0; i < cbx1; i++) { + codeblock = { + cbx: i, + cby: j, + tbx0: codeblockWidth * i, + tby0: codeblockHeight * j, + tbx1: codeblockWidth * (i + 1), + tby1: codeblockHeight * (j + 1) + }; + codeblock.tbx0_ = Math.max(subband.tbx0, codeblock.tbx0); + codeblock.tby0_ = Math.max(subband.tby0, codeblock.tby0); + codeblock.tbx1_ = Math.min(subband.tbx1, codeblock.tbx1); + codeblock.tby1_ = Math.min(subband.tby1, codeblock.tby1); + var pi = Math.floor((codeblock.tbx0_ - subband.tbx0) / precinctParameters.precinctWidthInSubband); + var pj = Math.floor((codeblock.tby0_ - subband.tby0) / precinctParameters.precinctHeightInSubband); + precinctNumber = pi + pj * precinctParameters.numprecinctswide; + codeblock.precinctNumber = precinctNumber; + codeblock.subbandType = subband.type; + codeblock.Lblock = 3; + + if (codeblock.tbx1_ <= codeblock.tbx0_ || codeblock.tby1_ <= codeblock.tby0_) { + continue; + } + + codeblocks.push(codeblock); + var precinct = precincts[precinctNumber]; + + if (precinct !== undefined) { + if (i < precinct.cbxMin) { + precinct.cbxMin = i; + } else if (i > precinct.cbxMax) { + precinct.cbxMax = i; + } + + if (j < precinct.cbyMin) { + precinct.cbxMin = j; + } else if (j > precinct.cbyMax) { + precinct.cbyMax = j; + } + } else { + precincts[precinctNumber] = precinct = { + cbxMin: i, + cbyMin: j, + cbxMax: i, + cbyMax: j + }; + } + + codeblock.precinct = precinct; + } + } + + subband.codeblockParameters = { + codeblockWidth: xcb_, + codeblockHeight: ycb_, + numcodeblockwide: cbx1 - cbx0 + 1, + numcodeblockhigh: cby1 - cby0 + 1 + }; + subband.codeblocks = codeblocks; + subband.precincts = precincts; + } + + function createPacket(resolution, precinctNumber, layerNumber) { + var precinctCodeblocks = []; + var subbands = resolution.subbands; + + for (var i = 0, ii = subbands.length; i < ii; i++) { + var subband = subbands[i]; + var codeblocks = subband.codeblocks; + + for (var j = 0, jj = codeblocks.length; j < jj; j++) { + var codeblock = codeblocks[j]; + + if (codeblock.precinctNumber !== precinctNumber) { + continue; + } + + precinctCodeblocks.push(codeblock); + } + } + + return { + layerNumber, + codeblocks: precinctCodeblocks + }; + } + + function LayerResolutionComponentPositionIterator(context) { + var siz = context.SIZ; + var tileIndex = context.currentTile.index; + var tile = context.tiles[tileIndex]; + var layersCount = tile.codingStyleDefaultParameters.layersCount; + var componentsCount = siz.Csiz; + var maxDecompositionLevelsCount = 0; + + for (var q = 0; q < componentsCount; q++) { + maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount, tile.components[q].codingStyleParameters.decompositionLevelsCount); + } + + var l = 0, + r = 0, + i = 0, + k = 0; + + this.nextPacket = function JpxImage_nextPacket() { + for (; l < layersCount; l++) { + for (; r <= maxDecompositionLevelsCount; r++) { + for (; i < componentsCount; i++) { + var component = tile.components[i]; + + if (r > component.codingStyleParameters.decompositionLevelsCount) { + continue; + } + + var resolution = component.resolutions[r]; + var numprecincts = resolution.precinctParameters.numprecincts; + + for (; k < numprecincts;) { + var packet = createPacket(resolution, k, l); + k++; + return packet; + } + + k = 0; + } + + i = 0; + } + + r = 0; + } + + throw new JpxError("Out of packets"); + }; + } + + function ResolutionLayerComponentPositionIterator(context) { + var siz = context.SIZ; + var tileIndex = context.currentTile.index; + var tile = context.tiles[tileIndex]; + var layersCount = tile.codingStyleDefaultParameters.layersCount; + var componentsCount = siz.Csiz; + var maxDecompositionLevelsCount = 0; + + for (var q = 0; q < componentsCount; q++) { + maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount, tile.components[q].codingStyleParameters.decompositionLevelsCount); + } + + var r = 0, + l = 0, + i = 0, + k = 0; + + this.nextPacket = function JpxImage_nextPacket() { + for (; r <= maxDecompositionLevelsCount; r++) { + for (; l < layersCount; l++) { + for (; i < componentsCount; i++) { + var component = tile.components[i]; + + if (r > component.codingStyleParameters.decompositionLevelsCount) { + continue; + } + + var resolution = component.resolutions[r]; + var numprecincts = resolution.precinctParameters.numprecincts; + + for (; k < numprecincts;) { + var packet = createPacket(resolution, k, l); + k++; + return packet; + } + + k = 0; + } + + i = 0; + } + + l = 0; + } + + throw new JpxError("Out of packets"); + }; + } + + function ResolutionPositionComponentLayerIterator(context) { + var siz = context.SIZ; + var tileIndex = context.currentTile.index; + var tile = context.tiles[tileIndex]; + var layersCount = tile.codingStyleDefaultParameters.layersCount; + var componentsCount = siz.Csiz; + var l, r, c, p; + var maxDecompositionLevelsCount = 0; + + for (c = 0; c < componentsCount; c++) { + const component = tile.components[c]; + maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount, component.codingStyleParameters.decompositionLevelsCount); + } + + var maxNumPrecinctsInLevel = new Int32Array(maxDecompositionLevelsCount + 1); + + for (r = 0; r <= maxDecompositionLevelsCount; ++r) { + var maxNumPrecincts = 0; + + for (c = 0; c < componentsCount; ++c) { + var resolutions = tile.components[c].resolutions; + + if (r < resolutions.length) { + maxNumPrecincts = Math.max(maxNumPrecincts, resolutions[r].precinctParameters.numprecincts); + } + } + + maxNumPrecinctsInLevel[r] = maxNumPrecincts; + } + + l = 0; + r = 0; + c = 0; + p = 0; + + this.nextPacket = function JpxImage_nextPacket() { + for (; r <= maxDecompositionLevelsCount; r++) { + for (; p < maxNumPrecinctsInLevel[r]; p++) { + for (; c < componentsCount; c++) { + const component = tile.components[c]; + + if (r > component.codingStyleParameters.decompositionLevelsCount) { + continue; + } + + var resolution = component.resolutions[r]; + var numprecincts = resolution.precinctParameters.numprecincts; + + if (p >= numprecincts) { + continue; + } + + for (; l < layersCount;) { + var packet = createPacket(resolution, p, l); + l++; + return packet; + } + + l = 0; + } + + c = 0; + } + + p = 0; + } + + throw new JpxError("Out of packets"); + }; + } + + function PositionComponentResolutionLayerIterator(context) { + var siz = context.SIZ; + var tileIndex = context.currentTile.index; + var tile = context.tiles[tileIndex]; + var layersCount = tile.codingStyleDefaultParameters.layersCount; + var componentsCount = siz.Csiz; + var precinctsSizes = getPrecinctSizesInImageScale(tile); + var precinctsIterationSizes = precinctsSizes; + var l = 0, + r = 0, + c = 0, + px = 0, + py = 0; + + this.nextPacket = function JpxImage_nextPacket() { + for (; py < precinctsIterationSizes.maxNumHigh; py++) { + for (; px < precinctsIterationSizes.maxNumWide; px++) { + for (; c < componentsCount; c++) { + var component = tile.components[c]; + var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; + + for (; r <= decompositionLevelsCount; r++) { + var resolution = component.resolutions[r]; + var sizeInImageScale = precinctsSizes.components[c].resolutions[r]; + var k = getPrecinctIndexIfExist(px, py, sizeInImageScale, precinctsIterationSizes, resolution); + + if (k === null) { + continue; + } + + for (; l < layersCount;) { + var packet = createPacket(resolution, k, l); + l++; + return packet; + } + + l = 0; + } + + r = 0; + } + + c = 0; + } + + px = 0; + } + + throw new JpxError("Out of packets"); + }; + } + + function ComponentPositionResolutionLayerIterator(context) { + var siz = context.SIZ; + var tileIndex = context.currentTile.index; + var tile = context.tiles[tileIndex]; + var layersCount = tile.codingStyleDefaultParameters.layersCount; + var componentsCount = siz.Csiz; + var precinctsSizes = getPrecinctSizesInImageScale(tile); + var l = 0, + r = 0, + c = 0, + px = 0, + py = 0; + + this.nextPacket = function JpxImage_nextPacket() { + for (; c < componentsCount; ++c) { + var component = tile.components[c]; + var precinctsIterationSizes = precinctsSizes.components[c]; + var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; + + for (; py < precinctsIterationSizes.maxNumHigh; py++) { + for (; px < precinctsIterationSizes.maxNumWide; px++) { + for (; r <= decompositionLevelsCount; r++) { + var resolution = component.resolutions[r]; + var sizeInImageScale = precinctsIterationSizes.resolutions[r]; + var k = getPrecinctIndexIfExist(px, py, sizeInImageScale, precinctsIterationSizes, resolution); + + if (k === null) { + continue; + } + + for (; l < layersCount;) { + var packet = createPacket(resolution, k, l); + l++; + return packet; + } + + l = 0; + } + + r = 0; + } + + px = 0; + } + + py = 0; + } + + throw new JpxError("Out of packets"); + }; + } + + function getPrecinctIndexIfExist(pxIndex, pyIndex, sizeInImageScale, precinctIterationSizes, resolution) { + var posX = pxIndex * precinctIterationSizes.minWidth; + var posY = pyIndex * precinctIterationSizes.minHeight; + + if (posX % sizeInImageScale.width !== 0 || posY % sizeInImageScale.height !== 0) { + return null; + } + + var startPrecinctRowIndex = posY / sizeInImageScale.width * resolution.precinctParameters.numprecinctswide; + return posX / sizeInImageScale.height + startPrecinctRowIndex; + } + + function getPrecinctSizesInImageScale(tile) { + var componentsCount = tile.components.length; + var minWidth = Number.MAX_VALUE; + var minHeight = Number.MAX_VALUE; + var maxNumWide = 0; + var maxNumHigh = 0; + var sizePerComponent = new Array(componentsCount); + + for (var c = 0; c < componentsCount; c++) { + var component = tile.components[c]; + var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; + var sizePerResolution = new Array(decompositionLevelsCount + 1); + var minWidthCurrentComponent = Number.MAX_VALUE; + var minHeightCurrentComponent = Number.MAX_VALUE; + var maxNumWideCurrentComponent = 0; + var maxNumHighCurrentComponent = 0; + var scale = 1; + + for (var r = decompositionLevelsCount; r >= 0; --r) { + var resolution = component.resolutions[r]; + var widthCurrentResolution = scale * resolution.precinctParameters.precinctWidth; + var heightCurrentResolution = scale * resolution.precinctParameters.precinctHeight; + minWidthCurrentComponent = Math.min(minWidthCurrentComponent, widthCurrentResolution); + minHeightCurrentComponent = Math.min(minHeightCurrentComponent, heightCurrentResolution); + maxNumWideCurrentComponent = Math.max(maxNumWideCurrentComponent, resolution.precinctParameters.numprecinctswide); + maxNumHighCurrentComponent = Math.max(maxNumHighCurrentComponent, resolution.precinctParameters.numprecinctshigh); + sizePerResolution[r] = { + width: widthCurrentResolution, + height: heightCurrentResolution + }; + scale <<= 1; + } + + minWidth = Math.min(minWidth, minWidthCurrentComponent); + minHeight = Math.min(minHeight, minHeightCurrentComponent); + maxNumWide = Math.max(maxNumWide, maxNumWideCurrentComponent); + maxNumHigh = Math.max(maxNumHigh, maxNumHighCurrentComponent); + sizePerComponent[c] = { + resolutions: sizePerResolution, + minWidth: minWidthCurrentComponent, + minHeight: minHeightCurrentComponent, + maxNumWide: maxNumWideCurrentComponent, + maxNumHigh: maxNumHighCurrentComponent + }; + } + + return { + components: sizePerComponent, + minWidth, + minHeight, + maxNumWide, + maxNumHigh + }; + } + + function buildPackets(context) { + var siz = context.SIZ; + var tileIndex = context.currentTile.index; + var tile = context.tiles[tileIndex]; + var componentsCount = siz.Csiz; + + for (var c = 0; c < componentsCount; c++) { + var component = tile.components[c]; + var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; + var resolutions = []; + var subbands = []; + + for (var r = 0; r <= decompositionLevelsCount; r++) { + var blocksDimensions = getBlocksDimensions(context, component, r); + var resolution = {}; + var scale = 1 << decompositionLevelsCount - r; + resolution.trx0 = Math.ceil(component.tcx0 / scale); + resolution.try0 = Math.ceil(component.tcy0 / scale); + resolution.trx1 = Math.ceil(component.tcx1 / scale); + resolution.try1 = Math.ceil(component.tcy1 / scale); + resolution.resLevel = r; + buildPrecincts(context, resolution, blocksDimensions); + resolutions.push(resolution); + var subband; + + if (r === 0) { + subband = {}; + subband.type = "LL"; + subband.tbx0 = Math.ceil(component.tcx0 / scale); + subband.tby0 = Math.ceil(component.tcy0 / scale); + subband.tbx1 = Math.ceil(component.tcx1 / scale); + subband.tby1 = Math.ceil(component.tcy1 / scale); + subband.resolution = resolution; + buildCodeblocks(context, subband, blocksDimensions); + subbands.push(subband); + resolution.subbands = [subband]; + } else { + var bscale = 1 << decompositionLevelsCount - r + 1; + var resolutionSubbands = []; + subband = {}; + subband.type = "HL"; + subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5); + subband.tby0 = Math.ceil(component.tcy0 / bscale); + subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5); + subband.tby1 = Math.ceil(component.tcy1 / bscale); + subband.resolution = resolution; + buildCodeblocks(context, subband, blocksDimensions); + subbands.push(subband); + resolutionSubbands.push(subband); + subband = {}; + subband.type = "LH"; + subband.tbx0 = Math.ceil(component.tcx0 / bscale); + subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5); + subband.tbx1 = Math.ceil(component.tcx1 / bscale); + subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5); + subband.resolution = resolution; + buildCodeblocks(context, subband, blocksDimensions); + subbands.push(subband); + resolutionSubbands.push(subband); + subband = {}; + subband.type = "HH"; + subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5); + subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5); + subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5); + subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5); + subband.resolution = resolution; + buildCodeblocks(context, subband, blocksDimensions); + subbands.push(subband); + resolutionSubbands.push(subband); + resolution.subbands = resolutionSubbands; + } + } + + component.resolutions = resolutions; + component.subbands = subbands; + } + + var progressionOrder = tile.codingStyleDefaultParameters.progressionOrder; + + switch (progressionOrder) { + case 0: + tile.packetsIterator = new LayerResolutionComponentPositionIterator(context); + break; + + case 1: + tile.packetsIterator = new ResolutionLayerComponentPositionIterator(context); + break; + + case 2: + tile.packetsIterator = new ResolutionPositionComponentLayerIterator(context); + break; + + case 3: + tile.packetsIterator = new PositionComponentResolutionLayerIterator(context); + break; + + case 4: + tile.packetsIterator = new ComponentPositionResolutionLayerIterator(context); + break; + + default: + throw new JpxError(`Unsupported progression order ${progressionOrder}`); + } + } + + function parseTilePackets(context, data, offset, dataLength) { + var position = 0; + var buffer, + bufferSize = 0, + skipNextBit = false; + + function readBits(count) { + while (bufferSize < count) { + var b = data[offset + position]; + position++; + + if (skipNextBit) { + buffer = buffer << 7 | b; + bufferSize += 7; + skipNextBit = false; + } else { + buffer = buffer << 8 | b; + bufferSize += 8; + } + + if (b === 0xff) { + skipNextBit = true; + } + } + + bufferSize -= count; + return buffer >>> bufferSize & (1 << count) - 1; + } + + function skipMarkerIfEqual(value) { + if (data[offset + position - 1] === 0xff && data[offset + position] === value) { + skipBytes(1); + return true; + } else if (data[offset + position] === 0xff && data[offset + position + 1] === value) { + skipBytes(2); + return true; + } + + return false; + } + + function skipBytes(count) { + position += count; + } + + function alignToByte() { + bufferSize = 0; + + if (skipNextBit) { + position++; + skipNextBit = false; + } + } + + function readCodingpasses() { + if (readBits(1) === 0) { + return 1; + } + + if (readBits(1) === 0) { + return 2; + } + + var value = readBits(2); + + if (value < 3) { + return value + 3; + } + + value = readBits(5); + + if (value < 31) { + return value + 6; + } + + value = readBits(7); + return value + 37; + } + + var tileIndex = context.currentTile.index; + var tile = context.tiles[tileIndex]; + var sopMarkerUsed = context.COD.sopMarkerUsed; + var ephMarkerUsed = context.COD.ephMarkerUsed; + var packetsIterator = tile.packetsIterator; + + while (position < dataLength) { + alignToByte(); + + if (sopMarkerUsed && skipMarkerIfEqual(0x91)) { + skipBytes(4); + } + + var packet = packetsIterator.nextPacket(); + + if (!readBits(1)) { + continue; + } + + var layerNumber = packet.layerNumber; + var queue = [], + codeblock; + + for (var i = 0, ii = packet.codeblocks.length; i < ii; i++) { + codeblock = packet.codeblocks[i]; + var precinct = codeblock.precinct; + var codeblockColumn = codeblock.cbx - precinct.cbxMin; + var codeblockRow = codeblock.cby - precinct.cbyMin; + var codeblockIncluded = false; + var firstTimeInclusion = false; + var valueReady; + + if (codeblock.included !== undefined) { + codeblockIncluded = !!readBits(1); + } else { + precinct = codeblock.precinct; + var inclusionTree, zeroBitPlanesTree; + + if (precinct.inclusionTree !== undefined) { + inclusionTree = precinct.inclusionTree; + } else { + var width = precinct.cbxMax - precinct.cbxMin + 1; + var height = precinct.cbyMax - precinct.cbyMin + 1; + inclusionTree = new InclusionTree(width, height, layerNumber); + zeroBitPlanesTree = new TagTree(width, height); + precinct.inclusionTree = inclusionTree; + precinct.zeroBitPlanesTree = zeroBitPlanesTree; + } + + if (inclusionTree.reset(codeblockColumn, codeblockRow, layerNumber)) { + while (true) { + if (readBits(1)) { + valueReady = !inclusionTree.nextLevel(); + + if (valueReady) { + codeblock.included = true; + codeblockIncluded = firstTimeInclusion = true; + break; + } + } else { + inclusionTree.incrementValue(layerNumber); + break; + } + } + } + } + + if (!codeblockIncluded) { + continue; + } + + if (firstTimeInclusion) { + zeroBitPlanesTree = precinct.zeroBitPlanesTree; + zeroBitPlanesTree.reset(codeblockColumn, codeblockRow); + + while (true) { + if (readBits(1)) { + valueReady = !zeroBitPlanesTree.nextLevel(); + + if (valueReady) { + break; + } + } else { + zeroBitPlanesTree.incrementValue(); + } + } + + codeblock.zeroBitPlanes = zeroBitPlanesTree.value; + } + + var codingpasses = readCodingpasses(); + + while (readBits(1)) { + codeblock.Lblock++; + } + + var codingpassesLog2 = (0, _core_utils.log2)(codingpasses); + var bits = (codingpasses < 1 << codingpassesLog2 ? codingpassesLog2 - 1 : codingpassesLog2) + codeblock.Lblock; + var codedDataLength = readBits(bits); + queue.push({ + codeblock, + codingpasses, + dataLength: codedDataLength + }); + } + + alignToByte(); + + if (ephMarkerUsed) { + skipMarkerIfEqual(0x92); + } + + while (queue.length > 0) { + var packetItem = queue.shift(); + codeblock = packetItem.codeblock; + + if (codeblock.data === undefined) { + codeblock.data = []; + } + + codeblock.data.push({ + data, + start: offset + position, + end: offset + position + packetItem.dataLength, + codingpasses: packetItem.codingpasses + }); + position += packetItem.dataLength; + } + } + + return position; + } + + function copyCoefficients(coefficients, levelWidth, levelHeight, subband, delta, mb, reversible, segmentationSymbolUsed) { + var x0 = subband.tbx0; + var y0 = subband.tby0; + var width = subband.tbx1 - subband.tbx0; + var codeblocks = subband.codeblocks; + var right = subband.type.charAt(0) === "H" ? 1 : 0; + var bottom = subband.type.charAt(1) === "H" ? levelWidth : 0; + + for (var i = 0, ii = codeblocks.length; i < ii; ++i) { + var codeblock = codeblocks[i]; + var blockWidth = codeblock.tbx1_ - codeblock.tbx0_; + var blockHeight = codeblock.tby1_ - codeblock.tby0_; + + if (blockWidth === 0 || blockHeight === 0) { + continue; + } + + if (codeblock.data === undefined) { + continue; + } + + var bitModel, currentCodingpassType; + bitModel = new BitModel(blockWidth, blockHeight, codeblock.subbandType, codeblock.zeroBitPlanes, mb); + currentCodingpassType = 2; + var data = codeblock.data, + totalLength = 0, + codingpasses = 0; + var j, jj, dataItem; + + for (j = 0, jj = data.length; j < jj; j++) { + dataItem = data[j]; + totalLength += dataItem.end - dataItem.start; + codingpasses += dataItem.codingpasses; + } + + var encodedData = new Uint8Array(totalLength); + var position = 0; + + for (j = 0, jj = data.length; j < jj; j++) { + dataItem = data[j]; + var chunk = dataItem.data.subarray(dataItem.start, dataItem.end); + encodedData.set(chunk, position); + position += chunk.length; + } + + var decoder = new _arithmetic_decoder.ArithmeticDecoder(encodedData, 0, totalLength); + bitModel.setDecoder(decoder); + + for (j = 0; j < codingpasses; j++) { + switch (currentCodingpassType) { + case 0: + bitModel.runSignificancePropagationPass(); + break; + + case 1: + bitModel.runMagnitudeRefinementPass(); + break; + + case 2: + bitModel.runCleanupPass(); + + if (segmentationSymbolUsed) { + bitModel.checkSegmentationSymbol(); + } + + break; + } + + currentCodingpassType = (currentCodingpassType + 1) % 3; + } + + var offset = codeblock.tbx0_ - x0 + (codeblock.tby0_ - y0) * width; + var sign = bitModel.coefficentsSign; + var magnitude = bitModel.coefficentsMagnitude; + var bitsDecoded = bitModel.bitsDecoded; + var magnitudeCorrection = reversible ? 0 : 0.5; + var k, n, nb; + position = 0; + var interleave = subband.type !== "LL"; + + for (j = 0; j < blockHeight; j++) { + var row = offset / width | 0; + var levelOffset = 2 * row * (levelWidth - width) + right + bottom; + + for (k = 0; k < blockWidth; k++) { + n = magnitude[position]; + + if (n !== 0) { + n = (n + magnitudeCorrection) * delta; + + if (sign[position] !== 0) { + n = -n; + } + + nb = bitsDecoded[position]; + var pos = interleave ? levelOffset + (offset << 1) : offset; + + if (reversible && nb >= mb) { + coefficients[pos] = n; + } else { + coefficients[pos] = n * (1 << mb - nb); + } + } + + offset++; + position++; + } + + offset += width - blockWidth; + } + } + } + + function transformTile(context, tile, c) { + var component = tile.components[c]; + var codingStyleParameters = component.codingStyleParameters; + var quantizationParameters = component.quantizationParameters; + var decompositionLevelsCount = codingStyleParameters.decompositionLevelsCount; + var spqcds = quantizationParameters.SPqcds; + var scalarExpounded = quantizationParameters.scalarExpounded; + var guardBits = quantizationParameters.guardBits; + var segmentationSymbolUsed = codingStyleParameters.segmentationSymbolUsed; + var precision = context.components[c].precision; + var reversible = codingStyleParameters.reversibleTransformation; + var transform = reversible ? new ReversibleTransform() : new IrreversibleTransform(); + var subbandCoefficients = []; + var b = 0; + + for (var i = 0; i <= decompositionLevelsCount; i++) { + var resolution = component.resolutions[i]; + var width = resolution.trx1 - resolution.trx0; + var height = resolution.try1 - resolution.try0; + var coefficients = new Float32Array(width * height); + + for (var j = 0, jj = resolution.subbands.length; j < jj; j++) { + var mu, epsilon; + + if (!scalarExpounded) { + mu = spqcds[0].mu; + epsilon = spqcds[0].epsilon + (i > 0 ? 1 - i : 0); + } else { + mu = spqcds[b].mu; + epsilon = spqcds[b].epsilon; + b++; + } + + var subband = resolution.subbands[j]; + var gainLog2 = SubbandsGainLog2[subband.type]; + var delta = reversible ? 1 : 2 ** (precision + gainLog2 - epsilon) * (1 + mu / 2048); + var mb = guardBits + epsilon - 1; + copyCoefficients(coefficients, width, height, subband, delta, mb, reversible, segmentationSymbolUsed); + } + + subbandCoefficients.push({ + width, + height, + items: coefficients + }); + } + + var result = transform.calculate(subbandCoefficients, component.tcx0, component.tcy0); + return { + left: component.tcx0, + top: component.tcy0, + width: result.width, + height: result.height, + items: result.items + }; + } + + function transformComponents(context) { + var siz = context.SIZ; + var components = context.components; + var componentsCount = siz.Csiz; + var resultImages = []; + + for (var i = 0, ii = context.tiles.length; i < ii; i++) { + var tile = context.tiles[i]; + var transformedTiles = []; + var c; + + for (c = 0; c < componentsCount; c++) { + transformedTiles[c] = transformTile(context, tile, c); + } + + var tile0 = transformedTiles[0]; + var out = new Uint8ClampedArray(tile0.items.length * componentsCount); + var result = { + left: tile0.left, + top: tile0.top, + width: tile0.width, + height: tile0.height, + items: out + }; + var shift, offset; + var pos = 0, + j, + jj, + y0, + y1, + y2; + + if (tile.codingStyleDefaultParameters.multipleComponentTransform) { + var fourComponents = componentsCount === 4; + var y0items = transformedTiles[0].items; + var y1items = transformedTiles[1].items; + var y2items = transformedTiles[2].items; + var y3items = fourComponents ? transformedTiles[3].items : null; + shift = components[0].precision - 8; + offset = (128 << shift) + 0.5; + var component0 = tile.components[0]; + var alpha01 = componentsCount - 3; + jj = y0items.length; + + if (!component0.codingStyleParameters.reversibleTransformation) { + for (j = 0; j < jj; j++, pos += alpha01) { + y0 = y0items[j] + offset; + y1 = y1items[j]; + y2 = y2items[j]; + out[pos++] = y0 + 1.402 * y2 >> shift; + out[pos++] = y0 - 0.34413 * y1 - 0.71414 * y2 >> shift; + out[pos++] = y0 + 1.772 * y1 >> shift; + } + } else { + for (j = 0; j < jj; j++, pos += alpha01) { + y0 = y0items[j] + offset; + y1 = y1items[j]; + y2 = y2items[j]; + const g = y0 - (y2 + y1 >> 2); + out[pos++] = g + y2 >> shift; + out[pos++] = g >> shift; + out[pos++] = g + y1 >> shift; + } + } + + if (fourComponents) { + for (j = 0, pos = 3; j < jj; j++, pos += 4) { + out[pos] = y3items[j] + offset >> shift; + } + } + } else { + for (c = 0; c < componentsCount; c++) { + var items = transformedTiles[c].items; + shift = components[c].precision - 8; + offset = (128 << shift) + 0.5; + + for (pos = c, j = 0, jj = items.length; j < jj; j++) { + out[pos] = items[j] + offset >> shift; + pos += componentsCount; + } + } + } + + resultImages.push(result); + } + + return resultImages; + } + + function initializeTile(context, tileIndex) { + var siz = context.SIZ; + var componentsCount = siz.Csiz; + var tile = context.tiles[tileIndex]; + + for (var c = 0; c < componentsCount; c++) { + var component = tile.components[c]; + var qcdOrQcc = context.currentTile.QCC[c] !== undefined ? context.currentTile.QCC[c] : context.currentTile.QCD; + component.quantizationParameters = qcdOrQcc; + var codOrCoc = context.currentTile.COC[c] !== undefined ? context.currentTile.COC[c] : context.currentTile.COD; + component.codingStyleParameters = codOrCoc; + } + + tile.codingStyleDefaultParameters = context.currentTile.COD; + } + + var TagTree = function TagTreeClosure() { + function TagTree(width, height) { + var levelsLength = (0, _core_utils.log2)(Math.max(width, height)) + 1; + this.levels = []; + + for (var i = 0; i < levelsLength; i++) { + var level = { + width, + height, + items: [] + }; + this.levels.push(level); + width = Math.ceil(width / 2); + height = Math.ceil(height / 2); + } + } + + TagTree.prototype = { + reset: function TagTree_reset(i, j) { + var currentLevel = 0, + value = 0, + level; + + while (currentLevel < this.levels.length) { + level = this.levels[currentLevel]; + var index = i + j * level.width; + + if (level.items[index] !== undefined) { + value = level.items[index]; + break; + } + + level.index = index; + i >>= 1; + j >>= 1; + currentLevel++; + } + + currentLevel--; + level = this.levels[currentLevel]; + level.items[level.index] = value; + this.currentLevel = currentLevel; + delete this.value; + }, + incrementValue: function TagTree_incrementValue() { + var level = this.levels[this.currentLevel]; + level.items[level.index]++; + }, + nextLevel: function TagTree_nextLevel() { + var currentLevel = this.currentLevel; + var level = this.levels[currentLevel]; + var value = level.items[level.index]; + currentLevel--; + + if (currentLevel < 0) { + this.value = value; + return false; + } + + this.currentLevel = currentLevel; + level = this.levels[currentLevel]; + level.items[level.index] = value; + return true; + } + }; + return TagTree; + }(); + + var InclusionTree = function InclusionTreeClosure() { + function InclusionTree(width, height, defaultValue) { + var levelsLength = (0, _core_utils.log2)(Math.max(width, height)) + 1; + this.levels = []; + + for (var i = 0; i < levelsLength; i++) { + var items = new Uint8Array(width * height); + + for (var j = 0, jj = items.length; j < jj; j++) { + items[j] = defaultValue; + } + + var level = { + width, + height, + items + }; + this.levels.push(level); + width = Math.ceil(width / 2); + height = Math.ceil(height / 2); + } + } + + InclusionTree.prototype = { + reset: function InclusionTree_reset(i, j, stopValue) { + var currentLevel = 0; + + while (currentLevel < this.levels.length) { + var level = this.levels[currentLevel]; + var index = i + j * level.width; + level.index = index; + var value = level.items[index]; + + if (value === 0xff) { + break; + } + + if (value > stopValue) { + this.currentLevel = currentLevel; + this.propagateValues(); + return false; + } + + i >>= 1; + j >>= 1; + currentLevel++; + } + + this.currentLevel = currentLevel - 1; + return true; + }, + incrementValue: function InclusionTree_incrementValue(stopValue) { + var level = this.levels[this.currentLevel]; + level.items[level.index] = stopValue + 1; + this.propagateValues(); + }, + propagateValues: function InclusionTree_propagateValues() { + var levelIndex = this.currentLevel; + var level = this.levels[levelIndex]; + var currentValue = level.items[level.index]; + + while (--levelIndex >= 0) { + level = this.levels[levelIndex]; + level.items[level.index] = currentValue; + } + }, + nextLevel: function InclusionTree_nextLevel() { + var currentLevel = this.currentLevel; + var level = this.levels[currentLevel]; + var value = level.items[level.index]; + level.items[level.index] = 0xff; + currentLevel--; + + if (currentLevel < 0) { + return false; + } + + this.currentLevel = currentLevel; + level = this.levels[currentLevel]; + level.items[level.index] = value; + return true; + } + }; + return InclusionTree; + }(); + + var BitModel = function BitModelClosure() { + var UNIFORM_CONTEXT = 17; + var RUNLENGTH_CONTEXT = 18; + var LLAndLHContextsLabel = new Uint8Array([0, 5, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 1, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8]); + var HLContextLabel = new Uint8Array([0, 3, 4, 0, 5, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 1, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8]); + var HHContextLabel = new Uint8Array([0, 1, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 3, 4, 5, 0, 4, 5, 5, 0, 5, 5, 5, 0, 0, 0, 0, 0, 6, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 0, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8]); + + function BitModel(width, height, subband, zeroBitPlanes, mb) { + this.width = width; + this.height = height; + let contextLabelTable; + + if (subband === "HH") { + contextLabelTable = HHContextLabel; + } else if (subband === "HL") { + contextLabelTable = HLContextLabel; + } else { + contextLabelTable = LLAndLHContextsLabel; + } + + this.contextLabelTable = contextLabelTable; + var coefficientCount = width * height; + this.neighborsSignificance = new Uint8Array(coefficientCount); + this.coefficentsSign = new Uint8Array(coefficientCount); + let coefficentsMagnitude; + + if (mb > 14) { + coefficentsMagnitude = new Uint32Array(coefficientCount); + } else if (mb > 6) { + coefficentsMagnitude = new Uint16Array(coefficientCount); + } else { + coefficentsMagnitude = new Uint8Array(coefficientCount); + } + + this.coefficentsMagnitude = coefficentsMagnitude; + this.processingFlags = new Uint8Array(coefficientCount); + var bitsDecoded = new Uint8Array(coefficientCount); + + if (zeroBitPlanes !== 0) { + for (var i = 0; i < coefficientCount; i++) { + bitsDecoded[i] = zeroBitPlanes; + } + } + + this.bitsDecoded = bitsDecoded; + this.reset(); + } + + BitModel.prototype = { + setDecoder: function BitModel_setDecoder(decoder) { + this.decoder = decoder; + }, + reset: function BitModel_reset() { + this.contexts = new Int8Array(19); + this.contexts[0] = 4 << 1 | 0; + this.contexts[UNIFORM_CONTEXT] = 46 << 1 | 0; + this.contexts[RUNLENGTH_CONTEXT] = 3 << 1 | 0; + }, + setNeighborsSignificance: function BitModel_setNeighborsSignificance(row, column, index) { + var neighborsSignificance = this.neighborsSignificance; + var width = this.width, + height = this.height; + var left = column > 0; + var right = column + 1 < width; + var i; + + if (row > 0) { + i = index - width; + + if (left) { + neighborsSignificance[i - 1] += 0x10; + } + + if (right) { + neighborsSignificance[i + 1] += 0x10; + } + + neighborsSignificance[i] += 0x04; + } + + if (row + 1 < height) { + i = index + width; + + if (left) { + neighborsSignificance[i - 1] += 0x10; + } + + if (right) { + neighborsSignificance[i + 1] += 0x10; + } + + neighborsSignificance[i] += 0x04; + } + + if (left) { + neighborsSignificance[index - 1] += 0x01; + } + + if (right) { + neighborsSignificance[index + 1] += 0x01; + } + + neighborsSignificance[index] |= 0x80; + }, + runSignificancePropagationPass: function BitModel_runSignificancePropagationPass() { + var decoder = this.decoder; + var width = this.width, + height = this.height; + var coefficentsMagnitude = this.coefficentsMagnitude; + var coefficentsSign = this.coefficentsSign; + var neighborsSignificance = this.neighborsSignificance; + var processingFlags = this.processingFlags; + var contexts = this.contexts; + var labels = this.contextLabelTable; + var bitsDecoded = this.bitsDecoded; + var processedInverseMask = ~1; + var processedMask = 1; + var firstMagnitudeBitMask = 2; + + for (var i0 = 0; i0 < height; i0 += 4) { + for (var j = 0; j < width; j++) { + var index = i0 * width + j; + + for (var i1 = 0; i1 < 4; i1++, index += width) { + var i = i0 + i1; + + if (i >= height) { + break; + } + + processingFlags[index] &= processedInverseMask; + + if (coefficentsMagnitude[index] || !neighborsSignificance[index]) { + continue; + } + + var contextLabel = labels[neighborsSignificance[index]]; + var decision = decoder.readBit(contexts, contextLabel); + + if (decision) { + var sign = this.decodeSignBit(i, j, index); + coefficentsSign[index] = sign; + coefficentsMagnitude[index] = 1; + this.setNeighborsSignificance(i, j, index); + processingFlags[index] |= firstMagnitudeBitMask; + } + + bitsDecoded[index]++; + processingFlags[index] |= processedMask; + } + } + } + }, + decodeSignBit: function BitModel_decodeSignBit(row, column, index) { + var width = this.width, + height = this.height; + var coefficentsMagnitude = this.coefficentsMagnitude; + var coefficentsSign = this.coefficentsSign; + var contribution, sign0, sign1, significance1; + var contextLabel, decoded; + significance1 = column > 0 && coefficentsMagnitude[index - 1] !== 0; + + if (column + 1 < width && coefficentsMagnitude[index + 1] !== 0) { + sign1 = coefficentsSign[index + 1]; + + if (significance1) { + sign0 = coefficentsSign[index - 1]; + contribution = 1 - sign1 - sign0; + } else { + contribution = 1 - sign1 - sign1; + } + } else if (significance1) { + sign0 = coefficentsSign[index - 1]; + contribution = 1 - sign0 - sign0; + } else { + contribution = 0; + } + + var horizontalContribution = 3 * contribution; + significance1 = row > 0 && coefficentsMagnitude[index - width] !== 0; + + if (row + 1 < height && coefficentsMagnitude[index + width] !== 0) { + sign1 = coefficentsSign[index + width]; + + if (significance1) { + sign0 = coefficentsSign[index - width]; + contribution = 1 - sign1 - sign0 + horizontalContribution; + } else { + contribution = 1 - sign1 - sign1 + horizontalContribution; + } + } else if (significance1) { + sign0 = coefficentsSign[index - width]; + contribution = 1 - sign0 - sign0 + horizontalContribution; + } else { + contribution = horizontalContribution; + } + + if (contribution >= 0) { + contextLabel = 9 + contribution; + decoded = this.decoder.readBit(this.contexts, contextLabel); + } else { + contextLabel = 9 - contribution; + decoded = this.decoder.readBit(this.contexts, contextLabel) ^ 1; + } + + return decoded; + }, + runMagnitudeRefinementPass: function BitModel_runMagnitudeRefinementPass() { + var decoder = this.decoder; + var width = this.width, + height = this.height; + var coefficentsMagnitude = this.coefficentsMagnitude; + var neighborsSignificance = this.neighborsSignificance; + var contexts = this.contexts; + var bitsDecoded = this.bitsDecoded; + var processingFlags = this.processingFlags; + var processedMask = 1; + var firstMagnitudeBitMask = 2; + var length = width * height; + var width4 = width * 4; + + for (var index0 = 0, indexNext; index0 < length; index0 = indexNext) { + indexNext = Math.min(length, index0 + width4); + + for (var j = 0; j < width; j++) { + for (var index = index0 + j; index < indexNext; index += width) { + if (!coefficentsMagnitude[index] || (processingFlags[index] & processedMask) !== 0) { + continue; + } + + var contextLabel = 16; + + if ((processingFlags[index] & firstMagnitudeBitMask) !== 0) { + processingFlags[index] ^= firstMagnitudeBitMask; + var significance = neighborsSignificance[index] & 127; + contextLabel = significance === 0 ? 15 : 14; + } + + var bit = decoder.readBit(contexts, contextLabel); + coefficentsMagnitude[index] = coefficentsMagnitude[index] << 1 | bit; + bitsDecoded[index]++; + processingFlags[index] |= processedMask; + } + } + } + }, + runCleanupPass: function BitModel_runCleanupPass() { + var decoder = this.decoder; + var width = this.width, + height = this.height; + var neighborsSignificance = this.neighborsSignificance; + var coefficentsMagnitude = this.coefficentsMagnitude; + var coefficentsSign = this.coefficentsSign; + var contexts = this.contexts; + var labels = this.contextLabelTable; + var bitsDecoded = this.bitsDecoded; + var processingFlags = this.processingFlags; + var processedMask = 1; + var firstMagnitudeBitMask = 2; + var oneRowDown = width; + var twoRowsDown = width * 2; + var threeRowsDown = width * 3; + var iNext; + + for (var i0 = 0; i0 < height; i0 = iNext) { + iNext = Math.min(i0 + 4, height); + var indexBase = i0 * width; + var checkAllEmpty = i0 + 3 < height; + + for (var j = 0; j < width; j++) { + var index0 = indexBase + j; + var allEmpty = checkAllEmpty && processingFlags[index0] === 0 && processingFlags[index0 + oneRowDown] === 0 && processingFlags[index0 + twoRowsDown] === 0 && processingFlags[index0 + threeRowsDown] === 0 && neighborsSignificance[index0] === 0 && neighborsSignificance[index0 + oneRowDown] === 0 && neighborsSignificance[index0 + twoRowsDown] === 0 && neighborsSignificance[index0 + threeRowsDown] === 0; + var i1 = 0, + index = index0; + var i = i0, + sign; + + if (allEmpty) { + var hasSignificantCoefficent = decoder.readBit(contexts, RUNLENGTH_CONTEXT); + + if (!hasSignificantCoefficent) { + bitsDecoded[index0]++; + bitsDecoded[index0 + oneRowDown]++; + bitsDecoded[index0 + twoRowsDown]++; + bitsDecoded[index0 + threeRowsDown]++; + continue; + } + + i1 = decoder.readBit(contexts, UNIFORM_CONTEXT) << 1 | decoder.readBit(contexts, UNIFORM_CONTEXT); + + if (i1 !== 0) { + i = i0 + i1; + index += i1 * width; + } + + sign = this.decodeSignBit(i, j, index); + coefficentsSign[index] = sign; + coefficentsMagnitude[index] = 1; + this.setNeighborsSignificance(i, j, index); + processingFlags[index] |= firstMagnitudeBitMask; + index = index0; + + for (var i2 = i0; i2 <= i; i2++, index += width) { + bitsDecoded[index]++; + } + + i1++; + } + + for (i = i0 + i1; i < iNext; i++, index += width) { + if (coefficentsMagnitude[index] || (processingFlags[index] & processedMask) !== 0) { + continue; + } + + var contextLabel = labels[neighborsSignificance[index]]; + var decision = decoder.readBit(contexts, contextLabel); + + if (decision === 1) { + sign = this.decodeSignBit(i, j, index); + coefficentsSign[index] = sign; + coefficentsMagnitude[index] = 1; + this.setNeighborsSignificance(i, j, index); + processingFlags[index] |= firstMagnitudeBitMask; + } + + bitsDecoded[index]++; + } + } + } + }, + checkSegmentationSymbol: function BitModel_checkSegmentationSymbol() { + var decoder = this.decoder; + var contexts = this.contexts; + var symbol = decoder.readBit(contexts, UNIFORM_CONTEXT) << 3 | decoder.readBit(contexts, UNIFORM_CONTEXT) << 2 | decoder.readBit(contexts, UNIFORM_CONTEXT) << 1 | decoder.readBit(contexts, UNIFORM_CONTEXT); + + if (symbol !== 0xa) { + throw new JpxError("Invalid segmentation symbol"); + } + } + }; + return BitModel; + }(); + + var Transform = function TransformClosure() { + function Transform() {} + + Transform.prototype.calculate = function transformCalculate(subbands, u0, v0) { + var ll = subbands[0]; + + for (var i = 1, ii = subbands.length; i < ii; i++) { + ll = this.iterate(ll, subbands[i], u0, v0); + } + + return ll; + }; + + Transform.prototype.extend = function extend(buffer, offset, size) { + var i1 = offset - 1, + j1 = offset + 1; + var i2 = offset + size - 2, + j2 = offset + size; + buffer[i1--] = buffer[j1++]; + buffer[j2++] = buffer[i2--]; + buffer[i1--] = buffer[j1++]; + buffer[j2++] = buffer[i2--]; + buffer[i1--] = buffer[j1++]; + buffer[j2++] = buffer[i2--]; + buffer[i1] = buffer[j1]; + buffer[j2] = buffer[i2]; + }; + + Transform.prototype.iterate = function Transform_iterate(ll, hl_lh_hh, u0, v0) { + var llWidth = ll.width, + llHeight = ll.height, + llItems = ll.items; + var width = hl_lh_hh.width; + var height = hl_lh_hh.height; + var items = hl_lh_hh.items; + var i, j, k, l, u, v; + + for (k = 0, i = 0; i < llHeight; i++) { + l = i * 2 * width; + + for (j = 0; j < llWidth; j++, k++, l += 2) { + items[l] = llItems[k]; + } + } + + llItems = ll.items = null; + var bufferPadding = 4; + var rowBuffer = new Float32Array(width + 2 * bufferPadding); + + if (width === 1) { + if ((u0 & 1) !== 0) { + for (v = 0, k = 0; v < height; v++, k += width) { + items[k] *= 0.5; + } + } + } else { + for (v = 0, k = 0; v < height; v++, k += width) { + rowBuffer.set(items.subarray(k, k + width), bufferPadding); + this.extend(rowBuffer, bufferPadding, width); + this.filter(rowBuffer, bufferPadding, width); + items.set(rowBuffer.subarray(bufferPadding, bufferPadding + width), k); + } + } + + var numBuffers = 16; + var colBuffers = []; + + for (i = 0; i < numBuffers; i++) { + colBuffers.push(new Float32Array(height + 2 * bufferPadding)); + } + + var b, + currentBuffer = 0; + ll = bufferPadding + height; + + if (height === 1) { + if ((v0 & 1) !== 0) { + for (u = 0; u < width; u++) { + items[u] *= 0.5; + } + } + } else { + for (u = 0; u < width; u++) { + if (currentBuffer === 0) { + numBuffers = Math.min(width - u, numBuffers); + + for (k = u, l = bufferPadding; l < ll; k += width, l++) { + for (b = 0; b < numBuffers; b++) { + colBuffers[b][l] = items[k + b]; + } + } + + currentBuffer = numBuffers; + } + + currentBuffer--; + var buffer = colBuffers[currentBuffer]; + this.extend(buffer, bufferPadding, height); + this.filter(buffer, bufferPadding, height); + + if (currentBuffer === 0) { + k = u - numBuffers + 1; + + for (l = bufferPadding; l < ll; k += width, l++) { + for (b = 0; b < numBuffers; b++) { + items[k + b] = colBuffers[b][l]; + } + } + } + } + } + + return { + width, + height, + items + }; + }; + + return Transform; + }(); + + var IrreversibleTransform = function IrreversibleTransformClosure() { + function IrreversibleTransform() { + Transform.call(this); + } + + IrreversibleTransform.prototype = Object.create(Transform.prototype); + + IrreversibleTransform.prototype.filter = function irreversibleTransformFilter(x, offset, length) { + var len = length >> 1; + offset = offset | 0; + var j, n, current, next; + var alpha = -1.586134342059924; + var beta = -0.052980118572961; + var gamma = 0.882911075530934; + var delta = 0.443506852043971; + var K = 1.230174104914001; + var K_ = 1 / K; + j = offset - 3; + + for (n = len + 4; n--; j += 2) { + x[j] *= K_; + } + + j = offset - 2; + current = delta * x[j - 1]; + + for (n = len + 3; n--; j += 2) { + next = delta * x[j + 1]; + x[j] = K * x[j] - current - next; + + if (n--) { + j += 2; + current = delta * x[j + 1]; + x[j] = K * x[j] - current - next; + } else { + break; + } + } + + j = offset - 1; + current = gamma * x[j - 1]; + + for (n = len + 2; n--; j += 2) { + next = gamma * x[j + 1]; + x[j] -= current + next; + + if (n--) { + j += 2; + current = gamma * x[j + 1]; + x[j] -= current + next; + } else { + break; + } + } + + j = offset; + current = beta * x[j - 1]; + + for (n = len + 1; n--; j += 2) { + next = beta * x[j + 1]; + x[j] -= current + next; + + if (n--) { + j += 2; + current = beta * x[j + 1]; + x[j] -= current + next; + } else { + break; + } + } + + if (len !== 0) { + j = offset + 1; + current = alpha * x[j - 1]; + + for (n = len; n--; j += 2) { + next = alpha * x[j + 1]; + x[j] -= current + next; + + if (n--) { + j += 2; + current = alpha * x[j + 1]; + x[j] -= current + next; + } else { + break; + } + } + } + }; + + return IrreversibleTransform; + }(); + + var ReversibleTransform = function ReversibleTransformClosure() { + function ReversibleTransform() { + Transform.call(this); + } + + ReversibleTransform.prototype = Object.create(Transform.prototype); + + ReversibleTransform.prototype.filter = function reversibleTransformFilter(x, offset, length) { + var len = length >> 1; + offset = offset | 0; + var j, n; + + for (j = offset, n = len + 1; n--; j += 2) { + x[j] -= x[j - 1] + x[j + 1] + 2 >> 2; + } + + for (j = offset + 1, n = len; n--; j += 2) { + x[j] += x[j - 1] + x[j + 1] >> 1; + } + }; + + return ReversibleTransform; + }(); + + return JpxImage; +}(); + +exports.JpxImage = JpxImage; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.calculateSHA512 = exports.calculateSHA384 = exports.calculateSHA256 = exports.calculateMD5 = exports.PDF20 = exports.PDF17 = exports.CipherTransformFactory = exports.ARCFourCipher = exports.AES256Cipher = exports.AES128Cipher = void 0; + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +var _stream = __w_pdfjs_require__(12); + +var ARCFourCipher = function ARCFourCipherClosure() { + function ARCFourCipher(key) { + this.a = 0; + this.b = 0; + var s = new Uint8Array(256); + var i, + j = 0, + tmp, + keyLength = key.length; + + for (i = 0; i < 256; ++i) { + s[i] = i; + } + + for (i = 0; i < 256; ++i) { + tmp = s[i]; + j = j + tmp + key[i % keyLength] & 0xff; + s[i] = s[j]; + s[j] = tmp; + } + + this.s = s; + } + + ARCFourCipher.prototype = { + encryptBlock: function ARCFourCipher_encryptBlock(data) { + var i, + n = data.length, + tmp, + tmp2; + var a = this.a, + b = this.b, + s = this.s; + var output = new Uint8Array(n); + + for (i = 0; i < n; ++i) { + a = a + 1 & 0xff; + tmp = s[a]; + b = b + tmp & 0xff; + tmp2 = s[b]; + s[a] = tmp2; + s[b] = tmp; + output[i] = data[i] ^ s[tmp + tmp2 & 0xff]; + } + + this.a = a; + this.b = b; + return output; + } + }; + ARCFourCipher.prototype.decryptBlock = ARCFourCipher.prototype.encryptBlock; + return ARCFourCipher; +}(); + +exports.ARCFourCipher = ARCFourCipher; + +var calculateMD5 = function calculateMD5Closure() { + var r = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]); + var k = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, 643717713, -373897302, -701558691, 38016083, -660478335, -405537848, 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556, -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, -722521979, 76029189, -640364487, -421815835, 530742520, -995338651, -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649, -145523070, -1120210379, 718787259, -343485551]); + + function hash(data, offset, length) { + var h0 = 1732584193, + h1 = -271733879, + h2 = -1732584194, + h3 = 271733878; + var paddedLength = length + 72 & ~63; + var padded = new Uint8Array(paddedLength); + var i, j, n; + + for (i = 0; i < length; ++i) { + padded[i] = data[offset++]; + } + + padded[i++] = 0x80; + n = paddedLength - 8; + + while (i < n) { + padded[i++] = 0; + } + + padded[i++] = length << 3 & 0xff; + padded[i++] = length >> 5 & 0xff; + padded[i++] = length >> 13 & 0xff; + padded[i++] = length >> 21 & 0xff; + padded[i++] = length >>> 29 & 0xff; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + var w = new Int32Array(16); + + for (i = 0; i < paddedLength;) { + for (j = 0; j < 16; ++j, i += 4) { + w[j] = padded[i] | padded[i + 1] << 8 | padded[i + 2] << 16 | padded[i + 3] << 24; + } + + var a = h0, + b = h1, + c = h2, + d = h3, + f, + g; + + for (j = 0; j < 64; ++j) { + if (j < 16) { + f = b & c | ~b & d; + g = j; + } else if (j < 32) { + f = d & b | ~d & c; + g = 5 * j + 1 & 15; + } else if (j < 48) { + f = b ^ c ^ d; + g = 3 * j + 5 & 15; + } else { + f = c ^ (b | ~d); + g = 7 * j & 15; + } + + var tmp = d, + rotateArg = a + f + k[j] + w[g] | 0, + rotate = r[j]; + d = c; + c = b; + b = b + (rotateArg << rotate | rotateArg >>> 32 - rotate) | 0; + a = tmp; + } + + h0 = h0 + a | 0; + h1 = h1 + b | 0; + h2 = h2 + c | 0; + h3 = h3 + d | 0; + } + + return new Uint8Array([h0 & 0xFF, h0 >> 8 & 0xFF, h0 >> 16 & 0xFF, h0 >>> 24 & 0xFF, h1 & 0xFF, h1 >> 8 & 0xFF, h1 >> 16 & 0xFF, h1 >>> 24 & 0xFF, h2 & 0xFF, h2 >> 8 & 0xFF, h2 >> 16 & 0xFF, h2 >>> 24 & 0xFF, h3 & 0xFF, h3 >> 8 & 0xFF, h3 >> 16 & 0xFF, h3 >>> 24 & 0xFF]); + } + + return hash; +}(); + +exports.calculateMD5 = calculateMD5; + +var Word64 = function Word64Closure() { + function Word64(highInteger, lowInteger) { + this.high = highInteger | 0; + this.low = lowInteger | 0; + } + + Word64.prototype = { + and: function Word64_and(word) { + this.high &= word.high; + this.low &= word.low; + }, + xor: function Word64_xor(word) { + this.high ^= word.high; + this.low ^= word.low; + }, + or: function Word64_or(word) { + this.high |= word.high; + this.low |= word.low; + }, + shiftRight: function Word64_shiftRight(places) { + if (places >= 32) { + this.low = this.high >>> places - 32 | 0; + this.high = 0; + } else { + this.low = this.low >>> places | this.high << 32 - places; + this.high = this.high >>> places | 0; + } + }, + shiftLeft: function Word64_shiftLeft(places) { + if (places >= 32) { + this.high = this.low << places - 32; + this.low = 0; + } else { + this.high = this.high << places | this.low >>> 32 - places; + this.low = this.low << places; + } + }, + rotateRight: function Word64_rotateRight(places) { + var low, high; + + if (places & 32) { + high = this.low; + low = this.high; + } else { + low = this.low; + high = this.high; + } + + places &= 31; + this.low = low >>> places | high << 32 - places; + this.high = high >>> places | low << 32 - places; + }, + not: function Word64_not() { + this.high = ~this.high; + this.low = ~this.low; + }, + add: function Word64_add(word) { + var lowAdd = (this.low >>> 0) + (word.low >>> 0); + var highAdd = (this.high >>> 0) + (word.high >>> 0); + + if (lowAdd > 0xffffffff) { + highAdd += 1; + } + + this.low = lowAdd | 0; + this.high = highAdd | 0; + }, + copyTo: function Word64_copyTo(bytes, offset) { + bytes[offset] = this.high >>> 24 & 0xff; + bytes[offset + 1] = this.high >> 16 & 0xff; + bytes[offset + 2] = this.high >> 8 & 0xff; + bytes[offset + 3] = this.high & 0xff; + bytes[offset + 4] = this.low >>> 24 & 0xff; + bytes[offset + 5] = this.low >> 16 & 0xff; + bytes[offset + 6] = this.low >> 8 & 0xff; + bytes[offset + 7] = this.low & 0xff; + }, + assign: function Word64_assign(word) { + this.high = word.high; + this.low = word.low; + } + }; + return Word64; +}(); + +var calculateSHA256 = function calculateSHA256Closure() { + function rotr(x, n) { + return x >>> n | x << 32 - n; + } + + function ch(x, y, z) { + return x & y ^ ~x & z; + } + + function maj(x, y, z) { + return x & y ^ x & z ^ y & z; + } + + function sigma(x) { + return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); + } + + function sigmaPrime(x) { + return rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25); + } + + function littleSigma(x) { + return rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3; + } + + function littleSigmaPrime(x) { + return rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10; + } + + var k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]; + + function hash(data, offset, length) { + var h0 = 0x6a09e667, + h1 = 0xbb67ae85, + h2 = 0x3c6ef372, + h3 = 0xa54ff53a, + h4 = 0x510e527f, + h5 = 0x9b05688c, + h6 = 0x1f83d9ab, + h7 = 0x5be0cd19; + var paddedLength = Math.ceil((length + 9) / 64) * 64; + var padded = new Uint8Array(paddedLength); + var i, j, n; + + for (i = 0; i < length; ++i) { + padded[i] = data[offset++]; + } + + padded[i++] = 0x80; + n = paddedLength - 8; + + while (i < n) { + padded[i++] = 0; + } + + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = length >>> 29 & 0xff; + padded[i++] = length >> 21 & 0xff; + padded[i++] = length >> 13 & 0xff; + padded[i++] = length >> 5 & 0xff; + padded[i++] = length << 3 & 0xff; + var w = new Uint32Array(64); + + for (i = 0; i < paddedLength;) { + for (j = 0; j < 16; ++j) { + w[j] = padded[i] << 24 | padded[i + 1] << 16 | padded[i + 2] << 8 | padded[i + 3]; + i += 4; + } + + for (j = 16; j < 64; ++j) { + w[j] = littleSigmaPrime(w[j - 2]) + w[j - 7] + littleSigma(w[j - 15]) + w[j - 16] | 0; + } + + var a = h0, + b = h1, + c = h2, + d = h3, + e = h4, + f = h5, + g = h6, + h = h7, + t1, + t2; + + for (j = 0; j < 64; ++j) { + t1 = h + sigmaPrime(e) + ch(e, f, g) + k[j] + w[j]; + t2 = sigma(a) + maj(a, b, c); + h = g; + g = f; + f = e; + e = d + t1 | 0; + d = c; + c = b; + b = a; + a = t1 + t2 | 0; + } + + h0 = h0 + a | 0; + h1 = h1 + b | 0; + h2 = h2 + c | 0; + h3 = h3 + d | 0; + h4 = h4 + e | 0; + h5 = h5 + f | 0; + h6 = h6 + g | 0; + h7 = h7 + h | 0; + } + + return new Uint8Array([h0 >> 24 & 0xFF, h0 >> 16 & 0xFF, h0 >> 8 & 0xFF, h0 & 0xFF, h1 >> 24 & 0xFF, h1 >> 16 & 0xFF, h1 >> 8 & 0xFF, h1 & 0xFF, h2 >> 24 & 0xFF, h2 >> 16 & 0xFF, h2 >> 8 & 0xFF, h2 & 0xFF, h3 >> 24 & 0xFF, h3 >> 16 & 0xFF, h3 >> 8 & 0xFF, h3 & 0xFF, h4 >> 24 & 0xFF, h4 >> 16 & 0xFF, h4 >> 8 & 0xFF, h4 & 0xFF, h5 >> 24 & 0xFF, h5 >> 16 & 0xFF, h5 >> 8 & 0xFF, h5 & 0xFF, h6 >> 24 & 0xFF, h6 >> 16 & 0xFF, h6 >> 8 & 0xFF, h6 & 0xFF, h7 >> 24 & 0xFF, h7 >> 16 & 0xFF, h7 >> 8 & 0xFF, h7 & 0xFF]); + } + + return hash; +}(); + +exports.calculateSHA256 = calculateSHA256; + +var calculateSHA512 = function calculateSHA512Closure() { + function ch(result, x, y, z, tmp) { + result.assign(x); + result.and(y); + tmp.assign(x); + tmp.not(); + tmp.and(z); + result.xor(tmp); + } + + function maj(result, x, y, z, tmp) { + result.assign(x); + result.and(y); + tmp.assign(x); + tmp.and(z); + result.xor(tmp); + tmp.assign(y); + tmp.and(z); + result.xor(tmp); + } + + function sigma(result, x, tmp) { + result.assign(x); + result.rotateRight(28); + tmp.assign(x); + tmp.rotateRight(34); + result.xor(tmp); + tmp.assign(x); + tmp.rotateRight(39); + result.xor(tmp); + } + + function sigmaPrime(result, x, tmp) { + result.assign(x); + result.rotateRight(14); + tmp.assign(x); + tmp.rotateRight(18); + result.xor(tmp); + tmp.assign(x); + tmp.rotateRight(41); + result.xor(tmp); + } + + function littleSigma(result, x, tmp) { + result.assign(x); + result.rotateRight(1); + tmp.assign(x); + tmp.rotateRight(8); + result.xor(tmp); + tmp.assign(x); + tmp.shiftRight(7); + result.xor(tmp); + } + + function littleSigmaPrime(result, x, tmp) { + result.assign(x); + result.rotateRight(19); + tmp.assign(x); + tmp.rotateRight(61); + result.xor(tmp); + tmp.assign(x); + tmp.shiftRight(6); + result.xor(tmp); + } + + var k = [new Word64(0x428a2f98, 0xd728ae22), new Word64(0x71374491, 0x23ef65cd), new Word64(0xb5c0fbcf, 0xec4d3b2f), new Word64(0xe9b5dba5, 0x8189dbbc), new Word64(0x3956c25b, 0xf348b538), new Word64(0x59f111f1, 0xb605d019), new Word64(0x923f82a4, 0xaf194f9b), new Word64(0xab1c5ed5, 0xda6d8118), new Word64(0xd807aa98, 0xa3030242), new Word64(0x12835b01, 0x45706fbe), new Word64(0x243185be, 0x4ee4b28c), new Word64(0x550c7dc3, 0xd5ffb4e2), new Word64(0x72be5d74, 0xf27b896f), new Word64(0x80deb1fe, 0x3b1696b1), new Word64(0x9bdc06a7, 0x25c71235), new Word64(0xc19bf174, 0xcf692694), new Word64(0xe49b69c1, 0x9ef14ad2), new Word64(0xefbe4786, 0x384f25e3), new Word64(0x0fc19dc6, 0x8b8cd5b5), new Word64(0x240ca1cc, 0x77ac9c65), new Word64(0x2de92c6f, 0x592b0275), new Word64(0x4a7484aa, 0x6ea6e483), new Word64(0x5cb0a9dc, 0xbd41fbd4), new Word64(0x76f988da, 0x831153b5), new Word64(0x983e5152, 0xee66dfab), new Word64(0xa831c66d, 0x2db43210), new Word64(0xb00327c8, 0x98fb213f), new Word64(0xbf597fc7, 0xbeef0ee4), new Word64(0xc6e00bf3, 0x3da88fc2), new Word64(0xd5a79147, 0x930aa725), new Word64(0x06ca6351, 0xe003826f), new Word64(0x14292967, 0x0a0e6e70), new Word64(0x27b70a85, 0x46d22ffc), new Word64(0x2e1b2138, 0x5c26c926), new Word64(0x4d2c6dfc, 0x5ac42aed), new Word64(0x53380d13, 0x9d95b3df), new Word64(0x650a7354, 0x8baf63de), new Word64(0x766a0abb, 0x3c77b2a8), new Word64(0x81c2c92e, 0x47edaee6), new Word64(0x92722c85, 0x1482353b), new Word64(0xa2bfe8a1, 0x4cf10364), new Word64(0xa81a664b, 0xbc423001), new Word64(0xc24b8b70, 0xd0f89791), new Word64(0xc76c51a3, 0x0654be30), new Word64(0xd192e819, 0xd6ef5218), new Word64(0xd6990624, 0x5565a910), new Word64(0xf40e3585, 0x5771202a), new Word64(0x106aa070, 0x32bbd1b8), new Word64(0x19a4c116, 0xb8d2d0c8), new Word64(0x1e376c08, 0x5141ab53), new Word64(0x2748774c, 0xdf8eeb99), new Word64(0x34b0bcb5, 0xe19b48a8), new Word64(0x391c0cb3, 0xc5c95a63), new Word64(0x4ed8aa4a, 0xe3418acb), new Word64(0x5b9cca4f, 0x7763e373), new Word64(0x682e6ff3, 0xd6b2b8a3), new Word64(0x748f82ee, 0x5defb2fc), new Word64(0x78a5636f, 0x43172f60), new Word64(0x84c87814, 0xa1f0ab72), new Word64(0x8cc70208, 0x1a6439ec), new Word64(0x90befffa, 0x23631e28), new Word64(0xa4506ceb, 0xde82bde9), new Word64(0xbef9a3f7, 0xb2c67915), new Word64(0xc67178f2, 0xe372532b), new Word64(0xca273ece, 0xea26619c), new Word64(0xd186b8c7, 0x21c0c207), new Word64(0xeada7dd6, 0xcde0eb1e), new Word64(0xf57d4f7f, 0xee6ed178), new Word64(0x06f067aa, 0x72176fba), new Word64(0x0a637dc5, 0xa2c898a6), new Word64(0x113f9804, 0xbef90dae), new Word64(0x1b710b35, 0x131c471b), new Word64(0x28db77f5, 0x23047d84), new Word64(0x32caab7b, 0x40c72493), new Word64(0x3c9ebe0a, 0x15c9bebc), new Word64(0x431d67c4, 0x9c100d4c), new Word64(0x4cc5d4be, 0xcb3e42b6), new Word64(0x597f299c, 0xfc657e2a), new Word64(0x5fcb6fab, 0x3ad6faec), new Word64(0x6c44198c, 0x4a475817)]; + + function hash(data, offset, length, mode384) { + mode384 = !!mode384; + var h0, h1, h2, h3, h4, h5, h6, h7; + + if (!mode384) { + h0 = new Word64(0x6a09e667, 0xf3bcc908); + h1 = new Word64(0xbb67ae85, 0x84caa73b); + h2 = new Word64(0x3c6ef372, 0xfe94f82b); + h3 = new Word64(0xa54ff53a, 0x5f1d36f1); + h4 = new Word64(0x510e527f, 0xade682d1); + h5 = new Word64(0x9b05688c, 0x2b3e6c1f); + h6 = new Word64(0x1f83d9ab, 0xfb41bd6b); + h7 = new Word64(0x5be0cd19, 0x137e2179); + } else { + h0 = new Word64(0xcbbb9d5d, 0xc1059ed8); + h1 = new Word64(0x629a292a, 0x367cd507); + h2 = new Word64(0x9159015a, 0x3070dd17); + h3 = new Word64(0x152fecd8, 0xf70e5939); + h4 = new Word64(0x67332667, 0xffc00b31); + h5 = new Word64(0x8eb44a87, 0x68581511); + h6 = new Word64(0xdb0c2e0d, 0x64f98fa7); + h7 = new Word64(0x47b5481d, 0xbefa4fa4); + } + + var paddedLength = Math.ceil((length + 17) / 128) * 128; + var padded = new Uint8Array(paddedLength); + var i, j, n; + + for (i = 0; i < length; ++i) { + padded[i] = data[offset++]; + } + + padded[i++] = 0x80; + n = paddedLength - 16; + + while (i < n) { + padded[i++] = 0; + } + + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = 0; + padded[i++] = length >>> 29 & 0xff; + padded[i++] = length >> 21 & 0xff; + padded[i++] = length >> 13 & 0xff; + padded[i++] = length >> 5 & 0xff; + padded[i++] = length << 3 & 0xff; + var w = new Array(80); + + for (i = 0; i < 80; i++) { + w[i] = new Word64(0, 0); + } + + var a = new Word64(0, 0), + b = new Word64(0, 0), + c = new Word64(0, 0); + var d = new Word64(0, 0), + e = new Word64(0, 0), + f = new Word64(0, 0); + var g = new Word64(0, 0), + h = new Word64(0, 0); + var t1 = new Word64(0, 0), + t2 = new Word64(0, 0); + var tmp1 = new Word64(0, 0), + tmp2 = new Word64(0, 0), + tmp3; + + for (i = 0; i < paddedLength;) { + for (j = 0; j < 16; ++j) { + w[j].high = padded[i] << 24 | padded[i + 1] << 16 | padded[i + 2] << 8 | padded[i + 3]; + w[j].low = padded[i + 4] << 24 | padded[i + 5] << 16 | padded[i + 6] << 8 | padded[i + 7]; + i += 8; + } + + for (j = 16; j < 80; ++j) { + tmp3 = w[j]; + littleSigmaPrime(tmp3, w[j - 2], tmp2); + tmp3.add(w[j - 7]); + littleSigma(tmp1, w[j - 15], tmp2); + tmp3.add(tmp1); + tmp3.add(w[j - 16]); + } + + a.assign(h0); + b.assign(h1); + c.assign(h2); + d.assign(h3); + e.assign(h4); + f.assign(h5); + g.assign(h6); + h.assign(h7); + + for (j = 0; j < 80; ++j) { + t1.assign(h); + sigmaPrime(tmp1, e, tmp2); + t1.add(tmp1); + ch(tmp1, e, f, g, tmp2); + t1.add(tmp1); + t1.add(k[j]); + t1.add(w[j]); + sigma(t2, a, tmp2); + maj(tmp1, a, b, c, tmp2); + t2.add(tmp1); + tmp3 = h; + h = g; + g = f; + f = e; + d.add(t1); + e = d; + d = c; + c = b; + b = a; + tmp3.assign(t1); + tmp3.add(t2); + a = tmp3; + } + + h0.add(a); + h1.add(b); + h2.add(c); + h3.add(d); + h4.add(e); + h5.add(f); + h6.add(g); + h7.add(h); + } + + var result; + + if (!mode384) { + result = new Uint8Array(64); + h0.copyTo(result, 0); + h1.copyTo(result, 8); + h2.copyTo(result, 16); + h3.copyTo(result, 24); + h4.copyTo(result, 32); + h5.copyTo(result, 40); + h6.copyTo(result, 48); + h7.copyTo(result, 56); + } else { + result = new Uint8Array(48); + h0.copyTo(result, 0); + h1.copyTo(result, 8); + h2.copyTo(result, 16); + h3.copyTo(result, 24); + h4.copyTo(result, 32); + h5.copyTo(result, 40); + } + + return result; + } + + return hash; +}(); + +exports.calculateSHA512 = calculateSHA512; + +var calculateSHA384 = function calculateSHA384Closure() { + function hash(data, offset, length) { + return calculateSHA512(data, offset, length, true); + } + + return hash; +}(); + +exports.calculateSHA384 = calculateSHA384; + +var NullCipher = function NullCipherClosure() { + function NullCipher() {} + + NullCipher.prototype = { + decryptBlock: function NullCipher_decryptBlock(data) { + return data; + } + }; + return NullCipher; +}(); + +class AESBaseCipher { + constructor() { + if (this.constructor === AESBaseCipher) { + (0, _util.unreachable)("Cannot initialize AESBaseCipher."); + } + + this._s = new Uint8Array([0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16]); + this._inv_s = new Uint8Array([0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d]); + this._mix = new Uint32Array([0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]); + this._mixCol = new Uint8Array(256); + + for (let i = 0; i < 256; i++) { + if (i < 128) { + this._mixCol[i] = i << 1; + } else { + this._mixCol[i] = i << 1 ^ 0x1b; + } + } + + this.buffer = new Uint8Array(16); + this.bufferPosition = 0; + } + + _expandKey(cipherKey) { + (0, _util.unreachable)("Cannot call `_expandKey` on the base class"); + } + + _decrypt(input, key) { + let t, u, v; + const state = new Uint8Array(16); + state.set(input); + + for (let j = 0, k = this._keySize; j < 16; ++j, ++k) { + state[j] ^= key[k]; + } + + for (let i = this._cyclesOfRepetition - 1; i >= 1; --i) { + t = state[13]; + state[13] = state[9]; + state[9] = state[5]; + state[5] = state[1]; + state[1] = t; + t = state[14]; + u = state[10]; + state[14] = state[6]; + state[10] = state[2]; + state[6] = t; + state[2] = u; + t = state[15]; + u = state[11]; + v = state[7]; + state[15] = state[3]; + state[11] = t; + state[7] = u; + state[3] = v; + + for (let j = 0; j < 16; ++j) { + state[j] = this._inv_s[state[j]]; + } + + for (let j = 0, k = i * 16; j < 16; ++j, ++k) { + state[j] ^= key[k]; + } + + for (let j = 0; j < 16; j += 4) { + const s0 = this._mix[state[j]]; + const s1 = this._mix[state[j + 1]]; + const s2 = this._mix[state[j + 2]]; + const s3 = this._mix[state[j + 3]]; + t = s0 ^ s1 >>> 8 ^ s1 << 24 ^ s2 >>> 16 ^ s2 << 16 ^ s3 >>> 24 ^ s3 << 8; + state[j] = t >>> 24 & 0xff; + state[j + 1] = t >> 16 & 0xff; + state[j + 2] = t >> 8 & 0xff; + state[j + 3] = t & 0xff; + } + } + + t = state[13]; + state[13] = state[9]; + state[9] = state[5]; + state[5] = state[1]; + state[1] = t; + t = state[14]; + u = state[10]; + state[14] = state[6]; + state[10] = state[2]; + state[6] = t; + state[2] = u; + t = state[15]; + u = state[11]; + v = state[7]; + state[15] = state[3]; + state[11] = t; + state[7] = u; + state[3] = v; + + for (let j = 0; j < 16; ++j) { + state[j] = this._inv_s[state[j]]; + state[j] ^= key[j]; + } + + return state; + } + + _encrypt(input, key) { + const s = this._s; + let t, u, v; + const state = new Uint8Array(16); + state.set(input); + + for (let j = 0; j < 16; ++j) { + state[j] ^= key[j]; + } + + for (let i = 1; i < this._cyclesOfRepetition; i++) { + for (let j = 0; j < 16; ++j) { + state[j] = s[state[j]]; + } + + v = state[1]; + state[1] = state[5]; + state[5] = state[9]; + state[9] = state[13]; + state[13] = v; + v = state[2]; + u = state[6]; + state[2] = state[10]; + state[6] = state[14]; + state[10] = v; + state[14] = u; + v = state[3]; + u = state[7]; + t = state[11]; + state[3] = state[15]; + state[7] = v; + state[11] = u; + state[15] = t; + + for (let j = 0; j < 16; j += 4) { + const s0 = state[j + 0]; + const s1 = state[j + 1]; + const s2 = state[j + 2]; + const s3 = state[j + 3]; + t = s0 ^ s1 ^ s2 ^ s3; + state[j + 0] ^= t ^ this._mixCol[s0 ^ s1]; + state[j + 1] ^= t ^ this._mixCol[s1 ^ s2]; + state[j + 2] ^= t ^ this._mixCol[s2 ^ s3]; + state[j + 3] ^= t ^ this._mixCol[s3 ^ s0]; + } + + for (let j = 0, k = i * 16; j < 16; ++j, ++k) { + state[j] ^= key[k]; + } + } + + for (let j = 0; j < 16; ++j) { + state[j] = s[state[j]]; + } + + v = state[1]; + state[1] = state[5]; + state[5] = state[9]; + state[9] = state[13]; + state[13] = v; + v = state[2]; + u = state[6]; + state[2] = state[10]; + state[6] = state[14]; + state[10] = v; + state[14] = u; + v = state[3]; + u = state[7]; + t = state[11]; + state[3] = state[15]; + state[7] = v; + state[11] = u; + state[15] = t; + + for (let j = 0, k = this._keySize; j < 16; ++j, ++k) { + state[j] ^= key[k]; + } + + return state; + } + + _decryptBlock2(data, finalize) { + const sourceLength = data.length; + let buffer = this.buffer, + bufferLength = this.bufferPosition; + const result = []; + let iv = this.iv; + + for (let i = 0; i < sourceLength; ++i) { + buffer[bufferLength] = data[i]; + ++bufferLength; + + if (bufferLength < 16) { + continue; + } + + const plain = this._decrypt(buffer, this._key); + + for (let j = 0; j < 16; ++j) { + plain[j] ^= iv[j]; + } + + iv = buffer; + result.push(plain); + buffer = new Uint8Array(16); + bufferLength = 0; + } + + this.buffer = buffer; + this.bufferLength = bufferLength; + this.iv = iv; + + if (result.length === 0) { + return new Uint8Array(0); + } + + let outputLength = 16 * result.length; + + if (finalize) { + const lastBlock = result[result.length - 1]; + let psLen = lastBlock[15]; + + if (psLen <= 16) { + for (let i = 15, ii = 16 - psLen; i >= ii; --i) { + if (lastBlock[i] !== psLen) { + psLen = 0; + break; + } + } + + outputLength -= psLen; + result[result.length - 1] = lastBlock.subarray(0, 16 - psLen); + } + } + + const output = new Uint8Array(outputLength); + + for (let i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) { + output.set(result[i], j); + } + + return output; + } + + decryptBlock(data, finalize, iv = null) { + const sourceLength = data.length; + const buffer = this.buffer; + let bufferLength = this.bufferPosition; + + if (iv) { + this.iv = iv; + } else { + for (let i = 0; bufferLength < 16 && i < sourceLength; ++i, ++bufferLength) { + buffer[bufferLength] = data[i]; + } + + if (bufferLength < 16) { + this.bufferLength = bufferLength; + return new Uint8Array(0); + } + + this.iv = buffer; + data = data.subarray(16); + } + + this.buffer = new Uint8Array(16); + this.bufferLength = 0; + this.decryptBlock = this._decryptBlock2; + return this.decryptBlock(data, finalize); + } + + encrypt(data, iv) { + const sourceLength = data.length; + let buffer = this.buffer, + bufferLength = this.bufferPosition; + const result = []; + + if (!iv) { + iv = new Uint8Array(16); + } + + for (let i = 0; i < sourceLength; ++i) { + buffer[bufferLength] = data[i]; + ++bufferLength; + + if (bufferLength < 16) { + continue; + } + + for (let j = 0; j < 16; ++j) { + buffer[j] ^= iv[j]; + } + + const cipher = this._encrypt(buffer, this._key); + + iv = cipher; + result.push(cipher); + buffer = new Uint8Array(16); + bufferLength = 0; + } + + this.buffer = buffer; + this.bufferLength = bufferLength; + this.iv = iv; + + if (result.length === 0) { + return new Uint8Array(0); + } + + const outputLength = 16 * result.length; + const output = new Uint8Array(outputLength); + + for (let i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) { + output.set(result[i], j); + } + + return output; + } + +} + +class AES128Cipher extends AESBaseCipher { + constructor(key) { + super(); + this._cyclesOfRepetition = 10; + this._keySize = 160; + this._rcon = new Uint8Array([0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d]); + this._key = this._expandKey(key); + } + + _expandKey(cipherKey) { + const b = 176; + const s = this._s; + const rcon = this._rcon; + const result = new Uint8Array(b); + result.set(cipherKey); + + for (let j = 16, i = 1; j < b; ++i) { + let t1 = result[j - 3]; + let t2 = result[j - 2]; + let t3 = result[j - 1]; + let t4 = result[j - 4]; + t1 = s[t1]; + t2 = s[t2]; + t3 = s[t3]; + t4 = s[t4]; + t1 = t1 ^ rcon[i]; + + for (let n = 0; n < 4; ++n) { + result[j] = t1 ^= result[j - 16]; + j++; + result[j] = t2 ^= result[j - 16]; + j++; + result[j] = t3 ^= result[j - 16]; + j++; + result[j] = t4 ^= result[j - 16]; + j++; + } + } + + return result; + } + +} + +exports.AES128Cipher = AES128Cipher; + +class AES256Cipher extends AESBaseCipher { + constructor(key) { + super(); + this._cyclesOfRepetition = 14; + this._keySize = 224; + this._key = this._expandKey(key); + } + + _expandKey(cipherKey) { + const b = 240; + const s = this._s; + const result = new Uint8Array(b); + result.set(cipherKey); + let r = 1; + let t1, t2, t3, t4; + + for (let j = 32, i = 1; j < b; ++i) { + if (j % 32 === 16) { + t1 = s[t1]; + t2 = s[t2]; + t3 = s[t3]; + t4 = s[t4]; + } else if (j % 32 === 0) { + t1 = result[j - 3]; + t2 = result[j - 2]; + t3 = result[j - 1]; + t4 = result[j - 4]; + t1 = s[t1]; + t2 = s[t2]; + t3 = s[t3]; + t4 = s[t4]; + t1 = t1 ^ r; + + if ((r <<= 1) >= 256) { + r = (r ^ 0x1b) & 0xff; + } + } + + for (let n = 0; n < 4; ++n) { + result[j] = t1 ^= result[j - 32]; + j++; + result[j] = t2 ^= result[j - 32]; + j++; + result[j] = t3 ^= result[j - 32]; + j++; + result[j] = t4 ^= result[j - 32]; + j++; + } + } + + return result; + } + +} + +exports.AES256Cipher = AES256Cipher; + +var PDF17 = function PDF17Closure() { + function compareByteArrays(array1, array2) { + if (array1.length !== array2.length) { + return false; + } + + for (var i = 0; i < array1.length; i++) { + if (array1[i] !== array2[i]) { + return false; + } + } + + return true; + } + + function PDF17() {} + + PDF17.prototype = { + checkOwnerPassword: function PDF17_checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { + var hashData = new Uint8Array(password.length + 56); + hashData.set(password, 0); + hashData.set(ownerValidationSalt, password.length); + hashData.set(userBytes, password.length + ownerValidationSalt.length); + var result = calculateSHA256(hashData, 0, hashData.length); + return compareByteArrays(result, ownerPassword); + }, + checkUserPassword: function PDF17_checkUserPassword(password, userValidationSalt, userPassword) { + var hashData = new Uint8Array(password.length + 8); + hashData.set(password, 0); + hashData.set(userValidationSalt, password.length); + var result = calculateSHA256(hashData, 0, hashData.length); + return compareByteArrays(result, userPassword); + }, + getOwnerKey: function PDF17_getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) { + var hashData = new Uint8Array(password.length + 56); + hashData.set(password, 0); + hashData.set(ownerKeySalt, password.length); + hashData.set(userBytes, password.length + ownerKeySalt.length); + var key = calculateSHA256(hashData, 0, hashData.length); + var cipher = new AES256Cipher(key); + return cipher.decryptBlock(ownerEncryption, false, new Uint8Array(16)); + }, + getUserKey: function PDF17_getUserKey(password, userKeySalt, userEncryption) { + var hashData = new Uint8Array(password.length + 8); + hashData.set(password, 0); + hashData.set(userKeySalt, password.length); + var key = calculateSHA256(hashData, 0, hashData.length); + var cipher = new AES256Cipher(key); + return cipher.decryptBlock(userEncryption, false, new Uint8Array(16)); + } + }; + return PDF17; +}(); + +exports.PDF17 = PDF17; + +var PDF20 = function PDF20Closure() { + function concatArrays(array1, array2) { + var t = new Uint8Array(array1.length + array2.length); + t.set(array1, 0); + t.set(array2, array1.length); + return t; + } + + function calculatePDF20Hash(password, input, userBytes) { + var k = calculateSHA256(input, 0, input.length).subarray(0, 32); + var e = [0]; + var i = 0; + + while (i < 64 || e[e.length - 1] > i - 32) { + var arrayLength = password.length + k.length + userBytes.length; + var k1 = new Uint8Array(arrayLength * 64); + var array = concatArrays(password, k); + array = concatArrays(array, userBytes); + + for (var j = 0, pos = 0; j < 64; j++, pos += arrayLength) { + k1.set(array, pos); + } + + var cipher = new AES128Cipher(k.subarray(0, 16)); + e = cipher.encrypt(k1, k.subarray(16, 32)); + var remainder = 0; + + for (var z = 0; z < 16; z++) { + remainder *= 256 % 3; + remainder %= 3; + remainder += (e[z] >>> 0) % 3; + remainder %= 3; + } + + if (remainder === 0) { + k = calculateSHA256(e, 0, e.length); + } else if (remainder === 1) { + k = calculateSHA384(e, 0, e.length); + } else if (remainder === 2) { + k = calculateSHA512(e, 0, e.length); + } + + i++; + } + + return k.subarray(0, 32); + } + + function PDF20() {} + + function compareByteArrays(array1, array2) { + if (array1.length !== array2.length) { + return false; + } + + for (var i = 0; i < array1.length; i++) { + if (array1[i] !== array2[i]) { + return false; + } + } + + return true; + } + + PDF20.prototype = { + hash: function PDF20_hash(password, concatBytes, userBytes) { + return calculatePDF20Hash(password, concatBytes, userBytes); + }, + checkOwnerPassword: function PDF20_checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { + var hashData = new Uint8Array(password.length + 56); + hashData.set(password, 0); + hashData.set(ownerValidationSalt, password.length); + hashData.set(userBytes, password.length + ownerValidationSalt.length); + var result = calculatePDF20Hash(password, hashData, userBytes); + return compareByteArrays(result, ownerPassword); + }, + checkUserPassword: function PDF20_checkUserPassword(password, userValidationSalt, userPassword) { + var hashData = new Uint8Array(password.length + 8); + hashData.set(password, 0); + hashData.set(userValidationSalt, password.length); + var result = calculatePDF20Hash(password, hashData, []); + return compareByteArrays(result, userPassword); + }, + getOwnerKey: function PDF20_getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) { + var hashData = new Uint8Array(password.length + 56); + hashData.set(password, 0); + hashData.set(ownerKeySalt, password.length); + hashData.set(userBytes, password.length + ownerKeySalt.length); + var key = calculatePDF20Hash(password, hashData, userBytes); + var cipher = new AES256Cipher(key); + return cipher.decryptBlock(ownerEncryption, false, new Uint8Array(16)); + }, + getUserKey: function PDF20_getUserKey(password, userKeySalt, userEncryption) { + var hashData = new Uint8Array(password.length + 8); + hashData.set(password, 0); + hashData.set(userKeySalt, password.length); + var key = calculatePDF20Hash(password, hashData, []); + var cipher = new AES256Cipher(key); + return cipher.decryptBlock(userEncryption, false, new Uint8Array(16)); + } + }; + return PDF20; +}(); + +exports.PDF20 = PDF20; + +var CipherTransform = function CipherTransformClosure() { + function CipherTransform(stringCipherConstructor, streamCipherConstructor) { + this.StringCipherConstructor = stringCipherConstructor; + this.StreamCipherConstructor = streamCipherConstructor; + } + + CipherTransform.prototype = { + createStream: function CipherTransform_createStream(stream, length) { + var cipher = new this.StreamCipherConstructor(); + return new _stream.DecryptStream(stream, length, function cipherTransformDecryptStream(data, finalize) { + return cipher.decryptBlock(data, finalize); + }); + }, + decryptString: function CipherTransform_decryptString(s) { + var cipher = new this.StringCipherConstructor(); + var data = (0, _util.stringToBytes)(s); + data = cipher.decryptBlock(data, true); + return (0, _util.bytesToString)(data); + } + }; + return CipherTransform; +}(); + +var CipherTransformFactory = function CipherTransformFactoryClosure() { + var defaultPasswordBytes = new Uint8Array([0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41, 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08, 0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80, 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A]); + + function createEncryptionKey20(revision, password, ownerPassword, ownerValidationSalt, ownerKeySalt, uBytes, userPassword, userValidationSalt, userKeySalt, ownerEncryption, userEncryption, perms) { + if (password) { + var passwordLength = Math.min(127, password.length); + password = password.subarray(0, passwordLength); + } else { + password = []; + } + + var pdfAlgorithm; + + if (revision === 6) { + pdfAlgorithm = new PDF20(); + } else { + pdfAlgorithm = new PDF17(); + } + + if (pdfAlgorithm.checkUserPassword(password, userValidationSalt, userPassword)) { + return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption); + } else if (password.length && pdfAlgorithm.checkOwnerPassword(password, ownerValidationSalt, uBytes, ownerPassword)) { + return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes, ownerEncryption); + } + + return null; + } + + function prepareKeyData(fileId, password, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata) { + var hashDataSize = 40 + ownerPassword.length + fileId.length; + var hashData = new Uint8Array(hashDataSize), + i = 0, + j, + n; + + if (password) { + n = Math.min(32, password.length); + + for (; i < n; ++i) { + hashData[i] = password[i]; + } + } + + j = 0; + + while (i < 32) { + hashData[i++] = defaultPasswordBytes[j++]; + } + + for (j = 0, n = ownerPassword.length; j < n; ++j) { + hashData[i++] = ownerPassword[j]; + } + + hashData[i++] = flags & 0xff; + hashData[i++] = flags >> 8 & 0xff; + hashData[i++] = flags >> 16 & 0xff; + hashData[i++] = flags >>> 24 & 0xff; + + for (j = 0, n = fileId.length; j < n; ++j) { + hashData[i++] = fileId[j]; + } + + if (revision >= 4 && !encryptMetadata) { + hashData[i++] = 0xff; + hashData[i++] = 0xff; + hashData[i++] = 0xff; + hashData[i++] = 0xff; + } + + var hash = calculateMD5(hashData, 0, i); + var keyLengthInBytes = keyLength >> 3; + + if (revision >= 3) { + for (j = 0; j < 50; ++j) { + hash = calculateMD5(hash, 0, keyLengthInBytes); + } + } + + var encryptionKey = hash.subarray(0, keyLengthInBytes); + var cipher, checkData; + + if (revision >= 3) { + for (i = 0; i < 32; ++i) { + hashData[i] = defaultPasswordBytes[i]; + } + + for (j = 0, n = fileId.length; j < n; ++j) { + hashData[i++] = fileId[j]; + } + + cipher = new ARCFourCipher(encryptionKey); + checkData = cipher.encryptBlock(calculateMD5(hashData, 0, i)); + n = encryptionKey.length; + var derivedKey = new Uint8Array(n), + k; + + for (j = 1; j <= 19; ++j) { + for (k = 0; k < n; ++k) { + derivedKey[k] = encryptionKey[k] ^ j; + } + + cipher = new ARCFourCipher(derivedKey); + checkData = cipher.encryptBlock(checkData); + } + + for (j = 0, n = checkData.length; j < n; ++j) { + if (userPassword[j] !== checkData[j]) { + return null; + } + } + } else { + cipher = new ARCFourCipher(encryptionKey); + checkData = cipher.encryptBlock(defaultPasswordBytes); + + for (j = 0, n = checkData.length; j < n; ++j) { + if (userPassword[j] !== checkData[j]) { + return null; + } + } + } + + return encryptionKey; + } + + function decodeUserPassword(password, ownerPassword, revision, keyLength) { + var hashData = new Uint8Array(32), + i = 0, + j, + n; + n = Math.min(32, password.length); + + for (; i < n; ++i) { + hashData[i] = password[i]; + } + + j = 0; + + while (i < 32) { + hashData[i++] = defaultPasswordBytes[j++]; + } + + var hash = calculateMD5(hashData, 0, i); + var keyLengthInBytes = keyLength >> 3; + + if (revision >= 3) { + for (j = 0; j < 50; ++j) { + hash = calculateMD5(hash, 0, hash.length); + } + } + + var cipher, userPassword; + + if (revision >= 3) { + userPassword = ownerPassword; + var derivedKey = new Uint8Array(keyLengthInBytes), + k; + + for (j = 19; j >= 0; j--) { + for (k = 0; k < keyLengthInBytes; ++k) { + derivedKey[k] = hash[k] ^ j; + } + + cipher = new ARCFourCipher(derivedKey); + userPassword = cipher.encryptBlock(userPassword); + } + } else { + cipher = new ARCFourCipher(hash.subarray(0, keyLengthInBytes)); + userPassword = cipher.encryptBlock(ownerPassword); + } + + return userPassword; + } + + var identityName = _primitives.Name.get("Identity"); + + function CipherTransformFactory(dict, fileId, password) { + var filter = dict.get("Filter"); + + if (!(0, _primitives.isName)(filter, "Standard")) { + throw new _util.FormatError("unknown encryption method"); + } + + this.dict = dict; + var algorithm = dict.get("V"); + + if (!Number.isInteger(algorithm) || algorithm !== 1 && algorithm !== 2 && algorithm !== 4 && algorithm !== 5) { + throw new _util.FormatError("unsupported encryption algorithm"); + } + + this.algorithm = algorithm; + var keyLength = dict.get("Length"); + + if (!keyLength) { + if (algorithm <= 3) { + keyLength = 40; + } else { + var cfDict = dict.get("CF"); + var streamCryptoName = dict.get("StmF"); + + if ((0, _primitives.isDict)(cfDict) && (0, _primitives.isName)(streamCryptoName)) { + cfDict.suppressEncryption = true; + var handlerDict = cfDict.get(streamCryptoName.name); + keyLength = handlerDict && handlerDict.get("Length") || 128; + + if (keyLength < 40) { + keyLength <<= 3; + } + } + } + } + + if (!Number.isInteger(keyLength) || keyLength < 40 || keyLength % 8 !== 0) { + throw new _util.FormatError("invalid key length"); + } + + var ownerPassword = (0, _util.stringToBytes)(dict.get("O")).subarray(0, 32); + var userPassword = (0, _util.stringToBytes)(dict.get("U")).subarray(0, 32); + var flags = dict.get("P"); + var revision = dict.get("R"); + var encryptMetadata = (algorithm === 4 || algorithm === 5) && dict.get("EncryptMetadata") !== false; + this.encryptMetadata = encryptMetadata; + var fileIdBytes = (0, _util.stringToBytes)(fileId); + var passwordBytes; + + if (password) { + if (revision === 6) { + try { + password = (0, _util.utf8StringToString)(password); + } catch (ex) { + (0, _util.warn)("CipherTransformFactory: " + "Unable to convert UTF8 encoded password."); + } + } + + passwordBytes = (0, _util.stringToBytes)(password); + } + + var encryptionKey; + + if (algorithm !== 5) { + encryptionKey = prepareKeyData(fileIdBytes, passwordBytes, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata); + } else { + var ownerValidationSalt = (0, _util.stringToBytes)(dict.get("O")).subarray(32, 40); + var ownerKeySalt = (0, _util.stringToBytes)(dict.get("O")).subarray(40, 48); + var uBytes = (0, _util.stringToBytes)(dict.get("U")).subarray(0, 48); + var userValidationSalt = (0, _util.stringToBytes)(dict.get("U")).subarray(32, 40); + var userKeySalt = (0, _util.stringToBytes)(dict.get("U")).subarray(40, 48); + var ownerEncryption = (0, _util.stringToBytes)(dict.get("OE")); + var userEncryption = (0, _util.stringToBytes)(dict.get("UE")); + var perms = (0, _util.stringToBytes)(dict.get("Perms")); + encryptionKey = createEncryptionKey20(revision, passwordBytes, ownerPassword, ownerValidationSalt, ownerKeySalt, uBytes, userPassword, userValidationSalt, userKeySalt, ownerEncryption, userEncryption, perms); + } + + if (!encryptionKey && !password) { + throw new _util.PasswordException("No password given", _util.PasswordResponses.NEED_PASSWORD); + } else if (!encryptionKey && password) { + var decodedPassword = decodeUserPassword(passwordBytes, ownerPassword, revision, keyLength); + encryptionKey = prepareKeyData(fileIdBytes, decodedPassword, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata); + } + + if (!encryptionKey) { + throw new _util.PasswordException("Incorrect Password", _util.PasswordResponses.INCORRECT_PASSWORD); + } + + this.encryptionKey = encryptionKey; + + if (algorithm >= 4) { + var cf = dict.get("CF"); + + if ((0, _primitives.isDict)(cf)) { + cf.suppressEncryption = true; + } + + this.cf = cf; + this.stmf = dict.get("StmF") || identityName; + this.strf = dict.get("StrF") || identityName; + this.eff = dict.get("EFF") || this.stmf; + } + } + + function buildObjectKey(num, gen, encryptionKey, isAes) { + var key = new Uint8Array(encryptionKey.length + 9), + i, + n; + + for (i = 0, n = encryptionKey.length; i < n; ++i) { + key[i] = encryptionKey[i]; + } + + key[i++] = num & 0xff; + key[i++] = num >> 8 & 0xff; + key[i++] = num >> 16 & 0xff; + key[i++] = gen & 0xff; + key[i++] = gen >> 8 & 0xff; + + if (isAes) { + key[i++] = 0x73; + key[i++] = 0x41; + key[i++] = 0x6c; + key[i++] = 0x54; + } + + var hash = calculateMD5(key, 0, i); + return hash.subarray(0, Math.min(encryptionKey.length + 5, 16)); + } + + function buildCipherConstructor(cf, name, num, gen, key) { + if (!(0, _primitives.isName)(name)) { + throw new _util.FormatError("Invalid crypt filter name."); + } + + var cryptFilter = cf.get(name.name); + var cfm; + + if (cryptFilter !== null && cryptFilter !== undefined) { + cfm = cryptFilter.get("CFM"); + } + + if (!cfm || cfm.name === "None") { + return function cipherTransformFactoryBuildCipherConstructorNone() { + return new NullCipher(); + }; + } + + if (cfm.name === "V2") { + return function cipherTransformFactoryBuildCipherConstructorV2() { + return new ARCFourCipher(buildObjectKey(num, gen, key, false)); + }; + } + + if (cfm.name === "AESV2") { + return function cipherTransformFactoryBuildCipherConstructorAESV2() { + return new AES128Cipher(buildObjectKey(num, gen, key, true)); + }; + } + + if (cfm.name === "AESV3") { + return function cipherTransformFactoryBuildCipherConstructorAESV3() { + return new AES256Cipher(key); + }; + } + + throw new _util.FormatError("Unknown crypto method"); + } + + CipherTransformFactory.prototype = { + createCipherTransform: function CipherTransformFactory_createCipherTransform(num, gen) { + if (this.algorithm === 4 || this.algorithm === 5) { + return new CipherTransform(buildCipherConstructor(this.cf, this.stmf, num, gen, this.encryptionKey), buildCipherConstructor(this.cf, this.strf, num, gen, this.encryptionKey)); + } + + var key = buildObjectKey(num, gen, this.encryptionKey, false); + + var cipherConstructor = function buildCipherCipherConstructor() { + return new ARCFourCipher(key); + }; + + return new CipherTransform(cipherConstructor, cipherConstructor); + } + }; + return CipherTransformFactory; +}(); + +exports.CipherTransformFactory = CipherTransformFactory; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ColorSpace = void 0; + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +function resizeRgbImage(src, dest, w1, h1, w2, h2, alpha01) { + const COMPONENTS = 3; + alpha01 = alpha01 !== 1 ? 0 : alpha01; + const xRatio = w1 / w2; + const yRatio = h1 / h2; + let newIndex = 0, + oldIndex; + const xScaled = new Uint16Array(w2); + const w1Scanline = w1 * COMPONENTS; + + for (let i = 0; i < w2; i++) { + xScaled[i] = Math.floor(i * xRatio) * COMPONENTS; + } + + for (let i = 0; i < h2; i++) { + const py = Math.floor(i * yRatio) * w1Scanline; + + for (let j = 0; j < w2; j++) { + oldIndex = py + xScaled[j]; + dest[newIndex++] = src[oldIndex++]; + dest[newIndex++] = src[oldIndex++]; + dest[newIndex++] = src[oldIndex++]; + newIndex += alpha01; + } + } +} + +class ColorSpace { + constructor(name, numComps) { + if (this.constructor === ColorSpace) { + (0, _util.unreachable)("Cannot initialize ColorSpace."); + } + + this.name = name; + this.numComps = numComps; + } + + getRgb(src, srcOffset) { + const rgb = new Uint8ClampedArray(3); + this.getRgbItem(src, srcOffset, rgb, 0); + return rgb; + } + + getRgbItem(src, srcOffset, dest, destOffset) { + (0, _util.unreachable)("Should not call ColorSpace.getRgbItem"); + } + + getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { + (0, _util.unreachable)("Should not call ColorSpace.getRgbBuffer"); + } + + getOutputLength(inputLength, alpha01) { + (0, _util.unreachable)("Should not call ColorSpace.getOutputLength"); + } + + isPassthrough(bits) { + return false; + } + + isDefaultDecode(decodeMap, bpc) { + return ColorSpace.isDefaultDecode(decodeMap, this.numComps); + } + + fillRgb(dest, originalWidth, originalHeight, width, height, actualHeight, bpc, comps, alpha01) { + const count = originalWidth * originalHeight; + let rgbBuf = null; + const numComponentColors = 1 << bpc; + const needsResizing = originalHeight !== height || originalWidth !== width; + + if (this.isPassthrough(bpc)) { + rgbBuf = comps; + } else if (this.numComps === 1 && count > numComponentColors && this.name !== "DeviceGray" && this.name !== "DeviceRGB") { + const allColors = bpc <= 8 ? new Uint8Array(numComponentColors) : new Uint16Array(numComponentColors); + + for (let i = 0; i < numComponentColors; i++) { + allColors[i] = i; + } + + const colorMap = new Uint8ClampedArray(numComponentColors * 3); + this.getRgbBuffer(allColors, 0, numComponentColors, colorMap, 0, bpc, 0); + + if (!needsResizing) { + let destPos = 0; + + for (let i = 0; i < count; ++i) { + const key = comps[i] * 3; + dest[destPos++] = colorMap[key]; + dest[destPos++] = colorMap[key + 1]; + dest[destPos++] = colorMap[key + 2]; + destPos += alpha01; + } + } else { + rgbBuf = new Uint8Array(count * 3); + let rgbPos = 0; + + for (let i = 0; i < count; ++i) { + const key = comps[i] * 3; + rgbBuf[rgbPos++] = colorMap[key]; + rgbBuf[rgbPos++] = colorMap[key + 1]; + rgbBuf[rgbPos++] = colorMap[key + 2]; + } + } + } else { + if (!needsResizing) { + this.getRgbBuffer(comps, 0, width * actualHeight, dest, 0, bpc, alpha01); + } else { + rgbBuf = new Uint8ClampedArray(count * 3); + this.getRgbBuffer(comps, 0, count, rgbBuf, 0, bpc, 0); + } + } + + if (rgbBuf) { + if (needsResizing) { + resizeRgbImage(rgbBuf, dest, originalWidth, originalHeight, width, height, alpha01); + } else { + let destPos = 0, + rgbPos = 0; + + for (let i = 0, ii = width * actualHeight; i < ii; i++) { + dest[destPos++] = rgbBuf[rgbPos++]; + dest[destPos++] = rgbBuf[rgbPos++]; + dest[destPos++] = rgbBuf[rgbPos++]; + destPos += alpha01; + } + } + } + } + + get usesZeroToOneRange() { + return (0, _util.shadow)(this, "usesZeroToOneRange", true); + } + + static parse(cs, xref, res, pdfFunctionFactory) { + const IR = this.parseToIR(cs, xref, res, pdfFunctionFactory); + return this.fromIR(IR); + } + + static fromIR(IR) { + const name = Array.isArray(IR) ? IR[0] : IR; + let whitePoint, blackPoint, gamma; + + switch (name) { + case "DeviceGrayCS": + return this.singletons.gray; + + case "DeviceRgbCS": + return this.singletons.rgb; + + case "DeviceCmykCS": + return this.singletons.cmyk; + + case "CalGrayCS": + whitePoint = IR[1]; + blackPoint = IR[2]; + gamma = IR[3]; + return new CalGrayCS(whitePoint, blackPoint, gamma); + + case "CalRGBCS": + whitePoint = IR[1]; + blackPoint = IR[2]; + gamma = IR[3]; + const matrix = IR[4]; + return new CalRGBCS(whitePoint, blackPoint, gamma, matrix); + + case "PatternCS": + let basePatternCS = IR[1]; + + if (basePatternCS) { + basePatternCS = this.fromIR(basePatternCS); + } + + return new PatternCS(basePatternCS); + + case "IndexedCS": + const baseIndexedCS = IR[1]; + const hiVal = IR[2]; + const lookup = IR[3]; + return new IndexedCS(this.fromIR(baseIndexedCS), hiVal, lookup); + + case "AlternateCS": + const numComps = IR[1]; + const alt = IR[2]; + const tintFn = IR[3]; + return new AlternateCS(numComps, this.fromIR(alt), tintFn); + + case "LabCS": + whitePoint = IR[1]; + blackPoint = IR[2]; + const range = IR[3]; + return new LabCS(whitePoint, blackPoint, range); + + default: + throw new _util.FormatError(`Unknown colorspace name: ${name}`); + } + } + + static parseToIR(cs, xref, res = null, pdfFunctionFactory) { + cs = xref.fetchIfRef(cs); + + if ((0, _primitives.isName)(cs)) { + switch (cs.name) { + case "DeviceGray": + case "G": + return "DeviceGrayCS"; + + case "DeviceRGB": + case "RGB": + return "DeviceRgbCS"; + + case "DeviceCMYK": + case "CMYK": + return "DeviceCmykCS"; + + case "Pattern": + return ["PatternCS", null]; + + default: + if ((0, _primitives.isDict)(res)) { + const colorSpaces = res.get("ColorSpace"); + + if ((0, _primitives.isDict)(colorSpaces)) { + const resCS = colorSpaces.get(cs.name); + + if (resCS) { + if ((0, _primitives.isName)(resCS)) { + return this.parseToIR(resCS, xref, res, pdfFunctionFactory); + } + + cs = resCS; + break; + } + } + } + + throw new _util.FormatError(`unrecognized colorspace ${cs.name}`); + } + } + + if (Array.isArray(cs)) { + const mode = xref.fetchIfRef(cs[0]).name; + let numComps, params, alt, whitePoint, blackPoint, gamma; + + switch (mode) { + case "DeviceGray": + case "G": + return "DeviceGrayCS"; + + case "DeviceRGB": + case "RGB": + return "DeviceRgbCS"; + + case "DeviceCMYK": + case "CMYK": + return "DeviceCmykCS"; + + case "CalGray": + params = xref.fetchIfRef(cs[1]); + whitePoint = params.getArray("WhitePoint"); + blackPoint = params.getArray("BlackPoint"); + gamma = params.get("Gamma"); + return ["CalGrayCS", whitePoint, blackPoint, gamma]; + + case "CalRGB": + params = xref.fetchIfRef(cs[1]); + whitePoint = params.getArray("WhitePoint"); + blackPoint = params.getArray("BlackPoint"); + gamma = params.getArray("Gamma"); + const matrix = params.getArray("Matrix"); + return ["CalRGBCS", whitePoint, blackPoint, gamma, matrix]; + + case "ICCBased": + const stream = xref.fetchIfRef(cs[1]); + const dict = stream.dict; + numComps = dict.get("N"); + alt = dict.get("Alternate"); + + if (alt) { + const altIR = this.parseToIR(alt, xref, res, pdfFunctionFactory); + const altCS = this.fromIR(altIR, pdfFunctionFactory); + + if (altCS.numComps === numComps) { + return altIR; + } + + (0, _util.warn)("ICCBased color space: Ignoring incorrect /Alternate entry."); + } + + if (numComps === 1) { + return "DeviceGrayCS"; + } else if (numComps === 3) { + return "DeviceRgbCS"; + } else if (numComps === 4) { + return "DeviceCmykCS"; + } + + break; + + case "Pattern": + let basePatternCS = cs[1] || null; + + if (basePatternCS) { + basePatternCS = this.parseToIR(basePatternCS, xref, res, pdfFunctionFactory); + } + + return ["PatternCS", basePatternCS]; + + case "Indexed": + case "I": + const baseIndexedCS = this.parseToIR(cs[1], xref, res, pdfFunctionFactory); + const hiVal = xref.fetchIfRef(cs[2]) + 1; + let lookup = xref.fetchIfRef(cs[3]); + + if ((0, _primitives.isStream)(lookup)) { + lookup = lookup.getBytes(); + } + + return ["IndexedCS", baseIndexedCS, hiVal, lookup]; + + case "Separation": + case "DeviceN": + const name = xref.fetchIfRef(cs[1]); + numComps = Array.isArray(name) ? name.length : 1; + alt = this.parseToIR(cs[2], xref, res, pdfFunctionFactory); + const tintFn = pdfFunctionFactory.create(xref.fetchIfRef(cs[3])); + return ["AlternateCS", numComps, alt, tintFn]; + + case "Lab": + params = xref.fetchIfRef(cs[1]); + whitePoint = params.getArray("WhitePoint"); + blackPoint = params.getArray("BlackPoint"); + const range = params.getArray("Range"); + return ["LabCS", whitePoint, blackPoint, range]; + + default: + throw new _util.FormatError(`unimplemented color space object "${mode}"`); + } + } + + throw new _util.FormatError(`unrecognized color space object: "${cs}"`); + } + + static isDefaultDecode(decode, numComps) { + if (!Array.isArray(decode)) { + return true; + } + + if (numComps * 2 !== decode.length) { + (0, _util.warn)("The decode map is not the correct length"); + return true; + } + + for (let i = 0, ii = decode.length; i < ii; i += 2) { + if (decode[i] !== 0 || decode[i + 1] !== 1) { + return false; + } + } + + return true; + } + + static get singletons() { + return (0, _util.shadow)(this, "singletons", { + get gray() { + return (0, _util.shadow)(this, "gray", new DeviceGrayCS()); + }, + + get rgb() { + return (0, _util.shadow)(this, "rgb", new DeviceRgbCS()); + }, + + get cmyk() { + return (0, _util.shadow)(this, "cmyk", new DeviceCmykCS()); + } + + }); + } + +} + +exports.ColorSpace = ColorSpace; + +class AlternateCS extends ColorSpace { + constructor(numComps, base, tintFn) { + super("Alternate", numComps); + this.base = base; + this.tintFn = tintFn; + this.tmpBuf = new Float32Array(base.numComps); + } + + getRgbItem(src, srcOffset, dest, destOffset) { + const tmpBuf = this.tmpBuf; + this.tintFn(src, srcOffset, tmpBuf, 0); + this.base.getRgbItem(tmpBuf, 0, dest, destOffset); + } + + getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { + const tintFn = this.tintFn; + const base = this.base; + const scale = 1 / ((1 << bits) - 1); + const baseNumComps = base.numComps; + const usesZeroToOneRange = base.usesZeroToOneRange; + const isPassthrough = (base.isPassthrough(8) || !usesZeroToOneRange) && alpha01 === 0; + let pos = isPassthrough ? destOffset : 0; + const baseBuf = isPassthrough ? dest : new Uint8ClampedArray(baseNumComps * count); + const numComps = this.numComps; + const scaled = new Float32Array(numComps); + const tinted = new Float32Array(baseNumComps); + let i, j; + + for (i = 0; i < count; i++) { + for (j = 0; j < numComps; j++) { + scaled[j] = src[srcOffset++] * scale; + } + + tintFn(scaled, 0, tinted, 0); + + if (usesZeroToOneRange) { + for (j = 0; j < baseNumComps; j++) { + baseBuf[pos++] = tinted[j] * 255; + } + } else { + base.getRgbItem(tinted, 0, baseBuf, pos); + pos += baseNumComps; + } + } + + if (!isPassthrough) { + base.getRgbBuffer(baseBuf, 0, count, dest, destOffset, 8, alpha01); + } + } + + getOutputLength(inputLength, alpha01) { + return this.base.getOutputLength(inputLength * this.base.numComps / this.numComps, alpha01); + } + +} + +class PatternCS extends ColorSpace { + constructor(baseCS) { + super("Pattern", null); + this.base = baseCS; + } + + isDefaultDecode(decodeMap, bpc) { + (0, _util.unreachable)("Should not call PatternCS.isDefaultDecode"); + } + +} + +class IndexedCS extends ColorSpace { + constructor(base, highVal, lookup) { + super("Indexed", 1); + this.base = base; + this.highVal = highVal; + const baseNumComps = base.numComps; + const length = baseNumComps * highVal; + + if ((0, _primitives.isStream)(lookup)) { + this.lookup = new Uint8Array(length); + const bytes = lookup.getBytes(length); + this.lookup.set(bytes); + } else if ((0, _util.isString)(lookup)) { + this.lookup = new Uint8Array(length); + + for (let i = 0; i < length; ++i) { + this.lookup[i] = lookup.charCodeAt(i); + } + } else if (lookup instanceof Uint8Array) { + this.lookup = lookup; + } else { + throw new _util.FormatError(`Unrecognized lookup table: ${lookup}`); + } + } + + getRgbItem(src, srcOffset, dest, destOffset) { + const numComps = this.base.numComps; + const start = src[srcOffset] * numComps; + this.base.getRgbBuffer(this.lookup, start, 1, dest, destOffset, 8, 0); + } + + getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { + const base = this.base; + const numComps = base.numComps; + const outputDelta = base.getOutputLength(numComps, alpha01); + const lookup = this.lookup; + + for (let i = 0; i < count; ++i) { + const lookupPos = src[srcOffset++] * numComps; + base.getRgbBuffer(lookup, lookupPos, 1, dest, destOffset, 8, alpha01); + destOffset += outputDelta; + } + } + + getOutputLength(inputLength, alpha01) { + return this.base.getOutputLength(inputLength * this.base.numComps, alpha01); + } + + isDefaultDecode(decodeMap, bpc) { + if (!Array.isArray(decodeMap)) { + return true; + } + + if (decodeMap.length !== 2) { + (0, _util.warn)("Decode map length is not correct"); + return true; + } + + if (!Number.isInteger(bpc) || bpc < 1) { + (0, _util.warn)("Bits per component is not correct"); + return true; + } + + return decodeMap[0] === 0 && decodeMap[1] === (1 << bpc) - 1; + } + +} + +class DeviceGrayCS extends ColorSpace { + constructor() { + super("DeviceGray", 1); + } + + getRgbItem(src, srcOffset, dest, destOffset) { + const c = src[srcOffset] * 255; + dest[destOffset] = dest[destOffset + 1] = dest[destOffset + 2] = c; + } + + getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { + const scale = 255 / ((1 << bits) - 1); + let j = srcOffset, + q = destOffset; + + for (let i = 0; i < count; ++i) { + const c = scale * src[j++]; + dest[q++] = c; + dest[q++] = c; + dest[q++] = c; + q += alpha01; + } + } + + getOutputLength(inputLength, alpha01) { + return inputLength * (3 + alpha01); + } + +} + +class DeviceRgbCS extends ColorSpace { + constructor() { + super("DeviceRGB", 3); + } + + getRgbItem(src, srcOffset, dest, destOffset) { + dest[destOffset] = src[srcOffset] * 255; + dest[destOffset + 1] = src[srcOffset + 1] * 255; + dest[destOffset + 2] = src[srcOffset + 2] * 255; + } + + getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { + if (bits === 8 && alpha01 === 0) { + dest.set(src.subarray(srcOffset, srcOffset + count * 3), destOffset); + return; + } + + const scale = 255 / ((1 << bits) - 1); + let j = srcOffset, + q = destOffset; + + for (let i = 0; i < count; ++i) { + dest[q++] = scale * src[j++]; + dest[q++] = scale * src[j++]; + dest[q++] = scale * src[j++]; + q += alpha01; + } + } + + getOutputLength(inputLength, alpha01) { + return inputLength * (3 + alpha01) / 3 | 0; + } + + isPassthrough(bits) { + return bits === 8; + } + +} + +const DeviceCmykCS = function DeviceCmykCSClosure() { + function convertToRgb(src, srcOffset, srcScale, dest, destOffset) { + const c = src[srcOffset] * srcScale; + const m = src[srcOffset + 1] * srcScale; + const y = src[srcOffset + 2] * srcScale; + const k = src[srcOffset + 3] * srcScale; + dest[destOffset] = 255 + c * (-4.387332384609988 * c + 54.48615194189176 * m + 18.82290502165302 * y + 212.25662451639585 * k + -285.2331026137004) + m * (1.7149763477362134 * m - 5.6096736904047315 * y + -17.873870861415444 * k - 5.497006427196366) + y * (-2.5217340131683033 * y - 21.248923337353073 * k + 17.5119270841813) + k * (-21.86122147463605 * k - 189.48180835922747); + dest[destOffset + 1] = 255 + c * (8.841041422036149 * c + 60.118027045597366 * m + 6.871425592049007 * y + 31.159100130055922 * k + -79.2970844816548) + m * (-15.310361306967817 * m + 17.575251261109482 * y + 131.35250912493976 * k - 190.9453302588951) + y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) + k * (-20.737325471181034 * k - 187.80453709719578); + dest[destOffset + 2] = 255 + c * (0.8842522430003296 * c + 8.078677503112928 * m + 30.89978309703729 * y - 0.23883238689178934 * k + -14.183576799673286) + m * (10.49593273432072 * m + 63.02378494754052 * y + 50.606957656360734 * k - 112.23884253719248) + y * (0.03296041114873217 * y + 115.60384449646641 * k + -193.58209356861505) + k * (-22.33816807309886 * k - 180.12613974708367); + } + + class DeviceCmykCS extends ColorSpace { + constructor() { + super("DeviceCMYK", 4); + } + + getRgbItem(src, srcOffset, dest, destOffset) { + convertToRgb(src, srcOffset, 1, dest, destOffset); + } + + getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { + const scale = 1 / ((1 << bits) - 1); + + for (let i = 0; i < count; i++) { + convertToRgb(src, srcOffset, scale, dest, destOffset); + srcOffset += 4; + destOffset += 3 + alpha01; + } + } + + getOutputLength(inputLength, alpha01) { + return inputLength / 4 * (3 + alpha01) | 0; + } + + } + + return DeviceCmykCS; +}(); + +const CalGrayCS = function CalGrayCSClosure() { + function convertToRgb(cs, src, srcOffset, dest, destOffset, scale) { + const A = src[srcOffset] * scale; + const AG = A ** cs.G; + const L = cs.YW * AG; + const val = Math.max(295.8 * L ** 0.333333333333333333 - 40.8, 0); + dest[destOffset] = val; + dest[destOffset + 1] = val; + dest[destOffset + 2] = val; + } + + class CalGrayCS extends ColorSpace { + constructor(whitePoint, blackPoint, gamma) { + super("CalGray", 1); + + if (!whitePoint) { + throw new _util.FormatError("WhitePoint missing - required for color space CalGray"); + } + + blackPoint = blackPoint || [0, 0, 0]; + gamma = gamma || 1; + this.XW = whitePoint[0]; + this.YW = whitePoint[1]; + this.ZW = whitePoint[2]; + this.XB = blackPoint[0]; + this.YB = blackPoint[1]; + this.ZB = blackPoint[2]; + this.G = gamma; + + if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) { + throw new _util.FormatError(`Invalid WhitePoint components for ${this.name}` + ", no fallback available"); + } + + if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { + (0, _util.info)(`Invalid BlackPoint for ${this.name}, falling back to default.`); + this.XB = this.YB = this.ZB = 0; + } + + if (this.XB !== 0 || this.YB !== 0 || this.ZB !== 0) { + (0, _util.warn)(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ` + `ZB: ${this.ZB}, only default values are supported.`); + } + + if (this.G < 1) { + (0, _util.info)(`Invalid Gamma: ${this.G} for ${this.name}, ` + "falling back to default."); + this.G = 1; + } + } + + getRgbItem(src, srcOffset, dest, destOffset) { + convertToRgb(this, src, srcOffset, dest, destOffset, 1); + } + + getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { + const scale = 1 / ((1 << bits) - 1); + + for (let i = 0; i < count; ++i) { + convertToRgb(this, src, srcOffset, dest, destOffset, scale); + srcOffset += 1; + destOffset += 3 + alpha01; + } + } + + getOutputLength(inputLength, alpha01) { + return inputLength * (3 + alpha01); + } + + } + + return CalGrayCS; +}(); + +const CalRGBCS = function CalRGBCSClosure() { + const BRADFORD_SCALE_MATRIX = new Float32Array([0.8951, 0.2664, -0.1614, -0.7502, 1.7135, 0.0367, 0.0389, -0.0685, 1.0296]); + const BRADFORD_SCALE_INVERSE_MATRIX = new Float32Array([0.9869929, -0.1470543, 0.1599627, 0.4323053, 0.5183603, 0.0492912, -0.0085287, 0.0400428, 0.9684867]); + const SRGB_D65_XYZ_TO_RGB_MATRIX = new Float32Array([3.2404542, -1.5371385, -0.4985314, -0.9692660, 1.8760108, 0.0415560, 0.0556434, -0.2040259, 1.0572252]); + const FLAT_WHITEPOINT_MATRIX = new Float32Array([1, 1, 1]); + const tempNormalizeMatrix = new Float32Array(3); + const tempConvertMatrix1 = new Float32Array(3); + const tempConvertMatrix2 = new Float32Array(3); + const DECODE_L_CONSTANT = ((8 + 16) / 116) ** 3 / 8.0; + + function matrixProduct(a, b, result) { + result[0] = a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; + result[1] = a[3] * b[0] + a[4] * b[1] + a[5] * b[2]; + result[2] = a[6] * b[0] + a[7] * b[1] + a[8] * b[2]; + } + + function convertToFlat(sourceWhitePoint, LMS, result) { + result[0] = LMS[0] * 1 / sourceWhitePoint[0]; + result[1] = LMS[1] * 1 / sourceWhitePoint[1]; + result[2] = LMS[2] * 1 / sourceWhitePoint[2]; + } + + function convertToD65(sourceWhitePoint, LMS, result) { + const D65X = 0.95047; + const D65Y = 1; + const D65Z = 1.08883; + result[0] = LMS[0] * D65X / sourceWhitePoint[0]; + result[1] = LMS[1] * D65Y / sourceWhitePoint[1]; + result[2] = LMS[2] * D65Z / sourceWhitePoint[2]; + } + + function sRGBTransferFunction(color) { + if (color <= 0.0031308) { + return adjustToRange(0, 1, 12.92 * color); + } + + return adjustToRange(0, 1, (1 + 0.055) * color ** (1 / 2.4) - 0.055); + } + + function adjustToRange(min, max, value) { + return Math.max(min, Math.min(max, value)); + } + + function decodeL(L) { + if (L < 0) { + return -decodeL(-L); + } + + if (L > 8.0) { + return ((L + 16) / 116) ** 3; + } + + return L * DECODE_L_CONSTANT; + } + + function compensateBlackPoint(sourceBlackPoint, XYZ_Flat, result) { + if (sourceBlackPoint[0] === 0 && sourceBlackPoint[1] === 0 && sourceBlackPoint[2] === 0) { + result[0] = XYZ_Flat[0]; + result[1] = XYZ_Flat[1]; + result[2] = XYZ_Flat[2]; + return; + } + + const zeroDecodeL = decodeL(0); + const X_DST = zeroDecodeL; + const X_SRC = decodeL(sourceBlackPoint[0]); + const Y_DST = zeroDecodeL; + const Y_SRC = decodeL(sourceBlackPoint[1]); + const Z_DST = zeroDecodeL; + const Z_SRC = decodeL(sourceBlackPoint[2]); + const X_Scale = (1 - X_DST) / (1 - X_SRC); + const X_Offset = 1 - X_Scale; + const Y_Scale = (1 - Y_DST) / (1 - Y_SRC); + const Y_Offset = 1 - Y_Scale; + const Z_Scale = (1 - Z_DST) / (1 - Z_SRC); + const Z_Offset = 1 - Z_Scale; + result[0] = XYZ_Flat[0] * X_Scale + X_Offset; + result[1] = XYZ_Flat[1] * Y_Scale + Y_Offset; + result[2] = XYZ_Flat[2] * Z_Scale + Z_Offset; + } + + function normalizeWhitePointToFlat(sourceWhitePoint, XYZ_In, result) { + if (sourceWhitePoint[0] === 1 && sourceWhitePoint[2] === 1) { + result[0] = XYZ_In[0]; + result[1] = XYZ_In[1]; + result[2] = XYZ_In[2]; + return; + } + + const LMS = result; + matrixProduct(BRADFORD_SCALE_MATRIX, XYZ_In, LMS); + const LMS_Flat = tempNormalizeMatrix; + convertToFlat(sourceWhitePoint, LMS, LMS_Flat); + matrixProduct(BRADFORD_SCALE_INVERSE_MATRIX, LMS_Flat, result); + } + + function normalizeWhitePointToD65(sourceWhitePoint, XYZ_In, result) { + const LMS = result; + matrixProduct(BRADFORD_SCALE_MATRIX, XYZ_In, LMS); + const LMS_D65 = tempNormalizeMatrix; + convertToD65(sourceWhitePoint, LMS, LMS_D65); + matrixProduct(BRADFORD_SCALE_INVERSE_MATRIX, LMS_D65, result); + } + + function convertToRgb(cs, src, srcOffset, dest, destOffset, scale) { + const A = adjustToRange(0, 1, src[srcOffset] * scale); + const B = adjustToRange(0, 1, src[srcOffset + 1] * scale); + const C = adjustToRange(0, 1, src[srcOffset + 2] * scale); + const AGR = A ** cs.GR; + const BGG = B ** cs.GG; + const CGB = C ** cs.GB; + const X = cs.MXA * AGR + cs.MXB * BGG + cs.MXC * CGB; + const Y = cs.MYA * AGR + cs.MYB * BGG + cs.MYC * CGB; + const Z = cs.MZA * AGR + cs.MZB * BGG + cs.MZC * CGB; + const XYZ = tempConvertMatrix1; + XYZ[0] = X; + XYZ[1] = Y; + XYZ[2] = Z; + const XYZ_Flat = tempConvertMatrix2; + normalizeWhitePointToFlat(cs.whitePoint, XYZ, XYZ_Flat); + const XYZ_Black = tempConvertMatrix1; + compensateBlackPoint(cs.blackPoint, XYZ_Flat, XYZ_Black); + const XYZ_D65 = tempConvertMatrix2; + normalizeWhitePointToD65(FLAT_WHITEPOINT_MATRIX, XYZ_Black, XYZ_D65); + const SRGB = tempConvertMatrix1; + matrixProduct(SRGB_D65_XYZ_TO_RGB_MATRIX, XYZ_D65, SRGB); + dest[destOffset] = sRGBTransferFunction(SRGB[0]) * 255; + dest[destOffset + 1] = sRGBTransferFunction(SRGB[1]) * 255; + dest[destOffset + 2] = sRGBTransferFunction(SRGB[2]) * 255; + } + + class CalRGBCS extends ColorSpace { + constructor(whitePoint, blackPoint, gamma, matrix) { + super("CalRGB", 3); + + if (!whitePoint) { + throw new _util.FormatError("WhitePoint missing - required for color space CalRGB"); + } + + blackPoint = blackPoint || new Float32Array(3); + gamma = gamma || new Float32Array([1, 1, 1]); + matrix = matrix || new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]); + const XW = whitePoint[0]; + const YW = whitePoint[1]; + const ZW = whitePoint[2]; + this.whitePoint = whitePoint; + const XB = blackPoint[0]; + const YB = blackPoint[1]; + const ZB = blackPoint[2]; + this.blackPoint = blackPoint; + this.GR = gamma[0]; + this.GG = gamma[1]; + this.GB = gamma[2]; + this.MXA = matrix[0]; + this.MYA = matrix[1]; + this.MZA = matrix[2]; + this.MXB = matrix[3]; + this.MYB = matrix[4]; + this.MZB = matrix[5]; + this.MXC = matrix[6]; + this.MYC = matrix[7]; + this.MZC = matrix[8]; + + if (XW < 0 || ZW < 0 || YW !== 1) { + throw new _util.FormatError(`Invalid WhitePoint components for ${this.name}` + ", no fallback available"); + } + + if (XB < 0 || YB < 0 || ZB < 0) { + (0, _util.info)(`Invalid BlackPoint for ${this.name} [${XB}, ${YB}, ${ZB}], ` + "falling back to default."); + this.blackPoint = new Float32Array(3); + } + + if (this.GR < 0 || this.GG < 0 || this.GB < 0) { + (0, _util.info)(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ` + `${this.name}, falling back to default.`); + this.GR = this.GG = this.GB = 1; + } + } + + getRgbItem(src, srcOffset, dest, destOffset) { + convertToRgb(this, src, srcOffset, dest, destOffset, 1); + } + + getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { + const scale = 1 / ((1 << bits) - 1); + + for (let i = 0; i < count; ++i) { + convertToRgb(this, src, srcOffset, dest, destOffset, scale); + srcOffset += 3; + destOffset += 3 + alpha01; + } + } + + getOutputLength(inputLength, alpha01) { + return inputLength * (3 + alpha01) / 3 | 0; + } + + } + + return CalRGBCS; +}(); + +const LabCS = function LabCSClosure() { + function fn_g(x) { + let result; + + if (x >= 6 / 29) { + result = x * x * x; + } else { + result = 108 / 841 * (x - 4 / 29); + } + + return result; + } + + function decode(value, high1, low2, high2) { + return low2 + value * (high2 - low2) / high1; + } + + function convertToRgb(cs, src, srcOffset, maxVal, dest, destOffset) { + let Ls = src[srcOffset]; + let as = src[srcOffset + 1]; + let bs = src[srcOffset + 2]; + + if (maxVal !== false) { + Ls = decode(Ls, maxVal, 0, 100); + as = decode(as, maxVal, cs.amin, cs.amax); + bs = decode(bs, maxVal, cs.bmin, cs.bmax); + } + + if (as > cs.amax) { + as = cs.amax; + } else if (as < cs.amin) { + as = cs.amin; + } + + if (bs > cs.bmax) { + bs = cs.bmax; + } else if (bs < cs.bmin) { + bs = cs.bmin; + } + + const M = (Ls + 16) / 116; + const L = M + as / 500; + const N = M - bs / 200; + const X = cs.XW * fn_g(L); + const Y = cs.YW * fn_g(M); + const Z = cs.ZW * fn_g(N); + let r, g, b; + + if (cs.ZW < 1) { + r = X * 3.1339 + Y * -1.617 + Z * -0.4906; + g = X * -0.9785 + Y * 1.916 + Z * 0.0333; + b = X * 0.072 + Y * -0.229 + Z * 1.4057; + } else { + r = X * 3.2406 + Y * -1.5372 + Z * -0.4986; + g = X * -0.9689 + Y * 1.8758 + Z * 0.0415; + b = X * 0.0557 + Y * -0.204 + Z * 1.057; + } + + dest[destOffset] = Math.sqrt(r) * 255; + dest[destOffset + 1] = Math.sqrt(g) * 255; + dest[destOffset + 2] = Math.sqrt(b) * 255; + } + + class LabCS extends ColorSpace { + constructor(whitePoint, blackPoint, range) { + super("Lab", 3); + + if (!whitePoint) { + throw new _util.FormatError("WhitePoint missing - required for color space Lab"); + } + + blackPoint = blackPoint || [0, 0, 0]; + range = range || [-100, 100, -100, 100]; + this.XW = whitePoint[0]; + this.YW = whitePoint[1]; + this.ZW = whitePoint[2]; + this.amin = range[0]; + this.amax = range[1]; + this.bmin = range[2]; + this.bmax = range[3]; + this.XB = blackPoint[0]; + this.YB = blackPoint[1]; + this.ZB = blackPoint[2]; + + if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) { + throw new _util.FormatError("Invalid WhitePoint components, no fallback available"); + } + + if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { + (0, _util.info)("Invalid BlackPoint, falling back to default"); + this.XB = this.YB = this.ZB = 0; + } + + if (this.amin > this.amax || this.bmin > this.bmax) { + (0, _util.info)("Invalid Range, falling back to defaults"); + this.amin = -100; + this.amax = 100; + this.bmin = -100; + this.bmax = 100; + } + } + + getRgbItem(src, srcOffset, dest, destOffset) { + convertToRgb(this, src, srcOffset, false, dest, destOffset); + } + + getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { + const maxVal = (1 << bits) - 1; + + for (let i = 0; i < count; i++) { + convertToRgb(this, src, srcOffset, maxVal, dest, destOffset); + srcOffset += 3; + destOffset += 3 + alpha01; + } + } + + getOutputLength(inputLength, alpha01) { + return inputLength * (3 + alpha01) / 3 | 0; + } + + isDefaultDecode(decodeMap, bpc) { + return true; + } + + get usesZeroToOneRange() { + return (0, _util.shadow)(this, "usesZeroToOneRange", false); + } + + } + + return LabCS; +}(); + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GlobalImageCache = exports.LocalImageCache = void 0; + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +class LocalImageCache { + constructor() { + this._nameRefMap = new Map(); + this._imageMap = new Map(); + this._imageCache = new _primitives.RefSetCache(); + } + + getByName(name) { + const ref = this._nameRefMap.get(name); + + if (ref) { + return this.getByRef(ref); + } + + return this._imageMap.get(name) || null; + } + + getByRef(ref) { + return this._imageCache.get(ref) || null; + } + + set(name, ref = null, data) { + if (!name) { + throw new Error('LocalImageCache.set - expected "name" argument.'); + } + + if (ref) { + if (this._imageCache.has(ref)) { + return; + } + + this._nameRefMap.set(name, ref); + + this._imageCache.put(ref, data); + + return; + } + + if (this._imageMap.has(name)) { + return; + } + + this._imageMap.set(name, data); + } + +} + +exports.LocalImageCache = LocalImageCache; + +class GlobalImageCache { + static get NUM_PAGES_THRESHOLD() { + return (0, _util.shadow)(this, "NUM_PAGES_THRESHOLD", 2); + } + + static get MAX_IMAGES_TO_CACHE() { + return (0, _util.shadow)(this, "MAX_IMAGES_TO_CACHE", 10); + } + + constructor() { + this._refCache = new _primitives.RefSetCache(); + this._imageCache = new _primitives.RefSetCache(); + } + + shouldCache(ref, pageIndex) { + const pageIndexSet = this._refCache.get(ref); + + const numPages = pageIndexSet ? pageIndexSet.size + (pageIndexSet.has(pageIndex) ? 0 : 1) : 1; + + if (numPages < GlobalImageCache.NUM_PAGES_THRESHOLD) { + return false; + } + + if (!this._imageCache.has(ref) && this._imageCache.size >= GlobalImageCache.MAX_IMAGES_TO_CACHE) { + return false; + } + + return true; + } + + addPageIndex(ref, pageIndex) { + let pageIndexSet = this._refCache.get(ref); + + if (!pageIndexSet) { + pageIndexSet = new Set(); + + this._refCache.put(ref, pageIndexSet); + } + + pageIndexSet.add(pageIndex); + } + + getData(ref, pageIndex) { + if (!this._refCache.has(ref)) { + return null; + } + + const pageIndexSet = this._refCache.get(ref); + + if (pageIndexSet.size < GlobalImageCache.NUM_PAGES_THRESHOLD) { + return null; + } + + if (!this._imageCache.has(ref)) { + return null; + } + + pageIndexSet.add(pageIndex); + return this._imageCache.get(ref); + } + + setData(ref, data) { + if (!this._refCache.has(ref)) { + throw new Error('GlobalImageCache.setData - expected "addPageIndex" to have been called.'); + } + + if (this._imageCache.has(ref)) { + return; + } + + if (this._imageCache.size >= GlobalImageCache.MAX_IMAGES_TO_CACHE) { + (0, _util.info)("GlobalImageCache.setData - ignoring image above MAX_IMAGES_TO_CACHE."); + return; + } + + this._imageCache.put(ref, data); + } + + clear(onlyData = false) { + if (!onlyData) { + this._refCache.clear(); + } + + this._imageCache.clear(); + } + +} + +exports.GlobalImageCache = GlobalImageCache; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getQuadPoints = getQuadPoints; +exports.MarkupAnnotation = exports.AnnotationFactory = exports.AnnotationBorderStyle = exports.Annotation = void 0; + +var _util = __w_pdfjs_require__(2); + +var _obj = __w_pdfjs_require__(10); + +var _primitives = __w_pdfjs_require__(5); + +var _colorspace = __w_pdfjs_require__(23); + +var _core_utils = __w_pdfjs_require__(8); + +var _operator_list = __w_pdfjs_require__(26); + +var _stream = __w_pdfjs_require__(12); + +class AnnotationFactory { + static create(xref, ref, pdfManager, idFactory) { + return pdfManager.ensure(this, "_create", [xref, ref, pdfManager, idFactory]); + } + + static _create(xref, ref, pdfManager, idFactory) { + const dict = xref.fetchIfRef(ref); + + if (!(0, _primitives.isDict)(dict)) { + return undefined; + } + + const id = (0, _primitives.isRef)(ref) ? ref.toString() : `annot_${idFactory.createObjId()}`; + let subtype = dict.get("Subtype"); + subtype = (0, _primitives.isName)(subtype) ? subtype.name : null; + const parameters = { + xref, + dict, + subtype, + id, + pdfManager + }; + + switch (subtype) { + case "Link": + return new LinkAnnotation(parameters); + + case "Text": + return new TextAnnotation(parameters); + + case "Widget": + let fieldType = (0, _core_utils.getInheritableProperty)({ + dict, + key: "FT" + }); + fieldType = (0, _primitives.isName)(fieldType) ? fieldType.name : null; + + switch (fieldType) { + case "Tx": + return new TextWidgetAnnotation(parameters); + + case "Btn": + return new ButtonWidgetAnnotation(parameters); + + case "Ch": + return new ChoiceWidgetAnnotation(parameters); + } + + (0, _util.warn)('Unimplemented widget field type "' + fieldType + '", ' + "falling back to base field type."); + return new WidgetAnnotation(parameters); + + case "Popup": + return new PopupAnnotation(parameters); + + case "FreeText": + return new FreeTextAnnotation(parameters); + + case "Line": + return new LineAnnotation(parameters); + + case "Square": + return new SquareAnnotation(parameters); + + case "Circle": + return new CircleAnnotation(parameters); + + case "PolyLine": + return new PolylineAnnotation(parameters); + + case "Polygon": + return new PolygonAnnotation(parameters); + + case "Caret": + return new CaretAnnotation(parameters); + + case "Ink": + return new InkAnnotation(parameters); + + case "Highlight": + return new HighlightAnnotation(parameters); + + case "Underline": + return new UnderlineAnnotation(parameters); + + case "Squiggly": + return new SquigglyAnnotation(parameters); + + case "StrikeOut": + return new StrikeOutAnnotation(parameters); + + case "Stamp": + return new StampAnnotation(parameters); + + case "FileAttachment": + return new FileAttachmentAnnotation(parameters); + + default: + if (!subtype) { + (0, _util.warn)("Annotation is missing the required /Subtype."); + } else { + (0, _util.warn)('Unimplemented annotation type "' + subtype + '", ' + "falling back to base annotation."); + } + + return new Annotation(parameters); + } + } + +} + +exports.AnnotationFactory = AnnotationFactory; + +function getQuadPoints(dict, rect) { + if (!dict.has("QuadPoints")) { + return null; + } + + const quadPoints = dict.getArray("QuadPoints"); + + if (!Array.isArray(quadPoints) || quadPoints.length % 8 > 0) { + return null; + } + + const quadPointsLists = []; + + for (let i = 0, ii = quadPoints.length / 8; i < ii; i++) { + quadPointsLists.push([]); + + for (let j = i * 8, jj = i * 8 + 8; j < jj; j += 2) { + const x = quadPoints[j]; + const y = quadPoints[j + 1]; + + if (x < rect[0] || x > rect[2] || y < rect[1] || y > rect[3]) { + return null; + } + + quadPointsLists[i].push({ + x, + y + }); + } + } + + return quadPointsLists; +} + +function getTransformMatrix(rect, bbox, matrix) { + const [minX, minY, maxX, maxY] = _util.Util.getAxialAlignedBoundingBox(bbox, matrix); + + if (minX === maxX || minY === maxY) { + return [1, 0, 0, 1, rect[0], rect[1]]; + } + + const xRatio = (rect[2] - rect[0]) / (maxX - minX); + const yRatio = (rect[3] - rect[1]) / (maxY - minY); + return [xRatio, 0, 0, yRatio, rect[0] - minX * xRatio, rect[1] - minY * yRatio]; +} + +class Annotation { + constructor(params) { + const dict = params.dict; + this.setContents(dict.get("Contents")); + this.setModificationDate(dict.get("M")); + this.setFlags(dict.get("F")); + this.setRectangle(dict.getArray("Rect")); + this.setColor(dict.getArray("C")); + this.setBorderStyle(dict); + this.setAppearance(dict); + this.data = { + annotationFlags: this.flags, + borderStyle: this.borderStyle, + color: this.color, + contents: this.contents, + hasAppearance: !!this.appearance, + id: params.id, + modificationDate: this.modificationDate, + rect: this.rectangle, + subtype: params.subtype + }; + } + + _hasFlag(flags, flag) { + return !!(flags & flag); + } + + _isViewable(flags) { + return !this._hasFlag(flags, _util.AnnotationFlag.INVISIBLE) && !this._hasFlag(flags, _util.AnnotationFlag.HIDDEN) && !this._hasFlag(flags, _util.AnnotationFlag.NOVIEW); + } + + _isPrintable(flags) { + return this._hasFlag(flags, _util.AnnotationFlag.PRINT) && !this._hasFlag(flags, _util.AnnotationFlag.INVISIBLE) && !this._hasFlag(flags, _util.AnnotationFlag.HIDDEN); + } + + get viewable() { + if (this.flags === 0) { + return true; + } + + return this._isViewable(this.flags); + } + + get printable() { + if (this.flags === 0) { + return false; + } + + return this._isPrintable(this.flags); + } + + setContents(contents) { + this.contents = (0, _util.stringToPDFString)(contents || ""); + } + + setModificationDate(modificationDate) { + this.modificationDate = (0, _util.isString)(modificationDate) ? modificationDate : null; + } + + setFlags(flags) { + this.flags = Number.isInteger(flags) && flags > 0 ? flags : 0; + } + + hasFlag(flag) { + return this._hasFlag(this.flags, flag); + } + + setRectangle(rectangle) { + if (Array.isArray(rectangle) && rectangle.length === 4) { + this.rectangle = _util.Util.normalizeRect(rectangle); + } else { + this.rectangle = [0, 0, 0, 0]; + } + } + + setColor(color) { + const rgbColor = new Uint8ClampedArray(3); + + if (!Array.isArray(color)) { + this.color = rgbColor; + return; + } + + switch (color.length) { + case 0: + this.color = null; + break; + + case 1: + _colorspace.ColorSpace.singletons.gray.getRgbItem(color, 0, rgbColor, 0); + + this.color = rgbColor; + break; + + case 3: + _colorspace.ColorSpace.singletons.rgb.getRgbItem(color, 0, rgbColor, 0); + + this.color = rgbColor; + break; + + case 4: + _colorspace.ColorSpace.singletons.cmyk.getRgbItem(color, 0, rgbColor, 0); + + this.color = rgbColor; + break; + + default: + this.color = rgbColor; + break; + } + } + + setBorderStyle(borderStyle) { + this.borderStyle = new AnnotationBorderStyle(); + + if (!(0, _primitives.isDict)(borderStyle)) { + return; + } + + if (borderStyle.has("BS")) { + const dict = borderStyle.get("BS"); + const dictType = dict.get("Type"); + + if (!dictType || (0, _primitives.isName)(dictType, "Border")) { + this.borderStyle.setWidth(dict.get("W"), this.rectangle); + this.borderStyle.setStyle(dict.get("S")); + this.borderStyle.setDashArray(dict.getArray("D")); + } + } else if (borderStyle.has("Border")) { + const array = borderStyle.getArray("Border"); + + if (Array.isArray(array) && array.length >= 3) { + this.borderStyle.setHorizontalCornerRadius(array[0]); + this.borderStyle.setVerticalCornerRadius(array[1]); + this.borderStyle.setWidth(array[2], this.rectangle); + + if (array.length === 4) { + this.borderStyle.setDashArray(array[3]); + } + } + } else { + this.borderStyle.setWidth(0); + } + } + + setAppearance(dict) { + this.appearance = null; + const appearanceStates = dict.get("AP"); + + if (!(0, _primitives.isDict)(appearanceStates)) { + return; + } + + const normalAppearanceState = appearanceStates.get("N"); + + if ((0, _primitives.isStream)(normalAppearanceState)) { + this.appearance = normalAppearanceState; + return; + } + + if (!(0, _primitives.isDict)(normalAppearanceState)) { + return; + } + + const as = dict.get("AS"); + + if (!(0, _primitives.isName)(as) || !normalAppearanceState.has(as.name)) { + return; + } + + this.appearance = normalAppearanceState.get(as.name); + } + + loadResources(keys) { + return this.appearance.dict.getAsync("Resources").then(resources => { + if (!resources) { + return undefined; + } + + const objectLoader = new _obj.ObjectLoader(resources, keys, resources.xref); + return objectLoader.load().then(function () { + return resources; + }); + }); + } + + getOperatorList(evaluator, task, renderForms) { + if (!this.appearance) { + return Promise.resolve(new _operator_list.OperatorList()); + } + + const data = this.data; + const appearanceDict = this.appearance.dict; + const resourcesPromise = this.loadResources(["ExtGState", "ColorSpace", "Pattern", "Shading", "XObject", "Font"]); + const bbox = appearanceDict.getArray("BBox") || [0, 0, 1, 1]; + const matrix = appearanceDict.getArray("Matrix") || [1, 0, 0, 1, 0, 0]; + const transform = getTransformMatrix(data.rect, bbox, matrix); + return resourcesPromise.then(resources => { + const opList = new _operator_list.OperatorList(); + opList.addOp(_util.OPS.beginAnnotation, [data.rect, transform, matrix]); + return evaluator.getOperatorList({ + stream: this.appearance, + task, + resources, + operatorList: opList + }).then(() => { + opList.addOp(_util.OPS.endAnnotation, []); + this.appearance.reset(); + return opList; + }); + }); + } + +} + +exports.Annotation = Annotation; + +class AnnotationBorderStyle { + constructor() { + this.width = 1; + this.style = _util.AnnotationBorderStyleType.SOLID; + this.dashArray = [3]; + this.horizontalCornerRadius = 0; + this.verticalCornerRadius = 0; + } + + setWidth(width, rect = [0, 0, 0, 0]) { + if ((0, _primitives.isName)(width)) { + this.width = 0; + return; + } + + if (Number.isInteger(width)) { + if (width > 0) { + const maxWidth = (rect[2] - rect[0]) / 2; + const maxHeight = (rect[3] - rect[1]) / 2; + + if (maxWidth > 0 && maxHeight > 0 && (width > maxWidth || width > maxHeight)) { + (0, _util.warn)(`AnnotationBorderStyle.setWidth - ignoring width: ${width}`); + width = 1; + } + } + + this.width = width; + } + } + + setStyle(style) { + if (!(0, _primitives.isName)(style)) { + return; + } + + switch (style.name) { + case "S": + this.style = _util.AnnotationBorderStyleType.SOLID; + break; + + case "D": + this.style = _util.AnnotationBorderStyleType.DASHED; + break; + + case "B": + this.style = _util.AnnotationBorderStyleType.BEVELED; + break; + + case "I": + this.style = _util.AnnotationBorderStyleType.INSET; + break; + + case "U": + this.style = _util.AnnotationBorderStyleType.UNDERLINE; + break; + + default: + break; + } + } + + setDashArray(dashArray) { + if (Array.isArray(dashArray) && dashArray.length > 0) { + let isValid = true; + let allZeros = true; + + for (const element of dashArray) { + const validNumber = +element >= 0; + + if (!validNumber) { + isValid = false; + break; + } else if (element > 0) { + allZeros = false; + } + } + + if (isValid && !allZeros) { + this.dashArray = dashArray; + } else { + this.width = 0; + } + } else if (dashArray) { + this.width = 0; + } + } + + setHorizontalCornerRadius(radius) { + if (Number.isInteger(radius)) { + this.horizontalCornerRadius = radius; + } + } + + setVerticalCornerRadius(radius) { + if (Number.isInteger(radius)) { + this.verticalCornerRadius = radius; + } + } + +} + +exports.AnnotationBorderStyle = AnnotationBorderStyle; + +class MarkupAnnotation extends Annotation { + constructor(parameters) { + super(parameters); + const dict = parameters.dict; + + if (dict.has("IRT")) { + const rawIRT = dict.getRaw("IRT"); + this.data.inReplyTo = (0, _primitives.isRef)(rawIRT) ? rawIRT.toString() : null; + const rt = dict.get("RT"); + this.data.replyType = (0, _primitives.isName)(rt) ? rt.name : _util.AnnotationReplyType.REPLY; + } + + if (this.data.replyType === _util.AnnotationReplyType.GROUP) { + const parent = dict.get("IRT"); + this.data.title = (0, _util.stringToPDFString)(parent.get("T") || ""); + this.setContents(parent.get("Contents")); + this.data.contents = this.contents; + + if (!parent.has("CreationDate")) { + this.data.creationDate = null; + } else { + this.setCreationDate(parent.get("CreationDate")); + this.data.creationDate = this.creationDate; + } + + if (!parent.has("M")) { + this.data.modificationDate = null; + } else { + this.setModificationDate(parent.get("M")); + this.data.modificationDate = this.modificationDate; + } + + this.data.hasPopup = parent.has("Popup"); + + if (!parent.has("C")) { + this.data.color = null; + } else { + this.setColor(parent.getArray("C")); + this.data.color = this.color; + } + } else { + this.data.title = (0, _util.stringToPDFString)(dict.get("T") || ""); + this.setCreationDate(dict.get("CreationDate")); + this.data.creationDate = this.creationDate; + this.data.hasPopup = dict.has("Popup"); + + if (!dict.has("C")) { + this.data.color = null; + } + } + } + + setCreationDate(creationDate) { + this.creationDate = (0, _util.isString)(creationDate) ? creationDate : null; + } + +} + +exports.MarkupAnnotation = MarkupAnnotation; + +class WidgetAnnotation extends Annotation { + constructor(params) { + super(params); + const dict = params.dict; + const data = this.data; + data.annotationType = _util.AnnotationType.WIDGET; + data.fieldName = this._constructFieldName(dict); + data.fieldValue = (0, _core_utils.getInheritableProperty)({ + dict, + key: "V", + getArray: true + }); + data.alternativeText = (0, _util.stringToPDFString)(dict.get("TU") || ""); + data.defaultAppearance = (0, _core_utils.getInheritableProperty)({ + dict, + key: "DA" + }) || ""; + const fieldType = (0, _core_utils.getInheritableProperty)({ + dict, + key: "FT" + }); + data.fieldType = (0, _primitives.isName)(fieldType) ? fieldType.name : null; + this.fieldResources = (0, _core_utils.getInheritableProperty)({ + dict, + key: "DR" + }) || _primitives.Dict.empty; + data.fieldFlags = (0, _core_utils.getInheritableProperty)({ + dict, + key: "Ff" + }); + + if (!Number.isInteger(data.fieldFlags) || data.fieldFlags < 0) { + data.fieldFlags = 0; + } + + data.readOnly = this.hasFieldFlag(_util.AnnotationFieldFlag.READONLY); + + if (data.fieldType === "Sig") { + data.fieldValue = null; + this.setFlags(_util.AnnotationFlag.HIDDEN); + } + } + + _constructFieldName(dict) { + if (!dict.has("T") && !dict.has("Parent")) { + (0, _util.warn)("Unknown field name, falling back to empty field name."); + return ""; + } + + if (!dict.has("Parent")) { + return (0, _util.stringToPDFString)(dict.get("T")); + } + + const fieldName = []; + + if (dict.has("T")) { + fieldName.unshift((0, _util.stringToPDFString)(dict.get("T"))); + } + + let loopDict = dict; + + while (loopDict.has("Parent")) { + loopDict = loopDict.get("Parent"); + + if (!(0, _primitives.isDict)(loopDict)) { + break; + } + + if (loopDict.has("T")) { + fieldName.unshift((0, _util.stringToPDFString)(loopDict.get("T"))); + } + } + + return fieldName.join("."); + } + + hasFieldFlag(flag) { + return !!(this.data.fieldFlags & flag); + } + + getOperatorList(evaluator, task, renderForms) { + if (renderForms) { + return Promise.resolve(new _operator_list.OperatorList()); + } + + return super.getOperatorList(evaluator, task, renderForms); + } + +} + +class TextWidgetAnnotation extends WidgetAnnotation { + constructor(params) { + super(params); + const dict = params.dict; + this.data.fieldValue = (0, _util.stringToPDFString)(this.data.fieldValue || ""); + let alignment = (0, _core_utils.getInheritableProperty)({ + dict, + key: "Q" + }); + + if (!Number.isInteger(alignment) || alignment < 0 || alignment > 2) { + alignment = null; + } + + this.data.textAlignment = alignment; + let maximumLength = (0, _core_utils.getInheritableProperty)({ + dict, + key: "MaxLen" + }); + + if (!Number.isInteger(maximumLength) || maximumLength < 0) { + maximumLength = null; + } + + this.data.maxLen = maximumLength; + this.data.multiLine = this.hasFieldFlag(_util.AnnotationFieldFlag.MULTILINE); + this.data.comb = this.hasFieldFlag(_util.AnnotationFieldFlag.COMB) && !this.hasFieldFlag(_util.AnnotationFieldFlag.MULTILINE) && !this.hasFieldFlag(_util.AnnotationFieldFlag.PASSWORD) && !this.hasFieldFlag(_util.AnnotationFieldFlag.FILESELECT) && this.data.maxLen !== null; + } + + getOperatorList(evaluator, task, renderForms) { + if (renderForms || this.appearance) { + return super.getOperatorList(evaluator, task, renderForms); + } + + const operatorList = new _operator_list.OperatorList(); + + if (!this.data.defaultAppearance) { + return Promise.resolve(operatorList); + } + + const stream = new _stream.Stream((0, _util.stringToBytes)(this.data.defaultAppearance)); + return evaluator.getOperatorList({ + stream, + task, + resources: this.fieldResources, + operatorList + }).then(function () { + return operatorList; + }); + } + +} + +class ButtonWidgetAnnotation extends WidgetAnnotation { + constructor(params) { + super(params); + this.data.checkBox = !this.hasFieldFlag(_util.AnnotationFieldFlag.RADIO) && !this.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); + this.data.radioButton = this.hasFieldFlag(_util.AnnotationFieldFlag.RADIO) && !this.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); + this.data.pushButton = this.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); + + if (this.data.checkBox) { + this._processCheckBox(params); + } else if (this.data.radioButton) { + this._processRadioButton(params); + } else if (this.data.pushButton) { + this._processPushButton(params); + } else { + (0, _util.warn)("Invalid field flags for button widget annotation"); + } + } + + _processCheckBox(params) { + if ((0, _primitives.isName)(this.data.fieldValue)) { + this.data.fieldValue = this.data.fieldValue.name; + } + + const customAppearance = params.dict.get("AP"); + + if (!(0, _primitives.isDict)(customAppearance)) { + return; + } + + const exportValueOptionsDict = customAppearance.get("D"); + + if (!(0, _primitives.isDict)(exportValueOptionsDict)) { + return; + } + + const exportValues = exportValueOptionsDict.getKeys(); + const hasCorrectOptionCount = exportValues.length === 2; + + if (!hasCorrectOptionCount) { + return; + } + + this.data.exportValue = exportValues[0] === "Off" ? exportValues[1] : exportValues[0]; + } + + _processRadioButton(params) { + this.data.fieldValue = this.data.buttonValue = null; + const fieldParent = params.dict.get("Parent"); + + if ((0, _primitives.isDict)(fieldParent) && fieldParent.has("V")) { + const fieldParentValue = fieldParent.get("V"); + + if ((0, _primitives.isName)(fieldParentValue)) { + this.data.fieldValue = fieldParentValue.name; + } + } + + const appearanceStates = params.dict.get("AP"); + + if (!(0, _primitives.isDict)(appearanceStates)) { + return; + } + + const normalAppearanceState = appearanceStates.get("N"); + + if (!(0, _primitives.isDict)(normalAppearanceState)) { + return; + } + + for (const key of normalAppearanceState.getKeys()) { + if (key !== "Off") { + this.data.buttonValue = key; + break; + } + } + } + + _processPushButton(params) { + if (!params.dict.has("A")) { + (0, _util.warn)("Push buttons without action dictionaries are not supported"); + return; + } + + _obj.Catalog.parseDestDictionary({ + destDict: params.dict, + resultObj: this.data, + docBaseUrl: params.pdfManager.docBaseUrl + }); + } + +} + +class ChoiceWidgetAnnotation extends WidgetAnnotation { + constructor(params) { + super(params); + this.data.options = []; + const options = (0, _core_utils.getInheritableProperty)({ + dict: params.dict, + key: "Opt" + }); + + if (Array.isArray(options)) { + const xref = params.xref; + + for (let i = 0, ii = options.length; i < ii; i++) { + const option = xref.fetchIfRef(options[i]); + const isOptionArray = Array.isArray(option); + this.data.options[i] = { + exportValue: isOptionArray ? xref.fetchIfRef(option[0]) : option, + displayValue: (0, _util.stringToPDFString)(isOptionArray ? xref.fetchIfRef(option[1]) : option) + }; + } + } + + if (!Array.isArray(this.data.fieldValue)) { + this.data.fieldValue = [this.data.fieldValue]; + } + + this.data.combo = this.hasFieldFlag(_util.AnnotationFieldFlag.COMBO); + this.data.multiSelect = this.hasFieldFlag(_util.AnnotationFieldFlag.MULTISELECT); + } + +} + +class TextAnnotation extends MarkupAnnotation { + constructor(parameters) { + const DEFAULT_ICON_SIZE = 22; + super(parameters); + const dict = parameters.dict; + this.data.annotationType = _util.AnnotationType.TEXT; + + if (this.data.hasAppearance) { + this.data.name = "NoIcon"; + } else { + this.data.rect[1] = this.data.rect[3] - DEFAULT_ICON_SIZE; + this.data.rect[2] = this.data.rect[0] + DEFAULT_ICON_SIZE; + this.data.name = dict.has("Name") ? dict.get("Name").name : "Note"; + } + + if (dict.has("State")) { + this.data.state = dict.get("State") || null; + this.data.stateModel = dict.get("StateModel") || null; + } else { + this.data.state = null; + this.data.stateModel = null; + } + } + +} + +class LinkAnnotation extends Annotation { + constructor(params) { + super(params); + this.data.annotationType = _util.AnnotationType.LINK; + const quadPoints = getQuadPoints(params.dict, this.rectangle); + + if (quadPoints) { + this.data.quadPoints = quadPoints; + } + + _obj.Catalog.parseDestDictionary({ + destDict: params.dict, + resultObj: this.data, + docBaseUrl: params.pdfManager.docBaseUrl + }); + } + +} + +class PopupAnnotation extends Annotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.POPUP; + let parentItem = parameters.dict.get("Parent"); + + if (!parentItem) { + (0, _util.warn)("Popup annotation has a missing or invalid parent annotation."); + return; + } + + const parentSubtype = parentItem.get("Subtype"); + this.data.parentType = (0, _primitives.isName)(parentSubtype) ? parentSubtype.name : null; + const rawParent = parameters.dict.getRaw("Parent"); + this.data.parentId = (0, _primitives.isRef)(rawParent) ? rawParent.toString() : null; + const rt = parentItem.get("RT"); + + if ((0, _primitives.isName)(rt, _util.AnnotationReplyType.GROUP)) { + parentItem = parentItem.get("IRT"); + } + + if (!parentItem.has("M")) { + this.data.modificationDate = null; + } else { + this.setModificationDate(parentItem.get("M")); + this.data.modificationDate = this.modificationDate; + } + + if (!parentItem.has("C")) { + this.data.color = null; + } else { + this.setColor(parentItem.getArray("C")); + this.data.color = this.color; + } + + if (!this.viewable) { + const parentFlags = parentItem.get("F"); + + if (this._isViewable(parentFlags)) { + this.setFlags(parentFlags); + } + } + + this.data.title = (0, _util.stringToPDFString)(parentItem.get("T") || ""); + this.data.contents = (0, _util.stringToPDFString)(parentItem.get("Contents") || ""); + } + +} + +class FreeTextAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.FREETEXT; + } + +} + +class LineAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.LINE; + this.data.lineCoordinates = _util.Util.normalizeRect(parameters.dict.getArray("L")); + } + +} + +class SquareAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.SQUARE; + } + +} + +class CircleAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.CIRCLE; + } + +} + +class PolylineAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.POLYLINE; + const rawVertices = parameters.dict.getArray("Vertices"); + this.data.vertices = []; + + for (let i = 0, ii = rawVertices.length; i < ii; i += 2) { + this.data.vertices.push({ + x: rawVertices[i], + y: rawVertices[i + 1] + }); + } + } + +} + +class PolygonAnnotation extends PolylineAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.POLYGON; + } + +} + +class CaretAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.CARET; + } + +} + +class InkAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.INK; + const xref = parameters.xref; + const originalInkLists = parameters.dict.getArray("InkList"); + this.data.inkLists = []; + + for (let i = 0, ii = originalInkLists.length; i < ii; ++i) { + this.data.inkLists.push([]); + + for (let j = 0, jj = originalInkLists[i].length; j < jj; j += 2) { + this.data.inkLists[i].push({ + x: xref.fetchIfRef(originalInkLists[i][j]), + y: xref.fetchIfRef(originalInkLists[i][j + 1]) + }); + } + } + } + +} + +class HighlightAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.HIGHLIGHT; + const quadPoints = getQuadPoints(parameters.dict, this.rectangle); + + if (quadPoints) { + this.data.quadPoints = quadPoints; + } + } + +} + +class UnderlineAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.UNDERLINE; + const quadPoints = getQuadPoints(parameters.dict, this.rectangle); + + if (quadPoints) { + this.data.quadPoints = quadPoints; + } + } + +} + +class SquigglyAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.SQUIGGLY; + const quadPoints = getQuadPoints(parameters.dict, this.rectangle); + + if (quadPoints) { + this.data.quadPoints = quadPoints; + } + } + +} + +class StrikeOutAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.STRIKEOUT; + const quadPoints = getQuadPoints(parameters.dict, this.rectangle); + + if (quadPoints) { + this.data.quadPoints = quadPoints; + } + } + +} + +class StampAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + this.data.annotationType = _util.AnnotationType.STAMP; + } + +} + +class FileAttachmentAnnotation extends MarkupAnnotation { + constructor(parameters) { + super(parameters); + const file = new _obj.FileSpec(parameters.dict.get("FS"), parameters.xref); + this.data.annotationType = _util.AnnotationType.FILEATTACHMENT; + this.data.file = file.serializable; + } + +} + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.OperatorList = void 0; + +var _util = __w_pdfjs_require__(2); + +var QueueOptimizer = function QueueOptimizerClosure() { + function addState(parentState, pattern, checkFn, iterateFn, processFn) { + var state = parentState; + + for (var i = 0, ii = pattern.length - 1; i < ii; i++) { + var item = pattern[i]; + state = state[item] || (state[item] = []); + } + + state[pattern[pattern.length - 1]] = { + checkFn, + iterateFn, + processFn + }; + } + + function handlePaintSolidColorImageMask(iFirstSave, count, fnArray, argsArray) { + var iFirstPIMXO = iFirstSave + 2; + + for (var i = 0; i < count; i++) { + var arg = argsArray[iFirstPIMXO + 4 * i]; + var imageMask = arg.length === 1 && arg[0]; + + if (imageMask && imageMask.width === 1 && imageMask.height === 1 && (!imageMask.data.length || imageMask.data.length === 1 && imageMask.data[0] === 0)) { + fnArray[iFirstPIMXO + 4 * i] = _util.OPS.paintSolidColorImageMask; + continue; + } + + break; + } + + return count - i; + } + + var InitialState = []; + addState(InitialState, [_util.OPS.save, _util.OPS.transform, _util.OPS.paintInlineImageXObject, _util.OPS.restore], null, function iterateInlineImageGroup(context, i) { + var fnArray = context.fnArray; + var iFirstSave = context.iCurr - 3; + var pos = (i - iFirstSave) % 4; + + switch (pos) { + case 0: + return fnArray[i] === _util.OPS.save; + + case 1: + return fnArray[i] === _util.OPS.transform; + + case 2: + return fnArray[i] === _util.OPS.paintInlineImageXObject; + + case 3: + return fnArray[i] === _util.OPS.restore; + } + + throw new Error(`iterateInlineImageGroup - invalid pos: ${pos}`); + }, function foundInlineImageGroup(context, i) { + var MIN_IMAGES_IN_INLINE_IMAGES_BLOCK = 10; + var MAX_IMAGES_IN_INLINE_IMAGES_BLOCK = 200; + var MAX_WIDTH = 1000; + var IMAGE_PADDING = 1; + var fnArray = context.fnArray, + argsArray = context.argsArray; + var curr = context.iCurr; + var iFirstSave = curr - 3; + var iFirstTransform = curr - 2; + var iFirstPIIXO = curr - 1; + var count = Math.min(Math.floor((i - iFirstSave) / 4), MAX_IMAGES_IN_INLINE_IMAGES_BLOCK); + + if (count < MIN_IMAGES_IN_INLINE_IMAGES_BLOCK) { + return i - (i - iFirstSave) % 4; + } + + var maxX = 0; + var map = [], + maxLineHeight = 0; + var currentX = IMAGE_PADDING, + currentY = IMAGE_PADDING; + var q; + + for (q = 0; q < count; q++) { + var transform = argsArray[iFirstTransform + (q << 2)]; + var img = argsArray[iFirstPIIXO + (q << 2)][0]; + + if (currentX + img.width > MAX_WIDTH) { + maxX = Math.max(maxX, currentX); + currentY += maxLineHeight + 2 * IMAGE_PADDING; + currentX = 0; + maxLineHeight = 0; + } + + map.push({ + transform, + x: currentX, + y: currentY, + w: img.width, + h: img.height + }); + currentX += img.width + 2 * IMAGE_PADDING; + maxLineHeight = Math.max(maxLineHeight, img.height); + } + + var imgWidth = Math.max(maxX, currentX) + IMAGE_PADDING; + var imgHeight = currentY + maxLineHeight + IMAGE_PADDING; + var imgData = new Uint8ClampedArray(imgWidth * imgHeight * 4); + var imgRowSize = imgWidth << 2; + + for (q = 0; q < count; q++) { + var data = argsArray[iFirstPIIXO + (q << 2)][0].data; + var rowSize = map[q].w << 2; + var dataOffset = 0; + var offset = map[q].x + map[q].y * imgWidth << 2; + imgData.set(data.subarray(0, rowSize), offset - imgRowSize); + + for (var k = 0, kk = map[q].h; k < kk; k++) { + imgData.set(data.subarray(dataOffset, dataOffset + rowSize), offset); + dataOffset += rowSize; + offset += imgRowSize; + } + + imgData.set(data.subarray(dataOffset - rowSize, dataOffset), offset); + + while (offset >= 0) { + data[offset - 4] = data[offset]; + data[offset - 3] = data[offset + 1]; + data[offset - 2] = data[offset + 2]; + data[offset - 1] = data[offset + 3]; + data[offset + rowSize] = data[offset + rowSize - 4]; + data[offset + rowSize + 1] = data[offset + rowSize - 3]; + data[offset + rowSize + 2] = data[offset + rowSize - 2]; + data[offset + rowSize + 3] = data[offset + rowSize - 1]; + offset -= imgRowSize; + } + } + + fnArray.splice(iFirstSave, count * 4, _util.OPS.paintInlineImageXObjectGroup); + argsArray.splice(iFirstSave, count * 4, [{ + width: imgWidth, + height: imgHeight, + kind: _util.ImageKind.RGBA_32BPP, + data: imgData + }, map]); + return iFirstSave + 1; + }); + addState(InitialState, [_util.OPS.save, _util.OPS.transform, _util.OPS.paintImageMaskXObject, _util.OPS.restore], null, function iterateImageMaskGroup(context, i) { + var fnArray = context.fnArray; + var iFirstSave = context.iCurr - 3; + var pos = (i - iFirstSave) % 4; + + switch (pos) { + case 0: + return fnArray[i] === _util.OPS.save; + + case 1: + return fnArray[i] === _util.OPS.transform; + + case 2: + return fnArray[i] === _util.OPS.paintImageMaskXObject; + + case 3: + return fnArray[i] === _util.OPS.restore; + } + + throw new Error(`iterateImageMaskGroup - invalid pos: ${pos}`); + }, function foundImageMaskGroup(context, i) { + var MIN_IMAGES_IN_MASKS_BLOCK = 10; + var MAX_IMAGES_IN_MASKS_BLOCK = 100; + var MAX_SAME_IMAGES_IN_MASKS_BLOCK = 1000; + var fnArray = context.fnArray, + argsArray = context.argsArray; + var curr = context.iCurr; + var iFirstSave = curr - 3; + var iFirstTransform = curr - 2; + var iFirstPIMXO = curr - 1; + var count = Math.floor((i - iFirstSave) / 4); + count = handlePaintSolidColorImageMask(iFirstSave, count, fnArray, argsArray); + + if (count < MIN_IMAGES_IN_MASKS_BLOCK) { + return i - (i - iFirstSave) % 4; + } + + var q; + var isSameImage = false; + var iTransform, transformArgs; + var firstPIMXOArg0 = argsArray[iFirstPIMXO][0]; + + if (argsArray[iFirstTransform][1] === 0 && argsArray[iFirstTransform][2] === 0) { + isSameImage = true; + var firstTransformArg0 = argsArray[iFirstTransform][0]; + var firstTransformArg3 = argsArray[iFirstTransform][3]; + iTransform = iFirstTransform + 4; + var iPIMXO = iFirstPIMXO + 4; + + for (q = 1; q < count; q++, iTransform += 4, iPIMXO += 4) { + transformArgs = argsArray[iTransform]; + + if (argsArray[iPIMXO][0] !== firstPIMXOArg0 || transformArgs[0] !== firstTransformArg0 || transformArgs[1] !== 0 || transformArgs[2] !== 0 || transformArgs[3] !== firstTransformArg3) { + if (q < MIN_IMAGES_IN_MASKS_BLOCK) { + isSameImage = false; + } else { + count = q; + } + + break; + } + } + } + + if (isSameImage) { + count = Math.min(count, MAX_SAME_IMAGES_IN_MASKS_BLOCK); + var positions = new Float32Array(count * 2); + iTransform = iFirstTransform; + + for (q = 0; q < count; q++, iTransform += 4) { + transformArgs = argsArray[iTransform]; + positions[q << 1] = transformArgs[4]; + positions[(q << 1) + 1] = transformArgs[5]; + } + + fnArray.splice(iFirstSave, count * 4, _util.OPS.paintImageMaskXObjectRepeat); + argsArray.splice(iFirstSave, count * 4, [firstPIMXOArg0, firstTransformArg0, firstTransformArg3, positions]); + } else { + count = Math.min(count, MAX_IMAGES_IN_MASKS_BLOCK); + var images = []; + + for (q = 0; q < count; q++) { + transformArgs = argsArray[iFirstTransform + (q << 2)]; + var maskParams = argsArray[iFirstPIMXO + (q << 2)][0]; + images.push({ + data: maskParams.data, + width: maskParams.width, + height: maskParams.height, + transform: transformArgs + }); + } + + fnArray.splice(iFirstSave, count * 4, _util.OPS.paintImageMaskXObjectGroup); + argsArray.splice(iFirstSave, count * 4, [images]); + } + + return iFirstSave + 1; + }); + addState(InitialState, [_util.OPS.save, _util.OPS.transform, _util.OPS.paintImageXObject, _util.OPS.restore], function (context) { + var argsArray = context.argsArray; + var iFirstTransform = context.iCurr - 2; + return argsArray[iFirstTransform][1] === 0 && argsArray[iFirstTransform][2] === 0; + }, function iterateImageGroup(context, i) { + var fnArray = context.fnArray, + argsArray = context.argsArray; + var iFirstSave = context.iCurr - 3; + var pos = (i - iFirstSave) % 4; + + switch (pos) { + case 0: + return fnArray[i] === _util.OPS.save; + + case 1: + if (fnArray[i] !== _util.OPS.transform) { + return false; + } + + var iFirstTransform = context.iCurr - 2; + var firstTransformArg0 = argsArray[iFirstTransform][0]; + var firstTransformArg3 = argsArray[iFirstTransform][3]; + + if (argsArray[i][0] !== firstTransformArg0 || argsArray[i][1] !== 0 || argsArray[i][2] !== 0 || argsArray[i][3] !== firstTransformArg3) { + return false; + } + + return true; + + case 2: + if (fnArray[i] !== _util.OPS.paintImageXObject) { + return false; + } + + var iFirstPIXO = context.iCurr - 1; + var firstPIXOArg0 = argsArray[iFirstPIXO][0]; + + if (argsArray[i][0] !== firstPIXOArg0) { + return false; + } + + return true; + + case 3: + return fnArray[i] === _util.OPS.restore; + } + + throw new Error(`iterateImageGroup - invalid pos: ${pos}`); + }, function (context, i) { + var MIN_IMAGES_IN_BLOCK = 3; + var MAX_IMAGES_IN_BLOCK = 1000; + var fnArray = context.fnArray, + argsArray = context.argsArray; + var curr = context.iCurr; + var iFirstSave = curr - 3; + var iFirstTransform = curr - 2; + var iFirstPIXO = curr - 1; + var firstPIXOArg0 = argsArray[iFirstPIXO][0]; + var firstTransformArg0 = argsArray[iFirstTransform][0]; + var firstTransformArg3 = argsArray[iFirstTransform][3]; + var count = Math.min(Math.floor((i - iFirstSave) / 4), MAX_IMAGES_IN_BLOCK); + + if (count < MIN_IMAGES_IN_BLOCK) { + return i - (i - iFirstSave) % 4; + } + + var positions = new Float32Array(count * 2); + var iTransform = iFirstTransform; + + for (var q = 0; q < count; q++, iTransform += 4) { + var transformArgs = argsArray[iTransform]; + positions[q << 1] = transformArgs[4]; + positions[(q << 1) + 1] = transformArgs[5]; + } + + var args = [firstPIXOArg0, firstTransformArg0, firstTransformArg3, positions]; + fnArray.splice(iFirstSave, count * 4, _util.OPS.paintImageXObjectRepeat); + argsArray.splice(iFirstSave, count * 4, args); + return iFirstSave + 1; + }); + addState(InitialState, [_util.OPS.beginText, _util.OPS.setFont, _util.OPS.setTextMatrix, _util.OPS.showText, _util.OPS.endText], null, function iterateShowTextGroup(context, i) { + var fnArray = context.fnArray, + argsArray = context.argsArray; + var iFirstSave = context.iCurr - 4; + var pos = (i - iFirstSave) % 5; + + switch (pos) { + case 0: + return fnArray[i] === _util.OPS.beginText; + + case 1: + return fnArray[i] === _util.OPS.setFont; + + case 2: + return fnArray[i] === _util.OPS.setTextMatrix; + + case 3: + if (fnArray[i] !== _util.OPS.showText) { + return false; + } + + var iFirstSetFont = context.iCurr - 3; + var firstSetFontArg0 = argsArray[iFirstSetFont][0]; + var firstSetFontArg1 = argsArray[iFirstSetFont][1]; + + if (argsArray[i][0] !== firstSetFontArg0 || argsArray[i][1] !== firstSetFontArg1) { + return false; + } + + return true; + + case 4: + return fnArray[i] === _util.OPS.endText; + } + + throw new Error(`iterateShowTextGroup - invalid pos: ${pos}`); + }, function (context, i) { + var MIN_CHARS_IN_BLOCK = 3; + var MAX_CHARS_IN_BLOCK = 1000; + var fnArray = context.fnArray, + argsArray = context.argsArray; + var curr = context.iCurr; + var iFirstBeginText = curr - 4; + var iFirstSetFont = curr - 3; + var iFirstSetTextMatrix = curr - 2; + var iFirstShowText = curr - 1; + var iFirstEndText = curr; + var firstSetFontArg0 = argsArray[iFirstSetFont][0]; + var firstSetFontArg1 = argsArray[iFirstSetFont][1]; + var count = Math.min(Math.floor((i - iFirstBeginText) / 5), MAX_CHARS_IN_BLOCK); + + if (count < MIN_CHARS_IN_BLOCK) { + return i - (i - iFirstBeginText) % 5; + } + + var iFirst = iFirstBeginText; + + if (iFirstBeginText >= 4 && fnArray[iFirstBeginText - 4] === fnArray[iFirstSetFont] && fnArray[iFirstBeginText - 3] === fnArray[iFirstSetTextMatrix] && fnArray[iFirstBeginText - 2] === fnArray[iFirstShowText] && fnArray[iFirstBeginText - 1] === fnArray[iFirstEndText] && argsArray[iFirstBeginText - 4][0] === firstSetFontArg0 && argsArray[iFirstBeginText - 4][1] === firstSetFontArg1) { + count++; + iFirst -= 5; + } + + var iEndText = iFirst + 4; + + for (var q = 1; q < count; q++) { + fnArray.splice(iEndText, 3); + argsArray.splice(iEndText, 3); + iEndText += 2; + } + + return iEndText + 1; + }); + + function QueueOptimizer(queue) { + this.queue = queue; + this.state = null; + this.context = { + iCurr: 0, + fnArray: queue.fnArray, + argsArray: queue.argsArray + }; + this.match = null; + this.lastProcessed = 0; + } + + QueueOptimizer.prototype = { + _optimize() { + const fnArray = this.queue.fnArray; + let i = this.lastProcessed, + ii = fnArray.length; + let state = this.state; + let match = this.match; + + if (!state && !match && i + 1 === ii && !InitialState[fnArray[i]]) { + this.lastProcessed = ii; + return; + } + + const context = this.context; + + while (i < ii) { + if (match) { + const iterate = (0, match.iterateFn)(context, i); + + if (iterate) { + i++; + continue; + } + + i = (0, match.processFn)(context, i + 1); + ii = fnArray.length; + match = null; + state = null; + + if (i >= ii) { + break; + } + } + + state = (state || InitialState)[fnArray[i]]; + + if (!state || Array.isArray(state)) { + i++; + continue; + } + + context.iCurr = i; + i++; + + if (state.checkFn && !(0, state.checkFn)(context)) { + state = null; + continue; + } + + match = state; + state = null; + } + + this.state = state; + this.match = match; + this.lastProcessed = i; + }, + + push(fn, args) { + this.queue.fnArray.push(fn); + this.queue.argsArray.push(args); + + this._optimize(); + }, + + flush() { + while (this.match) { + const length = this.queue.fnArray.length; + this.lastProcessed = (0, this.match.processFn)(this.context, length); + this.match = null; + this.state = null; + + this._optimize(); + } + }, + + reset() { + this.state = null; + this.match = null; + this.lastProcessed = 0; + } + + }; + return QueueOptimizer; +}(); + +var NullOptimizer = function NullOptimizerClosure() { + function NullOptimizer(queue) { + this.queue = queue; + } + + NullOptimizer.prototype = { + push(fn, args) { + this.queue.fnArray.push(fn); + this.queue.argsArray.push(args); + }, + + flush() {}, + + reset() {} + + }; + return NullOptimizer; +}(); + +var OperatorList = function OperatorListClosure() { + var CHUNK_SIZE = 1000; + var CHUNK_SIZE_ABOUT = CHUNK_SIZE - 5; + + function OperatorList(intent, streamSink, pageIndex) { + this._streamSink = streamSink; + this.fnArray = []; + this.argsArray = []; + + if (streamSink && intent !== "oplist") { + this.optimizer = new QueueOptimizer(this); + } else { + this.optimizer = new NullOptimizer(this); + } + + this.dependencies = Object.create(null); + this._totalLength = 0; + this.pageIndex = pageIndex; + this.intent = intent; + this.weight = 0; + this._resolved = streamSink ? null : Promise.resolve(); + } + + OperatorList.prototype = { + get length() { + return this.argsArray.length; + }, + + get ready() { + return this._resolved || this._streamSink.ready; + }, + + get totalLength() { + return this._totalLength + this.length; + }, + + addOp(fn, args) { + this.optimizer.push(fn, args); + this.weight++; + + if (this._streamSink) { + if (this.weight >= CHUNK_SIZE) { + this.flush(); + } else if (this.weight >= CHUNK_SIZE_ABOUT && (fn === _util.OPS.restore || fn === _util.OPS.endText)) { + this.flush(); + } + } + }, + + addDependency(dependency) { + if (dependency in this.dependencies) { + return; + } + + this.dependencies[dependency] = true; + this.addOp(_util.OPS.dependency, [dependency]); + }, + + addDependencies(dependencies) { + for (var key in dependencies) { + this.addDependency(key); + } + }, + + addOpList(opList) { + if (!(opList instanceof OperatorList)) { + (0, _util.warn)('addOpList - ignoring invalid "opList" parameter.'); + return; + } + + Object.assign(this.dependencies, opList.dependencies); + + for (var i = 0, ii = opList.length; i < ii; i++) { + this.addOp(opList.fnArray[i], opList.argsArray[i]); + } + }, + + getIR() { + return { + fnArray: this.fnArray, + argsArray: this.argsArray, + length: this.length + }; + }, + + get _transfers() { + const transfers = []; + const { + fnArray, + argsArray, + length + } = this; + + for (let i = 0; i < length; i++) { + switch (fnArray[i]) { + case _util.OPS.paintInlineImageXObject: + case _util.OPS.paintInlineImageXObjectGroup: + case _util.OPS.paintImageMaskXObject: + const arg = argsArray[i][0]; + ; + + if (!arg.cached) { + transfers.push(arg.data.buffer); + } + + break; + } + } + + return transfers; + }, + + flush(lastChunk = false) { + this.optimizer.flush(); + const length = this.length; + this._totalLength += length; + + this._streamSink.enqueue({ + fnArray: this.fnArray, + argsArray: this.argsArray, + lastChunk, + length + }, 1, this._transfers); + + this.dependencies = Object.create(null); + this.fnArray.length = 0; + this.argsArray.length = 0; + this.weight = 0; + this.optimizer.reset(); + } + + }; + return OperatorList; +}(); + +exports.OperatorList = OperatorList; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PartialEvaluator = void 0; + +var _util = __w_pdfjs_require__(2); + +var _cmap = __w_pdfjs_require__(28); + +var _primitives = __w_pdfjs_require__(5); + +var _fonts = __w_pdfjs_require__(29); + +var _encodings = __w_pdfjs_require__(32); + +var _core_utils = __w_pdfjs_require__(8); + +var _unicode = __w_pdfjs_require__(35); + +var _standard_fonts = __w_pdfjs_require__(34); + +var _pattern = __w_pdfjs_require__(38); + +var _parser = __w_pdfjs_require__(11); + +var _bidi = __w_pdfjs_require__(39); + +var _colorspace = __w_pdfjs_require__(23); + +var _stream = __w_pdfjs_require__(12); + +var _glyphlist = __w_pdfjs_require__(33); + +var _metrics = __w_pdfjs_require__(40); + +var _function = __w_pdfjs_require__(41); + +var _image_utils = __w_pdfjs_require__(24); + +var _murmurhash = __w_pdfjs_require__(43); + +var _operator_list = __w_pdfjs_require__(26); + +var _image = __w_pdfjs_require__(44); + +var PartialEvaluator = function PartialEvaluatorClosure() { + const DefaultPartialEvaluatorOptions = { + maxImageSize: -1, + disableFontFace: false, + ignoreErrors: false, + isEvalSupported: true, + fontExtraProperties: false + }; + + function PartialEvaluator({ + xref, + handler, + pageIndex, + idFactory, + fontCache, + builtInCMapCache, + globalImageCache, + options = null, + pdfFunctionFactory + }) { + this.xref = xref; + this.handler = handler; + this.pageIndex = pageIndex; + this.idFactory = idFactory; + this.fontCache = fontCache; + this.builtInCMapCache = builtInCMapCache; + this.globalImageCache = globalImageCache; + this.options = options || DefaultPartialEvaluatorOptions; + this.pdfFunctionFactory = pdfFunctionFactory; + this.parsingType3Font = false; + + this.fetchBuiltInCMap = async name => { + if (this.builtInCMapCache.has(name)) { + return this.builtInCMapCache.get(name); + } + + const readableStream = this.handler.sendWithStream("FetchBuiltInCMap", { + name + }); + const reader = readableStream.getReader(); + const data = await new Promise(function (resolve, reject) { + function pump() { + reader.read().then(function ({ + value, + done + }) { + if (done) { + return; + } + + resolve(value); + pump(); + }, reject); + } + + pump(); + }); + + if (data.compressionType !== _util.CMapCompressionType.NONE) { + this.builtInCMapCache.set(name, data); + } + + return data; + }; + } + + var TIME_SLOT_DURATION_MS = 20; + var CHECK_TIME_EVERY = 100; + + function TimeSlotManager() { + this.reset(); + } + + TimeSlotManager.prototype = { + check: function TimeSlotManager_check() { + if (++this.checked < CHECK_TIME_EVERY) { + return false; + } + + this.checked = 0; + return this.endTime <= Date.now(); + }, + reset: function TimeSlotManager_reset() { + this.endTime = Date.now() + TIME_SLOT_DURATION_MS; + this.checked = 0; + } + }; + + function normalizeBlendMode(value, parsingArray = false) { + if (Array.isArray(value)) { + for (let i = 0, ii = value.length; i < ii; i++) { + const maybeBM = normalizeBlendMode(value[i], true); + + if (maybeBM) { + return maybeBM; + } + } + + (0, _util.warn)(`Unsupported blend mode Array: ${value}`); + return "source-over"; + } + + if (!(0, _primitives.isName)(value)) { + if (parsingArray) { + return null; + } + + return "source-over"; + } + + switch (value.name) { + case "Normal": + case "Compatible": + return "source-over"; + + case "Multiply": + return "multiply"; + + case "Screen": + return "screen"; + + case "Overlay": + return "overlay"; + + case "Darken": + return "darken"; + + case "Lighten": + return "lighten"; + + case "ColorDodge": + return "color-dodge"; + + case "ColorBurn": + return "color-burn"; + + case "HardLight": + return "hard-light"; + + case "SoftLight": + return "soft-light"; + + case "Difference": + return "difference"; + + case "Exclusion": + return "exclusion"; + + case "Hue": + return "hue"; + + case "Saturation": + return "saturation"; + + case "Color": + return "color"; + + case "Luminosity": + return "luminosity"; + } + + if (parsingArray) { + return null; + } + + (0, _util.warn)(`Unsupported blend mode: ${value.name}`); + return "source-over"; + } + + var deferred = Promise.resolve(); + var TILING_PATTERN = 1, + SHADING_PATTERN = 2; + PartialEvaluator.prototype = { + clone(newOptions = DefaultPartialEvaluatorOptions) { + var newEvaluator = Object.create(this); + newEvaluator.options = newOptions; + return newEvaluator; + }, + + hasBlendModes: function PartialEvaluator_hasBlendModes(resources) { + if (!(resources instanceof _primitives.Dict)) { + return false; + } + + var processed = Object.create(null); + + if (resources.objId) { + processed[resources.objId] = true; + } + + var nodes = [resources], + xref = this.xref; + + while (nodes.length) { + var node = nodes.shift(); + var graphicStates = node.get("ExtGState"); + + if (graphicStates instanceof _primitives.Dict) { + var graphicStatesKeys = graphicStates.getKeys(); + + for (let i = 0, ii = graphicStatesKeys.length; i < ii; i++) { + const key = graphicStatesKeys[i]; + let graphicState = graphicStates.getRaw(key); + + if (graphicState instanceof _primitives.Ref) { + if (processed[graphicState.toString()]) { + continue; + } + + try { + graphicState = xref.fetch(graphicState); + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + if (this.options.ignoreErrors) { + if (graphicState instanceof _primitives.Ref) { + processed[graphicState.toString()] = true; + } + + this.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorExtGState + }); + (0, _util.warn)(`hasBlendModes - ignoring ExtGState: "${ex}".`); + continue; + } + + throw ex; + } + } + + if (!(graphicState instanceof _primitives.Dict)) { + continue; + } + + if (graphicState.objId) { + processed[graphicState.objId] = true; + } + + const bm = graphicState.get("BM"); + + if (bm instanceof _primitives.Name) { + if (bm.name !== "Normal") { + return true; + } + + continue; + } + + if (bm !== undefined && Array.isArray(bm)) { + for (let j = 0, jj = bm.length; j < jj; j++) { + if (bm[j] instanceof _primitives.Name && bm[j].name !== "Normal") { + return true; + } + } + } + } + } + + var xObjects = node.get("XObject"); + + if (!(xObjects instanceof _primitives.Dict)) { + continue; + } + + var xObjectsKeys = xObjects.getKeys(); + + for (let i = 0, ii = xObjectsKeys.length; i < ii; i++) { + const key = xObjectsKeys[i]; + var xObject = xObjects.getRaw(key); + + if (xObject instanceof _primitives.Ref) { + if (processed[xObject.toString()]) { + continue; + } + + try { + xObject = xref.fetch(xObject); + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + if (this.options.ignoreErrors) { + if (xObject instanceof _primitives.Ref) { + processed[xObject.toString()] = true; + } + + this.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorXObject + }); + (0, _util.warn)(`hasBlendModes - ignoring XObject: "${ex}".`); + continue; + } + + throw ex; + } + } + + if (!(0, _primitives.isStream)(xObject)) { + continue; + } + + if (xObject.dict.objId) { + if (processed[xObject.dict.objId]) { + continue; + } + + processed[xObject.dict.objId] = true; + } + + var xResources = xObject.dict.get("Resources"); + + if (xResources instanceof _primitives.Dict && (!xResources.objId || !processed[xResources.objId])) { + nodes.push(xResources); + + if (xResources.objId) { + processed[xResources.objId] = true; + } + } + } + } + + return false; + }, + + async buildFormXObject(resources, xobj, smask, operatorList, task, initialState) { + var dict = xobj.dict; + var matrix = dict.getArray("Matrix"); + var bbox = dict.getArray("BBox"); + + if (Array.isArray(bbox) && bbox.length === 4) { + bbox = _util.Util.normalizeRect(bbox); + } else { + bbox = null; + } + + var group = dict.get("Group"); + + if (group) { + var groupOptions = { + matrix, + bbox, + smask, + isolated: false, + knockout: false + }; + var groupSubtype = group.get("S"); + var colorSpace = null; + + if ((0, _primitives.isName)(groupSubtype, "Transparency")) { + groupOptions.isolated = group.get("I") || false; + groupOptions.knockout = group.get("K") || false; + + if (group.has("CS")) { + colorSpace = await this.parseColorSpace({ + cs: group.get("CS"), + resources + }); + } + } + + if (smask && smask.backdrop) { + colorSpace = colorSpace || _colorspace.ColorSpace.singletons.rgb; + smask.backdrop = colorSpace.getRgb(smask.backdrop, 0); + } + + operatorList.addOp(_util.OPS.beginGroup, [groupOptions]); + } + + operatorList.addOp(_util.OPS.paintFormXObjectBegin, [matrix, bbox]); + return this.getOperatorList({ + stream: xobj, + task, + resources: dict.get("Resources") || resources, + operatorList, + initialState + }).then(function () { + operatorList.addOp(_util.OPS.paintFormXObjectEnd, []); + + if (group) { + operatorList.addOp(_util.OPS.endGroup, [groupOptions]); + } + }); + }, + + async buildPaintImageXObject({ + resources, + image, + isInline = false, + operatorList, + cacheKey, + localImageCache + }) { + var dict = image.dict; + const imageRef = dict.objId; + var w = dict.get("Width", "W"); + var h = dict.get("Height", "H"); + + if (!(w && (0, _util.isNum)(w)) || !(h && (0, _util.isNum)(h))) { + (0, _util.warn)("Image dimensions are missing, or not numbers."); + return undefined; + } + + var maxImageSize = this.options.maxImageSize; + + if (maxImageSize !== -1 && w * h > maxImageSize) { + (0, _util.warn)("Image exceeded maximum allowed size and was removed."); + return undefined; + } + + var imageMask = dict.get("ImageMask", "IM") || false; + var imgData, args; + + if (imageMask) { + var width = dict.get("Width", "W"); + var height = dict.get("Height", "H"); + var bitStrideLength = width + 7 >> 3; + var imgArray = image.getBytes(bitStrideLength * height, true); + var decode = dict.getArray("Decode", "D"); + imgData = _image.PDFImage.createMask({ + imgArray, + width, + height, + imageIsFromDecodeStream: image instanceof _stream.DecodeStream, + inverseDecode: !!decode && decode[0] > 0 + }); + imgData.cached = !!cacheKey; + args = [imgData]; + operatorList.addOp(_util.OPS.paintImageMaskXObject, args); + + if (cacheKey) { + localImageCache.set(cacheKey, imageRef, { + fn: _util.OPS.paintImageMaskXObject, + args + }); + } + + return undefined; + } + + var softMask = dict.get("SMask", "SM") || false; + var mask = dict.get("Mask") || false; + var SMALL_IMAGE_DIMENSIONS = 200; + + if (isInline && !softMask && !mask && w + h < SMALL_IMAGE_DIMENSIONS) { + const imageObj = new _image.PDFImage({ + xref: this.xref, + res: resources, + image, + isInline, + pdfFunctionFactory: this.pdfFunctionFactory + }); + imgData = imageObj.createImageData(true); + operatorList.addOp(_util.OPS.paintInlineImageXObject, [imgData]); + return undefined; + } + + let objId = `img_${this.idFactory.createObjId()}`, + cacheGlobally = false; + + if (this.parsingType3Font) { + objId = `${this.idFactory.getDocId()}_type3res_${objId}`; + } else if (imageRef) { + cacheGlobally = this.globalImageCache.shouldCache(imageRef, this.pageIndex); + + if (cacheGlobally) { + objId = `${this.idFactory.getDocId()}_${objId}`; + } + } + + operatorList.addDependency(objId); + args = [objId, w, h]; + + const imgPromise = _image.PDFImage.buildImage({ + xref: this.xref, + res: resources, + image, + isInline, + pdfFunctionFactory: this.pdfFunctionFactory + }).then(imageObj => { + imgData = imageObj.createImageData(false); + + if (this.parsingType3Font) { + return this.handler.sendWithPromise("commonobj", [objId, "FontType3Res", imgData], [imgData.data.buffer]); + } else if (cacheGlobally) { + this.handler.send("commonobj", [objId, "Image", imgData], [imgData.data.buffer]); + return undefined; + } + + this.handler.send("obj", [objId, this.pageIndex, "Image", imgData], [imgData.data.buffer]); + return undefined; + }).catch(reason => { + (0, _util.warn)("Unable to decode image: " + reason); + + if (this.parsingType3Font) { + return this.handler.sendWithPromise("commonobj", [objId, "FontType3Res", null]); + } else if (cacheGlobally) { + this.handler.send("commonobj", [objId, "Image", null]); + return undefined; + } + + this.handler.send("obj", [objId, this.pageIndex, "Image", null]); + return undefined; + }); + + if (this.parsingType3Font) { + await imgPromise; + } + + operatorList.addOp(_util.OPS.paintImageXObject, args); + + if (cacheKey) { + localImageCache.set(cacheKey, imageRef, { + fn: _util.OPS.paintImageXObject, + args + }); + + if (imageRef) { + (0, _util.assert)(!isInline, "Cannot cache an inline image globally."); + this.globalImageCache.addPageIndex(imageRef, this.pageIndex); + + if (cacheGlobally) { + this.globalImageCache.setData(imageRef, { + objId, + fn: _util.OPS.paintImageXObject, + args + }); + } + } + } + + return undefined; + }, + + handleSMask: function PartialEvaluator_handleSmask(smask, resources, operatorList, task, stateManager) { + var smaskContent = smask.get("G"); + var smaskOptions = { + subtype: smask.get("S").name, + backdrop: smask.get("BC") + }; + var transferObj = smask.get("TR"); + + if ((0, _function.isPDFFunction)(transferObj)) { + const transferFn = this.pdfFunctionFactory.create(transferObj); + var transferMap = new Uint8Array(256); + var tmp = new Float32Array(1); + + for (var i = 0; i < 256; i++) { + tmp[0] = i / 255; + transferFn(tmp, 0, tmp, 0); + transferMap[i] = tmp[0] * 255 | 0; + } + + smaskOptions.transferMap = transferMap; + } + + return this.buildFormXObject(resources, smaskContent, smaskOptions, operatorList, task, stateManager.state.clone()); + }, + + handleTilingType(fn, args, resources, pattern, patternDict, operatorList, task) { + const tilingOpList = new _operator_list.OperatorList(); + const resourcesArray = [patternDict.get("Resources"), resources]; + + const patternResources = _primitives.Dict.merge(this.xref, resourcesArray); + + return this.getOperatorList({ + stream: pattern, + task, + resources: patternResources, + operatorList: tilingOpList + }).then(function () { + return (0, _pattern.getTilingPatternIR)({ + fnArray: tilingOpList.fnArray, + argsArray: tilingOpList.argsArray + }, patternDict, args); + }).then(function (tilingPatternIR) { + operatorList.addDependencies(tilingOpList.dependencies); + operatorList.addOp(fn, tilingPatternIR); + }, reason => { + if (reason instanceof _util.AbortException) { + return; + } + + if (this.options.ignoreErrors) { + this.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorTilingPattern + }); + (0, _util.warn)(`handleTilingType - ignoring pattern: "${reason}".`); + return; + } + + throw reason; + }); + }, + + handleSetFont: function PartialEvaluator_handleSetFont(resources, fontArgs, fontRef, operatorList, task, state) { + var fontName; + + if (fontArgs) { + fontArgs = fontArgs.slice(); + fontName = fontArgs[0].name; + } + + return this.loadFont(fontName, fontRef, resources).then(translated => { + if (!translated.font.isType3Font) { + return translated; + } + + return translated.loadType3Data(this, resources, operatorList, task).then(function () { + return translated; + }).catch(reason => { + this.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorFontLoadType3 + }); + return new TranslatedFont({ + loadedName: "g_font_error", + font: new _fonts.ErrorFont(`Type3 font load error: ${reason}`), + dict: translated.font, + extraProperties: this.options.fontExtraProperties + }); + }); + }).then(translated => { + state.font = translated.font; + translated.send(this.handler); + return translated.loadedName; + }); + }, + + handleText(chars, state) { + const font = state.font; + const glyphs = font.charsToGlyphs(chars); + + if (font.data) { + const isAddToPathSet = !!(state.textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG); + + if (isAddToPathSet || state.fillColorSpace.name === "Pattern" || font.disableFontFace || this.options.disableFontFace) { + PartialEvaluator.buildFontPaths(font, glyphs, this.handler); + } + } + + return glyphs; + }, + + ensureStateFont(state) { + if (state.font) { + return; + } + + const reason = new _util.FormatError("Missing setFont (Tf) operator before text rendering operator."); + + if (this.options.ignoreErrors) { + this.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorFontState + }); + (0, _util.warn)(`ensureStateFont: "${reason}".`); + return; + } + + throw reason; + }, + + setGState: function PartialEvaluator_setGState(resources, gState, operatorList, task, stateManager) { + var gStateObj = []; + var gStateKeys = gState.getKeys(); + var promise = Promise.resolve(); + + for (var i = 0, ii = gStateKeys.length; i < ii; i++) { + const key = gStateKeys[i]; + const value = gState.get(key); + + switch (key) { + case "Type": + break; + + case "LW": + case "LC": + case "LJ": + case "ML": + case "D": + case "RI": + case "FL": + case "CA": + case "ca": + gStateObj.push([key, value]); + break; + + case "Font": + promise = promise.then(() => { + return this.handleSetFont(resources, null, value[0], operatorList, task, stateManager.state).then(function (loadedName) { + operatorList.addDependency(loadedName); + gStateObj.push([key, [loadedName, value[1]]]); + }); + }); + break; + + case "BM": + gStateObj.push([key, normalizeBlendMode(value)]); + break; + + case "SMask": + if ((0, _primitives.isName)(value, "None")) { + gStateObj.push([key, false]); + break; + } + + if ((0, _primitives.isDict)(value)) { + promise = promise.then(() => { + return this.handleSMask(value, resources, operatorList, task, stateManager); + }); + gStateObj.push([key, true]); + } else { + (0, _util.warn)("Unsupported SMask type"); + } + + break; + + case "OP": + case "op": + case "OPM": + case "BG": + case "BG2": + case "UCR": + case "UCR2": + case "TR": + case "TR2": + case "HT": + case "SM": + case "SA": + case "AIS": + case "TK": + (0, _util.info)("graphic state operator " + key); + break; + + default: + (0, _util.info)("Unknown graphic state operator " + key); + break; + } + } + + return promise.then(function () { + if (gStateObj.length > 0) { + operatorList.addOp(_util.OPS.setGState, [gStateObj]); + } + }); + }, + loadFont: function PartialEvaluator_loadFont(fontName, font, resources) { + const errorFont = () => { + return Promise.resolve(new TranslatedFont({ + loadedName: "g_font_error", + font: new _fonts.ErrorFont(`Font "${fontName}" is not available.`), + dict: font, + extraProperties: this.options.fontExtraProperties + })); + }; + + var fontRef, + xref = this.xref; + + if (font) { + if (!(0, _primitives.isRef)(font)) { + throw new _util.FormatError('The "font" object should be a reference.'); + } + + fontRef = font; + } else { + var fontRes = resources.get("Font"); + + if (fontRes) { + fontRef = fontRes.getRaw(fontName); + } + } + + if (!fontRef) { + const partialMsg = `Font "${fontName || font && font.toString()}" is not available`; + + if (!this.options.ignoreErrors && !this.parsingType3Font) { + (0, _util.warn)(`${partialMsg}.`); + return errorFont(); + } + + this.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorFontMissing + }); + (0, _util.warn)(`${partialMsg} -- attempting to fallback to a default font.`); + fontRef = PartialEvaluator.getFallbackFontDict(); + } + + if (this.fontCache.has(fontRef)) { + return this.fontCache.get(fontRef); + } + + font = xref.fetchIfRef(fontRef); + + if (!(0, _primitives.isDict)(font)) { + return errorFont(); + } + + if (font.translated) { + return font.translated; + } + + var fontCapability = (0, _util.createPromiseCapability)(); + var preEvaluatedFont = this.preEvaluateFont(font); + const { + descriptor, + hash + } = preEvaluatedFont; + var fontRefIsRef = (0, _primitives.isRef)(fontRef), + fontID; + + if (fontRefIsRef) { + fontID = fontRef.toString(); + } + + if (hash && (0, _primitives.isDict)(descriptor)) { + if (!descriptor.fontAliases) { + descriptor.fontAliases = Object.create(null); + } + + var fontAliases = descriptor.fontAliases; + + if (fontAliases[hash]) { + var aliasFontRef = fontAliases[hash].aliasRef; + + if (fontRefIsRef && aliasFontRef && this.fontCache.has(aliasFontRef)) { + this.fontCache.putAlias(fontRef, aliasFontRef); + return this.fontCache.get(fontRef); + } + } else { + fontAliases[hash] = { + fontID: _fonts.Font.getFontID() + }; + } + + if (fontRefIsRef) { + fontAliases[hash].aliasRef = fontRef; + } + + fontID = fontAliases[hash].fontID; + } + + if (fontRefIsRef) { + this.fontCache.put(fontRef, fontCapability.promise); + } else { + if (!fontID) { + fontID = this.idFactory.createObjId(); + } + + this.fontCache.put(`id_${fontID}`, fontCapability.promise); + } + + (0, _util.assert)(fontID, 'The "fontID" must be defined.'); + font.loadedName = `${this.idFactory.getDocId()}_f${fontID}`; + font.translated = fontCapability.promise; + var translatedPromise; + + try { + translatedPromise = this.translateFont(preEvaluatedFont); + } catch (e) { + translatedPromise = Promise.reject(e); + } + + translatedPromise.then(translatedFont => { + if (translatedFont.fontType !== undefined) { + var xrefFontStats = xref.stats.fontTypes; + xrefFontStats[translatedFont.fontType] = true; + } + + fontCapability.resolve(new TranslatedFont({ + loadedName: font.loadedName, + font: translatedFont, + dict: font, + extraProperties: this.options.fontExtraProperties + })); + }).catch(reason => { + this.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorFontTranslate + }); + + try { + var fontFile3 = descriptor && descriptor.get("FontFile3"); + var subtype = fontFile3 && fontFile3.get("Subtype"); + var fontType = (0, _fonts.getFontType)(preEvaluatedFont.type, subtype && subtype.name); + var xrefFontStats = xref.stats.fontTypes; + xrefFontStats[fontType] = true; + } catch (ex) {} + + fontCapability.resolve(new TranslatedFont({ + loadedName: font.loadedName, + font: new _fonts.ErrorFont(reason instanceof Error ? reason.message : reason), + dict: font, + extraProperties: this.options.fontExtraProperties + })); + }); + return fontCapability.promise; + }, + + buildPath(operatorList, fn, args, parsingText = false) { + var lastIndex = operatorList.length - 1; + + if (!args) { + args = []; + } + + if (lastIndex < 0 || operatorList.fnArray[lastIndex] !== _util.OPS.constructPath) { + if (parsingText) { + (0, _util.warn)(`Encountered path operator "${fn}" inside of a text object.`); + operatorList.addOp(_util.OPS.save, null); + } + + operatorList.addOp(_util.OPS.constructPath, [[fn], args]); + + if (parsingText) { + operatorList.addOp(_util.OPS.restore, null); + } + } else { + var opArgs = operatorList.argsArray[lastIndex]; + opArgs[0].push(fn); + Array.prototype.push.apply(opArgs[1], args); + } + }, + + parseColorSpace({ + cs, + resources + }) { + return new Promise(resolve => { + resolve(_colorspace.ColorSpace.parse(cs, this.xref, resources, this.pdfFunctionFactory)); + }).catch(reason => { + if (reason instanceof _util.AbortException) { + return null; + } + + if (this.options.ignoreErrors) { + this.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorColorSpace + }); + (0, _util.warn)(`parseColorSpace - ignoring ColorSpace: "${reason}".`); + return null; + } + + throw reason; + }); + }, + + async handleColorN(operatorList, fn, args, cs, patterns, resources, task) { + var patternName = args[args.length - 1]; + var pattern; + + if ((0, _primitives.isName)(patternName) && (pattern = patterns.get(patternName.name))) { + var dict = (0, _primitives.isStream)(pattern) ? pattern.dict : pattern; + var typeNum = dict.get("PatternType"); + + if (typeNum === TILING_PATTERN) { + var color = cs.base ? cs.base.getRgb(args, 0) : null; + return this.handleTilingType(fn, color, resources, pattern, dict, operatorList, task); + } else if (typeNum === SHADING_PATTERN) { + var shading = dict.get("Shading"); + var matrix = dict.getArray("Matrix"); + pattern = _pattern.Pattern.parseShading(shading, matrix, this.xref, resources, this.handler, this.pdfFunctionFactory); + operatorList.addOp(fn, pattern.getIR()); + return undefined; + } + + throw new _util.FormatError(`Unknown PatternType: ${typeNum}`); + } + + throw new _util.FormatError(`Unknown PatternName: ${patternName}`); + }, + + getOperatorList({ + stream, + task, + resources, + operatorList, + initialState = null + }) { + resources = resources || _primitives.Dict.empty; + initialState = initialState || new EvalState(); + + if (!operatorList) { + throw new Error('getOperatorList: missing "operatorList" parameter'); + } + + var self = this; + var xref = this.xref; + let parsingText = false; + const localImageCache = new _image_utils.LocalImageCache(); + + var xobjs = resources.get("XObject") || _primitives.Dict.empty; + + var patterns = resources.get("Pattern") || _primitives.Dict.empty; + + var stateManager = new StateManager(initialState); + var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); + var timeSlotManager = new TimeSlotManager(); + + function closePendingRestoreOPS(argument) { + for (var i = 0, ii = preprocessor.savedStatesDepth; i < ii; i++) { + operatorList.addOp(_util.OPS.restore, []); + } + } + + return new Promise(function promiseBody(resolve, reject) { + const next = function (promise) { + Promise.all([promise, operatorList.ready]).then(function () { + try { + promiseBody(resolve, reject); + } catch (ex) { + reject(ex); + } + }, reject); + }; + + task.ensureNotTerminated(); + timeSlotManager.reset(); + var stop, + operation = {}, + i, + ii, + cs; + + while (!(stop = timeSlotManager.check())) { + operation.args = null; + + if (!preprocessor.read(operation)) { + break; + } + + var args = operation.args; + var fn = operation.fn; + + switch (fn | 0) { + case _util.OPS.paintXObject: + var name = args[0].name; + + if (name) { + const localImage = localImageCache.getByName(name); + + if (localImage) { + operatorList.addOp(localImage.fn, localImage.args); + args = null; + continue; + } + } + + next(new Promise(function (resolveXObject, rejectXObject) { + if (!name) { + throw new _util.FormatError("XObject must be referred to by name."); + } + + let xobj = xobjs.getRaw(name); + + if (xobj instanceof _primitives.Ref) { + const localImage = localImageCache.getByRef(xobj); + + if (localImage) { + operatorList.addOp(localImage.fn, localImage.args); + resolveXObject(); + return; + } + + const globalImage = self.globalImageCache.getData(xobj, self.pageIndex); + + if (globalImage) { + operatorList.addDependency(globalImage.objId); + operatorList.addOp(globalImage.fn, globalImage.args); + resolveXObject(); + return; + } + + xobj = xref.fetch(xobj); + } + + if (!xobj) { + operatorList.addOp(fn, args); + resolveXObject(); + return; + } + + if (!(0, _primitives.isStream)(xobj)) { + throw new _util.FormatError("XObject should be a stream"); + } + + const type = xobj.dict.get("Subtype"); + + if (!(0, _primitives.isName)(type)) { + throw new _util.FormatError("XObject should have a Name subtype"); + } + + if (type.name === "Form") { + stateManager.save(); + self.buildFormXObject(resources, xobj, null, operatorList, task, stateManager.state.clone()).then(function () { + stateManager.restore(); + resolveXObject(); + }, rejectXObject); + return; + } else if (type.name === "Image") { + self.buildPaintImageXObject({ + resources, + image: xobj, + operatorList, + cacheKey: name, + localImageCache + }).then(resolveXObject, rejectXObject); + return; + } else if (type.name === "PS") { + (0, _util.info)("Ignored XObject subtype PS"); + } else { + throw new _util.FormatError(`Unhandled XObject subtype ${type.name}`); + } + + resolveXObject(); + }).catch(function (reason) { + if (reason instanceof _util.AbortException) { + return; + } + + if (self.options.ignoreErrors) { + self.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorXObject + }); + (0, _util.warn)(`getOperatorList - ignoring XObject: "${reason}".`); + return; + } + + throw reason; + })); + return; + + case _util.OPS.setFont: + var fontSize = args[1]; + next(self.handleSetFont(resources, args, null, operatorList, task, stateManager.state).then(function (loadedName) { + operatorList.addDependency(loadedName); + operatorList.addOp(_util.OPS.setFont, [loadedName, fontSize]); + })); + return; + + case _util.OPS.beginText: + parsingText = true; + break; + + case _util.OPS.endText: + parsingText = false; + break; + + case _util.OPS.endInlineImage: + var cacheKey = args[0].cacheKey; + + if (cacheKey) { + const localImage = localImageCache.getByName(cacheKey); + + if (localImage) { + operatorList.addOp(localImage.fn, localImage.args); + args = null; + continue; + } + } + + next(self.buildPaintImageXObject({ + resources, + image: args[0], + isInline: true, + operatorList, + cacheKey, + localImageCache + })); + return; + + case _util.OPS.showText: + if (!stateManager.state.font) { + self.ensureStateFont(stateManager.state); + continue; + } + + args[0] = self.handleText(args[0], stateManager.state); + break; + + case _util.OPS.showSpacedText: + if (!stateManager.state.font) { + self.ensureStateFont(stateManager.state); + continue; + } + + var arr = args[0]; + var combinedGlyphs = []; + var arrLength = arr.length; + var state = stateManager.state; + + for (i = 0; i < arrLength; ++i) { + var arrItem = arr[i]; + + if ((0, _util.isString)(arrItem)) { + Array.prototype.push.apply(combinedGlyphs, self.handleText(arrItem, state)); + } else if ((0, _util.isNum)(arrItem)) { + combinedGlyphs.push(arrItem); + } + } + + args[0] = combinedGlyphs; + fn = _util.OPS.showText; + break; + + case _util.OPS.nextLineShowText: + if (!stateManager.state.font) { + self.ensureStateFont(stateManager.state); + continue; + } + + operatorList.addOp(_util.OPS.nextLine); + args[0] = self.handleText(args[0], stateManager.state); + fn = _util.OPS.showText; + break; + + case _util.OPS.nextLineSetSpacingShowText: + if (!stateManager.state.font) { + self.ensureStateFont(stateManager.state); + continue; + } + + operatorList.addOp(_util.OPS.nextLine); + operatorList.addOp(_util.OPS.setWordSpacing, [args.shift()]); + operatorList.addOp(_util.OPS.setCharSpacing, [args.shift()]); + args[0] = self.handleText(args[0], stateManager.state); + fn = _util.OPS.showText; + break; + + case _util.OPS.setTextRenderingMode: + stateManager.state.textRenderingMode = args[0]; + break; + + case _util.OPS.setFillColorSpace: + next(self.parseColorSpace({ + cs: args[0], + resources + }).then(function (colorSpace) { + if (colorSpace) { + stateManager.state.fillColorSpace = colorSpace; + } + })); + return; + + case _util.OPS.setStrokeColorSpace: + next(self.parseColorSpace({ + cs: args[0], + resources + }).then(function (colorSpace) { + if (colorSpace) { + stateManager.state.strokeColorSpace = colorSpace; + } + })); + return; + + case _util.OPS.setFillColor: + cs = stateManager.state.fillColorSpace; + args = cs.getRgb(args, 0); + fn = _util.OPS.setFillRGBColor; + break; + + case _util.OPS.setStrokeColor: + cs = stateManager.state.strokeColorSpace; + args = cs.getRgb(args, 0); + fn = _util.OPS.setStrokeRGBColor; + break; + + case _util.OPS.setFillGray: + stateManager.state.fillColorSpace = _colorspace.ColorSpace.singletons.gray; + args = _colorspace.ColorSpace.singletons.gray.getRgb(args, 0); + fn = _util.OPS.setFillRGBColor; + break; + + case _util.OPS.setStrokeGray: + stateManager.state.strokeColorSpace = _colorspace.ColorSpace.singletons.gray; + args = _colorspace.ColorSpace.singletons.gray.getRgb(args, 0); + fn = _util.OPS.setStrokeRGBColor; + break; + + case _util.OPS.setFillCMYKColor: + stateManager.state.fillColorSpace = _colorspace.ColorSpace.singletons.cmyk; + args = _colorspace.ColorSpace.singletons.cmyk.getRgb(args, 0); + fn = _util.OPS.setFillRGBColor; + break; + + case _util.OPS.setStrokeCMYKColor: + stateManager.state.strokeColorSpace = _colorspace.ColorSpace.singletons.cmyk; + args = _colorspace.ColorSpace.singletons.cmyk.getRgb(args, 0); + fn = _util.OPS.setStrokeRGBColor; + break; + + case _util.OPS.setFillRGBColor: + stateManager.state.fillColorSpace = _colorspace.ColorSpace.singletons.rgb; + args = _colorspace.ColorSpace.singletons.rgb.getRgb(args, 0); + break; + + case _util.OPS.setStrokeRGBColor: + stateManager.state.strokeColorSpace = _colorspace.ColorSpace.singletons.rgb; + args = _colorspace.ColorSpace.singletons.rgb.getRgb(args, 0); + break; + + case _util.OPS.setFillColorN: + cs = stateManager.state.fillColorSpace; + + if (cs.name === "Pattern") { + next(self.handleColorN(operatorList, _util.OPS.setFillColorN, args, cs, patterns, resources, task)); + return; + } + + args = cs.getRgb(args, 0); + fn = _util.OPS.setFillRGBColor; + break; + + case _util.OPS.setStrokeColorN: + cs = stateManager.state.strokeColorSpace; + + if (cs.name === "Pattern") { + next(self.handleColorN(operatorList, _util.OPS.setStrokeColorN, args, cs, patterns, resources, task)); + return; + } + + args = cs.getRgb(args, 0); + fn = _util.OPS.setStrokeRGBColor; + break; + + case _util.OPS.shadingFill: + var shadingRes = resources.get("Shading"); + + if (!shadingRes) { + throw new _util.FormatError("No shading resource found"); + } + + var shading = shadingRes.get(args[0].name); + + if (!shading) { + throw new _util.FormatError("No shading object found"); + } + + var shadingFill = _pattern.Pattern.parseShading(shading, null, xref, resources, self.handler, self.pdfFunctionFactory); + + var patternIR = shadingFill.getIR(); + args = [patternIR]; + fn = _util.OPS.shadingFill; + break; + + case _util.OPS.setGState: + var dictName = args[0]; + var extGState = resources.get("ExtGState"); + + if (!(0, _primitives.isDict)(extGState) || !extGState.has(dictName.name)) { + break; + } + + var gState = extGState.get(dictName.name); + next(self.setGState(resources, gState, operatorList, task, stateManager)); + return; + + case _util.OPS.moveTo: + case _util.OPS.lineTo: + case _util.OPS.curveTo: + case _util.OPS.curveTo2: + case _util.OPS.curveTo3: + case _util.OPS.closePath: + case _util.OPS.rectangle: + self.buildPath(operatorList, fn, args, parsingText); + continue; + + case _util.OPS.markPoint: + case _util.OPS.markPointProps: + case _util.OPS.beginMarkedContent: + case _util.OPS.beginMarkedContentProps: + case _util.OPS.endMarkedContent: + case _util.OPS.beginCompat: + case _util.OPS.endCompat: + continue; + + default: + if (args !== null) { + for (i = 0, ii = args.length; i < ii; i++) { + if (args[i] instanceof _primitives.Dict) { + break; + } + } + + if (i < ii) { + (0, _util.warn)("getOperatorList - ignoring operator: " + fn); + continue; + } + } + + } + + operatorList.addOp(fn, args); + } + + if (stop) { + next(deferred); + return; + } + + closePendingRestoreOPS(); + resolve(); + }).catch(reason => { + if (reason instanceof _util.AbortException) { + return; + } + + if (this.options.ignoreErrors) { + this.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorOperatorList + }); + (0, _util.warn)(`getOperatorList - ignoring errors during "${task.name}" ` + `task: "${reason}".`); + closePendingRestoreOPS(); + return; + } + + throw reason; + }); + }, + + getTextContent({ + stream, + task, + resources, + stateManager = null, + normalizeWhitespace = false, + combineTextItems = false, + sink, + seenStyles = Object.create(null) + }) { + resources = resources || _primitives.Dict.empty; + stateManager = stateManager || new StateManager(new TextState()); + var WhitespaceRegexp = /\s/g; + var textContent = { + items: [], + styles: Object.create(null) + }; + var textContentItem = { + initialized: false, + str: [], + width: 0, + height: 0, + vertical: false, + lastAdvanceWidth: 0, + lastAdvanceHeight: 0, + textAdvanceScale: 0, + spaceWidth: 0, + fakeSpaceMin: Infinity, + fakeMultiSpaceMin: Infinity, + fakeMultiSpaceMax: -0, + textRunBreakAllowed: false, + transform: null, + fontName: null + }; + var SPACE_FACTOR = 0.3; + var MULTI_SPACE_FACTOR = 1.5; + var MULTI_SPACE_FACTOR_MAX = 4; + var self = this; + var xref = this.xref; + var xobjs = null; + const emptyXObjectCache = new _image_utils.LocalImageCache(); + var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); + var textState; + + function ensureTextContentItem() { + if (textContentItem.initialized) { + return textContentItem; + } + + var font = textState.font; + + if (!(font.loadedName in seenStyles)) { + seenStyles[font.loadedName] = true; + textContent.styles[font.loadedName] = { + fontFamily: font.fallbackName, + ascent: font.ascent, + descent: font.descent, + vertical: font.vertical + }; + } + + textContentItem.fontName = font.loadedName; + var tsm = [textState.fontSize * textState.textHScale, 0, 0, textState.fontSize, 0, textState.textRise]; + + if (font.isType3Font && textState.fontSize <= 1 && !(0, _util.isArrayEqual)(textState.fontMatrix, _util.FONT_IDENTITY_MATRIX)) { + const glyphHeight = font.bbox[3] - font.bbox[1]; + + if (glyphHeight > 0) { + tsm[3] *= glyphHeight * textState.fontMatrix[3]; + } + } + + var trm = _util.Util.transform(textState.ctm, _util.Util.transform(textState.textMatrix, tsm)); + + textContentItem.transform = trm; + + if (!font.vertical) { + textContentItem.width = 0; + textContentItem.height = Math.sqrt(trm[2] * trm[2] + trm[3] * trm[3]); + textContentItem.vertical = false; + } else { + textContentItem.width = Math.sqrt(trm[0] * trm[0] + trm[1] * trm[1]); + textContentItem.height = 0; + textContentItem.vertical = true; + } + + var a = textState.textLineMatrix[0]; + var b = textState.textLineMatrix[1]; + var scaleLineX = Math.sqrt(a * a + b * b); + a = textState.ctm[0]; + b = textState.ctm[1]; + var scaleCtmX = Math.sqrt(a * a + b * b); + textContentItem.textAdvanceScale = scaleCtmX * scaleLineX; + textContentItem.lastAdvanceWidth = 0; + textContentItem.lastAdvanceHeight = 0; + var spaceWidth = font.spaceWidth / 1000 * textState.fontSize; + + if (spaceWidth) { + textContentItem.spaceWidth = spaceWidth; + textContentItem.fakeSpaceMin = spaceWidth * SPACE_FACTOR; + textContentItem.fakeMultiSpaceMin = spaceWidth * MULTI_SPACE_FACTOR; + textContentItem.fakeMultiSpaceMax = spaceWidth * MULTI_SPACE_FACTOR_MAX; + textContentItem.textRunBreakAllowed = !font.isMonospace; + } else { + textContentItem.spaceWidth = 0; + textContentItem.fakeSpaceMin = Infinity; + textContentItem.fakeMultiSpaceMin = Infinity; + textContentItem.fakeMultiSpaceMax = 0; + textContentItem.textRunBreakAllowed = false; + } + + textContentItem.initialized = true; + return textContentItem; + } + + function replaceWhitespace(str) { + var i = 0, + ii = str.length, + code; + + while (i < ii && (code = str.charCodeAt(i)) >= 0x20 && code <= 0x7f) { + i++; + } + + return i < ii ? str.replace(WhitespaceRegexp, " ") : str; + } + + function runBidiTransform(textChunk) { + var str = textChunk.str.join(""); + var bidiResult = (0, _bidi.bidi)(str, -1, textChunk.vertical); + return { + str: normalizeWhitespace ? replaceWhitespace(bidiResult.str) : bidiResult.str, + dir: bidiResult.dir, + width: textChunk.width, + height: textChunk.height, + transform: textChunk.transform, + fontName: textChunk.fontName + }; + } + + function handleSetFont(fontName, fontRef) { + return self.loadFont(fontName, fontRef, resources).then(function (translated) { + textState.font = translated.font; + textState.fontMatrix = translated.font.fontMatrix || _util.FONT_IDENTITY_MATRIX; + }); + } + + function buildTextContentItem(chars) { + var font = textState.font; + var textChunk = ensureTextContentItem(); + var width = 0; + var height = 0; + var glyphs = font.charsToGlyphs(chars); + + for (var i = 0; i < glyphs.length; i++) { + var glyph = glyphs[i]; + var glyphWidth = null; + + if (font.vertical && glyph.vmetric) { + glyphWidth = glyph.vmetric[0]; + } else { + glyphWidth = glyph.width; + } + + var glyphUnicode = glyph.unicode; + var NormalizedUnicodes = (0, _unicode.getNormalizedUnicodes)(); + + if (NormalizedUnicodes[glyphUnicode] !== undefined) { + glyphUnicode = NormalizedUnicodes[glyphUnicode]; + } + + glyphUnicode = (0, _unicode.reverseIfRtl)(glyphUnicode); + var charSpacing = textState.charSpacing; + + if (glyph.isSpace) { + var wordSpacing = textState.wordSpacing; + charSpacing += wordSpacing; + + if (wordSpacing > 0) { + addFakeSpaces(wordSpacing, textChunk.str); + } + } + + var tx = 0; + var ty = 0; + + if (!font.vertical) { + var w0 = glyphWidth * textState.fontMatrix[0]; + tx = (w0 * textState.fontSize + charSpacing) * textState.textHScale; + width += tx; + } else { + var w1 = glyphWidth * textState.fontMatrix[0]; + ty = w1 * textState.fontSize + charSpacing; + height += ty; + } + + textState.translateTextMatrix(tx, ty); + textChunk.str.push(glyphUnicode); + } + + if (!font.vertical) { + textChunk.lastAdvanceWidth = width; + textChunk.width += width; + } else { + textChunk.lastAdvanceHeight = height; + textChunk.height += Math.abs(height); + } + + return textChunk; + } + + function addFakeSpaces(width, strBuf) { + if (width < textContentItem.fakeSpaceMin) { + return; + } + + if (width < textContentItem.fakeMultiSpaceMin) { + strBuf.push(" "); + return; + } + + var fakeSpaces = Math.round(width / textContentItem.spaceWidth); + + while (fakeSpaces-- > 0) { + strBuf.push(" "); + } + } + + function flushTextContentItem() { + if (!textContentItem.initialized) { + return; + } + + if (!textContentItem.vertical) { + textContentItem.width *= textContentItem.textAdvanceScale; + } else { + textContentItem.height *= textContentItem.textAdvanceScale; + } + + textContent.items.push(runBidiTransform(textContentItem)); + textContentItem.initialized = false; + textContentItem.str.length = 0; + } + + function enqueueChunk() { + const length = textContent.items.length; + + if (length > 0) { + sink.enqueue(textContent, length); + textContent.items = []; + textContent.styles = Object.create(null); + } + } + + var timeSlotManager = new TimeSlotManager(); + return new Promise(function promiseBody(resolve, reject) { + const next = function (promise) { + enqueueChunk(); + Promise.all([promise, sink.ready]).then(function () { + try { + promiseBody(resolve, reject); + } catch (ex) { + reject(ex); + } + }, reject); + }; + + task.ensureNotTerminated(); + timeSlotManager.reset(); + var stop, + operation = {}, + args = []; + + while (!(stop = timeSlotManager.check())) { + args.length = 0; + operation.args = args; + + if (!preprocessor.read(operation)) { + break; + } + + textState = stateManager.state; + var fn = operation.fn; + args = operation.args; + var advance, diff; + + switch (fn | 0) { + case _util.OPS.setFont: + var fontNameArg = args[0].name, + fontSizeArg = args[1]; + + if (textState.font && fontNameArg === textState.fontName && fontSizeArg === textState.fontSize) { + break; + } + + flushTextContentItem(); + textState.fontName = fontNameArg; + textState.fontSize = fontSizeArg; + next(handleSetFont(fontNameArg, null)); + return; + + case _util.OPS.setTextRise: + flushTextContentItem(); + textState.textRise = args[0]; + break; + + case _util.OPS.setHScale: + flushTextContentItem(); + textState.textHScale = args[0] / 100; + break; + + case _util.OPS.setLeading: + flushTextContentItem(); + textState.leading = args[0]; + break; + + case _util.OPS.moveText: + var isSameTextLine = !textState.font ? false : (textState.font.vertical ? args[0] : args[1]) === 0; + advance = args[0] - args[1]; + + if (combineTextItems && isSameTextLine && textContentItem.initialized && advance > 0 && advance <= textContentItem.fakeMultiSpaceMax) { + textState.translateTextLineMatrix(args[0], args[1]); + textContentItem.width += args[0] - textContentItem.lastAdvanceWidth; + textContentItem.height += args[1] - textContentItem.lastAdvanceHeight; + diff = args[0] - textContentItem.lastAdvanceWidth - (args[1] - textContentItem.lastAdvanceHeight); + addFakeSpaces(diff, textContentItem.str); + break; + } + + flushTextContentItem(); + textState.translateTextLineMatrix(args[0], args[1]); + textState.textMatrix = textState.textLineMatrix.slice(); + break; + + case _util.OPS.setLeadingMoveText: + flushTextContentItem(); + textState.leading = -args[1]; + textState.translateTextLineMatrix(args[0], args[1]); + textState.textMatrix = textState.textLineMatrix.slice(); + break; + + case _util.OPS.nextLine: + flushTextContentItem(); + textState.carriageReturn(); + break; + + case _util.OPS.setTextMatrix: + advance = textState.calcTextLineMatrixAdvance(args[0], args[1], args[2], args[3], args[4], args[5]); + + if (combineTextItems && advance !== null && textContentItem.initialized && advance.value > 0 && advance.value <= textContentItem.fakeMultiSpaceMax) { + textState.translateTextLineMatrix(advance.width, advance.height); + textContentItem.width += advance.width - textContentItem.lastAdvanceWidth; + textContentItem.height += advance.height - textContentItem.lastAdvanceHeight; + diff = advance.width - textContentItem.lastAdvanceWidth - (advance.height - textContentItem.lastAdvanceHeight); + addFakeSpaces(diff, textContentItem.str); + break; + } + + flushTextContentItem(); + textState.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); + textState.setTextLineMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); + break; + + case _util.OPS.setCharSpacing: + textState.charSpacing = args[0]; + break; + + case _util.OPS.setWordSpacing: + textState.wordSpacing = args[0]; + break; + + case _util.OPS.beginText: + flushTextContentItem(); + textState.textMatrix = _util.IDENTITY_MATRIX.slice(); + textState.textLineMatrix = _util.IDENTITY_MATRIX.slice(); + break; + + case _util.OPS.showSpacedText: + if (!stateManager.state.font) { + self.ensureStateFont(stateManager.state); + continue; + } + + var items = args[0]; + var offset; + + for (var j = 0, jj = items.length; j < jj; j++) { + if (typeof items[j] === "string") { + buildTextContentItem(items[j]); + } else if ((0, _util.isNum)(items[j])) { + ensureTextContentItem(); + advance = items[j] * textState.fontSize / 1000; + var breakTextRun = false; + + if (textState.font.vertical) { + offset = advance; + textState.translateTextMatrix(0, offset); + breakTextRun = textContentItem.textRunBreakAllowed && advance > textContentItem.fakeMultiSpaceMax; + + if (!breakTextRun) { + textContentItem.height += offset; + } + } else { + advance = -advance; + offset = advance * textState.textHScale; + textState.translateTextMatrix(offset, 0); + breakTextRun = textContentItem.textRunBreakAllowed && advance > textContentItem.fakeMultiSpaceMax; + + if (!breakTextRun) { + textContentItem.width += offset; + } + } + + if (breakTextRun) { + flushTextContentItem(); + } else if (advance > 0) { + addFakeSpaces(advance, textContentItem.str); + } + } + } + + break; + + case _util.OPS.showText: + if (!stateManager.state.font) { + self.ensureStateFont(stateManager.state); + continue; + } + + buildTextContentItem(args[0]); + break; + + case _util.OPS.nextLineShowText: + if (!stateManager.state.font) { + self.ensureStateFont(stateManager.state); + continue; + } + + flushTextContentItem(); + textState.carriageReturn(); + buildTextContentItem(args[0]); + break; + + case _util.OPS.nextLineSetSpacingShowText: + if (!stateManager.state.font) { + self.ensureStateFont(stateManager.state); + continue; + } + + flushTextContentItem(); + textState.wordSpacing = args[0]; + textState.charSpacing = args[1]; + textState.carriageReturn(); + buildTextContentItem(args[2]); + break; + + case _util.OPS.paintXObject: + flushTextContentItem(); + + if (!xobjs) { + xobjs = resources.get("XObject") || _primitives.Dict.empty; + } + + var name = args[0].name; + + if (name && emptyXObjectCache.getByName(name)) { + break; + } + + next(new Promise(function (resolveXObject, rejectXObject) { + if (!name) { + throw new _util.FormatError("XObject must be referred to by name."); + } + + let xobj = xobjs.getRaw(name); + + if (xobj instanceof _primitives.Ref) { + if (emptyXObjectCache.getByRef(xobj)) { + resolveXObject(); + return; + } + + xobj = xref.fetch(xobj); + } + + if (!xobj) { + resolveXObject(); + return; + } + + if (!(0, _primitives.isStream)(xobj)) { + throw new _util.FormatError("XObject should be a stream"); + } + + const type = xobj.dict.get("Subtype"); + + if (!(0, _primitives.isName)(type)) { + throw new _util.FormatError("XObject should have a Name subtype"); + } + + if (type.name !== "Form") { + emptyXObjectCache.set(name, xobj.dict.objId, true); + resolveXObject(); + return; + } + + const currentState = stateManager.state.clone(); + const xObjStateManager = new StateManager(currentState); + const matrix = xobj.dict.getArray("Matrix"); + + if (Array.isArray(matrix) && matrix.length === 6) { + xObjStateManager.transform(matrix); + } + + enqueueChunk(); + const sinkWrapper = { + enqueueInvoked: false, + + enqueue(chunk, size) { + this.enqueueInvoked = true; + sink.enqueue(chunk, size); + }, + + get desiredSize() { + return sink.desiredSize; + }, + + get ready() { + return sink.ready; + } + + }; + self.getTextContent({ + stream: xobj, + task, + resources: xobj.dict.get("Resources") || resources, + stateManager: xObjStateManager, + normalizeWhitespace, + combineTextItems, + sink: sinkWrapper, + seenStyles + }).then(function () { + if (!sinkWrapper.enqueueInvoked) { + emptyXObjectCache.set(name, xobj.dict.objId, true); + } + + resolveXObject(); + }, rejectXObject); + }).catch(function (reason) { + if (reason instanceof _util.AbortException) { + return; + } + + if (self.options.ignoreErrors) { + (0, _util.warn)(`getTextContent - ignoring XObject: "${reason}".`); + return; + } + + throw reason; + })); + return; + + case _util.OPS.setGState: + flushTextContentItem(); + var dictName = args[0]; + var extGState = resources.get("ExtGState"); + + if (!(0, _primitives.isDict)(extGState) || !(0, _primitives.isName)(dictName)) { + break; + } + + var gState = extGState.get(dictName.name); + + if (!(0, _primitives.isDict)(gState)) { + break; + } + + var gStateFont = gState.get("Font"); + + if (gStateFont) { + textState.fontName = null; + textState.fontSize = gStateFont[1]; + next(handleSetFont(null, gStateFont[0])); + return; + } + + break; + } + + if (textContent.items.length >= sink.desiredSize) { + stop = true; + break; + } + } + + if (stop) { + next(deferred); + return; + } + + flushTextContentItem(); + enqueueChunk(); + resolve(); + }).catch(reason => { + if (reason instanceof _util.AbortException) { + return; + } + + if (this.options.ignoreErrors) { + (0, _util.warn)(`getTextContent - ignoring errors during "${task.name}" ` + `task: "${reason}".`); + flushTextContentItem(); + enqueueChunk(); + return; + } + + throw reason; + }); + }, + + extractDataStructures: function PartialEvaluator_extractDataStructures(dict, baseDict, properties) { + const xref = this.xref; + let cidToGidBytes; + var toUnicode = dict.get("ToUnicode") || baseDict.get("ToUnicode"); + var toUnicodePromise = toUnicode ? this.readToUnicode(toUnicode) : Promise.resolve(undefined); + + if (properties.composite) { + var cidSystemInfo = dict.get("CIDSystemInfo"); + + if ((0, _primitives.isDict)(cidSystemInfo)) { + properties.cidSystemInfo = { + registry: (0, _util.stringToPDFString)(cidSystemInfo.get("Registry")), + ordering: (0, _util.stringToPDFString)(cidSystemInfo.get("Ordering")), + supplement: cidSystemInfo.get("Supplement") + }; + } + + var cidToGidMap = dict.get("CIDToGIDMap"); + + if ((0, _primitives.isStream)(cidToGidMap)) { + cidToGidBytes = cidToGidMap.getBytes(); + } + } + + var differences = []; + var baseEncodingName = null; + var encoding; + + if (dict.has("Encoding")) { + encoding = dict.get("Encoding"); + + if ((0, _primitives.isDict)(encoding)) { + baseEncodingName = encoding.get("BaseEncoding"); + baseEncodingName = (0, _primitives.isName)(baseEncodingName) ? baseEncodingName.name : null; + + if (encoding.has("Differences")) { + var diffEncoding = encoding.get("Differences"); + var index = 0; + + for (var j = 0, jj = diffEncoding.length; j < jj; j++) { + var data = xref.fetchIfRef(diffEncoding[j]); + + if ((0, _util.isNum)(data)) { + index = data; + } else if ((0, _primitives.isName)(data)) { + differences[index++] = data.name; + } else { + throw new _util.FormatError(`Invalid entry in 'Differences' array: ${data}`); + } + } + } + } else if ((0, _primitives.isName)(encoding)) { + baseEncodingName = encoding.name; + } else { + throw new _util.FormatError("Encoding is not a Name nor a Dict"); + } + + if (baseEncodingName !== "MacRomanEncoding" && baseEncodingName !== "MacExpertEncoding" && baseEncodingName !== "WinAnsiEncoding") { + baseEncodingName = null; + } + } + + if (baseEncodingName) { + properties.defaultEncoding = (0, _encodings.getEncoding)(baseEncodingName).slice(); + } else { + var isSymbolicFont = !!(properties.flags & _fonts.FontFlags.Symbolic); + var isNonsymbolicFont = !!(properties.flags & _fonts.FontFlags.Nonsymbolic); + encoding = _encodings.StandardEncoding; + + if (properties.type === "TrueType" && !isNonsymbolicFont) { + encoding = _encodings.WinAnsiEncoding; + } + + if (isSymbolicFont) { + encoding = _encodings.MacRomanEncoding; + + if (!properties.file) { + if (/Symbol/i.test(properties.name)) { + encoding = _encodings.SymbolSetEncoding; + } else if (/Dingbats|Wingdings/i.test(properties.name)) { + encoding = _encodings.ZapfDingbatsEncoding; + } + } + } + + properties.defaultEncoding = encoding; + } + + properties.differences = differences; + properties.baseEncodingName = baseEncodingName; + properties.hasEncoding = !!baseEncodingName || differences.length > 0; + properties.dict = dict; + return toUnicodePromise.then(readToUnicode => { + properties.toUnicode = readToUnicode; + return this.buildToUnicode(properties); + }).then(builtToUnicode => { + properties.toUnicode = builtToUnicode; + + if (cidToGidBytes) { + properties.cidToGidMap = this.readCidToGidMap(cidToGidBytes, builtToUnicode); + } + + return properties; + }); + }, + + _buildSimpleFontToUnicode(properties, forceGlyphs = false) { + (0, _util.assert)(!properties.composite, "Must be a simple font."); + const toUnicode = []; + const encoding = properties.defaultEncoding.slice(); + const baseEncodingName = properties.baseEncodingName; + const differences = properties.differences; + + for (const charcode in differences) { + const glyphName = differences[charcode]; + + if (glyphName === ".notdef") { + continue; + } + + encoding[charcode] = glyphName; + } + + const glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); + + for (const charcode in encoding) { + let glyphName = encoding[charcode]; + + if (glyphName === "") { + continue; + } else if (glyphsUnicodeMap[glyphName] === undefined) { + let code = 0; + + switch (glyphName[0]) { + case "G": + if (glyphName.length === 3) { + code = parseInt(glyphName.substring(1), 16); + } + + break; + + case "g": + if (glyphName.length === 5) { + code = parseInt(glyphName.substring(1), 16); + } + + break; + + case "C": + case "c": + if (glyphName.length >= 3 && glyphName.length <= 4) { + const codeStr = glyphName.substring(1); + + if (forceGlyphs) { + code = parseInt(codeStr, 16); + break; + } + + code = +codeStr; + + if (Number.isNaN(code) && Number.isInteger(parseInt(codeStr, 16))) { + return this._buildSimpleFontToUnicode(properties, true); + } + } + + break; + + default: + const unicode = (0, _unicode.getUnicodeForGlyph)(glyphName, glyphsUnicodeMap); + + if (unicode !== -1) { + code = unicode; + } + + } + + if (code > 0 && code <= 0x10ffff && Number.isInteger(code)) { + if (baseEncodingName && code === +charcode) { + const baseEncoding = (0, _encodings.getEncoding)(baseEncodingName); + + if (baseEncoding && (glyphName = baseEncoding[charcode])) { + toUnicode[charcode] = String.fromCharCode(glyphsUnicodeMap[glyphName]); + continue; + } + } + + toUnicode[charcode] = String.fromCodePoint(code); + } + + continue; + } + + toUnicode[charcode] = String.fromCharCode(glyphsUnicodeMap[glyphName]); + } + + return new _fonts.ToUnicodeMap(toUnicode); + }, + + buildToUnicode(properties) { + properties.hasIncludedToUnicodeMap = !!properties.toUnicode && properties.toUnicode.length > 0; + + if (properties.hasIncludedToUnicodeMap) { + if (!properties.composite && properties.hasEncoding) { + properties.fallbackToUnicode = this._buildSimpleFontToUnicode(properties); + } + + return Promise.resolve(properties.toUnicode); + } + + if (!properties.composite) { + return Promise.resolve(this._buildSimpleFontToUnicode(properties)); + } + + if (properties.composite && (properties.cMap.builtInCMap && !(properties.cMap instanceof _cmap.IdentityCMap) || properties.cidSystemInfo.registry === "Adobe" && (properties.cidSystemInfo.ordering === "GB1" || properties.cidSystemInfo.ordering === "CNS1" || properties.cidSystemInfo.ordering === "Japan1" || properties.cidSystemInfo.ordering === "Korea1"))) { + const registry = properties.cidSystemInfo.registry; + const ordering = properties.cidSystemInfo.ordering; + + const ucs2CMapName = _primitives.Name.get(registry + "-" + ordering + "-UCS2"); + + return _cmap.CMapFactory.create({ + encoding: ucs2CMapName, + fetchBuiltInCMap: this.fetchBuiltInCMap, + useCMap: null + }).then(function (ucs2CMap) { + const cMap = properties.cMap; + const toUnicode = []; + cMap.forEach(function (charcode, cid) { + if (cid > 0xffff) { + throw new _util.FormatError("Max size of CID is 65,535"); + } + + const ucs2 = ucs2CMap.lookup(cid); + + if (ucs2) { + toUnicode[charcode] = String.fromCharCode((ucs2.charCodeAt(0) << 8) + ucs2.charCodeAt(1)); + } + }); + return new _fonts.ToUnicodeMap(toUnicode); + }); + } + + return Promise.resolve(new _fonts.IdentityToUnicodeMap(properties.firstChar, properties.lastChar)); + }, + + readToUnicode: function PartialEvaluator_readToUnicode(toUnicode) { + var cmapObj = toUnicode; + + if ((0, _primitives.isName)(cmapObj)) { + return _cmap.CMapFactory.create({ + encoding: cmapObj, + fetchBuiltInCMap: this.fetchBuiltInCMap, + useCMap: null + }).then(function (cmap) { + if (cmap instanceof _cmap.IdentityCMap) { + return new _fonts.IdentityToUnicodeMap(0, 0xffff); + } + + return new _fonts.ToUnicodeMap(cmap.getMap()); + }); + } else if ((0, _primitives.isStream)(cmapObj)) { + return _cmap.CMapFactory.create({ + encoding: cmapObj, + fetchBuiltInCMap: this.fetchBuiltInCMap, + useCMap: null + }).then(function (cmap) { + if (cmap instanceof _cmap.IdentityCMap) { + return new _fonts.IdentityToUnicodeMap(0, 0xffff); + } + + var map = new Array(cmap.length); + cmap.forEach(function (charCode, token) { + var str = []; + + for (var k = 0; k < token.length; k += 2) { + var w1 = token.charCodeAt(k) << 8 | token.charCodeAt(k + 1); + + if ((w1 & 0xf800) !== 0xd800) { + str.push(w1); + continue; + } + + k += 2; + var w2 = token.charCodeAt(k) << 8 | token.charCodeAt(k + 1); + str.push(((w1 & 0x3ff) << 10) + (w2 & 0x3ff) + 0x10000); + } + + map[charCode] = String.fromCodePoint.apply(String, str); + }); + return new _fonts.ToUnicodeMap(map); + }, reason => { + if (reason instanceof _util.AbortException) { + return null; + } + + if (this.options.ignoreErrors) { + this.handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.errorFontToUnicode + }); + (0, _util.warn)(`readToUnicode - ignoring ToUnicode data: "${reason}".`); + return null; + } + + throw reason; + }); + } + + return Promise.resolve(null); + }, + + readCidToGidMap(glyphsData, toUnicode) { + var result = []; + + for (var j = 0, jj = glyphsData.length; j < jj; j++) { + var glyphID = glyphsData[j++] << 8 | glyphsData[j]; + const code = j >> 1; + + if (glyphID === 0 && !toUnicode.has(code)) { + continue; + } + + result[code] = glyphID; + } + + return result; + }, + + extractWidths: function PartialEvaluator_extractWidths(dict, descriptor, properties) { + var xref = this.xref; + var glyphsWidths = []; + var defaultWidth = 0; + var glyphsVMetrics = []; + var defaultVMetrics; + var i, ii, j, jj, start, code, widths; + + if (properties.composite) { + defaultWidth = dict.has("DW") ? dict.get("DW") : 1000; + widths = dict.get("W"); + + if (widths) { + for (i = 0, ii = widths.length; i < ii; i++) { + start = xref.fetchIfRef(widths[i++]); + code = xref.fetchIfRef(widths[i]); + + if (Array.isArray(code)) { + for (j = 0, jj = code.length; j < jj; j++) { + glyphsWidths[start++] = xref.fetchIfRef(code[j]); + } + } else { + var width = xref.fetchIfRef(widths[++i]); + + for (j = start; j <= code; j++) { + glyphsWidths[j] = width; + } + } + } + } + + if (properties.vertical) { + var vmetrics = dict.getArray("DW2") || [880, -1000]; + defaultVMetrics = [vmetrics[1], defaultWidth * 0.5, vmetrics[0]]; + vmetrics = dict.get("W2"); + + if (vmetrics) { + for (i = 0, ii = vmetrics.length; i < ii; i++) { + start = xref.fetchIfRef(vmetrics[i++]); + code = xref.fetchIfRef(vmetrics[i]); + + if (Array.isArray(code)) { + for (j = 0, jj = code.length; j < jj; j++) { + glyphsVMetrics[start++] = [xref.fetchIfRef(code[j++]), xref.fetchIfRef(code[j++]), xref.fetchIfRef(code[j])]; + } + } else { + var vmetric = [xref.fetchIfRef(vmetrics[++i]), xref.fetchIfRef(vmetrics[++i]), xref.fetchIfRef(vmetrics[++i])]; + + for (j = start; j <= code; j++) { + glyphsVMetrics[j] = vmetric; + } + } + } + } + } + } else { + var firstChar = properties.firstChar; + widths = dict.get("Widths"); + + if (widths) { + j = firstChar; + + for (i = 0, ii = widths.length; i < ii; i++) { + glyphsWidths[j++] = xref.fetchIfRef(widths[i]); + } + + defaultWidth = parseFloat(descriptor.get("MissingWidth")) || 0; + } else { + var baseFontName = dict.get("BaseFont"); + + if ((0, _primitives.isName)(baseFontName)) { + var metrics = this.getBaseFontMetrics(baseFontName.name); + glyphsWidths = this.buildCharCodeToWidth(metrics.widths, properties); + defaultWidth = metrics.defaultWidth; + } + } + } + + var isMonospace = true; + var firstWidth = defaultWidth; + + for (var glyph in glyphsWidths) { + var glyphWidth = glyphsWidths[glyph]; + + if (!glyphWidth) { + continue; + } + + if (!firstWidth) { + firstWidth = glyphWidth; + continue; + } + + if (firstWidth !== glyphWidth) { + isMonospace = false; + break; + } + } + + if (isMonospace) { + properties.flags |= _fonts.FontFlags.FixedPitch; + } + + properties.defaultWidth = defaultWidth; + properties.widths = glyphsWidths; + properties.defaultVMetrics = defaultVMetrics; + properties.vmetrics = glyphsVMetrics; + }, + isSerifFont: function PartialEvaluator_isSerifFont(baseFontName) { + var fontNameWoStyle = baseFontName.split("-")[0]; + return fontNameWoStyle in (0, _standard_fonts.getSerifFonts)() || fontNameWoStyle.search(/serif/gi) !== -1; + }, + getBaseFontMetrics: function PartialEvaluator_getBaseFontMetrics(name) { + var defaultWidth = 0; + var widths = []; + var monospace = false; + var stdFontMap = (0, _standard_fonts.getStdFontMap)(); + var lookupName = stdFontMap[name] || name; + var Metrics = (0, _metrics.getMetrics)(); + + if (!(lookupName in Metrics)) { + if (this.isSerifFont(name)) { + lookupName = "Times-Roman"; + } else { + lookupName = "Helvetica"; + } + } + + var glyphWidths = Metrics[lookupName]; + + if ((0, _util.isNum)(glyphWidths)) { + defaultWidth = glyphWidths; + monospace = true; + } else { + widths = glyphWidths(); + } + + return { + defaultWidth, + monospace, + widths + }; + }, + buildCharCodeToWidth: function PartialEvaluator_bulildCharCodeToWidth(widthsByGlyphName, properties) { + var widths = Object.create(null); + var differences = properties.differences; + var encoding = properties.defaultEncoding; + + for (var charCode = 0; charCode < 256; charCode++) { + if (charCode in differences && widthsByGlyphName[differences[charCode]]) { + widths[charCode] = widthsByGlyphName[differences[charCode]]; + continue; + } + + if (charCode in encoding && widthsByGlyphName[encoding[charCode]]) { + widths[charCode] = widthsByGlyphName[encoding[charCode]]; + continue; + } + } + + return widths; + }, + preEvaluateFont: function PartialEvaluator_preEvaluateFont(dict) { + var baseDict = dict; + var type = dict.get("Subtype"); + + if (!(0, _primitives.isName)(type)) { + throw new _util.FormatError("invalid font Subtype"); + } + + var composite = false; + var uint8array; + + if (type.name === "Type0") { + var df = dict.get("DescendantFonts"); + + if (!df) { + throw new _util.FormatError("Descendant fonts are not specified"); + } + + dict = Array.isArray(df) ? this.xref.fetchIfRef(df[0]) : df; + type = dict.get("Subtype"); + + if (!(0, _primitives.isName)(type)) { + throw new _util.FormatError("invalid font Subtype"); + } + + composite = true; + } + + var descriptor = dict.get("FontDescriptor"); + + if (descriptor) { + var hash = new _murmurhash.MurmurHash3_64(); + var encoding = baseDict.getRaw("Encoding"); + + if ((0, _primitives.isName)(encoding)) { + hash.update(encoding.name); + } else if ((0, _primitives.isRef)(encoding)) { + hash.update(encoding.toString()); + } else if ((0, _primitives.isDict)(encoding)) { + var keys = encoding.getKeys(); + + for (var i = 0, ii = keys.length; i < ii; i++) { + var entry = encoding.getRaw(keys[i]); + + if ((0, _primitives.isName)(entry)) { + hash.update(entry.name); + } else if ((0, _primitives.isRef)(entry)) { + hash.update(entry.toString()); + } else if (Array.isArray(entry)) { + var diffLength = entry.length, + diffBuf = new Array(diffLength); + + for (var j = 0; j < diffLength; j++) { + var diffEntry = entry[j]; + + if ((0, _primitives.isName)(diffEntry)) { + diffBuf[j] = diffEntry.name; + } else if ((0, _util.isNum)(diffEntry) || (0, _primitives.isRef)(diffEntry)) { + diffBuf[j] = diffEntry.toString(); + } + } + + hash.update(diffBuf.join()); + } + } + } + + const firstChar = dict.get("FirstChar") || 0; + const lastChar = dict.get("LastChar") || (composite ? 0xffff : 0xff); + hash.update(`${firstChar}-${lastChar}`); + var toUnicode = dict.get("ToUnicode") || baseDict.get("ToUnicode"); + + if ((0, _primitives.isStream)(toUnicode)) { + var stream = toUnicode.str || toUnicode; + uint8array = stream.buffer ? new Uint8Array(stream.buffer.buffer, 0, stream.bufferLength) : new Uint8Array(stream.bytes.buffer, stream.start, stream.end - stream.start); + hash.update(uint8array); + } else if ((0, _primitives.isName)(toUnicode)) { + hash.update(toUnicode.name); + } + + var widths = dict.get("Widths") || baseDict.get("Widths"); + + if (widths) { + uint8array = new Uint8Array(new Uint32Array(widths).buffer); + hash.update(uint8array); + } + } + + return { + descriptor, + dict, + baseDict, + composite, + type: type.name, + hash: hash ? hash.hexdigest() : "" + }; + }, + translateFont: function PartialEvaluator_translateFont(preEvaluatedFont) { + var baseDict = preEvaluatedFont.baseDict; + var dict = preEvaluatedFont.dict; + var composite = preEvaluatedFont.composite; + var descriptor = preEvaluatedFont.descriptor; + var type = preEvaluatedFont.type; + var maxCharIndex = composite ? 0xffff : 0xff; + var properties; + const firstChar = dict.get("FirstChar") || 0; + const lastChar = dict.get("LastChar") || maxCharIndex; + + if (!descriptor) { + if (type === "Type3") { + descriptor = new _primitives.Dict(null); + descriptor.set("FontName", _primitives.Name.get(type)); + descriptor.set("FontBBox", dict.getArray("FontBBox") || [0, 0, 0, 0]); + } else { + var baseFontName = dict.get("BaseFont"); + + if (!(0, _primitives.isName)(baseFontName)) { + throw new _util.FormatError("Base font is not specified"); + } + + baseFontName = baseFontName.name.replace(/[,_]/g, "-"); + var metrics = this.getBaseFontMetrics(baseFontName); + var fontNameWoStyle = baseFontName.split("-")[0]; + var flags = (this.isSerifFont(fontNameWoStyle) ? _fonts.FontFlags.Serif : 0) | (metrics.monospace ? _fonts.FontFlags.FixedPitch : 0) | ((0, _standard_fonts.getSymbolsFonts)()[fontNameWoStyle] ? _fonts.FontFlags.Symbolic : _fonts.FontFlags.Nonsymbolic); + properties = { + type, + name: baseFontName, + widths: metrics.widths, + defaultWidth: metrics.defaultWidth, + flags, + firstChar, + lastChar + }; + const widths = dict.get("Widths"); + return this.extractDataStructures(dict, dict, properties).then(newProperties => { + if (widths) { + const glyphWidths = []; + let j = firstChar; + + for (let i = 0, ii = widths.length; i < ii; i++) { + glyphWidths[j++] = this.xref.fetchIfRef(widths[i]); + } + + newProperties.widths = glyphWidths; + } else { + newProperties.widths = this.buildCharCodeToWidth(metrics.widths, newProperties); + } + + return new _fonts.Font(baseFontName, null, newProperties); + }); + } + } + + var fontName = descriptor.get("FontName"); + var baseFont = dict.get("BaseFont"); + + if ((0, _util.isString)(fontName)) { + fontName = _primitives.Name.get(fontName); + } + + if ((0, _util.isString)(baseFont)) { + baseFont = _primitives.Name.get(baseFont); + } + + if (type !== "Type3") { + var fontNameStr = fontName && fontName.name; + var baseFontStr = baseFont && baseFont.name; + + if (fontNameStr !== baseFontStr) { + (0, _util.info)(`The FontDescriptor\'s FontName is "${fontNameStr}" but ` + `should be the same as the Font\'s BaseFont "${baseFontStr}".`); + + if (fontNameStr && baseFontStr && baseFontStr.startsWith(fontNameStr)) { + fontName = baseFont; + } + } + } + + fontName = fontName || baseFont; + + if (!(0, _primitives.isName)(fontName)) { + throw new _util.FormatError("invalid font name"); + } + + var fontFile = descriptor.get("FontFile", "FontFile2", "FontFile3"); + + if (fontFile) { + if (fontFile.dict) { + var subtype = fontFile.dict.get("Subtype"); + + if (subtype) { + subtype = subtype.name; + } + + var length1 = fontFile.dict.get("Length1"); + var length2 = fontFile.dict.get("Length2"); + var length3 = fontFile.dict.get("Length3"); + } + } + + properties = { + type, + name: fontName.name, + subtype, + file: fontFile, + length1, + length2, + length3, + loadedName: baseDict.loadedName, + composite, + fixedPitch: false, + fontMatrix: dict.getArray("FontMatrix") || _util.FONT_IDENTITY_MATRIX, + firstChar: firstChar || 0, + lastChar: lastChar || maxCharIndex, + bbox: descriptor.getArray("FontBBox"), + ascent: descriptor.get("Ascent"), + descent: descriptor.get("Descent"), + xHeight: descriptor.get("XHeight"), + capHeight: descriptor.get("CapHeight"), + flags: descriptor.get("Flags"), + italicAngle: descriptor.get("ItalicAngle"), + isType3Font: false + }; + var cMapPromise; + + if (composite) { + var cidEncoding = baseDict.get("Encoding"); + + if ((0, _primitives.isName)(cidEncoding)) { + properties.cidEncoding = cidEncoding.name; + } + + cMapPromise = _cmap.CMapFactory.create({ + encoding: cidEncoding, + fetchBuiltInCMap: this.fetchBuiltInCMap, + useCMap: null + }).then(function (cMap) { + properties.cMap = cMap; + properties.vertical = properties.cMap.vertical; + }); + } else { + cMapPromise = Promise.resolve(undefined); + } + + return cMapPromise.then(() => { + return this.extractDataStructures(dict, baseDict, properties); + }).then(newProperties => { + this.extractWidths(dict, descriptor, newProperties); + + if (type === "Type3") { + newProperties.isType3Font = true; + } + + return new _fonts.Font(fontName.name, fontFile, newProperties); + }); + } + }; + + PartialEvaluator.buildFontPaths = function (font, glyphs, handler) { + function buildPath(fontChar) { + if (font.renderer.hasBuiltPath(fontChar)) { + return; + } + + handler.send("commonobj", [`${font.loadedName}_path_${fontChar}`, "FontPath", font.renderer.getPathJs(fontChar)]); + } + + for (const glyph of glyphs) { + buildPath(glyph.fontChar); + const accent = glyph.accent; + + if (accent && accent.fontChar) { + buildPath(accent.fontChar); + } + } + }; + + PartialEvaluator.getFallbackFontDict = function () { + if (this._fallbackFontDict) { + return this._fallbackFontDict; + } + + const dict = new _primitives.Dict(); + dict.set("BaseFont", _primitives.Name.get("PDFJS-FallbackFont")); + dict.set("Type", _primitives.Name.get("FallbackType")); + dict.set("Subtype", _primitives.Name.get("FallbackType")); + dict.set("Encoding", _primitives.Name.get("WinAnsiEncoding")); + return this._fallbackFontDict = dict; + }; + + return PartialEvaluator; +}(); + +exports.PartialEvaluator = PartialEvaluator; + +class TranslatedFont { + constructor({ + loadedName, + font, + dict, + extraProperties = false + }) { + this.loadedName = loadedName; + this.font = font; + this.dict = dict; + this._extraProperties = extraProperties; + this.type3Loaded = null; + this.sent = false; + } + + send(handler) { + if (this.sent) { + return; + } + + this.sent = true; + handler.send("commonobj", [this.loadedName, "Font", this.font.exportData(this._extraProperties)]); + } + + fallback(handler) { + if (!this.font.data) { + return; + } + + this.font.disableFontFace = true; + const glyphs = this.font.glyphCacheValues; + PartialEvaluator.buildFontPaths(this.font, glyphs, handler); + } + + loadType3Data(evaluator, resources, parentOperatorList, task) { + if (!this.font.isType3Font) { + throw new Error("Must be a Type3 font."); + } + + if (this.type3Loaded) { + return this.type3Loaded; + } + + var type3Options = Object.create(evaluator.options); + type3Options.ignoreErrors = false; + var type3Evaluator = evaluator.clone(type3Options); + type3Evaluator.parsingType3Font = true; + var translatedFont = this.font; + var loadCharProcsPromise = Promise.resolve(); + var charProcs = this.dict.get("CharProcs"); + var fontResources = this.dict.get("Resources") || resources; + var charProcKeys = charProcs.getKeys(); + var charProcOperatorList = Object.create(null); + + for (var i = 0, n = charProcKeys.length; i < n; ++i) { + const key = charProcKeys[i]; + loadCharProcsPromise = loadCharProcsPromise.then(function () { + var glyphStream = charProcs.get(key); + var operatorList = new _operator_list.OperatorList(); + return type3Evaluator.getOperatorList({ + stream: glyphStream, + task, + resources: fontResources, + operatorList + }).then(function () { + charProcOperatorList[key] = operatorList.getIR(); + parentOperatorList.addDependencies(operatorList.dependencies); + }).catch(function (reason) { + (0, _util.warn)(`Type3 font resource "${key}" is not available.`); + const dummyOperatorList = new _operator_list.OperatorList(); + charProcOperatorList[key] = dummyOperatorList.getIR(); + }); + }); + } + + this.type3Loaded = loadCharProcsPromise.then(function () { + translatedFont.charProcOperatorList = charProcOperatorList; + }); + return this.type3Loaded; + } + +} + +var StateManager = function StateManagerClosure() { + function StateManager(initialState) { + this.state = initialState; + this.stateStack = []; + } + + StateManager.prototype = { + save() { + var old = this.state; + this.stateStack.push(this.state); + this.state = old.clone(); + }, + + restore() { + var prev = this.stateStack.pop(); + + if (prev) { + this.state = prev; + } + }, + + transform(args) { + this.state.ctm = _util.Util.transform(this.state.ctm, args); + } + + }; + return StateManager; +}(); + +var TextState = function TextStateClosure() { + function TextState() { + this.ctm = new Float32Array(_util.IDENTITY_MATRIX); + this.fontName = null; + this.fontSize = 0; + this.font = null; + this.fontMatrix = _util.FONT_IDENTITY_MATRIX; + this.textMatrix = _util.IDENTITY_MATRIX.slice(); + this.textLineMatrix = _util.IDENTITY_MATRIX.slice(); + this.charSpacing = 0; + this.wordSpacing = 0; + this.leading = 0; + this.textHScale = 1; + this.textRise = 0; + } + + TextState.prototype = { + setTextMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) { + var m = this.textMatrix; + m[0] = a; + m[1] = b; + m[2] = c; + m[3] = d; + m[4] = e; + m[5] = f; + }, + setTextLineMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) { + var m = this.textLineMatrix; + m[0] = a; + m[1] = b; + m[2] = c; + m[3] = d; + m[4] = e; + m[5] = f; + }, + translateTextMatrix: function TextState_translateTextMatrix(x, y) { + var m = this.textMatrix; + m[4] = m[0] * x + m[2] * y + m[4]; + m[5] = m[1] * x + m[3] * y + m[5]; + }, + translateTextLineMatrix: function TextState_translateTextMatrix(x, y) { + var m = this.textLineMatrix; + m[4] = m[0] * x + m[2] * y + m[4]; + m[5] = m[1] * x + m[3] * y + m[5]; + }, + calcTextLineMatrixAdvance: function TextState_calcTextLineMatrixAdvance(a, b, c, d, e, f) { + var font = this.font; + + if (!font) { + return null; + } + + var m = this.textLineMatrix; + + if (!(a === m[0] && b === m[1] && c === m[2] && d === m[3])) { + return null; + } + + var txDiff = e - m[4], + tyDiff = f - m[5]; + + if (font.vertical && txDiff !== 0 || !font.vertical && tyDiff !== 0) { + return null; + } + + var tx, + ty, + denominator = a * d - b * c; + + if (font.vertical) { + tx = -tyDiff * c / denominator; + ty = tyDiff * a / denominator; + } else { + tx = txDiff * d / denominator; + ty = -txDiff * b / denominator; + } + + return { + width: tx, + height: ty, + value: font.vertical ? ty : tx + }; + }, + calcRenderMatrix: function TextState_calcRendeMatrix(ctm) { + var tsm = [this.fontSize * this.textHScale, 0, 0, this.fontSize, 0, this.textRise]; + return _util.Util.transform(ctm, _util.Util.transform(this.textMatrix, tsm)); + }, + carriageReturn: function TextState_carriageReturn() { + this.translateTextLineMatrix(0, -this.leading); + this.textMatrix = this.textLineMatrix.slice(); + }, + clone: function TextState_clone() { + var clone = Object.create(this); + clone.textMatrix = this.textMatrix.slice(); + clone.textLineMatrix = this.textLineMatrix.slice(); + clone.fontMatrix = this.fontMatrix.slice(); + return clone; + } + }; + return TextState; +}(); + +var EvalState = function EvalStateClosure() { + function EvalState() { + this.ctm = new Float32Array(_util.IDENTITY_MATRIX); + this.font = null; + this.textRenderingMode = _util.TextRenderingMode.FILL; + this.fillColorSpace = _colorspace.ColorSpace.singletons.gray; + this.strokeColorSpace = _colorspace.ColorSpace.singletons.gray; + } + + EvalState.prototype = { + clone: function CanvasExtraState_clone() { + return Object.create(this); + } + }; + return EvalState; +}(); + +var EvaluatorPreprocessor = function EvaluatorPreprocessorClosure() { + var getOPMap = (0, _core_utils.getLookupTableFactory)(function (t) { + t.w = { + id: _util.OPS.setLineWidth, + numArgs: 1, + variableArgs: false + }; + t.J = { + id: _util.OPS.setLineCap, + numArgs: 1, + variableArgs: false + }; + t.j = { + id: _util.OPS.setLineJoin, + numArgs: 1, + variableArgs: false + }; + t.M = { + id: _util.OPS.setMiterLimit, + numArgs: 1, + variableArgs: false + }; + t.d = { + id: _util.OPS.setDash, + numArgs: 2, + variableArgs: false + }; + t.ri = { + id: _util.OPS.setRenderingIntent, + numArgs: 1, + variableArgs: false + }; + t.i = { + id: _util.OPS.setFlatness, + numArgs: 1, + variableArgs: false + }; + t.gs = { + id: _util.OPS.setGState, + numArgs: 1, + variableArgs: false + }; + t.q = { + id: _util.OPS.save, + numArgs: 0, + variableArgs: false + }; + t.Q = { + id: _util.OPS.restore, + numArgs: 0, + variableArgs: false + }; + t.cm = { + id: _util.OPS.transform, + numArgs: 6, + variableArgs: false + }; + t.m = { + id: _util.OPS.moveTo, + numArgs: 2, + variableArgs: false + }; + t.l = { + id: _util.OPS.lineTo, + numArgs: 2, + variableArgs: false + }; + t.c = { + id: _util.OPS.curveTo, + numArgs: 6, + variableArgs: false + }; + t.v = { + id: _util.OPS.curveTo2, + numArgs: 4, + variableArgs: false + }; + t.y = { + id: _util.OPS.curveTo3, + numArgs: 4, + variableArgs: false + }; + t.h = { + id: _util.OPS.closePath, + numArgs: 0, + variableArgs: false + }; + t.re = { + id: _util.OPS.rectangle, + numArgs: 4, + variableArgs: false + }; + t.S = { + id: _util.OPS.stroke, + numArgs: 0, + variableArgs: false + }; + t.s = { + id: _util.OPS.closeStroke, + numArgs: 0, + variableArgs: false + }; + t.f = { + id: _util.OPS.fill, + numArgs: 0, + variableArgs: false + }; + t.F = { + id: _util.OPS.fill, + numArgs: 0, + variableArgs: false + }; + t["f*"] = { + id: _util.OPS.eoFill, + numArgs: 0, + variableArgs: false + }; + t.B = { + id: _util.OPS.fillStroke, + numArgs: 0, + variableArgs: false + }; + t["B*"] = { + id: _util.OPS.eoFillStroke, + numArgs: 0, + variableArgs: false + }; + t.b = { + id: _util.OPS.closeFillStroke, + numArgs: 0, + variableArgs: false + }; + t["b*"] = { + id: _util.OPS.closeEOFillStroke, + numArgs: 0, + variableArgs: false + }; + t.n = { + id: _util.OPS.endPath, + numArgs: 0, + variableArgs: false + }; + t.W = { + id: _util.OPS.clip, + numArgs: 0, + variableArgs: false + }; + t["W*"] = { + id: _util.OPS.eoClip, + numArgs: 0, + variableArgs: false + }; + t.BT = { + id: _util.OPS.beginText, + numArgs: 0, + variableArgs: false + }; + t.ET = { + id: _util.OPS.endText, + numArgs: 0, + variableArgs: false + }; + t.Tc = { + id: _util.OPS.setCharSpacing, + numArgs: 1, + variableArgs: false + }; + t.Tw = { + id: _util.OPS.setWordSpacing, + numArgs: 1, + variableArgs: false + }; + t.Tz = { + id: _util.OPS.setHScale, + numArgs: 1, + variableArgs: false + }; + t.TL = { + id: _util.OPS.setLeading, + numArgs: 1, + variableArgs: false + }; + t.Tf = { + id: _util.OPS.setFont, + numArgs: 2, + variableArgs: false + }; + t.Tr = { + id: _util.OPS.setTextRenderingMode, + numArgs: 1, + variableArgs: false + }; + t.Ts = { + id: _util.OPS.setTextRise, + numArgs: 1, + variableArgs: false + }; + t.Td = { + id: _util.OPS.moveText, + numArgs: 2, + variableArgs: false + }; + t.TD = { + id: _util.OPS.setLeadingMoveText, + numArgs: 2, + variableArgs: false + }; + t.Tm = { + id: _util.OPS.setTextMatrix, + numArgs: 6, + variableArgs: false + }; + t["T*"] = { + id: _util.OPS.nextLine, + numArgs: 0, + variableArgs: false + }; + t.Tj = { + id: _util.OPS.showText, + numArgs: 1, + variableArgs: false + }; + t.TJ = { + id: _util.OPS.showSpacedText, + numArgs: 1, + variableArgs: false + }; + t["'"] = { + id: _util.OPS.nextLineShowText, + numArgs: 1, + variableArgs: false + }; + t['"'] = { + id: _util.OPS.nextLineSetSpacingShowText, + numArgs: 3, + variableArgs: false + }; + t.d0 = { + id: _util.OPS.setCharWidth, + numArgs: 2, + variableArgs: false + }; + t.d1 = { + id: _util.OPS.setCharWidthAndBounds, + numArgs: 6, + variableArgs: false + }; + t.CS = { + id: _util.OPS.setStrokeColorSpace, + numArgs: 1, + variableArgs: false + }; + t.cs = { + id: _util.OPS.setFillColorSpace, + numArgs: 1, + variableArgs: false + }; + t.SC = { + id: _util.OPS.setStrokeColor, + numArgs: 4, + variableArgs: true + }; + t.SCN = { + id: _util.OPS.setStrokeColorN, + numArgs: 33, + variableArgs: true + }; + t.sc = { + id: _util.OPS.setFillColor, + numArgs: 4, + variableArgs: true + }; + t.scn = { + id: _util.OPS.setFillColorN, + numArgs: 33, + variableArgs: true + }; + t.G = { + id: _util.OPS.setStrokeGray, + numArgs: 1, + variableArgs: false + }; + t.g = { + id: _util.OPS.setFillGray, + numArgs: 1, + variableArgs: false + }; + t.RG = { + id: _util.OPS.setStrokeRGBColor, + numArgs: 3, + variableArgs: false + }; + t.rg = { + id: _util.OPS.setFillRGBColor, + numArgs: 3, + variableArgs: false + }; + t.K = { + id: _util.OPS.setStrokeCMYKColor, + numArgs: 4, + variableArgs: false + }; + t.k = { + id: _util.OPS.setFillCMYKColor, + numArgs: 4, + variableArgs: false + }; + t.sh = { + id: _util.OPS.shadingFill, + numArgs: 1, + variableArgs: false + }; + t.BI = { + id: _util.OPS.beginInlineImage, + numArgs: 0, + variableArgs: false + }; + t.ID = { + id: _util.OPS.beginImageData, + numArgs: 0, + variableArgs: false + }; + t.EI = { + id: _util.OPS.endInlineImage, + numArgs: 1, + variableArgs: false + }; + t.Do = { + id: _util.OPS.paintXObject, + numArgs: 1, + variableArgs: false + }; + t.MP = { + id: _util.OPS.markPoint, + numArgs: 1, + variableArgs: false + }; + t.DP = { + id: _util.OPS.markPointProps, + numArgs: 2, + variableArgs: false + }; + t.BMC = { + id: _util.OPS.beginMarkedContent, + numArgs: 1, + variableArgs: false + }; + t.BDC = { + id: _util.OPS.beginMarkedContentProps, + numArgs: 2, + variableArgs: false + }; + t.EMC = { + id: _util.OPS.endMarkedContent, + numArgs: 0, + variableArgs: false + }; + t.BX = { + id: _util.OPS.beginCompat, + numArgs: 0, + variableArgs: false + }; + t.EX = { + id: _util.OPS.endCompat, + numArgs: 0, + variableArgs: false + }; + t.BM = null; + t.BD = null; + t.true = null; + t.fa = null; + t.fal = null; + t.fals = null; + t.false = null; + t.nu = null; + t.nul = null; + t.null = null; + }); + const MAX_INVALID_PATH_OPS = 20; + + function EvaluatorPreprocessor(stream, xref, stateManager) { + this.opMap = getOPMap(); + this.parser = new _parser.Parser({ + lexer: new _parser.Lexer(stream, this.opMap), + xref + }); + this.stateManager = stateManager; + this.nonProcessedArgs = []; + this._numInvalidPathOPS = 0; + } + + EvaluatorPreprocessor.prototype = { + get savedStatesDepth() { + return this.stateManager.stateStack.length; + }, + + read: function EvaluatorPreprocessor_read(operation) { + var args = operation.args; + + while (true) { + var obj = this.parser.getObj(); + + if (obj instanceof _primitives.Cmd) { + var cmd = obj.cmd; + var opSpec = this.opMap[cmd]; + + if (!opSpec) { + (0, _util.warn)(`Unknown command "${cmd}".`); + continue; + } + + var fn = opSpec.id; + var numArgs = opSpec.numArgs; + var argsLength = args !== null ? args.length : 0; + + if (!opSpec.variableArgs) { + if (argsLength !== numArgs) { + var nonProcessedArgs = this.nonProcessedArgs; + + while (argsLength > numArgs) { + nonProcessedArgs.push(args.shift()); + argsLength--; + } + + while (argsLength < numArgs && nonProcessedArgs.length !== 0) { + if (args === null) { + args = []; + } + + args.unshift(nonProcessedArgs.pop()); + argsLength++; + } + } + + if (argsLength < numArgs) { + const partialMsg = `command ${cmd}: expected ${numArgs} args, ` + `but received ${argsLength} args.`; + + if (fn >= _util.OPS.moveTo && fn <= _util.OPS.endPath && ++this._numInvalidPathOPS > MAX_INVALID_PATH_OPS) { + throw new _util.FormatError(`Invalid ${partialMsg}`); + } + + (0, _util.warn)(`Skipping ${partialMsg}`); + + if (args !== null) { + args.length = 0; + } + + continue; + } + } else if (argsLength > numArgs) { + (0, _util.info)(`Command ${cmd}: expected [0, ${numArgs}] args, ` + `but received ${argsLength} args.`); + } + + this.preprocessCommand(fn, args); + operation.fn = fn; + operation.args = args; + return true; + } + + if (obj === _primitives.EOF) { + return false; + } + + if (obj !== null) { + if (args === null) { + args = []; + } + + args.push(obj); + + if (args.length > 33) { + throw new _util.FormatError("Too many arguments"); + } + } + } + }, + preprocessCommand: function EvaluatorPreprocessor_preprocessCommand(fn, args) { + switch (fn | 0) { + case _util.OPS.save: + this.stateManager.save(); + break; + + case _util.OPS.restore: + this.stateManager.restore(); + break; + + case _util.OPS.transform: + this.stateManager.transform(args); + break; + } + } + }; + return EvaluatorPreprocessor; +}(); + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CMapFactory = exports.IdentityCMap = exports.CMap = void 0; + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +var _parser = __w_pdfjs_require__(11); + +var _core_utils = __w_pdfjs_require__(8); + +var _stream = __w_pdfjs_require__(12); + +var BUILT_IN_CMAPS = ["Adobe-GB1-UCS2", "Adobe-CNS1-UCS2", "Adobe-Japan1-UCS2", "Adobe-Korea1-UCS2", "78-EUC-H", "78-EUC-V", "78-H", "78-RKSJ-H", "78-RKSJ-V", "78-V", "78ms-RKSJ-H", "78ms-RKSJ-V", "83pv-RKSJ-H", "90ms-RKSJ-H", "90ms-RKSJ-V", "90msp-RKSJ-H", "90msp-RKSJ-V", "90pv-RKSJ-H", "90pv-RKSJ-V", "Add-H", "Add-RKSJ-H", "Add-RKSJ-V", "Add-V", "Adobe-CNS1-0", "Adobe-CNS1-1", "Adobe-CNS1-2", "Adobe-CNS1-3", "Adobe-CNS1-4", "Adobe-CNS1-5", "Adobe-CNS1-6", "Adobe-GB1-0", "Adobe-GB1-1", "Adobe-GB1-2", "Adobe-GB1-3", "Adobe-GB1-4", "Adobe-GB1-5", "Adobe-Japan1-0", "Adobe-Japan1-1", "Adobe-Japan1-2", "Adobe-Japan1-3", "Adobe-Japan1-4", "Adobe-Japan1-5", "Adobe-Japan1-6", "Adobe-Korea1-0", "Adobe-Korea1-1", "Adobe-Korea1-2", "B5-H", "B5-V", "B5pc-H", "B5pc-V", "CNS-EUC-H", "CNS-EUC-V", "CNS1-H", "CNS1-V", "CNS2-H", "CNS2-V", "ETHK-B5-H", "ETHK-B5-V", "ETen-B5-H", "ETen-B5-V", "ETenms-B5-H", "ETenms-B5-V", "EUC-H", "EUC-V", "Ext-H", "Ext-RKSJ-H", "Ext-RKSJ-V", "Ext-V", "GB-EUC-H", "GB-EUC-V", "GB-H", "GB-V", "GBK-EUC-H", "GBK-EUC-V", "GBK2K-H", "GBK2K-V", "GBKp-EUC-H", "GBKp-EUC-V", "GBT-EUC-H", "GBT-EUC-V", "GBT-H", "GBT-V", "GBTpc-EUC-H", "GBTpc-EUC-V", "GBpc-EUC-H", "GBpc-EUC-V", "H", "HKdla-B5-H", "HKdla-B5-V", "HKdlb-B5-H", "HKdlb-B5-V", "HKgccs-B5-H", "HKgccs-B5-V", "HKm314-B5-H", "HKm314-B5-V", "HKm471-B5-H", "HKm471-B5-V", "HKscs-B5-H", "HKscs-B5-V", "Hankaku", "Hiragana", "KSC-EUC-H", "KSC-EUC-V", "KSC-H", "KSC-Johab-H", "KSC-Johab-V", "KSC-V", "KSCms-UHC-H", "KSCms-UHC-HW-H", "KSCms-UHC-HW-V", "KSCms-UHC-V", "KSCpc-EUC-H", "KSCpc-EUC-V", "Katakana", "NWP-H", "NWP-V", "RKSJ-H", "RKSJ-V", "Roman", "UniCNS-UCS2-H", "UniCNS-UCS2-V", "UniCNS-UTF16-H", "UniCNS-UTF16-V", "UniCNS-UTF32-H", "UniCNS-UTF32-V", "UniCNS-UTF8-H", "UniCNS-UTF8-V", "UniGB-UCS2-H", "UniGB-UCS2-V", "UniGB-UTF16-H", "UniGB-UTF16-V", "UniGB-UTF32-H", "UniGB-UTF32-V", "UniGB-UTF8-H", "UniGB-UTF8-V", "UniJIS-UCS2-H", "UniJIS-UCS2-HW-H", "UniJIS-UCS2-HW-V", "UniJIS-UCS2-V", "UniJIS-UTF16-H", "UniJIS-UTF16-V", "UniJIS-UTF32-H", "UniJIS-UTF32-V", "UniJIS-UTF8-H", "UniJIS-UTF8-V", "UniJIS2004-UTF16-H", "UniJIS2004-UTF16-V", "UniJIS2004-UTF32-H", "UniJIS2004-UTF32-V", "UniJIS2004-UTF8-H", "UniJIS2004-UTF8-V", "UniJISPro-UCS2-HW-V", "UniJISPro-UCS2-V", "UniJISPro-UTF8-V", "UniJISX0213-UTF32-H", "UniJISX0213-UTF32-V", "UniJISX02132004-UTF32-H", "UniJISX02132004-UTF32-V", "UniKS-UCS2-H", "UniKS-UCS2-V", "UniKS-UTF16-H", "UniKS-UTF16-V", "UniKS-UTF32-H", "UniKS-UTF32-V", "UniKS-UTF8-H", "UniKS-UTF8-V", "V", "WP-Symbol"]; +const MAX_MAP_RANGE = 2 ** 24 - 1; + +class CMap { + constructor(builtInCMap = false) { + this.codespaceRanges = [[], [], [], []]; + this.numCodespaceRanges = 0; + this._map = []; + this.name = ""; + this.vertical = false; + this.useCMap = null; + this.builtInCMap = builtInCMap; + } + + addCodespaceRange(n, low, high) { + this.codespaceRanges[n - 1].push(low, high); + this.numCodespaceRanges++; + } + + mapCidRange(low, high, dstLow) { + if (high - low > MAX_MAP_RANGE) { + throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE."); + } + + while (low <= high) { + this._map[low++] = dstLow++; + } + } + + mapBfRange(low, high, dstLow) { + if (high - low > MAX_MAP_RANGE) { + throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE."); + } + + var lastByte = dstLow.length - 1; + + while (low <= high) { + this._map[low++] = dstLow; + dstLow = dstLow.substring(0, lastByte) + String.fromCharCode(dstLow.charCodeAt(lastByte) + 1); + } + } + + mapBfRangeToArray(low, high, array) { + if (high - low > MAX_MAP_RANGE) { + throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE."); + } + + const ii = array.length; + let i = 0; + + while (low <= high && i < ii) { + this._map[low] = array[i++]; + ++low; + } + } + + mapOne(src, dst) { + this._map[src] = dst; + } + + lookup(code) { + return this._map[code]; + } + + contains(code) { + return this._map[code] !== undefined; + } + + forEach(callback) { + const map = this._map; + const length = map.length; + + if (length <= 0x10000) { + for (let i = 0; i < length; i++) { + if (map[i] !== undefined) { + callback(i, map[i]); + } + } + } else { + for (const i in map) { + callback(i, map[i]); + } + } + } + + charCodeOf(value) { + const map = this._map; + + if (map.length <= 0x10000) { + return map.indexOf(value); + } + + for (const charCode in map) { + if (map[charCode] === value) { + return charCode | 0; + } + } + + return -1; + } + + getMap() { + return this._map; + } + + readCharCode(str, offset, out) { + let c = 0; + const codespaceRanges = this.codespaceRanges; + + for (let n = 0, nn = codespaceRanges.length; n < nn; n++) { + c = (c << 8 | str.charCodeAt(offset + n)) >>> 0; + const codespaceRange = codespaceRanges[n]; + + for (let k = 0, kk = codespaceRange.length; k < kk;) { + const low = codespaceRange[k++]; + const high = codespaceRange[k++]; + + if (c >= low && c <= high) { + out.charcode = c; + out.length = n + 1; + return; + } + } + } + + out.charcode = 0; + out.length = 1; + } + + get length() { + return this._map.length; + } + + get isIdentityCMap() { + if (!(this.name === "Identity-H" || this.name === "Identity-V")) { + return false; + } + + if (this._map.length !== 0x10000) { + return false; + } + + for (let i = 0; i < 0x10000; i++) { + if (this._map[i] !== i) { + return false; + } + } + + return true; + } + +} + +exports.CMap = CMap; + +class IdentityCMap extends CMap { + constructor(vertical, n) { + super(); + this.vertical = vertical; + this.addCodespaceRange(n, 0, 0xffff); + } + + mapCidRange(low, high, dstLow) { + (0, _util.unreachable)("should not call mapCidRange"); + } + + mapBfRange(low, high, dstLow) { + (0, _util.unreachable)("should not call mapBfRange"); + } + + mapBfRangeToArray(low, high, array) { + (0, _util.unreachable)("should not call mapBfRangeToArray"); + } + + mapOne(src, dst) { + (0, _util.unreachable)("should not call mapCidOne"); + } + + lookup(code) { + return Number.isInteger(code) && code <= 0xffff ? code : undefined; + } + + contains(code) { + return Number.isInteger(code) && code <= 0xffff; + } + + forEach(callback) { + for (let i = 0; i <= 0xffff; i++) { + callback(i, i); + } + } + + charCodeOf(value) { + return Number.isInteger(value) && value <= 0xffff ? value : -1; + } + + getMap() { + const map = new Array(0x10000); + + for (let i = 0; i <= 0xffff; i++) { + map[i] = i; + } + + return map; + } + + get length() { + return 0x10000; + } + + get isIdentityCMap() { + (0, _util.unreachable)("should not access .isIdentityCMap"); + } + +} + +exports.IdentityCMap = IdentityCMap; + +var BinaryCMapReader = function BinaryCMapReaderClosure() { + function hexToInt(a, size) { + var n = 0; + + for (var i = 0; i <= size; i++) { + n = n << 8 | a[i]; + } + + return n >>> 0; + } + + function hexToStr(a, size) { + if (size === 1) { + return String.fromCharCode(a[0], a[1]); + } + + if (size === 3) { + return String.fromCharCode(a[0], a[1], a[2], a[3]); + } + + return String.fromCharCode.apply(null, a.subarray(0, size + 1)); + } + + function addHex(a, b, size) { + var c = 0; + + for (var i = size; i >= 0; i--) { + c += a[i] + b[i]; + a[i] = c & 255; + c >>= 8; + } + } + + function incHex(a, size) { + var c = 1; + + for (var i = size; i >= 0 && c > 0; i--) { + c += a[i]; + a[i] = c & 255; + c >>= 8; + } + } + + var MAX_NUM_SIZE = 16; + var MAX_ENCODED_NUM_SIZE = 19; + + function BinaryCMapStream(data) { + this.buffer = data; + this.pos = 0; + this.end = data.length; + this.tmpBuf = new Uint8Array(MAX_ENCODED_NUM_SIZE); + } + + BinaryCMapStream.prototype = { + readByte() { + if (this.pos >= this.end) { + return -1; + } + + return this.buffer[this.pos++]; + }, + + readNumber() { + var n = 0; + var last; + + do { + var b = this.readByte(); + + if (b < 0) { + throw new _util.FormatError("unexpected EOF in bcmap"); + } + + last = !(b & 0x80); + n = n << 7 | b & 0x7f; + } while (!last); + + return n; + }, + + readSigned() { + var n = this.readNumber(); + return n & 1 ? ~(n >>> 1) : n >>> 1; + }, + + readHex(num, size) { + num.set(this.buffer.subarray(this.pos, this.pos + size + 1)); + this.pos += size + 1; + }, + + readHexNumber(num, size) { + var last; + var stack = this.tmpBuf, + sp = 0; + + do { + var b = this.readByte(); + + if (b < 0) { + throw new _util.FormatError("unexpected EOF in bcmap"); + } + + last = !(b & 0x80); + stack[sp++] = b & 0x7f; + } while (!last); + + var i = size, + buffer = 0, + bufferSize = 0; + + while (i >= 0) { + while (bufferSize < 8 && stack.length > 0) { + buffer = stack[--sp] << bufferSize | buffer; + bufferSize += 7; + } + + num[i] = buffer & 255; + i--; + buffer >>= 8; + bufferSize -= 8; + } + }, + + readHexSigned(num, size) { + this.readHexNumber(num, size); + var sign = num[size] & 1 ? 255 : 0; + var c = 0; + + for (var i = 0; i <= size; i++) { + c = (c & 1) << 8 | num[i]; + num[i] = c >> 1 ^ sign; + } + }, + + readString() { + var len = this.readNumber(); + var s = ""; + + for (var i = 0; i < len; i++) { + s += String.fromCharCode(this.readNumber()); + } + + return s; + } + + }; + + function processBinaryCMap(data, cMap, extend) { + return new Promise(function (resolve, reject) { + var stream = new BinaryCMapStream(data); + var header = stream.readByte(); + cMap.vertical = !!(header & 1); + var useCMap = null; + var start = new Uint8Array(MAX_NUM_SIZE); + var end = new Uint8Array(MAX_NUM_SIZE); + var char = new Uint8Array(MAX_NUM_SIZE); + var charCode = new Uint8Array(MAX_NUM_SIZE); + var tmp = new Uint8Array(MAX_NUM_SIZE); + var code; + var b; + + while ((b = stream.readByte()) >= 0) { + var type = b >> 5; + + if (type === 7) { + switch (b & 0x1f) { + case 0: + stream.readString(); + break; + + case 1: + useCMap = stream.readString(); + break; + } + + continue; + } + + var sequence = !!(b & 0x10); + var dataSize = b & 15; + + if (dataSize + 1 > MAX_NUM_SIZE) { + throw new Error("processBinaryCMap: Invalid dataSize."); + } + + var ucs2DataSize = 1; + var subitemsCount = stream.readNumber(); + var i; + + switch (type) { + case 0: + stream.readHex(start, dataSize); + stream.readHexNumber(end, dataSize); + addHex(end, start, dataSize); + cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize), hexToInt(end, dataSize)); + + for (i = 1; i < subitemsCount; i++) { + incHex(end, dataSize); + stream.readHexNumber(start, dataSize); + addHex(start, end, dataSize); + stream.readHexNumber(end, dataSize); + addHex(end, start, dataSize); + cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize), hexToInt(end, dataSize)); + } + + break; + + case 1: + stream.readHex(start, dataSize); + stream.readHexNumber(end, dataSize); + addHex(end, start, dataSize); + stream.readNumber(); + + for (i = 1; i < subitemsCount; i++) { + incHex(end, dataSize); + stream.readHexNumber(start, dataSize); + addHex(start, end, dataSize); + stream.readHexNumber(end, dataSize); + addHex(end, start, dataSize); + stream.readNumber(); + } + + break; + + case 2: + stream.readHex(char, dataSize); + code = stream.readNumber(); + cMap.mapOne(hexToInt(char, dataSize), code); + + for (i = 1; i < subitemsCount; i++) { + incHex(char, dataSize); + + if (!sequence) { + stream.readHexNumber(tmp, dataSize); + addHex(char, tmp, dataSize); + } + + code = stream.readSigned() + (code + 1); + cMap.mapOne(hexToInt(char, dataSize), code); + } + + break; + + case 3: + stream.readHex(start, dataSize); + stream.readHexNumber(end, dataSize); + addHex(end, start, dataSize); + code = stream.readNumber(); + cMap.mapCidRange(hexToInt(start, dataSize), hexToInt(end, dataSize), code); + + for (i = 1; i < subitemsCount; i++) { + incHex(end, dataSize); + + if (!sequence) { + stream.readHexNumber(start, dataSize); + addHex(start, end, dataSize); + } else { + start.set(end); + } + + stream.readHexNumber(end, dataSize); + addHex(end, start, dataSize); + code = stream.readNumber(); + cMap.mapCidRange(hexToInt(start, dataSize), hexToInt(end, dataSize), code); + } + + break; + + case 4: + stream.readHex(char, ucs2DataSize); + stream.readHex(charCode, dataSize); + cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); + + for (i = 1; i < subitemsCount; i++) { + incHex(char, ucs2DataSize); + + if (!sequence) { + stream.readHexNumber(tmp, ucs2DataSize); + addHex(char, tmp, ucs2DataSize); + } + + incHex(charCode, dataSize); + stream.readHexSigned(tmp, dataSize); + addHex(charCode, tmp, dataSize); + cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); + } + + break; + + case 5: + stream.readHex(start, ucs2DataSize); + stream.readHexNumber(end, ucs2DataSize); + addHex(end, start, ucs2DataSize); + stream.readHex(charCode, dataSize); + cMap.mapBfRange(hexToInt(start, ucs2DataSize), hexToInt(end, ucs2DataSize), hexToStr(charCode, dataSize)); + + for (i = 1; i < subitemsCount; i++) { + incHex(end, ucs2DataSize); + + if (!sequence) { + stream.readHexNumber(start, ucs2DataSize); + addHex(start, end, ucs2DataSize); + } else { + start.set(end); + } + + stream.readHexNumber(end, ucs2DataSize); + addHex(end, start, ucs2DataSize); + stream.readHex(charCode, dataSize); + cMap.mapBfRange(hexToInt(start, ucs2DataSize), hexToInt(end, ucs2DataSize), hexToStr(charCode, dataSize)); + } + + break; + + default: + reject(new Error("processBinaryCMap: Unknown type: " + type)); + return; + } + } + + if (useCMap) { + resolve(extend(useCMap)); + return; + } + + resolve(cMap); + }); + } + + function BinaryCMapReader() {} + + BinaryCMapReader.prototype = { + process: processBinaryCMap + }; + return BinaryCMapReader; +}(); + +var CMapFactory = function CMapFactoryClosure() { + function strToInt(str) { + var a = 0; + + for (var i = 0; i < str.length; i++) { + a = a << 8 | str.charCodeAt(i); + } + + return a >>> 0; + } + + function expectString(obj) { + if (!(0, _util.isString)(obj)) { + throw new _util.FormatError("Malformed CMap: expected string."); + } + } + + function expectInt(obj) { + if (!Number.isInteger(obj)) { + throw new _util.FormatError("Malformed CMap: expected int."); + } + } + + function parseBfChar(cMap, lexer) { + while (true) { + var obj = lexer.getObj(); + + if ((0, _primitives.isEOF)(obj)) { + break; + } + + if ((0, _primitives.isCmd)(obj, "endbfchar")) { + return; + } + + expectString(obj); + var src = strToInt(obj); + obj = lexer.getObj(); + expectString(obj); + var dst = obj; + cMap.mapOne(src, dst); + } + } + + function parseBfRange(cMap, lexer) { + while (true) { + var obj = lexer.getObj(); + + if ((0, _primitives.isEOF)(obj)) { + break; + } + + if ((0, _primitives.isCmd)(obj, "endbfrange")) { + return; + } + + expectString(obj); + var low = strToInt(obj); + obj = lexer.getObj(); + expectString(obj); + var high = strToInt(obj); + obj = lexer.getObj(); + + if (Number.isInteger(obj) || (0, _util.isString)(obj)) { + var dstLow = Number.isInteger(obj) ? String.fromCharCode(obj) : obj; + cMap.mapBfRange(low, high, dstLow); + } else if ((0, _primitives.isCmd)(obj, "[")) { + obj = lexer.getObj(); + var array = []; + + while (!(0, _primitives.isCmd)(obj, "]") && !(0, _primitives.isEOF)(obj)) { + array.push(obj); + obj = lexer.getObj(); + } + + cMap.mapBfRangeToArray(low, high, array); + } else { + break; + } + } + + throw new _util.FormatError("Invalid bf range."); + } + + function parseCidChar(cMap, lexer) { + while (true) { + var obj = lexer.getObj(); + + if ((0, _primitives.isEOF)(obj)) { + break; + } + + if ((0, _primitives.isCmd)(obj, "endcidchar")) { + return; + } + + expectString(obj); + var src = strToInt(obj); + obj = lexer.getObj(); + expectInt(obj); + var dst = obj; + cMap.mapOne(src, dst); + } + } + + function parseCidRange(cMap, lexer) { + while (true) { + var obj = lexer.getObj(); + + if ((0, _primitives.isEOF)(obj)) { + break; + } + + if ((0, _primitives.isCmd)(obj, "endcidrange")) { + return; + } + + expectString(obj); + var low = strToInt(obj); + obj = lexer.getObj(); + expectString(obj); + var high = strToInt(obj); + obj = lexer.getObj(); + expectInt(obj); + var dstLow = obj; + cMap.mapCidRange(low, high, dstLow); + } + } + + function parseCodespaceRange(cMap, lexer) { + while (true) { + var obj = lexer.getObj(); + + if ((0, _primitives.isEOF)(obj)) { + break; + } + + if ((0, _primitives.isCmd)(obj, "endcodespacerange")) { + return; + } + + if (!(0, _util.isString)(obj)) { + break; + } + + var low = strToInt(obj); + obj = lexer.getObj(); + + if (!(0, _util.isString)(obj)) { + break; + } + + var high = strToInt(obj); + cMap.addCodespaceRange(obj.length, low, high); + } + + throw new _util.FormatError("Invalid codespace range."); + } + + function parseWMode(cMap, lexer) { + var obj = lexer.getObj(); + + if (Number.isInteger(obj)) { + cMap.vertical = !!obj; + } + } + + function parseCMapName(cMap, lexer) { + var obj = lexer.getObj(); + + if ((0, _primitives.isName)(obj) && (0, _util.isString)(obj.name)) { + cMap.name = obj.name; + } + } + + function parseCMap(cMap, lexer, fetchBuiltInCMap, useCMap) { + var previous; + var embeddedUseCMap; + + objLoop: while (true) { + try { + var obj = lexer.getObj(); + + if ((0, _primitives.isEOF)(obj)) { + break; + } else if ((0, _primitives.isName)(obj)) { + if (obj.name === "WMode") { + parseWMode(cMap, lexer); + } else if (obj.name === "CMapName") { + parseCMapName(cMap, lexer); + } + + previous = obj; + } else if ((0, _primitives.isCmd)(obj)) { + switch (obj.cmd) { + case "endcmap": + break objLoop; + + case "usecmap": + if ((0, _primitives.isName)(previous)) { + embeddedUseCMap = previous.name; + } + + break; + + case "begincodespacerange": + parseCodespaceRange(cMap, lexer); + break; + + case "beginbfchar": + parseBfChar(cMap, lexer); + break; + + case "begincidchar": + parseCidChar(cMap, lexer); + break; + + case "beginbfrange": + parseBfRange(cMap, lexer); + break; + + case "begincidrange": + parseCidRange(cMap, lexer); + break; + } + } + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + (0, _util.warn)("Invalid cMap data: " + ex); + continue; + } + } + + if (!useCMap && embeddedUseCMap) { + useCMap = embeddedUseCMap; + } + + if (useCMap) { + return extendCMap(cMap, fetchBuiltInCMap, useCMap); + } + + return Promise.resolve(cMap); + } + + function extendCMap(cMap, fetchBuiltInCMap, useCMap) { + return createBuiltInCMap(useCMap, fetchBuiltInCMap).then(function (newCMap) { + cMap.useCMap = newCMap; + + if (cMap.numCodespaceRanges === 0) { + var useCodespaceRanges = cMap.useCMap.codespaceRanges; + + for (var i = 0; i < useCodespaceRanges.length; i++) { + cMap.codespaceRanges[i] = useCodespaceRanges[i].slice(); + } + + cMap.numCodespaceRanges = cMap.useCMap.numCodespaceRanges; + } + + cMap.useCMap.forEach(function (key, value) { + if (!cMap.contains(key)) { + cMap.mapOne(key, cMap.useCMap.lookup(key)); + } + }); + return cMap; + }); + } + + function createBuiltInCMap(name, fetchBuiltInCMap) { + if (name === "Identity-H") { + return Promise.resolve(new IdentityCMap(false, 2)); + } else if (name === "Identity-V") { + return Promise.resolve(new IdentityCMap(true, 2)); + } + + if (!BUILT_IN_CMAPS.includes(name)) { + return Promise.reject(new Error("Unknown CMap name: " + name)); + } + + if (!fetchBuiltInCMap) { + return Promise.reject(new Error("Built-in CMap parameters are not provided.")); + } + + return fetchBuiltInCMap(name).then(function (data) { + var cMapData = data.cMapData, + compressionType = data.compressionType; + var cMap = new CMap(true); + + if (compressionType === _util.CMapCompressionType.BINARY) { + return new BinaryCMapReader().process(cMapData, cMap, function (useCMap) { + return extendCMap(cMap, fetchBuiltInCMap, useCMap); + }); + } + + if (compressionType === _util.CMapCompressionType.NONE) { + var lexer = new _parser.Lexer(new _stream.Stream(cMapData)); + return parseCMap(cMap, lexer, fetchBuiltInCMap, null); + } + + return Promise.reject(new Error("TODO: Only BINARY/NONE CMap compression is currently supported.")); + }); + } + + return { + async create(params) { + var encoding = params.encoding; + var fetchBuiltInCMap = params.fetchBuiltInCMap; + var useCMap = params.useCMap; + + if ((0, _primitives.isName)(encoding)) { + return createBuiltInCMap(encoding.name, fetchBuiltInCMap); + } else if ((0, _primitives.isStream)(encoding)) { + var cMap = new CMap(); + var lexer = new _parser.Lexer(encoding); + return parseCMap(cMap, lexer, fetchBuiltInCMap, useCMap).then(function (parsedCMap) { + if (parsedCMap.isIdentityCMap) { + return createBuiltInCMap(parsedCMap.name, fetchBuiltInCMap); + } + + return parsedCMap; + }); + } + + throw new Error("Encoding required."); + } + + }; +}(); + +exports.CMapFactory = CMapFactory; + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getFontType = getFontType; +exports.IdentityToUnicodeMap = exports.ToUnicodeMap = exports.FontFlags = exports.Font = exports.ErrorFont = exports.SEAC_ANALYSIS_ENABLED = void 0; + +var _util = __w_pdfjs_require__(2); + +var _cff_parser = __w_pdfjs_require__(30); + +var _glyphlist = __w_pdfjs_require__(33); + +var _encodings = __w_pdfjs_require__(32); + +var _standard_fonts = __w_pdfjs_require__(34); + +var _unicode = __w_pdfjs_require__(35); + +var _core_utils = __w_pdfjs_require__(8); + +var _font_renderer = __w_pdfjs_require__(36); + +var _cmap = __w_pdfjs_require__(28); + +var _stream = __w_pdfjs_require__(12); + +var _type1_parser = __w_pdfjs_require__(37); + +const PRIVATE_USE_AREAS = [[0xe000, 0xf8ff], [0x100000, 0x10fffd]]; +var PDF_GLYPH_SPACE_UNITS = 1000; +var SEAC_ANALYSIS_ENABLED = true; +exports.SEAC_ANALYSIS_ENABLED = SEAC_ANALYSIS_ENABLED; +const EXPORT_DATA_PROPERTIES = ["ascent", "bbox", "black", "bold", "charProcOperatorList", "composite", "data", "defaultVMetrics", "defaultWidth", "descent", "fallbackName", "fontMatrix", "fontType", "isMonospace", "isSerifFont", "isType3Font", "italic", "loadedName", "mimetype", "missingFile", "name", "remeasure", "subtype", "type", "vertical"]; +const EXPORT_DATA_EXTRA_PROPERTIES = ["cMap", "defaultEncoding", "differences", "isSymbolicFont", "seacMap", "toFontChar", "toUnicode", "vmetrics", "widths"]; +var FontFlags = { + FixedPitch: 1, + Serif: 2, + Symbolic: 4, + Script: 8, + Nonsymbolic: 32, + Italic: 64, + AllCap: 65536, + SmallCap: 131072, + ForceBold: 262144 +}; +exports.FontFlags = FontFlags; +var MacStandardGlyphOrdering = [".notdef", ".null", "nonmarkingreturn", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "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", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "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", "braceleft", "bar", "braceright", "asciitilde", "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", "aacute", "agrave", "acircumflex", "adieresis", "atilde", "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling", "section", "bullet", "paragraph", "germandbls", "registered", "copyright", "trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", "yen", "mu", "partialdiff", "summation", "product", "pi", "integral", "ordfeminine", "ordmasculine", "Omega", "ae", "oslash", "questiondown", "exclamdown", "logicalnot", "radical", "florin", "approxequal", "Delta", "guillemotleft", "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde", "Otilde", "OE", "oe", "endash", "emdash", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", "lozenge", "ydieresis", "Ydieresis", "fraction", "currency", "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl", "periodcentered", "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi", "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "Lslash", "lslash", "Scaron", "scaron", "Zcaron", "zcaron", "brokenbar", "Eth", "eth", "Yacute", "yacute", "Thorn", "thorn", "minus", "multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf", "onequarter", "threequarters", "franc", "Gbreve", "gbreve", "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute", "Ccaron", "ccaron", "dcroat"]; + +function adjustWidths(properties) { + if (!properties.fontMatrix) { + return; + } + + if (properties.fontMatrix[0] === _util.FONT_IDENTITY_MATRIX[0]) { + return; + } + + var scale = 0.001 / properties.fontMatrix[0]; + var glyphsWidths = properties.widths; + + for (var glyph in glyphsWidths) { + glyphsWidths[glyph] *= scale; + } + + properties.defaultWidth *= scale; +} + +function adjustToUnicode(properties, builtInEncoding) { + if (properties.hasIncludedToUnicodeMap) { + return; + } + + if (properties.hasEncoding) { + return; + } + + if (builtInEncoding === properties.defaultEncoding) { + return; + } + + if (properties.toUnicode instanceof IdentityToUnicodeMap) { + return; + } + + var toUnicode = [], + glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); + + for (var charCode in builtInEncoding) { + var glyphName = builtInEncoding[charCode]; + var unicode = (0, _unicode.getUnicodeForGlyph)(glyphName, glyphsUnicodeMap); + + if (unicode !== -1) { + toUnicode[charCode] = String.fromCharCode(unicode); + } + } + + properties.toUnicode.amend(toUnicode); +} + +function getFontType(type, subtype) { + switch (type) { + case "Type1": + return subtype === "Type1C" ? _util.FontType.TYPE1C : _util.FontType.TYPE1; + + case "CIDFontType0": + return subtype === "CIDFontType0C" ? _util.FontType.CIDFONTTYPE0C : _util.FontType.CIDFONTTYPE0; + + case "OpenType": + return _util.FontType.OPENTYPE; + + case "TrueType": + return _util.FontType.TRUETYPE; + + case "CIDFontType2": + return _util.FontType.CIDFONTTYPE2; + + case "MMType1": + return _util.FontType.MMTYPE1; + + case "Type0": + return _util.FontType.TYPE0; + + default: + return _util.FontType.UNKNOWN; + } +} + +function recoverGlyphName(name, glyphsUnicodeMap) { + if (glyphsUnicodeMap[name] !== undefined) { + return name; + } + + var unicode = (0, _unicode.getUnicodeForGlyph)(name, glyphsUnicodeMap); + + if (unicode !== -1) { + for (var key in glyphsUnicodeMap) { + if (glyphsUnicodeMap[key] === unicode) { + return key; + } + } + } + + (0, _util.info)("Unable to recover a standard glyph name for: " + name); + return name; +} + +var Glyph = function GlyphClosure() { + function Glyph(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont) { + this.fontChar = fontChar; + this.unicode = unicode; + this.accent = accent; + this.width = width; + this.vmetric = vmetric; + this.operatorListId = operatorListId; + this.isSpace = isSpace; + this.isInFont = isInFont; + } + + Glyph.prototype.matchesForCache = function (fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont) { + return this.fontChar === fontChar && this.unicode === unicode && this.accent === accent && this.width === width && this.vmetric === vmetric && this.operatorListId === operatorListId && this.isSpace === isSpace && this.isInFont === isInFont; + }; + + return Glyph; +}(); + +var ToUnicodeMap = function ToUnicodeMapClosure() { + function ToUnicodeMap(cmap = []) { + this._map = cmap; + } + + ToUnicodeMap.prototype = { + get length() { + return this._map.length; + }, + + forEach(callback) { + for (var charCode in this._map) { + callback(charCode, this._map[charCode].charCodeAt(0)); + } + }, + + has(i) { + return this._map[i] !== undefined; + }, + + get(i) { + return this._map[i]; + }, + + charCodeOf(value) { + const map = this._map; + + if (map.length <= 0x10000) { + return map.indexOf(value); + } + + for (const charCode in map) { + if (map[charCode] === value) { + return charCode | 0; + } + } + + return -1; + }, + + amend(map) { + for (var charCode in map) { + this._map[charCode] = map[charCode]; + } + } + + }; + return ToUnicodeMap; +}(); + +exports.ToUnicodeMap = ToUnicodeMap; + +var IdentityToUnicodeMap = function IdentityToUnicodeMapClosure() { + function IdentityToUnicodeMap(firstChar, lastChar) { + this.firstChar = firstChar; + this.lastChar = lastChar; + } + + IdentityToUnicodeMap.prototype = { + get length() { + return this.lastChar + 1 - this.firstChar; + }, + + forEach(callback) { + for (var i = this.firstChar, ii = this.lastChar; i <= ii; i++) { + callback(i, i); + } + }, + + has(i) { + return this.firstChar <= i && i <= this.lastChar; + }, + + get(i) { + if (this.firstChar <= i && i <= this.lastChar) { + return String.fromCharCode(i); + } + + return undefined; + }, + + charCodeOf(v) { + return Number.isInteger(v) && v >= this.firstChar && v <= this.lastChar ? v : -1; + }, + + amend(map) { + (0, _util.unreachable)("Should not call amend()"); + } + + }; + return IdentityToUnicodeMap; +}(); + +exports.IdentityToUnicodeMap = IdentityToUnicodeMap; + +var OpenTypeFileBuilder = function OpenTypeFileBuilderClosure() { + function writeInt16(dest, offset, num) { + dest[offset] = num >> 8 & 0xff; + dest[offset + 1] = num & 0xff; + } + + function writeInt32(dest, offset, num) { + dest[offset] = num >> 24 & 0xff; + dest[offset + 1] = num >> 16 & 0xff; + dest[offset + 2] = num >> 8 & 0xff; + dest[offset + 3] = num & 0xff; + } + + function writeData(dest, offset, data) { + var i, ii; + + if (data instanceof Uint8Array) { + dest.set(data, offset); + } else if (typeof data === "string") { + for (i = 0, ii = data.length; i < ii; i++) { + dest[offset++] = data.charCodeAt(i) & 0xff; + } + } else { + for (i = 0, ii = data.length; i < ii; i++) { + dest[offset++] = data[i] & 0xff; + } + } + } + + function OpenTypeFileBuilder(sfnt) { + this.sfnt = sfnt; + this.tables = Object.create(null); + } + + OpenTypeFileBuilder.getSearchParams = function OpenTypeFileBuilder_getSearchParams(entriesCount, entrySize) { + var maxPower2 = 1, + log2 = 0; + + while ((maxPower2 ^ entriesCount) > maxPower2) { + maxPower2 <<= 1; + log2++; + } + + var searchRange = maxPower2 * entrySize; + return { + range: searchRange, + entry: log2, + rangeShift: entrySize * entriesCount - searchRange + }; + }; + + var OTF_HEADER_SIZE = 12; + var OTF_TABLE_ENTRY_SIZE = 16; + OpenTypeFileBuilder.prototype = { + toArray: function OpenTypeFileBuilder_toArray() { + var sfnt = this.sfnt; + var tables = this.tables; + var tablesNames = Object.keys(tables); + tablesNames.sort(); + var numTables = tablesNames.length; + var i, j, jj, table, tableName; + var offset = OTF_HEADER_SIZE + numTables * OTF_TABLE_ENTRY_SIZE; + var tableOffsets = [offset]; + + for (i = 0; i < numTables; i++) { + table = tables[tablesNames[i]]; + var paddedLength = (table.length + 3 & ~3) >>> 0; + offset += paddedLength; + tableOffsets.push(offset); + } + + var file = new Uint8Array(offset); + + for (i = 0; i < numTables; i++) { + table = tables[tablesNames[i]]; + writeData(file, tableOffsets[i], table); + } + + if (sfnt === "true") { + sfnt = (0, _util.string32)(0x00010000); + } + + file[0] = sfnt.charCodeAt(0) & 0xff; + file[1] = sfnt.charCodeAt(1) & 0xff; + file[2] = sfnt.charCodeAt(2) & 0xff; + file[3] = sfnt.charCodeAt(3) & 0xff; + writeInt16(file, 4, numTables); + var searchParams = OpenTypeFileBuilder.getSearchParams(numTables, 16); + writeInt16(file, 6, searchParams.range); + writeInt16(file, 8, searchParams.entry); + writeInt16(file, 10, searchParams.rangeShift); + offset = OTF_HEADER_SIZE; + + for (i = 0; i < numTables; i++) { + tableName = tablesNames[i]; + file[offset] = tableName.charCodeAt(0) & 0xff; + file[offset + 1] = tableName.charCodeAt(1) & 0xff; + file[offset + 2] = tableName.charCodeAt(2) & 0xff; + file[offset + 3] = tableName.charCodeAt(3) & 0xff; + var checksum = 0; + + for (j = tableOffsets[i], jj = tableOffsets[i + 1]; j < jj; j += 4) { + var quad = (0, _core_utils.readUint32)(file, j); + checksum = checksum + quad >>> 0; + } + + writeInt32(file, offset + 4, checksum); + writeInt32(file, offset + 8, tableOffsets[i]); + writeInt32(file, offset + 12, tables[tableName].length); + offset += OTF_TABLE_ENTRY_SIZE; + } + + return file; + }, + addTable: function OpenTypeFileBuilder_addTable(tag, data) { + if (tag in this.tables) { + throw new Error("Table " + tag + " already exists"); + } + + this.tables[tag] = data; + } + }; + return OpenTypeFileBuilder; +}(); + +var Font = function FontClosure() { + function Font(name, file, properties) { + var charCode; + this.name = name; + this.loadedName = properties.loadedName; + this.isType3Font = properties.isType3Font; + this.missingFile = false; + this.glyphCache = Object.create(null); + this.isSerifFont = !!(properties.flags & FontFlags.Serif); + this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); + this.isMonospace = !!(properties.flags & FontFlags.FixedPitch); + var type = properties.type; + var subtype = properties.subtype; + this.type = type; + this.subtype = subtype; + let fallbackName = "sans-serif"; + + if (this.isMonospace) { + fallbackName = "monospace"; + } else if (this.isSerifFont) { + fallbackName = "serif"; + } + + this.fallbackName = fallbackName; + this.differences = properties.differences; + this.widths = properties.widths; + this.defaultWidth = properties.defaultWidth; + this.composite = properties.composite; + this.cMap = properties.cMap; + this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS; + this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS; + this.fontMatrix = properties.fontMatrix; + this.bbox = properties.bbox; + this.defaultEncoding = properties.defaultEncoding; + this.toUnicode = properties.toUnicode; + this.fallbackToUnicode = properties.fallbackToUnicode || new ToUnicodeMap(); + this.toFontChar = []; + + if (properties.type === "Type3") { + for (charCode = 0; charCode < 256; charCode++) { + this.toFontChar[charCode] = this.differences[charCode] || properties.defaultEncoding[charCode]; + } + + this.fontType = _util.FontType.TYPE3; + return; + } + + this.cidEncoding = properties.cidEncoding; + this.vertical = !!properties.vertical; + + if (this.vertical) { + this.vmetrics = properties.vmetrics; + this.defaultVMetrics = properties.defaultVMetrics; + } + + if (!file || file.isEmpty) { + if (file) { + (0, _util.warn)('Font file is empty in "' + name + '" (' + this.loadedName + ")"); + } + + this.fallbackToSystemFont(); + return; + } + + [type, subtype] = getFontFileType(file, properties); + + if (type !== this.type || subtype !== this.subtype) { + (0, _util.info)("Inconsistent font file Type/SubType, expected: " + `${this.type}/${this.subtype} but found: ${type}/${subtype}.`); + } + + try { + var data; + + switch (type) { + case "MMType1": + (0, _util.info)("MMType1 font (" + name + "), falling back to Type1."); + + case "Type1": + case "CIDFontType0": + this.mimetype = "font/opentype"; + var cff = subtype === "Type1C" || subtype === "CIDFontType0C" ? new CFFFont(file, properties) : new Type1Font(name, file, properties); + adjustWidths(properties); + data = this.convert(name, cff, properties); + break; + + case "OpenType": + case "TrueType": + case "CIDFontType2": + this.mimetype = "font/opentype"; + data = this.checkAndRepair(name, file, properties); + + if (this.isOpenType) { + adjustWidths(properties); + type = "OpenType"; + } + + break; + + default: + throw new _util.FormatError(`Font ${type} is not supported`); + } + } catch (e) { + (0, _util.warn)(e); + this.fallbackToSystemFont(); + return; + } + + this.data = data; + this.fontType = getFontType(type, subtype); + this.fontMatrix = properties.fontMatrix; + this.widths = properties.widths; + this.defaultWidth = properties.defaultWidth; + this.toUnicode = properties.toUnicode; + this.seacMap = properties.seacMap; + } + + Font.getFontID = function () { + var ID = 1; + return function Font_getFontID() { + return String(ID++); + }; + }(); + + function int16(b0, b1) { + return (b0 << 8) + b1; + } + + function writeSignedInt16(bytes, index, value) { + bytes[index + 1] = value; + bytes[index] = value >>> 8; + } + + function signedInt16(b0, b1) { + var value = (b0 << 8) + b1; + return value & 1 << 15 ? value - 0x10000 : value; + } + + function int32(b0, b1, b2, b3) { + return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; + } + + function string16(value) { + return String.fromCharCode(value >> 8 & 0xff, value & 0xff); + } + + function safeString16(value) { + if (value > 0x7fff) { + value = 0x7fff; + } else if (value < -0x8000) { + value = -0x8000; + } + + return String.fromCharCode(value >> 8 & 0xff, value & 0xff); + } + + function isTrueTypeFile(file) { + var header = file.peekBytes(4); + return (0, _core_utils.readUint32)(header, 0) === 0x00010000 || (0, _util.bytesToString)(header) === "true"; + } + + function isTrueTypeCollectionFile(file) { + const header = file.peekBytes(4); + return (0, _util.bytesToString)(header) === "ttcf"; + } + + function isOpenTypeFile(file) { + var header = file.peekBytes(4); + return (0, _util.bytesToString)(header) === "OTTO"; + } + + function isType1File(file) { + var header = file.peekBytes(2); + + if (header[0] === 0x25 && header[1] === 0x21) { + return true; + } + + if (header[0] === 0x80 && header[1] === 0x01) { + return true; + } + + return false; + } + + function isCFFFile(file) { + const header = file.peekBytes(4); + + if (header[0] >= 1 && header[3] >= 1 && header[3] <= 4) { + return true; + } + + return false; + } + + function getFontFileType(file, { + type, + subtype, + composite + }) { + let fileType, fileSubtype; + + if (isTrueTypeFile(file) || isTrueTypeCollectionFile(file)) { + if (composite) { + fileType = "CIDFontType2"; + } else { + fileType = "TrueType"; + } + } else if (isOpenTypeFile(file)) { + if (composite) { + fileType = "CIDFontType2"; + } else { + fileType = "OpenType"; + } + } else if (isType1File(file)) { + if (composite) { + fileType = "CIDFontType0"; + } else { + fileType = type === "MMType1" ? "MMType1" : "Type1"; + } + } else if (isCFFFile(file)) { + if (composite) { + fileType = "CIDFontType0"; + fileSubtype = "CIDFontType0C"; + } else { + fileType = type === "MMType1" ? "MMType1" : "Type1"; + fileSubtype = "Type1C"; + } + } else { + (0, _util.warn)("getFontFileType: Unable to detect correct font file Type/Subtype."); + fileType = type; + fileSubtype = subtype; + } + + return [fileType, fileSubtype]; + } + + function buildToFontChar(encoding, glyphsUnicodeMap, differences) { + var toFontChar = [], + unicode; + + for (var i = 0, ii = encoding.length; i < ii; i++) { + unicode = (0, _unicode.getUnicodeForGlyph)(encoding[i], glyphsUnicodeMap); + + if (unicode !== -1) { + toFontChar[i] = unicode; + } + } + + for (var charCode in differences) { + unicode = (0, _unicode.getUnicodeForGlyph)(differences[charCode], glyphsUnicodeMap); + + if (unicode !== -1) { + toFontChar[+charCode] = unicode; + } + } + + return toFontChar; + } + + function adjustMapping(charCodeToGlyphId, hasGlyph, newGlyphZeroId) { + var newMap = Object.create(null); + var toFontChar = []; + var privateUseAreaIndex = 0; + var nextAvailableFontCharCode = PRIVATE_USE_AREAS[privateUseAreaIndex][0]; + var privateUseOffetEnd = PRIVATE_USE_AREAS[privateUseAreaIndex][1]; + + for (var originalCharCode in charCodeToGlyphId) { + originalCharCode |= 0; + var glyphId = charCodeToGlyphId[originalCharCode]; + + if (!hasGlyph(glyphId)) { + continue; + } + + if (nextAvailableFontCharCode > privateUseOffetEnd) { + privateUseAreaIndex++; + + if (privateUseAreaIndex >= PRIVATE_USE_AREAS.length) { + (0, _util.warn)("Ran out of space in font private use area."); + break; + } + + nextAvailableFontCharCode = PRIVATE_USE_AREAS[privateUseAreaIndex][0]; + privateUseOffetEnd = PRIVATE_USE_AREAS[privateUseAreaIndex][1]; + } + + var fontCharCode = nextAvailableFontCharCode++; + + if (glyphId === 0) { + glyphId = newGlyphZeroId; + } + + newMap[fontCharCode] = glyphId; + toFontChar[originalCharCode] = fontCharCode; + } + + return { + toFontChar, + charCodeToGlyphId: newMap, + nextAvailableFontCharCode + }; + } + + function getRanges(glyphs, numGlyphs) { + var codes = []; + + for (var charCode in glyphs) { + if (glyphs[charCode] >= numGlyphs) { + continue; + } + + codes.push({ + fontCharCode: charCode | 0, + glyphId: glyphs[charCode] + }); + } + + if (codes.length === 0) { + codes.push({ + fontCharCode: 0, + glyphId: 0 + }); + } + + codes.sort(function fontGetRangesSort(a, b) { + return a.fontCharCode - b.fontCharCode; + }); + var ranges = []; + var length = codes.length; + + for (var n = 0; n < length;) { + var start = codes[n].fontCharCode; + var codeIndices = [codes[n].glyphId]; + ++n; + var end = start; + + while (n < length && end + 1 === codes[n].fontCharCode) { + codeIndices.push(codes[n].glyphId); + ++end; + ++n; + + if (end === 0xffff) { + break; + } + } + + ranges.push([start, end, codeIndices]); + } + + return ranges; + } + + function createCmapTable(glyphs, numGlyphs) { + var ranges = getRanges(glyphs, numGlyphs); + var numTables = ranges[ranges.length - 1][1] > 0xffff ? 2 : 1; + var cmap = "\x00\x00" + string16(numTables) + "\x00\x03" + "\x00\x01" + (0, _util.string32)(4 + numTables * 8); + var i, ii, j, jj; + + for (i = ranges.length - 1; i >= 0; --i) { + if (ranges[i][0] <= 0xffff) { + break; + } + } + + var bmpLength = i + 1; + + if (ranges[i][0] < 0xffff && ranges[i][1] === 0xffff) { + ranges[i][1] = 0xfffe; + } + + var trailingRangesCount = ranges[i][1] < 0xffff ? 1 : 0; + var segCount = bmpLength + trailingRangesCount; + var searchParams = OpenTypeFileBuilder.getSearchParams(segCount, 2); + var startCount = ""; + var endCount = ""; + var idDeltas = ""; + var idRangeOffsets = ""; + var glyphsIds = ""; + var bias = 0; + var range, start, end, codes; + + for (i = 0, ii = bmpLength; i < ii; i++) { + range = ranges[i]; + start = range[0]; + end = range[1]; + startCount += string16(start); + endCount += string16(end); + codes = range[2]; + var contiguous = true; + + for (j = 1, jj = codes.length; j < jj; ++j) { + if (codes[j] !== codes[j - 1] + 1) { + contiguous = false; + break; + } + } + + if (!contiguous) { + var offset = (segCount - i) * 2 + bias * 2; + bias += end - start + 1; + idDeltas += string16(0); + idRangeOffsets += string16(offset); + + for (j = 0, jj = codes.length; j < jj; ++j) { + glyphsIds += string16(codes[j]); + } + } else { + var startCode = codes[0]; + idDeltas += string16(startCode - start & 0xffff); + idRangeOffsets += string16(0); + } + } + + if (trailingRangesCount > 0) { + endCount += "\xFF\xFF"; + startCount += "\xFF\xFF"; + idDeltas += "\x00\x01"; + idRangeOffsets += "\x00\x00"; + } + + var format314 = "\x00\x00" + string16(2 * segCount) + string16(searchParams.range) + string16(searchParams.entry) + string16(searchParams.rangeShift) + endCount + "\x00\x00" + startCount + idDeltas + idRangeOffsets + glyphsIds; + var format31012 = ""; + var header31012 = ""; + + if (numTables > 1) { + cmap += "\x00\x03" + "\x00\x0A" + (0, _util.string32)(4 + numTables * 8 + 4 + format314.length); + format31012 = ""; + + for (i = 0, ii = ranges.length; i < ii; i++) { + range = ranges[i]; + start = range[0]; + codes = range[2]; + var code = codes[0]; + + for (j = 1, jj = codes.length; j < jj; ++j) { + if (codes[j] !== codes[j - 1] + 1) { + end = range[0] + j - 1; + format31012 += (0, _util.string32)(start) + (0, _util.string32)(end) + (0, _util.string32)(code); + start = end + 1; + code = codes[j]; + } + } + + format31012 += (0, _util.string32)(start) + (0, _util.string32)(range[1]) + (0, _util.string32)(code); + } + + header31012 = "\x00\x0C" + "\x00\x00" + (0, _util.string32)(format31012.length + 16) + "\x00\x00\x00\x00" + (0, _util.string32)(format31012.length / 12); + } + + return cmap + "\x00\x04" + string16(format314.length + 4) + format314 + header31012 + format31012; + } + + function validateOS2Table(os2, file) { + file.pos = (file.start || 0) + os2.offset; + var version = file.getUint16(); + file.skip(60); + var selection = file.getUint16(); + + if (version < 4 && selection & 0x0300) { + return false; + } + + var firstChar = file.getUint16(); + var lastChar = file.getUint16(); + + if (firstChar > lastChar) { + return false; + } + + file.skip(6); + var usWinAscent = file.getUint16(); + + if (usWinAscent === 0) { + return false; + } + + os2.data[8] = os2.data[9] = 0; + return true; + } + + function createOS2Table(properties, charstrings, override) { + override = override || { + unitsPerEm: 0, + yMax: 0, + yMin: 0, + ascent: 0, + descent: 0 + }; + var ulUnicodeRange1 = 0; + var ulUnicodeRange2 = 0; + var ulUnicodeRange3 = 0; + var ulUnicodeRange4 = 0; + var firstCharIndex = null; + var lastCharIndex = 0; + + if (charstrings) { + for (var code in charstrings) { + code |= 0; + + if (firstCharIndex > code || !firstCharIndex) { + firstCharIndex = code; + } + + if (lastCharIndex < code) { + lastCharIndex = code; + } + + var position = (0, _unicode.getUnicodeRangeFor)(code); + + if (position < 32) { + ulUnicodeRange1 |= 1 << position; + } else if (position < 64) { + ulUnicodeRange2 |= 1 << position - 32; + } else if (position < 96) { + ulUnicodeRange3 |= 1 << position - 64; + } else if (position < 123) { + ulUnicodeRange4 |= 1 << position - 96; + } else { + throw new _util.FormatError("Unicode ranges Bits > 123 are reserved for internal usage"); + } + } + + if (lastCharIndex > 0xffff) { + lastCharIndex = 0xffff; + } + } else { + firstCharIndex = 0; + lastCharIndex = 255; + } + + var bbox = properties.bbox || [0, 0, 0, 0]; + var unitsPerEm = override.unitsPerEm || 1 / (properties.fontMatrix || _util.FONT_IDENTITY_MATRIX)[0]; + var scale = properties.ascentScaled ? 1.0 : unitsPerEm / PDF_GLYPH_SPACE_UNITS; + var typoAscent = override.ascent || Math.round(scale * (properties.ascent || bbox[3])); + var typoDescent = override.descent || Math.round(scale * (properties.descent || bbox[1])); + + if (typoDescent > 0 && properties.descent > 0 && bbox[1] < 0) { + typoDescent = -typoDescent; + } + + var winAscent = override.yMax || typoAscent; + var winDescent = -override.yMin || -typoDescent; + return "\x00\x03" + "\x02\x24" + "\x01\xF4" + "\x00\x05" + "\x00\x00" + "\x02\x8A" + "\x02\xBB" + "\x00\x00" + "\x00\x8C" + "\x02\x8A" + "\x02\xBB" + "\x00\x00" + "\x01\xDF" + "\x00\x31" + "\x01\x02" + "\x00\x00" + "\x00\x00\x06" + String.fromCharCode(properties.fixedPitch ? 0x09 : 0x00) + "\x00\x00\x00\x00\x00\x00" + (0, _util.string32)(ulUnicodeRange1) + (0, _util.string32)(ulUnicodeRange2) + (0, _util.string32)(ulUnicodeRange3) + (0, _util.string32)(ulUnicodeRange4) + "\x2A\x32\x31\x2A" + string16(properties.italicAngle ? 1 : 0) + string16(firstCharIndex || properties.firstChar) + string16(lastCharIndex || properties.lastChar) + string16(typoAscent) + string16(typoDescent) + "\x00\x64" + string16(winAscent) + string16(winDescent) + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + string16(properties.xHeight) + string16(properties.capHeight) + string16(0) + string16(firstCharIndex || properties.firstChar) + "\x00\x03"; + } + + function createPostTable(properties) { + var angle = Math.floor(properties.italicAngle * 2 ** 16); + return "\x00\x03\x00\x00" + (0, _util.string32)(angle) + "\x00\x00" + "\x00\x00" + (0, _util.string32)(properties.fixedPitch) + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00"; + } + + function createNameTable(name, proto) { + if (!proto) { + proto = [[], []]; + } + + var strings = [proto[0][0] || "Original licence", proto[0][1] || name, proto[0][2] || "Unknown", proto[0][3] || "uniqueID", proto[0][4] || name, proto[0][5] || "Version 0.11", proto[0][6] || "", proto[0][7] || "Unknown", proto[0][8] || "Unknown", proto[0][9] || "Unknown"]; + var stringsUnicode = []; + var i, ii, j, jj, str; + + for (i = 0, ii = strings.length; i < ii; i++) { + str = proto[1][i] || strings[i]; + var strBufUnicode = []; + + for (j = 0, jj = str.length; j < jj; j++) { + strBufUnicode.push(string16(str.charCodeAt(j))); + } + + stringsUnicode.push(strBufUnicode.join("")); + } + + var names = [strings, stringsUnicode]; + var platforms = ["\x00\x01", "\x00\x03"]; + var encodings = ["\x00\x00", "\x00\x01"]; + var languages = ["\x00\x00", "\x04\x09"]; + var namesRecordCount = strings.length * platforms.length; + var nameTable = "\x00\x00" + string16(namesRecordCount) + string16(namesRecordCount * 12 + 6); + var strOffset = 0; + + for (i = 0, ii = platforms.length; i < ii; i++) { + var strs = names[i]; + + for (j = 0, jj = strs.length; j < jj; j++) { + str = strs[j]; + var nameRecord = platforms[i] + encodings[i] + languages[i] + string16(j) + string16(str.length) + string16(strOffset); + nameTable += nameRecord; + strOffset += str.length; + } + } + + nameTable += strings.join("") + stringsUnicode.join(""); + return nameTable; + } + + Font.prototype = { + name: null, + font: null, + mimetype: null, + disableFontFace: false, + + get renderer() { + var renderer = _font_renderer.FontRendererFactory.create(this, SEAC_ANALYSIS_ENABLED); + + return (0, _util.shadow)(this, "renderer", renderer); + }, + + exportData(extraProperties = false) { + const exportDataProperties = extraProperties ? [...EXPORT_DATA_PROPERTIES, ...EXPORT_DATA_EXTRA_PROPERTIES] : EXPORT_DATA_PROPERTIES; + const data = Object.create(null); + let property, value; + + for (property of exportDataProperties) { + value = this[property]; + + if (value !== undefined) { + data[property] = value; + } + } + + return data; + }, + + fallbackToSystemFont: function Font_fallbackToSystemFont() { + this.missingFile = true; + var name = this.name; + var type = this.type; + var subtype = this.subtype; + let fontName = name.replace(/[,_]/g, "-").replace(/\s/g, ""); + var stdFontMap = (0, _standard_fonts.getStdFontMap)(), + nonStdFontMap = (0, _standard_fonts.getNonStdFontMap)(); + var isStandardFont = !!stdFontMap[fontName] || !!(nonStdFontMap[fontName] && stdFontMap[nonStdFontMap[fontName]]); + fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName; + this.bold = fontName.search(/bold/gi) !== -1; + this.italic = fontName.search(/oblique/gi) !== -1 || fontName.search(/italic/gi) !== -1; + this.black = name.search(/Black/g) !== -1; + this.remeasure = Object.keys(this.widths).length > 0; + + if (isStandardFont && type === "CIDFontType2" && this.cidEncoding.startsWith("Identity-")) { + const GlyphMapForStandardFonts = (0, _standard_fonts.getGlyphMapForStandardFonts)(); + const map = []; + + for (const charCode in GlyphMapForStandardFonts) { + map[+charCode] = GlyphMapForStandardFonts[charCode]; + } + + if (/Arial-?Black/i.test(name)) { + var SupplementalGlyphMapForArialBlack = (0, _standard_fonts.getSupplementalGlyphMapForArialBlack)(); + + for (const charCode in SupplementalGlyphMapForArialBlack) { + map[+charCode] = SupplementalGlyphMapForArialBlack[charCode]; + } + } else if (/Calibri/i.test(name)) { + const SupplementalGlyphMapForCalibri = (0, _standard_fonts.getSupplementalGlyphMapForCalibri)(); + + for (const charCode in SupplementalGlyphMapForCalibri) { + map[+charCode] = SupplementalGlyphMapForCalibri[charCode]; + } + } + + var isIdentityUnicode = this.toUnicode instanceof IdentityToUnicodeMap; + + if (!isIdentityUnicode) { + this.toUnicode.forEach(function (charCode, unicodeCharCode) { + map[+charCode] = unicodeCharCode; + }); + } + + this.toFontChar = map; + this.toUnicode = new ToUnicodeMap(map); + } else if (/Symbol/i.test(fontName)) { + this.toFontChar = buildToFontChar(_encodings.SymbolSetEncoding, (0, _glyphlist.getGlyphsUnicode)(), this.differences); + } else if (/Dingbats/i.test(fontName)) { + if (/Wingdings/i.test(name)) { + (0, _util.warn)("Non-embedded Wingdings font, falling back to ZapfDingbats."); + } + + this.toFontChar = buildToFontChar(_encodings.ZapfDingbatsEncoding, (0, _glyphlist.getDingbatsGlyphsUnicode)(), this.differences); + } else if (isStandardFont) { + this.toFontChar = buildToFontChar(this.defaultEncoding, (0, _glyphlist.getGlyphsUnicode)(), this.differences); + } else { + const glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); + const map = []; + this.toUnicode.forEach((charCode, unicodeCharCode) => { + if (!this.composite) { + var glyphName = this.differences[charCode] || this.defaultEncoding[charCode]; + const unicode = (0, _unicode.getUnicodeForGlyph)(glyphName, glyphsUnicodeMap); + + if (unicode !== -1) { + unicodeCharCode = unicode; + } + } + + map[+charCode] = unicodeCharCode; + }); + + if (this.composite && this.toUnicode instanceof IdentityToUnicodeMap) { + if (/Verdana/i.test(name)) { + const GlyphMapForStandardFonts = (0, _standard_fonts.getGlyphMapForStandardFonts)(); + + for (const charCode in GlyphMapForStandardFonts) { + map[+charCode] = GlyphMapForStandardFonts[charCode]; + } + } + } + + this.toFontChar = map; + } + + this.loadedName = fontName.split("-")[0]; + this.fontType = getFontType(type, subtype); + }, + checkAndRepair: function Font_checkAndRepair(name, font, properties) { + const VALID_TABLES = ["OS/2", "cmap", "head", "hhea", "hmtx", "maxp", "name", "post", "loca", "glyf", "fpgm", "prep", "cvt ", "CFF "]; + + function readTables(file, numTables) { + const tables = Object.create(null); + tables["OS/2"] = null; + tables.cmap = null; + tables.head = null; + tables.hhea = null; + tables.hmtx = null; + tables.maxp = null; + tables.name = null; + tables.post = null; + + for (let i = 0; i < numTables; i++) { + const table = readTableEntry(file); + + if (!VALID_TABLES.includes(table.tag)) { + continue; + } + + if (table.length === 0) { + continue; + } + + tables[table.tag] = table; + } + + return tables; + } + + function readTableEntry(file) { + var tag = (0, _util.bytesToString)(file.getBytes(4)); + var checksum = file.getInt32() >>> 0; + var offset = file.getInt32() >>> 0; + var length = file.getInt32() >>> 0; + var previousPosition = file.pos; + file.pos = file.start ? file.start : 0; + file.skip(offset); + var data = file.getBytes(length); + file.pos = previousPosition; + + if (tag === "head") { + data[8] = data[9] = data[10] = data[11] = 0; + data[17] |= 0x20; + } + + return { + tag, + checksum, + length, + offset, + data + }; + } + + function readOpenTypeHeader(ttf) { + return { + version: (0, _util.bytesToString)(ttf.getBytes(4)), + numTables: ttf.getUint16(), + searchRange: ttf.getUint16(), + entrySelector: ttf.getUint16(), + rangeShift: ttf.getUint16() + }; + } + + function readTrueTypeCollectionHeader(ttc) { + const ttcTag = (0, _util.bytesToString)(ttc.getBytes(4)); + (0, _util.assert)(ttcTag === "ttcf", "Must be a TrueType Collection font."); + const majorVersion = ttc.getUint16(); + const minorVersion = ttc.getUint16(); + const numFonts = ttc.getInt32() >>> 0; + const offsetTable = []; + + for (let i = 0; i < numFonts; i++) { + offsetTable.push(ttc.getInt32() >>> 0); + } + + const header = { + ttcTag, + majorVersion, + minorVersion, + numFonts, + offsetTable + }; + + switch (majorVersion) { + case 1: + return header; + + case 2: + header.dsigTag = ttc.getInt32() >>> 0; + header.dsigLength = ttc.getInt32() >>> 0; + header.dsigOffset = ttc.getInt32() >>> 0; + return header; + } + + throw new _util.FormatError(`Invalid TrueType Collection majorVersion: ${majorVersion}.`); + } + + function readTrueTypeCollectionData(ttc, fontName) { + const { + numFonts, + offsetTable + } = readTrueTypeCollectionHeader(ttc); + + for (let i = 0; i < numFonts; i++) { + ttc.pos = (ttc.start || 0) + offsetTable[i]; + const potentialHeader = readOpenTypeHeader(ttc); + const potentialTables = readTables(ttc, potentialHeader.numTables); + + if (!potentialTables.name) { + throw new _util.FormatError('TrueType Collection font must contain a "name" table.'); + } + + const nameTable = readNameTable(potentialTables.name); + + for (let j = 0, jj = nameTable.length; j < jj; j++) { + for (let k = 0, kk = nameTable[j].length; k < kk; k++) { + const nameEntry = nameTable[j][k]; + + if (nameEntry && nameEntry.replace(/\s/g, "") === fontName) { + return { + header: potentialHeader, + tables: potentialTables + }; + } + } + } + } + + throw new _util.FormatError(`TrueType Collection does not contain "${fontName}" font.`); + } + + function readCmapTable(cmap, file, isSymbolicFont, hasEncoding) { + if (!cmap) { + (0, _util.warn)("No cmap table available."); + return { + platformId: -1, + encodingId: -1, + mappings: [], + hasShortCmap: false + }; + } + + var segment; + var start = (file.start ? file.start : 0) + cmap.offset; + file.pos = start; + file.skip(2); + var numTables = file.getUint16(); + var potentialTable; + var canBreak = false; + + for (var i = 0; i < numTables; i++) { + var platformId = file.getUint16(); + var encodingId = file.getUint16(); + var offset = file.getInt32() >>> 0; + var useTable = false; + + if (potentialTable && potentialTable.platformId === platformId && potentialTable.encodingId === encodingId) { + continue; + } + + if (platformId === 0 && encodingId === 0) { + useTable = true; + } else if (platformId === 1 && encodingId === 0) { + useTable = true; + } else if (platformId === 3 && encodingId === 1 && (hasEncoding || !potentialTable)) { + useTable = true; + + if (!isSymbolicFont) { + canBreak = true; + } + } else if (isSymbolicFont && platformId === 3 && encodingId === 0) { + useTable = true; + canBreak = true; + } + + if (useTable) { + potentialTable = { + platformId, + encodingId, + offset + }; + } + + if (canBreak) { + break; + } + } + + if (potentialTable) { + file.pos = start + potentialTable.offset; + } + + if (!potentialTable || file.peekByte() === -1) { + (0, _util.warn)("Could not find a preferred cmap table."); + return { + platformId: -1, + encodingId: -1, + mappings: [], + hasShortCmap: false + }; + } + + var format = file.getUint16(); + file.skip(2 + 2); + var hasShortCmap = false; + var mappings = []; + var j, glyphId; + + if (format === 0) { + for (j = 0; j < 256; j++) { + var index = file.getByte(); + + if (!index) { + continue; + } + + mappings.push({ + charCode: j, + glyphId: index + }); + } + + hasShortCmap = true; + } else if (format === 4) { + var segCount = file.getUint16() >> 1; + file.skip(6); + var segIndex, + segments = []; + + for (segIndex = 0; segIndex < segCount; segIndex++) { + segments.push({ + end: file.getUint16() + }); + } + + file.skip(2); + + for (segIndex = 0; segIndex < segCount; segIndex++) { + segments[segIndex].start = file.getUint16(); + } + + for (segIndex = 0; segIndex < segCount; segIndex++) { + segments[segIndex].delta = file.getUint16(); + } + + var offsetsCount = 0; + + for (segIndex = 0; segIndex < segCount; segIndex++) { + segment = segments[segIndex]; + var rangeOffset = file.getUint16(); + + if (!rangeOffset) { + segment.offsetIndex = -1; + continue; + } + + var offsetIndex = (rangeOffset >> 1) - (segCount - segIndex); + segment.offsetIndex = offsetIndex; + offsetsCount = Math.max(offsetsCount, offsetIndex + segment.end - segment.start + 1); + } + + var offsets = []; + + for (j = 0; j < offsetsCount; j++) { + offsets.push(file.getUint16()); + } + + for (segIndex = 0; segIndex < segCount; segIndex++) { + segment = segments[segIndex]; + start = segment.start; + var end = segment.end; + var delta = segment.delta; + offsetIndex = segment.offsetIndex; + + for (j = start; j <= end; j++) { + if (j === 0xffff) { + continue; + } + + glyphId = offsetIndex < 0 ? j : offsets[offsetIndex + j - start]; + glyphId = glyphId + delta & 0xffff; + mappings.push({ + charCode: j, + glyphId + }); + } + } + } else if (format === 6) { + var firstCode = file.getUint16(); + var entryCount = file.getUint16(); + + for (j = 0; j < entryCount; j++) { + glyphId = file.getUint16(); + var charCode = firstCode + j; + mappings.push({ + charCode, + glyphId + }); + } + } else { + (0, _util.warn)("cmap table has unsupported format: " + format); + return { + platformId: -1, + encodingId: -1, + mappings: [], + hasShortCmap: false + }; + } + + mappings.sort(function (a, b) { + return a.charCode - b.charCode; + }); + + for (i = 1; i < mappings.length; i++) { + if (mappings[i - 1].charCode === mappings[i].charCode) { + mappings.splice(i, 1); + i--; + } + } + + return { + platformId: potentialTable.platformId, + encodingId: potentialTable.encodingId, + mappings, + hasShortCmap + }; + } + + function sanitizeMetrics(file, header, metrics, numGlyphs, dupFirstEntry) { + if (!header) { + if (metrics) { + metrics.data = null; + } + + return; + } + + file.pos = (file.start ? file.start : 0) + header.offset; + file.pos += 4; + file.pos += 2; + file.pos += 2; + file.pos += 2; + file.pos += 2; + file.pos += 2; + file.pos += 2; + file.pos += 2; + file.pos += 2; + file.pos += 2; + file.pos += 2; + file.pos += 8; + file.pos += 2; + var numOfMetrics = file.getUint16(); + + if (numOfMetrics > numGlyphs) { + (0, _util.info)("The numOfMetrics (" + numOfMetrics + ") should not be " + "greater than the numGlyphs (" + numGlyphs + ")"); + numOfMetrics = numGlyphs; + header.data[34] = (numOfMetrics & 0xff00) >> 8; + header.data[35] = numOfMetrics & 0x00ff; + } + + var numOfSidebearings = numGlyphs - numOfMetrics; + var numMissing = numOfSidebearings - (metrics.length - numOfMetrics * 4 >> 1); + + if (numMissing > 0) { + var entries = new Uint8Array(metrics.length + numMissing * 2); + entries.set(metrics.data); + + if (dupFirstEntry) { + entries[metrics.length] = metrics.data[2]; + entries[metrics.length + 1] = metrics.data[3]; + } + + metrics.data = entries; + } + } + + function sanitizeGlyph(source, sourceStart, sourceEnd, dest, destStart, hintsValid) { + var glyphProfile = { + length: 0, + sizeOfInstructions: 0 + }; + + if (sourceEnd - sourceStart <= 12) { + return glyphProfile; + } + + var glyf = source.subarray(sourceStart, sourceEnd); + var contoursCount = signedInt16(glyf[0], glyf[1]); + + if (contoursCount < 0) { + contoursCount = -1; + writeSignedInt16(glyf, 0, contoursCount); + dest.set(glyf, destStart); + glyphProfile.length = glyf.length; + return glyphProfile; + } + + var i, + j = 10, + flagsCount = 0; + + for (i = 0; i < contoursCount; i++) { + var endPoint = glyf[j] << 8 | glyf[j + 1]; + flagsCount = endPoint + 1; + j += 2; + } + + var instructionsStart = j; + var instructionsLength = glyf[j] << 8 | glyf[j + 1]; + glyphProfile.sizeOfInstructions = instructionsLength; + j += 2 + instructionsLength; + var instructionsEnd = j; + var coordinatesLength = 0; + + for (i = 0; i < flagsCount; i++) { + var flag = glyf[j++]; + + if (flag & 0xc0) { + glyf[j - 1] = flag & 0x3f; + } + + let xLength = 2; + + if (flag & 2) { + xLength = 1; + } else if (flag & 16) { + xLength = 0; + } + + let yLength = 2; + + if (flag & 4) { + yLength = 1; + } else if (flag & 32) { + yLength = 0; + } + + const xyLength = xLength + yLength; + coordinatesLength += xyLength; + + if (flag & 8) { + var repeat = glyf[j++]; + i += repeat; + coordinatesLength += repeat * xyLength; + } + } + + if (coordinatesLength === 0) { + return glyphProfile; + } + + var glyphDataLength = j + coordinatesLength; + + if (glyphDataLength > glyf.length) { + return glyphProfile; + } + + if (!hintsValid && instructionsLength > 0) { + dest.set(glyf.subarray(0, instructionsStart), destStart); + dest.set([0, 0], destStart + instructionsStart); + dest.set(glyf.subarray(instructionsEnd, glyphDataLength), destStart + instructionsStart + 2); + glyphDataLength -= instructionsLength; + + if (glyf.length - glyphDataLength > 3) { + glyphDataLength = glyphDataLength + 3 & ~3; + } + + glyphProfile.length = glyphDataLength; + return glyphProfile; + } + + if (glyf.length - glyphDataLength > 3) { + glyphDataLength = glyphDataLength + 3 & ~3; + dest.set(glyf.subarray(0, glyphDataLength), destStart); + glyphProfile.length = glyphDataLength; + return glyphProfile; + } + + dest.set(glyf, destStart); + glyphProfile.length = glyf.length; + return glyphProfile; + } + + function sanitizeHead(head, numGlyphs, locaLength) { + var data = head.data; + var version = int32(data[0], data[1], data[2], data[3]); + + if (version >> 16 !== 1) { + (0, _util.info)("Attempting to fix invalid version in head table: " + version); + data[0] = 0; + data[1] = 1; + data[2] = 0; + data[3] = 0; + } + + var indexToLocFormat = int16(data[50], data[51]); + + if (indexToLocFormat < 0 || indexToLocFormat > 1) { + (0, _util.info)("Attempting to fix invalid indexToLocFormat in head table: " + indexToLocFormat); + var numGlyphsPlusOne = numGlyphs + 1; + + if (locaLength === numGlyphsPlusOne << 1) { + data[50] = 0; + data[51] = 0; + } else if (locaLength === numGlyphsPlusOne << 2) { + data[50] = 0; + data[51] = 1; + } else { + throw new _util.FormatError("Could not fix indexToLocFormat: " + indexToLocFormat); + } + } + } + + function sanitizeGlyphLocations(loca, glyf, numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry, maxSizeOfInstructions) { + var itemSize, itemDecode, itemEncode; + + if (isGlyphLocationsLong) { + itemSize = 4; + + itemDecode = function fontItemDecodeLong(data, offset) { + return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; + }; + + itemEncode = function fontItemEncodeLong(data, offset, value) { + data[offset] = value >>> 24 & 0xff; + data[offset + 1] = value >> 16 & 0xff; + data[offset + 2] = value >> 8 & 0xff; + data[offset + 3] = value & 0xff; + }; + } else { + itemSize = 2; + + itemDecode = function fontItemDecode(data, offset) { + return data[offset] << 9 | data[offset + 1] << 1; + }; + + itemEncode = function fontItemEncode(data, offset, value) { + data[offset] = value >> 9 & 0xff; + data[offset + 1] = value >> 1 & 0xff; + }; + } + + var numGlyphsOut = dupFirstEntry ? numGlyphs + 1 : numGlyphs; + var locaDataSize = itemSize * (1 + numGlyphsOut); + var locaData = new Uint8Array(locaDataSize); + locaData.set(loca.data.subarray(0, locaDataSize)); + loca.data = locaData; + var oldGlyfData = glyf.data; + var oldGlyfDataLength = oldGlyfData.length; + var newGlyfData = new Uint8Array(oldGlyfDataLength); + var startOffset = itemDecode(locaData, 0); + var writeOffset = 0; + var missingGlyphs = Object.create(null); + itemEncode(locaData, 0, writeOffset); + var i, j; + + for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) { + var endOffset = itemDecode(locaData, j); + + if (endOffset === 0) { + endOffset = startOffset; + } + + if (endOffset > oldGlyfDataLength && (oldGlyfDataLength + 3 & ~3) === endOffset) { + endOffset = oldGlyfDataLength; + } + + if (endOffset > oldGlyfDataLength) { + startOffset = endOffset; + } + + var glyphProfile = sanitizeGlyph(oldGlyfData, startOffset, endOffset, newGlyfData, writeOffset, hintsValid); + var newLength = glyphProfile.length; + + if (newLength === 0) { + missingGlyphs[i] = true; + } + + if (glyphProfile.sizeOfInstructions > maxSizeOfInstructions) { + maxSizeOfInstructions = glyphProfile.sizeOfInstructions; + } + + writeOffset += newLength; + itemEncode(locaData, j, writeOffset); + startOffset = endOffset; + } + + if (writeOffset === 0) { + var simpleGlyph = new Uint8Array([0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0]); + + for (i = 0, j = itemSize; i < numGlyphsOut; i++, j += itemSize) { + itemEncode(locaData, j, simpleGlyph.length); + } + + glyf.data = simpleGlyph; + } else if (dupFirstEntry) { + var firstEntryLength = itemDecode(locaData, itemSize); + + if (newGlyfData.length > firstEntryLength + writeOffset) { + glyf.data = newGlyfData.subarray(0, firstEntryLength + writeOffset); + } else { + glyf.data = new Uint8Array(firstEntryLength + writeOffset); + glyf.data.set(newGlyfData.subarray(0, writeOffset)); + } + + glyf.data.set(newGlyfData.subarray(0, firstEntryLength), writeOffset); + itemEncode(loca.data, locaData.length - itemSize, writeOffset + firstEntryLength); + } else { + glyf.data = newGlyfData.subarray(0, writeOffset); + } + + return { + missingGlyphs, + maxSizeOfInstructions + }; + } + + function readPostScriptTable(post, propertiesObj, maxpNumGlyphs) { + var start = (font.start ? font.start : 0) + post.offset; + font.pos = start; + var length = post.length, + end = start + length; + var version = font.getInt32(); + font.skip(28); + var glyphNames; + var valid = true; + var i; + + switch (version) { + case 0x00010000: + glyphNames = MacStandardGlyphOrdering; + break; + + case 0x00020000: + var numGlyphs = font.getUint16(); + + if (numGlyphs !== maxpNumGlyphs) { + valid = false; + break; + } + + var glyphNameIndexes = []; + + for (i = 0; i < numGlyphs; ++i) { + var index = font.getUint16(); + + if (index >= 32768) { + valid = false; + break; + } + + glyphNameIndexes.push(index); + } + + if (!valid) { + break; + } + + var customNames = []; + var strBuf = []; + + while (font.pos < end) { + var stringLength = font.getByte(); + strBuf.length = stringLength; + + for (i = 0; i < stringLength; ++i) { + strBuf[i] = String.fromCharCode(font.getByte()); + } + + customNames.push(strBuf.join("")); + } + + glyphNames = []; + + for (i = 0; i < numGlyphs; ++i) { + var j = glyphNameIndexes[i]; + + if (j < 258) { + glyphNames.push(MacStandardGlyphOrdering[j]); + continue; + } + + glyphNames.push(customNames[j - 258]); + } + + break; + + case 0x00030000: + break; + + default: + (0, _util.warn)("Unknown/unsupported post table version " + version); + valid = false; + + if (propertiesObj.defaultEncoding) { + glyphNames = propertiesObj.defaultEncoding; + } + + break; + } + + propertiesObj.glyphNames = glyphNames; + return valid; + } + + function readNameTable(nameTable) { + var start = (font.start ? font.start : 0) + nameTable.offset; + font.pos = start; + var names = [[], []]; + var length = nameTable.length, + end = start + length; + var format = font.getUint16(); + var FORMAT_0_HEADER_LENGTH = 6; + + if (format !== 0 || length < FORMAT_0_HEADER_LENGTH) { + return names; + } + + var numRecords = font.getUint16(); + var stringsStart = font.getUint16(); + var records = []; + var NAME_RECORD_LENGTH = 12; + var i, ii; + + for (i = 0; i < numRecords && font.pos + NAME_RECORD_LENGTH <= end; i++) { + var r = { + platform: font.getUint16(), + encoding: font.getUint16(), + language: font.getUint16(), + name: font.getUint16(), + length: font.getUint16(), + offset: font.getUint16() + }; + + if (r.platform === 1 && r.encoding === 0 && r.language === 0 || r.platform === 3 && r.encoding === 1 && r.language === 0x409) { + records.push(r); + } + } + + for (i = 0, ii = records.length; i < ii; i++) { + var record = records[i]; + + if (record.length <= 0) { + continue; + } + + var pos = start + stringsStart + record.offset; + + if (pos + record.length > end) { + continue; + } + + font.pos = pos; + var nameIndex = record.name; + + if (record.encoding) { + var str = ""; + + for (var j = 0, jj = record.length; j < jj; j += 2) { + str += String.fromCharCode(font.getUint16()); + } + + names[1][nameIndex] = str; + } else { + names[0][nameIndex] = (0, _util.bytesToString)(font.getBytes(record.length)); + } + } + + return names; + } + + var TTOpsStackDeltas = [0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 1, -1, -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1, 0, 0, -999, -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2, 0, 0, -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -999, -999, -999, -999, -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1, -999, -2, -2, 0, 0, -1, -2, -2, 0, 0, 0, -1, -1, -1, -2]; + + function sanitizeTTProgram(table, ttContext) { + var data = table.data; + var i = 0, + j, + n, + b, + funcId, + pc, + lastEndf = 0, + lastDeff = 0; + var stack = []; + var callstack = []; + var functionsCalled = []; + var tooComplexToFollowFunctions = ttContext.tooComplexToFollowFunctions; + var inFDEF = false, + ifLevel = 0, + inELSE = 0; + + for (var ii = data.length; i < ii;) { + var op = data[i++]; + + if (op === 0x40) { + n = data[i++]; + + if (inFDEF || inELSE) { + i += n; + } else { + for (j = 0; j < n; j++) { + stack.push(data[i++]); + } + } + } else if (op === 0x41) { + n = data[i++]; + + if (inFDEF || inELSE) { + i += n * 2; + } else { + for (j = 0; j < n; j++) { + b = data[i++]; + stack.push(b << 8 | data[i++]); + } + } + } else if ((op & 0xf8) === 0xb0) { + n = op - 0xb0 + 1; + + if (inFDEF || inELSE) { + i += n; + } else { + for (j = 0; j < n; j++) { + stack.push(data[i++]); + } + } + } else if ((op & 0xf8) === 0xb8) { + n = op - 0xb8 + 1; + + if (inFDEF || inELSE) { + i += n * 2; + } else { + for (j = 0; j < n; j++) { + b = data[i++]; + stack.push(b << 8 | data[i++]); + } + } + } else if (op === 0x2b && !tooComplexToFollowFunctions) { + if (!inFDEF && !inELSE) { + funcId = stack[stack.length - 1]; + + if (isNaN(funcId)) { + (0, _util.info)("TT: CALL empty stack (or invalid entry)."); + } else { + ttContext.functionsUsed[funcId] = true; + + if (funcId in ttContext.functionsStackDeltas) { + const newStackLength = stack.length + ttContext.functionsStackDeltas[funcId]; + + if (newStackLength < 0) { + (0, _util.warn)("TT: CALL invalid functions stack delta."); + ttContext.hintsValid = false; + return; + } + + stack.length = newStackLength; + } else if (funcId in ttContext.functionsDefined && !functionsCalled.includes(funcId)) { + callstack.push({ + data, + i, + stackTop: stack.length - 1 + }); + functionsCalled.push(funcId); + pc = ttContext.functionsDefined[funcId]; + + if (!pc) { + (0, _util.warn)("TT: CALL non-existent function"); + ttContext.hintsValid = false; + return; + } + + data = pc.data; + i = pc.i; + } + } + } + } else if (op === 0x2c && !tooComplexToFollowFunctions) { + if (inFDEF || inELSE) { + (0, _util.warn)("TT: nested FDEFs not allowed"); + tooComplexToFollowFunctions = true; + } + + inFDEF = true; + lastDeff = i; + funcId = stack.pop(); + ttContext.functionsDefined[funcId] = { + data, + i + }; + } else if (op === 0x2d) { + if (inFDEF) { + inFDEF = false; + lastEndf = i; + } else { + pc = callstack.pop(); + + if (!pc) { + (0, _util.warn)("TT: ENDF bad stack"); + ttContext.hintsValid = false; + return; + } + + funcId = functionsCalled.pop(); + data = pc.data; + i = pc.i; + ttContext.functionsStackDeltas[funcId] = stack.length - pc.stackTop; + } + } else if (op === 0x89) { + if (inFDEF || inELSE) { + (0, _util.warn)("TT: nested IDEFs not allowed"); + tooComplexToFollowFunctions = true; + } + + inFDEF = true; + lastDeff = i; + } else if (op === 0x58) { + ++ifLevel; + } else if (op === 0x1b) { + inELSE = ifLevel; + } else if (op === 0x59) { + if (inELSE === ifLevel) { + inELSE = 0; + } + + --ifLevel; + } else if (op === 0x1c) { + if (!inFDEF && !inELSE) { + var offset = stack[stack.length - 1]; + + if (offset > 0) { + i += offset - 1; + } + } + } + + if (!inFDEF && !inELSE) { + let stackDelta = 0; + + if (op <= 0x8e) { + stackDelta = TTOpsStackDeltas[op]; + } else if (op >= 0xc0 && op <= 0xdf) { + stackDelta = -1; + } else if (op >= 0xe0) { + stackDelta = -2; + } + + if (op >= 0x71 && op <= 0x75) { + n = stack.pop(); + + if (!isNaN(n)) { + stackDelta = -n * 2; + } + } + + while (stackDelta < 0 && stack.length > 0) { + stack.pop(); + stackDelta++; + } + + while (stackDelta > 0) { + stack.push(NaN); + stackDelta--; + } + } + } + + ttContext.tooComplexToFollowFunctions = tooComplexToFollowFunctions; + var content = [data]; + + if (i > data.length) { + content.push(new Uint8Array(i - data.length)); + } + + if (lastDeff > lastEndf) { + (0, _util.warn)("TT: complementing a missing function tail"); + content.push(new Uint8Array([0x22, 0x2d])); + } + + foldTTTable(table, content); + } + + function checkInvalidFunctions(ttContext, maxFunctionDefs) { + if (ttContext.tooComplexToFollowFunctions) { + return; + } + + if (ttContext.functionsDefined.length > maxFunctionDefs) { + (0, _util.warn)("TT: more functions defined than expected"); + ttContext.hintsValid = false; + return; + } + + for (var j = 0, jj = ttContext.functionsUsed.length; j < jj; j++) { + if (j > maxFunctionDefs) { + (0, _util.warn)("TT: invalid function id: " + j); + ttContext.hintsValid = false; + return; + } + + if (ttContext.functionsUsed[j] && !ttContext.functionsDefined[j]) { + (0, _util.warn)("TT: undefined function: " + j); + ttContext.hintsValid = false; + return; + } + } + } + + function foldTTTable(table, content) { + if (content.length > 1) { + var newLength = 0; + var j, jj; + + for (j = 0, jj = content.length; j < jj; j++) { + newLength += content[j].length; + } + + newLength = newLength + 3 & ~3; + var result = new Uint8Array(newLength); + var pos = 0; + + for (j = 0, jj = content.length; j < jj; j++) { + result.set(content[j], pos); + pos += content[j].length; + } + + table.data = result; + table.length = newLength; + } + } + + function sanitizeTTPrograms(fpgm, prep, cvt, maxFunctionDefs) { + var ttContext = { + functionsDefined: [], + functionsUsed: [], + functionsStackDeltas: [], + tooComplexToFollowFunctions: false, + hintsValid: true + }; + + if (fpgm) { + sanitizeTTProgram(fpgm, ttContext); + } + + if (prep) { + sanitizeTTProgram(prep, ttContext); + } + + if (fpgm) { + checkInvalidFunctions(ttContext, maxFunctionDefs); + } + + if (cvt && cvt.length & 1) { + var cvtData = new Uint8Array(cvt.length + 1); + cvtData.set(cvt.data); + cvt.data = cvtData; + } + + return ttContext.hintsValid; + } + + font = new _stream.Stream(new Uint8Array(font.getBytes())); + let header, tables; + + if (isTrueTypeCollectionFile(font)) { + const ttcData = readTrueTypeCollectionData(font, this.name); + header = ttcData.header; + tables = ttcData.tables; + } else { + header = readOpenTypeHeader(font); + tables = readTables(font, header.numTables); + } + + let cff, cffFile; + var isTrueType = !tables["CFF "]; + + if (!isTrueType) { + const isComposite = properties.composite && ((properties.cidToGidMap || []).length > 0 || !(properties.cMap instanceof _cmap.IdentityCMap)); + + if (header.version === "OTTO" && !isComposite || !tables.head || !tables.hhea || !tables.maxp || !tables.post) { + cffFile = new _stream.Stream(tables["CFF "].data); + cff = new CFFFont(cffFile, properties); + adjustWidths(properties); + return this.convert(name, cff, properties); + } + + delete tables.glyf; + delete tables.loca; + delete tables.fpgm; + delete tables.prep; + delete tables["cvt "]; + this.isOpenType = true; + } else { + if (!tables.loca) { + throw new _util.FormatError('Required "loca" table is not found'); + } + + if (!tables.glyf) { + (0, _util.warn)('Required "glyf" table is not found -- trying to recover.'); + tables.glyf = { + tag: "glyf", + data: new Uint8Array(0) + }; + } + + this.isOpenType = false; + } + + if (!tables.maxp) { + throw new _util.FormatError('Required "maxp" table is not found'); + } + + font.pos = (font.start || 0) + tables.maxp.offset; + var version = font.getInt32(); + const numGlyphs = font.getUint16(); + let numGlyphsOut = numGlyphs + 1; + let dupFirstEntry = true; + + if (numGlyphsOut > 0xffff) { + dupFirstEntry = false; + numGlyphsOut = numGlyphs; + (0, _util.warn)("Not enough space in glyfs to duplicate first glyph."); + } + + var maxFunctionDefs = 0; + var maxSizeOfInstructions = 0; + + if (version >= 0x00010000 && tables.maxp.length >= 22) { + font.pos += 8; + var maxZones = font.getUint16(); + + if (maxZones > 2) { + tables.maxp.data[14] = 0; + tables.maxp.data[15] = 2; + } + + font.pos += 4; + maxFunctionDefs = font.getUint16(); + font.pos += 4; + maxSizeOfInstructions = font.getUint16(); + } + + tables.maxp.data[4] = numGlyphsOut >> 8; + tables.maxp.data[5] = numGlyphsOut & 255; + var hintsValid = sanitizeTTPrograms(tables.fpgm, tables.prep, tables["cvt "], maxFunctionDefs); + + if (!hintsValid) { + delete tables.fpgm; + delete tables.prep; + delete tables["cvt "]; + } + + sanitizeMetrics(font, tables.hhea, tables.hmtx, numGlyphsOut, dupFirstEntry); + + if (!tables.head) { + throw new _util.FormatError('Required "head" table is not found'); + } + + sanitizeHead(tables.head, numGlyphs, isTrueType ? tables.loca.length : 0); + var missingGlyphs = Object.create(null); + + if (isTrueType) { + var isGlyphLocationsLong = int16(tables.head.data[50], tables.head.data[51]); + var glyphsInfo = sanitizeGlyphLocations(tables.loca, tables.glyf, numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry, maxSizeOfInstructions); + missingGlyphs = glyphsInfo.missingGlyphs; + + if (version >= 0x00010000 && tables.maxp.length >= 22) { + tables.maxp.data[26] = glyphsInfo.maxSizeOfInstructions >> 8; + tables.maxp.data[27] = glyphsInfo.maxSizeOfInstructions & 255; + } + } + + if (!tables.hhea) { + throw new _util.FormatError('Required "hhea" table is not found'); + } + + if (tables.hhea.data[10] === 0 && tables.hhea.data[11] === 0) { + tables.hhea.data[10] = 0xff; + tables.hhea.data[11] = 0xff; + } + + var metricsOverride = { + unitsPerEm: int16(tables.head.data[18], tables.head.data[19]), + yMax: int16(tables.head.data[42], tables.head.data[43]), + yMin: signedInt16(tables.head.data[38], tables.head.data[39]), + ascent: int16(tables.hhea.data[4], tables.hhea.data[5]), + descent: signedInt16(tables.hhea.data[6], tables.hhea.data[7]) + }; + this.ascent = metricsOverride.ascent / metricsOverride.unitsPerEm; + this.descent = metricsOverride.descent / metricsOverride.unitsPerEm; + + if (tables.post) { + readPostScriptTable(tables.post, properties, numGlyphs); + } + + tables.post = { + tag: "post", + data: createPostTable(properties) + }; + const charCodeToGlyphId = []; + + function hasGlyph(glyphId) { + return !missingGlyphs[glyphId]; + } + + if (properties.composite) { + var cidToGidMap = properties.cidToGidMap || []; + var isCidToGidMapEmpty = cidToGidMap.length === 0; + properties.cMap.forEach(function (charCode, cid) { + if (cid > 0xffff) { + throw new _util.FormatError("Max size of CID is 65,535"); + } + + var glyphId = -1; + + if (isCidToGidMapEmpty) { + glyphId = cid; + } else if (cidToGidMap[cid] !== undefined) { + glyphId = cidToGidMap[cid]; + } + + if (glyphId >= 0 && glyphId < numGlyphs && hasGlyph(glyphId)) { + charCodeToGlyphId[charCode] = glyphId; + } + }); + } else { + var cmapTable = readCmapTable(tables.cmap, font, this.isSymbolicFont, properties.hasEncoding); + var cmapPlatformId = cmapTable.platformId; + var cmapEncodingId = cmapTable.encodingId; + var cmapMappings = cmapTable.mappings; + var cmapMappingsLength = cmapMappings.length; + + if (properties.hasEncoding && (cmapPlatformId === 3 && cmapEncodingId === 1 || cmapPlatformId === 1 && cmapEncodingId === 0) || cmapPlatformId === -1 && cmapEncodingId === -1 && !!(0, _encodings.getEncoding)(properties.baseEncodingName)) { + var baseEncoding = []; + + if (properties.baseEncodingName === "MacRomanEncoding" || properties.baseEncodingName === "WinAnsiEncoding") { + baseEncoding = (0, _encodings.getEncoding)(properties.baseEncodingName); + } + + var glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); + + for (let charCode = 0; charCode < 256; charCode++) { + var glyphName, standardGlyphName; + + if (this.differences && charCode in this.differences) { + glyphName = this.differences[charCode]; + } else if (charCode in baseEncoding && baseEncoding[charCode] !== "") { + glyphName = baseEncoding[charCode]; + } else { + glyphName = _encodings.StandardEncoding[charCode]; + } + + if (!glyphName) { + continue; + } + + standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); + var unicodeOrCharCode; + + if (cmapPlatformId === 3 && cmapEncodingId === 1) { + unicodeOrCharCode = glyphsUnicodeMap[standardGlyphName]; + } else if (cmapPlatformId === 1 && cmapEncodingId === 0) { + unicodeOrCharCode = _encodings.MacRomanEncoding.indexOf(standardGlyphName); + } + + var found = false; + + for (let i = 0; i < cmapMappingsLength; ++i) { + if (cmapMappings[i].charCode !== unicodeOrCharCode) { + continue; + } + + charCodeToGlyphId[charCode] = cmapMappings[i].glyphId; + found = true; + break; + } + + if (!found && properties.glyphNames) { + var glyphId = properties.glyphNames.indexOf(glyphName); + + if (glyphId === -1 && standardGlyphName !== glyphName) { + glyphId = properties.glyphNames.indexOf(standardGlyphName); + } + + if (glyphId > 0 && hasGlyph(glyphId)) { + charCodeToGlyphId[charCode] = glyphId; + } + } + } + } else if (cmapPlatformId === 0 && cmapEncodingId === 0) { + for (let i = 0; i < cmapMappingsLength; ++i) { + charCodeToGlyphId[cmapMappings[i].charCode] = cmapMappings[i].glyphId; + } + } else { + for (let i = 0; i < cmapMappingsLength; ++i) { + let charCode = cmapMappings[i].charCode; + + if (cmapPlatformId === 3 && charCode >= 0xf000 && charCode <= 0xf0ff) { + charCode &= 0xff; + } + + charCodeToGlyphId[charCode] = cmapMappings[i].glyphId; + } + } + } + + if (charCodeToGlyphId.length === 0) { + charCodeToGlyphId[0] = 0; + } + + let glyphZeroId = numGlyphsOut - 1; + + if (!dupFirstEntry) { + glyphZeroId = 0; + } + + var newMapping = adjustMapping(charCodeToGlyphId, hasGlyph, glyphZeroId); + this.toFontChar = newMapping.toFontChar; + tables.cmap = { + tag: "cmap", + data: createCmapTable(newMapping.charCodeToGlyphId, numGlyphsOut) + }; + + if (!tables["OS/2"] || !validateOS2Table(tables["OS/2"], font)) { + tables["OS/2"] = { + tag: "OS/2", + data: createOS2Table(properties, newMapping.charCodeToGlyphId, metricsOverride) + }; + } + + if (!isTrueType) { + try { + cffFile = new _stream.Stream(tables["CFF "].data); + var parser = new _cff_parser.CFFParser(cffFile, properties, SEAC_ANALYSIS_ENABLED); + cff = parser.parse(); + cff.duplicateFirstGlyph(); + var compiler = new _cff_parser.CFFCompiler(cff); + tables["CFF "].data = compiler.compile(); + } catch (e) { + (0, _util.warn)("Failed to compile font " + properties.loadedName); + } + } + + if (!tables.name) { + tables.name = { + tag: "name", + data: createNameTable(this.name) + }; + } else { + var namePrototype = readNameTable(tables.name); + tables.name.data = createNameTable(name, namePrototype); + } + + var builder = new OpenTypeFileBuilder(header.version); + + for (var tableTag in tables) { + builder.addTable(tableTag, tables[tableTag].data); + } + + return builder.toArray(); + }, + convert: function Font_convert(fontName, font, properties) { + properties.fixedPitch = false; + + if (properties.builtInEncoding) { + adjustToUnicode(properties, properties.builtInEncoding); + } + + let glyphZeroId = 1; + + if (font instanceof CFFFont) { + glyphZeroId = font.numGlyphs - 1; + } + + var mapping = font.getGlyphMapping(properties); + var newMapping = adjustMapping(mapping, font.hasGlyphId.bind(font), glyphZeroId); + this.toFontChar = newMapping.toFontChar; + var numGlyphs = font.numGlyphs; + + function getCharCodes(charCodeToGlyphId, glyphId) { + var charCodes = null; + + for (var charCode in charCodeToGlyphId) { + if (glyphId === charCodeToGlyphId[charCode]) { + if (!charCodes) { + charCodes = []; + } + + charCodes.push(charCode | 0); + } + } + + return charCodes; + } + + function createCharCode(charCodeToGlyphId, glyphId) { + for (var charCode in charCodeToGlyphId) { + if (glyphId === charCodeToGlyphId[charCode]) { + return charCode | 0; + } + } + + newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode] = glyphId; + return newMapping.nextAvailableFontCharCode++; + } + + var seacs = font.seacs; + + if (SEAC_ANALYSIS_ENABLED && seacs && seacs.length) { + var matrix = properties.fontMatrix || _util.FONT_IDENTITY_MATRIX; + var charset = font.getCharset(); + var seacMap = Object.create(null); + + for (var glyphId in seacs) { + glyphId |= 0; + var seac = seacs[glyphId]; + var baseGlyphName = _encodings.StandardEncoding[seac[2]]; + var accentGlyphName = _encodings.StandardEncoding[seac[3]]; + var baseGlyphId = charset.indexOf(baseGlyphName); + var accentGlyphId = charset.indexOf(accentGlyphName); + + if (baseGlyphId < 0 || accentGlyphId < 0) { + continue; + } + + var accentOffset = { + x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4], + y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5] + }; + var charCodes = getCharCodes(mapping, glyphId); + + if (!charCodes) { + continue; + } + + for (let i = 0, ii = charCodes.length; i < ii; i++) { + var charCode = charCodes[i]; + var charCodeToGlyphId = newMapping.charCodeToGlyphId; + var baseFontCharCode = createCharCode(charCodeToGlyphId, baseGlyphId); + var accentFontCharCode = createCharCode(charCodeToGlyphId, accentGlyphId); + seacMap[charCode] = { + baseFontCharCode, + accentFontCharCode, + accentOffset + }; + } + } + + properties.seacMap = seacMap; + } + + var unitsPerEm = 1 / (properties.fontMatrix || _util.FONT_IDENTITY_MATRIX)[0]; + var builder = new OpenTypeFileBuilder("\x4F\x54\x54\x4F"); + builder.addTable("CFF ", font.data); + builder.addTable("OS/2", createOS2Table(properties, newMapping.charCodeToGlyphId)); + builder.addTable("cmap", createCmapTable(newMapping.charCodeToGlyphId, numGlyphs)); + builder.addTable("head", "\x00\x01\x00\x00" + "\x00\x00\x10\x00" + "\x00\x00\x00\x00" + "\x5F\x0F\x3C\xF5" + "\x00\x00" + safeString16(unitsPerEm) + "\x00\x00\x00\x00\x9e\x0b\x7e\x27" + "\x00\x00\x00\x00\x9e\x0b\x7e\x27" + "\x00\x00" + safeString16(properties.descent) + "\x0F\xFF" + safeString16(properties.ascent) + string16(properties.italicAngle ? 2 : 0) + "\x00\x11" + "\x00\x00" + "\x00\x00" + "\x00\x00"); + builder.addTable("hhea", "\x00\x01\x00\x00" + safeString16(properties.ascent) + safeString16(properties.descent) + "\x00\x00" + "\xFF\xFF" + "\x00\x00" + "\x00\x00" + "\x00\x00" + safeString16(properties.capHeight) + safeString16(Math.tan(properties.italicAngle) * properties.xHeight) + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + string16(numGlyphs)); + builder.addTable("hmtx", function fontFieldsHmtx() { + var charstrings = font.charstrings; + var cffWidths = font.cff ? font.cff.widths : null; + var hmtx = "\x00\x00\x00\x00"; + + for (let i = 1, ii = numGlyphs; i < ii; i++) { + var width = 0; + + if (charstrings) { + var charstring = charstrings[i - 1]; + width = "width" in charstring ? charstring.width : 0; + } else if (cffWidths) { + width = Math.ceil(cffWidths[i] || 0); + } + + hmtx += string16(width) + string16(0); + } + + return hmtx; + }()); + builder.addTable("maxp", "\x00\x00\x50\x00" + string16(numGlyphs)); + builder.addTable("name", createNameTable(fontName)); + builder.addTable("post", createPostTable(properties)); + return builder.toArray(); + }, + + get spaceWidth() { + var possibleSpaceReplacements = ["space", "minus", "one", "i", "I"]; + var width; + + for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) { + var glyphName = possibleSpaceReplacements[i]; + + if (glyphName in this.widths) { + width = this.widths[glyphName]; + break; + } + + var glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); + var glyphUnicode = glyphsUnicodeMap[glyphName]; + var charcode = 0; + + if (this.composite && this.cMap.contains(glyphUnicode)) { + charcode = this.cMap.lookup(glyphUnicode); + } + + if (!charcode && this.toUnicode) { + charcode = this.toUnicode.charCodeOf(glyphUnicode); + } + + if (charcode <= 0) { + charcode = glyphUnicode; + } + + width = this.widths[charcode]; + + if (width) { + break; + } + } + + width = width || this.defaultWidth; + return (0, _util.shadow)(this, "spaceWidth", width); + }, + + charToGlyph: function Font_charToGlyph(charcode, isSpace) { + var fontCharCode, width, operatorListId; + var widthCode = charcode; + + if (this.cMap && this.cMap.contains(charcode)) { + widthCode = this.cMap.lookup(charcode); + } + + width = this.widths[widthCode]; + width = (0, _util.isNum)(width) ? width : this.defaultWidth; + var vmetric = this.vmetrics && this.vmetrics[widthCode]; + let unicode = this.toUnicode.get(charcode) || this.fallbackToUnicode.get(charcode) || charcode; + + if (typeof unicode === "number") { + unicode = String.fromCharCode(unicode); + } + + var isInFont = (charcode in this.toFontChar); + fontCharCode = this.toFontChar[charcode] || charcode; + + if (this.missingFile) { + const glyphName = this.differences[charcode] || this.defaultEncoding[charcode]; + + if ((glyphName === ".notdef" || glyphName === "") && this.type === "Type1") { + fontCharCode = 0x20; + } + + fontCharCode = (0, _unicode.mapSpecialUnicodeValues)(fontCharCode); + } + + if (this.isType3Font) { + operatorListId = fontCharCode; + } + + var accent = null; + + if (this.seacMap && this.seacMap[charcode]) { + isInFont = true; + var seac = this.seacMap[charcode]; + fontCharCode = seac.baseFontCharCode; + accent = { + fontChar: String.fromCodePoint(seac.accentFontCharCode), + offset: seac.accentOffset + }; + } + + let fontChar = ""; + + if (typeof fontCharCode === "number") { + if (fontCharCode <= 0x10ffff) { + fontChar = String.fromCodePoint(fontCharCode); + } else { + (0, _util.warn)(`charToGlyph - invalid fontCharCode: ${fontCharCode}`); + } + } + + var glyph = this.glyphCache[charcode]; + + if (!glyph || !glyph.matchesForCache(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont)) { + glyph = new Glyph(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont); + this.glyphCache[charcode] = glyph; + } + + return glyph; + }, + charsToGlyphs: function Font_charsToGlyphs(chars) { + var charsCache = this.charsCache; + var glyphs, glyph, charcode; + + if (charsCache) { + glyphs = charsCache[chars]; + + if (glyphs) { + return glyphs; + } + } + + if (!charsCache) { + charsCache = this.charsCache = Object.create(null); + } + + glyphs = []; + var charsCacheKey = chars; + var i = 0, + ii; + + if (this.cMap) { + var c = Object.create(null); + + while (i < chars.length) { + this.cMap.readCharCode(chars, i, c); + charcode = c.charcode; + var length = c.length; + i += length; + var isSpace = length === 1 && chars.charCodeAt(i - 1) === 0x20; + glyph = this.charToGlyph(charcode, isSpace); + glyphs.push(glyph); + } + } else { + for (i = 0, ii = chars.length; i < ii; ++i) { + charcode = chars.charCodeAt(i); + glyph = this.charToGlyph(charcode, charcode === 0x20); + glyphs.push(glyph); + } + } + + return charsCache[charsCacheKey] = glyphs; + }, + + get glyphCacheValues() { + return Object.values(this.glyphCache); + } + + }; + return Font; +}(); + +exports.Font = Font; + +var ErrorFont = function ErrorFontClosure() { + function ErrorFont(error) { + this.error = error; + this.loadedName = "g_font_error"; + this.missingFile = true; + } + + ErrorFont.prototype = { + charsToGlyphs: function ErrorFont_charsToGlyphs() { + return []; + }, + + exportData(extraProperties = false) { + return { + error: this.error + }; + } + + }; + return ErrorFont; +}(); + +exports.ErrorFont = ErrorFont; + +function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) { + var charCodeToGlyphId = Object.create(null); + var glyphId, charCode, baseEncoding; + var isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); + + if (properties.baseEncodingName) { + baseEncoding = (0, _encodings.getEncoding)(properties.baseEncodingName); + + for (charCode = 0; charCode < baseEncoding.length; charCode++) { + glyphId = glyphNames.indexOf(baseEncoding[charCode]); + + if (glyphId >= 0) { + charCodeToGlyphId[charCode] = glyphId; + } else { + charCodeToGlyphId[charCode] = 0; + } + } + } else if (isSymbolicFont) { + for (charCode in builtInEncoding) { + charCodeToGlyphId[charCode] = builtInEncoding[charCode]; + } + } else { + baseEncoding = _encodings.StandardEncoding; + + for (charCode = 0; charCode < baseEncoding.length; charCode++) { + glyphId = glyphNames.indexOf(baseEncoding[charCode]); + + if (glyphId >= 0) { + charCodeToGlyphId[charCode] = glyphId; + } else { + charCodeToGlyphId[charCode] = 0; + } + } + } + + var differences = properties.differences, + glyphsUnicodeMap; + + if (differences) { + for (charCode in differences) { + var glyphName = differences[charCode]; + glyphId = glyphNames.indexOf(glyphName); + + if (glyphId === -1) { + if (!glyphsUnicodeMap) { + glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); + } + + var standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); + + if (standardGlyphName !== glyphName) { + glyphId = glyphNames.indexOf(standardGlyphName); + } + } + + if (glyphId >= 0) { + charCodeToGlyphId[charCode] = glyphId; + } else { + charCodeToGlyphId[charCode] = 0; + } + } + } + + return charCodeToGlyphId; +} + +var Type1Font = function Type1FontClosure() { + function findBlock(streamBytes, signature, startIndex) { + var streamBytesLength = streamBytes.length; + var signatureLength = signature.length; + var scanLength = streamBytesLength - signatureLength; + var i = startIndex, + j, + found = false; + + while (i < scanLength) { + j = 0; + + while (j < signatureLength && streamBytes[i + j] === signature[j]) { + j++; + } + + if (j >= signatureLength) { + i += j; + + while (i < streamBytesLength && (0, _core_utils.isWhiteSpace)(streamBytes[i])) { + i++; + } + + found = true; + break; + } + + i++; + } + + return { + found, + length: i + }; + } + + function getHeaderBlock(stream, suggestedLength) { + var EEXEC_SIGNATURE = [0x65, 0x65, 0x78, 0x65, 0x63]; + var streamStartPos = stream.pos; + var headerBytes, headerBytesLength, block; + + try { + headerBytes = stream.getBytes(suggestedLength); + headerBytesLength = headerBytes.length; + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + } + + if (headerBytesLength === suggestedLength) { + block = findBlock(headerBytes, EEXEC_SIGNATURE, suggestedLength - 2 * EEXEC_SIGNATURE.length); + + if (block.found && block.length === suggestedLength) { + return { + stream: new _stream.Stream(headerBytes), + length: suggestedLength + }; + } + } + + (0, _util.warn)('Invalid "Length1" property in Type1 font -- trying to recover.'); + stream.pos = streamStartPos; + var SCAN_BLOCK_LENGTH = 2048; + var actualLength; + + while (true) { + var scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH); + block = findBlock(scanBytes, EEXEC_SIGNATURE, 0); + + if (block.length === 0) { + break; + } + + stream.pos += block.length; + + if (block.found) { + actualLength = stream.pos - streamStartPos; + break; + } + } + + stream.pos = streamStartPos; + + if (actualLength) { + return { + stream: new _stream.Stream(stream.getBytes(actualLength)), + length: actualLength + }; + } + + (0, _util.warn)('Unable to recover "Length1" property in Type1 font -- using as is.'); + return { + stream: new _stream.Stream(stream.getBytes(suggestedLength)), + length: suggestedLength + }; + } + + function getEexecBlock(stream, suggestedLength) { + var eexecBytes = stream.getBytes(); + return { + stream: new _stream.Stream(eexecBytes), + length: eexecBytes.length + }; + } + + function Type1Font(name, file, properties) { + var PFB_HEADER_SIZE = 6; + var headerBlockLength = properties.length1; + var eexecBlockLength = properties.length2; + var pfbHeader = file.peekBytes(PFB_HEADER_SIZE); + var pfbHeaderPresent = pfbHeader[0] === 0x80 && pfbHeader[1] === 0x01; + + if (pfbHeaderPresent) { + file.skip(PFB_HEADER_SIZE); + headerBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2]; + } + + var headerBlock = getHeaderBlock(file, headerBlockLength); + var headerBlockParser = new _type1_parser.Type1Parser(headerBlock.stream, false, SEAC_ANALYSIS_ENABLED); + headerBlockParser.extractFontHeader(properties); + + if (pfbHeaderPresent) { + pfbHeader = file.getBytes(PFB_HEADER_SIZE); + eexecBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2]; + } + + var eexecBlock = getEexecBlock(file, eexecBlockLength); + var eexecBlockParser = new _type1_parser.Type1Parser(eexecBlock.stream, true, SEAC_ANALYSIS_ENABLED); + var data = eexecBlockParser.extractFontProgram(properties); + + for (const key in data.properties) { + properties[key] = data.properties[key]; + } + + var charstrings = data.charstrings; + var type2Charstrings = this.getType2Charstrings(charstrings); + var subrs = this.getType2Subrs(data.subrs); + this.charstrings = charstrings; + this.data = this.wrap(name, type2Charstrings, this.charstrings, subrs, properties); + this.seacs = this.getSeacs(data.charstrings); + } + + Type1Font.prototype = { + get numGlyphs() { + return this.charstrings.length + 1; + }, + + getCharset: function Type1Font_getCharset() { + var charset = [".notdef"]; + var charstrings = this.charstrings; + + for (var glyphId = 0; glyphId < charstrings.length; glyphId++) { + charset.push(charstrings[glyphId].glyphName); + } + + return charset; + }, + getGlyphMapping: function Type1Font_getGlyphMapping(properties) { + var charstrings = this.charstrings; + + if (properties.composite) { + const charCodeToGlyphId = Object.create(null); + + for (let glyphId = 0, charstringsLen = charstrings.length; glyphId < charstringsLen; glyphId++) { + const charCode = properties.cMap.charCodeOf(glyphId); + charCodeToGlyphId[charCode] = glyphId + 1; + } + + return charCodeToGlyphId; + } + + var glyphNames = [".notdef"], + glyphId; + + for (glyphId = 0; glyphId < charstrings.length; glyphId++) { + glyphNames.push(charstrings[glyphId].glyphName); + } + + var encoding = properties.builtInEncoding; + + if (encoding) { + var builtInEncoding = Object.create(null); + + for (var charCode in encoding) { + glyphId = glyphNames.indexOf(encoding[charCode]); + + if (glyphId >= 0) { + builtInEncoding[charCode] = glyphId; + } + } + } + + return type1FontGlyphMapping(properties, builtInEncoding, glyphNames); + }, + hasGlyphId: function Type1Font_hasGlyphID(id) { + if (id < 0 || id >= this.numGlyphs) { + return false; + } + + if (id === 0) { + return true; + } + + var glyph = this.charstrings[id - 1]; + return glyph.charstring.length > 0; + }, + getSeacs: function Type1Font_getSeacs(charstrings) { + var i, ii; + var seacMap = []; + + for (i = 0, ii = charstrings.length; i < ii; i++) { + var charstring = charstrings[i]; + + if (charstring.seac) { + seacMap[i + 1] = charstring.seac; + } + } + + return seacMap; + }, + getType2Charstrings: function Type1Font_getType2Charstrings(type1Charstrings) { + var type2Charstrings = []; + + for (var i = 0, ii = type1Charstrings.length; i < ii; i++) { + type2Charstrings.push(type1Charstrings[i].charstring); + } + + return type2Charstrings; + }, + getType2Subrs: function Type1Font_getType2Subrs(type1Subrs) { + var bias = 0; + var count = type1Subrs.length; + + if (count < 1133) { + bias = 107; + } else if (count < 33769) { + bias = 1131; + } else { + bias = 32768; + } + + var type2Subrs = []; + var i; + + for (i = 0; i < bias; i++) { + type2Subrs.push([0x0b]); + } + + for (i = 0; i < count; i++) { + type2Subrs.push(type1Subrs[i]); + } + + return type2Subrs; + }, + wrap: function Type1Font_wrap(name, glyphs, charstrings, subrs, properties) { + var cff = new _cff_parser.CFF(); + cff.header = new _cff_parser.CFFHeader(1, 0, 4, 4); + cff.names = [name]; + var topDict = new _cff_parser.CFFTopDict(); + topDict.setByName("version", 391); + topDict.setByName("Notice", 392); + topDict.setByName("FullName", 393); + topDict.setByName("FamilyName", 394); + topDict.setByName("Weight", 395); + topDict.setByName("Encoding", null); + topDict.setByName("FontMatrix", properties.fontMatrix); + topDict.setByName("FontBBox", properties.bbox); + topDict.setByName("charset", null); + topDict.setByName("CharStrings", null); + topDict.setByName("Private", null); + cff.topDict = topDict; + var strings = new _cff_parser.CFFStrings(); + strings.add("Version 0.11"); + strings.add("See original notice"); + strings.add(name); + strings.add(name); + strings.add("Medium"); + cff.strings = strings; + cff.globalSubrIndex = new _cff_parser.CFFIndex(); + var count = glyphs.length; + var charsetArray = [".notdef"]; + var i, ii; + + for (i = 0; i < count; i++) { + const glyphName = charstrings[i].glyphName; + + const index = _cff_parser.CFFStandardStrings.indexOf(glyphName); + + if (index === -1) { + strings.add(glyphName); + } + + charsetArray.push(glyphName); + } + + cff.charset = new _cff_parser.CFFCharset(false, 0, charsetArray); + var charStringsIndex = new _cff_parser.CFFIndex(); + charStringsIndex.add([0x8b, 0x0e]); + + for (i = 0; i < count; i++) { + charStringsIndex.add(glyphs[i]); + } + + cff.charStrings = charStringsIndex; + var privateDict = new _cff_parser.CFFPrivateDict(); + privateDict.setByName("Subrs", null); + var fields = ["BlueValues", "OtherBlues", "FamilyBlues", "FamilyOtherBlues", "StemSnapH", "StemSnapV", "BlueShift", "BlueFuzz", "BlueScale", "LanguageGroup", "ExpansionFactor", "ForceBold", "StdHW", "StdVW"]; + + for (i = 0, ii = fields.length; i < ii; i++) { + var field = fields[i]; + + if (!(field in properties.privateData)) { + continue; + } + + var value = properties.privateData[field]; + + if (Array.isArray(value)) { + for (var j = value.length - 1; j > 0; j--) { + value[j] -= value[j - 1]; + } + } + + privateDict.setByName(field, value); + } + + cff.topDict.privateDict = privateDict; + var subrIndex = new _cff_parser.CFFIndex(); + + for (i = 0, ii = subrs.length; i < ii; i++) { + subrIndex.add(subrs[i]); + } + + privateDict.subrsIndex = subrIndex; + var compiler = new _cff_parser.CFFCompiler(cff); + return compiler.compile(); + } + }; + return Type1Font; +}(); + +var CFFFont = function CFFFontClosure() { + function CFFFont(file, properties) { + this.properties = properties; + var parser = new _cff_parser.CFFParser(file, properties, SEAC_ANALYSIS_ENABLED); + this.cff = parser.parse(); + this.cff.duplicateFirstGlyph(); + var compiler = new _cff_parser.CFFCompiler(this.cff); + this.seacs = this.cff.seacs; + + try { + this.data = compiler.compile(); + } catch (e) { + (0, _util.warn)("Failed to compile font " + properties.loadedName); + this.data = file; + } + } + + CFFFont.prototype = { + get numGlyphs() { + return this.cff.charStrings.count; + }, + + getCharset: function CFFFont_getCharset() { + return this.cff.charset.charset; + }, + getGlyphMapping: function CFFFont_getGlyphMapping() { + var cff = this.cff; + var properties = this.properties; + var charsets = cff.charset.charset; + var charCodeToGlyphId; + var glyphId; + + if (properties.composite) { + charCodeToGlyphId = Object.create(null); + let charCode; + + if (cff.isCIDFont) { + for (glyphId = 0; glyphId < charsets.length; glyphId++) { + var cid = charsets[glyphId]; + charCode = properties.cMap.charCodeOf(cid); + charCodeToGlyphId[charCode] = glyphId; + } + } else { + for (glyphId = 0; glyphId < cff.charStrings.count; glyphId++) { + charCode = properties.cMap.charCodeOf(glyphId); + charCodeToGlyphId[charCode] = glyphId; + } + } + + return charCodeToGlyphId; + } + + var encoding = cff.encoding ? cff.encoding.encoding : null; + charCodeToGlyphId = type1FontGlyphMapping(properties, encoding, charsets); + return charCodeToGlyphId; + }, + hasGlyphId: function CFFFont_hasGlyphID(id) { + return this.cff.hasGlyphId(id); + } + }; + return CFFFont; +}(); + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CFFFDSelect = exports.CFFCompiler = exports.CFFPrivateDict = exports.CFFTopDict = exports.CFFCharset = exports.CFFIndex = exports.CFFStrings = exports.CFFHeader = exports.CFF = exports.CFFParser = exports.CFFStandardStrings = void 0; + +var _util = __w_pdfjs_require__(2); + +var _charsets = __w_pdfjs_require__(31); + +var _encodings = __w_pdfjs_require__(32); + +var MAX_SUBR_NESTING = 10; +var CFFStandardStrings = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "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", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "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", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold"]; +exports.CFFStandardStrings = CFFStandardStrings; +const NUM_STANDARD_CFF_STRINGS = 391; + +var CFFParser = function CFFParserClosure() { + var CharstringValidationData = [null, { + id: "hstem", + min: 2, + stackClearing: true, + stem: true + }, null, { + id: "vstem", + min: 2, + stackClearing: true, + stem: true + }, { + id: "vmoveto", + min: 1, + stackClearing: true + }, { + id: "rlineto", + min: 2, + resetStack: true + }, { + id: "hlineto", + min: 1, + resetStack: true + }, { + id: "vlineto", + min: 1, + resetStack: true + }, { + id: "rrcurveto", + min: 6, + resetStack: true + }, null, { + id: "callsubr", + min: 1, + undefStack: true + }, { + id: "return", + min: 0, + undefStack: true + }, null, null, { + id: "endchar", + min: 0, + stackClearing: true + }, null, null, null, { + id: "hstemhm", + min: 2, + stackClearing: true, + stem: true + }, { + id: "hintmask", + min: 0, + stackClearing: true + }, { + id: "cntrmask", + min: 0, + stackClearing: true + }, { + id: "rmoveto", + min: 2, + stackClearing: true + }, { + id: "hmoveto", + min: 1, + stackClearing: true + }, { + id: "vstemhm", + min: 2, + stackClearing: true, + stem: true + }, { + id: "rcurveline", + min: 8, + resetStack: true + }, { + id: "rlinecurve", + min: 8, + resetStack: true + }, { + id: "vvcurveto", + min: 4, + resetStack: true + }, { + id: "hhcurveto", + min: 4, + resetStack: true + }, null, { + id: "callgsubr", + min: 1, + undefStack: true + }, { + id: "vhcurveto", + min: 4, + resetStack: true + }, { + id: "hvcurveto", + min: 4, + resetStack: true + }]; + var CharstringValidationData12 = [null, null, null, { + id: "and", + min: 2, + stackDelta: -1 + }, { + id: "or", + min: 2, + stackDelta: -1 + }, { + id: "not", + min: 1, + stackDelta: 0 + }, null, null, null, { + id: "abs", + min: 1, + stackDelta: 0 + }, { + id: "add", + min: 2, + stackDelta: -1, + stackFn: function stack_div(stack, index) { + stack[index - 2] = stack[index - 2] + stack[index - 1]; + } + }, { + id: "sub", + min: 2, + stackDelta: -1, + stackFn: function stack_div(stack, index) { + stack[index - 2] = stack[index - 2] - stack[index - 1]; + } + }, { + id: "div", + min: 2, + stackDelta: -1, + stackFn: function stack_div(stack, index) { + stack[index - 2] = stack[index - 2] / stack[index - 1]; + } + }, null, { + id: "neg", + min: 1, + stackDelta: 0, + stackFn: function stack_div(stack, index) { + stack[index - 1] = -stack[index - 1]; + } + }, { + id: "eq", + min: 2, + stackDelta: -1 + }, null, null, { + id: "drop", + min: 1, + stackDelta: -1 + }, null, { + id: "put", + min: 2, + stackDelta: -2 + }, { + id: "get", + min: 1, + stackDelta: 0 + }, { + id: "ifelse", + min: 4, + stackDelta: -3 + }, { + id: "random", + min: 0, + stackDelta: 1 + }, { + id: "mul", + min: 2, + stackDelta: -1, + stackFn: function stack_div(stack, index) { + stack[index - 2] = stack[index - 2] * stack[index - 1]; + } + }, null, { + id: "sqrt", + min: 1, + stackDelta: 0 + }, { + id: "dup", + min: 1, + stackDelta: 1 + }, { + id: "exch", + min: 2, + stackDelta: 0 + }, { + id: "index", + min: 2, + stackDelta: 0 + }, { + id: "roll", + min: 3, + stackDelta: -2 + }, null, null, null, { + id: "hflex", + min: 7, + resetStack: true + }, { + id: "flex", + min: 13, + resetStack: true + }, { + id: "hflex1", + min: 9, + resetStack: true + }, { + id: "flex1", + min: 11, + resetStack: true + }]; + + function CFFParser(file, properties, seacAnalysisEnabled) { + this.bytes = file.getBytes(); + this.properties = properties; + this.seacAnalysisEnabled = !!seacAnalysisEnabled; + } + + CFFParser.prototype = { + parse: function CFFParser_parse() { + var properties = this.properties; + var cff = new CFF(); + this.cff = cff; + var header = this.parseHeader(); + var nameIndex = this.parseIndex(header.endPos); + var topDictIndex = this.parseIndex(nameIndex.endPos); + var stringIndex = this.parseIndex(topDictIndex.endPos); + var globalSubrIndex = this.parseIndex(stringIndex.endPos); + var topDictParsed = this.parseDict(topDictIndex.obj.get(0)); + var topDict = this.createDict(CFFTopDict, topDictParsed, cff.strings); + cff.header = header.obj; + cff.names = this.parseNameIndex(nameIndex.obj); + cff.strings = this.parseStringIndex(stringIndex.obj); + cff.topDict = topDict; + cff.globalSubrIndex = globalSubrIndex.obj; + this.parsePrivateDict(cff.topDict); + cff.isCIDFont = topDict.hasName("ROS"); + var charStringOffset = topDict.getByName("CharStrings"); + var charStringIndex = this.parseIndex(charStringOffset).obj; + var fontMatrix = topDict.getByName("FontMatrix"); + + if (fontMatrix) { + properties.fontMatrix = fontMatrix; + } + + var fontBBox = topDict.getByName("FontBBox"); + + if (fontBBox) { + properties.ascent = Math.max(fontBBox[3], fontBBox[1]); + properties.descent = Math.min(fontBBox[1], fontBBox[3]); + properties.ascentScaled = true; + } + + var charset, encoding; + + if (cff.isCIDFont) { + var fdArrayIndex = this.parseIndex(topDict.getByName("FDArray")).obj; + + for (var i = 0, ii = fdArrayIndex.count; i < ii; ++i) { + var dictRaw = fdArrayIndex.get(i); + var fontDict = this.createDict(CFFTopDict, this.parseDict(dictRaw), cff.strings); + this.parsePrivateDict(fontDict); + cff.fdArray.push(fontDict); + } + + encoding = null; + charset = this.parseCharsets(topDict.getByName("charset"), charStringIndex.count, cff.strings, true); + cff.fdSelect = this.parseFDSelect(topDict.getByName("FDSelect"), charStringIndex.count); + } else { + charset = this.parseCharsets(topDict.getByName("charset"), charStringIndex.count, cff.strings, false); + encoding = this.parseEncoding(topDict.getByName("Encoding"), properties, cff.strings, charset.charset); + } + + cff.charset = charset; + cff.encoding = encoding; + var charStringsAndSeacs = this.parseCharStrings({ + charStrings: charStringIndex, + localSubrIndex: topDict.privateDict.subrsIndex, + globalSubrIndex: globalSubrIndex.obj, + fdSelect: cff.fdSelect, + fdArray: cff.fdArray, + privateDict: topDict.privateDict + }); + cff.charStrings = charStringsAndSeacs.charStrings; + cff.seacs = charStringsAndSeacs.seacs; + cff.widths = charStringsAndSeacs.widths; + return cff; + }, + parseHeader: function CFFParser_parseHeader() { + var bytes = this.bytes; + var bytesLength = bytes.length; + var offset = 0; + + while (offset < bytesLength && bytes[offset] !== 1) { + ++offset; + } + + if (offset >= bytesLength) { + throw new _util.FormatError("Invalid CFF header"); + } + + if (offset !== 0) { + (0, _util.info)("cff data is shifted"); + bytes = bytes.subarray(offset); + this.bytes = bytes; + } + + var major = bytes[0]; + var minor = bytes[1]; + var hdrSize = bytes[2]; + var offSize = bytes[3]; + var header = new CFFHeader(major, minor, hdrSize, offSize); + return { + obj: header, + endPos: hdrSize + }; + }, + parseDict: function CFFParser_parseDict(dict) { + var pos = 0; + + function parseOperand() { + var value = dict[pos++]; + + if (value === 30) { + return parseFloatOperand(); + } else if (value === 28) { + value = dict[pos++]; + value = (value << 24 | dict[pos++] << 16) >> 16; + return value; + } else if (value === 29) { + value = dict[pos++]; + value = value << 8 | dict[pos++]; + value = value << 8 | dict[pos++]; + value = value << 8 | dict[pos++]; + return value; + } else if (value >= 32 && value <= 246) { + return value - 139; + } else if (value >= 247 && value <= 250) { + return (value - 247) * 256 + dict[pos++] + 108; + } else if (value >= 251 && value <= 254) { + return -((value - 251) * 256) - dict[pos++] - 108; + } + + (0, _util.warn)('CFFParser_parseDict: "' + value + '" is a reserved command.'); + return NaN; + } + + function parseFloatOperand() { + var str = ""; + var eof = 15; + const lookup = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; + var length = dict.length; + + while (pos < length) { + var b = dict[pos++]; + var b1 = b >> 4; + var b2 = b & 15; + + if (b1 === eof) { + break; + } + + str += lookup[b1]; + + if (b2 === eof) { + break; + } + + str += lookup[b2]; + } + + return parseFloat(str); + } + + var operands = []; + var entries = []; + pos = 0; + var end = dict.length; + + while (pos < end) { + var b = dict[pos]; + + if (b <= 21) { + if (b === 12) { + b = b << 8 | dict[++pos]; + } + + entries.push([b, operands]); + operands = []; + ++pos; + } else { + operands.push(parseOperand()); + } + } + + return entries; + }, + parseIndex: function CFFParser_parseIndex(pos) { + var cffIndex = new CFFIndex(); + var bytes = this.bytes; + var count = bytes[pos++] << 8 | bytes[pos++]; + var offsets = []; + var end = pos; + var i, ii; + + if (count !== 0) { + var offsetSize = bytes[pos++]; + var startPos = pos + (count + 1) * offsetSize - 1; + + for (i = 0, ii = count + 1; i < ii; ++i) { + var offset = 0; + + for (var j = 0; j < offsetSize; ++j) { + offset <<= 8; + offset += bytes[pos++]; + } + + offsets.push(startPos + offset); + } + + end = offsets[count]; + } + + for (i = 0, ii = offsets.length - 1; i < ii; ++i) { + var offsetStart = offsets[i]; + var offsetEnd = offsets[i + 1]; + cffIndex.add(bytes.subarray(offsetStart, offsetEnd)); + } + + return { + obj: cffIndex, + endPos: end + }; + }, + parseNameIndex: function CFFParser_parseNameIndex(index) { + var names = []; + + for (var i = 0, ii = index.count; i < ii; ++i) { + var name = index.get(i); + names.push((0, _util.bytesToString)(name)); + } + + return names; + }, + parseStringIndex: function CFFParser_parseStringIndex(index) { + var strings = new CFFStrings(); + + for (var i = 0, ii = index.count; i < ii; ++i) { + var data = index.get(i); + strings.add((0, _util.bytesToString)(data)); + } + + return strings; + }, + createDict: function CFFParser_createDict(Type, dict, strings) { + var cffDict = new Type(strings); + + for (var i = 0, ii = dict.length; i < ii; ++i) { + var pair = dict[i]; + var key = pair[0]; + var value = pair[1]; + cffDict.setByKey(key, value); + } + + return cffDict; + }, + parseCharString: function CFFParser_parseCharString(state, data, localSubrIndex, globalSubrIndex) { + if (!data || state.callDepth > MAX_SUBR_NESTING) { + return false; + } + + var stackSize = state.stackSize; + var stack = state.stack; + var length = data.length; + + for (var j = 0; j < length;) { + var value = data[j++]; + var validationCommand = null; + + if (value === 12) { + var q = data[j++]; + + if (q === 0) { + data[j - 2] = 139; + data[j - 1] = 22; + stackSize = 0; + } else { + validationCommand = CharstringValidationData12[q]; + } + } else if (value === 28) { + stack[stackSize] = (data[j] << 24 | data[j + 1] << 16) >> 16; + j += 2; + stackSize++; + } else if (value === 14) { + if (stackSize >= 4) { + stackSize -= 4; + + if (this.seacAnalysisEnabled) { + state.seac = stack.slice(stackSize, stackSize + 4); + return false; + } + } + + validationCommand = CharstringValidationData[value]; + } else if (value >= 32 && value <= 246) { + stack[stackSize] = value - 139; + stackSize++; + } else if (value >= 247 && value <= 254) { + stack[stackSize] = value < 251 ? (value - 247 << 8) + data[j] + 108 : -(value - 251 << 8) - data[j] - 108; + j++; + stackSize++; + } else if (value === 255) { + stack[stackSize] = (data[j] << 24 | data[j + 1] << 16 | data[j + 2] << 8 | data[j + 3]) / 65536; + j += 4; + stackSize++; + } else if (value === 19 || value === 20) { + state.hints += stackSize >> 1; + j += state.hints + 7 >> 3; + stackSize %= 2; + validationCommand = CharstringValidationData[value]; + } else if (value === 10 || value === 29) { + var subrsIndex; + + if (value === 10) { + subrsIndex = localSubrIndex; + } else { + subrsIndex = globalSubrIndex; + } + + if (!subrsIndex) { + validationCommand = CharstringValidationData[value]; + (0, _util.warn)("Missing subrsIndex for " + validationCommand.id); + return false; + } + + var bias = 32768; + + if (subrsIndex.count < 1240) { + bias = 107; + } else if (subrsIndex.count < 33900) { + bias = 1131; + } + + var subrNumber = stack[--stackSize] + bias; + + if (subrNumber < 0 || subrNumber >= subrsIndex.count || isNaN(subrNumber)) { + validationCommand = CharstringValidationData[value]; + (0, _util.warn)("Out of bounds subrIndex for " + validationCommand.id); + return false; + } + + state.stackSize = stackSize; + state.callDepth++; + var valid = this.parseCharString(state, subrsIndex.get(subrNumber), localSubrIndex, globalSubrIndex); + + if (!valid) { + return false; + } + + state.callDepth--; + stackSize = state.stackSize; + continue; + } else if (value === 11) { + state.stackSize = stackSize; + return true; + } else { + validationCommand = CharstringValidationData[value]; + } + + if (validationCommand) { + if (validationCommand.stem) { + state.hints += stackSize >> 1; + + if (value === 3 || value === 23) { + state.hasVStems = true; + } else if (state.hasVStems && (value === 1 || value === 18)) { + (0, _util.warn)("CFF stem hints are in wrong order"); + data[j - 1] = value === 1 ? 3 : 23; + } + } + + if ("min" in validationCommand) { + if (!state.undefStack && stackSize < validationCommand.min) { + (0, _util.warn)("Not enough parameters for " + validationCommand.id + "; actual: " + stackSize + ", expected: " + validationCommand.min); + return false; + } + } + + if (state.firstStackClearing && validationCommand.stackClearing) { + state.firstStackClearing = false; + stackSize -= validationCommand.min; + + if (stackSize >= 2 && validationCommand.stem) { + stackSize %= 2; + } else if (stackSize > 1) { + (0, _util.warn)("Found too many parameters for stack-clearing command"); + } + + if (stackSize > 0 && stack[stackSize - 1] >= 0) { + state.width = stack[stackSize - 1]; + } + } + + if ("stackDelta" in validationCommand) { + if ("stackFn" in validationCommand) { + validationCommand.stackFn(stack, stackSize); + } + + stackSize += validationCommand.stackDelta; + } else if (validationCommand.stackClearing) { + stackSize = 0; + } else if (validationCommand.resetStack) { + stackSize = 0; + state.undefStack = false; + } else if (validationCommand.undefStack) { + stackSize = 0; + state.undefStack = true; + state.firstStackClearing = false; + } + } + } + + state.stackSize = stackSize; + return true; + }, + + parseCharStrings({ + charStrings, + localSubrIndex, + globalSubrIndex, + fdSelect, + fdArray, + privateDict + }) { + var seacs = []; + var widths = []; + var count = charStrings.count; + + for (var i = 0; i < count; i++) { + var charstring = charStrings.get(i); + var state = { + callDepth: 0, + stackSize: 0, + stack: [], + undefStack: true, + hints: 0, + firstStackClearing: true, + seac: null, + width: null, + hasVStems: false + }; + var valid = true; + var localSubrToUse = null; + var privateDictToUse = privateDict; + + if (fdSelect && fdArray.length) { + var fdIndex = fdSelect.getFDIndex(i); + + if (fdIndex === -1) { + (0, _util.warn)("Glyph index is not in fd select."); + valid = false; + } + + if (fdIndex >= fdArray.length) { + (0, _util.warn)("Invalid fd index for glyph index."); + valid = false; + } + + if (valid) { + privateDictToUse = fdArray[fdIndex].privateDict; + localSubrToUse = privateDictToUse.subrsIndex; + } + } else if (localSubrIndex) { + localSubrToUse = localSubrIndex; + } + + if (valid) { + valid = this.parseCharString(state, charstring, localSubrToUse, globalSubrIndex); + } + + if (state.width !== null) { + const nominalWidth = privateDictToUse.getByName("nominalWidthX"); + widths[i] = nominalWidth + state.width; + } else { + const defaultWidth = privateDictToUse.getByName("defaultWidthX"); + widths[i] = defaultWidth; + } + + if (state.seac !== null) { + seacs[i] = state.seac; + } + + if (!valid) { + charStrings.set(i, new Uint8Array([14])); + } + } + + return { + charStrings, + seacs, + widths + }; + }, + + emptyPrivateDictionary: function CFFParser_emptyPrivateDictionary(parentDict) { + var privateDict = this.createDict(CFFPrivateDict, [], parentDict.strings); + parentDict.setByKey(18, [0, 0]); + parentDict.privateDict = privateDict; + }, + parsePrivateDict: function CFFParser_parsePrivateDict(parentDict) { + if (!parentDict.hasName("Private")) { + this.emptyPrivateDictionary(parentDict); + return; + } + + var privateOffset = parentDict.getByName("Private"); + + if (!Array.isArray(privateOffset) || privateOffset.length !== 2) { + parentDict.removeByName("Private"); + return; + } + + var size = privateOffset[0]; + var offset = privateOffset[1]; + + if (size === 0 || offset >= this.bytes.length) { + this.emptyPrivateDictionary(parentDict); + return; + } + + var privateDictEnd = offset + size; + var dictData = this.bytes.subarray(offset, privateDictEnd); + var dict = this.parseDict(dictData); + var privateDict = this.createDict(CFFPrivateDict, dict, parentDict.strings); + parentDict.privateDict = privateDict; + + if (!privateDict.getByName("Subrs")) { + return; + } + + var subrsOffset = privateDict.getByName("Subrs"); + var relativeOffset = offset + subrsOffset; + + if (subrsOffset === 0 || relativeOffset >= this.bytes.length) { + this.emptyPrivateDictionary(parentDict); + return; + } + + var subrsIndex = this.parseIndex(relativeOffset); + privateDict.subrsIndex = subrsIndex.obj; + }, + parseCharsets: function CFFParser_parseCharsets(pos, length, strings, cid) { + if (pos === 0) { + return new CFFCharset(true, CFFCharsetPredefinedTypes.ISO_ADOBE, _charsets.ISOAdobeCharset); + } else if (pos === 1) { + return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT, _charsets.ExpertCharset); + } else if (pos === 2) { + return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT_SUBSET, _charsets.ExpertSubsetCharset); + } + + var bytes = this.bytes; + var start = pos; + var format = bytes[pos++]; + const charset = [cid ? 0 : ".notdef"]; + var id, count, i; + length -= 1; + + switch (format) { + case 0: + for (i = 0; i < length; i++) { + id = bytes[pos++] << 8 | bytes[pos++]; + charset.push(cid ? id : strings.get(id)); + } + + break; + + case 1: + while (charset.length <= length) { + id = bytes[pos++] << 8 | bytes[pos++]; + count = bytes[pos++]; + + for (i = 0; i <= count; i++) { + charset.push(cid ? id++ : strings.get(id++)); + } + } + + break; + + case 2: + while (charset.length <= length) { + id = bytes[pos++] << 8 | bytes[pos++]; + count = bytes[pos++] << 8 | bytes[pos++]; + + for (i = 0; i <= count; i++) { + charset.push(cid ? id++ : strings.get(id++)); + } + } + + break; + + default: + throw new _util.FormatError("Unknown charset format"); + } + + var end = pos; + var raw = bytes.subarray(start, end); + return new CFFCharset(false, format, charset, raw); + }, + parseEncoding: function CFFParser_parseEncoding(pos, properties, strings, charset) { + var encoding = Object.create(null); + var bytes = this.bytes; + var predefined = false; + var format, i, ii; + var raw = null; + + function readSupplement() { + var supplementsCount = bytes[pos++]; + + for (i = 0; i < supplementsCount; i++) { + var code = bytes[pos++]; + var sid = (bytes[pos++] << 8) + (bytes[pos++] & 0xff); + encoding[code] = charset.indexOf(strings.get(sid)); + } + } + + if (pos === 0 || pos === 1) { + predefined = true; + format = pos; + var baseEncoding = pos ? _encodings.ExpertEncoding : _encodings.StandardEncoding; + + for (i = 0, ii = charset.length; i < ii; i++) { + var index = baseEncoding.indexOf(charset[i]); + + if (index !== -1) { + encoding[index] = i; + } + } + } else { + var dataStart = pos; + format = bytes[pos++]; + + switch (format & 0x7f) { + case 0: + var glyphsCount = bytes[pos++]; + + for (i = 1; i <= glyphsCount; i++) { + encoding[bytes[pos++]] = i; + } + + break; + + case 1: + var rangesCount = bytes[pos++]; + var gid = 1; + + for (i = 0; i < rangesCount; i++) { + var start = bytes[pos++]; + var left = bytes[pos++]; + + for (var j = start; j <= start + left; j++) { + encoding[j] = gid++; + } + } + + break; + + default: + throw new _util.FormatError(`Unknown encoding format: ${format} in CFF`); + } + + var dataEnd = pos; + + if (format & 0x80) { + bytes[dataStart] &= 0x7f; + readSupplement(); + } + + raw = bytes.subarray(dataStart, dataEnd); + } + + format = format & 0x7f; + return new CFFEncoding(predefined, format, encoding, raw); + }, + parseFDSelect: function CFFParser_parseFDSelect(pos, length) { + var bytes = this.bytes; + var format = bytes[pos++]; + var fdSelect = []; + var i; + + switch (format) { + case 0: + for (i = 0; i < length; ++i) { + var id = bytes[pos++]; + fdSelect.push(id); + } + + break; + + case 3: + var rangesCount = bytes[pos++] << 8 | bytes[pos++]; + + for (i = 0; i < rangesCount; ++i) { + var first = bytes[pos++] << 8 | bytes[pos++]; + + if (i === 0 && first !== 0) { + (0, _util.warn)("parseFDSelect: The first range must have a first GID of 0" + " -- trying to recover."); + first = 0; + } + + var fdIndex = bytes[pos++]; + var next = bytes[pos] << 8 | bytes[pos + 1]; + + for (var j = first; j < next; ++j) { + fdSelect.push(fdIndex); + } + } + + pos += 2; + break; + + default: + throw new _util.FormatError(`parseFDSelect: Unknown format "${format}".`); + } + + if (fdSelect.length !== length) { + throw new _util.FormatError("parseFDSelect: Invalid font data."); + } + + return new CFFFDSelect(format, fdSelect); + } + }; + return CFFParser; +}(); + +exports.CFFParser = CFFParser; + +var CFF = function CFFClosure() { + function CFF() { + this.header = null; + this.names = []; + this.topDict = null; + this.strings = new CFFStrings(); + this.globalSubrIndex = null; + this.encoding = null; + this.charset = null; + this.charStrings = null; + this.fdArray = []; + this.fdSelect = null; + this.isCIDFont = false; + } + + CFF.prototype = { + duplicateFirstGlyph: function CFF_duplicateFirstGlyph() { + if (this.charStrings.count >= 65535) { + (0, _util.warn)("Not enough space in charstrings to duplicate first glyph."); + return; + } + + var glyphZero = this.charStrings.get(0); + this.charStrings.add(glyphZero); + + if (this.isCIDFont) { + this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0]); + } + }, + hasGlyphId: function CFF_hasGlyphID(id) { + if (id < 0 || id >= this.charStrings.count) { + return false; + } + + var glyph = this.charStrings.get(id); + return glyph.length > 0; + } + }; + return CFF; +}(); + +exports.CFF = CFF; + +var CFFHeader = function CFFHeaderClosure() { + function CFFHeader(major, minor, hdrSize, offSize) { + this.major = major; + this.minor = minor; + this.hdrSize = hdrSize; + this.offSize = offSize; + } + + return CFFHeader; +}(); + +exports.CFFHeader = CFFHeader; + +var CFFStrings = function CFFStringsClosure() { + function CFFStrings() { + this.strings = []; + } + + CFFStrings.prototype = { + get: function CFFStrings_get(index) { + if (index >= 0 && index <= NUM_STANDARD_CFF_STRINGS - 1) { + return CFFStandardStrings[index]; + } + + if (index - NUM_STANDARD_CFF_STRINGS <= this.strings.length) { + return this.strings[index - NUM_STANDARD_CFF_STRINGS]; + } + + return CFFStandardStrings[0]; + }, + getSID: function CFFStrings_getSID(str) { + let index = CFFStandardStrings.indexOf(str); + + if (index !== -1) { + return index; + } + + index = this.strings.indexOf(str); + + if (index !== -1) { + return index + NUM_STANDARD_CFF_STRINGS; + } + + return -1; + }, + add: function CFFStrings_add(value) { + this.strings.push(value); + }, + + get count() { + return this.strings.length; + } + + }; + return CFFStrings; +}(); + +exports.CFFStrings = CFFStrings; + +var CFFIndex = function CFFIndexClosure() { + function CFFIndex() { + this.objects = []; + this.length = 0; + } + + CFFIndex.prototype = { + add: function CFFIndex_add(data) { + this.length += data.length; + this.objects.push(data); + }, + set: function CFFIndex_set(index, data) { + this.length += data.length - this.objects[index].length; + this.objects[index] = data; + }, + get: function CFFIndex_get(index) { + return this.objects[index]; + }, + + get count() { + return this.objects.length; + } + + }; + return CFFIndex; +}(); + +exports.CFFIndex = CFFIndex; + +var CFFDict = function CFFDictClosure() { + function CFFDict(tables, strings) { + this.keyToNameMap = tables.keyToNameMap; + this.nameToKeyMap = tables.nameToKeyMap; + this.defaults = tables.defaults; + this.types = tables.types; + this.opcodes = tables.opcodes; + this.order = tables.order; + this.strings = strings; + this.values = Object.create(null); + } + + CFFDict.prototype = { + setByKey: function CFFDict_setByKey(key, value) { + if (!(key in this.keyToNameMap)) { + return false; + } + + var valueLength = value.length; + + if (valueLength === 0) { + return true; + } + + for (var i = 0; i < valueLength; i++) { + if (isNaN(value[i])) { + (0, _util.warn)('Invalid CFFDict value: "' + value + '" for key "' + key + '".'); + return true; + } + } + + var type = this.types[key]; + + if (type === "num" || type === "sid" || type === "offset") { + value = value[0]; + } + + this.values[key] = value; + return true; + }, + setByName: function CFFDict_setByName(name, value) { + if (!(name in this.nameToKeyMap)) { + throw new _util.FormatError(`Invalid dictionary name "${name}"`); + } + + this.values[this.nameToKeyMap[name]] = value; + }, + hasName: function CFFDict_hasName(name) { + return this.nameToKeyMap[name] in this.values; + }, + getByName: function CFFDict_getByName(name) { + if (!(name in this.nameToKeyMap)) { + throw new _util.FormatError(`Invalid dictionary name ${name}"`); + } + + var key = this.nameToKeyMap[name]; + + if (!(key in this.values)) { + return this.defaults[key]; + } + + return this.values[key]; + }, + removeByName: function CFFDict_removeByName(name) { + delete this.values[this.nameToKeyMap[name]]; + } + }; + + CFFDict.createTables = function CFFDict_createTables(layout) { + var tables = { + keyToNameMap: {}, + nameToKeyMap: {}, + defaults: {}, + types: {}, + opcodes: {}, + order: [] + }; + + for (var i = 0, ii = layout.length; i < ii; ++i) { + var entry = layout[i]; + var key = Array.isArray(entry[0]) ? (entry[0][0] << 8) + entry[0][1] : entry[0]; + tables.keyToNameMap[key] = entry[1]; + tables.nameToKeyMap[entry[1]] = key; + tables.types[key] = entry[2]; + tables.defaults[key] = entry[3]; + tables.opcodes[key] = Array.isArray(entry[0]) ? entry[0] : [entry[0]]; + tables.order.push(key); + } + + return tables; + }; + + return CFFDict; +}(); + +var CFFTopDict = function CFFTopDictClosure() { + var layout = [[[12, 30], "ROS", ["sid", "sid", "num"], null], [[12, 20], "SyntheticBase", "num", null], [0, "version", "sid", null], [1, "Notice", "sid", null], [[12, 0], "Copyright", "sid", null], [2, "FullName", "sid", null], [3, "FamilyName", "sid", null], [4, "Weight", "sid", null], [[12, 1], "isFixedPitch", "num", 0], [[12, 2], "ItalicAngle", "num", 0], [[12, 3], "UnderlinePosition", "num", -100], [[12, 4], "UnderlineThickness", "num", 50], [[12, 5], "PaintType", "num", 0], [[12, 6], "CharstringType", "num", 2], [[12, 7], "FontMatrix", ["num", "num", "num", "num", "num", "num"], [0.001, 0, 0, 0.001, 0, 0]], [13, "UniqueID", "num", null], [5, "FontBBox", ["num", "num", "num", "num"], [0, 0, 0, 0]], [[12, 8], "StrokeWidth", "num", 0], [14, "XUID", "array", null], [15, "charset", "offset", 0], [16, "Encoding", "offset", 0], [17, "CharStrings", "offset", 0], [18, "Private", ["offset", "offset"], null], [[12, 21], "PostScript", "sid", null], [[12, 22], "BaseFontName", "sid", null], [[12, 23], "BaseFontBlend", "delta", null], [[12, 31], "CIDFontVersion", "num", 0], [[12, 32], "CIDFontRevision", "num", 0], [[12, 33], "CIDFontType", "num", 0], [[12, 34], "CIDCount", "num", 8720], [[12, 35], "UIDBase", "num", null], [[12, 37], "FDSelect", "offset", null], [[12, 36], "FDArray", "offset", null], [[12, 38], "FontName", "sid", null]]; + var tables = null; + + function CFFTopDict(strings) { + if (tables === null) { + tables = CFFDict.createTables(layout); + } + + CFFDict.call(this, tables, strings); + this.privateDict = null; + } + + CFFTopDict.prototype = Object.create(CFFDict.prototype); + return CFFTopDict; +}(); + +exports.CFFTopDict = CFFTopDict; + +var CFFPrivateDict = function CFFPrivateDictClosure() { + var layout = [[6, "BlueValues", "delta", null], [7, "OtherBlues", "delta", null], [8, "FamilyBlues", "delta", null], [9, "FamilyOtherBlues", "delta", null], [[12, 9], "BlueScale", "num", 0.039625], [[12, 10], "BlueShift", "num", 7], [[12, 11], "BlueFuzz", "num", 1], [10, "StdHW", "num", null], [11, "StdVW", "num", null], [[12, 12], "StemSnapH", "delta", null], [[12, 13], "StemSnapV", "delta", null], [[12, 14], "ForceBold", "num", 0], [[12, 17], "LanguageGroup", "num", 0], [[12, 18], "ExpansionFactor", "num", 0.06], [[12, 19], "initialRandomSeed", "num", 0], [20, "defaultWidthX", "num", 0], [21, "nominalWidthX", "num", 0], [19, "Subrs", "offset", null]]; + var tables = null; + + function CFFPrivateDict(strings) { + if (tables === null) { + tables = CFFDict.createTables(layout); + } + + CFFDict.call(this, tables, strings); + this.subrsIndex = null; + } + + CFFPrivateDict.prototype = Object.create(CFFDict.prototype); + return CFFPrivateDict; +}(); + +exports.CFFPrivateDict = CFFPrivateDict; +var CFFCharsetPredefinedTypes = { + ISO_ADOBE: 0, + EXPERT: 1, + EXPERT_SUBSET: 2 +}; + +var CFFCharset = function CFFCharsetClosure() { + function CFFCharset(predefined, format, charset, raw) { + this.predefined = predefined; + this.format = format; + this.charset = charset; + this.raw = raw; + } + + return CFFCharset; +}(); + +exports.CFFCharset = CFFCharset; + +var CFFEncoding = function CFFEncodingClosure() { + function CFFEncoding(predefined, format, encoding, raw) { + this.predefined = predefined; + this.format = format; + this.encoding = encoding; + this.raw = raw; + } + + return CFFEncoding; +}(); + +var CFFFDSelect = function CFFFDSelectClosure() { + function CFFFDSelect(format, fdSelect) { + this.format = format; + this.fdSelect = fdSelect; + } + + CFFFDSelect.prototype = { + getFDIndex: function CFFFDSelect_get(glyphIndex) { + if (glyphIndex < 0 || glyphIndex >= this.fdSelect.length) { + return -1; + } + + return this.fdSelect[glyphIndex]; + } + }; + return CFFFDSelect; +}(); + +exports.CFFFDSelect = CFFFDSelect; + +var CFFOffsetTracker = function CFFOffsetTrackerClosure() { + function CFFOffsetTracker() { + this.offsets = Object.create(null); + } + + CFFOffsetTracker.prototype = { + isTracking: function CFFOffsetTracker_isTracking(key) { + return key in this.offsets; + }, + track: function CFFOffsetTracker_track(key, location) { + if (key in this.offsets) { + throw new _util.FormatError(`Already tracking location of ${key}`); + } + + this.offsets[key] = location; + }, + offset: function CFFOffsetTracker_offset(value) { + for (var key in this.offsets) { + this.offsets[key] += value; + } + }, + setEntryLocation: function CFFOffsetTracker_setEntryLocation(key, values, output) { + if (!(key in this.offsets)) { + throw new _util.FormatError(`Not tracking location of ${key}`); + } + + var data = output.data; + var dataOffset = this.offsets[key]; + var size = 5; + + for (var i = 0, ii = values.length; i < ii; ++i) { + var offset0 = i * size + dataOffset; + var offset1 = offset0 + 1; + var offset2 = offset0 + 2; + var offset3 = offset0 + 3; + var offset4 = offset0 + 4; + + if (data[offset0] !== 0x1d || data[offset1] !== 0 || data[offset2] !== 0 || data[offset3] !== 0 || data[offset4] !== 0) { + throw new _util.FormatError("writing to an offset that is not empty"); + } + + var value = values[i]; + data[offset0] = 0x1d; + data[offset1] = value >> 24 & 0xff; + data[offset2] = value >> 16 & 0xff; + data[offset3] = value >> 8 & 0xff; + data[offset4] = value & 0xff; + } + } + }; + return CFFOffsetTracker; +}(); + +var CFFCompiler = function CFFCompilerClosure() { + function CFFCompiler(cff) { + this.cff = cff; + } + + CFFCompiler.prototype = { + compile: function CFFCompiler_compile() { + var cff = this.cff; + var output = { + data: [], + length: 0, + add: function CFFCompiler_add(data) { + this.data = this.data.concat(data); + this.length = this.data.length; + } + }; + var header = this.compileHeader(cff.header); + output.add(header); + var nameIndex = this.compileNameIndex(cff.names); + output.add(nameIndex); + + if (cff.isCIDFont) { + if (cff.topDict.hasName("FontMatrix")) { + var base = cff.topDict.getByName("FontMatrix"); + cff.topDict.removeByName("FontMatrix"); + + for (var i = 0, ii = cff.fdArray.length; i < ii; i++) { + var subDict = cff.fdArray[i]; + var matrix = base.slice(0); + + if (subDict.hasName("FontMatrix")) { + matrix = _util.Util.transform(matrix, subDict.getByName("FontMatrix")); + } + + subDict.setByName("FontMatrix", matrix); + } + } + } + + cff.topDict.setByName("charset", 0); + var compiled = this.compileTopDicts([cff.topDict], output.length, cff.isCIDFont); + output.add(compiled.output); + var topDictTracker = compiled.trackers[0]; + var stringIndex = this.compileStringIndex(cff.strings.strings); + output.add(stringIndex); + var globalSubrIndex = this.compileIndex(cff.globalSubrIndex); + output.add(globalSubrIndex); + + if (cff.encoding && cff.topDict.hasName("Encoding")) { + if (cff.encoding.predefined) { + topDictTracker.setEntryLocation("Encoding", [cff.encoding.format], output); + } else { + var encoding = this.compileEncoding(cff.encoding); + topDictTracker.setEntryLocation("Encoding", [output.length], output); + output.add(encoding); + } + } + + var charset = this.compileCharset(cff.charset, cff.charStrings.count, cff.strings, cff.isCIDFont); + topDictTracker.setEntryLocation("charset", [output.length], output); + output.add(charset); + var charStrings = this.compileCharStrings(cff.charStrings); + topDictTracker.setEntryLocation("CharStrings", [output.length], output); + output.add(charStrings); + + if (cff.isCIDFont) { + topDictTracker.setEntryLocation("FDSelect", [output.length], output); + var fdSelect = this.compileFDSelect(cff.fdSelect); + output.add(fdSelect); + compiled = this.compileTopDicts(cff.fdArray, output.length, true); + topDictTracker.setEntryLocation("FDArray", [output.length], output); + output.add(compiled.output); + var fontDictTrackers = compiled.trackers; + this.compilePrivateDicts(cff.fdArray, fontDictTrackers, output); + } + + this.compilePrivateDicts([cff.topDict], [topDictTracker], output); + output.add([0]); + return output.data; + }, + encodeNumber: function CFFCompiler_encodeNumber(value) { + if (parseFloat(value) === parseInt(value, 10) && !isNaN(value)) { + return this.encodeInteger(value); + } + + return this.encodeFloat(value); + }, + encodeFloat: function CFFCompiler_encodeFloat(num) { + var value = num.toString(); + var m = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(value); + + if (m) { + var epsilon = parseFloat("1e" + ((m[2] ? +m[2] : 0) + m[1].length)); + value = (Math.round(num * epsilon) / epsilon).toString(); + } + + var nibbles = ""; + var i, ii; + + for (i = 0, ii = value.length; i < ii; ++i) { + var a = value[i]; + + if (a === "e") { + nibbles += value[++i] === "-" ? "c" : "b"; + } else if (a === ".") { + nibbles += "a"; + } else if (a === "-") { + nibbles += "e"; + } else { + nibbles += a; + } + } + + nibbles += nibbles.length & 1 ? "f" : "ff"; + var out = [30]; + + for (i = 0, ii = nibbles.length; i < ii; i += 2) { + out.push(parseInt(nibbles.substring(i, i + 2), 16)); + } + + return out; + }, + encodeInteger: function CFFCompiler_encodeInteger(value) { + var code; + + if (value >= -107 && value <= 107) { + code = [value + 139]; + } else if (value >= 108 && value <= 1131) { + value = value - 108; + code = [(value >> 8) + 247, value & 0xff]; + } else if (value >= -1131 && value <= -108) { + value = -value - 108; + code = [(value >> 8) + 251, value & 0xff]; + } else if (value >= -32768 && value <= 32767) { + code = [0x1c, value >> 8 & 0xff, value & 0xff]; + } else { + code = [0x1d, value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff]; + } + + return code; + }, + compileHeader: function CFFCompiler_compileHeader(header) { + return [header.major, header.minor, header.hdrSize, header.offSize]; + }, + compileNameIndex: function CFFCompiler_compileNameIndex(names) { + var nameIndex = new CFFIndex(); + + for (var i = 0, ii = names.length; i < ii; ++i) { + var name = names[i]; + var length = Math.min(name.length, 127); + var sanitizedName = new Array(length); + + for (var j = 0; j < length; j++) { + var char = name[j]; + + if (char < "!" || char > "~" || char === "[" || char === "]" || char === "(" || char === ")" || char === "{" || char === "}" || char === "<" || char === ">" || char === "/" || char === "%") { + char = "_"; + } + + sanitizedName[j] = char; + } + + sanitizedName = sanitizedName.join(""); + + if (sanitizedName === "") { + sanitizedName = "Bad_Font_Name"; + } + + nameIndex.add((0, _util.stringToBytes)(sanitizedName)); + } + + return this.compileIndex(nameIndex); + }, + compileTopDicts: function CFFCompiler_compileTopDicts(dicts, length, removeCidKeys) { + var fontDictTrackers = []; + var fdArrayIndex = new CFFIndex(); + + for (var i = 0, ii = dicts.length; i < ii; ++i) { + var fontDict = dicts[i]; + + if (removeCidKeys) { + fontDict.removeByName("CIDFontVersion"); + fontDict.removeByName("CIDFontRevision"); + fontDict.removeByName("CIDFontType"); + fontDict.removeByName("CIDCount"); + fontDict.removeByName("UIDBase"); + } + + var fontDictTracker = new CFFOffsetTracker(); + var fontDictData = this.compileDict(fontDict, fontDictTracker); + fontDictTrackers.push(fontDictTracker); + fdArrayIndex.add(fontDictData); + fontDictTracker.offset(length); + } + + fdArrayIndex = this.compileIndex(fdArrayIndex, fontDictTrackers); + return { + trackers: fontDictTrackers, + output: fdArrayIndex + }; + }, + compilePrivateDicts: function CFFCompiler_compilePrivateDicts(dicts, trackers, output) { + for (var i = 0, ii = dicts.length; i < ii; ++i) { + var fontDict = dicts[i]; + var privateDict = fontDict.privateDict; + + if (!privateDict || !fontDict.hasName("Private")) { + throw new _util.FormatError("There must be a private dictionary."); + } + + var privateDictTracker = new CFFOffsetTracker(); + var privateDictData = this.compileDict(privateDict, privateDictTracker); + var outputLength = output.length; + privateDictTracker.offset(outputLength); + + if (!privateDictData.length) { + outputLength = 0; + } + + trackers[i].setEntryLocation("Private", [privateDictData.length, outputLength], output); + output.add(privateDictData); + + if (privateDict.subrsIndex && privateDict.hasName("Subrs")) { + var subrs = this.compileIndex(privateDict.subrsIndex); + privateDictTracker.setEntryLocation("Subrs", [privateDictData.length], output); + output.add(subrs); + } + } + }, + compileDict: function CFFCompiler_compileDict(dict, offsetTracker) { + var out = []; + var order = dict.order; + + for (var i = 0; i < order.length; ++i) { + var key = order[i]; + + if (!(key in dict.values)) { + continue; + } + + var values = dict.values[key]; + var types = dict.types[key]; + + if (!Array.isArray(types)) { + types = [types]; + } + + if (!Array.isArray(values)) { + values = [values]; + } + + if (values.length === 0) { + continue; + } + + for (var j = 0, jj = types.length; j < jj; ++j) { + var type = types[j]; + var value = values[j]; + + switch (type) { + case "num": + case "sid": + out = out.concat(this.encodeNumber(value)); + break; + + case "offset": + var name = dict.keyToNameMap[key]; + + if (!offsetTracker.isTracking(name)) { + offsetTracker.track(name, out.length); + } + + out = out.concat([0x1d, 0, 0, 0, 0]); + break; + + case "array": + case "delta": + out = out.concat(this.encodeNumber(value)); + + for (var k = 1, kk = values.length; k < kk; ++k) { + out = out.concat(this.encodeNumber(values[k])); + } + + break; + + default: + throw new _util.FormatError(`Unknown data type of ${type}`); + } + } + + out = out.concat(dict.opcodes[key]); + } + + return out; + }, + compileStringIndex: function CFFCompiler_compileStringIndex(strings) { + var stringIndex = new CFFIndex(); + + for (var i = 0, ii = strings.length; i < ii; ++i) { + stringIndex.add((0, _util.stringToBytes)(strings[i])); + } + + return this.compileIndex(stringIndex); + }, + compileGlobalSubrIndex: function CFFCompiler_compileGlobalSubrIndex() { + var globalSubrIndex = this.cff.globalSubrIndex; + this.out.writeByteArray(this.compileIndex(globalSubrIndex)); + }, + compileCharStrings: function CFFCompiler_compileCharStrings(charStrings) { + var charStringsIndex = new CFFIndex(); + + for (var i = 0; i < charStrings.count; i++) { + var glyph = charStrings.get(i); + + if (glyph.length === 0) { + charStringsIndex.add(new Uint8Array([0x8b, 0x0e])); + continue; + } + + charStringsIndex.add(glyph); + } + + return this.compileIndex(charStringsIndex); + }, + compileCharset: function CFFCompiler_compileCharset(charset, numGlyphs, strings, isCIDFont) { + let out; + const numGlyphsLessNotDef = numGlyphs - 1; + + if (isCIDFont) { + out = new Uint8Array([2, 0, 0, numGlyphsLessNotDef >> 8 & 0xff, numGlyphsLessNotDef & 0xff]); + } else { + const length = 1 + numGlyphsLessNotDef * 2; + out = new Uint8Array(length); + out[0] = 0; + let charsetIndex = 0; + const numCharsets = charset.charset.length; + let warned = false; + + for (let i = 1; i < out.length; i += 2) { + let sid = 0; + + if (charsetIndex < numCharsets) { + const name = charset.charset[charsetIndex++]; + sid = strings.getSID(name); + + if (sid === -1) { + sid = 0; + + if (!warned) { + warned = true; + (0, _util.warn)(`Couldn't find ${name} in CFF strings`); + } + } + } + + out[i] = sid >> 8 & 0xff; + out[i + 1] = sid & 0xff; + } + } + + return this.compileTypedArray(out); + }, + compileEncoding: function CFFCompiler_compileEncoding(encoding) { + return this.compileTypedArray(encoding.raw); + }, + compileFDSelect: function CFFCompiler_compileFDSelect(fdSelect) { + const format = fdSelect.format; + let out, i; + + switch (format) { + case 0: + out = new Uint8Array(1 + fdSelect.fdSelect.length); + out[0] = format; + + for (i = 0; i < fdSelect.fdSelect.length; i++) { + out[i + 1] = fdSelect.fdSelect[i]; + } + + break; + + case 3: + const start = 0; + let lastFD = fdSelect.fdSelect[0]; + const ranges = [format, 0, 0, start >> 8 & 0xff, start & 0xff, lastFD]; + + for (i = 1; i < fdSelect.fdSelect.length; i++) { + const currentFD = fdSelect.fdSelect[i]; + + if (currentFD !== lastFD) { + ranges.push(i >> 8 & 0xff, i & 0xff, currentFD); + lastFD = currentFD; + } + } + + const numRanges = (ranges.length - 3) / 3; + ranges[1] = numRanges >> 8 & 0xff; + ranges[2] = numRanges & 0xff; + ranges.push(i >> 8 & 0xff, i & 0xff); + out = new Uint8Array(ranges); + break; + } + + return this.compileTypedArray(out); + }, + compileTypedArray: function CFFCompiler_compileTypedArray(data) { + var out = []; + + for (var i = 0, ii = data.length; i < ii; ++i) { + out[i] = data[i]; + } + + return out; + }, + compileIndex: function CFFCompiler_compileIndex(index, trackers) { + trackers = trackers || []; + var objects = index.objects; + var count = objects.length; + + if (count === 0) { + return [0, 0, 0]; + } + + var data = [count >> 8 & 0xff, count & 0xff]; + var lastOffset = 1, + i; + + for (i = 0; i < count; ++i) { + lastOffset += objects[i].length; + } + + var offsetSize; + + if (lastOffset < 0x100) { + offsetSize = 1; + } else if (lastOffset < 0x10000) { + offsetSize = 2; + } else if (lastOffset < 0x1000000) { + offsetSize = 3; + } else { + offsetSize = 4; + } + + data.push(offsetSize); + var relativeOffset = 1; + + for (i = 0; i < count + 1; i++) { + if (offsetSize === 1) { + data.push(relativeOffset & 0xff); + } else if (offsetSize === 2) { + data.push(relativeOffset >> 8 & 0xff, relativeOffset & 0xff); + } else if (offsetSize === 3) { + data.push(relativeOffset >> 16 & 0xff, relativeOffset >> 8 & 0xff, relativeOffset & 0xff); + } else { + data.push(relativeOffset >>> 24 & 0xff, relativeOffset >> 16 & 0xff, relativeOffset >> 8 & 0xff, relativeOffset & 0xff); + } + + if (objects[i]) { + relativeOffset += objects[i].length; + } + } + + for (i = 0; i < count; i++) { + if (trackers[i]) { + trackers[i].offset(data.length); + } + + for (var j = 0, jj = objects[i].length; j < jj; j++) { + data.push(objects[i][j]); + } + } + + return data; + } + }; + return CFFCompiler; +}(); + +exports.CFFCompiler = CFFCompiler; + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ExpertSubsetCharset = exports.ExpertCharset = exports.ISOAdobeCharset = void 0; +const ISOAdobeCharset = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "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", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "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", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron"]; +exports.ISOAdobeCharset = ISOAdobeCharset; +const ExpertCharset = [".notdef", "space", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "onequarter", "onehalf", "threequarters", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall"]; +exports.ExpertCharset = ExpertCharset; +const ExpertSubsetCharset = [".notdef", "space", "dollaroldstyle", "dollarsuperior", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "hyphensuperior", "colonmonetary", "onefitted", "rupiah", "centoldstyle", "figuredash", "hypheninferior", "onequarter", "onehalf", "threequarters", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior"]; +exports.ExpertSubsetCharset = ExpertSubsetCharset; + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getEncoding = getEncoding; +exports.ExpertEncoding = exports.ZapfDingbatsEncoding = exports.SymbolSetEncoding = exports.MacRomanEncoding = exports.StandardEncoding = exports.WinAnsiEncoding = void 0; +const ExpertEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclamsmall", "Hungarumlautsmall", "", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "", "", "", "isuperior", "", "", "lsuperior", "msuperior", "nsuperior", "osuperior", "", "", "rsuperior", "ssuperior", "tsuperior", "", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "exclamdownsmall", "centoldstyle", "Lslashsmall", "", "", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "", "Dotaccentsmall", "", "", "Macronsmall", "", "", "figuredash", "hypheninferior", "", "", "Ogoneksmall", "Ringsmall", "Cedillasmall", "", "", "", "onequarter", "onehalf", "threequarters", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "", "", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall"]; +exports.ExpertEncoding = ExpertEncoding; +const MacExpertEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclamsmall", "Hungarumlautsmall", "centoldstyle", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "", "threequartersemdash", "", "questionsmall", "", "", "", "", "Ethsmall", "", "", "onequarter", "onehalf", "threequarters", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "", "", "", "", "", "", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "", "parenrightinferior", "Circumflexsmall", "hypheninferior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "", "", "asuperior", "centsuperior", "", "", "", "", "Aacutesmall", "Agravesmall", "Acircumflexsmall", "Adieresissmall", "Atildesmall", "Aringsmall", "Ccedillasmall", "Eacutesmall", "Egravesmall", "Ecircumflexsmall", "Edieresissmall", "Iacutesmall", "Igravesmall", "Icircumflexsmall", "Idieresissmall", "Ntildesmall", "Oacutesmall", "Ogravesmall", "Ocircumflexsmall", "Odieresissmall", "Otildesmall", "Uacutesmall", "Ugravesmall", "Ucircumflexsmall", "Udieresissmall", "", "eightsuperior", "fourinferior", "threeinferior", "sixinferior", "eightinferior", "seveninferior", "Scaronsmall", "", "centinferior", "twoinferior", "", "Dieresissmall", "", "Caronsmall", "osuperior", "fiveinferior", "", "commainferior", "periodinferior", "Yacutesmall", "", "dollarinferior", "", "", "Thornsmall", "", "nineinferior", "zeroinferior", "Zcaronsmall", "AEsmall", "Oslashsmall", "questiondownsmall", "oneinferior", "Lslashsmall", "", "", "", "", "", "", "Cedillasmall", "", "", "", "", "", "OEsmall", "figuredash", "hyphensuperior", "", "", "", "", "exclamdownsmall", "", "Ydieresissmall", "", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "ninesuperior", "zerosuperior", "", "esuperior", "rsuperior", "tsuperior", "", "", "isuperior", "ssuperior", "dsuperior", "", "", "", "", "", "lsuperior", "Ogoneksmall", "Brevesmall", "Macronsmall", "bsuperior", "nsuperior", "msuperior", "commasuperior", "periodsuperior", "Dotaccentsmall", "Ringsmall", "", "", "", ""]; +const MacRomanEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "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", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "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", "braceleft", "bar", "braceright", "asciitilde", "", "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", "aacute", "agrave", "acircumflex", "adieresis", "atilde", "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling", "section", "bullet", "paragraph", "germandbls", "registered", "copyright", "trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", "yen", "mu", "partialdiff", "summation", "product", "pi", "integral", "ordfeminine", "ordmasculine", "Omega", "ae", "oslash", "questiondown", "exclamdown", "logicalnot", "radical", "florin", "approxequal", "Delta", "guillemotleft", "guillemotright", "ellipsis", "space", "Agrave", "Atilde", "Otilde", "OE", "oe", "endash", "emdash", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", "lozenge", "ydieresis", "Ydieresis", "fraction", "currency", "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl", "periodcentered", "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi", "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron"]; +exports.MacRomanEncoding = MacRomanEncoding; +const StandardEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "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", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "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", "braceleft", "bar", "braceright", "asciitilde", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "", "endash", "dagger", "daggerdbl", "periodcentered", "", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "", "questiondown", "", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "", "ring", "cedilla", "", "hungarumlaut", "ogonek", "caron", "emdash", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AE", "", "ordfeminine", "", "", "", "", "Lslash", "Oslash", "OE", "ordmasculine", "", "", "", "", "", "ae", "", "", "", "dotlessi", "", "", "lslash", "oslash", "oe", "germandbls", "", "", "", ""]; +exports.StandardEncoding = StandardEncoding; +const WinAnsiEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "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", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "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", "braceleft", "bar", "braceright", "asciitilde", "bullet", "Euro", "bullet", "quotesinglbase", "florin", "quotedblbase", "ellipsis", "dagger", "daggerdbl", "circumflex", "perthousand", "Scaron", "guilsinglleft", "OE", "bullet", "Zcaron", "bullet", "bullet", "quoteleft", "quoteright", "quotedblleft", "quotedblright", "bullet", "endash", "emdash", "tilde", "trademark", "scaron", "guilsinglright", "oe", "bullet", "zcaron", "Ydieresis", "space", "exclamdown", "cent", "sterling", "currency", "yen", "brokenbar", "section", "dieresis", "copyright", "ordfeminine", "guillemotleft", "logicalnot", "hyphen", "registered", "macron", "degree", "plusminus", "twosuperior", "threesuperior", "acute", "mu", "paragraph", "periodcentered", "cedilla", "onesuperior", "ordmasculine", "guillemotright", "onequarter", "onehalf", "threequarters", "questiondown", "Agrave", "Aacute", "Acircumflex", "Atilde", "Adieresis", "Aring", "AE", "Ccedilla", "Egrave", "Eacute", "Ecircumflex", "Edieresis", "Igrave", "Iacute", "Icircumflex", "Idieresis", "Eth", "Ntilde", "Ograve", "Oacute", "Ocircumflex", "Otilde", "Odieresis", "multiply", "Oslash", "Ugrave", "Uacute", "Ucircumflex", "Udieresis", "Yacute", "Thorn", "germandbls", "agrave", "aacute", "acircumflex", "atilde", "adieresis", "aring", "ae", "ccedilla", "egrave", "eacute", "ecircumflex", "edieresis", "igrave", "iacute", "icircumflex", "idieresis", "eth", "ntilde", "ograve", "oacute", "ocircumflex", "otilde", "odieresis", "divide", "oslash", "ugrave", "uacute", "ucircumflex", "udieresis", "yacute", "thorn", "ydieresis"]; +exports.WinAnsiEncoding = WinAnsiEncoding; +const SymbolSetEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "universal", "numbersign", "existential", "percent", "ampersand", "suchthat", "parenleft", "parenright", "asteriskmath", "plus", "comma", "minus", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "congruent", "Alpha", "Beta", "Chi", "Delta", "Epsilon", "Phi", "Gamma", "Eta", "Iota", "theta1", "Kappa", "Lambda", "Mu", "Nu", "Omicron", "Pi", "Theta", "Rho", "Sigma", "Tau", "Upsilon", "sigma1", "Omega", "Xi", "Psi", "Zeta", "bracketleft", "therefore", "bracketright", "perpendicular", "underscore", "radicalex", "alpha", "beta", "chi", "delta", "epsilon", "phi", "gamma", "eta", "iota", "phi1", "kappa", "lambda", "mu", "nu", "omicron", "pi", "theta", "rho", "sigma", "tau", "upsilon", "omega1", "omega", "xi", "psi", "zeta", "braceleft", "bar", "braceright", "similar", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Euro", "Upsilon1", "minute", "lessequal", "fraction", "infinity", "florin", "club", "diamond", "heart", "spade", "arrowboth", "arrowleft", "arrowup", "arrowright", "arrowdown", "degree", "plusminus", "second", "greaterequal", "multiply", "proportional", "partialdiff", "bullet", "divide", "notequal", "equivalence", "approxequal", "ellipsis", "arrowvertex", "arrowhorizex", "carriagereturn", "aleph", "Ifraktur", "Rfraktur", "weierstrass", "circlemultiply", "circleplus", "emptyset", "intersection", "union", "propersuperset", "reflexsuperset", "notsubset", "propersubset", "reflexsubset", "element", "notelement", "angle", "gradient", "registerserif", "copyrightserif", "trademarkserif", "product", "radical", "dotmath", "logicalnot", "logicaland", "logicalor", "arrowdblboth", "arrowdblleft", "arrowdblup", "arrowdblright", "arrowdbldown", "lozenge", "angleleft", "registersans", "copyrightsans", "trademarksans", "summation", "parenlefttp", "parenleftex", "parenleftbt", "bracketlefttp", "bracketleftex", "bracketleftbt", "bracelefttp", "braceleftmid", "braceleftbt", "braceex", "", "angleright", "integral", "integraltp", "integralex", "integralbt", "parenrighttp", "parenrightex", "parenrightbt", "bracketrighttp", "bracketrightex", "bracketrightbt", "bracerighttp", "bracerightmid", "bracerightbt", ""]; +exports.SymbolSetEncoding = SymbolSetEncoding; +const ZapfDingbatsEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "a1", "a2", "a202", "a3", "a4", "a5", "a119", "a118", "a117", "a11", "a12", "a13", "a14", "a15", "a16", "a105", "a17", "a18", "a19", "a20", "a21", "a22", "a23", "a24", "a25", "a26", "a27", "a28", "a6", "a7", "a8", "a9", "a10", "a29", "a30", "a31", "a32", "a33", "a34", "a35", "a36", "a37", "a38", "a39", "a40", "a41", "a42", "a43", "a44", "a45", "a46", "a47", "a48", "a49", "a50", "a51", "a52", "a53", "a54", "a55", "a56", "a57", "a58", "a59", "a60", "a61", "a62", "a63", "a64", "a65", "a66", "a67", "a68", "a69", "a70", "a71", "a72", "a73", "a74", "a203", "a75", "a204", "a76", "a77", "a78", "a79", "a81", "a82", "a83", "a84", "a97", "a98", "a99", "a100", "", "a89", "a90", "a93", "a94", "a91", "a92", "a205", "a85", "a206", "a86", "a87", "a88", "a95", "a96", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "a101", "a102", "a103", "a104", "a106", "a107", "a108", "a112", "a111", "a110", "a109", "a120", "a121", "a122", "a123", "a124", "a125", "a126", "a127", "a128", "a129", "a130", "a131", "a132", "a133", "a134", "a135", "a136", "a137", "a138", "a139", "a140", "a141", "a142", "a143", "a144", "a145", "a146", "a147", "a148", "a149", "a150", "a151", "a152", "a153", "a154", "a155", "a156", "a157", "a158", "a159", "a160", "a161", "a163", "a164", "a196", "a165", "a192", "a166", "a167", "a168", "a169", "a170", "a171", "a172", "a173", "a162", "a174", "a175", "a176", "a177", "a178", "a179", "a193", "a180", "a199", "a181", "a200", "a182", "", "a201", "a183", "a184", "a197", "a185", "a194", "a198", "a186", "a195", "a187", "a188", "a189", "a190", "a191", ""]; +exports.ZapfDingbatsEncoding = ZapfDingbatsEncoding; + +function getEncoding(encodingName) { + switch (encodingName) { + case "WinAnsiEncoding": + return WinAnsiEncoding; + + case "StandardEncoding": + return StandardEncoding; + + case "MacRomanEncoding": + return MacRomanEncoding; + + case "SymbolSetEncoding": + return SymbolSetEncoding; + + case "ZapfDingbatsEncoding": + return ZapfDingbatsEncoding; + + case "ExpertEncoding": + return ExpertEncoding; + + case "MacExpertEncoding": + return MacExpertEncoding; + + default: + return null; + } +} + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +var getLookupTableFactory = __w_pdfjs_require__(8).getLookupTableFactory; +var getGlyphsUnicode = getLookupTableFactory(function (t) { + t.A = 0x0041; + t.AE = 0x00c6; + t.AEacute = 0x01fc; + t.AEmacron = 0x01e2; + t.AEsmall = 0xf7e6; + t.Aacute = 0x00c1; + t.Aacutesmall = 0xf7e1; + t.Abreve = 0x0102; + t.Abreveacute = 0x1eae; + t.Abrevecyrillic = 0x04d0; + t.Abrevedotbelow = 0x1eb6; + t.Abrevegrave = 0x1eb0; + t.Abrevehookabove = 0x1eb2; + t.Abrevetilde = 0x1eb4; + t.Acaron = 0x01cd; + t.Acircle = 0x24b6; + t.Acircumflex = 0x00c2; + t.Acircumflexacute = 0x1ea4; + t.Acircumflexdotbelow = 0x1eac; + t.Acircumflexgrave = 0x1ea6; + t.Acircumflexhookabove = 0x1ea8; + t.Acircumflexsmall = 0xf7e2; + t.Acircumflextilde = 0x1eaa; + t.Acute = 0xf6c9; + t.Acutesmall = 0xf7b4; + t.Acyrillic = 0x0410; + t.Adblgrave = 0x0200; + t.Adieresis = 0x00c4; + t.Adieresiscyrillic = 0x04d2; + t.Adieresismacron = 0x01de; + t.Adieresissmall = 0xf7e4; + t.Adotbelow = 0x1ea0; + t.Adotmacron = 0x01e0; + t.Agrave = 0x00c0; + t.Agravesmall = 0xf7e0; + t.Ahookabove = 0x1ea2; + t.Aiecyrillic = 0x04d4; + t.Ainvertedbreve = 0x0202; + t.Alpha = 0x0391; + t.Alphatonos = 0x0386; + t.Amacron = 0x0100; + t.Amonospace = 0xff21; + t.Aogonek = 0x0104; + t.Aring = 0x00c5; + t.Aringacute = 0x01fa; + t.Aringbelow = 0x1e00; + t.Aringsmall = 0xf7e5; + t.Asmall = 0xf761; + t.Atilde = 0x00c3; + t.Atildesmall = 0xf7e3; + t.Aybarmenian = 0x0531; + t.B = 0x0042; + t.Bcircle = 0x24b7; + t.Bdotaccent = 0x1e02; + t.Bdotbelow = 0x1e04; + t.Becyrillic = 0x0411; + t.Benarmenian = 0x0532; + t.Beta = 0x0392; + t.Bhook = 0x0181; + t.Blinebelow = 0x1e06; + t.Bmonospace = 0xff22; + t.Brevesmall = 0xf6f4; + t.Bsmall = 0xf762; + t.Btopbar = 0x0182; + t.C = 0x0043; + t.Caarmenian = 0x053e; + t.Cacute = 0x0106; + t.Caron = 0xf6ca; + t.Caronsmall = 0xf6f5; + t.Ccaron = 0x010c; + t.Ccedilla = 0x00c7; + t.Ccedillaacute = 0x1e08; + t.Ccedillasmall = 0xf7e7; + t.Ccircle = 0x24b8; + t.Ccircumflex = 0x0108; + t.Cdot = 0x010a; + t.Cdotaccent = 0x010a; + t.Cedillasmall = 0xf7b8; + t.Chaarmenian = 0x0549; + t.Cheabkhasiancyrillic = 0x04bc; + t.Checyrillic = 0x0427; + t.Chedescenderabkhasiancyrillic = 0x04be; + t.Chedescendercyrillic = 0x04b6; + t.Chedieresiscyrillic = 0x04f4; + t.Cheharmenian = 0x0543; + t.Chekhakassiancyrillic = 0x04cb; + t.Cheverticalstrokecyrillic = 0x04b8; + t.Chi = 0x03a7; + t.Chook = 0x0187; + t.Circumflexsmall = 0xf6f6; + t.Cmonospace = 0xff23; + t.Coarmenian = 0x0551; + t.Csmall = 0xf763; + t.D = 0x0044; + t.DZ = 0x01f1; + t.DZcaron = 0x01c4; + t.Daarmenian = 0x0534; + t.Dafrican = 0x0189; + t.Dcaron = 0x010e; + t.Dcedilla = 0x1e10; + t.Dcircle = 0x24b9; + t.Dcircumflexbelow = 0x1e12; + t.Dcroat = 0x0110; + t.Ddotaccent = 0x1e0a; + t.Ddotbelow = 0x1e0c; + t.Decyrillic = 0x0414; + t.Deicoptic = 0x03ee; + t.Delta = 0x2206; + t.Deltagreek = 0x0394; + t.Dhook = 0x018a; + t.Dieresis = 0xf6cb; + t.DieresisAcute = 0xf6cc; + t.DieresisGrave = 0xf6cd; + t.Dieresissmall = 0xf7a8; + t.Digammagreek = 0x03dc; + t.Djecyrillic = 0x0402; + t.Dlinebelow = 0x1e0e; + t.Dmonospace = 0xff24; + t.Dotaccentsmall = 0xf6f7; + t.Dslash = 0x0110; + t.Dsmall = 0xf764; + t.Dtopbar = 0x018b; + t.Dz = 0x01f2; + t.Dzcaron = 0x01c5; + t.Dzeabkhasiancyrillic = 0x04e0; + t.Dzecyrillic = 0x0405; + t.Dzhecyrillic = 0x040f; + t.E = 0x0045; + t.Eacute = 0x00c9; + t.Eacutesmall = 0xf7e9; + t.Ebreve = 0x0114; + t.Ecaron = 0x011a; + t.Ecedillabreve = 0x1e1c; + t.Echarmenian = 0x0535; + t.Ecircle = 0x24ba; + t.Ecircumflex = 0x00ca; + t.Ecircumflexacute = 0x1ebe; + t.Ecircumflexbelow = 0x1e18; + t.Ecircumflexdotbelow = 0x1ec6; + t.Ecircumflexgrave = 0x1ec0; + t.Ecircumflexhookabove = 0x1ec2; + t.Ecircumflexsmall = 0xf7ea; + t.Ecircumflextilde = 0x1ec4; + t.Ecyrillic = 0x0404; + t.Edblgrave = 0x0204; + t.Edieresis = 0x00cb; + t.Edieresissmall = 0xf7eb; + t.Edot = 0x0116; + t.Edotaccent = 0x0116; + t.Edotbelow = 0x1eb8; + t.Efcyrillic = 0x0424; + t.Egrave = 0x00c8; + t.Egravesmall = 0xf7e8; + t.Eharmenian = 0x0537; + t.Ehookabove = 0x1eba; + t.Eightroman = 0x2167; + t.Einvertedbreve = 0x0206; + t.Eiotifiedcyrillic = 0x0464; + t.Elcyrillic = 0x041b; + t.Elevenroman = 0x216a; + t.Emacron = 0x0112; + t.Emacronacute = 0x1e16; + t.Emacrongrave = 0x1e14; + t.Emcyrillic = 0x041c; + t.Emonospace = 0xff25; + t.Encyrillic = 0x041d; + t.Endescendercyrillic = 0x04a2; + t.Eng = 0x014a; + t.Enghecyrillic = 0x04a4; + t.Enhookcyrillic = 0x04c7; + t.Eogonek = 0x0118; + t.Eopen = 0x0190; + t.Epsilon = 0x0395; + t.Epsilontonos = 0x0388; + t.Ercyrillic = 0x0420; + t.Ereversed = 0x018e; + t.Ereversedcyrillic = 0x042d; + t.Escyrillic = 0x0421; + t.Esdescendercyrillic = 0x04aa; + t.Esh = 0x01a9; + t.Esmall = 0xf765; + t.Eta = 0x0397; + t.Etarmenian = 0x0538; + t.Etatonos = 0x0389; + t.Eth = 0x00d0; + t.Ethsmall = 0xf7f0; + t.Etilde = 0x1ebc; + t.Etildebelow = 0x1e1a; + t.Euro = 0x20ac; + t.Ezh = 0x01b7; + t.Ezhcaron = 0x01ee; + t.Ezhreversed = 0x01b8; + t.F = 0x0046; + t.Fcircle = 0x24bb; + t.Fdotaccent = 0x1e1e; + t.Feharmenian = 0x0556; + t.Feicoptic = 0x03e4; + t.Fhook = 0x0191; + t.Fitacyrillic = 0x0472; + t.Fiveroman = 0x2164; + t.Fmonospace = 0xff26; + t.Fourroman = 0x2163; + t.Fsmall = 0xf766; + t.G = 0x0047; + t.GBsquare = 0x3387; + t.Gacute = 0x01f4; + t.Gamma = 0x0393; + t.Gammaafrican = 0x0194; + t.Gangiacoptic = 0x03ea; + t.Gbreve = 0x011e; + t.Gcaron = 0x01e6; + t.Gcedilla = 0x0122; + t.Gcircle = 0x24bc; + t.Gcircumflex = 0x011c; + t.Gcommaaccent = 0x0122; + t.Gdot = 0x0120; + t.Gdotaccent = 0x0120; + t.Gecyrillic = 0x0413; + t.Ghadarmenian = 0x0542; + t.Ghemiddlehookcyrillic = 0x0494; + t.Ghestrokecyrillic = 0x0492; + t.Gheupturncyrillic = 0x0490; + t.Ghook = 0x0193; + t.Gimarmenian = 0x0533; + t.Gjecyrillic = 0x0403; + t.Gmacron = 0x1e20; + t.Gmonospace = 0xff27; + t.Grave = 0xf6ce; + t.Gravesmall = 0xf760; + t.Gsmall = 0xf767; + t.Gsmallhook = 0x029b; + t.Gstroke = 0x01e4; + t.H = 0x0048; + t.H18533 = 0x25cf; + t.H18543 = 0x25aa; + t.H18551 = 0x25ab; + t.H22073 = 0x25a1; + t.HPsquare = 0x33cb; + t.Haabkhasiancyrillic = 0x04a8; + t.Hadescendercyrillic = 0x04b2; + t.Hardsigncyrillic = 0x042a; + t.Hbar = 0x0126; + t.Hbrevebelow = 0x1e2a; + t.Hcedilla = 0x1e28; + t.Hcircle = 0x24bd; + t.Hcircumflex = 0x0124; + t.Hdieresis = 0x1e26; + t.Hdotaccent = 0x1e22; + t.Hdotbelow = 0x1e24; + t.Hmonospace = 0xff28; + t.Hoarmenian = 0x0540; + t.Horicoptic = 0x03e8; + t.Hsmall = 0xf768; + t.Hungarumlaut = 0xf6cf; + t.Hungarumlautsmall = 0xf6f8; + t.Hzsquare = 0x3390; + t.I = 0x0049; + t.IAcyrillic = 0x042f; + t.IJ = 0x0132; + t.IUcyrillic = 0x042e; + t.Iacute = 0x00cd; + t.Iacutesmall = 0xf7ed; + t.Ibreve = 0x012c; + t.Icaron = 0x01cf; + t.Icircle = 0x24be; + t.Icircumflex = 0x00ce; + t.Icircumflexsmall = 0xf7ee; + t.Icyrillic = 0x0406; + t.Idblgrave = 0x0208; + t.Idieresis = 0x00cf; + t.Idieresisacute = 0x1e2e; + t.Idieresiscyrillic = 0x04e4; + t.Idieresissmall = 0xf7ef; + t.Idot = 0x0130; + t.Idotaccent = 0x0130; + t.Idotbelow = 0x1eca; + t.Iebrevecyrillic = 0x04d6; + t.Iecyrillic = 0x0415; + t.Ifraktur = 0x2111; + t.Igrave = 0x00cc; + t.Igravesmall = 0xf7ec; + t.Ihookabove = 0x1ec8; + t.Iicyrillic = 0x0418; + t.Iinvertedbreve = 0x020a; + t.Iishortcyrillic = 0x0419; + t.Imacron = 0x012a; + t.Imacroncyrillic = 0x04e2; + t.Imonospace = 0xff29; + t.Iniarmenian = 0x053b; + t.Iocyrillic = 0x0401; + t.Iogonek = 0x012e; + t.Iota = 0x0399; + t.Iotaafrican = 0x0196; + t.Iotadieresis = 0x03aa; + t.Iotatonos = 0x038a; + t.Ismall = 0xf769; + t.Istroke = 0x0197; + t.Itilde = 0x0128; + t.Itildebelow = 0x1e2c; + t.Izhitsacyrillic = 0x0474; + t.Izhitsadblgravecyrillic = 0x0476; + t.J = 0x004a; + t.Jaarmenian = 0x0541; + t.Jcircle = 0x24bf; + t.Jcircumflex = 0x0134; + t.Jecyrillic = 0x0408; + t.Jheharmenian = 0x054b; + t.Jmonospace = 0xff2a; + t.Jsmall = 0xf76a; + t.K = 0x004b; + t.KBsquare = 0x3385; + t.KKsquare = 0x33cd; + t.Kabashkircyrillic = 0x04a0; + t.Kacute = 0x1e30; + t.Kacyrillic = 0x041a; + t.Kadescendercyrillic = 0x049a; + t.Kahookcyrillic = 0x04c3; + t.Kappa = 0x039a; + t.Kastrokecyrillic = 0x049e; + t.Kaverticalstrokecyrillic = 0x049c; + t.Kcaron = 0x01e8; + t.Kcedilla = 0x0136; + t.Kcircle = 0x24c0; + t.Kcommaaccent = 0x0136; + t.Kdotbelow = 0x1e32; + t.Keharmenian = 0x0554; + t.Kenarmenian = 0x053f; + t.Khacyrillic = 0x0425; + t.Kheicoptic = 0x03e6; + t.Khook = 0x0198; + t.Kjecyrillic = 0x040c; + t.Klinebelow = 0x1e34; + t.Kmonospace = 0xff2b; + t.Koppacyrillic = 0x0480; + t.Koppagreek = 0x03de; + t.Ksicyrillic = 0x046e; + t.Ksmall = 0xf76b; + t.L = 0x004c; + t.LJ = 0x01c7; + t.LL = 0xf6bf; + t.Lacute = 0x0139; + t.Lambda = 0x039b; + t.Lcaron = 0x013d; + t.Lcedilla = 0x013b; + t.Lcircle = 0x24c1; + t.Lcircumflexbelow = 0x1e3c; + t.Lcommaaccent = 0x013b; + t.Ldot = 0x013f; + t.Ldotaccent = 0x013f; + t.Ldotbelow = 0x1e36; + t.Ldotbelowmacron = 0x1e38; + t.Liwnarmenian = 0x053c; + t.Lj = 0x01c8; + t.Ljecyrillic = 0x0409; + t.Llinebelow = 0x1e3a; + t.Lmonospace = 0xff2c; + t.Lslash = 0x0141; + t.Lslashsmall = 0xf6f9; + t.Lsmall = 0xf76c; + t.M = 0x004d; + t.MBsquare = 0x3386; + t.Macron = 0xf6d0; + t.Macronsmall = 0xf7af; + t.Macute = 0x1e3e; + t.Mcircle = 0x24c2; + t.Mdotaccent = 0x1e40; + t.Mdotbelow = 0x1e42; + t.Menarmenian = 0x0544; + t.Mmonospace = 0xff2d; + t.Msmall = 0xf76d; + t.Mturned = 0x019c; + t.Mu = 0x039c; + t.N = 0x004e; + t.NJ = 0x01ca; + t.Nacute = 0x0143; + t.Ncaron = 0x0147; + t.Ncedilla = 0x0145; + t.Ncircle = 0x24c3; + t.Ncircumflexbelow = 0x1e4a; + t.Ncommaaccent = 0x0145; + t.Ndotaccent = 0x1e44; + t.Ndotbelow = 0x1e46; + t.Nhookleft = 0x019d; + t.Nineroman = 0x2168; + t.Nj = 0x01cb; + t.Njecyrillic = 0x040a; + t.Nlinebelow = 0x1e48; + t.Nmonospace = 0xff2e; + t.Nowarmenian = 0x0546; + t.Nsmall = 0xf76e; + t.Ntilde = 0x00d1; + t.Ntildesmall = 0xf7f1; + t.Nu = 0x039d; + t.O = 0x004f; + t.OE = 0x0152; + t.OEsmall = 0xf6fa; + t.Oacute = 0x00d3; + t.Oacutesmall = 0xf7f3; + t.Obarredcyrillic = 0x04e8; + t.Obarreddieresiscyrillic = 0x04ea; + t.Obreve = 0x014e; + t.Ocaron = 0x01d1; + t.Ocenteredtilde = 0x019f; + t.Ocircle = 0x24c4; + t.Ocircumflex = 0x00d4; + t.Ocircumflexacute = 0x1ed0; + t.Ocircumflexdotbelow = 0x1ed8; + t.Ocircumflexgrave = 0x1ed2; + t.Ocircumflexhookabove = 0x1ed4; + t.Ocircumflexsmall = 0xf7f4; + t.Ocircumflextilde = 0x1ed6; + t.Ocyrillic = 0x041e; + t.Odblacute = 0x0150; + t.Odblgrave = 0x020c; + t.Odieresis = 0x00d6; + t.Odieresiscyrillic = 0x04e6; + t.Odieresissmall = 0xf7f6; + t.Odotbelow = 0x1ecc; + t.Ogoneksmall = 0xf6fb; + t.Ograve = 0x00d2; + t.Ogravesmall = 0xf7f2; + t.Oharmenian = 0x0555; + t.Ohm = 0x2126; + t.Ohookabove = 0x1ece; + t.Ohorn = 0x01a0; + t.Ohornacute = 0x1eda; + t.Ohorndotbelow = 0x1ee2; + t.Ohorngrave = 0x1edc; + t.Ohornhookabove = 0x1ede; + t.Ohorntilde = 0x1ee0; + t.Ohungarumlaut = 0x0150; + t.Oi = 0x01a2; + t.Oinvertedbreve = 0x020e; + t.Omacron = 0x014c; + t.Omacronacute = 0x1e52; + t.Omacrongrave = 0x1e50; + t.Omega = 0x2126; + t.Omegacyrillic = 0x0460; + t.Omegagreek = 0x03a9; + t.Omegaroundcyrillic = 0x047a; + t.Omegatitlocyrillic = 0x047c; + t.Omegatonos = 0x038f; + t.Omicron = 0x039f; + t.Omicrontonos = 0x038c; + t.Omonospace = 0xff2f; + t.Oneroman = 0x2160; + t.Oogonek = 0x01ea; + t.Oogonekmacron = 0x01ec; + t.Oopen = 0x0186; + t.Oslash = 0x00d8; + t.Oslashacute = 0x01fe; + t.Oslashsmall = 0xf7f8; + t.Osmall = 0xf76f; + t.Ostrokeacute = 0x01fe; + t.Otcyrillic = 0x047e; + t.Otilde = 0x00d5; + t.Otildeacute = 0x1e4c; + t.Otildedieresis = 0x1e4e; + t.Otildesmall = 0xf7f5; + t.P = 0x0050; + t.Pacute = 0x1e54; + t.Pcircle = 0x24c5; + t.Pdotaccent = 0x1e56; + t.Pecyrillic = 0x041f; + t.Peharmenian = 0x054a; + t.Pemiddlehookcyrillic = 0x04a6; + t.Phi = 0x03a6; + t.Phook = 0x01a4; + t.Pi = 0x03a0; + t.Piwrarmenian = 0x0553; + t.Pmonospace = 0xff30; + t.Psi = 0x03a8; + t.Psicyrillic = 0x0470; + t.Psmall = 0xf770; + t.Q = 0x0051; + t.Qcircle = 0x24c6; + t.Qmonospace = 0xff31; + t.Qsmall = 0xf771; + t.R = 0x0052; + t.Raarmenian = 0x054c; + t.Racute = 0x0154; + t.Rcaron = 0x0158; + t.Rcedilla = 0x0156; + t.Rcircle = 0x24c7; + t.Rcommaaccent = 0x0156; + t.Rdblgrave = 0x0210; + t.Rdotaccent = 0x1e58; + t.Rdotbelow = 0x1e5a; + t.Rdotbelowmacron = 0x1e5c; + t.Reharmenian = 0x0550; + t.Rfraktur = 0x211c; + t.Rho = 0x03a1; + t.Ringsmall = 0xf6fc; + t.Rinvertedbreve = 0x0212; + t.Rlinebelow = 0x1e5e; + t.Rmonospace = 0xff32; + t.Rsmall = 0xf772; + t.Rsmallinverted = 0x0281; + t.Rsmallinvertedsuperior = 0x02b6; + t.S = 0x0053; + t.SF010000 = 0x250c; + t.SF020000 = 0x2514; + t.SF030000 = 0x2510; + t.SF040000 = 0x2518; + t.SF050000 = 0x253c; + t.SF060000 = 0x252c; + t.SF070000 = 0x2534; + t.SF080000 = 0x251c; + t.SF090000 = 0x2524; + t.SF100000 = 0x2500; + t.SF110000 = 0x2502; + t.SF190000 = 0x2561; + t.SF200000 = 0x2562; + t.SF210000 = 0x2556; + t.SF220000 = 0x2555; + t.SF230000 = 0x2563; + t.SF240000 = 0x2551; + t.SF250000 = 0x2557; + t.SF260000 = 0x255d; + t.SF270000 = 0x255c; + t.SF280000 = 0x255b; + t.SF360000 = 0x255e; + t.SF370000 = 0x255f; + t.SF380000 = 0x255a; + t.SF390000 = 0x2554; + t.SF400000 = 0x2569; + t.SF410000 = 0x2566; + t.SF420000 = 0x2560; + t.SF430000 = 0x2550; + t.SF440000 = 0x256c; + t.SF450000 = 0x2567; + t.SF460000 = 0x2568; + t.SF470000 = 0x2564; + t.SF480000 = 0x2565; + t.SF490000 = 0x2559; + t.SF500000 = 0x2558; + t.SF510000 = 0x2552; + t.SF520000 = 0x2553; + t.SF530000 = 0x256b; + t.SF540000 = 0x256a; + t.Sacute = 0x015a; + t.Sacutedotaccent = 0x1e64; + t.Sampigreek = 0x03e0; + t.Scaron = 0x0160; + t.Scarondotaccent = 0x1e66; + t.Scaronsmall = 0xf6fd; + t.Scedilla = 0x015e; + t.Schwa = 0x018f; + t.Schwacyrillic = 0x04d8; + t.Schwadieresiscyrillic = 0x04da; + t.Scircle = 0x24c8; + t.Scircumflex = 0x015c; + t.Scommaaccent = 0x0218; + t.Sdotaccent = 0x1e60; + t.Sdotbelow = 0x1e62; + t.Sdotbelowdotaccent = 0x1e68; + t.Seharmenian = 0x054d; + t.Sevenroman = 0x2166; + t.Shaarmenian = 0x0547; + t.Shacyrillic = 0x0428; + t.Shchacyrillic = 0x0429; + t.Sheicoptic = 0x03e2; + t.Shhacyrillic = 0x04ba; + t.Shimacoptic = 0x03ec; + t.Sigma = 0x03a3; + t.Sixroman = 0x2165; + t.Smonospace = 0xff33; + t.Softsigncyrillic = 0x042c; + t.Ssmall = 0xf773; + t.Stigmagreek = 0x03da; + t.T = 0x0054; + t.Tau = 0x03a4; + t.Tbar = 0x0166; + t.Tcaron = 0x0164; + t.Tcedilla = 0x0162; + t.Tcircle = 0x24c9; + t.Tcircumflexbelow = 0x1e70; + t.Tcommaaccent = 0x0162; + t.Tdotaccent = 0x1e6a; + t.Tdotbelow = 0x1e6c; + t.Tecyrillic = 0x0422; + t.Tedescendercyrillic = 0x04ac; + t.Tenroman = 0x2169; + t.Tetsecyrillic = 0x04b4; + t.Theta = 0x0398; + t.Thook = 0x01ac; + t.Thorn = 0x00de; + t.Thornsmall = 0xf7fe; + t.Threeroman = 0x2162; + t.Tildesmall = 0xf6fe; + t.Tiwnarmenian = 0x054f; + t.Tlinebelow = 0x1e6e; + t.Tmonospace = 0xff34; + t.Toarmenian = 0x0539; + t.Tonefive = 0x01bc; + t.Tonesix = 0x0184; + t.Tonetwo = 0x01a7; + t.Tretroflexhook = 0x01ae; + t.Tsecyrillic = 0x0426; + t.Tshecyrillic = 0x040b; + t.Tsmall = 0xf774; + t.Twelveroman = 0x216b; + t.Tworoman = 0x2161; + t.U = 0x0055; + t.Uacute = 0x00da; + t.Uacutesmall = 0xf7fa; + t.Ubreve = 0x016c; + t.Ucaron = 0x01d3; + t.Ucircle = 0x24ca; + t.Ucircumflex = 0x00db; + t.Ucircumflexbelow = 0x1e76; + t.Ucircumflexsmall = 0xf7fb; + t.Ucyrillic = 0x0423; + t.Udblacute = 0x0170; + t.Udblgrave = 0x0214; + t.Udieresis = 0x00dc; + t.Udieresisacute = 0x01d7; + t.Udieresisbelow = 0x1e72; + t.Udieresiscaron = 0x01d9; + t.Udieresiscyrillic = 0x04f0; + t.Udieresisgrave = 0x01db; + t.Udieresismacron = 0x01d5; + t.Udieresissmall = 0xf7fc; + t.Udotbelow = 0x1ee4; + t.Ugrave = 0x00d9; + t.Ugravesmall = 0xf7f9; + t.Uhookabove = 0x1ee6; + t.Uhorn = 0x01af; + t.Uhornacute = 0x1ee8; + t.Uhorndotbelow = 0x1ef0; + t.Uhorngrave = 0x1eea; + t.Uhornhookabove = 0x1eec; + t.Uhorntilde = 0x1eee; + t.Uhungarumlaut = 0x0170; + t.Uhungarumlautcyrillic = 0x04f2; + t.Uinvertedbreve = 0x0216; + t.Ukcyrillic = 0x0478; + t.Umacron = 0x016a; + t.Umacroncyrillic = 0x04ee; + t.Umacrondieresis = 0x1e7a; + t.Umonospace = 0xff35; + t.Uogonek = 0x0172; + t.Upsilon = 0x03a5; + t.Upsilon1 = 0x03d2; + t.Upsilonacutehooksymbolgreek = 0x03d3; + t.Upsilonafrican = 0x01b1; + t.Upsilondieresis = 0x03ab; + t.Upsilondieresishooksymbolgreek = 0x03d4; + t.Upsilonhooksymbol = 0x03d2; + t.Upsilontonos = 0x038e; + t.Uring = 0x016e; + t.Ushortcyrillic = 0x040e; + t.Usmall = 0xf775; + t.Ustraightcyrillic = 0x04ae; + t.Ustraightstrokecyrillic = 0x04b0; + t.Utilde = 0x0168; + t.Utildeacute = 0x1e78; + t.Utildebelow = 0x1e74; + t.V = 0x0056; + t.Vcircle = 0x24cb; + t.Vdotbelow = 0x1e7e; + t.Vecyrillic = 0x0412; + t.Vewarmenian = 0x054e; + t.Vhook = 0x01b2; + t.Vmonospace = 0xff36; + t.Voarmenian = 0x0548; + t.Vsmall = 0xf776; + t.Vtilde = 0x1e7c; + t.W = 0x0057; + t.Wacute = 0x1e82; + t.Wcircle = 0x24cc; + t.Wcircumflex = 0x0174; + t.Wdieresis = 0x1e84; + t.Wdotaccent = 0x1e86; + t.Wdotbelow = 0x1e88; + t.Wgrave = 0x1e80; + t.Wmonospace = 0xff37; + t.Wsmall = 0xf777; + t.X = 0x0058; + t.Xcircle = 0x24cd; + t.Xdieresis = 0x1e8c; + t.Xdotaccent = 0x1e8a; + t.Xeharmenian = 0x053d; + t.Xi = 0x039e; + t.Xmonospace = 0xff38; + t.Xsmall = 0xf778; + t.Y = 0x0059; + t.Yacute = 0x00dd; + t.Yacutesmall = 0xf7fd; + t.Yatcyrillic = 0x0462; + t.Ycircle = 0x24ce; + t.Ycircumflex = 0x0176; + t.Ydieresis = 0x0178; + t.Ydieresissmall = 0xf7ff; + t.Ydotaccent = 0x1e8e; + t.Ydotbelow = 0x1ef4; + t.Yericyrillic = 0x042b; + t.Yerudieresiscyrillic = 0x04f8; + t.Ygrave = 0x1ef2; + t.Yhook = 0x01b3; + t.Yhookabove = 0x1ef6; + t.Yiarmenian = 0x0545; + t.Yicyrillic = 0x0407; + t.Yiwnarmenian = 0x0552; + t.Ymonospace = 0xff39; + t.Ysmall = 0xf779; + t.Ytilde = 0x1ef8; + t.Yusbigcyrillic = 0x046a; + t.Yusbigiotifiedcyrillic = 0x046c; + t.Yuslittlecyrillic = 0x0466; + t.Yuslittleiotifiedcyrillic = 0x0468; + t.Z = 0x005a; + t.Zaarmenian = 0x0536; + t.Zacute = 0x0179; + t.Zcaron = 0x017d; + t.Zcaronsmall = 0xf6ff; + t.Zcircle = 0x24cf; + t.Zcircumflex = 0x1e90; + t.Zdot = 0x017b; + t.Zdotaccent = 0x017b; + t.Zdotbelow = 0x1e92; + t.Zecyrillic = 0x0417; + t.Zedescendercyrillic = 0x0498; + t.Zedieresiscyrillic = 0x04de; + t.Zeta = 0x0396; + t.Zhearmenian = 0x053a; + t.Zhebrevecyrillic = 0x04c1; + t.Zhecyrillic = 0x0416; + t.Zhedescendercyrillic = 0x0496; + t.Zhedieresiscyrillic = 0x04dc; + t.Zlinebelow = 0x1e94; + t.Zmonospace = 0xff3a; + t.Zsmall = 0xf77a; + t.Zstroke = 0x01b5; + t.a = 0x0061; + t.aabengali = 0x0986; + t.aacute = 0x00e1; + t.aadeva = 0x0906; + t.aagujarati = 0x0a86; + t.aagurmukhi = 0x0a06; + t.aamatragurmukhi = 0x0a3e; + t.aarusquare = 0x3303; + t.aavowelsignbengali = 0x09be; + t.aavowelsigndeva = 0x093e; + t.aavowelsigngujarati = 0x0abe; + t.abbreviationmarkarmenian = 0x055f; + t.abbreviationsigndeva = 0x0970; + t.abengali = 0x0985; + t.abopomofo = 0x311a; + t.abreve = 0x0103; + t.abreveacute = 0x1eaf; + t.abrevecyrillic = 0x04d1; + t.abrevedotbelow = 0x1eb7; + t.abrevegrave = 0x1eb1; + t.abrevehookabove = 0x1eb3; + t.abrevetilde = 0x1eb5; + t.acaron = 0x01ce; + t.acircle = 0x24d0; + t.acircumflex = 0x00e2; + t.acircumflexacute = 0x1ea5; + t.acircumflexdotbelow = 0x1ead; + t.acircumflexgrave = 0x1ea7; + t.acircumflexhookabove = 0x1ea9; + t.acircumflextilde = 0x1eab; + t.acute = 0x00b4; + t.acutebelowcmb = 0x0317; + t.acutecmb = 0x0301; + t.acutecomb = 0x0301; + t.acutedeva = 0x0954; + t.acutelowmod = 0x02cf; + t.acutetonecmb = 0x0341; + t.acyrillic = 0x0430; + t.adblgrave = 0x0201; + t.addakgurmukhi = 0x0a71; + t.adeva = 0x0905; + t.adieresis = 0x00e4; + t.adieresiscyrillic = 0x04d3; + t.adieresismacron = 0x01df; + t.adotbelow = 0x1ea1; + t.adotmacron = 0x01e1; + t.ae = 0x00e6; + t.aeacute = 0x01fd; + t.aekorean = 0x3150; + t.aemacron = 0x01e3; + t.afii00208 = 0x2015; + t.afii08941 = 0x20a4; + t.afii10017 = 0x0410; + t.afii10018 = 0x0411; + t.afii10019 = 0x0412; + t.afii10020 = 0x0413; + t.afii10021 = 0x0414; + t.afii10022 = 0x0415; + t.afii10023 = 0x0401; + t.afii10024 = 0x0416; + t.afii10025 = 0x0417; + t.afii10026 = 0x0418; + t.afii10027 = 0x0419; + t.afii10028 = 0x041a; + t.afii10029 = 0x041b; + t.afii10030 = 0x041c; + t.afii10031 = 0x041d; + t.afii10032 = 0x041e; + t.afii10033 = 0x041f; + t.afii10034 = 0x0420; + t.afii10035 = 0x0421; + t.afii10036 = 0x0422; + t.afii10037 = 0x0423; + t.afii10038 = 0x0424; + t.afii10039 = 0x0425; + t.afii10040 = 0x0426; + t.afii10041 = 0x0427; + t.afii10042 = 0x0428; + t.afii10043 = 0x0429; + t.afii10044 = 0x042a; + t.afii10045 = 0x042b; + t.afii10046 = 0x042c; + t.afii10047 = 0x042d; + t.afii10048 = 0x042e; + t.afii10049 = 0x042f; + t.afii10050 = 0x0490; + t.afii10051 = 0x0402; + t.afii10052 = 0x0403; + t.afii10053 = 0x0404; + t.afii10054 = 0x0405; + t.afii10055 = 0x0406; + t.afii10056 = 0x0407; + t.afii10057 = 0x0408; + t.afii10058 = 0x0409; + t.afii10059 = 0x040a; + t.afii10060 = 0x040b; + t.afii10061 = 0x040c; + t.afii10062 = 0x040e; + t.afii10063 = 0xf6c4; + t.afii10064 = 0xf6c5; + t.afii10065 = 0x0430; + t.afii10066 = 0x0431; + t.afii10067 = 0x0432; + t.afii10068 = 0x0433; + t.afii10069 = 0x0434; + t.afii10070 = 0x0435; + t.afii10071 = 0x0451; + t.afii10072 = 0x0436; + t.afii10073 = 0x0437; + t.afii10074 = 0x0438; + t.afii10075 = 0x0439; + t.afii10076 = 0x043a; + t.afii10077 = 0x043b; + t.afii10078 = 0x043c; + t.afii10079 = 0x043d; + t.afii10080 = 0x043e; + t.afii10081 = 0x043f; + t.afii10082 = 0x0440; + t.afii10083 = 0x0441; + t.afii10084 = 0x0442; + t.afii10085 = 0x0443; + t.afii10086 = 0x0444; + t.afii10087 = 0x0445; + t.afii10088 = 0x0446; + t.afii10089 = 0x0447; + t.afii10090 = 0x0448; + t.afii10091 = 0x0449; + t.afii10092 = 0x044a; + t.afii10093 = 0x044b; + t.afii10094 = 0x044c; + t.afii10095 = 0x044d; + t.afii10096 = 0x044e; + t.afii10097 = 0x044f; + t.afii10098 = 0x0491; + t.afii10099 = 0x0452; + t.afii10100 = 0x0453; + t.afii10101 = 0x0454; + t.afii10102 = 0x0455; + t.afii10103 = 0x0456; + t.afii10104 = 0x0457; + t.afii10105 = 0x0458; + t.afii10106 = 0x0459; + t.afii10107 = 0x045a; + t.afii10108 = 0x045b; + t.afii10109 = 0x045c; + t.afii10110 = 0x045e; + t.afii10145 = 0x040f; + t.afii10146 = 0x0462; + t.afii10147 = 0x0472; + t.afii10148 = 0x0474; + t.afii10192 = 0xf6c6; + t.afii10193 = 0x045f; + t.afii10194 = 0x0463; + t.afii10195 = 0x0473; + t.afii10196 = 0x0475; + t.afii10831 = 0xf6c7; + t.afii10832 = 0xf6c8; + t.afii10846 = 0x04d9; + t.afii299 = 0x200e; + t.afii300 = 0x200f; + t.afii301 = 0x200d; + t.afii57381 = 0x066a; + t.afii57388 = 0x060c; + t.afii57392 = 0x0660; + t.afii57393 = 0x0661; + t.afii57394 = 0x0662; + t.afii57395 = 0x0663; + t.afii57396 = 0x0664; + t.afii57397 = 0x0665; + t.afii57398 = 0x0666; + t.afii57399 = 0x0667; + t.afii57400 = 0x0668; + t.afii57401 = 0x0669; + t.afii57403 = 0x061b; + t.afii57407 = 0x061f; + t.afii57409 = 0x0621; + t.afii57410 = 0x0622; + t.afii57411 = 0x0623; + t.afii57412 = 0x0624; + t.afii57413 = 0x0625; + t.afii57414 = 0x0626; + t.afii57415 = 0x0627; + t.afii57416 = 0x0628; + t.afii57417 = 0x0629; + t.afii57418 = 0x062a; + t.afii57419 = 0x062b; + t.afii57420 = 0x062c; + t.afii57421 = 0x062d; + t.afii57422 = 0x062e; + t.afii57423 = 0x062f; + t.afii57424 = 0x0630; + t.afii57425 = 0x0631; + t.afii57426 = 0x0632; + t.afii57427 = 0x0633; + t.afii57428 = 0x0634; + t.afii57429 = 0x0635; + t.afii57430 = 0x0636; + t.afii57431 = 0x0637; + t.afii57432 = 0x0638; + t.afii57433 = 0x0639; + t.afii57434 = 0x063a; + t.afii57440 = 0x0640; + t.afii57441 = 0x0641; + t.afii57442 = 0x0642; + t.afii57443 = 0x0643; + t.afii57444 = 0x0644; + t.afii57445 = 0x0645; + t.afii57446 = 0x0646; + t.afii57448 = 0x0648; + t.afii57449 = 0x0649; + t.afii57450 = 0x064a; + t.afii57451 = 0x064b; + t.afii57452 = 0x064c; + t.afii57453 = 0x064d; + t.afii57454 = 0x064e; + t.afii57455 = 0x064f; + t.afii57456 = 0x0650; + t.afii57457 = 0x0651; + t.afii57458 = 0x0652; + t.afii57470 = 0x0647; + t.afii57505 = 0x06a4; + t.afii57506 = 0x067e; + t.afii57507 = 0x0686; + t.afii57508 = 0x0698; + t.afii57509 = 0x06af; + t.afii57511 = 0x0679; + t.afii57512 = 0x0688; + t.afii57513 = 0x0691; + t.afii57514 = 0x06ba; + t.afii57519 = 0x06d2; + t.afii57534 = 0x06d5; + t.afii57636 = 0x20aa; + t.afii57645 = 0x05be; + t.afii57658 = 0x05c3; + t.afii57664 = 0x05d0; + t.afii57665 = 0x05d1; + t.afii57666 = 0x05d2; + t.afii57667 = 0x05d3; + t.afii57668 = 0x05d4; + t.afii57669 = 0x05d5; + t.afii57670 = 0x05d6; + t.afii57671 = 0x05d7; + t.afii57672 = 0x05d8; + t.afii57673 = 0x05d9; + t.afii57674 = 0x05da; + t.afii57675 = 0x05db; + t.afii57676 = 0x05dc; + t.afii57677 = 0x05dd; + t.afii57678 = 0x05de; + t.afii57679 = 0x05df; + t.afii57680 = 0x05e0; + t.afii57681 = 0x05e1; + t.afii57682 = 0x05e2; + t.afii57683 = 0x05e3; + t.afii57684 = 0x05e4; + t.afii57685 = 0x05e5; + t.afii57686 = 0x05e6; + t.afii57687 = 0x05e7; + t.afii57688 = 0x05e8; + t.afii57689 = 0x05e9; + t.afii57690 = 0x05ea; + t.afii57694 = 0xfb2a; + t.afii57695 = 0xfb2b; + t.afii57700 = 0xfb4b; + t.afii57705 = 0xfb1f; + t.afii57716 = 0x05f0; + t.afii57717 = 0x05f1; + t.afii57718 = 0x05f2; + t.afii57723 = 0xfb35; + t.afii57793 = 0x05b4; + t.afii57794 = 0x05b5; + t.afii57795 = 0x05b6; + t.afii57796 = 0x05bb; + t.afii57797 = 0x05b8; + t.afii57798 = 0x05b7; + t.afii57799 = 0x05b0; + t.afii57800 = 0x05b2; + t.afii57801 = 0x05b1; + t.afii57802 = 0x05b3; + t.afii57803 = 0x05c2; + t.afii57804 = 0x05c1; + t.afii57806 = 0x05b9; + t.afii57807 = 0x05bc; + t.afii57839 = 0x05bd; + t.afii57841 = 0x05bf; + t.afii57842 = 0x05c0; + t.afii57929 = 0x02bc; + t.afii61248 = 0x2105; + t.afii61289 = 0x2113; + t.afii61352 = 0x2116; + t.afii61573 = 0x202c; + t.afii61574 = 0x202d; + t.afii61575 = 0x202e; + t.afii61664 = 0x200c; + t.afii63167 = 0x066d; + t.afii64937 = 0x02bd; + t.agrave = 0x00e0; + t.agujarati = 0x0a85; + t.agurmukhi = 0x0a05; + t.ahiragana = 0x3042; + t.ahookabove = 0x1ea3; + t.aibengali = 0x0990; + t.aibopomofo = 0x311e; + t.aideva = 0x0910; + t.aiecyrillic = 0x04d5; + t.aigujarati = 0x0a90; + t.aigurmukhi = 0x0a10; + t.aimatragurmukhi = 0x0a48; + t.ainarabic = 0x0639; + t.ainfinalarabic = 0xfeca; + t.aininitialarabic = 0xfecb; + t.ainmedialarabic = 0xfecc; + t.ainvertedbreve = 0x0203; + t.aivowelsignbengali = 0x09c8; + t.aivowelsigndeva = 0x0948; + t.aivowelsigngujarati = 0x0ac8; + t.akatakana = 0x30a2; + t.akatakanahalfwidth = 0xff71; + t.akorean = 0x314f; + t.alef = 0x05d0; + t.alefarabic = 0x0627; + t.alefdageshhebrew = 0xfb30; + t.aleffinalarabic = 0xfe8e; + t.alefhamzaabovearabic = 0x0623; + t.alefhamzaabovefinalarabic = 0xfe84; + t.alefhamzabelowarabic = 0x0625; + t.alefhamzabelowfinalarabic = 0xfe88; + t.alefhebrew = 0x05d0; + t.aleflamedhebrew = 0xfb4f; + t.alefmaddaabovearabic = 0x0622; + t.alefmaddaabovefinalarabic = 0xfe82; + t.alefmaksuraarabic = 0x0649; + t.alefmaksurafinalarabic = 0xfef0; + t.alefmaksurainitialarabic = 0xfef3; + t.alefmaksuramedialarabic = 0xfef4; + t.alefpatahhebrew = 0xfb2e; + t.alefqamatshebrew = 0xfb2f; + t.aleph = 0x2135; + t.allequal = 0x224c; + t.alpha = 0x03b1; + t.alphatonos = 0x03ac; + t.amacron = 0x0101; + t.amonospace = 0xff41; + t.ampersand = 0x0026; + t.ampersandmonospace = 0xff06; + t.ampersandsmall = 0xf726; + t.amsquare = 0x33c2; + t.anbopomofo = 0x3122; + t.angbopomofo = 0x3124; + t.angbracketleft = 0x3008; + t.angbracketright = 0x3009; + t.angkhankhuthai = 0x0e5a; + t.angle = 0x2220; + t.anglebracketleft = 0x3008; + t.anglebracketleftvertical = 0xfe3f; + t.anglebracketright = 0x3009; + t.anglebracketrightvertical = 0xfe40; + t.angleleft = 0x2329; + t.angleright = 0x232a; + t.angstrom = 0x212b; + t.anoteleia = 0x0387; + t.anudattadeva = 0x0952; + t.anusvarabengali = 0x0982; + t.anusvaradeva = 0x0902; + t.anusvaragujarati = 0x0a82; + t.aogonek = 0x0105; + t.apaatosquare = 0x3300; + t.aparen = 0x249c; + t.apostrophearmenian = 0x055a; + t.apostrophemod = 0x02bc; + t.apple = 0xf8ff; + t.approaches = 0x2250; + t.approxequal = 0x2248; + t.approxequalorimage = 0x2252; + t.approximatelyequal = 0x2245; + t.araeaekorean = 0x318e; + t.araeakorean = 0x318d; + t.arc = 0x2312; + t.arighthalfring = 0x1e9a; + t.aring = 0x00e5; + t.aringacute = 0x01fb; + t.aringbelow = 0x1e01; + t.arrowboth = 0x2194; + t.arrowdashdown = 0x21e3; + t.arrowdashleft = 0x21e0; + t.arrowdashright = 0x21e2; + t.arrowdashup = 0x21e1; + t.arrowdblboth = 0x21d4; + t.arrowdbldown = 0x21d3; + t.arrowdblleft = 0x21d0; + t.arrowdblright = 0x21d2; + t.arrowdblup = 0x21d1; + t.arrowdown = 0x2193; + t.arrowdownleft = 0x2199; + t.arrowdownright = 0x2198; + t.arrowdownwhite = 0x21e9; + t.arrowheaddownmod = 0x02c5; + t.arrowheadleftmod = 0x02c2; + t.arrowheadrightmod = 0x02c3; + t.arrowheadupmod = 0x02c4; + t.arrowhorizex = 0xf8e7; + t.arrowleft = 0x2190; + t.arrowleftdbl = 0x21d0; + t.arrowleftdblstroke = 0x21cd; + t.arrowleftoverright = 0x21c6; + t.arrowleftwhite = 0x21e6; + t.arrowright = 0x2192; + t.arrowrightdblstroke = 0x21cf; + t.arrowrightheavy = 0x279e; + t.arrowrightoverleft = 0x21c4; + t.arrowrightwhite = 0x21e8; + t.arrowtableft = 0x21e4; + t.arrowtabright = 0x21e5; + t.arrowup = 0x2191; + t.arrowupdn = 0x2195; + t.arrowupdnbse = 0x21a8; + t.arrowupdownbase = 0x21a8; + t.arrowupleft = 0x2196; + t.arrowupleftofdown = 0x21c5; + t.arrowupright = 0x2197; + t.arrowupwhite = 0x21e7; + t.arrowvertex = 0xf8e6; + t.asciicircum = 0x005e; + t.asciicircummonospace = 0xff3e; + t.asciitilde = 0x007e; + t.asciitildemonospace = 0xff5e; + t.ascript = 0x0251; + t.ascriptturned = 0x0252; + t.asmallhiragana = 0x3041; + t.asmallkatakana = 0x30a1; + t.asmallkatakanahalfwidth = 0xff67; + t.asterisk = 0x002a; + t.asteriskaltonearabic = 0x066d; + t.asteriskarabic = 0x066d; + t.asteriskmath = 0x2217; + t.asteriskmonospace = 0xff0a; + t.asterisksmall = 0xfe61; + t.asterism = 0x2042; + t.asuperior = 0xf6e9; + t.asymptoticallyequal = 0x2243; + t.at = 0x0040; + t.atilde = 0x00e3; + t.atmonospace = 0xff20; + t.atsmall = 0xfe6b; + t.aturned = 0x0250; + t.aubengali = 0x0994; + t.aubopomofo = 0x3120; + t.audeva = 0x0914; + t.augujarati = 0x0a94; + t.augurmukhi = 0x0a14; + t.aulengthmarkbengali = 0x09d7; + t.aumatragurmukhi = 0x0a4c; + t.auvowelsignbengali = 0x09cc; + t.auvowelsigndeva = 0x094c; + t.auvowelsigngujarati = 0x0acc; + t.avagrahadeva = 0x093d; + t.aybarmenian = 0x0561; + t.ayin = 0x05e2; + t.ayinaltonehebrew = 0xfb20; + t.ayinhebrew = 0x05e2; + t.b = 0x0062; + t.babengali = 0x09ac; + t.backslash = 0x005c; + t.backslashmonospace = 0xff3c; + t.badeva = 0x092c; + t.bagujarati = 0x0aac; + t.bagurmukhi = 0x0a2c; + t.bahiragana = 0x3070; + t.bahtthai = 0x0e3f; + t.bakatakana = 0x30d0; + t.bar = 0x007c; + t.barmonospace = 0xff5c; + t.bbopomofo = 0x3105; + t.bcircle = 0x24d1; + t.bdotaccent = 0x1e03; + t.bdotbelow = 0x1e05; + t.beamedsixteenthnotes = 0x266c; + t.because = 0x2235; + t.becyrillic = 0x0431; + t.beharabic = 0x0628; + t.behfinalarabic = 0xfe90; + t.behinitialarabic = 0xfe91; + t.behiragana = 0x3079; + t.behmedialarabic = 0xfe92; + t.behmeeminitialarabic = 0xfc9f; + t.behmeemisolatedarabic = 0xfc08; + t.behnoonfinalarabic = 0xfc6d; + t.bekatakana = 0x30d9; + t.benarmenian = 0x0562; + t.bet = 0x05d1; + t.beta = 0x03b2; + t.betasymbolgreek = 0x03d0; + t.betdagesh = 0xfb31; + t.betdageshhebrew = 0xfb31; + t.bethebrew = 0x05d1; + t.betrafehebrew = 0xfb4c; + t.bhabengali = 0x09ad; + t.bhadeva = 0x092d; + t.bhagujarati = 0x0aad; + t.bhagurmukhi = 0x0a2d; + t.bhook = 0x0253; + t.bihiragana = 0x3073; + t.bikatakana = 0x30d3; + t.bilabialclick = 0x0298; + t.bindigurmukhi = 0x0a02; + t.birusquare = 0x3331; + t.blackcircle = 0x25cf; + t.blackdiamond = 0x25c6; + t.blackdownpointingtriangle = 0x25bc; + t.blackleftpointingpointer = 0x25c4; + t.blackleftpointingtriangle = 0x25c0; + t.blacklenticularbracketleft = 0x3010; + t.blacklenticularbracketleftvertical = 0xfe3b; + t.blacklenticularbracketright = 0x3011; + t.blacklenticularbracketrightvertical = 0xfe3c; + t.blacklowerlefttriangle = 0x25e3; + t.blacklowerrighttriangle = 0x25e2; + t.blackrectangle = 0x25ac; + t.blackrightpointingpointer = 0x25ba; + t.blackrightpointingtriangle = 0x25b6; + t.blacksmallsquare = 0x25aa; + t.blacksmilingface = 0x263b; + t.blacksquare = 0x25a0; + t.blackstar = 0x2605; + t.blackupperlefttriangle = 0x25e4; + t.blackupperrighttriangle = 0x25e5; + t.blackuppointingsmalltriangle = 0x25b4; + t.blackuppointingtriangle = 0x25b2; + t.blank = 0x2423; + t.blinebelow = 0x1e07; + t.block = 0x2588; + t.bmonospace = 0xff42; + t.bobaimaithai = 0x0e1a; + t.bohiragana = 0x307c; + t.bokatakana = 0x30dc; + t.bparen = 0x249d; + t.bqsquare = 0x33c3; + t.braceex = 0xf8f4; + t.braceleft = 0x007b; + t.braceleftbt = 0xf8f3; + t.braceleftmid = 0xf8f2; + t.braceleftmonospace = 0xff5b; + t.braceleftsmall = 0xfe5b; + t.bracelefttp = 0xf8f1; + t.braceleftvertical = 0xfe37; + t.braceright = 0x007d; + t.bracerightbt = 0xf8fe; + t.bracerightmid = 0xf8fd; + t.bracerightmonospace = 0xff5d; + t.bracerightsmall = 0xfe5c; + t.bracerighttp = 0xf8fc; + t.bracerightvertical = 0xfe38; + t.bracketleft = 0x005b; + t.bracketleftbt = 0xf8f0; + t.bracketleftex = 0xf8ef; + t.bracketleftmonospace = 0xff3b; + t.bracketlefttp = 0xf8ee; + t.bracketright = 0x005d; + t.bracketrightbt = 0xf8fb; + t.bracketrightex = 0xf8fa; + t.bracketrightmonospace = 0xff3d; + t.bracketrighttp = 0xf8f9; + t.breve = 0x02d8; + t.brevebelowcmb = 0x032e; + t.brevecmb = 0x0306; + t.breveinvertedbelowcmb = 0x032f; + t.breveinvertedcmb = 0x0311; + t.breveinverteddoublecmb = 0x0361; + t.bridgebelowcmb = 0x032a; + t.bridgeinvertedbelowcmb = 0x033a; + t.brokenbar = 0x00a6; + t.bstroke = 0x0180; + t.bsuperior = 0xf6ea; + t.btopbar = 0x0183; + t.buhiragana = 0x3076; + t.bukatakana = 0x30d6; + t.bullet = 0x2022; + t.bulletinverse = 0x25d8; + t.bulletoperator = 0x2219; + t.bullseye = 0x25ce; + t.c = 0x0063; + t.caarmenian = 0x056e; + t.cabengali = 0x099a; + t.cacute = 0x0107; + t.cadeva = 0x091a; + t.cagujarati = 0x0a9a; + t.cagurmukhi = 0x0a1a; + t.calsquare = 0x3388; + t.candrabindubengali = 0x0981; + t.candrabinducmb = 0x0310; + t.candrabindudeva = 0x0901; + t.candrabindugujarati = 0x0a81; + t.capslock = 0x21ea; + t.careof = 0x2105; + t.caron = 0x02c7; + t.caronbelowcmb = 0x032c; + t.caroncmb = 0x030c; + t.carriagereturn = 0x21b5; + t.cbopomofo = 0x3118; + t.ccaron = 0x010d; + t.ccedilla = 0x00e7; + t.ccedillaacute = 0x1e09; + t.ccircle = 0x24d2; + t.ccircumflex = 0x0109; + t.ccurl = 0x0255; + t.cdot = 0x010b; + t.cdotaccent = 0x010b; + t.cdsquare = 0x33c5; + t.cedilla = 0x00b8; + t.cedillacmb = 0x0327; + t.cent = 0x00a2; + t.centigrade = 0x2103; + t.centinferior = 0xf6df; + t.centmonospace = 0xffe0; + t.centoldstyle = 0xf7a2; + t.centsuperior = 0xf6e0; + t.chaarmenian = 0x0579; + t.chabengali = 0x099b; + t.chadeva = 0x091b; + t.chagujarati = 0x0a9b; + t.chagurmukhi = 0x0a1b; + t.chbopomofo = 0x3114; + t.cheabkhasiancyrillic = 0x04bd; + t.checkmark = 0x2713; + t.checyrillic = 0x0447; + t.chedescenderabkhasiancyrillic = 0x04bf; + t.chedescendercyrillic = 0x04b7; + t.chedieresiscyrillic = 0x04f5; + t.cheharmenian = 0x0573; + t.chekhakassiancyrillic = 0x04cc; + t.cheverticalstrokecyrillic = 0x04b9; + t.chi = 0x03c7; + t.chieuchacirclekorean = 0x3277; + t.chieuchaparenkorean = 0x3217; + t.chieuchcirclekorean = 0x3269; + t.chieuchkorean = 0x314a; + t.chieuchparenkorean = 0x3209; + t.chochangthai = 0x0e0a; + t.chochanthai = 0x0e08; + t.chochingthai = 0x0e09; + t.chochoethai = 0x0e0c; + t.chook = 0x0188; + t.cieucacirclekorean = 0x3276; + t.cieucaparenkorean = 0x3216; + t.cieuccirclekorean = 0x3268; + t.cieuckorean = 0x3148; + t.cieucparenkorean = 0x3208; + t.cieucuparenkorean = 0x321c; + t.circle = 0x25cb; + t.circlecopyrt = 0x00a9; + t.circlemultiply = 0x2297; + t.circleot = 0x2299; + t.circleplus = 0x2295; + t.circlepostalmark = 0x3036; + t.circlewithlefthalfblack = 0x25d0; + t.circlewithrighthalfblack = 0x25d1; + t.circumflex = 0x02c6; + t.circumflexbelowcmb = 0x032d; + t.circumflexcmb = 0x0302; + t.clear = 0x2327; + t.clickalveolar = 0x01c2; + t.clickdental = 0x01c0; + t.clicklateral = 0x01c1; + t.clickretroflex = 0x01c3; + t.club = 0x2663; + t.clubsuitblack = 0x2663; + t.clubsuitwhite = 0x2667; + t.cmcubedsquare = 0x33a4; + t.cmonospace = 0xff43; + t.cmsquaredsquare = 0x33a0; + t.coarmenian = 0x0581; + t.colon = 0x003a; + t.colonmonetary = 0x20a1; + t.colonmonospace = 0xff1a; + t.colonsign = 0x20a1; + t.colonsmall = 0xfe55; + t.colontriangularhalfmod = 0x02d1; + t.colontriangularmod = 0x02d0; + t.comma = 0x002c; + t.commaabovecmb = 0x0313; + t.commaaboverightcmb = 0x0315; + t.commaaccent = 0xf6c3; + t.commaarabic = 0x060c; + t.commaarmenian = 0x055d; + t.commainferior = 0xf6e1; + t.commamonospace = 0xff0c; + t.commareversedabovecmb = 0x0314; + t.commareversedmod = 0x02bd; + t.commasmall = 0xfe50; + t.commasuperior = 0xf6e2; + t.commaturnedabovecmb = 0x0312; + t.commaturnedmod = 0x02bb; + t.compass = 0x263c; + t.congruent = 0x2245; + t.contourintegral = 0x222e; + t.control = 0x2303; + t.controlACK = 0x0006; + t.controlBEL = 0x0007; + t.controlBS = 0x0008; + t.controlCAN = 0x0018; + t.controlCR = 0x000d; + t.controlDC1 = 0x0011; + t.controlDC2 = 0x0012; + t.controlDC3 = 0x0013; + t.controlDC4 = 0x0014; + t.controlDEL = 0x007f; + t.controlDLE = 0x0010; + t.controlEM = 0x0019; + t.controlENQ = 0x0005; + t.controlEOT = 0x0004; + t.controlESC = 0x001b; + t.controlETB = 0x0017; + t.controlETX = 0x0003; + t.controlFF = 0x000c; + t.controlFS = 0x001c; + t.controlGS = 0x001d; + t.controlHT = 0x0009; + t.controlLF = 0x000a; + t.controlNAK = 0x0015; + t.controlNULL = 0x0000; + t.controlRS = 0x001e; + t.controlSI = 0x000f; + t.controlSO = 0x000e; + t.controlSOT = 0x0002; + t.controlSTX = 0x0001; + t.controlSUB = 0x001a; + t.controlSYN = 0x0016; + t.controlUS = 0x001f; + t.controlVT = 0x000b; + t.copyright = 0x00a9; + t.copyrightsans = 0xf8e9; + t.copyrightserif = 0xf6d9; + t.cornerbracketleft = 0x300c; + t.cornerbracketlefthalfwidth = 0xff62; + t.cornerbracketleftvertical = 0xfe41; + t.cornerbracketright = 0x300d; + t.cornerbracketrighthalfwidth = 0xff63; + t.cornerbracketrightvertical = 0xfe42; + t.corporationsquare = 0x337f; + t.cosquare = 0x33c7; + t.coverkgsquare = 0x33c6; + t.cparen = 0x249e; + t.cruzeiro = 0x20a2; + t.cstretched = 0x0297; + t.curlyand = 0x22cf; + t.curlyor = 0x22ce; + t.currency = 0x00a4; + t.cyrBreve = 0xf6d1; + t.cyrFlex = 0xf6d2; + t.cyrbreve = 0xf6d4; + t.cyrflex = 0xf6d5; + t.d = 0x0064; + t.daarmenian = 0x0564; + t.dabengali = 0x09a6; + t.dadarabic = 0x0636; + t.dadeva = 0x0926; + t.dadfinalarabic = 0xfebe; + t.dadinitialarabic = 0xfebf; + t.dadmedialarabic = 0xfec0; + t.dagesh = 0x05bc; + t.dageshhebrew = 0x05bc; + t.dagger = 0x2020; + t.daggerdbl = 0x2021; + t.dagujarati = 0x0aa6; + t.dagurmukhi = 0x0a26; + t.dahiragana = 0x3060; + t.dakatakana = 0x30c0; + t.dalarabic = 0x062f; + t.dalet = 0x05d3; + t.daletdagesh = 0xfb33; + t.daletdageshhebrew = 0xfb33; + t.dalethebrew = 0x05d3; + t.dalfinalarabic = 0xfeaa; + t.dammaarabic = 0x064f; + t.dammalowarabic = 0x064f; + t.dammatanaltonearabic = 0x064c; + t.dammatanarabic = 0x064c; + t.danda = 0x0964; + t.dargahebrew = 0x05a7; + t.dargalefthebrew = 0x05a7; + t.dasiapneumatacyrilliccmb = 0x0485; + t.dblGrave = 0xf6d3; + t.dblanglebracketleft = 0x300a; + t.dblanglebracketleftvertical = 0xfe3d; + t.dblanglebracketright = 0x300b; + t.dblanglebracketrightvertical = 0xfe3e; + t.dblarchinvertedbelowcmb = 0x032b; + t.dblarrowleft = 0x21d4; + t.dblarrowright = 0x21d2; + t.dbldanda = 0x0965; + t.dblgrave = 0xf6d6; + t.dblgravecmb = 0x030f; + t.dblintegral = 0x222c; + t.dbllowline = 0x2017; + t.dbllowlinecmb = 0x0333; + t.dbloverlinecmb = 0x033f; + t.dblprimemod = 0x02ba; + t.dblverticalbar = 0x2016; + t.dblverticallineabovecmb = 0x030e; + t.dbopomofo = 0x3109; + t.dbsquare = 0x33c8; + t.dcaron = 0x010f; + t.dcedilla = 0x1e11; + t.dcircle = 0x24d3; + t.dcircumflexbelow = 0x1e13; + t.dcroat = 0x0111; + t.ddabengali = 0x09a1; + t.ddadeva = 0x0921; + t.ddagujarati = 0x0aa1; + t.ddagurmukhi = 0x0a21; + t.ddalarabic = 0x0688; + t.ddalfinalarabic = 0xfb89; + t.dddhadeva = 0x095c; + t.ddhabengali = 0x09a2; + t.ddhadeva = 0x0922; + t.ddhagujarati = 0x0aa2; + t.ddhagurmukhi = 0x0a22; + t.ddotaccent = 0x1e0b; + t.ddotbelow = 0x1e0d; + t.decimalseparatorarabic = 0x066b; + t.decimalseparatorpersian = 0x066b; + t.decyrillic = 0x0434; + t.degree = 0x00b0; + t.dehihebrew = 0x05ad; + t.dehiragana = 0x3067; + t.deicoptic = 0x03ef; + t.dekatakana = 0x30c7; + t.deleteleft = 0x232b; + t.deleteright = 0x2326; + t.delta = 0x03b4; + t.deltaturned = 0x018d; + t.denominatorminusonenumeratorbengali = 0x09f8; + t.dezh = 0x02a4; + t.dhabengali = 0x09a7; + t.dhadeva = 0x0927; + t.dhagujarati = 0x0aa7; + t.dhagurmukhi = 0x0a27; + t.dhook = 0x0257; + t.dialytikatonos = 0x0385; + t.dialytikatonoscmb = 0x0344; + t.diamond = 0x2666; + t.diamondsuitwhite = 0x2662; + t.dieresis = 0x00a8; + t.dieresisacute = 0xf6d7; + t.dieresisbelowcmb = 0x0324; + t.dieresiscmb = 0x0308; + t.dieresisgrave = 0xf6d8; + t.dieresistonos = 0x0385; + t.dihiragana = 0x3062; + t.dikatakana = 0x30c2; + t.dittomark = 0x3003; + t.divide = 0x00f7; + t.divides = 0x2223; + t.divisionslash = 0x2215; + t.djecyrillic = 0x0452; + t.dkshade = 0x2593; + t.dlinebelow = 0x1e0f; + t.dlsquare = 0x3397; + t.dmacron = 0x0111; + t.dmonospace = 0xff44; + t.dnblock = 0x2584; + t.dochadathai = 0x0e0e; + t.dodekthai = 0x0e14; + t.dohiragana = 0x3069; + t.dokatakana = 0x30c9; + t.dollar = 0x0024; + t.dollarinferior = 0xf6e3; + t.dollarmonospace = 0xff04; + t.dollaroldstyle = 0xf724; + t.dollarsmall = 0xfe69; + t.dollarsuperior = 0xf6e4; + t.dong = 0x20ab; + t.dorusquare = 0x3326; + t.dotaccent = 0x02d9; + t.dotaccentcmb = 0x0307; + t.dotbelowcmb = 0x0323; + t.dotbelowcomb = 0x0323; + t.dotkatakana = 0x30fb; + t.dotlessi = 0x0131; + t.dotlessj = 0xf6be; + t.dotlessjstrokehook = 0x0284; + t.dotmath = 0x22c5; + t.dottedcircle = 0x25cc; + t.doubleyodpatah = 0xfb1f; + t.doubleyodpatahhebrew = 0xfb1f; + t.downtackbelowcmb = 0x031e; + t.downtackmod = 0x02d5; + t.dparen = 0x249f; + t.dsuperior = 0xf6eb; + t.dtail = 0x0256; + t.dtopbar = 0x018c; + t.duhiragana = 0x3065; + t.dukatakana = 0x30c5; + t.dz = 0x01f3; + t.dzaltone = 0x02a3; + t.dzcaron = 0x01c6; + t.dzcurl = 0x02a5; + t.dzeabkhasiancyrillic = 0x04e1; + t.dzecyrillic = 0x0455; + t.dzhecyrillic = 0x045f; + t.e = 0x0065; + t.eacute = 0x00e9; + t.earth = 0x2641; + t.ebengali = 0x098f; + t.ebopomofo = 0x311c; + t.ebreve = 0x0115; + t.ecandradeva = 0x090d; + t.ecandragujarati = 0x0a8d; + t.ecandravowelsigndeva = 0x0945; + t.ecandravowelsigngujarati = 0x0ac5; + t.ecaron = 0x011b; + t.ecedillabreve = 0x1e1d; + t.echarmenian = 0x0565; + t.echyiwnarmenian = 0x0587; + t.ecircle = 0x24d4; + t.ecircumflex = 0x00ea; + t.ecircumflexacute = 0x1ebf; + t.ecircumflexbelow = 0x1e19; + t.ecircumflexdotbelow = 0x1ec7; + t.ecircumflexgrave = 0x1ec1; + t.ecircumflexhookabove = 0x1ec3; + t.ecircumflextilde = 0x1ec5; + t.ecyrillic = 0x0454; + t.edblgrave = 0x0205; + t.edeva = 0x090f; + t.edieresis = 0x00eb; + t.edot = 0x0117; + t.edotaccent = 0x0117; + t.edotbelow = 0x1eb9; + t.eegurmukhi = 0x0a0f; + t.eematragurmukhi = 0x0a47; + t.efcyrillic = 0x0444; + t.egrave = 0x00e8; + t.egujarati = 0x0a8f; + t.eharmenian = 0x0567; + t.ehbopomofo = 0x311d; + t.ehiragana = 0x3048; + t.ehookabove = 0x1ebb; + t.eibopomofo = 0x311f; + t.eight = 0x0038; + t.eightarabic = 0x0668; + t.eightbengali = 0x09ee; + t.eightcircle = 0x2467; + t.eightcircleinversesansserif = 0x2791; + t.eightdeva = 0x096e; + t.eighteencircle = 0x2471; + t.eighteenparen = 0x2485; + t.eighteenperiod = 0x2499; + t.eightgujarati = 0x0aee; + t.eightgurmukhi = 0x0a6e; + t.eighthackarabic = 0x0668; + t.eighthangzhou = 0x3028; + t.eighthnotebeamed = 0x266b; + t.eightideographicparen = 0x3227; + t.eightinferior = 0x2088; + t.eightmonospace = 0xff18; + t.eightoldstyle = 0xf738; + t.eightparen = 0x247b; + t.eightperiod = 0x248f; + t.eightpersian = 0x06f8; + t.eightroman = 0x2177; + t.eightsuperior = 0x2078; + t.eightthai = 0x0e58; + t.einvertedbreve = 0x0207; + t.eiotifiedcyrillic = 0x0465; + t.ekatakana = 0x30a8; + t.ekatakanahalfwidth = 0xff74; + t.ekonkargurmukhi = 0x0a74; + t.ekorean = 0x3154; + t.elcyrillic = 0x043b; + t.element = 0x2208; + t.elevencircle = 0x246a; + t.elevenparen = 0x247e; + t.elevenperiod = 0x2492; + t.elevenroman = 0x217a; + t.ellipsis = 0x2026; + t.ellipsisvertical = 0x22ee; + t.emacron = 0x0113; + t.emacronacute = 0x1e17; + t.emacrongrave = 0x1e15; + t.emcyrillic = 0x043c; + t.emdash = 0x2014; + t.emdashvertical = 0xfe31; + t.emonospace = 0xff45; + t.emphasismarkarmenian = 0x055b; + t.emptyset = 0x2205; + t.enbopomofo = 0x3123; + t.encyrillic = 0x043d; + t.endash = 0x2013; + t.endashvertical = 0xfe32; + t.endescendercyrillic = 0x04a3; + t.eng = 0x014b; + t.engbopomofo = 0x3125; + t.enghecyrillic = 0x04a5; + t.enhookcyrillic = 0x04c8; + t.enspace = 0x2002; + t.eogonek = 0x0119; + t.eokorean = 0x3153; + t.eopen = 0x025b; + t.eopenclosed = 0x029a; + t.eopenreversed = 0x025c; + t.eopenreversedclosed = 0x025e; + t.eopenreversedhook = 0x025d; + t.eparen = 0x24a0; + t.epsilon = 0x03b5; + t.epsilontonos = 0x03ad; + t.equal = 0x003d; + t.equalmonospace = 0xff1d; + t.equalsmall = 0xfe66; + t.equalsuperior = 0x207c; + t.equivalence = 0x2261; + t.erbopomofo = 0x3126; + t.ercyrillic = 0x0440; + t.ereversed = 0x0258; + t.ereversedcyrillic = 0x044d; + t.escyrillic = 0x0441; + t.esdescendercyrillic = 0x04ab; + t.esh = 0x0283; + t.eshcurl = 0x0286; + t.eshortdeva = 0x090e; + t.eshortvowelsigndeva = 0x0946; + t.eshreversedloop = 0x01aa; + t.eshsquatreversed = 0x0285; + t.esmallhiragana = 0x3047; + t.esmallkatakana = 0x30a7; + t.esmallkatakanahalfwidth = 0xff6a; + t.estimated = 0x212e; + t.esuperior = 0xf6ec; + t.eta = 0x03b7; + t.etarmenian = 0x0568; + t.etatonos = 0x03ae; + t.eth = 0x00f0; + t.etilde = 0x1ebd; + t.etildebelow = 0x1e1b; + t.etnahtafoukhhebrew = 0x0591; + t.etnahtafoukhlefthebrew = 0x0591; + t.etnahtahebrew = 0x0591; + t.etnahtalefthebrew = 0x0591; + t.eturned = 0x01dd; + t.eukorean = 0x3161; + t.euro = 0x20ac; + t.evowelsignbengali = 0x09c7; + t.evowelsigndeva = 0x0947; + t.evowelsigngujarati = 0x0ac7; + t.exclam = 0x0021; + t.exclamarmenian = 0x055c; + t.exclamdbl = 0x203c; + t.exclamdown = 0x00a1; + t.exclamdownsmall = 0xf7a1; + t.exclammonospace = 0xff01; + t.exclamsmall = 0xf721; + t.existential = 0x2203; + t.ezh = 0x0292; + t.ezhcaron = 0x01ef; + t.ezhcurl = 0x0293; + t.ezhreversed = 0x01b9; + t.ezhtail = 0x01ba; + t.f = 0x0066; + t.fadeva = 0x095e; + t.fagurmukhi = 0x0a5e; + t.fahrenheit = 0x2109; + t.fathaarabic = 0x064e; + t.fathalowarabic = 0x064e; + t.fathatanarabic = 0x064b; + t.fbopomofo = 0x3108; + t.fcircle = 0x24d5; + t.fdotaccent = 0x1e1f; + t.feharabic = 0x0641; + t.feharmenian = 0x0586; + t.fehfinalarabic = 0xfed2; + t.fehinitialarabic = 0xfed3; + t.fehmedialarabic = 0xfed4; + t.feicoptic = 0x03e5; + t.female = 0x2640; + t.ff = 0xfb00; + t.f_f = 0xfb00; + t.ffi = 0xfb03; + t.ffl = 0xfb04; + t.fi = 0xfb01; + t.fifteencircle = 0x246e; + t.fifteenparen = 0x2482; + t.fifteenperiod = 0x2496; + t.figuredash = 0x2012; + t.filledbox = 0x25a0; + t.filledrect = 0x25ac; + t.finalkaf = 0x05da; + t.finalkafdagesh = 0xfb3a; + t.finalkafdageshhebrew = 0xfb3a; + t.finalkafhebrew = 0x05da; + t.finalmem = 0x05dd; + t.finalmemhebrew = 0x05dd; + t.finalnun = 0x05df; + t.finalnunhebrew = 0x05df; + t.finalpe = 0x05e3; + t.finalpehebrew = 0x05e3; + t.finaltsadi = 0x05e5; + t.finaltsadihebrew = 0x05e5; + t.firsttonechinese = 0x02c9; + t.fisheye = 0x25c9; + t.fitacyrillic = 0x0473; + t.five = 0x0035; + t.fivearabic = 0x0665; + t.fivebengali = 0x09eb; + t.fivecircle = 0x2464; + t.fivecircleinversesansserif = 0x278e; + t.fivedeva = 0x096b; + t.fiveeighths = 0x215d; + t.fivegujarati = 0x0aeb; + t.fivegurmukhi = 0x0a6b; + t.fivehackarabic = 0x0665; + t.fivehangzhou = 0x3025; + t.fiveideographicparen = 0x3224; + t.fiveinferior = 0x2085; + t.fivemonospace = 0xff15; + t.fiveoldstyle = 0xf735; + t.fiveparen = 0x2478; + t.fiveperiod = 0x248c; + t.fivepersian = 0x06f5; + t.fiveroman = 0x2174; + t.fivesuperior = 0x2075; + t.fivethai = 0x0e55; + t.fl = 0xfb02; + t.florin = 0x0192; + t.fmonospace = 0xff46; + t.fmsquare = 0x3399; + t.fofanthai = 0x0e1f; + t.fofathai = 0x0e1d; + t.fongmanthai = 0x0e4f; + t.forall = 0x2200; + t.four = 0x0034; + t.fourarabic = 0x0664; + t.fourbengali = 0x09ea; + t.fourcircle = 0x2463; + t.fourcircleinversesansserif = 0x278d; + t.fourdeva = 0x096a; + t.fourgujarati = 0x0aea; + t.fourgurmukhi = 0x0a6a; + t.fourhackarabic = 0x0664; + t.fourhangzhou = 0x3024; + t.fourideographicparen = 0x3223; + t.fourinferior = 0x2084; + t.fourmonospace = 0xff14; + t.fournumeratorbengali = 0x09f7; + t.fouroldstyle = 0xf734; + t.fourparen = 0x2477; + t.fourperiod = 0x248b; + t.fourpersian = 0x06f4; + t.fourroman = 0x2173; + t.foursuperior = 0x2074; + t.fourteencircle = 0x246d; + t.fourteenparen = 0x2481; + t.fourteenperiod = 0x2495; + t.fourthai = 0x0e54; + t.fourthtonechinese = 0x02cb; + t.fparen = 0x24a1; + t.fraction = 0x2044; + t.franc = 0x20a3; + t.g = 0x0067; + t.gabengali = 0x0997; + t.gacute = 0x01f5; + t.gadeva = 0x0917; + t.gafarabic = 0x06af; + t.gaffinalarabic = 0xfb93; + t.gafinitialarabic = 0xfb94; + t.gafmedialarabic = 0xfb95; + t.gagujarati = 0x0a97; + t.gagurmukhi = 0x0a17; + t.gahiragana = 0x304c; + t.gakatakana = 0x30ac; + t.gamma = 0x03b3; + t.gammalatinsmall = 0x0263; + t.gammasuperior = 0x02e0; + t.gangiacoptic = 0x03eb; + t.gbopomofo = 0x310d; + t.gbreve = 0x011f; + t.gcaron = 0x01e7; + t.gcedilla = 0x0123; + t.gcircle = 0x24d6; + t.gcircumflex = 0x011d; + t.gcommaaccent = 0x0123; + t.gdot = 0x0121; + t.gdotaccent = 0x0121; + t.gecyrillic = 0x0433; + t.gehiragana = 0x3052; + t.gekatakana = 0x30b2; + t.geometricallyequal = 0x2251; + t.gereshaccenthebrew = 0x059c; + t.gereshhebrew = 0x05f3; + t.gereshmuqdamhebrew = 0x059d; + t.germandbls = 0x00df; + t.gershayimaccenthebrew = 0x059e; + t.gershayimhebrew = 0x05f4; + t.getamark = 0x3013; + t.ghabengali = 0x0998; + t.ghadarmenian = 0x0572; + t.ghadeva = 0x0918; + t.ghagujarati = 0x0a98; + t.ghagurmukhi = 0x0a18; + t.ghainarabic = 0x063a; + t.ghainfinalarabic = 0xfece; + t.ghaininitialarabic = 0xfecf; + t.ghainmedialarabic = 0xfed0; + t.ghemiddlehookcyrillic = 0x0495; + t.ghestrokecyrillic = 0x0493; + t.gheupturncyrillic = 0x0491; + t.ghhadeva = 0x095a; + t.ghhagurmukhi = 0x0a5a; + t.ghook = 0x0260; + t.ghzsquare = 0x3393; + t.gihiragana = 0x304e; + t.gikatakana = 0x30ae; + t.gimarmenian = 0x0563; + t.gimel = 0x05d2; + t.gimeldagesh = 0xfb32; + t.gimeldageshhebrew = 0xfb32; + t.gimelhebrew = 0x05d2; + t.gjecyrillic = 0x0453; + t.glottalinvertedstroke = 0x01be; + t.glottalstop = 0x0294; + t.glottalstopinverted = 0x0296; + t.glottalstopmod = 0x02c0; + t.glottalstopreversed = 0x0295; + t.glottalstopreversedmod = 0x02c1; + t.glottalstopreversedsuperior = 0x02e4; + t.glottalstopstroke = 0x02a1; + t.glottalstopstrokereversed = 0x02a2; + t.gmacron = 0x1e21; + t.gmonospace = 0xff47; + t.gohiragana = 0x3054; + t.gokatakana = 0x30b4; + t.gparen = 0x24a2; + t.gpasquare = 0x33ac; + t.gradient = 0x2207; + t.grave = 0x0060; + t.gravebelowcmb = 0x0316; + t.gravecmb = 0x0300; + t.gravecomb = 0x0300; + t.gravedeva = 0x0953; + t.gravelowmod = 0x02ce; + t.gravemonospace = 0xff40; + t.gravetonecmb = 0x0340; + t.greater = 0x003e; + t.greaterequal = 0x2265; + t.greaterequalorless = 0x22db; + t.greatermonospace = 0xff1e; + t.greaterorequivalent = 0x2273; + t.greaterorless = 0x2277; + t.greateroverequal = 0x2267; + t.greatersmall = 0xfe65; + t.gscript = 0x0261; + t.gstroke = 0x01e5; + t.guhiragana = 0x3050; + t.guillemotleft = 0x00ab; + t.guillemotright = 0x00bb; + t.guilsinglleft = 0x2039; + t.guilsinglright = 0x203a; + t.gukatakana = 0x30b0; + t.guramusquare = 0x3318; + t.gysquare = 0x33c9; + t.h = 0x0068; + t.haabkhasiancyrillic = 0x04a9; + t.haaltonearabic = 0x06c1; + t.habengali = 0x09b9; + t.hadescendercyrillic = 0x04b3; + t.hadeva = 0x0939; + t.hagujarati = 0x0ab9; + t.hagurmukhi = 0x0a39; + t.haharabic = 0x062d; + t.hahfinalarabic = 0xfea2; + t.hahinitialarabic = 0xfea3; + t.hahiragana = 0x306f; + t.hahmedialarabic = 0xfea4; + t.haitusquare = 0x332a; + t.hakatakana = 0x30cf; + t.hakatakanahalfwidth = 0xff8a; + t.halantgurmukhi = 0x0a4d; + t.hamzaarabic = 0x0621; + t.hamzalowarabic = 0x0621; + t.hangulfiller = 0x3164; + t.hardsigncyrillic = 0x044a; + t.harpoonleftbarbup = 0x21bc; + t.harpoonrightbarbup = 0x21c0; + t.hasquare = 0x33ca; + t.hatafpatah = 0x05b2; + t.hatafpatah16 = 0x05b2; + t.hatafpatah23 = 0x05b2; + t.hatafpatah2f = 0x05b2; + t.hatafpatahhebrew = 0x05b2; + t.hatafpatahnarrowhebrew = 0x05b2; + t.hatafpatahquarterhebrew = 0x05b2; + t.hatafpatahwidehebrew = 0x05b2; + t.hatafqamats = 0x05b3; + t.hatafqamats1b = 0x05b3; + t.hatafqamats28 = 0x05b3; + t.hatafqamats34 = 0x05b3; + t.hatafqamatshebrew = 0x05b3; + t.hatafqamatsnarrowhebrew = 0x05b3; + t.hatafqamatsquarterhebrew = 0x05b3; + t.hatafqamatswidehebrew = 0x05b3; + t.hatafsegol = 0x05b1; + t.hatafsegol17 = 0x05b1; + t.hatafsegol24 = 0x05b1; + t.hatafsegol30 = 0x05b1; + t.hatafsegolhebrew = 0x05b1; + t.hatafsegolnarrowhebrew = 0x05b1; + t.hatafsegolquarterhebrew = 0x05b1; + t.hatafsegolwidehebrew = 0x05b1; + t.hbar = 0x0127; + t.hbopomofo = 0x310f; + t.hbrevebelow = 0x1e2b; + t.hcedilla = 0x1e29; + t.hcircle = 0x24d7; + t.hcircumflex = 0x0125; + t.hdieresis = 0x1e27; + t.hdotaccent = 0x1e23; + t.hdotbelow = 0x1e25; + t.he = 0x05d4; + t.heart = 0x2665; + t.heartsuitblack = 0x2665; + t.heartsuitwhite = 0x2661; + t.hedagesh = 0xfb34; + t.hedageshhebrew = 0xfb34; + t.hehaltonearabic = 0x06c1; + t.heharabic = 0x0647; + t.hehebrew = 0x05d4; + t.hehfinalaltonearabic = 0xfba7; + t.hehfinalalttwoarabic = 0xfeea; + t.hehfinalarabic = 0xfeea; + t.hehhamzaabovefinalarabic = 0xfba5; + t.hehhamzaaboveisolatedarabic = 0xfba4; + t.hehinitialaltonearabic = 0xfba8; + t.hehinitialarabic = 0xfeeb; + t.hehiragana = 0x3078; + t.hehmedialaltonearabic = 0xfba9; + t.hehmedialarabic = 0xfeec; + t.heiseierasquare = 0x337b; + t.hekatakana = 0x30d8; + t.hekatakanahalfwidth = 0xff8d; + t.hekutaarusquare = 0x3336; + t.henghook = 0x0267; + t.herutusquare = 0x3339; + t.het = 0x05d7; + t.hethebrew = 0x05d7; + t.hhook = 0x0266; + t.hhooksuperior = 0x02b1; + t.hieuhacirclekorean = 0x327b; + t.hieuhaparenkorean = 0x321b; + t.hieuhcirclekorean = 0x326d; + t.hieuhkorean = 0x314e; + t.hieuhparenkorean = 0x320d; + t.hihiragana = 0x3072; + t.hikatakana = 0x30d2; + t.hikatakanahalfwidth = 0xff8b; + t.hiriq = 0x05b4; + t.hiriq14 = 0x05b4; + t.hiriq21 = 0x05b4; + t.hiriq2d = 0x05b4; + t.hiriqhebrew = 0x05b4; + t.hiriqnarrowhebrew = 0x05b4; + t.hiriqquarterhebrew = 0x05b4; + t.hiriqwidehebrew = 0x05b4; + t.hlinebelow = 0x1e96; + t.hmonospace = 0xff48; + t.hoarmenian = 0x0570; + t.hohipthai = 0x0e2b; + t.hohiragana = 0x307b; + t.hokatakana = 0x30db; + t.hokatakanahalfwidth = 0xff8e; + t.holam = 0x05b9; + t.holam19 = 0x05b9; + t.holam26 = 0x05b9; + t.holam32 = 0x05b9; + t.holamhebrew = 0x05b9; + t.holamnarrowhebrew = 0x05b9; + t.holamquarterhebrew = 0x05b9; + t.holamwidehebrew = 0x05b9; + t.honokhukthai = 0x0e2e; + t.hookabovecomb = 0x0309; + t.hookcmb = 0x0309; + t.hookpalatalizedbelowcmb = 0x0321; + t.hookretroflexbelowcmb = 0x0322; + t.hoonsquare = 0x3342; + t.horicoptic = 0x03e9; + t.horizontalbar = 0x2015; + t.horncmb = 0x031b; + t.hotsprings = 0x2668; + t.house = 0x2302; + t.hparen = 0x24a3; + t.hsuperior = 0x02b0; + t.hturned = 0x0265; + t.huhiragana = 0x3075; + t.huiitosquare = 0x3333; + t.hukatakana = 0x30d5; + t.hukatakanahalfwidth = 0xff8c; + t.hungarumlaut = 0x02dd; + t.hungarumlautcmb = 0x030b; + t.hv = 0x0195; + t.hyphen = 0x002d; + t.hypheninferior = 0xf6e5; + t.hyphenmonospace = 0xff0d; + t.hyphensmall = 0xfe63; + t.hyphensuperior = 0xf6e6; + t.hyphentwo = 0x2010; + t.i = 0x0069; + t.iacute = 0x00ed; + t.iacyrillic = 0x044f; + t.ibengali = 0x0987; + t.ibopomofo = 0x3127; + t.ibreve = 0x012d; + t.icaron = 0x01d0; + t.icircle = 0x24d8; + t.icircumflex = 0x00ee; + t.icyrillic = 0x0456; + t.idblgrave = 0x0209; + t.ideographearthcircle = 0x328f; + t.ideographfirecircle = 0x328b; + t.ideographicallianceparen = 0x323f; + t.ideographiccallparen = 0x323a; + t.ideographiccentrecircle = 0x32a5; + t.ideographicclose = 0x3006; + t.ideographiccomma = 0x3001; + t.ideographiccommaleft = 0xff64; + t.ideographiccongratulationparen = 0x3237; + t.ideographiccorrectcircle = 0x32a3; + t.ideographicearthparen = 0x322f; + t.ideographicenterpriseparen = 0x323d; + t.ideographicexcellentcircle = 0x329d; + t.ideographicfestivalparen = 0x3240; + t.ideographicfinancialcircle = 0x3296; + t.ideographicfinancialparen = 0x3236; + t.ideographicfireparen = 0x322b; + t.ideographichaveparen = 0x3232; + t.ideographichighcircle = 0x32a4; + t.ideographiciterationmark = 0x3005; + t.ideographiclaborcircle = 0x3298; + t.ideographiclaborparen = 0x3238; + t.ideographicleftcircle = 0x32a7; + t.ideographiclowcircle = 0x32a6; + t.ideographicmedicinecircle = 0x32a9; + t.ideographicmetalparen = 0x322e; + t.ideographicmoonparen = 0x322a; + t.ideographicnameparen = 0x3234; + t.ideographicperiod = 0x3002; + t.ideographicprintcircle = 0x329e; + t.ideographicreachparen = 0x3243; + t.ideographicrepresentparen = 0x3239; + t.ideographicresourceparen = 0x323e; + t.ideographicrightcircle = 0x32a8; + t.ideographicsecretcircle = 0x3299; + t.ideographicselfparen = 0x3242; + t.ideographicsocietyparen = 0x3233; + t.ideographicspace = 0x3000; + t.ideographicspecialparen = 0x3235; + t.ideographicstockparen = 0x3231; + t.ideographicstudyparen = 0x323b; + t.ideographicsunparen = 0x3230; + t.ideographicsuperviseparen = 0x323c; + t.ideographicwaterparen = 0x322c; + t.ideographicwoodparen = 0x322d; + t.ideographiczero = 0x3007; + t.ideographmetalcircle = 0x328e; + t.ideographmooncircle = 0x328a; + t.ideographnamecircle = 0x3294; + t.ideographsuncircle = 0x3290; + t.ideographwatercircle = 0x328c; + t.ideographwoodcircle = 0x328d; + t.ideva = 0x0907; + t.idieresis = 0x00ef; + t.idieresisacute = 0x1e2f; + t.idieresiscyrillic = 0x04e5; + t.idotbelow = 0x1ecb; + t.iebrevecyrillic = 0x04d7; + t.iecyrillic = 0x0435; + t.ieungacirclekorean = 0x3275; + t.ieungaparenkorean = 0x3215; + t.ieungcirclekorean = 0x3267; + t.ieungkorean = 0x3147; + t.ieungparenkorean = 0x3207; + t.igrave = 0x00ec; + t.igujarati = 0x0a87; + t.igurmukhi = 0x0a07; + t.ihiragana = 0x3044; + t.ihookabove = 0x1ec9; + t.iibengali = 0x0988; + t.iicyrillic = 0x0438; + t.iideva = 0x0908; + t.iigujarati = 0x0a88; + t.iigurmukhi = 0x0a08; + t.iimatragurmukhi = 0x0a40; + t.iinvertedbreve = 0x020b; + t.iishortcyrillic = 0x0439; + t.iivowelsignbengali = 0x09c0; + t.iivowelsigndeva = 0x0940; + t.iivowelsigngujarati = 0x0ac0; + t.ij = 0x0133; + t.ikatakana = 0x30a4; + t.ikatakanahalfwidth = 0xff72; + t.ikorean = 0x3163; + t.ilde = 0x02dc; + t.iluyhebrew = 0x05ac; + t.imacron = 0x012b; + t.imacroncyrillic = 0x04e3; + t.imageorapproximatelyequal = 0x2253; + t.imatragurmukhi = 0x0a3f; + t.imonospace = 0xff49; + t.increment = 0x2206; + t.infinity = 0x221e; + t.iniarmenian = 0x056b; + t.integral = 0x222b; + t.integralbottom = 0x2321; + t.integralbt = 0x2321; + t.integralex = 0xf8f5; + t.integraltop = 0x2320; + t.integraltp = 0x2320; + t.intersection = 0x2229; + t.intisquare = 0x3305; + t.invbullet = 0x25d8; + t.invcircle = 0x25d9; + t.invsmileface = 0x263b; + t.iocyrillic = 0x0451; + t.iogonek = 0x012f; + t.iota = 0x03b9; + t.iotadieresis = 0x03ca; + t.iotadieresistonos = 0x0390; + t.iotalatin = 0x0269; + t.iotatonos = 0x03af; + t.iparen = 0x24a4; + t.irigurmukhi = 0x0a72; + t.ismallhiragana = 0x3043; + t.ismallkatakana = 0x30a3; + t.ismallkatakanahalfwidth = 0xff68; + t.issharbengali = 0x09fa; + t.istroke = 0x0268; + t.isuperior = 0xf6ed; + t.iterationhiragana = 0x309d; + t.iterationkatakana = 0x30fd; + t.itilde = 0x0129; + t.itildebelow = 0x1e2d; + t.iubopomofo = 0x3129; + t.iucyrillic = 0x044e; + t.ivowelsignbengali = 0x09bf; + t.ivowelsigndeva = 0x093f; + t.ivowelsigngujarati = 0x0abf; + t.izhitsacyrillic = 0x0475; + t.izhitsadblgravecyrillic = 0x0477; + t.j = 0x006a; + t.jaarmenian = 0x0571; + t.jabengali = 0x099c; + t.jadeva = 0x091c; + t.jagujarati = 0x0a9c; + t.jagurmukhi = 0x0a1c; + t.jbopomofo = 0x3110; + t.jcaron = 0x01f0; + t.jcircle = 0x24d9; + t.jcircumflex = 0x0135; + t.jcrossedtail = 0x029d; + t.jdotlessstroke = 0x025f; + t.jecyrillic = 0x0458; + t.jeemarabic = 0x062c; + t.jeemfinalarabic = 0xfe9e; + t.jeeminitialarabic = 0xfe9f; + t.jeemmedialarabic = 0xfea0; + t.jeharabic = 0x0698; + t.jehfinalarabic = 0xfb8b; + t.jhabengali = 0x099d; + t.jhadeva = 0x091d; + t.jhagujarati = 0x0a9d; + t.jhagurmukhi = 0x0a1d; + t.jheharmenian = 0x057b; + t.jis = 0x3004; + t.jmonospace = 0xff4a; + t.jparen = 0x24a5; + t.jsuperior = 0x02b2; + t.k = 0x006b; + t.kabashkircyrillic = 0x04a1; + t.kabengali = 0x0995; + t.kacute = 0x1e31; + t.kacyrillic = 0x043a; + t.kadescendercyrillic = 0x049b; + t.kadeva = 0x0915; + t.kaf = 0x05db; + t.kafarabic = 0x0643; + t.kafdagesh = 0xfb3b; + t.kafdageshhebrew = 0xfb3b; + t.kaffinalarabic = 0xfeda; + t.kafhebrew = 0x05db; + t.kafinitialarabic = 0xfedb; + t.kafmedialarabic = 0xfedc; + t.kafrafehebrew = 0xfb4d; + t.kagujarati = 0x0a95; + t.kagurmukhi = 0x0a15; + t.kahiragana = 0x304b; + t.kahookcyrillic = 0x04c4; + t.kakatakana = 0x30ab; + t.kakatakanahalfwidth = 0xff76; + t.kappa = 0x03ba; + t.kappasymbolgreek = 0x03f0; + t.kapyeounmieumkorean = 0x3171; + t.kapyeounphieuphkorean = 0x3184; + t.kapyeounpieupkorean = 0x3178; + t.kapyeounssangpieupkorean = 0x3179; + t.karoriisquare = 0x330d; + t.kashidaautoarabic = 0x0640; + t.kashidaautonosidebearingarabic = 0x0640; + t.kasmallkatakana = 0x30f5; + t.kasquare = 0x3384; + t.kasraarabic = 0x0650; + t.kasratanarabic = 0x064d; + t.kastrokecyrillic = 0x049f; + t.katahiraprolongmarkhalfwidth = 0xff70; + t.kaverticalstrokecyrillic = 0x049d; + t.kbopomofo = 0x310e; + t.kcalsquare = 0x3389; + t.kcaron = 0x01e9; + t.kcedilla = 0x0137; + t.kcircle = 0x24da; + t.kcommaaccent = 0x0137; + t.kdotbelow = 0x1e33; + t.keharmenian = 0x0584; + t.kehiragana = 0x3051; + t.kekatakana = 0x30b1; + t.kekatakanahalfwidth = 0xff79; + t.kenarmenian = 0x056f; + t.kesmallkatakana = 0x30f6; + t.kgreenlandic = 0x0138; + t.khabengali = 0x0996; + t.khacyrillic = 0x0445; + t.khadeva = 0x0916; + t.khagujarati = 0x0a96; + t.khagurmukhi = 0x0a16; + t.khaharabic = 0x062e; + t.khahfinalarabic = 0xfea6; + t.khahinitialarabic = 0xfea7; + t.khahmedialarabic = 0xfea8; + t.kheicoptic = 0x03e7; + t.khhadeva = 0x0959; + t.khhagurmukhi = 0x0a59; + t.khieukhacirclekorean = 0x3278; + t.khieukhaparenkorean = 0x3218; + t.khieukhcirclekorean = 0x326a; + t.khieukhkorean = 0x314b; + t.khieukhparenkorean = 0x320a; + t.khokhaithai = 0x0e02; + t.khokhonthai = 0x0e05; + t.khokhuatthai = 0x0e03; + t.khokhwaithai = 0x0e04; + t.khomutthai = 0x0e5b; + t.khook = 0x0199; + t.khorakhangthai = 0x0e06; + t.khzsquare = 0x3391; + t.kihiragana = 0x304d; + t.kikatakana = 0x30ad; + t.kikatakanahalfwidth = 0xff77; + t.kiroguramusquare = 0x3315; + t.kiromeetorusquare = 0x3316; + t.kirosquare = 0x3314; + t.kiyeokacirclekorean = 0x326e; + t.kiyeokaparenkorean = 0x320e; + t.kiyeokcirclekorean = 0x3260; + t.kiyeokkorean = 0x3131; + t.kiyeokparenkorean = 0x3200; + t.kiyeoksioskorean = 0x3133; + t.kjecyrillic = 0x045c; + t.klinebelow = 0x1e35; + t.klsquare = 0x3398; + t.kmcubedsquare = 0x33a6; + t.kmonospace = 0xff4b; + t.kmsquaredsquare = 0x33a2; + t.kohiragana = 0x3053; + t.kohmsquare = 0x33c0; + t.kokaithai = 0x0e01; + t.kokatakana = 0x30b3; + t.kokatakanahalfwidth = 0xff7a; + t.kooposquare = 0x331e; + t.koppacyrillic = 0x0481; + t.koreanstandardsymbol = 0x327f; + t.koroniscmb = 0x0343; + t.kparen = 0x24a6; + t.kpasquare = 0x33aa; + t.ksicyrillic = 0x046f; + t.ktsquare = 0x33cf; + t.kturned = 0x029e; + t.kuhiragana = 0x304f; + t.kukatakana = 0x30af; + t.kukatakanahalfwidth = 0xff78; + t.kvsquare = 0x33b8; + t.kwsquare = 0x33be; + t.l = 0x006c; + t.labengali = 0x09b2; + t.lacute = 0x013a; + t.ladeva = 0x0932; + t.lagujarati = 0x0ab2; + t.lagurmukhi = 0x0a32; + t.lakkhangyaothai = 0x0e45; + t.lamaleffinalarabic = 0xfefc; + t.lamalefhamzaabovefinalarabic = 0xfef8; + t.lamalefhamzaaboveisolatedarabic = 0xfef7; + t.lamalefhamzabelowfinalarabic = 0xfefa; + t.lamalefhamzabelowisolatedarabic = 0xfef9; + t.lamalefisolatedarabic = 0xfefb; + t.lamalefmaddaabovefinalarabic = 0xfef6; + t.lamalefmaddaaboveisolatedarabic = 0xfef5; + t.lamarabic = 0x0644; + t.lambda = 0x03bb; + t.lambdastroke = 0x019b; + t.lamed = 0x05dc; + t.lameddagesh = 0xfb3c; + t.lameddageshhebrew = 0xfb3c; + t.lamedhebrew = 0x05dc; + t.lamfinalarabic = 0xfede; + t.lamhahinitialarabic = 0xfcca; + t.laminitialarabic = 0xfedf; + t.lamjeeminitialarabic = 0xfcc9; + t.lamkhahinitialarabic = 0xfccb; + t.lamlamhehisolatedarabic = 0xfdf2; + t.lammedialarabic = 0xfee0; + t.lammeemhahinitialarabic = 0xfd88; + t.lammeeminitialarabic = 0xfccc; + t.largecircle = 0x25ef; + t.lbar = 0x019a; + t.lbelt = 0x026c; + t.lbopomofo = 0x310c; + t.lcaron = 0x013e; + t.lcedilla = 0x013c; + t.lcircle = 0x24db; + t.lcircumflexbelow = 0x1e3d; + t.lcommaaccent = 0x013c; + t.ldot = 0x0140; + t.ldotaccent = 0x0140; + t.ldotbelow = 0x1e37; + t.ldotbelowmacron = 0x1e39; + t.leftangleabovecmb = 0x031a; + t.lefttackbelowcmb = 0x0318; + t.less = 0x003c; + t.lessequal = 0x2264; + t.lessequalorgreater = 0x22da; + t.lessmonospace = 0xff1c; + t.lessorequivalent = 0x2272; + t.lessorgreater = 0x2276; + t.lessoverequal = 0x2266; + t.lesssmall = 0xfe64; + t.lezh = 0x026e; + t.lfblock = 0x258c; + t.lhookretroflex = 0x026d; + t.lira = 0x20a4; + t.liwnarmenian = 0x056c; + t.lj = 0x01c9; + t.ljecyrillic = 0x0459; + t.ll = 0xf6c0; + t.lladeva = 0x0933; + t.llagujarati = 0x0ab3; + t.llinebelow = 0x1e3b; + t.llladeva = 0x0934; + t.llvocalicbengali = 0x09e1; + t.llvocalicdeva = 0x0961; + t.llvocalicvowelsignbengali = 0x09e3; + t.llvocalicvowelsigndeva = 0x0963; + t.lmiddletilde = 0x026b; + t.lmonospace = 0xff4c; + t.lmsquare = 0x33d0; + t.lochulathai = 0x0e2c; + t.logicaland = 0x2227; + t.logicalnot = 0x00ac; + t.logicalnotreversed = 0x2310; + t.logicalor = 0x2228; + t.lolingthai = 0x0e25; + t.longs = 0x017f; + t.lowlinecenterline = 0xfe4e; + t.lowlinecmb = 0x0332; + t.lowlinedashed = 0xfe4d; + t.lozenge = 0x25ca; + t.lparen = 0x24a7; + t.lslash = 0x0142; + t.lsquare = 0x2113; + t.lsuperior = 0xf6ee; + t.ltshade = 0x2591; + t.luthai = 0x0e26; + t.lvocalicbengali = 0x098c; + t.lvocalicdeva = 0x090c; + t.lvocalicvowelsignbengali = 0x09e2; + t.lvocalicvowelsigndeva = 0x0962; + t.lxsquare = 0x33d3; + t.m = 0x006d; + t.mabengali = 0x09ae; + t.macron = 0x00af; + t.macronbelowcmb = 0x0331; + t.macroncmb = 0x0304; + t.macronlowmod = 0x02cd; + t.macronmonospace = 0xffe3; + t.macute = 0x1e3f; + t.madeva = 0x092e; + t.magujarati = 0x0aae; + t.magurmukhi = 0x0a2e; + t.mahapakhhebrew = 0x05a4; + t.mahapakhlefthebrew = 0x05a4; + t.mahiragana = 0x307e; + t.maichattawalowleftthai = 0xf895; + t.maichattawalowrightthai = 0xf894; + t.maichattawathai = 0x0e4b; + t.maichattawaupperleftthai = 0xf893; + t.maieklowleftthai = 0xf88c; + t.maieklowrightthai = 0xf88b; + t.maiekthai = 0x0e48; + t.maiekupperleftthai = 0xf88a; + t.maihanakatleftthai = 0xf884; + t.maihanakatthai = 0x0e31; + t.maitaikhuleftthai = 0xf889; + t.maitaikhuthai = 0x0e47; + t.maitholowleftthai = 0xf88f; + t.maitholowrightthai = 0xf88e; + t.maithothai = 0x0e49; + t.maithoupperleftthai = 0xf88d; + t.maitrilowleftthai = 0xf892; + t.maitrilowrightthai = 0xf891; + t.maitrithai = 0x0e4a; + t.maitriupperleftthai = 0xf890; + t.maiyamokthai = 0x0e46; + t.makatakana = 0x30de; + t.makatakanahalfwidth = 0xff8f; + t.male = 0x2642; + t.mansyonsquare = 0x3347; + t.maqafhebrew = 0x05be; + t.mars = 0x2642; + t.masoracirclehebrew = 0x05af; + t.masquare = 0x3383; + t.mbopomofo = 0x3107; + t.mbsquare = 0x33d4; + t.mcircle = 0x24dc; + t.mcubedsquare = 0x33a5; + t.mdotaccent = 0x1e41; + t.mdotbelow = 0x1e43; + t.meemarabic = 0x0645; + t.meemfinalarabic = 0xfee2; + t.meeminitialarabic = 0xfee3; + t.meemmedialarabic = 0xfee4; + t.meemmeeminitialarabic = 0xfcd1; + t.meemmeemisolatedarabic = 0xfc48; + t.meetorusquare = 0x334d; + t.mehiragana = 0x3081; + t.meizierasquare = 0x337e; + t.mekatakana = 0x30e1; + t.mekatakanahalfwidth = 0xff92; + t.mem = 0x05de; + t.memdagesh = 0xfb3e; + t.memdageshhebrew = 0xfb3e; + t.memhebrew = 0x05de; + t.menarmenian = 0x0574; + t.merkhahebrew = 0x05a5; + t.merkhakefulahebrew = 0x05a6; + t.merkhakefulalefthebrew = 0x05a6; + t.merkhalefthebrew = 0x05a5; + t.mhook = 0x0271; + t.mhzsquare = 0x3392; + t.middledotkatakanahalfwidth = 0xff65; + t.middot = 0x00b7; + t.mieumacirclekorean = 0x3272; + t.mieumaparenkorean = 0x3212; + t.mieumcirclekorean = 0x3264; + t.mieumkorean = 0x3141; + t.mieumpansioskorean = 0x3170; + t.mieumparenkorean = 0x3204; + t.mieumpieupkorean = 0x316e; + t.mieumsioskorean = 0x316f; + t.mihiragana = 0x307f; + t.mikatakana = 0x30df; + t.mikatakanahalfwidth = 0xff90; + t.minus = 0x2212; + t.minusbelowcmb = 0x0320; + t.minuscircle = 0x2296; + t.minusmod = 0x02d7; + t.minusplus = 0x2213; + t.minute = 0x2032; + t.miribaarusquare = 0x334a; + t.mirisquare = 0x3349; + t.mlonglegturned = 0x0270; + t.mlsquare = 0x3396; + t.mmcubedsquare = 0x33a3; + t.mmonospace = 0xff4d; + t.mmsquaredsquare = 0x339f; + t.mohiragana = 0x3082; + t.mohmsquare = 0x33c1; + t.mokatakana = 0x30e2; + t.mokatakanahalfwidth = 0xff93; + t.molsquare = 0x33d6; + t.momathai = 0x0e21; + t.moverssquare = 0x33a7; + t.moverssquaredsquare = 0x33a8; + t.mparen = 0x24a8; + t.mpasquare = 0x33ab; + t.mssquare = 0x33b3; + t.msuperior = 0xf6ef; + t.mturned = 0x026f; + t.mu = 0x00b5; + t.mu1 = 0x00b5; + t.muasquare = 0x3382; + t.muchgreater = 0x226b; + t.muchless = 0x226a; + t.mufsquare = 0x338c; + t.mugreek = 0x03bc; + t.mugsquare = 0x338d; + t.muhiragana = 0x3080; + t.mukatakana = 0x30e0; + t.mukatakanahalfwidth = 0xff91; + t.mulsquare = 0x3395; + t.multiply = 0x00d7; + t.mumsquare = 0x339b; + t.munahhebrew = 0x05a3; + t.munahlefthebrew = 0x05a3; + t.musicalnote = 0x266a; + t.musicalnotedbl = 0x266b; + t.musicflatsign = 0x266d; + t.musicsharpsign = 0x266f; + t.mussquare = 0x33b2; + t.muvsquare = 0x33b6; + t.muwsquare = 0x33bc; + t.mvmegasquare = 0x33b9; + t.mvsquare = 0x33b7; + t.mwmegasquare = 0x33bf; + t.mwsquare = 0x33bd; + t.n = 0x006e; + t.nabengali = 0x09a8; + t.nabla = 0x2207; + t.nacute = 0x0144; + t.nadeva = 0x0928; + t.nagujarati = 0x0aa8; + t.nagurmukhi = 0x0a28; + t.nahiragana = 0x306a; + t.nakatakana = 0x30ca; + t.nakatakanahalfwidth = 0xff85; + t.napostrophe = 0x0149; + t.nasquare = 0x3381; + t.nbopomofo = 0x310b; + t.nbspace = 0x00a0; + t.ncaron = 0x0148; + t.ncedilla = 0x0146; + t.ncircle = 0x24dd; + t.ncircumflexbelow = 0x1e4b; + t.ncommaaccent = 0x0146; + t.ndotaccent = 0x1e45; + t.ndotbelow = 0x1e47; + t.nehiragana = 0x306d; + t.nekatakana = 0x30cd; + t.nekatakanahalfwidth = 0xff88; + t.newsheqelsign = 0x20aa; + t.nfsquare = 0x338b; + t.ngabengali = 0x0999; + t.ngadeva = 0x0919; + t.ngagujarati = 0x0a99; + t.ngagurmukhi = 0x0a19; + t.ngonguthai = 0x0e07; + t.nhiragana = 0x3093; + t.nhookleft = 0x0272; + t.nhookretroflex = 0x0273; + t.nieunacirclekorean = 0x326f; + t.nieunaparenkorean = 0x320f; + t.nieuncieuckorean = 0x3135; + t.nieuncirclekorean = 0x3261; + t.nieunhieuhkorean = 0x3136; + t.nieunkorean = 0x3134; + t.nieunpansioskorean = 0x3168; + t.nieunparenkorean = 0x3201; + t.nieunsioskorean = 0x3167; + t.nieuntikeutkorean = 0x3166; + t.nihiragana = 0x306b; + t.nikatakana = 0x30cb; + t.nikatakanahalfwidth = 0xff86; + t.nikhahitleftthai = 0xf899; + t.nikhahitthai = 0x0e4d; + t.nine = 0x0039; + t.ninearabic = 0x0669; + t.ninebengali = 0x09ef; + t.ninecircle = 0x2468; + t.ninecircleinversesansserif = 0x2792; + t.ninedeva = 0x096f; + t.ninegujarati = 0x0aef; + t.ninegurmukhi = 0x0a6f; + t.ninehackarabic = 0x0669; + t.ninehangzhou = 0x3029; + t.nineideographicparen = 0x3228; + t.nineinferior = 0x2089; + t.ninemonospace = 0xff19; + t.nineoldstyle = 0xf739; + t.nineparen = 0x247c; + t.nineperiod = 0x2490; + t.ninepersian = 0x06f9; + t.nineroman = 0x2178; + t.ninesuperior = 0x2079; + t.nineteencircle = 0x2472; + t.nineteenparen = 0x2486; + t.nineteenperiod = 0x249a; + t.ninethai = 0x0e59; + t.nj = 0x01cc; + t.njecyrillic = 0x045a; + t.nkatakana = 0x30f3; + t.nkatakanahalfwidth = 0xff9d; + t.nlegrightlong = 0x019e; + t.nlinebelow = 0x1e49; + t.nmonospace = 0xff4e; + t.nmsquare = 0x339a; + t.nnabengali = 0x09a3; + t.nnadeva = 0x0923; + t.nnagujarati = 0x0aa3; + t.nnagurmukhi = 0x0a23; + t.nnnadeva = 0x0929; + t.nohiragana = 0x306e; + t.nokatakana = 0x30ce; + t.nokatakanahalfwidth = 0xff89; + t.nonbreakingspace = 0x00a0; + t.nonenthai = 0x0e13; + t.nonuthai = 0x0e19; + t.noonarabic = 0x0646; + t.noonfinalarabic = 0xfee6; + t.noonghunnaarabic = 0x06ba; + t.noonghunnafinalarabic = 0xfb9f; + t.nooninitialarabic = 0xfee7; + t.noonjeeminitialarabic = 0xfcd2; + t.noonjeemisolatedarabic = 0xfc4b; + t.noonmedialarabic = 0xfee8; + t.noonmeeminitialarabic = 0xfcd5; + t.noonmeemisolatedarabic = 0xfc4e; + t.noonnoonfinalarabic = 0xfc8d; + t.notcontains = 0x220c; + t.notelement = 0x2209; + t.notelementof = 0x2209; + t.notequal = 0x2260; + t.notgreater = 0x226f; + t.notgreaternorequal = 0x2271; + t.notgreaternorless = 0x2279; + t.notidentical = 0x2262; + t.notless = 0x226e; + t.notlessnorequal = 0x2270; + t.notparallel = 0x2226; + t.notprecedes = 0x2280; + t.notsubset = 0x2284; + t.notsucceeds = 0x2281; + t.notsuperset = 0x2285; + t.nowarmenian = 0x0576; + t.nparen = 0x24a9; + t.nssquare = 0x33b1; + t.nsuperior = 0x207f; + t.ntilde = 0x00f1; + t.nu = 0x03bd; + t.nuhiragana = 0x306c; + t.nukatakana = 0x30cc; + t.nukatakanahalfwidth = 0xff87; + t.nuktabengali = 0x09bc; + t.nuktadeva = 0x093c; + t.nuktagujarati = 0x0abc; + t.nuktagurmukhi = 0x0a3c; + t.numbersign = 0x0023; + t.numbersignmonospace = 0xff03; + t.numbersignsmall = 0xfe5f; + t.numeralsigngreek = 0x0374; + t.numeralsignlowergreek = 0x0375; + t.numero = 0x2116; + t.nun = 0x05e0; + t.nundagesh = 0xfb40; + t.nundageshhebrew = 0xfb40; + t.nunhebrew = 0x05e0; + t.nvsquare = 0x33b5; + t.nwsquare = 0x33bb; + t.nyabengali = 0x099e; + t.nyadeva = 0x091e; + t.nyagujarati = 0x0a9e; + t.nyagurmukhi = 0x0a1e; + t.o = 0x006f; + t.oacute = 0x00f3; + t.oangthai = 0x0e2d; + t.obarred = 0x0275; + t.obarredcyrillic = 0x04e9; + t.obarreddieresiscyrillic = 0x04eb; + t.obengali = 0x0993; + t.obopomofo = 0x311b; + t.obreve = 0x014f; + t.ocandradeva = 0x0911; + t.ocandragujarati = 0x0a91; + t.ocandravowelsigndeva = 0x0949; + t.ocandravowelsigngujarati = 0x0ac9; + t.ocaron = 0x01d2; + t.ocircle = 0x24de; + t.ocircumflex = 0x00f4; + t.ocircumflexacute = 0x1ed1; + t.ocircumflexdotbelow = 0x1ed9; + t.ocircumflexgrave = 0x1ed3; + t.ocircumflexhookabove = 0x1ed5; + t.ocircumflextilde = 0x1ed7; + t.ocyrillic = 0x043e; + t.odblacute = 0x0151; + t.odblgrave = 0x020d; + t.odeva = 0x0913; + t.odieresis = 0x00f6; + t.odieresiscyrillic = 0x04e7; + t.odotbelow = 0x1ecd; + t.oe = 0x0153; + t.oekorean = 0x315a; + t.ogonek = 0x02db; + t.ogonekcmb = 0x0328; + t.ograve = 0x00f2; + t.ogujarati = 0x0a93; + t.oharmenian = 0x0585; + t.ohiragana = 0x304a; + t.ohookabove = 0x1ecf; + t.ohorn = 0x01a1; + t.ohornacute = 0x1edb; + t.ohorndotbelow = 0x1ee3; + t.ohorngrave = 0x1edd; + t.ohornhookabove = 0x1edf; + t.ohorntilde = 0x1ee1; + t.ohungarumlaut = 0x0151; + t.oi = 0x01a3; + t.oinvertedbreve = 0x020f; + t.okatakana = 0x30aa; + t.okatakanahalfwidth = 0xff75; + t.okorean = 0x3157; + t.olehebrew = 0x05ab; + t.omacron = 0x014d; + t.omacronacute = 0x1e53; + t.omacrongrave = 0x1e51; + t.omdeva = 0x0950; + t.omega = 0x03c9; + t.omega1 = 0x03d6; + t.omegacyrillic = 0x0461; + t.omegalatinclosed = 0x0277; + t.omegaroundcyrillic = 0x047b; + t.omegatitlocyrillic = 0x047d; + t.omegatonos = 0x03ce; + t.omgujarati = 0x0ad0; + t.omicron = 0x03bf; + t.omicrontonos = 0x03cc; + t.omonospace = 0xff4f; + t.one = 0x0031; + t.onearabic = 0x0661; + t.onebengali = 0x09e7; + t.onecircle = 0x2460; + t.onecircleinversesansserif = 0x278a; + t.onedeva = 0x0967; + t.onedotenleader = 0x2024; + t.oneeighth = 0x215b; + t.onefitted = 0xf6dc; + t.onegujarati = 0x0ae7; + t.onegurmukhi = 0x0a67; + t.onehackarabic = 0x0661; + t.onehalf = 0x00bd; + t.onehangzhou = 0x3021; + t.oneideographicparen = 0x3220; + t.oneinferior = 0x2081; + t.onemonospace = 0xff11; + t.onenumeratorbengali = 0x09f4; + t.oneoldstyle = 0xf731; + t.oneparen = 0x2474; + t.oneperiod = 0x2488; + t.onepersian = 0x06f1; + t.onequarter = 0x00bc; + t.oneroman = 0x2170; + t.onesuperior = 0x00b9; + t.onethai = 0x0e51; + t.onethird = 0x2153; + t.oogonek = 0x01eb; + t.oogonekmacron = 0x01ed; + t.oogurmukhi = 0x0a13; + t.oomatragurmukhi = 0x0a4b; + t.oopen = 0x0254; + t.oparen = 0x24aa; + t.openbullet = 0x25e6; + t.option = 0x2325; + t.ordfeminine = 0x00aa; + t.ordmasculine = 0x00ba; + t.orthogonal = 0x221f; + t.oshortdeva = 0x0912; + t.oshortvowelsigndeva = 0x094a; + t.oslash = 0x00f8; + t.oslashacute = 0x01ff; + t.osmallhiragana = 0x3049; + t.osmallkatakana = 0x30a9; + t.osmallkatakanahalfwidth = 0xff6b; + t.ostrokeacute = 0x01ff; + t.osuperior = 0xf6f0; + t.otcyrillic = 0x047f; + t.otilde = 0x00f5; + t.otildeacute = 0x1e4d; + t.otildedieresis = 0x1e4f; + t.oubopomofo = 0x3121; + t.overline = 0x203e; + t.overlinecenterline = 0xfe4a; + t.overlinecmb = 0x0305; + t.overlinedashed = 0xfe49; + t.overlinedblwavy = 0xfe4c; + t.overlinewavy = 0xfe4b; + t.overscore = 0x00af; + t.ovowelsignbengali = 0x09cb; + t.ovowelsigndeva = 0x094b; + t.ovowelsigngujarati = 0x0acb; + t.p = 0x0070; + t.paampssquare = 0x3380; + t.paasentosquare = 0x332b; + t.pabengali = 0x09aa; + t.pacute = 0x1e55; + t.padeva = 0x092a; + t.pagedown = 0x21df; + t.pageup = 0x21de; + t.pagujarati = 0x0aaa; + t.pagurmukhi = 0x0a2a; + t.pahiragana = 0x3071; + t.paiyannoithai = 0x0e2f; + t.pakatakana = 0x30d1; + t.palatalizationcyrilliccmb = 0x0484; + t.palochkacyrillic = 0x04c0; + t.pansioskorean = 0x317f; + t.paragraph = 0x00b6; + t.parallel = 0x2225; + t.parenleft = 0x0028; + t.parenleftaltonearabic = 0xfd3e; + t.parenleftbt = 0xf8ed; + t.parenleftex = 0xf8ec; + t.parenleftinferior = 0x208d; + t.parenleftmonospace = 0xff08; + t.parenleftsmall = 0xfe59; + t.parenleftsuperior = 0x207d; + t.parenlefttp = 0xf8eb; + t.parenleftvertical = 0xfe35; + t.parenright = 0x0029; + t.parenrightaltonearabic = 0xfd3f; + t.parenrightbt = 0xf8f8; + t.parenrightex = 0xf8f7; + t.parenrightinferior = 0x208e; + t.parenrightmonospace = 0xff09; + t.parenrightsmall = 0xfe5a; + t.parenrightsuperior = 0x207e; + t.parenrighttp = 0xf8f6; + t.parenrightvertical = 0xfe36; + t.partialdiff = 0x2202; + t.paseqhebrew = 0x05c0; + t.pashtahebrew = 0x0599; + t.pasquare = 0x33a9; + t.patah = 0x05b7; + t.patah11 = 0x05b7; + t.patah1d = 0x05b7; + t.patah2a = 0x05b7; + t.patahhebrew = 0x05b7; + t.patahnarrowhebrew = 0x05b7; + t.patahquarterhebrew = 0x05b7; + t.patahwidehebrew = 0x05b7; + t.pazerhebrew = 0x05a1; + t.pbopomofo = 0x3106; + t.pcircle = 0x24df; + t.pdotaccent = 0x1e57; + t.pe = 0x05e4; + t.pecyrillic = 0x043f; + t.pedagesh = 0xfb44; + t.pedageshhebrew = 0xfb44; + t.peezisquare = 0x333b; + t.pefinaldageshhebrew = 0xfb43; + t.peharabic = 0x067e; + t.peharmenian = 0x057a; + t.pehebrew = 0x05e4; + t.pehfinalarabic = 0xfb57; + t.pehinitialarabic = 0xfb58; + t.pehiragana = 0x307a; + t.pehmedialarabic = 0xfb59; + t.pekatakana = 0x30da; + t.pemiddlehookcyrillic = 0x04a7; + t.perafehebrew = 0xfb4e; + t.percent = 0x0025; + t.percentarabic = 0x066a; + t.percentmonospace = 0xff05; + t.percentsmall = 0xfe6a; + t.period = 0x002e; + t.periodarmenian = 0x0589; + t.periodcentered = 0x00b7; + t.periodhalfwidth = 0xff61; + t.periodinferior = 0xf6e7; + t.periodmonospace = 0xff0e; + t.periodsmall = 0xfe52; + t.periodsuperior = 0xf6e8; + t.perispomenigreekcmb = 0x0342; + t.perpendicular = 0x22a5; + t.perthousand = 0x2030; + t.peseta = 0x20a7; + t.pfsquare = 0x338a; + t.phabengali = 0x09ab; + t.phadeva = 0x092b; + t.phagujarati = 0x0aab; + t.phagurmukhi = 0x0a2b; + t.phi = 0x03c6; + t.phi1 = 0x03d5; + t.phieuphacirclekorean = 0x327a; + t.phieuphaparenkorean = 0x321a; + t.phieuphcirclekorean = 0x326c; + t.phieuphkorean = 0x314d; + t.phieuphparenkorean = 0x320c; + t.philatin = 0x0278; + t.phinthuthai = 0x0e3a; + t.phisymbolgreek = 0x03d5; + t.phook = 0x01a5; + t.phophanthai = 0x0e1e; + t.phophungthai = 0x0e1c; + t.phosamphaothai = 0x0e20; + t.pi = 0x03c0; + t.pieupacirclekorean = 0x3273; + t.pieupaparenkorean = 0x3213; + t.pieupcieuckorean = 0x3176; + t.pieupcirclekorean = 0x3265; + t.pieupkiyeokkorean = 0x3172; + t.pieupkorean = 0x3142; + t.pieupparenkorean = 0x3205; + t.pieupsioskiyeokkorean = 0x3174; + t.pieupsioskorean = 0x3144; + t.pieupsiostikeutkorean = 0x3175; + t.pieupthieuthkorean = 0x3177; + t.pieuptikeutkorean = 0x3173; + t.pihiragana = 0x3074; + t.pikatakana = 0x30d4; + t.pisymbolgreek = 0x03d6; + t.piwrarmenian = 0x0583; + t.plus = 0x002b; + t.plusbelowcmb = 0x031f; + t.pluscircle = 0x2295; + t.plusminus = 0x00b1; + t.plusmod = 0x02d6; + t.plusmonospace = 0xff0b; + t.plussmall = 0xfe62; + t.plussuperior = 0x207a; + t.pmonospace = 0xff50; + t.pmsquare = 0x33d8; + t.pohiragana = 0x307d; + t.pointingindexdownwhite = 0x261f; + t.pointingindexleftwhite = 0x261c; + t.pointingindexrightwhite = 0x261e; + t.pointingindexupwhite = 0x261d; + t.pokatakana = 0x30dd; + t.poplathai = 0x0e1b; + t.postalmark = 0x3012; + t.postalmarkface = 0x3020; + t.pparen = 0x24ab; + t.precedes = 0x227a; + t.prescription = 0x211e; + t.primemod = 0x02b9; + t.primereversed = 0x2035; + t.product = 0x220f; + t.projective = 0x2305; + t.prolongedkana = 0x30fc; + t.propellor = 0x2318; + t.propersubset = 0x2282; + t.propersuperset = 0x2283; + t.proportion = 0x2237; + t.proportional = 0x221d; + t.psi = 0x03c8; + t.psicyrillic = 0x0471; + t.psilipneumatacyrilliccmb = 0x0486; + t.pssquare = 0x33b0; + t.puhiragana = 0x3077; + t.pukatakana = 0x30d7; + t.pvsquare = 0x33b4; + t.pwsquare = 0x33ba; + t.q = 0x0071; + t.qadeva = 0x0958; + t.qadmahebrew = 0x05a8; + t.qafarabic = 0x0642; + t.qaffinalarabic = 0xfed6; + t.qafinitialarabic = 0xfed7; + t.qafmedialarabic = 0xfed8; + t.qamats = 0x05b8; + t.qamats10 = 0x05b8; + t.qamats1a = 0x05b8; + t.qamats1c = 0x05b8; + t.qamats27 = 0x05b8; + t.qamats29 = 0x05b8; + t.qamats33 = 0x05b8; + t.qamatsde = 0x05b8; + t.qamatshebrew = 0x05b8; + t.qamatsnarrowhebrew = 0x05b8; + t.qamatsqatanhebrew = 0x05b8; + t.qamatsqatannarrowhebrew = 0x05b8; + t.qamatsqatanquarterhebrew = 0x05b8; + t.qamatsqatanwidehebrew = 0x05b8; + t.qamatsquarterhebrew = 0x05b8; + t.qamatswidehebrew = 0x05b8; + t.qarneyparahebrew = 0x059f; + t.qbopomofo = 0x3111; + t.qcircle = 0x24e0; + t.qhook = 0x02a0; + t.qmonospace = 0xff51; + t.qof = 0x05e7; + t.qofdagesh = 0xfb47; + t.qofdageshhebrew = 0xfb47; + t.qofhebrew = 0x05e7; + t.qparen = 0x24ac; + t.quarternote = 0x2669; + t.qubuts = 0x05bb; + t.qubuts18 = 0x05bb; + t.qubuts25 = 0x05bb; + t.qubuts31 = 0x05bb; + t.qubutshebrew = 0x05bb; + t.qubutsnarrowhebrew = 0x05bb; + t.qubutsquarterhebrew = 0x05bb; + t.qubutswidehebrew = 0x05bb; + t.question = 0x003f; + t.questionarabic = 0x061f; + t.questionarmenian = 0x055e; + t.questiondown = 0x00bf; + t.questiondownsmall = 0xf7bf; + t.questiongreek = 0x037e; + t.questionmonospace = 0xff1f; + t.questionsmall = 0xf73f; + t.quotedbl = 0x0022; + t.quotedblbase = 0x201e; + t.quotedblleft = 0x201c; + t.quotedblmonospace = 0xff02; + t.quotedblprime = 0x301e; + t.quotedblprimereversed = 0x301d; + t.quotedblright = 0x201d; + t.quoteleft = 0x2018; + t.quoteleftreversed = 0x201b; + t.quotereversed = 0x201b; + t.quoteright = 0x2019; + t.quoterightn = 0x0149; + t.quotesinglbase = 0x201a; + t.quotesingle = 0x0027; + t.quotesinglemonospace = 0xff07; + t.r = 0x0072; + t.raarmenian = 0x057c; + t.rabengali = 0x09b0; + t.racute = 0x0155; + t.radeva = 0x0930; + t.radical = 0x221a; + t.radicalex = 0xf8e5; + t.radoverssquare = 0x33ae; + t.radoverssquaredsquare = 0x33af; + t.radsquare = 0x33ad; + t.rafe = 0x05bf; + t.rafehebrew = 0x05bf; + t.ragujarati = 0x0ab0; + t.ragurmukhi = 0x0a30; + t.rahiragana = 0x3089; + t.rakatakana = 0x30e9; + t.rakatakanahalfwidth = 0xff97; + t.ralowerdiagonalbengali = 0x09f1; + t.ramiddlediagonalbengali = 0x09f0; + t.ramshorn = 0x0264; + t.ratio = 0x2236; + t.rbopomofo = 0x3116; + t.rcaron = 0x0159; + t.rcedilla = 0x0157; + t.rcircle = 0x24e1; + t.rcommaaccent = 0x0157; + t.rdblgrave = 0x0211; + t.rdotaccent = 0x1e59; + t.rdotbelow = 0x1e5b; + t.rdotbelowmacron = 0x1e5d; + t.referencemark = 0x203b; + t.reflexsubset = 0x2286; + t.reflexsuperset = 0x2287; + t.registered = 0x00ae; + t.registersans = 0xf8e8; + t.registerserif = 0xf6da; + t.reharabic = 0x0631; + t.reharmenian = 0x0580; + t.rehfinalarabic = 0xfeae; + t.rehiragana = 0x308c; + t.rekatakana = 0x30ec; + t.rekatakanahalfwidth = 0xff9a; + t.resh = 0x05e8; + t.reshdageshhebrew = 0xfb48; + t.reshhebrew = 0x05e8; + t.reversedtilde = 0x223d; + t.reviahebrew = 0x0597; + t.reviamugrashhebrew = 0x0597; + t.revlogicalnot = 0x2310; + t.rfishhook = 0x027e; + t.rfishhookreversed = 0x027f; + t.rhabengali = 0x09dd; + t.rhadeva = 0x095d; + t.rho = 0x03c1; + t.rhook = 0x027d; + t.rhookturned = 0x027b; + t.rhookturnedsuperior = 0x02b5; + t.rhosymbolgreek = 0x03f1; + t.rhotichookmod = 0x02de; + t.rieulacirclekorean = 0x3271; + t.rieulaparenkorean = 0x3211; + t.rieulcirclekorean = 0x3263; + t.rieulhieuhkorean = 0x3140; + t.rieulkiyeokkorean = 0x313a; + t.rieulkiyeoksioskorean = 0x3169; + t.rieulkorean = 0x3139; + t.rieulmieumkorean = 0x313b; + t.rieulpansioskorean = 0x316c; + t.rieulparenkorean = 0x3203; + t.rieulphieuphkorean = 0x313f; + t.rieulpieupkorean = 0x313c; + t.rieulpieupsioskorean = 0x316b; + t.rieulsioskorean = 0x313d; + t.rieulthieuthkorean = 0x313e; + t.rieultikeutkorean = 0x316a; + t.rieulyeorinhieuhkorean = 0x316d; + t.rightangle = 0x221f; + t.righttackbelowcmb = 0x0319; + t.righttriangle = 0x22bf; + t.rihiragana = 0x308a; + t.rikatakana = 0x30ea; + t.rikatakanahalfwidth = 0xff98; + t.ring = 0x02da; + t.ringbelowcmb = 0x0325; + t.ringcmb = 0x030a; + t.ringhalfleft = 0x02bf; + t.ringhalfleftarmenian = 0x0559; + t.ringhalfleftbelowcmb = 0x031c; + t.ringhalfleftcentered = 0x02d3; + t.ringhalfright = 0x02be; + t.ringhalfrightbelowcmb = 0x0339; + t.ringhalfrightcentered = 0x02d2; + t.rinvertedbreve = 0x0213; + t.rittorusquare = 0x3351; + t.rlinebelow = 0x1e5f; + t.rlongleg = 0x027c; + t.rlonglegturned = 0x027a; + t.rmonospace = 0xff52; + t.rohiragana = 0x308d; + t.rokatakana = 0x30ed; + t.rokatakanahalfwidth = 0xff9b; + t.roruathai = 0x0e23; + t.rparen = 0x24ad; + t.rrabengali = 0x09dc; + t.rradeva = 0x0931; + t.rragurmukhi = 0x0a5c; + t.rreharabic = 0x0691; + t.rrehfinalarabic = 0xfb8d; + t.rrvocalicbengali = 0x09e0; + t.rrvocalicdeva = 0x0960; + t.rrvocalicgujarati = 0x0ae0; + t.rrvocalicvowelsignbengali = 0x09c4; + t.rrvocalicvowelsigndeva = 0x0944; + t.rrvocalicvowelsigngujarati = 0x0ac4; + t.rsuperior = 0xf6f1; + t.rtblock = 0x2590; + t.rturned = 0x0279; + t.rturnedsuperior = 0x02b4; + t.ruhiragana = 0x308b; + t.rukatakana = 0x30eb; + t.rukatakanahalfwidth = 0xff99; + t.rupeemarkbengali = 0x09f2; + t.rupeesignbengali = 0x09f3; + t.rupiah = 0xf6dd; + t.ruthai = 0x0e24; + t.rvocalicbengali = 0x098b; + t.rvocalicdeva = 0x090b; + t.rvocalicgujarati = 0x0a8b; + t.rvocalicvowelsignbengali = 0x09c3; + t.rvocalicvowelsigndeva = 0x0943; + t.rvocalicvowelsigngujarati = 0x0ac3; + t.s = 0x0073; + t.sabengali = 0x09b8; + t.sacute = 0x015b; + t.sacutedotaccent = 0x1e65; + t.sadarabic = 0x0635; + t.sadeva = 0x0938; + t.sadfinalarabic = 0xfeba; + t.sadinitialarabic = 0xfebb; + t.sadmedialarabic = 0xfebc; + t.sagujarati = 0x0ab8; + t.sagurmukhi = 0x0a38; + t.sahiragana = 0x3055; + t.sakatakana = 0x30b5; + t.sakatakanahalfwidth = 0xff7b; + t.sallallahoualayhewasallamarabic = 0xfdfa; + t.samekh = 0x05e1; + t.samekhdagesh = 0xfb41; + t.samekhdageshhebrew = 0xfb41; + t.samekhhebrew = 0x05e1; + t.saraaathai = 0x0e32; + t.saraaethai = 0x0e41; + t.saraaimaimalaithai = 0x0e44; + t.saraaimaimuanthai = 0x0e43; + t.saraamthai = 0x0e33; + t.saraathai = 0x0e30; + t.saraethai = 0x0e40; + t.saraiileftthai = 0xf886; + t.saraiithai = 0x0e35; + t.saraileftthai = 0xf885; + t.saraithai = 0x0e34; + t.saraothai = 0x0e42; + t.saraueeleftthai = 0xf888; + t.saraueethai = 0x0e37; + t.saraueleftthai = 0xf887; + t.sarauethai = 0x0e36; + t.sarauthai = 0x0e38; + t.sarauuthai = 0x0e39; + t.sbopomofo = 0x3119; + t.scaron = 0x0161; + t.scarondotaccent = 0x1e67; + t.scedilla = 0x015f; + t.schwa = 0x0259; + t.schwacyrillic = 0x04d9; + t.schwadieresiscyrillic = 0x04db; + t.schwahook = 0x025a; + t.scircle = 0x24e2; + t.scircumflex = 0x015d; + t.scommaaccent = 0x0219; + t.sdotaccent = 0x1e61; + t.sdotbelow = 0x1e63; + t.sdotbelowdotaccent = 0x1e69; + t.seagullbelowcmb = 0x033c; + t.second = 0x2033; + t.secondtonechinese = 0x02ca; + t.section = 0x00a7; + t.seenarabic = 0x0633; + t.seenfinalarabic = 0xfeb2; + t.seeninitialarabic = 0xfeb3; + t.seenmedialarabic = 0xfeb4; + t.segol = 0x05b6; + t.segol13 = 0x05b6; + t.segol1f = 0x05b6; + t.segol2c = 0x05b6; + t.segolhebrew = 0x05b6; + t.segolnarrowhebrew = 0x05b6; + t.segolquarterhebrew = 0x05b6; + t.segoltahebrew = 0x0592; + t.segolwidehebrew = 0x05b6; + t.seharmenian = 0x057d; + t.sehiragana = 0x305b; + t.sekatakana = 0x30bb; + t.sekatakanahalfwidth = 0xff7e; + t.semicolon = 0x003b; + t.semicolonarabic = 0x061b; + t.semicolonmonospace = 0xff1b; + t.semicolonsmall = 0xfe54; + t.semivoicedmarkkana = 0x309c; + t.semivoicedmarkkanahalfwidth = 0xff9f; + t.sentisquare = 0x3322; + t.sentosquare = 0x3323; + t.seven = 0x0037; + t.sevenarabic = 0x0667; + t.sevenbengali = 0x09ed; + t.sevencircle = 0x2466; + t.sevencircleinversesansserif = 0x2790; + t.sevendeva = 0x096d; + t.seveneighths = 0x215e; + t.sevengujarati = 0x0aed; + t.sevengurmukhi = 0x0a6d; + t.sevenhackarabic = 0x0667; + t.sevenhangzhou = 0x3027; + t.sevenideographicparen = 0x3226; + t.seveninferior = 0x2087; + t.sevenmonospace = 0xff17; + t.sevenoldstyle = 0xf737; + t.sevenparen = 0x247a; + t.sevenperiod = 0x248e; + t.sevenpersian = 0x06f7; + t.sevenroman = 0x2176; + t.sevensuperior = 0x2077; + t.seventeencircle = 0x2470; + t.seventeenparen = 0x2484; + t.seventeenperiod = 0x2498; + t.seventhai = 0x0e57; + t.sfthyphen = 0x00ad; + t.shaarmenian = 0x0577; + t.shabengali = 0x09b6; + t.shacyrillic = 0x0448; + t.shaddaarabic = 0x0651; + t.shaddadammaarabic = 0xfc61; + t.shaddadammatanarabic = 0xfc5e; + t.shaddafathaarabic = 0xfc60; + t.shaddakasraarabic = 0xfc62; + t.shaddakasratanarabic = 0xfc5f; + t.shade = 0x2592; + t.shadedark = 0x2593; + t.shadelight = 0x2591; + t.shademedium = 0x2592; + t.shadeva = 0x0936; + t.shagujarati = 0x0ab6; + t.shagurmukhi = 0x0a36; + t.shalshelethebrew = 0x0593; + t.shbopomofo = 0x3115; + t.shchacyrillic = 0x0449; + t.sheenarabic = 0x0634; + t.sheenfinalarabic = 0xfeb6; + t.sheeninitialarabic = 0xfeb7; + t.sheenmedialarabic = 0xfeb8; + t.sheicoptic = 0x03e3; + t.sheqel = 0x20aa; + t.sheqelhebrew = 0x20aa; + t.sheva = 0x05b0; + t.sheva115 = 0x05b0; + t.sheva15 = 0x05b0; + t.sheva22 = 0x05b0; + t.sheva2e = 0x05b0; + t.shevahebrew = 0x05b0; + t.shevanarrowhebrew = 0x05b0; + t.shevaquarterhebrew = 0x05b0; + t.shevawidehebrew = 0x05b0; + t.shhacyrillic = 0x04bb; + t.shimacoptic = 0x03ed; + t.shin = 0x05e9; + t.shindagesh = 0xfb49; + t.shindageshhebrew = 0xfb49; + t.shindageshshindot = 0xfb2c; + t.shindageshshindothebrew = 0xfb2c; + t.shindageshsindot = 0xfb2d; + t.shindageshsindothebrew = 0xfb2d; + t.shindothebrew = 0x05c1; + t.shinhebrew = 0x05e9; + t.shinshindot = 0xfb2a; + t.shinshindothebrew = 0xfb2a; + t.shinsindot = 0xfb2b; + t.shinsindothebrew = 0xfb2b; + t.shook = 0x0282; + t.sigma = 0x03c3; + t.sigma1 = 0x03c2; + t.sigmafinal = 0x03c2; + t.sigmalunatesymbolgreek = 0x03f2; + t.sihiragana = 0x3057; + t.sikatakana = 0x30b7; + t.sikatakanahalfwidth = 0xff7c; + t.siluqhebrew = 0x05bd; + t.siluqlefthebrew = 0x05bd; + t.similar = 0x223c; + t.sindothebrew = 0x05c2; + t.siosacirclekorean = 0x3274; + t.siosaparenkorean = 0x3214; + t.sioscieuckorean = 0x317e; + t.sioscirclekorean = 0x3266; + t.sioskiyeokkorean = 0x317a; + t.sioskorean = 0x3145; + t.siosnieunkorean = 0x317b; + t.siosparenkorean = 0x3206; + t.siospieupkorean = 0x317d; + t.siostikeutkorean = 0x317c; + t.six = 0x0036; + t.sixarabic = 0x0666; + t.sixbengali = 0x09ec; + t.sixcircle = 0x2465; + t.sixcircleinversesansserif = 0x278f; + t.sixdeva = 0x096c; + t.sixgujarati = 0x0aec; + t.sixgurmukhi = 0x0a6c; + t.sixhackarabic = 0x0666; + t.sixhangzhou = 0x3026; + t.sixideographicparen = 0x3225; + t.sixinferior = 0x2086; + t.sixmonospace = 0xff16; + t.sixoldstyle = 0xf736; + t.sixparen = 0x2479; + t.sixperiod = 0x248d; + t.sixpersian = 0x06f6; + t.sixroman = 0x2175; + t.sixsuperior = 0x2076; + t.sixteencircle = 0x246f; + t.sixteencurrencydenominatorbengali = 0x09f9; + t.sixteenparen = 0x2483; + t.sixteenperiod = 0x2497; + t.sixthai = 0x0e56; + t.slash = 0x002f; + t.slashmonospace = 0xff0f; + t.slong = 0x017f; + t.slongdotaccent = 0x1e9b; + t.smileface = 0x263a; + t.smonospace = 0xff53; + t.sofpasuqhebrew = 0x05c3; + t.softhyphen = 0x00ad; + t.softsigncyrillic = 0x044c; + t.sohiragana = 0x305d; + t.sokatakana = 0x30bd; + t.sokatakanahalfwidth = 0xff7f; + t.soliduslongoverlaycmb = 0x0338; + t.solidusshortoverlaycmb = 0x0337; + t.sorusithai = 0x0e29; + t.sosalathai = 0x0e28; + t.sosothai = 0x0e0b; + t.sosuathai = 0x0e2a; + t.space = 0x0020; + t.spacehackarabic = 0x0020; + t.spade = 0x2660; + t.spadesuitblack = 0x2660; + t.spadesuitwhite = 0x2664; + t.sparen = 0x24ae; + t.squarebelowcmb = 0x033b; + t.squarecc = 0x33c4; + t.squarecm = 0x339d; + t.squarediagonalcrosshatchfill = 0x25a9; + t.squarehorizontalfill = 0x25a4; + t.squarekg = 0x338f; + t.squarekm = 0x339e; + t.squarekmcapital = 0x33ce; + t.squareln = 0x33d1; + t.squarelog = 0x33d2; + t.squaremg = 0x338e; + t.squaremil = 0x33d5; + t.squaremm = 0x339c; + t.squaremsquared = 0x33a1; + t.squareorthogonalcrosshatchfill = 0x25a6; + t.squareupperlefttolowerrightfill = 0x25a7; + t.squareupperrighttolowerleftfill = 0x25a8; + t.squareverticalfill = 0x25a5; + t.squarewhitewithsmallblack = 0x25a3; + t.srsquare = 0x33db; + t.ssabengali = 0x09b7; + t.ssadeva = 0x0937; + t.ssagujarati = 0x0ab7; + t.ssangcieuckorean = 0x3149; + t.ssanghieuhkorean = 0x3185; + t.ssangieungkorean = 0x3180; + t.ssangkiyeokkorean = 0x3132; + t.ssangnieunkorean = 0x3165; + t.ssangpieupkorean = 0x3143; + t.ssangsioskorean = 0x3146; + t.ssangtikeutkorean = 0x3138; + t.ssuperior = 0xf6f2; + t.sterling = 0x00a3; + t.sterlingmonospace = 0xffe1; + t.strokelongoverlaycmb = 0x0336; + t.strokeshortoverlaycmb = 0x0335; + t.subset = 0x2282; + t.subsetnotequal = 0x228a; + t.subsetorequal = 0x2286; + t.succeeds = 0x227b; + t.suchthat = 0x220b; + t.suhiragana = 0x3059; + t.sukatakana = 0x30b9; + t.sukatakanahalfwidth = 0xff7d; + t.sukunarabic = 0x0652; + t.summation = 0x2211; + t.sun = 0x263c; + t.superset = 0x2283; + t.supersetnotequal = 0x228b; + t.supersetorequal = 0x2287; + t.svsquare = 0x33dc; + t.syouwaerasquare = 0x337c; + t.t = 0x0074; + t.tabengali = 0x09a4; + t.tackdown = 0x22a4; + t.tackleft = 0x22a3; + t.tadeva = 0x0924; + t.tagujarati = 0x0aa4; + t.tagurmukhi = 0x0a24; + t.taharabic = 0x0637; + t.tahfinalarabic = 0xfec2; + t.tahinitialarabic = 0xfec3; + t.tahiragana = 0x305f; + t.tahmedialarabic = 0xfec4; + t.taisyouerasquare = 0x337d; + t.takatakana = 0x30bf; + t.takatakanahalfwidth = 0xff80; + t.tatweelarabic = 0x0640; + t.tau = 0x03c4; + t.tav = 0x05ea; + t.tavdages = 0xfb4a; + t.tavdagesh = 0xfb4a; + t.tavdageshhebrew = 0xfb4a; + t.tavhebrew = 0x05ea; + t.tbar = 0x0167; + t.tbopomofo = 0x310a; + t.tcaron = 0x0165; + t.tccurl = 0x02a8; + t.tcedilla = 0x0163; + t.tcheharabic = 0x0686; + t.tchehfinalarabic = 0xfb7b; + t.tchehinitialarabic = 0xfb7c; + t.tchehmedialarabic = 0xfb7d; + t.tcircle = 0x24e3; + t.tcircumflexbelow = 0x1e71; + t.tcommaaccent = 0x0163; + t.tdieresis = 0x1e97; + t.tdotaccent = 0x1e6b; + t.tdotbelow = 0x1e6d; + t.tecyrillic = 0x0442; + t.tedescendercyrillic = 0x04ad; + t.teharabic = 0x062a; + t.tehfinalarabic = 0xfe96; + t.tehhahinitialarabic = 0xfca2; + t.tehhahisolatedarabic = 0xfc0c; + t.tehinitialarabic = 0xfe97; + t.tehiragana = 0x3066; + t.tehjeeminitialarabic = 0xfca1; + t.tehjeemisolatedarabic = 0xfc0b; + t.tehmarbutaarabic = 0x0629; + t.tehmarbutafinalarabic = 0xfe94; + t.tehmedialarabic = 0xfe98; + t.tehmeeminitialarabic = 0xfca4; + t.tehmeemisolatedarabic = 0xfc0e; + t.tehnoonfinalarabic = 0xfc73; + t.tekatakana = 0x30c6; + t.tekatakanahalfwidth = 0xff83; + t.telephone = 0x2121; + t.telephoneblack = 0x260e; + t.telishagedolahebrew = 0x05a0; + t.telishaqetanahebrew = 0x05a9; + t.tencircle = 0x2469; + t.tenideographicparen = 0x3229; + t.tenparen = 0x247d; + t.tenperiod = 0x2491; + t.tenroman = 0x2179; + t.tesh = 0x02a7; + t.tet = 0x05d8; + t.tetdagesh = 0xfb38; + t.tetdageshhebrew = 0xfb38; + t.tethebrew = 0x05d8; + t.tetsecyrillic = 0x04b5; + t.tevirhebrew = 0x059b; + t.tevirlefthebrew = 0x059b; + t.thabengali = 0x09a5; + t.thadeva = 0x0925; + t.thagujarati = 0x0aa5; + t.thagurmukhi = 0x0a25; + t.thalarabic = 0x0630; + t.thalfinalarabic = 0xfeac; + t.thanthakhatlowleftthai = 0xf898; + t.thanthakhatlowrightthai = 0xf897; + t.thanthakhatthai = 0x0e4c; + t.thanthakhatupperleftthai = 0xf896; + t.theharabic = 0x062b; + t.thehfinalarabic = 0xfe9a; + t.thehinitialarabic = 0xfe9b; + t.thehmedialarabic = 0xfe9c; + t.thereexists = 0x2203; + t.therefore = 0x2234; + t.theta = 0x03b8; + t.theta1 = 0x03d1; + t.thetasymbolgreek = 0x03d1; + t.thieuthacirclekorean = 0x3279; + t.thieuthaparenkorean = 0x3219; + t.thieuthcirclekorean = 0x326b; + t.thieuthkorean = 0x314c; + t.thieuthparenkorean = 0x320b; + t.thirteencircle = 0x246c; + t.thirteenparen = 0x2480; + t.thirteenperiod = 0x2494; + t.thonangmonthothai = 0x0e11; + t.thook = 0x01ad; + t.thophuthaothai = 0x0e12; + t.thorn = 0x00fe; + t.thothahanthai = 0x0e17; + t.thothanthai = 0x0e10; + t.thothongthai = 0x0e18; + t.thothungthai = 0x0e16; + t.thousandcyrillic = 0x0482; + t.thousandsseparatorarabic = 0x066c; + t.thousandsseparatorpersian = 0x066c; + t.three = 0x0033; + t.threearabic = 0x0663; + t.threebengali = 0x09e9; + t.threecircle = 0x2462; + t.threecircleinversesansserif = 0x278c; + t.threedeva = 0x0969; + t.threeeighths = 0x215c; + t.threegujarati = 0x0ae9; + t.threegurmukhi = 0x0a69; + t.threehackarabic = 0x0663; + t.threehangzhou = 0x3023; + t.threeideographicparen = 0x3222; + t.threeinferior = 0x2083; + t.threemonospace = 0xff13; + t.threenumeratorbengali = 0x09f6; + t.threeoldstyle = 0xf733; + t.threeparen = 0x2476; + t.threeperiod = 0x248a; + t.threepersian = 0x06f3; + t.threequarters = 0x00be; + t.threequartersemdash = 0xf6de; + t.threeroman = 0x2172; + t.threesuperior = 0x00b3; + t.threethai = 0x0e53; + t.thzsquare = 0x3394; + t.tihiragana = 0x3061; + t.tikatakana = 0x30c1; + t.tikatakanahalfwidth = 0xff81; + t.tikeutacirclekorean = 0x3270; + t.tikeutaparenkorean = 0x3210; + t.tikeutcirclekorean = 0x3262; + t.tikeutkorean = 0x3137; + t.tikeutparenkorean = 0x3202; + t.tilde = 0x02dc; + t.tildebelowcmb = 0x0330; + t.tildecmb = 0x0303; + t.tildecomb = 0x0303; + t.tildedoublecmb = 0x0360; + t.tildeoperator = 0x223c; + t.tildeoverlaycmb = 0x0334; + t.tildeverticalcmb = 0x033e; + t.timescircle = 0x2297; + t.tipehahebrew = 0x0596; + t.tipehalefthebrew = 0x0596; + t.tippigurmukhi = 0x0a70; + t.titlocyrilliccmb = 0x0483; + t.tiwnarmenian = 0x057f; + t.tlinebelow = 0x1e6f; + t.tmonospace = 0xff54; + t.toarmenian = 0x0569; + t.tohiragana = 0x3068; + t.tokatakana = 0x30c8; + t.tokatakanahalfwidth = 0xff84; + t.tonebarextrahighmod = 0x02e5; + t.tonebarextralowmod = 0x02e9; + t.tonebarhighmod = 0x02e6; + t.tonebarlowmod = 0x02e8; + t.tonebarmidmod = 0x02e7; + t.tonefive = 0x01bd; + t.tonesix = 0x0185; + t.tonetwo = 0x01a8; + t.tonos = 0x0384; + t.tonsquare = 0x3327; + t.topatakthai = 0x0e0f; + t.tortoiseshellbracketleft = 0x3014; + t.tortoiseshellbracketleftsmall = 0xfe5d; + t.tortoiseshellbracketleftvertical = 0xfe39; + t.tortoiseshellbracketright = 0x3015; + t.tortoiseshellbracketrightsmall = 0xfe5e; + t.tortoiseshellbracketrightvertical = 0xfe3a; + t.totaothai = 0x0e15; + t.tpalatalhook = 0x01ab; + t.tparen = 0x24af; + t.trademark = 0x2122; + t.trademarksans = 0xf8ea; + t.trademarkserif = 0xf6db; + t.tretroflexhook = 0x0288; + t.triagdn = 0x25bc; + t.triaglf = 0x25c4; + t.triagrt = 0x25ba; + t.triagup = 0x25b2; + t.ts = 0x02a6; + t.tsadi = 0x05e6; + t.tsadidagesh = 0xfb46; + t.tsadidageshhebrew = 0xfb46; + t.tsadihebrew = 0x05e6; + t.tsecyrillic = 0x0446; + t.tsere = 0x05b5; + t.tsere12 = 0x05b5; + t.tsere1e = 0x05b5; + t.tsere2b = 0x05b5; + t.tserehebrew = 0x05b5; + t.tserenarrowhebrew = 0x05b5; + t.tserequarterhebrew = 0x05b5; + t.tserewidehebrew = 0x05b5; + t.tshecyrillic = 0x045b; + t.tsuperior = 0xf6f3; + t.ttabengali = 0x099f; + t.ttadeva = 0x091f; + t.ttagujarati = 0x0a9f; + t.ttagurmukhi = 0x0a1f; + t.tteharabic = 0x0679; + t.ttehfinalarabic = 0xfb67; + t.ttehinitialarabic = 0xfb68; + t.ttehmedialarabic = 0xfb69; + t.tthabengali = 0x09a0; + t.tthadeva = 0x0920; + t.tthagujarati = 0x0aa0; + t.tthagurmukhi = 0x0a20; + t.tturned = 0x0287; + t.tuhiragana = 0x3064; + t.tukatakana = 0x30c4; + t.tukatakanahalfwidth = 0xff82; + t.tusmallhiragana = 0x3063; + t.tusmallkatakana = 0x30c3; + t.tusmallkatakanahalfwidth = 0xff6f; + t.twelvecircle = 0x246b; + t.twelveparen = 0x247f; + t.twelveperiod = 0x2493; + t.twelveroman = 0x217b; + t.twentycircle = 0x2473; + t.twentyhangzhou = 0x5344; + t.twentyparen = 0x2487; + t.twentyperiod = 0x249b; + t.two = 0x0032; + t.twoarabic = 0x0662; + t.twobengali = 0x09e8; + t.twocircle = 0x2461; + t.twocircleinversesansserif = 0x278b; + t.twodeva = 0x0968; + t.twodotenleader = 0x2025; + t.twodotleader = 0x2025; + t.twodotleadervertical = 0xfe30; + t.twogujarati = 0x0ae8; + t.twogurmukhi = 0x0a68; + t.twohackarabic = 0x0662; + t.twohangzhou = 0x3022; + t.twoideographicparen = 0x3221; + t.twoinferior = 0x2082; + t.twomonospace = 0xff12; + t.twonumeratorbengali = 0x09f5; + t.twooldstyle = 0xf732; + t.twoparen = 0x2475; + t.twoperiod = 0x2489; + t.twopersian = 0x06f2; + t.tworoman = 0x2171; + t.twostroke = 0x01bb; + t.twosuperior = 0x00b2; + t.twothai = 0x0e52; + t.twothirds = 0x2154; + t.u = 0x0075; + t.uacute = 0x00fa; + t.ubar = 0x0289; + t.ubengali = 0x0989; + t.ubopomofo = 0x3128; + t.ubreve = 0x016d; + t.ucaron = 0x01d4; + t.ucircle = 0x24e4; + t.ucircumflex = 0x00fb; + t.ucircumflexbelow = 0x1e77; + t.ucyrillic = 0x0443; + t.udattadeva = 0x0951; + t.udblacute = 0x0171; + t.udblgrave = 0x0215; + t.udeva = 0x0909; + t.udieresis = 0x00fc; + t.udieresisacute = 0x01d8; + t.udieresisbelow = 0x1e73; + t.udieresiscaron = 0x01da; + t.udieresiscyrillic = 0x04f1; + t.udieresisgrave = 0x01dc; + t.udieresismacron = 0x01d6; + t.udotbelow = 0x1ee5; + t.ugrave = 0x00f9; + t.ugujarati = 0x0a89; + t.ugurmukhi = 0x0a09; + t.uhiragana = 0x3046; + t.uhookabove = 0x1ee7; + t.uhorn = 0x01b0; + t.uhornacute = 0x1ee9; + t.uhorndotbelow = 0x1ef1; + t.uhorngrave = 0x1eeb; + t.uhornhookabove = 0x1eed; + t.uhorntilde = 0x1eef; + t.uhungarumlaut = 0x0171; + t.uhungarumlautcyrillic = 0x04f3; + t.uinvertedbreve = 0x0217; + t.ukatakana = 0x30a6; + t.ukatakanahalfwidth = 0xff73; + t.ukcyrillic = 0x0479; + t.ukorean = 0x315c; + t.umacron = 0x016b; + t.umacroncyrillic = 0x04ef; + t.umacrondieresis = 0x1e7b; + t.umatragurmukhi = 0x0a41; + t.umonospace = 0xff55; + t.underscore = 0x005f; + t.underscoredbl = 0x2017; + t.underscoremonospace = 0xff3f; + t.underscorevertical = 0xfe33; + t.underscorewavy = 0xfe4f; + t.union = 0x222a; + t.universal = 0x2200; + t.uogonek = 0x0173; + t.uparen = 0x24b0; + t.upblock = 0x2580; + t.upperdothebrew = 0x05c4; + t.upsilon = 0x03c5; + t.upsilondieresis = 0x03cb; + t.upsilondieresistonos = 0x03b0; + t.upsilonlatin = 0x028a; + t.upsilontonos = 0x03cd; + t.uptackbelowcmb = 0x031d; + t.uptackmod = 0x02d4; + t.uragurmukhi = 0x0a73; + t.uring = 0x016f; + t.ushortcyrillic = 0x045e; + t.usmallhiragana = 0x3045; + t.usmallkatakana = 0x30a5; + t.usmallkatakanahalfwidth = 0xff69; + t.ustraightcyrillic = 0x04af; + t.ustraightstrokecyrillic = 0x04b1; + t.utilde = 0x0169; + t.utildeacute = 0x1e79; + t.utildebelow = 0x1e75; + t.uubengali = 0x098a; + t.uudeva = 0x090a; + t.uugujarati = 0x0a8a; + t.uugurmukhi = 0x0a0a; + t.uumatragurmukhi = 0x0a42; + t.uuvowelsignbengali = 0x09c2; + t.uuvowelsigndeva = 0x0942; + t.uuvowelsigngujarati = 0x0ac2; + t.uvowelsignbengali = 0x09c1; + t.uvowelsigndeva = 0x0941; + t.uvowelsigngujarati = 0x0ac1; + t.v = 0x0076; + t.vadeva = 0x0935; + t.vagujarati = 0x0ab5; + t.vagurmukhi = 0x0a35; + t.vakatakana = 0x30f7; + t.vav = 0x05d5; + t.vavdagesh = 0xfb35; + t.vavdagesh65 = 0xfb35; + t.vavdageshhebrew = 0xfb35; + t.vavhebrew = 0x05d5; + t.vavholam = 0xfb4b; + t.vavholamhebrew = 0xfb4b; + t.vavvavhebrew = 0x05f0; + t.vavyodhebrew = 0x05f1; + t.vcircle = 0x24e5; + t.vdotbelow = 0x1e7f; + t.vecyrillic = 0x0432; + t.veharabic = 0x06a4; + t.vehfinalarabic = 0xfb6b; + t.vehinitialarabic = 0xfb6c; + t.vehmedialarabic = 0xfb6d; + t.vekatakana = 0x30f9; + t.venus = 0x2640; + t.verticalbar = 0x007c; + t.verticallineabovecmb = 0x030d; + t.verticallinebelowcmb = 0x0329; + t.verticallinelowmod = 0x02cc; + t.verticallinemod = 0x02c8; + t.vewarmenian = 0x057e; + t.vhook = 0x028b; + t.vikatakana = 0x30f8; + t.viramabengali = 0x09cd; + t.viramadeva = 0x094d; + t.viramagujarati = 0x0acd; + t.visargabengali = 0x0983; + t.visargadeva = 0x0903; + t.visargagujarati = 0x0a83; + t.vmonospace = 0xff56; + t.voarmenian = 0x0578; + t.voicediterationhiragana = 0x309e; + t.voicediterationkatakana = 0x30fe; + t.voicedmarkkana = 0x309b; + t.voicedmarkkanahalfwidth = 0xff9e; + t.vokatakana = 0x30fa; + t.vparen = 0x24b1; + t.vtilde = 0x1e7d; + t.vturned = 0x028c; + t.vuhiragana = 0x3094; + t.vukatakana = 0x30f4; + t.w = 0x0077; + t.wacute = 0x1e83; + t.waekorean = 0x3159; + t.wahiragana = 0x308f; + t.wakatakana = 0x30ef; + t.wakatakanahalfwidth = 0xff9c; + t.wakorean = 0x3158; + t.wasmallhiragana = 0x308e; + t.wasmallkatakana = 0x30ee; + t.wattosquare = 0x3357; + t.wavedash = 0x301c; + t.wavyunderscorevertical = 0xfe34; + t.wawarabic = 0x0648; + t.wawfinalarabic = 0xfeee; + t.wawhamzaabovearabic = 0x0624; + t.wawhamzaabovefinalarabic = 0xfe86; + t.wbsquare = 0x33dd; + t.wcircle = 0x24e6; + t.wcircumflex = 0x0175; + t.wdieresis = 0x1e85; + t.wdotaccent = 0x1e87; + t.wdotbelow = 0x1e89; + t.wehiragana = 0x3091; + t.weierstrass = 0x2118; + t.wekatakana = 0x30f1; + t.wekorean = 0x315e; + t.weokorean = 0x315d; + t.wgrave = 0x1e81; + t.whitebullet = 0x25e6; + t.whitecircle = 0x25cb; + t.whitecircleinverse = 0x25d9; + t.whitecornerbracketleft = 0x300e; + t.whitecornerbracketleftvertical = 0xfe43; + t.whitecornerbracketright = 0x300f; + t.whitecornerbracketrightvertical = 0xfe44; + t.whitediamond = 0x25c7; + t.whitediamondcontainingblacksmalldiamond = 0x25c8; + t.whitedownpointingsmalltriangle = 0x25bf; + t.whitedownpointingtriangle = 0x25bd; + t.whiteleftpointingsmalltriangle = 0x25c3; + t.whiteleftpointingtriangle = 0x25c1; + t.whitelenticularbracketleft = 0x3016; + t.whitelenticularbracketright = 0x3017; + t.whiterightpointingsmalltriangle = 0x25b9; + t.whiterightpointingtriangle = 0x25b7; + t.whitesmallsquare = 0x25ab; + t.whitesmilingface = 0x263a; + t.whitesquare = 0x25a1; + t.whitestar = 0x2606; + t.whitetelephone = 0x260f; + t.whitetortoiseshellbracketleft = 0x3018; + t.whitetortoiseshellbracketright = 0x3019; + t.whiteuppointingsmalltriangle = 0x25b5; + t.whiteuppointingtriangle = 0x25b3; + t.wihiragana = 0x3090; + t.wikatakana = 0x30f0; + t.wikorean = 0x315f; + t.wmonospace = 0xff57; + t.wohiragana = 0x3092; + t.wokatakana = 0x30f2; + t.wokatakanahalfwidth = 0xff66; + t.won = 0x20a9; + t.wonmonospace = 0xffe6; + t.wowaenthai = 0x0e27; + t.wparen = 0x24b2; + t.wring = 0x1e98; + t.wsuperior = 0x02b7; + t.wturned = 0x028d; + t.wynn = 0x01bf; + t.x = 0x0078; + t.xabovecmb = 0x033d; + t.xbopomofo = 0x3112; + t.xcircle = 0x24e7; + t.xdieresis = 0x1e8d; + t.xdotaccent = 0x1e8b; + t.xeharmenian = 0x056d; + t.xi = 0x03be; + t.xmonospace = 0xff58; + t.xparen = 0x24b3; + t.xsuperior = 0x02e3; + t.y = 0x0079; + t.yaadosquare = 0x334e; + t.yabengali = 0x09af; + t.yacute = 0x00fd; + t.yadeva = 0x092f; + t.yaekorean = 0x3152; + t.yagujarati = 0x0aaf; + t.yagurmukhi = 0x0a2f; + t.yahiragana = 0x3084; + t.yakatakana = 0x30e4; + t.yakatakanahalfwidth = 0xff94; + t.yakorean = 0x3151; + t.yamakkanthai = 0x0e4e; + t.yasmallhiragana = 0x3083; + t.yasmallkatakana = 0x30e3; + t.yasmallkatakanahalfwidth = 0xff6c; + t.yatcyrillic = 0x0463; + t.ycircle = 0x24e8; + t.ycircumflex = 0x0177; + t.ydieresis = 0x00ff; + t.ydotaccent = 0x1e8f; + t.ydotbelow = 0x1ef5; + t.yeharabic = 0x064a; + t.yehbarreearabic = 0x06d2; + t.yehbarreefinalarabic = 0xfbaf; + t.yehfinalarabic = 0xfef2; + t.yehhamzaabovearabic = 0x0626; + t.yehhamzaabovefinalarabic = 0xfe8a; + t.yehhamzaaboveinitialarabic = 0xfe8b; + t.yehhamzaabovemedialarabic = 0xfe8c; + t.yehinitialarabic = 0xfef3; + t.yehmedialarabic = 0xfef4; + t.yehmeeminitialarabic = 0xfcdd; + t.yehmeemisolatedarabic = 0xfc58; + t.yehnoonfinalarabic = 0xfc94; + t.yehthreedotsbelowarabic = 0x06d1; + t.yekorean = 0x3156; + t.yen = 0x00a5; + t.yenmonospace = 0xffe5; + t.yeokorean = 0x3155; + t.yeorinhieuhkorean = 0x3186; + t.yerahbenyomohebrew = 0x05aa; + t.yerahbenyomolefthebrew = 0x05aa; + t.yericyrillic = 0x044b; + t.yerudieresiscyrillic = 0x04f9; + t.yesieungkorean = 0x3181; + t.yesieungpansioskorean = 0x3183; + t.yesieungsioskorean = 0x3182; + t.yetivhebrew = 0x059a; + t.ygrave = 0x1ef3; + t.yhook = 0x01b4; + t.yhookabove = 0x1ef7; + t.yiarmenian = 0x0575; + t.yicyrillic = 0x0457; + t.yikorean = 0x3162; + t.yinyang = 0x262f; + t.yiwnarmenian = 0x0582; + t.ymonospace = 0xff59; + t.yod = 0x05d9; + t.yoddagesh = 0xfb39; + t.yoddageshhebrew = 0xfb39; + t.yodhebrew = 0x05d9; + t.yodyodhebrew = 0x05f2; + t.yodyodpatahhebrew = 0xfb1f; + t.yohiragana = 0x3088; + t.yoikorean = 0x3189; + t.yokatakana = 0x30e8; + t.yokatakanahalfwidth = 0xff96; + t.yokorean = 0x315b; + t.yosmallhiragana = 0x3087; + t.yosmallkatakana = 0x30e7; + t.yosmallkatakanahalfwidth = 0xff6e; + t.yotgreek = 0x03f3; + t.yoyaekorean = 0x3188; + t.yoyakorean = 0x3187; + t.yoyakthai = 0x0e22; + t.yoyingthai = 0x0e0d; + t.yparen = 0x24b4; + t.ypogegrammeni = 0x037a; + t.ypogegrammenigreekcmb = 0x0345; + t.yr = 0x01a6; + t.yring = 0x1e99; + t.ysuperior = 0x02b8; + t.ytilde = 0x1ef9; + t.yturned = 0x028e; + t.yuhiragana = 0x3086; + t.yuikorean = 0x318c; + t.yukatakana = 0x30e6; + t.yukatakanahalfwidth = 0xff95; + t.yukorean = 0x3160; + t.yusbigcyrillic = 0x046b; + t.yusbigiotifiedcyrillic = 0x046d; + t.yuslittlecyrillic = 0x0467; + t.yuslittleiotifiedcyrillic = 0x0469; + t.yusmallhiragana = 0x3085; + t.yusmallkatakana = 0x30e5; + t.yusmallkatakanahalfwidth = 0xff6d; + t.yuyekorean = 0x318b; + t.yuyeokorean = 0x318a; + t.yyabengali = 0x09df; + t.yyadeva = 0x095f; + t.z = 0x007a; + t.zaarmenian = 0x0566; + t.zacute = 0x017a; + t.zadeva = 0x095b; + t.zagurmukhi = 0x0a5b; + t.zaharabic = 0x0638; + t.zahfinalarabic = 0xfec6; + t.zahinitialarabic = 0xfec7; + t.zahiragana = 0x3056; + t.zahmedialarabic = 0xfec8; + t.zainarabic = 0x0632; + t.zainfinalarabic = 0xfeb0; + t.zakatakana = 0x30b6; + t.zaqefgadolhebrew = 0x0595; + t.zaqefqatanhebrew = 0x0594; + t.zarqahebrew = 0x0598; + t.zayin = 0x05d6; + t.zayindagesh = 0xfb36; + t.zayindageshhebrew = 0xfb36; + t.zayinhebrew = 0x05d6; + t.zbopomofo = 0x3117; + t.zcaron = 0x017e; + t.zcircle = 0x24e9; + t.zcircumflex = 0x1e91; + t.zcurl = 0x0291; + t.zdot = 0x017c; + t.zdotaccent = 0x017c; + t.zdotbelow = 0x1e93; + t.zecyrillic = 0x0437; + t.zedescendercyrillic = 0x0499; + t.zedieresiscyrillic = 0x04df; + t.zehiragana = 0x305c; + t.zekatakana = 0x30bc; + t.zero = 0x0030; + t.zeroarabic = 0x0660; + t.zerobengali = 0x09e6; + t.zerodeva = 0x0966; + t.zerogujarati = 0x0ae6; + t.zerogurmukhi = 0x0a66; + t.zerohackarabic = 0x0660; + t.zeroinferior = 0x2080; + t.zeromonospace = 0xff10; + t.zerooldstyle = 0xf730; + t.zeropersian = 0x06f0; + t.zerosuperior = 0x2070; + t.zerothai = 0x0e50; + t.zerowidthjoiner = 0xfeff; + t.zerowidthnonjoiner = 0x200c; + t.zerowidthspace = 0x200b; + t.zeta = 0x03b6; + t.zhbopomofo = 0x3113; + t.zhearmenian = 0x056a; + t.zhebrevecyrillic = 0x04c2; + t.zhecyrillic = 0x0436; + t.zhedescendercyrillic = 0x0497; + t.zhedieresiscyrillic = 0x04dd; + t.zihiragana = 0x3058; + t.zikatakana = 0x30b8; + t.zinorhebrew = 0x05ae; + t.zlinebelow = 0x1e95; + t.zmonospace = 0xff5a; + t.zohiragana = 0x305e; + t.zokatakana = 0x30be; + t.zparen = 0x24b5; + t.zretroflexhook = 0x0290; + t.zstroke = 0x01b6; + t.zuhiragana = 0x305a; + t.zukatakana = 0x30ba; + t[".notdef"] = 0x0000; + t.angbracketleftbig = 0x2329; + t.angbracketleftBig = 0x2329; + t.angbracketleftbigg = 0x2329; + t.angbracketleftBigg = 0x2329; + t.angbracketrightBig = 0x232a; + t.angbracketrightbig = 0x232a; + t.angbracketrightBigg = 0x232a; + t.angbracketrightbigg = 0x232a; + t.arrowhookleft = 0x21aa; + t.arrowhookright = 0x21a9; + t.arrowlefttophalf = 0x21bc; + t.arrowleftbothalf = 0x21bd; + t.arrownortheast = 0x2197; + t.arrownorthwest = 0x2196; + t.arrowrighttophalf = 0x21c0; + t.arrowrightbothalf = 0x21c1; + t.arrowsoutheast = 0x2198; + t.arrowsouthwest = 0x2199; + t.backslashbig = 0x2216; + t.backslashBig = 0x2216; + t.backslashBigg = 0x2216; + t.backslashbigg = 0x2216; + t.bardbl = 0x2016; + t.bracehtipdownleft = 0xfe37; + t.bracehtipdownright = 0xfe37; + t.bracehtipupleft = 0xfe38; + t.bracehtipupright = 0xfe38; + t.braceleftBig = 0x007b; + t.braceleftbig = 0x007b; + t.braceleftbigg = 0x007b; + t.braceleftBigg = 0x007b; + t.bracerightBig = 0x007d; + t.bracerightbig = 0x007d; + t.bracerightbigg = 0x007d; + t.bracerightBigg = 0x007d; + t.bracketleftbig = 0x005b; + t.bracketleftBig = 0x005b; + t.bracketleftbigg = 0x005b; + t.bracketleftBigg = 0x005b; + t.bracketrightBig = 0x005d; + t.bracketrightbig = 0x005d; + t.bracketrightbigg = 0x005d; + t.bracketrightBigg = 0x005d; + t.ceilingleftbig = 0x2308; + t.ceilingleftBig = 0x2308; + t.ceilingleftBigg = 0x2308; + t.ceilingleftbigg = 0x2308; + t.ceilingrightbig = 0x2309; + t.ceilingrightBig = 0x2309; + t.ceilingrightbigg = 0x2309; + t.ceilingrightBigg = 0x2309; + t.circledotdisplay = 0x2299; + t.circledottext = 0x2299; + t.circlemultiplydisplay = 0x2297; + t.circlemultiplytext = 0x2297; + t.circleplusdisplay = 0x2295; + t.circleplustext = 0x2295; + t.contintegraldisplay = 0x222e; + t.contintegraltext = 0x222e; + t.coproductdisplay = 0x2210; + t.coproducttext = 0x2210; + t.floorleftBig = 0x230a; + t.floorleftbig = 0x230a; + t.floorleftbigg = 0x230a; + t.floorleftBigg = 0x230a; + t.floorrightbig = 0x230b; + t.floorrightBig = 0x230b; + t.floorrightBigg = 0x230b; + t.floorrightbigg = 0x230b; + t.hatwide = 0x0302; + t.hatwider = 0x0302; + t.hatwidest = 0x0302; + t.intercal = 0x1d40; + t.integraldisplay = 0x222b; + t.integraltext = 0x222b; + t.intersectiondisplay = 0x22c2; + t.intersectiontext = 0x22c2; + t.logicalanddisplay = 0x2227; + t.logicalandtext = 0x2227; + t.logicalordisplay = 0x2228; + t.logicalortext = 0x2228; + t.parenleftBig = 0x0028; + t.parenleftbig = 0x0028; + t.parenleftBigg = 0x0028; + t.parenleftbigg = 0x0028; + t.parenrightBig = 0x0029; + t.parenrightbig = 0x0029; + t.parenrightBigg = 0x0029; + t.parenrightbigg = 0x0029; + t.prime = 0x2032; + t.productdisplay = 0x220f; + t.producttext = 0x220f; + t.radicalbig = 0x221a; + t.radicalBig = 0x221a; + t.radicalBigg = 0x221a; + t.radicalbigg = 0x221a; + t.radicalbt = 0x221a; + t.radicaltp = 0x221a; + t.radicalvertex = 0x221a; + t.slashbig = 0x002f; + t.slashBig = 0x002f; + t.slashBigg = 0x002f; + t.slashbigg = 0x002f; + t.summationdisplay = 0x2211; + t.summationtext = 0x2211; + t.tildewide = 0x02dc; + t.tildewider = 0x02dc; + t.tildewidest = 0x02dc; + t.uniondisplay = 0x22c3; + t.unionmultidisplay = 0x228e; + t.unionmultitext = 0x228e; + t.unionsqdisplay = 0x2294; + t.unionsqtext = 0x2294; + t.uniontext = 0x22c3; + t.vextenddouble = 0x2225; + t.vextendsingle = 0x2223; +}); +var getDingbatsGlyphsUnicode = getLookupTableFactory(function (t) { + t.space = 0x0020; + t.a1 = 0x2701; + t.a2 = 0x2702; + t.a202 = 0x2703; + t.a3 = 0x2704; + t.a4 = 0x260e; + t.a5 = 0x2706; + t.a119 = 0x2707; + t.a118 = 0x2708; + t.a117 = 0x2709; + t.a11 = 0x261b; + t.a12 = 0x261e; + t.a13 = 0x270c; + t.a14 = 0x270d; + t.a15 = 0x270e; + t.a16 = 0x270f; + t.a105 = 0x2710; + t.a17 = 0x2711; + t.a18 = 0x2712; + t.a19 = 0x2713; + t.a20 = 0x2714; + t.a21 = 0x2715; + t.a22 = 0x2716; + t.a23 = 0x2717; + t.a24 = 0x2718; + t.a25 = 0x2719; + t.a26 = 0x271a; + t.a27 = 0x271b; + t.a28 = 0x271c; + t.a6 = 0x271d; + t.a7 = 0x271e; + t.a8 = 0x271f; + t.a9 = 0x2720; + t.a10 = 0x2721; + t.a29 = 0x2722; + t.a30 = 0x2723; + t.a31 = 0x2724; + t.a32 = 0x2725; + t.a33 = 0x2726; + t.a34 = 0x2727; + t.a35 = 0x2605; + t.a36 = 0x2729; + t.a37 = 0x272a; + t.a38 = 0x272b; + t.a39 = 0x272c; + t.a40 = 0x272d; + t.a41 = 0x272e; + t.a42 = 0x272f; + t.a43 = 0x2730; + t.a44 = 0x2731; + t.a45 = 0x2732; + t.a46 = 0x2733; + t.a47 = 0x2734; + t.a48 = 0x2735; + t.a49 = 0x2736; + t.a50 = 0x2737; + t.a51 = 0x2738; + t.a52 = 0x2739; + t.a53 = 0x273a; + t.a54 = 0x273b; + t.a55 = 0x273c; + t.a56 = 0x273d; + t.a57 = 0x273e; + t.a58 = 0x273f; + t.a59 = 0x2740; + t.a60 = 0x2741; + t.a61 = 0x2742; + t.a62 = 0x2743; + t.a63 = 0x2744; + t.a64 = 0x2745; + t.a65 = 0x2746; + t.a66 = 0x2747; + t.a67 = 0x2748; + t.a68 = 0x2749; + t.a69 = 0x274a; + t.a70 = 0x274b; + t.a71 = 0x25cf; + t.a72 = 0x274d; + t.a73 = 0x25a0; + t.a74 = 0x274f; + t.a203 = 0x2750; + t.a75 = 0x2751; + t.a204 = 0x2752; + t.a76 = 0x25b2; + t.a77 = 0x25bc; + t.a78 = 0x25c6; + t.a79 = 0x2756; + t.a81 = 0x25d7; + t.a82 = 0x2758; + t.a83 = 0x2759; + t.a84 = 0x275a; + t.a97 = 0x275b; + t.a98 = 0x275c; + t.a99 = 0x275d; + t.a100 = 0x275e; + t.a101 = 0x2761; + t.a102 = 0x2762; + t.a103 = 0x2763; + t.a104 = 0x2764; + t.a106 = 0x2765; + t.a107 = 0x2766; + t.a108 = 0x2767; + t.a112 = 0x2663; + t.a111 = 0x2666; + t.a110 = 0x2665; + t.a109 = 0x2660; + t.a120 = 0x2460; + t.a121 = 0x2461; + t.a122 = 0x2462; + t.a123 = 0x2463; + t.a124 = 0x2464; + t.a125 = 0x2465; + t.a126 = 0x2466; + t.a127 = 0x2467; + t.a128 = 0x2468; + t.a129 = 0x2469; + t.a130 = 0x2776; + t.a131 = 0x2777; + t.a132 = 0x2778; + t.a133 = 0x2779; + t.a134 = 0x277a; + t.a135 = 0x277b; + t.a136 = 0x277c; + t.a137 = 0x277d; + t.a138 = 0x277e; + t.a139 = 0x277f; + t.a140 = 0x2780; + t.a141 = 0x2781; + t.a142 = 0x2782; + t.a143 = 0x2783; + t.a144 = 0x2784; + t.a145 = 0x2785; + t.a146 = 0x2786; + t.a147 = 0x2787; + t.a148 = 0x2788; + t.a149 = 0x2789; + t.a150 = 0x278a; + t.a151 = 0x278b; + t.a152 = 0x278c; + t.a153 = 0x278d; + t.a154 = 0x278e; + t.a155 = 0x278f; + t.a156 = 0x2790; + t.a157 = 0x2791; + t.a158 = 0x2792; + t.a159 = 0x2793; + t.a160 = 0x2794; + t.a161 = 0x2192; + t.a163 = 0x2194; + t.a164 = 0x2195; + t.a196 = 0x2798; + t.a165 = 0x2799; + t.a192 = 0x279a; + t.a166 = 0x279b; + t.a167 = 0x279c; + t.a168 = 0x279d; + t.a169 = 0x279e; + t.a170 = 0x279f; + t.a171 = 0x27a0; + t.a172 = 0x27a1; + t.a173 = 0x27a2; + t.a162 = 0x27a3; + t.a174 = 0x27a4; + t.a175 = 0x27a5; + t.a176 = 0x27a6; + t.a177 = 0x27a7; + t.a178 = 0x27a8; + t.a179 = 0x27a9; + t.a193 = 0x27aa; + t.a180 = 0x27ab; + t.a199 = 0x27ac; + t.a181 = 0x27ad; + t.a200 = 0x27ae; + t.a182 = 0x27af; + t.a201 = 0x27b1; + t.a183 = 0x27b2; + t.a184 = 0x27b3; + t.a197 = 0x27b4; + t.a185 = 0x27b5; + t.a194 = 0x27b6; + t.a198 = 0x27b7; + t.a186 = 0x27b8; + t.a195 = 0x27b9; + t.a187 = 0x27ba; + t.a188 = 0x27bb; + t.a189 = 0x27bc; + t.a190 = 0x27bd; + t.a191 = 0x27be; + t.a89 = 0x2768; + t.a90 = 0x2769; + t.a93 = 0x276a; + t.a94 = 0x276b; + t.a91 = 0x276c; + t.a92 = 0x276d; + t.a205 = 0x276e; + t.a85 = 0x276f; + t.a206 = 0x2770; + t.a86 = 0x2771; + t.a87 = 0x2772; + t.a88 = 0x2773; + t.a95 = 0x2774; + t.a96 = 0x2775; + t[".notdef"] = 0x0000; +}); +exports.getGlyphsUnicode = getGlyphsUnicode; +exports.getDingbatsGlyphsUnicode = getDingbatsGlyphsUnicode; + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getSupplementalGlyphMapForCalibri = exports.getSupplementalGlyphMapForArialBlack = exports.getGlyphMapForStandardFonts = exports.getSymbolsFonts = exports.getSerifFonts = exports.getNonStdFontMap = exports.getStdFontMap = void 0; + +var _core_utils = __w_pdfjs_require__(8); + +const getStdFontMap = (0, _core_utils.getLookupTableFactory)(function (t) { + t.ArialNarrow = "Helvetica"; + t["ArialNarrow-Bold"] = "Helvetica-Bold"; + t["ArialNarrow-BoldItalic"] = "Helvetica-BoldOblique"; + t["ArialNarrow-Italic"] = "Helvetica-Oblique"; + t.ArialBlack = "Helvetica"; + t["ArialBlack-Bold"] = "Helvetica-Bold"; + t["ArialBlack-BoldItalic"] = "Helvetica-BoldOblique"; + t["ArialBlack-Italic"] = "Helvetica-Oblique"; + t["Arial-Black"] = "Helvetica"; + t["Arial-Black-Bold"] = "Helvetica-Bold"; + t["Arial-Black-BoldItalic"] = "Helvetica-BoldOblique"; + t["Arial-Black-Italic"] = "Helvetica-Oblique"; + t.Arial = "Helvetica"; + t["Arial-Bold"] = "Helvetica-Bold"; + t["Arial-BoldItalic"] = "Helvetica-BoldOblique"; + t["Arial-Italic"] = "Helvetica-Oblique"; + t["Arial-BoldItalicMT"] = "Helvetica-BoldOblique"; + t["Arial-BoldMT"] = "Helvetica-Bold"; + t["Arial-ItalicMT"] = "Helvetica-Oblique"; + t.ArialMT = "Helvetica"; + t["Courier-Bold"] = "Courier-Bold"; + t["Courier-BoldItalic"] = "Courier-BoldOblique"; + t["Courier-Italic"] = "Courier-Oblique"; + t.CourierNew = "Courier"; + t["CourierNew-Bold"] = "Courier-Bold"; + t["CourierNew-BoldItalic"] = "Courier-BoldOblique"; + t["CourierNew-Italic"] = "Courier-Oblique"; + t["CourierNewPS-BoldItalicMT"] = "Courier-BoldOblique"; + t["CourierNewPS-BoldMT"] = "Courier-Bold"; + t["CourierNewPS-ItalicMT"] = "Courier-Oblique"; + t.CourierNewPSMT = "Courier"; + t.Helvetica = "Helvetica"; + t["Helvetica-Bold"] = "Helvetica-Bold"; + t["Helvetica-BoldItalic"] = "Helvetica-BoldOblique"; + t["Helvetica-BoldOblique"] = "Helvetica-BoldOblique"; + t["Helvetica-Italic"] = "Helvetica-Oblique"; + t["Helvetica-Oblique"] = "Helvetica-Oblique"; + t["Symbol-Bold"] = "Symbol"; + t["Symbol-BoldItalic"] = "Symbol"; + t["Symbol-Italic"] = "Symbol"; + t.TimesNewRoman = "Times-Roman"; + t["TimesNewRoman-Bold"] = "Times-Bold"; + t["TimesNewRoman-BoldItalic"] = "Times-BoldItalic"; + t["TimesNewRoman-Italic"] = "Times-Italic"; + t.TimesNewRomanPS = "Times-Roman"; + t["TimesNewRomanPS-Bold"] = "Times-Bold"; + t["TimesNewRomanPS-BoldItalic"] = "Times-BoldItalic"; + t["TimesNewRomanPS-BoldItalicMT"] = "Times-BoldItalic"; + t["TimesNewRomanPS-BoldMT"] = "Times-Bold"; + t["TimesNewRomanPS-Italic"] = "Times-Italic"; + t["TimesNewRomanPS-ItalicMT"] = "Times-Italic"; + t.TimesNewRomanPSMT = "Times-Roman"; + t["TimesNewRomanPSMT-Bold"] = "Times-Bold"; + t["TimesNewRomanPSMT-BoldItalic"] = "Times-BoldItalic"; + t["TimesNewRomanPSMT-Italic"] = "Times-Italic"; +}); +exports.getStdFontMap = getStdFontMap; +const getNonStdFontMap = (0, _core_utils.getLookupTableFactory)(function (t) { + t.Calibri = "Helvetica"; + t["Calibri-Bold"] = "Helvetica-Bold"; + t["Calibri-BoldItalic"] = "Helvetica-BoldOblique"; + t["Calibri-Italic"] = "Helvetica-Oblique"; + t.CenturyGothic = "Helvetica"; + t["CenturyGothic-Bold"] = "Helvetica-Bold"; + t["CenturyGothic-BoldItalic"] = "Helvetica-BoldOblique"; + t["CenturyGothic-Italic"] = "Helvetica-Oblique"; + t.ComicSansMS = "Comic Sans MS"; + t["ComicSansMS-Bold"] = "Comic Sans MS-Bold"; + t["ComicSansMS-BoldItalic"] = "Comic Sans MS-BoldItalic"; + t["ComicSansMS-Italic"] = "Comic Sans MS-Italic"; + t.LucidaConsole = "Courier"; + t["LucidaConsole-Bold"] = "Courier-Bold"; + t["LucidaConsole-BoldItalic"] = "Courier-BoldOblique"; + t["LucidaConsole-Italic"] = "Courier-Oblique"; + t["LucidaSans-Demi"] = "Helvetica-Bold"; + t["MS-Gothic"] = "MS Gothic"; + t["MS-Gothic-Bold"] = "MS Gothic-Bold"; + t["MS-Gothic-BoldItalic"] = "MS Gothic-BoldItalic"; + t["MS-Gothic-Italic"] = "MS Gothic-Italic"; + t["MS-Mincho"] = "MS Mincho"; + t["MS-Mincho-Bold"] = "MS Mincho-Bold"; + t["MS-Mincho-BoldItalic"] = "MS Mincho-BoldItalic"; + t["MS-Mincho-Italic"] = "MS Mincho-Italic"; + t["MS-PGothic"] = "MS PGothic"; + t["MS-PGothic-Bold"] = "MS PGothic-Bold"; + t["MS-PGothic-BoldItalic"] = "MS PGothic-BoldItalic"; + t["MS-PGothic-Italic"] = "MS PGothic-Italic"; + t["MS-PMincho"] = "MS PMincho"; + t["MS-PMincho-Bold"] = "MS PMincho-Bold"; + t["MS-PMincho-BoldItalic"] = "MS PMincho-BoldItalic"; + t["MS-PMincho-Italic"] = "MS PMincho-Italic"; + t.NuptialScript = "Times-Italic"; + t.SegoeUISymbol = "Helvetica"; + t.Wingdings = "ZapfDingbats"; + t["Wingdings-Regular"] = "ZapfDingbats"; +}); +exports.getNonStdFontMap = getNonStdFontMap; +const getSerifFonts = (0, _core_utils.getLookupTableFactory)(function (t) { + t["Adobe Jenson"] = true; + t["Adobe Text"] = true; + t.Albertus = true; + t.Aldus = true; + t.Alexandria = true; + t.Algerian = true; + t["American Typewriter"] = true; + t.Antiqua = true; + t.Apex = true; + t.Arno = true; + t.Aster = true; + t.Aurora = true; + t.Baskerville = true; + t.Bell = true; + t.Bembo = true; + t["Bembo Schoolbook"] = true; + t.Benguiat = true; + t["Berkeley Old Style"] = true; + t["Bernhard Modern"] = true; + t["Berthold City"] = true; + t.Bodoni = true; + t["Bauer Bodoni"] = true; + t["Book Antiqua"] = true; + t.Bookman = true; + t["Bordeaux Roman"] = true; + t["Californian FB"] = true; + t.Calisto = true; + t.Calvert = true; + t.Capitals = true; + t.Cambria = true; + t.Cartier = true; + t.Caslon = true; + t.Catull = true; + t.Centaur = true; + t["Century Old Style"] = true; + t["Century Schoolbook"] = true; + t.Chaparral = true; + t["Charis SIL"] = true; + t.Cheltenham = true; + t["Cholla Slab"] = true; + t.Clarendon = true; + t.Clearface = true; + t.Cochin = true; + t.Colonna = true; + t["Computer Modern"] = true; + t["Concrete Roman"] = true; + t.Constantia = true; + t["Cooper Black"] = true; + t.Corona = true; + t.Ecotype = true; + t.Egyptienne = true; + t.Elephant = true; + t.Excelsior = true; + t.Fairfield = true; + t["FF Scala"] = true; + t.Folkard = true; + t.Footlight = true; + t.FreeSerif = true; + t["Friz Quadrata"] = true; + t.Garamond = true; + t.Gentium = true; + t.Georgia = true; + t.Gloucester = true; + t["Goudy Old Style"] = true; + t["Goudy Schoolbook"] = true; + t["Goudy Pro Font"] = true; + t.Granjon = true; + t["Guardian Egyptian"] = true; + t.Heather = true; + t.Hercules = true; + t["High Tower Text"] = true; + t.Hiroshige = true; + t["Hoefler Text"] = true; + t["Humana Serif"] = true; + t.Imprint = true; + t["Ionic No. 5"] = true; + t.Janson = true; + t.Joanna = true; + t.Korinna = true; + t.Lexicon = true; + t["Liberation Serif"] = true; + t["Linux Libertine"] = true; + t.Literaturnaya = true; + t.Lucida = true; + t["Lucida Bright"] = true; + t.Melior = true; + t.Memphis = true; + t.Miller = true; + t.Minion = true; + t.Modern = true; + t["Mona Lisa"] = true; + t["Mrs Eaves"] = true; + t["MS Serif"] = true; + t["Museo Slab"] = true; + t["New York"] = true; + t["Nimbus Roman"] = true; + t["NPS Rawlinson Roadway"] = true; + t.NuptialScript = true; + t.Palatino = true; + t.Perpetua = true; + t.Plantin = true; + t["Plantin Schoolbook"] = true; + t.Playbill = true; + t["Poor Richard"] = true; + t["Rawlinson Roadway"] = true; + t.Renault = true; + t.Requiem = true; + t.Rockwell = true; + t.Roman = true; + t["Rotis Serif"] = true; + t.Sabon = true; + t.Scala = true; + t.Seagull = true; + t.Sistina = true; + t.Souvenir = true; + t.STIX = true; + t["Stone Informal"] = true; + t["Stone Serif"] = true; + t.Sylfaen = true; + t.Times = true; + t.Trajan = true; + t["Trinité"] = true; + t["Trump Mediaeval"] = true; + t.Utopia = true; + t["Vale Type"] = true; + t["Bitstream Vera"] = true; + t["Vera Serif"] = true; + t.Versailles = true; + t.Wanted = true; + t.Weiss = true; + t["Wide Latin"] = true; + t.Windsor = true; + t.XITS = true; +}); +exports.getSerifFonts = getSerifFonts; +const getSymbolsFonts = (0, _core_utils.getLookupTableFactory)(function (t) { + t.Dingbats = true; + t.Symbol = true; + t.ZapfDingbats = true; +}); +exports.getSymbolsFonts = getSymbolsFonts; +const getGlyphMapForStandardFonts = (0, _core_utils.getLookupTableFactory)(function (t) { + t[2] = 10; + t[3] = 32; + t[4] = 33; + t[5] = 34; + t[6] = 35; + t[7] = 36; + t[8] = 37; + t[9] = 38; + t[10] = 39; + t[11] = 40; + t[12] = 41; + t[13] = 42; + t[14] = 43; + t[15] = 44; + t[16] = 45; + t[17] = 46; + t[18] = 47; + t[19] = 48; + t[20] = 49; + t[21] = 50; + t[22] = 51; + t[23] = 52; + t[24] = 53; + t[25] = 54; + t[26] = 55; + t[27] = 56; + t[28] = 57; + t[29] = 58; + t[30] = 894; + t[31] = 60; + t[32] = 61; + t[33] = 62; + t[34] = 63; + t[35] = 64; + t[36] = 65; + t[37] = 66; + t[38] = 67; + t[39] = 68; + t[40] = 69; + t[41] = 70; + t[42] = 71; + t[43] = 72; + t[44] = 73; + t[45] = 74; + t[46] = 75; + t[47] = 76; + t[48] = 77; + t[49] = 78; + t[50] = 79; + t[51] = 80; + t[52] = 81; + t[53] = 82; + t[54] = 83; + t[55] = 84; + t[56] = 85; + t[57] = 86; + t[58] = 87; + t[59] = 88; + t[60] = 89; + t[61] = 90; + t[62] = 91; + t[63] = 92; + t[64] = 93; + t[65] = 94; + t[66] = 95; + t[67] = 96; + t[68] = 97; + t[69] = 98; + t[70] = 99; + t[71] = 100; + t[72] = 101; + t[73] = 102; + t[74] = 103; + t[75] = 104; + t[76] = 105; + t[77] = 106; + t[78] = 107; + t[79] = 108; + t[80] = 109; + t[81] = 110; + t[82] = 111; + t[83] = 112; + t[84] = 113; + t[85] = 114; + t[86] = 115; + t[87] = 116; + t[88] = 117; + t[89] = 118; + t[90] = 119; + t[91] = 120; + t[92] = 121; + t[93] = 122; + t[94] = 123; + t[95] = 124; + t[96] = 125; + t[97] = 126; + t[98] = 196; + t[99] = 197; + t[100] = 199; + t[101] = 201; + t[102] = 209; + t[103] = 214; + t[104] = 220; + t[105] = 225; + t[106] = 224; + t[107] = 226; + t[108] = 228; + t[109] = 227; + t[110] = 229; + t[111] = 231; + t[112] = 233; + t[113] = 232; + t[114] = 234; + t[115] = 235; + t[116] = 237; + t[117] = 236; + t[118] = 238; + t[119] = 239; + t[120] = 241; + t[121] = 243; + t[122] = 242; + t[123] = 244; + t[124] = 246; + t[125] = 245; + t[126] = 250; + t[127] = 249; + t[128] = 251; + t[129] = 252; + t[130] = 8224; + t[131] = 176; + t[132] = 162; + t[133] = 163; + t[134] = 167; + t[135] = 8226; + t[136] = 182; + t[137] = 223; + t[138] = 174; + t[139] = 169; + t[140] = 8482; + t[141] = 180; + t[142] = 168; + t[143] = 8800; + t[144] = 198; + t[145] = 216; + t[146] = 8734; + t[147] = 177; + t[148] = 8804; + t[149] = 8805; + t[150] = 165; + t[151] = 181; + t[152] = 8706; + t[153] = 8721; + t[154] = 8719; + t[156] = 8747; + t[157] = 170; + t[158] = 186; + t[159] = 8486; + t[160] = 230; + t[161] = 248; + t[162] = 191; + t[163] = 161; + t[164] = 172; + t[165] = 8730; + t[166] = 402; + t[167] = 8776; + t[168] = 8710; + t[169] = 171; + t[170] = 187; + t[171] = 8230; + t[210] = 218; + t[223] = 711; + t[224] = 321; + t[225] = 322; + t[227] = 353; + t[229] = 382; + t[234] = 253; + t[252] = 263; + t[253] = 268; + t[254] = 269; + t[258] = 258; + t[260] = 260; + t[261] = 261; + t[265] = 280; + t[266] = 281; + t[268] = 283; + t[269] = 313; + t[275] = 323; + t[276] = 324; + t[278] = 328; + t[284] = 345; + t[285] = 346; + t[286] = 347; + t[292] = 367; + t[295] = 377; + t[296] = 378; + t[298] = 380; + t[305] = 963; + t[306] = 964; + t[307] = 966; + t[308] = 8215; + t[309] = 8252; + t[310] = 8319; + t[311] = 8359; + t[312] = 8592; + t[313] = 8593; + t[337] = 9552; + t[493] = 1039; + t[494] = 1040; + t[705] = 1524; + t[706] = 8362; + t[710] = 64288; + t[711] = 64298; + t[759] = 1617; + t[761] = 1776; + t[763] = 1778; + t[775] = 1652; + t[777] = 1764; + t[778] = 1780; + t[779] = 1781; + t[780] = 1782; + t[782] = 771; + t[783] = 64726; + t[786] = 8363; + t[788] = 8532; + t[790] = 768; + t[791] = 769; + t[792] = 768; + t[795] = 803; + t[797] = 64336; + t[798] = 64337; + t[799] = 64342; + t[800] = 64343; + t[801] = 64344; + t[802] = 64345; + t[803] = 64362; + t[804] = 64363; + t[805] = 64364; + t[2424] = 7821; + t[2425] = 7822; + t[2426] = 7823; + t[2427] = 7824; + t[2428] = 7825; + t[2429] = 7826; + t[2430] = 7827; + t[2433] = 7682; + t[2678] = 8045; + t[2679] = 8046; + t[2830] = 1552; + t[2838] = 686; + t[2840] = 751; + t[2842] = 753; + t[2843] = 754; + t[2844] = 755; + t[2846] = 757; + t[2856] = 767; + t[2857] = 848; + t[2858] = 849; + t[2862] = 853; + t[2863] = 854; + t[2864] = 855; + t[2865] = 861; + t[2866] = 862; + t[2906] = 7460; + t[2908] = 7462; + t[2909] = 7463; + t[2910] = 7464; + t[2912] = 7466; + t[2913] = 7467; + t[2914] = 7468; + t[2916] = 7470; + t[2917] = 7471; + t[2918] = 7472; + t[2920] = 7474; + t[2921] = 7475; + t[2922] = 7476; + t[2924] = 7478; + t[2925] = 7479; + t[2926] = 7480; + t[2928] = 7482; + t[2929] = 7483; + t[2930] = 7484; + t[2932] = 7486; + t[2933] = 7487; + t[2934] = 7488; + t[2936] = 7490; + t[2937] = 7491; + t[2938] = 7492; + t[2940] = 7494; + t[2941] = 7495; + t[2942] = 7496; + t[2944] = 7498; + t[2946] = 7500; + t[2948] = 7502; + t[2950] = 7504; + t[2951] = 7505; + t[2952] = 7506; + t[2954] = 7508; + t[2955] = 7509; + t[2956] = 7510; + t[2958] = 7512; + t[2959] = 7513; + t[2960] = 7514; + t[2962] = 7516; + t[2963] = 7517; + t[2964] = 7518; + t[2966] = 7520; + t[2967] = 7521; + t[2968] = 7522; + t[2970] = 7524; + t[2971] = 7525; + t[2972] = 7526; + t[2974] = 7528; + t[2975] = 7529; + t[2976] = 7530; + t[2978] = 1537; + t[2979] = 1538; + t[2980] = 1539; + t[2982] = 1549; + t[2983] = 1551; + t[2984] = 1552; + t[2986] = 1554; + t[2987] = 1555; + t[2988] = 1556; + t[2990] = 1623; + t[2991] = 1624; + t[2995] = 1775; + t[2999] = 1791; + t[3002] = 64290; + t[3003] = 64291; + t[3004] = 64292; + t[3006] = 64294; + t[3007] = 64295; + t[3008] = 64296; + t[3011] = 1900; + t[3014] = 8223; + t[3015] = 8244; + t[3017] = 7532; + t[3018] = 7533; + t[3019] = 7534; + t[3075] = 7590; + t[3076] = 7591; + t[3079] = 7594; + t[3080] = 7595; + t[3083] = 7598; + t[3084] = 7599; + t[3087] = 7602; + t[3088] = 7603; + t[3091] = 7606; + t[3092] = 7607; + t[3095] = 7610; + t[3096] = 7611; + t[3099] = 7614; + t[3100] = 7615; + t[3103] = 7618; + t[3104] = 7619; + t[3107] = 8337; + t[3108] = 8338; + t[3116] = 1884; + t[3119] = 1885; + t[3120] = 1885; + t[3123] = 1886; + t[3124] = 1886; + t[3127] = 1887; + t[3128] = 1887; + t[3131] = 1888; + t[3132] = 1888; + t[3135] = 1889; + t[3136] = 1889; + t[3139] = 1890; + t[3140] = 1890; + t[3143] = 1891; + t[3144] = 1891; + t[3147] = 1892; + t[3148] = 1892; + t[3153] = 580; + t[3154] = 581; + t[3157] = 584; + t[3158] = 585; + t[3161] = 588; + t[3162] = 589; + t[3165] = 891; + t[3166] = 892; + t[3169] = 1274; + t[3170] = 1275; + t[3173] = 1278; + t[3174] = 1279; + t[3181] = 7622; + t[3182] = 7623; + t[3282] = 11799; + t[3316] = 578; + t[3379] = 42785; + t[3393] = 1159; + t[3416] = 8377; +}); +exports.getGlyphMapForStandardFonts = getGlyphMapForStandardFonts; +const getSupplementalGlyphMapForArialBlack = (0, _core_utils.getLookupTableFactory)(function (t) { + t[227] = 322; + t[264] = 261; + t[291] = 346; +}); +exports.getSupplementalGlyphMapForArialBlack = getSupplementalGlyphMapForArialBlack; +const getSupplementalGlyphMapForCalibri = (0, _core_utils.getLookupTableFactory)(function (t) { + t[1] = 32; + t[4] = 65; + t[17] = 66; + t[18] = 67; + t[24] = 68; + t[28] = 69; + t[38] = 70; + t[39] = 71; + t[44] = 72; + t[47] = 73; + t[58] = 74; + t[60] = 75; + t[62] = 76; + t[68] = 77; + t[69] = 78; + t[75] = 79; + t[87] = 80; + t[89] = 81; + t[90] = 82; + t[94] = 83; + t[100] = 84; + t[104] = 85; + t[115] = 86; + t[116] = 87; + t[121] = 88; + t[122] = 89; + t[127] = 90; + t[258] = 97; + t[268] = 261; + t[271] = 98; + t[272] = 99; + t[273] = 263; + t[282] = 100; + t[286] = 101; + t[295] = 281; + t[296] = 102; + t[336] = 103; + t[346] = 104; + t[349] = 105; + t[361] = 106; + t[364] = 107; + t[367] = 108; + t[371] = 322; + t[373] = 109; + t[374] = 110; + t[381] = 111; + t[383] = 243; + t[393] = 112; + t[395] = 113; + t[396] = 114; + t[400] = 115; + t[401] = 347; + t[410] = 116; + t[437] = 117; + t[448] = 118; + t[449] = 119; + t[454] = 120; + t[455] = 121; + t[460] = 122; + t[463] = 380; + t[853] = 44; + t[855] = 58; + t[856] = 46; + t[876] = 47; + t[878] = 45; + t[882] = 45; + t[894] = 40; + t[895] = 41; + t[896] = 91; + t[897] = 93; + t[923] = 64; + t[1004] = 48; + t[1005] = 49; + t[1006] = 50; + t[1007] = 51; + t[1008] = 52; + t[1009] = 53; + t[1010] = 54; + t[1011] = 55; + t[1012] = 56; + t[1013] = 57; + t[1081] = 37; + t[1085] = 43; + t[1086] = 45; +}); +exports.getSupplementalGlyphMapForCalibri = getSupplementalGlyphMapForCalibri; + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +var getLookupTableFactory = __w_pdfjs_require__(8).getLookupTableFactory; +var getSpecialPUASymbols = getLookupTableFactory(function (t) { + t[63721] = 0x00a9; + t[63193] = 0x00a9; + t[63720] = 0x00ae; + t[63194] = 0x00ae; + t[63722] = 0x2122; + t[63195] = 0x2122; + t[63729] = 0x23a7; + t[63730] = 0x23a8; + t[63731] = 0x23a9; + t[63740] = 0x23ab; + t[63741] = 0x23ac; + t[63742] = 0x23ad; + t[63726] = 0x23a1; + t[63727] = 0x23a2; + t[63728] = 0x23a3; + t[63737] = 0x23a4; + t[63738] = 0x23a5; + t[63739] = 0x23a6; + t[63723] = 0x239b; + t[63724] = 0x239c; + t[63725] = 0x239d; + t[63734] = 0x239e; + t[63735] = 0x239f; + t[63736] = 0x23a0; +}); +function mapSpecialUnicodeValues(code) { + if (code >= 0xfff0 && code <= 0xffff) { + return 0; + } else if (code >= 0xf600 && code <= 0xf8ff) { + return getSpecialPUASymbols()[code] || code; + } else if (code === 0x00ad) { + return 0x002d; + } + return code; +} +function getUnicodeForGlyph(name, glyphsUnicodeMap) { + var unicode = glyphsUnicodeMap[name]; + if (unicode !== undefined) { + return unicode; + } + if (!name) { + return -1; + } + if (name[0] === "u") { + var nameLen = name.length, hexStr; + if (nameLen === 7 && name[1] === "n" && name[2] === "i") { + hexStr = name.substring(3); + } else if (nameLen >= 5 && nameLen <= 7) { + hexStr = name.substring(1); + } else { + return -1; + } + if (hexStr === hexStr.toUpperCase()) { + unicode = parseInt(hexStr, 16); + if (unicode >= 0) { + return unicode; + } + } + } + return -1; +} +var UnicodeRanges = [ + { + begin: 0x0000, + end: 0x007f + }, + { + begin: 0x0080, + end: 0x00ff + }, + { + begin: 0x0100, + end: 0x017f + }, + { + begin: 0x0180, + end: 0x024f + }, + { + begin: 0x0250, + end: 0x02af + }, + { + begin: 0x02b0, + end: 0x02ff + }, + { + begin: 0x0300, + end: 0x036f + }, + { + begin: 0x0370, + end: 0x03ff + }, + { + begin: 0x2c80, + end: 0x2cff + }, + { + begin: 0x0400, + end: 0x04ff + }, + { + begin: 0x0530, + end: 0x058f + }, + { + begin: 0x0590, + end: 0x05ff + }, + { + begin: 0xa500, + end: 0xa63f + }, + { + begin: 0x0600, + end: 0x06ff + }, + { + begin: 0x07c0, + end: 0x07ff + }, + { + begin: 0x0900, + end: 0x097f + }, + { + begin: 0x0980, + end: 0x09ff + }, + { + begin: 0x0a00, + end: 0x0a7f + }, + { + begin: 0x0a80, + end: 0x0aff + }, + { + begin: 0x0b00, + end: 0x0b7f + }, + { + begin: 0x0b80, + end: 0x0bff + }, + { + begin: 0x0c00, + end: 0x0c7f + }, + { + begin: 0x0c80, + end: 0x0cff + }, + { + begin: 0x0d00, + end: 0x0d7f + }, + { + begin: 0x0e00, + end: 0x0e7f + }, + { + begin: 0x0e80, + end: 0x0eff + }, + { + begin: 0x10a0, + end: 0x10ff + }, + { + begin: 0x1b00, + end: 0x1b7f + }, + { + begin: 0x1100, + end: 0x11ff + }, + { + begin: 0x1e00, + end: 0x1eff + }, + { + begin: 0x1f00, + end: 0x1fff + }, + { + begin: 0x2000, + end: 0x206f + }, + { + begin: 0x2070, + end: 0x209f + }, + { + begin: 0x20a0, + end: 0x20cf + }, + { + begin: 0x20d0, + end: 0x20ff + }, + { + begin: 0x2100, + end: 0x214f + }, + { + begin: 0x2150, + end: 0x218f + }, + { + begin: 0x2190, + end: 0x21ff + }, + { + begin: 0x2200, + end: 0x22ff + }, + { + begin: 0x2300, + end: 0x23ff + }, + { + begin: 0x2400, + end: 0x243f + }, + { + begin: 0x2440, + end: 0x245f + }, + { + begin: 0x2460, + end: 0x24ff + }, + { + begin: 0x2500, + end: 0x257f + }, + { + begin: 0x2580, + end: 0x259f + }, + { + begin: 0x25a0, + end: 0x25ff + }, + { + begin: 0x2600, + end: 0x26ff + }, + { + begin: 0x2700, + end: 0x27bf + }, + { + begin: 0x3000, + end: 0x303f + }, + { + begin: 0x3040, + end: 0x309f + }, + { + begin: 0x30a0, + end: 0x30ff + }, + { + begin: 0x3100, + end: 0x312f + }, + { + begin: 0x3130, + end: 0x318f + }, + { + begin: 0xa840, + end: 0xa87f + }, + { + begin: 0x3200, + end: 0x32ff + }, + { + begin: 0x3300, + end: 0x33ff + }, + { + begin: 0xac00, + end: 0xd7af + }, + { + begin: 0xd800, + end: 0xdfff + }, + { + begin: 0x10900, + end: 0x1091f + }, + { + begin: 0x4e00, + end: 0x9fff + }, + { + begin: 0xe000, + end: 0xf8ff + }, + { + begin: 0x31c0, + end: 0x31ef + }, + { + begin: 0xfb00, + end: 0xfb4f + }, + { + begin: 0xfb50, + end: 0xfdff + }, + { + begin: 0xfe20, + end: 0xfe2f + }, + { + begin: 0xfe10, + end: 0xfe1f + }, + { + begin: 0xfe50, + end: 0xfe6f + }, + { + begin: 0xfe70, + end: 0xfeff + }, + { + begin: 0xff00, + end: 0xffef + }, + { + begin: 0xfff0, + end: 0xffff + }, + { + begin: 0x0f00, + end: 0x0fff + }, + { + begin: 0x0700, + end: 0x074f + }, + { + begin: 0x0780, + end: 0x07bf + }, + { + begin: 0x0d80, + end: 0x0dff + }, + { + begin: 0x1000, + end: 0x109f + }, + { + begin: 0x1200, + end: 0x137f + }, + { + begin: 0x13a0, + end: 0x13ff + }, + { + begin: 0x1400, + end: 0x167f + }, + { + begin: 0x1680, + end: 0x169f + }, + { + begin: 0x16a0, + end: 0x16ff + }, + { + begin: 0x1780, + end: 0x17ff + }, + { + begin: 0x1800, + end: 0x18af + }, + { + begin: 0x2800, + end: 0x28ff + }, + { + begin: 0xa000, + end: 0xa48f + }, + { + begin: 0x1700, + end: 0x171f + }, + { + begin: 0x10300, + end: 0x1032f + }, + { + begin: 0x10330, + end: 0x1034f + }, + { + begin: 0x10400, + end: 0x1044f + }, + { + begin: 0x1d000, + end: 0x1d0ff + }, + { + begin: 0x1d400, + end: 0x1d7ff + }, + { + begin: 0xff000, + end: 0xffffd + }, + { + begin: 0xfe00, + end: 0xfe0f + }, + { + begin: 0xe0000, + end: 0xe007f + }, + { + begin: 0x1900, + end: 0x194f + }, + { + begin: 0x1950, + end: 0x197f + }, + { + begin: 0x1980, + end: 0x19df + }, + { + begin: 0x1a00, + end: 0x1a1f + }, + { + begin: 0x2c00, + end: 0x2c5f + }, + { + begin: 0x2d30, + end: 0x2d7f + }, + { + begin: 0x4dc0, + end: 0x4dff + }, + { + begin: 0xa800, + end: 0xa82f + }, + { + begin: 0x10000, + end: 0x1007f + }, + { + begin: 0x10140, + end: 0x1018f + }, + { + begin: 0x10380, + end: 0x1039f + }, + { + begin: 0x103a0, + end: 0x103df + }, + { + begin: 0x10450, + end: 0x1047f + }, + { + begin: 0x10480, + end: 0x104af + }, + { + begin: 0x10800, + end: 0x1083f + }, + { + begin: 0x10a00, + end: 0x10a5f + }, + { + begin: 0x1d300, + end: 0x1d35f + }, + { + begin: 0x12000, + end: 0x123ff + }, + { + begin: 0x1d360, + end: 0x1d37f + }, + { + begin: 0x1b80, + end: 0x1bbf + }, + { + begin: 0x1c00, + end: 0x1c4f + }, + { + begin: 0x1c50, + end: 0x1c7f + }, + { + begin: 0xa880, + end: 0xa8df + }, + { + begin: 0xa900, + end: 0xa92f + }, + { + begin: 0xa930, + end: 0xa95f + }, + { + begin: 0xaa00, + end: 0xaa5f + }, + { + begin: 0x10190, + end: 0x101cf + }, + { + begin: 0x101d0, + end: 0x101ff + }, + { + begin: 0x102a0, + end: 0x102df + }, + { + begin: 0x1f030, + end: 0x1f09f + } +]; +function getUnicodeRangeFor(value) { + for (var i = 0, ii = UnicodeRanges.length; i < ii; i++) { + var range = UnicodeRanges[i]; + if (value >= range.begin && value < range.end) { + return i; + } + } + return -1; +} +function isRTLRangeFor(value) { + var range = UnicodeRanges[13]; + if (value >= range.begin && value < range.end) { + return true; + } + range = UnicodeRanges[11]; + if (value >= range.begin && value < range.end) { + return true; + } + return false; +} +var getNormalizedUnicodes = getLookupTableFactory(function (t) { + t["\u00A8"] = "\u0020\u0308"; + t["\u00AF"] = "\u0020\u0304"; + t["\u00B4"] = "\u0020\u0301"; + t["\u00B5"] = "\u03BC"; + t["\u00B8"] = "\u0020\u0327"; + t["\u0132"] = "\u0049\u004A"; + t["\u0133"] = "\u0069\u006A"; + t["\u013F"] = "\u004C\u00B7"; + t["\u0140"] = "\u006C\u00B7"; + t["\u0149"] = "\u02BC\u006E"; + t["\u017F"] = "\u0073"; + t["\u01C4"] = "\u0044\u017D"; + t["\u01C5"] = "\u0044\u017E"; + t["\u01C6"] = "\u0064\u017E"; + t["\u01C7"] = "\u004C\u004A"; + t["\u01C8"] = "\u004C\u006A"; + t["\u01C9"] = "\u006C\u006A"; + t["\u01CA"] = "\u004E\u004A"; + t["\u01CB"] = "\u004E\u006A"; + t["\u01CC"] = "\u006E\u006A"; + t["\u01F1"] = "\u0044\u005A"; + t["\u01F2"] = "\u0044\u007A"; + t["\u01F3"] = "\u0064\u007A"; + t["\u02D8"] = "\u0020\u0306"; + t["\u02D9"] = "\u0020\u0307"; + t["\u02DA"] = "\u0020\u030A"; + t["\u02DB"] = "\u0020\u0328"; + t["\u02DC"] = "\u0020\u0303"; + t["\u02DD"] = "\u0020\u030B"; + t["\u037A"] = "\u0020\u0345"; + t["\u0384"] = "\u0020\u0301"; + t["\u03D0"] = "\u03B2"; + t["\u03D1"] = "\u03B8"; + t["\u03D2"] = "\u03A5"; + t["\u03D5"] = "\u03C6"; + t["\u03D6"] = "\u03C0"; + t["\u03F0"] = "\u03BA"; + t["\u03F1"] = "\u03C1"; + t["\u03F2"] = "\u03C2"; + t["\u03F4"] = "\u0398"; + t["\u03F5"] = "\u03B5"; + t["\u03F9"] = "\u03A3"; + t["\u0587"] = "\u0565\u0582"; + t["\u0675"] = "\u0627\u0674"; + t["\u0676"] = "\u0648\u0674"; + t["\u0677"] = "\u06C7\u0674"; + t["\u0678"] = "\u064A\u0674"; + t["\u0E33"] = "\u0E4D\u0E32"; + t["\u0EB3"] = "\u0ECD\u0EB2"; + t["\u0EDC"] = "\u0EAB\u0E99"; + t["\u0EDD"] = "\u0EAB\u0EA1"; + t["\u0F77"] = "\u0FB2\u0F81"; + t["\u0F79"] = "\u0FB3\u0F81"; + t["\u1E9A"] = "\u0061\u02BE"; + t["\u1FBD"] = "\u0020\u0313"; + t["\u1FBF"] = "\u0020\u0313"; + t["\u1FC0"] = "\u0020\u0342"; + t["\u1FFE"] = "\u0020\u0314"; + t["\u2002"] = "\u0020"; + t["\u2003"] = "\u0020"; + t["\u2004"] = "\u0020"; + t["\u2005"] = "\u0020"; + t["\u2006"] = "\u0020"; + t["\u2008"] = "\u0020"; + t["\u2009"] = "\u0020"; + t["\u200A"] = "\u0020"; + t["\u2017"] = "\u0020\u0333"; + t["\u2024"] = "\u002E"; + t["\u2025"] = "\u002E\u002E"; + t["\u2026"] = "\u002E\u002E\u002E"; + t["\u2033"] = "\u2032\u2032"; + t["\u2034"] = "\u2032\u2032\u2032"; + t["\u2036"] = "\u2035\u2035"; + t["\u2037"] = "\u2035\u2035\u2035"; + t["\u203C"] = "\u0021\u0021"; + t["\u203E"] = "\u0020\u0305"; + t["\u2047"] = "\u003F\u003F"; + t["\u2048"] = "\u003F\u0021"; + t["\u2049"] = "\u0021\u003F"; + t["\u2057"] = "\u2032\u2032\u2032\u2032"; + t["\u205F"] = "\u0020"; + t["\u20A8"] = "\u0052\u0073"; + t["\u2100"] = "\u0061\u002F\u0063"; + t["\u2101"] = "\u0061\u002F\u0073"; + t["\u2103"] = "\u00B0\u0043"; + t["\u2105"] = "\u0063\u002F\u006F"; + t["\u2106"] = "\u0063\u002F\u0075"; + t["\u2107"] = "\u0190"; + t["\u2109"] = "\u00B0\u0046"; + t["\u2116"] = "\u004E\u006F"; + t["\u2121"] = "\u0054\u0045\u004C"; + t["\u2135"] = "\u05D0"; + t["\u2136"] = "\u05D1"; + t["\u2137"] = "\u05D2"; + t["\u2138"] = "\u05D3"; + t["\u213B"] = "\u0046\u0041\u0058"; + t["\u2160"] = "\u0049"; + t["\u2161"] = "\u0049\u0049"; + t["\u2162"] = "\u0049\u0049\u0049"; + t["\u2163"] = "\u0049\u0056"; + t["\u2164"] = "\u0056"; + t["\u2165"] = "\u0056\u0049"; + t["\u2166"] = "\u0056\u0049\u0049"; + t["\u2167"] = "\u0056\u0049\u0049\u0049"; + t["\u2168"] = "\u0049\u0058"; + t["\u2169"] = "\u0058"; + t["\u216A"] = "\u0058\u0049"; + t["\u216B"] = "\u0058\u0049\u0049"; + t["\u216C"] = "\u004C"; + t["\u216D"] = "\u0043"; + t["\u216E"] = "\u0044"; + t["\u216F"] = "\u004D"; + t["\u2170"] = "\u0069"; + t["\u2171"] = "\u0069\u0069"; + t["\u2172"] = "\u0069\u0069\u0069"; + t["\u2173"] = "\u0069\u0076"; + t["\u2174"] = "\u0076"; + t["\u2175"] = "\u0076\u0069"; + t["\u2176"] = "\u0076\u0069\u0069"; + t["\u2177"] = "\u0076\u0069\u0069\u0069"; + t["\u2178"] = "\u0069\u0078"; + t["\u2179"] = "\u0078"; + t["\u217A"] = "\u0078\u0069"; + t["\u217B"] = "\u0078\u0069\u0069"; + t["\u217C"] = "\u006C"; + t["\u217D"] = "\u0063"; + t["\u217E"] = "\u0064"; + t["\u217F"] = "\u006D"; + t["\u222C"] = "\u222B\u222B"; + t["\u222D"] = "\u222B\u222B\u222B"; + t["\u222F"] = "\u222E\u222E"; + t["\u2230"] = "\u222E\u222E\u222E"; + t["\u2474"] = "\u0028\u0031\u0029"; + t["\u2475"] = "\u0028\u0032\u0029"; + t["\u2476"] = "\u0028\u0033\u0029"; + t["\u2477"] = "\u0028\u0034\u0029"; + t["\u2478"] = "\u0028\u0035\u0029"; + t["\u2479"] = "\u0028\u0036\u0029"; + t["\u247A"] = "\u0028\u0037\u0029"; + t["\u247B"] = "\u0028\u0038\u0029"; + t["\u247C"] = "\u0028\u0039\u0029"; + t["\u247D"] = "\u0028\u0031\u0030\u0029"; + t["\u247E"] = "\u0028\u0031\u0031\u0029"; + t["\u247F"] = "\u0028\u0031\u0032\u0029"; + t["\u2480"] = "\u0028\u0031\u0033\u0029"; + t["\u2481"] = "\u0028\u0031\u0034\u0029"; + t["\u2482"] = "\u0028\u0031\u0035\u0029"; + t["\u2483"] = "\u0028\u0031\u0036\u0029"; + t["\u2484"] = "\u0028\u0031\u0037\u0029"; + t["\u2485"] = "\u0028\u0031\u0038\u0029"; + t["\u2486"] = "\u0028\u0031\u0039\u0029"; + t["\u2487"] = "\u0028\u0032\u0030\u0029"; + t["\u2488"] = "\u0031\u002E"; + t["\u2489"] = "\u0032\u002E"; + t["\u248A"] = "\u0033\u002E"; + t["\u248B"] = "\u0034\u002E"; + t["\u248C"] = "\u0035\u002E"; + t["\u248D"] = "\u0036\u002E"; + t["\u248E"] = "\u0037\u002E"; + t["\u248F"] = "\u0038\u002E"; + t["\u2490"] = "\u0039\u002E"; + t["\u2491"] = "\u0031\u0030\u002E"; + t["\u2492"] = "\u0031\u0031\u002E"; + t["\u2493"] = "\u0031\u0032\u002E"; + t["\u2494"] = "\u0031\u0033\u002E"; + t["\u2495"] = "\u0031\u0034\u002E"; + t["\u2496"] = "\u0031\u0035\u002E"; + t["\u2497"] = "\u0031\u0036\u002E"; + t["\u2498"] = "\u0031\u0037\u002E"; + t["\u2499"] = "\u0031\u0038\u002E"; + t["\u249A"] = "\u0031\u0039\u002E"; + t["\u249B"] = "\u0032\u0030\u002E"; + t["\u249C"] = "\u0028\u0061\u0029"; + t["\u249D"] = "\u0028\u0062\u0029"; + t["\u249E"] = "\u0028\u0063\u0029"; + t["\u249F"] = "\u0028\u0064\u0029"; + t["\u24A0"] = "\u0028\u0065\u0029"; + t["\u24A1"] = "\u0028\u0066\u0029"; + t["\u24A2"] = "\u0028\u0067\u0029"; + t["\u24A3"] = "\u0028\u0068\u0029"; + t["\u24A4"] = "\u0028\u0069\u0029"; + t["\u24A5"] = "\u0028\u006A\u0029"; + t["\u24A6"] = "\u0028\u006B\u0029"; + t["\u24A7"] = "\u0028\u006C\u0029"; + t["\u24A8"] = "\u0028\u006D\u0029"; + t["\u24A9"] = "\u0028\u006E\u0029"; + t["\u24AA"] = "\u0028\u006F\u0029"; + t["\u24AB"] = "\u0028\u0070\u0029"; + t["\u24AC"] = "\u0028\u0071\u0029"; + t["\u24AD"] = "\u0028\u0072\u0029"; + t["\u24AE"] = "\u0028\u0073\u0029"; + t["\u24AF"] = "\u0028\u0074\u0029"; + t["\u24B0"] = "\u0028\u0075\u0029"; + t["\u24B1"] = "\u0028\u0076\u0029"; + t["\u24B2"] = "\u0028\u0077\u0029"; + t["\u24B3"] = "\u0028\u0078\u0029"; + t["\u24B4"] = "\u0028\u0079\u0029"; + t["\u24B5"] = "\u0028\u007A\u0029"; + t["\u2A0C"] = "\u222B\u222B\u222B\u222B"; + t["\u2A74"] = "\u003A\u003A\u003D"; + t["\u2A75"] = "\u003D\u003D"; + t["\u2A76"] = "\u003D\u003D\u003D"; + t["\u2E9F"] = "\u6BCD"; + t["\u2EF3"] = "\u9F9F"; + t["\u2F00"] = "\u4E00"; + t["\u2F01"] = "\u4E28"; + t["\u2F02"] = "\u4E36"; + t["\u2F03"] = "\u4E3F"; + t["\u2F04"] = "\u4E59"; + t["\u2F05"] = "\u4E85"; + t["\u2F06"] = "\u4E8C"; + t["\u2F07"] = "\u4EA0"; + t["\u2F08"] = "\u4EBA"; + t["\u2F09"] = "\u513F"; + t["\u2F0A"] = "\u5165"; + t["\u2F0B"] = "\u516B"; + t["\u2F0C"] = "\u5182"; + t["\u2F0D"] = "\u5196"; + t["\u2F0E"] = "\u51AB"; + t["\u2F0F"] = "\u51E0"; + t["\u2F10"] = "\u51F5"; + t["\u2F11"] = "\u5200"; + t["\u2F12"] = "\u529B"; + t["\u2F13"] = "\u52F9"; + t["\u2F14"] = "\u5315"; + t["\u2F15"] = "\u531A"; + t["\u2F16"] = "\u5338"; + t["\u2F17"] = "\u5341"; + t["\u2F18"] = "\u535C"; + t["\u2F19"] = "\u5369"; + t["\u2F1A"] = "\u5382"; + t["\u2F1B"] = "\u53B6"; + t["\u2F1C"] = "\u53C8"; + t["\u2F1D"] = "\u53E3"; + t["\u2F1E"] = "\u56D7"; + t["\u2F1F"] = "\u571F"; + t["\u2F20"] = "\u58EB"; + t["\u2F21"] = "\u5902"; + t["\u2F22"] = "\u590A"; + t["\u2F23"] = "\u5915"; + t["\u2F24"] = "\u5927"; + t["\u2F25"] = "\u5973"; + t["\u2F26"] = "\u5B50"; + t["\u2F27"] = "\u5B80"; + t["\u2F28"] = "\u5BF8"; + t["\u2F29"] = "\u5C0F"; + t["\u2F2A"] = "\u5C22"; + t["\u2F2B"] = "\u5C38"; + t["\u2F2C"] = "\u5C6E"; + t["\u2F2D"] = "\u5C71"; + t["\u2F2E"] = "\u5DDB"; + t["\u2F2F"] = "\u5DE5"; + t["\u2F30"] = "\u5DF1"; + t["\u2F31"] = "\u5DFE"; + t["\u2F32"] = "\u5E72"; + t["\u2F33"] = "\u5E7A"; + t["\u2F34"] = "\u5E7F"; + t["\u2F35"] = "\u5EF4"; + t["\u2F36"] = "\u5EFE"; + t["\u2F37"] = "\u5F0B"; + t["\u2F38"] = "\u5F13"; + t["\u2F39"] = "\u5F50"; + t["\u2F3A"] = "\u5F61"; + t["\u2F3B"] = "\u5F73"; + t["\u2F3C"] = "\u5FC3"; + t["\u2F3D"] = "\u6208"; + t["\u2F3E"] = "\u6236"; + t["\u2F3F"] = "\u624B"; + t["\u2F40"] = "\u652F"; + t["\u2F41"] = "\u6534"; + t["\u2F42"] = "\u6587"; + t["\u2F43"] = "\u6597"; + t["\u2F44"] = "\u65A4"; + t["\u2F45"] = "\u65B9"; + t["\u2F46"] = "\u65E0"; + t["\u2F47"] = "\u65E5"; + t["\u2F48"] = "\u66F0"; + t["\u2F49"] = "\u6708"; + t["\u2F4A"] = "\u6728"; + t["\u2F4B"] = "\u6B20"; + t["\u2F4C"] = "\u6B62"; + t["\u2F4D"] = "\u6B79"; + t["\u2F4E"] = "\u6BB3"; + t["\u2F4F"] = "\u6BCB"; + t["\u2F50"] = "\u6BD4"; + t["\u2F51"] = "\u6BDB"; + t["\u2F52"] = "\u6C0F"; + t["\u2F53"] = "\u6C14"; + t["\u2F54"] = "\u6C34"; + t["\u2F55"] = "\u706B"; + t["\u2F56"] = "\u722A"; + t["\u2F57"] = "\u7236"; + t["\u2F58"] = "\u723B"; + t["\u2F59"] = "\u723F"; + t["\u2F5A"] = "\u7247"; + t["\u2F5B"] = "\u7259"; + t["\u2F5C"] = "\u725B"; + t["\u2F5D"] = "\u72AC"; + t["\u2F5E"] = "\u7384"; + t["\u2F5F"] = "\u7389"; + t["\u2F60"] = "\u74DC"; + t["\u2F61"] = "\u74E6"; + t["\u2F62"] = "\u7518"; + t["\u2F63"] = "\u751F"; + t["\u2F64"] = "\u7528"; + t["\u2F65"] = "\u7530"; + t["\u2F66"] = "\u758B"; + t["\u2F67"] = "\u7592"; + t["\u2F68"] = "\u7676"; + t["\u2F69"] = "\u767D"; + t["\u2F6A"] = "\u76AE"; + t["\u2F6B"] = "\u76BF"; + t["\u2F6C"] = "\u76EE"; + t["\u2F6D"] = "\u77DB"; + t["\u2F6E"] = "\u77E2"; + t["\u2F6F"] = "\u77F3"; + t["\u2F70"] = "\u793A"; + t["\u2F71"] = "\u79B8"; + t["\u2F72"] = "\u79BE"; + t["\u2F73"] = "\u7A74"; + t["\u2F74"] = "\u7ACB"; + t["\u2F75"] = "\u7AF9"; + t["\u2F76"] = "\u7C73"; + t["\u2F77"] = "\u7CF8"; + t["\u2F78"] = "\u7F36"; + t["\u2F79"] = "\u7F51"; + t["\u2F7A"] = "\u7F8A"; + t["\u2F7B"] = "\u7FBD"; + t["\u2F7C"] = "\u8001"; + t["\u2F7D"] = "\u800C"; + t["\u2F7E"] = "\u8012"; + t["\u2F7F"] = "\u8033"; + t["\u2F80"] = "\u807F"; + t["\u2F81"] = "\u8089"; + t["\u2F82"] = "\u81E3"; + t["\u2F83"] = "\u81EA"; + t["\u2F84"] = "\u81F3"; + t["\u2F85"] = "\u81FC"; + t["\u2F86"] = "\u820C"; + t["\u2F87"] = "\u821B"; + t["\u2F88"] = "\u821F"; + t["\u2F89"] = "\u826E"; + t["\u2F8A"] = "\u8272"; + t["\u2F8B"] = "\u8278"; + t["\u2F8C"] = "\u864D"; + t["\u2F8D"] = "\u866B"; + t["\u2F8E"] = "\u8840"; + t["\u2F8F"] = "\u884C"; + t["\u2F90"] = "\u8863"; + t["\u2F91"] = "\u897E"; + t["\u2F92"] = "\u898B"; + t["\u2F93"] = "\u89D2"; + t["\u2F94"] = "\u8A00"; + t["\u2F95"] = "\u8C37"; + t["\u2F96"] = "\u8C46"; + t["\u2F97"] = "\u8C55"; + t["\u2F98"] = "\u8C78"; + t["\u2F99"] = "\u8C9D"; + t["\u2F9A"] = "\u8D64"; + t["\u2F9B"] = "\u8D70"; + t["\u2F9C"] = "\u8DB3"; + t["\u2F9D"] = "\u8EAB"; + t["\u2F9E"] = "\u8ECA"; + t["\u2F9F"] = "\u8F9B"; + t["\u2FA0"] = "\u8FB0"; + t["\u2FA1"] = "\u8FB5"; + t["\u2FA2"] = "\u9091"; + t["\u2FA3"] = "\u9149"; + t["\u2FA4"] = "\u91C6"; + t["\u2FA5"] = "\u91CC"; + t["\u2FA6"] = "\u91D1"; + t["\u2FA7"] = "\u9577"; + t["\u2FA8"] = "\u9580"; + t["\u2FA9"] = "\u961C"; + t["\u2FAA"] = "\u96B6"; + t["\u2FAB"] = "\u96B9"; + t["\u2FAC"] = "\u96E8"; + t["\u2FAD"] = "\u9751"; + t["\u2FAE"] = "\u975E"; + t["\u2FAF"] = "\u9762"; + t["\u2FB0"] = "\u9769"; + t["\u2FB1"] = "\u97CB"; + t["\u2FB2"] = "\u97ED"; + t["\u2FB3"] = "\u97F3"; + t["\u2FB4"] = "\u9801"; + t["\u2FB5"] = "\u98A8"; + t["\u2FB6"] = "\u98DB"; + t["\u2FB7"] = "\u98DF"; + t["\u2FB8"] = "\u9996"; + t["\u2FB9"] = "\u9999"; + t["\u2FBA"] = "\u99AC"; + t["\u2FBB"] = "\u9AA8"; + t["\u2FBC"] = "\u9AD8"; + t["\u2FBD"] = "\u9ADF"; + t["\u2FBE"] = "\u9B25"; + t["\u2FBF"] = "\u9B2F"; + t["\u2FC0"] = "\u9B32"; + t["\u2FC1"] = "\u9B3C"; + t["\u2FC2"] = "\u9B5A"; + t["\u2FC3"] = "\u9CE5"; + t["\u2FC4"] = "\u9E75"; + t["\u2FC5"] = "\u9E7F"; + t["\u2FC6"] = "\u9EA5"; + t["\u2FC7"] = "\u9EBB"; + t["\u2FC8"] = "\u9EC3"; + t["\u2FC9"] = "\u9ECD"; + t["\u2FCA"] = "\u9ED1"; + t["\u2FCB"] = "\u9EF9"; + t["\u2FCC"] = "\u9EFD"; + t["\u2FCD"] = "\u9F0E"; + t["\u2FCE"] = "\u9F13"; + t["\u2FCF"] = "\u9F20"; + t["\u2FD0"] = "\u9F3B"; + t["\u2FD1"] = "\u9F4A"; + t["\u2FD2"] = "\u9F52"; + t["\u2FD3"] = "\u9F8D"; + t["\u2FD4"] = "\u9F9C"; + t["\u2FD5"] = "\u9FA0"; + t["\u3036"] = "\u3012"; + t["\u3038"] = "\u5341"; + t["\u3039"] = "\u5344"; + t["\u303A"] = "\u5345"; + t["\u309B"] = "\u0020\u3099"; + t["\u309C"] = "\u0020\u309A"; + t["\u3131"] = "\u1100"; + t["\u3132"] = "\u1101"; + t["\u3133"] = "\u11AA"; + t["\u3134"] = "\u1102"; + t["\u3135"] = "\u11AC"; + t["\u3136"] = "\u11AD"; + t["\u3137"] = "\u1103"; + t["\u3138"] = "\u1104"; + t["\u3139"] = "\u1105"; + t["\u313A"] = "\u11B0"; + t["\u313B"] = "\u11B1"; + t["\u313C"] = "\u11B2"; + t["\u313D"] = "\u11B3"; + t["\u313E"] = "\u11B4"; + t["\u313F"] = "\u11B5"; + t["\u3140"] = "\u111A"; + t["\u3141"] = "\u1106"; + t["\u3142"] = "\u1107"; + t["\u3143"] = "\u1108"; + t["\u3144"] = "\u1121"; + t["\u3145"] = "\u1109"; + t["\u3146"] = "\u110A"; + t["\u3147"] = "\u110B"; + t["\u3148"] = "\u110C"; + t["\u3149"] = "\u110D"; + t["\u314A"] = "\u110E"; + t["\u314B"] = "\u110F"; + t["\u314C"] = "\u1110"; + t["\u314D"] = "\u1111"; + t["\u314E"] = "\u1112"; + t["\u314F"] = "\u1161"; + t["\u3150"] = "\u1162"; + t["\u3151"] = "\u1163"; + t["\u3152"] = "\u1164"; + t["\u3153"] = "\u1165"; + t["\u3154"] = "\u1166"; + t["\u3155"] = "\u1167"; + t["\u3156"] = "\u1168"; + t["\u3157"] = "\u1169"; + t["\u3158"] = "\u116A"; + t["\u3159"] = "\u116B"; + t["\u315A"] = "\u116C"; + t["\u315B"] = "\u116D"; + t["\u315C"] = "\u116E"; + t["\u315D"] = "\u116F"; + t["\u315E"] = "\u1170"; + t["\u315F"] = "\u1171"; + t["\u3160"] = "\u1172"; + t["\u3161"] = "\u1173"; + t["\u3162"] = "\u1174"; + t["\u3163"] = "\u1175"; + t["\u3164"] = "\u1160"; + t["\u3165"] = "\u1114"; + t["\u3166"] = "\u1115"; + t["\u3167"] = "\u11C7"; + t["\u3168"] = "\u11C8"; + t["\u3169"] = "\u11CC"; + t["\u316A"] = "\u11CE"; + t["\u316B"] = "\u11D3"; + t["\u316C"] = "\u11D7"; + t["\u316D"] = "\u11D9"; + t["\u316E"] = "\u111C"; + t["\u316F"] = "\u11DD"; + t["\u3170"] = "\u11DF"; + t["\u3171"] = "\u111D"; + t["\u3172"] = "\u111E"; + t["\u3173"] = "\u1120"; + t["\u3174"] = "\u1122"; + t["\u3175"] = "\u1123"; + t["\u3176"] = "\u1127"; + t["\u3177"] = "\u1129"; + t["\u3178"] = "\u112B"; + t["\u3179"] = "\u112C"; + t["\u317A"] = "\u112D"; + t["\u317B"] = "\u112E"; + t["\u317C"] = "\u112F"; + t["\u317D"] = "\u1132"; + t["\u317E"] = "\u1136"; + t["\u317F"] = "\u1140"; + t["\u3180"] = "\u1147"; + t["\u3181"] = "\u114C"; + t["\u3182"] = "\u11F1"; + t["\u3183"] = "\u11F2"; + t["\u3184"] = "\u1157"; + t["\u3185"] = "\u1158"; + t["\u3186"] = "\u1159"; + t["\u3187"] = "\u1184"; + t["\u3188"] = "\u1185"; + t["\u3189"] = "\u1188"; + t["\u318A"] = "\u1191"; + t["\u318B"] = "\u1192"; + t["\u318C"] = "\u1194"; + t["\u318D"] = "\u119E"; + t["\u318E"] = "\u11A1"; + t["\u3200"] = "\u0028\u1100\u0029"; + t["\u3201"] = "\u0028\u1102\u0029"; + t["\u3202"] = "\u0028\u1103\u0029"; + t["\u3203"] = "\u0028\u1105\u0029"; + t["\u3204"] = "\u0028\u1106\u0029"; + t["\u3205"] = "\u0028\u1107\u0029"; + t["\u3206"] = "\u0028\u1109\u0029"; + t["\u3207"] = "\u0028\u110B\u0029"; + t["\u3208"] = "\u0028\u110C\u0029"; + t["\u3209"] = "\u0028\u110E\u0029"; + t["\u320A"] = "\u0028\u110F\u0029"; + t["\u320B"] = "\u0028\u1110\u0029"; + t["\u320C"] = "\u0028\u1111\u0029"; + t["\u320D"] = "\u0028\u1112\u0029"; + t["\u320E"] = "\u0028\u1100\u1161\u0029"; + t["\u320F"] = "\u0028\u1102\u1161\u0029"; + t["\u3210"] = "\u0028\u1103\u1161\u0029"; + t["\u3211"] = "\u0028\u1105\u1161\u0029"; + t["\u3212"] = "\u0028\u1106\u1161\u0029"; + t["\u3213"] = "\u0028\u1107\u1161\u0029"; + t["\u3214"] = "\u0028\u1109\u1161\u0029"; + t["\u3215"] = "\u0028\u110B\u1161\u0029"; + t["\u3216"] = "\u0028\u110C\u1161\u0029"; + t["\u3217"] = "\u0028\u110E\u1161\u0029"; + t["\u3218"] = "\u0028\u110F\u1161\u0029"; + t["\u3219"] = "\u0028\u1110\u1161\u0029"; + t["\u321A"] = "\u0028\u1111\u1161\u0029"; + t["\u321B"] = "\u0028\u1112\u1161\u0029"; + t["\u321C"] = "\u0028\u110C\u116E\u0029"; + t["\u321D"] = "\u0028\u110B\u1169\u110C\u1165\u11AB\u0029"; + t["\u321E"] = "\u0028\u110B\u1169\u1112\u116E\u0029"; + t["\u3220"] = "\u0028\u4E00\u0029"; + t["\u3221"] = "\u0028\u4E8C\u0029"; + t["\u3222"] = "\u0028\u4E09\u0029"; + t["\u3223"] = "\u0028\u56DB\u0029"; + t["\u3224"] = "\u0028\u4E94\u0029"; + t["\u3225"] = "\u0028\u516D\u0029"; + t["\u3226"] = "\u0028\u4E03\u0029"; + t["\u3227"] = "\u0028\u516B\u0029"; + t["\u3228"] = "\u0028\u4E5D\u0029"; + t["\u3229"] = "\u0028\u5341\u0029"; + t["\u322A"] = "\u0028\u6708\u0029"; + t["\u322B"] = "\u0028\u706B\u0029"; + t["\u322C"] = "\u0028\u6C34\u0029"; + t["\u322D"] = "\u0028\u6728\u0029"; + t["\u322E"] = "\u0028\u91D1\u0029"; + t["\u322F"] = "\u0028\u571F\u0029"; + t["\u3230"] = "\u0028\u65E5\u0029"; + t["\u3231"] = "\u0028\u682A\u0029"; + t["\u3232"] = "\u0028\u6709\u0029"; + t["\u3233"] = "\u0028\u793E\u0029"; + t["\u3234"] = "\u0028\u540D\u0029"; + t["\u3235"] = "\u0028\u7279\u0029"; + t["\u3236"] = "\u0028\u8CA1\u0029"; + t["\u3237"] = "\u0028\u795D\u0029"; + t["\u3238"] = "\u0028\u52B4\u0029"; + t["\u3239"] = "\u0028\u4EE3\u0029"; + t["\u323A"] = "\u0028\u547C\u0029"; + t["\u323B"] = "\u0028\u5B66\u0029"; + t["\u323C"] = "\u0028\u76E3\u0029"; + t["\u323D"] = "\u0028\u4F01\u0029"; + t["\u323E"] = "\u0028\u8CC7\u0029"; + t["\u323F"] = "\u0028\u5354\u0029"; + t["\u3240"] = "\u0028\u796D\u0029"; + t["\u3241"] = "\u0028\u4F11\u0029"; + t["\u3242"] = "\u0028\u81EA\u0029"; + t["\u3243"] = "\u0028\u81F3\u0029"; + t["\u32C0"] = "\u0031\u6708"; + t["\u32C1"] = "\u0032\u6708"; + t["\u32C2"] = "\u0033\u6708"; + t["\u32C3"] = "\u0034\u6708"; + t["\u32C4"] = "\u0035\u6708"; + t["\u32C5"] = "\u0036\u6708"; + t["\u32C6"] = "\u0037\u6708"; + t["\u32C7"] = "\u0038\u6708"; + t["\u32C8"] = "\u0039\u6708"; + t["\u32C9"] = "\u0031\u0030\u6708"; + t["\u32CA"] = "\u0031\u0031\u6708"; + t["\u32CB"] = "\u0031\u0032\u6708"; + t["\u3358"] = "\u0030\u70B9"; + t["\u3359"] = "\u0031\u70B9"; + t["\u335A"] = "\u0032\u70B9"; + t["\u335B"] = "\u0033\u70B9"; + t["\u335C"] = "\u0034\u70B9"; + t["\u335D"] = "\u0035\u70B9"; + t["\u335E"] = "\u0036\u70B9"; + t["\u335F"] = "\u0037\u70B9"; + t["\u3360"] = "\u0038\u70B9"; + t["\u3361"] = "\u0039\u70B9"; + t["\u3362"] = "\u0031\u0030\u70B9"; + t["\u3363"] = "\u0031\u0031\u70B9"; + t["\u3364"] = "\u0031\u0032\u70B9"; + t["\u3365"] = "\u0031\u0033\u70B9"; + t["\u3366"] = "\u0031\u0034\u70B9"; + t["\u3367"] = "\u0031\u0035\u70B9"; + t["\u3368"] = "\u0031\u0036\u70B9"; + t["\u3369"] = "\u0031\u0037\u70B9"; + t["\u336A"] = "\u0031\u0038\u70B9"; + t["\u336B"] = "\u0031\u0039\u70B9"; + t["\u336C"] = "\u0032\u0030\u70B9"; + t["\u336D"] = "\u0032\u0031\u70B9"; + t["\u336E"] = "\u0032\u0032\u70B9"; + t["\u336F"] = "\u0032\u0033\u70B9"; + t["\u3370"] = "\u0032\u0034\u70B9"; + t["\u33E0"] = "\u0031\u65E5"; + t["\u33E1"] = "\u0032\u65E5"; + t["\u33E2"] = "\u0033\u65E5"; + t["\u33E3"] = "\u0034\u65E5"; + t["\u33E4"] = "\u0035\u65E5"; + t["\u33E5"] = "\u0036\u65E5"; + t["\u33E6"] = "\u0037\u65E5"; + t["\u33E7"] = "\u0038\u65E5"; + t["\u33E8"] = "\u0039\u65E5"; + t["\u33E9"] = "\u0031\u0030\u65E5"; + t["\u33EA"] = "\u0031\u0031\u65E5"; + t["\u33EB"] = "\u0031\u0032\u65E5"; + t["\u33EC"] = "\u0031\u0033\u65E5"; + t["\u33ED"] = "\u0031\u0034\u65E5"; + t["\u33EE"] = "\u0031\u0035\u65E5"; + t["\u33EF"] = "\u0031\u0036\u65E5"; + t["\u33F0"] = "\u0031\u0037\u65E5"; + t["\u33F1"] = "\u0031\u0038\u65E5"; + t["\u33F2"] = "\u0031\u0039\u65E5"; + t["\u33F3"] = "\u0032\u0030\u65E5"; + t["\u33F4"] = "\u0032\u0031\u65E5"; + t["\u33F5"] = "\u0032\u0032\u65E5"; + t["\u33F6"] = "\u0032\u0033\u65E5"; + t["\u33F7"] = "\u0032\u0034\u65E5"; + t["\u33F8"] = "\u0032\u0035\u65E5"; + t["\u33F9"] = "\u0032\u0036\u65E5"; + t["\u33FA"] = "\u0032\u0037\u65E5"; + t["\u33FB"] = "\u0032\u0038\u65E5"; + t["\u33FC"] = "\u0032\u0039\u65E5"; + t["\u33FD"] = "\u0033\u0030\u65E5"; + t["\u33FE"] = "\u0033\u0031\u65E5"; + t["\uFB00"] = "\u0066\u0066"; + t["\uFB01"] = "\u0066\u0069"; + t["\uFB02"] = "\u0066\u006C"; + t["\uFB03"] = "\u0066\u0066\u0069"; + t["\uFB04"] = "\u0066\u0066\u006C"; + t["\uFB05"] = "\u017F\u0074"; + t["\uFB06"] = "\u0073\u0074"; + t["\uFB13"] = "\u0574\u0576"; + t["\uFB14"] = "\u0574\u0565"; + t["\uFB15"] = "\u0574\u056B"; + t["\uFB16"] = "\u057E\u0576"; + t["\uFB17"] = "\u0574\u056D"; + t["\uFB4F"] = "\u05D0\u05DC"; + t["\uFB50"] = "\u0671"; + t["\uFB51"] = "\u0671"; + t["\uFB52"] = "\u067B"; + t["\uFB53"] = "\u067B"; + t["\uFB54"] = "\u067B"; + t["\uFB55"] = "\u067B"; + t["\uFB56"] = "\u067E"; + t["\uFB57"] = "\u067E"; + t["\uFB58"] = "\u067E"; + t["\uFB59"] = "\u067E"; + t["\uFB5A"] = "\u0680"; + t["\uFB5B"] = "\u0680"; + t["\uFB5C"] = "\u0680"; + t["\uFB5D"] = "\u0680"; + t["\uFB5E"] = "\u067A"; + t["\uFB5F"] = "\u067A"; + t["\uFB60"] = "\u067A"; + t["\uFB61"] = "\u067A"; + t["\uFB62"] = "\u067F"; + t["\uFB63"] = "\u067F"; + t["\uFB64"] = "\u067F"; + t["\uFB65"] = "\u067F"; + t["\uFB66"] = "\u0679"; + t["\uFB67"] = "\u0679"; + t["\uFB68"] = "\u0679"; + t["\uFB69"] = "\u0679"; + t["\uFB6A"] = "\u06A4"; + t["\uFB6B"] = "\u06A4"; + t["\uFB6C"] = "\u06A4"; + t["\uFB6D"] = "\u06A4"; + t["\uFB6E"] = "\u06A6"; + t["\uFB6F"] = "\u06A6"; + t["\uFB70"] = "\u06A6"; + t["\uFB71"] = "\u06A6"; + t["\uFB72"] = "\u0684"; + t["\uFB73"] = "\u0684"; + t["\uFB74"] = "\u0684"; + t["\uFB75"] = "\u0684"; + t["\uFB76"] = "\u0683"; + t["\uFB77"] = "\u0683"; + t["\uFB78"] = "\u0683"; + t["\uFB79"] = "\u0683"; + t["\uFB7A"] = "\u0686"; + t["\uFB7B"] = "\u0686"; + t["\uFB7C"] = "\u0686"; + t["\uFB7D"] = "\u0686"; + t["\uFB7E"] = "\u0687"; + t["\uFB7F"] = "\u0687"; + t["\uFB80"] = "\u0687"; + t["\uFB81"] = "\u0687"; + t["\uFB82"] = "\u068D"; + t["\uFB83"] = "\u068D"; + t["\uFB84"] = "\u068C"; + t["\uFB85"] = "\u068C"; + t["\uFB86"] = "\u068E"; + t["\uFB87"] = "\u068E"; + t["\uFB88"] = "\u0688"; + t["\uFB89"] = "\u0688"; + t["\uFB8A"] = "\u0698"; + t["\uFB8B"] = "\u0698"; + t["\uFB8C"] = "\u0691"; + t["\uFB8D"] = "\u0691"; + t["\uFB8E"] = "\u06A9"; + t["\uFB8F"] = "\u06A9"; + t["\uFB90"] = "\u06A9"; + t["\uFB91"] = "\u06A9"; + t["\uFB92"] = "\u06AF"; + t["\uFB93"] = "\u06AF"; + t["\uFB94"] = "\u06AF"; + t["\uFB95"] = "\u06AF"; + t["\uFB96"] = "\u06B3"; + t["\uFB97"] = "\u06B3"; + t["\uFB98"] = "\u06B3"; + t["\uFB99"] = "\u06B3"; + t["\uFB9A"] = "\u06B1"; + t["\uFB9B"] = "\u06B1"; + t["\uFB9C"] = "\u06B1"; + t["\uFB9D"] = "\u06B1"; + t["\uFB9E"] = "\u06BA"; + t["\uFB9F"] = "\u06BA"; + t["\uFBA0"] = "\u06BB"; + t["\uFBA1"] = "\u06BB"; + t["\uFBA2"] = "\u06BB"; + t["\uFBA3"] = "\u06BB"; + t["\uFBA4"] = "\u06C0"; + t["\uFBA5"] = "\u06C0"; + t["\uFBA6"] = "\u06C1"; + t["\uFBA7"] = "\u06C1"; + t["\uFBA8"] = "\u06C1"; + t["\uFBA9"] = "\u06C1"; + t["\uFBAA"] = "\u06BE"; + t["\uFBAB"] = "\u06BE"; + t["\uFBAC"] = "\u06BE"; + t["\uFBAD"] = "\u06BE"; + t["\uFBAE"] = "\u06D2"; + t["\uFBAF"] = "\u06D2"; + t["\uFBB0"] = "\u06D3"; + t["\uFBB1"] = "\u06D3"; + t["\uFBD3"] = "\u06AD"; + t["\uFBD4"] = "\u06AD"; + t["\uFBD5"] = "\u06AD"; + t["\uFBD6"] = "\u06AD"; + t["\uFBD7"] = "\u06C7"; + t["\uFBD8"] = "\u06C7"; + t["\uFBD9"] = "\u06C6"; + t["\uFBDA"] = "\u06C6"; + t["\uFBDB"] = "\u06C8"; + t["\uFBDC"] = "\u06C8"; + t["\uFBDD"] = "\u0677"; + t["\uFBDE"] = "\u06CB"; + t["\uFBDF"] = "\u06CB"; + t["\uFBE0"] = "\u06C5"; + t["\uFBE1"] = "\u06C5"; + t["\uFBE2"] = "\u06C9"; + t["\uFBE3"] = "\u06C9"; + t["\uFBE4"] = "\u06D0"; + t["\uFBE5"] = "\u06D0"; + t["\uFBE6"] = "\u06D0"; + t["\uFBE7"] = "\u06D0"; + t["\uFBE8"] = "\u0649"; + t["\uFBE9"] = "\u0649"; + t["\uFBEA"] = "\u0626\u0627"; + t["\uFBEB"] = "\u0626\u0627"; + t["\uFBEC"] = "\u0626\u06D5"; + t["\uFBED"] = "\u0626\u06D5"; + t["\uFBEE"] = "\u0626\u0648"; + t["\uFBEF"] = "\u0626\u0648"; + t["\uFBF0"] = "\u0626\u06C7"; + t["\uFBF1"] = "\u0626\u06C7"; + t["\uFBF2"] = "\u0626\u06C6"; + t["\uFBF3"] = "\u0626\u06C6"; + t["\uFBF4"] = "\u0626\u06C8"; + t["\uFBF5"] = "\u0626\u06C8"; + t["\uFBF6"] = "\u0626\u06D0"; + t["\uFBF7"] = "\u0626\u06D0"; + t["\uFBF8"] = "\u0626\u06D0"; + t["\uFBF9"] = "\u0626\u0649"; + t["\uFBFA"] = "\u0626\u0649"; + t["\uFBFB"] = "\u0626\u0649"; + t["\uFBFC"] = "\u06CC"; + t["\uFBFD"] = "\u06CC"; + t["\uFBFE"] = "\u06CC"; + t["\uFBFF"] = "\u06CC"; + t["\uFC00"] = "\u0626\u062C"; + t["\uFC01"] = "\u0626\u062D"; + t["\uFC02"] = "\u0626\u0645"; + t["\uFC03"] = "\u0626\u0649"; + t["\uFC04"] = "\u0626\u064A"; + t["\uFC05"] = "\u0628\u062C"; + t["\uFC06"] = "\u0628\u062D"; + t["\uFC07"] = "\u0628\u062E"; + t["\uFC08"] = "\u0628\u0645"; + t["\uFC09"] = "\u0628\u0649"; + t["\uFC0A"] = "\u0628\u064A"; + t["\uFC0B"] = "\u062A\u062C"; + t["\uFC0C"] = "\u062A\u062D"; + t["\uFC0D"] = "\u062A\u062E"; + t["\uFC0E"] = "\u062A\u0645"; + t["\uFC0F"] = "\u062A\u0649"; + t["\uFC10"] = "\u062A\u064A"; + t["\uFC11"] = "\u062B\u062C"; + t["\uFC12"] = "\u062B\u0645"; + t["\uFC13"] = "\u062B\u0649"; + t["\uFC14"] = "\u062B\u064A"; + t["\uFC15"] = "\u062C\u062D"; + t["\uFC16"] = "\u062C\u0645"; + t["\uFC17"] = "\u062D\u062C"; + t["\uFC18"] = "\u062D\u0645"; + t["\uFC19"] = "\u062E\u062C"; + t["\uFC1A"] = "\u062E\u062D"; + t["\uFC1B"] = "\u062E\u0645"; + t["\uFC1C"] = "\u0633\u062C"; + t["\uFC1D"] = "\u0633\u062D"; + t["\uFC1E"] = "\u0633\u062E"; + t["\uFC1F"] = "\u0633\u0645"; + t["\uFC20"] = "\u0635\u062D"; + t["\uFC21"] = "\u0635\u0645"; + t["\uFC22"] = "\u0636\u062C"; + t["\uFC23"] = "\u0636\u062D"; + t["\uFC24"] = "\u0636\u062E"; + t["\uFC25"] = "\u0636\u0645"; + t["\uFC26"] = "\u0637\u062D"; + t["\uFC27"] = "\u0637\u0645"; + t["\uFC28"] = "\u0638\u0645"; + t["\uFC29"] = "\u0639\u062C"; + t["\uFC2A"] = "\u0639\u0645"; + t["\uFC2B"] = "\u063A\u062C"; + t["\uFC2C"] = "\u063A\u0645"; + t["\uFC2D"] = "\u0641\u062C"; + t["\uFC2E"] = "\u0641\u062D"; + t["\uFC2F"] = "\u0641\u062E"; + t["\uFC30"] = "\u0641\u0645"; + t["\uFC31"] = "\u0641\u0649"; + t["\uFC32"] = "\u0641\u064A"; + t["\uFC33"] = "\u0642\u062D"; + t["\uFC34"] = "\u0642\u0645"; + t["\uFC35"] = "\u0642\u0649"; + t["\uFC36"] = "\u0642\u064A"; + t["\uFC37"] = "\u0643\u0627"; + t["\uFC38"] = "\u0643\u062C"; + t["\uFC39"] = "\u0643\u062D"; + t["\uFC3A"] = "\u0643\u062E"; + t["\uFC3B"] = "\u0643\u0644"; + t["\uFC3C"] = "\u0643\u0645"; + t["\uFC3D"] = "\u0643\u0649"; + t["\uFC3E"] = "\u0643\u064A"; + t["\uFC3F"] = "\u0644\u062C"; + t["\uFC40"] = "\u0644\u062D"; + t["\uFC41"] = "\u0644\u062E"; + t["\uFC42"] = "\u0644\u0645"; + t["\uFC43"] = "\u0644\u0649"; + t["\uFC44"] = "\u0644\u064A"; + t["\uFC45"] = "\u0645\u062C"; + t["\uFC46"] = "\u0645\u062D"; + t["\uFC47"] = "\u0645\u062E"; + t["\uFC48"] = "\u0645\u0645"; + t["\uFC49"] = "\u0645\u0649"; + t["\uFC4A"] = "\u0645\u064A"; + t["\uFC4B"] = "\u0646\u062C"; + t["\uFC4C"] = "\u0646\u062D"; + t["\uFC4D"] = "\u0646\u062E"; + t["\uFC4E"] = "\u0646\u0645"; + t["\uFC4F"] = "\u0646\u0649"; + t["\uFC50"] = "\u0646\u064A"; + t["\uFC51"] = "\u0647\u062C"; + t["\uFC52"] = "\u0647\u0645"; + t["\uFC53"] = "\u0647\u0649"; + t["\uFC54"] = "\u0647\u064A"; + t["\uFC55"] = "\u064A\u062C"; + t["\uFC56"] = "\u064A\u062D"; + t["\uFC57"] = "\u064A\u062E"; + t["\uFC58"] = "\u064A\u0645"; + t["\uFC59"] = "\u064A\u0649"; + t["\uFC5A"] = "\u064A\u064A"; + t["\uFC5B"] = "\u0630\u0670"; + t["\uFC5C"] = "\u0631\u0670"; + t["\uFC5D"] = "\u0649\u0670"; + t["\uFC5E"] = "\u0020\u064C\u0651"; + t["\uFC5F"] = "\u0020\u064D\u0651"; + t["\uFC60"] = "\u0020\u064E\u0651"; + t["\uFC61"] = "\u0020\u064F\u0651"; + t["\uFC62"] = "\u0020\u0650\u0651"; + t["\uFC63"] = "\u0020\u0651\u0670"; + t["\uFC64"] = "\u0626\u0631"; + t["\uFC65"] = "\u0626\u0632"; + t["\uFC66"] = "\u0626\u0645"; + t["\uFC67"] = "\u0626\u0646"; + t["\uFC68"] = "\u0626\u0649"; + t["\uFC69"] = "\u0626\u064A"; + t["\uFC6A"] = "\u0628\u0631"; + t["\uFC6B"] = "\u0628\u0632"; + t["\uFC6C"] = "\u0628\u0645"; + t["\uFC6D"] = "\u0628\u0646"; + t["\uFC6E"] = "\u0628\u0649"; + t["\uFC6F"] = "\u0628\u064A"; + t["\uFC70"] = "\u062A\u0631"; + t["\uFC71"] = "\u062A\u0632"; + t["\uFC72"] = "\u062A\u0645"; + t["\uFC73"] = "\u062A\u0646"; + t["\uFC74"] = "\u062A\u0649"; + t["\uFC75"] = "\u062A\u064A"; + t["\uFC76"] = "\u062B\u0631"; + t["\uFC77"] = "\u062B\u0632"; + t["\uFC78"] = "\u062B\u0645"; + t["\uFC79"] = "\u062B\u0646"; + t["\uFC7A"] = "\u062B\u0649"; + t["\uFC7B"] = "\u062B\u064A"; + t["\uFC7C"] = "\u0641\u0649"; + t["\uFC7D"] = "\u0641\u064A"; + t["\uFC7E"] = "\u0642\u0649"; + t["\uFC7F"] = "\u0642\u064A"; + t["\uFC80"] = "\u0643\u0627"; + t["\uFC81"] = "\u0643\u0644"; + t["\uFC82"] = "\u0643\u0645"; + t["\uFC83"] = "\u0643\u0649"; + t["\uFC84"] = "\u0643\u064A"; + t["\uFC85"] = "\u0644\u0645"; + t["\uFC86"] = "\u0644\u0649"; + t["\uFC87"] = "\u0644\u064A"; + t["\uFC88"] = "\u0645\u0627"; + t["\uFC89"] = "\u0645\u0645"; + t["\uFC8A"] = "\u0646\u0631"; + t["\uFC8B"] = "\u0646\u0632"; + t["\uFC8C"] = "\u0646\u0645"; + t["\uFC8D"] = "\u0646\u0646"; + t["\uFC8E"] = "\u0646\u0649"; + t["\uFC8F"] = "\u0646\u064A"; + t["\uFC90"] = "\u0649\u0670"; + t["\uFC91"] = "\u064A\u0631"; + t["\uFC92"] = "\u064A\u0632"; + t["\uFC93"] = "\u064A\u0645"; + t["\uFC94"] = "\u064A\u0646"; + t["\uFC95"] = "\u064A\u0649"; + t["\uFC96"] = "\u064A\u064A"; + t["\uFC97"] = "\u0626\u062C"; + t["\uFC98"] = "\u0626\u062D"; + t["\uFC99"] = "\u0626\u062E"; + t["\uFC9A"] = "\u0626\u0645"; + t["\uFC9B"] = "\u0626\u0647"; + t["\uFC9C"] = "\u0628\u062C"; + t["\uFC9D"] = "\u0628\u062D"; + t["\uFC9E"] = "\u0628\u062E"; + t["\uFC9F"] = "\u0628\u0645"; + t["\uFCA0"] = "\u0628\u0647"; + t["\uFCA1"] = "\u062A\u062C"; + t["\uFCA2"] = "\u062A\u062D"; + t["\uFCA3"] = "\u062A\u062E"; + t["\uFCA4"] = "\u062A\u0645"; + t["\uFCA5"] = "\u062A\u0647"; + t["\uFCA6"] = "\u062B\u0645"; + t["\uFCA7"] = "\u062C\u062D"; + t["\uFCA8"] = "\u062C\u0645"; + t["\uFCA9"] = "\u062D\u062C"; + t["\uFCAA"] = "\u062D\u0645"; + t["\uFCAB"] = "\u062E\u062C"; + t["\uFCAC"] = "\u062E\u0645"; + t["\uFCAD"] = "\u0633\u062C"; + t["\uFCAE"] = "\u0633\u062D"; + t["\uFCAF"] = "\u0633\u062E"; + t["\uFCB0"] = "\u0633\u0645"; + t["\uFCB1"] = "\u0635\u062D"; + t["\uFCB2"] = "\u0635\u062E"; + t["\uFCB3"] = "\u0635\u0645"; + t["\uFCB4"] = "\u0636\u062C"; + t["\uFCB5"] = "\u0636\u062D"; + t["\uFCB6"] = "\u0636\u062E"; + t["\uFCB7"] = "\u0636\u0645"; + t["\uFCB8"] = "\u0637\u062D"; + t["\uFCB9"] = "\u0638\u0645"; + t["\uFCBA"] = "\u0639\u062C"; + t["\uFCBB"] = "\u0639\u0645"; + t["\uFCBC"] = "\u063A\u062C"; + t["\uFCBD"] = "\u063A\u0645"; + t["\uFCBE"] = "\u0641\u062C"; + t["\uFCBF"] = "\u0641\u062D"; + t["\uFCC0"] = "\u0641\u062E"; + t["\uFCC1"] = "\u0641\u0645"; + t["\uFCC2"] = "\u0642\u062D"; + t["\uFCC3"] = "\u0642\u0645"; + t["\uFCC4"] = "\u0643\u062C"; + t["\uFCC5"] = "\u0643\u062D"; + t["\uFCC6"] = "\u0643\u062E"; + t["\uFCC7"] = "\u0643\u0644"; + t["\uFCC8"] = "\u0643\u0645"; + t["\uFCC9"] = "\u0644\u062C"; + t["\uFCCA"] = "\u0644\u062D"; + t["\uFCCB"] = "\u0644\u062E"; + t["\uFCCC"] = "\u0644\u0645"; + t["\uFCCD"] = "\u0644\u0647"; + t["\uFCCE"] = "\u0645\u062C"; + t["\uFCCF"] = "\u0645\u062D"; + t["\uFCD0"] = "\u0645\u062E"; + t["\uFCD1"] = "\u0645\u0645"; + t["\uFCD2"] = "\u0646\u062C"; + t["\uFCD3"] = "\u0646\u062D"; + t["\uFCD4"] = "\u0646\u062E"; + t["\uFCD5"] = "\u0646\u0645"; + t["\uFCD6"] = "\u0646\u0647"; + t["\uFCD7"] = "\u0647\u062C"; + t["\uFCD8"] = "\u0647\u0645"; + t["\uFCD9"] = "\u0647\u0670"; + t["\uFCDA"] = "\u064A\u062C"; + t["\uFCDB"] = "\u064A\u062D"; + t["\uFCDC"] = "\u064A\u062E"; + t["\uFCDD"] = "\u064A\u0645"; + t["\uFCDE"] = "\u064A\u0647"; + t["\uFCDF"] = "\u0626\u0645"; + t["\uFCE0"] = "\u0626\u0647"; + t["\uFCE1"] = "\u0628\u0645"; + t["\uFCE2"] = "\u0628\u0647"; + t["\uFCE3"] = "\u062A\u0645"; + t["\uFCE4"] = "\u062A\u0647"; + t["\uFCE5"] = "\u062B\u0645"; + t["\uFCE6"] = "\u062B\u0647"; + t["\uFCE7"] = "\u0633\u0645"; + t["\uFCE8"] = "\u0633\u0647"; + t["\uFCE9"] = "\u0634\u0645"; + t["\uFCEA"] = "\u0634\u0647"; + t["\uFCEB"] = "\u0643\u0644"; + t["\uFCEC"] = "\u0643\u0645"; + t["\uFCED"] = "\u0644\u0645"; + t["\uFCEE"] = "\u0646\u0645"; + t["\uFCEF"] = "\u0646\u0647"; + t["\uFCF0"] = "\u064A\u0645"; + t["\uFCF1"] = "\u064A\u0647"; + t["\uFCF2"] = "\u0640\u064E\u0651"; + t["\uFCF3"] = "\u0640\u064F\u0651"; + t["\uFCF4"] = "\u0640\u0650\u0651"; + t["\uFCF5"] = "\u0637\u0649"; + t["\uFCF6"] = "\u0637\u064A"; + t["\uFCF7"] = "\u0639\u0649"; + t["\uFCF8"] = "\u0639\u064A"; + t["\uFCF9"] = "\u063A\u0649"; + t["\uFCFA"] = "\u063A\u064A"; + t["\uFCFB"] = "\u0633\u0649"; + t["\uFCFC"] = "\u0633\u064A"; + t["\uFCFD"] = "\u0634\u0649"; + t["\uFCFE"] = "\u0634\u064A"; + t["\uFCFF"] = "\u062D\u0649"; + t["\uFD00"] = "\u062D\u064A"; + t["\uFD01"] = "\u062C\u0649"; + t["\uFD02"] = "\u062C\u064A"; + t["\uFD03"] = "\u062E\u0649"; + t["\uFD04"] = "\u062E\u064A"; + t["\uFD05"] = "\u0635\u0649"; + t["\uFD06"] = "\u0635\u064A"; + t["\uFD07"] = "\u0636\u0649"; + t["\uFD08"] = "\u0636\u064A"; + t["\uFD09"] = "\u0634\u062C"; + t["\uFD0A"] = "\u0634\u062D"; + t["\uFD0B"] = "\u0634\u062E"; + t["\uFD0C"] = "\u0634\u0645"; + t["\uFD0D"] = "\u0634\u0631"; + t["\uFD0E"] = "\u0633\u0631"; + t["\uFD0F"] = "\u0635\u0631"; + t["\uFD10"] = "\u0636\u0631"; + t["\uFD11"] = "\u0637\u0649"; + t["\uFD12"] = "\u0637\u064A"; + t["\uFD13"] = "\u0639\u0649"; + t["\uFD14"] = "\u0639\u064A"; + t["\uFD15"] = "\u063A\u0649"; + t["\uFD16"] = "\u063A\u064A"; + t["\uFD17"] = "\u0633\u0649"; + t["\uFD18"] = "\u0633\u064A"; + t["\uFD19"] = "\u0634\u0649"; + t["\uFD1A"] = "\u0634\u064A"; + t["\uFD1B"] = "\u062D\u0649"; + t["\uFD1C"] = "\u062D\u064A"; + t["\uFD1D"] = "\u062C\u0649"; + t["\uFD1E"] = "\u062C\u064A"; + t["\uFD1F"] = "\u062E\u0649"; + t["\uFD20"] = "\u062E\u064A"; + t["\uFD21"] = "\u0635\u0649"; + t["\uFD22"] = "\u0635\u064A"; + t["\uFD23"] = "\u0636\u0649"; + t["\uFD24"] = "\u0636\u064A"; + t["\uFD25"] = "\u0634\u062C"; + t["\uFD26"] = "\u0634\u062D"; + t["\uFD27"] = "\u0634\u062E"; + t["\uFD28"] = "\u0634\u0645"; + t["\uFD29"] = "\u0634\u0631"; + t["\uFD2A"] = "\u0633\u0631"; + t["\uFD2B"] = "\u0635\u0631"; + t["\uFD2C"] = "\u0636\u0631"; + t["\uFD2D"] = "\u0634\u062C"; + t["\uFD2E"] = "\u0634\u062D"; + t["\uFD2F"] = "\u0634\u062E"; + t["\uFD30"] = "\u0634\u0645"; + t["\uFD31"] = "\u0633\u0647"; + t["\uFD32"] = "\u0634\u0647"; + t["\uFD33"] = "\u0637\u0645"; + t["\uFD34"] = "\u0633\u062C"; + t["\uFD35"] = "\u0633\u062D"; + t["\uFD36"] = "\u0633\u062E"; + t["\uFD37"] = "\u0634\u062C"; + t["\uFD38"] = "\u0634\u062D"; + t["\uFD39"] = "\u0634\u062E"; + t["\uFD3A"] = "\u0637\u0645"; + t["\uFD3B"] = "\u0638\u0645"; + t["\uFD3C"] = "\u0627\u064B"; + t["\uFD3D"] = "\u0627\u064B"; + t["\uFD50"] = "\u062A\u062C\u0645"; + t["\uFD51"] = "\u062A\u062D\u062C"; + t["\uFD52"] = "\u062A\u062D\u062C"; + t["\uFD53"] = "\u062A\u062D\u0645"; + t["\uFD54"] = "\u062A\u062E\u0645"; + t["\uFD55"] = "\u062A\u0645\u062C"; + t["\uFD56"] = "\u062A\u0645\u062D"; + t["\uFD57"] = "\u062A\u0645\u062E"; + t["\uFD58"] = "\u062C\u0645\u062D"; + t["\uFD59"] = "\u062C\u0645\u062D"; + t["\uFD5A"] = "\u062D\u0645\u064A"; + t["\uFD5B"] = "\u062D\u0645\u0649"; + t["\uFD5C"] = "\u0633\u062D\u062C"; + t["\uFD5D"] = "\u0633\u062C\u062D"; + t["\uFD5E"] = "\u0633\u062C\u0649"; + t["\uFD5F"] = "\u0633\u0645\u062D"; + t["\uFD60"] = "\u0633\u0645\u062D"; + t["\uFD61"] = "\u0633\u0645\u062C"; + t["\uFD62"] = "\u0633\u0645\u0645"; + t["\uFD63"] = "\u0633\u0645\u0645"; + t["\uFD64"] = "\u0635\u062D\u062D"; + t["\uFD65"] = "\u0635\u062D\u062D"; + t["\uFD66"] = "\u0635\u0645\u0645"; + t["\uFD67"] = "\u0634\u062D\u0645"; + t["\uFD68"] = "\u0634\u062D\u0645"; + t["\uFD69"] = "\u0634\u062C\u064A"; + t["\uFD6A"] = "\u0634\u0645\u062E"; + t["\uFD6B"] = "\u0634\u0645\u062E"; + t["\uFD6C"] = "\u0634\u0645\u0645"; + t["\uFD6D"] = "\u0634\u0645\u0645"; + t["\uFD6E"] = "\u0636\u062D\u0649"; + t["\uFD6F"] = "\u0636\u062E\u0645"; + t["\uFD70"] = "\u0636\u062E\u0645"; + t["\uFD71"] = "\u0637\u0645\u062D"; + t["\uFD72"] = "\u0637\u0645\u062D"; + t["\uFD73"] = "\u0637\u0645\u0645"; + t["\uFD74"] = "\u0637\u0645\u064A"; + t["\uFD75"] = "\u0639\u062C\u0645"; + t["\uFD76"] = "\u0639\u0645\u0645"; + t["\uFD77"] = "\u0639\u0645\u0645"; + t["\uFD78"] = "\u0639\u0645\u0649"; + t["\uFD79"] = "\u063A\u0645\u0645"; + t["\uFD7A"] = "\u063A\u0645\u064A"; + t["\uFD7B"] = "\u063A\u0645\u0649"; + t["\uFD7C"] = "\u0641\u062E\u0645"; + t["\uFD7D"] = "\u0641\u062E\u0645"; + t["\uFD7E"] = "\u0642\u0645\u062D"; + t["\uFD7F"] = "\u0642\u0645\u0645"; + t["\uFD80"] = "\u0644\u062D\u0645"; + t["\uFD81"] = "\u0644\u062D\u064A"; + t["\uFD82"] = "\u0644\u062D\u0649"; + t["\uFD83"] = "\u0644\u062C\u062C"; + t["\uFD84"] = "\u0644\u062C\u062C"; + t["\uFD85"] = "\u0644\u062E\u0645"; + t["\uFD86"] = "\u0644\u062E\u0645"; + t["\uFD87"] = "\u0644\u0645\u062D"; + t["\uFD88"] = "\u0644\u0645\u062D"; + t["\uFD89"] = "\u0645\u062D\u062C"; + t["\uFD8A"] = "\u0645\u062D\u0645"; + t["\uFD8B"] = "\u0645\u062D\u064A"; + t["\uFD8C"] = "\u0645\u062C\u062D"; + t["\uFD8D"] = "\u0645\u062C\u0645"; + t["\uFD8E"] = "\u0645\u062E\u062C"; + t["\uFD8F"] = "\u0645\u062E\u0645"; + t["\uFD92"] = "\u0645\u062C\u062E"; + t["\uFD93"] = "\u0647\u0645\u062C"; + t["\uFD94"] = "\u0647\u0645\u0645"; + t["\uFD95"] = "\u0646\u062D\u0645"; + t["\uFD96"] = "\u0646\u062D\u0649"; + t["\uFD97"] = "\u0646\u062C\u0645"; + t["\uFD98"] = "\u0646\u062C\u0645"; + t["\uFD99"] = "\u0646\u062C\u0649"; + t["\uFD9A"] = "\u0646\u0645\u064A"; + t["\uFD9B"] = "\u0646\u0645\u0649"; + t["\uFD9C"] = "\u064A\u0645\u0645"; + t["\uFD9D"] = "\u064A\u0645\u0645"; + t["\uFD9E"] = "\u0628\u062E\u064A"; + t["\uFD9F"] = "\u062A\u062C\u064A"; + t["\uFDA0"] = "\u062A\u062C\u0649"; + t["\uFDA1"] = "\u062A\u062E\u064A"; + t["\uFDA2"] = "\u062A\u062E\u0649"; + t["\uFDA3"] = "\u062A\u0645\u064A"; + t["\uFDA4"] = "\u062A\u0645\u0649"; + t["\uFDA5"] = "\u062C\u0645\u064A"; + t["\uFDA6"] = "\u062C\u062D\u0649"; + t["\uFDA7"] = "\u062C\u0645\u0649"; + t["\uFDA8"] = "\u0633\u062E\u0649"; + t["\uFDA9"] = "\u0635\u062D\u064A"; + t["\uFDAA"] = "\u0634\u062D\u064A"; + t["\uFDAB"] = "\u0636\u062D\u064A"; + t["\uFDAC"] = "\u0644\u062C\u064A"; + t["\uFDAD"] = "\u0644\u0645\u064A"; + t["\uFDAE"] = "\u064A\u062D\u064A"; + t["\uFDAF"] = "\u064A\u062C\u064A"; + t["\uFDB0"] = "\u064A\u0645\u064A"; + t["\uFDB1"] = "\u0645\u0645\u064A"; + t["\uFDB2"] = "\u0642\u0645\u064A"; + t["\uFDB3"] = "\u0646\u062D\u064A"; + t["\uFDB4"] = "\u0642\u0645\u062D"; + t["\uFDB5"] = "\u0644\u062D\u0645"; + t["\uFDB6"] = "\u0639\u0645\u064A"; + t["\uFDB7"] = "\u0643\u0645\u064A"; + t["\uFDB8"] = "\u0646\u062C\u062D"; + t["\uFDB9"] = "\u0645\u062E\u064A"; + t["\uFDBA"] = "\u0644\u062C\u0645"; + t["\uFDBB"] = "\u0643\u0645\u0645"; + t["\uFDBC"] = "\u0644\u062C\u0645"; + t["\uFDBD"] = "\u0646\u062C\u062D"; + t["\uFDBE"] = "\u062C\u062D\u064A"; + t["\uFDBF"] = "\u062D\u062C\u064A"; + t["\uFDC0"] = "\u0645\u062C\u064A"; + t["\uFDC1"] = "\u0641\u0645\u064A"; + t["\uFDC2"] = "\u0628\u062D\u064A"; + t["\uFDC3"] = "\u0643\u0645\u0645"; + t["\uFDC4"] = "\u0639\u062C\u0645"; + t["\uFDC5"] = "\u0635\u0645\u0645"; + t["\uFDC6"] = "\u0633\u062E\u064A"; + t["\uFDC7"] = "\u0646\u062C\u064A"; + t["\uFE49"] = "\u203E"; + t["\uFE4A"] = "\u203E"; + t["\uFE4B"] = "\u203E"; + t["\uFE4C"] = "\u203E"; + t["\uFE4D"] = "\u005F"; + t["\uFE4E"] = "\u005F"; + t["\uFE4F"] = "\u005F"; + t["\uFE80"] = "\u0621"; + t["\uFE81"] = "\u0622"; + t["\uFE82"] = "\u0622"; + t["\uFE83"] = "\u0623"; + t["\uFE84"] = "\u0623"; + t["\uFE85"] = "\u0624"; + t["\uFE86"] = "\u0624"; + t["\uFE87"] = "\u0625"; + t["\uFE88"] = "\u0625"; + t["\uFE89"] = "\u0626"; + t["\uFE8A"] = "\u0626"; + t["\uFE8B"] = "\u0626"; + t["\uFE8C"] = "\u0626"; + t["\uFE8D"] = "\u0627"; + t["\uFE8E"] = "\u0627"; + t["\uFE8F"] = "\u0628"; + t["\uFE90"] = "\u0628"; + t["\uFE91"] = "\u0628"; + t["\uFE92"] = "\u0628"; + t["\uFE93"] = "\u0629"; + t["\uFE94"] = "\u0629"; + t["\uFE95"] = "\u062A"; + t["\uFE96"] = "\u062A"; + t["\uFE97"] = "\u062A"; + t["\uFE98"] = "\u062A"; + t["\uFE99"] = "\u062B"; + t["\uFE9A"] = "\u062B"; + t["\uFE9B"] = "\u062B"; + t["\uFE9C"] = "\u062B"; + t["\uFE9D"] = "\u062C"; + t["\uFE9E"] = "\u062C"; + t["\uFE9F"] = "\u062C"; + t["\uFEA0"] = "\u062C"; + t["\uFEA1"] = "\u062D"; + t["\uFEA2"] = "\u062D"; + t["\uFEA3"] = "\u062D"; + t["\uFEA4"] = "\u062D"; + t["\uFEA5"] = "\u062E"; + t["\uFEA6"] = "\u062E"; + t["\uFEA7"] = "\u062E"; + t["\uFEA8"] = "\u062E"; + t["\uFEA9"] = "\u062F"; + t["\uFEAA"] = "\u062F"; + t["\uFEAB"] = "\u0630"; + t["\uFEAC"] = "\u0630"; + t["\uFEAD"] = "\u0631"; + t["\uFEAE"] = "\u0631"; + t["\uFEAF"] = "\u0632"; + t["\uFEB0"] = "\u0632"; + t["\uFEB1"] = "\u0633"; + t["\uFEB2"] = "\u0633"; + t["\uFEB3"] = "\u0633"; + t["\uFEB4"] = "\u0633"; + t["\uFEB5"] = "\u0634"; + t["\uFEB6"] = "\u0634"; + t["\uFEB7"] = "\u0634"; + t["\uFEB8"] = "\u0634"; + t["\uFEB9"] = "\u0635"; + t["\uFEBA"] = "\u0635"; + t["\uFEBB"] = "\u0635"; + t["\uFEBC"] = "\u0635"; + t["\uFEBD"] = "\u0636"; + t["\uFEBE"] = "\u0636"; + t["\uFEBF"] = "\u0636"; + t["\uFEC0"] = "\u0636"; + t["\uFEC1"] = "\u0637"; + t["\uFEC2"] = "\u0637"; + t["\uFEC3"] = "\u0637"; + t["\uFEC4"] = "\u0637"; + t["\uFEC5"] = "\u0638"; + t["\uFEC6"] = "\u0638"; + t["\uFEC7"] = "\u0638"; + t["\uFEC8"] = "\u0638"; + t["\uFEC9"] = "\u0639"; + t["\uFECA"] = "\u0639"; + t["\uFECB"] = "\u0639"; + t["\uFECC"] = "\u0639"; + t["\uFECD"] = "\u063A"; + t["\uFECE"] = "\u063A"; + t["\uFECF"] = "\u063A"; + t["\uFED0"] = "\u063A"; + t["\uFED1"] = "\u0641"; + t["\uFED2"] = "\u0641"; + t["\uFED3"] = "\u0641"; + t["\uFED4"] = "\u0641"; + t["\uFED5"] = "\u0642"; + t["\uFED6"] = "\u0642"; + t["\uFED7"] = "\u0642"; + t["\uFED8"] = "\u0642"; + t["\uFED9"] = "\u0643"; + t["\uFEDA"] = "\u0643"; + t["\uFEDB"] = "\u0643"; + t["\uFEDC"] = "\u0643"; + t["\uFEDD"] = "\u0644"; + t["\uFEDE"] = "\u0644"; + t["\uFEDF"] = "\u0644"; + t["\uFEE0"] = "\u0644"; + t["\uFEE1"] = "\u0645"; + t["\uFEE2"] = "\u0645"; + t["\uFEE3"] = "\u0645"; + t["\uFEE4"] = "\u0645"; + t["\uFEE5"] = "\u0646"; + t["\uFEE6"] = "\u0646"; + t["\uFEE7"] = "\u0646"; + t["\uFEE8"] = "\u0646"; + t["\uFEE9"] = "\u0647"; + t["\uFEEA"] = "\u0647"; + t["\uFEEB"] = "\u0647"; + t["\uFEEC"] = "\u0647"; + t["\uFEED"] = "\u0648"; + t["\uFEEE"] = "\u0648"; + t["\uFEEF"] = "\u0649"; + t["\uFEF0"] = "\u0649"; + t["\uFEF1"] = "\u064A"; + t["\uFEF2"] = "\u064A"; + t["\uFEF3"] = "\u064A"; + t["\uFEF4"] = "\u064A"; + t["\uFEF5"] = "\u0644\u0622"; + t["\uFEF6"] = "\u0644\u0622"; + t["\uFEF7"] = "\u0644\u0623"; + t["\uFEF8"] = "\u0644\u0623"; + t["\uFEF9"] = "\u0644\u0625"; + t["\uFEFA"] = "\u0644\u0625"; + t["\uFEFB"] = "\u0644\u0627"; + t["\uFEFC"] = "\u0644\u0627"; +}); +function reverseIfRtl(chars) { + var charsLength = chars.length; + if (charsLength <= 1 || !isRTLRangeFor(chars.charCodeAt(0))) { + return chars; + } + var s = ""; + for (var ii = charsLength - 1; ii >= 0; ii--) { + s += chars[ii]; + } + return s; +} +exports.mapSpecialUnicodeValues = mapSpecialUnicodeValues; +exports.reverseIfRtl = reverseIfRtl; +exports.getUnicodeRangeFor = getUnicodeRangeFor; +exports.getNormalizedUnicodes = getNormalizedUnicodes; +exports.getUnicodeForGlyph = getUnicodeForGlyph; + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.FontRendererFactory = void 0; + +var _util = __w_pdfjs_require__(2); + +var _cff_parser = __w_pdfjs_require__(30); + +var _glyphlist = __w_pdfjs_require__(33); + +var _encodings = __w_pdfjs_require__(32); + +var _stream = __w_pdfjs_require__(12); + +var FontRendererFactory = function FontRendererFactoryClosure() { + function getLong(data, offset) { + return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; + } + + function getUshort(data, offset) { + return data[offset] << 8 | data[offset + 1]; + } + + function getSubroutineBias(subrs) { + const numSubrs = subrs.length; + let bias = 32768; + + if (numSubrs < 1240) { + bias = 107; + } else if (numSubrs < 33900) { + bias = 1131; + } + + return bias; + } + + function parseCmap(data, start, end) { + var offset = getUshort(data, start + 2) === 1 ? getLong(data, start + 8) : getLong(data, start + 16); + var format = getUshort(data, start + offset); + var ranges, p, i; + + if (format === 4) { + getUshort(data, start + offset + 2); + var segCount = getUshort(data, start + offset + 6) >> 1; + p = start + offset + 14; + ranges = []; + + for (i = 0; i < segCount; i++, p += 2) { + ranges[i] = { + end: getUshort(data, p) + }; + } + + p += 2; + + for (i = 0; i < segCount; i++, p += 2) { + ranges[i].start = getUshort(data, p); + } + + for (i = 0; i < segCount; i++, p += 2) { + ranges[i].idDelta = getUshort(data, p); + } + + for (i = 0; i < segCount; i++, p += 2) { + var idOffset = getUshort(data, p); + + if (idOffset === 0) { + continue; + } + + ranges[i].ids = []; + + for (var j = 0, jj = ranges[i].end - ranges[i].start + 1; j < jj; j++) { + ranges[i].ids[j] = getUshort(data, p + idOffset); + idOffset += 2; + } + } + + return ranges; + } else if (format === 12) { + getLong(data, start + offset + 4); + var groups = getLong(data, start + offset + 12); + p = start + offset + 16; + ranges = []; + + for (i = 0; i < groups; i++) { + ranges.push({ + start: getLong(data, p), + end: getLong(data, p + 4), + idDelta: getLong(data, p + 8) - getLong(data, p) + }); + p += 12; + } + + return ranges; + } + + throw new _util.FormatError(`unsupported cmap: ${format}`); + } + + function parseCff(data, start, end, seacAnalysisEnabled) { + var properties = {}; + var parser = new _cff_parser.CFFParser(new _stream.Stream(data, start, end - start), properties, seacAnalysisEnabled); + var cff = parser.parse(); + return { + glyphs: cff.charStrings.objects, + subrs: cff.topDict.privateDict && cff.topDict.privateDict.subrsIndex && cff.topDict.privateDict.subrsIndex.objects, + gsubrs: cff.globalSubrIndex && cff.globalSubrIndex.objects, + isCFFCIDFont: cff.isCIDFont, + fdSelect: cff.fdSelect, + fdArray: cff.fdArray + }; + } + + function parseGlyfTable(glyf, loca, isGlyphLocationsLong) { + var itemSize, itemDecode; + + if (isGlyphLocationsLong) { + itemSize = 4; + + itemDecode = function fontItemDecodeLong(data, offset) { + return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; + }; + } else { + itemSize = 2; + + itemDecode = function fontItemDecode(data, offset) { + return data[offset] << 9 | data[offset + 1] << 1; + }; + } + + var glyphs = []; + var startOffset = itemDecode(loca, 0); + + for (var j = itemSize; j < loca.length; j += itemSize) { + var endOffset = itemDecode(loca, j); + glyphs.push(glyf.subarray(startOffset, endOffset)); + startOffset = endOffset; + } + + return glyphs; + } + + function lookupCmap(ranges, unicode) { + var code = unicode.codePointAt(0), + gid = 0; + var l = 0, + r = ranges.length - 1; + + while (l < r) { + var c = l + r + 1 >> 1; + + if (code < ranges[c].start) { + r = c - 1; + } else { + l = c; + } + } + + if (ranges[l].start <= code && code <= ranges[l].end) { + gid = ranges[l].idDelta + (ranges[l].ids ? ranges[l].ids[code - ranges[l].start] : code) & 0xffff; + } + + return { + charCode: code, + glyphId: gid + }; + } + + function compileGlyf(code, cmds, font) { + function moveTo(x, y) { + cmds.push({ + cmd: "moveTo", + args: [x, y] + }); + } + + function lineTo(x, y) { + cmds.push({ + cmd: "lineTo", + args: [x, y] + }); + } + + function quadraticCurveTo(xa, ya, x, y) { + cmds.push({ + cmd: "quadraticCurveTo", + args: [xa, ya, x, y] + }); + } + + var i = 0; + var numberOfContours = (code[i] << 24 | code[i + 1] << 16) >> 16; + var flags; + var x = 0, + y = 0; + i += 10; + + if (numberOfContours < 0) { + do { + flags = code[i] << 8 | code[i + 1]; + var glyphIndex = code[i + 2] << 8 | code[i + 3]; + i += 4; + var arg1, arg2; + + if (flags & 0x01) { + arg1 = (code[i] << 24 | code[i + 1] << 16) >> 16; + arg2 = (code[i + 2] << 24 | code[i + 3] << 16) >> 16; + i += 4; + } else { + arg1 = code[i++]; + arg2 = code[i++]; + } + + if (flags & 0x02) { + x = arg1; + y = arg2; + } else { + x = 0; + y = 0; + } + + var scaleX = 1, + scaleY = 1, + scale01 = 0, + scale10 = 0; + + if (flags & 0x08) { + scaleX = scaleY = (code[i] << 24 | code[i + 1] << 16) / 1073741824; + i += 2; + } else if (flags & 0x40) { + scaleX = (code[i] << 24 | code[i + 1] << 16) / 1073741824; + scaleY = (code[i + 2] << 24 | code[i + 3] << 16) / 1073741824; + i += 4; + } else if (flags & 0x80) { + scaleX = (code[i] << 24 | code[i + 1] << 16) / 1073741824; + scale01 = (code[i + 2] << 24 | code[i + 3] << 16) / 1073741824; + scale10 = (code[i + 4] << 24 | code[i + 5] << 16) / 1073741824; + scaleY = (code[i + 6] << 24 | code[i + 7] << 16) / 1073741824; + i += 8; + } + + var subglyph = font.glyphs[glyphIndex]; + + if (subglyph) { + cmds.push({ + cmd: "save" + }); + cmds.push({ + cmd: "transform", + args: [scaleX, scale01, scale10, scaleY, x, y] + }); + compileGlyf(subglyph, cmds, font); + cmds.push({ + cmd: "restore" + }); + } + } while (flags & 0x20); + } else { + var endPtsOfContours = []; + var j, jj; + + for (j = 0; j < numberOfContours; j++) { + endPtsOfContours.push(code[i] << 8 | code[i + 1]); + i += 2; + } + + var instructionLength = code[i] << 8 | code[i + 1]; + i += 2 + instructionLength; + var numberOfPoints = endPtsOfContours[endPtsOfContours.length - 1] + 1; + var points = []; + + while (points.length < numberOfPoints) { + flags = code[i++]; + var repeat = 1; + + if (flags & 0x08) { + repeat += code[i++]; + } + + while (repeat-- > 0) { + points.push({ + flags + }); + } + } + + for (j = 0; j < numberOfPoints; j++) { + switch (points[j].flags & 0x12) { + case 0x00: + x += (code[i] << 24 | code[i + 1] << 16) >> 16; + i += 2; + break; + + case 0x02: + x -= code[i++]; + break; + + case 0x12: + x += code[i++]; + break; + } + + points[j].x = x; + } + + for (j = 0; j < numberOfPoints; j++) { + switch (points[j].flags & 0x24) { + case 0x00: + y += (code[i] << 24 | code[i + 1] << 16) >> 16; + i += 2; + break; + + case 0x04: + y -= code[i++]; + break; + + case 0x24: + y += code[i++]; + break; + } + + points[j].y = y; + } + + var startPoint = 0; + + for (i = 0; i < numberOfContours; i++) { + var endPoint = endPtsOfContours[i]; + var contour = points.slice(startPoint, endPoint + 1); + + if (contour[0].flags & 1) { + contour.push(contour[0]); + } else if (contour[contour.length - 1].flags & 1) { + contour.unshift(contour[contour.length - 1]); + } else { + var p = { + flags: 1, + x: (contour[0].x + contour[contour.length - 1].x) / 2, + y: (contour[0].y + contour[contour.length - 1].y) / 2 + }; + contour.unshift(p); + contour.push(p); + } + + moveTo(contour[0].x, contour[0].y); + + for (j = 1, jj = contour.length; j < jj; j++) { + if (contour[j].flags & 1) { + lineTo(contour[j].x, contour[j].y); + } else if (contour[j + 1].flags & 1) { + quadraticCurveTo(contour[j].x, contour[j].y, contour[j + 1].x, contour[j + 1].y); + j++; + } else { + quadraticCurveTo(contour[j].x, contour[j].y, (contour[j].x + contour[j + 1].x) / 2, (contour[j].y + contour[j + 1].y) / 2); + } + } + + startPoint = endPoint + 1; + } + } + } + + function compileCharString(charStringCode, cmds, font, glyphId) { + function moveTo(x, y) { + cmds.push({ + cmd: "moveTo", + args: [x, y] + }); + } + + function lineTo(x, y) { + cmds.push({ + cmd: "lineTo", + args: [x, y] + }); + } + + function bezierCurveTo(x1, y1, x2, y2, x, y) { + cmds.push({ + cmd: "bezierCurveTo", + args: [x1, y1, x2, y2, x, y] + }); + } + + var stack = []; + var x = 0, + y = 0; + var stems = 0; + + function parse(code) { + var i = 0; + + while (i < code.length) { + var stackClean = false; + var v = code[i++]; + var xa, xb, ya, yb, y1, y2, y3, n, subrCode; + + switch (v) { + case 1: + stems += stack.length >> 1; + stackClean = true; + break; + + case 3: + stems += stack.length >> 1; + stackClean = true; + break; + + case 4: + y += stack.pop(); + moveTo(x, y); + stackClean = true; + break; + + case 5: + while (stack.length > 0) { + x += stack.shift(); + y += stack.shift(); + lineTo(x, y); + } + + break; + + case 6: + while (stack.length > 0) { + x += stack.shift(); + lineTo(x, y); + + if (stack.length === 0) { + break; + } + + y += stack.shift(); + lineTo(x, y); + } + + break; + + case 7: + while (stack.length > 0) { + y += stack.shift(); + lineTo(x, y); + + if (stack.length === 0) { + break; + } + + x += stack.shift(); + lineTo(x, y); + } + + break; + + case 8: + while (stack.length > 0) { + xa = x + stack.shift(); + ya = y + stack.shift(); + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb + stack.shift(); + y = yb + stack.shift(); + bezierCurveTo(xa, ya, xb, yb, x, y); + } + + break; + + case 10: + n = stack.pop(); + subrCode = null; + + if (font.isCFFCIDFont) { + const fdIndex = font.fdSelect.getFDIndex(glyphId); + + if (fdIndex >= 0 && fdIndex < font.fdArray.length) { + const fontDict = font.fdArray[fdIndex]; + let subrs; + + if (fontDict.privateDict && fontDict.privateDict.subrsIndex) { + subrs = fontDict.privateDict.subrsIndex.objects; + } + + if (subrs) { + n += getSubroutineBias(subrs); + subrCode = subrs[n]; + } + } else { + (0, _util.warn)("Invalid fd index for glyph index."); + } + } else { + subrCode = font.subrs[n + font.subrsBias]; + } + + if (subrCode) { + parse(subrCode); + } + + break; + + case 11: + return; + + case 12: + v = code[i++]; + + switch (v) { + case 34: + xa = x + stack.shift(); + xb = xa + stack.shift(); + y1 = y + stack.shift(); + x = xb + stack.shift(); + bezierCurveTo(xa, y, xb, y1, x, y1); + xa = x + stack.shift(); + xb = xa + stack.shift(); + x = xb + stack.shift(); + bezierCurveTo(xa, y1, xb, y, x, y); + break; + + case 35: + xa = x + stack.shift(); + ya = y + stack.shift(); + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb + stack.shift(); + y = yb + stack.shift(); + bezierCurveTo(xa, ya, xb, yb, x, y); + xa = x + stack.shift(); + ya = y + stack.shift(); + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb + stack.shift(); + y = yb + stack.shift(); + bezierCurveTo(xa, ya, xb, yb, x, y); + stack.pop(); + break; + + case 36: + xa = x + stack.shift(); + y1 = y + stack.shift(); + xb = xa + stack.shift(); + y2 = y1 + stack.shift(); + x = xb + stack.shift(); + bezierCurveTo(xa, y1, xb, y2, x, y2); + xa = x + stack.shift(); + xb = xa + stack.shift(); + y3 = y2 + stack.shift(); + x = xb + stack.shift(); + bezierCurveTo(xa, y2, xb, y3, x, y); + break; + + case 37: + var x0 = x, + y0 = y; + xa = x + stack.shift(); + ya = y + stack.shift(); + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb + stack.shift(); + y = yb + stack.shift(); + bezierCurveTo(xa, ya, xb, yb, x, y); + xa = x + stack.shift(); + ya = y + stack.shift(); + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb; + y = yb; + + if (Math.abs(x - x0) > Math.abs(y - y0)) { + x += stack.shift(); + } else { + y += stack.shift(); + } + + bezierCurveTo(xa, ya, xb, yb, x, y); + break; + + default: + throw new _util.FormatError(`unknown operator: 12 ${v}`); + } + + break; + + case 14: + if (stack.length >= 4) { + var achar = stack.pop(); + var bchar = stack.pop(); + y = stack.pop(); + x = stack.pop(); + cmds.push({ + cmd: "save" + }); + cmds.push({ + cmd: "translate", + args: [x, y] + }); + var cmap = lookupCmap(font.cmap, String.fromCharCode(font.glyphNameMap[_encodings.StandardEncoding[achar]])); + compileCharString(font.glyphs[cmap.glyphId], cmds, font, cmap.glyphId); + cmds.push({ + cmd: "restore" + }); + cmap = lookupCmap(font.cmap, String.fromCharCode(font.glyphNameMap[_encodings.StandardEncoding[bchar]])); + compileCharString(font.glyphs[cmap.glyphId], cmds, font, cmap.glyphId); + } + + return; + + case 18: + stems += stack.length >> 1; + stackClean = true; + break; + + case 19: + stems += stack.length >> 1; + i += stems + 7 >> 3; + stackClean = true; + break; + + case 20: + stems += stack.length >> 1; + i += stems + 7 >> 3; + stackClean = true; + break; + + case 21: + y += stack.pop(); + x += stack.pop(); + moveTo(x, y); + stackClean = true; + break; + + case 22: + x += stack.pop(); + moveTo(x, y); + stackClean = true; + break; + + case 23: + stems += stack.length >> 1; + stackClean = true; + break; + + case 24: + while (stack.length > 2) { + xa = x + stack.shift(); + ya = y + stack.shift(); + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb + stack.shift(); + y = yb + stack.shift(); + bezierCurveTo(xa, ya, xb, yb, x, y); + } + + x += stack.shift(); + y += stack.shift(); + lineTo(x, y); + break; + + case 25: + while (stack.length > 6) { + x += stack.shift(); + y += stack.shift(); + lineTo(x, y); + } + + xa = x + stack.shift(); + ya = y + stack.shift(); + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb + stack.shift(); + y = yb + stack.shift(); + bezierCurveTo(xa, ya, xb, yb, x, y); + break; + + case 26: + if (stack.length % 2) { + x += stack.shift(); + } + + while (stack.length > 0) { + xa = x; + ya = y + stack.shift(); + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb; + y = yb + stack.shift(); + bezierCurveTo(xa, ya, xb, yb, x, y); + } + + break; + + case 27: + if (stack.length % 2) { + y += stack.shift(); + } + + while (stack.length > 0) { + xa = x + stack.shift(); + ya = y; + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb + stack.shift(); + y = yb; + bezierCurveTo(xa, ya, xb, yb, x, y); + } + + break; + + case 28: + stack.push((code[i] << 24 | code[i + 1] << 16) >> 16); + i += 2; + break; + + case 29: + n = stack.pop() + font.gsubrsBias; + subrCode = font.gsubrs[n]; + + if (subrCode) { + parse(subrCode); + } + + break; + + case 30: + while (stack.length > 0) { + xa = x; + ya = y + stack.shift(); + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb + stack.shift(); + y = yb + (stack.length === 1 ? stack.shift() : 0); + bezierCurveTo(xa, ya, xb, yb, x, y); + + if (stack.length === 0) { + break; + } + + xa = x + stack.shift(); + ya = y; + xb = xa + stack.shift(); + yb = ya + stack.shift(); + y = yb + stack.shift(); + x = xb + (stack.length === 1 ? stack.shift() : 0); + bezierCurveTo(xa, ya, xb, yb, x, y); + } + + break; + + case 31: + while (stack.length > 0) { + xa = x + stack.shift(); + ya = y; + xb = xa + stack.shift(); + yb = ya + stack.shift(); + y = yb + stack.shift(); + x = xb + (stack.length === 1 ? stack.shift() : 0); + bezierCurveTo(xa, ya, xb, yb, x, y); + + if (stack.length === 0) { + break; + } + + xa = x; + ya = y + stack.shift(); + xb = xa + stack.shift(); + yb = ya + stack.shift(); + x = xb + stack.shift(); + y = yb + (stack.length === 1 ? stack.shift() : 0); + bezierCurveTo(xa, ya, xb, yb, x, y); + } + + break; + + default: + if (v < 32) { + throw new _util.FormatError(`unknown operator: ${v}`); + } + + if (v < 247) { + stack.push(v - 139); + } else if (v < 251) { + stack.push((v - 247) * 256 + code[i++] + 108); + } else if (v < 255) { + stack.push(-(v - 251) * 256 - code[i++] - 108); + } else { + stack.push((code[i] << 24 | code[i + 1] << 16 | code[i + 2] << 8 | code[i + 3]) / 65536); + i += 4; + } + + break; + } + + if (stackClean) { + stack.length = 0; + } + } + } + + parse(charStringCode); + } + + const NOOP = []; + + class CompiledFont { + constructor(fontMatrix) { + if (this.constructor === CompiledFont) { + (0, _util.unreachable)("Cannot initialize CompiledFont."); + } + + this.fontMatrix = fontMatrix; + this.compiledGlyphs = Object.create(null); + this.compiledCharCodeToGlyphId = Object.create(null); + } + + getPathJs(unicode) { + const cmap = lookupCmap(this.cmap, unicode); + let fn = this.compiledGlyphs[cmap.glyphId]; + + if (!fn) { + fn = this.compileGlyph(this.glyphs[cmap.glyphId], cmap.glyphId); + this.compiledGlyphs[cmap.glyphId] = fn; + } + + if (this.compiledCharCodeToGlyphId[cmap.charCode] === undefined) { + this.compiledCharCodeToGlyphId[cmap.charCode] = cmap.glyphId; + } + + return fn; + } + + compileGlyph(code, glyphId) { + if (!code || code.length === 0 || code[0] === 14) { + return NOOP; + } + + let fontMatrix = this.fontMatrix; + + if (this.isCFFCIDFont) { + const fdIndex = this.fdSelect.getFDIndex(glyphId); + + if (fdIndex >= 0 && fdIndex < this.fdArray.length) { + const fontDict = this.fdArray[fdIndex]; + fontMatrix = fontDict.getByName("FontMatrix") || _util.FONT_IDENTITY_MATRIX; + } else { + (0, _util.warn)("Invalid fd index for glyph index."); + } + } + + const cmds = []; + cmds.push({ + cmd: "save" + }); + cmds.push({ + cmd: "transform", + args: fontMatrix.slice() + }); + cmds.push({ + cmd: "scale", + args: ["size", "-size"] + }); + this.compileGlyphImpl(code, cmds, glyphId); + cmds.push({ + cmd: "restore" + }); + return cmds; + } + + compileGlyphImpl() { + (0, _util.unreachable)("Children classes should implement this."); + } + + hasBuiltPath(unicode) { + const cmap = lookupCmap(this.cmap, unicode); + return this.compiledGlyphs[cmap.glyphId] !== undefined && this.compiledCharCodeToGlyphId[cmap.charCode] !== undefined; + } + + } + + class TrueTypeCompiled extends CompiledFont { + constructor(glyphs, cmap, fontMatrix) { + super(fontMatrix || [0.000488, 0, 0, 0.000488, 0, 0]); + this.glyphs = glyphs; + this.cmap = cmap; + } + + compileGlyphImpl(code, cmds) { + compileGlyf(code, cmds, this); + } + + } + + class Type2Compiled extends CompiledFont { + constructor(cffInfo, cmap, fontMatrix, glyphNameMap) { + super(fontMatrix || [0.001, 0, 0, 0.001, 0, 0]); + this.glyphs = cffInfo.glyphs; + this.gsubrs = cffInfo.gsubrs || []; + this.subrs = cffInfo.subrs || []; + this.cmap = cmap; + this.glyphNameMap = glyphNameMap || (0, _glyphlist.getGlyphsUnicode)(); + this.gsubrsBias = getSubroutineBias(this.gsubrs); + this.subrsBias = getSubroutineBias(this.subrs); + this.isCFFCIDFont = cffInfo.isCFFCIDFont; + this.fdSelect = cffInfo.fdSelect; + this.fdArray = cffInfo.fdArray; + } + + compileGlyphImpl(code, cmds, glyphId) { + compileCharString(code, cmds, this, glyphId); + } + + } + + return { + create: function FontRendererFactory_create(font, seacAnalysisEnabled) { + var data = new Uint8Array(font.data); + var cmap, glyf, loca, cff, indexToLocFormat, unitsPerEm; + var numTables = getUshort(data, 4); + + for (var i = 0, p = 12; i < numTables; i++, p += 16) { + var tag = (0, _util.bytesToString)(data.subarray(p, p + 4)); + var offset = getLong(data, p + 8); + var length = getLong(data, p + 12); + + switch (tag) { + case "cmap": + cmap = parseCmap(data, offset, offset + length); + break; + + case "glyf": + glyf = data.subarray(offset, offset + length); + break; + + case "loca": + loca = data.subarray(offset, offset + length); + break; + + case "head": + unitsPerEm = getUshort(data, offset + 18); + indexToLocFormat = getUshort(data, offset + 50); + break; + + case "CFF ": + cff = parseCff(data, offset, offset + length, seacAnalysisEnabled); + break; + } + } + + if (glyf) { + var fontMatrix = !unitsPerEm ? font.fontMatrix : [1 / unitsPerEm, 0, 0, 1 / unitsPerEm, 0, 0]; + return new TrueTypeCompiled(parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix); + } + + return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap); + } + }; +}(); + +exports.FontRendererFactory = FontRendererFactory; + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Type1Parser = void 0; + +var _encodings = __w_pdfjs_require__(32); + +var _core_utils = __w_pdfjs_require__(8); + +var _stream = __w_pdfjs_require__(12); + +var _util = __w_pdfjs_require__(2); + +var HINTING_ENABLED = false; + +var Type1CharString = function Type1CharStringClosure() { + var COMMAND_MAP = { + hstem: [1], + vstem: [3], + vmoveto: [4], + rlineto: [5], + hlineto: [6], + vlineto: [7], + rrcurveto: [8], + callsubr: [10], + flex: [12, 35], + drop: [12, 18], + endchar: [14], + rmoveto: [21], + hmoveto: [22], + vhcurveto: [30], + hvcurveto: [31] + }; + + function Type1CharString() { + this.width = 0; + this.lsb = 0; + this.flexing = false; + this.output = []; + this.stack = []; + } + + Type1CharString.prototype = { + convert: function Type1CharString_convert(encoded, subrs, seacAnalysisEnabled) { + var count = encoded.length; + var error = false; + var wx, sbx, subrNumber; + + for (var i = 0; i < count; i++) { + var value = encoded[i]; + + if (value < 32) { + if (value === 12) { + value = (value << 8) + encoded[++i]; + } + + switch (value) { + case 1: + if (!HINTING_ENABLED) { + this.stack = []; + break; + } + + error = this.executeCommand(2, COMMAND_MAP.hstem); + break; + + case 3: + if (!HINTING_ENABLED) { + this.stack = []; + break; + } + + error = this.executeCommand(2, COMMAND_MAP.vstem); + break; + + case 4: + if (this.flexing) { + if (this.stack.length < 1) { + error = true; + break; + } + + var dy = this.stack.pop(); + this.stack.push(0, dy); + break; + } + + error = this.executeCommand(1, COMMAND_MAP.vmoveto); + break; + + case 5: + error = this.executeCommand(2, COMMAND_MAP.rlineto); + break; + + case 6: + error = this.executeCommand(1, COMMAND_MAP.hlineto); + break; + + case 7: + error = this.executeCommand(1, COMMAND_MAP.vlineto); + break; + + case 8: + error = this.executeCommand(6, COMMAND_MAP.rrcurveto); + break; + + case 9: + this.stack = []; + break; + + case 10: + if (this.stack.length < 1) { + error = true; + break; + } + + subrNumber = this.stack.pop(); + + if (!subrs[subrNumber]) { + error = true; + break; + } + + error = this.convert(subrs[subrNumber], subrs, seacAnalysisEnabled); + break; + + case 11: + return error; + + case 13: + if (this.stack.length < 2) { + error = true; + break; + } + + wx = this.stack.pop(); + sbx = this.stack.pop(); + this.lsb = sbx; + this.width = wx; + this.stack.push(wx, sbx); + error = this.executeCommand(2, COMMAND_MAP.hmoveto); + break; + + case 14: + this.output.push(COMMAND_MAP.endchar[0]); + break; + + case 21: + if (this.flexing) { + break; + } + + error = this.executeCommand(2, COMMAND_MAP.rmoveto); + break; + + case 22: + if (this.flexing) { + this.stack.push(0); + break; + } + + error = this.executeCommand(1, COMMAND_MAP.hmoveto); + break; + + case 30: + error = this.executeCommand(4, COMMAND_MAP.vhcurveto); + break; + + case 31: + error = this.executeCommand(4, COMMAND_MAP.hvcurveto); + break; + + case (12 << 8) + 0: + this.stack = []; + break; + + case (12 << 8) + 1: + if (!HINTING_ENABLED) { + this.stack = []; + break; + } + + error = this.executeCommand(2, COMMAND_MAP.vstem); + break; + + case (12 << 8) + 2: + if (!HINTING_ENABLED) { + this.stack = []; + break; + } + + error = this.executeCommand(2, COMMAND_MAP.hstem); + break; + + case (12 << 8) + 6: + if (seacAnalysisEnabled) { + this.seac = this.stack.splice(-4, 4); + error = this.executeCommand(0, COMMAND_MAP.endchar); + } else { + error = this.executeCommand(4, COMMAND_MAP.endchar); + } + + break; + + case (12 << 8) + 7: + if (this.stack.length < 4) { + error = true; + break; + } + + this.stack.pop(); + wx = this.stack.pop(); + var sby = this.stack.pop(); + sbx = this.stack.pop(); + this.lsb = sbx; + this.width = wx; + this.stack.push(wx, sbx, sby); + error = this.executeCommand(3, COMMAND_MAP.rmoveto); + break; + + case (12 << 8) + 12: + if (this.stack.length < 2) { + error = true; + break; + } + + var num2 = this.stack.pop(); + var num1 = this.stack.pop(); + this.stack.push(num1 / num2); + break; + + case (12 << 8) + 16: + if (this.stack.length < 2) { + error = true; + break; + } + + subrNumber = this.stack.pop(); + var numArgs = this.stack.pop(); + + if (subrNumber === 0 && numArgs === 3) { + var flexArgs = this.stack.splice(this.stack.length - 17, 17); + this.stack.push(flexArgs[2] + flexArgs[0], flexArgs[3] + flexArgs[1], flexArgs[4], flexArgs[5], flexArgs[6], flexArgs[7], flexArgs[8], flexArgs[9], flexArgs[10], flexArgs[11], flexArgs[12], flexArgs[13], flexArgs[14]); + error = this.executeCommand(13, COMMAND_MAP.flex, true); + this.flexing = false; + this.stack.push(flexArgs[15], flexArgs[16]); + } else if (subrNumber === 1 && numArgs === 0) { + this.flexing = true; + } + + break; + + case (12 << 8) + 17: + break; + + case (12 << 8) + 33: + this.stack = []; + break; + + default: + (0, _util.warn)('Unknown type 1 charstring command of "' + value + '"'); + break; + } + + if (error) { + break; + } + + continue; + } else if (value <= 246) { + value = value - 139; + } else if (value <= 250) { + value = (value - 247) * 256 + encoded[++i] + 108; + } else if (value <= 254) { + value = -((value - 251) * 256) - encoded[++i] - 108; + } else { + value = (encoded[++i] & 0xff) << 24 | (encoded[++i] & 0xff) << 16 | (encoded[++i] & 0xff) << 8 | (encoded[++i] & 0xff) << 0; + } + + this.stack.push(value); + } + + return error; + }, + + executeCommand(howManyArgs, command, keepStack) { + var stackLength = this.stack.length; + + if (howManyArgs > stackLength) { + return true; + } + + var start = stackLength - howManyArgs; + + for (var i = start; i < stackLength; i++) { + var value = this.stack[i]; + + if (Number.isInteger(value)) { + this.output.push(28, value >> 8 & 0xff, value & 0xff); + } else { + value = 65536 * value | 0; + this.output.push(255, value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); + } + } + + this.output.push.apply(this.output, command); + + if (keepStack) { + this.stack.splice(start, howManyArgs); + } else { + this.stack.length = 0; + } + + return false; + } + + }; + return Type1CharString; +}(); + +var Type1Parser = function Type1ParserClosure() { + var EEXEC_ENCRYPT_KEY = 55665; + var CHAR_STRS_ENCRYPT_KEY = 4330; + + function isHexDigit(code) { + return code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102; + } + + function decrypt(data, key, discardNumber) { + if (discardNumber >= data.length) { + return new Uint8Array(0); + } + + var r = key | 0, + c1 = 52845, + c2 = 22719, + i, + j; + + for (i = 0; i < discardNumber; i++) { + r = (data[i] + r) * c1 + c2 & (1 << 16) - 1; + } + + var count = data.length - discardNumber; + var decrypted = new Uint8Array(count); + + for (i = discardNumber, j = 0; j < count; i++, j++) { + var value = data[i]; + decrypted[j] = value ^ r >> 8; + r = (value + r) * c1 + c2 & (1 << 16) - 1; + } + + return decrypted; + } + + function decryptAscii(data, key, discardNumber) { + var r = key | 0, + c1 = 52845, + c2 = 22719; + var count = data.length, + maybeLength = count >>> 1; + var decrypted = new Uint8Array(maybeLength); + var i, j; + + for (i = 0, j = 0; i < count; i++) { + var digit1 = data[i]; + + if (!isHexDigit(digit1)) { + continue; + } + + i++; + var digit2; + + while (i < count && !isHexDigit(digit2 = data[i])) { + i++; + } + + if (i < count) { + var value = parseInt(String.fromCharCode(digit1, digit2), 16); + decrypted[j++] = value ^ r >> 8; + r = (value + r) * c1 + c2 & (1 << 16) - 1; + } + } + + return decrypted.slice(discardNumber, j); + } + + function isSpecial(c) { + return c === 0x2f || c === 0x5b || c === 0x5d || c === 0x7b || c === 0x7d || c === 0x28 || c === 0x29; + } + + function Type1Parser(stream, encrypted, seacAnalysisEnabled) { + if (encrypted) { + var data = stream.getBytes(); + var isBinary = !((isHexDigit(data[0]) || (0, _core_utils.isWhiteSpace)(data[0])) && isHexDigit(data[1]) && isHexDigit(data[2]) && isHexDigit(data[3]) && isHexDigit(data[4]) && isHexDigit(data[5]) && isHexDigit(data[6]) && isHexDigit(data[7])); + stream = new _stream.Stream(isBinary ? decrypt(data, EEXEC_ENCRYPT_KEY, 4) : decryptAscii(data, EEXEC_ENCRYPT_KEY, 4)); + } + + this.seacAnalysisEnabled = !!seacAnalysisEnabled; + this.stream = stream; + this.nextChar(); + } + + Type1Parser.prototype = { + readNumberArray: function Type1Parser_readNumberArray() { + this.getToken(); + var array = []; + + while (true) { + var token = this.getToken(); + + if (token === null || token === "]" || token === "}") { + break; + } + + array.push(parseFloat(token || 0)); + } + + return array; + }, + readNumber: function Type1Parser_readNumber() { + var token = this.getToken(); + return parseFloat(token || 0); + }, + readInt: function Type1Parser_readInt() { + var token = this.getToken(); + return parseInt(token || 0, 10) | 0; + }, + readBoolean: function Type1Parser_readBoolean() { + var token = this.getToken(); + return token === "true" ? 1 : 0; + }, + nextChar: function Type1_nextChar() { + return this.currentChar = this.stream.getByte(); + }, + getToken: function Type1Parser_getToken() { + var comment = false; + var ch = this.currentChar; + + while (true) { + if (ch === -1) { + return null; + } + + if (comment) { + if (ch === 0x0a || ch === 0x0d) { + comment = false; + } + } else if (ch === 0x25) { + comment = true; + } else if (!(0, _core_utils.isWhiteSpace)(ch)) { + break; + } + + ch = this.nextChar(); + } + + if (isSpecial(ch)) { + this.nextChar(); + return String.fromCharCode(ch); + } + + var token = ""; + + do { + token += String.fromCharCode(ch); + ch = this.nextChar(); + } while (ch >= 0 && !(0, _core_utils.isWhiteSpace)(ch) && !isSpecial(ch)); + + return token; + }, + readCharStrings: function Type1Parser_readCharStrings(bytes, lenIV) { + if (lenIV === -1) { + return bytes; + } + + return decrypt(bytes, CHAR_STRS_ENCRYPT_KEY, lenIV); + }, + extractFontProgram: function Type1Parser_extractFontProgram(properties) { + var stream = this.stream; + var subrs = [], + charstrings = []; + var privateData = Object.create(null); + privateData.lenIV = 4; + var program = { + subrs: [], + charstrings: [], + properties: { + privateData + } + }; + var token, length, data, lenIV, encoded; + + while ((token = this.getToken()) !== null) { + if (token !== "/") { + continue; + } + + token = this.getToken(); + + switch (token) { + case "CharStrings": + this.getToken(); + this.getToken(); + this.getToken(); + this.getToken(); + + while (true) { + token = this.getToken(); + + if (token === null || token === "end") { + break; + } + + if (token !== "/") { + continue; + } + + var glyph = this.getToken(); + length = this.readInt(); + this.getToken(); + data = length > 0 ? stream.getBytes(length) : new Uint8Array(0); + lenIV = program.properties.privateData.lenIV; + encoded = this.readCharStrings(data, lenIV); + this.nextChar(); + token = this.getToken(); + + if (token === "noaccess") { + this.getToken(); + } + + charstrings.push({ + glyph, + encoded + }); + } + + break; + + case "Subrs": + this.readInt(); + this.getToken(); + + while (this.getToken() === "dup") { + const index = this.readInt(); + length = this.readInt(); + this.getToken(); + data = length > 0 ? stream.getBytes(length) : new Uint8Array(0); + lenIV = program.properties.privateData.lenIV; + encoded = this.readCharStrings(data, lenIV); + this.nextChar(); + token = this.getToken(); + + if (token === "noaccess") { + this.getToken(); + } + + subrs[index] = encoded; + } + + break; + + case "BlueValues": + case "OtherBlues": + case "FamilyBlues": + case "FamilyOtherBlues": + var blueArray = this.readNumberArray(); + + if (blueArray.length > 0 && blueArray.length % 2 === 0 && HINTING_ENABLED) { + program.properties.privateData[token] = blueArray; + } + + break; + + case "StemSnapH": + case "StemSnapV": + program.properties.privateData[token] = this.readNumberArray(); + break; + + case "StdHW": + case "StdVW": + program.properties.privateData[token] = this.readNumberArray()[0]; + break; + + case "BlueShift": + case "lenIV": + case "BlueFuzz": + case "BlueScale": + case "LanguageGroup": + case "ExpansionFactor": + program.properties.privateData[token] = this.readNumber(); + break; + + case "ForceBold": + program.properties.privateData[token] = this.readBoolean(); + break; + } + } + + for (var i = 0; i < charstrings.length; i++) { + glyph = charstrings[i].glyph; + encoded = charstrings[i].encoded; + var charString = new Type1CharString(); + var error = charString.convert(encoded, subrs, this.seacAnalysisEnabled); + var output = charString.output; + + if (error) { + output = [14]; + } + + const charStringObject = { + glyphName: glyph, + charstring: output, + width: charString.width, + lsb: charString.lsb, + seac: charString.seac + }; + + if (glyph === ".notdef") { + program.charstrings.unshift(charStringObject); + } else { + program.charstrings.push(charStringObject); + } + + if (properties.builtInEncoding) { + const index = properties.builtInEncoding.indexOf(glyph); + + if (index > -1 && properties.widths[index] === undefined && index >= properties.firstChar && index <= properties.lastChar) { + properties.widths[index] = charString.width; + } + } + } + + return program; + }, + extractFontHeader: function Type1Parser_extractFontHeader(properties) { + var token; + + while ((token = this.getToken()) !== null) { + if (token !== "/") { + continue; + } + + token = this.getToken(); + + switch (token) { + case "FontMatrix": + var matrix = this.readNumberArray(); + properties.fontMatrix = matrix; + break; + + case "Encoding": + var encodingArg = this.getToken(); + var encoding; + + if (!/^\d+$/.test(encodingArg)) { + encoding = (0, _encodings.getEncoding)(encodingArg); + } else { + encoding = []; + var size = parseInt(encodingArg, 10) | 0; + this.getToken(); + + for (var j = 0; j < size; j++) { + token = this.getToken(); + + while (token !== "dup" && token !== "def") { + token = this.getToken(); + + if (token === null) { + return; + } + } + + if (token === "def") { + break; + } + + var index = this.readInt(); + this.getToken(); + var glyph = this.getToken(); + encoding[index] = glyph; + this.getToken(); + } + } + + properties.builtInEncoding = encoding; + break; + + case "FontBBox": + var fontBBox = this.readNumberArray(); + properties.ascent = Math.max(fontBBox[3], fontBBox[1]); + properties.descent = Math.min(fontBBox[1], fontBBox[3]); + properties.ascentScaled = true; + break; + } + } + } + }; + return Type1Parser; +}(); + +exports.Type1Parser = Type1Parser; + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getTilingPatternIR = getTilingPatternIR; +exports.Pattern = void 0; + +var _util = __w_pdfjs_require__(2); + +var _colorspace = __w_pdfjs_require__(23); + +var _primitives = __w_pdfjs_require__(5); + +var _core_utils = __w_pdfjs_require__(8); + +var ShadingType = { + FUNCTION_BASED: 1, + AXIAL: 2, + RADIAL: 3, + FREE_FORM_MESH: 4, + LATTICE_FORM_MESH: 5, + COONS_PATCH_MESH: 6, + TENSOR_PATCH_MESH: 7 +}; + +var Pattern = function PatternClosure() { + function Pattern() { + (0, _util.unreachable)("should not call Pattern constructor"); + } + + Pattern.prototype = { + getPattern: function Pattern_getPattern(ctx) { + (0, _util.unreachable)(`Should not call Pattern.getStyle: ${ctx}`); + } + }; + + Pattern.parseShading = function (shading, matrix, xref, res, handler, pdfFunctionFactory) { + var dict = (0, _primitives.isStream)(shading) ? shading.dict : shading; + var type = dict.get("ShadingType"); + + try { + switch (type) { + case ShadingType.AXIAL: + case ShadingType.RADIAL: + return new Shadings.RadialAxial(dict, matrix, xref, res, pdfFunctionFactory); + + case ShadingType.FREE_FORM_MESH: + case ShadingType.LATTICE_FORM_MESH: + case ShadingType.COONS_PATCH_MESH: + case ShadingType.TENSOR_PATCH_MESH: + return new Shadings.Mesh(shading, matrix, xref, res, pdfFunctionFactory); + + default: + throw new _util.FormatError("Unsupported ShadingType: " + type); + } + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + handler.send("UnsupportedFeature", { + featureId: _util.UNSUPPORTED_FEATURES.shadingPattern + }); + (0, _util.warn)(ex); + return new Shadings.Dummy(); + } + }; + + return Pattern; +}(); + +exports.Pattern = Pattern; +var Shadings = {}; +Shadings.SMALL_NUMBER = 1e-6; + +Shadings.RadialAxial = function RadialAxialClosure() { + function RadialAxial(dict, matrix, xref, res, pdfFunctionFactory) { + this.matrix = matrix; + this.coordsArr = dict.getArray("Coords"); + this.shadingType = dict.get("ShadingType"); + this.type = "Pattern"; + var cs = dict.get("ColorSpace", "CS"); + cs = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory); + this.cs = cs; + const bbox = dict.getArray("BBox"); + + if (Array.isArray(bbox) && bbox.length === 4) { + this.bbox = _util.Util.normalizeRect(bbox); + } else { + this.bbox = null; + } + + var t0 = 0.0, + t1 = 1.0; + + if (dict.has("Domain")) { + var domainArr = dict.getArray("Domain"); + t0 = domainArr[0]; + t1 = domainArr[1]; + } + + var extendStart = false, + extendEnd = false; + + if (dict.has("Extend")) { + var extendArr = dict.getArray("Extend"); + extendStart = extendArr[0]; + extendEnd = extendArr[1]; + } + + if (this.shadingType === ShadingType.RADIAL && (!extendStart || !extendEnd)) { + var x1 = this.coordsArr[0]; + var y1 = this.coordsArr[1]; + var r1 = this.coordsArr[2]; + var x2 = this.coordsArr[3]; + var y2 = this.coordsArr[4]; + var r2 = this.coordsArr[5]; + var distance = Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); + + if (r1 <= r2 + distance && r2 <= r1 + distance) { + (0, _util.warn)("Unsupported radial gradient."); + } + } + + this.extendStart = extendStart; + this.extendEnd = extendEnd; + var fnObj = dict.get("Function"); + var fn = pdfFunctionFactory.createFromArray(fnObj); + const NUMBER_OF_SAMPLES = 10; + const step = (t1 - t0) / NUMBER_OF_SAMPLES; + var colorStops = this.colorStops = []; + + if (t0 >= t1 || step <= 0) { + (0, _util.info)("Bad shading domain."); + return; + } + + var color = new Float32Array(cs.numComps), + ratio = new Float32Array(1); + var rgbColor; + + for (let i = 0; i <= NUMBER_OF_SAMPLES; i++) { + ratio[0] = t0 + i * step; + fn(ratio, 0, color, 0); + rgbColor = cs.getRgb(color, 0); + + var cssColor = _util.Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); + + colorStops.push([i / NUMBER_OF_SAMPLES, cssColor]); + } + + var background = "transparent"; + + if (dict.has("Background")) { + rgbColor = cs.getRgb(dict.get("Background"), 0); + background = _util.Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); + } + + if (!extendStart) { + colorStops.unshift([0, background]); + colorStops[1][0] += Shadings.SMALL_NUMBER; + } + + if (!extendEnd) { + colorStops[colorStops.length - 1][0] -= Shadings.SMALL_NUMBER; + colorStops.push([1, background]); + } + + this.colorStops = colorStops; + } + + RadialAxial.prototype = { + getIR: function RadialAxial_getIR() { + var coordsArr = this.coordsArr; + var shadingType = this.shadingType; + var type, p0, p1, r0, r1; + + if (shadingType === ShadingType.AXIAL) { + p0 = [coordsArr[0], coordsArr[1]]; + p1 = [coordsArr[2], coordsArr[3]]; + r0 = null; + r1 = null; + type = "axial"; + } else if (shadingType === ShadingType.RADIAL) { + p0 = [coordsArr[0], coordsArr[1]]; + p1 = [coordsArr[3], coordsArr[4]]; + r0 = coordsArr[2]; + r1 = coordsArr[5]; + type = "radial"; + } else { + (0, _util.unreachable)(`getPattern type unknown: ${shadingType}`); + } + + var matrix = this.matrix; + + if (matrix) { + p0 = _util.Util.applyTransform(p0, matrix); + p1 = _util.Util.applyTransform(p1, matrix); + + if (shadingType === ShadingType.RADIAL) { + var scale = _util.Util.singularValueDecompose2dScale(matrix); + + r0 *= scale[0]; + r1 *= scale[1]; + } + } + + return ["RadialAxial", type, this.bbox, this.colorStops, p0, p1, r0, r1]; + } + }; + return RadialAxial; +}(); + +Shadings.Mesh = function MeshClosure() { + function MeshStreamReader(stream, context) { + this.stream = stream; + this.context = context; + this.buffer = 0; + this.bufferLength = 0; + var numComps = context.numComps; + this.tmpCompsBuf = new Float32Array(numComps); + var csNumComps = context.colorSpace.numComps; + this.tmpCsCompsBuf = context.colorFn ? new Float32Array(csNumComps) : this.tmpCompsBuf; + } + + MeshStreamReader.prototype = { + get hasData() { + if (this.stream.end) { + return this.stream.pos < this.stream.end; + } + + if (this.bufferLength > 0) { + return true; + } + + var nextByte = this.stream.getByte(); + + if (nextByte < 0) { + return false; + } + + this.buffer = nextByte; + this.bufferLength = 8; + return true; + }, + + readBits: function MeshStreamReader_readBits(n) { + var buffer = this.buffer; + var bufferLength = this.bufferLength; + + if (n === 32) { + if (bufferLength === 0) { + return (this.stream.getByte() << 24 | this.stream.getByte() << 16 | this.stream.getByte() << 8 | this.stream.getByte()) >>> 0; + } + + buffer = buffer << 24 | this.stream.getByte() << 16 | this.stream.getByte() << 8 | this.stream.getByte(); + var nextByte = this.stream.getByte(); + this.buffer = nextByte & (1 << bufferLength) - 1; + return (buffer << 8 - bufferLength | (nextByte & 0xff) >> bufferLength) >>> 0; + } + + if (n === 8 && bufferLength === 0) { + return this.stream.getByte(); + } + + while (bufferLength < n) { + buffer = buffer << 8 | this.stream.getByte(); + bufferLength += 8; + } + + bufferLength -= n; + this.bufferLength = bufferLength; + this.buffer = buffer & (1 << bufferLength) - 1; + return buffer >> bufferLength; + }, + align: function MeshStreamReader_align() { + this.buffer = 0; + this.bufferLength = 0; + }, + readFlag: function MeshStreamReader_readFlag() { + return this.readBits(this.context.bitsPerFlag); + }, + readCoordinate: function MeshStreamReader_readCoordinate() { + var bitsPerCoordinate = this.context.bitsPerCoordinate; + var xi = this.readBits(bitsPerCoordinate); + var yi = this.readBits(bitsPerCoordinate); + var decode = this.context.decode; + var scale = bitsPerCoordinate < 32 ? 1 / ((1 << bitsPerCoordinate) - 1) : 2.3283064365386963e-10; + return [xi * scale * (decode[1] - decode[0]) + decode[0], yi * scale * (decode[3] - decode[2]) + decode[2]]; + }, + readComponents: function MeshStreamReader_readComponents() { + var numComps = this.context.numComps; + var bitsPerComponent = this.context.bitsPerComponent; + var scale = bitsPerComponent < 32 ? 1 / ((1 << bitsPerComponent) - 1) : 2.3283064365386963e-10; + var decode = this.context.decode; + var components = this.tmpCompsBuf; + + for (var i = 0, j = 4; i < numComps; i++, j += 2) { + var ci = this.readBits(bitsPerComponent); + components[i] = ci * scale * (decode[j + 1] - decode[j]) + decode[j]; + } + + var color = this.tmpCsCompsBuf; + + if (this.context.colorFn) { + this.context.colorFn(components, 0, color, 0); + } + + return this.context.colorSpace.getRgb(color, 0); + } + }; + + function decodeType4Shading(mesh, reader) { + var coords = mesh.coords; + var colors = mesh.colors; + var operators = []; + var ps = []; + var verticesLeft = 0; + + while (reader.hasData) { + var f = reader.readFlag(); + var coord = reader.readCoordinate(); + var color = reader.readComponents(); + + if (verticesLeft === 0) { + if (!(0 <= f && f <= 2)) { + throw new _util.FormatError("Unknown type4 flag"); + } + + switch (f) { + case 0: + verticesLeft = 3; + break; + + case 1: + ps.push(ps[ps.length - 2], ps[ps.length - 1]); + verticesLeft = 1; + break; + + case 2: + ps.push(ps[ps.length - 3], ps[ps.length - 1]); + verticesLeft = 1; + break; + } + + operators.push(f); + } + + ps.push(coords.length); + coords.push(coord); + colors.push(color); + verticesLeft--; + reader.align(); + } + + mesh.figures.push({ + type: "triangles", + coords: new Int32Array(ps), + colors: new Int32Array(ps) + }); + } + + function decodeType5Shading(mesh, reader, verticesPerRow) { + var coords = mesh.coords; + var colors = mesh.colors; + var ps = []; + + while (reader.hasData) { + var coord = reader.readCoordinate(); + var color = reader.readComponents(); + ps.push(coords.length); + coords.push(coord); + colors.push(color); + } + + mesh.figures.push({ + type: "lattice", + coords: new Int32Array(ps), + colors: new Int32Array(ps), + verticesPerRow + }); + } + + var MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3; + var MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20; + var TRIANGLE_DENSITY = 20; + + var getB = function getBClosure() { + function buildB(count) { + var lut = []; + + for (var i = 0; i <= count; i++) { + var t = i / count, + t_ = 1 - t; + lut.push(new Float32Array([t_ * t_ * t_, 3 * t * t_ * t_, 3 * t * t * t_, t * t * t])); + } + + return lut; + } + + var cache = []; + return function getB(count) { + if (!cache[count]) { + cache[count] = buildB(count); + } + + return cache[count]; + }; + }(); + + function buildFigureFromPatch(mesh, index) { + var figure = mesh.figures[index]; + (0, _util.assert)(figure.type === "patch", "Unexpected patch mesh figure"); + var coords = mesh.coords, + colors = mesh.colors; + var pi = figure.coords; + var ci = figure.colors; + var figureMinX = Math.min(coords[pi[0]][0], coords[pi[3]][0], coords[pi[12]][0], coords[pi[15]][0]); + var figureMinY = Math.min(coords[pi[0]][1], coords[pi[3]][1], coords[pi[12]][1], coords[pi[15]][1]); + var figureMaxX = Math.max(coords[pi[0]][0], coords[pi[3]][0], coords[pi[12]][0], coords[pi[15]][0]); + var figureMaxY = Math.max(coords[pi[0]][1], coords[pi[3]][1], coords[pi[12]][1], coords[pi[15]][1]); + var splitXBy = Math.ceil((figureMaxX - figureMinX) * TRIANGLE_DENSITY / (mesh.bounds[2] - mesh.bounds[0])); + splitXBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT, Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitXBy)); + var splitYBy = Math.ceil((figureMaxY - figureMinY) * TRIANGLE_DENSITY / (mesh.bounds[3] - mesh.bounds[1])); + splitYBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT, Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitYBy)); + var verticesPerRow = splitXBy + 1; + var figureCoords = new Int32Array((splitYBy + 1) * verticesPerRow); + var figureColors = new Int32Array((splitYBy + 1) * verticesPerRow); + var k = 0; + var cl = new Uint8Array(3), + cr = new Uint8Array(3); + var c0 = colors[ci[0]], + c1 = colors[ci[1]], + c2 = colors[ci[2]], + c3 = colors[ci[3]]; + var bRow = getB(splitYBy), + bCol = getB(splitXBy); + + for (var row = 0; row <= splitYBy; row++) { + cl[0] = (c0[0] * (splitYBy - row) + c2[0] * row) / splitYBy | 0; + cl[1] = (c0[1] * (splitYBy - row) + c2[1] * row) / splitYBy | 0; + cl[2] = (c0[2] * (splitYBy - row) + c2[2] * row) / splitYBy | 0; + cr[0] = (c1[0] * (splitYBy - row) + c3[0] * row) / splitYBy | 0; + cr[1] = (c1[1] * (splitYBy - row) + c3[1] * row) / splitYBy | 0; + cr[2] = (c1[2] * (splitYBy - row) + c3[2] * row) / splitYBy | 0; + + for (var col = 0; col <= splitXBy; col++, k++) { + if ((row === 0 || row === splitYBy) && (col === 0 || col === splitXBy)) { + continue; + } + + var x = 0, + y = 0; + var q = 0; + + for (var i = 0; i <= 3; i++) { + for (var j = 0; j <= 3; j++, q++) { + var m = bRow[row][i] * bCol[col][j]; + x += coords[pi[q]][0] * m; + y += coords[pi[q]][1] * m; + } + } + + figureCoords[k] = coords.length; + coords.push([x, y]); + figureColors[k] = colors.length; + var newColor = new Uint8Array(3); + newColor[0] = (cl[0] * (splitXBy - col) + cr[0] * col) / splitXBy | 0; + newColor[1] = (cl[1] * (splitXBy - col) + cr[1] * col) / splitXBy | 0; + newColor[2] = (cl[2] * (splitXBy - col) + cr[2] * col) / splitXBy | 0; + colors.push(newColor); + } + } + + figureCoords[0] = pi[0]; + figureColors[0] = ci[0]; + figureCoords[splitXBy] = pi[3]; + figureColors[splitXBy] = ci[1]; + figureCoords[verticesPerRow * splitYBy] = pi[12]; + figureColors[verticesPerRow * splitYBy] = ci[2]; + figureCoords[verticesPerRow * splitYBy + splitXBy] = pi[15]; + figureColors[verticesPerRow * splitYBy + splitXBy] = ci[3]; + mesh.figures[index] = { + type: "lattice", + coords: figureCoords, + colors: figureColors, + verticesPerRow + }; + } + + function decodeType6Shading(mesh, reader) { + var coords = mesh.coords; + var colors = mesh.colors; + var ps = new Int32Array(16); + var cs = new Int32Array(4); + + while (reader.hasData) { + var f = reader.readFlag(); + + if (!(0 <= f && f <= 3)) { + throw new _util.FormatError("Unknown type6 flag"); + } + + var i, ii; + var pi = coords.length; + + for (i = 0, ii = f !== 0 ? 8 : 12; i < ii; i++) { + coords.push(reader.readCoordinate()); + } + + var ci = colors.length; + + for (i = 0, ii = f !== 0 ? 2 : 4; i < ii; i++) { + colors.push(reader.readComponents()); + } + + var tmp1, tmp2, tmp3, tmp4; + + switch (f) { + case 0: + ps[12] = pi + 3; + ps[13] = pi + 4; + ps[14] = pi + 5; + ps[15] = pi + 6; + ps[8] = pi + 2; + ps[11] = pi + 7; + ps[4] = pi + 1; + ps[7] = pi + 8; + ps[0] = pi; + ps[1] = pi + 11; + ps[2] = pi + 10; + ps[3] = pi + 9; + cs[2] = ci + 1; + cs[3] = ci + 2; + cs[0] = ci; + cs[1] = ci + 3; + break; + + case 1: + tmp1 = ps[12]; + tmp2 = ps[13]; + tmp3 = ps[14]; + tmp4 = ps[15]; + ps[12] = tmp4; + ps[13] = pi + 0; + ps[14] = pi + 1; + ps[15] = pi + 2; + ps[8] = tmp3; + ps[11] = pi + 3; + ps[4] = tmp2; + ps[7] = pi + 4; + ps[0] = tmp1; + ps[1] = pi + 7; + ps[2] = pi + 6; + ps[3] = pi + 5; + tmp1 = cs[2]; + tmp2 = cs[3]; + cs[2] = tmp2; + cs[3] = ci; + cs[0] = tmp1; + cs[1] = ci + 1; + break; + + case 2: + tmp1 = ps[15]; + tmp2 = ps[11]; + ps[12] = ps[3]; + ps[13] = pi + 0; + ps[14] = pi + 1; + ps[15] = pi + 2; + ps[8] = ps[7]; + ps[11] = pi + 3; + ps[4] = tmp2; + ps[7] = pi + 4; + ps[0] = tmp1; + ps[1] = pi + 7; + ps[2] = pi + 6; + ps[3] = pi + 5; + tmp1 = cs[3]; + cs[2] = cs[1]; + cs[3] = ci; + cs[0] = tmp1; + cs[1] = ci + 1; + break; + + case 3: + ps[12] = ps[0]; + ps[13] = pi + 0; + ps[14] = pi + 1; + ps[15] = pi + 2; + ps[8] = ps[1]; + ps[11] = pi + 3; + ps[4] = ps[2]; + ps[7] = pi + 4; + ps[0] = ps[3]; + ps[1] = pi + 7; + ps[2] = pi + 6; + ps[3] = pi + 5; + cs[2] = cs[0]; + cs[3] = ci; + cs[0] = cs[1]; + cs[1] = ci + 1; + break; + } + + ps[5] = coords.length; + coords.push([(-4 * coords[ps[0]][0] - coords[ps[15]][0] + 6 * (coords[ps[4]][0] + coords[ps[1]][0]) - 2 * (coords[ps[12]][0] + coords[ps[3]][0]) + 3 * (coords[ps[13]][0] + coords[ps[7]][0])) / 9, (-4 * coords[ps[0]][1] - coords[ps[15]][1] + 6 * (coords[ps[4]][1] + coords[ps[1]][1]) - 2 * (coords[ps[12]][1] + coords[ps[3]][1]) + 3 * (coords[ps[13]][1] + coords[ps[7]][1])) / 9]); + ps[6] = coords.length; + coords.push([(-4 * coords[ps[3]][0] - coords[ps[12]][0] + 6 * (coords[ps[2]][0] + coords[ps[7]][0]) - 2 * (coords[ps[0]][0] + coords[ps[15]][0]) + 3 * (coords[ps[4]][0] + coords[ps[14]][0])) / 9, (-4 * coords[ps[3]][1] - coords[ps[12]][1] + 6 * (coords[ps[2]][1] + coords[ps[7]][1]) - 2 * (coords[ps[0]][1] + coords[ps[15]][1]) + 3 * (coords[ps[4]][1] + coords[ps[14]][1])) / 9]); + ps[9] = coords.length; + coords.push([(-4 * coords[ps[12]][0] - coords[ps[3]][0] + 6 * (coords[ps[8]][0] + coords[ps[13]][0]) - 2 * (coords[ps[0]][0] + coords[ps[15]][0]) + 3 * (coords[ps[11]][0] + coords[ps[1]][0])) / 9, (-4 * coords[ps[12]][1] - coords[ps[3]][1] + 6 * (coords[ps[8]][1] + coords[ps[13]][1]) - 2 * (coords[ps[0]][1] + coords[ps[15]][1]) + 3 * (coords[ps[11]][1] + coords[ps[1]][1])) / 9]); + ps[10] = coords.length; + coords.push([(-4 * coords[ps[15]][0] - coords[ps[0]][0] + 6 * (coords[ps[11]][0] + coords[ps[14]][0]) - 2 * (coords[ps[12]][0] + coords[ps[3]][0]) + 3 * (coords[ps[2]][0] + coords[ps[8]][0])) / 9, (-4 * coords[ps[15]][1] - coords[ps[0]][1] + 6 * (coords[ps[11]][1] + coords[ps[14]][1]) - 2 * (coords[ps[12]][1] + coords[ps[3]][1]) + 3 * (coords[ps[2]][1] + coords[ps[8]][1])) / 9]); + mesh.figures.push({ + type: "patch", + coords: new Int32Array(ps), + colors: new Int32Array(cs) + }); + } + } + + function decodeType7Shading(mesh, reader) { + var coords = mesh.coords; + var colors = mesh.colors; + var ps = new Int32Array(16); + var cs = new Int32Array(4); + + while (reader.hasData) { + var f = reader.readFlag(); + + if (!(0 <= f && f <= 3)) { + throw new _util.FormatError("Unknown type7 flag"); + } + + var i, ii; + var pi = coords.length; + + for (i = 0, ii = f !== 0 ? 12 : 16; i < ii; i++) { + coords.push(reader.readCoordinate()); + } + + var ci = colors.length; + + for (i = 0, ii = f !== 0 ? 2 : 4; i < ii; i++) { + colors.push(reader.readComponents()); + } + + var tmp1, tmp2, tmp3, tmp4; + + switch (f) { + case 0: + ps[12] = pi + 3; + ps[13] = pi + 4; + ps[14] = pi + 5; + ps[15] = pi + 6; + ps[8] = pi + 2; + ps[9] = pi + 13; + ps[10] = pi + 14; + ps[11] = pi + 7; + ps[4] = pi + 1; + ps[5] = pi + 12; + ps[6] = pi + 15; + ps[7] = pi + 8; + ps[0] = pi; + ps[1] = pi + 11; + ps[2] = pi + 10; + ps[3] = pi + 9; + cs[2] = ci + 1; + cs[3] = ci + 2; + cs[0] = ci; + cs[1] = ci + 3; + break; + + case 1: + tmp1 = ps[12]; + tmp2 = ps[13]; + tmp3 = ps[14]; + tmp4 = ps[15]; + ps[12] = tmp4; + ps[13] = pi + 0; + ps[14] = pi + 1; + ps[15] = pi + 2; + ps[8] = tmp3; + ps[9] = pi + 9; + ps[10] = pi + 10; + ps[11] = pi + 3; + ps[4] = tmp2; + ps[5] = pi + 8; + ps[6] = pi + 11; + ps[7] = pi + 4; + ps[0] = tmp1; + ps[1] = pi + 7; + ps[2] = pi + 6; + ps[3] = pi + 5; + tmp1 = cs[2]; + tmp2 = cs[3]; + cs[2] = tmp2; + cs[3] = ci; + cs[0] = tmp1; + cs[1] = ci + 1; + break; + + case 2: + tmp1 = ps[15]; + tmp2 = ps[11]; + ps[12] = ps[3]; + ps[13] = pi + 0; + ps[14] = pi + 1; + ps[15] = pi + 2; + ps[8] = ps[7]; + ps[9] = pi + 9; + ps[10] = pi + 10; + ps[11] = pi + 3; + ps[4] = tmp2; + ps[5] = pi + 8; + ps[6] = pi + 11; + ps[7] = pi + 4; + ps[0] = tmp1; + ps[1] = pi + 7; + ps[2] = pi + 6; + ps[3] = pi + 5; + tmp1 = cs[3]; + cs[2] = cs[1]; + cs[3] = ci; + cs[0] = tmp1; + cs[1] = ci + 1; + break; + + case 3: + ps[12] = ps[0]; + ps[13] = pi + 0; + ps[14] = pi + 1; + ps[15] = pi + 2; + ps[8] = ps[1]; + ps[9] = pi + 9; + ps[10] = pi + 10; + ps[11] = pi + 3; + ps[4] = ps[2]; + ps[5] = pi + 8; + ps[6] = pi + 11; + ps[7] = pi + 4; + ps[0] = ps[3]; + ps[1] = pi + 7; + ps[2] = pi + 6; + ps[3] = pi + 5; + cs[2] = cs[0]; + cs[3] = ci; + cs[0] = cs[1]; + cs[1] = ci + 1; + break; + } + + mesh.figures.push({ + type: "patch", + coords: new Int32Array(ps), + colors: new Int32Array(cs) + }); + } + } + + function updateBounds(mesh) { + var minX = mesh.coords[0][0], + minY = mesh.coords[0][1], + maxX = minX, + maxY = minY; + + for (var i = 1, ii = mesh.coords.length; i < ii; i++) { + var x = mesh.coords[i][0], + y = mesh.coords[i][1]; + minX = minX > x ? x : minX; + minY = minY > y ? y : minY; + maxX = maxX < x ? x : maxX; + maxY = maxY < y ? y : maxY; + } + + mesh.bounds = [minX, minY, maxX, maxY]; + } + + function packData(mesh) { + var i, ii, j, jj; + var coords = mesh.coords; + var coordsPacked = new Float32Array(coords.length * 2); + + for (i = 0, j = 0, ii = coords.length; i < ii; i++) { + var xy = coords[i]; + coordsPacked[j++] = xy[0]; + coordsPacked[j++] = xy[1]; + } + + mesh.coords = coordsPacked; + var colors = mesh.colors; + var colorsPacked = new Uint8Array(colors.length * 3); + + for (i = 0, j = 0, ii = colors.length; i < ii; i++) { + var c = colors[i]; + colorsPacked[j++] = c[0]; + colorsPacked[j++] = c[1]; + colorsPacked[j++] = c[2]; + } + + mesh.colors = colorsPacked; + var figures = mesh.figures; + + for (i = 0, ii = figures.length; i < ii; i++) { + var figure = figures[i], + ps = figure.coords, + cs = figure.colors; + + for (j = 0, jj = ps.length; j < jj; j++) { + ps[j] *= 2; + cs[j] *= 3; + } + } + } + + function Mesh(stream, matrix, xref, res, pdfFunctionFactory) { + if (!(0, _primitives.isStream)(stream)) { + throw new _util.FormatError("Mesh data is not a stream"); + } + + var dict = stream.dict; + this.matrix = matrix; + this.shadingType = dict.get("ShadingType"); + this.type = "Pattern"; + const bbox = dict.getArray("BBox"); + + if (Array.isArray(bbox) && bbox.length === 4) { + this.bbox = _util.Util.normalizeRect(bbox); + } else { + this.bbox = null; + } + + var cs = dict.get("ColorSpace", "CS"); + cs = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory); + this.cs = cs; + this.background = dict.has("Background") ? cs.getRgb(dict.get("Background"), 0) : null; + var fnObj = dict.get("Function"); + var fn = fnObj ? pdfFunctionFactory.createFromArray(fnObj) : null; + this.coords = []; + this.colors = []; + this.figures = []; + var decodeContext = { + bitsPerCoordinate: dict.get("BitsPerCoordinate"), + bitsPerComponent: dict.get("BitsPerComponent"), + bitsPerFlag: dict.get("BitsPerFlag"), + decode: dict.getArray("Decode"), + colorFn: fn, + colorSpace: cs, + numComps: fn ? 1 : cs.numComps + }; + var reader = new MeshStreamReader(stream, decodeContext); + var patchMesh = false; + + switch (this.shadingType) { + case ShadingType.FREE_FORM_MESH: + decodeType4Shading(this, reader); + break; + + case ShadingType.LATTICE_FORM_MESH: + var verticesPerRow = dict.get("VerticesPerRow") | 0; + + if (verticesPerRow < 2) { + throw new _util.FormatError("Invalid VerticesPerRow"); + } + + decodeType5Shading(this, reader, verticesPerRow); + break; + + case ShadingType.COONS_PATCH_MESH: + decodeType6Shading(this, reader); + patchMesh = true; + break; + + case ShadingType.TENSOR_PATCH_MESH: + decodeType7Shading(this, reader); + patchMesh = true; + break; + + default: + (0, _util.unreachable)("Unsupported mesh type."); + break; + } + + if (patchMesh) { + updateBounds(this); + + for (var i = 0, ii = this.figures.length; i < ii; i++) { + buildFigureFromPatch(this, i); + } + } + + updateBounds(this); + packData(this); + } + + Mesh.prototype = { + getIR: function Mesh_getIR() { + return ["Mesh", this.shadingType, this.coords, this.colors, this.figures, this.bounds, this.matrix, this.bbox, this.background]; + } + }; + return Mesh; +}(); + +Shadings.Dummy = function DummyClosure() { + function Dummy() { + this.type = "Pattern"; + } + + Dummy.prototype = { + getIR: function Dummy_getIR() { + return ["Dummy"]; + } + }; + return Dummy; +}(); + +function getTilingPatternIR(operatorList, dict, args) { + const matrix = dict.getArray("Matrix"); + + const bbox = _util.Util.normalizeRect(dict.getArray("BBox")); + + const xstep = dict.get("XStep"); + const ystep = dict.get("YStep"); + const paintType = dict.get("PaintType"); + const tilingType = dict.get("TilingType"); + + if (bbox[2] - bbox[0] === 0 || bbox[3] - bbox[1] === 0) { + throw new _util.FormatError(`Invalid getTilingPatternIR /BBox array: [${bbox}].`); + } + + return ["TilingPattern", args, operatorList, matrix, bbox, xstep, ystep, paintType, tilingType]; +} + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.bidi = bidi; + +var _util = __w_pdfjs_require__(2); + +var baseTypes = ["BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "S", "B", "S", "WS", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "B", "B", "B", "S", "WS", "ON", "ON", "ET", "ET", "ET", "ON", "ON", "ON", "ON", "ON", "ES", "CS", "ES", "CS", "CS", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "CS", "ON", "ON", "ON", "ON", "ON", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "ON", "ON", "ON", "ON", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "ON", "ON", "ON", "BN", "BN", "BN", "BN", "BN", "BN", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "CS", "ON", "ET", "ET", "ET", "ET", "ON", "ON", "ON", "ON", "L", "ON", "ON", "BN", "ON", "ON", "ET", "ET", "EN", "EN", "ON", "L", "ON", "ON", "ON", "EN", "L", "ON", "ON", "ON", "ON", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "L", "L", "L", "L", "L", "L", "L", "L"]; +var arabicTypes = ["AN", "AN", "AN", "AN", "AN", "AN", "ON", "ON", "AL", "ET", "ET", "AL", "CS", "AL", "ON", "ON", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "ET", "AN", "AN", "AL", "AL", "AL", "NSM", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "ON", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "NSM", "NSM", "ON", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "AL", "AL", "AL", "AL", "AL", "AL"]; + +function isOdd(i) { + return (i & 1) !== 0; +} + +function isEven(i) { + return (i & 1) === 0; +} + +function findUnequal(arr, start, value) { + for (var j = start, jj = arr.length; j < jj; ++j) { + if (arr[j] !== value) { + return j; + } + } + + return j; +} + +function setValues(arr, start, end, value) { + for (var j = start; j < end; ++j) { + arr[j] = value; + } +} + +function reverseValues(arr, start, end) { + for (var i = start, j = end - 1; i < j; ++i, --j) { + var temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + } +} + +function createBidiText(str, isLTR, vertical = false) { + let dir = "ltr"; + + if (vertical) { + dir = "ttb"; + } else if (!isLTR) { + dir = "rtl"; + } + + return { + str, + dir + }; +} + +var chars = []; +var types = []; + +function bidi(str, startLevel, vertical) { + var isLTR = true; + var strLength = str.length; + + if (strLength === 0 || vertical) { + return createBidiText(str, isLTR, vertical); + } + + chars.length = strLength; + types.length = strLength; + var numBidi = 0; + var i, ii; + + for (i = 0; i < strLength; ++i) { + chars[i] = str.charAt(i); + var charCode = str.charCodeAt(i); + var charType = "L"; + + if (charCode <= 0x00ff) { + charType = baseTypes[charCode]; + } else if (0x0590 <= charCode && charCode <= 0x05f4) { + charType = "R"; + } else if (0x0600 <= charCode && charCode <= 0x06ff) { + charType = arabicTypes[charCode & 0xff]; + + if (!charType) { + (0, _util.warn)("Bidi: invalid Unicode character " + charCode.toString(16)); + } + } else if (0x0700 <= charCode && charCode <= 0x08ac) { + charType = "AL"; + } + + if (charType === "R" || charType === "AL" || charType === "AN") { + numBidi++; + } + + types[i] = charType; + } + + if (numBidi === 0) { + isLTR = true; + return createBidiText(str, isLTR); + } + + if (startLevel === -1) { + if (numBidi / strLength < 0.3) { + isLTR = true; + startLevel = 0; + } else { + isLTR = false; + startLevel = 1; + } + } + + var levels = []; + + for (i = 0; i < strLength; ++i) { + levels[i] = startLevel; + } + + var e = isOdd(startLevel) ? "R" : "L"; + var sor = e; + var eor = sor; + var lastType = sor; + + for (i = 0; i < strLength; ++i) { + if (types[i] === "NSM") { + types[i] = lastType; + } else { + lastType = types[i]; + } + } + + lastType = sor; + var t; + + for (i = 0; i < strLength; ++i) { + t = types[i]; + + if (t === "EN") { + types[i] = lastType === "AL" ? "AN" : "EN"; + } else if (t === "R" || t === "L" || t === "AL") { + lastType = t; + } + } + + for (i = 0; i < strLength; ++i) { + t = types[i]; + + if (t === "AL") { + types[i] = "R"; + } + } + + for (i = 1; i < strLength - 1; ++i) { + if (types[i] === "ES" && types[i - 1] === "EN" && types[i + 1] === "EN") { + types[i] = "EN"; + } + + if (types[i] === "CS" && (types[i - 1] === "EN" || types[i - 1] === "AN") && types[i + 1] === types[i - 1]) { + types[i] = types[i - 1]; + } + } + + for (i = 0; i < strLength; ++i) { + if (types[i] === "EN") { + var j; + + for (j = i - 1; j >= 0; --j) { + if (types[j] !== "ET") { + break; + } + + types[j] = "EN"; + } + + for (j = i + 1; j < strLength; ++j) { + if (types[j] !== "ET") { + break; + } + + types[j] = "EN"; + } + } + } + + for (i = 0; i < strLength; ++i) { + t = types[i]; + + if (t === "WS" || t === "ES" || t === "ET" || t === "CS") { + types[i] = "ON"; + } + } + + lastType = sor; + + for (i = 0; i < strLength; ++i) { + t = types[i]; + + if (t === "EN") { + types[i] = lastType === "L" ? "L" : "EN"; + } else if (t === "R" || t === "L") { + lastType = t; + } + } + + for (i = 0; i < strLength; ++i) { + if (types[i] === "ON") { + var end = findUnequal(types, i + 1, "ON"); + var before = sor; + + if (i > 0) { + before = types[i - 1]; + } + + var after = eor; + + if (end + 1 < strLength) { + after = types[end + 1]; + } + + if (before !== "L") { + before = "R"; + } + + if (after !== "L") { + after = "R"; + } + + if (before === after) { + setValues(types, i, end, before); + } + + i = end - 1; + } + } + + for (i = 0; i < strLength; ++i) { + if (types[i] === "ON") { + types[i] = e; + } + } + + for (i = 0; i < strLength; ++i) { + t = types[i]; + + if (isEven(levels[i])) { + if (t === "R") { + levels[i] += 1; + } else if (t === "AN" || t === "EN") { + levels[i] += 2; + } + } else { + if (t === "L" || t === "AN" || t === "EN") { + levels[i] += 1; + } + } + } + + var highestLevel = -1; + var lowestOddLevel = 99; + var level; + + for (i = 0, ii = levels.length; i < ii; ++i) { + level = levels[i]; + + if (highestLevel < level) { + highestLevel = level; + } + + if (lowestOddLevel > level && isOdd(level)) { + lowestOddLevel = level; + } + } + + for (level = highestLevel; level >= lowestOddLevel; --level) { + var start = -1; + + for (i = 0, ii = levels.length; i < ii; ++i) { + if (levels[i] < level) { + if (start >= 0) { + reverseValues(chars, start, i); + start = -1; + } + } else if (start < 0) { + start = i; + } + } + + if (start >= 0) { + reverseValues(chars, start, levels.length); + } + } + + for (i = 0, ii = chars.length; i < ii; ++i) { + var ch = chars[i]; + + if (ch === "<" || ch === ">") { + chars[i] = ""; + } + } + + return createBidiText(chars.join(""), isLTR); +} + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getMetrics = void 0; + +var _core_utils = __w_pdfjs_require__(8); + +var getMetrics = (0, _core_utils.getLookupTableFactory)(function (t) { + t.Courier = 600; + t["Courier-Bold"] = 600; + t["Courier-BoldOblique"] = 600; + t["Courier-Oblique"] = 600; + t.Helvetica = (0, _core_utils.getLookupTableFactory)(function (t) { + t.space = 278; + t.exclam = 278; + t.quotedbl = 355; + t.numbersign = 556; + t.dollar = 556; + t.percent = 889; + t.ampersand = 667; + t.quoteright = 222; + t.parenleft = 333; + t.parenright = 333; + t.asterisk = 389; + t.plus = 584; + t.comma = 278; + t.hyphen = 333; + t.period = 278; + t.slash = 278; + t.zero = 556; + t.one = 556; + t.two = 556; + t.three = 556; + t.four = 556; + t.five = 556; + t.six = 556; + t.seven = 556; + t.eight = 556; + t.nine = 556; + t.colon = 278; + t.semicolon = 278; + t.less = 584; + t.equal = 584; + t.greater = 584; + t.question = 556; + t.at = 1015; + t.A = 667; + t.B = 667; + t.C = 722; + t.D = 722; + t.E = 667; + t.F = 611; + t.G = 778; + t.H = 722; + t.I = 278; + t.J = 500; + t.K = 667; + t.L = 556; + t.M = 833; + t.N = 722; + t.O = 778; + t.P = 667; + t.Q = 778; + t.R = 722; + t.S = 667; + t.T = 611; + t.U = 722; + t.V = 667; + t.W = 944; + t.X = 667; + t.Y = 667; + t.Z = 611; + t.bracketleft = 278; + t.backslash = 278; + t.bracketright = 278; + t.asciicircum = 469; + t.underscore = 556; + t.quoteleft = 222; + t.a = 556; + t.b = 556; + t.c = 500; + t.d = 556; + t.e = 556; + t.f = 278; + t.g = 556; + t.h = 556; + t.i = 222; + t.j = 222; + t.k = 500; + t.l = 222; + t.m = 833; + t.n = 556; + t.o = 556; + t.p = 556; + t.q = 556; + t.r = 333; + t.s = 500; + t.t = 278; + t.u = 556; + t.v = 500; + t.w = 722; + t.x = 500; + t.y = 500; + t.z = 500; + t.braceleft = 334; + t.bar = 260; + t.braceright = 334; + t.asciitilde = 584; + t.exclamdown = 333; + t.cent = 556; + t.sterling = 556; + t.fraction = 167; + t.yen = 556; + t.florin = 556; + t.section = 556; + t.currency = 556; + t.quotesingle = 191; + t.quotedblleft = 333; + t.guillemotleft = 556; + t.guilsinglleft = 333; + t.guilsinglright = 333; + t.fi = 500; + t.fl = 500; + t.endash = 556; + t.dagger = 556; + t.daggerdbl = 556; + t.periodcentered = 278; + t.paragraph = 537; + t.bullet = 350; + t.quotesinglbase = 222; + t.quotedblbase = 333; + t.quotedblright = 333; + t.guillemotright = 556; + t.ellipsis = 1000; + t.perthousand = 1000; + t.questiondown = 611; + t.grave = 333; + t.acute = 333; + t.circumflex = 333; + t.tilde = 333; + t.macron = 333; + t.breve = 333; + t.dotaccent = 333; + t.dieresis = 333; + t.ring = 333; + t.cedilla = 333; + t.hungarumlaut = 333; + t.ogonek = 333; + t.caron = 333; + t.emdash = 1000; + t.AE = 1000; + t.ordfeminine = 370; + t.Lslash = 556; + t.Oslash = 778; + t.OE = 1000; + t.ordmasculine = 365; + t.ae = 889; + t.dotlessi = 278; + t.lslash = 222; + t.oslash = 611; + t.oe = 944; + t.germandbls = 611; + t.Idieresis = 278; + t.eacute = 556; + t.abreve = 556; + t.uhungarumlaut = 556; + t.ecaron = 556; + t.Ydieresis = 667; + t.divide = 584; + t.Yacute = 667; + t.Acircumflex = 667; + t.aacute = 556; + t.Ucircumflex = 722; + t.yacute = 500; + t.scommaaccent = 500; + t.ecircumflex = 556; + t.Uring = 722; + t.Udieresis = 722; + t.aogonek = 556; + t.Uacute = 722; + t.uogonek = 556; + t.Edieresis = 667; + t.Dcroat = 722; + t.commaaccent = 250; + t.copyright = 737; + t.Emacron = 667; + t.ccaron = 500; + t.aring = 556; + t.Ncommaaccent = 722; + t.lacute = 222; + t.agrave = 556; + t.Tcommaaccent = 611; + t.Cacute = 722; + t.atilde = 556; + t.Edotaccent = 667; + t.scaron = 500; + t.scedilla = 500; + t.iacute = 278; + t.lozenge = 471; + t.Rcaron = 722; + t.Gcommaaccent = 778; + t.ucircumflex = 556; + t.acircumflex = 556; + t.Amacron = 667; + t.rcaron = 333; + t.ccedilla = 500; + t.Zdotaccent = 611; + t.Thorn = 667; + t.Omacron = 778; + t.Racute = 722; + t.Sacute = 667; + t.dcaron = 643; + t.Umacron = 722; + t.uring = 556; + t.threesuperior = 333; + t.Ograve = 778; + t.Agrave = 667; + t.Abreve = 667; + t.multiply = 584; + t.uacute = 556; + t.Tcaron = 611; + t.partialdiff = 476; + t.ydieresis = 500; + t.Nacute = 722; + t.icircumflex = 278; + t.Ecircumflex = 667; + t.adieresis = 556; + t.edieresis = 556; + t.cacute = 500; + t.nacute = 556; + t.umacron = 556; + t.Ncaron = 722; + t.Iacute = 278; + t.plusminus = 584; + t.brokenbar = 260; + t.registered = 737; + t.Gbreve = 778; + t.Idotaccent = 278; + t.summation = 600; + t.Egrave = 667; + t.racute = 333; + t.omacron = 556; + t.Zacute = 611; + t.Zcaron = 611; + t.greaterequal = 549; + t.Eth = 722; + t.Ccedilla = 722; + t.lcommaaccent = 222; + t.tcaron = 317; + t.eogonek = 556; + t.Uogonek = 722; + t.Aacute = 667; + t.Adieresis = 667; + t.egrave = 556; + t.zacute = 500; + t.iogonek = 222; + t.Oacute = 778; + t.oacute = 556; + t.amacron = 556; + t.sacute = 500; + t.idieresis = 278; + t.Ocircumflex = 778; + t.Ugrave = 722; + t.Delta = 612; + t.thorn = 556; + t.twosuperior = 333; + t.Odieresis = 778; + t.mu = 556; + t.igrave = 278; + t.ohungarumlaut = 556; + t.Eogonek = 667; + t.dcroat = 556; + t.threequarters = 834; + t.Scedilla = 667; + t.lcaron = 299; + t.Kcommaaccent = 667; + t.Lacute = 556; + t.trademark = 1000; + t.edotaccent = 556; + t.Igrave = 278; + t.Imacron = 278; + t.Lcaron = 556; + t.onehalf = 834; + t.lessequal = 549; + t.ocircumflex = 556; + t.ntilde = 556; + t.Uhungarumlaut = 722; + t.Eacute = 667; + t.emacron = 556; + t.gbreve = 556; + t.onequarter = 834; + t.Scaron = 667; + t.Scommaaccent = 667; + t.Ohungarumlaut = 778; + t.degree = 400; + t.ograve = 556; + t.Ccaron = 722; + t.ugrave = 556; + t.radical = 453; + t.Dcaron = 722; + t.rcommaaccent = 333; + t.Ntilde = 722; + t.otilde = 556; + t.Rcommaaccent = 722; + t.Lcommaaccent = 556; + t.Atilde = 667; + t.Aogonek = 667; + t.Aring = 667; + t.Otilde = 778; + t.zdotaccent = 500; + t.Ecaron = 667; + t.Iogonek = 278; + t.kcommaaccent = 500; + t.minus = 584; + t.Icircumflex = 278; + t.ncaron = 556; + t.tcommaaccent = 278; + t.logicalnot = 584; + t.odieresis = 556; + t.udieresis = 556; + t.notequal = 549; + t.gcommaaccent = 556; + t.eth = 556; + t.zcaron = 500; + t.ncommaaccent = 556; + t.onesuperior = 333; + t.imacron = 278; + t.Euro = 556; + }); + t["Helvetica-Bold"] = (0, _core_utils.getLookupTableFactory)(function (t) { + t.space = 278; + t.exclam = 333; + t.quotedbl = 474; + t.numbersign = 556; + t.dollar = 556; + t.percent = 889; + t.ampersand = 722; + t.quoteright = 278; + t.parenleft = 333; + t.parenright = 333; + t.asterisk = 389; + t.plus = 584; + t.comma = 278; + t.hyphen = 333; + t.period = 278; + t.slash = 278; + t.zero = 556; + t.one = 556; + t.two = 556; + t.three = 556; + t.four = 556; + t.five = 556; + t.six = 556; + t.seven = 556; + t.eight = 556; + t.nine = 556; + t.colon = 333; + t.semicolon = 333; + t.less = 584; + t.equal = 584; + t.greater = 584; + t.question = 611; + t.at = 975; + t.A = 722; + t.B = 722; + t.C = 722; + t.D = 722; + t.E = 667; + t.F = 611; + t.G = 778; + t.H = 722; + t.I = 278; + t.J = 556; + t.K = 722; + t.L = 611; + t.M = 833; + t.N = 722; + t.O = 778; + t.P = 667; + t.Q = 778; + t.R = 722; + t.S = 667; + t.T = 611; + t.U = 722; + t.V = 667; + t.W = 944; + t.X = 667; + t.Y = 667; + t.Z = 611; + t.bracketleft = 333; + t.backslash = 278; + t.bracketright = 333; + t.asciicircum = 584; + t.underscore = 556; + t.quoteleft = 278; + t.a = 556; + t.b = 611; + t.c = 556; + t.d = 611; + t.e = 556; + t.f = 333; + t.g = 611; + t.h = 611; + t.i = 278; + t.j = 278; + t.k = 556; + t.l = 278; + t.m = 889; + t.n = 611; + t.o = 611; + t.p = 611; + t.q = 611; + t.r = 389; + t.s = 556; + t.t = 333; + t.u = 611; + t.v = 556; + t.w = 778; + t.x = 556; + t.y = 556; + t.z = 500; + t.braceleft = 389; + t.bar = 280; + t.braceright = 389; + t.asciitilde = 584; + t.exclamdown = 333; + t.cent = 556; + t.sterling = 556; + t.fraction = 167; + t.yen = 556; + t.florin = 556; + t.section = 556; + t.currency = 556; + t.quotesingle = 238; + t.quotedblleft = 500; + t.guillemotleft = 556; + t.guilsinglleft = 333; + t.guilsinglright = 333; + t.fi = 611; + t.fl = 611; + t.endash = 556; + t.dagger = 556; + t.daggerdbl = 556; + t.periodcentered = 278; + t.paragraph = 556; + t.bullet = 350; + t.quotesinglbase = 278; + t.quotedblbase = 500; + t.quotedblright = 500; + t.guillemotright = 556; + t.ellipsis = 1000; + t.perthousand = 1000; + t.questiondown = 611; + t.grave = 333; + t.acute = 333; + t.circumflex = 333; + t.tilde = 333; + t.macron = 333; + t.breve = 333; + t.dotaccent = 333; + t.dieresis = 333; + t.ring = 333; + t.cedilla = 333; + t.hungarumlaut = 333; + t.ogonek = 333; + t.caron = 333; + t.emdash = 1000; + t.AE = 1000; + t.ordfeminine = 370; + t.Lslash = 611; + t.Oslash = 778; + t.OE = 1000; + t.ordmasculine = 365; + t.ae = 889; + t.dotlessi = 278; + t.lslash = 278; + t.oslash = 611; + t.oe = 944; + t.germandbls = 611; + t.Idieresis = 278; + t.eacute = 556; + t.abreve = 556; + t.uhungarumlaut = 611; + t.ecaron = 556; + t.Ydieresis = 667; + t.divide = 584; + t.Yacute = 667; + t.Acircumflex = 722; + t.aacute = 556; + t.Ucircumflex = 722; + t.yacute = 556; + t.scommaaccent = 556; + t.ecircumflex = 556; + t.Uring = 722; + t.Udieresis = 722; + t.aogonek = 556; + t.Uacute = 722; + t.uogonek = 611; + t.Edieresis = 667; + t.Dcroat = 722; + t.commaaccent = 250; + t.copyright = 737; + t.Emacron = 667; + t.ccaron = 556; + t.aring = 556; + t.Ncommaaccent = 722; + t.lacute = 278; + t.agrave = 556; + t.Tcommaaccent = 611; + t.Cacute = 722; + t.atilde = 556; + t.Edotaccent = 667; + t.scaron = 556; + t.scedilla = 556; + t.iacute = 278; + t.lozenge = 494; + t.Rcaron = 722; + t.Gcommaaccent = 778; + t.ucircumflex = 611; + t.acircumflex = 556; + t.Amacron = 722; + t.rcaron = 389; + t.ccedilla = 556; + t.Zdotaccent = 611; + t.Thorn = 667; + t.Omacron = 778; + t.Racute = 722; + t.Sacute = 667; + t.dcaron = 743; + t.Umacron = 722; + t.uring = 611; + t.threesuperior = 333; + t.Ograve = 778; + t.Agrave = 722; + t.Abreve = 722; + t.multiply = 584; + t.uacute = 611; + t.Tcaron = 611; + t.partialdiff = 494; + t.ydieresis = 556; + t.Nacute = 722; + t.icircumflex = 278; + t.Ecircumflex = 667; + t.adieresis = 556; + t.edieresis = 556; + t.cacute = 556; + t.nacute = 611; + t.umacron = 611; + t.Ncaron = 722; + t.Iacute = 278; + t.plusminus = 584; + t.brokenbar = 280; + t.registered = 737; + t.Gbreve = 778; + t.Idotaccent = 278; + t.summation = 600; + t.Egrave = 667; + t.racute = 389; + t.omacron = 611; + t.Zacute = 611; + t.Zcaron = 611; + t.greaterequal = 549; + t.Eth = 722; + t.Ccedilla = 722; + t.lcommaaccent = 278; + t.tcaron = 389; + t.eogonek = 556; + t.Uogonek = 722; + t.Aacute = 722; + t.Adieresis = 722; + t.egrave = 556; + t.zacute = 500; + t.iogonek = 278; + t.Oacute = 778; + t.oacute = 611; + t.amacron = 556; + t.sacute = 556; + t.idieresis = 278; + t.Ocircumflex = 778; + t.Ugrave = 722; + t.Delta = 612; + t.thorn = 611; + t.twosuperior = 333; + t.Odieresis = 778; + t.mu = 611; + t.igrave = 278; + t.ohungarumlaut = 611; + t.Eogonek = 667; + t.dcroat = 611; + t.threequarters = 834; + t.Scedilla = 667; + t.lcaron = 400; + t.Kcommaaccent = 722; + t.Lacute = 611; + t.trademark = 1000; + t.edotaccent = 556; + t.Igrave = 278; + t.Imacron = 278; + t.Lcaron = 611; + t.onehalf = 834; + t.lessequal = 549; + t.ocircumflex = 611; + t.ntilde = 611; + t.Uhungarumlaut = 722; + t.Eacute = 667; + t.emacron = 556; + t.gbreve = 611; + t.onequarter = 834; + t.Scaron = 667; + t.Scommaaccent = 667; + t.Ohungarumlaut = 778; + t.degree = 400; + t.ograve = 611; + t.Ccaron = 722; + t.ugrave = 611; + t.radical = 549; + t.Dcaron = 722; + t.rcommaaccent = 389; + t.Ntilde = 722; + t.otilde = 611; + t.Rcommaaccent = 722; + t.Lcommaaccent = 611; + t.Atilde = 722; + t.Aogonek = 722; + t.Aring = 722; + t.Otilde = 778; + t.zdotaccent = 500; + t.Ecaron = 667; + t.Iogonek = 278; + t.kcommaaccent = 556; + t.minus = 584; + t.Icircumflex = 278; + t.ncaron = 611; + t.tcommaaccent = 333; + t.logicalnot = 584; + t.odieresis = 611; + t.udieresis = 611; + t.notequal = 549; + t.gcommaaccent = 611; + t.eth = 611; + t.zcaron = 500; + t.ncommaaccent = 611; + t.onesuperior = 333; + t.imacron = 278; + t.Euro = 556; + }); + t["Helvetica-BoldOblique"] = (0, _core_utils.getLookupTableFactory)(function (t) { + t.space = 278; + t.exclam = 333; + t.quotedbl = 474; + t.numbersign = 556; + t.dollar = 556; + t.percent = 889; + t.ampersand = 722; + t.quoteright = 278; + t.parenleft = 333; + t.parenright = 333; + t.asterisk = 389; + t.plus = 584; + t.comma = 278; + t.hyphen = 333; + t.period = 278; + t.slash = 278; + t.zero = 556; + t.one = 556; + t.two = 556; + t.three = 556; + t.four = 556; + t.five = 556; + t.six = 556; + t.seven = 556; + t.eight = 556; + t.nine = 556; + t.colon = 333; + t.semicolon = 333; + t.less = 584; + t.equal = 584; + t.greater = 584; + t.question = 611; + t.at = 975; + t.A = 722; + t.B = 722; + t.C = 722; + t.D = 722; + t.E = 667; + t.F = 611; + t.G = 778; + t.H = 722; + t.I = 278; + t.J = 556; + t.K = 722; + t.L = 611; + t.M = 833; + t.N = 722; + t.O = 778; + t.P = 667; + t.Q = 778; + t.R = 722; + t.S = 667; + t.T = 611; + t.U = 722; + t.V = 667; + t.W = 944; + t.X = 667; + t.Y = 667; + t.Z = 611; + t.bracketleft = 333; + t.backslash = 278; + t.bracketright = 333; + t.asciicircum = 584; + t.underscore = 556; + t.quoteleft = 278; + t.a = 556; + t.b = 611; + t.c = 556; + t.d = 611; + t.e = 556; + t.f = 333; + t.g = 611; + t.h = 611; + t.i = 278; + t.j = 278; + t.k = 556; + t.l = 278; + t.m = 889; + t.n = 611; + t.o = 611; + t.p = 611; + t.q = 611; + t.r = 389; + t.s = 556; + t.t = 333; + t.u = 611; + t.v = 556; + t.w = 778; + t.x = 556; + t.y = 556; + t.z = 500; + t.braceleft = 389; + t.bar = 280; + t.braceright = 389; + t.asciitilde = 584; + t.exclamdown = 333; + t.cent = 556; + t.sterling = 556; + t.fraction = 167; + t.yen = 556; + t.florin = 556; + t.section = 556; + t.currency = 556; + t.quotesingle = 238; + t.quotedblleft = 500; + t.guillemotleft = 556; + t.guilsinglleft = 333; + t.guilsinglright = 333; + t.fi = 611; + t.fl = 611; + t.endash = 556; + t.dagger = 556; + t.daggerdbl = 556; + t.periodcentered = 278; + t.paragraph = 556; + t.bullet = 350; + t.quotesinglbase = 278; + t.quotedblbase = 500; + t.quotedblright = 500; + t.guillemotright = 556; + t.ellipsis = 1000; + t.perthousand = 1000; + t.questiondown = 611; + t.grave = 333; + t.acute = 333; + t.circumflex = 333; + t.tilde = 333; + t.macron = 333; + t.breve = 333; + t.dotaccent = 333; + t.dieresis = 333; + t.ring = 333; + t.cedilla = 333; + t.hungarumlaut = 333; + t.ogonek = 333; + t.caron = 333; + t.emdash = 1000; + t.AE = 1000; + t.ordfeminine = 370; + t.Lslash = 611; + t.Oslash = 778; + t.OE = 1000; + t.ordmasculine = 365; + t.ae = 889; + t.dotlessi = 278; + t.lslash = 278; + t.oslash = 611; + t.oe = 944; + t.germandbls = 611; + t.Idieresis = 278; + t.eacute = 556; + t.abreve = 556; + t.uhungarumlaut = 611; + t.ecaron = 556; + t.Ydieresis = 667; + t.divide = 584; + t.Yacute = 667; + t.Acircumflex = 722; + t.aacute = 556; + t.Ucircumflex = 722; + t.yacute = 556; + t.scommaaccent = 556; + t.ecircumflex = 556; + t.Uring = 722; + t.Udieresis = 722; + t.aogonek = 556; + t.Uacute = 722; + t.uogonek = 611; + t.Edieresis = 667; + t.Dcroat = 722; + t.commaaccent = 250; + t.copyright = 737; + t.Emacron = 667; + t.ccaron = 556; + t.aring = 556; + t.Ncommaaccent = 722; + t.lacute = 278; + t.agrave = 556; + t.Tcommaaccent = 611; + t.Cacute = 722; + t.atilde = 556; + t.Edotaccent = 667; + t.scaron = 556; + t.scedilla = 556; + t.iacute = 278; + t.lozenge = 494; + t.Rcaron = 722; + t.Gcommaaccent = 778; + t.ucircumflex = 611; + t.acircumflex = 556; + t.Amacron = 722; + t.rcaron = 389; + t.ccedilla = 556; + t.Zdotaccent = 611; + t.Thorn = 667; + t.Omacron = 778; + t.Racute = 722; + t.Sacute = 667; + t.dcaron = 743; + t.Umacron = 722; + t.uring = 611; + t.threesuperior = 333; + t.Ograve = 778; + t.Agrave = 722; + t.Abreve = 722; + t.multiply = 584; + t.uacute = 611; + t.Tcaron = 611; + t.partialdiff = 494; + t.ydieresis = 556; + t.Nacute = 722; + t.icircumflex = 278; + t.Ecircumflex = 667; + t.adieresis = 556; + t.edieresis = 556; + t.cacute = 556; + t.nacute = 611; + t.umacron = 611; + t.Ncaron = 722; + t.Iacute = 278; + t.plusminus = 584; + t.brokenbar = 280; + t.registered = 737; + t.Gbreve = 778; + t.Idotaccent = 278; + t.summation = 600; + t.Egrave = 667; + t.racute = 389; + t.omacron = 611; + t.Zacute = 611; + t.Zcaron = 611; + t.greaterequal = 549; + t.Eth = 722; + t.Ccedilla = 722; + t.lcommaaccent = 278; + t.tcaron = 389; + t.eogonek = 556; + t.Uogonek = 722; + t.Aacute = 722; + t.Adieresis = 722; + t.egrave = 556; + t.zacute = 500; + t.iogonek = 278; + t.Oacute = 778; + t.oacute = 611; + t.amacron = 556; + t.sacute = 556; + t.idieresis = 278; + t.Ocircumflex = 778; + t.Ugrave = 722; + t.Delta = 612; + t.thorn = 611; + t.twosuperior = 333; + t.Odieresis = 778; + t.mu = 611; + t.igrave = 278; + t.ohungarumlaut = 611; + t.Eogonek = 667; + t.dcroat = 611; + t.threequarters = 834; + t.Scedilla = 667; + t.lcaron = 400; + t.Kcommaaccent = 722; + t.Lacute = 611; + t.trademark = 1000; + t.edotaccent = 556; + t.Igrave = 278; + t.Imacron = 278; + t.Lcaron = 611; + t.onehalf = 834; + t.lessequal = 549; + t.ocircumflex = 611; + t.ntilde = 611; + t.Uhungarumlaut = 722; + t.Eacute = 667; + t.emacron = 556; + t.gbreve = 611; + t.onequarter = 834; + t.Scaron = 667; + t.Scommaaccent = 667; + t.Ohungarumlaut = 778; + t.degree = 400; + t.ograve = 611; + t.Ccaron = 722; + t.ugrave = 611; + t.radical = 549; + t.Dcaron = 722; + t.rcommaaccent = 389; + t.Ntilde = 722; + t.otilde = 611; + t.Rcommaaccent = 722; + t.Lcommaaccent = 611; + t.Atilde = 722; + t.Aogonek = 722; + t.Aring = 722; + t.Otilde = 778; + t.zdotaccent = 500; + t.Ecaron = 667; + t.Iogonek = 278; + t.kcommaaccent = 556; + t.minus = 584; + t.Icircumflex = 278; + t.ncaron = 611; + t.tcommaaccent = 333; + t.logicalnot = 584; + t.odieresis = 611; + t.udieresis = 611; + t.notequal = 549; + t.gcommaaccent = 611; + t.eth = 611; + t.zcaron = 500; + t.ncommaaccent = 611; + t.onesuperior = 333; + t.imacron = 278; + t.Euro = 556; + }); + t["Helvetica-Oblique"] = (0, _core_utils.getLookupTableFactory)(function (t) { + t.space = 278; + t.exclam = 278; + t.quotedbl = 355; + t.numbersign = 556; + t.dollar = 556; + t.percent = 889; + t.ampersand = 667; + t.quoteright = 222; + t.parenleft = 333; + t.parenright = 333; + t.asterisk = 389; + t.plus = 584; + t.comma = 278; + t.hyphen = 333; + t.period = 278; + t.slash = 278; + t.zero = 556; + t.one = 556; + t.two = 556; + t.three = 556; + t.four = 556; + t.five = 556; + t.six = 556; + t.seven = 556; + t.eight = 556; + t.nine = 556; + t.colon = 278; + t.semicolon = 278; + t.less = 584; + t.equal = 584; + t.greater = 584; + t.question = 556; + t.at = 1015; + t.A = 667; + t.B = 667; + t.C = 722; + t.D = 722; + t.E = 667; + t.F = 611; + t.G = 778; + t.H = 722; + t.I = 278; + t.J = 500; + t.K = 667; + t.L = 556; + t.M = 833; + t.N = 722; + t.O = 778; + t.P = 667; + t.Q = 778; + t.R = 722; + t.S = 667; + t.T = 611; + t.U = 722; + t.V = 667; + t.W = 944; + t.X = 667; + t.Y = 667; + t.Z = 611; + t.bracketleft = 278; + t.backslash = 278; + t.bracketright = 278; + t.asciicircum = 469; + t.underscore = 556; + t.quoteleft = 222; + t.a = 556; + t.b = 556; + t.c = 500; + t.d = 556; + t.e = 556; + t.f = 278; + t.g = 556; + t.h = 556; + t.i = 222; + t.j = 222; + t.k = 500; + t.l = 222; + t.m = 833; + t.n = 556; + t.o = 556; + t.p = 556; + t.q = 556; + t.r = 333; + t.s = 500; + t.t = 278; + t.u = 556; + t.v = 500; + t.w = 722; + t.x = 500; + t.y = 500; + t.z = 500; + t.braceleft = 334; + t.bar = 260; + t.braceright = 334; + t.asciitilde = 584; + t.exclamdown = 333; + t.cent = 556; + t.sterling = 556; + t.fraction = 167; + t.yen = 556; + t.florin = 556; + t.section = 556; + t.currency = 556; + t.quotesingle = 191; + t.quotedblleft = 333; + t.guillemotleft = 556; + t.guilsinglleft = 333; + t.guilsinglright = 333; + t.fi = 500; + t.fl = 500; + t.endash = 556; + t.dagger = 556; + t.daggerdbl = 556; + t.periodcentered = 278; + t.paragraph = 537; + t.bullet = 350; + t.quotesinglbase = 222; + t.quotedblbase = 333; + t.quotedblright = 333; + t.guillemotright = 556; + t.ellipsis = 1000; + t.perthousand = 1000; + t.questiondown = 611; + t.grave = 333; + t.acute = 333; + t.circumflex = 333; + t.tilde = 333; + t.macron = 333; + t.breve = 333; + t.dotaccent = 333; + t.dieresis = 333; + t.ring = 333; + t.cedilla = 333; + t.hungarumlaut = 333; + t.ogonek = 333; + t.caron = 333; + t.emdash = 1000; + t.AE = 1000; + t.ordfeminine = 370; + t.Lslash = 556; + t.Oslash = 778; + t.OE = 1000; + t.ordmasculine = 365; + t.ae = 889; + t.dotlessi = 278; + t.lslash = 222; + t.oslash = 611; + t.oe = 944; + t.germandbls = 611; + t.Idieresis = 278; + t.eacute = 556; + t.abreve = 556; + t.uhungarumlaut = 556; + t.ecaron = 556; + t.Ydieresis = 667; + t.divide = 584; + t.Yacute = 667; + t.Acircumflex = 667; + t.aacute = 556; + t.Ucircumflex = 722; + t.yacute = 500; + t.scommaaccent = 500; + t.ecircumflex = 556; + t.Uring = 722; + t.Udieresis = 722; + t.aogonek = 556; + t.Uacute = 722; + t.uogonek = 556; + t.Edieresis = 667; + t.Dcroat = 722; + t.commaaccent = 250; + t.copyright = 737; + t.Emacron = 667; + t.ccaron = 500; + t.aring = 556; + t.Ncommaaccent = 722; + t.lacute = 222; + t.agrave = 556; + t.Tcommaaccent = 611; + t.Cacute = 722; + t.atilde = 556; + t.Edotaccent = 667; + t.scaron = 500; + t.scedilla = 500; + t.iacute = 278; + t.lozenge = 471; + t.Rcaron = 722; + t.Gcommaaccent = 778; + t.ucircumflex = 556; + t.acircumflex = 556; + t.Amacron = 667; + t.rcaron = 333; + t.ccedilla = 500; + t.Zdotaccent = 611; + t.Thorn = 667; + t.Omacron = 778; + t.Racute = 722; + t.Sacute = 667; + t.dcaron = 643; + t.Umacron = 722; + t.uring = 556; + t.threesuperior = 333; + t.Ograve = 778; + t.Agrave = 667; + t.Abreve = 667; + t.multiply = 584; + t.uacute = 556; + t.Tcaron = 611; + t.partialdiff = 476; + t.ydieresis = 500; + t.Nacute = 722; + t.icircumflex = 278; + t.Ecircumflex = 667; + t.adieresis = 556; + t.edieresis = 556; + t.cacute = 500; + t.nacute = 556; + t.umacron = 556; + t.Ncaron = 722; + t.Iacute = 278; + t.plusminus = 584; + t.brokenbar = 260; + t.registered = 737; + t.Gbreve = 778; + t.Idotaccent = 278; + t.summation = 600; + t.Egrave = 667; + t.racute = 333; + t.omacron = 556; + t.Zacute = 611; + t.Zcaron = 611; + t.greaterequal = 549; + t.Eth = 722; + t.Ccedilla = 722; + t.lcommaaccent = 222; + t.tcaron = 317; + t.eogonek = 556; + t.Uogonek = 722; + t.Aacute = 667; + t.Adieresis = 667; + t.egrave = 556; + t.zacute = 500; + t.iogonek = 222; + t.Oacute = 778; + t.oacute = 556; + t.amacron = 556; + t.sacute = 500; + t.idieresis = 278; + t.Ocircumflex = 778; + t.Ugrave = 722; + t.Delta = 612; + t.thorn = 556; + t.twosuperior = 333; + t.Odieresis = 778; + t.mu = 556; + t.igrave = 278; + t.ohungarumlaut = 556; + t.Eogonek = 667; + t.dcroat = 556; + t.threequarters = 834; + t.Scedilla = 667; + t.lcaron = 299; + t.Kcommaaccent = 667; + t.Lacute = 556; + t.trademark = 1000; + t.edotaccent = 556; + t.Igrave = 278; + t.Imacron = 278; + t.Lcaron = 556; + t.onehalf = 834; + t.lessequal = 549; + t.ocircumflex = 556; + t.ntilde = 556; + t.Uhungarumlaut = 722; + t.Eacute = 667; + t.emacron = 556; + t.gbreve = 556; + t.onequarter = 834; + t.Scaron = 667; + t.Scommaaccent = 667; + t.Ohungarumlaut = 778; + t.degree = 400; + t.ograve = 556; + t.Ccaron = 722; + t.ugrave = 556; + t.radical = 453; + t.Dcaron = 722; + t.rcommaaccent = 333; + t.Ntilde = 722; + t.otilde = 556; + t.Rcommaaccent = 722; + t.Lcommaaccent = 556; + t.Atilde = 667; + t.Aogonek = 667; + t.Aring = 667; + t.Otilde = 778; + t.zdotaccent = 500; + t.Ecaron = 667; + t.Iogonek = 278; + t.kcommaaccent = 500; + t.minus = 584; + t.Icircumflex = 278; + t.ncaron = 556; + t.tcommaaccent = 278; + t.logicalnot = 584; + t.odieresis = 556; + t.udieresis = 556; + t.notequal = 549; + t.gcommaaccent = 556; + t.eth = 556; + t.zcaron = 500; + t.ncommaaccent = 556; + t.onesuperior = 333; + t.imacron = 278; + t.Euro = 556; + }); + t.Symbol = (0, _core_utils.getLookupTableFactory)(function (t) { + t.space = 250; + t.exclam = 333; + t.universal = 713; + t.numbersign = 500; + t.existential = 549; + t.percent = 833; + t.ampersand = 778; + t.suchthat = 439; + t.parenleft = 333; + t.parenright = 333; + t.asteriskmath = 500; + t.plus = 549; + t.comma = 250; + t.minus = 549; + t.period = 250; + t.slash = 278; + t.zero = 500; + t.one = 500; + t.two = 500; + t.three = 500; + t.four = 500; + t.five = 500; + t.six = 500; + t.seven = 500; + t.eight = 500; + t.nine = 500; + t.colon = 278; + t.semicolon = 278; + t.less = 549; + t.equal = 549; + t.greater = 549; + t.question = 444; + t.congruent = 549; + t.Alpha = 722; + t.Beta = 667; + t.Chi = 722; + t.Delta = 612; + t.Epsilon = 611; + t.Phi = 763; + t.Gamma = 603; + t.Eta = 722; + t.Iota = 333; + t.theta1 = 631; + t.Kappa = 722; + t.Lambda = 686; + t.Mu = 889; + t.Nu = 722; + t.Omicron = 722; + t.Pi = 768; + t.Theta = 741; + t.Rho = 556; + t.Sigma = 592; + t.Tau = 611; + t.Upsilon = 690; + t.sigma1 = 439; + t.Omega = 768; + t.Xi = 645; + t.Psi = 795; + t.Zeta = 611; + t.bracketleft = 333; + t.therefore = 863; + t.bracketright = 333; + t.perpendicular = 658; + t.underscore = 500; + t.radicalex = 500; + t.alpha = 631; + t.beta = 549; + t.chi = 549; + t.delta = 494; + t.epsilon = 439; + t.phi = 521; + t.gamma = 411; + t.eta = 603; + t.iota = 329; + t.phi1 = 603; + t.kappa = 549; + t.lambda = 549; + t.mu = 576; + t.nu = 521; + t.omicron = 549; + t.pi = 549; + t.theta = 521; + t.rho = 549; + t.sigma = 603; + t.tau = 439; + t.upsilon = 576; + t.omega1 = 713; + t.omega = 686; + t.xi = 493; + t.psi = 686; + t.zeta = 494; + t.braceleft = 480; + t.bar = 200; + t.braceright = 480; + t.similar = 549; + t.Euro = 750; + t.Upsilon1 = 620; + t.minute = 247; + t.lessequal = 549; + t.fraction = 167; + t.infinity = 713; + t.florin = 500; + t.club = 753; + t.diamond = 753; + t.heart = 753; + t.spade = 753; + t.arrowboth = 1042; + t.arrowleft = 987; + t.arrowup = 603; + t.arrowright = 987; + t.arrowdown = 603; + t.degree = 400; + t.plusminus = 549; + t.second = 411; + t.greaterequal = 549; + t.multiply = 549; + t.proportional = 713; + t.partialdiff = 494; + t.bullet = 460; + t.divide = 549; + t.notequal = 549; + t.equivalence = 549; + t.approxequal = 549; + t.ellipsis = 1000; + t.arrowvertex = 603; + t.arrowhorizex = 1000; + t.carriagereturn = 658; + t.aleph = 823; + t.Ifraktur = 686; + t.Rfraktur = 795; + t.weierstrass = 987; + t.circlemultiply = 768; + t.circleplus = 768; + t.emptyset = 823; + t.intersection = 768; + t.union = 768; + t.propersuperset = 713; + t.reflexsuperset = 713; + t.notsubset = 713; + t.propersubset = 713; + t.reflexsubset = 713; + t.element = 713; + t.notelement = 713; + t.angle = 768; + t.gradient = 713; + t.registerserif = 790; + t.copyrightserif = 790; + t.trademarkserif = 890; + t.product = 823; + t.radical = 549; + t.dotmath = 250; + t.logicalnot = 713; + t.logicaland = 603; + t.logicalor = 603; + t.arrowdblboth = 1042; + t.arrowdblleft = 987; + t.arrowdblup = 603; + t.arrowdblright = 987; + t.arrowdbldown = 603; + t.lozenge = 494; + t.angleleft = 329; + t.registersans = 790; + t.copyrightsans = 790; + t.trademarksans = 786; + t.summation = 713; + t.parenlefttp = 384; + t.parenleftex = 384; + t.parenleftbt = 384; + t.bracketlefttp = 384; + t.bracketleftex = 384; + t.bracketleftbt = 384; + t.bracelefttp = 494; + t.braceleftmid = 494; + t.braceleftbt = 494; + t.braceex = 494; + t.angleright = 329; + t.integral = 274; + t.integraltp = 686; + t.integralex = 686; + t.integralbt = 686; + t.parenrighttp = 384; + t.parenrightex = 384; + t.parenrightbt = 384; + t.bracketrighttp = 384; + t.bracketrightex = 384; + t.bracketrightbt = 384; + t.bracerighttp = 494; + t.bracerightmid = 494; + t.bracerightbt = 494; + t.apple = 790; + }); + t["Times-Roman"] = (0, _core_utils.getLookupTableFactory)(function (t) { + t.space = 250; + t.exclam = 333; + t.quotedbl = 408; + t.numbersign = 500; + t.dollar = 500; + t.percent = 833; + t.ampersand = 778; + t.quoteright = 333; + t.parenleft = 333; + t.parenright = 333; + t.asterisk = 500; + t.plus = 564; + t.comma = 250; + t.hyphen = 333; + t.period = 250; + t.slash = 278; + t.zero = 500; + t.one = 500; + t.two = 500; + t.three = 500; + t.four = 500; + t.five = 500; + t.six = 500; + t.seven = 500; + t.eight = 500; + t.nine = 500; + t.colon = 278; + t.semicolon = 278; + t.less = 564; + t.equal = 564; + t.greater = 564; + t.question = 444; + t.at = 921; + t.A = 722; + t.B = 667; + t.C = 667; + t.D = 722; + t.E = 611; + t.F = 556; + t.G = 722; + t.H = 722; + t.I = 333; + t.J = 389; + t.K = 722; + t.L = 611; + t.M = 889; + t.N = 722; + t.O = 722; + t.P = 556; + t.Q = 722; + t.R = 667; + t.S = 556; + t.T = 611; + t.U = 722; + t.V = 722; + t.W = 944; + t.X = 722; + t.Y = 722; + t.Z = 611; + t.bracketleft = 333; + t.backslash = 278; + t.bracketright = 333; + t.asciicircum = 469; + t.underscore = 500; + t.quoteleft = 333; + t.a = 444; + t.b = 500; + t.c = 444; + t.d = 500; + t.e = 444; + t.f = 333; + t.g = 500; + t.h = 500; + t.i = 278; + t.j = 278; + t.k = 500; + t.l = 278; + t.m = 778; + t.n = 500; + t.o = 500; + t.p = 500; + t.q = 500; + t.r = 333; + t.s = 389; + t.t = 278; + t.u = 500; + t.v = 500; + t.w = 722; + t.x = 500; + t.y = 500; + t.z = 444; + t.braceleft = 480; + t.bar = 200; + t.braceright = 480; + t.asciitilde = 541; + t.exclamdown = 333; + t.cent = 500; + t.sterling = 500; + t.fraction = 167; + t.yen = 500; + t.florin = 500; + t.section = 500; + t.currency = 500; + t.quotesingle = 180; + t.quotedblleft = 444; + t.guillemotleft = 500; + t.guilsinglleft = 333; + t.guilsinglright = 333; + t.fi = 556; + t.fl = 556; + t.endash = 500; + t.dagger = 500; + t.daggerdbl = 500; + t.periodcentered = 250; + t.paragraph = 453; + t.bullet = 350; + t.quotesinglbase = 333; + t.quotedblbase = 444; + t.quotedblright = 444; + t.guillemotright = 500; + t.ellipsis = 1000; + t.perthousand = 1000; + t.questiondown = 444; + t.grave = 333; + t.acute = 333; + t.circumflex = 333; + t.tilde = 333; + t.macron = 333; + t.breve = 333; + t.dotaccent = 333; + t.dieresis = 333; + t.ring = 333; + t.cedilla = 333; + t.hungarumlaut = 333; + t.ogonek = 333; + t.caron = 333; + t.emdash = 1000; + t.AE = 889; + t.ordfeminine = 276; + t.Lslash = 611; + t.Oslash = 722; + t.OE = 889; + t.ordmasculine = 310; + t.ae = 667; + t.dotlessi = 278; + t.lslash = 278; + t.oslash = 500; + t.oe = 722; + t.germandbls = 500; + t.Idieresis = 333; + t.eacute = 444; + t.abreve = 444; + t.uhungarumlaut = 500; + t.ecaron = 444; + t.Ydieresis = 722; + t.divide = 564; + t.Yacute = 722; + t.Acircumflex = 722; + t.aacute = 444; + t.Ucircumflex = 722; + t.yacute = 500; + t.scommaaccent = 389; + t.ecircumflex = 444; + t.Uring = 722; + t.Udieresis = 722; + t.aogonek = 444; + t.Uacute = 722; + t.uogonek = 500; + t.Edieresis = 611; + t.Dcroat = 722; + t.commaaccent = 250; + t.copyright = 760; + t.Emacron = 611; + t.ccaron = 444; + t.aring = 444; + t.Ncommaaccent = 722; + t.lacute = 278; + t.agrave = 444; + t.Tcommaaccent = 611; + t.Cacute = 667; + t.atilde = 444; + t.Edotaccent = 611; + t.scaron = 389; + t.scedilla = 389; + t.iacute = 278; + t.lozenge = 471; + t.Rcaron = 667; + t.Gcommaaccent = 722; + t.ucircumflex = 500; + t.acircumflex = 444; + t.Amacron = 722; + t.rcaron = 333; + t.ccedilla = 444; + t.Zdotaccent = 611; + t.Thorn = 556; + t.Omacron = 722; + t.Racute = 667; + t.Sacute = 556; + t.dcaron = 588; + t.Umacron = 722; + t.uring = 500; + t.threesuperior = 300; + t.Ograve = 722; + t.Agrave = 722; + t.Abreve = 722; + t.multiply = 564; + t.uacute = 500; + t.Tcaron = 611; + t.partialdiff = 476; + t.ydieresis = 500; + t.Nacute = 722; + t.icircumflex = 278; + t.Ecircumflex = 611; + t.adieresis = 444; + t.edieresis = 444; + t.cacute = 444; + t.nacute = 500; + t.umacron = 500; + t.Ncaron = 722; + t.Iacute = 333; + t.plusminus = 564; + t.brokenbar = 200; + t.registered = 760; + t.Gbreve = 722; + t.Idotaccent = 333; + t.summation = 600; + t.Egrave = 611; + t.racute = 333; + t.omacron = 500; + t.Zacute = 611; + t.Zcaron = 611; + t.greaterequal = 549; + t.Eth = 722; + t.Ccedilla = 667; + t.lcommaaccent = 278; + t.tcaron = 326; + t.eogonek = 444; + t.Uogonek = 722; + t.Aacute = 722; + t.Adieresis = 722; + t.egrave = 444; + t.zacute = 444; + t.iogonek = 278; + t.Oacute = 722; + t.oacute = 500; + t.amacron = 444; + t.sacute = 389; + t.idieresis = 278; + t.Ocircumflex = 722; + t.Ugrave = 722; + t.Delta = 612; + t.thorn = 500; + t.twosuperior = 300; + t.Odieresis = 722; + t.mu = 500; + t.igrave = 278; + t.ohungarumlaut = 500; + t.Eogonek = 611; + t.dcroat = 500; + t.threequarters = 750; + t.Scedilla = 556; + t.lcaron = 344; + t.Kcommaaccent = 722; + t.Lacute = 611; + t.trademark = 980; + t.edotaccent = 444; + t.Igrave = 333; + t.Imacron = 333; + t.Lcaron = 611; + t.onehalf = 750; + t.lessequal = 549; + t.ocircumflex = 500; + t.ntilde = 500; + t.Uhungarumlaut = 722; + t.Eacute = 611; + t.emacron = 444; + t.gbreve = 500; + t.onequarter = 750; + t.Scaron = 556; + t.Scommaaccent = 556; + t.Ohungarumlaut = 722; + t.degree = 400; + t.ograve = 500; + t.Ccaron = 667; + t.ugrave = 500; + t.radical = 453; + t.Dcaron = 722; + t.rcommaaccent = 333; + t.Ntilde = 722; + t.otilde = 500; + t.Rcommaaccent = 667; + t.Lcommaaccent = 611; + t.Atilde = 722; + t.Aogonek = 722; + t.Aring = 722; + t.Otilde = 722; + t.zdotaccent = 444; + t.Ecaron = 611; + t.Iogonek = 333; + t.kcommaaccent = 500; + t.minus = 564; + t.Icircumflex = 333; + t.ncaron = 500; + t.tcommaaccent = 278; + t.logicalnot = 564; + t.odieresis = 500; + t.udieresis = 500; + t.notequal = 549; + t.gcommaaccent = 500; + t.eth = 500; + t.zcaron = 444; + t.ncommaaccent = 500; + t.onesuperior = 300; + t.imacron = 278; + t.Euro = 500; + }); + t["Times-Bold"] = (0, _core_utils.getLookupTableFactory)(function (t) { + t.space = 250; + t.exclam = 333; + t.quotedbl = 555; + t.numbersign = 500; + t.dollar = 500; + t.percent = 1000; + t.ampersand = 833; + t.quoteright = 333; + t.parenleft = 333; + t.parenright = 333; + t.asterisk = 500; + t.plus = 570; + t.comma = 250; + t.hyphen = 333; + t.period = 250; + t.slash = 278; + t.zero = 500; + t.one = 500; + t.two = 500; + t.three = 500; + t.four = 500; + t.five = 500; + t.six = 500; + t.seven = 500; + t.eight = 500; + t.nine = 500; + t.colon = 333; + t.semicolon = 333; + t.less = 570; + t.equal = 570; + t.greater = 570; + t.question = 500; + t.at = 930; + t.A = 722; + t.B = 667; + t.C = 722; + t.D = 722; + t.E = 667; + t.F = 611; + t.G = 778; + t.H = 778; + t.I = 389; + t.J = 500; + t.K = 778; + t.L = 667; + t.M = 944; + t.N = 722; + t.O = 778; + t.P = 611; + t.Q = 778; + t.R = 722; + t.S = 556; + t.T = 667; + t.U = 722; + t.V = 722; + t.W = 1000; + t.X = 722; + t.Y = 722; + t.Z = 667; + t.bracketleft = 333; + t.backslash = 278; + t.bracketright = 333; + t.asciicircum = 581; + t.underscore = 500; + t.quoteleft = 333; + t.a = 500; + t.b = 556; + t.c = 444; + t.d = 556; + t.e = 444; + t.f = 333; + t.g = 500; + t.h = 556; + t.i = 278; + t.j = 333; + t.k = 556; + t.l = 278; + t.m = 833; + t.n = 556; + t.o = 500; + t.p = 556; + t.q = 556; + t.r = 444; + t.s = 389; + t.t = 333; + t.u = 556; + t.v = 500; + t.w = 722; + t.x = 500; + t.y = 500; + t.z = 444; + t.braceleft = 394; + t.bar = 220; + t.braceright = 394; + t.asciitilde = 520; + t.exclamdown = 333; + t.cent = 500; + t.sterling = 500; + t.fraction = 167; + t.yen = 500; + t.florin = 500; + t.section = 500; + t.currency = 500; + t.quotesingle = 278; + t.quotedblleft = 500; + t.guillemotleft = 500; + t.guilsinglleft = 333; + t.guilsinglright = 333; + t.fi = 556; + t.fl = 556; + t.endash = 500; + t.dagger = 500; + t.daggerdbl = 500; + t.periodcentered = 250; + t.paragraph = 540; + t.bullet = 350; + t.quotesinglbase = 333; + t.quotedblbase = 500; + t.quotedblright = 500; + t.guillemotright = 500; + t.ellipsis = 1000; + t.perthousand = 1000; + t.questiondown = 500; + t.grave = 333; + t.acute = 333; + t.circumflex = 333; + t.tilde = 333; + t.macron = 333; + t.breve = 333; + t.dotaccent = 333; + t.dieresis = 333; + t.ring = 333; + t.cedilla = 333; + t.hungarumlaut = 333; + t.ogonek = 333; + t.caron = 333; + t.emdash = 1000; + t.AE = 1000; + t.ordfeminine = 300; + t.Lslash = 667; + t.Oslash = 778; + t.OE = 1000; + t.ordmasculine = 330; + t.ae = 722; + t.dotlessi = 278; + t.lslash = 278; + t.oslash = 500; + t.oe = 722; + t.germandbls = 556; + t.Idieresis = 389; + t.eacute = 444; + t.abreve = 500; + t.uhungarumlaut = 556; + t.ecaron = 444; + t.Ydieresis = 722; + t.divide = 570; + t.Yacute = 722; + t.Acircumflex = 722; + t.aacute = 500; + t.Ucircumflex = 722; + t.yacute = 500; + t.scommaaccent = 389; + t.ecircumflex = 444; + t.Uring = 722; + t.Udieresis = 722; + t.aogonek = 500; + t.Uacute = 722; + t.uogonek = 556; + t.Edieresis = 667; + t.Dcroat = 722; + t.commaaccent = 250; + t.copyright = 747; + t.Emacron = 667; + t.ccaron = 444; + t.aring = 500; + t.Ncommaaccent = 722; + t.lacute = 278; + t.agrave = 500; + t.Tcommaaccent = 667; + t.Cacute = 722; + t.atilde = 500; + t.Edotaccent = 667; + t.scaron = 389; + t.scedilla = 389; + t.iacute = 278; + t.lozenge = 494; + t.Rcaron = 722; + t.Gcommaaccent = 778; + t.ucircumflex = 556; + t.acircumflex = 500; + t.Amacron = 722; + t.rcaron = 444; + t.ccedilla = 444; + t.Zdotaccent = 667; + t.Thorn = 611; + t.Omacron = 778; + t.Racute = 722; + t.Sacute = 556; + t.dcaron = 672; + t.Umacron = 722; + t.uring = 556; + t.threesuperior = 300; + t.Ograve = 778; + t.Agrave = 722; + t.Abreve = 722; + t.multiply = 570; + t.uacute = 556; + t.Tcaron = 667; + t.partialdiff = 494; + t.ydieresis = 500; + t.Nacute = 722; + t.icircumflex = 278; + t.Ecircumflex = 667; + t.adieresis = 500; + t.edieresis = 444; + t.cacute = 444; + t.nacute = 556; + t.umacron = 556; + t.Ncaron = 722; + t.Iacute = 389; + t.plusminus = 570; + t.brokenbar = 220; + t.registered = 747; + t.Gbreve = 778; + t.Idotaccent = 389; + t.summation = 600; + t.Egrave = 667; + t.racute = 444; + t.omacron = 500; + t.Zacute = 667; + t.Zcaron = 667; + t.greaterequal = 549; + t.Eth = 722; + t.Ccedilla = 722; + t.lcommaaccent = 278; + t.tcaron = 416; + t.eogonek = 444; + t.Uogonek = 722; + t.Aacute = 722; + t.Adieresis = 722; + t.egrave = 444; + t.zacute = 444; + t.iogonek = 278; + t.Oacute = 778; + t.oacute = 500; + t.amacron = 500; + t.sacute = 389; + t.idieresis = 278; + t.Ocircumflex = 778; + t.Ugrave = 722; + t.Delta = 612; + t.thorn = 556; + t.twosuperior = 300; + t.Odieresis = 778; + t.mu = 556; + t.igrave = 278; + t.ohungarumlaut = 500; + t.Eogonek = 667; + t.dcroat = 556; + t.threequarters = 750; + t.Scedilla = 556; + t.lcaron = 394; + t.Kcommaaccent = 778; + t.Lacute = 667; + t.trademark = 1000; + t.edotaccent = 444; + t.Igrave = 389; + t.Imacron = 389; + t.Lcaron = 667; + t.onehalf = 750; + t.lessequal = 549; + t.ocircumflex = 500; + t.ntilde = 556; + t.Uhungarumlaut = 722; + t.Eacute = 667; + t.emacron = 444; + t.gbreve = 500; + t.onequarter = 750; + t.Scaron = 556; + t.Scommaaccent = 556; + t.Ohungarumlaut = 778; + t.degree = 400; + t.ograve = 500; + t.Ccaron = 722; + t.ugrave = 556; + t.radical = 549; + t.Dcaron = 722; + t.rcommaaccent = 444; + t.Ntilde = 722; + t.otilde = 500; + t.Rcommaaccent = 722; + t.Lcommaaccent = 667; + t.Atilde = 722; + t.Aogonek = 722; + t.Aring = 722; + t.Otilde = 778; + t.zdotaccent = 444; + t.Ecaron = 667; + t.Iogonek = 389; + t.kcommaaccent = 556; + t.minus = 570; + t.Icircumflex = 389; + t.ncaron = 556; + t.tcommaaccent = 333; + t.logicalnot = 570; + t.odieresis = 500; + t.udieresis = 556; + t.notequal = 549; + t.gcommaaccent = 500; + t.eth = 500; + t.zcaron = 444; + t.ncommaaccent = 556; + t.onesuperior = 300; + t.imacron = 278; + t.Euro = 500; + }); + t["Times-BoldItalic"] = (0, _core_utils.getLookupTableFactory)(function (t) { + t.space = 250; + t.exclam = 389; + t.quotedbl = 555; + t.numbersign = 500; + t.dollar = 500; + t.percent = 833; + t.ampersand = 778; + t.quoteright = 333; + t.parenleft = 333; + t.parenright = 333; + t.asterisk = 500; + t.plus = 570; + t.comma = 250; + t.hyphen = 333; + t.period = 250; + t.slash = 278; + t.zero = 500; + t.one = 500; + t.two = 500; + t.three = 500; + t.four = 500; + t.five = 500; + t.six = 500; + t.seven = 500; + t.eight = 500; + t.nine = 500; + t.colon = 333; + t.semicolon = 333; + t.less = 570; + t.equal = 570; + t.greater = 570; + t.question = 500; + t.at = 832; + t.A = 667; + t.B = 667; + t.C = 667; + t.D = 722; + t.E = 667; + t.F = 667; + t.G = 722; + t.H = 778; + t.I = 389; + t.J = 500; + t.K = 667; + t.L = 611; + t.M = 889; + t.N = 722; + t.O = 722; + t.P = 611; + t.Q = 722; + t.R = 667; + t.S = 556; + t.T = 611; + t.U = 722; + t.V = 667; + t.W = 889; + t.X = 667; + t.Y = 611; + t.Z = 611; + t.bracketleft = 333; + t.backslash = 278; + t.bracketright = 333; + t.asciicircum = 570; + t.underscore = 500; + t.quoteleft = 333; + t.a = 500; + t.b = 500; + t.c = 444; + t.d = 500; + t.e = 444; + t.f = 333; + t.g = 500; + t.h = 556; + t.i = 278; + t.j = 278; + t.k = 500; + t.l = 278; + t.m = 778; + t.n = 556; + t.o = 500; + t.p = 500; + t.q = 500; + t.r = 389; + t.s = 389; + t.t = 278; + t.u = 556; + t.v = 444; + t.w = 667; + t.x = 500; + t.y = 444; + t.z = 389; + t.braceleft = 348; + t.bar = 220; + t.braceright = 348; + t.asciitilde = 570; + t.exclamdown = 389; + t.cent = 500; + t.sterling = 500; + t.fraction = 167; + t.yen = 500; + t.florin = 500; + t.section = 500; + t.currency = 500; + t.quotesingle = 278; + t.quotedblleft = 500; + t.guillemotleft = 500; + t.guilsinglleft = 333; + t.guilsinglright = 333; + t.fi = 556; + t.fl = 556; + t.endash = 500; + t.dagger = 500; + t.daggerdbl = 500; + t.periodcentered = 250; + t.paragraph = 500; + t.bullet = 350; + t.quotesinglbase = 333; + t.quotedblbase = 500; + t.quotedblright = 500; + t.guillemotright = 500; + t.ellipsis = 1000; + t.perthousand = 1000; + t.questiondown = 500; + t.grave = 333; + t.acute = 333; + t.circumflex = 333; + t.tilde = 333; + t.macron = 333; + t.breve = 333; + t.dotaccent = 333; + t.dieresis = 333; + t.ring = 333; + t.cedilla = 333; + t.hungarumlaut = 333; + t.ogonek = 333; + t.caron = 333; + t.emdash = 1000; + t.AE = 944; + t.ordfeminine = 266; + t.Lslash = 611; + t.Oslash = 722; + t.OE = 944; + t.ordmasculine = 300; + t.ae = 722; + t.dotlessi = 278; + t.lslash = 278; + t.oslash = 500; + t.oe = 722; + t.germandbls = 500; + t.Idieresis = 389; + t.eacute = 444; + t.abreve = 500; + t.uhungarumlaut = 556; + t.ecaron = 444; + t.Ydieresis = 611; + t.divide = 570; + t.Yacute = 611; + t.Acircumflex = 667; + t.aacute = 500; + t.Ucircumflex = 722; + t.yacute = 444; + t.scommaaccent = 389; + t.ecircumflex = 444; + t.Uring = 722; + t.Udieresis = 722; + t.aogonek = 500; + t.Uacute = 722; + t.uogonek = 556; + t.Edieresis = 667; + t.Dcroat = 722; + t.commaaccent = 250; + t.copyright = 747; + t.Emacron = 667; + t.ccaron = 444; + t.aring = 500; + t.Ncommaaccent = 722; + t.lacute = 278; + t.agrave = 500; + t.Tcommaaccent = 611; + t.Cacute = 667; + t.atilde = 500; + t.Edotaccent = 667; + t.scaron = 389; + t.scedilla = 389; + t.iacute = 278; + t.lozenge = 494; + t.Rcaron = 667; + t.Gcommaaccent = 722; + t.ucircumflex = 556; + t.acircumflex = 500; + t.Amacron = 667; + t.rcaron = 389; + t.ccedilla = 444; + t.Zdotaccent = 611; + t.Thorn = 611; + t.Omacron = 722; + t.Racute = 667; + t.Sacute = 556; + t.dcaron = 608; + t.Umacron = 722; + t.uring = 556; + t.threesuperior = 300; + t.Ograve = 722; + t.Agrave = 667; + t.Abreve = 667; + t.multiply = 570; + t.uacute = 556; + t.Tcaron = 611; + t.partialdiff = 494; + t.ydieresis = 444; + t.Nacute = 722; + t.icircumflex = 278; + t.Ecircumflex = 667; + t.adieresis = 500; + t.edieresis = 444; + t.cacute = 444; + t.nacute = 556; + t.umacron = 556; + t.Ncaron = 722; + t.Iacute = 389; + t.plusminus = 570; + t.brokenbar = 220; + t.registered = 747; + t.Gbreve = 722; + t.Idotaccent = 389; + t.summation = 600; + t.Egrave = 667; + t.racute = 389; + t.omacron = 500; + t.Zacute = 611; + t.Zcaron = 611; + t.greaterequal = 549; + t.Eth = 722; + t.Ccedilla = 667; + t.lcommaaccent = 278; + t.tcaron = 366; + t.eogonek = 444; + t.Uogonek = 722; + t.Aacute = 667; + t.Adieresis = 667; + t.egrave = 444; + t.zacute = 389; + t.iogonek = 278; + t.Oacute = 722; + t.oacute = 500; + t.amacron = 500; + t.sacute = 389; + t.idieresis = 278; + t.Ocircumflex = 722; + t.Ugrave = 722; + t.Delta = 612; + t.thorn = 500; + t.twosuperior = 300; + t.Odieresis = 722; + t.mu = 576; + t.igrave = 278; + t.ohungarumlaut = 500; + t.Eogonek = 667; + t.dcroat = 500; + t.threequarters = 750; + t.Scedilla = 556; + t.lcaron = 382; + t.Kcommaaccent = 667; + t.Lacute = 611; + t.trademark = 1000; + t.edotaccent = 444; + t.Igrave = 389; + t.Imacron = 389; + t.Lcaron = 611; + t.onehalf = 750; + t.lessequal = 549; + t.ocircumflex = 500; + t.ntilde = 556; + t.Uhungarumlaut = 722; + t.Eacute = 667; + t.emacron = 444; + t.gbreve = 500; + t.onequarter = 750; + t.Scaron = 556; + t.Scommaaccent = 556; + t.Ohungarumlaut = 722; + t.degree = 400; + t.ograve = 500; + t.Ccaron = 667; + t.ugrave = 556; + t.radical = 549; + t.Dcaron = 722; + t.rcommaaccent = 389; + t.Ntilde = 722; + t.otilde = 500; + t.Rcommaaccent = 667; + t.Lcommaaccent = 611; + t.Atilde = 667; + t.Aogonek = 667; + t.Aring = 667; + t.Otilde = 722; + t.zdotaccent = 389; + t.Ecaron = 667; + t.Iogonek = 389; + t.kcommaaccent = 500; + t.minus = 606; + t.Icircumflex = 389; + t.ncaron = 556; + t.tcommaaccent = 278; + t.logicalnot = 606; + t.odieresis = 500; + t.udieresis = 556; + t.notequal = 549; + t.gcommaaccent = 500; + t.eth = 500; + t.zcaron = 389; + t.ncommaaccent = 556; + t.onesuperior = 300; + t.imacron = 278; + t.Euro = 500; + }); + t["Times-Italic"] = (0, _core_utils.getLookupTableFactory)(function (t) { + t.space = 250; + t.exclam = 333; + t.quotedbl = 420; + t.numbersign = 500; + t.dollar = 500; + t.percent = 833; + t.ampersand = 778; + t.quoteright = 333; + t.parenleft = 333; + t.parenright = 333; + t.asterisk = 500; + t.plus = 675; + t.comma = 250; + t.hyphen = 333; + t.period = 250; + t.slash = 278; + t.zero = 500; + t.one = 500; + t.two = 500; + t.three = 500; + t.four = 500; + t.five = 500; + t.six = 500; + t.seven = 500; + t.eight = 500; + t.nine = 500; + t.colon = 333; + t.semicolon = 333; + t.less = 675; + t.equal = 675; + t.greater = 675; + t.question = 500; + t.at = 920; + t.A = 611; + t.B = 611; + t.C = 667; + t.D = 722; + t.E = 611; + t.F = 611; + t.G = 722; + t.H = 722; + t.I = 333; + t.J = 444; + t.K = 667; + t.L = 556; + t.M = 833; + t.N = 667; + t.O = 722; + t.P = 611; + t.Q = 722; + t.R = 611; + t.S = 500; + t.T = 556; + t.U = 722; + t.V = 611; + t.W = 833; + t.X = 611; + t.Y = 556; + t.Z = 556; + t.bracketleft = 389; + t.backslash = 278; + t.bracketright = 389; + t.asciicircum = 422; + t.underscore = 500; + t.quoteleft = 333; + t.a = 500; + t.b = 500; + t.c = 444; + t.d = 500; + t.e = 444; + t.f = 278; + t.g = 500; + t.h = 500; + t.i = 278; + t.j = 278; + t.k = 444; + t.l = 278; + t.m = 722; + t.n = 500; + t.o = 500; + t.p = 500; + t.q = 500; + t.r = 389; + t.s = 389; + t.t = 278; + t.u = 500; + t.v = 444; + t.w = 667; + t.x = 444; + t.y = 444; + t.z = 389; + t.braceleft = 400; + t.bar = 275; + t.braceright = 400; + t.asciitilde = 541; + t.exclamdown = 389; + t.cent = 500; + t.sterling = 500; + t.fraction = 167; + t.yen = 500; + t.florin = 500; + t.section = 500; + t.currency = 500; + t.quotesingle = 214; + t.quotedblleft = 556; + t.guillemotleft = 500; + t.guilsinglleft = 333; + t.guilsinglright = 333; + t.fi = 500; + t.fl = 500; + t.endash = 500; + t.dagger = 500; + t.daggerdbl = 500; + t.periodcentered = 250; + t.paragraph = 523; + t.bullet = 350; + t.quotesinglbase = 333; + t.quotedblbase = 556; + t.quotedblright = 556; + t.guillemotright = 500; + t.ellipsis = 889; + t.perthousand = 1000; + t.questiondown = 500; + t.grave = 333; + t.acute = 333; + t.circumflex = 333; + t.tilde = 333; + t.macron = 333; + t.breve = 333; + t.dotaccent = 333; + t.dieresis = 333; + t.ring = 333; + t.cedilla = 333; + t.hungarumlaut = 333; + t.ogonek = 333; + t.caron = 333; + t.emdash = 889; + t.AE = 889; + t.ordfeminine = 276; + t.Lslash = 556; + t.Oslash = 722; + t.OE = 944; + t.ordmasculine = 310; + t.ae = 667; + t.dotlessi = 278; + t.lslash = 278; + t.oslash = 500; + t.oe = 667; + t.germandbls = 500; + t.Idieresis = 333; + t.eacute = 444; + t.abreve = 500; + t.uhungarumlaut = 500; + t.ecaron = 444; + t.Ydieresis = 556; + t.divide = 675; + t.Yacute = 556; + t.Acircumflex = 611; + t.aacute = 500; + t.Ucircumflex = 722; + t.yacute = 444; + t.scommaaccent = 389; + t.ecircumflex = 444; + t.Uring = 722; + t.Udieresis = 722; + t.aogonek = 500; + t.Uacute = 722; + t.uogonek = 500; + t.Edieresis = 611; + t.Dcroat = 722; + t.commaaccent = 250; + t.copyright = 760; + t.Emacron = 611; + t.ccaron = 444; + t.aring = 500; + t.Ncommaaccent = 667; + t.lacute = 278; + t.agrave = 500; + t.Tcommaaccent = 556; + t.Cacute = 667; + t.atilde = 500; + t.Edotaccent = 611; + t.scaron = 389; + t.scedilla = 389; + t.iacute = 278; + t.lozenge = 471; + t.Rcaron = 611; + t.Gcommaaccent = 722; + t.ucircumflex = 500; + t.acircumflex = 500; + t.Amacron = 611; + t.rcaron = 389; + t.ccedilla = 444; + t.Zdotaccent = 556; + t.Thorn = 611; + t.Omacron = 722; + t.Racute = 611; + t.Sacute = 500; + t.dcaron = 544; + t.Umacron = 722; + t.uring = 500; + t.threesuperior = 300; + t.Ograve = 722; + t.Agrave = 611; + t.Abreve = 611; + t.multiply = 675; + t.uacute = 500; + t.Tcaron = 556; + t.partialdiff = 476; + t.ydieresis = 444; + t.Nacute = 667; + t.icircumflex = 278; + t.Ecircumflex = 611; + t.adieresis = 500; + t.edieresis = 444; + t.cacute = 444; + t.nacute = 500; + t.umacron = 500; + t.Ncaron = 667; + t.Iacute = 333; + t.plusminus = 675; + t.brokenbar = 275; + t.registered = 760; + t.Gbreve = 722; + t.Idotaccent = 333; + t.summation = 600; + t.Egrave = 611; + t.racute = 389; + t.omacron = 500; + t.Zacute = 556; + t.Zcaron = 556; + t.greaterequal = 549; + t.Eth = 722; + t.Ccedilla = 667; + t.lcommaaccent = 278; + t.tcaron = 300; + t.eogonek = 444; + t.Uogonek = 722; + t.Aacute = 611; + t.Adieresis = 611; + t.egrave = 444; + t.zacute = 389; + t.iogonek = 278; + t.Oacute = 722; + t.oacute = 500; + t.amacron = 500; + t.sacute = 389; + t.idieresis = 278; + t.Ocircumflex = 722; + t.Ugrave = 722; + t.Delta = 612; + t.thorn = 500; + t.twosuperior = 300; + t.Odieresis = 722; + t.mu = 500; + t.igrave = 278; + t.ohungarumlaut = 500; + t.Eogonek = 611; + t.dcroat = 500; + t.threequarters = 750; + t.Scedilla = 500; + t.lcaron = 300; + t.Kcommaaccent = 667; + t.Lacute = 556; + t.trademark = 980; + t.edotaccent = 444; + t.Igrave = 333; + t.Imacron = 333; + t.Lcaron = 611; + t.onehalf = 750; + t.lessequal = 549; + t.ocircumflex = 500; + t.ntilde = 500; + t.Uhungarumlaut = 722; + t.Eacute = 611; + t.emacron = 444; + t.gbreve = 500; + t.onequarter = 750; + t.Scaron = 500; + t.Scommaaccent = 500; + t.Ohungarumlaut = 722; + t.degree = 400; + t.ograve = 500; + t.Ccaron = 667; + t.ugrave = 500; + t.radical = 453; + t.Dcaron = 722; + t.rcommaaccent = 389; + t.Ntilde = 667; + t.otilde = 500; + t.Rcommaaccent = 611; + t.Lcommaaccent = 556; + t.Atilde = 611; + t.Aogonek = 611; + t.Aring = 611; + t.Otilde = 722; + t.zdotaccent = 389; + t.Ecaron = 611; + t.Iogonek = 333; + t.kcommaaccent = 444; + t.minus = 675; + t.Icircumflex = 333; + t.ncaron = 500; + t.tcommaaccent = 278; + t.logicalnot = 675; + t.odieresis = 500; + t.udieresis = 500; + t.notequal = 549; + t.gcommaaccent = 500; + t.eth = 500; + t.zcaron = 389; + t.ncommaaccent = 500; + t.onesuperior = 300; + t.imacron = 278; + t.Euro = 500; + }); + t.ZapfDingbats = (0, _core_utils.getLookupTableFactory)(function (t) { + t.space = 278; + t.a1 = 974; + t.a2 = 961; + t.a202 = 974; + t.a3 = 980; + t.a4 = 719; + t.a5 = 789; + t.a119 = 790; + t.a118 = 791; + t.a117 = 690; + t.a11 = 960; + t.a12 = 939; + t.a13 = 549; + t.a14 = 855; + t.a15 = 911; + t.a16 = 933; + t.a105 = 911; + t.a17 = 945; + t.a18 = 974; + t.a19 = 755; + t.a20 = 846; + t.a21 = 762; + t.a22 = 761; + t.a23 = 571; + t.a24 = 677; + t.a25 = 763; + t.a26 = 760; + t.a27 = 759; + t.a28 = 754; + t.a6 = 494; + t.a7 = 552; + t.a8 = 537; + t.a9 = 577; + t.a10 = 692; + t.a29 = 786; + t.a30 = 788; + t.a31 = 788; + t.a32 = 790; + t.a33 = 793; + t.a34 = 794; + t.a35 = 816; + t.a36 = 823; + t.a37 = 789; + t.a38 = 841; + t.a39 = 823; + t.a40 = 833; + t.a41 = 816; + t.a42 = 831; + t.a43 = 923; + t.a44 = 744; + t.a45 = 723; + t.a46 = 749; + t.a47 = 790; + t.a48 = 792; + t.a49 = 695; + t.a50 = 776; + t.a51 = 768; + t.a52 = 792; + t.a53 = 759; + t.a54 = 707; + t.a55 = 708; + t.a56 = 682; + t.a57 = 701; + t.a58 = 826; + t.a59 = 815; + t.a60 = 789; + t.a61 = 789; + t.a62 = 707; + t.a63 = 687; + t.a64 = 696; + t.a65 = 689; + t.a66 = 786; + t.a67 = 787; + t.a68 = 713; + t.a69 = 791; + t.a70 = 785; + t.a71 = 791; + t.a72 = 873; + t.a73 = 761; + t.a74 = 762; + t.a203 = 762; + t.a75 = 759; + t.a204 = 759; + t.a76 = 892; + t.a77 = 892; + t.a78 = 788; + t.a79 = 784; + t.a81 = 438; + t.a82 = 138; + t.a83 = 277; + t.a84 = 415; + t.a97 = 392; + t.a98 = 392; + t.a99 = 668; + t.a100 = 668; + t.a89 = 390; + t.a90 = 390; + t.a93 = 317; + t.a94 = 317; + t.a91 = 276; + t.a92 = 276; + t.a205 = 509; + t.a85 = 509; + t.a206 = 410; + t.a86 = 410; + t.a87 = 234; + t.a88 = 234; + t.a95 = 334; + t.a96 = 334; + t.a101 = 732; + t.a102 = 544; + t.a103 = 544; + t.a104 = 910; + t.a106 = 667; + t.a107 = 760; + t.a108 = 760; + t.a112 = 776; + t.a111 = 595; + t.a110 = 694; + t.a109 = 626; + t.a120 = 788; + t.a121 = 788; + t.a122 = 788; + t.a123 = 788; + t.a124 = 788; + t.a125 = 788; + t.a126 = 788; + t.a127 = 788; + t.a128 = 788; + t.a129 = 788; + t.a130 = 788; + t.a131 = 788; + t.a132 = 788; + t.a133 = 788; + t.a134 = 788; + t.a135 = 788; + t.a136 = 788; + t.a137 = 788; + t.a138 = 788; + t.a139 = 788; + t.a140 = 788; + t.a141 = 788; + t.a142 = 788; + t.a143 = 788; + t.a144 = 788; + t.a145 = 788; + t.a146 = 788; + t.a147 = 788; + t.a148 = 788; + t.a149 = 788; + t.a150 = 788; + t.a151 = 788; + t.a152 = 788; + t.a153 = 788; + t.a154 = 788; + t.a155 = 788; + t.a156 = 788; + t.a157 = 788; + t.a158 = 788; + t.a159 = 788; + t.a160 = 894; + t.a161 = 838; + t.a163 = 1016; + t.a164 = 458; + t.a196 = 748; + t.a165 = 924; + t.a192 = 748; + t.a166 = 918; + t.a167 = 927; + t.a168 = 928; + t.a169 = 928; + t.a170 = 834; + t.a171 = 873; + t.a172 = 828; + t.a173 = 924; + t.a162 = 924; + t.a174 = 917; + t.a175 = 930; + t.a176 = 931; + t.a177 = 463; + t.a178 = 883; + t.a179 = 836; + t.a193 = 836; + t.a180 = 867; + t.a199 = 867; + t.a181 = 696; + t.a200 = 696; + t.a182 = 874; + t.a201 = 874; + t.a183 = 760; + t.a184 = 946; + t.a197 = 771; + t.a185 = 865; + t.a194 = 771; + t.a198 = 888; + t.a186 = 967; + t.a195 = 888; + t.a187 = 831; + t.a188 = 873; + t.a189 = 927; + t.a190 = 970; + t.a191 = 918; + }); +}); +exports.getMetrics = getMetrics; + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isPDFFunction = isPDFFunction; +exports.PostScriptCompiler = exports.PostScriptEvaluator = exports.PDFFunctionFactory = void 0; + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +var _ps_parser = __w_pdfjs_require__(42); + +class PDFFunctionFactory { + constructor({ + xref, + isEvalSupported = true + }) { + this.xref = xref; + this.isEvalSupported = isEvalSupported !== false; + } + + create(fn) { + return PDFFunction.parse({ + xref: this.xref, + isEvalSupported: this.isEvalSupported, + fn + }); + } + + createFromArray(fnObj) { + return PDFFunction.parseArray({ + xref: this.xref, + isEvalSupported: this.isEvalSupported, + fnObj + }); + } + +} + +exports.PDFFunctionFactory = PDFFunctionFactory; + +function toNumberArray(arr) { + if (!Array.isArray(arr)) { + return null; + } + + const length = arr.length; + + for (let i = 0; i < length; i++) { + if (typeof arr[i] !== "number") { + const result = new Array(length); + + for (let j = 0; j < length; j++) { + result[j] = +arr[j]; + } + + return result; + } + } + + return arr; +} + +var PDFFunction = function PDFFunctionClosure() { + const CONSTRUCT_SAMPLED = 0; + const CONSTRUCT_INTERPOLATED = 2; + const CONSTRUCT_STICHED = 3; + const CONSTRUCT_POSTSCRIPT = 4; + return { + getSampleArray(size, outputSize, bps, stream) { + var i, ii; + var length = 1; + + for (i = 0, ii = size.length; i < ii; i++) { + length *= size[i]; + } + + length *= outputSize; + var array = new Array(length); + var codeSize = 0; + var codeBuf = 0; + var sampleMul = 1.0 / (2.0 ** bps - 1); + var strBytes = stream.getBytes((length * bps + 7) / 8); + var strIdx = 0; + + for (i = 0; i < length; i++) { + while (codeSize < bps) { + codeBuf <<= 8; + codeBuf |= strBytes[strIdx++]; + codeSize += 8; + } + + codeSize -= bps; + array[i] = (codeBuf >> codeSize) * sampleMul; + codeBuf &= (1 << codeSize) - 1; + } + + return array; + }, + + getIR({ + xref, + isEvalSupported, + fn + }) { + var dict = fn.dict; + + if (!dict) { + dict = fn; + } + + var types = [this.constructSampled, null, this.constructInterpolated, this.constructStiched, this.constructPostScript]; + var typeNum = dict.get("FunctionType"); + var typeFn = types[typeNum]; + + if (!typeFn) { + throw new _util.FormatError("Unknown type of function"); + } + + return typeFn.call(this, { + xref, + isEvalSupported, + fn, + dict + }); + }, + + fromIR({ + xref, + isEvalSupported, + IR + }) { + var type = IR[0]; + + switch (type) { + case CONSTRUCT_SAMPLED: + return this.constructSampledFromIR({ + xref, + isEvalSupported, + IR + }); + + case CONSTRUCT_INTERPOLATED: + return this.constructInterpolatedFromIR({ + xref, + isEvalSupported, + IR + }); + + case CONSTRUCT_STICHED: + return this.constructStichedFromIR({ + xref, + isEvalSupported, + IR + }); + + default: + return this.constructPostScriptFromIR({ + xref, + isEvalSupported, + IR + }); + } + }, + + parse({ + xref, + isEvalSupported, + fn + }) { + const IR = this.getIR({ + xref, + isEvalSupported, + fn + }); + return this.fromIR({ + xref, + isEvalSupported, + IR + }); + }, + + parseArray({ + xref, + isEvalSupported, + fnObj + }) { + if (!Array.isArray(fnObj)) { + return this.parse({ + xref, + isEvalSupported, + fn: fnObj + }); + } + + var fnArray = []; + + for (var j = 0, jj = fnObj.length; j < jj; j++) { + fnArray.push(this.parse({ + xref, + isEvalSupported, + fn: xref.fetchIfRef(fnObj[j]) + })); + } + + return function (src, srcOffset, dest, destOffset) { + for (var i = 0, ii = fnArray.length; i < ii; i++) { + fnArray[i](src, srcOffset, dest, destOffset + i); + } + }; + }, + + constructSampled({ + xref, + isEvalSupported, + fn, + dict + }) { + function toMultiArray(arr) { + var inputLength = arr.length; + var out = []; + var index = 0; + + for (var i = 0; i < inputLength; i += 2) { + out[index] = [arr[i], arr[i + 1]]; + ++index; + } + + return out; + } + + var domain = toNumberArray(dict.getArray("Domain")); + var range = toNumberArray(dict.getArray("Range")); + + if (!domain || !range) { + throw new _util.FormatError("No domain or range"); + } + + var inputSize = domain.length / 2; + var outputSize = range.length / 2; + domain = toMultiArray(domain); + range = toMultiArray(range); + var size = toNumberArray(dict.getArray("Size")); + var bps = dict.get("BitsPerSample"); + var order = dict.get("Order") || 1; + + if (order !== 1) { + (0, _util.info)("No support for cubic spline interpolation: " + order); + } + + var encode = toNumberArray(dict.getArray("Encode")); + + if (!encode) { + encode = []; + + for (var i = 0; i < inputSize; ++i) { + encode.push([0, size[i] - 1]); + } + } else { + encode = toMultiArray(encode); + } + + var decode = toNumberArray(dict.getArray("Decode")); + + if (!decode) { + decode = range; + } else { + decode = toMultiArray(decode); + } + + var samples = this.getSampleArray(size, outputSize, bps, fn); + return [CONSTRUCT_SAMPLED, inputSize, domain, encode, decode, samples, size, outputSize, 2 ** bps - 1, range]; + }, + + constructSampledFromIR({ + xref, + isEvalSupported, + IR + }) { + function interpolate(x, xmin, xmax, ymin, ymax) { + return ymin + (x - xmin) * ((ymax - ymin) / (xmax - xmin)); + } + + return function constructSampledFromIRResult(src, srcOffset, dest, destOffset) { + var m = IR[1]; + var domain = IR[2]; + var encode = IR[3]; + var decode = IR[4]; + var samples = IR[5]; + var size = IR[6]; + var n = IR[7]; + var range = IR[9]; + var cubeVertices = 1 << m; + var cubeN = new Float64Array(cubeVertices); + var cubeVertex = new Uint32Array(cubeVertices); + var i, j; + + for (j = 0; j < cubeVertices; j++) { + cubeN[j] = 1; + } + + var k = n, + pos = 1; + + for (i = 0; i < m; ++i) { + var domain_2i = domain[i][0]; + var domain_2i_1 = domain[i][1]; + var xi = Math.min(Math.max(src[srcOffset + i], domain_2i), domain_2i_1); + var e = interpolate(xi, domain_2i, domain_2i_1, encode[i][0], encode[i][1]); + var size_i = size[i]; + e = Math.min(Math.max(e, 0), size_i - 1); + var e0 = e < size_i - 1 ? Math.floor(e) : e - 1; + var n0 = e0 + 1 - e; + var n1 = e - e0; + var offset0 = e0 * k; + var offset1 = offset0 + k; + + for (j = 0; j < cubeVertices; j++) { + if (j & pos) { + cubeN[j] *= n1; + cubeVertex[j] += offset1; + } else { + cubeN[j] *= n0; + cubeVertex[j] += offset0; + } + } + + k *= size_i; + pos <<= 1; + } + + for (j = 0; j < n; ++j) { + var rj = 0; + + for (i = 0; i < cubeVertices; i++) { + rj += samples[cubeVertex[i] + j] * cubeN[i]; + } + + rj = interpolate(rj, 0, 1, decode[j][0], decode[j][1]); + dest[destOffset + j] = Math.min(Math.max(rj, range[j][0]), range[j][1]); + } + }; + }, + + constructInterpolated({ + xref, + isEvalSupported, + fn, + dict + }) { + var c0 = toNumberArray(dict.getArray("C0")) || [0]; + var c1 = toNumberArray(dict.getArray("C1")) || [1]; + var n = dict.get("N"); + var length = c0.length; + var diff = []; + + for (var i = 0; i < length; ++i) { + diff.push(c1[i] - c0[i]); + } + + return [CONSTRUCT_INTERPOLATED, c0, diff, n]; + }, + + constructInterpolatedFromIR({ + xref, + isEvalSupported, + IR + }) { + var c0 = IR[1]; + var diff = IR[2]; + var n = IR[3]; + var length = diff.length; + return function constructInterpolatedFromIRResult(src, srcOffset, dest, destOffset) { + var x = n === 1 ? src[srcOffset] : src[srcOffset] ** n; + + for (var j = 0; j < length; ++j) { + dest[destOffset + j] = c0[j] + x * diff[j]; + } + }; + }, + + constructStiched({ + xref, + isEvalSupported, + fn, + dict + }) { + var domain = toNumberArray(dict.getArray("Domain")); + + if (!domain) { + throw new _util.FormatError("No domain"); + } + + var inputSize = domain.length / 2; + + if (inputSize !== 1) { + throw new _util.FormatError("Bad domain for stiched function"); + } + + var fnRefs = dict.get("Functions"); + var fns = []; + + for (var i = 0, ii = fnRefs.length; i < ii; ++i) { + fns.push(this.parse({ + xref, + isEvalSupported, + fn: xref.fetchIfRef(fnRefs[i]) + })); + } + + var bounds = toNumberArray(dict.getArray("Bounds")); + var encode = toNumberArray(dict.getArray("Encode")); + return [CONSTRUCT_STICHED, domain, bounds, encode, fns]; + }, + + constructStichedFromIR({ + xref, + isEvalSupported, + IR + }) { + var domain = IR[1]; + var bounds = IR[2]; + var encode = IR[3]; + var fns = IR[4]; + var tmpBuf = new Float32Array(1); + return function constructStichedFromIRResult(src, srcOffset, dest, destOffset) { + var clip = function constructStichedFromIRClip(v, min, max) { + if (v > max) { + v = max; + } else if (v < min) { + v = min; + } + + return v; + }; + + var v = clip(src[srcOffset], domain[0], domain[1]); + + for (var i = 0, ii = bounds.length; i < ii; ++i) { + if (v < bounds[i]) { + break; + } + } + + var dmin = domain[0]; + + if (i > 0) { + dmin = bounds[i - 1]; + } + + var dmax = domain[1]; + + if (i < bounds.length) { + dmax = bounds[i]; + } + + var rmin = encode[2 * i]; + var rmax = encode[2 * i + 1]; + tmpBuf[0] = dmin === dmax ? rmin : rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin); + fns[i](tmpBuf, 0, dest, destOffset); + }; + }, + + constructPostScript({ + xref, + isEvalSupported, + fn, + dict + }) { + var domain = toNumberArray(dict.getArray("Domain")); + var range = toNumberArray(dict.getArray("Range")); + + if (!domain) { + throw new _util.FormatError("No domain."); + } + + if (!range) { + throw new _util.FormatError("No range."); + } + + var lexer = new _ps_parser.PostScriptLexer(fn); + var parser = new _ps_parser.PostScriptParser(lexer); + var code = parser.parse(); + return [CONSTRUCT_POSTSCRIPT, domain, range, code]; + }, + + constructPostScriptFromIR({ + xref, + isEvalSupported, + IR + }) { + var domain = IR[1]; + var range = IR[2]; + var code = IR[3]; + + if (isEvalSupported && _util.IsEvalSupportedCached.value) { + const compiled = new PostScriptCompiler().compile(code, domain, range); + + if (compiled) { + return new Function("src", "srcOffset", "dest", "destOffset", compiled); + } + } + + (0, _util.info)("Unable to compile PS function"); + var numOutputs = range.length >> 1; + var numInputs = domain.length >> 1; + var evaluator = new PostScriptEvaluator(code); + var cache = Object.create(null); + var MAX_CACHE_SIZE = 2048 * 4; + var cache_available = MAX_CACHE_SIZE; + var tmpBuf = new Float32Array(numInputs); + return function constructPostScriptFromIRResult(src, srcOffset, dest, destOffset) { + var i, value; + var key = ""; + var input = tmpBuf; + + for (i = 0; i < numInputs; i++) { + value = src[srcOffset + i]; + input[i] = value; + key += value + "_"; + } + + var cachedValue = cache[key]; + + if (cachedValue !== undefined) { + dest.set(cachedValue, destOffset); + return; + } + + var output = new Float32Array(numOutputs); + var stack = evaluator.execute(input); + var stackIndex = stack.length - numOutputs; + + for (i = 0; i < numOutputs; i++) { + value = stack[stackIndex + i]; + var bound = range[i * 2]; + + if (value < bound) { + value = bound; + } else { + bound = range[i * 2 + 1]; + + if (value > bound) { + value = bound; + } + } + + output[i] = value; + } + + if (cache_available > 0) { + cache_available--; + cache[key] = output; + } + + dest.set(output, destOffset); + }; + } + + }; +}(); + +function isPDFFunction(v) { + var fnDict; + + if (typeof v !== "object") { + return false; + } else if ((0, _primitives.isDict)(v)) { + fnDict = v; + } else if ((0, _primitives.isStream)(v)) { + fnDict = v.dict; + } else { + return false; + } + + return fnDict.has("FunctionType"); +} + +var PostScriptStack = function PostScriptStackClosure() { + var MAX_STACK_SIZE = 100; + + function PostScriptStack(initialStack) { + this.stack = !initialStack ? [] : Array.prototype.slice.call(initialStack, 0); + } + + PostScriptStack.prototype = { + push: function PostScriptStack_push(value) { + if (this.stack.length >= MAX_STACK_SIZE) { + throw new Error("PostScript function stack overflow."); + } + + this.stack.push(value); + }, + pop: function PostScriptStack_pop() { + if (this.stack.length <= 0) { + throw new Error("PostScript function stack underflow."); + } + + return this.stack.pop(); + }, + copy: function PostScriptStack_copy(n) { + if (this.stack.length + n >= MAX_STACK_SIZE) { + throw new Error("PostScript function stack overflow."); + } + + var stack = this.stack; + + for (var i = stack.length - n, j = n - 1; j >= 0; j--, i++) { + stack.push(stack[i]); + } + }, + index: function PostScriptStack_index(n) { + this.push(this.stack[this.stack.length - n - 1]); + }, + roll: function PostScriptStack_roll(n, p) { + var stack = this.stack; + var l = stack.length - n; + var r = stack.length - 1, + c = l + (p - Math.floor(p / n) * n), + i, + j, + t; + + for (i = l, j = r; i < j; i++, j--) { + t = stack[i]; + stack[i] = stack[j]; + stack[j] = t; + } + + for (i = l, j = c - 1; i < j; i++, j--) { + t = stack[i]; + stack[i] = stack[j]; + stack[j] = t; + } + + for (i = c, j = r; i < j; i++, j--) { + t = stack[i]; + stack[i] = stack[j]; + stack[j] = t; + } + } + }; + return PostScriptStack; +}(); + +var PostScriptEvaluator = function PostScriptEvaluatorClosure() { + function PostScriptEvaluator(operators) { + this.operators = operators; + } + + PostScriptEvaluator.prototype = { + execute: function PostScriptEvaluator_execute(initialStack) { + var stack = new PostScriptStack(initialStack); + var counter = 0; + var operators = this.operators; + var length = operators.length; + var operator, a, b; + + while (counter < length) { + operator = operators[counter++]; + + if (typeof operator === "number") { + stack.push(operator); + continue; + } + + switch (operator) { + case "jz": + b = stack.pop(); + a = stack.pop(); + + if (!a) { + counter = b; + } + + break; + + case "j": + a = stack.pop(); + counter = a; + break; + + case "abs": + a = stack.pop(); + stack.push(Math.abs(a)); + break; + + case "add": + b = stack.pop(); + a = stack.pop(); + stack.push(a + b); + break; + + case "and": + b = stack.pop(); + a = stack.pop(); + + if ((0, _util.isBool)(a) && (0, _util.isBool)(b)) { + stack.push(a && b); + } else { + stack.push(a & b); + } + + break; + + case "atan": + a = stack.pop(); + stack.push(Math.atan(a)); + break; + + case "bitshift": + b = stack.pop(); + a = stack.pop(); + + if (a > 0) { + stack.push(a << b); + } else { + stack.push(a >> b); + } + + break; + + case "ceiling": + a = stack.pop(); + stack.push(Math.ceil(a)); + break; + + case "copy": + a = stack.pop(); + stack.copy(a); + break; + + case "cos": + a = stack.pop(); + stack.push(Math.cos(a)); + break; + + case "cvi": + a = stack.pop() | 0; + stack.push(a); + break; + + case "cvr": + break; + + case "div": + b = stack.pop(); + a = stack.pop(); + stack.push(a / b); + break; + + case "dup": + stack.copy(1); + break; + + case "eq": + b = stack.pop(); + a = stack.pop(); + stack.push(a === b); + break; + + case "exch": + stack.roll(2, 1); + break; + + case "exp": + b = stack.pop(); + a = stack.pop(); + stack.push(a ** b); + break; + + case "false": + stack.push(false); + break; + + case "floor": + a = stack.pop(); + stack.push(Math.floor(a)); + break; + + case "ge": + b = stack.pop(); + a = stack.pop(); + stack.push(a >= b); + break; + + case "gt": + b = stack.pop(); + a = stack.pop(); + stack.push(a > b); + break; + + case "idiv": + b = stack.pop(); + a = stack.pop(); + stack.push(a / b | 0); + break; + + case "index": + a = stack.pop(); + stack.index(a); + break; + + case "le": + b = stack.pop(); + a = stack.pop(); + stack.push(a <= b); + break; + + case "ln": + a = stack.pop(); + stack.push(Math.log(a)); + break; + + case "log": + a = stack.pop(); + stack.push(Math.log(a) / Math.LN10); + break; + + case "lt": + b = stack.pop(); + a = stack.pop(); + stack.push(a < b); + break; + + case "mod": + b = stack.pop(); + a = stack.pop(); + stack.push(a % b); + break; + + case "mul": + b = stack.pop(); + a = stack.pop(); + stack.push(a * b); + break; + + case "ne": + b = stack.pop(); + a = stack.pop(); + stack.push(a !== b); + break; + + case "neg": + a = stack.pop(); + stack.push(-a); + break; + + case "not": + a = stack.pop(); + + if ((0, _util.isBool)(a)) { + stack.push(!a); + } else { + stack.push(~a); + } + + break; + + case "or": + b = stack.pop(); + a = stack.pop(); + + if ((0, _util.isBool)(a) && (0, _util.isBool)(b)) { + stack.push(a || b); + } else { + stack.push(a | b); + } + + break; + + case "pop": + stack.pop(); + break; + + case "roll": + b = stack.pop(); + a = stack.pop(); + stack.roll(a, b); + break; + + case "round": + a = stack.pop(); + stack.push(Math.round(a)); + break; + + case "sin": + a = stack.pop(); + stack.push(Math.sin(a)); + break; + + case "sqrt": + a = stack.pop(); + stack.push(Math.sqrt(a)); + break; + + case "sub": + b = stack.pop(); + a = stack.pop(); + stack.push(a - b); + break; + + case "true": + stack.push(true); + break; + + case "truncate": + a = stack.pop(); + a = a < 0 ? Math.ceil(a) : Math.floor(a); + stack.push(a); + break; + + case "xor": + b = stack.pop(); + a = stack.pop(); + + if ((0, _util.isBool)(a) && (0, _util.isBool)(b)) { + stack.push(a !== b); + } else { + stack.push(a ^ b); + } + + break; + + default: + throw new _util.FormatError(`Unknown operator ${operator}`); + } + } + + return stack.stack; + } + }; + return PostScriptEvaluator; +}(); + +exports.PostScriptEvaluator = PostScriptEvaluator; + +var PostScriptCompiler = function PostScriptCompilerClosure() { + function AstNode(type) { + this.type = type; + } + + AstNode.prototype.visit = function (visitor) { + (0, _util.unreachable)("abstract method"); + }; + + function AstArgument(index, min, max) { + AstNode.call(this, "args"); + this.index = index; + this.min = min; + this.max = max; + } + + AstArgument.prototype = Object.create(AstNode.prototype); + + AstArgument.prototype.visit = function (visitor) { + visitor.visitArgument(this); + }; + + function AstLiteral(number) { + AstNode.call(this, "literal"); + this.number = number; + this.min = number; + this.max = number; + } + + AstLiteral.prototype = Object.create(AstNode.prototype); + + AstLiteral.prototype.visit = function (visitor) { + visitor.visitLiteral(this); + }; + + function AstBinaryOperation(op, arg1, arg2, min, max) { + AstNode.call(this, "binary"); + this.op = op; + this.arg1 = arg1; + this.arg2 = arg2; + this.min = min; + this.max = max; + } + + AstBinaryOperation.prototype = Object.create(AstNode.prototype); + + AstBinaryOperation.prototype.visit = function (visitor) { + visitor.visitBinaryOperation(this); + }; + + function AstMin(arg, max) { + AstNode.call(this, "max"); + this.arg = arg; + this.min = arg.min; + this.max = max; + } + + AstMin.prototype = Object.create(AstNode.prototype); + + AstMin.prototype.visit = function (visitor) { + visitor.visitMin(this); + }; + + function AstVariable(index, min, max) { + AstNode.call(this, "var"); + this.index = index; + this.min = min; + this.max = max; + } + + AstVariable.prototype = Object.create(AstNode.prototype); + + AstVariable.prototype.visit = function (visitor) { + visitor.visitVariable(this); + }; + + function AstVariableDefinition(variable, arg) { + AstNode.call(this, "definition"); + this.variable = variable; + this.arg = arg; + } + + AstVariableDefinition.prototype = Object.create(AstNode.prototype); + + AstVariableDefinition.prototype.visit = function (visitor) { + visitor.visitVariableDefinition(this); + }; + + function ExpressionBuilderVisitor() { + this.parts = []; + } + + ExpressionBuilderVisitor.prototype = { + visitArgument(arg) { + this.parts.push("Math.max(", arg.min, ", Math.min(", arg.max, ", src[srcOffset + ", arg.index, "]))"); + }, + + visitVariable(variable) { + this.parts.push("v", variable.index); + }, + + visitLiteral(literal) { + this.parts.push(literal.number); + }, + + visitBinaryOperation(operation) { + this.parts.push("("); + operation.arg1.visit(this); + this.parts.push(" ", operation.op, " "); + operation.arg2.visit(this); + this.parts.push(")"); + }, + + visitVariableDefinition(definition) { + this.parts.push("var "); + definition.variable.visit(this); + this.parts.push(" = "); + definition.arg.visit(this); + this.parts.push(";"); + }, + + visitMin(max) { + this.parts.push("Math.min("); + max.arg.visit(this); + this.parts.push(", ", max.max, ")"); + }, + + toString() { + return this.parts.join(""); + } + + }; + + function buildAddOperation(num1, num2) { + if (num2.type === "literal" && num2.number === 0) { + return num1; + } + + if (num1.type === "literal" && num1.number === 0) { + return num2; + } + + if (num2.type === "literal" && num1.type === "literal") { + return new AstLiteral(num1.number + num2.number); + } + + return new AstBinaryOperation("+", num1, num2, num1.min + num2.min, num1.max + num2.max); + } + + function buildMulOperation(num1, num2) { + if (num2.type === "literal") { + if (num2.number === 0) { + return new AstLiteral(0); + } else if (num2.number === 1) { + return num1; + } else if (num1.type === "literal") { + return new AstLiteral(num1.number * num2.number); + } + } + + if (num1.type === "literal") { + if (num1.number === 0) { + return new AstLiteral(0); + } else if (num1.number === 1) { + return num2; + } + } + + var min = Math.min(num1.min * num2.min, num1.min * num2.max, num1.max * num2.min, num1.max * num2.max); + var max = Math.max(num1.min * num2.min, num1.min * num2.max, num1.max * num2.min, num1.max * num2.max); + return new AstBinaryOperation("*", num1, num2, min, max); + } + + function buildSubOperation(num1, num2) { + if (num2.type === "literal") { + if (num2.number === 0) { + return num1; + } else if (num1.type === "literal") { + return new AstLiteral(num1.number - num2.number); + } + } + + if (num2.type === "binary" && num2.op === "-" && num1.type === "literal" && num1.number === 1 && num2.arg1.type === "literal" && num2.arg1.number === 1) { + return num2.arg2; + } + + return new AstBinaryOperation("-", num1, num2, num1.min - num2.max, num1.max - num2.min); + } + + function buildMinOperation(num1, max) { + if (num1.min >= max) { + return new AstLiteral(max); + } else if (num1.max <= max) { + return num1; + } + + return new AstMin(num1, max); + } + + function PostScriptCompiler() {} + + PostScriptCompiler.prototype = { + compile: function PostScriptCompiler_compile(code, domain, range) { + var stack = []; + var instructions = []; + var inputSize = domain.length >> 1, + outputSize = range.length >> 1; + var lastRegister = 0; + var n, j; + var num1, num2, ast1, ast2, tmpVar, item; + + for (let i = 0; i < inputSize; i++) { + stack.push(new AstArgument(i, domain[i * 2], domain[i * 2 + 1])); + } + + for (let i = 0, ii = code.length; i < ii; i++) { + item = code[i]; + + if (typeof item === "number") { + stack.push(new AstLiteral(item)); + continue; + } + + switch (item) { + case "add": + if (stack.length < 2) { + return null; + } + + num2 = stack.pop(); + num1 = stack.pop(); + stack.push(buildAddOperation(num1, num2)); + break; + + case "cvr": + if (stack.length < 1) { + return null; + } + + break; + + case "mul": + if (stack.length < 2) { + return null; + } + + num2 = stack.pop(); + num1 = stack.pop(); + stack.push(buildMulOperation(num1, num2)); + break; + + case "sub": + if (stack.length < 2) { + return null; + } + + num2 = stack.pop(); + num1 = stack.pop(); + stack.push(buildSubOperation(num1, num2)); + break; + + case "exch": + if (stack.length < 2) { + return null; + } + + ast1 = stack.pop(); + ast2 = stack.pop(); + stack.push(ast1, ast2); + break; + + case "pop": + if (stack.length < 1) { + return null; + } + + stack.pop(); + break; + + case "index": + if (stack.length < 1) { + return null; + } + + num1 = stack.pop(); + + if (num1.type !== "literal") { + return null; + } + + n = num1.number; + + if (n < 0 || !Number.isInteger(n) || stack.length < n) { + return null; + } + + ast1 = stack[stack.length - n - 1]; + + if (ast1.type === "literal" || ast1.type === "var") { + stack.push(ast1); + break; + } + + tmpVar = new AstVariable(lastRegister++, ast1.min, ast1.max); + stack[stack.length - n - 1] = tmpVar; + stack.push(tmpVar); + instructions.push(new AstVariableDefinition(tmpVar, ast1)); + break; + + case "dup": + if (stack.length < 1) { + return null; + } + + if (typeof code[i + 1] === "number" && code[i + 2] === "gt" && code[i + 3] === i + 7 && code[i + 4] === "jz" && code[i + 5] === "pop" && code[i + 6] === code[i + 1]) { + num1 = stack.pop(); + stack.push(buildMinOperation(num1, code[i + 1])); + i += 6; + break; + } + + ast1 = stack[stack.length - 1]; + + if (ast1.type === "literal" || ast1.type === "var") { + stack.push(ast1); + break; + } + + tmpVar = new AstVariable(lastRegister++, ast1.min, ast1.max); + stack[stack.length - 1] = tmpVar; + stack.push(tmpVar); + instructions.push(new AstVariableDefinition(tmpVar, ast1)); + break; + + case "roll": + if (stack.length < 2) { + return null; + } + + num2 = stack.pop(); + num1 = stack.pop(); + + if (num2.type !== "literal" || num1.type !== "literal") { + return null; + } + + j = num2.number; + n = num1.number; + + if (n <= 0 || !Number.isInteger(n) || !Number.isInteger(j) || stack.length < n) { + return null; + } + + j = (j % n + n) % n; + + if (j === 0) { + break; + } + + Array.prototype.push.apply(stack, stack.splice(stack.length - n, n - j)); + break; + + default: + return null; + } + } + + if (stack.length !== outputSize) { + return null; + } + + var result = []; + instructions.forEach(function (instruction) { + var statementBuilder = new ExpressionBuilderVisitor(); + instruction.visit(statementBuilder); + result.push(statementBuilder.toString()); + }); + stack.forEach(function (expr, i) { + var statementBuilder = new ExpressionBuilderVisitor(); + expr.visit(statementBuilder); + var min = range[i * 2], + max = range[i * 2 + 1]; + var out = [statementBuilder.toString()]; + + if (min > expr.min) { + out.unshift("Math.max(", min, ", "); + out.push(")"); + } + + if (max < expr.max) { + out.unshift("Math.min(", max, ", "); + out.push(")"); + } + + out.unshift("dest[destOffset + ", i, "] = "); + out.push(";"); + result.push(out.join("")); + }); + return result.join("\n"); + } + }; + return PostScriptCompiler; +}(); + +exports.PostScriptCompiler = PostScriptCompiler; + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PostScriptParser = exports.PostScriptLexer = void 0; + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +var _core_utils = __w_pdfjs_require__(8); + +class PostScriptParser { + constructor(lexer) { + this.lexer = lexer; + this.operators = []; + this.token = null; + this.prev = null; + } + + nextToken() { + this.prev = this.token; + this.token = this.lexer.getToken(); + } + + accept(type) { + if (this.token.type === type) { + this.nextToken(); + return true; + } + + return false; + } + + expect(type) { + if (this.accept(type)) { + return true; + } + + throw new _util.FormatError(`Unexpected symbol: found ${this.token.type} expected ${type}.`); + } + + parse() { + this.nextToken(); + this.expect(PostScriptTokenTypes.LBRACE); + this.parseBlock(); + this.expect(PostScriptTokenTypes.RBRACE); + return this.operators; + } + + parseBlock() { + while (true) { + if (this.accept(PostScriptTokenTypes.NUMBER)) { + this.operators.push(this.prev.value); + } else if (this.accept(PostScriptTokenTypes.OPERATOR)) { + this.operators.push(this.prev.value); + } else if (this.accept(PostScriptTokenTypes.LBRACE)) { + this.parseCondition(); + } else { + return; + } + } + } + + parseCondition() { + const conditionLocation = this.operators.length; + this.operators.push(null, null); + this.parseBlock(); + this.expect(PostScriptTokenTypes.RBRACE); + + if (this.accept(PostScriptTokenTypes.IF)) { + this.operators[conditionLocation] = this.operators.length; + this.operators[conditionLocation + 1] = "jz"; + } else if (this.accept(PostScriptTokenTypes.LBRACE)) { + const jumpLocation = this.operators.length; + this.operators.push(null, null); + const endOfTrue = this.operators.length; + this.parseBlock(); + this.expect(PostScriptTokenTypes.RBRACE); + this.expect(PostScriptTokenTypes.IFELSE); + this.operators[jumpLocation] = this.operators.length; + this.operators[jumpLocation + 1] = "j"; + this.operators[conditionLocation] = endOfTrue; + this.operators[conditionLocation + 1] = "jz"; + } else { + throw new _util.FormatError("PS Function: error parsing conditional."); + } + } + +} + +exports.PostScriptParser = PostScriptParser; +const PostScriptTokenTypes = { + LBRACE: 0, + RBRACE: 1, + NUMBER: 2, + OPERATOR: 3, + IF: 4, + IFELSE: 5 +}; + +const PostScriptToken = function PostScriptTokenClosure() { + const opCache = Object.create(null); + + class PostScriptToken { + constructor(type, value) { + this.type = type; + this.value = value; + } + + static getOperator(op) { + const opValue = opCache[op]; + + if (opValue) { + return opValue; + } + + return opCache[op] = new PostScriptToken(PostScriptTokenTypes.OPERATOR, op); + } + + static get LBRACE() { + return (0, _util.shadow)(this, "LBRACE", new PostScriptToken(PostScriptTokenTypes.LBRACE, "{")); + } + + static get RBRACE() { + return (0, _util.shadow)(this, "RBRACE", new PostScriptToken(PostScriptTokenTypes.RBRACE, "}")); + } + + static get IF() { + return (0, _util.shadow)(this, "IF", new PostScriptToken(PostScriptTokenTypes.IF, "IF")); + } + + static get IFELSE() { + return (0, _util.shadow)(this, "IFELSE", new PostScriptToken(PostScriptTokenTypes.IFELSE, "IFELSE")); + } + + } + + return PostScriptToken; +}(); + +class PostScriptLexer { + constructor(stream) { + this.stream = stream; + this.nextChar(); + this.strBuf = []; + } + + nextChar() { + return this.currentChar = this.stream.getByte(); + } + + getToken() { + let comment = false; + let ch = this.currentChar; + + while (true) { + if (ch < 0) { + return _primitives.EOF; + } + + if (comment) { + if (ch === 0x0a || ch === 0x0d) { + comment = false; + } + } else if (ch === 0x25) { + comment = true; + } else if (!(0, _core_utils.isWhiteSpace)(ch)) { + break; + } + + ch = this.nextChar(); + } + + switch (ch | 0) { + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x2b: + case 0x2d: + case 0x2e: + return new PostScriptToken(PostScriptTokenTypes.NUMBER, this.getNumber()); + + case 0x7b: + this.nextChar(); + return PostScriptToken.LBRACE; + + case 0x7d: + this.nextChar(); + return PostScriptToken.RBRACE; + } + + const strBuf = this.strBuf; + strBuf.length = 0; + strBuf[0] = String.fromCharCode(ch); + + while ((ch = this.nextChar()) >= 0 && (ch >= 0x41 && ch <= 0x5a || ch >= 0x61 && ch <= 0x7a)) { + strBuf.push(String.fromCharCode(ch)); + } + + const str = strBuf.join(""); + + switch (str.toLowerCase()) { + case "if": + return PostScriptToken.IF; + + case "ifelse": + return PostScriptToken.IFELSE; + + default: + return PostScriptToken.getOperator(str); + } + } + + getNumber() { + let ch = this.currentChar; + const strBuf = this.strBuf; + strBuf.length = 0; + strBuf[0] = String.fromCharCode(ch); + + while ((ch = this.nextChar()) >= 0) { + if (ch >= 0x30 && ch <= 0x39 || ch === 0x2d || ch === 0x2e) { + strBuf.push(String.fromCharCode(ch)); + } else { + break; + } + } + + const value = parseFloat(strBuf.join("")); + + if (isNaN(value)) { + throw new _util.FormatError(`Invalid floating point number: ${value}`); + } + + return value; + } + +} + +exports.PostScriptLexer = PostScriptLexer; + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MurmurHash3_64 = void 0; + +var _util = __w_pdfjs_require__(2); + +const SEED = 0xc3d2e1f0; +const MASK_HIGH = 0xffff0000; +const MASK_LOW = 0xffff; + +class MurmurHash3_64 { + constructor(seed) { + this.h1 = seed ? seed & 0xffffffff : SEED; + this.h2 = seed ? seed & 0xffffffff : SEED; + } + + update(input) { + let data, length; + + if ((0, _util.isString)(input)) { + data = new Uint8Array(input.length * 2); + length = 0; + + for (let i = 0, ii = input.length; i < ii; i++) { + const code = input.charCodeAt(i); + + if (code <= 0xff) { + data[length++] = code; + } else { + data[length++] = code >>> 8; + data[length++] = code & 0xff; + } + } + } else if ((0, _util.isArrayBuffer)(input)) { + data = input; + length = data.byteLength; + } else { + throw new Error("Wrong data format in MurmurHash3_64_update. " + "Input must be a string or array."); + } + + const blockCounts = length >> 2; + const tailLength = length - blockCounts * 4; + const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts); + let k1 = 0, + k2 = 0; + let h1 = this.h1, + h2 = this.h2; + const C1 = 0xcc9e2d51, + C2 = 0x1b873593; + const C1_LOW = C1 & MASK_LOW, + C2_LOW = C2 & MASK_LOW; + + for (let i = 0; i < blockCounts; i++) { + if (i & 1) { + k1 = dataUint32[i]; + k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; + k1 = k1 << 15 | k1 >>> 17; + k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; + h1 ^= k1; + h1 = h1 << 13 | h1 >>> 19; + h1 = h1 * 5 + 0xe6546b64; + } else { + k2 = dataUint32[i]; + k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW; + k2 = k2 << 15 | k2 >>> 17; + k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW; + h2 ^= k2; + h2 = h2 << 13 | h2 >>> 19; + h2 = h2 * 5 + 0xe6546b64; + } + } + + k1 = 0; + + switch (tailLength) { + case 3: + k1 ^= data[blockCounts * 4 + 2] << 16; + + case 2: + k1 ^= data[blockCounts * 4 + 1] << 8; + + case 1: + k1 ^= data[blockCounts * 4]; + k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; + k1 = k1 << 15 | k1 >>> 17; + k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; + + if (blockCounts & 1) { + h1 ^= k1; + } else { + h2 ^= k1; + } + + } + + this.h1 = h1; + this.h2 = h2; + } + + hexdigest() { + let h1 = this.h1, + h2 = this.h2; + h1 ^= h2 >>> 1; + h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW; + h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16; + h1 ^= h2 >>> 1; + h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW; + h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16; + h1 ^= h2 >>> 1; + const hex1 = (h1 >>> 0).toString(16), + hex2 = (h2 >>> 0).toString(16); + return hex1.padStart(8, "0") + hex2.padStart(8, "0"); + } + +} + +exports.MurmurHash3_64 = MurmurHash3_64; + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFImage = void 0; + +var _util = __w_pdfjs_require__(2); + +var _primitives = __w_pdfjs_require__(5); + +var _colorspace = __w_pdfjs_require__(23); + +var _stream = __w_pdfjs_require__(12); + +var _jpeg_stream = __w_pdfjs_require__(18); + +var _jpx = __w_pdfjs_require__(21); + +var PDFImage = function PDFImageClosure() { + function decodeAndClamp(value, addend, coefficient, max) { + value = addend + value * coefficient; + + if (value < 0) { + value = 0; + } else if (value > max) { + value = max; + } + + return value; + } + + function resizeImageMask(src, bpc, w1, h1, w2, h2) { + var length = w2 * h2; + let dest; + + if (bpc <= 8) { + dest = new Uint8Array(length); + } else if (bpc <= 16) { + dest = new Uint16Array(length); + } else { + dest = new Uint32Array(length); + } + + var xRatio = w1 / w2; + var yRatio = h1 / h2; + var i, + j, + py, + newIndex = 0, + oldIndex; + var xScaled = new Uint16Array(w2); + var w1Scanline = w1; + + for (i = 0; i < w2; i++) { + xScaled[i] = Math.floor(i * xRatio); + } + + for (i = 0; i < h2; i++) { + py = Math.floor(i * yRatio) * w1Scanline; + + for (j = 0; j < w2; j++) { + oldIndex = py + xScaled[j]; + dest[newIndex++] = src[oldIndex]; + } + } + + return dest; + } + + function PDFImage({ + xref, + res, + image, + isInline = false, + smask = null, + mask = null, + isMask = false, + pdfFunctionFactory + }) { + this.image = image; + var dict = image.dict; + const filter = dict.get("Filter"); + + if ((0, _primitives.isName)(filter)) { + switch (filter.name) { + case "JPXDecode": + var jpxImage = new _jpx.JpxImage(); + jpxImage.parseImageProperties(image.stream); + image.stream.reset(); + image.width = jpxImage.width; + image.height = jpxImage.height; + image.bitsPerComponent = jpxImage.bitsPerComponent; + image.numComps = jpxImage.componentsCount; + break; + + case "JBIG2Decode": + image.bitsPerComponent = 1; + image.numComps = 1; + break; + } + } + + let width = dict.get("Width", "W"); + let height = dict.get("Height", "H"); + + if (Number.isInteger(image.width) && image.width > 0 && Number.isInteger(image.height) && image.height > 0 && (image.width !== width || image.height !== height)) { + (0, _util.warn)("PDFImage - using the Width/Height of the image data, " + "rather than the image dictionary."); + width = image.width; + height = image.height; + } + + if (width < 1 || height < 1) { + throw new _util.FormatError(`Invalid image width: ${width} or height: ${height}`); + } + + this.width = width; + this.height = height; + this.interpolate = dict.get("Interpolate", "I") || false; + this.imageMask = dict.get("ImageMask", "IM") || false; + this.matte = dict.get("Matte") || false; + var bitsPerComponent = image.bitsPerComponent; + + if (!bitsPerComponent) { + bitsPerComponent = dict.get("BitsPerComponent", "BPC"); + + if (!bitsPerComponent) { + if (this.imageMask) { + bitsPerComponent = 1; + } else { + throw new _util.FormatError(`Bits per component missing in image: ${this.imageMask}`); + } + } + } + + this.bpc = bitsPerComponent; + + if (!this.imageMask) { + var colorSpace = dict.get("ColorSpace", "CS"); + + if (!colorSpace) { + (0, _util.info)("JPX images (which do not require color spaces)"); + + switch (image.numComps) { + case 1: + colorSpace = _primitives.Name.get("DeviceGray"); + break; + + case 3: + colorSpace = _primitives.Name.get("DeviceRGB"); + break; + + case 4: + colorSpace = _primitives.Name.get("DeviceCMYK"); + break; + + default: + throw new Error(`JPX images with ${image.numComps} ` + "color components not supported."); + } + } + + const resources = isInline ? res : null; + this.colorSpace = _colorspace.ColorSpace.parse(colorSpace, xref, resources, pdfFunctionFactory); + this.numComps = this.colorSpace.numComps; + } + + this.decode = dict.getArray("Decode", "D"); + this.needsDecode = false; + + if (this.decode && (this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode, bitsPerComponent) || isMask && !_colorspace.ColorSpace.isDefaultDecode(this.decode, 1))) { + this.needsDecode = true; + var max = (1 << bitsPerComponent) - 1; + this.decodeCoefficients = []; + this.decodeAddends = []; + const isIndexed = this.colorSpace && this.colorSpace.name === "Indexed"; + + for (var i = 0, j = 0; i < this.decode.length; i += 2, ++j) { + var dmin = this.decode[i]; + var dmax = this.decode[i + 1]; + this.decodeCoefficients[j] = isIndexed ? (dmax - dmin) / max : dmax - dmin; + this.decodeAddends[j] = isIndexed ? dmin : max * dmin; + } + } + + if (smask) { + this.smask = new PDFImage({ + xref, + res, + image: smask, + isInline, + pdfFunctionFactory + }); + } else if (mask) { + if ((0, _primitives.isStream)(mask)) { + var maskDict = mask.dict, + imageMask = maskDict.get("ImageMask", "IM"); + + if (!imageMask) { + (0, _util.warn)("Ignoring /Mask in image without /ImageMask."); + } else { + this.mask = new PDFImage({ + xref, + res, + image: mask, + isInline, + isMask: true, + pdfFunctionFactory + }); + } + } else { + this.mask = mask; + } + } + } + + PDFImage.buildImage = function ({ + xref, + res, + image, + isInline = false, + pdfFunctionFactory + }) { + const imageData = image; + let smaskData = null; + let maskData = null; + const smask = image.dict.get("SMask"); + const mask = image.dict.get("Mask"); + + if (smask) { + smaskData = smask; + } else if (mask) { + if ((0, _primitives.isStream)(mask) || Array.isArray(mask)) { + maskData = mask; + } else { + (0, _util.warn)("Unsupported mask format."); + } + } + + return Promise.resolve(new PDFImage({ + xref, + res, + image: imageData, + isInline, + smask: smaskData, + mask: maskData, + pdfFunctionFactory + })); + }; + + PDFImage.createMask = function ({ + imgArray, + width, + height, + imageIsFromDecodeStream, + inverseDecode + }) { + var computedLength = (width + 7 >> 3) * height; + var actualLength = imgArray.byteLength; + var haveFullData = computedLength === actualLength; + var data, i; + + if (imageIsFromDecodeStream && (!inverseDecode || haveFullData)) { + data = imgArray; + } else if (!inverseDecode) { + data = new Uint8ClampedArray(actualLength); + data.set(imgArray); + } else { + data = new Uint8ClampedArray(computedLength); + data.set(imgArray); + + for (i = actualLength; i < computedLength; i++) { + data[i] = 0xff; + } + } + + if (inverseDecode) { + for (i = 0; i < actualLength; i++) { + data[i] ^= 0xff; + } + } + + return { + data, + width, + height + }; + }; + + PDFImage.prototype = { + get drawWidth() { + return Math.max(this.width, this.smask && this.smask.width || 0, this.mask && this.mask.width || 0); + }, + + get drawHeight() { + return Math.max(this.height, this.smask && this.smask.height || 0, this.mask && this.mask.height || 0); + }, + + decodeBuffer(buffer) { + var bpc = this.bpc; + var numComps = this.numComps; + var decodeAddends = this.decodeAddends; + var decodeCoefficients = this.decodeCoefficients; + var max = (1 << bpc) - 1; + var i, ii; + + if (bpc === 1) { + for (i = 0, ii = buffer.length; i < ii; i++) { + buffer[i] = +!buffer[i]; + } + + return; + } + + var index = 0; + + for (i = 0, ii = this.width * this.height; i < ii; i++) { + for (var j = 0; j < numComps; j++) { + buffer[index] = decodeAndClamp(buffer[index], decodeAddends[j], decodeCoefficients[j], max); + index++; + } + } + }, + + getComponents(buffer) { + var bpc = this.bpc; + + if (bpc === 8) { + return buffer; + } + + var width = this.width; + var height = this.height; + var numComps = this.numComps; + var length = width * height * numComps; + var bufferPos = 0; + let output; + + if (bpc <= 8) { + output = new Uint8Array(length); + } else if (bpc <= 16) { + output = new Uint16Array(length); + } else { + output = new Uint32Array(length); + } + + var rowComps = width * numComps; + var max = (1 << bpc) - 1; + var i = 0, + ii, + buf; + + if (bpc === 1) { + var mask, loop1End, loop2End; + + for (var j = 0; j < height; j++) { + loop1End = i + (rowComps & ~7); + loop2End = i + rowComps; + + while (i < loop1End) { + buf = buffer[bufferPos++]; + output[i] = buf >> 7 & 1; + output[i + 1] = buf >> 6 & 1; + output[i + 2] = buf >> 5 & 1; + output[i + 3] = buf >> 4 & 1; + output[i + 4] = buf >> 3 & 1; + output[i + 5] = buf >> 2 & 1; + output[i + 6] = buf >> 1 & 1; + output[i + 7] = buf & 1; + i += 8; + } + + if (i < loop2End) { + buf = buffer[bufferPos++]; + mask = 128; + + while (i < loop2End) { + output[i++] = +!!(buf & mask); + mask >>= 1; + } + } + } + } else { + var bits = 0; + buf = 0; + + for (i = 0, ii = length; i < ii; ++i) { + if (i % rowComps === 0) { + buf = 0; + bits = 0; + } + + while (bits < bpc) { + buf = buf << 8 | buffer[bufferPos++]; + bits += 8; + } + + var remainingBits = bits - bpc; + let value = buf >> remainingBits; + + if (value < 0) { + value = 0; + } else if (value > max) { + value = max; + } + + output[i] = value; + buf = buf & (1 << remainingBits) - 1; + bits = remainingBits; + } + } + + return output; + }, + + fillOpacity(rgbaBuf, width, height, actualHeight, image) { + var smask = this.smask; + var mask = this.mask; + var alphaBuf, sw, sh, i, ii, j; + + if (smask) { + sw = smask.width; + sh = smask.height; + alphaBuf = new Uint8ClampedArray(sw * sh); + smask.fillGrayBuffer(alphaBuf); + + if (sw !== width || sh !== height) { + alphaBuf = resizeImageMask(alphaBuf, smask.bpc, sw, sh, width, height); + } + } else if (mask) { + if (mask instanceof PDFImage) { + sw = mask.width; + sh = mask.height; + alphaBuf = new Uint8ClampedArray(sw * sh); + mask.numComps = 1; + mask.fillGrayBuffer(alphaBuf); + + for (i = 0, ii = sw * sh; i < ii; ++i) { + alphaBuf[i] = 255 - alphaBuf[i]; + } + + if (sw !== width || sh !== height) { + alphaBuf = resizeImageMask(alphaBuf, mask.bpc, sw, sh, width, height); + } + } else if (Array.isArray(mask)) { + alphaBuf = new Uint8ClampedArray(width * height); + var numComps = this.numComps; + + for (i = 0, ii = width * height; i < ii; ++i) { + var opacity = 0; + var imageOffset = i * numComps; + + for (j = 0; j < numComps; ++j) { + var color = image[imageOffset + j]; + var maskOffset = j * 2; + + if (color < mask[maskOffset] || color > mask[maskOffset + 1]) { + opacity = 255; + break; + } + } + + alphaBuf[i] = opacity; + } + } else { + throw new _util.FormatError("Unknown mask format."); + } + } + + if (alphaBuf) { + for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) { + rgbaBuf[j] = alphaBuf[i]; + } + } else { + for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) { + rgbaBuf[j] = 255; + } + } + }, + + undoPreblend(buffer, width, height) { + var matte = this.smask && this.smask.matte; + + if (!matte) { + return; + } + + var matteRgb = this.colorSpace.getRgb(matte, 0); + var matteR = matteRgb[0]; + var matteG = matteRgb[1]; + var matteB = matteRgb[2]; + var length = width * height * 4; + + for (var i = 0; i < length; i += 4) { + var alpha = buffer[i + 3]; + + if (alpha === 0) { + buffer[i] = 255; + buffer[i + 1] = 255; + buffer[i + 2] = 255; + continue; + } + + var k = 255 / alpha; + buffer[i] = (buffer[i] - matteR) * k + matteR; + buffer[i + 1] = (buffer[i + 1] - matteG) * k + matteG; + buffer[i + 2] = (buffer[i + 2] - matteB) * k + matteB; + } + }, + + createImageData(forceRGBA = false) { + var drawWidth = this.drawWidth; + var drawHeight = this.drawHeight; + var imgData = { + width: drawWidth, + height: drawHeight, + kind: 0, + data: null + }; + var numComps = this.numComps; + var originalWidth = this.width; + var originalHeight = this.height; + var bpc = this.bpc; + var rowBytes = originalWidth * numComps * bpc + 7 >> 3; + var imgArray; + + if (!forceRGBA) { + var kind; + + if (this.colorSpace.name === "DeviceGray" && bpc === 1) { + kind = _util.ImageKind.GRAYSCALE_1BPP; + } else if (this.colorSpace.name === "DeviceRGB" && bpc === 8 && !this.needsDecode) { + kind = _util.ImageKind.RGB_24BPP; + } + + if (kind && !this.smask && !this.mask && drawWidth === originalWidth && drawHeight === originalHeight) { + imgData.kind = kind; + imgArray = this.getImageBytes(originalHeight * rowBytes); + + if (this.image instanceof _stream.DecodeStream) { + imgData.data = imgArray; + } else { + var newArray = new Uint8ClampedArray(imgArray.length); + newArray.set(imgArray); + imgData.data = newArray; + } + + if (this.needsDecode) { + (0, _util.assert)(kind === _util.ImageKind.GRAYSCALE_1BPP, "PDFImage.createImageData: The image must be grayscale."); + var buffer = imgData.data; + + for (var i = 0, ii = buffer.length; i < ii; i++) { + buffer[i] ^= 0xff; + } + } + + return imgData; + } + + if (this.image instanceof _jpeg_stream.JpegStream && !this.smask && !this.mask) { + let imageLength = originalHeight * rowBytes; + + switch (this.colorSpace.name) { + case "DeviceGray": + imageLength *= 3; + + case "DeviceRGB": + case "DeviceCMYK": + imgData.kind = _util.ImageKind.RGB_24BPP; + imgData.data = this.getImageBytes(imageLength, drawWidth, drawHeight, true); + return imgData; + } + } + } + + imgArray = this.getImageBytes(originalHeight * rowBytes); + var actualHeight = 0 | imgArray.length / rowBytes * drawHeight / originalHeight; + var comps = this.getComponents(imgArray); + var alpha01, maybeUndoPreblend; + + if (!forceRGBA && !this.smask && !this.mask) { + imgData.kind = _util.ImageKind.RGB_24BPP; + imgData.data = new Uint8ClampedArray(drawWidth * drawHeight * 3); + alpha01 = 0; + maybeUndoPreblend = false; + } else { + imgData.kind = _util.ImageKind.RGBA_32BPP; + imgData.data = new Uint8ClampedArray(drawWidth * drawHeight * 4); + alpha01 = 1; + maybeUndoPreblend = true; + this.fillOpacity(imgData.data, drawWidth, drawHeight, actualHeight, comps); + } + + if (this.needsDecode) { + this.decodeBuffer(comps); + } + + this.colorSpace.fillRgb(imgData.data, originalWidth, originalHeight, drawWidth, drawHeight, actualHeight, bpc, comps, alpha01); + + if (maybeUndoPreblend) { + this.undoPreblend(imgData.data, drawWidth, actualHeight); + } + + return imgData; + }, + + fillGrayBuffer(buffer) { + var numComps = this.numComps; + + if (numComps !== 1) { + throw new _util.FormatError(`Reading gray scale from a color image: ${numComps}`); + } + + var width = this.width; + var height = this.height; + var bpc = this.bpc; + var rowBytes = width * numComps * bpc + 7 >> 3; + var imgArray = this.getImageBytes(height * rowBytes); + var comps = this.getComponents(imgArray); + var i, length; + + if (bpc === 1) { + length = width * height; + + if (this.needsDecode) { + for (i = 0; i < length; ++i) { + buffer[i] = comps[i] - 1 & 255; + } + } else { + for (i = 0; i < length; ++i) { + buffer[i] = -comps[i] & 255; + } + } + + return; + } + + if (this.needsDecode) { + this.decodeBuffer(comps); + } + + length = width * height; + var scale = 255 / ((1 << bpc) - 1); + + for (i = 0; i < length; ++i) { + buffer[i] = scale * comps[i]; + } + }, + + getImageBytes(length, drawWidth, drawHeight, forceRGB = false) { + this.image.reset(); + this.image.drawWidth = drawWidth || this.width; + this.image.drawHeight = drawHeight || this.height; + this.image.forceRGB = !!forceRGB; + return this.image.getBytes(length, true); + } + + }; + return PDFImage; +}(); + +exports.PDFImage = PDFImage; + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MessageHandler = void 0; + +var _util = __w_pdfjs_require__(2); + +const CallbackKind = { + UNKNOWN: 0, + DATA: 1, + ERROR: 2 +}; +const StreamKind = { + UNKNOWN: 0, + CANCEL: 1, + CANCEL_COMPLETE: 2, + CLOSE: 3, + ENQUEUE: 4, + ERROR: 5, + PULL: 6, + PULL_COMPLETE: 7, + START_COMPLETE: 8 +}; + +function wrapReason(reason) { + if (typeof reason !== "object" || reason === null) { + return reason; + } + + switch (reason.name) { + case "AbortException": + return new _util.AbortException(reason.message); + + case "MissingPDFException": + return new _util.MissingPDFException(reason.message); + + case "UnexpectedResponseException": + return new _util.UnexpectedResponseException(reason.message, reason.status); + + case "UnknownErrorException": + return new _util.UnknownErrorException(reason.message, reason.details); + + default: + return new _util.UnknownErrorException(reason.message, reason.toString()); + } +} + +class MessageHandler { + constructor(sourceName, targetName, comObj) { + this.sourceName = sourceName; + this.targetName = targetName; + this.comObj = comObj; + this.callbackId = 1; + this.streamId = 1; + this.postMessageTransfers = true; + this.streamSinks = Object.create(null); + this.streamControllers = Object.create(null); + this.callbackCapabilities = Object.create(null); + this.actionHandler = Object.create(null); + + this._onComObjOnMessage = event => { + const data = event.data; + + if (data.targetName !== this.sourceName) { + return; + } + + if (data.stream) { + this._processStreamMessage(data); + + return; + } + + if (data.callback) { + const callbackId = data.callbackId; + const capability = this.callbackCapabilities[callbackId]; + + if (!capability) { + throw new Error(`Cannot resolve callback ${callbackId}`); + } + + delete this.callbackCapabilities[callbackId]; + + if (data.callback === CallbackKind.DATA) { + capability.resolve(data.data); + } else if (data.callback === CallbackKind.ERROR) { + capability.reject(wrapReason(data.reason)); + } else { + throw new Error("Unexpected callback case"); + } + + return; + } + + const action = this.actionHandler[data.action]; + + if (!action) { + throw new Error(`Unknown action from worker: ${data.action}`); + } + + if (data.callbackId) { + const cbSourceName = this.sourceName; + const cbTargetName = data.sourceName; + new Promise(function (resolve) { + resolve(action(data.data)); + }).then(function (result) { + comObj.postMessage({ + sourceName: cbSourceName, + targetName: cbTargetName, + callback: CallbackKind.DATA, + callbackId: data.callbackId, + data: result + }); + }, function (reason) { + comObj.postMessage({ + sourceName: cbSourceName, + targetName: cbTargetName, + callback: CallbackKind.ERROR, + callbackId: data.callbackId, + reason: wrapReason(reason) + }); + }); + return; + } + + if (data.streamId) { + this._createStreamSink(data); + + return; + } + + action(data.data); + }; + + comObj.addEventListener("message", this._onComObjOnMessage); + } + + on(actionName, handler) { + const ah = this.actionHandler; + + if (ah[actionName]) { + throw new Error(`There is already an actionName called "${actionName}"`); + } + + ah[actionName] = handler; + } + + send(actionName, data, transfers) { + this._postMessage({ + sourceName: this.sourceName, + targetName: this.targetName, + action: actionName, + data + }, transfers); + } + + sendWithPromise(actionName, data, transfers) { + const callbackId = this.callbackId++; + const capability = (0, _util.createPromiseCapability)(); + this.callbackCapabilities[callbackId] = capability; + + try { + this._postMessage({ + sourceName: this.sourceName, + targetName: this.targetName, + action: actionName, + callbackId, + data + }, transfers); + } catch (ex) { + capability.reject(ex); + } + + return capability.promise; + } + + sendWithStream(actionName, data, queueingStrategy, transfers) { + const streamId = this.streamId++; + const sourceName = this.sourceName; + const targetName = this.targetName; + const comObj = this.comObj; + return new ReadableStream({ + start: controller => { + const startCapability = (0, _util.createPromiseCapability)(); + this.streamControllers[streamId] = { + controller, + startCall: startCapability, + pullCall: null, + cancelCall: null, + isClosed: false + }; + + this._postMessage({ + sourceName, + targetName, + action: actionName, + streamId, + data, + desiredSize: controller.desiredSize + }, transfers); + + return startCapability.promise; + }, + pull: controller => { + const pullCapability = (0, _util.createPromiseCapability)(); + this.streamControllers[streamId].pullCall = pullCapability; + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.PULL, + streamId, + desiredSize: controller.desiredSize + }); + return pullCapability.promise; + }, + cancel: reason => { + (0, _util.assert)(reason instanceof Error, "cancel must have a valid reason"); + const cancelCapability = (0, _util.createPromiseCapability)(); + this.streamControllers[streamId].cancelCall = cancelCapability; + this.streamControllers[streamId].isClosed = true; + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.CANCEL, + streamId, + reason: wrapReason(reason) + }); + return cancelCapability.promise; + } + }, queueingStrategy); + } + + _createStreamSink(data) { + const self = this; + const action = this.actionHandler[data.action]; + const streamId = data.streamId; + const sourceName = this.sourceName; + const targetName = data.sourceName; + const comObj = this.comObj; + const streamSink = { + enqueue(chunk, size = 1, transfers) { + if (this.isCancelled) { + return; + } + + const lastDesiredSize = this.desiredSize; + this.desiredSize -= size; + + if (lastDesiredSize > 0 && this.desiredSize <= 0) { + this.sinkCapability = (0, _util.createPromiseCapability)(); + this.ready = this.sinkCapability.promise; + } + + self._postMessage({ + sourceName, + targetName, + stream: StreamKind.ENQUEUE, + streamId, + chunk + }, transfers); + }, + + close() { + if (this.isCancelled) { + return; + } + + this.isCancelled = true; + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.CLOSE, + streamId + }); + delete self.streamSinks[streamId]; + }, + + error(reason) { + (0, _util.assert)(reason instanceof Error, "error must have a valid reason"); + + if (this.isCancelled) { + return; + } + + this.isCancelled = true; + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.ERROR, + streamId, + reason: wrapReason(reason) + }); + }, + + sinkCapability: (0, _util.createPromiseCapability)(), + onPull: null, + onCancel: null, + isCancelled: false, + desiredSize: data.desiredSize, + ready: null + }; + streamSink.sinkCapability.resolve(); + streamSink.ready = streamSink.sinkCapability.promise; + this.streamSinks[streamId] = streamSink; + new Promise(function (resolve) { + resolve(action(data.data, streamSink)); + }).then(function () { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.START_COMPLETE, + streamId, + success: true + }); + }, function (reason) { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.START_COMPLETE, + streamId, + reason: wrapReason(reason) + }); + }); + } + + _processStreamMessage(data) { + const streamId = data.streamId; + const sourceName = this.sourceName; + const targetName = data.sourceName; + const comObj = this.comObj; + + switch (data.stream) { + case StreamKind.START_COMPLETE: + if (data.success) { + this.streamControllers[streamId].startCall.resolve(); + } else { + this.streamControllers[streamId].startCall.reject(wrapReason(data.reason)); + } + + break; + + case StreamKind.PULL_COMPLETE: + if (data.success) { + this.streamControllers[streamId].pullCall.resolve(); + } else { + this.streamControllers[streamId].pullCall.reject(wrapReason(data.reason)); + } + + break; + + case StreamKind.PULL: + if (!this.streamSinks[streamId]) { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.PULL_COMPLETE, + streamId, + success: true + }); + break; + } + + if (this.streamSinks[streamId].desiredSize <= 0 && data.desiredSize > 0) { + this.streamSinks[streamId].sinkCapability.resolve(); + } + + this.streamSinks[streamId].desiredSize = data.desiredSize; + const { + onPull + } = this.streamSinks[data.streamId]; + new Promise(function (resolve) { + resolve(onPull && onPull()); + }).then(function () { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.PULL_COMPLETE, + streamId, + success: true + }); + }, function (reason) { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.PULL_COMPLETE, + streamId, + reason: wrapReason(reason) + }); + }); + break; + + case StreamKind.ENQUEUE: + (0, _util.assert)(this.streamControllers[streamId], "enqueue should have stream controller"); + + if (this.streamControllers[streamId].isClosed) { + break; + } + + this.streamControllers[streamId].controller.enqueue(data.chunk); + break; + + case StreamKind.CLOSE: + (0, _util.assert)(this.streamControllers[streamId], "close should have stream controller"); + + if (this.streamControllers[streamId].isClosed) { + break; + } + + this.streamControllers[streamId].isClosed = true; + this.streamControllers[streamId].controller.close(); + + this._deleteStreamController(streamId); + + break; + + case StreamKind.ERROR: + (0, _util.assert)(this.streamControllers[streamId], "error should have stream controller"); + this.streamControllers[streamId].controller.error(wrapReason(data.reason)); + + this._deleteStreamController(streamId); + + break; + + case StreamKind.CANCEL_COMPLETE: + if (data.success) { + this.streamControllers[streamId].cancelCall.resolve(); + } else { + this.streamControllers[streamId].cancelCall.reject(wrapReason(data.reason)); + } + + this._deleteStreamController(streamId); + + break; + + case StreamKind.CANCEL: + if (!this.streamSinks[streamId]) { + break; + } + + const { + onCancel + } = this.streamSinks[data.streamId]; + new Promise(function (resolve) { + resolve(onCancel && onCancel(wrapReason(data.reason))); + }).then(function () { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.CANCEL_COMPLETE, + streamId, + success: true + }); + }, function (reason) { + comObj.postMessage({ + sourceName, + targetName, + stream: StreamKind.CANCEL_COMPLETE, + streamId, + reason: wrapReason(reason) + }); + }); + this.streamSinks[streamId].sinkCapability.reject(wrapReason(data.reason)); + this.streamSinks[streamId].isCancelled = true; + delete this.streamSinks[streamId]; + break; + + default: + throw new Error("Unexpected stream case"); + } + } + + async _deleteStreamController(streamId) { + await Promise.allSettled([this.streamControllers[streamId].startCall, this.streamControllers[streamId].pullCall, this.streamControllers[streamId].cancelCall].map(function (capability) { + return capability && capability.promise; + })); + delete this.streamControllers[streamId]; + } + + _postMessage(message, transfers) { + if (transfers && this.postMessageTransfers) { + this.comObj.postMessage(message, transfers); + } else { + this.comObj.postMessage(message); + } + } + + destroy() { + this.comObj.removeEventListener("message", this._onComObjOnMessage); + } + +} + +exports.MessageHandler = MessageHandler; + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFWorkerStream = void 0; + +var _util = __w_pdfjs_require__(2); + +class PDFWorkerStream { + constructor(msgHandler) { + this._msgHandler = msgHandler; + this._contentLength = null; + this._fullRequestReader = null; + this._rangeRequestReaders = []; + } + + getFullReader() { + (0, _util.assert)(!this._fullRequestReader, "PDFWorkerStream.getFullReader can only be called once."); + this._fullRequestReader = new PDFWorkerStreamReader(this._msgHandler); + return this._fullRequestReader; + } + + getRangeReader(begin, end) { + const reader = new PDFWorkerStreamRangeReader(begin, end, this._msgHandler); + + this._rangeRequestReaders.push(reader); + + return reader; + } + + cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } + + const readers = this._rangeRequestReaders.slice(0); + + readers.forEach(function (reader) { + reader.cancel(reason); + }); + } + +} + +exports.PDFWorkerStream = PDFWorkerStream; + +class PDFWorkerStreamReader { + constructor(msgHandler) { + this._msgHandler = msgHandler; + this.onProgress = null; + this._contentLength = null; + this._isRangeSupported = false; + this._isStreamingSupported = false; + + const readableStream = this._msgHandler.sendWithStream("GetReader"); + + this._reader = readableStream.getReader(); + this._headersReady = this._msgHandler.sendWithPromise("ReaderHeadersReady").then(data => { + this._isStreamingSupported = data.isStreamingSupported; + this._isRangeSupported = data.isRangeSupported; + this._contentLength = data.contentLength; + }); + } + + get headersReady() { + return this._headersReady; + } + + get contentLength() { + return this._contentLength; + } + + get isStreamingSupported() { + return this._isStreamingSupported; + } + + get isRangeSupported() { + return this._isRangeSupported; + } + + async read() { + const { + value, + done + } = await this._reader.read(); + + if (done) { + return { + value: undefined, + done: true + }; + } + + return { + value: value.buffer, + done: false + }; + } + + cancel(reason) { + this._reader.cancel(reason); + } + +} + +class PDFWorkerStreamRangeReader { + constructor(begin, end, msgHandler) { + this._msgHandler = msgHandler; + this.onProgress = null; + + const readableStream = this._msgHandler.sendWithStream("GetRangeReader", { + begin, + end + }); + + this._reader = readableStream.getReader(); + } + + get isStreamingSupported() { + return false; + } + + async read() { + const { + value, + done + } = await this._reader.read(); + + if (done) { + return { + value: undefined, + done: true + }; + } + + return { + value: value.buffer, + done: false + }; + } + + cancel(reason) { + this._reader.cancel(reason); + } + +} + +/***/ }) +/******/ ]); +}); +//# sourceMappingURL=pdf.worker.js.map \ No newline at end of file diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/78-EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/78-EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/78-EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/78-EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/78-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/78-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/78-RKSJ-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/78-RKSJ-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/78-RKSJ-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/78-RKSJ-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/78-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/78-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/78ms-RKSJ-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/78ms-RKSJ-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/78ms-RKSJ-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/78ms-RKSJ-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/83pv-RKSJ-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/83pv-RKSJ-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/90ms-RKSJ-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/90ms-RKSJ-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/90ms-RKSJ-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/90ms-RKSJ-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/90msp-RKSJ-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/90msp-RKSJ-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/90msp-RKSJ-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/90msp-RKSJ-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/90pv-RKSJ-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/90pv-RKSJ-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/90pv-RKSJ-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/90pv-RKSJ-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Add-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Add-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Add-RKSJ-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Add-RKSJ-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Add-RKSJ-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Add-RKSJ-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Add-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Add-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-0.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-0.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-1.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-1.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-2.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-2.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-3.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-3.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-4.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-4.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-5.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-5.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-6.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-6.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-0.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-0.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-1.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-1.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-2.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-2.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-3.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-3.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-4.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-4.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-5.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-5.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-UCS2.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-GB1-UCS2.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-0.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-0.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-1.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-1.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-2.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-2.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-3.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-3.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-4.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-4.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-5.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-5.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-6.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-6.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-UCS2.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Japan1-UCS2.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Korea1-0.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Korea1-0.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Korea1-1.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Korea1-1.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Korea1-2.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Korea1-2.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Korea1-UCS2.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Adobe-Korea1-UCS2.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/B5-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/B5-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/B5-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/B5-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/B5pc-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/B5pc-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/B5pc-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/B5pc-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS-EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS-EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS-EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS-EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS1-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS1-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS1-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS1-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS2-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS2-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS2-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/CNS2-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/ETHK-B5-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/ETHK-B5-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/ETHK-B5-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/ETHK-B5-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/ETen-B5-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/ETen-B5-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/ETen-B5-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/ETen-B5-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/ETenms-B5-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/ETenms-B5-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/ETenms-B5-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/ETenms-B5-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Ext-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Ext-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Ext-RKSJ-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Ext-RKSJ-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Ext-RKSJ-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Ext-RKSJ-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Ext-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Ext-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GB-EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GB-EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GB-EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GB-EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GB-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GB-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GB-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GB-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBK-EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBK-EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBK-EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBK-EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBK2K-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBK2K-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBK2K-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBK2K-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBKp-EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBKp-EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBKp-EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBKp-EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBT-EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBT-EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBT-EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBT-EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBT-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBT-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBT-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBT-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBTpc-EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBTpc-EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBTpc-EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBTpc-EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBpc-EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBpc-EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/GBpc-EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/GBpc-EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKdla-B5-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKdla-B5-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKdla-B5-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKdla-B5-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKdlb-B5-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKdlb-B5-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKdlb-B5-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKdlb-B5-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKgccs-B5-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKgccs-B5-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKgccs-B5-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKgccs-B5-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKm314-B5-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKm314-B5-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKm314-B5-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKm314-B5-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKm471-B5-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKm471-B5-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKm471-B5-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKm471-B5-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKscs-B5-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKscs-B5-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/HKscs-B5-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/HKscs-B5-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Hankaku.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Hankaku.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Hiragana.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Hiragana.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-Johab-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-Johab-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-Johab-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-Johab-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCms-UHC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCms-UHC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCms-UHC-HW-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCms-UHC-HW-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCms-UHC-HW-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCms-UHC-HW-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCms-UHC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCms-UHC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCpc-EUC-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCpc-EUC-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCpc-EUC-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/KSCpc-EUC-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Katakana.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Katakana.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/LICENSE b/src/main/resources/static/plugins/pdfjs/web/cmaps/LICENSE new file mode 100644 index 0000000..b1ad168 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/cmaps/LICENSE @@ -0,0 +1,36 @@ +%%Copyright: ----------------------------------------------------------- +%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated. +%%Copyright: All rights reserved. +%%Copyright: +%%Copyright: Redistribution and use in source and binary forms, with or +%%Copyright: without modification, are permitted provided that the +%%Copyright: following conditions are met: +%%Copyright: +%%Copyright: Redistributions of source code must retain the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer. +%%Copyright: +%%Copyright: Redistributions in binary form must reproduce the above +%%Copyright: copyright notice, this list of conditions and the following +%%Copyright: disclaimer in the documentation and/or other materials +%%Copyright: provided with the distribution. +%%Copyright: +%%Copyright: Neither the name of Adobe Systems Incorporated nor the names +%%Copyright: of its contributors may be used to endorse or promote +%%Copyright: products derived from this software without specific prior +%%Copyright: written permission. +%%Copyright: +%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%%Copyright: ----------------------------------------------------------- diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/NWP-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/NWP-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/NWP-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/NWP-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/RKSJ-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/RKSJ-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/RKSJ-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/RKSJ-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/Roman.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/Roman.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UCS2-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UCS2-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UCS2-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UCS2-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF16-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF16-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF16-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF16-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF32-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF32-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF32-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF32-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF8-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF8-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF8-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniCNS-UTF8-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UCS2-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UCS2-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UCS2-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UCS2-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF16-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF16-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF16-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF16-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF32-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF32-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF32-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF32-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF8-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF8-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF8-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniGB-UTF8-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UCS2-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UCS2-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UCS2-HW-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UCS2-HW-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UCS2-HW-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UCS2-HW-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UCS2-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UCS2-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF16-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF16-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF16-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF16-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF32-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF32-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF32-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF32-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF8-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF8-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF8-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS-UTF8-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF16-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF16-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF16-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF16-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF32-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF32-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF32-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF32-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF8-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF8-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF8-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJIS2004-UTF8-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISPro-UCS2-HW-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISPro-UCS2-HW-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISPro-UCS2-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISPro-UCS2-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISPro-UTF8-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISPro-UTF8-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISX0213-UTF32-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISX0213-UTF32-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISX0213-UTF32-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISX0213-UTF32-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISX02132004-UTF32-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISX02132004-UTF32-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISX02132004-UTF32-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniJISX02132004-UTF32-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UCS2-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UCS2-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UCS2-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UCS2-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF16-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF16-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF16-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF16-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF32-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF32-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF32-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF32-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF8-H.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF8-H.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF8-V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/UniKS-UTF8-V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/V.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/V.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/cmaps/WP-Symbol.bcmap b/src/main/resources/static/plugins/pdfjs/web/cmaps/WP-Symbol.bcmap new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/debugger.js b/src/main/resources/static/plugins/pdfjs/web/debugger.js new file mode 100644 index 0000000..500522d --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/debugger.js @@ -0,0 +1,624 @@ +/* Copyright 2012 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* eslint-disable no-var */ + +"use strict"; + +var FontInspector = (function FontInspectorClosure() { + var fonts; + var active = false; + var fontAttribute = "data-font-name"; + function removeSelection() { + const divs = document.querySelectorAll(`span[${fontAttribute}]`); + for (const div of divs) { + div.className = ""; + } + } + function resetSelection() { + const divs = document.querySelectorAll(`span[${fontAttribute}]`); + for (const div of divs) { + div.className = "debuggerHideText"; + } + } + function selectFont(fontName, show) { + const divs = document.querySelectorAll( + `span[${fontAttribute}=${fontName}]` + ); + for (const div of divs) { + div.className = show ? "debuggerShowText" : "debuggerHideText"; + } + } + function textLayerClick(e) { + if ( + !e.target.dataset.fontName || + e.target.tagName.toUpperCase() !== "SPAN" + ) { + return; + } + var fontName = e.target.dataset.fontName; + var selects = document.getElementsByTagName("input"); + for (var i = 0; i < selects.length; ++i) { + var select = selects[i]; + if (select.dataset.fontName !== fontName) { + continue; + } + select.checked = !select.checked; + selectFont(fontName, select.checked); + select.scrollIntoView(); + } + } + return { + // Properties/functions needed by PDFBug. + id: "FontInspector", + name: "Font Inspector", + panel: null, + manager: null, + init: function init(pdfjsLib) { + var panel = this.panel; + var tmp = document.createElement("button"); + tmp.addEventListener("click", resetSelection); + tmp.textContent = "Refresh"; + panel.appendChild(tmp); + + fonts = document.createElement("div"); + panel.appendChild(fonts); + }, + cleanup: function cleanup() { + fonts.textContent = ""; + }, + enabled: false, + get active() { + return active; + }, + set active(value) { + active = value; + if (active) { + document.body.addEventListener("click", textLayerClick, true); + resetSelection(); + } else { + document.body.removeEventListener("click", textLayerClick, true); + removeSelection(); + } + }, + // FontInspector specific functions. + fontAdded: function fontAdded(fontObj, url) { + function properties(obj, list) { + var moreInfo = document.createElement("table"); + for (var i = 0; i < list.length; i++) { + var tr = document.createElement("tr"); + var td1 = document.createElement("td"); + td1.textContent = list[i]; + tr.appendChild(td1); + var td2 = document.createElement("td"); + td2.textContent = obj[list[i]].toString(); + tr.appendChild(td2); + moreInfo.appendChild(tr); + } + return moreInfo; + } + var moreInfo = properties(fontObj, ["name", "type"]); + const fontName = fontObj.loadedName; + var font = document.createElement("div"); + var name = document.createElement("span"); + name.textContent = fontName; + var download = document.createElement("a"); + if (url) { + url = /url\(['"]?([^\)"']+)/.exec(url); + download.href = url[1]; + } else if (fontObj.data) { + download.href = URL.createObjectURL( + new Blob([fontObj.data], { type: fontObj.mimeType }) + ); + } + download.textContent = "Download"; + var logIt = document.createElement("a"); + logIt.href = ""; + logIt.textContent = "Log"; + logIt.addEventListener("click", function (event) { + event.preventDefault(); + console.log(fontObj); + }); + const select = document.createElement("input"); + select.setAttribute("type", "checkbox"); + select.dataset.fontName = fontName; + select.addEventListener("click", function () { + selectFont(fontName, select.checked); + }); + font.appendChild(select); + font.appendChild(name); + font.appendChild(document.createTextNode(" ")); + font.appendChild(download); + font.appendChild(document.createTextNode(" ")); + font.appendChild(logIt); + font.appendChild(moreInfo); + fonts.appendChild(font); + // Somewhat of a hack, should probably add a hook for when the text layer + // is done rendering. + setTimeout(() => { + if (this.active) { + resetSelection(); + } + }, 2000); + }, + }; +})(); + +var opMap; + +// Manages all the page steppers. +var StepperManager = (function StepperManagerClosure() { + var steppers = []; + var stepperDiv = null; + var stepperControls = null; + var stepperChooser = null; + var breakPoints = Object.create(null); + return { + // Properties/functions needed by PDFBug. + id: "Stepper", + name: "Stepper", + panel: null, + manager: null, + init: function init(pdfjsLib) { + var self = this; + stepperControls = document.createElement("div"); + stepperChooser = document.createElement("select"); + stepperChooser.addEventListener("change", function (event) { + self.selectStepper(this.value); + }); + stepperControls.appendChild(stepperChooser); + stepperDiv = document.createElement("div"); + this.panel.appendChild(stepperControls); + this.panel.appendChild(stepperDiv); + if (sessionStorage.getItem("pdfjsBreakPoints")) { + breakPoints = JSON.parse(sessionStorage.getItem("pdfjsBreakPoints")); + } + + opMap = Object.create(null); + for (var key in pdfjsLib.OPS) { + opMap[pdfjsLib.OPS[key]] = key; + } + }, + cleanup: function cleanup() { + stepperChooser.textContent = ""; + stepperDiv.textContent = ""; + steppers = []; + }, + enabled: false, + active: false, + // Stepper specific functions. + create: function create(pageIndex) { + var debug = document.createElement("div"); + debug.id = "stepper" + pageIndex; + debug.setAttribute("hidden", true); + debug.className = "stepper"; + stepperDiv.appendChild(debug); + var b = document.createElement("option"); + b.textContent = "Page " + (pageIndex + 1); + b.value = pageIndex; + stepperChooser.appendChild(b); + var initBreakPoints = breakPoints[pageIndex] || []; + var stepper = new Stepper(debug, pageIndex, initBreakPoints); + steppers.push(stepper); + if (steppers.length === 1) { + this.selectStepper(pageIndex, false); + } + return stepper; + }, + selectStepper: function selectStepper(pageIndex, selectPanel) { + var i; + pageIndex = pageIndex | 0; + if (selectPanel) { + this.manager.selectPanel(this); + } + for (i = 0; i < steppers.length; ++i) { + var stepper = steppers[i]; + if (stepper.pageIndex === pageIndex) { + stepper.panel.removeAttribute("hidden"); + } else { + stepper.panel.setAttribute("hidden", true); + } + } + var options = stepperChooser.options; + for (i = 0; i < options.length; ++i) { + var option = options[i]; + option.selected = (option.value | 0) === pageIndex; + } + }, + saveBreakPoints: function saveBreakPoints(pageIndex, bps) { + breakPoints[pageIndex] = bps; + sessionStorage.setItem("pdfjsBreakPoints", JSON.stringify(breakPoints)); + }, + }; +})(); + +// The stepper for each page's IRQueue. +var Stepper = (function StepperClosure() { + // Shorter way to create element and optionally set textContent. + function c(tag, textContent) { + var d = document.createElement(tag); + if (textContent) { + d.textContent = textContent; + } + return d; + } + + function simplifyArgs(args) { + if (typeof args === "string") { + var MAX_STRING_LENGTH = 75; + return args.length <= MAX_STRING_LENGTH + ? args + : args.substring(0, MAX_STRING_LENGTH) + "..."; + } + if (typeof args !== "object" || args === null) { + return args; + } + if ("length" in args) { + // array + var simpleArgs = [], + i, + ii; + var MAX_ITEMS = 10; + for (i = 0, ii = Math.min(MAX_ITEMS, args.length); i < ii; i++) { + simpleArgs.push(simplifyArgs(args[i])); + } + if (i < args.length) { + simpleArgs.push("..."); + } + return simpleArgs; + } + var simpleObj = {}; + for (var key in args) { + simpleObj[key] = simplifyArgs(args[key]); + } + return simpleObj; + } + + // eslint-disable-next-line no-shadow + function Stepper(panel, pageIndex, initialBreakPoints) { + this.panel = panel; + this.breakPoint = 0; + this.nextBreakPoint = null; + this.pageIndex = pageIndex; + this.breakPoints = initialBreakPoints; + this.currentIdx = -1; + this.operatorListIdx = 0; + } + Stepper.prototype = { + init: function init(operatorList) { + var panel = this.panel; + var content = c("div", "c=continue, s=step"); + var table = c("table"); + content.appendChild(table); + table.cellSpacing = 0; + var headerRow = c("tr"); + table.appendChild(headerRow); + headerRow.appendChild(c("th", "Break")); + headerRow.appendChild(c("th", "Idx")); + headerRow.appendChild(c("th", "fn")); + headerRow.appendChild(c("th", "args")); + panel.appendChild(content); + this.table = table; + this.updateOperatorList(operatorList); + }, + updateOperatorList: function updateOperatorList(operatorList) { + var self = this; + + function cboxOnClick() { + var x = +this.dataset.idx; + if (this.checked) { + self.breakPoints.push(x); + } else { + self.breakPoints.splice(self.breakPoints.indexOf(x), 1); + } + StepperManager.saveBreakPoints(self.pageIndex, self.breakPoints); + } + + var MAX_OPERATORS_COUNT = 15000; + if (this.operatorListIdx > MAX_OPERATORS_COUNT) { + return; + } + + var chunk = document.createDocumentFragment(); + var operatorsToDisplay = Math.min( + MAX_OPERATORS_COUNT, + operatorList.fnArray.length + ); + for (var i = this.operatorListIdx; i < operatorsToDisplay; i++) { + var line = c("tr"); + line.className = "line"; + line.dataset.idx = i; + chunk.appendChild(line); + var checked = this.breakPoints.includes(i); + var args = operatorList.argsArray[i] || []; + + var breakCell = c("td"); + var cbox = c("input"); + cbox.type = "checkbox"; + cbox.className = "points"; + cbox.checked = checked; + cbox.dataset.idx = i; + cbox.onclick = cboxOnClick; + + breakCell.appendChild(cbox); + line.appendChild(breakCell); + line.appendChild(c("td", i.toString())); + var fn = opMap[operatorList.fnArray[i]]; + var decArgs = args; + if (fn === "showText") { + var glyphs = args[0]; + var newArgs = []; + var str = []; + for (var j = 0; j < glyphs.length; j++) { + var glyph = glyphs[j]; + if (typeof glyph === "object" && glyph !== null) { + str.push(glyph.fontChar); + } else { + if (str.length > 0) { + newArgs.push(str.join("")); + str = []; + } + newArgs.push(glyph); // null or number + } + } + if (str.length > 0) { + newArgs.push(str.join("")); + } + decArgs = [newArgs]; + } + line.appendChild(c("td", fn)); + line.appendChild(c("td", JSON.stringify(simplifyArgs(decArgs)))); + } + if (operatorsToDisplay < operatorList.fnArray.length) { + line = c("tr"); + var lastCell = c("td", "..."); + lastCell.colspan = 4; + chunk.appendChild(lastCell); + } + this.operatorListIdx = operatorList.fnArray.length; + this.table.appendChild(chunk); + }, + getNextBreakPoint: function getNextBreakPoint() { + this.breakPoints.sort(function (a, b) { + return a - b; + }); + for (var i = 0; i < this.breakPoints.length; i++) { + if (this.breakPoints[i] > this.currentIdx) { + return this.breakPoints[i]; + } + } + return null; + }, + breakIt: function breakIt(idx, callback) { + StepperManager.selectStepper(this.pageIndex, true); + var self = this; + var dom = document; + self.currentIdx = idx; + var listener = function (e) { + switch (e.keyCode) { + case 83: // step + dom.removeEventListener("keydown", listener); + self.nextBreakPoint = self.currentIdx + 1; + self.goTo(-1); + callback(); + break; + case 67: // continue + dom.removeEventListener("keydown", listener); + var breakPoint = self.getNextBreakPoint(); + self.nextBreakPoint = breakPoint; + self.goTo(-1); + callback(); + break; + } + }; + dom.addEventListener("keydown", listener); + self.goTo(idx); + }, + goTo: function goTo(idx) { + var allRows = this.panel.getElementsByClassName("line"); + for (var x = 0, xx = allRows.length; x < xx; ++x) { + var row = allRows[x]; + if ((row.dataset.idx | 0) === idx) { + row.style.backgroundColor = "rgb(251,250,207)"; + row.scrollIntoView(); + } else { + row.style.backgroundColor = null; + } + } + }, + }; + return Stepper; +})(); + +var Stats = (function Stats() { + var stats = []; + function clear(node) { + while (node.hasChildNodes()) { + node.removeChild(node.lastChild); + } + } + function getStatIndex(pageNumber) { + for (var i = 0, ii = stats.length; i < ii; ++i) { + if (stats[i].pageNumber === pageNumber) { + return i; + } + } + return false; + } + return { + // Properties/functions needed by PDFBug. + id: "Stats", + name: "Stats", + panel: null, + manager: null, + init(pdfjsLib) {}, + enabled: false, + active: false, + // Stats specific functions. + add(pageNumber, stat) { + if (!stat) { + return; + } + var statsIndex = getStatIndex(pageNumber); + if (statsIndex !== false) { + const b = stats[statsIndex]; + this.panel.removeChild(b.div); + stats.splice(statsIndex, 1); + } + var wrapper = document.createElement("div"); + wrapper.className = "stats"; + var title = document.createElement("div"); + title.className = "title"; + title.textContent = "Page: " + pageNumber; + var statsDiv = document.createElement("div"); + statsDiv.textContent = stat.toString(); + wrapper.appendChild(title); + wrapper.appendChild(statsDiv); + stats.push({ pageNumber, div: wrapper }); + stats.sort(function (a, b) { + return a.pageNumber - b.pageNumber; + }); + clear(this.panel); + for (var i = 0, ii = stats.length; i < ii; ++i) { + this.panel.appendChild(stats[i].div); + } + }, + cleanup() { + stats = []; + clear(this.panel); + }, + }; +})(); + +// Manages all the debugging tools. +window.PDFBug = (function PDFBugClosure() { + var panelWidth = 300; + var buttons = []; + var activePanel = null; + + return { + tools: [FontInspector, StepperManager, Stats], + enable(ids) { + var all = false, + tools = this.tools; + if (ids.length === 1 && ids[0] === "all") { + all = true; + } + for (var i = 0; i < tools.length; ++i) { + var tool = tools[i]; + if (all || ids.includes(tool.id)) { + tool.enabled = true; + } + } + if (!all) { + // Sort the tools by the order they are enabled. + tools.sort(function (a, b) { + var indexA = ids.indexOf(a.id); + indexA = indexA < 0 ? tools.length : indexA; + var indexB = ids.indexOf(b.id); + indexB = indexB < 0 ? tools.length : indexB; + return indexA - indexB; + }); + } + }, + init(pdfjsLib, container) { + /* + * Basic Layout: + * PDFBug + * Controls + * Panels + * Panel + * Panel + * ... + */ + var ui = document.createElement("div"); + ui.id = "PDFBug"; + + var controls = document.createElement("div"); + controls.setAttribute("class", "controls"); + ui.appendChild(controls); + + var panels = document.createElement("div"); + panels.setAttribute("class", "panels"); + ui.appendChild(panels); + + container.appendChild(ui); + container.style.right = panelWidth + "px"; + + // Initialize all the debugging tools. + var tools = this.tools; + var self = this; + for (var i = 0; i < tools.length; ++i) { + var tool = tools[i]; + var panel = document.createElement("div"); + var panelButton = document.createElement("button"); + panelButton.textContent = tool.name; + panelButton.addEventListener( + "click", + (function (selected) { + return function (event) { + event.preventDefault(); + self.selectPanel(selected); + }; + })(i) + ); + controls.appendChild(panelButton); + panels.appendChild(panel); + tool.panel = panel; + tool.manager = this; + if (tool.enabled) { + tool.init(pdfjsLib); + } else { + panel.textContent = + tool.name + + " is disabled. To enable add " + + ' "' + + tool.id + + '" to the pdfBug parameter ' + + "and refresh (separate multiple by commas)."; + } + buttons.push(panelButton); + } + this.selectPanel(0); + }, + cleanup() { + for (var i = 0, ii = this.tools.length; i < ii; i++) { + if (this.tools[i].enabled) { + this.tools[i].cleanup(); + } + } + }, + selectPanel(index) { + if (typeof index !== "number") { + index = this.tools.indexOf(index); + } + if (index === activePanel) { + return; + } + activePanel = index; + var tools = this.tools; + for (var j = 0; j < tools.length; ++j) { + if (j === index) { + buttons[j].setAttribute("class", "active"); + tools[j].active = true; + tools[j].panel.removeAttribute("hidden"); + } else { + buttons[j].setAttribute("class", ""); + tools[j].active = false; + tools[j].panel.setAttribute("hidden", "true"); + } + } + }, + }; +})(); diff --git a/src/main/resources/static/plugins/pdfjs/web/images/annotation-check.svg b/src/main/resources/static/plugins/pdfjs/web/images/annotation-check.svg new file mode 100644 index 0000000..71cd16d --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/images/annotation-check.svg @@ -0,0 +1,11 @@ + + + + diff --git a/src/main/resources/static/plugins/pdfjs/web/images/annotation-comment.svg b/src/main/resources/static/plugins/pdfjs/web/images/annotation-comment.svg new file mode 100644 index 0000000..86f1f17 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/images/annotation-comment.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/src/main/resources/static/plugins/pdfjs/web/images/annotation-help.svg b/src/main/resources/static/plugins/pdfjs/web/images/annotation-help.svg new file mode 100644 index 0000000..00938fe --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/images/annotation-help.svg @@ -0,0 +1,26 @@ + + + + + + + + + + diff --git a/src/main/resources/static/plugins/pdfjs/web/images/annotation-insert.svg b/src/main/resources/static/plugins/pdfjs/web/images/annotation-insert.svg new file mode 100644 index 0000000..519ef68 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/images/annotation-insert.svg @@ -0,0 +1,10 @@ + + + + diff --git a/src/main/resources/static/plugins/pdfjs/web/images/annotation-key.svg b/src/main/resources/static/plugins/pdfjs/web/images/annotation-key.svg new file mode 100644 index 0000000..8d09d53 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/images/annotation-key.svg @@ -0,0 +1,11 @@ + + + + diff --git a/src/main/resources/static/plugins/pdfjs/web/images/annotation-newparagraph.svg b/src/main/resources/static/plugins/pdfjs/web/images/annotation-newparagraph.svg new file mode 100644 index 0000000..38d2497 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/images/annotation-newparagraph.svg @@ -0,0 +1,11 @@ + + + + diff --git a/src/main/resources/static/plugins/pdfjs/web/images/annotation-noicon.svg b/src/main/resources/static/plugins/pdfjs/web/images/annotation-noicon.svg new file mode 100644 index 0000000..c07d108 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/images/annotation-noicon.svg @@ -0,0 +1,7 @@ + + + diff --git a/src/main/resources/static/plugins/pdfjs/web/images/annotation-note.svg b/src/main/resources/static/plugins/pdfjs/web/images/annotation-note.svg new file mode 100644 index 0000000..7017365 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/images/annotation-note.svg @@ -0,0 +1,42 @@ + + + + + + + + diff --git a/src/main/resources/static/plugins/pdfjs/web/images/annotation-paragraph.svg b/src/main/resources/static/plugins/pdfjs/web/images/annotation-paragraph.svg new file mode 100644 index 0000000..6ae5212 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/images/annotation-paragraph.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-next.png b/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-next.png new file mode 100644 index 0000000..de1d0fc Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-next.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-next@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-next@2x.png new file mode 100644 index 0000000..0250307 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-next@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-previous.png b/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-previous.png new file mode 100644 index 0000000..bef0274 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-previous.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-previous@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-previous@2x.png new file mode 100644 index 0000000..1da6dc9 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/findbarButton-previous@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/grab.cur b/src/main/resources/static/plugins/pdfjs/web/images/grab.cur new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/images/grabbing.cur b/src/main/resources/static/plugins/pdfjs/web/images/grabbing.cur new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/plugins/pdfjs/web/images/loading-icon.gif b/src/main/resources/static/plugins/pdfjs/web/images/loading-icon.gif new file mode 100644 index 0000000..1c72ebb Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/loading-icon.gif differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/loading-small.png b/src/main/resources/static/plugins/pdfjs/web/images/loading-small.png new file mode 100644 index 0000000..8831a80 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/loading-small.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/loading-small@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/loading-small@2x.png new file mode 100644 index 0000000..b25b445 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/loading-small@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-documentProperties.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-documentProperties.png new file mode 100644 index 0000000..40925e2 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-documentProperties.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png new file mode 100644 index 0000000..adb240e Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-firstPage.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-firstPage.png new file mode 100644 index 0000000..e68846a Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-firstPage.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png new file mode 100644 index 0000000..3ad8af5 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-handTool.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-handTool.png new file mode 100644 index 0000000..cb85a84 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-handTool.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png new file mode 100644 index 0000000..5c13f77 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-lastPage.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-lastPage.png new file mode 100644 index 0000000..be763e0 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-lastPage.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png new file mode 100644 index 0000000..8570984 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png new file mode 100644 index 0000000..675d6da Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png new file mode 100644 index 0000000..b9e7431 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCw.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCw.png new file mode 100644 index 0000000..e1c7598 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCw.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png new file mode 100644 index 0000000..cb257b4 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal.png new file mode 100644 index 0000000..cb702fc Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal@2x.png new file mode 100644 index 0000000..7f05289 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollVertical.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollVertical.png new file mode 100644 index 0000000..0b8427a Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollVertical.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollVertical@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollVertical@2x.png new file mode 100644 index 0000000..72ab55e Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollVertical@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollWrapped.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollWrapped.png new file mode 100644 index 0000000..165fc8b Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollWrapped.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollWrapped@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollWrapped@2x.png new file mode 100644 index 0000000..4246141 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-scrollWrapped@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-selectTool.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-selectTool.png new file mode 100644 index 0000000..25520a6 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-selectTool.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png new file mode 100644 index 0000000..a58aaef Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadEven.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadEven.png new file mode 100644 index 0000000..3fa07e7 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadEven.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadEven@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadEven@2x.png new file mode 100644 index 0000000..32e5033 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadEven@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadNone.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadNone.png new file mode 100644 index 0000000..1611473 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadNone.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadNone@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadNone@2x.png new file mode 100644 index 0000000..8e51cf3 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadNone@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadOdd.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadOdd.png new file mode 100644 index 0000000..5126313 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadOdd.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadOdd@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadOdd@2x.png new file mode 100644 index 0000000..5996b74 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/secondaryToolbarButton-spreadOdd@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/shadow.png b/src/main/resources/static/plugins/pdfjs/web/images/shadow.png new file mode 100644 index 0000000..31d3bdb Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/shadow.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/texture.png b/src/main/resources/static/plugins/pdfjs/web/images/texture.png new file mode 100644 index 0000000..12bae83 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/texture.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-bookmark.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-bookmark.png new file mode 100644 index 0000000..a187be6 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-bookmark.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-bookmark@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-bookmark@2x.png new file mode 100644 index 0000000..4efbaa6 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-bookmark@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-download.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-download.png new file mode 100644 index 0000000..eaab35f Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-download.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-download@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-download@2x.png new file mode 100644 index 0000000..896face Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-download@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-menuArrows.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-menuArrows.png new file mode 100644 index 0000000..e50ca4e Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-menuArrows.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-menuArrows@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-menuArrows@2x.png new file mode 100644 index 0000000..f7570bc Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-menuArrows@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-openFile.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-openFile.png new file mode 100644 index 0000000..b5cf1bd Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-openFile.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-openFile@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-openFile@2x.png new file mode 100644 index 0000000..91ab765 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-openFile@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageDown.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageDown.png new file mode 100644 index 0000000..8219ecf Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageDown.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageDown@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageDown@2x.png new file mode 100644 index 0000000..758c01d Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageDown@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageUp.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageUp.png new file mode 100644 index 0000000..fb9daa3 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageUp.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageUp@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageUp@2x.png new file mode 100644 index 0000000..a5cfd75 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-pageUp@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-presentationMode.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-presentationMode.png new file mode 100644 index 0000000..3ac2124 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-presentationMode.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-presentationMode@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-presentationMode@2x.png new file mode 100644 index 0000000..cada9e7 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-presentationMode@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-print.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-print.png new file mode 100644 index 0000000..51275e5 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-print.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-print@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-print@2x.png new file mode 100644 index 0000000..53d18da Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-print@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-search.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-search.png new file mode 100644 index 0000000..f9b7557 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-search.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-search@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-search@2x.png new file mode 100644 index 0000000..456b133 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-search@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png new file mode 100644 index 0000000..1f90f83 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png new file mode 100644 index 0000000..b066fe5 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-sidebarToggle.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-sidebarToggle.png new file mode 100644 index 0000000..025dc90 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-sidebarToggle.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png new file mode 100644 index 0000000..7f834df Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewAttachments.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewAttachments.png new file mode 100644 index 0000000..fcd0b26 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewAttachments.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewAttachments@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewAttachments@2x.png new file mode 100644 index 0000000..4a5e2b8 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewAttachments@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewOutline.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewOutline.png new file mode 100644 index 0000000..976365a Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewOutline.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewOutline@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewOutline@2x.png new file mode 100644 index 0000000..b6a197f Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewOutline@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewThumbnail.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewThumbnail.png new file mode 100644 index 0000000..584ba55 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewThumbnail.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png new file mode 100644 index 0000000..a0208b4 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomIn.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomIn.png new file mode 100644 index 0000000..513d081 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomIn.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomIn@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomIn@2x.png new file mode 100644 index 0000000..d5d49d5 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomIn@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomOut.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomOut.png new file mode 100644 index 0000000..156c26b Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomOut.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomOut@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomOut@2x.png new file mode 100644 index 0000000..959e191 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/toolbarButton-zoomOut@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/treeitem-collapsed.png b/src/main/resources/static/plugins/pdfjs/web/images/treeitem-collapsed.png new file mode 100644 index 0000000..06d4d37 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/treeitem-collapsed.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/treeitem-collapsed@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/treeitem-collapsed@2x.png new file mode 100644 index 0000000..eec1e58 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/treeitem-collapsed@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/treeitem-expanded.png b/src/main/resources/static/plugins/pdfjs/web/images/treeitem-expanded.png new file mode 100644 index 0000000..c8d5573 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/treeitem-expanded.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/images/treeitem-expanded@2x.png b/src/main/resources/static/plugins/pdfjs/web/images/treeitem-expanded@2x.png new file mode 100644 index 0000000..3b3b610 Binary files /dev/null and b/src/main/resources/static/plugins/pdfjs/web/images/treeitem-expanded@2x.png differ diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ach/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ach/viewer.properties new file mode 100644 index 0000000..57c6a91 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ach/viewer.properties @@ -0,0 +1,207 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pot buk mukato +previous_label=Mukato +next.title=Pot buk malubo +next_label=Malubo + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pot buk +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=pi {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} me {{pagesCount}}) + +zoom_out.title=Jwik Matidi +zoom_out_label=Jwik Matidi +zoom_in.title=Kwot Madit +zoom_in_label=Kwot Madit +zoom.title=Kwoti +presentation_mode.title=Lokke i kit me tyer +presentation_mode_label=Kit me tyer +open_file.title=Yab Pwail +open_file_label=Yab +print.title=Go +print_label=Go +download.title=Gam +download_label=Gam +bookmark.title=Neno ma kombedi (lok onyo yab i dirica manyen) +bookmark_label=Neno ma kombedi + +# Secondary toolbar and context menu +tools.title=Gintic +tools_label=Gintic +first_page.title=Cit i pot buk mukwongo +first_page.label=Cit i pot buk mukwongo +first_page_label=Cit i pot buk mukwongo +last_page.title=Cit i pot buk magiko +last_page.label=Cit i pot buk magiko +last_page_label=Cit i pot buk magiko +page_rotate_cw.title=Wire i tung lacuc +page_rotate_cw.label=Wire i tung lacuc +page_rotate_cw_label=Wire i tung lacuc +page_rotate_ccw.title=Wire i tung lacam +page_rotate_ccw.label=Wire i tung lacam +page_rotate_ccw_label=Wire i tung lacam + +cursor_text_select_tool.title=Cak gitic me yero coc +cursor_text_select_tool_label=Gitic me yero coc +cursor_hand_tool.title=Cak gitic me cing +cursor_hand_tool_label=Gitic cing + + + +# Document properties dialog box +document_properties.title=Jami me gin acoya… +document_properties_label=Jami me gin acoya… +document_properties_file_name=Nying pwail: +document_properties_file_size=Dit pa pwail: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Wiye: +document_properties_author=Ngat mucoyo: +document_properties_subject=Subjek: +document_properties_keywords=Lok mapire tek: +document_properties_creation_date=Nino dwe me cwec: +document_properties_modification_date=Nino dwe me yub: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Lacwec: +document_properties_producer=Layub PDF: +document_properties_version=Kit PDF: +document_properties_page_count=Kwan me pot buk: +document_properties_page_size=Dit pa potbuk: +document_properties_page_size_unit_inches=i +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=atir +document_properties_page_size_orientation_landscape=arii +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Waraga +document_properties_page_size_name_legal=Cik +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized_yes=Eyo +document_properties_linearized_no=Pe +document_properties_close=Lor + +print_progress_message=Yubo coc me agoya… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Juki + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Lok gintic ma inget +toggle_sidebar_notification.title=Lok lanyut me nget (wiyewiye tye i gin acoya/attachments) +toggle_sidebar_label=Lok gintic ma inget +document_outline.title=Nyut Wiyewiye me Gin acoya (dii-kiryo me yaro/kano jami weng) +document_outline_label=Pek pa gin acoya +attachments.title=Nyut twec +attachments_label=Twec +thumbs.title=Nyut cal +thumbs_label=Cal +findbar.title=Nong iye gin acoya +findbar_label=Nong + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pot buk {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Cal me pot buk {{page}} + +# Find panel button title and messages +find_input.title=Nong +find_input.placeholder=Nong i dokumen… +find_previous.title=Nong timme pa lok mukato +find_previous_label=Mukato +find_next.title=Nong timme pa lok malubo +find_next_label=Malubo +find_highlight=Wer weng +find_match_case_label=Lok marwate +find_reached_top=Oo iwi gin acoya, omede ki i tere +find_reached_bottom=Oo i agiki me gin acoya, omede ki iwiye +find_not_found=Lok pe ononge + +# Error panel labels +error_more_info=Ngec Mukene +error_less_info=Ngec Manok +error_close=Lor +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Kwena: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Can kikore {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Pwail: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Rek: {{line}} +rendering_error=Bal otime i kare me nyuto pot buk. + +# Predefined zoom values +page_scale_width=Lac me iye pot buk +page_scale_fit=Porre me pot buk +page_scale_auto=Kwot pire kene +page_scale_actual=Dite kikome +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Bal +loading_error=Bal otime kun cano PDF. +invalid_file_error=Pwail me PDF ma pe atir onyo obale woko. +missing_file_error=Pwail me PDF tye ka rem. +unexpected_response_error=Lagam mape kigeno pa lapok tic. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Lok angea manok] +password_label=Ket mung me donyo me yabo pwail me PDF man. +password_invalid=Mung me donyo pe atir. Tim ber i tem doki. +password_ok=OK +password_cancel=Juki + +printing_not_supported=Ciko: Layeny ma pe teno goyo liweng. +printing_not_ready=Ciko: PDF pe ocane weng me agoya. +web_fonts_disabled=Kijuko dit pa coc me kakube woko: pe romo tic ki dit pa coc me PDF ma kiketo i kine. +document_colors_not_allowed=Pe ki yee ki gin acoya me PDF me tic ki rangi gi kengi: Kijuko woko “Yee pot buk me yero rangi mamegi kengi” ki i layeny. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/af/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/af/viewer.properties new file mode 100644 index 0000000..8cf0880 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/af/viewer.properties @@ -0,0 +1,184 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Vorige bladsy +previous_label=Vorige +next.title=Volgende bladsy +next_label=Volgende + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Bladsy +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=van {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} van {{pagesCount}}) + +zoom_out.title=Zoem uit +zoom_out_label=Zoem uit +zoom_in.title=Zoem in +zoom_in_label=Zoem in +zoom.title=Zoem +presentation_mode.title=Wissel na voorleggingsmodus +presentation_mode_label=Voorleggingsmodus +open_file.title=Open lêer +open_file_label=Open +print.title=Druk +print_label=Druk +download.title=Laai af +download_label=Laai af +bookmark.title=Huidige aansig (kopieer of open in nuwe venster) +bookmark_label=Huidige aansig + +# Secondary toolbar and context menu +tools.title=Nutsgoed +tools_label=Nutsgoed +first_page.title=Gaan na eerste bladsy +first_page.label=Gaan na eerste bladsy +first_page_label=Gaan na eerste bladsy +last_page.title=Gaan na laaste bladsy +last_page.label=Gaan na laaste bladsy +last_page_label=Gaan na laaste bladsy +page_rotate_cw.title=Roteer kloksgewys +page_rotate_cw.label=Roteer kloksgewys +page_rotate_cw_label=Roteer kloksgewys +page_rotate_ccw.title=Roteer anti-kloksgewys +page_rotate_ccw.label=Roteer anti-kloksgewys +page_rotate_ccw_label=Roteer anti-kloksgewys + +cursor_text_select_tool.title=Aktiveer gereedskap om teks te merk +cursor_text_select_tool_label=Teksmerkgereedskap +cursor_hand_tool.title=Aktiveer handjie +cursor_hand_tool_label=Handjie + +# Document properties dialog box +document_properties.title=Dokumenteienskappe… +document_properties_label=Dokumenteienskappe… +document_properties_file_name=Lêernaam: +document_properties_file_size=Lêergrootte: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} kG ({{size_b}} grepe) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MG ({{size_b}} grepe) +document_properties_title=Titel: +document_properties_author=Outeur: +document_properties_subject=Onderwerp: +document_properties_keywords=Sleutelwoorde: +document_properties_creation_date=Skeppingsdatum: +document_properties_modification_date=Wysigingsdatum: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Skepper: +document_properties_producer=PDF-vervaardiger: +document_properties_version=PDF-weergawe: +document_properties_page_count=Aantal bladsye: +document_properties_close=Sluit + +print_progress_message=Berei tans dokument voor om te druk… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Kanselleer + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Sypaneel aan/af +toggle_sidebar_notification.title=Sypaneel aan/af (dokument bevat skema/aanhegsels) +toggle_sidebar_label=Sypaneel aan/af +document_outline.title=Wys dokumentskema (dubbelklik om alle items oop/toe te vou) +document_outline_label=Dokumentoorsig +attachments.title=Wys aanhegsels +attachments_label=Aanhegsels +thumbs.title=Wys duimnaels +thumbs_label=Duimnaels +findbar.title=Soek in dokument +findbar_label=Vind + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Bladsy {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Duimnael van bladsy {{page}} + +# Find panel button title and messages +find_input.title=Vind +find_input.placeholder=Soek in dokument… +find_previous.title=Vind die vorige voorkoms van die frase +find_previous_label=Vorige +find_next.title=Vind die volgende voorkoms van die frase +find_next_label=Volgende +find_highlight=Verlig almal +find_match_case_label=Kassensitief +find_reached_top=Bokant van dokument is bereik; gaan voort van onder af +find_reached_bottom=Einde van dokument is bereik; gaan voort van bo af +find_not_found=Frase nie gevind nie + +# Error panel labels +error_more_info=Meer inligting +error_less_info=Minder inligting +error_close=Sluit +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (ID: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Boodskap: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stapel: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Lêer: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Lyn: {{line}} +rendering_error='n Fout het voorgekom toe die bladsy weergegee is. + +# Predefined zoom values +page_scale_width=Bladsywydte +page_scale_fit=Pas bladsy +page_scale_auto=Outomatiese zoem +page_scale_actual=Werklike grootte +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Fout +loading_error='n Fout het voorgekom met die laai van die PDF. +invalid_file_error=Ongeldige of korrupte PDF-lêer. +missing_file_error=PDF-lêer is weg. +unexpected_response_error=Onverwagse antwoord van bediener. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}}-annotasie] +password_label=Gee die wagwoord om dié PDF-lêer mee te open. +password_invalid=Ongeldige wagwoord. Probeer gerus weer. +password_ok=OK +password_cancel=Kanselleer + +printing_not_supported=Waarskuwing: Dié blaaier ondersteun nie drukwerk ten volle nie. +printing_not_ready=Waarskuwing: Die PDF is nog nie volledig gelaai vir drukwerk nie. +web_fonts_disabled=Webfonte is gedeaktiveer: kan nie PDF-fonte wat ingebed is, gebruik nie. +document_colors_not_allowed=PDF-dokumente word nie toegelaat om hul eie kleure te gebruik nie: “Laat bladsye toe om hul eie kleure te kies” is gedeaktiveer in die blaaier. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/an/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/an/viewer.properties new file mode 100644 index 0000000..3576134 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/an/viewer.properties @@ -0,0 +1,184 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pachina anterior +previous_label=Anterior +next.title=Pachina siguient +next_label=Siguient + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pachina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Achiquir +zoom_out_label=Achiquir +zoom_in.title=Agrandir +zoom_in_label=Agrandir +zoom.title=Grandaria +presentation_mode.title=Cambear t'o modo de presentación +presentation_mode_label=Modo de presentación +open_file.title=Ubrir o fichero +open_file_label=Ubrir +print.title=Imprentar +print_label=Imprentar +download.title=Descargar +download_label=Descargar +bookmark.title=Vista actual (copiar u ubrir en una nueva finestra) +bookmark_label=Anvista actual + +# Secondary toolbar and context menu +tools.title=Ferramientas +tools_label=Ferramientas +first_page.title=Ir ta la primer pachina +first_page.label=Ir ta la primer pachina +first_page_label=Ir ta la primer pachina +last_page.title=Ir ta la zaguer pachina +last_page.label=Ir ta la zaguera pachina +last_page_label=Ir ta la zaguer pachina +page_rotate_cw.title=Chirar enta la dreita +page_rotate_cw.label=Chirar enta la dreita +page_rotate_cw_label=Chira enta la dreita +page_rotate_ccw.title=Chirar enta la zurda +page_rotate_ccw.label=Chirar en sentiu antihorario +page_rotate_ccw_label=Chirar enta la zurda + +cursor_text_select_tool.title=Activar la ferramienta de selección de texto +cursor_text_select_tool_label=Ferramienta de selección de texto +cursor_hand_tool.title=Activar la ferramienta man +cursor_hand_tool_label=Ferramienta man + +# Document properties dialog box +document_properties.title=Propiedatz d'o documento... +document_properties_label=Propiedatz d'o documento... +document_properties_file_name=Nombre de fichero: +document_properties_file_size=Grandaria d'o fichero: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Titol: +document_properties_author=Autor: +document_properties_subject=Afer: +document_properties_keywords=Parolas clau: +document_properties_creation_date=Calendata de creyación: +document_properties_modification_date=Calendata de modificación: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creyador: +document_properties_producer=Creyador de PDF: +document_properties_version=Versión de PDF: +document_properties_page_count=Numero de pachinas: +document_properties_close=Zarrar + +print_progress_message=Se ye preparando la documentación pa imprentar… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Amostrar u amagar a barra lateral +toggle_sidebar_notification.title=Cambiar barra lateral (lo documento contiene esquema/adchuntos) +toggle_sidebar_label=Amostrar a barra lateral +document_outline.title=Amostrar esquema d'o documento (fer doble clic pa expandir/compactar totz los items) +document_outline_label=Esquema d'o documento +attachments.title=Amostrar os adchuntos +attachments_label=Adchuntos +thumbs.title=Amostrar as miniaturas +thumbs_label=Miniaturas +findbar.title=Trobar en o documento +findbar_label=Trobar + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pachina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura d'a pachina {{page}} + +# Find panel button title and messages +find_input.title=Trobar +find_input.placeholder=Trobar en o documento… +find_previous.title=Trobar l'anterior coincidencia d'a frase +find_previous_label=Anterior +find_next.title=Trobar a siguient coincidencia d'a frase +find_next_label=Siguient +find_highlight=Resaltar-lo tot +find_match_case_label=Coincidencia de mayusclas/minusclas +find_reached_top=S'ha plegau a l'inicio d'o documento, se contina dende baixo +find_reached_bottom=S'ha plegau a la fin d'o documento, se contina dende alto +find_not_found=No s'ha trobau a frase + +# Error panel labels +error_more_info=Mas información +error_less_info=Menos información +error_close=Zarrar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensache: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fichero: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linia: {{line}} +rendering_error=Ha ocurriu una error en renderizar a pachina. + +# Predefined zoom values +page_scale_width=Amplaria d'a pachina +page_scale_fit=Achuste d'a pachina +page_scale_auto=Grandaria automatica +page_scale_actual=Grandaria actual +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=S'ha produciu una error en cargar o PDF. +invalid_file_error=O PDF no ye valido u ye estorbau. +missing_file_error=No i ha fichero PDF. +unexpected_response_error=Respuesta a lo servicio inasperada. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotación {{type}}] +password_label=Introduzca a clau ta ubrir iste fichero PDF. +password_invalid=Clau invalida. Torna a intentar-lo. +password_ok=Acceptar +password_cancel=Cancelar + +printing_not_supported=Pare cuenta: Iste navegador no maneya totalment as impresions. +printing_not_ready=Aviso: Encara no se ha cargau completament o PDF ta imprentar-lo. +web_fonts_disabled=As fuents web son desactivadas: no se puet incrustar fichers PDF. +document_colors_not_allowed=Los documentos PDF no pueden fer servir las suyas propias colors: 'Permitir que as pachinas triguen as suyas propias colors' ye desactivau en o navegador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ar/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ar/viewer.properties new file mode 100644 index 0000000..b42ba74 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ar/viewer.properties @@ -0,0 +1,246 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=الصفحة السابقة +previous_label=السابقة +next.title=الصفحة التالية +next_label=التالية + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=صفحة +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=من {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} من {{pagesCount}}) + +zoom_out.title=بعّد +zoom_out_label=بعّد +zoom_in.title=قرّب +zoom_in_label=قرّب +zoom.title=التقريب +presentation_mode.title=انتقل لوضع العرض التقديمي +presentation_mode_label=وضع العرض التقديمي +open_file.title=افتح ملفًا +open_file_label=افتح +print.title=اطبع +print_label=اطبع +download.title=نزّل +download_label=نزّل +bookmark.title=المنظور الحالي (انسخ أو افتح في نافذة جديدة) +bookmark_label=المنظور الحالي + +# Secondary toolbar and context menu +tools.title=الأدوات +tools_label=الأدوات +first_page.title=اذهب إلى الصفحة الأولى +first_page.label=اذهب إلى الصفحة الأولى +first_page_label=اذهب إلى الصفحة الأولى +last_page.title=اذهب إلى الصفحة الأخيرة +last_page.label=اذهب إلى الصفحة الأخيرة +last_page_label=اذهب إلى الصفحة الأخيرة +page_rotate_cw.title=أدر باتجاه عقارب الساعة +page_rotate_cw.label=أدر باتجاه عقارب الساعة +page_rotate_cw_label=أدر باتجاه عقارب الساعة +page_rotate_ccw.title=أدر بعكس اتجاه عقارب الساعة +page_rotate_ccw.label=أدر بعكس اتجاه عقارب الساعة +page_rotate_ccw_label=أدر بعكس اتجاه عقارب الساعة + +cursor_text_select_tool.title=فعّل أداة اختيار النص +cursor_text_select_tool_label=أداة اختيار النص +cursor_hand_tool.title=فعّل أداة اليد +cursor_hand_tool_label=أداة اليد + +scroll_vertical.title=استخدم التمرير الرأسي +scroll_vertical_label=التمرير الرأسي +scroll_horizontal.title=استخدم التمرير الأفقي +scroll_horizontal_label=التمرير الأفقي +scroll_wrapped.title=استخدم التمرير الملتف +scroll_wrapped_label=التمرير الملتف + +spread_none.title=لا تدمج هوامش الصفحات مع بعضها البعض +spread_none_label=بلا هوامش +spread_odd.title=ادمج هوامش الصفحات الفردية +spread_odd_label=هوامش الصفحات الفردية +spread_even.title=ادمج هوامش الصفحات الزوجية +spread_even_label=هوامش الصفحات الزوجية + +# Document properties dialog box +document_properties.title=خصائص المستند… +document_properties_label=خصائص المستند… +document_properties_file_name=اسم الملف: +document_properties_file_size=حجم الملف: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} ك.بايت ({{size_b}} بايت) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} م.بايت ({{size_b}} بايت) +document_properties_title=العنوان: +document_properties_author=المؤلف: +document_properties_subject=الموضوع: +document_properties_keywords=الكلمات الأساسية: +document_properties_creation_date=تاريخ الإنشاء: +document_properties_modification_date=تاريخ التعديل: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}، {{time}} +document_properties_creator=المنشئ: +document_properties_producer=منتج PDF: +document_properties_version=إصدارة PDF: +document_properties_page_count=عدد الصفحات: +document_properties_page_size=مقاس الورقة: +document_properties_page_size_unit_inches=بوصة +document_properties_page_size_unit_millimeters=ملم +document_properties_page_size_orientation_portrait=طوليّ +document_properties_page_size_orientation_landscape=عرضيّ +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=خطاب +document_properties_page_size_name_legal=قانونيّ +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string=‏{{width}} × ‏{{height}} ‏{{unit}} (‏{{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string=‏{{width}} × ‏{{height}} ‏{{unit}} (‏{{name}}، {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=العرض السريع عبر الوِب: +document_properties_linearized_yes=نعم +document_properties_linearized_no=لا +document_properties_close=أغلق + +print_progress_message=يُحضّر المستند للطباعة… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}٪ +print_progress_close=ألغِ + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=بدّل ظهور الشريط الجانبي +toggle_sidebar_notification.title=بدّل ظهور الشريط الجانبي (يحتوي المستند على مخطط أو مرفقات) +toggle_sidebar_label=بدّل ظهور الشريط الجانبي +document_outline.title=اعرض فهرس المستند (نقر مزدوج لتمديد أو تقليص كل العناصر) +document_outline_label=مخطط المستند +attachments.title=اعرض المرفقات +attachments_label=المُرفقات +thumbs.title=اعرض مُصغرات +thumbs_label=مُصغّرات +findbar.title=ابحث في المستند +findbar_label=ابحث + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=صفحة {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=مصغّرة صفحة {{page}} + +# Find panel button title and messages +find_input.title=ابحث +find_input.placeholder=ابحث في المستند… +find_previous.title=ابحث عن التّواجد السّابق للعبارة +find_previous_label=السابق +find_next.title=ابحث عن التّواجد التّالي للعبارة +find_next_label=التالي +find_highlight=أبرِز الكل +find_match_case_label=طابق حالة الأحرف +find_entire_word_label=كلمات كاملة +find_reached_top=تابعت من الأسفل بعدما وصلت إلى بداية المستند +find_reached_bottom=تابعت من الأعلى بعدما وصلت إلى نهاية المستند +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} من أصل مطابقة واحدة +find_match_count[two]={{current}} من أصل مطابقتين +find_match_count[few]={{current}} من أصل {{total}} مطابقات +find_match_count[many]={{current}} من أصل {{total}} مطابقة +find_match_count[other]={{current}} من أصل {{total}} مطابقة +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=فقط +find_match_count_limit[one]=أكثر من مطابقة واحدة +find_match_count_limit[two]=أكثر من مطابقتين +find_match_count_limit[few]=أكثر من {{limit}} مطابقات +find_match_count_limit[many]=أكثر من {{limit}} مطابقة +find_match_count_limit[other]=أكثر من {{limit}} مطابقة +find_not_found=لا وجود للعبارة + +# Error panel labels +error_more_info=معلومات أكثر +error_less_info=معلومات أقل +error_close=أغلق +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=‏PDF.js ن{{version}} ‏(بناء: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=الرسالة: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=الرصّة: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=الملف: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=السطر: {{line}} +rendering_error=حدث خطأ أثناء عرض الصفحة. + +# Predefined zoom values +page_scale_width=عرض الصفحة +page_scale_fit=ملائمة الصفحة +page_scale_auto=تقريب تلقائي +page_scale_actual=الحجم الفعلي +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}٪ + +# Loading indicator messages +loading_error_indicator=عطل +loading_error=حدث عطل أثناء تحميل ملف PDF. +invalid_file_error=ملف PDF تالف أو غير صحيح. +missing_file_error=ملف PDF غير موجود. +unexpected_response_error=استجابة خادوم غير متوقعة. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}، {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[تعليق {{type}}] +password_label=أدخل لكلمة السر لفتح هذا الملف. +password_invalid=كلمة سر خطأ. من فضلك أعد المحاولة. +password_ok=حسنا +password_cancel=ألغِ + +printing_not_supported=تحذير: لا يدعم هذا المتصفح الطباعة بشكل كامل. +printing_not_ready=تحذير: ملف PDF لم يُحمّل كاملًا للطباعة. +web_fonts_disabled=خطوط الوب مُعطّلة: تعذّر استخدام خطوط PDF المُضمّنة. +document_colors_not_allowed=ليس مسموحًا لملفات PDF باستخدام ألوانها الخاصة: خيار ”اسمح للصفحات باختيار ألوانها الخاصة“ ليس مُفعّلًا في المتصفح. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ast/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ast/viewer.properties new file mode 100644 index 0000000..db66a56 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ast/viewer.properties @@ -0,0 +1,207 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Páxina anterior +previous_label=Anterior +next.title=Páxina siguiente +next_label=Siguiente + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Páxina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Reducir +zoom_out_label=Reducir +zoom_in.title=Aumentar +zoom_in_label=Aumentar +zoom.title=Tamañu +open_file.title=Abrir ficheru +open_file_label=Abrir +print.title=Imprentar +print_label=Imprentar +download.title=Descargar +download_label=Descargar +bookmark.title=Vista actual (copiar o abrir nuna nueva ventana) +bookmark_label=Vista actual + +# Secondary toolbar and context menu +tools.title=Ferramientes +tools_label=Ferramientes +first_page.title=Dir a la primer páxina +first_page.label=Dir a la primer páxina +first_page_label=Dir a la primer páxina +last_page.title=Dir a la postrer páxina +last_page.label=Dir a la cabera páxina +last_page_label=Dir a la postrer páxina +page_rotate_cw.title=Xirar en sen horariu +page_rotate_cw_label=Xirar en sen horariu +page_rotate_ccw.title=Xirar en sen antihorariu +page_rotate_ccw_label=Xirar en sen antihorariu + + +scroll_vertical_label=Desplazamientu vertical +scroll_horizontal_label=Desplazamientu horizontal + + +# Document properties dialog box +document_properties.title=Propiedaes del documentu… +document_properties_label=Propiedaes del documentu… +document_properties_file_name=Nome de ficheru: +document_properties_file_size=Tamañu de ficheru: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Títulu: +document_properties_author=Autor: +document_properties_subject=Asuntu: +document_properties_keywords=Pallabres clave: +document_properties_creation_date=Data de creación: +document_properties_modification_date=Data de modificación: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creador: +document_properties_producer=Productor PDF: +document_properties_version=Versión PDF: +document_properties_page_count=Númberu de páxines: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized_yes=Sí +document_properties_linearized_no=Non +document_properties_close=Zarrar + +print_progress_message=Tresnando documentu pa imprentar… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Encaboxar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Camudar barra llateral +toggle_sidebar_label=Camudar barra llateral +document_outline.title=Amosar esquema del documentu (duble clic pa espander/contrayer tolos elementos) +document_outline_label=Esquema del documentu +attachments.title=Amosar axuntos +attachments_label=Axuntos +thumbs.title=Amosar miniatures +thumbs_label=Miniatures +findbar.title=Guetar nel documentu +findbar_label=Guetar + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Páxina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura de la páxina {{page}} + +# Find panel button title and messages +find_input.title=Guetar +find_input.placeholder=Guetar nel documentu… +find_previous.title=Alcontrar l'anterior apaición de la fras +find_previous_label=Anterior +find_next.title=Alcontrar la siguiente apaición d'esta fras +find_next_label=Siguiente +find_highlight=Remarcar toos +find_match_case_label=Coincidencia de mayús./minús. +find_entire_word_label=Pallabres enteres +find_reached_top=Algamóse'l principiu del documentu, siguir dende'l final +find_reached_bottom=Algamóse'l final del documentu, siguir dende'l principiu +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_not_found=Frase non atopada + +# Error panel labels +error_more_info=Más información +error_less_info=Menos información +error_close=Zarrar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensaxe: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Ficheru: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Llinia: {{line}} +rendering_error=Hebo un fallu al renderizar la páxina. + +# Predefined zoom values +page_scale_width=Anchor de la páxina +page_scale_fit=Axuste de la páxina +page_scale_auto=Tamañu automáticu +page_scale_actual=Tamañu actual +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Fallu +loading_error=Hebo un fallu al cargar el PDF. +invalid_file_error=Ficheru PDF inválidu o corruptu. +missing_file_error=Nun hai ficheru PDF. +unexpected_response_error=Rempuesta inesperada del sirvidor. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotación {{type}}] +password_label=Introduz la contraseña p'abrir esti ficheru PDF +password_invalid=Contraseña non válida. Vuelvi a intentalo. +password_ok=Aceutar +password_cancel=Encaboxar + +printing_not_supported=Alvertencia: La imprentación entá nun ta sofitada dafechu nesti restolador. +printing_not_ready=Avisu: Esti PDF nun se cargó completamente pa poder imprentase. +web_fonts_disabled=Les fontes web tán desactivaes: ye imposible usar les fontes PDF embebíes. +document_colors_not_allowed=Los documentos PDF nun tienen permisu pa usar les sos colores: «Permitir que les páxines escueyan les sos colores» ta desactivao nel restolador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/az/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/az/viewer.properties new file mode 100644 index 0000000..2c27d12 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/az/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Əvvəlki səhifə +previous_label=Əvvəlkini tap +next.title=Növbəti səhifə +next_label=İrəli + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Səhifə +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) + +zoom_out.title=Uzaqlaş +zoom_out_label=Uzaqlaş +zoom_in.title=Yaxınlaş +zoom_in_label=Yaxınlaş +zoom.title=Yaxınlaşdırma +presentation_mode.title=Təqdimat Rejiminə Keç +presentation_mode_label=Təqdimat Rejimi +open_file.title=Fayl Aç +open_file_label=Aç +print.title=Yazdır +print_label=Yazdır +download.title=Yüklə +download_label=Yüklə +bookmark.title=Hazırkı görünüş (köçür və ya yeni pəncərədə aç) +bookmark_label=Hazırkı görünüş + +# Secondary toolbar and context menu +tools.title=Alətlər +tools_label=Alətlər +first_page.title=İlk Səhifəyə get +first_page.label=İlk Səhifəyə get +first_page_label=İlk Səhifəyə get +last_page.title=Son Səhifəyə get +last_page.label=Son Səhifəyə get +last_page_label=Son Səhifəyə get +page_rotate_cw.title=Saat İstiqamətində Fırlat +page_rotate_cw.label=Saat İstiqamətində Fırlat +page_rotate_cw_label=Saat İstiqamətində Fırlat +page_rotate_ccw.title=Saat İstiqamətinin Əksinə Fırlat +page_rotate_ccw.label=Saat İstiqamətinin Əksinə Fırlat +page_rotate_ccw_label=Saat İstiqamətinin Əksinə Fırlat + +cursor_text_select_tool.title=Yazı seçmə alətini aktivləşdir +cursor_text_select_tool_label=Yazı seçmə aləti +cursor_hand_tool.title=Əl alətini aktivləşdir +cursor_hand_tool_label=Əl aləti + +scroll_vertical.title=Şaquli sürüşdürmə işlət +scroll_vertical_label=Şaquli sürüşdürmə +scroll_horizontal.title=Üfüqi sürüşdürmə işlət +scroll_horizontal_label=Üfüqi sürüşdürmə +scroll_wrapped.title=Bükülü sürüşdürmə işlət +scroll_wrapped_label=Bükülü sürüşdürmə + +spread_none.title=Yan-yana birləşdirilmiş səhifələri işlətmə +spread_none_label=Birləşdirmə +spread_odd.title=Yan-yana birləşdirilmiş səhifələri tək nömrəli səhifələrdən başlat +spread_odd_label=Tək nömrəli +spread_even.title=Yan-yana birləşdirilmiş səhifələri cüt nömrəli səhifələrdən başlat +spread_even_label=Cüt nömrəli + +# Document properties dialog box +document_properties.title=Sənəd xüsusiyyətləri… +document_properties_label=Sənəd xüsusiyyətləri… +document_properties_file_name=Fayl adı: +document_properties_file_size=Fayl ölçüsü: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bayt) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bayt) +document_properties_title=Başlık: +document_properties_author=Müəllif: +document_properties_subject=Mövzu: +document_properties_keywords=Açar sözlər: +document_properties_creation_date=Yaradılış Tarixi : +document_properties_modification_date=Dəyişdirilmə Tarixi : +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Yaradan: +document_properties_producer=PDF yaradıcısı: +document_properties_version=PDF versiyası: +document_properties_page_count=Səhifə sayı: +document_properties_page_size=Səhifə Ölçüsü: +document_properties_page_size_unit_inches=inç +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portret +document_properties_page_size_orientation_landscape=albom +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Məktub +document_properties_page_size_name_legal=Hüquqi +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=Bəli +document_properties_linearized_no=Xeyr +document_properties_close=Qapat + +print_progress_message=Sənəd çap üçün hazırlanır… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Ləğv et + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Yan Paneli Aç/Bağla +toggle_sidebar_notification.title=Yan paneli çevir (sənəddə icmal/bağlama var) +toggle_sidebar_label=Yan Paneli Aç/Bağla +document_outline.title=Sənədin eskizini göstər (bütün bəndləri açmaq/yığmaq üçün iki dəfə klikləyin) +document_outline_label=Sənəd strukturu +attachments.title=Bağlamaları göstər +attachments_label=Bağlamalar +thumbs.title=Kiçik şəkilləri göstər +thumbs_label=Kiçik şəkillər +findbar.title=Sənəddə Tap +findbar_label=Tap + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Səhifə {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Səhifə{{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}} səhifəsinin kiçik vəziyyəti + +# Find panel button title and messages +find_input.title=Tap +find_input.placeholder=Sənəddə tap… +find_previous.title=Bir öncəki uyğun gələn sözü tapır +find_previous_label=Geri +find_next.title=Bir sonrakı uyğun gələn sözü tapır +find_next_label=İrəli +find_highlight=İşarələ +find_match_case_label=Böyük/kiçik hərfə həssaslıq +find_entire_word_label=Tam sözlər +find_reached_top=Sənədin yuxarısına çatdı, aşağıdan davam edir +find_reached_bottom=Sənədin sonuna çatdı, yuxarıdan davam edir +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} / {{total}} uyğunluq +find_match_count[two]={{current}} / {{total}} uyğunluq +find_match_count[few]={{current}} / {{total}} uyğunluq +find_match_count[many]={{current}} / {{total}} uyğunluq +find_match_count[other]={{current}} / {{total}} uyğunluq +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}}-dan çox uyğunluq +find_match_count_limit[one]={{limit}}-dən çox uyğunluq +find_match_count_limit[two]={{limit}}-dən çox uyğunluq +find_match_count_limit[few]={{limit}} uyğunluqdan daha çox +find_match_count_limit[many]={{limit}} uyğunluqdan daha çox +find_match_count_limit[other]={{limit}} uyğunluqdan daha çox +find_not_found=Uyğunlaşma tapılmadı + +# Error panel labels +error_more_info=Daha çox məlumati +error_less_info=Daha az məlumat +error_close=Qapat +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (yığma: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=İsmarıc: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stek: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fayl: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Sətir: {{line}} +rendering_error=Səhifə göstərilərkən səhv yarandı. + +# Predefined zoom values +page_scale_width=Səhifə genişliyi +page_scale_fit=Səhifəni sığdır +page_scale_auto=Avtomatik yaxınlaşdır +page_scale_actual=Hazırkı Həcm +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Səhv +loading_error=PDF yüklenərkən bir səhv yarandı. +invalid_file_error=Səhv və ya zədələnmiş olmuş PDF fayl. +missing_file_error=PDF fayl yoxdur. +unexpected_response_error=Gözlənilməz server cavabı. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotasiyası] +password_label=Bu PDF faylı açmaq üçün parolu daxil edin. +password_invalid=Parol səhvdir. Bir daha yoxlayın. +password_ok=Tamam +password_cancel=Ləğv et + +printing_not_supported=Xəbərdarlıq: Çap bu səyyah tərəfindən tam olaraq dəstəklənmir. +printing_not_ready=Xəbərdarlıq: PDF çap üçün tam yüklənməyib. +web_fonts_disabled=Web Şriftlər söndürülüb: yerləşdirilmiş PDF şriftlərini istifadə etmək mümkün deyil. +document_colors_not_allowed=PDF sənədlərə öz rənglərini işlətməyə icazə verilmir: “Səhifələrə öz rənglərini istifadə etməyə icazə ver”mə səyyahda söndürülüb. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/be/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/be/viewer.properties new file mode 100644 index 0000000..67cd012 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/be/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Папярэдняя старонка +previous_label=Папярэдняя +next.title=Наступная старонка +next_label=Наступная + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Старонка +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=з {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} з {{pagesCount}}) + +zoom_out.title=Паменшыць +zoom_out_label=Паменшыць +zoom_in.title=Павялічыць +zoom_in_label=Павялічыць +zoom.title=Павялічэнне тэксту +presentation_mode.title=Пераключыцца ў рэжым паказу +presentation_mode_label=Рэжым паказу +open_file.title=Адкрыць файл +open_file_label=Адкрыць +print.title=Друкаваць +print_label=Друкаваць +download.title=Сцягнуць +download_label=Сцягнуць +bookmark.title=Цяперашняя праява (скапіяваць або адчыніць у новым акне) +bookmark_label=Цяперашняя праява + +# Secondary toolbar and context menu +tools.title=Прылады +tools_label=Прылады +first_page.title=Перайсці на першую старонку +first_page.label=Перайсці на першую старонку +first_page_label=Перайсці на першую старонку +last_page.title=Перайсці на апошнюю старонку +last_page.label=Перайсці на апошнюю старонку +last_page_label=Перайсці на апошнюю старонку +page_rotate_cw.title=Павярнуць па сонцу +page_rotate_cw.label=Павярнуць па сонцу +page_rotate_cw_label=Павярнуць па сонцу +page_rotate_ccw.title=Павярнуць супраць сонца +page_rotate_ccw.label=Павярнуць супраць сонца +page_rotate_ccw_label=Павярнуць супраць сонца + +cursor_text_select_tool.title=Уключыць прыладу выбару тэксту +cursor_text_select_tool_label=Прылада выбару тэксту +cursor_hand_tool.title=Уключыць ручную прыладу +cursor_hand_tool_label=Ручная прылада + +scroll_vertical.title=Ужываць вертыкальную пракрутку +scroll_vertical_label=Вертыкальная пракрутка +scroll_horizontal.title=Ужываць гарызантальную пракрутку +scroll_horizontal_label=Гарызантальная пракрутка +scroll_wrapped.title=Ужываць маштабавальную пракрутку +scroll_wrapped_label=Маштабавальная пракрутка + +spread_none.title=Не выкарыстоўваць разгорнутыя старонкі +spread_none_label=Без разгорнутых старонак +spread_odd.title=Разгорнутыя старонкі пачынаючы з няцотных нумароў +spread_odd_label=Няцотныя старонкі злева +spread_even.title=Разгорнутыя старонкі пачынаючы з цотных нумароў +spread_even_label=Цотныя старонкі злева + +# Document properties dialog box +document_properties.title=Уласцівасці дакумента… +document_properties_label=Уласцівасці дакумента… +document_properties_file_name=Назва файла: +document_properties_file_size=Памер файла: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} КБ ({{size_b}} байт) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} МБ ({{size_b}} байт) +document_properties_title=Загаловак: +document_properties_author=Аўтар: +document_properties_subject=Тэма: +document_properties_keywords=Ключавыя словы: +document_properties_creation_date=Дата стварэння: +document_properties_modification_date=Дата змянення: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Стваральнік: +document_properties_producer=Вырабнік PDF: +document_properties_version=Версія PDF: +document_properties_page_count=Колькасць старонак: +document_properties_page_size=Памер старонкі: +document_properties_page_size_unit_inches=цаляў +document_properties_page_size_unit_millimeters=мм +document_properties_page_size_orientation_portrait=кніжная +document_properties_page_size_orientation_landscape=альбомная +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Хуткі прагляд у Інтэрнэце: +document_properties_linearized_yes=Так +document_properties_linearized_no=Не +document_properties_close=Закрыць + +print_progress_message=Падрыхтоўка дакумента да друку… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Скасаваць + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Паказаць/схаваць бакавую панэль +toggle_sidebar_notification.title=Паказаць/схаваць бакавую панэль (дакумент мае змест/укладанні) +toggle_sidebar_label=Паказаць/схаваць бакавую панэль +document_outline.title=Паказаць структуру дакумента (двайная пстрычка, каб разгарнуць /згарнуць усе элементы) +document_outline_label=Структура дакумента +attachments.title=Паказаць далучэнні +attachments_label=Далучэнні +thumbs.title=Паказ мініяцюр +thumbs_label=Мініяцюры +findbar.title=Пошук у дакуменце +findbar_label=Знайсці + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Старонка {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Старонка {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Мініяцюра старонкі {{page}} + +# Find panel button title and messages +find_input.title=Шукаць +find_input.placeholder=Шукаць у дакуменце… +find_previous.title=Знайсці папярэдні выпадак выразу +find_previous_label=Папярэдні +find_next.title=Знайсці наступны выпадак выразу +find_next_label=Наступны +find_highlight=Падфарбаваць усе +find_match_case_label=Адрозніваць вялікія/малыя літары +find_entire_word_label=Словы цалкам +find_reached_top=Дасягнуты пачатак дакумента, працяг з канца +find_reached_bottom=Дасягнуты канец дакумента, працяг з пачатку +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} з {{total}} супадзення +find_match_count[two]={{current}} з {{total}} супадзенняў +find_match_count[few]={{current}} з {{total}} супадзенняў +find_match_count[many]={{current}} з {{total}} супадзенняў +find_match_count[other]={{current}} з {{total}} супадзенняў +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Больш за {{limit}} супадзенняў +find_match_count_limit[one]=Больш за {{limit}} супадзенне +find_match_count_limit[two]=Больш за {{limit}} супадзенняў +find_match_count_limit[few]=Больш за {{limit}} супадзенняў +find_match_count_limit[many]=Больш за {{limit}} супадзенняў +find_match_count_limit[other]=Больш за {{limit}} супадзенняў +find_not_found=Выраз не знойдзены + +# Error panel labels +error_more_info=Падрабязней +error_less_info=Сцісла +error_close=Закрыць +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js в{{version}} (зборка: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Паведамленне: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Стос: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Файл: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Радок: {{line}} +rendering_error=Здарылася памылка падчас адлюстравання старонкі. + +# Predefined zoom values +page_scale_width=Шырыня старонкі +page_scale_fit=Уцісненне старонкі +page_scale_auto=Аўтаматычнае павелічэнне +page_scale_actual=Сапраўдны памер +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Памылка +loading_error=Здарылася памылка падчас загрузкі PDF. +invalid_file_error=Няспраўны або пашкоджаны файл PDF. +missing_file_error=Адсутны файл PDF. +unexpected_response_error=Нечаканы адказ сервера. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=Увядзіце пароль, каб адкрыць гэты файл PDF. +password_invalid=Нядзейсны пароль. Паспрабуйце зноў. +password_ok=Добра +password_cancel=Скасаваць + +printing_not_supported=Папярэджанне: друк не падтрымліваецца цалкам гэтым браўзерам. +printing_not_ready=Увага: PDF не сцягнуты цалкам для друкавання. +web_fonts_disabled=Шрыфты Сеціва забаронены: немагчыма ўжываць укладзеныя шрыфты PDF. +document_colors_not_allowed=PDF-дакументам не дазволена выкарыстоўваць свае колеры: у браўзеры адключаны параметр "Дазволіць вэб-сайтам выкарыстоўваць свае колеры". diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/bg/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/bg/viewer.properties new file mode 100644 index 0000000..713b113 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/bg/viewer.properties @@ -0,0 +1,242 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Предишна страница +previous_label=Предишна +next.title=Следваща страница +next_label=Следваща + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Страница +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=от {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} от {{pagesCount}}) + +zoom_out.title=Намаляване +zoom_out_label=Намаляване +zoom_in.title=Увеличаване +zoom_in_label=Увеличаване +zoom.title=Мащабиране +presentation_mode.title=Превключване към режим на представяне +presentation_mode_label=Режим на представяне +open_file.title=Отваряне на файл +open_file_label=Отваряне +print.title=Отпечатване +print_label=Отпечатване +download.title=Изтегляне +download_label=Изтегляне +bookmark.title=Текущ изглед (копиране или отваряне в нов прозорец) +bookmark_label=Текущ изглед + +# Secondary toolbar and context menu +tools.title=Инструменти +tools_label=Инструменти +first_page.title=Към първата страница +first_page.label=Към първата страница +first_page_label=Към първата страница +last_page.title=Към последната страница +last_page.label=Към последната страница +last_page_label=Към последната страница +page_rotate_cw.title=Завъртане по час. стрелка +page_rotate_cw.label=Завъртане по часовниковата стрелка +page_rotate_cw_label=Завъртане по часовниковата стрелка +page_rotate_ccw.title=Завъртане обратно на час. стрелка +page_rotate_ccw.label=Завъртане обратно на часовниковата стрелка +page_rotate_ccw_label=Завъртане обратно на часовниковата стрелка + +cursor_text_select_tool.title=Включване на инструмента за избор на текст +cursor_text_select_tool_label=Инструмент за избор на текст +cursor_hand_tool.title=Включване на инструмента ръка +cursor_hand_tool_label=Инструмент ръка + +scroll_vertical.title=Използване на вертикално плъзгане +scroll_vertical_label=Вертикално плъзгане +scroll_horizontal.title=Използване на хоризонтално +scroll_horizontal_label=Хоризонтално плъзгане +scroll_wrapped.title=Използване на мащабируемо плъзгане +scroll_wrapped_label=Мащабируемо плъзгане + +spread_none.title=Режимът на сдвояване е изключен +spread_none_label=Без сдвояване +spread_odd.title=Сдвояване, започвайки от нечетните страници +spread_odd_label=Нечетните отляво +spread_even.title=Сдвояване, започвайки от четните страници +spread_even_label=Четните отляво + +# Document properties dialog box +document_properties.title=Свойства на документа… +document_properties_label=Свойства на документа… +document_properties_file_name=Име на файл: +document_properties_file_size=Големина на файл: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} КБ ({{size_b}} байта) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} МБ ({{size_b}} байта) +document_properties_title=Заглавие: +document_properties_author=Автор: +document_properties_subject=Тема: +document_properties_keywords=Ключови думи: +document_properties_creation_date=Дата на създаване: +document_properties_modification_date=Дата на промяна: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Създател: +document_properties_producer=PDF произведен от: +document_properties_version=Издание на PDF: +document_properties_page_count=Брой страници: +document_properties_page_size=Размер на страницата: +document_properties_page_size_unit_inches=инч +document_properties_page_size_unit_millimeters=мм +document_properties_page_size_orientation_portrait=портрет +document_properties_page_size_orientation_landscape=пейзаж +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Правни въпроси +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Бърз преглед: +document_properties_linearized_yes=Да +document_properties_linearized_no=Не +document_properties_close=Затваряне + +print_progress_message=Подготвяне на документа за отпечатване… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Отказ + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Превключване на страничната лента +toggle_sidebar_notification.title=Превключване на страничната лента (документи със структура/прикачени файлове) +toggle_sidebar_label=Превключване на страничната лента +document_outline.title=Показване на структурата на документа (двукратно щракване за свиване/разгъване на всичко) +document_outline_label=Структура на документа +attachments.title=Показване на притурките +attachments_label=Притурки +thumbs.title=Показване на миниатюрите +thumbs_label=Миниатюри +findbar.title=Намиране в документа +findbar_label=Търсене + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Страница {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Миниатюра на страница {{page}} + +# Find panel button title and messages +find_input.title=Търсене +find_input.placeholder=Търсене в документа… +find_previous.title=Намиране на предишно съвпадение на фразата +find_previous_label=Предишна +find_next.title=Намиране на следващо съвпадение на фразата +find_next_label=Следваща +find_highlight=Открояване на всички +find_match_case_label=Съвпадение на регистъра +find_entire_word_label=Цели думи +find_reached_top=Достигнато е началото на документа, продължаване от края +find_reached_bottom=Достигнат е краят на документа, продължаване от началото +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} от {{total}} съвпадение +find_match_count[two]={{current}} от {{total}} съвпадения +find_match_count[few]={{current}} от {{total}} съвпадения +find_match_count[many]={{current}} от {{total}} съвпадения +find_match_count[other]={{current}} от {{total}} съвпадения +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Повече от {{limit}} съвпадения +find_match_count_limit[one]=Повече от {{limit}} съвпадение +find_match_count_limit[two]=Повече от {{limit}} съвпадения +find_match_count_limit[few]=Повече от {{limit}} съвпадения +find_match_count_limit[many]=Повече от {{limit}} съвпадения +find_match_count_limit[other]=Повече от {{limit}} съвпадения +find_not_found=Фразата не е намерена + +# Error panel labels +error_more_info=Повече информация +error_less_info=По-малко информация +error_close=Затваряне +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=Издание на PDF.js {{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Съобщение: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Стек: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Файл: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Ред: {{line}} +rendering_error=Грешка при изчертаване на страницата. + +# Predefined zoom values +page_scale_width=Ширина на страницата +page_scale_fit=Вместване в страницата +page_scale_auto=Автоматично мащабиране +page_scale_actual=Действителен размер +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Грешка +loading_error=Получи се грешка при зареждане на PDF-а. +invalid_file_error=Невалиден или повреден PDF файл. +missing_file_error=Липсващ PDF файл. +unexpected_response_error=Неочакван отговор от сървъра. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Анотация {{type}}] +password_label=Въведете парола за отваряне на този PDF файл. +password_invalid=Невалидна парола. Моля, опитайте отново. +password_ok=Добре +password_cancel=Отказ + +printing_not_supported=Внимание: Този четец няма пълна поддръжка на отпечатване. +printing_not_ready=Внимание: Този PDF файл не е напълно зареден за печат. +web_fonts_disabled=Уеб-шрифтовете са забранени: разрешаване на използването на вградените PDF шрифтове. +document_colors_not_allowed=На документите от вид PDF не е разрешено да използват собствени цветове: „Разрешаване на страниците да избират собствени цветове“ е изключено в четеца. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/bn/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/bn/viewer.properties new file mode 100644 index 0000000..52fec2c --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/bn/viewer.properties @@ -0,0 +1,246 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=পূর্ববর্তী পাতা +previous_label=পূর্ববর্তী +next.title=পরবর্তী পাতা +next_label=পরবর্তী + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=পাতা +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} এর +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} এর {{pageNumber}}) + +zoom_out.title=ছোট আকারে প্রদর্শন +zoom_out_label=ছোট আকারে প্রদর্শন +zoom_in.title=বড় আকারে প্রদর্শন +zoom_in_label=বড় আকারে প্রদর্শন +zoom.title=বড় আকারে প্রদর্শন +presentation_mode.title=উপস্থাপনা মোডে স্যুইচ করুন +presentation_mode_label=উপস্থাপনা মোড +open_file.title=ফাইল খুলুন +open_file_label=খুলুন +print.title=মুদ্রণ +print_label=মুদ্রণ +download.title=ডাউনলোড +download_label=ডাউনলোড +bookmark.title=বর্তমান অবস্থা (অনুলিপি অথবা নতুন উইন্ডো তে খুলুন) +bookmark_label=বর্তমান অবস্থা + +# Secondary toolbar and context menu +tools.title=টুল +tools_label=টুল +first_page.title=প্রথম পাতায় যাও +first_page.label=প্রথম পাতায় যাও +first_page_label=প্রথম পাতায় যাও +last_page.title=শেষ পাতায় যাও +last_page.label=শেষ পাতায় যাও +last_page_label=শেষ পাতায় যাও +page_rotate_cw.title=ঘড়ির কাঁটার দিকে ঘোরাও +page_rotate_cw.label=ঘড়ির কাঁটার দিকে ঘোরাও +page_rotate_cw_label=ঘড়ির কাঁটার দিকে ঘোরাও +page_rotate_ccw.title=ঘড়ির কাঁটার বিপরীতে ঘোরাও +page_rotate_ccw.label=ঘড়ির কাঁটার বিপরীতে ঘোরাও +page_rotate_ccw_label=ঘড়ির কাঁটার বিপরীতে ঘোরাও + +cursor_text_select_tool.title=লেখা নির্বাচক টুল সক্রিয় করুন +cursor_text_select_tool_label=লেখা নির্বাচক টুল +cursor_hand_tool.title=হ্যান্ড টুল সক্রিয় করুন +cursor_hand_tool_label=হ্যান্ড টুল + +scroll_vertical.title=উলম্ব স্ক্রলিং ব্যবহার করুন +scroll_vertical_label=উলম্ব স্ক্রলিং +scroll_horizontal.title=অনুভূমিক স্ক্রলিং ব্যবহার করুন +scroll_horizontal_label=অনুভূমিক স্ক্রলিং +scroll_wrapped.title=Wrapped স্ক্রোলিং ব্যবহার করুন +scroll_wrapped_label=Wrapped স্ক্রোলিং + +spread_none.title=পেজ স্প্রেডগুলোতে যোগদান করবেন না +spread_none_label=Spreads নেই +spread_odd_label=বিজোড় Spreads +spread_even_label=জোড় Spreads + +# Document properties dialog box +document_properties.title=নথি বৈশিষ্ট্য… +document_properties_label=নথি বৈশিষ্ট্য… +document_properties_file_name=ফাইলের নাম: +document_properties_file_size=ফাইলের আকার: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} কেবি ({{size_b}} বাইট) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} এমবি ({{size_b}} বাইট) +document_properties_title=শিরোনাম: +document_properties_author=লেখক: +document_properties_subject=বিষয়: +document_properties_keywords=কীওয়ার্ড: +document_properties_creation_date=তৈরির তারিখ: +document_properties_modification_date=পরিবর্তনের তারিখ: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=প্রস্তুতকারক: +document_properties_producer=পিডিএফ প্রস্তুতকারক: +document_properties_version=পিডিএফ সংষ্করণ: +document_properties_page_count=মোট পাতা: +document_properties_page_size=পাতার সাইজ: +document_properties_page_size_unit_inches=এর মধ্যে +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=উলম্ব +document_properties_page_size_orientation_landscape=অনুভূমিক +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=লেটার +document_properties_page_size_name_legal=লীগাল +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=হ্যাঁ +document_properties_linearized_no=না +document_properties_close=বন্ধ + +print_progress_message=মুদ্রণের জন্য নথি প্রস্তুত করা হচ্ছে… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=বাতিল + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=সাইডবার টগল করুন +toggle_sidebar_notification.title=সাইডবার টগল (নথিতে আউটলাইন/এটাচমেন্ট রয়েছে) +toggle_sidebar_label=সাইডবার টগল করুন +document_outline.title=নথির আউটলাইন দেখাও (সব আইটেম প্রসারিত/সঙ্কুচিত করতে ডবল ক্লিক করুন) +document_outline_label=নথির রূপরেখা +attachments.title=সংযুক্তি দেখাও +attachments_label=সংযুক্তি +thumbs.title=থাম্বনেইল সমূহ প্রদর্শন করুন +thumbs_label=থাম্বনেইল সমূহ +findbar.title=নথির মধ্যে খুঁজুন +findbar_label=খুঁজুন + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=পাতা {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=পাতা {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}} পাতার থাম্বনেইল + +# Find panel button title and messages +find_input.title=খুঁজুন +find_input.placeholder=নথির মধ্যে খুঁজুন… +find_previous.title=বাক্যাংশের পূর্ববর্তী উপস্থিতি অনুসন্ধান +find_previous_label=পূর্ববর্তী +find_next.title=বাক্যাংশের পরবর্তী উপস্থিতি অনুসন্ধান +find_next_label=পরবর্তী +find_highlight=সব হাইলাইট করা হবে +find_match_case_label=অক্ষরের ছাঁদ মেলানো +find_entire_word_label=সম্পূর্ণ শব্দ +find_reached_top=পাতার শুরুতে পৌছে গেছে, নীচ থেকে আরম্ভ করা হয়েছে +find_reached_bottom=পাতার শেষে পৌছে গেছে, উপর থেকে আরম্ভ করা হয়েছে +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{total}} এর {{current}} মিল +find_match_count[two]={{total}} এর {{current}} মিল +find_match_count[few]={{total}} এর {{current}} মিল +find_match_count[many]={{total}} এর {{current}} মিল +find_match_count[other]={{total}} এর {{current}} মিল +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} এর বেশি মিল +find_match_count_limit[one]={{limit}} এর বেশি মিল +find_match_count_limit[two]={{limit}} এর বেশি মিল +find_match_count_limit[few]={{limit}} এর বেশি মিল +find_match_count_limit[many]={{limit}} এর বেশি মিল +find_match_count_limit[other]={{limit}} এর বেশি মিল +find_not_found=বাক্যাংশ পাওয়া যায়নি + +# Error panel labels +error_more_info=আরও তথ্য +error_less_info=কম তথ্য +error_close=বন্ধ +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=বার্তা: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=নথি: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=লাইন: {{line}} +rendering_error=পাতা উপস্থাপনার সময় ত্রুটি দেখা দিয়েছে। + +# Predefined zoom values +page_scale_width=পাতার প্রস্থ +page_scale_fit=পাতা ফিট করুন +page_scale_auto=স্বয়ংক্রিয় জুম +page_scale_actual=প্রকৃত আকার +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=ত্রুটি +loading_error=পিডিএফ লোড করার সময় ত্রুটি দেখা দিয়েছে। +invalid_file_error=অকার্যকর অথবা ক্ষতিগ্রস্ত পিডিএফ ফাইল। +missing_file_error=নিখোঁজ PDF ফাইল। +unexpected_response_error=অপ্রত্যাশীত সার্ভার প্রতিক্রিয়া। + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} টীকা] +password_label=পিডিএফ ফাইলটি ওপেন করতে পাসওয়ার্ড দিন। +password_invalid=ভুল পাসওয়ার্ড। অনুগ্রহ করে আবার চেষ্টা করুন। +password_ok=ঠিক আছে +password_cancel=বাতিল + +printing_not_supported=সতর্কতা: এই ব্রাউজারে মুদ্রণ সম্পূর্ণভাবে সমর্থিত নয়। +printing_not_ready=সতর্কীকরণ: পিডিএফটি মুদ্রণের জন্য সম্পূর্ণ লোড হয়নি। +web_fonts_disabled=ওয়েব ফন্ট নিষ্ক্রিয়: সংযুক্ত পিডিএফ ফন্ট ব্যবহার করা যাচ্ছে না। +document_colors_not_allowed=পিডিএফ ডকুমেন্টকে তাদের নিজস্ব রঙ ব্যবহারে অনুমতি নেই: 'পাতা তাদের নিজেস্ব রঙ নির্বাচন করতে অনুমতি দিন' এই ব্রাউজারে নিষ্ক্রিয় রয়েছে। diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/bo/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/bo/viewer.properties new file mode 100644 index 0000000..d35c453 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/bo/viewer.properties @@ -0,0 +1,245 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=དྲ་ངོས་སྔོན་མ +previous_label=སྔོན་མ +next.title=དྲ་ངོས་རྗེས་མ +next_label=རྗེས་མ + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=ཤོག་ངོས +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=of {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) + +zoom_out.title=Zoom Out +zoom_out_label=Zoom Out +zoom_in.title=Zoom In +zoom_in_label=Zoom In +zoom.title=Zoom +presentation_mode.title=Switch to Presentation Mode +presentation_mode_label=Presentation Mode +open_file.title=Open File +open_file_label=Open +print.title=Print +print_label=Print +download.title=Download +download_label=Download +bookmark.title=Current view (copy or open in new window) +bookmark_label=Current View + +# Secondary toolbar and context menu +tools.title=Tools +tools_label=Tools +first_page.title=Go to First Page +first_page.label=Go to First Page +first_page_label=Go to First Page +last_page.title=Go to Last Page +last_page.label=Go to Last Page +last_page_label=Go to Last Page +page_rotate_cw.title=Rotate Clockwise +page_rotate_cw.label=Rotate Clockwise +page_rotate_cw_label=Rotate Clockwise +page_rotate_ccw.title=Rotate Counterclockwise +page_rotate_ccw.label=Rotate Counterclockwise +page_rotate_ccw_label=Rotate Counterclockwise + +cursor_text_select_tool.title=Enable Text Selection Tool +cursor_text_select_tool_label=Text Selection Tool +cursor_hand_tool.title=Enable Hand Tool +cursor_hand_tool_label=Hand Tool + +scroll_vertical.title=Use Vertical Scrolling +scroll_vertical_label=Vertical Scrolling +scroll_horizontal.title=Use Horizontal Scrolling +scroll_horizontal_label=Horizontal Scrolling +scroll_wrapped.title=Use Wrapped Scrolling +scroll_wrapped_label=Wrapped Scrolling + +spread_none.title=Do not join page spreads +spread_none_label=No Spreads +spread_odd.title=Join page spreads starting with odd-numbered pages +spread_odd_label=Odd Spreads +spread_even.title=Join page spreads starting with even-numbered pages +spread_even_label=Even Spreads + +# Document properties dialog box +document_properties.title=Document Properties… +document_properties_label=Document Properties… +document_properties_file_name=File name: +document_properties_file_size=File size: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Title: +document_properties_author=Author: +document_properties_subject=Subject: +document_properties_keywords=Keywords: +document_properties_creation_date=Creation Date: +document_properties_modification_date=Modification Date: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creator: +document_properties_producer=PDF Producer: +document_properties_version=PDF Version: +document_properties_page_count=Page Count: +document_properties_page_size=Page Size: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portrait +document_properties_page_size_orientation_landscape=landscape +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=Yes +document_properties_linearized_no=No +document_properties_close=Close + +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancel + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Toggle Sidebar +toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments) +toggle_sidebar_label=Toggle Sidebar +document_outline.title=Show Document Outline (double-click to expand/collapse all items) +document_outline_label=Document Outline +attachments.title=Show Attachments +attachments_label=Attachments +thumbs.title=Show Thumbnails +thumbs_label=Thumbnails +findbar.title=Find in Document +findbar_label=Find + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Page {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Thumbnail of Page {{page}} + +# Find panel button title and messages +find_input.title=Find +find_input.placeholder=Find in document… +find_previous.title=Find the previous occurrence of the phrase +find_previous_label=Previous +find_next.title=Find the next occurrence of the phrase +find_next_label=Next +find_highlight=Highlight all +find_match_case_label=Match case +find_entire_word_label=Whole words +find_reached_top=Reached top of document, continued from bottom +find_reached_bottom=Reached end of document, continued from top +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} of {{total}} match +find_match_count[two]={{current}} of {{total}} matches +find_match_count[few]={{current}} of {{total}} matches +find_match_count[many]={{current}} of {{total}} matches +find_match_count[other]={{current}} of {{total}} matches +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=More than {{limit}} matches +find_match_count_limit[one]=More than {{limit}} match +find_match_count_limit[two]=More than {{limit}} matches +find_match_count_limit[few]=More than {{limit}} matches +find_match_count_limit[many]=More than {{limit}} matches +find_match_count_limit[other]=More than {{limit}} matches +find_not_found=Phrase not found + +# Error panel labels +error_more_info=More Information +error_less_info=Less Information +error_close=Close +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Message: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=File: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Line: {{line}} +rendering_error=An error occurred while rendering the page. + +# Predefined zoom values +page_scale_width=Page Width +page_scale_fit=Page Fit +page_scale_auto=Automatic Zoom +page_scale_actual=Actual Size +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=An error occurred while loading the PDF. +invalid_file_error=Invalid or corrupted PDF file. +missing_file_error=Missing PDF file. +unexpected_response_error=Unexpected server response. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=Enter the password to open this PDF file. +password_invalid=Invalid password. Please try again. +password_ok=OK +password_cancel=Cancel + +printing_not_supported=Warning: Printing is not fully supported by this browser. +printing_not_ready=Warning: The PDF is not fully loaded for printing. +web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts. +document_colors_not_allowed=PDF documents are not allowed to use their own colors: “Allow pages to choose their own colors” is deactivated in the browser. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/br/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/br/viewer.properties new file mode 100644 index 0000000..14c2a5e --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/br/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pajenn a-raok +previous_label=A-raok +next.title=Pajenn war-lerc'h +next_label=War-lerc'h + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pajenn +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=eus {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} war {{pagesCount}}) + +zoom_out.title=Zoum bihanaat +zoom_out_label=Zoum bihanaat +zoom_in.title=Zoum brasaat +zoom_in_label=Zoum brasaat +zoom.title=Zoum +presentation_mode.title=Trec'haoliñ etrezek ar mod kinnigadenn +presentation_mode_label=Mod kinnigadenn +open_file.title=Digeriñ ur restr +open_file_label=Digeriñ ur restr +print.title=Moullañ +print_label=Moullañ +download.title=Pellgargañ +download_label=Pellgargañ +bookmark.title=Gwel bremanel (eilañ pe zigeriñ e-barzh ur prenestr nevez) +bookmark_label=Gwel bremanel + +# Secondary toolbar and context menu +tools.title=Ostilhoù +tools_label=Ostilhoù +first_page.title=Mont d'ar bajenn gentañ +first_page.label=Mont d'ar bajenn gentañ +first_page_label=Mont d'ar bajenn gentañ +last_page.title=Mont d'ar bajenn diwezhañ +last_page.label=Mont d'ar bajenn diwezhañ +last_page_label=Mont d'ar bajenn diwezhañ +page_rotate_cw.title=C'hwelañ gant roud ar bizied +page_rotate_cw.label=C'hwelañ gant roud ar bizied +page_rotate_cw_label=C'hwelañ gant roud ar bizied +page_rotate_ccw.title=C'hwelañ gant roud gin ar bizied +page_rotate_ccw.label=C'hwelañ gant roud gin ar bizied +page_rotate_ccw_label=C'hwelañ gant roud gin ar bizied + +cursor_text_select_tool.title=Gweredekaat an ostilh diuzañ testenn +cursor_text_select_tool_label=Ostilh diuzañ testenn +cursor_hand_tool.title=Gweredekaat an ostilh dorn +cursor_hand_tool_label=Ostilh dorn + +scroll_vertical.title=Arverañ an dibunañ a-blom +scroll_vertical_label=Dibunañ a-serzh +scroll_horizontal.title=Arverañ an dibunañ a-blaen +scroll_horizontal_label=Dibunañ a-blaen +scroll_wrapped.title=Arverañ an dibunañ paket +scroll_wrapped_label=Dibunañ paket + +spread_none.title=Chom hep stagañ ar skignadurioù +spread_none_label=Skignadenn ebet +spread_odd.title=Lakaat ar pajennadoù en ur gregiñ gant ar pajennoù ampar +spread_odd_label=Pajennoù ampar +spread_even.title=Lakaat ar pajennadoù en ur gregiñ gant ar pajennoù par +spread_even_label=Pajennoù par + +# Document properties dialog box +document_properties.title=Perzhioù an teul… +document_properties_label=Perzhioù an teul… +document_properties_file_name=Anv restr : +document_properties_file_size=Ment ar restr : +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} Ke ({{size_b}} eizhbit) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} Me ({{size_b}} eizhbit) +document_properties_title=Titl : +document_properties_author=Aozer : +document_properties_subject=Danvez : +document_properties_keywords=Gerioù-alc'hwez : +document_properties_creation_date=Deiziad krouiñ : +document_properties_modification_date=Deiziad kemmañ : +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Krouer : +document_properties_producer=Kenderc'her PDF : +document_properties_version=Handelv PDF : +document_properties_page_count=Niver a bajennoù : +document_properties_page_size=Ment ar bajenn: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=poltred +document_properties_page_size_orientation_landscape=gweledva +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Lizher +document_properties_page_size_name_legal=Lezennel +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Gwel Web Herrek: +document_properties_linearized_yes=Ya +document_properties_linearized_no=Ket +document_properties_close=Serriñ + +print_progress_message=O prientiñ an teul evit moullañ... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Nullañ + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Diskouez/kuzhat ar varrenn gostez +toggle_sidebar_notification.title=Trec'haoliñ ar verrenn-gostez (ur steuñv pe stagadennoù a zo en teul) +toggle_sidebar_label=Diskouez/kuzhat ar varrenn gostez +document_outline.title=Diskouez steuñv an teul (daouglikit evit brasaat/bihanaat an holl elfennoù) +document_outline_label=Sinedoù an teuliad +attachments.title=Diskouez ar c'henstagadurioù +attachments_label=Kenstagadurioù +thumbs.title=Diskouez ar melvennoù +thumbs_label=Melvennoù +findbar.title=Klask e-barzh an teuliad +findbar_label=Klask + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Pajenn {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pajenn {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Melvenn ar bajenn {{page}} + +# Find panel button title and messages +find_input.title=Klask +find_input.placeholder=Klask e-barzh an teuliad +find_previous.title=Kavout an tamm frazenn kent o klotañ ganti +find_previous_label=Kent +find_next.title=Kavout an tamm frazenn war-lerc'h o klotañ ganti +find_next_label=War-lerc'h +find_highlight=Usskediñ pep tra +find_match_case_label=Teurel evezh ouzh ar pennlizherennoù +find_entire_word_label=Gerioù a-bezh +find_reached_top=Tizhet eo bet derou ar bajenn, kenderc'hel diouzh an diaz +find_reached_bottom=Tizhet eo bet dibenn ar bajenn, kenderc'hel diouzh ar c'hrec'h +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]=Klotadenn {{current}} war {{total}} +find_match_count[two]=Klotadenn {{current}} war {{total}} +find_match_count[few]=Klotadenn {{current}} war {{total}} +find_match_count[many]=Klotadenn {{current}} war {{total}} +find_match_count[other]=Klotadenn {{current}} war {{total}} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Muioc'h eget {{limit}} a glotadennoù +find_match_count_limit[one]=Muioc'h eget {{limit}} a glotadennoù +find_match_count_limit[two]=Muioc'h eget {{limit}} a glotadennoù +find_match_count_limit[few]=Muioc'h eget {{limit}} a glotadennoù +find_match_count_limit[many]=Muioc'h eget {{limit}} a glotadennoù +find_match_count_limit[other]=Muioc'h eget {{limit}} a glotadennoù +find_not_found=N'haller ket kavout ar frazenn + +# Error panel labels +error_more_info=Muioc'h a ditouroù +error_less_info=Nebeutoc'h a ditouroù +error_close=Serriñ +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js handelv {{version}} (kempunadur : {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Kemennadenn : {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Torn : {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Restr : {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linenn : {{line}} +rendering_error=Degouezhet ez eus bet ur fazi e-pad skrammañ ar bajennad. + +# Predefined zoom values +page_scale_width=Led ar bajenn +page_scale_fit=Pajenn a-bezh +page_scale_auto=Zoum emgefreek +page_scale_actual=Ment wir +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Fazi +loading_error=Degouezhet ez eus bet ur fazi e-pad kargañ ar PDF. +invalid_file_error=Restr PDF didalvoudek pe kontronet. +missing_file_error=Restr PDF o vankout. +unexpected_response_error=Respont dic'hortoz a-berzh an dafariad + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Notennañ] +password_label=Enankit ar ger-tremen evit digeriñ ar restr PDF-mañ. +password_invalid=Ger-tremen didalvoudek. Klaskit en-dro mar plij. +password_ok=Mat eo +password_cancel=Nullañ + +printing_not_supported=Kemenn : N'eo ket skoret penn-da-benn ar moullañ gant ar merdeer-mañ. +printing_not_ready=Kemenn : N'hall ket bezañ moullet ar restr PDF rak n'eo ket karget penn-da-benn. +web_fonts_disabled=Diweredekaet eo an nodrezhoù web : n'haller ket arverañ an nodrezhoù PDF enframmet. +document_colors_not_allowed=N'eo ket aotreet an teuliadoù PDF da arverañ o livioù dezho : diweredekaet eo “Aotren ar pajennoù da zibab o livioù dezho” e-barzh ar merdeer. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/brx/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/brx/viewer.properties new file mode 100644 index 0000000..234bca1 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/brx/viewer.properties @@ -0,0 +1,211 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=आगोलनि बिलाइ +previous_label=आगोलनि +next.title=उननि बिलाइ +next_label=उननि + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=बिलाइ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} नि +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} नि {{pageNumber}}) + +zoom_out.title=फिसायै जुम खालाम +zoom_out_label=फिसायै जुम खालाम +zoom_in.title=गेदेरै जुम खालाम +zoom_in_label=गेदेरै जुम खालाम +zoom.title=जुम खालाम +presentation_mode.title=दिन्थिफुंनाय म'डआव थां +presentation_mode_label=दिन्थिफुंनाय म'ड +open_file.title=फाइलखौ खेव +open_file_label=खेव +print.title=साफाय +print_label=साफाय +download.title=डाउनल'ड खालाम +download_label=डाउनल'ड खालाम +bookmark.title=दानि नुथाय (गोदान उइन्ड'आव कपि खालाम एबा खेव) +bookmark_label=दानि नुथाय + +# Secondary toolbar and context menu +tools.title=टुल +tools_label=टुल +first_page.title=गिबि बिलाइआव थां +first_page.label=गिबि बिलाइआव थां +first_page_label=गिबि बिलाइआव थां +last_page.title=जोबथा बिलाइआव थां +last_page.label=जोबथा बिलाइआव थां +last_page_label=जोबथा बिलाइआव थां +page_rotate_cw.title=घरि गिदिंनाय फार्से फिदिं +page_rotate_cw.label=घरि गिदिंनाय फार्से फिदिं +page_rotate_cw_label=घरि गिदिंनाय फार्से फिदिं +page_rotate_ccw.title=घरि गिदिंनाय उल्था फार्से फिदिं +page_rotate_ccw.label=घरि गिदिंनाय उल्था फार्से फिदिं +page_rotate_ccw_label=घरि गिदिंनाय उल्था फार्से फिदिं + + + + +# Document properties dialog box +document_properties.title=फोरमान बिलाइनि आखुथाय... +document_properties_label=फोरमान बिलाइनि आखुथाय... +document_properties_file_name=फाइलनि मुं: +document_properties_file_size=फाइलनि महर: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} बाइट) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} बाइट) +document_properties_title=बिमुं: +document_properties_author=लिरगिरि: +document_properties_subject=आयदा: +document_properties_keywords=गाहाय सोदोब: +document_properties_creation_date=सोरजिनाय अक्ट': +document_properties_modification_date=सुद्रायनाय अक्ट': +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=सोरजिग्रा: +document_properties_producer=PDF दिहुनग्रा: +document_properties_version=PDF बिसान: +document_properties_page_count=बिलाइनि हिसाब: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=प'र्ट्रेट +document_properties_page_size_orientation_landscape=लेण्डस्केप +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=लायजाम +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized_yes=नंगौ +document_properties_linearized_no=नङा +document_properties_close=बन्द खालाम + +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=नेवसि + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=टग्गल साइडबार +toggle_sidebar_label=टग्गल साइडबार +document_outline_label=फोरमान बिलाइ सिमा हांखो +attachments.title=नांजाब होनायखौ दिन्थि +attachments_label=नांजाब होनाय +thumbs.title=थामनेइलखौ दिन्थि +thumbs_label=थामनेइल +findbar.title=फोरमान बिलाइआव नागिरना दिहुन +findbar_label=नायगिरना दिहुन + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=बिलाइ {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=बिलाइ {{page}} नि थामनेइल + +# Find panel button title and messages +find_input.title=नायगिरना दिहुन +find_input.placeholder=फोरमान बिलाइआव नागिरना दिहुन... +find_previous.title=बाथ्रा खोन्दोबनि सिगांनि नुजाथिनायखौ नागिर +find_previous_label=आगोलनि +find_next.title=बाथ्रा खोन्दोबनि उननि नुजाथिनायखौ नागिर +find_next_label=उननि +find_highlight=गासैखौबो हाइलाइट खालाम +find_match_case_label=गोरोबनाय केस +find_reached_top=थालो निफ्राय जागायनानै फोरमान बिलाइनि बिजौआव सौहैबाय +find_reached_bottom=बिजौ निफ्राय जागायनानै फोरमान बिलाइनि बिजौआव सौहैबाय +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_not_found=बाथ्रा खोन्दोब मोनाखै + +# Error panel labels +error_more_info=गोबां फोरमायथिहोग्रा +error_less_info=खम फोरमायथिहोग्रा +error_close=बन्द खालाम +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=खौरां: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=स्टेक: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=फाइल: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=सारि: {{line}} +rendering_error=बिलाइखौ राव सोलायनाय समाव मोनसे गोरोन्थि जादों। + +# Predefined zoom values +page_scale_width=बिलाइनि गुवार +page_scale_fit=बिलाइ गोरोबनाय +page_scale_auto=गावनोगाव जुम +page_scale_actual=थार महर +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=गोरोन्थि +loading_error=PDF ल'ड खालामनाय समाव मोनसे गोरोन्थि जाबाय। +invalid_file_error=बाहायजायै एबा गाज्रि जानाय PDF फाइल +missing_file_error=गोमानाय PDF फाइल +unexpected_response_error=मिजिंथियै सार्भार फिननाय। + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} सोदोब बेखेवनाय] +password_label=बे PDF फाइलखौ खेवनो पासवार्ड हाबहो। +password_invalid=बाहायजायै पासवार्ड। अननानै फिन नाजा। +password_ok=OK +password_cancel=नेवसि + +printing_not_supported=सांग्रांथि: साफायनाया बे ब्राउजारजों आबुङै हेफाजाब होजाया। +printing_not_ready=सांग्रांथि: PDF खौ साफायनायनि थाखाय फुरायै ल'ड खालामाखै। +web_fonts_disabled=वेब फन्टखौ लोरबां खालामबाय: अरजाबहोनाय PDF फन्टखौ बाहायनो हायाखै। +document_colors_not_allowed=PDF फोरमान बिलाइखौ बिसोरनि निजि गाब बाहायनो गनायथि होनाय जाया: 'बिसोरनि निजि गाब बासिखनो बिलाइखौ गनायथि हो'-खौ ब्राउजारआव लोरबां खालामनाय जायो। diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/bs/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/bs/viewer.properties new file mode 100644 index 0000000..6c2122b --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/bs/viewer.properties @@ -0,0 +1,201 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Prethodna strana +previous_label=Prethodna +next.title=Sljedeća strna +next_label=Sljedeća + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Strana +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=od {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} od {{pagesCount}}) + +zoom_out.title=Umanji +zoom_out_label=Umanji +zoom_in.title=Uvećaj +zoom_in_label=Uvećaj +zoom.title=Uvećanje +presentation_mode.title=Prebaci se u prezentacijski režim +presentation_mode_label=Prezentacijski režim +open_file.title=Otvori fajl +open_file_label=Otvori +print.title=Štampaj +print_label=Štampaj +download.title=Preuzmi +download_label=Preuzmi +bookmark.title=Trenutni prikaz (kopiraj ili otvori u novom prozoru) +bookmark_label=Trenutni prikaz + +# Secondary toolbar and context menu +tools.title=Alati +tools_label=Alati +first_page.title=Idi na prvu stranu +first_page.label=Idi na prvu stranu +first_page_label=Idi na prvu stranu +last_page.title=Idi na zadnju stranu +last_page.label=Idi na zadnju stranu +last_page_label=Idi na zadnju stranu +page_rotate_cw.title=Rotiraj u smjeru kazaljke na satu +page_rotate_cw.label=Rotiraj u smjeru kazaljke na satu +page_rotate_cw_label=Rotiraj u smjeru kazaljke na satu +page_rotate_ccw.title=Rotiraj suprotno smjeru kazaljke na satu +page_rotate_ccw.label=Rotiraj suprotno smjeru kazaljke na satu +page_rotate_ccw_label=Rotiraj suprotno smjeru kazaljke na satu + +cursor_text_select_tool.title=Omogući alat za označavanje teksta +cursor_text_select_tool_label=Alat za označavanje teksta +cursor_hand_tool.title=Omogući ručni alat +cursor_hand_tool_label=Ručni alat + +# Document properties dialog box +document_properties.title=Svojstva dokumenta... +document_properties_label=Svojstva dokumenta... +document_properties_file_name=Naziv fajla: +document_properties_file_size=Veličina fajla: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bajta) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bajta) +document_properties_title=Naslov: +document_properties_author=Autor: +document_properties_subject=Predmet: +document_properties_keywords=Ključne riječi: +document_properties_creation_date=Datum kreiranja: +document_properties_modification_date=Datum promjene: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Kreator: +document_properties_producer=PDF stvaratelj: +document_properties_version=PDF verzija: +document_properties_page_count=Broj stranica: +document_properties_page_size=Veličina stranice: +document_properties_page_size_unit_inches=u +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=uspravno +document_properties_page_size_orientation_landscape=vodoravno +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Pismo +document_properties_page_size_name_legal=Pravni +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +document_properties_close=Zatvori + +print_progress_message=Pripremam dokument za štampu… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Otkaži + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Uključi/isključi bočnu traku +toggle_sidebar_notification.title=Uključi/isključi sidebar (dokument sadrži outline/priloge) +toggle_sidebar_label=Uključi/isključi bočnu traku +document_outline.title=Prikaži outline dokumenta (dvoklik za skupljanje/širenje svih stavki) +document_outline_label=Konture dokumenta +attachments.title=Prikaži priloge +attachments_label=Prilozi +thumbs.title=Prikaži thumbnailove +thumbs_label=Thumbnailovi +findbar.title=Pronađi u dokumentu +findbar_label=Pronađi + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Strana {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Thumbnail strane {{page}} + +# Find panel button title and messages +find_input.title=Pronađi +find_input.placeholder=Pronađi u dokumentu… +find_previous.title=Pronađi prethodno pojavljivanje fraze +find_previous_label=Prethodno +find_next.title=Pronađi sljedeće pojavljivanje fraze +find_next_label=Sljedeće +find_highlight=Označi sve +find_match_case_label=Osjetljivost na karaktere +find_reached_top=Dostigao sam vrh dokumenta, nastavljam sa dna +find_reached_bottom=Dostigao sam kraj dokumenta, nastavljam sa vrha +find_not_found=Fraza nije pronađena + +# Error panel labels +error_more_info=Više informacija +error_less_info=Manje informacija +error_close=Zatvori +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Poruka: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fajl: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linija: {{line}} +rendering_error=Došlo je do greške prilikom renderiranja strane. + +# Predefined zoom values +page_scale_width=Širina strane +page_scale_fit=Uklopi stranu +page_scale_auto=Automatsko uvećanje +page_scale_actual=Stvarna veličina +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Greška +loading_error=Došlo je do greške prilikom učitavanja PDF-a. +invalid_file_error=Neispravan ili oštećen PDF fajl. +missing_file_error=Nedostaje PDF fajl. +unexpected_response_error=Neočekivani odgovor servera. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} pribilješka] +password_label=Upišite lozinku da biste otvorili ovaj PDF fajl. +password_invalid=Pogrešna lozinka. Pokušajte ponovo. +password_ok=OK +password_cancel=Otkaži + +printing_not_supported=Upozorenje: Štampanje nije u potpunosti podržano u ovom browseru. +printing_not_ready=Upozorenje: PDF nije u potpunosti učitan za štampanje. +web_fonts_disabled=Web fontovi su onemogućeni: nemoguće koristiti ubačene PDF fontove. +document_colors_not_allowed=PDF dokumentima nije dozvoljeno da koriste vlastite boje: 'Dozvoli stranicama da izaberu vlastite boje' je deaktivirano u browseru. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ca/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ca/viewer.properties new file mode 100644 index 0000000..924637a --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ca/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pàgina anterior +previous_label=Anterior +next.title=Pàgina següent +next_label=Següent + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pàgina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Redueix +zoom_out_label=Redueix +zoom_in.title=Amplia +zoom_in_label=Amplia +zoom.title=Escala +presentation_mode.title=Canvia al mode de presentació +presentation_mode_label=Mode de presentació +open_file.title=Obre el fitxer +open_file_label=Obre +print.title=Imprimeix +print_label=Imprimeix +download.title=Baixa +download_label=Baixa +bookmark.title=Vista actual (copia o obre en una finestra nova) +bookmark_label=Vista actual + +# Secondary toolbar and context menu +tools.title=Eines +tools_label=Eines +first_page.title=Vés a la primera pàgina +first_page.label=Vés a la primera pàgina +first_page_label=Vés a la primera pàgina +last_page.title=Vés a l'última pàgina +last_page.label=Vés a l'última pàgina +last_page_label=Vés a l'última pàgina +page_rotate_cw.title=Gira cap a la dreta +page_rotate_cw.label=Gira cap a la dreta +page_rotate_cw_label=Gira cap a la dreta +page_rotate_ccw.title=Gira cap a l'esquerra +page_rotate_ccw.label=Gira cap a l'esquerra +page_rotate_ccw_label=Gira cap a l'esquerra + +cursor_text_select_tool.title=Habilita l'eina de selecció de text +cursor_text_select_tool_label=Eina de selecció de text +cursor_hand_tool.title=Habilita l'eina de mà +cursor_hand_tool_label=Eina de mà + +scroll_vertical.title=Utilitza el desplaçament vertical +scroll_vertical_label=Desplaçament vertical +scroll_horizontal.title=Utilitza el desplaçament horitzontal +scroll_horizontal_label=Desplaçament horitzontal +scroll_wrapped.title=Activa el desplaçament continu +scroll_wrapped_label=Desplaçament continu + +spread_none.title=No agrupis les pàgines de dues en dues +spread_none_label=Una sola pàgina +spread_odd.title=Mostra dues pàgines començant per les pàgines de numeració senar +spread_odd_label=Doble pàgina (senar) +spread_even.title=Mostra dues pàgines començant per les pàgines de numeració parell +spread_even_label=Doble pàgina (parell) + +# Document properties dialog box +document_properties.title=Propietats del document… +document_properties_label=Propietats del document… +document_properties_file_name=Nom del fitxer: +document_properties_file_size=Mida del fitxer: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Títol: +document_properties_author=Autor: +document_properties_subject=Assumpte: +document_properties_keywords=Paraules clau: +document_properties_creation_date=Data de creació: +document_properties_modification_date=Data de modificació: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creador: +document_properties_producer=Generador de PDF: +document_properties_version=Versió de PDF: +document_properties_page_count=Nombre de pàgines: +document_properties_page_size=Mida de la pàgina: +document_properties_page_size_unit_inches=polzades +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=vertical +document_properties_page_size_orientation_landscape=apaïsat +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Carta +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vista web ràpida: +document_properties_linearized_yes=Sí +document_properties_linearized_no=No +document_properties_close=Tanca + +print_progress_message=S'està preparant la impressió del document… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancel·la + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Mostra/amaga la barra lateral +toggle_sidebar_notification.title=Mostra/amaga la barra lateral (el document conté un esquema o adjuncions) +toggle_sidebar_label=Mostra/amaga la barra lateral +document_outline.title=Mostra l'esquema del document (doble clic per ampliar/reduir tots els elements) +document_outline_label=Contorn del document +attachments.title=Mostra les adjuncions +attachments_label=Adjuncions +thumbs.title=Mostra les miniatures +thumbs_label=Miniatures +findbar.title=Cerca al document +findbar_label=Cerca + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Pàgina {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pàgina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura de la pàgina {{page}} + +# Find panel button title and messages +find_input.title=Cerca +find_input.placeholder=Cerca al document… +find_previous.title=Cerca l'anterior coincidència de l'expressió +find_previous_label=Anterior +find_next.title=Cerca la següent coincidència de l'expressió +find_next_label=Següent +find_highlight=Ressalta-ho tot +find_match_case_label=Distingeix entre majúscules i minúscules +find_entire_word_label=Paraules senceres +find_reached_top=S'ha arribat al principi del document, es continua pel final +find_reached_bottom=S'ha arribat al final del document, es continua pel principi +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} de {{total}} coincidència +find_match_count[two]={{current}} de {{total}} coincidències +find_match_count[few]={{current}} de {{total}} coincidències +find_match_count[many]={{current}} de {{total}} coincidències +find_match_count[other]={{current}} de {{total}} coincidències +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Més de {{limit}} coincidències +find_match_count_limit[one]=Més d'{{limit}} coincidència +find_match_count_limit[two]=Més de {{limit}} coincidències +find_match_count_limit[few]=Més de {{limit}} coincidències +find_match_count_limit[many]=Més de {{limit}} coincidències +find_match_count_limit[other]=Més de {{limit}} coincidències +find_not_found=No s'ha trobat l'expressió + +# Error panel labels +error_more_info=Més informació +error_less_info=Menys informació +error_close=Tanca +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (muntatge: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Missatge: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fitxer: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Línia: {{line}} +rendering_error=S'ha produït un error mentre es renderitzava la pàgina. + +# Predefined zoom values +page_scale_width=Amplària de la pàgina +page_scale_fit=Ajusta la pàgina +page_scale_auto=Zoom automàtic +page_scale_actual=Mida real +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=S'ha produït un error en carregar el PDF. +invalid_file_error=El fitxer PDF no és vàlid o està malmès. +missing_file_error=Falta el fitxer PDF. +unexpected_response_error=Resposta inesperada del servidor. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotació {{type}}] +password_label=Introduïu la contrasenya per obrir aquest fitxer PDF. +password_invalid=La contrasenya no és vàlida. Torneu-ho a provar. +password_ok=D'acord +password_cancel=Cancel·la + +printing_not_supported=Avís: la impressió no és plenament funcional en aquest navegador. +printing_not_ready=Atenció: el PDF no s'ha acabat de carregar per imprimir-lo. +web_fonts_disabled=Els tipus de lletra web estan desactivats: no es poden utilitzar els tipus de lletra incrustats al PDF. +document_colors_not_allowed=Els documents PDF no poden usar els seus colors propis: «Permet a les pàgines triar els colors propis» es troba desactivat al navegador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/cak/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/cak/viewer.properties new file mode 100644 index 0000000..c105d82 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/cak/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Jun kan ruxaq +previous_label=Chuwäch +next.title=Jun chik ruxaq +next_label=Jun chik + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Ruxaq +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=richin {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} richin {{pagesCount}}) + +zoom_out.title=Tich'utinirisäx +zoom_out_label=Tich'utinirisäx +zoom_in.title=Tinimirisäx +zoom_in_label=Tinimirisäx +zoom.title=Sum +presentation_mode.title=Tijal ri rub'anikil niwachin +presentation_mode_label=Pa rub'eyal niwachin +open_file.title=Tijaq yakb'äl +open_file_label=Tijaq +print.title=Titz'ajb'äx +print_label=Titz'ajb'äx +download.title=Tiqasäx +download_label=Tiqasäx +bookmark.title=Rutz'etik wakami (tiwachib'ëx o tijaq pa jun k'ak'a' tzuwäch) +bookmark_label=Rutzub'al wakami + +# Secondary toolbar and context menu +tools.title=Samajib'äl +tools_label=Samajib'äl +first_page.title=Tib'e pa nab'ey ruxaq +first_page.label=Tib'e pa nab'ey ruxaq +first_page_label=Tib'e pa nab'ey ruxaq +last_page.title=Tib'e pa ruk'isib'äl ruxaq +last_page.label=Tib'e pa ruk'isib'äl ruxaq +last_page_label=Tib'e pa ruk'isib'äl ruxaq +page_rotate_cw.title=Tisutïx pan ajkiq'a' +page_rotate_cw.label=Tisutïx pan ajkiq'a' +page_rotate_cw_label=Tisutïx pan ajkiq'a' +page_rotate_ccw.title=Tisutïx pan ajxokon +page_rotate_ccw.label=Tisutïx pan ajxokon +page_rotate_ccw_label=Tisutïx pan ajxokon + +cursor_text_select_tool.title=Titzij ri rusamajib'al Rucha'ik Rucholajem Tzij +cursor_text_select_tool_label=Rusamajib'al Rucha'ik Rucholajem Tzij +cursor_hand_tool.title=Titzij ri q'ab'aj samajib'äl +cursor_hand_tool_label=Q'ab'aj Samajib'äl + +scroll_vertical.title=Tokisäx Pa'äl Q'axanem +scroll_vertical_label=Pa'äl Q'axanem +scroll_horizontal.title=Tokisäx Kotz'öl Q'axanem +scroll_horizontal_label=Kotz'öl Q'axanem +scroll_wrapped.title=Tokisäx Tzub'aj Q'axanem +scroll_wrapped_label=Tzub'aj Q'axanem + +spread_none.title=Man ketun taq ruxaq pa rub'eyal wuj +spread_none_label=Majun Rub'eyal +spread_odd.title=Ke'atunu' ri taq ruxaq rik'in natikirisaj rik'in jun man k'ulaj ta rajilab'al +spread_odd_label=Man K'ulaj Ta Rub'eyal +spread_even.title=Ke'atunu' ri taq ruxaq rik'in natikirisaj rik'in jun k'ulaj rajilab'al +spread_even_label=K'ulaj Rub'eyal + +# Document properties dialog box +document_properties.title=Taq richinil wuj… +document_properties_label=Taq richinil wuj… +document_properties_file_name=Rub'i' yakb'äl: +document_properties_file_size=Runimilem yakb'äl: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=B'i'aj: +document_properties_author=B'anel: +document_properties_subject=Taqikil: +document_properties_keywords=Kixe'el taq tzij: +document_properties_creation_date=Ruq'ijul xtz'uk: +document_properties_modification_date=Ruq'ijul xjalwachïx: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Q'inonel: +document_properties_producer=PDF b'anöy: +document_properties_version=PDF ruwäch: +document_properties_page_count=Jarupe' ruxaq: +document_properties_page_size=Runimilem ri Ruxaq: +document_properties_page_size_unit_inches=pa +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=rupalem +document_properties_page_size_orientation_landscape=rukotz'olem +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Loman wuj +document_properties_page_size_name_legal=Nïm wuj +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Anin Rutz'etik Ajk'amaya'l: +document_properties_linearized_yes=Ja' +document_properties_linearized_no=Mani +document_properties_close=Titz'apïx + +print_progress_message=Ruchojmirisaxik wuj richin nitz'ajb'äx… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Tiq'at + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Tijal ri ajxikin kajtz'ik +toggle_sidebar_notification.title=Tik'ex ri ajxikin yuqkajtz'ik (ri wuj eruk'wan taq ruchi'/taqoj taq yakb'äl) +toggle_sidebar_label=Tijal ri ajxikin kajtz'ik +document_outline.title=Tik'ut pe ruch'akulal wuj (kamul-pitz'oj richin nirik'/nich'utinirisäx ronojel ruch'akulal) +document_outline_label=Ruch'akulal wuj +attachments.title=Kek'ut pe ri taq taqoj +attachments_label=Taq taqoj +thumbs.title=Kek'ut pe taq ch'utiq +thumbs_label=Koköj +findbar.title=Tikanöx chupam ri wuj +findbar_label=Tikanöx + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Ruxaq {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Ruxaq {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Ruch'utinirisaxik ruxaq {{page}} + +# Find panel button title and messages +find_input.title=Tikanöx +find_input.placeholder=Tikanöx pa wuj… +find_previous.title=Tib'an b'enam pa ri jun kan q'aptzij xilitäj +find_previous_label=Jun kan +find_next.title=Tib'e pa ri jun chik pajtzij xilitäj +find_next_label=Jun chik +find_highlight=Tiya' retal ronojel +find_match_case_label=Tuk'äm ri' kik'in taq nimatz'ib' chuqa' taq ch'utitz'ib' +find_entire_word_label=Tz'aqät taq tzij +find_reached_top=Xb'eq'i' ri rutikirib'al wuj, xtikanöx k'a pa ruk'isib'äl +find_reached_bottom=Xb'eq'i' ri ruk'isib'äl wuj, xtikanöx pa rutikirib'al +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} richin {{total}} nuk'äm ri' +find_match_count[two]={{current}} richin {{total}} nikik'äm ki' +find_match_count[few]={{current}} richin {{total}} nikik'äm ki' +find_match_count[many]={{current}} richin {{total}} nikik'äm ki' +find_match_count[other]={{current}} richin {{total}} nikik'äm ki' +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=K'ïy chi re {{limit}} nikik'äm ki' +find_match_count_limit[one]=K'ïy chi re {{limit}} nuk'äm ri' +find_match_count_limit[two]=K'ïy chi re {{limit}} nikik'äm ki' +find_match_count_limit[few]=K'ïy chi re {{limit}} nikik'äm ki' +find_match_count_limit[many]=K'ïy chi re {{limit}} nikik'äm ki' +find_match_count_limit[other]=K'ïy chi re {{limit}} nikik'äm ki' +find_not_found=Man xilitäj ta ri pajtzij + +# Error panel labels +error_more_info=Ch'aqa' chik rutzijol +error_less_info=Jub'a' ok rutzijol +error_close=Titz'apïx +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Uqxa'n: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Tzub'aj: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Yakb'äl: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=B'ey: {{line}} +rendering_error=Xk'ulwachitäj jun sachoj toq ninuk'wachij ri ruxaq. + +# Predefined zoom values +page_scale_width=Ruwa ruxaq +page_scale_fit=Tinuk' ruxaq +page_scale_auto=Yonil chi nimilem +page_scale_actual=Runimilem +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Sachoj +loading_error=\u0020Xk'ulwachitäj jun sach'oj toq xnuk'ux ri PDF . +invalid_file_error=Man oke ta o yujtajinäq ri PDF yakb'äl. +missing_file_error=Man xilitäj ta ri PDF yakb'äl. +unexpected_response_error=Man oyob'en ta tz'olin rutzij ruk'u'x samaj. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Tz'ib'anïk] +password_label=Tatz'ib'aj ri ewan tzij richin najäq re yakb'äl re' pa PDF. +password_invalid=Man okel ta ri ewan tzij: Tatojtob'ej chik. +password_ok=Ütz +password_cancel=Tiq'at + +printing_not_supported=Rutzijol k'ayewal: Ri rutz'ajb'axik man koch'el ta ronojel pa re okik'amaya'l re'. +printing_not_ready=Rutzijol k'ayewal: Ri PDF man xusamajij ta ronojel richin nitz'ajb'äx. +web_fonts_disabled=E chupül ri taq ajk'amaya'l tz'ib': man tikirel ta nokisäx ri taq tz'ib' PDF pa ch'ikenïk +document_colors_not_allowed=Ri taq wuj pa PDF man ya'on ta q'ij chi ke richin nikokisaj ri taq kib'onil: “Tiya' q'ij chi ke ri taq ruxaq chi kekicha' ri taq kib'onil” chupun pa ri awokik'amaya'l. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/cs/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/cs/viewer.properties new file mode 100644 index 0000000..6310f63 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/cs/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Přejde na předchozí stránku +previous_label=Předchozí +next.title=Přejde na následující stránku +next_label=Další + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Stránka +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=z {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} z {{pagesCount}}) + +zoom_out.title=Zmenší velikost +zoom_out_label=Zmenšit +zoom_in.title=Zvětší velikost +zoom_in_label=Zvětšit +zoom.title=Nastaví velikost +presentation_mode.title=Přepne do režimu prezentace +presentation_mode_label=Režim prezentace +open_file.title=Otevře soubor +open_file_label=Otevřít +print.title=Vytiskne dokument +print_label=Vytisknout +download.title=Stáhne dokument +download_label=Stáhnout +bookmark.title=Současný pohled (kopírovat nebo otevřít v novém okně) +bookmark_label=Současný pohled + +# Secondary toolbar and context menu +tools.title=Nástroje +tools_label=Nástroje +first_page.title=Přejde na první stránku +first_page.label=Přejít na první stránku +first_page_label=Přejít na první stránku +last_page.title=Přejde na poslední stránku +last_page.label=Přejít na poslední stránku +last_page_label=Přejít na poslední stránku +page_rotate_cw.title=Otočí po směru hodin +page_rotate_cw.label=Otočit po směru hodin +page_rotate_cw_label=Otočit po směru hodin +page_rotate_ccw.title=Otočí proti směru hodin +page_rotate_ccw.label=Otočit proti směru hodin +page_rotate_ccw_label=Otočit proti směru hodin + +cursor_text_select_tool.title=Povolí výběr textu +cursor_text_select_tool_label=Výběr textu +cursor_hand_tool.title=Povolí nástroj ručička +cursor_hand_tool_label=Nástroj ručička + +scroll_vertical.title=Použít svislé posouvání +scroll_vertical_label=Svislé posouvání +scroll_horizontal.title=Použít vodorovné posouvání +scroll_horizontal_label=Vodorovné posouvání +scroll_wrapped.title=Použít postupné posouvání +scroll_wrapped_label=Postupné posouvání + +spread_none.title=Nesdružovat stránky +spread_none_label=Žádné sdružení +spread_odd.title=Sdruží stránky s umístěním lichých vlevo +spread_odd_label=Sdružení stránek (liché vlevo) +spread_even.title=Sdruží stránky s umístěním sudých vlevo +spread_even_label=Sdružení stránek (sudé vlevo) + +# Document properties dialog box +document_properties.title=Vlastnosti dokumentu… +document_properties_label=Vlastnosti dokumentu… +document_properties_file_name=Název souboru: +document_properties_file_size=Velikost souboru: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bajtů) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bajtů) +document_properties_title=Název stránky: +document_properties_author=Autor: +document_properties_subject=Předmět: +document_properties_keywords=Klíčová slova: +document_properties_creation_date=Datum vytvoření: +document_properties_modification_date=Datum úpravy: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Vytvořil: +document_properties_producer=Tvůrce PDF: +document_properties_version=Verze PDF: +document_properties_page_count=Počet stránek: +document_properties_page_size=Velikost stránky: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=na výšku +document_properties_page_size_orientation_landscape=na šířku +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Dopis +document_properties_page_size_name_legal=Právní dokument +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Rychlé zobrazování z webu: +document_properties_linearized_yes=Ano +document_properties_linearized_no=Ne +document_properties_close=Zavřít + +print_progress_message=Příprava dokumentu pro tisk… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=Zrušit + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Postranní lišta +toggle_sidebar_notification.title=Přepne postranní lištu (dokument obsahuje osnovu/přílohy) +toggle_sidebar_label=Postranní lišta +document_outline.title=Zobrazí osnovu dokumentu (dvojité klepnutí rozbalí/sbalí všechny položky) +document_outline_label=Osnova dokumentu +attachments.title=Zobrazí přílohy +attachments_label=Přílohy +thumbs.title=Zobrazí náhledy +thumbs_label=Náhledy +findbar.title=Najde v dokumentu +findbar_label=Najít + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Strana {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Strana {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Náhled strany {{page}} + +# Find panel button title and messages +find_input.title=Najít +find_input.placeholder=Najít v dokumentu… +find_previous.title=Najde předchozí výskyt hledaného textu +find_previous_label=Předchozí +find_next.title=Najde další výskyt hledaného textu +find_next_label=Další +find_highlight=Zvýraznit +find_match_case_label=Rozlišovat velikost +find_entire_word_label=Celá slova +find_reached_top=Dosažen začátek dokumentu, pokračuje se od konce +find_reached_bottom=Dosažen konec dokumentu, pokračuje se od začátku +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}}. z {{total}} výskytu +find_match_count[two]={{current}}. z {{total}} výskytů +find_match_count[few]={{current}}. z {{total}} výskytů +find_match_count[many]={{current}}. z {{total}} výskytů +find_match_count[other]={{current}}. z {{total}} výskytů +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Více než {{limit}} výskytů +find_match_count_limit[one]=Více než {{limit}} výskyt +find_match_count_limit[two]=Více než {{limit}} výskyty +find_match_count_limit[few]=Více než {{limit}} výskyty +find_match_count_limit[many]=Více než {{limit}} výskytů +find_match_count_limit[other]=Více než {{limit}} výskytů +find_not_found=Hledaný text nenalezen + +# Error panel labels +error_more_info=Více informací +error_less_info=Méně informací +error_close=Zavřít +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (sestavení: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Zpráva: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Zásobník: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Soubor: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Řádek: {{line}} +rendering_error=Při vykreslování stránky nastala chyba. + +# Predefined zoom values +page_scale_width=Podle šířky +page_scale_fit=Podle výšky +page_scale_auto=Automatická velikost +page_scale_actual=Skutečná velikost +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}} % + +# Loading indicator messages +loading_error_indicator=Chyba +loading_error=Při nahrávání PDF nastala chyba. +invalid_file_error=Neplatný nebo chybný soubor PDF. +missing_file_error=Chybí soubor PDF. +unexpected_response_error=Neočekávaná odpověď serveru. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotace typu {{type}}] +password_label=Pro otevření PDF souboru vložte heslo. +password_invalid=Neplatné heslo. Zkuste to znovu. +password_ok=OK +password_cancel=Zrušit + +printing_not_supported=Upozornění: Tisk není v tomto prohlížeči plně podporován. +printing_not_ready=Upozornění: Dokument PDF není kompletně načten. +web_fonts_disabled=Webová písma jsou zakázána, proto není možné použít vložená písma PDF. +document_colors_not_allowed=PDF dokumenty nemají povoleno používat vlastní barvy: volba 'Povolit stránkám používat vlastní barvy' je v prohlížeči deaktivována. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/cy/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/cy/viewer.properties new file mode 100644 index 0000000..dc4fb2e --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/cy/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Tudalen Flaenorol +previous_label=Blaenorol +next.title=Tudalen Nesaf +next_label=Nesaf + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Tudalen +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=o {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} o {{pagesCount}}) + +zoom_out.title=Chwyddo Allan +zoom_out_label=Chwyddo Allan +zoom_in.title=Chwyddo Mewn +zoom_in_label=Chwyddo Mewn +zoom.title=Chwyddo +presentation_mode.title=Newid i'r Modd Cyflwyno +presentation_mode_label=Modd Cyflwyno +open_file.title=Agor Ffeil +open_file_label=Agor +print.title=Argraffu +print_label=Argraffu +download.title=Llwyth +download_label=Llwytho i Lawr +bookmark.title=Golwg cyfredol (copïo neu agor ffenestr newydd) +bookmark_label=Golwg Gyfredol + +# Secondary toolbar and context menu +tools.title=Offer +tools_label=Offer +first_page.title=Mynd i'r Dudalen Gyntaf +first_page.label=Mynd i'r Dudalen Gyntaf +first_page_label=Mynd i'r Dudalen Gyntaf +last_page.title=Mynd i'r Dudalen Olaf +last_page.label=Mynd i'r Dudalen Olaf +last_page_label=Mynd i'r Dudalen Olaf +page_rotate_cw.title=Cylchdroi Clocwedd +page_rotate_cw.label=Cylchdroi Clocwedd +page_rotate_cw_label=Cylchdroi Clocwedd +page_rotate_ccw.title=Cylchdroi Gwrthglocwedd +page_rotate_ccw.label=Cylchdroi Gwrthglocwedd +page_rotate_ccw_label=Cylchdroi Gwrthglocwedd + +cursor_text_select_tool.title=Galluogi Dewis Offeryn Testun +cursor_text_select_tool_label=Offeryn Dewis Testun +cursor_hand_tool.title=Galluogi Offeryn Llaw +cursor_hand_tool_label=Offeryn Llaw + +scroll_vertical.title=Defnyddio Sgrolio Fertigol +scroll_vertical_label=Sgrolio Fertigol +scroll_horizontal.title=Defnyddio Sgrolio Fertigol +scroll_horizontal_label=Sgrolio Fertigol +scroll_wrapped.title=Defnyddio Sgrolio Amlapio +scroll_wrapped_label=Sgrolio Amlapio + +spread_none.title=Peidio uno taeniadau canol +spread_none_label=Dim Taeniadau +spread_odd.title=Uno taeniadau tudalen yn cychwyn gyda thudalennau odrif +spread_odd_label=Taeniadau Odrifau +spread_even.title=Uno taeniadau tudalen yn cychwyn gyda thudalennau eilrif +spread_even_label=Taeniadau Eilrif + +# Document properties dialog box +document_properties.title=Priodweddau Dogfen… +document_properties_label=Priodweddau Dogfen… +document_properties_file_name=Enw ffeil: +document_properties_file_size=Maint ffeil: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} beit) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} beit) +document_properties_title=Teitl: +document_properties_author=Awdur: +document_properties_subject=Pwnc: +document_properties_keywords=Allweddair: +document_properties_creation_date=Dyddiad Creu: +document_properties_modification_date=Dyddiad Addasu: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Crewr: +document_properties_producer=Cynhyrchydd PDF: +document_properties_version=Fersiwn PDF: +document_properties_page_count=Cyfrif Tudalen: +document_properties_page_size=Maint Tudalen: +document_properties_page_size_unit_inches=o fewn +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portread +document_properties_page_size_orientation_landscape=tirlun +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Llythyr +document_properties_page_size_name_legal=Cyfreithiol +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Golwg Gwe Cyflym: +document_properties_linearized_yes=Iawn +document_properties_linearized_no=Na +document_properties_close=Cau + +print_progress_message=Paratoi dogfen ar gyfer ei hargraffu… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Diddymu + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Toglo'r Bar Ochr +toggle_sidebar_notification.title=Toglo'r Bar Ochr (mae'r ddogfen yn cynnwys outline/attachments) +toggle_sidebar_label=Toglo'r Bar Ochr +document_outline.title=Dangos Amlinell Dogfen (clic dwbl i ymestyn/cau pob eitem) +document_outline_label=Amlinelliad Dogfen +attachments.title=Dangos Atodiadau +attachments_label=Atodiadau +thumbs.title=Dangos Lluniau Bach +thumbs_label=Lluniau Bach +findbar.title=Canfod yn y Ddogfen +findbar_label=Canfod + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Tudalen {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Tudalen {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Llun Bach Tudalen {{page}} + +# Find panel button title and messages +find_input.title=Canfod +find_input.placeholder=Canfod yn y ddogfen… +find_previous.title=Canfod enghraifft flaenorol o'r ymadrodd +find_previous_label=Blaenorol +find_next.title=Canfod enghraifft nesaf yr ymadrodd +find_next_label=Nesaf +find_highlight=Amlygu popeth +find_match_case_label=Cydweddu maint +find_entire_word_label=Geiriau cyfan +find_reached_top=Wedi cyrraedd brig y dudalen, parhau o'r gwaelod +find_reached_bottom=Wedi cyrraedd diwedd y dudalen, parhau o'r brig +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} o {{total}} cydweddiad +find_match_count[two]={{current}} o {{total}} cydweddiad +find_match_count[few]={{current}} o {{total}} cydweddiad +find_match_count[many]={{current}} o {{total}} cydweddiad +find_match_count[other]={{current}} o {{total}} cydweddiad +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Mwy na {{limit}} cydweddiad +find_match_count_limit[one]=Mwy na {{limit}} cydweddiad +find_match_count_limit[two]=Mwy na {{limit}} cydweddiad +find_match_count_limit[few]=Mwy na {{limit}} cydweddiad +find_match_count_limit[many]=Mwy na {{limit}} cydweddiad +find_match_count_limit[other]=Mwy na {{limit}} cydweddiad +find_not_found=Heb ganfod ymadrodd + +# Error panel labels +error_more_info=Rhagor o Wybodaeth +error_less_info=Llai o wybodaeth +error_close=Cau +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Neges: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stac: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Ffeil: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Llinell: {{line}} +rendering_error=Digwyddodd gwall wrth adeiladu'r dudalen. + +# Predefined zoom values +page_scale_width=Lled Tudalen +page_scale_fit=Ffit Tudalen +page_scale_auto=Chwyddo Awtomatig +page_scale_actual=Maint Gwirioneddol +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Gwall +loading_error=Digwyddodd gwall wrth lwytho'r PDF. +invalid_file_error=Ffeil PDF annilys neu llwgr. +missing_file_error=Ffeil PDF coll. +unexpected_response_error=Ymateb annisgwyl gan y gweinydd. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anodiad {{type}} ] +password_label=Rhowch gyfrinair i agor y PDF. +password_invalid=Cyfrinair annilys. Ceisiwch eto. +password_ok=Iawn +password_cancel=Diddymu + +printing_not_supported=Rhybudd: Nid yw argraffu yn cael ei gynnal yn llawn gan y porwr. +printing_not_ready=Rhybudd: Nid yw'r PDF wedi ei lwytho'n llawn ar gyfer argraffu. +web_fonts_disabled=Ffontiau gwe wedi eu hanalluogi: methu defnyddio ffontiau PDF mewnblanedig. +document_colors_not_allowed=Nid oes caniatâd i ddogfennau PDF i ddefnyddio eu lliwiau eu hunain: Mae “Caniatáu i dudalennau ddefnyddio eu lliwiau eu hunain” wedi ei atal yn y porwr. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/da/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/da/viewer.properties new file mode 100644 index 0000000..4f05fd9 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/da/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Forrige side +previous_label=Forrige +next.title=Næste side +next_label=Næste + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Side +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=af {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} af {{pagesCount}}) + +zoom_out.title=Zoom ud +zoom_out_label=Zoom ud +zoom_in.title=Zoom ind +zoom_in_label=Zoom ind +zoom.title=Zoom +print.title=Udskriv +print_label=Udskriv +presentation_mode.title=Skift til fuldskærmsvisning +presentation_mode_label=Fuldskærmsvisning +open_file.title=Åbn fil +open_file_label=Åbn +download.title=Hent +download_label=Hent +bookmark.title=Aktuel visning (kopier eller åbn i et nyt vindue) +bookmark_label=Aktuel visning + +# Secondary toolbar and context menu +tools.title=Funktioner +tools_label=Funktioner +first_page.title=Gå til første side +first_page.label=Gå til første side +first_page_label=Gå til første side +last_page.title=Gå til sidste side +last_page.label=Gå til sidste side +last_page_label=Gå til sidste side +page_rotate_cw.title=Roter med uret +page_rotate_cw.label=Roter med uret +page_rotate_cw_label=Roter med uret +page_rotate_ccw.title=Roter mod uret +page_rotate_ccw.label=Roter mod uret +page_rotate_ccw_label=Roter mod uret + +cursor_text_select_tool.title=Aktiver markeringsværktøj +cursor_text_select_tool_label=Markeringsværktøj +cursor_hand_tool.title=Aktiver håndværktøj +cursor_hand_tool_label=Håndværktøj + +scroll_vertical.title=Brug vertikal scrolling +scroll_vertical_label=Vertikal scrolling +scroll_horizontal.title=Brug horisontal scrolling +scroll_horizontal_label=Horisontal scrolling +scroll_wrapped.title=Brug ombrudt scrolling +scroll_wrapped_label=Ombrudt scrolling + +spread_none.title=Vis enkeltsider +spread_none_label=Enkeltsider +spread_odd.title=Vis opslag med ulige sidenumre til venstre +spread_odd_label=Opslag med forside +spread_even.title=Vis opslag med lige sidenumre til venstre +spread_even_label=Opslag uden forside + +# Document properties dialog box +document_properties.title=Dokumentegenskaber… +document_properties_label=Dokumentegenskaber… +document_properties_file_name=Filnavn: +document_properties_file_size=Filstørrelse: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Titel: +document_properties_author=Forfatter: +document_properties_subject=Emne: +document_properties_keywords=Nøgleord: +document_properties_creation_date=Oprettet: +document_properties_modification_date=Redigeret: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Program: +document_properties_producer=PDF-producent: +document_properties_version=PDF-version: +document_properties_page_count=Antal sider: +document_properties_page_size=Sidestørrelse: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=stående +document_properties_page_size_orientation_landscape=liggende +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Hurtig web-visning: +document_properties_linearized_yes=Ja +document_properties_linearized_no=Nej +document_properties_close=Luk + +print_progress_message=Forbereder dokument til udskrivning… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Annuller + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Slå sidepanel til eller fra +toggle_sidebar_notification.title=Slå sidepanel til eller fra (dokumentet indeholder disposition/vedhæftede filer) +toggle_sidebar_label=Slå sidepanel til eller fra +document_outline.title=Vis dokumentets disposition (dobbeltklik for at vise/skjule alle elementer) +document_outline_label=Dokument-disposition +attachments.title=Vis vedhæftede filer +attachments_label=Vedhæftede filer +thumbs.title=Vis miniaturer +thumbs_label=Miniaturer +findbar.title=Find i dokument +findbar_label=Find + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Side {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Side {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniature af side {{page}} + +# Find panel button title and messages +find_input.title=Find +find_input.placeholder=Find i dokument… +find_previous.title=Find den forrige forekomst +find_previous_label=Forrige +find_next.title=Find den næste forekomst +find_next_label=Næste +find_highlight=Fremhæv alle +find_match_case_label=Forskel på store og små bogstaver +find_entire_word_label=Hele ord +find_reached_top=Toppen af siden blev nået, fortsatte fra bunden +find_reached_bottom=Bunden af siden blev nået, fortsatte fra toppen +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} af {{total}} forekomst +find_match_count[two]={{current}} af {{total}} forekomster +find_match_count[few]={{current}} af {{total}} forekomster +find_match_count[many]={{current}} af {{total}} forekomster +find_match_count[other]={{current}} af {{total}} forekomster +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Mere end {{limit}} forekomster +find_match_count_limit[one]=Mere end {{limit}} forekomst +find_match_count_limit[two]=Mere end {{limit}} forekomster +find_match_count_limit[few]=Mere end {{limit}} forekomster +find_match_count_limit[many]=Mere end {{limit}} forekomster +find_match_count_limit[other]=Mere end {{limit}} forekomster +find_not_found=Der blev ikke fundet noget + +# Error panel labels +error_more_info=Mere information +error_less_info=Mindre information +error_close=Luk +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Fejlmeddelelse: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fil: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linje: {{line}} +rendering_error=Der opstod en fejl ved generering af siden. + +# Predefined zoom values +page_scale_width=Sidebredde +page_scale_fit=Tilpas til side +page_scale_auto=Automatisk zoom +page_scale_actual=Faktisk størrelse +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Fejl +loading_error=Der opstod en fejl ved indlæsning af PDF-filen. +invalid_file_error=PDF-filen er ugyldig eller ødelagt. +missing_file_error=Manglende PDF-fil. +unexpected_response_error=Uventet svar fra serveren. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}}kommentar] +password_label=Angiv adgangskode til at åbne denne PDF-fil. +password_invalid=Ugyldig adgangskode. Prøv igen. +password_ok=OK +password_cancel=Fortryd + +printing_not_supported=Advarsel: Udskrivning er ikke fuldt understøttet af browseren. +printing_not_ready=Advarsel: PDF-filen er ikke fuldt indlæst til udskrivning. +web_fonts_disabled=Webskrifttyper er deaktiverede. De indlejrede skrifttyper i PDF-filen kan ikke anvendes. +document_colors_not_allowed=PDF-dokumenter må ikke bruge deres egne farver: 'Tillad sider at vælge deres egne farver' er deaktiveret i browseren. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/de/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/de/viewer.properties new file mode 100644 index 0000000..84240bb --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/de/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Eine Seite zurück +previous_label=Zurück +next.title=Eine Seite vor +next_label=Vor + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Seite +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=von {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} von {{pagesCount}}) + +zoom_out.title=Verkleinern +zoom_out_label=Verkleinern +zoom_in.title=Vergrößern +zoom_in_label=Vergrößern +zoom.title=Zoom +presentation_mode.title=In Präsentationsmodus wechseln +presentation_mode_label=Präsentationsmodus +open_file.title=Datei öffnen +open_file_label=Öffnen +print.title=Drucken +print_label=Drucken +download.title=Dokument speichern +download_label=Speichern +bookmark.title=Aktuelle Ansicht (zum Kopieren oder Öffnen in einem neuen Fenster) +bookmark_label=Aktuelle Ansicht + +# Secondary toolbar and context menu +tools.title=Werkzeuge +tools_label=Werkzeuge +first_page.title=Erste Seite anzeigen +first_page.label=Erste Seite anzeigen +first_page_label=Erste Seite anzeigen +last_page.title=Letzte Seite anzeigen +last_page.label=Letzte Seite anzeigen +last_page_label=Letzte Seite anzeigen +page_rotate_cw.title=Im Uhrzeigersinn drehen +page_rotate_cw.label=Im Uhrzeigersinn drehen +page_rotate_cw_label=Im Uhrzeigersinn drehen +page_rotate_ccw.title=Gegen Uhrzeigersinn drehen +page_rotate_ccw.label=Gegen Uhrzeigersinn drehen +page_rotate_ccw_label=Gegen Uhrzeigersinn drehen + +cursor_text_select_tool.title=Textauswahl-Werkzeug aktivieren +cursor_text_select_tool_label=Textauswahl-Werkzeug +cursor_hand_tool.title=Hand-Werkzeug aktivieren +cursor_hand_tool_label=Hand-Werkzeug + +scroll_vertical.title=Seiten übereinander anordnen +scroll_vertical_label=Vertikale Seitenanordnung +scroll_horizontal.title=Seiten nebeneinander anordnen +scroll_horizontal_label=Horizontale Seitenanordnung +scroll_wrapped.title=Seiten neben- und übereinander anordnen, anhängig vom Platz +scroll_wrapped_label=Kombinierte Seitenanordnung + +spread_none.title=Seiten nicht nebeneinander anzeigen +spread_none_label=Einzelne Seiten +spread_odd.title=Jeweils eine ungerade und eine gerade Seite nebeneinander anzeigen +spread_odd_label=Ungerade + gerade Seite +spread_even.title=Jeweils eine gerade und eine ungerade Seite nebeneinander anzeigen +spread_even_label=Gerade + ungerade Seite + +# Document properties dialog box +document_properties.title=Dokumenteigenschaften +document_properties_label=Dokumenteigenschaften… +document_properties_file_name=Dateiname: +document_properties_file_size=Dateigröße: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} Bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} Bytes) +document_properties_title=Titel: +document_properties_author=Autor: +document_properties_subject=Thema: +document_properties_keywords=Stichwörter: +document_properties_creation_date=Erstelldatum: +document_properties_modification_date=Bearbeitungsdatum: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}} {{time}} +document_properties_creator=Anwendung: +document_properties_producer=PDF erstellt mit: +document_properties_version=PDF-Version: +document_properties_page_count=Seitenzahl: +document_properties_page_size=Seitengröße: +document_properties_page_size_unit_inches=Zoll +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=Hochformat +document_properties_page_size_orientation_landscape=Querformat +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Schnelle Webanzeige: +document_properties_linearized_yes=Ja +document_properties_linearized_no=Nein +document_properties_close=Schließen + +print_progress_message=Dokument wird für Drucken vorbereitet… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=Abbrechen + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Sidebar umschalten +toggle_sidebar_notification.title=Sidebar umschalten (Dokument enthält Dokumentstruktur/Anhänge) +toggle_sidebar_label=Sidebar umschalten +document_outline.title=Dokumentstruktur anzeigen (Doppelklicken, um alle Einträge aus- bzw. einzuklappen) +document_outline_label=Dokumentstruktur +attachments.title=Anhänge anzeigen +attachments_label=Anhänge +thumbs.title=Miniaturansichten anzeigen +thumbs_label=Miniaturansichten +findbar.title=Dokument durchsuchen +findbar_label=Suchen + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Seite {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Seite {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniaturansicht von Seite {{page}} + +# Find panel button title and messages +find_input.title=Suchen +find_input.placeholder=Im Dokument suchen… +find_previous.title=Vorheriges Vorkommen des Suchbegriffs finden +find_previous_label=Zurück +find_next.title=Nächstes Vorkommen des Suchbegriffs finden +find_next_label=Weiter +find_highlight=Alle hervorheben +find_match_case_label=Groß-/Kleinschreibung beachten +find_entire_word_label=Ganze Wörter +find_reached_top=Anfang des Dokuments erreicht, fahre am Ende fort +find_reached_bottom=Ende des Dokuments erreicht, fahre am Anfang fort +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} von {{total}} Übereinstimmung +find_match_count[two]={{current}} von {{total}} Übereinstimmungen +find_match_count[few]={{current}} von {{total}} Übereinstimmungen +find_match_count[many]={{current}} von {{total}} Übereinstimmungen +find_match_count[other]={{current}} von {{total}} Übereinstimmungen +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Mehr als {{limit}} Übereinstimmungen +find_match_count_limit[one]=Mehr als {{limit}} Übereinstimmung +find_match_count_limit[two]=Mehr als {{limit}} Übereinstimmungen +find_match_count_limit[few]=Mehr als {{limit}} Übereinstimmungen +find_match_count_limit[many]=Mehr als {{limit}} Übereinstimmungen +find_match_count_limit[other]=Mehr als {{limit}} Übereinstimmungen +find_not_found=Suchbegriff nicht gefunden + +# Error panel labels +error_more_info=Mehr Informationen +error_less_info=Weniger Informationen +error_close=Schließen +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js Version {{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Nachricht: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Aufrufliste: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Datei: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Zeile: {{line}} +rendering_error=Beim Darstellen der Seite trat ein Fehler auf. + +# Predefined zoom values +page_scale_width=Seitenbreite +page_scale_fit=Seitengröße +page_scale_auto=Automatischer Zoom +page_scale_actual=Originalgröße +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}} % + +# Loading indicator messages +loading_error_indicator=Fehler +loading_error=Beim Laden der PDF-Datei trat ein Fehler auf. +invalid_file_error=Ungültige oder beschädigte PDF-Datei +missing_file_error=Fehlende PDF-Datei +unexpected_response_error=Unerwartete Antwort des Servers + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anlage: {{type}}] +password_label=Geben Sie zum Öffnen der PDF-Datei deren Passwort ein. +password_invalid=Falsches Passwort. Bitte versuchen Sie es erneut. +password_ok=OK +password_cancel=Abbrechen + +printing_not_supported=Warnung: Die Drucken-Funktion wird durch diesen Browser nicht vollständig unterstützt. +printing_not_ready=Warnung: Die PDF-Datei ist nicht vollständig geladen, dies ist für das Drucken aber empfohlen. +web_fonts_disabled=Web-Schriftarten sind deaktiviert: Eingebettete PDF-Schriftarten konnten nicht geladen werden. +document_colors_not_allowed=PDF-Dokumenten ist es nicht erlaubt, ihre eigenen Farben zu verwenden: 'Seiten das Verwenden von eigenen Farben erlauben' ist im Browser deaktiviert. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/dsb/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/dsb/viewer.properties new file mode 100644 index 0000000..eb567ec --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/dsb/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pjerwjejšny bok +previous_label=Slědk +next.title=Pśiducy bok +next_label=Dalej + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Bok +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=z {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} z {{pagesCount}}) + +zoom_out.title=Pómjeńšyś +zoom_out_label=Pómjeńšyś +zoom_in.title=Pówětšyś +zoom_in_label=Pówětšyś +zoom.title=Skalěrowanje +presentation_mode.title=Do prezentaciskego modusa pśejś +presentation_mode_label=Prezentaciski modus +open_file.title=Dataju wócyniś +open_file_label=Wócyniś +print.title=Śišćaś +print_label=Śišćaś +download.title=Ześěgnuś +download_label=Ześěgnuś +bookmark.title=Aktualny naglěd (kopěrowaś abo w nowem woknje wócyniś) +bookmark_label=Aktualny naglěd + +# Secondary toolbar and context menu +tools.title=Rědy +tools_label=Rědy +first_page.title=K prědnemu bokoju +first_page.label=K prědnemu bokoju +first_page_label=K prědnemu bokoju +last_page.title=K slědnemu bokoju +last_page.label=K slědnemu bokoju +last_page_label=K slědnemu bokoju +page_rotate_cw.title=Wobwjertnuś ako špěra źo +page_rotate_cw.label=Wobwjertnuś ako špěra źo +page_rotate_cw_label=Wobwjertnuś ako špěra źo +page_rotate_ccw.title=Wobwjertnuś nawopaki ako špěra źo +page_rotate_ccw.label=Wobwjertnuś nawopaki ako špěra źo +page_rotate_ccw_label=Wobwjertnuś nawopaki ako špěra źo + +cursor_text_select_tool.title=Rěd za wuběranje teksta zmóžniś +cursor_text_select_tool_label=Rěd za wuběranje teksta +cursor_hand_tool.title=Rucny rěd zmóžniś +cursor_hand_tool_label=Rucny rěd + +scroll_vertical.title=Wertikalne suwanje wužywaś +scroll_vertical_label=Wertikalnje suwanje +scroll_horizontal.title=Horicontalne suwanje wužywaś +scroll_horizontal_label=Horicontalne suwanje +scroll_wrapped.title=Pózlažke suwanje wužywaś +scroll_wrapped_label=Pózlažke suwanje + +spread_none.title=Boki njezwězaś +spread_none_label=Žeden dwójny bok +spread_odd.title=Boki zachopinajucy z njerownymi bokami zwězaś +spread_odd_label=Njerowne boki +spread_even.title=Boki zachopinajucy z rownymi bokami zwězaś +spread_even_label=Rowne boki + +# Document properties dialog box +document_properties.title=Dokumentowe kakosći… +document_properties_label=Dokumentowe kakosći… +document_properties_file_name=Mě dataje: +document_properties_file_size=Wjelikosć dataje: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bajtow) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bajtow) +document_properties_title=Titel: +document_properties_author=Awtor: +document_properties_subject=Tema: +document_properties_keywords=Klucowe słowa: +document_properties_creation_date=Datum napóranja: +document_properties_modification_date=Datum změny: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Awtor: +document_properties_producer=PDF-gótowaŕ: +document_properties_version=PDF-wersija: +document_properties_page_count=Licba bokow: +document_properties_page_size=Wjelikosć boka: +document_properties_page_size_unit_inches=col +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=wusoki format +document_properties_page_size_orientation_landscape=prěcny format +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=Jo +document_properties_linearized_no=Ně +document_properties_close=Zacyniś + +print_progress_message=Dokument pśigótujo se za śišćanje… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Pśetergnuś + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Bócnicu pokazaś/schowaś +toggle_sidebar_notification.title=Bocnicu pśešaltowaś (dokument wopśimujo pśeglěd/pśipiski) +toggle_sidebar_label=Bócnicu pokazaś/schowaś +document_outline.title=Dokumentowe naraźenje pokazaś (dwójne kliknjenje, aby se wšykne zapiski pokazali/schowali) +document_outline_label=Dokumentowa struktura +attachments.title=Pśidanki pokazaś +attachments_label=Pśidanki +thumbs.title=Miniatury pokazaś +thumbs_label=Miniatury +findbar.title=W dokumenśe pytaś +findbar_label=Pytaś + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Bok {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Bok {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura boka {{page}} + +# Find panel button title and messages +find_input.title=Pytaś +find_input.placeholder=W dokumenśe pytaś… +find_previous.title=Pjerwjejšne wustupowanje pytańskego wuraza pytaś +find_previous_label=Slědk +find_next.title=Pśidujuce wustupowanje pytańskego wuraza pytaś +find_next_label=Dalej +find_highlight=Wšykne wuzwignuś +find_match_case_label=Na wjelikopisanje źiwaś +find_entire_word_label=Cełe słowa +find_reached_top=Zachopjeńk dokumenta dostany, pókšacujo se z kóńcom +find_reached_bottom=Kóńc dokumenta dostany, pókšacujo se ze zachopjeńkom +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} z {{total}} wótpowědnika +find_match_count[two]={{current}} z {{total}} wótpowědnikowu +find_match_count[few]={{current}} z {{total}} wótpowědnikow +find_match_count[many]={{current}} z {{total}} wótpowědnikow +find_match_count[other]={{current}} z {{total}} wótpowědnikow +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Wěcej ako {{limit}} wótpowědnikow +find_match_count_limit[one]=Wěcej ako {{limit}} wótpowědnik +find_match_count_limit[two]=Wěcej ako {{limit}} wótpowědnika +find_match_count_limit[few]=Wěcej ako {{limit}} wótpowědniki +find_match_count_limit[many]=Wěcej ako {{limit}} wótpowědnikow +find_match_count_limit[other]=Wěcej ako {{limit}} wótpowědnikow +find_not_found=Pytański wuraz njejo se namakał + +# Error panel labels +error_more_info=Wěcej informacijow +error_less_info=Mjenjej informacijow +error_close=Zacyniś +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Powěźenka: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Lisćina zawołanjow: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Dataja: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Smužka: {{line}} +rendering_error=Pśi zwobraznjanju boka jo zmólka nastała. + +# Predefined zoom values +page_scale_width=Šyrokosć boka +page_scale_fit=Wjelikosć boka +page_scale_auto=Awtomatiske skalěrowanje +page_scale_actual=Aktualna wjelikosć +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Zmólka +loading_error=Pśi zacytowanju PDF jo zmólka nastała. +invalid_file_error=Njepłaśiwa abo wobškóźona PDF-dataja. +missing_file_error=Felujuca PDF-dataja. +unexpected_response_error=Njewócakane serwerowe wótegrono. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Typ pśipiskow: {{type}}] +password_label=Zapódajśo gronidło, aby PDF-dataju wócynił. +password_invalid=Njepłaśiwe gronidło. Pšosym wopytajśo hyšći raz. +password_ok=W pórěźe +password_cancel=Pśetergnuś + +printing_not_supported=Warnowanje: Śišćanje njepódpěra se połnje pśez toś ten wobglědowak. +printing_not_ready=Warnowanje: PDF njejo se za śišćanje dopołnje zacytał. +web_fonts_disabled=Webpisma su znjemóžnjone: njejo móžno, zasajźone PDF-pisma wužywaś. +document_colors_not_allowed=PDF-dokumenty njesměju swóje barwy wužywaś: 'Bokam dowóliś, swóje barwy wužywaś' jo we wobglědowaku znjemóžnjone. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/el/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/el/viewer.properties new file mode 100644 index 0000000..d7a6abc --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/el/viewer.properties @@ -0,0 +1,246 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Προηγούμενη σελίδα +previous_label=Προηγούμενη +next.title=Επόμενη σελίδα +next_label=Επόμενη + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Σελίδα +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=από {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} από {{pagesCount}}) + +zoom_out.title=Σμίκρυνση +zoom_out_label=Σμίκρυνση +zoom_in.title=Μεγέθυνση +zoom_in_label=Μεγέθυνση +zoom.title=Ζουμ +presentation_mode.title=Εναλλαγή σε λειτουργία παρουσίασης +presentation_mode_label=Λειτουργία παρουσίασης +open_file.title=Άνοιγμα αρχείου +open_file_label=Άνοιγμα +print.title=Εκτύπωση +print_label=Εκτύπωση +download.title=Λήψη +download_label=Λήψη +bookmark.title=Τρέχουσα προβολή (αντιγραφή ή άνοιγμα σε νέο παράθυρο) +bookmark_label=Τρέχουσα προβολή + +# Secondary toolbar and context menu +tools.title=Εργαλεία +tools_label=Εργαλεία +first_page.title=Μετάβαση στην πρώτη σελίδα +first_page.label=Μετάβαση στην πρώτη σελίδα +first_page_label=Μετάβαση στην πρώτη σελίδα +last_page.title=Μετάβαση στην τελευταία σελίδα +last_page.label=Μετάβαση στην τελευταία σελίδα +last_page_label=Μετάβαση στην τελευταία σελίδα +page_rotate_cw.title=Δεξιόστροφη περιστροφή +page_rotate_cw.label=Δεξιόστροφη περιστροφή +page_rotate_cw_label=Δεξιόστροφη περιστροφή +page_rotate_ccw.title=Αριστερόστροφη περιστροφή +page_rotate_ccw.label=Αριστερόστροφη περιστροφή +page_rotate_ccw_label=Αριστερόστροφη περιστροφή + +cursor_text_select_tool.title=Ενεργοποίηση εργαλείου επιλογής κειμένου +cursor_text_select_tool_label=Εργαλείο επιλογής κειμένου +cursor_hand_tool.title=Ενεργοποίηση εργαλείου χεριού +cursor_hand_tool_label=Εργαλείο χεριού + +scroll_vertical.title=Χρήση κάθετης κύλισης +scroll_vertical_label=Κάθετη κύλιση +scroll_horizontal.title=Χρήση οριζόντιας κύλισης +scroll_horizontal_label=Οριζόντια κύλιση +scroll_wrapped.title=Χρήση κυκλικής κύλισης +scroll_wrapped_label=Κυκλική κύλιση + +spread_none.title=Να μην γίνει σύνδεση επεκτάσεων σελίδων +spread_none_label=Χωρίς επεκτάσεις +spread_odd.title=Σύνδεση επεκτάσεων σελίδων ξεκινώντας από τις μονές σελίδες +spread_odd_label=Μονές επεκτάσεις +spread_even.title=Σύνδεση επεκτάσεων σελίδων ξεκινώντας από τις ζυγές σελίδες +spread_even_label=Ζυγές επεκτάσεις + +# Document properties dialog box +document_properties.title=Ιδιότητες εγγράφου… +document_properties_label=Ιδιότητες εγγράφου… +document_properties_file_name=Όνομα αρχείου: +document_properties_file_size=Μέγεθος αρχείου: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Τίτλος: +document_properties_author=Συγγραφέας: +document_properties_subject=Θέμα: +document_properties_keywords=Λέξεις κλειδιά: +document_properties_creation_date=Ημερομηνία δημιουργίας: +document_properties_modification_date=Ημερομηνία τροποποίησης: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Δημιουργός: +document_properties_producer=Παραγωγός PDF: +document_properties_version=Έκδοση PDF: +document_properties_page_count=Αριθμός σελίδων: +document_properties_page_size=Μέγεθος σελίδας: +document_properties_page_size_unit_inches=ίντσες +document_properties_page_size_unit_millimeters=χιλιοστά +document_properties_page_size_orientation_portrait=κατακόρυφα +document_properties_page_size_orientation_landscape=οριζόντια +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Επιστολή +document_properties_page_size_name_legal=Τύπου Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Ταχεία προβολή ιστού: +document_properties_linearized_yes=Ναι +document_properties_linearized_no=Όχι +document_properties_close=Κλείσιμο + +print_progress_message=Προετοιμασία του εγγράφου για εκτύπωση… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Άκυρο + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=(Απ)ενεργοποίηση πλευρικής στήλης +toggle_sidebar_notification.title=(Απ)ενεργοποίηση πλευρικής στήλης (το έγγραφο περιέχει περίγραμμα/συνημμένα) +toggle_sidebar_label=(Απ)ενεργοποίηση πλευρικής στήλης +document_outline.title=Εμφάνιση διάρθρωσης εγγράφου (διπλό κλικ για ανάπτυξη/σύμπτυξη όλων των στοιχείων) +document_outline_label=Διάρθρωση εγγράφου +attachments.title=Προβολή συνημμένων +attachments_label=Συνημμένα +thumbs.title=Προβολή μικρογραφιών +thumbs_label=Μικρογραφίες +findbar.title=Εύρεση στο έγγραφο +findbar_label=Εύρεση + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Σελίδα {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Μικρογραφία της σελίδας {{page}} + +# Find panel button title and messages +find_input.title=Εύρεση +find_input.placeholder=Εύρεση στο έγγραφο… +find_previous.title=Εύρεση της προηγούμενης εμφάνισης της φράσης +find_previous_label=Προηγούμενο +find_next.title=Εύρεση της επόμενης εμφάνισης της φράσης +find_next_label=Επόμενο +find_highlight=Επισήμανση όλων +find_match_case_label=Ταίριασμα χαρακτήρα +find_entire_word_label=Ολόκληρες λέξεις +find_reached_top=Έλευση στην αρχή του εγγράφου, συνέχεια από το τέλος +find_reached_bottom=Έλευση στο τέλος του εγγράφου, συνέχεια από την αρχή +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} από {{total}} αντιστοιχία +find_match_count[two]={{current}} από {{total}} αντιστοιχίες +find_match_count[few]={{current}} από {{total}} αντιστοιχίες +find_match_count[many]={{current}} από {{total}} αντιστοιχίες +find_match_count[other]={{current}} από {{total}} αντιστοιχίες +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Περισσότερες από {{limit}} αντιστοιχίες +find_match_count_limit[one]=Περισσότερες από {{limit}} αντιστοιχία +find_match_count_limit[two]=Περισσότερες από {{limit}} αντιστοιχίες +find_match_count_limit[few]=Περισσότερες από {{limit}} αντιστοιχίες +find_match_count_limit[many]=Περισσότερες από {{limit}} αντιστοιχίες +find_match_count_limit[other]=Περισσότερες από {{limit}} αντιστοιχίες +find_not_found=Η φράση δεν βρέθηκε + +# Error panel labels +error_more_info=Περισσότερες πληροφορίες +error_less_info=Λιγότερες πληροφορίες +error_close=Κλείσιμο +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Μήνυμα: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Στοίβα: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Αρχείο: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Γραμμή: {{line}} +rendering_error=Προέκυψε σφάλμα κατά την ανάλυση της σελίδας. + +# Predefined zoom values +page_scale_width=Πλάτος σελίδας +page_scale_fit=Μέγεθος σελίδας +page_scale_auto=Αυτόματο ζουμ +page_scale_actual=Πραγματικό μέγεθος +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Σφάλμα +loading_error=Προέκυψε ένα σφάλμα κατά τη φόρτωση του PDF. +invalid_file_error=Μη έγκυρο ή κατεστραμμένο αρχείο PDF. +missing_file_error=Λείπει αρχείο PDF. +unexpected_response_error=Μη αναμενόμενη απόκριση από το διακομιστή. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Σχόλιο] +password_label=Εισαγωγή κωδικού για το άνοιγμα του PDF αρχείου. +password_invalid=Μη έγκυρος κωδικός. Προσπαθείστε ξανά. +password_ok=ΟΚ +password_cancel=Ακύρωση + +printing_not_supported=Προειδοποίηση: Η εκτύπωση δεν υποστηρίζεται πλήρως από αυτόν τον περιηγητή. +printing_not_ready=Προειδοποίηση: Το PDF δεν φορτώθηκε πλήρως για εκτύπωση. +web_fonts_disabled=Οι γραμματοσειρές Web απενεργοποιημένες: αδυναμία χρήσης των ενσωματωμένων γραμματοσειρών PDF. +document_colors_not_allowed=Στα PDF έγγραφα δεν επιτρέπεται να χρησιμοποιούν τα δικά τους χρώματα: Το “Να επιτρέπεται στις σελίδες να επιλέγουν τα δικά τους χρώματα” είναι απενεργοποιημένο στον περιηγητή. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/en-CA/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/en-CA/viewer.properties new file mode 100644 index 0000000..df7a687 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/en-CA/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Previous Page +previous_label=Previous +next.title=Next Page +next_label=Next + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Page +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=of {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) + +zoom_out.title=Zoom Out +zoom_out_label=Zoom Out +zoom_in.title=Zoom In +zoom_in_label=Zoom In +zoom.title=Zoom +presentation_mode.title=Switch to Presentation Mode +presentation_mode_label=Presentation Mode +open_file.title=Open File +open_file_label=Open +print.title=Print +print_label=Print +download.title=Download +download_label=Download +bookmark.title=Current view (copy or open in new window) +bookmark_label=Current View + +# Secondary toolbar and context menu +tools.title=Tools +tools_label=Tools +first_page.title=Go to First Page +first_page.label=Go to First Page +first_page_label=Go to First Page +last_page.title=Go to Last Page +last_page.label=Go to Last Page +last_page_label=Go to Last Page +page_rotate_cw.title=Rotate Clockwise +page_rotate_cw.label=Rotate Clockwise +page_rotate_cw_label=Rotate Clockwise +page_rotate_ccw.title=Rotate Anti-Clockwise +page_rotate_ccw.label=Rotate Anti-Clockwise +page_rotate_ccw_label=Rotate Anti-Clockwise + +cursor_text_select_tool.title=Enable Text Selection Tool +cursor_text_select_tool_label=Text Selection Tool +cursor_hand_tool.title=Enable Hand Tool +cursor_hand_tool_label=Hand Tool + +scroll_vertical.title=Use Vertical Scrolling +scroll_vertical_label=Vertical Scrolling +scroll_horizontal.title=Use Horizontal Scrolling +scroll_horizontal_label=Horizontal Scrolling +scroll_wrapped.title=Use Wrapped Scrolling +scroll_wrapped_label=Wrapped Scrolling + +spread_none.title=Do not join page spreads +spread_none_label=No Spreads +spread_odd.title=Join page spreads starting with odd-numbered pages +spread_odd_label=Odd Spreads +spread_even.title=Join page spreads starting with even-numbered pages +spread_even_label=Even Spreads + +# Document properties dialog box +document_properties.title=Document Properties… +document_properties_label=Document Properties… +document_properties_file_name=File name: +document_properties_file_size=File size: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} kB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Title: +document_properties_author=Author: +document_properties_subject=Subject: +document_properties_keywords=Keywords: +document_properties_creation_date=Creation Date: +document_properties_modification_date=Modification Date: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creator: +document_properties_producer=PDF Producer: +document_properties_version=PDF Version: +document_properties_page_count=Page Count: +document_properties_page_size=Page Size: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portrait +document_properties_page_size_orientation_landscape=landscape +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=Yes +document_properties_linearized_no=No +document_properties_close=Close + +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancel + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Toggle Sidebar +toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments) +toggle_sidebar_label=Toggle Sidebar +document_outline.title=Show Document Outline (double-click to expand/collapse all items) +document_outline_label=Document Outline +attachments.title=Show Attachments +attachments_label=Attachments +thumbs.title=Show Thumbnails +thumbs_label=Thumbnails +findbar.title=Find in Document +findbar_label=Find + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Page {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Page {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Thumbnail of Page {{page}} + +# Find panel button title and messages +find_input.title=Find +find_input.placeholder=Find in document… +find_previous.title=Find the previous occurrence of the phrase +find_previous_label=Previous +find_next.title=Find the next occurrence of the phrase +find_next_label=Next +find_highlight=Highlight all +find_match_case_label=Match case +find_entire_word_label=Whole words +find_reached_top=Reached top of document, continued from bottom +find_reached_bottom=Reached end of document, continued from top +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} of {{total}} match +find_match_count[two]={{current}} of {{total}} matches +find_match_count[few]={{current}} of {{total}} matches +find_match_count[many]={{current}} of {{total}} matches +find_match_count[other]={{current}} of {{total}} matches +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=More than {{limit}} matches +find_match_count_limit[one]=More than {{limit}} match +find_match_count_limit[two]=More than {{limit}} matches +find_match_count_limit[few]=More than {{limit}} matches +find_match_count_limit[many]=More than {{limit}} matches +find_match_count_limit[other]=More than {{limit}} matches +find_not_found=Phrase not found + +# Error panel labels +error_more_info=More Information +error_less_info=Less Information +error_close=Close +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Message: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=File: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Line: {{line}} +rendering_error=An error occurred while rendering the page. + +# Predefined zoom values +page_scale_width=Page Width +page_scale_fit=Page Fit +page_scale_auto=Automatic Zoom +page_scale_actual=Actual Size +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=An error occurred while loading the PDF. +invalid_file_error=Invalid or corrupted PDF file. +missing_file_error=Missing PDF file. +unexpected_response_error=Unexpected server response. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=Enter the password to open this PDF file. +password_invalid=Invalid password. Please try again. +password_ok=OK +password_cancel=Cancel + +printing_not_supported=Warning: Printing is not fully supported by this browser. +printing_not_ready=Warning: The PDF is not fully loaded for printing. +web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts. +document_colors_not_allowed=PDF documents are not allowed to use their own colours: “Allow pages to choose their own colours” is deactivated in the browser. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/en-GB/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/en-GB/viewer.properties new file mode 100644 index 0000000..df7a687 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/en-GB/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Previous Page +previous_label=Previous +next.title=Next Page +next_label=Next + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Page +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=of {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) + +zoom_out.title=Zoom Out +zoom_out_label=Zoom Out +zoom_in.title=Zoom In +zoom_in_label=Zoom In +zoom.title=Zoom +presentation_mode.title=Switch to Presentation Mode +presentation_mode_label=Presentation Mode +open_file.title=Open File +open_file_label=Open +print.title=Print +print_label=Print +download.title=Download +download_label=Download +bookmark.title=Current view (copy or open in new window) +bookmark_label=Current View + +# Secondary toolbar and context menu +tools.title=Tools +tools_label=Tools +first_page.title=Go to First Page +first_page.label=Go to First Page +first_page_label=Go to First Page +last_page.title=Go to Last Page +last_page.label=Go to Last Page +last_page_label=Go to Last Page +page_rotate_cw.title=Rotate Clockwise +page_rotate_cw.label=Rotate Clockwise +page_rotate_cw_label=Rotate Clockwise +page_rotate_ccw.title=Rotate Anti-Clockwise +page_rotate_ccw.label=Rotate Anti-Clockwise +page_rotate_ccw_label=Rotate Anti-Clockwise + +cursor_text_select_tool.title=Enable Text Selection Tool +cursor_text_select_tool_label=Text Selection Tool +cursor_hand_tool.title=Enable Hand Tool +cursor_hand_tool_label=Hand Tool + +scroll_vertical.title=Use Vertical Scrolling +scroll_vertical_label=Vertical Scrolling +scroll_horizontal.title=Use Horizontal Scrolling +scroll_horizontal_label=Horizontal Scrolling +scroll_wrapped.title=Use Wrapped Scrolling +scroll_wrapped_label=Wrapped Scrolling + +spread_none.title=Do not join page spreads +spread_none_label=No Spreads +spread_odd.title=Join page spreads starting with odd-numbered pages +spread_odd_label=Odd Spreads +spread_even.title=Join page spreads starting with even-numbered pages +spread_even_label=Even Spreads + +# Document properties dialog box +document_properties.title=Document Properties… +document_properties_label=Document Properties… +document_properties_file_name=File name: +document_properties_file_size=File size: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} kB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Title: +document_properties_author=Author: +document_properties_subject=Subject: +document_properties_keywords=Keywords: +document_properties_creation_date=Creation Date: +document_properties_modification_date=Modification Date: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creator: +document_properties_producer=PDF Producer: +document_properties_version=PDF Version: +document_properties_page_count=Page Count: +document_properties_page_size=Page Size: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portrait +document_properties_page_size_orientation_landscape=landscape +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=Yes +document_properties_linearized_no=No +document_properties_close=Close + +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancel + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Toggle Sidebar +toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments) +toggle_sidebar_label=Toggle Sidebar +document_outline.title=Show Document Outline (double-click to expand/collapse all items) +document_outline_label=Document Outline +attachments.title=Show Attachments +attachments_label=Attachments +thumbs.title=Show Thumbnails +thumbs_label=Thumbnails +findbar.title=Find in Document +findbar_label=Find + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Page {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Page {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Thumbnail of Page {{page}} + +# Find panel button title and messages +find_input.title=Find +find_input.placeholder=Find in document… +find_previous.title=Find the previous occurrence of the phrase +find_previous_label=Previous +find_next.title=Find the next occurrence of the phrase +find_next_label=Next +find_highlight=Highlight all +find_match_case_label=Match case +find_entire_word_label=Whole words +find_reached_top=Reached top of document, continued from bottom +find_reached_bottom=Reached end of document, continued from top +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} of {{total}} match +find_match_count[two]={{current}} of {{total}} matches +find_match_count[few]={{current}} of {{total}} matches +find_match_count[many]={{current}} of {{total}} matches +find_match_count[other]={{current}} of {{total}} matches +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=More than {{limit}} matches +find_match_count_limit[one]=More than {{limit}} match +find_match_count_limit[two]=More than {{limit}} matches +find_match_count_limit[few]=More than {{limit}} matches +find_match_count_limit[many]=More than {{limit}} matches +find_match_count_limit[other]=More than {{limit}} matches +find_not_found=Phrase not found + +# Error panel labels +error_more_info=More Information +error_less_info=Less Information +error_close=Close +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Message: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=File: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Line: {{line}} +rendering_error=An error occurred while rendering the page. + +# Predefined zoom values +page_scale_width=Page Width +page_scale_fit=Page Fit +page_scale_auto=Automatic Zoom +page_scale_actual=Actual Size +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=An error occurred while loading the PDF. +invalid_file_error=Invalid or corrupted PDF file. +missing_file_error=Missing PDF file. +unexpected_response_error=Unexpected server response. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=Enter the password to open this PDF file. +password_invalid=Invalid password. Please try again. +password_ok=OK +password_cancel=Cancel + +printing_not_supported=Warning: Printing is not fully supported by this browser. +printing_not_ready=Warning: The PDF is not fully loaded for printing. +web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts. +document_colors_not_allowed=PDF documents are not allowed to use their own colours: “Allow pages to choose their own colours” is deactivated in the browser. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/en-US/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/en-US/viewer.properties new file mode 100644 index 0000000..6f7598e --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/en-US/viewer.properties @@ -0,0 +1,247 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Previous Page +previous_label=Previous +next.title=Next Page +next_label=Next + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Page +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=of {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) + +zoom_out.title=Zoom Out +zoom_out_label=Zoom Out +zoom_in.title=Zoom In +zoom_in_label=Zoom In +zoom.title=Zoom +presentation_mode.title=Switch to Presentation Mode +presentation_mode_label=Presentation Mode +open_file.title=Open File +open_file_label=Open +print.title=Print +print_label=Print +download.title=Download +download_label=Download +bookmark.title=Current view (copy or open in new window) +bookmark_label=Current View + +# Secondary toolbar and context menu +tools.title=Tools +tools_label=Tools +first_page.title=Go to First Page +first_page.label=Go to First Page +first_page_label=Go to First Page +last_page.title=Go to Last Page +last_page.label=Go to Last Page +last_page_label=Go to Last Page +page_rotate_cw.title=Rotate Clockwise +page_rotate_cw.label=Rotate Clockwise +page_rotate_cw_label=Rotate Clockwise +page_rotate_ccw.title=Rotate Counterclockwise +page_rotate_ccw.label=Rotate Counterclockwise +page_rotate_ccw_label=Rotate Counterclockwise + +cursor_text_select_tool.title=Enable Text Selection Tool +cursor_text_select_tool_label=Text Selection Tool +cursor_hand_tool.title=Enable Hand Tool +cursor_hand_tool_label=Hand Tool + +scroll_vertical.title=Use Vertical Scrolling +scroll_vertical_label=Vertical Scrolling +scroll_horizontal.title=Use Horizontal Scrolling +scroll_horizontal_label=Horizontal Scrolling +scroll_wrapped.title=Use Wrapped Scrolling +scroll_wrapped_label=Wrapped Scrolling + +spread_none.title=Do not join page spreads +spread_none_label=No Spreads +spread_odd.title=Join page spreads starting with odd-numbered pages +spread_odd_label=Odd Spreads +spread_even.title=Join page spreads starting with even-numbered pages +spread_even_label=Even Spreads + +# Document properties dialog box +document_properties.title=Document Properties… +document_properties_label=Document Properties… +document_properties_file_name=File name: +document_properties_file_size=File size: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Title: +document_properties_author=Author: +document_properties_subject=Subject: +document_properties_keywords=Keywords: +document_properties_creation_date=Creation Date: +document_properties_modification_date=Modification Date: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creator: +document_properties_producer=PDF Producer: +document_properties_version=PDF Version: +document_properties_page_count=Page Count: +document_properties_page_size=Page Size: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portrait +document_properties_page_size_orientation_landscape=landscape +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=Yes +document_properties_linearized_no=No +document_properties_close=Close + +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancel + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Toggle Sidebar +toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments) +toggle_sidebar_label=Toggle Sidebar +document_outline.title=Show Document Outline (double-click to expand/collapse all items) +document_outline_label=Document Outline +attachments.title=Show Attachments +attachments_label=Attachments +thumbs.title=Show Thumbnails +thumbs_label=Thumbnails +findbar.title=Find in Document +findbar_label=Find + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Page {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Page {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Thumbnail of Page {{page}} + +# Find panel button title and messages +find_input.title=Find +find_input.placeholder=Find in document… +find_previous.title=Find the previous occurrence of the phrase +find_previous_label=Previous +find_next.title=Find the next occurrence of the phrase +find_next_label=Next +find_highlight=Highlight all +find_match_case_label=Match case +find_entire_word_label=Whole words +find_reached_top=Reached top of document, continued from bottom +find_reached_bottom=Reached end of document, continued from top +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} of {{total}} match +find_match_count[two]={{current}} of {{total}} matches +find_match_count[few]={{current}} of {{total}} matches +find_match_count[many]={{current}} of {{total}} matches +find_match_count[other]={{current}} of {{total}} matches +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=More than {{limit}} matches +find_match_count_limit[one]=More than {{limit}} match +find_match_count_limit[two]=More than {{limit}} matches +find_match_count_limit[few]=More than {{limit}} matches +find_match_count_limit[many]=More than {{limit}} matches +find_match_count_limit[other]=More than {{limit}} matches +find_not_found=Phrase not found + +# Error panel labels +error_more_info=More Information +error_less_info=Less Information +error_close=Close +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Message: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=File: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Line: {{line}} +rendering_error=An error occurred while rendering the page. + +# Predefined zoom values +page_scale_width=Page Width +page_scale_fit=Page Fit +page_scale_auto=Automatic Zoom +page_scale_actual=Actual Size +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=An error occurred while loading the PDF. +invalid_file_error=Invalid or corrupted PDF file. +missing_file_error=Missing PDF file. +unexpected_response_error=Unexpected server response. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=Enter the password to open this PDF file. +password_invalid=Invalid password. Please try again. +password_ok=OK +password_cancel=Cancel + +printing_not_supported=Warning: Printing is not fully supported by this browser. +printing_not_ready=Warning: The PDF is not fully loaded for printing. +web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/eo/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/eo/viewer.properties new file mode 100644 index 0000000..bca7c45 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/eo/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Antaŭa paĝo +previous_label=Malantaŭen +next.title=Venonta paĝo +next_label=Antaŭen + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Paĝo +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=el {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} el {{pagesCount}}) + +zoom_out.title=Malpligrandigi +zoom_out_label=Malpligrandigi +zoom_in.title=Pligrandigi +zoom_in_label=Pligrandigi +zoom.title=Pligrandigilo +presentation_mode.title=Iri al prezenta reĝimo +presentation_mode_label=Prezenta reĝimo +open_file.title=Malfermi dosieron +open_file_label=Malfermi +print.title=Presi +print_label=Presi +download.title=Elŝuti +download_label=Elŝuti +bookmark.title=Nuna vido (kopii aŭ malfermi en nova fenestro) +bookmark_label=Nuna vido + +# Secondary toolbar and context menu +tools.title=Iloj +tools_label=Iloj +first_page.title=Iri al la unua paĝo +first_page.label=Iri al la unua paĝo +first_page_label=Iri al la unua paĝo +last_page.title=Iri al la lasta paĝo +last_page.label=Iri al la lasta paĝo +last_page_label=Iri al la lasta paĝo +page_rotate_cw.title=Rotaciigi dekstrume +page_rotate_cw.label=Rotaciigi dekstrume +page_rotate_cw_label=Rotaciigi dekstrume +page_rotate_ccw.title=Rotaciigi maldekstrume +page_rotate_ccw.label=Rotaciigi maldekstrume +page_rotate_ccw_label=Rotaciigi maldekstrume + +cursor_text_select_tool.title=Aktivigi tekstan elektilon +cursor_text_select_tool_label=Teksta elektilo +cursor_hand_tool.title=Aktivigi ilon de mano +cursor_hand_tool_label=Ilo de mano + +scroll_vertical.title=Uzi vertikalan ŝovadon +scroll_vertical_label=Vertikala ŝovado +scroll_horizontal.title=Uzi horizontalan ŝovadon +scroll_horizontal_label=Horizontala ŝovado +scroll_wrapped.title=Uzi ambaŭdirektan ŝovadon +scroll_wrapped_label=Ambaŭdirekta ŝovado + +spread_none.title=Ne montri paĝojn po du +spread_none_label=Unupaĝa vido +spread_odd.title=Kunigi paĝojn komencante per nepara paĝo +spread_odd_label=Po du paĝoj, neparaj maldekstre +spread_even.title=Kunigi paĝojn komencante per para paĝo +spread_even_label=Po du paĝoj, paraj maldekstre + +# Document properties dialog box +document_properties.title=Atributoj de dokumento… +document_properties_label=Atributoj de dokumento… +document_properties_file_name=Nomo de dosiero: +document_properties_file_size=Grando de dosiero: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KO ({{size_b}} oktetoj) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MO ({{size_b}} oktetoj) +document_properties_title=Titolo: +document_properties_author=Aŭtoro: +document_properties_subject=Temo: +document_properties_keywords=Ŝlosilvorto: +document_properties_creation_date=Dato de kreado: +document_properties_modification_date=Dato de modifo: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Kreinto: +document_properties_producer=Produktinto de PDF: +document_properties_version=Versio de PDF: +document_properties_page_count=Nombro de paĝoj: +document_properties_page_size=Grando de paĝo: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=vertikala +document_properties_page_size_orientation_landscape=horizontala +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letera +document_properties_page_size_name_legal=Jura +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Rapida tekstaĵa vido: +document_properties_linearized_yes=Jes +document_properties_linearized_no=Ne +document_properties_close=Fermi + +print_progress_message=Preparo de dokumento por presi ĝin … +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Nuligi + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Montri/kaŝi flankan strion +toggle_sidebar_notification.title=Montri/kaŝi flankan strion (la dokumento enhavas konturon/aneksaĵojn) +toggle_sidebar_label=Montri/kaŝi flankan strion +document_outline.title=Montri la konturon de dokumento (alklaku duoble por faldi/malfaldi ĉiujn elementojn) +document_outline_label=Konturo de dokumento +attachments.title=Montri kunsendaĵojn +attachments_label=Kunsendaĵojn +thumbs.title=Montri miniaturojn +thumbs_label=Miniaturoj +findbar.title=Serĉi en dokumento +findbar_label=Serĉi + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Paĝo {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Paĝo {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniaturo de paĝo {{page}} + +# Find panel button title and messages +find_input.title=Serĉi +find_input.placeholder=Serĉi en dokumento… +find_previous.title=Serĉi la antaŭan aperon de la frazo +find_previous_label=Malantaŭen +find_next.title=Serĉi la venontan aperon de la frazo +find_next_label=Antaŭen +find_highlight=Elstarigi ĉiujn +find_match_case_label=Distingi inter majuskloj kaj minuskloj +find_entire_word_label=Tutaj vortoj +find_reached_top=Komenco de la dokumento atingita, daŭrigado ekde la fino +find_reached_bottom=Fino de la dokumento atingita, daŭrigado ekde la komenco +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} el {{total}} kongruo +find_match_count[two]={{current}} el {{total}} kongruoj +find_match_count[few]={{current}} el {{total}} kongruoj +find_match_count[many]={{current}} el {{total}} kongruoj +find_match_count[other]={{current}} el {{total}} kongruoj +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Pli ol {{limit}} kongruoj +find_match_count_limit[one]=Pli ol {{limit}} kongruo +find_match_count_limit[two]=Pli ol {{limit}} kongruoj +find_match_count_limit[few]=Pli ol {{limit}} kongruoj +find_match_count_limit[many]=Pli ol {{limit}} kongruoj +find_match_count_limit[other]=Pli ol {{limit}} kongruoj +find_not_found=Frazo ne trovita + +# Error panel labels +error_more_info=Pli da informo +error_less_info=Malpli da informo +error_close=Fermi +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mesaĝo: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stako: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Dosiero: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linio: {{line}} +rendering_error=Okazis eraro dum la montro de la paĝo. + +# Predefined zoom values +page_scale_width=Larĝo de paĝo +page_scale_fit=Adapti paĝon +page_scale_auto=Aŭtomata skalo +page_scale_actual=Reala grando +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Eraro +loading_error=Okazis eraro dum la ŝargado de la PDF dosiero. +invalid_file_error=Nevalida aŭ difektita PDF dosiero. +missing_file_error=Mankas dosiero PDF. +unexpected_response_error=Neatendita respondo de servilo. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Prinoto: {{type}}] +password_label=Tajpu pasvorton por malfermi tiun ĉi dosieron PDF. +password_invalid=Nevalida pasvorto. Bonvolu provi denove. +password_ok=Akcepti +password_cancel=Nuligi + +printing_not_supported=Averto: tiu ĉi retumilo ne plene subtenas presadon. +printing_not_ready=Averto: la PDF dosiero ne estas plene ŝargita por presado. +web_fonts_disabled=Neaktivaj teksaĵaj tiparoj: ne elbas uzi enmetitajn tiparojn de PDF. +document_colors_not_allowed=PDF dokumentoj ne rajtas uzi siajn proprajn kolorojn: 'Permesi al paĝoj uzi siajn proprajn kolorojn' ne estas aktiva en la retumilo. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/es-AR/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/es-AR/viewer.properties new file mode 100644 index 0000000..1d22fba --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/es-AR/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Página anterior +previous_label=Anterior +next.title=Página siguiente +next_label=Siguiente + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=( {{pageNumber}} de {{pagesCount}} ) + +zoom_out.title=Alejar +zoom_out_label=Alejar +zoom_in.title=Acercar +zoom_in_label=Acercar +zoom.title=Zoom +presentation_mode.title=Cambiar a modo presentación +presentation_mode_label=Modo presentación +open_file.title=Abrir archivo +open_file_label=Abrir +print.title=Imprimir +print_label=Imprimir +download.title=Descargar +download_label=Descargar +bookmark.title=Vista actual (copiar o abrir en nueva ventana) +bookmark_label=Vista actual + +# Secondary toolbar and context menu +tools.title=Herramientas +tools_label=Herramientas +first_page.title=Ir a primera página +first_page.label=Ir a primera página +first_page_label=Ir a primera página +last_page.title=Ir a última página +last_page.label=Ir a última página +last_page_label=Ir a última página +page_rotate_cw.title=Rotar horario +page_rotate_cw.label=Rotar horario +page_rotate_cw_label=Rotar horario +page_rotate_ccw.title=Rotar antihorario +page_rotate_ccw.label=Rotar antihorario +page_rotate_ccw_label=Rotar antihorario + +cursor_text_select_tool.title=Habilitar herramienta de selección de texto +cursor_text_select_tool_label=Herramienta de selección de texto +cursor_hand_tool.title=Habilitar herramienta mano +cursor_hand_tool_label=Herramienta mano + +scroll_vertical.title=Usar desplazamiento vertical +scroll_vertical_label=Desplazamiento vertical +scroll_horizontal.title=Usar desplazamiento vertical +scroll_horizontal_label=Desplazamiento horizontal +scroll_wrapped.title=Usar desplazamiento encapsulado +scroll_wrapped_label=Desplazamiento encapsulado + +spread_none.title=No unir páginas dobles +spread_none_label=Sin dobles +spread_odd.title=Unir páginas dobles comenzando con las impares +spread_odd_label=Dobles impares +spread_even.title=Unir páginas dobles comenzando con las pares +spread_even_label=Dobles pares + +# Document properties dialog box +document_properties.title=Propiedades del documento… +document_properties_label=Propiedades del documento… +document_properties_file_name=Nombre de archivo: +document_properties_file_size=Tamaño de archovo: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Título: +document_properties_author=Autor: +document_properties_subject=Asunto: +document_properties_keywords=Palabras clave: +document_properties_creation_date=Fecha de creación: +document_properties_modification_date=Fecha de modificación: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creador: +document_properties_producer=PDF Productor: +document_properties_version=Versión de PDF: +document_properties_page_count=Cantidad de páginas: +document_properties_page_size=Tamaño de página: +document_properties_page_size_unit_inches=en +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=normal +document_properties_page_size_orientation_landscape=apaisado +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Carta +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vista rápida de la Web: +document_properties_linearized_yes=Sí +document_properties_linearized_no=No +document_properties_close=Cerrar + +print_progress_message=Preparando documento para imprimir… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Alternar barra lateral +toggle_sidebar_notification.title=Intercambiar barra lateral (el documento contiene esquema/adjuntos) +toggle_sidebar_label=Alternar barra lateral +document_outline.title=Mostrar esquema del documento (doble clic para expandir/colapsar todos los ítems) +document_outline_label=Esquema del documento +attachments.title=Mostrar adjuntos +attachments_label=Adjuntos +thumbs.title=Mostrar miniaturas +thumbs_label=Miniaturas +findbar.title=Buscar en documento +findbar_label=Buscar + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Página {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Página {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura de página {{page}} + +# Find panel button title and messages +find_input.title=Buscar +find_input.placeholder=Buscar en documento… +find_previous.title=Buscar la aparición anterior de la frase +find_previous_label=Anterior +find_next.title=Buscar la siguiente aparición de la frase +find_next_label=Siguiente +find_highlight=Resaltar todo +find_match_case_label=Coincidir mayúsculas +find_entire_word_label=Palabras completas +find_reached_top=Inicio de documento alcanzado, continuando desde abajo +find_reached_bottom=Fin de documento alcanzando, continuando desde arriba +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} de {{total}} coincidencias +find_match_count[two]={{current}} de {{total}} coincidencias +find_match_count[few]={{current}} de {{total}} coincidencias +find_match_count[many]={{current}} de {{total}} coincidencias +find_match_count[other]={{current}} de {{total}} coincidencias +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Más de {{limit}} coincidencias +find_match_count_limit[one]=Más de {{limit}} coinciden +find_match_count_limit[two]=Más de {{limit}} coincidencias +find_match_count_limit[few]=Más de {{limit}} coincidencias +find_match_count_limit[many]=Más de {{limit}} coincidencias +find_match_count_limit[other]=Más de {{limit}} coincidencias +find_not_found=Frase no encontrada + +# Error panel labels +error_more_info=Más información +error_less_info=Menos información +error_close=Cerrar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensaje: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Archivo: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Línea: {{line}} +rendering_error=Ocurrió un error al dibujar la página. + +# Predefined zoom values +page_scale_width=Ancho de página +page_scale_fit=Ajustar página +page_scale_auto=Zoom automático +page_scale_actual=Tamaño real +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=Ocurrió un error al cargar el PDF. +invalid_file_error=Archivo PDF no válido o cocrrupto. +missing_file_error=Archivo PDF faltante. +unexpected_response_error=Respuesta del servidor inesperada. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Anotación] +password_label=Ingrese la contraseña para abrir este archivo PDF +password_invalid=Contraseña inválida. Intente nuevamente. +password_ok=Aceptar +password_cancel=Cancelar + +printing_not_supported=Advertencia: La impresión no está totalmente soportada por este navegador. +printing_not_ready=Advertencia: El PDF no está completamente cargado para impresión. +web_fonts_disabled=Tipografía web deshabilitada: no se pueden usar tipos incrustados en PDF. +document_colors_not_allowed=Los documentos PDF no tienen permitido usar sus propios colores: 'Permitir a las páginas elegir sus propios colores' está desactivado en el navegador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/es-CL/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/es-CL/viewer.properties new file mode 100644 index 0000000..f7f621f --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/es-CL/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Página anterior +previous_label=Anterior +next.title=Página siguiente +next_label=Siguiente + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Alejar +zoom_out_label=Alejar +zoom_in.title=Acercar +zoom_in_label=Acercar +zoom.title=Ampliación +presentation_mode.title=Cambiar al modo de presentación +presentation_mode_label=Modo de presentación +open_file.title=Abrir archivo +open_file_label=Abrir +print.title=Imprimir +print_label=Imprimir +download.title=Descargar +download_label=Descargar +bookmark.title=Vista actual (copiar o abrir en nueva ventana) +bookmark_label=Vista actual + +# Secondary toolbar and context menu +tools.title=Herramientas +tools_label=Herramientas +first_page.title=Ir a la primera página +first_page.label=Ir a la primera página +first_page_label=Ir a la primera página +last_page.title=Ir a la última página +last_page.label=Ir a la última página +last_page_label=Ir a la última página +page_rotate_cw.title=Girar a la derecha +page_rotate_cw.label=Girar a la derecha +page_rotate_cw_label=Girar a la derecha +page_rotate_ccw.title=Girar a la izquierda +page_rotate_ccw.label=Girar a la izquierda +page_rotate_ccw_label=Girar a la izquierda + +cursor_text_select_tool.title=Activar la herramienta de selección de texto +cursor_text_select_tool_label=Herramienta de selección de texto +cursor_hand_tool.title=Activar la herramienta de mano +cursor_hand_tool_label=Herramienta de mano + +scroll_vertical.title=Usar desplazamiento vertical +scroll_vertical_label=Desplazamiento vertical +scroll_horizontal.title=Usar desplazamiento horizontal +scroll_horizontal_label=Desplazamiento horizontal +scroll_wrapped.title=Usar desplazamiento en bloque +scroll_wrapped_label=Desplazamiento en bloque + +spread_none.title=No juntar páginas a modo de libro +spread_none_label=Vista de una página +spread_odd.title=Junta las páginas partiendo con una de número impar +spread_odd_label=Vista de libro impar +spread_even.title=Junta las páginas partiendo con una de número par +spread_even_label=Vista de libro par + +# Document properties dialog box +document_properties.title=Propiedades del documento… +document_properties_label=Propiedades del documento… +document_properties_file_name=Nombre de archivo: +document_properties_file_size=Tamaño del archivo: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Título: +document_properties_author=Autor: +document_properties_subject=Asunto: +document_properties_keywords=Palabras clave: +document_properties_creation_date=Fecha de creación: +document_properties_modification_date=Fecha de modificación: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creador: +document_properties_producer=Productor del PDF: +document_properties_version=Versión de PDF: +document_properties_page_count=Cantidad de páginas: +document_properties_page_size=Tamaño de la página: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=vertical +document_properties_page_size_orientation_landscape=horizontal +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Carta +document_properties_page_size_name_legal=Oficio +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vista rápida en Web: +document_properties_linearized_yes=Sí +document_properties_linearized_no=No +document_properties_close=Cerrar + +print_progress_message=Preparando documento para impresión… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Barra lateral +toggle_sidebar_notification.title=Cambiar barra lateral (índice de contenidos del documento/adjuntos) +toggle_sidebar_label=Mostrar u ocultar la barra lateral +document_outline.title=Mostrar esquema del documento (doble clic para expandir/contraer todos los elementos) +document_outline_label=Esquema del documento +attachments.title=Mostrar adjuntos +attachments_label=Adjuntos +thumbs.title=Mostrar miniaturas +thumbs_label=Miniaturas +findbar.title=Buscar en el documento +findbar_label=Buscar + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Página {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Página {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura de la página {{page}} + +# Find panel button title and messages +find_input.title=Encontrar +find_input.placeholder=Encontrar en el documento… +find_previous.title=Buscar la aparición anterior de la frase +find_previous_label=Previo +find_next.title=Buscar la siguiente aparición de la frase +find_next_label=Siguiente +find_highlight=Destacar todos +find_match_case_label=Coincidir mayús./minús. +find_entire_word_label=Palabras completas +find_reached_top=Se alcanzó el inicio del documento, continuando desde el final +find_reached_bottom=Se alcanzó el final del documento, continuando desde el inicio +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} de {{total}} coincidencia +find_match_count[two]={{current}} de {{total}} coincidencias +find_match_count[few]={{current}} de {{total}} coincidencias +find_match_count[many]={{current}} de {{total}} coincidencias +find_match_count[other]={{current}} de {{total}} coincidencias +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Más de {{limit}} coincidencias +find_match_count_limit[one]=Más de {{limit}} coincidencia +find_match_count_limit[two]=Más de {{limit}} coincidencias +find_match_count_limit[few]=Más de {{limit}} coincidencias +find_match_count_limit[many]=Más de {{limit}} coincidencias +find_match_count_limit[other]=Más de {{limit}} coincidencias +find_not_found=Frase no encontrada + +# Error panel labels +error_more_info=Más información +error_less_info=Menos información +error_close=Cerrar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (compilación: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensaje: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Archivo: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Línea: {{line}} +rendering_error=Ha ocurrido un error al renderizar la página. + +# Predefined zoom values +page_scale_width=Ancho de página +page_scale_fit=Ajuste de página +page_scale_auto=Aumento automático +page_scale_actual=Tamaño actual +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=Ha ocurrido un error al cargar el PDF. +invalid_file_error=Archivo PDF inválido o corrupto. +missing_file_error=Falta el archivo PDF. +unexpected_response_error=Respuesta del servidor inesperada. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Anotación] +password_label=Ingrese la contraseña para abrir este archivo PDF. +password_invalid=Contraseña inválida. Por favor, vuelve a intentarlo. +password_ok=Aceptar +password_cancel=Cancelar + +printing_not_supported=Advertencia: Imprimir no está soportado completamente por este navegador. +printing_not_ready=Advertencia: El PDF no está completamente cargado para ser impreso. +web_fonts_disabled=Las tipografías web están desactivadas: imposible usar las fuentes PDF embebidas. +document_colors_not_allowed=Los documentos PDF no tienen permitido usar sus propios colores: 'Permitir a las páginas elegir sus propios colores' está desactivado en el navegador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/es-ES/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/es-ES/viewer.properties new file mode 100644 index 0000000..cef373a --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/es-ES/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Página anterior +previous_label=Anterior +next.title=Página siguiente +next_label=Siguiente + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Reducir +zoom_out_label=Reducir +zoom_in.title=Aumentar +zoom_in_label=Aumentar +zoom.title=Tamaño +presentation_mode.title=Cambiar al modo presentación +presentation_mode_label=Modo presentación +open_file.title=Abrir archivo +open_file_label=Abrir +print.title=Imprimir +print_label=Imprimir +download.title=Descargar +download_label=Descargar +bookmark.title=Vista actual (copiar o abrir en una nueva ventana) +bookmark_label=Vista actual + +# Secondary toolbar and context menu +tools.title=Herramientas +tools_label=Herramientas +first_page.title=Ir a la primera página +first_page.label=Ir a la primera página +first_page_label=Ir a la primera página +last_page.title=Ir a la última página +last_page.label=Ir a la última página +last_page_label=Ir a la última página +page_rotate_cw.title=Rotar en sentido horario +page_rotate_cw.label=Rotar en sentido horario +page_rotate_cw_label=Rotar en sentido horario +page_rotate_ccw.title=Rotar en sentido antihorario +page_rotate_ccw.label=Rotar en sentido antihorario +page_rotate_ccw_label=Rotar en sentido antihorario + +cursor_text_select_tool.title=Activar herramienta de selección de texto +cursor_text_select_tool_label=Herramienta de selección de texto +cursor_hand_tool.title=Activar herramienta de mano +cursor_hand_tool_label=Herramienta de mano + +scroll_vertical.title=Usar desplazamiento vertical +scroll_vertical_label=Desplazamiento vertical +scroll_horizontal.title=Usar desplazamiento horizontal +scroll_horizontal_label=Desplazamiento horizontal +scroll_wrapped.title=Usar desplazamiento en bloque +scroll_wrapped_label=Desplazamiento en bloque + +spread_none.title=No juntar páginas en vista de libro +spread_none_label=Vista de libro +spread_odd.title=Juntar las páginas partiendo de una con número impar +spread_odd_label=Vista de libro impar +spread_even.title=Juntar las páginas partiendo de una con número par +spread_even_label=Vista de libro par + +# Document properties dialog box +document_properties.title=Propiedades del documento… +document_properties_label=Propiedades del documento… +document_properties_file_name=Nombre de archivo: +document_properties_file_size=Tamaño de archivo: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Título: +document_properties_author=Autor: +document_properties_subject=Asunto: +document_properties_keywords=Palabras clave: +document_properties_creation_date=Fecha de creación: +document_properties_modification_date=Fecha de modificación: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creador: +document_properties_producer=Productor PDF: +document_properties_version=Versión PDF: +document_properties_page_count=Número de páginas: +document_properties_page_size=Tamaño de la página: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=vertical +document_properties_page_size_orientation_landscape=horizontal +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Carta +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vista rápida de la web: +document_properties_linearized_yes=Sí +document_properties_linearized_no=No +document_properties_close=Cerrar + +print_progress_message=Preparando documento para impresión… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Cambiar barra lateral +toggle_sidebar_notification.title=Alternar panel lateral (el documento contiene un esquema o adjuntos) +toggle_sidebar_label=Cambiar barra lateral +document_outline.title=Mostrar resumen del documento (doble clic para expandir/contraer todos los elementos) +document_outline_label=Resumen de documento +attachments.title=Mostrar adjuntos +attachments_label=Adjuntos +thumbs.title=Mostrar miniaturas +thumbs_label=Miniaturas +findbar.title=Buscar en el documento +findbar_label=Buscar + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Página {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Página {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura de la página {{page}} + +# Find panel button title and messages +find_input.title=Buscar +find_input.placeholder=Buscar en el documento… +find_previous.title=Encontrar la anterior aparición de la frase +find_previous_label=Anterior +find_next.title=Encontrar la siguiente aparición de esta frase +find_next_label=Siguiente +find_highlight=Resaltar todos +find_match_case_label=Coincidencia de mayús./minús. +find_entire_word_label=Palabras completas +find_reached_top=Se alcanzó el inicio del documento, se continúa desde el final +find_reached_bottom=Se alcanzó el final del documento, se continúa desde el inicio +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} de {{total}} coincidencia +find_match_count[two]={{current}} de {{total}} coincidencias +find_match_count[few]={{current}} de {{total}} coincidencias +find_match_count[many]={{current}} de {{total}} coincidencias +find_match_count[other]={{current}} de {{total}} coincidencias +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Más de {{limit}} coincidencias +find_match_count_limit[one]=Más de {{limit}} coincidencia +find_match_count_limit[two]=Más de {{limit}} coincidencias +find_match_count_limit[few]=Más de {{limit}} coincidencias +find_match_count_limit[many]=Más de {{limit}} coincidencias +find_match_count_limit[other]=Más de {{limit}} coincidencias +find_not_found=Frase no encontrada + +# Error panel labels +error_more_info=Más información +error_less_info=Menos información +error_close=Cerrar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensaje: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Archivo: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Línea: {{line}} +rendering_error=Ocurrió un error al renderizar la página. + +# Predefined zoom values +page_scale_width=Anchura de la página +page_scale_fit=Ajuste de la página +page_scale_auto=Tamaño automático +page_scale_actual=Tamaño real +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=Ocurrió un error al cargar el PDF. +invalid_file_error=Fichero PDF no válido o corrupto. +missing_file_error=No hay fichero PDF. +unexpected_response_error=Respuesta inesperada del servidor. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotación {{type}}] +password_label=Introduzca la contraseña para abrir este archivo PDF. +password_invalid=Contraseña no válida. Vuelva a intentarlo. +password_ok=Aceptar +password_cancel=Cancelar + +printing_not_supported=Advertencia: Imprimir no está totalmente soportado por este navegador. +printing_not_ready=Advertencia: Este PDF no se ha cargado completamente para poder imprimirse. +web_fonts_disabled=Las tipografías web están desactivadas: es imposible usar las tipografías PDF embebidas. +document_colors_not_allowed=Los documentos PDF no tienen permitido usar sus propios colores: 'Permitir a las páginas elegir sus propios colores' está desactivado en el navegador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/es-MX/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/es-MX/viewer.properties new file mode 100644 index 0000000..88a8282 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/es-MX/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Página anterior +previous_label=Anterior +next.title=Página siguiente +next_label=Siguiente + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Reducir +zoom_out_label=Reducir +zoom_in.title=Aumentar +zoom_in_label=Aumentar +zoom.title=Zoom +presentation_mode.title=Cambiar al modo presentación +presentation_mode_label=Modo presentación +open_file.title=Abrir archivo +open_file_label=Abrir +print.title=Imprimir +print_label=Imprimir +download.title=Descargar +download_label=Descargar +bookmark.title=Vista actual (copiar o abrir en una nueva ventana) +bookmark_label=Vista actual + +# Secondary toolbar and context menu +tools.title=Herramientas +tools_label=Herramientas +first_page.title=Ir a la primera página +first_page.label=Ir a la primera página +first_page_label=Ir a la primera página +last_page.title=Ir a la última página +last_page.label=Ir a la última página +last_page_label=Ir a la última página +page_rotate_cw.title=Girar a la derecha +page_rotate_cw.label=Girar a la derecha +page_rotate_cw_label=Girar a la derecha +page_rotate_ccw.title=Girar a la izquierda +page_rotate_ccw.label=Girar a la izquierda +page_rotate_ccw_label=Girar a la izquierda + +cursor_text_select_tool.title=Activar la herramienta de selección de texto +cursor_text_select_tool_label=Herramienta de selección de texto +cursor_hand_tool.title=Activar la herramienta de mano +cursor_hand_tool_label=Herramienta de mano + +scroll_vertical.title=Usar desplazamiento vertical +scroll_vertical_label=Desplazamiento vertical +scroll_horizontal.title=Usar desplazamiento horizontal +scroll_horizontal_label=Desplazamiento horizontal +scroll_wrapped.title=Usar desplazamiento encapsulado +scroll_wrapped_label=Desplazamiento encapsulado + +spread_none.title=No unir páginas separadas +spread_none_label=Vista de una página +spread_odd.title=Unir las páginas partiendo con una de número impar +spread_odd_label=Vista de libro impar +spread_even.title=Juntar las páginas partiendo con una de número par +spread_even_label=Vista de libro par + +# Document properties dialog box +document_properties.title=Propiedades del documento… +document_properties_label=Propiedades del documento… +document_properties_file_name=Nombre del archivo: +document_properties_file_size=Tamaño del archivo: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Título: +document_properties_author=Autor: +document_properties_subject=Asunto: +document_properties_keywords=Palabras claves: +document_properties_creation_date=Fecha de creación: +document_properties_modification_date=Fecha de modificación: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creador: +document_properties_producer=Productor PDF: +document_properties_version=Versión PDF: +document_properties_page_count=Número de páginas: +document_properties_page_size=Tamaño de la página: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=vertical +document_properties_page_size_orientation_landscape=horizontal +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Carta +document_properties_page_size_name_legal=Oficio +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vista rápida de la web: +document_properties_linearized_yes=Sí +document_properties_linearized_no=No +document_properties_close=Cerrar + +print_progress_message=Preparando documento para impresión… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Cambiar barra lateral +toggle_sidebar_notification.title=Cambiar barra lateral (índice de contenidos del documento/adjuntos) +toggle_sidebar_label=Cambiar barra lateral +document_outline.title=Mostrar esquema del documento (doble clic para expandir/contraer todos los elementos) +document_outline_label=Esquema del documento +attachments.title=Mostrar adjuntos +attachments_label=Adjuntos +thumbs.title=Mostrar miniaturas +thumbs_label=Miniaturas +findbar.title=Buscar en el documento +findbar_label=Buscar + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Página {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Página {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura de la página {{page}} + +# Find panel button title and messages +find_input.title=Buscar +find_input.placeholder=Buscar en el documento… +find_previous.title=Ir a la anterior frase encontrada +find_previous_label=Anterior +find_next.title=Ir a la siguiente frase encontrada +find_next_label=Siguiente +find_highlight=Resaltar todo +find_match_case_label=Coincidir con mayúsculas y minúsculas +find_entire_word_label=Palabras completas +find_reached_top=Se alcanzó el inicio del documento, se buscará al final +find_reached_bottom=Se alcanzó el final del documento, se buscará al inicio +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} de {{total}} coincidencia +find_match_count[two]={{current}} de {{total}} coincidencias +find_match_count[few]={{current}} de {{total}} coincidencias +find_match_count[many]={{current}} de {{total}} coincidencias +find_match_count[other]={{current}} de {{total}} coincidencias +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Más de {{limit}} coincidencias +find_match_count_limit[one]=Más de {{limit}} coinciden +find_match_count_limit[two]=Más de {{limit}} coincidencias +find_match_count_limit[few]=Más de {{limit}} coincidencias +find_match_count_limit[many]=Más de {{limit}} coincidencias +find_match_count_limit[other]=Más de {{limit}} coincidencias +find_not_found=No se encontró la frase + +# Error panel labels +error_more_info=Más información +error_less_info=Menos información +error_close=Cerrar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensaje: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Archivo: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Línea: {{line}} +rendering_error=Un error ocurrió al renderizar la página. + +# Predefined zoom values +page_scale_width=Ancho de página +page_scale_fit=Ajustar página +page_scale_auto=Zoom automático +page_scale_actual=Tamaño real +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=Un error ocurrió al cargar el PDF. +invalid_file_error=Archivo PDF invalido o dañado. +missing_file_error=Archivo PDF no encontrado. +unexpected_response_error=Respuesta inesperada del servidor. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} anotación] +password_label=Ingresa la contraseña para abrir este archivo PDF. +password_invalid=Contraseña inválida. Por favor intenta de nuevo. +password_ok=Aceptar +password_cancel=Cancelar + +printing_not_supported=Advertencia: La impresión no esta completamente soportada por este navegador. +printing_not_ready=Advertencia: El PDF no cargo completamente para impresión. +web_fonts_disabled=Las fuentes web están desactivadas: es imposible usar las fuentes PDF embebidas. +document_colors_not_allowed=Los documentos PDF no tienen permiso de usar sus propios colores: 'Permitir que las páginas elijan sus propios colores' esta desactivada en el navegador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/et/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/et/viewer.properties new file mode 100644 index 0000000..11f47c1 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/et/viewer.properties @@ -0,0 +1,246 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Eelmine lehekülg +previous_label=Eelmine +next.title=Järgmine lehekülg +next_label=Järgmine + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Leht +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}}/{{pagesCount}}) + +zoom_out.title=Vähenda +zoom_out_label=Vähenda +zoom_in.title=Suurenda +zoom_in_label=Suurenda +zoom.title=Suurendamine +presentation_mode.title=Lülitu esitlusrežiimi +presentation_mode_label=Esitlusrežiim +open_file.title=Ava fail +open_file_label=Ava +print.title=Prindi +print_label=Prindi +download.title=Laadi alla +download_label=Laadi alla +bookmark.title=Praegune vaade (kopeeri või ava uues aknas) +bookmark_label=Praegune vaade + +# Secondary toolbar and context menu +tools.title=Tööriistad +tools_label=Tööriistad +first_page.title=Mine esimesele leheküljele +first_page.label=Mine esimesele leheküljele +first_page_label=Mine esimesele leheküljele +last_page.title=Mine viimasele leheküljele +last_page.label=Mine viimasele leheküljele +last_page_label=Mine viimasele leheküljele +page_rotate_cw.title=Pööra päripäeva +page_rotate_cw.label=Pööra päripäeva +page_rotate_cw_label=Pööra päripäeva +page_rotate_ccw.title=Pööra vastupäeva +page_rotate_ccw.label=Pööra vastupäeva +page_rotate_ccw_label=Pööra vastupäeva + +cursor_text_select_tool.title=Luba teksti valimise tööriist +cursor_text_select_tool_label=Teksti valimise tööriist +cursor_hand_tool.title=Luba sirvimistööriist +cursor_hand_tool_label=Sirvimistööriist + +scroll_vertical.title=Kasuta vertikaalset kerimist +scroll_vertical_label=Vertikaalne kerimine +scroll_horizontal.title=Kasuta horisontaalset kerimist +scroll_horizontal_label=Horisontaalne kerimine +scroll_wrapped.title=Kasuta rohkem mahutavat kerimist +scroll_wrapped_label=Rohkem mahutav kerimine + +spread_none.title=Ära kõrvuta lehekülgi +spread_none_label=Lehtede kõrvutamine puudub +spread_odd.title=Kõrvuta leheküljed, alustades paaritute numbritega lehekülgedega +spread_odd_label=Kõrvutamine paaritute numbritega alustades +spread_even.title=Kõrvuta leheküljed, alustades paarisnumbritega lehekülgedega +spread_even_label=Kõrvutamine paarisnumbritega alustades + +# Document properties dialog box +document_properties.title=Dokumendi omadused… +document_properties_label=Dokumendi omadused… +document_properties_file_name=Faili nimi: +document_properties_file_size=Faili suurus: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KiB ({{size_b}} baiti) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MiB ({{size_b}} baiti) +document_properties_title=Pealkiri: +document_properties_author=Autor: +document_properties_subject=Teema: +document_properties_keywords=Märksõnad: +document_properties_creation_date=Loodud: +document_properties_modification_date=Muudetud: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}} {{time}} +document_properties_creator=Looja: +document_properties_producer=Generaator: +document_properties_version=Generaatori versioon: +document_properties_page_count=Lehekülgi: +document_properties_page_size=Lehe suurus: +document_properties_page_size_unit_inches=tolli +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=vertikaalpaigutus +document_properties_page_size_orientation_landscape=rõhtpaigutus +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized="Fast Web View" tugi: +document_properties_linearized_yes=Jah +document_properties_linearized_no=Ei +document_properties_close=Sulge + +print_progress_message=Dokumendi ettevalmistamine printimiseks… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Loobu + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Näita külgriba +toggle_sidebar_notification.title=Näita külgriba (dokument sisaldab sisukorda/manuseid) +toggle_sidebar_label=Näita külgriba +document_outline.title=Näita sisukorda (kõigi punktide laiendamiseks/ahendamiseks topeltklõpsa) +document_outline_label=Näita sisukorda +attachments.title=Näita manuseid +attachments_label=Manused +thumbs.title=Näita pisipilte +thumbs_label=Pisipildid +findbar.title=Otsi dokumendist +findbar_label=Otsi + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title={{page}}. lehekülg +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}}. lehekülje pisipilt + +# Find panel button title and messages +find_input.title=Otsi +find_input.placeholder=Otsi dokumendist… +find_previous.title=Otsi fraasi eelmine esinemiskoht +find_previous_label=Eelmine +find_next.title=Otsi fraasi järgmine esinemiskoht +find_next_label=Järgmine +find_highlight=Too kõik esile +find_match_case_label=Tõstutundlik +find_entire_word_label=Täissõnad +find_reached_top=Jõuti dokumendi algusesse, jätkati lõpust +find_reached_bottom=Jõuti dokumendi lõppu, jätkati algusest +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]=vaste {{current}}/{{total}} +find_match_count[two]=vaste {{current}}/{{total}} +find_match_count[few]=vaste {{current}}/{{total}} +find_match_count[many]=vaste {{current}}/{{total}} +find_match_count[other]=vaste {{current}}/{{total}} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Rohkem kui {{limit}} vastet +find_match_count_limit[one]=Rohkem kui {{limit}} vaste +find_match_count_limit[two]=Rohkem kui {{limit}} vastet +find_match_count_limit[few]=Rohkem kui {{limit}} vastet +find_match_count_limit[many]=Rohkem kui {{limit}} vastet +find_match_count_limit[other]=Rohkem kui {{limit}} vastet +find_not_found=Fraasi ei leitud + +# Error panel labels +error_more_info=Rohkem teavet +error_less_info=Vähem teavet +error_close=Sulge +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Teade: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fail: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Rida: {{line}} +rendering_error=Lehe renderdamisel esines viga. + +# Predefined zoom values +page_scale_width=Mahuta laiusele +page_scale_fit=Mahuta leheküljele +page_scale_auto=Automaatne suurendamine +page_scale_actual=Tegelik suurus +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Viga +loading_error=PDFi laadimisel esines viga. +invalid_file_error=Vigane või rikutud PDF-fail. +missing_file_error=PDF-fail puudub. +unexpected_response_error=Ootamatu vastus serverilt. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=PDF-faili avamiseks sisesta parool. +password_invalid=Vigane parool. Palun proovi uuesti. +password_ok=Sobib +password_cancel=Loobu + +printing_not_supported=Hoiatus: printimine pole selle brauseri poolt täielikult toetatud. +printing_not_ready=Hoiatus: PDF pole printimiseks täielikult laaditud. +web_fonts_disabled=Veebifondid on keelatud: PDFiga kaasatud fonte pole võimalik kasutada. +document_colors_not_allowed=PDF-dokumentidel pole oma värvide kasutamine lubatud: “Veebilehtedel on lubatud kasutada oma värve” on brauseris deaktiveeritud. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/eu/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/eu/viewer.properties new file mode 100644 index 0000000..e14f5cd --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/eu/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Aurreko orria +previous_label=Aurrekoa +next.title=Hurrengo orria +next_label=Hurrengoa + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Orria +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages={{pagesCount}}/{{pageNumber}} + +zoom_out.title=Urrundu zooma +zoom_out_label=Urrundu zooma +zoom_in.title=Gerturatu zooma +zoom_in_label=Gerturatu zooma +zoom.title=Zooma +presentation_mode.title=Aldatu aurkezpen modura +presentation_mode_label=Arkezpen modua +open_file.title=Ireki fitxategia +open_file_label=Ireki +print.title=Inprimatu +print_label=Inprimatu +download.title=Deskargatu +download_label=Deskargatu +bookmark.title=Uneko ikuspegia (kopiatu edo ireki leiho berrian) +bookmark_label=Uneko ikuspegia + +# Secondary toolbar and context menu +tools.title=Tresnak +tools_label=Tresnak +first_page.title=Joan lehen orrira +first_page.label=Joan lehen orrira +first_page_label=Joan lehen orrira +last_page.title=Joan azken orrira +last_page.label=Joan azken orrira +last_page_label=Joan azken orrira +page_rotate_cw.title=Biratu erlojuaren norantzan +page_rotate_cw.label=Biratu erlojuaren norantzan +page_rotate_cw_label=Biratu erlojuaren norantzan +page_rotate_ccw.title=Biratu erlojuaren aurkako norantzan +page_rotate_ccw.label=Biratu erlojuaren aurkako norantzan +page_rotate_ccw_label=Biratu erlojuaren aurkako norantzan + +cursor_text_select_tool.title=Gaitu testuaren hautapen tresna +cursor_text_select_tool_label=Testuaren hautapen tresna +cursor_hand_tool.title=Gaitu eskuaren tresna +cursor_hand_tool_label=Eskuaren tresna + +scroll_vertical.title=Erabili korritze bertikala +scroll_vertical_label=Korritze bertikala +scroll_horizontal.title=Erabili korritze horizontala +scroll_horizontal_label=Korritze horizontala +scroll_wrapped.title=Erabili korritze egokitua +scroll_wrapped_label=Korritze egokitua + +spread_none.title=Ez elkartu barreiatutako orriak +spread_none_label=Barreiatzerik ez +spread_odd.title=Elkartu barreiatutako orriak bakoiti zenbakidunekin hasita +spread_odd_label=Barreiatze bakoitia +spread_even.title=Elkartu barreiatutako orriak bikoiti zenbakidunekin hasita +spread_even_label=Barreiatze bikoitia + +# Document properties dialog box +document_properties.title=Dokumentuaren propietateak… +document_properties_label=Dokumentuaren propietateak… +document_properties_file_name=Fitxategi-izena: +document_properties_file_size=Fitxategiaren tamaina: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} byte) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} byte) +document_properties_title=Izenburua: +document_properties_author=Egilea: +document_properties_subject=Gaia: +document_properties_keywords=Gako-hitzak: +document_properties_creation_date=Sortze-data: +document_properties_modification_date=Aldatze-data: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Sortzailea: +document_properties_producer=PDFaren ekoizlea: +document_properties_version=PDF bertsioa: +document_properties_page_count=Orrialde kopurua: +document_properties_page_size=Orriaren tamaina: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=bertikala +document_properties_page_size_orientation_landscape=horizontala +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Gutuna +document_properties_page_size_name_legal=Legala +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Webeko ikuspegi bizkorra: +document_properties_linearized_yes=Bai +document_properties_linearized_no=Ez +document_properties_close=Itxi + +print_progress_message=Dokumentua inprimatzeko prestatzen… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent=%{{progress}} +print_progress_close=Utzi + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Txandakatu alboko barra +toggle_sidebar_notification.title=Txandakatu alboko barra (dokumentuak eskema/eranskinak ditu) +toggle_sidebar_label=Txandakatu alboko barra +document_outline.title=Erakutsi dokumentuaren eskema (klik bikoitza elementu guztiak zabaltzeko/tolesteko) +document_outline_label=Dokumentuaren eskema +attachments.title=Erakutsi eranskinak +attachments_label=Eranskinak +thumbs.title=Erakutsi koadro txikiak +thumbs_label=Koadro txikiak +findbar.title=Bilatu dokumentuan +findbar_label=Bilatu + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas={{page}}. orria +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title={{page}}. orria +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}}. orriaren koadro txikia + +# Find panel button title and messages +find_input.title=Bilatu +find_input.placeholder=Bilatu dokumentuan… +find_previous.title=Bilatu esaldiaren aurreko parekatzea +find_previous_label=Aurrekoa +find_next.title=Bilatu esaldiaren hurrengo parekatzea +find_next_label=Hurrengoa +find_highlight=Nabarmendu guztia +find_match_case_label=Bat etorri maiuskulekin/minuskulekin +find_entire_word_label=Hitz osoak +find_reached_top=Dokumentuaren hasierara heldu da, bukaeratik jarraitzen +find_reached_bottom=Dokumentuaren bukaerara heldu da, hasieratik jarraitzen +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{total}}/{{current}}. bat etortzea +find_match_count[two]={{total}}/{{current}}. bat etortzea +find_match_count[few]={{total}}/{{current}}. bat etortzea +find_match_count[many]={{total}}/{{current}}. bat etortzea +find_match_count[other]={{total}}/{{current}}. bat etortzea +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} bat-etortze baino gehiago +find_match_count_limit[one]=Bat-etortze {{limit}} baino gehiago +find_match_count_limit[two]={{limit}} bat-etortze baino gehiago +find_match_count_limit[few]={{limit}} bat-etortze baino gehiago +find_match_count_limit[many]={{limit}} bat-etortze baino gehiago +find_match_count_limit[other]={{limit}} bat-etortze baino gehiago +find_not_found=Esaldia ez da aurkitu + +# Error panel labels +error_more_info=Informazio gehiago +error_less_info=Informazio gutxiago +error_close=Itxi +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (eraikuntza: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mezua: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fitxategia: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Lerroa: {{line}} +rendering_error=Errorea gertatu da orria errendatzean. + +# Predefined zoom values +page_scale_width=Orriaren zabalera +page_scale_fit=Doitu orrira +page_scale_auto=Zoom automatikoa +page_scale_actual=Benetako tamaina +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent=%{{scale}} + +# Loading indicator messages +loading_error_indicator=Errorea +loading_error=Errorea gertatu da PDFa kargatzean. +invalid_file_error=PDF fitxategi baliogabe edo hondatua. +missing_file_error=PDF fitxategia falta da. +unexpected_response_error=Espero gabeko zerbitzariaren erantzuna. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} ohartarazpena] +password_label=Idatzi PDF fitxategi hau irekitzeko pasahitza. +password_invalid=Pasahitz baliogabea. Saiatu berriro mesedez. +password_ok=Ados +password_cancel=Utzi + +printing_not_supported=Abisua: inprimatzeko euskarria ez da erabatekoa nabigatzaile honetan. +printing_not_ready=Abisua: PDFa ez dago erabat kargatuta inprimatzeko. +web_fonts_disabled=Webeko letra-tipoak desgaituta daude: ezin dira kapsulatutako PDF letra-tipoak erabili. +document_colors_not_allowed=PDF dokumentuek ez dute beraien koloreak erabiltzeko baimenik: 'Baimendu orriak beraien letra-tipoak aukeratzea' desaktibatuta dago nabigatzailean. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/fa/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/fa/viewer.properties new file mode 100644 index 0000000..e95738c --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/fa/viewer.properties @@ -0,0 +1,223 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=صفحهٔ قبلی +previous_label=قبلی +next.title=صفحهٔ بعدی +next_label=بعدی + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=صفحه +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=از {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}}از {{pagesCount}}) + +zoom_out.title=کوچک‌نمایی +zoom_out_label=کوچک‌نمایی +zoom_in.title=بزرگ‌نمایی +zoom_in_label=بزرگ‌نمایی +zoom.title=زوم +presentation_mode.title=تغییر به حالت ارائه +presentation_mode_label=حالت ارائه +open_file.title=باز کردن پرونده +open_file_label=باز کردن +print.title=چاپ +print_label=چاپ +download.title=بارگیری +download_label=بارگیری +bookmark.title=نمای فعلی (رونوشت و یا نشان دادن در پنجره جدید) +bookmark_label=نمای فعلی + +# Secondary toolbar and context menu +tools.title=ابزارها +tools_label=ابزارها +first_page.title=برو به اولین صفحه +first_page.label=برو یه اولین صفحه +first_page_label=برو به اولین صفحه +last_page.title=برو به آخرین صفحه +last_page.label=برو به آخرین صفحه +last_page_label=برو به آخرین صفحه +page_rotate_cw.title=چرخش ساعتگرد +page_rotate_cw.label=چرخش ساعتگرد +page_rotate_cw_label=چرخش ساعتگرد +page_rotate_ccw.title=چرخش پاد ساعتگرد +page_rotate_ccw.label=چرخش پاد ساعتگرد +page_rotate_ccw_label=چرخش پاد ساعتگرد + +cursor_text_select_tool.title=فعال کردن ابزارِ انتخابِ متن +cursor_text_select_tool_label=ابزارِ انتخابِ متن +cursor_hand_tool.title=فعال کردن ابزارِ دست +cursor_hand_tool_label=ابزار دست + +scroll_vertical.title=استفاده از پیمایش عمودی +scroll_vertical_label=پیمایش عمودی +scroll_horizontal.title=استفاده از پیمایش افقی +scroll_horizontal_label=پیمایش افقی + + +# Document properties dialog box +document_properties.title=خصوصیات سند... +document_properties_label=خصوصیات سند... +document_properties_file_name=نام فایل: +document_properties_file_size=حجم پرونده: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} کیلوبایت ({{size_b}} بایت) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} مگابایت ({{size_b}} بایت) +document_properties_title=عنوان: +document_properties_author=نویسنده: +document_properties_subject=موضوع: +document_properties_keywords=کلیدواژه‌ها: +document_properties_creation_date=تاریخ ایجاد: +document_properties_modification_date=تاریخ ویرایش: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}، {{time}} +document_properties_creator=ایجاد کننده: +document_properties_producer=ایجاد کننده PDF: +document_properties_version=نسخه PDF: +document_properties_page_count=تعداد صفحات: +document_properties_page_size=اندازه صفحه: +document_properties_page_size_unit_inches=اینچ +document_properties_page_size_unit_millimeters=میلی‌متر +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=نامه +document_properties_page_size_name_legal=حقوقی +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized_yes=بله +document_properties_linearized_no=خیر +document_properties_close=بستن + +print_progress_message=آماده سازی مدارک برای چاپ کردن… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=لغو + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=باز و بسته کردن نوار کناری +toggle_sidebar_notification.title=تغییر وضعیت نوار کناری (سند حاوی طرح/پیوست است) +toggle_sidebar_label=تغییرحالت نوارکناری +document_outline.title=نمایش رئوس مطالب مدارک(برای بازشدن/جمع شدن همه موارد دوبار کلیک کنید) +document_outline_label=طرح نوشتار +attachments.title=نمایش پیوست‌ها +attachments_label=پیوست‌ها +thumbs.title=نمایش تصاویر بندانگشتی +thumbs_label=تصاویر بندانگشتی +findbar.title=جستجو در سند +findbar_label=پیدا کردن + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=صفحه {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=تصویر بند‌ انگشتی صفحه {{page}} + +# Find panel button title and messages +find_input.title=پیدا کردن +find_input.placeholder=پیدا کردن در سند… +find_previous.title=پیدا کردن رخداد قبلی عبارت +find_previous_label=قبلی +find_next.title=پیدا کردن رخداد بعدی عبارت +find_next_label=بعدی +find_highlight=برجسته و هایلایت کردن همه موارد +find_match_case_label=تطبیق کوچکی و بزرگی حروف +find_entire_word_label=تمام کلمه‌ها +find_reached_top=به بالای صفحه رسیدیم، از پایین ادامه می‌دهیم +find_reached_bottom=به آخر صفحه رسیدیم، از بالا ادامه می‌دهیم +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count[one]={{current}} از {{total}} مطابقت دارد +find_match_count[two]={{current}} از {{total}} مطابقت دارد +find_match_count[few]={{current}} از {{total}} مطابقت دارد +find_match_count[many]={{current}} از {{total}} مطابقت دارد +find_match_count[other]={{current}} از {{total}} مطابقت دارد +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_not_found=عبارت پیدا نشد + +# Error panel labels +error_more_info=اطلاعات بیشتر +error_less_info=اطلاعات کمتر +error_close=بستن +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=‏PDF.js ورژن{{version}} ‏(ساخت: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=پیام: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=توده: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=پرونده: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=سطر: {{line}} +rendering_error=هنگام بارگیری صفحه خطایی رخ داد. + +# Predefined zoom values +page_scale_width=عرض صفحه +page_scale_fit=اندازه کردن صفحه +page_scale_auto=بزرگنمایی خودکار +page_scale_actual=اندازه واقعی‌ +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=خطا +loading_error=هنگام بارگیری پرونده PDF خطایی رخ داد. +invalid_file_error=پرونده PDF نامعتبر یامعیوب می‌باشد. +missing_file_error=پرونده PDF یافت نشد. +unexpected_response_error=پاسخ پیش بینی نشده سرور + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=جهت باز کردن پرونده PDF گذرواژه را وارد نمائید. +password_invalid=گذرواژه نامعتبر. لطفا مجددا تلاش کنید. +password_ok=تأیید +password_cancel=لغو + +printing_not_supported=هشدار: قابلیت چاپ به‌طور کامل در این مرورگر پشتیبانی نمی‌شود. +printing_not_ready=اخطار: پرونده PDF بطور کامل بارگیری نشده و امکان چاپ وجود ندارد. +web_fonts_disabled=فونت های تحت وب غیر فعال شده اند: امکان استفاده از نمایش دهنده داخلی PDF وجود ندارد. +document_colors_not_allowed=فایلهای PDF اجازه ندارند تا از رنگ‌های خود استفاده کنند: گزینه «به صفحات اجازه بده تا از رنگ‌های خود استفاده کنند» در مرورگر غیر فعال است. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ff/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ff/viewer.properties new file mode 100644 index 0000000..2e94346 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ff/viewer.properties @@ -0,0 +1,242 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Hello Ɓennungo +previous_label=Ɓennuɗo +next.title=Hello faango +next_label=Yeeso + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Hello +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=e nder {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) + +zoom_out.title=Lonngo Woɗɗa +zoom_out_label=Lonngo Woɗɗa +zoom_in.title=Lonngo Ara +zoom_in_label=Lonngo Ara +zoom.title=Lonngo +presentation_mode.title=Faytu to Presentation Mode +presentation_mode_label=Presentation Mode +open_file.title=Uddit Fiilde +open_file_label=Uddit +print.title=Winndito +print_label=Winndito +download.title=Aawto +download_label=Aawto +bookmark.title=Jiytol gonangol (natto walla uddit e henorde) +bookmark_label=Jiytol Gonangol + +# Secondary toolbar and context menu +tools.title=Kuutorɗe +tools_label=Kuutorɗe +first_page.title=Yah to hello adanngo +first_page.label=Yah to hello adanngo +first_page_label=Yah to hello adanngo +last_page.title=Yah to hello wattindiingo +last_page.label=Yah to hello wattindiingo +last_page_label=Yah to hello wattindiingo +page_rotate_cw.title=Yiiltu Faya Ñaamo +page_rotate_cw.label=Yiiltu Faya Ñaamo +page_rotate_cw_label=Yiiltu Faya Ñaamo +page_rotate_ccw.title=Yiiltu Faya Nano +page_rotate_ccw.label=Yiiltu Faya Nano +page_rotate_ccw_label=Yiiltu Faya Nano + +cursor_text_select_tool.title=Gollin kaɓirgel cuɓirgel binndi +cursor_text_select_tool_label=Kaɓirgel cuɓirgel binndi +cursor_hand_tool.title=Hurmin kuutorgal junngo +cursor_hand_tool_label=Kaɓirgel junngo + +scroll_vertical.title=Huutoro gorwitol daringol +scroll_vertical_label=Gorwitol daringol +scroll_horizontal.title=Huutoro gorwitol lelingol +scroll_horizontal_label=Gorwitol daringol +scroll_wrapped.title=Huutoro gorwitol coomingol +scroll_wrapped_label=Gorwitol coomingol + +spread_none.title=Hoto tawtu kelle kelle +spread_none_label=Alaa Spreads +spread_odd.title=Tawtu kelle puɗɗortooɗe kelle teelɗe +spread_odd_label=Kelle teelɗe +spread_even.title=Tawtu ɗereeji kelle puɗɗoriiɗi kelle teeltuɗe +spread_even_label=Kelle teeltuɗe + +# Document properties dialog box +document_properties.title=Keeroraaɗi Winndannde… +document_properties_label=Keeroraaɗi Winndannde… +document_properties_file_name=Innde fiilde: +document_properties_file_size=Ɓetol fiilde: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bite) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bite) +document_properties_title=Tiitoonde: +document_properties_author=Binnduɗo: +document_properties_subject=Toɓɓere: +document_properties_keywords=Kelmekele jiytirɗe: +document_properties_creation_date=Ñalnde Sosaa: +document_properties_modification_date=Ñalnde Waylaa: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Cosɗo: +document_properties_producer=Paggiiɗo PDF: +document_properties_version=Yamre PDF: +document_properties_page_count=Limoore Kelle: +document_properties_page_size=Ɓeto Hello: +document_properties_page_size_unit_inches=nder +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=dariingo +document_properties_page_size_orientation_landscape=wertiingo +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Ɓataake +document_properties_page_size_name_legal=Laawol +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Ɗisngo geese yaawngo: +document_properties_linearized_yes=Eey +document_properties_linearized_no=Alaa +document_properties_close=Uddu + +print_progress_message=Nana heboo winnditaade fiilannde… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Haaytu + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Toggilo Palal Sawndo +toggle_sidebar_notification.title=Palal sawndo (dokimaa oo ina waɗi taarngo/cinnde) +toggle_sidebar_label=Toggilo Palal Sawndo +document_outline.title=Hollu Ƴiyal Fiilannde (dobdobo ngam wertude/taggude teme fof) +document_outline_label=Toɓɓe Fiilannde +attachments.title=Hollu Ɗisanɗe +attachments_label=Ɗisanɗe +thumbs.title=Hollu Dooɓe +thumbs_label=Dooɓe +findbar.title=Yiylo e fiilannde +findbar_label=Yiytu + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Hello {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Dooɓre Hello {{page}} + +# Find panel button title and messages +find_input.title=Yiytu +find_input.placeholder=Yiylo nder dokimaa +find_previous.title=Yiylo cilol ɓennugol konngol ngol +find_previous_label=Ɓennuɗo +find_next.title=Yiylo cilol garowol konngol ngol +find_next_label=Yeeso +find_highlight=Jalbin fof +find_match_case_label=Jaaɓnu darnde +find_entire_word_label=Kelme timmuɗe tan +find_reached_top=Heɓii fuɗɗorde fiilannde, jokku faya les +find_reached_bottom=Heɓii hoore fiilannde, jokku faya les +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} wonande laabi {{total}} +find_match_count[two]={{current}} wonande laabi {{total}} +find_match_count[few]={{current}} wonande laabi {{total}} +find_match_count[many]={{current}} wonande laabi {{total}} +find_match_count[other]={{current}} wonande laabi {{total}} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Ko ɓuri laabi {{limit}} +find_match_count_limit[one]=Ko ɓuri laani {{limit}} +find_match_count_limit[two]=Ko ɓuri laabi {{limit}} +find_match_count_limit[few]=Ko ɓuri laabi {{limit}} +find_match_count_limit[many]=Ko ɓuri laabi {{limit}} +find_match_count_limit[other]=Ko ɓuri laabi {{limit}} +find_not_found=Konngi njiyataa + +# Error panel labels +error_more_info=Ɓeydu Humpito +error_less_info=Ustu Humpito +error_close=Uddu +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Ɓatakuure: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fiilde: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Gorol: {{line}} +rendering_error=Juumre waɗii tuma nde yoŋkittoo hello. + +# Predefined zoom values +page_scale_width=Njaajeendi Hello +page_scale_fit=Keƴeendi Hello +page_scale_auto=Loongorde Jaajol +page_scale_actual=Ɓetol Jaati +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Juumre +loading_error=Juumre waɗii tuma nde loowata PDF oo. +invalid_file_error=Fiilde PDF moƴƴaani walla jiibii. +missing_file_error=Fiilde PDF ena ŋakki. +unexpected_response_error=Jaabtol sarworde tijjinooka. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Siiftannde] +password_label=Naatu finnde ngam uddite ndee fiilde PDF. +password_invalid=Finnde moƴƴaani. Tiiɗno eto kadi. +password_ok=OK +password_cancel=Haaytu + +printing_not_supported=Reentino: Winnditagol tammbitaaka no feewi e ndee wanngorde. +printing_not_ready=Reentino: PDF oo loowaaki haa timmi ngam winnditagol. +web_fonts_disabled=Ponte geese ko daaƴaaɗe: horiima huutoraade ponte PDF coomtoraaɗe. +document_colors_not_allowed=Piilanɗe PDF njamiraaka yoo kuutoro goobuuji mum'en keeriiɗi: 'Yamir kello yoo kuutoro goobuuki keeriiɗi' koko daaƴaa e wanngorde ndee. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/fi/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/fi/viewer.properties new file mode 100644 index 0000000..76bfa13 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/fi/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Edellinen sivu +previous_label=Edellinen +next.title=Seuraava sivu +next_label=Seuraava + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Sivu +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) + +zoom_out.title=Loitonna +zoom_out_label=Loitonna +zoom_in.title=Lähennä +zoom_in_label=Lähennä +zoom.title=Suurennus +presentation_mode.title=Siirry esitystilaan +presentation_mode_label=Esitystila +open_file.title=Avaa tiedosto +open_file_label=Avaa +print.title=Tulosta +print_label=Tulosta +download.title=Lataa +download_label=Lataa +bookmark.title=Avoin ikkuna (kopioi tai avaa uuteen ikkunaan) +bookmark_label=Avoin ikkuna + +# Secondary toolbar and context menu +tools.title=Tools +tools_label=Tools +first_page.title=Siirry ensimmäiselle sivulle +first_page.label=Siirry ensimmäiselle sivulle +first_page_label=Siirry ensimmäiselle sivulle +last_page.title=Siirry viimeiselle sivulle +last_page.label=Siirry viimeiselle sivulle +last_page_label=Siirry viimeiselle sivulle +page_rotate_cw.title=Kierrä oikealle +page_rotate_cw.label=Kierrä oikealle +page_rotate_cw_label=Kierrä oikealle +page_rotate_ccw.title=Kierrä vasemmalle +page_rotate_ccw.label=Kierrä vasemmalle +page_rotate_ccw_label=Kierrä vasemmalle + +cursor_text_select_tool.title=Käytä tekstinvalintatyökalua +cursor_text_select_tool_label=Tekstinvalintatyökalu +cursor_hand_tool.title=Käytä käsityökalua +cursor_hand_tool_label=Käsityökalu + +scroll_vertical.title=Käytä pystysuuntaista vieritystä +scroll_vertical_label=Pystysuuntainen vieritys +scroll_horizontal.title=Käytä vaakasuuntaista vieritystä +scroll_horizontal_label=Vaakasuuntainen vieritys +scroll_wrapped.title=Käytä rivittyvää vieritystä +scroll_wrapped_label=Rivittyvä vieritys + +spread_none.title=Älä yhdistä sivuja aukeamiksi +spread_none_label=Ei aukeamia +spread_odd.title=Yhdistä sivut aukeamiksi alkaen parittomalta sivulta +spread_odd_label=Parittomalta alkavat aukeamat +spread_even.title=Yhdistä sivut aukeamiksi alkaen parilliselta sivulta +spread_even_label=Parilliselta alkavat aukeamat + +# Document properties dialog box +document_properties.title=Dokumentin ominaisuudet… +document_properties_label=Dokumentin ominaisuudet… +document_properties_file_name=Tiedostonimi: +document_properties_file_size=Tiedoston koko: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} kt ({{size_b}} tavua) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} Mt ({{size_b}} tavua) +document_properties_title=Otsikko: +document_properties_author=Tekijä: +document_properties_subject=Aihe: +document_properties_keywords=Avainsanat: +document_properties_creation_date=Luomispäivämäärä: +document_properties_modification_date=Muokkauspäivämäärä: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Luoja: +document_properties_producer=PDF-tuottaja: +document_properties_version=PDF-versio: +document_properties_page_count=Sivujen määrä: +document_properties_page_size=Sivun koko: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=pysty +document_properties_page_size_orientation_landscape=vaaka +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Nopea web-katselu: +document_properties_linearized_yes=Kyllä +document_properties_linearized_no=Ei +document_properties_close=Sulje + +print_progress_message=Valmistellaan dokumenttia tulostamista varten… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=Peruuta + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Näytä/piilota sivupaneeli +toggle_sidebar_notification.title=Näytä/piilota sivupaneeli (dokumentissa on sisällys tai liitteitä) +toggle_sidebar_label=Näytä/piilota sivupaneeli +document_outline.title=Näytä dokumentin sisällys (laajenna tai kutista kohdat kaksoisnapsauttamalla) +document_outline_label=Dokumentin sisällys +attachments.title=Näytä liitteet +attachments_label=Liitteet +thumbs.title=Näytä pienoiskuvat +thumbs_label=Pienoiskuvat +findbar.title=Etsi dokumentista +findbar_label=Etsi + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Sivu {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Sivu {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Pienoiskuva sivusta {{page}} + +# Find panel button title and messages +find_input.title=Etsi +find_input.placeholder=Etsi dokumentista… +find_previous.title=Etsi hakusanan edellinen osuma +find_previous_label=Edellinen +find_next.title=Etsi hakusanan seuraava osuma +find_next_label=Seuraava +find_highlight=Korosta kaikki +find_match_case_label=Huomioi kirjainkoko +find_entire_word_label=Kokonaiset sanat +find_reached_top=Päästiin dokumentin alkuun, jatketaan lopusta +find_reached_bottom=Päästiin sivun loppuun, jatketaan alusta +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} / {{total}} osuma +find_match_count[two]={{current}} / {{total}} osumaa +find_match_count[few]={{current}} / {{total}} osumaa +find_match_count[many]={{current}} / {{total}} osumaa +find_match_count[other]={{current}} / {{total}} osumaa +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Enemmän kuin {{limit}} osumaa +find_match_count_limit[one]=Enemmän kuin {{limit}} osuma +find_match_count_limit[two]=Enemmän kuin {{limit}} osumaa +find_match_count_limit[few]=Enemmän kuin {{limit}} osumaa +find_match_count_limit[many]=Enemmän kuin {{limit}} osumaa +find_match_count_limit[other]=Enemmän kuin {{limit}} osumaa +find_not_found=Hakusanaa ei löytynyt + +# Error panel labels +error_more_info=Lisätietoja +error_less_info=Lisätietoja +error_close=Sulje +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (kooste: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Virheilmoitus: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pino: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Tiedosto: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Rivi: {{line}} +rendering_error=Tapahtui virhe piirrettäessä sivua. + +# Predefined zoom values +page_scale_width=Sivun leveys +page_scale_fit=Koko sivu +page_scale_auto=Automaattinen suurennus +page_scale_actual=Todellinen koko +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}} % + +# Loading indicator messages +loading_error_indicator=Virhe +loading_error=Tapahtui virhe ladattaessa PDF-tiedostoa. +invalid_file_error=Virheellinen tai vioittunut PDF-tiedosto. +missing_file_error=Puuttuva PDF-tiedosto. +unexpected_response_error=Odottamaton vastaus palvelimelta. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=Kirjoita PDF-tiedoston salasana. +password_invalid=Virheellinen salasana. Yritä uudestaan. +password_ok=OK +password_cancel=Peruuta + +printing_not_supported=Varoitus: Selain ei tue kaikkia tulostustapoja. +printing_not_ready=Varoitus: PDF-tiedosto ei ole vielä latautunut kokonaan, eikä sitä voi vielä tulostaa. +web_fonts_disabled=Verkkosivujen omat kirjasinlajit on estetty: ei voida käyttää upotettuja PDF-kirjasinlajeja. +document_colors_not_allowed=PDF-dokumenttien ei ole sallittua käyttää omia värejään: Asetusta ”Sivut saavat käyttää omia värejään oletusten sijaan” ei ole valittu selaimen asetuksissa. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/fr/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/fr/viewer.properties new file mode 100644 index 0000000..7df1d3d --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/fr/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Page précédente +previous_label=Précédent +next.title=Page suivante +next_label=Suivant + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Page +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=sur {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} sur {{pagesCount}}) + +zoom_out.title=Zoom arrière +zoom_out_label=Zoom arrière +zoom_in.title=Zoom avant +zoom_in_label=Zoom avant +zoom.title=Zoom +presentation_mode.title=Basculer en mode présentation +presentation_mode_label=Mode présentation +open_file.title=Ouvrir le fichier +open_file_label=Ouvrir le fichier +print.title=Imprimer +print_label=Imprimer +download.title=Télécharger +download_label=Télécharger +bookmark.title=Affichage courant (copier ou ouvrir dans une nouvelle fenêtre) +bookmark_label=Affichage actuel + +# Secondary toolbar and context menu +tools.title=Outils +tools_label=Outils +first_page.title=Aller à la première page +first_page.label=Aller à la première page +first_page_label=Aller à la première page +last_page.title=Aller à la dernière page +last_page.label=Aller à la dernière page +last_page_label=Aller à la dernière page +page_rotate_cw.title=Rotation horaire +page_rotate_cw.label=Rotation horaire +page_rotate_cw_label=Rotation horaire +page_rotate_ccw.title=Rotation antihoraire +page_rotate_ccw.label=Rotation antihoraire +page_rotate_ccw_label=Rotation antihoraire + +cursor_text_select_tool.title=Activer l’outil de sélection de texte +cursor_text_select_tool_label=Outil de sélection de texte +cursor_hand_tool.title=Activer l’outil main +cursor_hand_tool_label=Outil main + +scroll_vertical.title=Utiliser le défilement vertical +scroll_vertical_label=Défilement vertical +scroll_horizontal.title=Utiliser le défilement horizontal +scroll_horizontal_label=Défilement horizontal +scroll_wrapped.title=Utiliser le défilement par bloc +scroll_wrapped_label=Défilement par bloc + +spread_none.title=Ne pas afficher les pages deux à deux +spread_none_label=Pas de double affichage +spread_odd.title=Afficher les pages par deux, impaires à gauche +spread_odd_label=Doubles pages, impaires à gauche +spread_even.title=Afficher les pages par deux, paires à gauche +spread_even_label=Doubles pages, paires à gauche + +# Document properties dialog box +document_properties.title=Propriétés du document… +document_properties_label=Propriétés du document… +document_properties_file_name=Nom du fichier : +document_properties_file_size=Taille du fichier : +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} Ko ({{size_b}} octets) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} Mo ({{size_b}} octets) +document_properties_title=Titre : +document_properties_author=Auteur : +document_properties_subject=Sujet : +document_properties_keywords=Mots-clés : +document_properties_creation_date=Date de création : +document_properties_modification_date=Modifié le : +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}} à {{time}} +document_properties_creator=Créé par : +document_properties_producer=Outil de conversion PDF : +document_properties_version=Version PDF : +document_properties_page_count=Nombre de pages : +document_properties_page_size=Taille de la page : +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portrait +document_properties_page_size_orientation_landscape=paysage +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=lettre +document_properties_page_size_name_legal=document juridique +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Affichage rapide des pages web : +document_properties_linearized_yes=Oui +document_properties_linearized_no=Non +document_properties_close=Fermer + +print_progress_message=Préparation du document pour l’impression… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=Annuler + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Afficher/Masquer le panneau latéral +toggle_sidebar_notification.title=Afficher/Masquer le panneau latéral (le document contient des signets/pièces jointes) +toggle_sidebar_label=Afficher/Masquer le panneau latéral +document_outline.title=Afficher les signets du document (double-cliquer pour développer/réduire tous les éléments) +document_outline_label=Signets du document +attachments.title=Afficher les pièces jointes +attachments_label=Pièces jointes +thumbs.title=Afficher les vignettes +thumbs_label=Vignettes +findbar.title=Rechercher dans le document +findbar_label=Rechercher + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Page {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Page {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Vignette de la page {{page}} + +# Find panel button title and messages +find_input.title=Rechercher +find_input.placeholder=Rechercher dans le document… +find_previous.title=Trouver l’occurrence précédente de l’expression +find_previous_label=Précédent +find_next.title=Trouver la prochaine occurrence de l’expression +find_next_label=Suivant +find_highlight=Tout surligner +find_match_case_label=Respecter la casse +find_entire_word_label=Mots entiers +find_reached_top=Haut de la page atteint, poursuite depuis la fin +find_reached_bottom=Bas de la page atteint, poursuite au début +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]=Occurrence {{current}} sur {{total}} +find_match_count[two]=Occurrence {{current}} sur {{total}} +find_match_count[few]=Occurrence {{current}} sur {{total}} +find_match_count[many]=Occurrence {{current}} sur {{total}} +find_match_count[other]=Occurrence {{current}} sur {{total}} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Plus de {{limit}} correspondances +find_match_count_limit[one]=Plus de {{limit}} correspondance +find_match_count_limit[two]=Plus de {{limit}} correspondances +find_match_count_limit[few]=Plus de {{limit}} correspondances +find_match_count_limit[many]=Plus de {{limit}} correspondances +find_match_count_limit[other]=Plus de {{limit}} correspondances +find_not_found=Expression non trouvée + +# Error panel labels +error_more_info=Plus d’informations +error_less_info=Moins d’informations +error_close=Fermer +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (identifiant de compilation : {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Message : {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pile : {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fichier : {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Ligne : {{line}} +rendering_error=Une erreur s’est produite lors de l’affichage de la page. + +# Predefined zoom values +page_scale_width=Pleine largeur +page_scale_fit=Page entière +page_scale_auto=Zoom automatique +page_scale_actual=Taille réelle +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}} % + +# Loading indicator messages +loading_error_indicator=Erreur +loading_error=Une erreur s’est produite lors du chargement du fichier PDF. +invalid_file_error=Fichier PDF invalide ou corrompu. +missing_file_error=Fichier PDF manquant. +unexpected_response_error=Réponse inattendue du serveur. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} à {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Annotation {{type}}] +password_label=Veuillez saisir le mot de passe pour ouvrir ce fichier PDF. +password_invalid=Mot de passe incorrect. Veuillez réessayer. +password_ok=OK +password_cancel=Annuler + +printing_not_supported=Attention : l’impression n’est pas totalement prise en charge par ce navigateur. +printing_not_ready=Attention : le PDF n’est pas entièrement chargé pour pouvoir l’imprimer. +web_fonts_disabled=Les polices web sont désactivées : impossible d’utiliser les polices intégrées au PDF. +document_colors_not_allowed=Les documents PDF ne peuvent pas utiliser leurs propres couleurs : « Autoriser les pages web à utiliser leurs propres couleurs » est désactivé dans le navigateur. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/fy-NL/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/fy-NL/viewer.properties new file mode 100644 index 0000000..4d6b18c --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/fy-NL/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Foarige side +previous_label=Foarige +next.title=Folgjende side +next_label=Folgjende + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Side +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=fa {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} fan {{pagesCount}}) + +zoom_out.title=Utzoome +zoom_out_label=Utzoome +zoom_in.title=Ynzoome +zoom_in_label=Ynzoome +zoom.title=Zoome +presentation_mode.title=Wikselje nei presintaasjemodus +presentation_mode_label=Presintaasjemodus +open_file.title=Bestân iepenje +open_file_label=Iepenje +print.title=Ofdrukke +print_label=Ofdrukke +download.title=Downloade +download_label=Downloade +bookmark.title=Aktuele finster (kopiearje of iepenje yn nij finster) +bookmark_label=Aktuele finster + +# Secondary toolbar and context menu +tools.title=Ark +tools_label=Ark +first_page.title=Gean nei earste side +first_page.label=Nei earste side gean +first_page_label=Gean nei earste side +last_page.title=Gean nei lêste side +last_page.label=Nei lêste side gean +last_page_label=Gean nei lêste side +page_rotate_cw.title=Rjochtsom draaie +page_rotate_cw.label=Rjochtsom draaie +page_rotate_cw_label=Rjochtsom draaie +page_rotate_ccw.title=Loftsom draaie +page_rotate_ccw.label=Loftsom draaie +page_rotate_ccw_label=Loftsom draaie + +cursor_text_select_tool.title=Tekstseleksjehelpmiddel ynskeakelje +cursor_text_select_tool_label=Tekstseleksjehelpmiddel +cursor_hand_tool.title=Hânhelpmiddel ynskeakelje +cursor_hand_tool_label=Hânhelpmiddel + +scroll_vertical.title=Fertikaal skowe brûke +scroll_vertical_label=Fertikaal skowe +scroll_horizontal.title=Horizontaal skowe brûke +scroll_horizontal_label=Horizontaal skowe +scroll_wrapped.title=Skowe mei oersjoch brûke +scroll_wrapped_label=Skowe mei oersjoch + +spread_none.title=Sidesprieding net gearfetsje +spread_none_label=Gjin sprieding +spread_odd.title=Sidesprieding gearfetsje te starten mei ûneven nûmers +spread_odd_label=Uneven sprieding +spread_even.title=Sidesprieding gearfetsje te starten mei even nûmers +spread_even_label=Even sprieding + +# Document properties dialog box +document_properties.title=Dokuminteigenskippen… +document_properties_label=Dokuminteigenskippen… +document_properties_file_name=Bestânsnamme: +document_properties_file_size=Bestânsgrutte: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Titel: +document_properties_author=Auteur: +document_properties_subject=Underwerp: +document_properties_keywords=Kaaiwurden: +document_properties_creation_date=Oanmaakdatum: +document_properties_modification_date=Bewurkingsdatum: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Makker: +document_properties_producer=PDF-makker: +document_properties_version=PDF-ferzje: +document_properties_page_count=Siden: +document_properties_page_size=Sideformaat: +document_properties_page_size_unit_inches=yn +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=steand +document_properties_page_size_orientation_landscape=lizzend +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Juridysk +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Flugge webwerjefte: +document_properties_linearized_yes=Ja +document_properties_linearized_no=Nee +document_properties_close=Slute + +print_progress_message=Dokumint tariede oar ôfdrukken… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Annulearje + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Sidebalke yn-/útskeakelje +toggle_sidebar_notification.title=Sidebalke yn-/útskeakelje (dokumint befettet outline/bylagen) +toggle_sidebar_label=Sidebalke yn-/útskeakelje +document_outline.title=Dokumintoersjoch toane (dûbelklik om alle items út/yn te klappen) +document_outline_label=Dokumintoersjoch +attachments.title=Bylagen toane +attachments_label=Bylagen +thumbs.title=Foarbylden toane +thumbs_label=Foarbylden +findbar.title=Sykje yn dokumint +findbar_label=Sykje + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Side {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Side {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Foarbyld fan side {{page}} + +# Find panel button title and messages +find_input.title=Sykje +find_input.placeholder=Sykje yn dokumint… +find_previous.title=It foarige foarkommen fan de tekst sykje +find_previous_label=Foarige +find_next.title=It folgjende foarkommen fan de tekst sykje +find_next_label=Folgjende +find_highlight=Alles markearje +find_match_case_label=Haadlettergefoelich +find_entire_word_label=Hiele wurden +find_reached_top=Boppekant fan dokumint berikt, trochgien fan ûnder ôf +find_reached_bottom=Ein fan dokumint berikt, trochgien fan boppe ôf +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} fan {{total}} oerienkomst +find_match_count[two]={{current}} fan {{total}} oerienkomsten +find_match_count[few]={{current}} fan {{total}} oerienkomsten +find_match_count[many]={{current}} fan {{total}} oerienkomsten +find_match_count[other]={{current}} fan {{total}} oerienkomsten +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Mear as {{limit}} oerienkomsten +find_match_count_limit[one]=Mear as {{limit}} oerienkomst +find_match_count_limit[two]=Mear as {{limit}} oerienkomsten +find_match_count_limit[few]=Mear as {{limit}} oerienkomsten +find_match_count_limit[many]=Mear as {{limit}} oerienkomsten +find_match_count_limit[other]=Mear as {{limit}} oerienkomsten +find_not_found=Tekst net fûn + +# Error panel labels +error_more_info=Mear ynformaasje +error_less_info=Minder ynformaasje +error_close=Slute +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js f{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Berjocht: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Bestân: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Rigel: {{line}} +rendering_error=Der is in flater bard by it renderjen fan de side. + +# Predefined zoom values +page_scale_width=Sidebreedte +page_scale_fit=Hiele side +page_scale_auto=Automatysk zoome +page_scale_actual=Werklike grutte +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Flater +loading_error=Der is in flater bard by it laden fan de PDF. +invalid_file_error=Ynfalide of korruptearre PDF-bestân. +missing_file_error=PDF-bestân ûntbrekt. +unexpected_response_error=Unferwacht serverantwurd. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}}-annotaasje] +password_label=Jou it wachtwurd om dit PDF-bestân te iepenjen. +password_invalid=Ferkeard wachtwurd. Probearje opnij. +password_ok=OK +password_cancel=Annulearje + +printing_not_supported=Warning: Printen is net folslein stipe troch dizze browser. +printing_not_ready=Warning: PDF is net folslein laden om ôf te drukken. +web_fonts_disabled=Weblettertypen binne útskeakele: gebrûk fan ynsluten PDF-lettertypen is net mooglik. +document_colors_not_allowed=PDF-dokuminten meie harren eigen kleuren net brûke: ‘Siden tastean om harren eigen kleuren te kiezen’ is útskeakele yn de browser. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ga-IE/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ga-IE/viewer.properties new file mode 100644 index 0000000..62f1a55 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ga-IE/viewer.properties @@ -0,0 +1,184 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=An Leathanach Roimhe Seo +previous_label=Roimhe Seo +next.title=An Chéad Leathanach Eile +next_label=Ar Aghaidh + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Leathanach +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=as {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} as {{pagesCount}}) + +zoom_out.title=Súmáil Amach +zoom_out_label=Súmáil Amach +zoom_in.title=Súmáil Isteach +zoom_in_label=Súmáil Isteach +zoom.title=Súmáil +presentation_mode.title=Úsáid an Mód Láithreoireachta +presentation_mode_label=Mód Láithreoireachta +open_file.title=Oscail Comhad +open_file_label=Oscail +print.title=Priontáil +print_label=Priontáil +download.title=Íoslódáil +download_label=Íoslódáil +bookmark.title=An t-amharc reatha (cóipeáil nó oscail i bhfuinneog nua) +bookmark_label=An tAmharc Reatha + +# Secondary toolbar and context menu +tools.title=Uirlisí +tools_label=Uirlisí +first_page.title=Go dtí an chéad leathanach +first_page.label=Go dtí an chéad leathanach +first_page_label=Go dtí an chéad leathanach +last_page.title=Go dtí an leathanach deiridh +last_page.label=Go dtí an leathanach deiridh +last_page_label=Go dtí an leathanach deiridh +page_rotate_cw.title=Rothlaigh ar deiseal +page_rotate_cw.label=Rothlaigh ar deiseal +page_rotate_cw_label=Rothlaigh ar deiseal +page_rotate_ccw.title=Rothlaigh ar tuathal +page_rotate_ccw.label=Rothlaigh ar tuathal +page_rotate_ccw_label=Rothlaigh ar tuathal + +cursor_text_select_tool.title=Cumasaigh an Uirlis Roghnaithe Téacs +cursor_text_select_tool_label=Uirlis Roghnaithe Téacs +cursor_hand_tool.title=Cumasaigh an Uirlis Láimhe +cursor_hand_tool_label=Uirlis Láimhe + +# Document properties dialog box +document_properties.title=Airíonna na Cáipéise… +document_properties_label=Airíonna na Cáipéise… +document_properties_file_name=Ainm an chomhaid: +document_properties_file_size=Méid an chomhaid: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} kB ({{size_b}} beart) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} beart) +document_properties_title=Teideal: +document_properties_author=Údar: +document_properties_subject=Ábhar: +document_properties_keywords=Eochairfhocail: +document_properties_creation_date=Dáta Cruthaithe: +document_properties_modification_date=Dáta Athraithe: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Cruthaitheoir: +document_properties_producer=Cruthaitheoir an PDF: +document_properties_version=Leagan PDF: +document_properties_page_count=Líon Leathanach: +document_properties_close=Dún + +print_progress_message=Cáipéis á hullmhú le priontáil… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cealaigh + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Scoránaigh an Barra Taoibh +toggle_sidebar_notification.title=Scoránaigh an Barra Taoibh (achoimre/iatáin sa cháipéis) +toggle_sidebar_label=Scoránaigh an Barra Taoibh +document_outline.title=Taispeáin Imlíne na Cáipéise (déchliceáil chun chuile rud a leathnú nó a laghdú) +document_outline_label=Creatlach na Cáipéise +attachments.title=Taispeáin Iatáin +attachments_label=Iatáin +thumbs.title=Taispeáin Mionsamhlacha +thumbs_label=Mionsamhlacha +findbar.title=Aimsigh sa Cháipéis +findbar_label=Aimsigh + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Leathanach {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Mionsamhail Leathanaigh {{page}} + +# Find panel button title and messages +find_input.title=Aimsigh +find_input.placeholder=Aimsigh sa cháipéis… +find_previous.title=Aimsigh an sampla roimhe seo den nath seo +find_previous_label=Roimhe seo +find_next.title=Aimsigh an chéad sampla eile den nath sin +find_next_label=Ar aghaidh +find_highlight=Aibhsigh uile +find_match_case_label=Cásíogair +find_reached_top=Ag barr na cáipéise, ag leanúint ón mbun +find_reached_bottom=Ag bun na cáipéise, ag leanúint ón mbarr +find_not_found=Frása gan aimsiú + +# Error panel labels +error_more_info=Tuilleadh Eolais +error_less_info=Níos Lú Eolais +error_close=Dún +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Teachtaireacht: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Cruach: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Comhad: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Líne: {{line}} +rendering_error=Tharla earráid agus an leathanach á leagan amach. + +# Predefined zoom values +page_scale_width=Leithead Leathanaigh +page_scale_fit=Laghdaigh go dtí an Leathanach +page_scale_auto=Súmáil Uathoibríoch +page_scale_actual=Fíormhéid +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Earráid +loading_error=Tharla earráid agus an cháipéis PDF á lódáil. +invalid_file_error=Comhad neamhbhailí nó truaillithe PDF. +missing_file_error=Comhad PDF ar iarraidh. +unexpected_response_error=Freagra ón bhfreastalaí nach rabhthas ag súil leis. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anótáil {{type}}] +password_label=Cuir an focal faire isteach chun an comhad PDF seo a oscailt. +password_invalid=Focal faire mícheart. Déan iarracht eile. +password_ok=OK +password_cancel=Cealaigh + +printing_not_supported=Rabhadh: Ní thacaíonn an brabhsálaí le priontáil go hiomlán. +printing_not_ready=Rabhadh: Ní féidir an PDF a phriontáil go dtí go mbeidh an cháipéis iomlán lódáilte. +web_fonts_disabled=Tá clófhoirne Gréasáin díchumasaithe: ní féidir clófhoirne leabaithe PDF a úsáid. +document_colors_not_allowed=Níl cead ag cáipéisí PDF a ndathanna féin a roghnú: tá “Tabhair cead do leathanaigh a ndathanna féin a roghnú” díchumasaithe sa mbrabhsálaí. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/gd/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/gd/viewer.properties new file mode 100644 index 0000000..2712568 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/gd/viewer.properties @@ -0,0 +1,242 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=An duilleag roimhe +previous_label=Air ais +next.title=An ath-dhuilleag +next_label=Air adhart + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Duilleag +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=à {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} à {{pagesCount}}) + +zoom_out.title=Sùm a-mach +zoom_out_label=Sùm a-mach +zoom_in.title=Sùm a-steach +zoom_in_label=Sùm a-steach +zoom.title=Sùm +presentation_mode.title=Gearr leum dhan mhodh taisbeanaidh +presentation_mode_label=Am modh taisbeanaidh +open_file.title=Fosgail faidhle +open_file_label=Fosgail +print.title=Clò-bhuail +print_label=Clò-bhuail +download.title=Luchdaich a-nuas +download_label=Luchdaich a-nuas +bookmark.title=An sealladh làithreach (dèan lethbhreac no fosgail e ann an uinneag ùr) +bookmark_label=An sealladh làithreach + +# Secondary toolbar and context menu +tools.title=Innealan +tools_label=Innealan +first_page.title=Rach gun chiad duilleag +first_page.label=Rach gun chiad duilleag +first_page_label=Rach gun chiad duilleag +last_page.title=Rach gun duilleag mu dheireadh +last_page.label=Rach gun duilleag mu dheireadh +last_page_label=Rach gun duilleag mu dheireadh +page_rotate_cw.title=Cuairtich gu deiseil +page_rotate_cw.label=Cuairtich gu deiseil +page_rotate_cw_label=Cuairtich gu deiseil +page_rotate_ccw.title=Cuairtich gu tuathail +page_rotate_ccw.label=Cuairtich gu tuathail +page_rotate_ccw_label=Cuairtich gu tuathail + +cursor_text_select_tool.title=Cuir an comas inneal taghadh an teacsa +cursor_text_select_tool_label=Inneal taghadh an teacsa +cursor_hand_tool.title=Cuir inneal na làimhe an comas +cursor_hand_tool_label=Inneal na làimhe + +scroll_vertical.title=Cleachd sgroladh inghearach +scroll_vertical_label=Sgroladh inghearach +scroll_horizontal.title=Cleachd sgroladh còmhnard +scroll_horizontal_label=Sgroladh còmhnard +scroll_wrapped.title=Cleachd sgroladh paisgte +scroll_wrapped_label=Sgroladh paisgte + +spread_none.title=Na cuir còmhla sgoileadh dhuilleagan +spread_none_label=Gun sgaoileadh dhuilleagan +spread_odd.title=Cuir còmhla duilleagan sgaoilte a thòisicheas le duilleagan aig a bheil àireamh chorr +spread_odd_label=Sgaoileadh dhuilleagan corra +spread_even.title=Cuir còmhla duilleagan sgaoilte a thòisicheas le duilleagan aig a bheil àireamh chothrom +spread_even_label=Sgaoileadh dhuilleagan cothrom + +# Document properties dialog box +document_properties.title=Roghainnean na sgrìobhainne… +document_properties_label=Roghainnean na sgrìobhainne… +document_properties_file_name=Ainm an fhaidhle: +document_properties_file_size=Meud an fhaidhle: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Tiotal: +document_properties_author=Ùghdar: +document_properties_subject=Cuspair: +document_properties_keywords=Faclan-luirg: +document_properties_creation_date=Latha a chruthachaidh: +document_properties_modification_date=Latha atharrachaidh: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Cruthadair: +document_properties_producer=Saothraiche a' PDF: +document_properties_version=Tionndadh a' PDF: +document_properties_page_count=Àireamh de dhuilleagan: +document_properties_page_size=Meud na duilleige: +document_properties_page_size_unit_inches=ann an +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portraid +document_properties_page_size_orientation_landscape=dreach-tìre +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Litir +document_properties_page_size_name_legal=Laghail +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Grad shealladh-lìn: +document_properties_linearized_yes=Tha +document_properties_linearized_no=Chan eil +document_properties_close=Dùin + +print_progress_message=Ag ullachadh na sgrìobhainn airson clò-bhualadh… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Sguir dheth + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Toglaich am bàr-taoibh +toggle_sidebar_notification.title=Toglaich am bàr-taoibh (tha oir-loidhne/ceanglachain aig an sgrìobhainn) +toggle_sidebar_label=Toglaich am bàr-taoibh +document_outline.title=Seall oir-loidhne na sgrìobhainn (dèan briogadh dùbailte airson a h-uile nì a leudachadh/a cho-theannadh) +document_outline_label=Oir-loidhne na sgrìobhainne +attachments.title=Seall na ceanglachain +attachments_label=Ceanglachain +thumbs.title=Seall na dealbhagan +thumbs_label=Dealbhagan +findbar.title=Lorg san sgrìobhainn +findbar_label=Lorg + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Duilleag a {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Dealbhag duilleag a {{page}} + +# Find panel button title and messages +find_input.title=Lorg +find_input.placeholder=Lorg san sgrìobhainn... +find_previous.title=Lorg làthair roimhe na h-abairt seo +find_previous_label=Air ais +find_next.title=Lorg ath-làthair na h-abairt seo +find_next_label=Air adhart +find_highlight=Soillsich a h-uile +find_match_case_label=Aire do litrichean mòra is beaga +find_entire_word_label=Faclan-slàna +find_reached_top=Ràinig sinn barr na duilleige, a' leantainn air adhart o bhonn na duilleige +find_reached_bottom=Ràinig sinn bonn na duilleige, a' leantainn air adhart o bharr na duilleige +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} à {{total}} mhaids +find_match_count[two]={{current}} à {{total}} mhaids +find_match_count[few]={{current}} à {{total}} maidsichean +find_match_count[many]={{current}} à {{total}} maids +find_match_count[other]={{current}} à {{total}} maids +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Barrachd air {{limit}} maids +find_match_count_limit[one]=Barrachd air {{limit}} mhaids +find_match_count_limit[two]=Barrachd air {{limit}} mhaids +find_match_count_limit[few]=Barrachd air {{limit}} maidsichean +find_match_count_limit[many]=Barrachd air {{limit}} maids +find_match_count_limit[other]=Barrachd air {{limit}} maids +find_not_found=Cha deach an abairt a lorg + +# Error panel labels +error_more_info=Barrachd fiosrachaidh +error_less_info=Nas lugha de dh'fhiosrachadh +error_close=Dùin +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Teachdaireachd: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stac: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Faidhle: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Loidhne: {{line}} +rendering_error=Thachair mearachd rè reandaradh na duilleige. + +# Predefined zoom values +page_scale_width=Leud na duilleige +page_scale_fit=Freagair ri meud na duilleige +page_scale_auto=Sùm fèin-obrachail +page_scale_actual=Am fìor-mheud +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Mearachd +loading_error=Thachair mearachd rè luchdadh a' PDF. +invalid_file_error=Faidhle PDF a tha mì-dhligheach no coirbte. +missing_file_error=Faidhle PDF a tha a dhìth. +unexpected_response_error=Freagairt on fhrithealaiche ris nach robh dùil. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Nòtachadh {{type}}] +password_label=Cuir a-steach am facal-faire gus am faidhle PDF seo fhosgladh. +password_invalid=Tha am facal-faire cearr. Nach fheuch thu ris a-rithist? +password_ok=Ceart ma-tha +password_cancel=Sguir dheth + +printing_not_supported=Rabhadh: Chan eil am brabhsair seo a' cur làn-taic ri clò-bhualadh. +printing_not_ready=Rabhadh: Cha deach am PDF a luchdadh gu tur airson clò-bhualadh. +web_fonts_disabled=Tha cruthan-clò lìn à comas: Chan urrainn dhuinn cruthan-clò PDF leabaichte a chleachdadh. +document_colors_not_allowed=Chan fhaod sgrìobhainnean PDF na dathan aca fhèin a chleachdadh: Tha “Leig le duilleagan na dathan aca fhèin a chleachdadh” à comas sa bhrabhsair. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/gl/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/gl/viewer.properties new file mode 100644 index 0000000..187dbf1 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/gl/viewer.properties @@ -0,0 +1,242 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Páxina anterior +previous_label=Anterior +next.title=Seguinte páxina +next_label=Seguinte + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Páxina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Reducir +zoom_out_label=Reducir +zoom_in.title=Ampliar +zoom_in_label=Ampliar +zoom.title=Zoom +presentation_mode.title=Cambiar ao modo presentación +presentation_mode_label=Modo presentación +open_file.title=Abrir ficheiro +open_file_label=Abrir +print.title=Imprimir +print_label=Imprimir +download.title=Descargar +download_label=Descargar +bookmark.title=Vista actual (copiar ou abrir nunha nova xanela) +bookmark_label=Vista actual + +# Secondary toolbar and context menu +tools.title=Ferramentas +tools_label=Ferramentas +first_page.title=Ir á primeira páxina +first_page.label=Ir á primeira páxina +first_page_label=Ir á primeira páxina +last_page.title=Ir á última páxina +last_page.label=Ir á última páxina +last_page_label=Ir á última páxina +page_rotate_cw.title=Rotar no sentido das agullas do reloxo +page_rotate_cw.label=Rotar no sentido das agullas do reloxo +page_rotate_cw_label=Rotar no sentido das agullas do reloxo +page_rotate_ccw.title=Rotar no sentido contrario ás agullas do reloxo +page_rotate_ccw.label=Rotar no sentido contrario ás agullas do reloxo +page_rotate_ccw_label=Rotar no sentido contrario ás agullas do reloxo + +cursor_text_select_tool.title=Activar a ferramenta de selección de texto +cursor_text_select_tool_label=Ferramenta de selección de texto +cursor_hand_tool.title=Activar a ferramenta man +cursor_hand_tool_label=Ferramenta man + +scroll_vertical.title=Usar o desprazamento vertical +scroll_vertical_label=Desprazamento vertical +scroll_horizontal.title=Usar o desprazamento horizontal +scroll_horizontal_label=Desprazamento horizontal +scroll_wrapped.title=Usar desprazamento en bloque +scroll_wrapped_label=Desprazamento en bloque + +spread_none.title=Non agrupar páxinas +spread_none_label=Ningún agrupamento +spread_odd.title=Crea grupo de páxinas que comezan con números de páxina impares +spread_odd_label=Agrupamento impar +spread_even.title=Crea grupo de páxinas que comezan con números de páxina pares +spread_even_label=Agrupamento par + +# Document properties dialog box +document_properties.title=Propiedades do documento… +document_properties_label=Propiedades do documento… +document_properties_file_name=Nome do ficheiro: +document_properties_file_size=Tamaño do ficheiro: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Título: +document_properties_author=Autor: +document_properties_subject=Asunto: +document_properties_keywords=Palabras clave: +document_properties_creation_date=Data de creación: +document_properties_modification_date=Data de modificación: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creado por: +document_properties_producer=Xenerador do PDF: +document_properties_version=Versión de PDF: +document_properties_page_count=Número de páxinas: +document_properties_page_size=Tamaño da páxina: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=Vertical +document_properties_page_size_orientation_landscape=Horizontal +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Carta +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Visualización rápida das páxinas web: +document_properties_linearized_yes=Si +document_properties_linearized_no=Non +document_properties_close=Pechar + +print_progress_message=Preparando documento para imprimir… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Amosar/agochar a barra lateral +toggle_sidebar_notification.title=Amosar/agochar a barra lateral (o documento contén un esquema ou anexos) +toggle_sidebar_label=Amosar/agochar a barra lateral +document_outline.title=Amosar o esquema do documento (prema dúas veces para expandir/contraer todos os elementos) +document_outline_label=Esquema do documento +attachments.title=Amosar anexos +attachments_label=Anexos +thumbs.title=Amosar miniaturas +thumbs_label=Miniaturas +findbar.title=Atopar no documento +findbar_label=Atopar + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Páxina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura da páxina {{page}} + +# Find panel button title and messages +find_input.title=Atopar +find_input.placeholder=Atopar no documento… +find_previous.title=Atopar a anterior aparición da frase +find_previous_label=Anterior +find_next.title=Atopar a seguinte aparición da frase +find_next_label=Seguinte +find_highlight=Realzar todo +find_match_case_label=Diferenciar maiúsculas de minúsculas +find_entire_word_label=Palabras completas +find_reached_top=Chegouse ao inicio do documento, continuar desde o final +find_reached_bottom=Chegouse ao final do documento, continuar desde o inicio +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} de {{total}} coincidencia +find_match_count[two]={{current}} de {{total}} coincidencias +find_match_count[few]={{current}} de {{total}} coincidencias +find_match_count[many]={{current}} de {{total}} coincidencias +find_match_count[other]={{current}} de {{total}} coincidencias +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Máis de {{limit}} coincidencias +find_match_count_limit[one]=Máis de {{limit}} coincidencia +find_match_count_limit[two]=Máis de {{limit}} coincidencias +find_match_count_limit[few]=Máis de {{limit}} coincidencias +find_match_count_limit[many]=Máis de {{limit}} coincidencias +find_match_count_limit[other]=Máis de {{limit}} coincidencias +find_not_found=Non se atopou a frase + +# Error panel labels +error_more_info=Máis información +error_less_info=Menos información +error_close=Pechar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (Identificador da compilación: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensaxe: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Ficheiro: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Liña: {{line}} +rendering_error=Produciuse un erro ao representar a páxina. + +# Predefined zoom values +page_scale_width=Largura da páxina +page_scale_fit=Axuste de páxina +page_scale_auto=Zoom automático +page_scale_actual=Tamaño actual +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Erro +loading_error=Produciuse un erro ao cargar o PDF. +invalid_file_error=Ficheiro PDF danado ou non válido. +missing_file_error=Falta o ficheiro PDF. +unexpected_response_error=Resposta inesperada do servidor. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotación {{type}}] +password_label=Escriba o contrasinal para abrir este ficheiro PDF. +password_invalid=Contrasinal incorrecto. Tente de novo. +password_ok=Aceptar +password_cancel=Cancelar + +printing_not_supported=Aviso: A impresión non é compatíbel de todo con este navegador. +printing_not_ready=Aviso: O PDF non se cargou completamente para imprimirse. +web_fonts_disabled=Desactiváronse as fontes web: foi imposíbel usar as fontes incrustadas no PDF. +document_colors_not_allowed=Os documentos PDF non poden usar as súas propias cores: «Permitir que as páxinas escollan as súas propias cores» está desactivado no navegador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/gn/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/gn/viewer.properties new file mode 100644 index 0000000..e5652d7 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/gn/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Kuatiarogue mboyvegua +previous_label=Mboyvegua +next.title=Kuatiarogue upeigua +next_label=Upeigua + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Kuatiarogue +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} gui +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) + +zoom_out.title=Momichĩ +zoom_out_label=Momichĩ +zoom_in.title=Mbotuicha +zoom_in_label=Mbotuicha +zoom.title=Tuichakue +presentation_mode.title=Jehechauka reko moambue +presentation_mode_label=Jehechauka reko +open_file.title=Marandurendápe jeike +open_file_label=Jeike +print.title=Monguatia +print_label=Monguatia +download.title=Mboguejy +download_label=Mboguejy +bookmark.title=Ag̃agua jehecha (mbohasarã térã eike peteĩ ovetã pyahúpe) +bookmark_label=Ag̃agua jehecha + +# Secondary toolbar and context menu +tools.title=Tembipuru +tools_label=Tembipuru +first_page.title=Kuatiarogue ñepyrũme jeho +first_page.label=Kuatiarogue ñepyrũme jeho +first_page_label=Kuatiarogue ñepyrũme jeho +last_page.title=Kuatiarogue pahápe jeho +last_page.label=Kuatiarogue pahápe jeho +last_page_label=Kuatiarogue pahápe jeho +page_rotate_cw.title=Aravóicha mbojere +page_rotate_cw.label=Aravóicha mbojere +page_rotate_cw_label=Aravóicha mbojere +page_rotate_ccw.title=Aravo rapykue gotyo mbojere +page_rotate_ccw.label=Aravo rapykue gotyo mbojere +page_rotate_ccw_label=Aravo rapykue gotyo mbojere + +cursor_text_select_tool.title=Emyandy moñe'ẽrã jeporavo rembipuru +cursor_text_select_tool_label=Moñe'ẽrã jeporavo rembipuru +cursor_hand_tool.title=Tembipuru po pegua myandy +cursor_hand_tool_label=Tembipuru po pegua + +scroll_vertical.title=Eipuru jeku’e ykeguáva +scroll_vertical_label=Jeku’e ykeguáva +scroll_horizontal.title=Eipuru jeku’e yvate gotyo +scroll_horizontal_label=Jeku’e yvate gotyo +scroll_wrapped.title=Eipuru jeku’e mbohyrupyre +scroll_wrapped_label=Jeku’e mbohyrupyre + +spread_none.title=Ani ejuaju spreads kuatiarogue ndive +spread_none_label=Spreads ỹre +spread_odd.title=Embojuaju kuatiarogue jepysokue eñepyrũvo kuatiarogue impar-vagui +spread_odd_label=Spreads impar +spread_even.title=Embojuaju kuatiarogue jepysokue eñepyrũvo kuatiarogue par-vagui +spread_even_label=Ipukuve uvei + +# Document properties dialog box +document_properties.title=Kuatia mba'etee… +document_properties_label=Kuatia mba'etee… +document_properties_file_name=Marandurenda réra: +document_properties_file_size=Marandurenda tuichakue: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Teratee: +document_properties_author=Apohára: +document_properties_subject=Mba'egua: +document_properties_keywords=Jehero: +document_properties_creation_date=Teñoihague arange: +document_properties_modification_date=Iñambue hague arange: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Apo'ypyha: +document_properties_producer=PDF mbosako'iha: +document_properties_version=PDF mbojuehegua: +document_properties_page_count=Kuatiarogue papapy: +document_properties_page_size=Kuatiarogue tuichakue: +document_properties_page_size_unit_inches=Amo +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=Oĩháicha +document_properties_page_size_orientation_landscape=apaisado +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Kuatiañe'ẽ +document_properties_page_size_name_legal=Tee +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Ñanduti jahecha pya’e: +document_properties_linearized_yes=Añete +document_properties_linearized_no=Ahániri +document_properties_close=Mboty + +print_progress_message=Embosako'i kuatia emonguatia hag̃ua… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Heja + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Tenda yke moambue +toggle_sidebar_notification.title=Embojopyru tenda ykegua (kuatia oguereko kora/marandurenda moirũha) +toggle_sidebar_label=Tenda yke moambue +document_outline.title=Ehechauka kuatia rape (eikutu mokõi jey embotuicha/emomichĩ hag̃ua opavavete mba'epuru) +document_outline_label=Kuatia apopyre +attachments.title=Moirũha jehechauka +attachments_label=Moirũha +thumbs.title=Mba'emirĩ jehechauka +thumbs_label=Mba'emirĩ +findbar.title=Kuatiápe jeheka +findbar_label=Juhu + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Kuatiarogue {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Kuatiarogue {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Kuatiarogue mba'emirĩ {{page}} + +# Find panel button title and messages +find_input.title=Juhu +find_input.placeholder=Kuatiápe jejuhu… +find_previous.title=Ejuhu ñe'ẽrysýi osẽ'ypy hague +find_previous_label=Mboyvegua +find_next.title=Eho ñe'ẽ juhupyre upeiguávape +find_next_label=Upeigua +find_highlight=Embojekuaavepa +find_match_case_label=Ejesareko taiguasu/taimichĩre +find_entire_word_label=Ñe’ẽ oĩmbáva +find_reached_top=Ojehupyty kuatia ñepyrũ, oku'ejeýta kuatia paha guive +find_reached_bottom=Ojehupyty kuatia paha, oku'ejeýta kuatia ñepyrũ guive +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} {{total}} ojojoguáva +find_match_count[two]={{current}} {{total}} ojojoguáva +find_match_count[few]={{current}} {{total}} ojojoguáva +find_match_count[many]={{current}} {{total}} ojojoguáva +find_match_count[other]={{current}} {{total}} ojojoguáva +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Hetave {{limit}} ojojoguáva +find_match_count_limit[one]=Hetave {{limit}} ojojogua +find_match_count_limit[two]=Hetave {{limit}} ojojoguáva +find_match_count_limit[few]=Hetave {{limit}} ojojoguáva +find_match_count_limit[many]=Hetave {{limit}} ojojoguáva +find_match_count_limit[other]=Hetave {{limit}} ojojoguáva +find_not_found=Ñe'ẽrysýi ojejuhu'ỹva + +# Error panel labels +error_more_info=Maranduve +error_less_info=Sa'ive marandu +error_close=Mboty +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Ñe'ẽmondo: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Mbojo'apy: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Marandurenda: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Tairenda: {{line}} +rendering_error=Oiko jejavy ehechaukasévo kuatiarogue. + +# Predefined zoom values +page_scale_width=Kuatiarogue pekue +page_scale_fit=Kuatiarogue ñemoĩporã +page_scale_auto=Tuichakue ijeheguíva +page_scale_actual=Tuichakue ag̃agua +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Oĩvaíva +loading_error=Oiko jejavy PDF oñemyeñyhẽnguévo. +invalid_file_error=PDF marandurenda ndoikóiva térã ivaipyréva. +missing_file_error=Ndaipóri PDF marandurenda +unexpected_response_error=Mohendahavusu mbohovái ñeha'arõ'ỹva. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Jehaipy {{type}}] +password_label=Emoinge ñe'ẽñemi eipe'a hag̃ua ko marandurenda PDF. +password_invalid=Ñe'ẽñemi ndoikóiva. Eha'ã jey. +password_ok=MONEĨ +password_cancel=Heja + +printing_not_supported=Kyhyjerã: Ñembokuatia ndojokupytypái ko kundahára ndive. +printing_not_ready=Kyhyjerã: Ko PDF nahenyhẽmbái oñembokuatia hag̃uáicha. +web_fonts_disabled=Ñanduti taity oñemongéma: ndaikatumo'ãi eipuru PDF jehai'íva taity. +document_colors_not_allowed=Kuatiakuéra PDF ndaikatúi oipuru isa'ykuéra tee: “Emoneĩ kuatiaroguépe toiporavo isa'ykuéra tee” oñemongehína kundahárape. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/gu-IN/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/gu-IN/viewer.properties new file mode 100644 index 0000000..cce4bec --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/gu-IN/viewer.properties @@ -0,0 +1,242 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=પહેલાનુ પાનું +previous_label=પહેલાનુ +next.title=આગળનુ પાનું +next_label=આગળનું + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=પાનું +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=નો {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} નો {{pagesCount}}) + +zoom_out.title=મોટુ કરો +zoom_out_label=મોટુ કરો +zoom_in.title=નાનું કરો +zoom_in_label=નાનું કરો +zoom.title=નાનું મોટુ કરો +presentation_mode.title=રજૂઆત સ્થિતિમાં જાવ +presentation_mode_label=રજૂઆત સ્થિતિ +open_file.title=ફાઇલ ખોલો +open_file_label=ખોલો +print.title=છાપો +print_label=છારો +download.title=ડાઉનલોડ +download_label=ડાઉનલોડ +bookmark.title=વર્તમાન દૃશ્ય (નવી વિન્ડોમાં નકલ કરો અથવા ખોલો) +bookmark_label=વર્તમાન દૃશ્ય + +# Secondary toolbar and context menu +tools.title=સાધનો +tools_label=સાધનો +first_page.title=પહેલાં પાનામાં જાવ +first_page.label=પહેલાં પાનામાં જાવ +first_page_label=પ્રથમ પાનાં પર જાવ +last_page.title=છેલ્લા પાનાં પર જાવ +last_page.label=છેલ્લા પાનામાં જાવ +last_page_label=છેલ્લા પાનાં પર જાવ +page_rotate_cw.title=ઘડિયાળનાં કાંટા તરફ ફેરવો +page_rotate_cw.label=ઘડિયાળનાં કાંટાની જેમ ફેરવો +page_rotate_cw_label=ઘડિયાળનાં કાંટા તરફ ફેરવો +page_rotate_ccw.title=ઘડિયાળનાં કાંટાની ઉલટી દિશામાં ફેરવો +page_rotate_ccw.label=ઘડિયાળનાં કાંટાની ઉલટી દિશામાં ફેરવો +page_rotate_ccw_label=ઘડિયાળનાં કાંટાની વિરુદ્દ ફેરવો + +cursor_text_select_tool.title=ટેક્સ્ટ પસંદગી ટૂલ સક્ષમ કરો +cursor_text_select_tool_label=ટેક્સ્ટ પસંદગી ટૂલ +cursor_hand_tool.title=હાથનાં સાધનને સક્રિય કરો +cursor_hand_tool_label=હેન્ડ ટૂલ + +scroll_vertical.title=ઊભી સ્ક્રોલિંગનો ઉપયોગ કરો +scroll_vertical_label=ઊભી સ્ક્રોલિંગ +scroll_horizontal.title=આડી સ્ક્રોલિંગનો ઉપયોગ કરો +scroll_horizontal_label=આડી સ્ક્રોલિંગ +scroll_wrapped.title=આવરિત સ્ક્રોલિંગનો ઉપયોગ કરો +scroll_wrapped_label=આવરિત સ્ક્રોલિંગ + +spread_none.title=પૃષ્ઠ સ્પ્રેડમાં જોડાવશો નહીં +spread_none_label=કોઈ સ્પ્રેડ નથી +spread_odd.title=એકી-ક્રમાંકિત પૃષ્ઠો સાથે પ્રારંભ થતાં પૃષ્ઠ સ્પ્રેડમાં જોડાઓ +spread_odd_label=એકી સ્પ્રેડ્સ +spread_even.title=નંબર-ક્રમાંકિત પૃષ્ઠોથી શરૂ થતાં પૃષ્ઠ સ્પ્રેડમાં જોડાઓ +spread_even_label=સરખું ફેલાવવું + +# Document properties dialog box +document_properties.title=દસ્તાવેજ ગુણધર્મો… +document_properties_label=દસ્તાવેજ ગુણધર્મો… +document_properties_file_name=ફાઇલ નામ: +document_properties_file_size=ફાઇલ માપ: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} બાઇટ) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} બાઇટ) +document_properties_title=શીર્ષક: +document_properties_author=લેખક: +document_properties_subject=વિષય: +document_properties_keywords=કિવર્ડ: +document_properties_creation_date=નિર્માણ તારીખ: +document_properties_modification_date=ફેરફાર તારીખ: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=નિર્માતા: +document_properties_producer=PDF નિર્માતા: +document_properties_version=PDF આવૃત્તિ: +document_properties_page_count=પાનાં ગણતરી: +document_properties_page_size=પૃષ્ઠનું કદ: +document_properties_page_size_unit_inches=ઇંચ +document_properties_page_size_unit_millimeters=મીમી +document_properties_page_size_orientation_portrait=ઉભું +document_properties_page_size_orientation_landscape=આડુ +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=પત્ર +document_properties_page_size_name_legal=કાયદાકીય +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=ઝડપી વૅબ દૃશ્ય: +document_properties_linearized_yes=હા +document_properties_linearized_no=ના +document_properties_close=બંધ કરો + +print_progress_message=છાપકામ માટે દસ્તાવેજ તૈયાર કરી રહ્યા છે… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=રદ કરો + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=ટૉગલ બાજુપટ્ટી +toggle_sidebar_notification.title=સાઇડબારને ટૉગલ કરો(દસ્તાવેજની રૂપરેખા/જોડાણો શામેલ છે) +toggle_sidebar_label=ટૉગલ બાજુપટ્ટી +document_outline.title=દસ્તાવેજની રૂપરેખા બતાવો(બધી આઇટમ્સને વિસ્તૃત/સંકુચિત કરવા માટે ડબલ-ક્લિક કરો) +document_outline_label=દસ્તાવેજ રૂપરેખા +attachments.title=જોડાણોને બતાવો +attachments_label=જોડાણો +thumbs.title=થંબનેલ્સ બતાવો +thumbs_label=થંબનેલ્સ +findbar.title=દસ્તાવેજમાં શોધો +findbar_label=શોધો + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=પાનું {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=પાનાં {{page}} નું થંબનેલ્સ + +# Find panel button title and messages +find_input.title=શોધો +find_input.placeholder=દસ્તાવેજમાં શોધો… +find_previous.title=શબ્દસમૂહની પાછલી ઘટનાને શોધો +find_previous_label=પહેલાંનુ +find_next.title=શબ્દસમૂહની આગળની ઘટનાને શોધો +find_next_label=આગળનું +find_highlight=બધુ પ્રકાશિત કરો +find_match_case_label=કેસ બંધબેસાડો +find_entire_word_label=સંપૂર્ણ શબ્દો +find_reached_top=દસ્તાવેજનાં ટોચે પહોંચી ગયા, તળિયેથી ચાલુ કરેલ હતુ +find_reached_bottom=દસ્તાવેજનાં અંતે પહોંચી ગયા, ઉપરથી ચાલુ કરેલ હતુ +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{total}} માંથી {{current}} સરખું મળ્યું +find_match_count[two]={{total}} માંથી {{current}} સરખા મળ્યાં +find_match_count[few]={{total}} માંથી {{current}} સરખા મળ્યાં +find_match_count[many]={{total}} માંથી {{current}} સરખા મળ્યાં +find_match_count[other]={{total}} માંથી {{current}} સરખા મળ્યાં +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} કરતાં વધુ સરખા મળ્યાં +find_match_count_limit[one]={{limit}} કરતાં વધુ સરખું મળ્યું +find_match_count_limit[two]={{limit}} કરતાં વધુ સરખા મળ્યાં +find_match_count_limit[few]={{limit}} કરતાં વધુ સરખા મળ્યાં +find_match_count_limit[many]={{limit}} કરતાં વધુ સરખા મળ્યાં +find_match_count_limit[other]={{limit}} કરતાં વધુ સરખા મળ્યાં +find_not_found=શબ્દસમૂહ મળ્યુ નથી + +# Error panel labels +error_more_info=વધારે જાણકારી +error_less_info=ઓછી જાણકારી +error_close=બંધ કરો +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=સંદેશો: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=સ્ટેક: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ફાઇલ: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=વાક્ય: {{line}} +rendering_error=ભૂલ ઉદ્ભવી જ્યારે પાનાંનુ રેન્ડ કરી રહ્યા હોય. + +# Predefined zoom values +page_scale_width=પાનાની પહોળાઇ +page_scale_fit=પાનું બંધબેસતુ +page_scale_auto=આપમેળે નાનુંમોટુ કરો +page_scale_actual=ચોક્કસ માપ +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=ભૂલ +loading_error=ભૂલ ઉદ્ભવી જ્યારે PDF ને લાવી રહ્યા હોય. +invalid_file_error=અયોગ્ય અથવા ભાંગેલ PDF ફાઇલ. +missing_file_error=ગુમ થયેલ PDF ફાઇલ. +unexpected_response_error=અનપેક્ષિત સર્વર પ્રતિસાદ. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=આ PDF ફાઇલને ખોલવા પાસવર્ડને દાખલ કરો. +password_invalid=અયોગ્ય પાસવર્ડ. મહેરબાની કરીને ફરી પ્રયત્ન કરો. +password_ok=બરાબર +password_cancel=રદ કરો + +printing_not_supported=ચેતવણી: છાપવાનું આ બ્રાઉઝર દ્દારા સંપૂર્ણપણે આધારભૂત નથી. +printing_not_ready=Warning: PDF એ છાપવા માટે સંપૂર્ણપણે લાવેલ છે. +web_fonts_disabled=વેબ ફોન્ટ નિષ્ક્રિય થયેલ છે: ઍમ્બેડ થયેલ PDF ફોન્ટને વાપરવાનું અસમર્થ. +document_colors_not_allowed=PDF દસ્તાવેજો તેનાં પોતાના રંગોને વાપરવા પરવાનગી આપતા નથી: 'તેનાં પોતાનાં રંગોને પસંદ કરવા માટે પાનાંને પરવાનગી આપો' બ્રાઉઝરમાં નિષ્ક્રિય થયેલ છે. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/he/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/he/viewer.properties new file mode 100644 index 0000000..e3d197e --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/he/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=דף קודם +previous_label=קודם +next.title=דף הבא +next_label=הבא + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=דף +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=מתוך {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} מתוך {{pagesCount}}) + +zoom_out.title=התרחקות +zoom_out_label=התרחקות +zoom_in.title=התקרבות +zoom_in_label=התקרבות +zoom.title=מרחק מתצוגה +presentation_mode.title=מעבר למצב מצגת +presentation_mode_label=מצב מצגת +open_file.title=פתיחת קובץ +open_file_label=פתיחה +print.title=הדפסה +print_label=הדפסה +download.title=הורדה +download_label=הורדה +bookmark.title=תצוגה נוכחית (העתקה או פתיחה בחלון חדש) +bookmark_label=תצוגה נוכחית + +# Secondary toolbar and context menu +tools.title=כלים +tools_label=כלים +first_page.title=מעבר לעמוד הראשון +first_page.label=מעבר לעמוד הראשון +first_page_label=מעבר לעמוד הראשון +last_page.title=מעבר לעמוד האחרון +last_page.label=מעבר לעמוד האחרון +last_page_label=מעבר לעמוד האחרון +page_rotate_cw.title=הטיה עם כיוון השעון +page_rotate_cw.label=הטיה עם כיוון השעון +page_rotate_cw_label=הטיה עם כיוון השעון +page_rotate_ccw.title=הטיה כנגד כיוון השעון +page_rotate_ccw.label=הטיה כנגד כיוון השעון +page_rotate_ccw_label=הטיה כנגד כיוון השעון + +cursor_text_select_tool.title=הפעלת כלי בחירת טקסט +cursor_text_select_tool_label=כלי בחירת טקסט +cursor_hand_tool.title=הפעלת כלי היד +cursor_hand_tool_label=כלי יד + +scroll_vertical.title=שימוש בגלילה אנכית +scroll_vertical_label=גלילה אנכית +scroll_horizontal.title=שימוש בגלילה אופקית +scroll_horizontal_label=גלילה אופקית +scroll_wrapped.title=שימוש בגלילה רציפה +scroll_wrapped_label=גלילה רציפה + +spread_none.title=לא לצרף מפתחי עמודים +spread_none_label=ללא מפתחים +spread_odd.title=צירוף מפתחי עמודים שמתחילים בדפים עם מספרים אי־זוגיים +spread_odd_label=מפתחים אי־זוגיים +spread_even.title=צירוף מפתחי עמודים שמתחילים בדפים עם מספרים זוגיים +spread_even_label=מפתחים זוגיים + +# Document properties dialog box +document_properties.title=מאפייני מסמך… +document_properties_label=מאפייני מסמך… +document_properties_file_name=שם קובץ: +document_properties_file_size=גודל הקובץ: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} ק״ב ({{size_b}} בתים) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} מ״ב ({{size_b}} בתים) +document_properties_title=כותרת: +document_properties_author=מחבר: +document_properties_subject=נושא: +document_properties_keywords=מילות מפתח: +document_properties_creation_date=תאריך יצירה: +document_properties_modification_date=תאריך שינוי: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=יוצר: +document_properties_producer=יצרן PDF: +document_properties_version=גרסת PDF: +document_properties_page_count=מספר דפים: +document_properties_page_size=גודל העמוד: +document_properties_page_size_unit_inches=אינ׳ +document_properties_page_size_unit_millimeters=מ״מ +document_properties_page_size_orientation_portrait=לאורך +document_properties_page_size_orientation_landscape=לרוחב +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=מכתב +document_properties_page_size_name_legal=דף משפטי +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=תצוגת דף מהירה: +document_properties_linearized_yes=כן +document_properties_linearized_no=לא +document_properties_close=סגירה + +print_progress_message=מסמך בהכנה להדפסה… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ביטול + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=הצגה/הסתרה של סרגל הצד +toggle_sidebar_notification.title=החלפת תצוגת סרגל צד (מסמך שמכיל מתאר/צרופות) +toggle_sidebar_label=הצגה/הסתרה של סרגל הצד +document_outline.title=הצגת מתאר מסמך (לחיצה כפולה כדי להרחיב או לצמצם את כל הפריטים) +document_outline_label=מתאר מסמך +attachments.title=הצגת צרופות +attachments_label=צרופות +thumbs.title=הצגת תצוגה מקדימה +thumbs_label=תצוגה מקדימה +findbar.title=חיפוש במסמך +findbar_label=חיפוש + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=עמוד {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=עמוד {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=תצוגה מקדימה של עמוד {{page}} + +# Find panel button title and messages +find_input.title=חיפוש +find_input.placeholder=חיפוש במסמך… +find_previous.title=מציאת המופע הקודם של הביטוי +find_previous_label=קודם +find_next.title=מציאת המופע הבא של הביטוי +find_next_label=הבא +find_highlight=הדגשת הכול +find_match_case_label=התאמת אותיות +find_entire_word_label=מילים שלמות +find_reached_top=הגיע לראש הדף, ממשיך מלמטה +find_reached_bottom=הגיע לסוף הדף, ממשיך מלמעלה +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]=תוצאה {{current}} מתוך {{total}} +find_match_count[two]={{current}} מתוך {{total}} תוצאות +find_match_count[few]={{current}} מתוך {{total}} תוצאות +find_match_count[many]={{current}} מתוך {{total}} תוצאות +find_match_count[other]={{current}} מתוך {{total}} תוצאות +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=יותר מ־{{limit}} תוצאות +find_match_count_limit[one]=יותר מתוצאה אחת +find_match_count_limit[two]=יותר מ־{{limit}} תוצאות +find_match_count_limit[few]=יותר מ־{{limit}} תוצאות +find_match_count_limit[many]=יותר מ־{{limit}} תוצאות +find_match_count_limit[other]=יותר מ־{{limit}} תוצאות +find_not_found=הביטוי לא נמצא + +# Error panel labels +error_more_info=מידע נוסף +error_less_info=פחות מידע +error_close=סגירה +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js גרסה {{version}} (בנייה: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=הודעה: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=תוכן מחסנית: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=קובץ: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=שורה: {{line}} +rendering_error=אירעה שגיאה בעת עיבוד הדף. + +# Predefined zoom values +page_scale_width=רוחב העמוד +page_scale_fit=התאמה לעמוד +page_scale_auto=מרחק מתצוגה אוטומטי +page_scale_actual=גודל אמיתי +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=שגיאה +loading_error=אירעה שגיאה בעת טעינת ה־PDF. +invalid_file_error=קובץ PDF פגום או לא תקין. +missing_file_error=קובץ PDF חסר. +unexpected_response_error=תגובת שרת לא צפויה. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[הערת {{type}}] +password_label=נא להכניס את הססמה לפתיחת קובץ PDF זה. +password_invalid=ססמה שגויה. נא לנסות שנית. +password_ok=אישור +password_cancel=ביטול + +printing_not_supported=אזהרה: הדפסה אינה נתמכת במלואה בדפדפן זה. +printing_not_ready=אזהרה: ה־PDF לא ניתן לחלוטין עד מצב שמאפשר הדפסה. +web_fonts_disabled=גופני רשת מנוטרלים: לא ניתן להשתמש בגופני PDF מוטבעים. +document_colors_not_allowed=מסמכי PDF אינם מורשים להשתמש בצבעים משלהם: האפשרות „אפשר לעמודים לבחור צבעים משלהם” אינה פעילה בדפדפן. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/hi-IN/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/hi-IN/viewer.properties new file mode 100644 index 0000000..3005180 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/hi-IN/viewer.properties @@ -0,0 +1,244 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=पिछला पृष्ठ +previous_label=पिछला +next.title=अगला पृष्ठ +next_label=आगे + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=पृष्ठ: +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} का +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) + +zoom_out.title=\u0020छोटा करें +zoom_out_label=\u0020छोटा करें +zoom_in.title=बड़ा करें +zoom_in_label=बड़ा करें +zoom.title=बड़ा-छोटा करें +presentation_mode.title=प्रस्तुति अवस्था में जाएँ +presentation_mode_label=\u0020प्रस्तुति अवस्था +open_file.title=फ़ाइल खोलें +open_file_label=\u0020खोलें +print.title=छापें +print_label=\u0020छापें +download.title=डाउनलोड +download_label=डाउनलोड +bookmark.title=मौजूदा दृश्य (नए विंडो में नक़ल लें या खोलें) +bookmark_label=\u0020मौजूदा दृश्य + +# Secondary toolbar and context menu +tools.title=औज़ार +tools_label=औज़ार +first_page.title=प्रथम पृष्ठ पर जाएँ +first_page.label=\u0020प्रथम पृष्ठ पर जाएँ +first_page_label=प्रथम पृष्ठ पर जाएँ +last_page.title=अंतिम पृष्ठ पर जाएँ +last_page.label=\u0020अंतिम पृष्ठ पर जाएँ +last_page_label=\u0020अंतिम पृष्ठ पर जाएँ +page_rotate_cw.title=घड़ी की दिशा में घुमाएँ +page_rotate_cw.label=घड़ी की दिशा में घुमाएँ +page_rotate_cw_label=घड़ी की दिशा में घुमाएँ +page_rotate_ccw.title=घड़ी की दिशा से उल्टा घुमाएँ +page_rotate_ccw.label=घड़ी की दिशा से उल्टा घुमाएँ +page_rotate_ccw_label=\u0020घड़ी की दिशा से उल्टा घुमाएँ + +cursor_text_select_tool.title=पाठ चयन उपकरण सक्षम करें +cursor_text_select_tool_label=पाठ चयन उपकरण +cursor_hand_tool.title=हस्त उपकरण सक्षम करें +cursor_hand_tool_label=हस्त उपकरण + +scroll_vertical.title=लंबवत स्क्रॉलिंग का उपयोग करें +scroll_vertical_label=लंबवत स्क्रॉलिंग +scroll_horizontal.title=क्षितिजिय स्क्रॉलिंग का उपयोग करें +scroll_horizontal_label=क्षितिजिय स्क्रॉलिंग +scroll_wrapped.title=व्राप्पेड स्क्रॉलिंग का उपयोग करें + +spread_none_label=कोई स्प्रेड उपलब्ध नहीं +spread_odd.title=विषम-क्रमांकित पृष्ठों से प्रारंभ होने वाले पृष्ठ स्प्रेड में शामिल हों +spread_odd_label=विषम फैलाव + +# Document properties dialog box +document_properties.title=दस्तावेज़ विशेषता... +document_properties_label=दस्तावेज़ विशेषता... +document_properties_file_name=फ़ाइल नाम: +document_properties_file_size=फाइल आकारः +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=शीर्षक: +document_properties_author=लेखकः +document_properties_subject=विषय: +document_properties_keywords=कुंजी-शब्द: +document_properties_creation_date=निर्माण दिनांक: +document_properties_modification_date=संशोधन दिनांक: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=निर्माता: +document_properties_producer=PDF उत्पादक: +document_properties_version=PDF संस्करण: +document_properties_page_count=पृष्ठ गिनती: +document_properties_page_size=पृष्ठ आकार: +document_properties_page_size_unit_inches=इंच +document_properties_page_size_unit_millimeters=मिमी +document_properties_page_size_orientation_portrait=पोर्ट्रेट +document_properties_page_size_orientation_landscape=लैंडस्केप +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=पत्र +document_properties_page_size_name_legal=क़ानूनी +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=तीव्र वेब व्यू: +document_properties_linearized_yes=हाँ +document_properties_linearized_no=नहीं +document_properties_close=बंद करें + +print_progress_message=छपाई के लिए दस्तावेज़ को तैयार किया जा रहा है... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=रद्द करें + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=\u0020स्लाइडर टॉगल करें +toggle_sidebar_notification.title=साइडबार टॉगल करें (दस्तावेज़ में रूपरेखा शामिल है/attachments) +toggle_sidebar_label=स्लाइडर टॉगल करें +document_outline.title=दस्तावेज़ की रूपरेखा दिखाइए (सारी वस्तुओं को फलने अथवा समेटने के लिए दो बार क्लिक करें) +document_outline_label=दस्तावेज़ आउटलाइन +attachments.title=संलग्नक दिखायें +attachments_label=संलग्नक +thumbs.title=लघुछवियाँ दिखाएँ +thumbs_label=लघु छवि +findbar.title=\u0020दस्तावेज़ में ढूँढ़ें +findbar_label=ढूँढें + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=पृष्ठ {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=पृष्ठ {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=पृष्ठ {{page}} की लघु-छवि + +# Find panel button title and messages +find_input.title=ढूँढें +find_input.placeholder=दस्तावेज़ में खोजें... +find_previous.title=वाक्यांश की पिछली उपस्थिति ढूँढ़ें +find_previous_label=पिछला +find_next.title=वाक्यांश की अगली उपस्थिति ढूँढ़ें +find_next_label=अगला +find_highlight=\u0020सभी आलोकित करें +find_match_case_label=मिलान स्थिति +find_entire_word_label=संपूर्ण शब्द +find_reached_top=पृष्ठ के ऊपर पहुंच गया, नीचे से जारी रखें +find_reached_bottom=पृष्ठ के नीचे में जा पहुँचा, ऊपर से जारी +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{total}} में {{current}} मेल +find_match_count[two]={{total}} में {{current}} मेल +find_match_count[few]={{total}} में {{current}} मेल +find_match_count[many]={{total}} में {{current}} मेल +find_match_count[other]={{total}} में {{current}} मेल +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} से अधिक मेल +find_match_count_limit[one]={{limit}} से अधिक मेल +find_match_count_limit[two]={{limit}} से अधिक मेल +find_match_count_limit[few]={{limit}} से अधिक मेल +find_match_count_limit[many]={{limit}} से अधिक मेल +find_match_count_limit[other]={{limit}} से अधिक मेल +find_not_found=वाक्यांश नहीं मिला + +# Error panel labels +error_more_info=अधिक सूचना +error_less_info=कम सूचना +error_close=बंद करें +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=\u0020संदेश: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=स्टैक: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=फ़ाइल: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=पंक्ति: {{line}} +rendering_error=पृष्ठ रेंडरिंग के दौरान त्रुटि आई. + +# Predefined zoom values +page_scale_width=\u0020पृष्ठ चौड़ाई +page_scale_fit=पृष्ठ फिट +page_scale_auto=स्वचालित जूम +page_scale_actual=वास्तविक आकार +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=त्रुटि +loading_error=PDF लोड करते समय एक त्रुटि हुई. +invalid_file_error=अमान्य या भ्रष्ट PDF फ़ाइल. +missing_file_error=\u0020अनुपस्थित PDF फ़ाइल. +unexpected_response_error=अप्रत्याशित सर्वर प्रतिक्रिया. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=\u0020[{{type}} Annotation] +password_label=इस PDF फ़ाइल को खोलने के लिए कृपया कूटशब्द भरें. +password_invalid=अवैध कूटशब्द, कृपया फिर कोशिश करें. +password_ok=OK +password_cancel=रद्द करें + +printing_not_supported=चेतावनी: इस ब्राउज़र पर छपाई पूरी तरह से समर्थित नहीं है. +printing_not_ready=चेतावनी: PDF छपाई के लिए पूरी तरह से लोड नहीं है. +web_fonts_disabled=वेब फॉन्ट्स निष्क्रिय हैं: अंतःस्थापित PDF फॉन्टस के उपयोग में असमर्थ. +document_colors_not_allowed=PDF दस्तावेज़ उनके अपने रंग को उपयोग करने के लिए अनुमति प्राप्त नहीं है: "पृष्ठों को उनके अपने रंग को चुनने के लिए स्वीकृति दें" कि वह उस ब्राउज़र में निष्क्रिय है. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/hr/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/hr/viewer.properties new file mode 100644 index 0000000..67cc898 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/hr/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Prethodna stranica +previous_label=Prethodna +next.title=Sljedeća stranica +next_label=Sljedeća + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Stranica +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=od {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} od {{pagesCount}}) + +zoom_out.title=Umanji +zoom_out_label=Umanji +zoom_in.title=Uvećaj +zoom_in_label=Uvećaj +zoom.title=Zumiranje +presentation_mode.title=Prebaci u prezentacijski način rada +presentation_mode_label=Prezentacijski način rada +open_file.title=Otvori datoteku +open_file_label=Otvori +print.title=Ispiši +print_label=Ispiši +download.title=Preuzmi +download_label=Preuzmi +bookmark.title=Trenutačni prikaz (kopiraj ili otvori u novom prozoru) +bookmark_label=Trenutačni prikaz + +# Secondary toolbar and context menu +tools.title=Alati +tools_label=Alati +first_page.title=Idi na prvu stranicu +first_page.label=Idi na prvu stranicu +first_page_label=Idi na prvu stranicu +last_page.title=Idi na posljednju stranicu +last_page.label=Idi na posljednju stranicu +last_page_label=Idi na posljednju stranicu +page_rotate_cw.title=Rotiraj u smjeru kazaljke na satu +page_rotate_cw.label=Rotiraj u smjeru kazaljke na satu +page_rotate_cw_label=Rotiraj u smjeru kazaljke na satu +page_rotate_ccw.title=Rotiraj obrnutno od smjera kazaljke na satu +page_rotate_ccw.label=Rotiraj obrnutno od smjera kazaljke na satu +page_rotate_ccw_label=Rotiraj obrnutno od smjera kazaljke na satu + +cursor_text_select_tool.title=Omogući alat za označavanje teksta +cursor_text_select_tool_label=Alat za označavanje teksta +cursor_hand_tool.title=Omogući ručni alat +cursor_hand_tool_label=Ručni alat + +scroll_vertical.title=Koristi okomito pomicanje +scroll_vertical_label=Okomito pomicanje +scroll_horizontal.title=Koristi vodoravno pomicanje +scroll_horizontal_label=Vodoravno pomicanje +scroll_wrapped.title=Koristi kontinuirani raspored stranica +scroll_wrapped_label=Kontinuirani raspored stranica + +spread_none.title=Ne izrađuj duplerice +spread_none_label=Pojedinačne stranice +spread_odd.title=Izradi duplerice koje počinju s neparnim stranicama +spread_odd_label=Neparne duplerice +spread_even.title=Izradi duplerice koje počinju s parnim stranicama +spread_even_label=Parne duplerice + +# Document properties dialog box +document_properties.title=Svojstva dokumenta... +document_properties_label=Svojstva dokumenta... +document_properties_file_name=Naziv datoteke: +document_properties_file_size=Veličina datoteke: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bajtova) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bajtova) +document_properties_title=Naslov: +document_properties_author=Autor: +document_properties_subject=Predmet: +document_properties_keywords=Ključne riječi: +document_properties_creation_date=Datum stvaranja: +document_properties_modification_date=Datum promjene: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Stvaratelj: +document_properties_producer=PDF stvaratelj: +document_properties_version=PDF verzija: +document_properties_page_count=Broj stranica: +document_properties_page_size=Dimenzije stranice: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=uspravno +document_properties_page_size_orientation_landscape=položeno +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Brzi web pregled: +document_properties_linearized_yes=Da +document_properties_linearized_no=Ne +document_properties_close=Zatvori + +print_progress_message=Pripremanje dokumenta za ispis… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Odustani + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Prikaži/sakrij bočnu traku +toggle_sidebar_notification.title=Prikazivanje i sklanjanje bočne trake (dokument sadrži konturu/privitke) +toggle_sidebar_label=Prikaži/sakrij bočnu traku +document_outline.title=Prikaži strukturu dokumenta (dvostruki klik za rasklapanje/sklapanje svih stavki) +document_outline_label=Struktura dokumenta +attachments.title=Prikaži privitke +attachments_label=Privitci +thumbs.title=Prikaži minijature +thumbs_label=Minijature +findbar.title=Traži u dokumentu +findbar_label=Traži + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Stranica br. {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Stranica {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Minijatura stranice {{page}} + +# Find panel button title and messages +find_input.title=Traži +find_input.placeholder=Traži u dokumentu… +find_previous.title=Pronađi prethodno pojavljivanje ovog izraza +find_previous_label=Prethodno +find_next.title=Pronađi sljedeće pojavljivanje ovog izraza +find_next_label=Sljedeće +find_highlight=Istankni sve +find_match_case_label=Razlikovanje velikih i malih slova +find_entire_word_label=Cijele riječi +find_reached_top=Dosegnut početak dokumenta, nastavak s kraja +find_reached_bottom=Dosegnut kraj dokumenta, nastavak s početka +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} od {{total}} se podudara +find_match_count[two]={{current}} od {{total}} se podudara +find_match_count[few]={{current}} od {{total}} se podudara +find_match_count[many]={{current}} od {{total}} se podudara +find_match_count[other]={{current}} od {{total}} se podudara +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Više od {{limit}} podudaranja +find_match_count_limit[one]=Više od {{limit}} podudaranja +find_match_count_limit[two]=Više od {{limit}} podudaranja +find_match_count_limit[few]=Više od {{limit}} podudaranja +find_match_count_limit[many]=Više od {{limit}} podudaranja +find_match_count_limit[other]=Više od {{limit}} podudaranja +find_not_found=Izraz nije pronađen + +# Error panel labels +error_more_info=Više informacija +error_less_info=Manje informacija +error_close=Zatvori +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Poruka: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stog: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Datoteka: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Redak: {{line}} +rendering_error=Došlo je do greške prilikom iscrtavanja stranice. + +# Predefined zoom values +page_scale_width=Prilagodi širini prozora +page_scale_fit=Prilagodi veličini prozora +page_scale_auto=Automatsko zumiranje +page_scale_actual=Stvarna veličina +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}} % + +# Loading indicator messages +loading_error_indicator=Greška +loading_error=Došlo je do greške pri učitavanju PDF-a. +invalid_file_error=Neispravna ili oštećena PDF datoteka. +missing_file_error=Nedostaje PDF datoteka. +unexpected_response_error=Neočekivani odgovor poslužitelja. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Bilješka] +password_label=Za otvoranje ove PDF datoteku upiši lozinku. +password_invalid=Neispravna lozinka. Pokušaj ponovo. +password_ok=U redu +password_cancel=Odustani + +printing_not_supported=Upozorenje: Ovaj preglednik ne podržava u potpunosti ispisivanje. +printing_not_ready=Upozorenje: PDF nije u potpunosti učitan za ispis. +web_fonts_disabled=Web fontovi su onemogućeni: nije moguće koristiti umetnute PDF fontove. +document_colors_not_allowed=PDF dokumentima nije dozvoljeno koristiti vlastite boje: opcija „Dozvoli stranicama koristiti vlastite boje” je deaktivirana u pregledniku. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/hsb/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/hsb/viewer.properties new file mode 100644 index 0000000..a8f31f1 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/hsb/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Předchadna strona +previous_label=Wróćo +next.title=Přichodna strona +next_label=Dale + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Strona +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=z {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} z {{pagesCount}}) + +zoom_out.title=Pomjeńšić +zoom_out_label=Pomjeńšić +zoom_in.title=Powjetšić +zoom_in_label=Powjetšić +zoom.title=Skalowanje +presentation_mode.title=Do prezentaciskeho modusa přeńć +presentation_mode_label=Prezentaciski modus +open_file.title=Dataju wočinić +open_file_label=Wočinić +print.title=Ćišćeć +print_label=Ćišćeć +download.title=Sćahnyć +download_label=Sćahnyć +bookmark.title=Aktualny napohlad (kopěrować abo w nowym woknje wočinić) +bookmark_label=Aktualny napohlad + +# Secondary toolbar and context menu +tools.title=Nastroje +tools_label=Nastroje +first_page.title=K prěnjej stronje +first_page.label=K prěnjej stronje +first_page_label=K prěnjej stronje +last_page.title=K poslednjej stronje +last_page.label=K poslednjej stronje +last_page_label=K poslednjej stronje +page_rotate_cw.title=K směrej časnika wjerćeć +page_rotate_cw.label=K směrej časnika wjerćeć +page_rotate_cw_label=K směrej časnika wjerćeć +page_rotate_ccw.title=Přećiwo směrej časnika wjerćeć +page_rotate_ccw.label=Přećiwo směrej časnika wjerćeć +page_rotate_ccw_label=Přećiwo směrej časnika wjerćeć + +cursor_text_select_tool.title=Nastroj za wuběranje teksta zmóžnić +cursor_text_select_tool_label=Nastroj za wuběranje teksta +cursor_hand_tool.title=Ručny nastroj zmóžnić +cursor_hand_tool_label=Ručny nastroj + +scroll_vertical.title=Wertikalne suwanje wužiwać +scroll_vertical_label=Wertikalnje suwanje +scroll_horizontal.title=Horicontalne suwanje wužiwać +scroll_horizontal_label=Horicontalne suwanje +scroll_wrapped.title=Postupne suwanje wužiwać +scroll_wrapped_label=Postupne suwanje + +spread_none.title=Strony njezwjazać +spread_none_label=Žana dwójna strona +spread_odd.title=Strony započinajo z njerunymi stronami zwjazać +spread_odd_label=Njerune strony +spread_even.title=Strony započinajo z runymi stronami zwjazać +spread_even_label=Rune strony + +# Document properties dialog box +document_properties.title=Dokumentowe kajkosće… +document_properties_label=Dokumentowe kajkosće… +document_properties_file_name=Mjeno dataje: +document_properties_file_size=Wulkosć dataje: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bajtow) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bajtow) +document_properties_title=Titul: +document_properties_author=Awtor: +document_properties_subject=Předmjet: +document_properties_keywords=Klučowe słowa: +document_properties_creation_date=Datum wutworjenja: +document_properties_modification_date=Datum změny: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Awtor: +document_properties_producer=PDF-zhotowjer: +document_properties_version=PDF-wersija: +document_properties_page_count=Ličba stronow: +document_properties_page_size=Wulkosć strony: +document_properties_page_size_unit_inches=cól +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=wysoki format +document_properties_page_size_orientation_landscape=prěčny format +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=Haj +document_properties_linearized_no=Ně +document_properties_close=Začinić + +print_progress_message=Dokument so za ćišćenje přihotuje… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Přetorhnyć + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Bóčnicu pokazać/schować +toggle_sidebar_notification.title=Bóčnicu přepinać (dokument wobsahuje wobrys/přiwěški) +toggle_sidebar_label=Bóčnicu pokazać/schować +document_outline.title=Dokumentowy naćisk pokazać (dwójne kliknjenje, zo bychu so wšě zapiski pokazali/schowali) +document_outline_label=Dokumentowa struktura +attachments.title=Přiwěški pokazać +attachments_label=Přiwěški +thumbs.title=Miniatury pokazać +thumbs_label=Miniatury +findbar.title=W dokumenće pytać +findbar_label=Pytać + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Strona {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Strona {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura strony {{page}} + +# Find panel button title and messages +find_input.title=Pytać +find_input.placeholder=W dokumenće pytać… +find_previous.title=Předchadne wustupowanje pytanskeho wuraza pytać +find_previous_label=Wróćo +find_next.title=Přichodne wustupowanje pytanskeho wuraza pytać +find_next_label=Dale +find_highlight=Wšě wuzběhnyć +find_match_case_label=Wulkopisanje wobkedźbować +find_entire_word_label=Cyłe słowa +find_reached_top=Spočatk dokumenta docpěty, pokročuje so z kóncom +find_reached_bottom=Kónc dokument docpěty, pokročuje so ze spočatkom +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} z {{total}} wotpowědnika +find_match_count[two]={{current}} z {{total}} wotpowědnikow +find_match_count[few]={{current}} z {{total}} wotpowědnikow +find_match_count[many]={{current}} z {{total}} wotpowědnikow +find_match_count[other]={{current}} z {{total}} wotpowědnikow +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Wjace hač {{limit}} wotpowědnikow +find_match_count_limit[one]=Wjace hač {{limit}} wotpowědnik +find_match_count_limit[two]=Wjace hač {{limit}} wotpowědnikaj +find_match_count_limit[few]=Wjace hač {{limit}} wotpowědniki +find_match_count_limit[many]=Wjace hač {{limit}} wotpowědnikow +find_match_count_limit[other]=Wjace hač {{limit}} wotpowědnikow +find_not_found=Pytanski wuraz njeje so namakał + +# Error panel labels +error_more_info=Wjace informacijow +error_less_info=Mjenje informacijow +error_close=Začinić +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Zdźělenka: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Lisćina zawołanjow: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Dataja: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linka: {{line}} +rendering_error=Při zwobraznjenju strony je zmylk wustupił. + +# Predefined zoom values +page_scale_width=Šěrokosć strony +page_scale_fit=Wulkosć strony +page_scale_auto=Awtomatiske skalowanje +page_scale_actual=Aktualna wulkosć +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Zmylk +loading_error=Při začitowanju PDF je zmylk wustupił. +invalid_file_error=Njepłaćiwa abo wobškodźena PDF-dataja. +missing_file_error=Falowaca PDF-dataja. +unexpected_response_error=Njewočakowana serwerowa wotmołwa. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Typ přispomnjenki: {{type}}] +password_label=Zapodajće hesło, zo byšće PDF-dataju wočinił. +password_invalid=Njepłaćiwe hesło. Prošu spytajće hišće raz. +password_ok=W porjadku +password_cancel=Přetorhnyć + +printing_not_supported=Warnowanje: Ćišćenje so přez tutón wobhladowak połnje njepodpěruje. +printing_not_ready=Warnowanje: PDF njeje so za ćišćenje dospołnje začitał. +web_fonts_disabled=Webpisma su znjemóžnjene: njeje móžno, zasadźene PDF-pisma wužiwać. +document_colors_not_allowed=PDF-dokumenty njesmědźa swoje barby wužiwać: 'Stronam dowolić, swoje barby wužiwać' je we wobhladowaku znjemóžnjene. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/hu/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/hu/viewer.properties new file mode 100644 index 0000000..cba69f0 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/hu/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Előző oldal +previous_label=Előző +next.title=Következő oldal +next_label=Tovább + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Oldal +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=összesen: {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) + +zoom_out.title=Kicsinyítés +zoom_out_label=Kicsinyítés +zoom_in.title=Nagyítás +zoom_in_label=Nagyítás +zoom.title=Nagyítás +presentation_mode.title=Váltás bemutató módba +presentation_mode_label=Bemutató mód +open_file.title=Fájl megnyitása +open_file_label=Megnyitás +print.title=Nyomtatás +print_label=Nyomtatás +download.title=Letöltés +download_label=Letöltés +bookmark.title=Jelenlegi nézet (másolás vagy megnyitás új ablakban) +bookmark_label=Aktuális nézet + +# Secondary toolbar and context menu +tools.title=Eszközök +tools_label=Eszközök +first_page.title=Ugrás az első oldalra +first_page.label=Ugrás az első oldalra +first_page_label=Ugrás az első oldalra +last_page.title=Ugrás az utolsó oldalra +last_page.label=Ugrás az utolsó oldalra +last_page_label=Ugrás az utolsó oldalra +page_rotate_cw.title=Forgatás az óramutató járásával egyezően +page_rotate_cw.label=Forgatás az óramutató járásával egyezően +page_rotate_cw_label=Forgatás az óramutató járásával egyezően +page_rotate_ccw.title=Forgatás az óramutató járásával ellentétesen +page_rotate_ccw.label=Forgatás az óramutató járásával ellentétesen +page_rotate_ccw_label=Forgatás az óramutató járásával ellentétesen + +cursor_text_select_tool.title=Szövegkijelölő eszköz bekapcsolása +cursor_text_select_tool_label=Szövegkijelölő eszköz +cursor_hand_tool.title=Kéz eszköz bekapcsolása +cursor_hand_tool_label=Kéz eszköz + +scroll_vertical.title=Függőleges görgetés használata +scroll_vertical_label=Függőleges görgetés +scroll_horizontal.title=Vízszintes görgetés használata +scroll_horizontal_label=Vízszintes görgetés +scroll_wrapped.title=Rácsos elrendezés használata +scroll_wrapped_label=Rácsos elrendezés + +spread_none.title=Ne tapassza össze az oldalakat +spread_none_label=Nincs összetapasztás +spread_odd.title=Lapok összetapasztása, a páratlan számú oldalakkal kezdve +spread_odd_label=Összetapasztás: páratlan +spread_even.title=Lapok összetapasztása, a páros számú oldalakkal kezdve +spread_even_label=Összetapasztás: páros + +# Document properties dialog box +document_properties.title=Dokumentum tulajdonságai… +document_properties_label=Dokumentum tulajdonságai… +document_properties_file_name=Fájlnév: +document_properties_file_size=Fájlméret: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bájt) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bájt) +document_properties_title=Cím: +document_properties_author=Szerző: +document_properties_subject=Tárgy: +document_properties_keywords=Kulcsszavak: +document_properties_creation_date=Létrehozás dátuma: +document_properties_modification_date=Módosítás dátuma: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Létrehozta: +document_properties_producer=PDF előállító: +document_properties_version=PDF verzió: +document_properties_page_count=Oldalszám: +document_properties_page_size=Lapméret: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=álló +document_properties_page_size_orientation_landscape=fekvő +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Jogi információk +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Gyors webes nézet: +document_properties_linearized_yes=Igen +document_properties_linearized_no=Nem +document_properties_close=Bezárás + +print_progress_message=Dokumentum előkészítése nyomtatáshoz… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Mégse + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Oldalsáv be/ki +toggle_sidebar_notification.title=Oldalsáv be/ki (a dokumentum vázlatot/mellékleteket tartalmaz) +toggle_sidebar_label=Oldalsáv be/ki +document_outline.title=Dokumentum megjelenítése online (dupla kattintás minden elem kinyitásához/összecsukásához) +document_outline_label=Dokumentumvázlat +attachments.title=Mellékletek megjelenítése +attachments_label=Van melléklet +thumbs.title=Bélyegképek megjelenítése +thumbs_label=Bélyegképek +findbar.title=Keresés a dokumentumban +findbar_label=Keresés + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas={{page}}. oldal +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title={{page}}. oldal +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}}. oldal bélyegképe + +# Find panel button title and messages +find_input.title=Keresés +find_input.placeholder=Keresés a dokumentumban… +find_previous.title=A kifejezés előző előfordulásának keresése +find_previous_label=Előző +find_next.title=A kifejezés következő előfordulásának keresése +find_next_label=Tovább +find_highlight=Összes kiemelése +find_match_case_label=Kis- és nagybetűk megkülönböztetése +find_entire_word_label=Teljes szavak +find_reached_top=A dokumentum eleje elérve, folytatás a végétől +find_reached_bottom=A dokumentum vége elérve, folytatás az elejétől +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} / {{total}} találat +find_match_count[two]={{current}} / {{total}} találat +find_match_count[few]={{current}} / {{total}} találat +find_match_count[many]={{current}} / {{total}} találat +find_match_count[other]={{current}} / {{total}} találat +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Több mint {{limit}} találat +find_match_count_limit[one]=Több mint {{limit}} találat +find_match_count_limit[two]=Több mint {{limit}} találat +find_match_count_limit[few]=Több mint {{limit}} találat +find_match_count_limit[many]=Több mint {{limit}} találat +find_match_count_limit[other]=Több mint {{limit}} találat +find_not_found=A kifejezés nem található + +# Error panel labels +error_more_info=További tudnivalók +error_less_info=Kevesebb információ +error_close=Bezárás +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Üzenet: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Verem: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fájl: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Sor: {{line}} +rendering_error=Hiba történt az oldal feldolgozása közben. + +# Predefined zoom values +page_scale_width=Oldalszélesség +page_scale_fit=Teljes oldal +page_scale_auto=Automatikus nagyítás +page_scale_actual=Valódi méret +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Hiba +loading_error=Hiba történt a PDF betöltésekor. +invalid_file_error=Érvénytelen vagy sérült PDF fájl. +missing_file_error=Hiányzó PDF fájl. +unexpected_response_error=Váratlan kiszolgálóválasz. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} megjegyzés] +password_label=Adja meg a jelszót a PDF fájl megnyitásához. +password_invalid=Helytelen jelszó. Próbálja újra. +password_ok=OK +password_cancel=Mégse + +printing_not_supported=Figyelmeztetés: Ez a böngésző nem teljesen támogatja a nyomtatást. +printing_not_ready=Figyelmeztetés: A PDF nincs teljesen betöltve a nyomtatáshoz. +web_fonts_disabled=Webes betűkészletek letiltva: nem használhatók a beágyazott PDF betűkészletek. +document_colors_not_allowed=A PDF dokumentumok nem használhatják saját színeiket: „Az oldalak a saját maguk által kiválasztott színeket használhatják” beállítás ki van kapcsolva a böngészőben. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/hy-AM/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/hy-AM/viewer.properties new file mode 100644 index 0000000..f38581b --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/hy-AM/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Նախորդ էջը +previous_label=Նախորդը +next.title=Հաջորդ էջը +next_label=Հաջորդը + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Էջ. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}}-ից\u0020 +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}}-ը {{pagesCount}})-ից + +zoom_out.title=Փոքրացնել +zoom_out_label=Փոքրացնել +zoom_in.title=Խոշորացնել +zoom_in_label=Խոշորացնել +zoom.title=Մասշտաբը\u0020 +presentation_mode.title=Անցնել Ներկայացման եղանակին +presentation_mode_label=Ներկայացման եղանակ +open_file.title=Բացել նիշք +open_file_label=Բացել +print.title=Տպել +print_label=Տպել +download.title=Բեռնել +download_label=Բեռնել +bookmark.title=Ընթացիկ տեսքով (պատճենել կամ բացել նոր պատուհանում) +bookmark_label=Ընթացիկ տեսքը + +# Secondary toolbar and context menu +tools.title=Գործիքներ +tools_label=Գործիքներ +first_page.title=Անցնել առաջին էջին +first_page.label=Անցնել առաջին էջին +first_page_label=Անցնել առաջին էջին +last_page.title=Անցնել վերջին էջին +last_page.label=Անցնել վերջին էջին +last_page_label=Անցնել վերջին էջին +page_rotate_cw.title=Պտտել ըստ ժամացույցի սլաքի +page_rotate_cw.label=Պտտել ըստ ժամացույցի սլաքի +page_rotate_cw_label=Պտտել ըստ ժամացույցի սլաքի +page_rotate_ccw.title=Պտտել հակառակ ժամացույցի սլաքի +page_rotate_ccw.label=Պտտել հակառակ ժամացույցի սլաքի +page_rotate_ccw_label=Պտտել հակառակ ժամացույցի սլաքի + +cursor_text_select_tool.title=Միացնել գրույթ ընտրելու գործիքը +cursor_text_select_tool_label=Գրույթը ընտրելու գործիք +cursor_hand_tool.title=Միացնել Ձեռքի գործիքը +cursor_hand_tool_label=Ձեռքի գործիք + +scroll_vertical.title=Օգտագործել ուղղահայաց ոլորում +scroll_vertical_label=Ուղղահայաց ոլորում +scroll_horizontal.title=Օգտագործել հորիզոնական ոլորում +scroll_horizontal_label=Հորիզոնական ոլորում +scroll_wrapped.title=Օգտագործել փաթաթված ոլորում +scroll_wrapped_label=Փաթաթված ոլորում + +spread_none.title=Մի միացեք էջի վերածածկերին +spread_none_label=Չկա վերածածկեր +spread_odd.title=Միացեք էջի վերածածկերին սկսելով՝ կենտ համարակալված էջերով +spread_odd_label=Կենտ վերածածկեր +spread_even.title=Միացեք էջի վերածածկերին սկսելով՝ զույգ համարակալված էջերով +spread_even_label=Զույգ վերածածկեր + +# Document properties dialog box +document_properties.title=Փաստաթղթի հատկությունները… +document_properties_label=Փաստաթղթի հատկությունները… +document_properties_file_name=Նիշքի անունը. +document_properties_file_size=Նիշք չափը. +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} ԿԲ ({{size_b}} բայթ) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} ՄԲ ({{size_b}} բայթ) +document_properties_title=Վերնագիր. +document_properties_author=Հեղինակ․ +document_properties_subject=Վերնագիր. +document_properties_keywords=Հիմնաբառ. +document_properties_creation_date=Ստեղծելու ամսաթիվը. +document_properties_modification_date=Փոփոխելու ամսաթիվը. +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Ստեղծող. +document_properties_producer=PDF-ի հեղինակը. +document_properties_version=PDF-ի տարբերակը. +document_properties_page_count=Էջերի քանակը. +document_properties_page_size=Էջի չափը. +document_properties_page_size_unit_inches=ում +document_properties_page_size_unit_millimeters=մմ +document_properties_page_size_orientation_portrait=ուղղաձիգ +document_properties_page_size_orientation_landscape=հորիզոնական +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Նամակ +document_properties_page_size_name_legal=Օրինական +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Արագ վեբ դիտում․ +document_properties_linearized_yes=Այո +document_properties_linearized_no=Ոչ +document_properties_close=Փակել + +print_progress_message=Նախապատրաստում է փաստաթուղթը տպելուն... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Չեղարկել + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Բացել/Փակել Կողային վահանակը +toggle_sidebar_notification.title=Փոխանջատել Կողային գոտին (փաստաթուղթը պարունակում է ուրվագիծ/կցորդ) +toggle_sidebar_label=Բացել/Փակել Կողային վահանակը +document_outline.title=Ցուցադրել փաստաթղթի ուրվագիծը (կրկնակի սեղմեք՝ միավորները ընդարձակելու/կոծկելու համար) +document_outline_label=Փաստաթղթի բովանդակությունը +attachments.title=Ցուցադրել կցորդները +attachments_label=Կցորդներ +thumbs.title=Ցուցադրել Մանրապատկերը +thumbs_label=Մանրապատկերը +findbar.title=Գտնել փաստաթղթում +findbar_label=Որոնում + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Էջ {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Էջը {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Էջի մանրապատկերը {{page}} + +# Find panel button title and messages +find_input.title=Որոնում +find_input.placeholder=Գտնել փաստաթղթում... +find_previous.title=Գտնել անրահայտության նախորդ հանդիպումը +find_previous_label=Նախորդը +find_next.title=Գտիր արտահայտության հաջորդ հանդիպումը +find_next_label=Հաջորդը +find_highlight=Գունանշել բոլորը +find_match_case_label=Մեծ(փոքր)ատառ հաշվի առնել +find_entire_word_label=Ամբողջ բառերը +find_reached_top=Հասել եք փաստաթղթի վերևին, կշարունակվի ներքևից +find_reached_bottom=Հասել եք փաստաթղթի վերջին, կշարունակվի վերևից +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ հոգնակի(ընդհանուր) ]} +find_match_count[one]={{current}} {{total}}-ի համընկնումից +find_match_count[two]={{current}} {{total}}-ի համընկնումներից +find_match_count[few]={{current}} {{total}}-ի համընկնումներից +find_match_count[many]={{current}} {{total}}-ի համընկնումներից +find_match_count[other]={{current}} {{total}}-ի համընկնումներից +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ հոգնակի (սահմանը) ]} +find_match_count_limit[zero]=Ավելին քան {{limit}} համընկնումները +find_match_count_limit[one]=Ավելին քան {{limit}} համընկնումը +find_match_count_limit[two]=Ավելին քան {{limit}} համընկնումներներ +find_match_count_limit[few]=Ավելին քան {{limit}} համընկնումներներ +find_match_count_limit[many]=Ավելին քան {{limit}} համընկնումներներ +find_match_count_limit[other]=Ավելին քան {{limit}} համընկնումներներ +find_not_found=Արտահայտությունը չգտնվեց + +# Error panel labels +error_more_info=Ավելի շատ տեղեկություն +error_less_info=Քիչ տեղեկություն +error_close=Փակել +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (կառուցումը. {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Գրությունը. {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Շեղջ. {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Ֆայլ. {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Տողը. {{line}} +rendering_error=Սխալ՝ էջը ստեղծելիս: + +# Predefined zoom values +page_scale_width=Էջի լայնքը +page_scale_fit=Ձգել էջը +page_scale_auto=Ինքնաշխատ +page_scale_actual=Իրական չափը +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Սխալ +loading_error=Սխալ՝ PDF ֆայլը բացելիս։ +invalid_file_error=Սխալ կամ վնասված PDF ֆայլ: +missing_file_error=PDF ֆայլը բացակայում է: +unexpected_response_error=Սպասարկիչի անսպասելի պատասխան: + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Ծանոթություն] +password_label=Մուտքագրեք PDF-ի գաղտնաբառը: +password_invalid=Գաղտնաբառը սխալ է: Կրկին փորձեք: +password_ok=Լավ +password_cancel=Չեղարկել + +printing_not_supported=Զգուշացում. Տպելը ամբողջությամբ չի աջակցվում դիտարկիչի կողմից։ +printing_not_ready=Զգուշացում. PDF-ը ամբողջությամբ չի բեռնավորվել տպելու համար: +web_fonts_disabled=Վեբ-տառատեսակները անջատված են. հնարավոր չէ օգտագործել ներկառուցված PDF տառատեսակները: +document_colors_not_allowed=PDF փաստաթղթերին թույլատրված չէ օգտագործել իրենց սեփական գույները: “Թույլատրել էջերին ընտրել իրենց սեփական գույները“ ընտրանքը անջատված է դիտարկիչում: diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/hye/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/hye/viewer.properties new file mode 100644 index 0000000..b5c7127 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/hye/viewer.properties @@ -0,0 +1,247 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Նախորդ էջ +previous_label=Նախորդը +next.title=Յաջորդ էջ +next_label=Յաջորդը + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=էջ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}}-ից\u0020 +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}}-ը {{pagesCount}})-ից + +zoom_out.title=Փոքրացնել +zoom_out_label=Փոքրացնել +zoom_in.title=Խոշորացնել +zoom_in_label=Խոշորացնել +zoom.title=Խոշորացում +presentation_mode.title=Անցնել ներկայացման եղանակին +presentation_mode_label=Ներկայացման եղանակ +open_file.title=Բացել նիշքը +open_file_label=Բացել +print.title=Տպել +print_label=Տպել +download.title=Բեռնել +download_label=Բեռնել +bookmark.title=Ընթացիկ տեսքով (պատճէնել կամ բացել նոր պատուհանում) +bookmark_label=Ընթացիկ տեսք + +# Secondary toolbar and context menu +tools.title=Գործիքներ +tools_label=Գործիքներ +first_page.title=Գնալ դէպի առաջին էջ +first_page.label=Գնալ դէպի առաջին էջ +first_page_label=Գնալ դէպի առաջին էջ +last_page.title=Գնալ դէպի վերջին էջ +last_page.label=Գնալ դէպի վերջին էջ +last_page_label=Գնալ դէպի վերջին էջ +page_rotate_cw.title=Պտտել ժամացոյցի սլաքի ուղղութեամբ +page_rotate_cw.label=Պտտել ժամացոյցի սլաքի ուղղութեամբ +page_rotate_cw_label=Պտտել ժամացոյցի սլաքի ուղղութեամբ +page_rotate_ccw.title=Պտտել ժամացոյցի սլաքի հակառակ ուղղութեամբ +page_rotate_ccw.label=Պտտել ժամացոյցի սլաքի հակառակ ուղղութեամբ +page_rotate_ccw_label=Պտտել ժամացոյցի սլաքի հակառակ ուղղութեամբ + +cursor_text_select_tool.title=Միացնել գրոյթ ընտրելու գործիքը +cursor_text_select_tool_label=Գրուածք ընտրելու գործիք +cursor_hand_tool.title=Միացնել ձեռքի գործիքը +cursor_hand_tool_label=Ձեռքի գործիք + +scroll_vertical.title=Աւգտագործել ուղղահայեաց ոլորում +scroll_vertical_label=Ուղղահայեաց ոլորում +scroll_horizontal.title=Աւգտագործել հորիզոնական ոլորում +scroll_horizontal_label=Հորիզոնական ոլորում +scroll_wrapped.title=Աւգտագործել փաթաթուած ոլորում +scroll_wrapped_label=Փաթաթուած ոլորում + +spread_none.title=Մի միացէք էջի կոնտեքստում +spread_none_label=Չկայ կոնտեքստ +spread_odd.title=Միացէք էջի կոնտեքստին սկսելով՝ կենտ համարակալուած էջերով +spread_odd_label=Տարաւրինակ կոնտեքստ +spread_even.title=Միացէք էջի կոնտեքստին սկսելով՝ զոյգ համարակալուած էջերով + +# Document properties dialog box +document_properties.title=Փաստաթղթի հատկութիւնները… +document_properties_label=Փաստաթղթի յատկութիւնները… +document_properties_file_name=Նիշքի անունը․ +document_properties_file_size=Նիշք չափը. +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} ԿԲ ({{size_b}} բայթ) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} ՄԲ ({{size_b}} բայթ) +document_properties_title=Վերնագիր +document_properties_author=Հեղինակ․ +document_properties_subject=առարկայ +document_properties_keywords=Հիմնաբառեր +document_properties_creation_date=Ստեղծման ամսաթիւ +document_properties_modification_date=Փոփոխութեան ամսաթիւ. +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Ստեղծող +document_properties_producer=PDF-ի Արտադրողը. +document_properties_version=PDF-ի տարբերակը. +document_properties_page_count=Էջերի քանակը. +document_properties_page_size=Էջի չափը. +document_properties_page_size_unit_inches=ում +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=ուղղաձիգ +document_properties_page_size_orientation_landscape=հորիզոնական +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Նամակ +document_properties_page_size_name_legal=Աւրինական +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Արագ վեբ դիտում․ +document_properties_linearized_yes=Այո +document_properties_linearized_no=Ոչ +document_properties_close=Փակել + +print_progress_message=Նախապատրաստում է փաստաթուղթը տպելուն… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Չեղարկել + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Փոխարկել կողային վահանակը +toggle_sidebar_notification.title=Փոխարկել կողային վահանակը (փաստաթուղթը պարունակում է ուրուագիծ/կցորդ) +toggle_sidebar_label=Փոխարկել կողային վահանակը +document_outline.title=Ցուցադրել փաստաթղթի ուրուագիծը (կրկնակի սեղմէք՝ միաւորները ընդարձակելու/կոծկելու համար) +document_outline_label=Փաստաթղթի ուրուագիծ +attachments.title=Ցուցադրել կցորդները +attachments_label=Կցորդներ +thumbs.title=Ցուցադրել մանրապատկերը +thumbs_label=Մանրապատկեր +findbar.title=Գտնել փաստաթղթում +findbar_label=Որոնում + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Էջ {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Էջը {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Էջի մանրապատկերը {{page}} + +# Find panel button title and messages +find_input.title=Որոնում +find_input.placeholder=Գտնել փաստաթղթում… +find_previous.title=Գտնել արտայայտութեան նախորդ արտայայտութիւնը +find_previous_label=Նախորդը +find_next.title=Գտիր արտայայտութեան յաջորդ արտայայտութիւնը +find_next_label=Հաջորդը +find_highlight=Գունանշել բոլորը +find_match_case_label=Հաշուի առնել հանգամանքը +find_entire_word_label=Ամբողջ բառերը +find_reached_top=Հասել եք փաստաթղթի վերեւին,շարունակել ներքեւից +find_reached_bottom=Հասել էք փաստաթղթի վերջին, շարունակել վերեւից +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ հոգնակի(ընդհանուր) ]} +find_match_count[one]={{current}} {{total}}-ի համընկնումից +find_match_count[two]={{current}} {{total}}-ի համընկնումներից +find_match_count[few]={{current}} {{total}}-ի համընկնումներից +find_match_count[many]={{current}} {{total}}-ի համընկնումներից +find_match_count[other]={{current}} {{total}}-ի համընկնումներից +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ հոգնակի (սահմանը) ]} +find_match_count_limit[zero]=Աւելին քան {{limit}} համընկնումները +find_match_count_limit[one]=Աւելին քան {{limit}} համընկնումը +find_match_count_limit[two]=Աւելին քան {{limit}} համընկնումները +find_match_count_limit[few]=Աւելին քան {{limit}} համընկնումները +find_match_count_limit[many]=Աւելին քան {{limit}} համընկնումները +find_match_count_limit[other]=Աւելին քան {{limit}} համընկնումները +find_not_found=Արտայայտութիւնը չգտնուեց + +# Error panel labels +error_more_info=Աւելի շատ տեղեկութիւն +error_less_info=Քիչ տեղեկութիւն +error_close=Փակել +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (կառուցումը. {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Գրութիւնը. {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Շեղջ. {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=նիշք․ {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Տողը. {{line}} +rendering_error=Սխալ է տեղի ունեցել էջի մեկնաբանման ժամանակ + +# Predefined zoom values +page_scale_width=Էջի լայնքը +page_scale_fit=Հարմարեցնել էջը +page_scale_auto=Ինքնաշխատ խոշորացում +page_scale_actual=Իրական չափը +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Սխալ +loading_error=PDF նիշքը բացելիս սխալ է տեղի ունեցել։ +invalid_file_error=Սխալ կամ վնասուած PDF նիշք։ +missing_file_error=PDF նիշքը բացակաիւմ է։ +unexpected_response_error=Սպասարկիչի անսպասելի պատասխան։ + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Ծանոթութիւն] +password_label=Մուտքագրէք գաղտնաբառը այս PDF նիշքը բացելու համար +password_invalid=Գաղտնաբառը սխալ է: Կրկին փորձէք: +password_ok=Լաւ +password_cancel=Չեղարկել + +printing_not_supported=Զգուշացում. Տպելը ամբողջութեամբ չի աջակցուում զննարկիչի կողմից։ +printing_not_ready=Զգուշացում. PDF֊ը ամբողջութեամբ չի բեռնաւորուել տպելու համար։ +web_fonts_disabled=Վեբ-տառատեսակները անջատուած են. հնարաւոր չէ աւգտագործել ներկառուցուած PDF տառատեսակները։ +document_colors_not_allowed=PDF փաստաթղթերին թոյլատրուած չէ աւգտագործել իրենց սեփական գոյները։ “Թոյլատրել էջերին ընտրել իրենց սեփական գոյները“ ընտրանքը անջատուած է զննարկիչում։ diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ia/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ia/viewer.properties new file mode 100644 index 0000000..f69b26e --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ia/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pagina previe +previous_label=Previe +next.title=Pagina sequente +next_label=Sequente + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Distantiar +zoom_out_label=Distantiar +zoom_in.title=Approximar +zoom_in_label=Approximar +zoom.title=Zoom +presentation_mode.title=Excambiar a modo presentation +presentation_mode_label=Modo presentation +open_file.title=Aperir le file +open_file_label=Aperir +print.title=Imprimer +print_label=Imprimer +download.title=Discargar +download_label=Discargar +bookmark.title=Vista actual (copiar o aperir in un nove fenestra) +bookmark_label=Vista actual + +# Secondary toolbar and context menu +tools.title=Instrumentos +tools_label=Instrumentos +first_page.title=Ir al prime pagina +first_page.label=Ir al prime pagina +first_page_label=Ir al prime pagina +last_page.title=Ir al prime pagina +last_page.label=Ir al prime pagina +last_page_label=Ir al prime pagina +page_rotate_cw.title=Rotar in senso horari +page_rotate_cw.label=Rotar in senso horari +page_rotate_cw_label=Rotar in senso horari +page_rotate_ccw.title=Rotar in senso antihorari +page_rotate_ccw.label=Rotar in senso antihorari +page_rotate_ccw_label=Rotar in senso antihorari + +cursor_text_select_tool.title=Activar le instrumento de selection de texto +cursor_text_select_tool_label=Instrumento de selection de texto +cursor_hand_tool.title=Activar le instrumento mano +cursor_hand_tool_label=Instrumento mano + +scroll_vertical.title=Usar rolamento vertical +scroll_vertical_label=Rolamento vertical +scroll_horizontal.title=Usar rolamento horizontal +scroll_horizontal_label=Rolamento horizontal +scroll_wrapped.title=Usar rolamento incapsulate +scroll_wrapped_label=Rolamento incapsulate + +spread_none.title=Non junger paginas dual +spread_none_label=Sin paginas dual +spread_odd.title=Junger paginas dual a partir de paginas con numeros impar +spread_odd_label=Paginas dual impar +spread_even.title=Junger paginas dual a partir de paginas con numeros par +spread_even_label=Paginas dual par + +# Document properties dialog box +document_properties.title=Proprietates del documento… +document_properties_label=Proprietates del documento… +document_properties_file_name=Nomine del file: +document_properties_file_size=Dimension de file: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Titulo: +document_properties_author=Autor: +document_properties_subject=Subjecto: +document_properties_keywords=Parolas clave: +document_properties_creation_date=Data de creation: +document_properties_modification_date=Data de modification: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creator: +document_properties_producer=Productor PDF: +document_properties_version=Version PDF: +document_properties_page_count=Numero de paginas: +document_properties_page_size=Dimension del pagina: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=vertical +document_properties_page_size_orientation_landscape=horizontal +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Littera +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vista web rapide: +document_properties_linearized_yes=Si +document_properties_linearized_no=No +document_properties_close=Clauder + +print_progress_message=Preparation del documento pro le impression… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancellar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Monstrar/celar le barra lateral +toggle_sidebar_notification.title=Monstrar/celar le barra lateral (le documento contine structura/attachamentos) +toggle_sidebar_label=Monstrar/celar le barra lateral +document_outline.title=Monstrar le schema del documento (clic duple pro expander/contraher tote le elementos) +document_outline_label=Schema del documento +attachments.title=Monstrar le annexos +attachments_label=Annexos +thumbs.title=Monstrar le vignettes +thumbs_label=Vignettes +findbar.title=Cercar in le documento +findbar_label=Cercar + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Pagina {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pagina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Vignette del pagina {{page}} + +# Find panel button title and messages +find_input.title=Cercar +find_input.placeholder=Cercar in le documento… +find_previous.title=Trovar le previe occurrentia del phrase +find_previous_label=Previe +find_next.title=Trovar le successive occurrentia del phrase +find_next_label=Sequente +find_highlight=Evidentiar toto +find_match_case_label=Distinguer majusculas/minusculas +find_entire_word_label=Parolas integre +find_reached_top=Initio del documento attingite, continuation ab fin +find_reached_bottom=Fin del documento attingite, continuation ab initio +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} de {{total}} concordantia +find_match_count[two]={{current}} de {{total}} concordantias +find_match_count[few]={{current}} de {{total}} concordantias +find_match_count[many]={{current}} de {{total}} concordantias +find_match_count[other]={{current}} de {{total}} concordantias +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Plus de {{limit}} concordantias +find_match_count_limit[one]=Plus de {{limit}} concordantia +find_match_count_limit[two]=Plus de {{limit}} concordantias +find_match_count_limit[few]=Plus de {{limit}} concordantias +find_match_count_limit[many]=Plus de {{limit}} correspondentias +find_match_count_limit[other]=Plus de {{limit}} concordantias +find_not_found=Phrase non trovate + +# Error panel labels +error_more_info=Plus de informationes +error_less_info=Minus de informationes +error_close=Clauder +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Message: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=File: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linea: {{line}} +rendering_error=Un error occurreva durante que on processava le pagina. + +# Predefined zoom values +page_scale_width=Largessa pagina plen +page_scale_fit=Pagina integre +page_scale_auto=Zoom automatic +page_scale_actual=Dimension actual +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=Un error occurreva durante que on cargava le file PDF. +invalid_file_error=File PDF corrumpite o non valide. +missing_file_error=File PDF mancante. +unexpected_response_error=Responsa del servitor inexpectate. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=Insere le contrasigno pro aperir iste file PDF. +password_invalid=Contrasigno invalide. Per favor retenta. +password_ok=OK +password_cancel=Cancellar + +printing_not_supported=Attention : le impression non es totalmente supportate per ce navigator. +printing_not_ready=Attention: le file PDF non es integremente cargate pro lo poter imprimer. +web_fonts_disabled=Le typos de litteras web es disactivate: impossibile usar le typos de litteras PDF incorporate. +document_colors_not_allowed=Le documentos PDF non pote utilisar lor proprie colores: “Autorisar le paginas web a utilisar lor proprie colores” es disactivate in le navigator. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/id/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/id/viewer.properties new file mode 100644 index 0000000..0a904e1 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/id/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Laman Sebelumnya +previous_label=Sebelumnya +next.title=Laman Selanjutnya +next_label=Selanjutnya + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Halaman +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=dari {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} dari {{pagesCount}}) + +zoom_out.title=Perkecil +zoom_out_label=Perkecil +zoom_in.title=Perbesar +zoom_in_label=Perbesar +zoom.title=Perbesaran +presentation_mode.title=Ganti ke Mode Presentasi +presentation_mode_label=Mode Presentasi +open_file.title=Buka Berkas +open_file_label=Buka +print.title=Cetak +print_label=Cetak +download.title=Unduh +download_label=Unduh +bookmark.title=Tampilan Sekarang (salin atau buka di jendela baru) +bookmark_label=Tampilan Sekarang + +# Secondary toolbar and context menu +tools.title=Alat +tools_label=Alat +first_page.title=Buka Halaman Pertama +first_page.label=Ke Halaman Pertama +first_page_label=Buka Halaman Pertama +last_page.title=Buka Halaman Terakhir +last_page.label=Ke Halaman Terakhir +last_page_label=Buka Halaman Terakhir +page_rotate_cw.title=Putar Searah Jarum Jam +page_rotate_cw.label=Putar Searah Jarum Jam +page_rotate_cw_label=Putar Searah Jarum Jam +page_rotate_ccw.title=Putar Berlawanan Arah Jarum Jam +page_rotate_ccw.label=Putar Berlawanan Arah Jarum Jam +page_rotate_ccw_label=Putar Berlawanan Arah Jarum Jam + +cursor_text_select_tool.title=Aktifkan Alat Seleksi Teks +cursor_text_select_tool_label=Alat Seleksi Teks +cursor_hand_tool.title=Aktifkan Alat Tangan +cursor_hand_tool_label=Alat Tangan + +scroll_vertical.title=Gunakan Penggeseran Vertikal +scroll_vertical_label=Penggeseran Vertikal +scroll_horizontal.title=Gunakan Penggeseran Horizontal +scroll_horizontal_label=Penggeseran Horizontal +scroll_wrapped.title=Gunakan Penggeseran Terapit +scroll_wrapped_label=Penggeseran Terapit + +spread_none.title=Jangan gabungkan lembar halaman +spread_none_label=Tidak Ada Lembaran +spread_odd.title=Gabungkan lembar lamanan mulai dengan halaman ganjil +spread_odd_label=Lembaran Ganjil +spread_even.title=Gabungkan lembar halaman dimulai dengan halaman genap +spread_even_label=Lembaran Genap + +# Document properties dialog box +document_properties.title=Properti Dokumen… +document_properties_label=Properti Dokumen… +document_properties_file_name=Nama berkas: +document_properties_file_size=Ukuran berkas: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} byte) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} byte) +document_properties_title=Judul: +document_properties_author=Penyusun: +document_properties_subject=Subjek: +document_properties_keywords=Kata Kunci: +document_properties_creation_date=Tanggal Dibuat: +document_properties_modification_date=Tanggal Dimodifikasi: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Pembuat: +document_properties_producer=Pemroduksi PDF: +document_properties_version=Versi PDF: +document_properties_page_count=Jumlah Halaman: +document_properties_page_size=Ukuran Laman: +document_properties_page_size_unit_inches=inci +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=tegak +document_properties_page_size_orientation_landscape=mendatar +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Tampilan Web Kilat: +document_properties_linearized_yes=Ya +document_properties_linearized_no=Tidak +document_properties_close=Tutup + +print_progress_message=Menyiapkan dokumen untuk pencetakan… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Batalkan + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Aktif/Nonaktifkan Bilah Samping +toggle_sidebar_notification.title=Aktif/Nonaktifkan Bilah Samping (dokumen berisi kerangka/lampiran) +toggle_sidebar_label=Aktif/Nonaktifkan Bilah Samping +document_outline.title=Tampilkan Kerangka Dokumen (klik ganda untuk membentangkan/menciutkan semua item) +document_outline_label=Kerangka Dokumen +attachments.title=Tampilkan Lampiran +attachments_label=Lampiran +thumbs.title=Tampilkan Miniatur +thumbs_label=Miniatur +findbar.title=Temukan di Dokumen +findbar_label=Temukan + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Laman {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Laman {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatur Laman {{page}} + +# Find panel button title and messages +find_input.title=Temukan +find_input.placeholder=Temukan di dokumen… +find_previous.title=Temukan kata sebelumnya +find_previous_label=Sebelumnya +find_next.title=Temukan lebih lanjut +find_next_label=Selanjutnya +find_highlight=Sorot semuanya +find_match_case_label=Cocokkan BESAR/kecil +find_entire_word_label=Seluruh teks +find_reached_top=Sampai di awal dokumen, dilanjutkan dari bawah +find_reached_bottom=Sampai di akhir dokumen, dilanjutkan dari atas +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} dari {{total}} hasil +find_match_count[two]={{current}} dari {{total}} hasil +find_match_count[few]={{current}} dari {{total}} hasil +find_match_count[many]={{current}} dari {{total}} hasil +find_match_count[other]={{current}} dari {{total}} hasil +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Ditemukan lebih dari {{limit}} +find_match_count_limit[one]=Ditemukan lebih dari {{limit}} +find_match_count_limit[two]=Ditemukan lebih dari {{limit}} +find_match_count_limit[few]=Ditemukan lebih dari {{limit}} +find_match_count_limit[many]=Ditemukan lebih dari {{limit}} +find_match_count_limit[other]=Ditemukan lebih dari {{limit}} +find_not_found=Frasa tidak ditemukan + +# Error panel labels +error_more_info=Lebih Banyak Informasi +error_less_info=Lebih Sedikit Informasi +error_close=Tutup +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Pesan: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Berkas: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Baris: {{line}} +rendering_error=Galat terjadi saat merender laman. + +# Predefined zoom values +page_scale_width=Lebar Laman +page_scale_fit=Muat Laman +page_scale_auto=Perbesaran Otomatis +page_scale_actual=Ukuran Asli +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Galat +loading_error=Galat terjadi saat memuat PDF. +invalid_file_error=Berkas PDF tidak valid atau rusak. +missing_file_error=Berkas PDF tidak ada. +unexpected_response_error=Balasan server yang tidak diharapkan. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotasi {{type}}] +password_label=Masukkan sandi untuk membuka berkas PDF ini. +password_invalid=Sandi tidak valid. Silakan coba lagi. +password_ok=Oke +password_cancel=Batal + +printing_not_supported=Peringatan: Pencetakan tidak didukung secara lengkap pada peramban ini. +printing_not_ready=Peringatan: Berkas PDF masih belum dimuat secara lengkap untuk dapat dicetak. +web_fonts_disabled=Font web dinonaktifkan: tidak dapat menggunakan font PDF yang tersemat. +document_colors_not_allowed=Dokumen PDF tidak diizinkan untuk menggunakan warnanya sendiri karena setelan 'Izinkan laman memilih warna sendiri' dinonaktifkan pada pengaturan. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/is/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/is/viewer.properties new file mode 100644 index 0000000..d24c2ad --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/is/viewer.properties @@ -0,0 +1,239 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Fyrri síða +previous_label=Fyrri +next.title=Næsta síða +next_label=Næsti + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Síða +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=af {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} af {{pagesCount}}) + +zoom_out.title=Minnka +zoom_out_label=Minnka +zoom_in.title=Stækka +zoom_in_label=Stækka +zoom.title=Aðdráttur +presentation_mode.title=Skipta yfir á kynningarham +presentation_mode_label=Kynningarhamur +open_file.title=Opna skrá +open_file_label=Opna +print.title=Prenta +print_label=Prenta +download.title=Hala niður +download_label=Hala niður +bookmark.title=Núverandi sýn (afritaðu eða opnaðu í nýjum glugga) +bookmark_label=Núverandi sýn + +# Secondary toolbar and context menu +tools.title=Verkfæri +tools_label=Verkfæri +first_page.title=Fara á fyrstu síðu +first_page.label=Fara á fyrstu síðu +first_page_label=Fara á fyrstu síðu +last_page.title=Fara á síðustu síðu +last_page.label=Fara á síðustu síðu +last_page_label=Fara á síðustu síðu +page_rotate_cw.title=Snúa réttsælis +page_rotate_cw.label=Snúa réttsælis +page_rotate_cw_label=Snúa réttsælis +page_rotate_ccw.title=Snúa rangsælis +page_rotate_ccw.label=Snúa rangsælis +page_rotate_ccw_label=Snúa rangsælis + +cursor_text_select_tool.title=Virkja textavalsáhald +cursor_text_select_tool_label=Textavalsáhald +cursor_hand_tool.title=Virkja handarverkfæri +cursor_hand_tool_label=Handarverkfæri + +scroll_vertical.title=Nota lóðrétt skrun +scroll_vertical_label=Lóðrétt skrun +scroll_horizontal.title=Nota lárétt skrun +scroll_horizontal_label=Lárétt skrun + +spread_none.title=Ekki taka þátt í dreifingu síðna +spread_none_label=Engin dreifing +spread_odd.title=Taka þátt í dreifingu síðna með oddatölum +spread_odd_label=Oddatöludreifing +spread_even.title=Taktu þátt í dreifingu síðna með jöfnuntölum +spread_even_label=Jafnatöludreifing + +# Document properties dialog box +document_properties.title=Eiginleikar skjals… +document_properties_label=Eiginleikar skjals… +document_properties_file_name=Skráarnafn: +document_properties_file_size=Skrárstærð: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Titill: +document_properties_author=Hönnuður: +document_properties_subject=Efni: +document_properties_keywords=Stikkorð: +document_properties_creation_date=Búið til: +document_properties_modification_date=Dags breytingar: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Höfundur: +document_properties_producer=PDF framleiðandi: +document_properties_version=PDF útgáfa: +document_properties_page_count=Blaðsíðufjöldi: +document_properties_page_size=Stærð síðu: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=skammsnið +document_properties_page_size_orientation_landscape=langsnið +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized_yes=Já +document_properties_linearized_no=Nei +document_properties_close=Loka + +print_progress_message=Undirbý skjal fyrir prentun… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Hætta við + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Víxla hliðslá +toggle_sidebar_notification.title=Víxla hliðarslá (skjal inniheldur yfirlit/viðhengi) +toggle_sidebar_label=Víxla hliðslá +document_outline.title=Sýna yfirlit skjals (tvísmelltu til að opna/loka öllum hlutum) +document_outline_label=Efnisskipan skjals +attachments.title=Sýna viðhengi +attachments_label=Viðhengi +thumbs.title=Sýna smámyndir +thumbs_label=Smámyndir +findbar.title=Leita í skjali +findbar_label=Leita + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Síða {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Smámynd af síðu {{page}} + +# Find panel button title and messages +find_input.title=Leita +find_input.placeholder=Leita í skjali… +find_previous.title=Leita að fyrra tilfelli þessara orða +find_previous_label=Fyrri +find_next.title=Leita að næsta tilfelli þessara orða +find_next_label=Næsti +find_highlight=Lita allt +find_match_case_label=Passa við stafstöðu +find_entire_word_label=Heil orð +find_reached_top=Náði efst í skjal, held áfram neðst +find_reached_bottom=Náði enda skjals, held áfram efst +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} af {{total}} niðurstöðu +find_match_count[two]={{current}} af {{total}} niðurstöðum +find_match_count[few]={{current}} af {{total}} niðurstöðum +find_match_count[many]={{current}} af {{total}} niðurstöðum +find_match_count[other]={{current}} af {{total}} niðurstöðum +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Fleiri en {{limit}} niðurstöður +find_match_count_limit[one]=Fleiri en {{limit}} niðurstaða +find_match_count_limit[two]=Fleiri en {{limit}} niðurstöður +find_match_count_limit[few]=Fleiri en {{limit}} niðurstöður +find_match_count_limit[many]=Fleiri en {{limit}} niðurstöður +find_match_count_limit[other]=Fleiri en {{limit}} niðurstöður +find_not_found=Fann ekki orðið + +# Error panel labels +error_more_info=Meiri upplýsingar +error_less_info=Minni upplýsingar +error_close=Loka +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Skilaboð: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stafli: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Skrá: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Lína: {{line}} +rendering_error=Upp kom villa við að birta síðuna. + +# Predefined zoom values +page_scale_width=Síðubreidd +page_scale_fit=Passa á síðu +page_scale_auto=Sjálfvirkur aðdráttur +page_scale_actual=Raunstærð +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Villa +loading_error=Villa kom upp við að hlaða inn PDF. +invalid_file_error=Ógild eða skemmd PDF skrá. +missing_file_error=Vantar PDF skrá. +unexpected_response_error=Óvænt svar frá netþjóni. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Skýring] +password_label=Sláðu inn lykilorð til að opna þessa PDF skrá. +password_invalid=Ógilt lykilorð. Reyndu aftur. +password_ok=Í lagi +password_cancel=Hætta við + +printing_not_supported=Aðvörun: Prentun er ekki með fyllilegan stuðning á þessum vafra. +printing_not_ready=Aðvörun: Ekki er búið að hlaða inn allri PDF skránni fyrir prentun. +web_fonts_disabled=Vef leturgerðir eru óvirkar: get ekki notað innbyggðar PDF leturgerðir. +document_colors_not_allowed=PDF skjöl hafa ekki leyfi til að nota sína eigin liti: “Leyfa síðum að velja eigin liti” er óvirkt í vafranum. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/it/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/it/viewer.properties new file mode 100644 index 0000000..1f0a20a --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/it/viewer.properties @@ -0,0 +1,159 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +previous.title = Pagina precedente +previous_label = Precedente +next.title = Pagina successiva +next_label = Successiva +page.title = Pagina +of_pages = di {{pagesCount}} +page_of_pages = ({{pageNumber}} di {{pagesCount}}) +zoom_out.title = Riduci zoom +zoom_out_label = Riduci zoom +zoom_in.title = Aumenta zoom +zoom_in_label = Aumenta zoom +zoom.title = Zoom +presentation_mode.title = Passa alla modalità presentazione +presentation_mode_label = Modalità presentazione +open_file.title = Apri file +open_file_label = Apri +print.title = Stampa +print_label = Stampa +download.title = Scarica questo documento +download_label = Download +bookmark.title = Visualizzazione corrente (copia o apri in una nuova finestra) +bookmark_label = Visualizzazione corrente +tools.title = Strumenti +tools_label = Strumenti +first_page.title = Vai alla prima pagina +first_page.label = Vai alla prima pagina +first_page_label = Vai alla prima pagina +last_page.title = Vai all’ultima pagina +last_page.label = Vai all’ultima pagina +last_page_label = Vai all’ultima pagina +page_rotate_cw.title = Ruota in senso orario +page_rotate_cw.label = Ruota in senso orario +page_rotate_cw_label = Ruota in senso orario +page_rotate_ccw.title = Ruota in senso antiorario +page_rotate_ccw.label = Ruota in senso antiorario +page_rotate_ccw_label = Ruota in senso antiorario +cursor_text_select_tool.title = Attiva strumento di selezione testo +cursor_text_select_tool_label = Strumento di selezione testo +cursor_hand_tool.title = Attiva strumento mano +cursor_hand_tool_label = Strumento mano +scroll_vertical.title = Scorri le pagine in verticale +scroll_vertical_label = Scorrimento verticale +scroll_horizontal.title = Scorri le pagine in orizzontale +scroll_horizontal_label = Scorrimento orizzontale +scroll_wrapped.title = Scorri le pagine in verticale, disponendole da sinistra a destra e andando a capo automaticamente +scroll_wrapped_label = Scorrimento con a capo automatico +spread_none.title = Non raggruppare pagine +spread_none_label = Nessun raggruppamento +spread_odd.title = Crea gruppi di pagine che iniziano con numeri di pagina dispari +spread_odd_label = Raggruppamento dispari +spread_even.title = Crea gruppi di pagine che iniziano con numeri di pagina pari +spread_even_label = Raggruppamento pari +document_properties.title = Proprietà del documento… +document_properties_label = Proprietà del documento… +document_properties_file_name = Nome file: +document_properties_file_size = Dimensione file: +document_properties_kb = {{size_kb}} kB ({{size_b}} byte) +document_properties_mb = {{size_mb}} MB ({{size_b}} byte) +document_properties_title = Titolo: +document_properties_author = Autore: +document_properties_subject = Oggetto: +document_properties_keywords = Parole chiave: +document_properties_creation_date = Data creazione: +document_properties_modification_date = Data modifica: +document_properties_date_string = {{date}}, {{time}} +document_properties_creator = Autore originale: +document_properties_producer = Produttore PDF: +document_properties_version = Versione PDF: +document_properties_page_count = Conteggio pagine: +document_properties_page_size = Dimensioni pagina: +document_properties_page_size_unit_inches = in +document_properties_page_size_unit_millimeters = mm +document_properties_page_size_orientation_portrait = verticale +document_properties_page_size_orientation_landscape = orizzontale +document_properties_page_size_name_a3 = A3 +document_properties_page_size_name_a4 = A4 +document_properties_page_size_name_letter = Lettera +document_properties_page_size_name_legal = Legale +document_properties_page_size_dimension_string = {{width}} × {{height}} {{unit}} ({{orientation}}) +document_properties_page_size_dimension_name_string = {{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +document_properties_linearized = Visualizzazione web veloce: +document_properties_linearized_yes = Sì +document_properties_linearized_no = No +document_properties_close = Chiudi +print_progress_message = Preparazione documento per la stampa… +print_progress_percent = {{progress}}% +print_progress_close = Annulla +toggle_sidebar.title = Attiva/disattiva barra laterale +toggle_sidebar_notification.title = Attiva/disattiva barra laterale (il documento contiene struttura/allegati) +toggle_sidebar_label = Attiva/disattiva barra laterale +document_outline.title = Visualizza la struttura del documento (doppio clic per visualizzare/comprimere tutti gli elementi) +document_outline_label = Struttura documento +attachments.title = Visualizza allegati +attachments_label = Allegati +thumbs.title = Mostra le miniature +thumbs_label = Miniature +findbar.title = Trova nel documento +findbar_label = Trova +page_canvas = Pagina {{page}} +thumb_page_title = Pagina {{page}} +thumb_page_canvas = Miniatura della pagina {{page}} +find_input.title = Trova +find_input.placeholder = Trova nel documento… +find_previous.title = Trova l’occorrenza precedente del testo da cercare +find_previous_label = Precedente +find_next.title = Trova l’occorrenza successiva del testo da cercare +find_next_label = Successivo +find_highlight = Evidenzia +find_match_case_label = Maiuscole/minuscole +find_entire_word_label = Parole intere +find_reached_top = Raggiunto l’inizio della pagina, continua dalla fine +find_reached_bottom = Raggiunta la fine della pagina, continua dall’inizio +find_match_count = {[ plural(total) ]} +find_match_count[one] = {{current}} di {{total}} corrispondenza +find_match_count[two] = {{current}} di {{total}} corrispondenze +find_match_count[few] = {{current}} di {{total}} corrispondenze +find_match_count[many] = {{current}} di {{total}} corrispondenze +find_match_count[other] = {{current}} di {{total}} corrispondenze +find_match_count_limit = {[ plural(limit) ]} +find_match_count_limit[zero] = Più di {{limit}} corrispondenze +find_match_count_limit[one] = Più di {{limit}} corrispondenza +find_match_count_limit[two] = Più di {{limit}} corrispondenze +find_match_count_limit[few] = Più di {{limit}} corrispondenze +find_match_count_limit[many] = Più di {{limit}} corrispondenze +find_match_count_limit[other] = Più di {{limit}} corrispondenze +find_not_found = Testo non trovato +error_more_info = Ulteriori informazioni +error_less_info = Nascondi dettagli +error_close = Chiudi +error_version_info = PDF.js v{{version}} (build: {{build}}) +error_message = Messaggio: {{message}} +error_stack = Stack: {{stack}} +error_file = File: {{file}} +error_line = Riga: {{line}} +rendering_error = Si è verificato un errore durante il rendering della pagina. +page_scale_width = Larghezza pagina +page_scale_fit = Adatta a una pagina +page_scale_auto = Zoom automatico +page_scale_actual = Dimensioni effettive +page_scale_percent = {{scale}}% +loading_error_indicator = Errore +loading_error = Si è verificato un errore durante il caricamento del PDF. +invalid_file_error = File PDF non valido o danneggiato. +missing_file_error = File PDF non disponibile. +unexpected_response_error = Risposta imprevista del server +annotation_date_string = {{date}}, {{time}} +text_annotation_type.alt = [Annotazione: {{type}}] +password_label = Inserire la password per aprire questo file PDF. +password_invalid = Password non corretta. Riprovare. +password_ok = OK +password_cancel = Annulla +printing_not_supported = Attenzione: la stampa non è completamente supportata da questo browser. +printing_not_ready = Attenzione: il PDF non è ancora stato caricato completamente per la stampa. +web_fonts_disabled = I web font risultano disattivati: impossibile utilizzare i caratteri incorporati nel PDF. +document_colors_not_allowed = Non è possibile visualizzare i colori originali definiti nel file PDF: l’opzione del browser “Consenti alle pagine di scegliere i propri colori invece di quelli impostati” è disattivata. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ja/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ja/viewer.properties new file mode 100644 index 0000000..95732a0 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ja/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=前のページへ戻ります +previous_label=前へ +next.title=次のページへ進みます +next_label=次へ + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=ページ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) + +zoom_out.title=表示を縮小します +zoom_out_label=縮小 +zoom_in.title=表示を拡大します +zoom_in_label=拡大 +zoom.title=拡大/縮小 +presentation_mode.title=プレゼンテーションモードに切り替えます +presentation_mode_label=プレゼンテーションモード +open_file.title=ファイルを開きます +open_file_label=開く +print.title=印刷します +print_label=印刷 +download.title=ダウンロードします +download_label=ダウンロード +bookmark.title=現在のビューの URL です (コピーまたは新しいウィンドウに開く) +bookmark_label=現在のビュー + +# Secondary toolbar and context menu +tools.title=ツール +tools_label=ツール +first_page.title=最初のページへ移動します +first_page.label=最初のページへ移動 +first_page_label=最初のページへ移動 +last_page.title=最後のページへ移動します +last_page.label=最後のページへ移動 +last_page_label=最後のページへ移動 +page_rotate_cw.title=ページを右へ回転します +page_rotate_cw.label=右回転 +page_rotate_cw_label=右回転 +page_rotate_ccw.title=ページを左へ回転します +page_rotate_ccw.label=左回転 +page_rotate_ccw_label=左回転 + +cursor_text_select_tool.title=テキスト選択ツールを有効にする +cursor_text_select_tool_label=テキスト選択ツール +cursor_hand_tool.title=手のひらツールを有効にする +cursor_hand_tool_label=手のひらツール + +scroll_vertical.title=縦スクロールにする +scroll_vertical_label=縦スクロール +scroll_horizontal.title=横スクロールにする +scroll_horizontal_label=横スクロール +scroll_wrapped.title=折り返しスクロールにする +scroll_wrapped_label=折り返しスクロール + +spread_none.title=見開きにしない +spread_none_label=見開きにしない +spread_odd.title=奇数ページ開始で見開きにする +spread_odd_label=奇数ページ見開き +spread_even.title=偶数ページ開始で見開きにする +spread_even_label=偶数ページ見開き + +# Document properties dialog box +document_properties.title=文書のプロパティ... +document_properties_label=文書のプロパティ... +document_properties_file_name=ファイル名: +document_properties_file_size=ファイルサイズ: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=タイトル: +document_properties_author=作成者: +document_properties_subject=件名: +document_properties_keywords=キーワード: +document_properties_creation_date=作成日: +document_properties_modification_date=更新日: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=アプリケーション: +document_properties_producer=PDF 作成: +document_properties_version=PDF のバージョン: +document_properties_page_count=ページ数: +document_properties_page_size=ページサイズ: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=縦 +document_properties_page_size_orientation_landscape=横 +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=レター +document_properties_page_size_name_legal=リーガル +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=ウェブ表示用に最適化: +document_properties_linearized_yes=はい +document_properties_linearized_no=いいえ +document_properties_close=閉じる + +print_progress_message=文書の印刷を準備しています... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=キャンセル + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=サイドバー表示を切り替えます +toggle_sidebar_notification.title=サイドバー表示を切り替えます (文書に含まれるアウトライン / 添付) +toggle_sidebar_label=サイドバーの切り替え +document_outline.title=文書の目次を表示します (ダブルクリックで項目を開閉します) +document_outline_label=文書の目次 +attachments.title=添付ファイルを表示します +attachments_label=添付ファイル +thumbs.title=縮小版を表示します +thumbs_label=縮小版 +findbar.title=文書内を検索します +findbar_label=検索 + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas={{page}} ページ +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title={{page}} ページ +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}} ページの縮小版 + +# Find panel button title and messages +find_input.title=検索 +find_input.placeholder=文書内を検索... +find_previous.title=現在より前の位置で指定文字列が現れる部分を検索します +find_previous_label=前へ +find_next.title=現在より後の位置で指定文字列が現れる部分を検索します +find_next_label=次へ +find_highlight=すべて強調表示 +find_match_case_label=大文字/小文字を区別 +find_entire_word_label=単語一致 +find_reached_top=文書先頭に到達したので末尾から続けて検索します +find_reached_bottom=文書末尾に到達したので先頭から続けて検索します +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{total}} 件中 {{current}} 件目 +find_match_count[two]={{total}} 件中 {{current}} 件目 +find_match_count[few]={{total}} 件中 {{current}} 件目 +find_match_count[many]={{total}} 件中 {{current}} 件目 +find_match_count[other]={{total}} 件中 {{current}} 件目 +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} 件以上一致 +find_match_count_limit[one]={{limit}} 件以上一致 +find_match_count_limit[two]={{limit}} 件以上一致 +find_match_count_limit[few]={{limit}} 件以上一致 +find_match_count_limit[many]={{limit}} 件以上一致 +find_match_count_limit[other]={{limit}} 件以上一致 +find_not_found=見つかりませんでした + +# Error panel labels +error_more_info=詳細情報 +error_less_info=詳細情報を隠す +error_close=閉じる +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (ビルド: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=メッセージ: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=スタック: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ファイル: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=行: {{line}} +rendering_error=ページのレンダリング中にエラーが発生しました。 + +# Predefined zoom values +page_scale_width=幅に合わせる +page_scale_fit=ページのサイズに合わせる +page_scale_auto=自動ズーム +page_scale_actual=実際のサイズ +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=エラー +loading_error=PDF の読み込み中にエラーが発生しました。 +invalid_file_error=無効または破損した PDF ファイル。 +missing_file_error=PDF ファイルが見つかりません。 +unexpected_response_error=サーバーから予期せぬ応答がありました。 + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} 注釈] +password_label=この PDF ファイルを開くためのパスワードを入力してください。 +password_invalid=無効なパスワードです。もう一度やり直してください。 +password_ok=OK +password_cancel=キャンセル + +printing_not_supported=警告: このブラウザーでは印刷が完全にサポートされていません。 +printing_not_ready=警告: PDF を印刷するための読み込みが終了していません。 +web_fonts_disabled=ウェブフォントが無効になっています: 埋め込まれた PDF のフォントを使用できません。 +document_colors_not_allowed=PDF 文書は、ウェブページが指定した配色を使用することができません: 'ウェブページが指定した配色' はブラウザーで無効になっています。 diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ka/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ka/viewer.properties new file mode 100644 index 0000000..d7a8f7a --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ka/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=წინა გვერდი +previous_label=წინა +next.title=შემდეგი გვერდი +next_label=შემდეგი + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=გვერდი +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}}-დან +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} {{pagesCount}}-დან) + +zoom_out.title=ზომის შემცირება +zoom_out_label=დაშორება +zoom_in.title=ზომის გაზრდა +zoom_in_label=მოახლოება +zoom.title=ზომა +presentation_mode.title=ჩვენების რეჟიმზე გადართვა +presentation_mode_label=ჩვენების რეჟიმი +open_file.title=ფაილის გახსნა +open_file_label=გახსნა +print.title=ამობეჭდვა +print_label=ამობეჭდვა +download.title=ჩამოტვირთვა +download_label=ჩამოტვირთვა +bookmark.title=მიმდინარე ხედი (ასლის აღება ან გახსნა ახალ ფანჯარაში) +bookmark_label=მიმდინარე ხედი + +# Secondary toolbar and context menu +tools.title=ხელსაწყოები +tools_label=ხელსაწყოები +first_page.title=პირველ გვერდზე გადასვლა +first_page.label=პირველ გვერდზე გადასვლა +first_page_label=პირველ გვერდზე გადასვლა +last_page.title=ბოლო გვერდზე გადასვლა +last_page.label=ბოლო გვერდზე გადასვლა +last_page_label=ბოლო გვერდზე გადასვლა +page_rotate_cw.title=საათის ისრის მიმართულებით შებრუნება +page_rotate_cw.label=მარჯვნივ გადაბრუნება +page_rotate_cw_label=მარჯვნივ გადაბრუნება +page_rotate_ccw.title=საათის ისრის საპირისპიროდ შებრუნება +page_rotate_ccw.label=მარცხნივ გადაბრუნება +page_rotate_ccw_label=მარცხნივ გადაბრუნება + +cursor_text_select_tool.title=მოსანიშნი მაჩვენებლის გამოყენება +cursor_text_select_tool_label=მოსანიშნი მაჩვენებელი +cursor_hand_tool.title=გადასაადგილებელი მაჩვენებლის გამოყენება +cursor_hand_tool_label=გადასაადგილებელი + +scroll_vertical.title=გვერდების შვეულად ჩვენება +scroll_vertical_label=შვეული გადაადგილება +scroll_horizontal.title=გვერდების თარაზულად ჩვენება +scroll_horizontal_label=განივი გადაადგილება +scroll_wrapped.title=გვერდების ცხრილურად ჩვენება +scroll_wrapped_label=ცხრილური გადაადგილება + +spread_none.title=ორ გვერდზე გაშლის გარეშე +spread_none_label=ცალგვერდიანი ჩვენება +spread_odd.title=ორ გვერდზე გაშლა, კენტი გვერდიდან დაწყებული +spread_odd_label=ორ გვერდზე კენტიდან +spread_even.title=ორ გვერდზე გაშლა, ლუწი გვერდიდან დაწყებული +spread_even_label=ორ გვერდზე ლუწიდან + +# Document properties dialog box +document_properties.title=დოკუმენტის შესახებ… +document_properties_label=დოკუმენტის შესახებ… +document_properties_file_name=ფაილის სახელი: +document_properties_file_size=ფაილის მოცულობა: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} კბ ({{size_b}} ბაიტი) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} მბ ({{size_b}} ბაიტი) +document_properties_title=სათაური: +document_properties_author=შემდგენი: +document_properties_subject=თემა: +document_properties_keywords=საკვანძო სიტყვები: +document_properties_creation_date=შექმნის თარიღი: +document_properties_modification_date=ჩასწორების თარიღი: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=შემქმნელი: +document_properties_producer=PDF-შემქმნელი: +document_properties_version=PDF-ვერსია: +document_properties_page_count=გვერდების რაოდენობა: +document_properties_page_size=გვერდის ზომა: +document_properties_page_size_unit_inches=დუიმი +document_properties_page_size_unit_millimeters=მმ +document_properties_page_size_orientation_portrait=შვეულად +document_properties_page_size_orientation_landscape=თარაზულად +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=სწრაფი შეთვალიერება: +document_properties_linearized_yes=დიახ +document_properties_linearized_no=არა +document_properties_close=დახურვა + +print_progress_message=დოკუმენტი მზადდება ამოსაბეჭდად… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=გაუქმება + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=გვერდითა ზოლის გამოჩენა/დამალვა +toggle_sidebar_notification.title=გვერდითა ზოლის ჩართვა/გამორთვა (დოკუმენტი შეიცავს სარჩევს/დანართს) +toggle_sidebar_label=გვერდითა ზოლის გამოჩენა/დამალვა +document_outline.title=დოკუმენტის სარჩევის ჩვენება (ორჯერ დაწკაპებით ყველა ელემენტის ჩამოშლა/აკეცვა) +document_outline_label=დოკუმენტის სარჩევი +attachments.title=დანართების ჩვენება +attachments_label=დანართები +thumbs.title=შეთვალიერება +thumbs_label=ესკიზები +findbar.title=პოვნა დოკუმენტში +findbar_label=ძიება + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=გვერდი {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=გვერდი {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=გვერდის შეთვალიერება {{page}} + +# Find panel button title and messages +find_input.title=ძიება +find_input.placeholder=პოვნა დოკუმენტში… +find_previous.title=ფრაზის წინა კონტექსტის პოვნა +find_previous_label=წინა +find_next.title=ფრაზის შემდეგი კონტექსტის პოვნა +find_next_label=შემდეგი +find_highlight=ყველას მონიშვნა +find_match_case_label=ემთხვევა მთავრული +find_entire_word_label=მთლიანი სიტყვები +find_reached_top=მიღწეულია დოკუმენტის დასაწყისი, გრძელდება ბოლოდან +find_reached_bottom=მიღწეულია დოკუმენტის ბოლო, გრძელდება დასაწყისიდან +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} / {{total}} თანხვედრიდან +find_match_count[two]={{current}} / {{total}} თანხვედრიდან +find_match_count[few]={{current}} / {{total}} თანხვედრიდან +find_match_count[many]={{current}} / {{total}} თანხვედრიდან +find_match_count[other]={{current}} / {{total}} თანხვედრიდან +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}}-ზე მეტი თანხვედრა +find_match_count_limit[one]={{limit}}-ზე მეტი თანხვედრა +find_match_count_limit[two]={{limit}}-ზე მეტი თანხვედრა +find_match_count_limit[few]={{limit}}-ზე მეტი თანხვედრა +find_match_count_limit[many]={{limit}}-ზე მეტი თანხვედრა +find_match_count_limit[other]={{limit}}-ზე მეტი თანხვედრა +find_not_found=ფრაზა ვერ მოიძებნა + +# Error panel labels +error_more_info=ვრცლად +error_less_info=შემოკლებულად +error_close=დახურვა +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=შეტყობინება: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=სტეკი: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ფაილი: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=ხაზი: {{line}} +rendering_error=შეცდომა, გვერდის ჩვენებისას. + +# Predefined zoom values +page_scale_width=გვერდის სიგანეზე +page_scale_fit=მთლიანი გვერდი +page_scale_auto=ავტომატური +page_scale_actual=საწყისი ზომა +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=შეცდომა +loading_error=შეცდომა, PDF-ფაილის ჩატვირთვისას. +invalid_file_error=არამართებული ან დაზიანებული PDF-ფაილი. +missing_file_error=ნაკლული PDF-ფაილი. +unexpected_response_error=სერვერის მოულოდნელი პასუხი. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} შენიშვნა] +password_label=შეიყვანეთ პაროლი PDF-ფაილის გასახსნელად. +password_invalid=არასწორი პაროლი. გთხოვთ, სცადოთ ხელახლა. +password_ok=კარგი +password_cancel=გაუქმება + +printing_not_supported=გაფრთხილება: ამობეჭდვა ამ ბრაუზერში არაა სრულად მხარდაჭერილი. +printing_not_ready=გაფრთხილება: PDF სრულად ჩატვირთული არაა, ამობეჭდვის დასაწყებად. +web_fonts_disabled=ვებშრიფტები გამორთულია: ჩაშენებული PDF-შრიფტების გამოყენება ვერ ხერხდება. +document_colors_not_allowed=PDF-დოკუმენტებს არ აქვს საკუთარი ფერების გამოყენების ნებართვა: ბრაუზერში გამორთულია „გვერდებისთვის საკუთარი ფერების გამოყენების უფლება“. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/kab/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/kab/viewer.properties new file mode 100644 index 0000000..e3d0dc4 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/kab/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Asebter azewwar +previous_label=Azewwar +next.title=Asebter d-iteddun +next_label=Ddu ɣer zdat + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Asebter +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=ɣef {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} n {{pagesCount}}) + +zoom_out.title=Semẓi +zoom_out_label=Semẓi +zoom_in.title=Semɣeṛ +zoom_in_label=Semɣeṛ +zoom.title=Semɣeṛ/Semẓi +presentation_mode.title=Uɣal ɣer Uskar Tihawt +presentation_mode_label=Askar Tihawt +open_file.title=Ldi Afaylu +open_file_label=Ldi +print.title=Siggez +print_label=Siggez +download.title=Sider +download_label=Azdam +bookmark.title=Timeẓri tamirant (nɣel neɣ ldi ɣef usfaylu amaynut) +bookmark_label=Askan amiran + +# Secondary toolbar and context menu +tools.title=Ifecka +tools_label=Ifecka +first_page.title=Ddu ɣer usebter amezwaru +first_page.label=Ddu ɣer usebter amezwaru +first_page_label=Ddu ɣer usebter amezwaru +last_page.title=Ddu ɣer usebter aneggaru +last_page.label=Ddu ɣer usebter aneggaru +last_page_label=Ddu ɣer usebter aneggaru +page_rotate_cw.title=Tuzzya tusrigt +page_rotate_cw.label=Tuzzya tusrigt +page_rotate_cw_label=Tuzzya tusrigt +page_rotate_ccw.title=Tuzzya amgal-usrig +page_rotate_ccw.label=Tuzzya amgal-usrig +page_rotate_ccw_label=Tuzzya amgal-usrig + +cursor_text_select_tool.title=Rmed afecku n tefrant n uḍris +cursor_text_select_tool_label=Afecku n tefrant n uḍris +cursor_hand_tool.title=Rmed afecku afus +cursor_hand_tool_label=Afecku afus + +scroll_vertical.title=Seqdec adrurem ubdid +scroll_vertical_label=Adrurem ubdid +scroll_horizontal.title=Seqdec adrurem aglawan +scroll_horizontal_label=Adrurem aglawan +scroll_wrapped.title=Seqdec adrurem yuẓen +scroll_wrapped_label=Adrurem yuẓen + +spread_none.title=Ur sedday ara isiɣzaf n usebter +spread_none_label=Ulac isiɣzaf +spread_odd.title=Seddu isiɣzaf n usebter ibeddun s yisebtar irayuganen +spread_odd_label=Isiɣzaf irayuganen +spread_even.title=Seddu isiɣzaf n usebter ibeddun s yisebtar iyuganen +spread_even_label=Isiɣzaf iyuganen + +# Document properties dialog box +document_properties.title=Taɣaṛa n isemli… +document_properties_label=Taɣaṛa n isemli… +document_properties_file_name=Isem n ufaylu: +document_properties_file_size=Teɣzi n ufaylu: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KAṬ ({{size_b}} ibiten) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MAṬ ({{size_b}} iṭamḍanen) +document_properties_title=Azwel: +document_properties_author=Ameskar: +document_properties_subject=Amgay: +document_properties_keywords=Awalen n tsaruţ +document_properties_creation_date=Azemz n tmerna: +document_properties_modification_date=Azemz n usnifel: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Yerna-t: +document_properties_producer=Afecku n uselket PDF: +document_properties_version=Lqem PDF: +document_properties_page_count=Amḍan n isebtar: +document_properties_page_size=Tuγzi n usebter: +document_properties_page_size_unit_inches=deg +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=s teɣzi +document_properties_page_size_orientation_landscape=s tehri +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Asekkil +document_properties_page_size_name_legal=Usḍif +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Taskant Web taruradt: +document_properties_linearized_yes=Ih +document_properties_linearized_no=Ala +document_properties_close=Mdel + +print_progress_message=Aheggi i usiggez n isemli… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Sefsex + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Sken/Fer agalis adisan +toggle_sidebar_notification.title=Ffer/Sken agalis adisan (isemli yegber aɣawas/imeddayen) +toggle_sidebar_label=Sken/Fer agalis adisan +document_outline.title=Sken isemli (Senned snat tikal i wesemɣer/Afneẓ n iferdisen meṛṛa) +document_outline_label=Isɣalen n isebtar +attachments.title=Sken ticeqqufin yeddan +attachments_label=Ticeqqufin yeddan +thumbs.title=Sken tanfult. +thumbs_label=Tinfulin +findbar.title=Nadi deg isemli +findbar_label=Nadi + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Asebter {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Asebter {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Tanfult n usebter {{page}} + +# Find panel button title and messages +find_input.title=Nadi +find_input.placeholder=Nadi deg isemli… +find_previous.title=Aff-d tamseḍriwt n twinest n deffir +find_previous_label=Azewwar +find_next.title=Aff-d timseḍriwt n twinest d-iteddun +find_next_label=Ddu ɣer zdat +find_highlight=Err izirig imaṛṛa +find_match_case_label=Qadeṛ amasal n isekkilen +find_entire_word_label=Awalen iččuranen +find_reached_top=Yabbeḍ s afella n usebter, tuɣalin s wadda +find_reached_bottom=Tebḍeḍ s adda n usebter, tuɣalin s afella +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} seg {{total}} n tmeɣṛuḍin +find_match_count[two]={{current}} seg {{total}} n tmeɣṛuḍin +find_match_count[few]={{current}} seg {{total}} n tmeɣṛuḍin +find_match_count[many]={{current}} seg {{total}} n tmeɣṛuḍin +find_match_count[other]={{current}} seg {{total}} n tmeɣṛuḍin +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Ugar n {{limit}} n tmeɣṛuḍin +find_match_count_limit[one]=Ugar n {{limit}} n tmeɣṛuḍin +find_match_count_limit[two]=Ugar n {{limit}} n tmeɣṛuḍin +find_match_count_limit[few]=Ugar n {{limit}} n tmeɣṛuḍin +find_match_count_limit[many]=Ugar n {{limit}} n tmeɣṛuḍin +find_match_count_limit[other]=Ugar n {{limit}} n tmeɣṛuḍin +find_not_found=Ulac tawinest + +# Error panel labels +error_more_info=Ugar n telɣut +error_less_info=Drus n isalen +error_close=Mdel +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Izen: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Tanebdant: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Afaylu: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Izirig: {{line}} +rendering_error=Teḍra-d tuccḍa deg uskan n usebter. + +# Predefined zoom values +page_scale_width=Tehri n usebter +page_scale_fit=Asebter imaṛṛa +page_scale_auto=Asemɣeṛ/Asemẓi awurman +page_scale_actual=Teɣzi tilawt +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=Teḍra-d tuccḍa deg alluy n PDF: +invalid_file_error=Afaylu PDF arameɣtu neɣ yexṣeṛ. +missing_file_error=Ulac afaylu PDF. +unexpected_response_error=Aqeddac yerra-d yir tiririt ur nettwaṛǧi ara. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Tabzimt {{type}}] +password_label=Sekcem awal uffir akken ad ldiḍ afaylu-yagi PDF +password_invalid=Awal uffir mačči d ameɣtu, Ɛreḍ tikelt-nniḍen. +password_ok=IH +password_cancel=Sefsex + +printing_not_supported=Ɣuṛ-k: Asiggez ur ittusefrak ara yakan imaṛṛa deg iminig-a. +printing_not_ready=Ɣuṛ-k: Afaylu PDF ur d-yuli ara imeṛṛa akken ad ittusiggez. +web_fonts_disabled=Tisefsiyin web ttwassensent; D awezɣi useqdec n tsefsiyin yettwarnan ɣer PDF. +document_colors_not_allowed=Isemliyen PDF ur zmiren ara ad sqedcen initen-nsen: 'Sireg isebtar akken ad fernen initen-nsen' ur yermid ara deg iminig. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/kk/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/kk/viewer.properties new file mode 100644 index 0000000..389b854 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/kk/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Алдыңғы парақ +previous_label=Алдыңғысы +next.title=Келесі парақ +next_label=Келесі + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Парақ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} ішінен +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=(парақ {{pageNumber}}, {{pagesCount}} ішінен) + +zoom_out.title=Кішірейту +zoom_out_label=Кішірейту +zoom_in.title=Үлкейту +zoom_in_label=Үлкейту +zoom.title=Масштаб +presentation_mode.title=Презентация режиміне ауысу +presentation_mode_label=Презентация режимі +open_file.title=Файлды ашу +open_file_label=Ашу +print.title=Баспаға шығару +print_label=Баспаға шығару +download.title=Жүктеп алу +download_label=Жүктеп алу +bookmark.title=Ағымдағы көрініс (көшіру не жаңа терезеде ашу) +bookmark_label=Ағымдағы көрініс + +# Secondary toolbar and context menu +tools.title=Құралдар +tools_label=Құралдар +first_page.title=Алғашқы параққа өту +first_page.label=Алғашқы параққа өту +first_page_label=Алғашқы параққа өту +last_page.title=Соңғы параққа өту +last_page.label=Соңғы параққа өту +last_page_label=Соңғы параққа өту +page_rotate_cw.title=Сағат тілі бағытымен айналдыру +page_rotate_cw.label=Сағат тілі бағытымен бұру +page_rotate_cw_label=Сағат тілі бағытымен бұру +page_rotate_ccw.title=Сағат тілі бағытына қарсы бұру +page_rotate_ccw.label=Сағат тілі бағытына қарсы бұру +page_rotate_ccw_label=Сағат тілі бағытына қарсы бұру + +cursor_text_select_tool.title=Мәтінді таңдау құралын іске қосу +cursor_text_select_tool_label=Мәтінді таңдау құралы +cursor_hand_tool.title=Қол құралын іске қосу +cursor_hand_tool_label=Қол құралы + +scroll_vertical.title=Вертикалды айналдыруды қолдану +scroll_vertical_label=Вертикалды айналдыру +scroll_horizontal.title=Горизонталды айналдыруды қолдану +scroll_horizontal_label=Горизонталды айналдыру +scroll_wrapped.title=Масштабталатын айналдыруды қолдану +scroll_wrapped_label=Масштабталатын айналдыру + +spread_none.title=Жазық беттер режимін қолданбау +spread_none_label=Жазық беттер режимсіз +spread_odd.title=Жазық беттер тақ нөмірлі беттерден басталады +spread_odd_label=Тақ нөмірлі беттер сол жақтан +spread_even.title=Жазық беттер жұп нөмірлі беттерден басталады +spread_even_label=Жұп нөмірлі беттер сол жақтан + +# Document properties dialog box +document_properties.title=Құжат қасиеттері… +document_properties_label=Құжат қасиеттері… +document_properties_file_name=Файл аты: +document_properties_file_size=Файл өлшемі: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} КБ ({{size_b}} байт) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} МБ ({{size_b}} байт) +document_properties_title=Тақырыбы: +document_properties_author=Авторы: +document_properties_subject=Тақырыбы: +document_properties_keywords=Кілт сөздер: +document_properties_creation_date=Жасалған күні: +document_properties_modification_date=Түзету күні: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Жасаған: +document_properties_producer=PDF өндірген: +document_properties_version=PDF нұсқасы: +document_properties_page_count=Беттер саны: +document_properties_page_size=Бет өлшемі: +document_properties_page_size_unit_inches=дюйм +document_properties_page_size_unit_millimeters=мм +document_properties_page_size_orientation_portrait=тік +document_properties_page_size_orientation_landscape=жатық +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Жылдам Web көрінісі: +document_properties_linearized_yes=Иә +document_properties_linearized_no=Жоқ +document_properties_close=Жабу + +print_progress_message=Құжатты баспаға шығару үшін дайындау… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Бас тарту + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Бүйір панелін көрсету/жасыру +toggle_sidebar_notification.title=Бүйір панелін көрсету/жасыру (құжатта құрылымы/салынымдар бар) +toggle_sidebar_label=Бүйір панелін көрсету/жасыру +document_outline.title=Құжат құрылымын көрсету (барлық нәрселерді жазық қылу/жинау үшін қос шерту керек) +document_outline_label=Құжат құрамасы +attachments.title=Салынымдарды көрсету +attachments_label=Салынымдар +thumbs.title=Кіші көріністерді көрсету +thumbs_label=Кіші көріністер +findbar.title=Құжаттан табу +findbar_label=Табу + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Бет {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title={{page}} парағы +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}} парағы үшін кіші көрінісі + +# Find panel button title and messages +find_input.title=Табу +find_input.placeholder=Құжаттан табу… +find_previous.title=Осы сөздердің мәтіннен алдыңғы кездесуін табу +find_previous_label=Алдыңғысы +find_next.title=Осы сөздердің мәтіннен келесі кездесуін табу +find_next_label=Келесі +find_highlight=Барлығын түспен ерекшелеу +find_match_case_label=Регистрді ескеру +find_entire_word_label=Сөздер толығымен +find_reached_top=Құжаттың басына жеттік, соңынан бастап жалғастырамыз +find_reached_bottom=Құжаттың соңына жеттік, басынан бастап жалғастырамыз +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} / {{total}} сәйкестік +find_match_count[two]={{current}} / {{total}} сәйкестік +find_match_count[few]={{current}} / {{total}} сәйкестік +find_match_count[many]={{current}} / {{total}} сәйкестік +find_match_count[other]={{current}} / {{total}} сәйкестік +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} сәйкестіктен көп +find_match_count_limit[one]={{limit}} сәйкестіктен көп +find_match_count_limit[two]={{limit}} сәйкестіктен көп +find_match_count_limit[few]={{limit}} сәйкестіктен көп +find_match_count_limit[many]={{limit}} сәйкестіктен көп +find_match_count_limit[other]={{limit}} сәйкестіктен көп +find_not_found=Сөз(дер) табылмады + +# Error panel labels +error_more_info=Көбірек ақпарат +error_less_info=Азырақ ақпарат +error_close=Жабу +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (жинақ: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Хабарлама: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Стек: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Файл: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Жол: {{line}} +rendering_error=Парақты өңдеу кезінде қате кетті. + +# Predefined zoom values +page_scale_width=Парақ ені +page_scale_fit=Парақты сыйдыру +page_scale_auto=Автомасштабтау +page_scale_actual=Нақты өлшемі +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Қате +loading_error=PDF жүктеу кезінде қате кетті. +invalid_file_error=Зақымдалған немесе қате PDF файл. +missing_file_error=PDF файлы жоқ. +unexpected_response_error=Сервердің күтпеген жауабы. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} аңдатпасы] +password_label=Бұл PDF файлын ашу үшін парольді енгізіңіз. +password_invalid=Пароль дұрыс емес. Қайталап көріңіз. +password_ok=ОК +password_cancel=Бас тарту + +printing_not_supported=Ескерту: Баспаға шығаруды бұл браузер толығымен қолдамайды. +printing_not_ready=Ескерту: Баспаға шығару үшін, бұл PDF толығымен жүктеліп алынбады. +web_fonts_disabled=Веб қаріптері сөндірілген: құрамына енгізілген PDF қаріптерін қолдану мүмкін емес. +document_colors_not_allowed=PDF құжаттарына өздік түстерді қолдану рұқсат етілмеген: бұл браузерде 'Веб-сайттарға өздерінің түстерін қолдануға рұқсат беру' мүмкіндігі сөндірулі тұр. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/km/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/km/viewer.properties new file mode 100644 index 0000000..e5403cc --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/km/viewer.properties @@ -0,0 +1,184 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=ទំព័រ​មុន +previous_label=មុន +next.title=ទំព័រ​បន្ទាប់ +next_label=បន្ទាប់ + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=ទំព័រ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=នៃ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} នៃ {{pagesCount}}) + +zoom_out.title=​បង្រួម +zoom_out_label=​បង្រួម +zoom_in.title=​ពង្រីក +zoom_in_label=​ពង្រីក +zoom.title=ពង្រីក +presentation_mode.title=ប្ដូរ​ទៅ​របៀប​បទ​បង្ហាញ +presentation_mode_label=របៀប​បទ​បង្ហាញ +open_file.title=បើក​ឯកសារ +open_file_label=បើក +print.title=បោះពុម្ព +print_label=បោះពុម្ព +download.title=ទាញ​យក +download_label=ទាញ​យក +bookmark.title=ទិដ្ឋភាព​បច្ចុប្បន្ន (ចម្លង ឬ​បើក​នៅ​ក្នុង​បង្អួច​ថ្មី) +bookmark_label=ទិដ្ឋភាព​បច្ចុប្បន្ន + +# Secondary toolbar and context menu +tools.title=ឧបករណ៍ +tools_label=ឧបករណ៍ +first_page.title=ទៅកាន់​ទំព័រ​ដំបូង​ +first_page.label=ទៅកាន់​ទំព័រ​ដំបូង​ +first_page_label=ទៅកាន់​ទំព័រ​ដំបូង​ +last_page.title=ទៅកាន់​ទំព័រ​ចុងក្រោយ​ +last_page.label=ទៅកាន់​ទំព័រ​ចុងក្រោយ​ +last_page_label=ទៅកាន់​ទំព័រ​ចុងក្រោយ +page_rotate_cw.title=បង្វិល​ស្រប​ទ្រនិច​នាឡិកា +page_rotate_cw.label=បង្វិល​ស្រប​ទ្រនិច​នាឡិកា +page_rotate_cw_label=បង្វិល​ស្រប​ទ្រនិច​នាឡិកា +page_rotate_ccw.title=បង្វិល​ច្រាស​ទ្រនិច​នាឡិកា​​ +page_rotate_ccw.label=បង្វិល​ច្រាស​ទ្រនិច​នាឡិកា​​ +page_rotate_ccw_label=បង្វិល​ច្រាស​ទ្រនិច​នាឡិកា​​ + +cursor_text_select_tool.title=បើក​ឧបករណ៍​ជ្រើស​អត្ថបទ +cursor_text_select_tool_label=ឧបករណ៍​ជ្រើស​អត្ថបទ +cursor_hand_tool.title=បើក​ឧបករណ៍​ដៃ +cursor_hand_tool_label=ឧបករណ៍​ដៃ + +# Document properties dialog box +document_properties.title=លក្ខណ​សម្បត្តិ​ឯកសារ… +document_properties_label=លក្ខណ​សម្បត្តិ​ឯកសារ… +document_properties_file_name=ឈ្មោះ​ឯកសារ៖ +document_properties_file_size=ទំហំ​ឯកសារ៖ +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} បៃ) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} បៃ) +document_properties_title=ចំណងជើង៖ +document_properties_author=អ្នក​និពន្ធ៖ +document_properties_subject=ប្រធានបទ៖ +document_properties_keywords=ពាក្យ​គន្លឹះ៖ +document_properties_creation_date=កាលបរិច្ឆេទ​បង្កើត៖ +document_properties_modification_date=កាលបរិច្ឆេទ​កែប្រែ៖ +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=អ្នក​បង្កើត៖ +document_properties_producer=កម្មវិធី​បង្កើត PDF ៖ +document_properties_version=កំណែ PDF ៖ +document_properties_page_count=ចំនួន​ទំព័រ៖ +document_properties_close=បិទ + +print_progress_message=កំពុង​រៀបចំ​ឯកសារ​សម្រាប់​បោះពុម្ព… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=បោះបង់ + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=បិទ/បើក​គ្រាប់​រំកិល +toggle_sidebar_notification.title=បិទ/បើក​របារ​ចំហៀង (ឯកសារ​មាន​មាតិកា​នៅ​ក្រៅ/attachments) +toggle_sidebar_label=បិទ/បើក​គ្រាប់​រំកិល +document_outline.title=បង្ហាញ​គ្រោង​ឯកសារ (ចុច​ទ្វេ​ដង​ដើម្បី​ពង្រីក/បង្រួម​ធាតុ​ទាំងអស់) +document_outline_label=គ្រោង​ឯកសារ +attachments.title=បង្ហាញ​ឯកសារ​ភ្ជាប់ +attachments_label=ឯកសារ​ភ្ជាប់ +thumbs.title=បង្ហាញ​រូបភាព​តូចៗ +thumbs_label=រួបភាព​តូចៗ +findbar.title=រក​នៅ​ក្នុង​ឯកសារ +findbar_label=រក + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=ទំព័រ {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=រូបភាព​តូច​របស់​ទំព័រ {{page}} + +# Find panel button title and messages +find_input.title=រក +find_input.placeholder=រក​នៅ​ក្នុង​ឯកសារ... +find_previous.title=រក​ពាក្យ ឬ​ឃ្លា​ដែល​បាន​ជួប​មុន +find_previous_label=មុន +find_next.title=រក​ពាក្យ ឬ​ឃ្លា​ដែល​បាន​ជួប​បន្ទាប់ +find_next_label=បន្ទាប់ +find_highlight=បន្លិច​ទាំងអស់ +find_match_case_label=ករណី​ដំណូច +find_reached_top=បាន​បន្ត​ពី​ខាង​ក្រោម ទៅ​ដល់​ខាង​​លើ​នៃ​ឯកសារ +find_reached_bottom=បាន​បន្ត​ពី​ខាងលើ ទៅដល់​ចុង​​នៃ​ឯកសារ +find_not_found=រក​មិន​ឃើញ​ពាក្យ ឬ​ឃ្លា + +# Error panel labels +error_more_info=ព័ត៌មាន​បន្ថែម +error_less_info=ព័ត៌មាន​តិចតួច +error_close=បិទ +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=សារ ៖ {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=ជង់ ៖ {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ឯកសារ ៖ {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=ជួរ ៖ {{line}} +rendering_error=មាន​កំហុស​បាន​កើតឡើង​ពេល​បង្ហាញ​ទំព័រ ។ + +# Predefined zoom values +page_scale_width=ទទឹង​ទំព័រ +page_scale_fit=សម​ទំព័រ +page_scale_auto=ពង្រីក​ស្វ័យប្រវត្តិ +page_scale_actual=ទំហំ​ជាក់ស្ដែង +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=កំហុស +loading_error=មាន​កំហុស​បាន​កើតឡើង​ពេល​កំពុង​ផ្ទុក PDF ។ +invalid_file_error=ឯកសារ PDF ខូច ឬ​មិន​ត្រឹមត្រូវ ។ +missing_file_error=បាត់​ឯកសារ PDF +unexpected_response_error=ការ​ឆ្លើយ​តម​ម៉ាស៊ីន​មេ​ដែល​មិន​បាន​រំពឹង។ + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} ចំណារ​ពន្យល់] +password_label=បញ្ចូល​ពាក្យសម្ងាត់​ដើម្បី​បើក​ឯកសារ PDF នេះ។ +password_invalid=ពាក្យសម្ងាត់​មិន​ត្រឹមត្រូវ។ សូម​ព្យាយាម​ម្ដងទៀត។ +password_ok=យល់​ព្រម +password_cancel=បោះបង់ + +printing_not_supported=ការ​ព្រមាន ៖ កា​រ​បោះពុម្ព​មិន​ត្រូវ​បាន​គាំទ្រ​ពេញលេញ​ដោយ​កម្មវិធី​រុករក​នេះ​ទេ ។ +printing_not_ready=ព្រមាន៖ PDF មិន​ត្រូវ​បាន​ផ្ទុក​ទាំងស្រុង​ដើម្បី​បោះពុម្ព​ទេ។ +web_fonts_disabled=បាន​បិទ​ពុម្ពអក្សរ​បណ្ដាញ ៖ មិន​អាច​ប្រើ​ពុម្ពអក្សរ PDF ដែល​បាន​បង្កប់​បាន​ទេ ។ +document_colors_not_allowed=ឯកសារ PDF មិន​ត្រូវ​បាន​អនុញ្ញាត​ឲ្យ​ប្រើ​ពណ៌​ផ្ទាល់​របស់​វា​ទេ៖ 'អនុញ្ញាត​​ឲ្យ​ទំព័រ​ជ្រើស​ពណ៌​ផ្ទាល់​ខ្លួន' ត្រូវ​បាន​ធ្វើ​ឲ្យ​អសកម្ម​ក្នុង​​កម្មវិធី​រុករក។ diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/kn/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/kn/viewer.properties new file mode 100644 index 0000000..cf3d004 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/kn/viewer.properties @@ -0,0 +1,193 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=ಹಿಂದಿನ ಪುಟ +previous_label=ಹಿಂದಿನ +next.title=ಮುಂದಿನ ಪುಟ +next_label=ಮುಂದಿನ + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=ಪುಟ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} ರಲ್ಲಿ +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} ರಲ್ಲಿ {{pageNumber}}) + +zoom_out.title=ಕಿರಿದಾಗಿಸು +zoom_out_label=ಕಿರಿದಾಗಿಸಿ +zoom_in.title=ಹಿರಿದಾಗಿಸು +zoom_in_label=ಹಿರಿದಾಗಿಸಿ +zoom.title=ಗಾತ್ರಬದಲಿಸು +presentation_mode.title=ಪ್ರಸ್ತುತಿ (ಪ್ರಸೆಂಟೇಶನ್) ಕ್ರಮಕ್ಕೆ ಬದಲಾಯಿಸು +presentation_mode_label=ಪ್ರಸ್ತುತಿ (ಪ್ರಸೆಂಟೇಶನ್) ಕ್ರಮ +open_file.title=ಕಡತವನ್ನು ತೆರೆ +open_file_label=ತೆರೆಯಿರಿ +print.title=ಮುದ್ರಿಸು +print_label=ಮುದ್ರಿಸಿ +download.title=ಇಳಿಸು +download_label=ಇಳಿಸಿಕೊಳ್ಳಿ +bookmark.title=ಪ್ರಸಕ್ತ ನೋಟ (ಪ್ರತಿ ಮಾಡು ಅಥವ ಹೊಸ ಕಿಟಕಿಯಲ್ಲಿ ತೆರೆ) +bookmark_label=ಪ್ರಸಕ್ತ ನೋಟ + +# Secondary toolbar and context menu +tools.title=ಉಪಕರಣಗಳು +tools_label=ಉಪಕರಣಗಳು +first_page.title=ಮೊದಲ ಪುಟಕ್ಕೆ ತೆರಳು +first_page.label=ಮೊದಲ ಪುಟಕ್ಕೆ ತೆರಳು +first_page_label=ಮೊದಲ ಪುಟಕ್ಕೆ ತೆರಳು +last_page.title=ಕೊನೆಯ ಪುಟಕ್ಕೆ ತೆರಳು +last_page.label=ಕೊನೆಯ ಪುಟಕ್ಕೆ ತೆರಳು +last_page_label=ಕೊನೆಯ ಪುಟಕ್ಕೆ ತೆರಳು +page_rotate_cw.title=ಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು +page_rotate_cw.label=ಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು +page_rotate_cw_label=ಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು +page_rotate_ccw.title=ಅಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು +page_rotate_ccw.label=ಅಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು +page_rotate_ccw_label=ಅಪ್ರದಕ್ಷಿಣೆಯಲ್ಲಿ ತಿರುಗಿಸು + +cursor_text_select_tool.title=ಪಠ್ಯ ಆಯ್ಕೆ ಉಪಕರಣವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ +cursor_text_select_tool_label=ಪಠ್ಯ ಆಯ್ಕೆಯ ಉಪಕರಣ +cursor_hand_tool.title=ಕೈ ಉಪಕರಣವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ +cursor_hand_tool_label=ಕೈ ಉಪಕರಣ + + + +# Document properties dialog box +document_properties.title=ಡಾಕ್ಯುಮೆಂಟ್‌ ಗುಣಗಳು... +document_properties_label=ಡಾಕ್ಯುಮೆಂಟ್‌ ಗುಣಗಳು... +document_properties_file_name=ಕಡತದ ಹೆಸರು: +document_properties_file_size=ಕಡತದ ಗಾತ್ರ: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} ಬೈಟ್‍ಗಳು) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} ಬೈಟ್‍ಗಳು) +document_properties_title=ಶೀರ್ಷಿಕೆ: +document_properties_author=ಕರ್ತೃ: +document_properties_subject=ವಿಷಯ: +document_properties_keywords=ಮುಖ್ಯಪದಗಳು: +document_properties_creation_date=ರಚಿಸಿದ ದಿನಾಂಕ: +document_properties_modification_date=ಮಾರ್ಪಡಿಸಲಾದ ದಿನಾಂಕ: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=ರಚಿಸಿದವರು: +document_properties_producer=PDF ಉತ್ಪಾದಕ: +document_properties_version=PDF ಆವೃತ್ತಿ: +document_properties_page_count=ಪುಟದ ಎಣಿಕೆ: +document_properties_page_size_unit_inches=ಇದರಲ್ಲಿ +document_properties_page_size_orientation_portrait=ಭಾವಚಿತ್ರ +document_properties_page_size_orientation_landscape=ಪ್ರಕೃತಿ ಚಿತ್ರ +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_close=ಮುಚ್ಚು + +print_progress_message=ಮುದ್ರಿಸುವುದಕ್ಕಾಗಿ ದಸ್ತಾವೇಜನ್ನು ಸಿದ್ಧಗೊಳಿಸಲಾಗುತ್ತಿದೆ… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ರದ್ದು ಮಾಡು + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=ಬದಿಪಟ್ಟಿಯನ್ನು ಹೊರಳಿಸು +toggle_sidebar_label=ಬದಿಪಟ್ಟಿಯನ್ನು ಹೊರಳಿಸು +document_outline_label=ದಸ್ತಾವೇಜಿನ ಹೊರರೇಖೆ +attachments.title=ಲಗತ್ತುಗಳನ್ನು ತೋರಿಸು +attachments_label=ಲಗತ್ತುಗಳು +thumbs.title=ಚಿಕ್ಕಚಿತ್ರದಂತೆ ತೋರಿಸು +thumbs_label=ಚಿಕ್ಕಚಿತ್ರಗಳು +findbar.title=ದಸ್ತಾವೇಜಿನಲ್ಲಿ ಹುಡುಕು +findbar_label=ಹುಡುಕು + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=ಪುಟ {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=ಪುಟವನ್ನು ಚಿಕ್ಕಚಿತ್ರದಂತೆ ತೋರಿಸು {{page}} + +# Find panel button title and messages +find_input.title=ಹುಡುಕು +find_input.placeholder=ದಸ್ತಾವೇಜಿನಲ್ಲಿ ಹುಡುಕು… +find_previous.title=ವಾಕ್ಯದ ಹಿಂದಿನ ಇರುವಿಕೆಯನ್ನು ಹುಡುಕು +find_previous_label=ಹಿಂದಿನ +find_next.title=ವಾಕ್ಯದ ಮುಂದಿನ ಇರುವಿಕೆಯನ್ನು ಹುಡುಕು +find_next_label=ಮುಂದಿನ +find_highlight=ಎಲ್ಲವನ್ನು ಹೈಲೈಟ್ ಮಾಡು +find_match_case_label=ಕೇಸನ್ನು ಹೊಂದಿಸು +find_reached_top=ದಸ್ತಾವೇಜಿನ ಮೇಲ್ಭಾಗವನ್ನು ತಲುಪಿದೆ, ಕೆಳಗಿನಿಂದ ಆರಂಭಿಸು +find_reached_bottom=ದಸ್ತಾವೇಜಿನ ಕೊನೆಯನ್ನು ತಲುಪಿದೆ, ಮೇಲಿನಿಂದ ಆರಂಭಿಸು +find_not_found=ವಾಕ್ಯವು ಕಂಡು ಬಂದಿಲ್ಲ + +# Error panel labels +error_more_info=ಹೆಚ್ಚಿನ ಮಾಹಿತಿ +error_less_info=ಕಡಿಮೆ ಮಾಹಿತಿ +error_close=ಮುಚ್ಚು +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=ಸಂದೇಶ: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=ರಾಶಿ: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ಕಡತ: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=ಸಾಲು: {{line}} +rendering_error=ಪುಟವನ್ನು ನಿರೂಪಿಸುವಾಗ ಒಂದು ದೋಷ ಎದುರಾಗಿದೆ. + +# Predefined zoom values +page_scale_width=ಪುಟದ ಅಗಲ +page_scale_fit=ಪುಟದ ಸರಿಹೊಂದಿಕೆ +page_scale_auto=ಸ್ವಯಂಚಾಲಿತ ಗಾತ್ರಬದಲಾವಣೆ +page_scale_actual=ನಿಜವಾದ ಗಾತ್ರ +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=ದೋಷ +loading_error=PDF ಅನ್ನು ಲೋಡ್ ಮಾಡುವಾಗ ಒಂದು ದೋಷ ಎದುರಾಗಿದೆ. +invalid_file_error=ಅಮಾನ್ಯವಾದ ಅಥವ ಹಾಳಾದ PDF ಕಡತ. +missing_file_error=PDF ಕಡತ ಇಲ್ಲ. +unexpected_response_error=ಅನಿರೀಕ್ಷಿತವಾದ ಪೂರೈಕೆಗಣಕದ ಪ್ರತಿಕ್ರಿಯೆ. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} ಟಿಪ್ಪಣಿ] +password_label=PDF ಅನ್ನು ತೆರೆಯಲು ಗುಪ್ತಪದವನ್ನು ನಮೂದಿಸಿ. +password_invalid=ಅಮಾನ್ಯವಾದ ಗುಪ್ತಪದ, ದಯವಿಟ್ಟು ಇನ್ನೊಮ್ಮೆ ಪ್ರಯತ್ನಿಸಿ. +password_ok=OK +password_cancel=ರದ್ದು ಮಾಡು + +printing_not_supported=ಎಚ್ಚರಿಕೆ: ಈ ಜಾಲವೀಕ್ಷಕದಲ್ಲಿ ಮುದ್ರಣಕ್ಕೆ ಸಂಪೂರ್ಣ ಬೆಂಬಲವಿಲ್ಲ. +printing_not_ready=ಎಚ್ಚರಿಕೆ: PDF ಕಡತವು ಮುದ್ರಿಸಲು ಸಂಪೂರ್ಣವಾಗಿ ಲೋಡ್ ಆಗಿಲ್ಲ. +web_fonts_disabled=ಜಾಲ ಅಕ್ಷರಶೈಲಿಯನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ: ಅಡಕಗೊಳಿಸಿದ PDF ಅಕ್ಷರಶೈಲಿಗಳನ್ನು ಬಳಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ. +document_colors_not_allowed=PDF ದಸ್ತಾವೇಜುಗಳು ತಮ್ಮದೆ ಆದ ಬಣ್ಣಗಳನ್ನು ಬಳಸಲು ಅನುಮತಿ ಇರುವುದಿಲ್ಲ: 'ಪುಟಗಳು ತಮ್ಮದೆ ಆದ ಬಣ್ಣವನ್ನು ಆಯ್ಕೆ ಮಾಡಲು ಅನುಮತಿಸು' ಅನ್ನು ಜಾಲವೀಕ್ಷಕದಲ್ಲಿ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿರುತ್ತದೆ. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ko/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ko/viewer.properties new file mode 100644 index 0000000..ef688a9 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ko/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=이전 페이지 +previous_label=이전 +next.title=다음 페이지 +next_label=다음 + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=페이지 +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) + +zoom_out.title=축소 +zoom_out_label=축소 +zoom_in.title=확대 +zoom_in_label=확대 +zoom.title=확대/축소 +presentation_mode.title=프레젠테이션 모드로 전환 +presentation_mode_label=프레젠테이션 모드 +open_file.title=파일 열기 +open_file_label=열기 +print.title=인쇄 +print_label=인쇄 +download.title=다운로드 +download_label=다운로드 +bookmark.title=현재 뷰 (복사하거나 새 창에 열기) +bookmark_label=현재 뷰 + +# Secondary toolbar and context menu +tools.title=도구 +tools_label=도구 +first_page.title=첫 페이지로 이동 +first_page.label=첫 페이지로 이동 +first_page_label=첫 페이지로 이동 +last_page.title=마지막 페이지로 이동 +last_page.label=마지막 페이지로 이동 +last_page_label=마지막 페이지로 이동 +page_rotate_cw.title=시계방향으로 회전 +page_rotate_cw.label=시계방향으로 회전 +page_rotate_cw_label=시계방향으로 회전 +page_rotate_ccw.title=시계 반대방향으로 회전 +page_rotate_ccw.label=시계 반대방향으로 회전 +page_rotate_ccw_label=시계 반대방향으로 회전 + +cursor_text_select_tool.title=텍스트 선택 도구 활성화 +cursor_text_select_tool_label=텍스트 선택 도구 +cursor_hand_tool.title=손 도구 활성화 +cursor_hand_tool_label=손 도구 + +scroll_vertical.title=세로 스크롤 사용 +scroll_vertical_label=세로 스크롤 +scroll_horizontal.title=가로 스크롤 사용 +scroll_horizontal_label=가로 스크롤 +scroll_wrapped.title=감싼 스크롤 사용 +scroll_wrapped_label=감싼 스크롤 + +spread_none.title=펼쳐진 페이지를 합치지 않음 +spread_none_label=펼쳐짐 없음 +spread_odd.title=홀수 페이지로 시작하게 펼쳐진 페이지 합침 +spread_odd_label=홀수 펼쳐짐 +spread_even.title=짝수 페이지로 시작하게 펼쳐진 페이지 합침 +spread_even_label=짝수 펼쳐짐 + +# Document properties dialog box +document_properties.title=문서 속성… +document_properties_label=문서 속성… +document_properties_file_name=파일 이름: +document_properties_file_size=파일 크기: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}}바이트) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}}바이트) +document_properties_title=제목: +document_properties_author=작성자: +document_properties_subject=주제: +document_properties_keywords=키워드: +document_properties_creation_date=작성 날짜: +document_properties_modification_date=수정 날짜: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=작성 프로그램: +document_properties_producer=PDF 변환 소프트웨어: +document_properties_version=PDF 버전: +document_properties_page_count=페이지 수: +document_properties_page_size=페이지 크기: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=세로 방향 +document_properties_page_size_orientation_landscape=가로 방향 +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=레터 +document_properties_page_size_name_legal=리걸 +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=빠른 웹 보기: +document_properties_linearized_yes=예 +document_properties_linearized_no=아니오 +document_properties_close=닫기 + +print_progress_message=인쇄 문서 준비 중… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=취소 + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=탐색창 표시/숨기기 +toggle_sidebar_notification.title=탐색창 표시/숨기기 (문서에 아웃라인/첨부파일 포함) +toggle_sidebar_label=탐색창 표시/숨기기 +document_outline.title=문서 아웃라인 보기(더블 클릭해서 모든 항목 펼치기/접기) +document_outline_label=문서 아웃라인 +attachments.title=첨부파일 보기 +attachments_label=첨부파일 +thumbs.title=미리보기 +thumbs_label=미리보기 +findbar.title=검색 +findbar_label=검색 + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas={{page}} 페이지 +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title={{page}} 페이지 +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}} 페이지 미리보기 + +# Find panel button title and messages +find_input.title=찾기 +find_input.placeholder=문서에서 찾기… +find_previous.title=지정 문자열에 일치하는 1개 부분을 검색 +find_previous_label=이전 +find_next.title=지정 문자열에 일치하는 다음 부분을 검색 +find_next_label=다음 +find_highlight=모두 강조 표시 +find_match_case_label=대/소문자 구분 +find_entire_word_label=단어 단위로 +find_reached_top=문서 처음까지 검색하고 끝으로 돌아와 검색했습니다. +find_reached_bottom=문서 끝까지 검색하고 앞으로 돌아와 검색했습니다. +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{total}} 중 {{current}} 일치 +find_match_count[two]={{total}} 중 {{current}} 일치 +find_match_count[few]={{total}} 중 {{current}} 일치 +find_match_count[many]={{total}} 중 {{current}} 일치 +find_match_count[other]={{total}} 중 {{current}} 일치 +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} 이상 일치 +find_match_count_limit[one]={{limit}} 이상 일치 +find_match_count_limit[two]={{limit}} 이상 일치 +find_match_count_limit[few]={{limit}} 이상 일치 +find_match_count_limit[many]={{limit}} 이상 일치 +find_match_count_limit[other]={{limit}} 이상 일치 +find_not_found=검색 결과 없음 + +# Error panel labels +error_more_info=정보 더 보기 +error_less_info=정보 간단히 보기 +error_close=닫기 +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (빌드: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=메시지: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=스택: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=파일: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=줄 번호: {{line}} +rendering_error=페이지를 렌더링하는 동안 오류가 발생했습니다. + +# Predefined zoom values +page_scale_width=페이지 너비에 맞춤 +page_scale_fit=페이지에 맞춤 +page_scale_auto=자동 맞춤 +page_scale_actual=실제 크기에 맞춤 +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=오류 +loading_error=PDF를 로드하는 동안 오류가 발생했습니다. +invalid_file_error=잘못되었거나 손상된 PDF 파일. +missing_file_error=PDF 파일 없음. +unexpected_response_error=예상치 못한 서버 응답입니다. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} 주석] +password_label=이 PDF 파일을 열 수 있는 비밀번호를 입력하세요. +password_invalid=잘못된 비밀번호입니다. 다시 시도하세요. +password_ok=확인 +password_cancel=취소 + +printing_not_supported=경고: 이 브라우저는 인쇄를 완전히 지원하지 않습니다. +printing_not_ready=경고: 이 PDF를 인쇄를 할 수 있을 정도로 읽어들이지 못했습니다. +web_fonts_disabled=웹 폰트가 비활성화됨: 내장된 PDF 글꼴을 사용할 수 없습니다. +document_colors_not_allowed=PDF 문서의 자체 색상 허용 안됨: “페이지 자체 색상 허용”이 브라우저에서 비활성화 되어 있습니다. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/lij/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/lij/viewer.properties new file mode 100644 index 0000000..71a5306 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/lij/viewer.properties @@ -0,0 +1,242 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pagina primma +previous_label=Precedente +next.title=Pagina dòppo +next_label=Pròscima + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Diminoisci zoom +zoom_out_label=Diminoisci zoom +zoom_in.title=Aomenta zoom +zoom_in_label=Aomenta zoom +zoom.title=Zoom +presentation_mode.title=Vanni into mòddo de prezentaçion +presentation_mode_label=Mòddo de prezentaçion +open_file.title=Arvi file +open_file_label=Arvi +print.title=Stanpa +print_label=Stanpa +download.title=Descaregamento +download_label=Descaregamento +bookmark.title=Vixon corente (còpia ò arvi inte 'n neuvo barcon) +bookmark_label=Vixon corente + +# Secondary toolbar and context menu +tools.title=Atressi +tools_label=Atressi +first_page.title=Vanni a-a primma pagina +first_page.label=Vanni a-a primma pagina +first_page_label=Vanni a-a primma pagina +last_page.title=Vanni a l'urtima pagina +last_page.label=Vanni a l'urtima pagina +last_page_label=Vanni a l'urtima pagina +page_rotate_cw.title=Gia into verso oraio +page_rotate_cw.label=Gia in senso do releuio +page_rotate_cw_label=Gia into verso oraio +page_rotate_ccw.title=Gia into verso antioraio +page_rotate_ccw.label=Gia in senso do releuio a-a reversa +page_rotate_ccw_label=Gia into verso antioraio + +cursor_text_select_tool.title=Abilita strumento de seleçion do testo +cursor_text_select_tool_label=Strumento de seleçion do testo +cursor_hand_tool.title=Abilita strumento man +cursor_hand_tool_label=Strumento man + +scroll_vertical.title=Deuvia rebelamento verticale +scroll_vertical_label=Rebelamento verticale +scroll_horizontal.title=Deuvia rebelamento orizontâ +scroll_horizontal_label=Rebelamento orizontâ +scroll_wrapped.title=Deuvia rebelamento incapsolou +scroll_wrapped_label=Rebelamento incapsolou + +spread_none.title=No unite a-a difuxon de pagina +spread_none_label=No difuxon +spread_odd.title=Uniscite a-a difuxon de pagina co-o numero dèspa +spread_odd_label=Difuxon dèspa +spread_even.title=Uniscite a-a difuxon de pagina co-o numero pari +spread_even_label=Difuxon pari + +# Document properties dialog box +document_properties.title=Propietæ do documento… +document_properties_label=Propietæ do documento… +document_properties_file_name=Nomme schedaio: +document_properties_file_size=Dimenscion schedaio: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} kB ({{size_b}} byte) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} byte) +document_properties_title=Titolo: +document_properties_author=Aoto: +document_properties_subject=Ogetto: +document_properties_keywords=Paròlle ciave: +document_properties_creation_date=Dæta creaçion: +document_properties_modification_date=Dæta cangiamento: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Aotô originale: +document_properties_producer=Produtô PDF: +document_properties_version=Verscion PDF: +document_properties_page_count=Contezzo pagine: +document_properties_page_size=Dimenscion da pagina: +document_properties_page_size_unit_inches=dii gròsci +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=drito +document_properties_page_size_orientation_landscape=desteizo +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letia +document_properties_page_size_name_legal=Lezze +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vista veloce do Web: +document_properties_linearized_yes=Sci +document_properties_linearized_no=No +document_properties_close=Særa + +print_progress_message=Praparo o documento pe-a stanpa… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Anulla + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Ativa/dizativa bara de scianco +toggle_sidebar_notification.title=Cangia bara de löo (o documento o contegne di alegæ) +toggle_sidebar_label=Ativa/dizativa bara de scianco +document_outline.title=Fanni vedde o contorno do documento (scicca doggio pe espande/ridue tutti i elementi) +document_outline_label=Contorno do documento +attachments.title=Fanni vedde alegæ +attachments_label=Alegæ +thumbs.title=Mostra miniatue +thumbs_label=Miniatue +findbar.title=Treuva into documento +findbar_label=Treuva + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pagina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatua da pagina {{page}} + +# Find panel button title and messages +find_input.title=Treuva +find_input.placeholder=Treuva into documento… +find_previous.title=Treuva a ripetiçion precedente do testo da çercâ +find_previous_label=Precedente +find_next.title=Treuva a ripetiçion dòppo do testo da çercâ +find_next_label=Segoente +find_highlight=Evidençia +find_match_case_label=Maioscole/minoscole +find_entire_word_label=Poula intrega +find_reached_top=Razonto a fin da pagina, continoa da l'iniçio +find_reached_bottom=Razonto l'iniçio da pagina, continoa da-a fin +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} de {{total}} corispondensa +find_match_count[two]={{current}} de {{total}} corispondense +find_match_count[few]={{current}} de {{total}} corispondense +find_match_count[many]={{current}} de {{total}} corispondense +find_match_count[other]={{current}} de {{total}} corispondense +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Ciù de {{limit}} corispondense +find_match_count_limit[one]=Ciù de {{limit}} corispondensa +find_match_count_limit[two]=Ciù de {{limit}} corispondense +find_match_count_limit[few]=Ciù de {{limit}} corispondense +find_match_count_limit[many]=Ciù de {{limit}} corispondense +find_match_count_limit[other]=Ciù de {{limit}} corispondense +find_not_found=Testo no trovou + +# Error panel labels +error_more_info=Ciù informaçioin +error_less_info=Meno informaçioin +error_close=Særa +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mesaggio: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Schedaio: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linia: {{line}} +rendering_error=Gh'é stæto 'n'erô itno rendering da pagina. + +# Predefined zoom values +page_scale_width=Larghessa pagina +page_scale_fit=Adatta a una pagina +page_scale_auto=Zoom aotomatico +page_scale_actual=Dimenscioin efetive +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Erô +loading_error=S'é verificou 'n'erô itno caregamento do PDF. +invalid_file_error=O schedaio PDF o l'é no valido ò aroinou. +missing_file_error=O schedaio PDF o no gh'é. +unexpected_response_error=Risposta inprevista do-u server + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotaçion: {{type}}] +password_label=Dimme a paròlla segreta pe arvî sto schedaio PDF. +password_invalid=Paròlla segreta sbalia. Preuva torna. +password_ok=Va ben +password_cancel=Anulla + +printing_not_supported=Atençion: a stanpa a no l'é conpletamente soportâ da sto navegatô. +printing_not_ready=Atençion: o PDF o no l'é ancon caregou conpletamente pe-a stanpa. +web_fonts_disabled=I font do web en dizativæ: inposcibile adeuviâ i carateri do PDF. +document_colors_not_allowed=No l'é poscibile adeuviâ i pròpi coî pe-i documenti PDF: l'opçion do navegatô “Permetti a-e pagine de çerne i pròpi coî in cangio de quelli inpostæ” a l'é dizativâ. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/lo/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/lo/viewer.properties new file mode 100644 index 0000000..00d3309 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/lo/viewer.properties @@ -0,0 +1,152 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=ຫນ້າກ່ອນຫນ້າ +previous_label=ກ່ອນຫນ້າ +next.title=ຫນ້າຖັດໄປ +next_label=ຖັດໄປ + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=ຫນ້າ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=ຈາກ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} ຈາກ {{pagesCount}}) + +zoom_out.title=ຂະຫຍາຍອອກ +zoom_out_label=ຂະຫຍາຍອອກ +zoom_in.title=ຂະຫຍາຍເຂົ້າ +zoom_in_label=ຂະຫຍາຍເຂົ້າ +zoom.title=ຂະຫຍາຍ +presentation_mode.title=ສັບປ່ຽນເປັນໂຫມດການນຳສະເຫນີ +presentation_mode_label=ໂຫມດການນຳສະເຫນີ +open_file.title=ເປີດໄຟລ໌ +open_file_label=ເປີດ +print.title=ພິມ +print_label=ພິມ +download.title=ດາວໂຫລດ +download_label=ດາວໂຫລດ +bookmark.title=ມຸມມອງປະຈຸບັນ (ສຳເນົາ ຫລື ເປີດໃນວິນໂດໃຫມ່) +bookmark_label=ມຸມມອງປະຈຸບັນ + +# Secondary toolbar and context menu +tools.title=ເຄື່ອງມື +tools_label=ເຄື່ອງມື +first_page.title=ໄປທີ່ຫນ້າທຳອິດ +first_page.label=ໄປທີ່ຫນ້າທຳອິດ +first_page_label=ໄປທີ່ຫນ້າທຳອິດ +last_page.title=ໄປທີ່ຫນ້າສຸດທ້າຍ +last_page.label=ໄປທີ່ຫນ້າສຸດທ້າຍ +last_page_label=ໄປທີ່ຫນ້າສຸດທ້າຍ +page_rotate_cw.title=ຫມູນຕາມເຂັມໂມງ +page_rotate_cw.label=ຫມູນຕາມເຂັມໂມງ +page_rotate_cw_label=ຫມູນຕາມເຂັມໂມງ +page_rotate_ccw.title=ຫມູນທວນເຂັມໂມງ +page_rotate_ccw.label=ຫມູນທວນເຂັມໂມງ +page_rotate_ccw_label=ຫມູນທວນເຂັມໂມງ + + + + +# Document properties dialog box +document_properties_file_name=ຊື່ໄຟລ໌: +document_properties_file_size=ຂະຫນາດໄຟລ໌: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=ລວງຕັ້ງ +document_properties_page_size_orientation_landscape=ລວງນອນ +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=ຈົດໝາຍ +document_properties_page_size_name_legal=ຂໍ້ກົດຫມາຍ +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_close=ປິດ + +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_close=ຍົກເລີກ + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=ເປີດ/ປິດແຖບຂ້າງ +toggle_sidebar_notification.title=ເປີດ/ປິດແຖບຂ້າງ (ເອກະສານມີເຄົ້າຮ່າງ/ໄຟລ໌ແນບ) +toggle_sidebar_label=ເປີດ/ປິດແຖບຂ້າງ +document_outline_label=ເຄົ້າຮ່າງເອກະສານ +findbar_label=ຄົ້ນຫາ + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. + +# Find panel button title and messages +find_input.title=ຄົ້ນຫາ +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. + +# Error panel labels +error_more_info=ຂໍ້ມູນເພີ່ມເຕີມ +error_less_info=ຂໍ້ມູນນ້ອຍລົງ +error_close=ປິດ +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +rendering_error=ມີຂໍ້ຜິດພາດເກີດຂື້ນຂະນະທີ່ກຳລັງເຣັນເດີຫນ້າ. + +# Predefined zoom values +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. + +# Loading indicator messages +loading_error_indicator=ຂໍ້ຜິດພາດ +loading_error=ມີຂໍ້ຜິດພາດເກີດຂື້ນຂະນະທີ່ກຳລັງໂຫລດ PDF. +invalid_file_error=ໄຟລ໌ PDF ບໍ່ຖືກຕ້ອງຫລືເສຍຫາຍ. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +password_ok=ຕົກລົງ +password_cancel=ຍົກເລີກ + diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/locale.properties b/src/main/resources/static/plugins/pdfjs/web/locale/locale.properties new file mode 100644 index 0000000..411c198 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/locale.properties @@ -0,0 +1,309 @@ +[ach] +@import url(ach/viewer.properties) + +[af] +@import url(af/viewer.properties) + +[an] +@import url(an/viewer.properties) + +[ar] +@import url(ar/viewer.properties) + +[ast] +@import url(ast/viewer.properties) + +[az] +@import url(az/viewer.properties) + +[be] +@import url(be/viewer.properties) + +[bg] +@import url(bg/viewer.properties) + +[bn] +@import url(bn/viewer.properties) + +[bo] +@import url(bo/viewer.properties) + +[br] +@import url(br/viewer.properties) + +[brx] +@import url(brx/viewer.properties) + +[bs] +@import url(bs/viewer.properties) + +[ca] +@import url(ca/viewer.properties) + +[cak] +@import url(cak/viewer.properties) + +[cs] +@import url(cs/viewer.properties) + +[cy] +@import url(cy/viewer.properties) + +[da] +@import url(da/viewer.properties) + +[de] +@import url(de/viewer.properties) + +[dsb] +@import url(dsb/viewer.properties) + +[el] +@import url(el/viewer.properties) + +[en-CA] +@import url(en-CA/viewer.properties) + +[en-GB] +@import url(en-GB/viewer.properties) + +[en-US] +@import url(en-US/viewer.properties) + +[eo] +@import url(eo/viewer.properties) + +[es-AR] +@import url(es-AR/viewer.properties) + +[es-CL] +@import url(es-CL/viewer.properties) + +[es-ES] +@import url(es-ES/viewer.properties) + +[es-MX] +@import url(es-MX/viewer.properties) + +[et] +@import url(et/viewer.properties) + +[eu] +@import url(eu/viewer.properties) + +[fa] +@import url(fa/viewer.properties) + +[ff] +@import url(ff/viewer.properties) + +[fi] +@import url(fi/viewer.properties) + +[fr] +@import url(fr/viewer.properties) + +[fy-NL] +@import url(fy-NL/viewer.properties) + +[ga-IE] +@import url(ga-IE/viewer.properties) + +[gd] +@import url(gd/viewer.properties) + +[gl] +@import url(gl/viewer.properties) + +[gn] +@import url(gn/viewer.properties) + +[gu-IN] +@import url(gu-IN/viewer.properties) + +[he] +@import url(he/viewer.properties) + +[hi-IN] +@import url(hi-IN/viewer.properties) + +[hr] +@import url(hr/viewer.properties) + +[hsb] +@import url(hsb/viewer.properties) + +[hu] +@import url(hu/viewer.properties) + +[hy-AM] +@import url(hy-AM/viewer.properties) + +[hye] +@import url(hye/viewer.properties) + +[ia] +@import url(ia/viewer.properties) + +[id] +@import url(id/viewer.properties) + +[is] +@import url(is/viewer.properties) + +[it] +@import url(it/viewer.properties) + +[ja] +@import url(ja/viewer.properties) + +[ka] +@import url(ka/viewer.properties) + +[kab] +@import url(kab/viewer.properties) + +[kk] +@import url(kk/viewer.properties) + +[km] +@import url(km/viewer.properties) + +[kn] +@import url(kn/viewer.properties) + +[ko] +@import url(ko/viewer.properties) + +[lij] +@import url(lij/viewer.properties) + +[lo] +@import url(lo/viewer.properties) + +[lt] +@import url(lt/viewer.properties) + +[ltg] +@import url(ltg/viewer.properties) + +[lv] +@import url(lv/viewer.properties) + +[meh] +@import url(meh/viewer.properties) + +[mk] +@import url(mk/viewer.properties) + +[mr] +@import url(mr/viewer.properties) + +[ms] +@import url(ms/viewer.properties) + +[my] +@import url(my/viewer.properties) + +[nb-NO] +@import url(nb-NO/viewer.properties) + +[ne-NP] +@import url(ne-NP/viewer.properties) + +[nl] +@import url(nl/viewer.properties) + +[nn-NO] +@import url(nn-NO/viewer.properties) + +[oc] +@import url(oc/viewer.properties) + +[pa-IN] +@import url(pa-IN/viewer.properties) + +[pl] +@import url(pl/viewer.properties) + +[pt-BR] +@import url(pt-BR/viewer.properties) + +[pt-PT] +@import url(pt-PT/viewer.properties) + +[rm] +@import url(rm/viewer.properties) + +[ro] +@import url(ro/viewer.properties) + +[ru] +@import url(ru/viewer.properties) + +[scn] +@import url(scn/viewer.properties) + +[si] +@import url(si/viewer.properties) + +[sk] +@import url(sk/viewer.properties) + +[sl] +@import url(sl/viewer.properties) + +[son] +@import url(son/viewer.properties) + +[sq] +@import url(sq/viewer.properties) + +[sr] +@import url(sr/viewer.properties) + +[sv-SE] +@import url(sv-SE/viewer.properties) + +[ta] +@import url(ta/viewer.properties) + +[te] +@import url(te/viewer.properties) + +[th] +@import url(th/viewer.properties) + +[tl] +@import url(tl/viewer.properties) + +[tr] +@import url(tr/viewer.properties) + +[trs] +@import url(trs/viewer.properties) + +[uk] +@import url(uk/viewer.properties) + +[ur] +@import url(ur/viewer.properties) + +[uz] +@import url(uz/viewer.properties) + +[vi] +@import url(vi/viewer.properties) + +[wo] +@import url(wo/viewer.properties) + +[xh] +@import url(xh/viewer.properties) + +[zh-CN] +@import url(zh-CN/viewer.properties) + +[zh-TW] +@import url(zh-TW/viewer.properties) + diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/lt/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/lt/viewer.properties new file mode 100644 index 0000000..dbdc821 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/lt/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Ankstesnis puslapis +previous_label=Ankstesnis +next.title=Kitas puslapis +next_label=Kitas + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Puslapis +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=iš {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} iš {{pagesCount}}) + +zoom_out.title=Sumažinti +zoom_out_label=Sumažinti +zoom_in.title=Padidinti +zoom_in_label=Padidinti +zoom.title=Mastelis +presentation_mode.title=Pereiti į pateikties veikseną +presentation_mode_label=Pateikties veiksena +open_file.title=Atverti failą +open_file_label=Atverti +print.title=Spausdinti +print_label=Spausdinti +download.title=Parsiųsti +download_label=Parsiųsti +bookmark.title=Esamojo rodinio saitas (kopijavimui ar atvėrimui kitame lange) +bookmark_label=Esamasis rodinys + +# Secondary toolbar and context menu +tools.title=Priemonės +tools_label=Priemonės +first_page.title=Eiti į pirmą puslapį +first_page.label=Eiti į pirmą puslapį +first_page_label=Eiti į pirmą puslapį +last_page.title=Eiti į paskutinį puslapį +last_page.label=Eiti į paskutinį puslapį +last_page_label=Eiti į paskutinį puslapį +page_rotate_cw.title=Pasukti pagal laikrodžio rodyklę +page_rotate_cw.label=Pasukti pagal laikrodžio rodyklę +page_rotate_cw_label=Pasukti pagal laikrodžio rodyklę +page_rotate_ccw.title=Pasukti prieš laikrodžio rodyklę +page_rotate_ccw.label=Pasukti prieš laikrodžio rodyklę +page_rotate_ccw_label=Pasukti prieš laikrodžio rodyklę + +cursor_text_select_tool.title=Įjungti teksto žymėjimo įrankį +cursor_text_select_tool_label=Teksto žymėjimo įrankis +cursor_hand_tool.title=Įjungti vilkimo įrankį +cursor_hand_tool_label=Vilkimo įrankis + +scroll_vertical.title=Naudoti vertikalų slinkimą +scroll_vertical_label=Vertikalus slinkimas +scroll_horizontal.title=Naudoti horizontalų slinkimą +scroll_horizontal_label=Horizontalus slinkimas +scroll_wrapped.title=Naudoti išklotą slinkimą +scroll_wrapped_label=Išklotas slinkimas + +spread_none.title=Nesujungti puslapių sklaidų +spread_none_label=Be sklaidų +spread_odd.title=Sujungti puslapių sklaidas pradedant nelyginiais puslapiais +spread_odd_label=Nelyginės sklaidos +spread_even.title=Sujungti puslapių sklaidas pradedant lyginiais puslapiais +spread_even_label=Lyginės sklaidos + +# Document properties dialog box +document_properties.title=Dokumento savybės… +document_properties_label=Dokumento savybės… +document_properties_file_name=Failo vardas: +document_properties_file_size=Failo dydis: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} B) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} B) +document_properties_title=Antraštė: +document_properties_author=Autorius: +document_properties_subject=Tema: +document_properties_keywords=Reikšminiai žodžiai: +document_properties_creation_date=Sukūrimo data: +document_properties_modification_date=Modifikavimo data: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Kūrėjas: +document_properties_producer=PDF generatorius: +document_properties_version=PDF versija: +document_properties_page_count=Puslapių skaičius: +document_properties_page_size=Puslapio dydis: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=stačias +document_properties_page_size_orientation_landscape=gulsčias +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Laiškas +document_properties_page_size_name_legal=Dokumentas +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Spartus žiniatinklio rodinys: +document_properties_linearized_yes=Taip +document_properties_linearized_no=Ne +document_properties_close=Užverti + +print_progress_message=Dokumentas ruošiamas spausdinimui… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Atsisakyti + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Rodyti / slėpti šoninį polangį +toggle_sidebar_notification.title=Parankinė (dokumentas turi struktūrą / priedų) +toggle_sidebar_label=Šoninis polangis +document_outline.title=Rodyti dokumento struktūrą (spustelėkite dukart norėdami išplėsti/suskleisti visus elementus) +document_outline_label=Dokumento struktūra +attachments.title=Rodyti priedus +attachments_label=Priedai +thumbs.title=Rodyti puslapių miniatiūras +thumbs_label=Miniatiūros +findbar.title=Ieškoti dokumente +findbar_label=Rasti + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas={{page}} puslapis +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title={{page}} puslapis +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}} puslapio miniatiūra + +# Find panel button title and messages +find_input.title=Rasti +find_input.placeholder=Rasti dokumente… +find_previous.title=Ieškoti ankstesnio frazės egzemplioriaus +find_previous_label=Ankstesnis +find_next.title=Ieškoti tolesnio frazės egzemplioriaus +find_next_label=Tolesnis +find_highlight=Viską paryškinti +find_match_case_label=Skirti didžiąsias ir mažąsias raides +find_entire_word_label=Ištisi žodžiai +find_reached_top=Pasiekus dokumento pradžią, paieška pratęsta nuo pabaigos +find_reached_bottom=Pasiekus dokumento pabaigą, paieška pratęsta nuo pradžios +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} iš {{total}} atitikmens +find_match_count[two]={{current}} iš {{total}} atitikmenų +find_match_count[few]={{current}} iš {{total}} atitikmenų +find_match_count[many]={{current}} iš {{total}} atitikmenų +find_match_count[other]={{current}} iš {{total}} atitikmens +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Daugiau nei {{limit}} atitikmenų +find_match_count_limit[one]=Daugiau nei {{limit}} atitikmuo +find_match_count_limit[two]=Daugiau nei {{limit}} atitikmenys +find_match_count_limit[few]=Daugiau nei {{limit}} atitikmenys +find_match_count_limit[many]=Daugiau nei {{limit}} atitikmenų +find_match_count_limit[other]=Daugiau nei {{limit}} atitikmuo +find_not_found=Ieškoma frazė nerasta + +# Error panel labels +error_more_info=Išsamiau +error_less_info=Glausčiau +error_close=Užverti +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v. {{version}} (darinys: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Pranešimas: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Dėklas: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Failas: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Eilutė: {{line}} +rendering_error=Atvaizduojant puslapį įvyko klaida. + +# Predefined zoom values +page_scale_width=Priderinti prie lapo pločio +page_scale_fit=Pritaikyti prie lapo dydžio +page_scale_auto=Automatinis mastelis +page_scale_actual=Tikras dydis +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Klaida +loading_error=Įkeliant PDF failą įvyko klaida. +invalid_file_error=Tai nėra PDF failas arba jis yra sugadintas. +missing_file_error=PDF failas nerastas. +unexpected_response_error=Netikėtas serverio atsakas. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[„{{type}}“ tipo anotacija] +password_label=Įveskite slaptažodį šiam PDF failui atverti. +password_invalid=Slaptažodis neteisingas. Bandykite dar kartą. +password_ok=Gerai +password_cancel=Atsisakyti + +printing_not_supported=Dėmesio! Spausdinimas šioje naršyklėje nėra pilnai realizuotas. +printing_not_ready=Dėmesio! PDF failas dar nėra pilnai įkeltas spausdinimui. +web_fonts_disabled=Saityno šriftai išjungti – PDF faile esančių šriftų naudoti negalima. +document_colors_not_allowed=PDF dokumentams neleidžiama nurodyti savo spalvų, nes išjungta naršyklės nuostata „Leisti tinklalapiams nurodyti spalvas“. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ltg/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ltg/viewer.properties new file mode 100644 index 0000000..ecdb723 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ltg/viewer.properties @@ -0,0 +1,220 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Īprīkšejā lopa +previous_label=Īprīkšejā +next.title=Nuokomuo lopa +next_label=Nuokomuo + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Lopa +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=nu {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} nu {{pagesCount}}) + +zoom_out.title=Attuolynuot +zoom_out_label=Attuolynuot +zoom_in.title=Pītuvynuot +zoom_in_label=Pītuvynuot +zoom.title=Palelynuojums +presentation_mode.title=Puorslēgtīs iz Prezentacejis režymu +presentation_mode_label=Prezentacejis režyms +open_file.title=Attaiseit failu +open_file_label=Attaiseit +print.title=Drukuošona +print_label=Drukōt +download.title=Lejupīluode +download_label=Lejupīluodeit +bookmark.title=Pošreizejais skots (kopēt voi attaiseit jaunā lūgā) +bookmark_label=Pošreizejais skots + +# Secondary toolbar and context menu +tools.title=Reiki +tools_label=Reiki +first_page.title=Īt iz pyrmū lopu +first_page.label=Īt iz pyrmū lopu +first_page_label=Īt iz pyrmū lopu +last_page.title=Īt iz piedejū lopu +last_page.label=Īt iz piedejū lopu +last_page_label=Īt iz piedejū lopu +page_rotate_cw.title=Pagrīzt pa pulksteni +page_rotate_cw.label=Pagrīzt pa pulksteni +page_rotate_cw_label=Pagrīzt pa pulksteni +page_rotate_ccw.title=Pagrīzt pret pulksteni +page_rotate_ccw.label=Pagrīzt pret pulksteni +page_rotate_ccw_label=Pagrīzt pret pulksteni + +cursor_text_select_tool.title=Aktivizēt teksta izvieles reiku +cursor_text_select_tool_label=Teksta izvieles reiks +cursor_hand_tool.title=Aktivēt rūkys reiku +cursor_hand_tool_label=Rūkys reiks + +scroll_vertical.title=Izmontōt vertikalū ritinōšonu +scroll_vertical_label=Vertikalō ritinōšona +scroll_horizontal.title=Izmontōt horizontalū ritinōšonu +scroll_horizontal_label=Horizontalō ritinōšona +scroll_wrapped.title=Izmontōt mārūgojamū ritinōšonu +scroll_wrapped_label=Mārūgojamō ritinōšona + +spread_none.title=Naizmontōt lopu atvāruma režimu +spread_none_label=Bez atvārumim +spread_odd.title=Izmontōt lopu atvārumus sōkut nu napōra numeru lopom +spread_odd_label=Napōra lopys pa kreisi +spread_even.title=Izmontōt lopu atvārumus sōkut nu pōra numeru lopom +spread_even_label=Pōra lopys pa kreisi + +# Document properties dialog box +document_properties.title=Dokumenta īstatiejumi… +document_properties_label=Dokumenta īstatiejumi… +document_properties_file_name=Faila nūsaukums: +document_properties_file_size=Faila izmārs: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} biti) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} biti) +document_properties_title=Nūsaukums: +document_properties_author=Autors: +document_properties_subject=Tema: +document_properties_keywords=Atslāgi vuordi: +document_properties_creation_date=Izveides datums: +document_properties_modification_date=lobuošonys datums: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Radeituojs: +document_properties_producer=PDF producents: +document_properties_version=PDF verseja: +document_properties_page_count=Lopu skaits: +document_properties_page_size=Lopas izmārs: +document_properties_page_size_unit_inches=collas +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portreta orientaceja +document_properties_page_size_orientation_landscape=ainovys orientaceja +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=Jā +document_properties_linearized_no=Nā +document_properties_close=Aiztaiseit + +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Atceļt + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Puorslēgt suonu jūslu +toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments) +toggle_sidebar_label=Puorslēgt suonu jūslu +document_outline.title=Show Document Outline (double-click to expand/collapse all items) +document_outline_label=Dokumenta saturs +attachments.title=Show Attachments +attachments_label=Attachments +thumbs.title=Paruodeit seiktālus +thumbs_label=Seiktāli +findbar.title=Mekleit dokumentā +findbar_label=Mekleit + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Lopa {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Lopys {{page}} seiktāls + +# Find panel button title and messages +find_input.title=Mekleit +find_input.placeholder=Mekleit dokumentā… +find_previous.title=Atrast īprīkšejū +find_previous_label=Īprīkšejā +find_next.title=Atrast nuokamū +find_next_label=Nuokomuo +find_highlight=Īkruosuot vysys +find_match_case_label=Lelū, mozū burtu jiuteigs +find_reached_top=Sasnīgts dokumenta suokums, turpynojom nu beigom +find_reached_bottom=Sasnīgtys dokumenta beigys, turpynojom nu suokuma +find_not_found=Frāze nav atrosta + +# Error panel labels +error_more_info=Vairuok informacejis +error_less_info=mozuok informacejis +error_close=Close +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Ziņuojums: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Steks: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=File: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Ryndeņa: {{line}} +rendering_error=Attālojūt lopu rodās klaida + +# Predefined zoom values +page_scale_width=Lopys plotumā +page_scale_fit=Ītylpynūt lopu +page_scale_auto=Automatiskais izmārs +page_scale_actual=Patīsais izmārs +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Klaida +loading_error=Īluodejūt PDF nūtyka klaida. +invalid_file_error=Nadereigs voi būjuots PDF fails. +missing_file_error=PDF fails nav atrosts. +unexpected_response_error=Unexpected server response. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=Īvodit paroli, kab attaiseitu PDF failu. +password_invalid=Napareiza parole, raugit vēļreiz. +password_ok=Labi +password_cancel=Atceļt + +printing_not_supported=Uzmaneibu: Drukuošona nu itei puorlūka dorbojās tikai daleji. +printing_not_ready=Uzmaneibu: PDF nav pilneibā īluodeits drukuošonai. +web_fonts_disabled=Šķārsteikla fonti nav aktivizāti: Navar īgult PDF fontus. +document_colors_not_allowed=PDF dokumentym nav atļauts izmantuot pošym sovys kruosys: „Atļaut lopom izavieleit pošom sovys kruosys“ ir deaktiveits puorlyukā. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/lv/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/lv/viewer.properties new file mode 100644 index 0000000..18ed55e --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/lv/viewer.properties @@ -0,0 +1,242 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Iepriekšējā lapa +previous_label=Iepriekšējā +next.title=Nākamā lapa +next_label=Nākamā + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Lapa +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=no {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} no {{pagesCount}}) + +zoom_out.title=Attālināt\u0020 +zoom_out_label=Attālināt +zoom_in.title=Pietuvināt +zoom_in_label=Pietuvināt +zoom.title=Palielinājums +presentation_mode.title=Pārslēgties uz Prezentācijas režīmu +presentation_mode_label=Prezentācijas režīms +open_file.title=Atvērt failu +open_file_label=Atvērt +print.title=Drukāšana +print_label=Drukāt +download.title=Lejupielāde +download_label=Lejupielādēt +bookmark.title=Pašreizējais skats (kopēt vai atvērt jaunā logā) +bookmark_label=Pašreizējais skats + +# Secondary toolbar and context menu +tools.title=Rīki +tools_label=Rīki +first_page.title=Iet uz pirmo lapu +first_page.label=Iet uz pirmo lapu +first_page_label=Iet uz pirmo lapu +last_page.title=Iet uz pēdējo lapu +last_page.label=Iet uz pēdējo lapu +last_page_label=Iet uz pēdējo lapu +page_rotate_cw.title=Pagriezt pa pulksteni +page_rotate_cw.label=Pagriezt pa pulksteni +page_rotate_cw_label=Pagriezt pa pulksteni +page_rotate_ccw.title=Pagriezt pret pulksteni +page_rotate_ccw.label=Pagriezt pret pulksteni +page_rotate_ccw_label=Pagriezt pret pulksteni + +cursor_text_select_tool.title=Aktivizēt teksta izvēles rīku +cursor_text_select_tool_label=Teksta izvēles rīks +cursor_hand_tool.title=Aktivēt rokas rīku +cursor_hand_tool_label=Rokas rīks + +scroll_vertical.title=Izmantot vertikālo ritināšanu +scroll_vertical_label=Vertikālā ritināšana +scroll_horizontal.title=Izmantot horizontālo ritināšanu +scroll_horizontal_label=Horizontālā ritināšana +scroll_wrapped.title=Izmantot apkļauto ritināšanu +scroll_wrapped_label=Apkļautā ritināšana + +spread_none.title=Nepievienoties lapu izpletumiem +spread_none_label=Neizmantot izpletumus +spread_odd.title=Izmantot lapu izpletumus sākot ar nepāra numuru lapām +spread_odd_label=Nepāra izpletumi +spread_even.title=Izmantot lapu izpletumus sākot ar pāra numuru lapām +spread_even_label=Pāra izpletumi + +# Document properties dialog box +document_properties.title=Dokumenta iestatījumi… +document_properties_label=Dokumenta iestatījumi… +document_properties_file_name=Faila nosaukums: +document_properties_file_size=Faila izmērs: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} biti) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} biti) +document_properties_title=Nosaukums: +document_properties_author=Autors: +document_properties_subject=Tēma: +document_properties_keywords=Atslēgas vārdi: +document_properties_creation_date=Izveides datums: +document_properties_modification_date=LAbošanas datums: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Radītājs: +document_properties_producer=PDF producents: +document_properties_version=PDF versija: +document_properties_page_count=Lapu skaits: +document_properties_page_size=Papīra izmērs: +document_properties_page_size_unit_inches=collas +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portretorientācija +document_properties_page_size_orientation_landscape=ainavorientācija +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Vēstule +document_properties_page_size_name_legal=Juridiskie teksti +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Ātrā tīmekļa skats: +document_properties_linearized_yes=Jā +document_properties_linearized_no=Nē +document_properties_close=Aizvērt + +print_progress_message=Gatavo dokumentu drukāšanai... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Atcelt + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Pārslēgt sānu joslu +toggle_sidebar_notification.title=Pārslēgt sānu joslu (dokumenta saturu un pielikumus) +toggle_sidebar_label=Pārslēgt sānu joslu +document_outline.title=Rādīt dokumenta struktūru (veiciet dubultklikšķi lai izvērstu/sakļautu visus vienumus) +document_outline_label=Dokumenta saturs +attachments.title=Rādīt pielikumus +attachments_label=Pielikumi +thumbs.title=Parādīt sīktēlus +thumbs_label=Sīktēli +findbar.title=Meklēt dokumentā +findbar_label=Meklēt + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Lapa {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Lapas {{page}} sīktēls + +# Find panel button title and messages +find_input.title=Meklēt +find_input.placeholder=Meklēt dokumentā… +find_previous.title=Atrast iepriekšējo +find_previous_label=Iepriekšējā +find_next.title=Atrast nākamo +find_next_label=Nākamā +find_highlight=Iekrāsot visas +find_match_case_label=Lielo, mazo burtu jutīgs +find_entire_word_label=Veselus vārdus +find_reached_top=Sasniegts dokumenta sākums, turpinām no beigām +find_reached_bottom=Sasniegtas dokumenta beigas, turpinām no sākuma +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} no {{total}} rezultāta +find_match_count[two]={{current}} no {{total}} rezultātiem +find_match_count[few]={{current}} no {{total}} rezultātiem +find_match_count[many]={{current}} no {{total}} rezultātiem +find_match_count[other]={{current}} no {{total}} rezultātiem +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Vairāk nekā {{limit}} rezultāti +find_match_count_limit[one]=Vairāk nekā {{limit}} rezultāti +find_match_count_limit[two]=Vairāk nekā {{limit}} rezultāti +find_match_count_limit[few]=Vairāk nekā {{limit}} rezultāti +find_match_count_limit[many]=Vairāk nekā {{limit}} rezultāti +find_match_count_limit[other]=Vairāk nekā {{limit}} rezultāti +find_not_found=Frāze nav atrasta + +# Error panel labels +error_more_info=Vairāk informācijas +error_less_info=MAzāk informācijas +error_close=Close +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Ziņojums: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Steks: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=File: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Rindiņa: {{line}} +rendering_error=Attēlojot lapu radās kļūda + +# Predefined zoom values +page_scale_width=Lapas platumā +page_scale_fit=Ietilpinot lapu +page_scale_auto=Automātiskais izmērs +page_scale_actual=Patiesais izmērs +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Kļūda +loading_error=Ielādējot PDF notika kļūda. +invalid_file_error=Nederīgs vai bojāts PDF fails. +missing_file_error=PDF fails nav atrasts. +unexpected_response_error=Negaidīa servera atbilde. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} anotācija] +password_label=Ievadiet paroli, lai atvērtu PDF failu. +password_invalid=Nepareiza parole, mēģiniet vēlreiz. +password_ok=Labi +password_cancel=Atcelt + +printing_not_supported=Uzmanību: Drukāšana no šī pārlūka darbojas tikai daļēji. +printing_not_ready=Uzmanību: PDF nav pilnībā ielādēts drukāšanai. +web_fonts_disabled=Tīmekļa fonti nav aktivizēti: Nevar iegult PDF fontus. +document_colors_not_allowed=PDF dokumentiem nav atļauts izmantot pašiem savas krāsas: „Atļaut lapām izvēlēties pašām savas krāsas“ ir deaktivēts pārlūkā. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/meh/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/meh/viewer.properties new file mode 100644 index 0000000..7a1bf04 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/meh/viewer.properties @@ -0,0 +1,111 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Página yata + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. + +zoom.title=Nasa´a ka´nu/Nasa´a luli +open_file_label=Síne + +# Secondary toolbar and context menu + + + + +# Document properties dialog box +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized_yes=Kuvi +document_properties_close=Nakasɨ + +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Nkuvi-ka + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +findbar_label=Nánuku + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. + +# Find panel button title and messages +find_input.title=Nánuku +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} + +# Error panel labels +error_close=Nakasɨ +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number + +# Predefined zoom values +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +password_cancel=Nkuvi-ka + diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/mk/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/mk/viewer.properties new file mode 100644 index 0000000..8535025 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/mk/viewer.properties @@ -0,0 +1,145 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Претходна страница +previous_label=Претходна +next.title=Следна страница +next_label=Следна + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. + +zoom_out.title=Намалување +zoom_out_label=Намали +zoom_in.title=Зголемување +zoom_in_label=Зголеми +zoom.title=Променување на големина +presentation_mode.title=Премини во презентациски режим +presentation_mode_label=Презентациски режим +open_file.title=Отворање датотека +open_file_label=Отвори +print.title=Печатење +print_label=Печати +download.title=Преземање +download_label=Преземи +bookmark.title=Овој преглед (копирај или отвори во нов прозорец) +bookmark_label=Овој преглед + +# Secondary toolbar and context menu +tools.title=Алатки +first_page.label=Оди до првата страница +last_page.label=Оди до последната страница +page_rotate_cw.label=Ротирај по стрелките на часовникот +page_rotate_ccw.label=Ротирај спротивно од стрелките на часовникот + + + + +# Document properties dialog box +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. + +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_close=Откажи + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Вклучи странична лента +toggle_sidebar_label=Вклучи странична лента +thumbs.title=Прикажување на икони +thumbs_label=Икони +findbar.title=Најди во документот +findbar_label=Најди + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Страница {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Икона од страница {{page}} + +# Find panel button title and messages +find_previous.title=Најди ја предходната појава на фразата +find_previous_label=Претходно +find_next.title=Најди ја следната појава на фразата +find_next_label=Следно +find_highlight=Означи сѐ +find_match_case_label=Токму така +find_reached_top=Барањето стигна до почетокот на документот и почнува од крајот +find_reached_bottom=Барањето стигна до крајот на документот и почнува од почеток +find_not_found=Фразата не е пронајдена + +# Error panel labels +error_more_info=Повеќе информации +error_less_info=Помалку информации +error_close=Затвори +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Порака: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Датотека: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Линија: {{line}} +rendering_error=Настана грешка при прикажувањето на страницата. + +# Predefined zoom values +page_scale_width=Ширина на страница +page_scale_fit=Цела страница +page_scale_auto=Автоматска големина +page_scale_actual=Вистинска големина +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. + +# Loading indicator messages +loading_error_indicator=Грешка +loading_error=Настана грешка при вчитувањето на PDF-от. +invalid_file_error=Невалидна или корумпирана PDF датотека. +missing_file_error=Недостасува PDF документ. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +password_cancel=Откажи + +printing_not_supported=Предупредување: Печатењето не е целосно поддржано во овој прелистувач. +printing_not_ready=Предупредување: PDF документот не е целосно вчитан за печатење. +web_fonts_disabled=Интернет фонтовите се оневозможени: не може да се користат вградените PDF фонтови. +document_colors_not_allowed=PDF-документите немаат дозвола да користат сопствени бои: Поставката „Дозволи страниците сами да ги избираат своите бои“ е деактивирана од прелистувачот. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/mr/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/mr/viewer.properties new file mode 100644 index 0000000..25229ea --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/mr/viewer.properties @@ -0,0 +1,238 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=मागील पृष्ठ +previous_label=मागील +next.title=पुढील पृष्ठ +next_label=पुढील + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=पृष्ठ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}}पैकी +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} पैकी {{pageNumber}}) + +zoom_out.title=छोटे करा +zoom_out_label=छोटे करा +zoom_in.title=मोठे करा +zoom_in_label=मोठे करा +zoom.title=लहान किंवा मोठे करा +presentation_mode.title=प्रस्तुतिकरण मोडचा वापर करा +presentation_mode_label=प्रस्तुतिकरण मोड +open_file.title=फाइल उघडा +open_file_label=उघडा +print.title=छपाई करा +print_label=छपाई करा +download.title=डाउनलोड करा +download_label=डाउनलोड करा +bookmark.title=सध्याचे अवलोकन (नवीन पटलात प्रत बनवा किंवा उघडा) +bookmark_label=सध्याचे अवलोकन + +# Secondary toolbar and context menu +tools.title=साधने +tools_label=साधने +first_page.title=पहिल्या पृष्ठावर जा +first_page.label=पहिल्या पृष्ठावर जा +first_page_label=पहिल्या पृष्ठावर जा +last_page.title=शेवटच्या पृष्ठावर जा +last_page.label=शेवटच्या पृष्ठावर जा +last_page_label=शेवटच्या पृष्ठावर जा +page_rotate_cw.title=घड्याळाच्या काट्याच्या दिशेने फिरवा +page_rotate_cw.label=घड्याळाच्या काट्याच्या दिशेने फिरवा +page_rotate_cw_label=घड्याळाच्या काट्याच्या दिशेने फिरवा +page_rotate_ccw.title=घड्याळाच्या काट्याच्या उलट दिशेने फिरवा +page_rotate_ccw.label=घड्याळाच्या काट्याच्या उलट दिशेने फिरवा +page_rotate_ccw_label=घड्याळाच्या काट्याच्या उलट दिशेने फिरवा + +cursor_text_select_tool.title=मजकूर निवड साधन कार्यान्वयीत करा +cursor_text_select_tool_label=मजकूर निवड साधन +cursor_hand_tool.title=हात साधन कार्यान्वित करा +cursor_hand_tool_label=हस्त साधन + +scroll_vertical.title=अनुलंब स्क्रोलिंग वापरा +scroll_vertical_label=अनुलंब स्क्रोलिंग +scroll_horizontal.title=क्षैतिज स्क्रोलिंग वापरा +scroll_horizontal_label=क्षैतिज स्क्रोलिंग + + +# Document properties dialog box +document_properties.title=दस्तऐवज गुणधर्म… +document_properties_label=दस्तऐवज गुणधर्म… +document_properties_file_name=फाइलचे नाव: +document_properties_file_size=फाइल आकार: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} बाइट्स) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} बाइट्स) +document_properties_title=शिर्षक: +document_properties_author=लेखक: +document_properties_subject=विषय: +document_properties_keywords=मुख्यशब्द: +document_properties_creation_date=निर्माण दिनांक: +document_properties_modification_date=दुरूस्ती दिनांक: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=निर्माता: +document_properties_producer=PDF निर्माता: +document_properties_version=PDF आवृत्ती: +document_properties_page_count=पृष्ठ संख्या: +document_properties_page_size=पृष्ठ आकार: +document_properties_page_size_unit_inches=इंच +document_properties_page_size_unit_millimeters=मीमी +document_properties_page_size_orientation_portrait=उभी मांडणी +document_properties_page_size_orientation_landscape=आडवे +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=जलद वेब दृष्य: +document_properties_linearized_yes=हो +document_properties_linearized_no=नाही +document_properties_close=बंद करा + +print_progress_message=छपाई करीता पृष्ठ तयार करीत आहे… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=रद्द करा + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=बाजूचीपट्टी टॉगल करा +toggle_sidebar_notification.title=बाजूची पट्टी टॉगल करा (दस्तऐवजामध्ये रुपरेषा/जोडण्या आहेत) +toggle_sidebar_label=बाजूचीपट्टी टॉगल करा +document_outline.title=दस्तऐवज बाह्यरेखा दर्शवा (विस्तृत करण्यासाठी दोनवेळा क्लिक करा /सर्व घटक दाखवा) +document_outline_label=दस्तऐवज रूपरेषा +attachments.title=जोडपत्र दाखवा +attachments_label=जोडपत्र +thumbs.title=थंबनेल्स् दाखवा +thumbs_label=थंबनेल्स् +findbar.title=दस्तऐवजात शोधा +findbar_label=शोधा + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=पृष्ठ {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=पृष्ठाचे थंबनेल {{page}} + +# Find panel button title and messages +find_input.title=शोधा +find_input.placeholder=दस्तऐवजात शोधा… +find_previous.title=वाकप्रयोगची मागील घटना शोधा +find_previous_label=मागील +find_next.title=वाकप्रयोगची पुढील घटना शोधा +find_next_label=पुढील +find_highlight=सर्व ठळक करा +find_match_case_label=आकार जुळवा +find_entire_word_label=संपूर्ण शब्द +find_reached_top=दस्तऐवजाच्या शीर्षकास पोहचले, तळपासून पुढे +find_reached_bottom=दस्तऐवजाच्या तळाला पोहचले, शीर्षकापासून पुढे +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{total}} पैकी {{current}} सुसंगत +find_match_count[two]={{total}} पैकी {{current}} सुसंगत +find_match_count[few]={{total}} पैकी {{current}} सुसंगत +find_match_count[many]={{total}} पैकी {{current}} सुसंगत +find_match_count[other]={{total}} पैकी {{current}} सुसंगत +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} पेक्षा अधिक जुळण्या +find_match_count_limit[one]={{limit}} पेक्षा अधिक जुळण्या +find_match_count_limit[two]={{limit}} पेक्षा अधिक जुळण्या +find_match_count_limit[few]={{limit}} पेक्षा अधिक जुळण्या +find_match_count_limit[many]={{limit}} पेक्षा अधिक जुळण्या +find_match_count_limit[other]={{limit}} पेक्षा अधिक जुळण्या +find_not_found=वाकप्रयोग आढळले नाही + +# Error panel labels +error_more_info=आणखी माहिती +error_less_info=कमी माहिती +error_close=बंद करा +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=संदेश: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=स्टॅक: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=फाइल: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=रेष: {{line}} +rendering_error=पृष्ठ दाखवतेवेळी त्रुटी आढळली. + +# Predefined zoom values +page_scale_width=पृष्ठाची रूंदी +page_scale_fit=पृष्ठ बसवा +page_scale_auto=स्वयं लाहन किंवा मोठे करणे +page_scale_actual=प्रत्यक्ष आकार +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=त्रुटी +loading_error=PDF लोड करतेवेळी त्रुटी आढळली. +invalid_file_error=अवैध किंवा दोषीत PDF फाइल. +missing_file_error=न आढळणारी PDF फाइल. +unexpected_response_error=अनपेक्षित सर्व्हर प्रतिसाद. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} टिपण्णी] +password_label=ही PDF फाइल उघडण्याकरिता पासवर्ड द्या. +password_invalid=अवैध पासवर्ड. कृपया पुन्हा प्रयत्न करा. +password_ok=ठीक आहे +password_cancel=रद्द करा + +printing_not_supported=सावधानता: या ब्राउझरतर्फे छपाइ पूर्णपणे समर्थीत नाही. +printing_not_ready=सावधानता: छपाईकरिता PDF पूर्णतया लोड झाले नाही. +web_fonts_disabled=वेब टंक असमर्थीत आहेत: एम्बेडेड PDF टंक वापर अशक्य. +document_colors_not_allowed=PDF दस्तऐवजांना त्यांचे रंग वापरण्यास अनुमती नाही: ब्राउझरमध्ये ' पृष्ठांना त्यांचे रंग निवडण्यास अनुमती द्या' बंद केले आहे. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ms/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ms/viewer.properties new file mode 100644 index 0000000..3bc7907 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ms/viewer.properties @@ -0,0 +1,242 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Halaman Dahulu +previous_label=Dahulu +next.title=Halaman Berikut +next_label=Berikut + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Halaman +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=daripada {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} daripada {{pagesCount}}) + +zoom_out.title=Zum Keluar +zoom_out_label=Zum Keluar +zoom_in.title=Zum Masuk +zoom_in_label=Zum Masuk +zoom.title=Zum +presentation_mode.title=Tukar ke Mod Persembahan +presentation_mode_label=Mod Persembahan +open_file.title=Buka Fail +open_file_label=Buka +print.title=Cetak +print_label=Cetak +download.title=Muat turun +download_label=Muat turun +bookmark.title=Paparan semasa (salin atau buka dalam tetingkap baru) +bookmark_label=Paparan Semasa + +# Secondary toolbar and context menu +tools.title=Alatan +tools_label=Alatan +first_page.title=Pergi ke Halaman Pertama +first_page.label=Pergi ke Halaman Pertama +first_page_label=Pergi ke Halaman Pertama +last_page.title=Pergi ke Halaman Terakhir +last_page.label=Pergi ke Halaman Terakhir +last_page_label=Pergi ke Halaman Terakhir +page_rotate_cw.title=Berputar ikut arah Jam +page_rotate_cw.label=Berputar ikut arah Jam +page_rotate_cw_label=Berputar ikut arah Jam +page_rotate_ccw.title=Pusing berlawan arah jam +page_rotate_ccw.label=Pusing berlawan arah jam +page_rotate_ccw_label=Pusing berlawan arah jam + +cursor_text_select_tool.title=Dayakan Alatan Pilihan Teks +cursor_text_select_tool_label=Alatan Pilihan Teks +cursor_hand_tool.title=Dayakan Alatan Tangan +cursor_hand_tool_label=Alatan Tangan + +scroll_vertical.title=Guna Skrol Menegak +scroll_vertical_label=Skrol Menegak +scroll_horizontal.title=Guna Skrol Mengufuk +scroll_horizontal_label=Skrol Mengufuk +scroll_wrapped.title=Guna Skrol Berbalut +scroll_wrapped_label=Skrol Berbalut + +spread_none.title=Jangan hubungkan hamparan halaman +spread_none_label=Tanpa Hamparan +spread_odd.title=Hubungkan hamparan halaman dengan halaman nombor ganjil +spread_odd_label=Hamparan Ganjil +spread_even.title=Hubungkan hamparan halaman dengan halaman nombor genap +spread_even_label=Hamparan Seimbang + +# Document properties dialog box +document_properties.title=Sifat Dokumen… +document_properties_label=Sifat Dokumen… +document_properties_file_name=Nama fail: +document_properties_file_size=Saiz fail: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bait) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bait) +document_properties_title=Tajuk: +document_properties_author=Pengarang: +document_properties_subject=Subjek: +document_properties_keywords=Kata kunci: +document_properties_creation_date=Masa Dicipta: +document_properties_modification_date=Tarikh Ubahsuai: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Pencipta: +document_properties_producer=Pengeluar PDF: +document_properties_version=Versi PDF: +document_properties_page_count=Kiraan Laman: +document_properties_page_size=Saiz Halaman: +document_properties_page_size_unit_inches=dalam +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=potret +document_properties_page_size_orientation_landscape=landskap +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Paparan Web Pantas: +document_properties_linearized_yes=Ya +document_properties_linearized_no=Tidak +document_properties_close=Tutup + +print_progress_message=Menyediakan dokumen untuk dicetak… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Batal + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Togol Bar Sisi +toggle_sidebar_notification.title=Togol Sidebar (dokumen mengandungi rangka/attachments) +toggle_sidebar_label=Togol Bar Sisi +document_outline.title=Papar Rangka Dokumen (klik-dua-kali untuk kembangkan/kolaps semua item) +document_outline_label=Rangka Dokumen +attachments.title=Papar Lampiran +attachments_label=Lampiran +thumbs.title=Papar Thumbnails +thumbs_label=Imej kecil +findbar.title=Cari didalam Dokumen +findbar_label=Cari + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Halaman {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Halaman Imej kecil {{page}} + +# Find panel button title and messages +find_input.title=Cari +find_input.placeholder=Cari dalam dokumen… +find_previous.title=Cari teks frasa berkenaan yang terdahulu +find_previous_label=Dahulu +find_next.title=Cari teks frasa berkenaan yang berikut +find_next_label=Berikut +find_highlight=Serlahkan semua +find_match_case_label=Huruf sepadan +find_entire_word_label=Seluruh perkataan +find_reached_top=Mencapai teratas daripada dokumen, sambungan daripada bawah +find_reached_bottom=Mencapai terakhir daripada dokumen, sambungan daripada atas +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} daripada {{total}} padanan +find_match_count[two]={{current}} daripada {{total}} padanan +find_match_count[few]={{current}} daripada {{total}} padanan +find_match_count[many]={{current}} daripada {{total}} padanan +find_match_count[other]={{current}} daripada {{total}} padanan +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Lebih daripada {{limit}} padanan +find_match_count_limit[one]=Lebih daripada {{limit}} padanan +find_match_count_limit[two]=Lebih daripada {{limit}} padanan +find_match_count_limit[few]=Lebih daripada {{limit}} padanan +find_match_count_limit[many]=Lebih daripada {{limit}} padanan +find_match_count_limit[other]=Lebih daripada {{limit}} padanan +find_not_found=Frasa tidak ditemui + +# Error panel labels +error_more_info=Maklumat Lanjut +error_less_info=Kurang Informasi +error_close=Tutup +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mesej: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Timbun: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fail: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Garis: {{line}} +rendering_error=Ralat berlaku ketika memberikan halaman. + +# Predefined zoom values +page_scale_width=Lebar Halaman +page_scale_fit=Muat Halaman +page_scale_auto=Zoom Automatik +page_scale_actual=Saiz Sebenar +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Ralat +loading_error=Masalah berlaku semasa menuatkan sebuah PDF. +invalid_file_error=Tidak sah atau fail PDF rosak. +missing_file_error=Fail PDF Hilang. +unexpected_response_error=Respon pelayan yang tidak dijangka. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Anotasi] +password_label=Masukan kata kunci untuk membuka fail PDF ini. +password_invalid=Kata laluan salah. Cuba lagi. +password_ok=OK +password_cancel=Batal + +printing_not_supported=Amaran: Cetakan ini tidak sepenuhnya disokong oleh pelayar ini. +printing_not_ready=Amaran: PDF tidak sepenuhnya dimuatkan untuk dicetak. +web_fonts_disabled=Fon web dinyahdayakan: tidak dapat menggunakan fon terbenam PDF. +document_colors_not_allowed=Dokumen PDF tidak dibenarkan untuk menggunakan warna sendiri: “Izinkan halaman untuk memilih warna sendiri” telah dinyahaktifkan dalam pelayar. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/my/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/my/viewer.properties new file mode 100644 index 0000000..f567619 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/my/viewer.properties @@ -0,0 +1,198 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=အရင် စာမျက်နှာ +previous_label=အရင်နေရာ +next.title=ရှေ့ စာမျက်နှာ +next_label=နောက်တခု + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=စာမျက်နှာ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} ၏ +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} ၏ {{pageNumber}}) + +zoom_out.title=ချုံ့ပါ +zoom_out_label=ချုံ့ပါ +zoom_in.title=ချဲ့ပါ +zoom_in_label=ချဲ့ပါ +zoom.title=ချုံ့/ချဲ့ပါ +presentation_mode.title=ဆွေးနွေးတင်ပြစနစ်သို့ ကူးပြောင်းပါ +presentation_mode_label=ဆွေးနွေးတင်ပြစနစ် +open_file.title=ဖိုင်အားဖွင့်ပါ။ +open_file_label=ဖွင့်ပါ +print.title=ပုံနှိုပ်ပါ +print_label=ပုံနှိုပ်ပါ +download.title=ကူးဆွဲ +download_label=ကူးဆွဲ +bookmark.title=လက်ရှိ မြင်ကွင်း (ဝင်းဒိုးအသစ်မှာ ကူးပါ သို့မဟုတ် ဖွင့်ပါ) +bookmark_label=လက်ရှိ မြင်ကွင်း + +# Secondary toolbar and context menu +tools.title=ကိရိယာများ +tools_label=ကိရိယာများ +first_page.title=ပထမ စာမျက်နှာသို့ +first_page.label=ပထမ စာမျက်နှာသို့ +first_page_label=ပထမ စာမျက်နှာသို့ +last_page.title=နောက်ဆုံး စာမျက်နှာသို့ +last_page.label=နောက်ဆုံး စာမျက်နှာသို့ +last_page_label=နောက်ဆုံး စာမျက်နှာသို့ +page_rotate_cw.title=နာရီလက်တံ အတိုင်း +page_rotate_cw.label=နာရီလက်တံ အတိုင်း +page_rotate_cw_label=နာရီလက်တံ အတိုင်း +page_rotate_ccw.title=နာရီလက်တံ ပြောင်းပြန် +page_rotate_ccw.label=နာရီလက်တံ ပြောင်းပြန် +page_rotate_ccw_label=နာရီလက်တံ ပြောင်းပြန် + + + + +# Document properties dialog box +document_properties.title=မှတ်တမ်းမှတ်ရာ ဂုဏ်သတ္တိများ +document_properties_label=မှတ်တမ်းမှတ်ရာ ဂုဏ်သတ္တိများ +document_properties_file_name=ဖိုင် : +document_properties_file_size=ဖိုင်ဆိုဒ် : +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} ကီလိုဘိုတ် ({{size_b}}ဘိုတ်) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=ခေါင်းစဉ်‌ - +document_properties_author=ရေးသားသူ: +document_properties_subject=အကြောင်းအရာ:\u0020 +document_properties_keywords=သော့ချက် စာလုံး: +document_properties_creation_date=ထုတ်လုပ်ရက်စွဲ: +document_properties_modification_date=ပြင်ဆင်ရက်စွဲ: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=ဖန်တီးသူ: +document_properties_producer=PDF ထုတ်လုပ်သူ: +document_properties_version=PDF ဗားရှင်း: +document_properties_page_count=စာမျက်နှာအရေအတွက်: +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_close=ပိတ် + +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ပယ်​ဖျက်ပါ + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=ဘေးတန်းဖွင့်ပိတ် +toggle_sidebar_notification.title=ဘေးဘားတန်းကို အဖွင့်/အပိတ် လုပ်ရန် (စာတမ်းတွင် outline/attachments ပါဝင်နိုင်သည်) +toggle_sidebar_label=ဖွင့်ပိတ် ဆလိုက်ဒါ +document_outline.title=စာတမ်းအကျဉ်းချုပ်ကို ပြပါ (စာရင်းအားလုံးကို ချုံ့/ချဲ့ရန် ကလစ်နှစ်ချက်နှိပ်ပါ) +document_outline_label=စာတမ်းအကျဉ်းချုပ် +attachments.title=တွဲချက်များ ပြပါ +attachments_label=တွဲထားချက်များ +thumbs.title=ပုံရိပ်ငယ်များကို ပြပါ +thumbs_label=ပုံရိပ်ငယ်များ +findbar.title=Find in Document +findbar_label=ရှာဖွေပါ + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=စာမျက်နှာ {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=စာမျက်နှာရဲ့ ပုံရိပ်ငယ် {{page}} + +# Find panel button title and messages +find_input.title=ရှာဖွေပါ +find_input.placeholder=စာတမ်းထဲတွင် ရှာဖွေရန်… +find_previous.title=စကားစုရဲ့ အရင် ​ဖြစ်ပွားမှုကို ရှာဖွေပါ +find_previous_label=နောက်သို့ +find_next.title=စကားစုရဲ့ နောက်ထပ် ​ဖြစ်ပွားမှုကို ရှာဖွေပါ +find_next_label=ရှေ့သို့ +find_highlight=အားလုံးကို မျဉ်းသားပါ +find_match_case_label=စာလုံး တိုက်ဆိုင်ပါ +find_reached_top=စာမျက်နှာထိပ် ရောက်နေပြီ၊ အဆုံးကနေ ပြန်စပါ +find_reached_bottom=စာမျက်နှာအဆုံး ရောက်နေပြီ၊ ထိပ်ကနေ ပြန်စပါ +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_not_found=စကားစု မတွေ့ရဘူး + +# Error panel labels +error_more_info=နောက်ထပ်အချက်အလက်များ +error_less_info=အနည်းငယ်မျှသော သတင်းအချက်အလက် +error_close=ပိတ် +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=မက်ဆေ့ - {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=အထပ် - {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ဖိုင် {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=လိုင်း - {{line}} +rendering_error=စာမျက်နှာကို ပုံဖော်နေချိန်မှာ အမှားတစ်ခုတွေ့ရပါတယ်။ + +# Predefined zoom values +page_scale_width=စာမျက်နှာ အကျယ် +page_scale_fit=စာမျက်နှာ ကွက်တိ +page_scale_auto=အလိုအလျောက် ချုံ့ချဲ့ +page_scale_actual=အမှန်တကယ်ရှိတဲ့ အရွယ် +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=အမှား +loading_error=PDF ဖိုင် ကိုဆွဲတင်နေချိန်မှာ အမှားတစ်ခုတွေ့ရပါတယ်။ +invalid_file_error=မရသော သို့ ပျက်နေသော PDF ဖိုင် +missing_file_error=PDF ပျောက်ဆုံး +unexpected_response_error=မမျှော်လင့်ထားသော ဆာဗာမှ ပြန်ကြားချက် + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} အဓိပ္ပာယ်ဖွင့်ဆိုချက်] +password_label=ယခု PDF ကို ဖွင့်ရန် စကားဝှက်ကို ရိုက်ပါ။ +password_invalid=စာဝှက် မှားသည်။ ထပ်ကြိုးစားကြည့်ပါ။ +password_ok=OK +password_cancel=ပယ်​ဖျက်ပါ + +printing_not_supported=သတိပေးချက်၊ပရင့်ထုတ်ခြင်းကိုဤဘယောက်ဆာသည် ပြည့်ဝစွာထောက်ပံ့မထားပါ ။ +printing_not_ready=သတိပေးချက်: ယခု PDF ဖိုင်သည် ပုံနှိပ်ရန် မပြည့်စုံပါ +web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts. +document_colors_not_allowed=PDF ဖိုင်အား ၎င်းဤ ကိုယ်ပိုင်အရောင်များကို အသုံးပြုခွင့်မပေးထားပါ ။ 'စာမျက်နှာအားလုံးအားအရောင်ရွေးချယ်ခွင့်' အား ယခု ဘယောက်ဆာတွင် ပိတ်ထားခြင်းကြောင့်ဖြစ် သှ် diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/nb-NO/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/nb-NO/viewer.properties new file mode 100644 index 0000000..5612abb --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/nb-NO/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Forrige side +previous_label=Forrige +next.title=Neste side +next_label=Neste + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Side +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=av {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} av {{pagesCount}}) + +zoom_out.title=Zoom ut +zoom_out_label=Zoom ut +zoom_in.title=Zoom inn +zoom_in_label=Zoom inn +zoom.title=Zoom +presentation_mode.title=Bytt til presentasjonsmodus +presentation_mode_label=Presentasjonsmodus +open_file.title=Åpne fil +open_file_label=Åpne +print.title=Skriv ut +print_label=Skriv ut +download.title=Last ned +download_label=Last ned +bookmark.title=Nåværende visning (kopier eller åpne i et nytt vindu) +bookmark_label=Nåværende visning + +# Secondary toolbar and context menu +tools.title=Verktøy +tools_label=Verktøy +first_page.title=Gå til første side +first_page.label=Gå til første side +first_page_label=Gå til første side +last_page.title=Gå til siste side +last_page.label=Gå til siste side +last_page_label=Gå til siste side +page_rotate_cw.title=Roter med klokken +page_rotate_cw.label=Roter med klokken +page_rotate_cw_label=Roter med klokken +page_rotate_ccw.title=Roter mot klokken +page_rotate_ccw.label=Roter mot klokken +page_rotate_ccw_label=Roter mot klokken + +cursor_text_select_tool.title=Aktiver tekstmarkeringsverktøy +cursor_text_select_tool_label=Tekstmarkeringsverktøy +cursor_hand_tool.title=Aktiver handverktøy +cursor_hand_tool_label=Handverktøy + +scroll_vertical.title=Bruk vertikal rulling +scroll_vertical_label=Vertikal rulling +scroll_horizontal.title=Bruk horisontal rulling +scroll_horizontal_label=Horisontal rulling +scroll_wrapped.title=Bruk flersiderulling +scroll_wrapped_label=Flersiderulling + +spread_none.title=Vis enkeltsider +spread_none_label=Enkeltsider +spread_odd.title=Vis oppslag med ulike sidenumre til venstre +spread_odd_label=Oppslag med forside +spread_even.title=Vis oppslag med like sidenumre til venstre +spread_even_label=Oppslag uten forside + +# Document properties dialog box +document_properties.title=Dokumentegenskaper … +document_properties_label=Dokumentegenskaper … +document_properties_file_name=Filnavn: +document_properties_file_size=Filstørrelse: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Dokumentegenskaper … +document_properties_author=Forfatter: +document_properties_subject=Emne: +document_properties_keywords=Nøkkelord: +document_properties_creation_date=Opprettet dato: +document_properties_modification_date=Endret dato: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Opprettet av: +document_properties_producer=PDF-verktøy: +document_properties_version=PDF-versjon: +document_properties_page_count=Sideantall: +document_properties_page_size=Sidestørrelse: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=stående +document_properties_page_size_orientation_landscape=liggende +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Hurtig nettvisning: +document_properties_linearized_yes=Ja +document_properties_linearized_no=Nei +document_properties_close=Lukk + +print_progress_message=Forbereder dokument for utskrift … +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Avbryt + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Slå av/på sidestolpe +toggle_sidebar_notification.title=Vis/gjem sidestolpe (dokumentet inneholder oversikt/vedlegg) +toggle_sidebar_label=Slå av/på sidestolpe +document_outline.title=Vis dokumentdisposisjonen (dobbeltklikk for å utvide/skjule alle elementer) +document_outline_label=Dokumentdisposisjon +attachments.title=Vis vedlegg +attachments_label=Vedlegg +thumbs.title=Vis miniatyrbilde +thumbs_label=Miniatyrbilde +findbar.title=Finn i dokumentet +findbar_label=Finn + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Side {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Side {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatyrbilde av side {{page}} + +# Find panel button title and messages +find_input.title=Søk +find_input.placeholder=Søk i dokument… +find_previous.title=Finn forrige forekomst av frasen +find_previous_label=Forrige +find_next.title=Finn neste forekomst av frasen +find_next_label=Neste +find_highlight=Uthev alle +find_match_case_label=Skill store/små bokstaver +find_entire_word_label=Hele ord +find_reached_top=Nådde toppen av dokumentet, fortsetter fra bunnen +find_reached_bottom=Nådde bunnen av dokumentet, fortsetter fra toppen +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} av {{total}} treff +find_match_count[two]={{current}} av {{total}} treff +find_match_count[few]={{current}} av {{total}} treff +find_match_count[many]={{current}} av {{total}} treff +find_match_count[other]={{current}} av {{total}} treff +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Mer enn {{limit}} treff +find_match_count_limit[one]=Mer enn {{limit}} treff +find_match_count_limit[two]=Mer enn {{limit}} treff +find_match_count_limit[few]=Mer enn {{limit}} treff +find_match_count_limit[many]=Mer enn {{limit}} treff +find_match_count_limit[other]=Mer enn {{limit}} treff +find_not_found=Fant ikke teksten + +# Error panel labels +error_more_info=Mer info +error_less_info=Mindre info +error_close=Lukk +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (bygg: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Melding: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stakk: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fil: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linje: {{line}} +rendering_error=En feil oppstod ved opptegning av siden. + +# Predefined zoom values +page_scale_width=Sidebredde +page_scale_fit=Tilpass til siden +page_scale_auto=Automatisk zoom +page_scale_actual=Virkelig størrelse +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}} % + +# Loading indicator messages +loading_error_indicator=Feil +loading_error=En feil oppstod ved lasting av PDF. +invalid_file_error=Ugyldig eller skadet PDF-fil. +missing_file_error=Manglende PDF-fil. +unexpected_response_error=Uventet serverrespons. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} annotasjon] +password_label=Skriv inn passordet for å åpne denne PDF-filen. +password_invalid=Ugyldig passord. Prøv igjen. +password_ok=OK +password_cancel=Avbryt + +printing_not_supported=Advarsel: Utskrift er ikke fullstendig støttet av denne nettleseren. +printing_not_ready=Advarsel: PDF er ikke fullstendig innlastet for utskrift. +web_fonts_disabled=Web-fonter er avslått: Kan ikke bruke innbundne PDF-fonter. +document_colors_not_allowed=PDF-dokumenter tillates ikke å bruke deres egne farger: "Tillat sider å velge egne farger" er deaktivert i nettleseren. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ne-NP/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ne-NP/viewer.properties new file mode 100644 index 0000000..13bf69b --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ne-NP/viewer.properties @@ -0,0 +1,184 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=अघिल्लो पृष्ठ +previous_label=अघिल्लो +next.title=पछिल्लो पृष्ठ +next_label=पछिल्लो + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=पृष्ठ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} मध्ये +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} को {{pageNumber}}) + +zoom_out.title=जुम घटाउनुहोस् +zoom_out_label=जुम घटाउनुहोस् +zoom_in.title=जुम बढाउनुहोस् +zoom_in_label=जुम बढाउनुहोस् +zoom.title=जुम गर्नुहोस् +presentation_mode.title=प्रस्तुति मोडमा जानुहोस् +presentation_mode_label=प्रस्तुति मोड +open_file.title=फाइल खोल्नुहोस् +open_file_label=खोल्नुहोस् +print.title=मुद्रण गर्नुहोस् +print_label=मुद्रण गर्नुहोस् +download.title=डाउनलोडहरू +download_label=डाउनलोडहरू +bookmark.title=वर्तमान दृश्य (प्रतिलिपि गर्नुहोस् वा नयाँ सञ्झ्यालमा खुल्नुहोस्) +bookmark_label=हालको दृश्य + +# Secondary toolbar and context menu +tools.title=औजारहरू +tools_label=औजारहरू +first_page.title=पहिलो पृष्ठमा जानुहोस् +first_page.label=पहिलो पृष्ठमा जानुहोस् +first_page_label=पहिलो पृष्ठमा जानुहोस् +last_page.title=पछिल्लो पृष्ठमा जानुहोस् +last_page.label=पछिल्लो पृष्ठमा जानुहोस् +last_page_label=पछिल्लो पृष्ठमा जानुहोस् +page_rotate_cw.title=घडीको दिशामा घुमाउनुहोस् +page_rotate_cw.label=घडीको दिशामा घुमाउनुहोस् +page_rotate_cw_label=घडीको दिशामा घुमाउनुहोस् +page_rotate_ccw.title=घडीको विपरित दिशामा घुमाउनुहोस् +page_rotate_ccw.label=घडीको विपरित दिशामा घुमाउनुहोस् +page_rotate_ccw_label=घडीको विपरित दिशामा घुमाउनुहोस् + +cursor_text_select_tool.title=पाठ चयन उपकरण सक्षम गर्नुहोस् +cursor_text_select_tool_label=पाठ चयन उपकरण +cursor_hand_tool.title=हाते उपकरण सक्षम गर्नुहोस् +cursor_hand_tool_label=हाते उपकरण + +# Document properties dialog box +document_properties.title=कागजात विशेषताहरू... +document_properties_label=कागजात विशेषताहरू... +document_properties_file_name=फाइल नाम: +document_properties_file_size=फाइल आकार: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=शीर्षक: +document_properties_author=लेखक: +document_properties_subject=विषयः +document_properties_keywords=शब्दकुञ्जीः +document_properties_creation_date=सिर्जना गरिएको मिति: +document_properties_modification_date=परिमार्जित मिति: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=सर्जक: +document_properties_producer=PDF निर्माता: +document_properties_version=PDF संस्करण +document_properties_page_count=पृष्ठ गणना: +document_properties_close=बन्द गर्नुहोस् + +print_progress_message=मुद्रणका लागि कागजात तयारी गरिदै… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=रद्द गर्नुहोस् + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=टगल साइडबार +toggle_sidebar_notification.title=साइडबार टगल गर्नुहोस् (कागजातमा समावेश भएको कुराहरू रूपरेखा/attachments) +toggle_sidebar_label=टगल साइडबार +document_outline.title=कागजातको रूपरेखा देखाउनुहोस् (सबै वस्तुहरू विस्तार/पतन गर्न डबल-क्लिक गर्नुहोस्) +document_outline_label=दस्तावेजको रूपरेखा +attachments.title=संलग्नहरू देखाउनुहोस् +attachments_label=संलग्नकहरू +thumbs.title=थम्बनेलहरू देखाउनुहोस् +thumbs_label=थम्बनेलहरू +findbar.title=कागजातमा फेला पार्नुहोस् +findbar_label=फेला पार्नुहोस् + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=पृष्ठ {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}} पृष्ठको थम्बनेल + +# Find panel button title and messages +find_input.title=फेला पार्नुहोस् +find_input.placeholder=कागजातमा फेला पार्नुहोस्… +find_previous.title=यस वाक्यांशको अघिल्लो घटना फेला पार्नुहोस् +find_previous_label=अघिल्लो +find_next.title=यस वाक्यांशको पछिल्लो घटना फेला पार्नुहोस् +find_next_label=अर्को +find_highlight=सबै हाइलाइट गर्ने +find_match_case_label=केस जोडा मिलाउनुहोस् +find_reached_top=पृष्ठको शिर्षमा पुगीयो, तलबाट जारी गरिएको थियो +find_reached_bottom=पृष्ठको अन्त्यमा पुगीयो, शिर्षबाट जारी गरिएको थियो +find_not_found=वाक्यांश फेला परेन + +# Error panel labels +error_more_info=थप जानकारी +error_less_info=कम जानकारी +error_close=बन्द गर्नुहोस् +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=सन्देश: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=स्ट्याक: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=फाइल: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=लाइन: {{line}} +rendering_error=पृष्ठ प्रतिपादन गर्दा एउटा त्रुटि देखापर्‍यो। + +# Predefined zoom values +page_scale_width=पृष्ठ चौडाइ +page_scale_fit=पृष्ठ ठिक्क मिल्ने +page_scale_auto=स्वचालित जुम +page_scale_actual=वास्तविक आकार +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=त्रुटि +loading_error=यो PDF लोड गर्दा एउटा त्रुटि देखापर्‍यो। +invalid_file_error=अवैध वा दुषित PDF फाइल। +missing_file_error=हराईरहेको PDF फाइल। +unexpected_response_error=अप्रत्याशित सर्भर प्रतिक्रिया। + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=यस PDF फाइललाई खोल्न गोप्यशब्द प्रविष्ट गर्नुहोस्। +password_invalid=अवैध गोप्यशब्द। पुनः प्रयास गर्नुहोस्। +password_ok=ठिक छ +password_cancel=रद्द गर्नुहोस् + +printing_not_supported=चेतावनी: यो ब्राउजरमा मुद्रण पूर्णतया समर्थित छैन। +printing_not_ready=चेतावनी: PDF मुद्रणका लागि पूर्णतया लोड भएको छैन। +web_fonts_disabled=वेब फन्ट असक्षम छन्: एम्बेडेड PDF फन्ट प्रयोग गर्न असमर्थ। +document_colors_not_allowed=PDF कागजातहरूलाई आफ्नै रङ प्रयोग गर्न अनुमति छैन: 'पृष्ठलाई आफ्नै रङ चयन गर्न अनुमति दिने' ब्राउजरमा निष्क्रिय गरिएको छ। diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/nl/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/nl/viewer.properties new file mode 100644 index 0000000..af8fb68 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/nl/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Vorige pagina +previous_label=Vorige +next.title=Volgende pagina +next_label=Volgende + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=van {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} van {{pagesCount}}) + +zoom_out.title=Uitzoomen +zoom_out_label=Uitzoomen +zoom_in.title=Inzoomen +zoom_in_label=Inzoomen +zoom.title=Zoomen +presentation_mode.title=Wisselen naar presentatiemodus +presentation_mode_label=Presentatiemodus +open_file.title=Bestand openen +open_file_label=Openen +print.title=Afdrukken +print_label=Afdrukken +download.title=Downloaden +download_label=Downloaden +bookmark.title=Huidige weergave (kopiëren of openen in nieuw venster) +bookmark_label=Huidige weergave + +# Secondary toolbar and context menu +tools.title=Hulpmiddelen +tools_label=Hulpmiddelen +first_page.title=Naar eerste pagina gaan +first_page.label=Naar eerste pagina gaan +first_page_label=Naar eerste pagina gaan +last_page.title=Naar laatste pagina gaan +last_page.label=Naar laatste pagina gaan +last_page_label=Naar laatste pagina gaan +page_rotate_cw.title=Rechtsom draaien +page_rotate_cw.label=Rechtsom draaien +page_rotate_cw_label=Rechtsom draaien +page_rotate_ccw.title=Linksom draaien +page_rotate_ccw.label=Linksom draaien +page_rotate_ccw_label=Linksom draaien + +cursor_text_select_tool.title=Tekstselectiehulpmiddel inschakelen +cursor_text_select_tool_label=Tekstselectiehulpmiddel +cursor_hand_tool.title=Handhulpmiddel inschakelen +cursor_hand_tool_label=Handhulpmiddel + +scroll_vertical.title=Verticaal scrollen gebruiken +scroll_vertical_label=Verticaal scrollen +scroll_horizontal.title=Horizontaal scrollen gebruiken +scroll_horizontal_label=Horizontaal scrollen +scroll_wrapped.title=Scrollen met terugloop gebruiken +scroll_wrapped_label=Scrollen met terugloop + +spread_none.title=Dubbele pagina’s niet samenvoegen +spread_none_label=Geen dubbele pagina’s +spread_odd.title=Dubbele pagina’s samenvoegen vanaf oneven pagina’s +spread_odd_label=Oneven dubbele pagina’s +spread_even.title=Dubbele pagina’s samenvoegen vanaf even pagina’s +spread_even_label=Even dubbele pagina’s + +# Document properties dialog box +document_properties.title=Documenteigenschappen… +document_properties_label=Documenteigenschappen… +document_properties_file_name=Bestandsnaam: +document_properties_file_size=Bestandsgrootte: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Titel: +document_properties_author=Auteur: +document_properties_subject=Onderwerp: +document_properties_keywords=Trefwoorden: +document_properties_creation_date=Aanmaakdatum: +document_properties_modification_date=Wijzigingsdatum: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Maker: +document_properties_producer=PDF-producent: +document_properties_version=PDF-versie: +document_properties_page_count=Aantal pagina’s: +document_properties_page_size=Paginagrootte: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=staand +document_properties_page_size_orientation_landscape=liggend +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Snelle webweergave: +document_properties_linearized_yes=Ja +document_properties_linearized_no=Nee +document_properties_close=Sluiten + +print_progress_message=Document voorbereiden voor afdrukken… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Annuleren + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Zijbalk in-/uitschakelen +toggle_sidebar_notification.title=Zijbalk in-/uitschakelen (document bevat overzicht/bijlagen) +toggle_sidebar_label=Zijbalk in-/uitschakelen +document_outline.title=Documentoverzicht tonen (dubbelklik om alle items uit/samen te vouwen) +document_outline_label=Documentoverzicht +attachments.title=Bijlagen tonen +attachments_label=Bijlagen +thumbs.title=Miniaturen tonen +thumbs_label=Miniaturen +findbar.title=Zoeken in document +findbar_label=Zoeken + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Pagina {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pagina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatuur van pagina {{page}} + +# Find panel button title and messages +find_input.title=Zoeken +find_input.placeholder=Zoeken in document… +find_previous.title=De vorige overeenkomst van de tekst zoeken +find_previous_label=Vorige +find_next.title=De volgende overeenkomst van de tekst zoeken +find_next_label=Volgende +find_highlight=Alles markeren +find_match_case_label=Hoofdlettergevoelig +find_entire_word_label=Hele woorden +find_reached_top=Bovenkant van document bereikt, doorgegaan vanaf onderkant +find_reached_bottom=Onderkant van document bereikt, doorgegaan vanaf bovenkant +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} van {{total}} overeenkomst +find_match_count[two]={{current}} van {{total}} overeenkomsten +find_match_count[few]={{current}} van {{total}} overeenkomsten +find_match_count[many]={{current}} van {{total}} overeenkomsten +find_match_count[other]={{current}} van {{total}} overeenkomsten +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Meer dan {{limit}} overeenkomsten +find_match_count_limit[one]=Meer dan {{limit}} overeenkomst +find_match_count_limit[two]=Meer dan {{limit}} overeenkomsten +find_match_count_limit[few]=Meer dan {{limit}} overeenkomsten +find_match_count_limit[many]=Meer dan {{limit}} overeenkomsten +find_match_count_limit[other]=Meer dan {{limit}} overeenkomsten +find_not_found=Tekst niet gevonden + +# Error panel labels +error_more_info=Meer informatie +error_less_info=Minder informatie +error_close=Sluiten +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Bericht: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Bestand: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Regel: {{line}} +rendering_error=Er is een fout opgetreden bij het weergeven van de pagina. + +# Predefined zoom values +page_scale_width=Paginabreedte +page_scale_fit=Hele pagina +page_scale_auto=Automatisch zoomen +page_scale_actual=Werkelijke grootte +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Fout +loading_error=Er is een fout opgetreden bij het laden van de PDF. +invalid_file_error=Ongeldig of beschadigd PDF-bestand. +missing_file_error=PDF-bestand ontbreekt. +unexpected_response_error=Onverwacht serverantwoord. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}}-aantekening] +password_label=Voer het wachtwoord in om dit PDF-bestand te openen. +password_invalid=Ongeldig wachtwoord. Probeer het opnieuw. +password_ok=OK +password_cancel=Annuleren + +printing_not_supported=Waarschuwing: afdrukken wordt niet volledig ondersteund door deze browser. +printing_not_ready=Waarschuwing: de PDF is niet volledig geladen voor afdrukken. +web_fonts_disabled=Weblettertypen zijn uitgeschakeld: gebruik van ingebedde PDF-lettertypen is niet mogelijk. +document_colors_not_allowed=PDF-documenten mogen hun eigen kleuren niet gebruiken: ‘Pagina’s toestaan om hun eigen kleuren te kiezen’ is uitgeschakeld in de browser. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/nn-NO/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/nn-NO/viewer.properties new file mode 100644 index 0000000..ad6de8f --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/nn-NO/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Føregåande side +previous_label=Føregåande +next.title=Neste side +next_label=Neste + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Side +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=av {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} av {{pagesCount}}) + +zoom_out.title=Zoom ut +zoom_out_label=Zoom ut +zoom_in.title=Zoom inn +zoom_in_label=Zoom inn +zoom.title=Zoom +presentation_mode.title=Byt til presentasjonsmodus +presentation_mode_label=Presentasjonsmodus +open_file.title=Opne fil +open_file_label=Opne +print.title=Skriv ut +print_label=Skriv ut +download.title=Last ned +download_label=Last ned +bookmark.title=Gjeldande vising (kopier eller opne i nytt vindauge) +bookmark_label=Gjeldande vising + +# Secondary toolbar and context menu +tools.title=Verktøy +tools_label=Verktøy +first_page.title=Gå til første side +first_page.label=Gå til første side +first_page_label=Gå til første side +last_page.title=Gå til siste side +last_page.label=Gå til siste side +last_page_label=Gå til siste side +page_rotate_cw.title=Roter med klokka +page_rotate_cw.label=Roter med klokka +page_rotate_cw_label=Roter med klokka +page_rotate_ccw.title=Roter mot klokka +page_rotate_ccw.label=Roter mot klokka +page_rotate_ccw_label=Roter mot klokka + +cursor_text_select_tool.title=Aktiver tekstmarkeringsverktøy +cursor_text_select_tool_label=Tekstmarkeringsverktøy +cursor_hand_tool.title=Aktiver handverktøy +cursor_hand_tool_label=Handverktøy + +scroll_vertical.title=Bruk vertikal rulling +scroll_vertical_label=Vertikal rulling +scroll_horizontal.title=Bruk horisontal rulling +scroll_horizontal_label=Horisontal rulling +scroll_wrapped.title=Bruk fleirsiderulling +scroll_wrapped_label=Fleirsiderulling + +spread_none.title=Vis enkeltsider +spread_none_label=Enkeltside +spread_odd.title=Vis oppslag med ulike sidenummer til venstre +spread_odd_label=Oppslag med framside +spread_even.title=Vis oppslag med like sidenummmer til venstre +spread_even_label=Oppslag utan framside + +# Document properties dialog box +document_properties.title=Dokumenteigenskapar… +document_properties_label=Dokumenteigenskapar… +document_properties_file_name=Filnamn: +document_properties_file_size=Filstorleik: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Tittel: +document_properties_author=Forfattar: +document_properties_subject=Emne: +document_properties_keywords=Stikkord: +document_properties_creation_date=Dato oppretta: +document_properties_modification_date=Dato endra: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Oppretta av: +document_properties_producer=PDF-verktøy: +document_properties_version=PDF-versjon: +document_properties_page_count=Sidetal: +document_properties_page_size=Sidestørrelse: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=ståande +document_properties_page_size_orientation_landscape=liggande +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Brev +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Rask nettvising: +document_properties_linearized_yes=Ja +document_properties_linearized_no=Nei +document_properties_close=Lat att + +print_progress_message=Førebur dokumentet for utskrift… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Avbryt + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Slå av/på sidestolpe +toggle_sidebar_notification.title=Vis/gøym sidestolpen (dokumentet inneheld oversikt/vedlegg) +toggle_sidebar_label=Slå av/på sidestolpe +document_outline.title=Vis dokumentdisposisjonen (dobbelklikk for å utvide/gøyme alle elementa) +document_outline_label=Dokumentdisposisjon +attachments.title=Vis vedlegg +attachments_label=Vedlegg +thumbs.title=Vis miniatyrbilde +thumbs_label=Miniatyrbilde +findbar.title=Finn i dokumentet +findbar_label=Finn + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Side {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Side {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatyrbilde av side {{page}} + +# Find panel button title and messages +find_input.title=Søk +find_input.placeholder=Søk i dokument… +find_previous.title=Finn førre førekomst av frasen +find_previous_label=Førre +find_next.title=Finn neste førekomst av frasen +find_next_label=Neste +find_highlight=Uthev alle +find_match_case_label=Skil store/små bokstavar +find_entire_word_label=Heile ord +find_reached_top=Nådde toppen av dokumentet, fortset frå botnen +find_reached_bottom=Nådde botnen av dokumentet, fortset frå toppen +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} av {{total}} treff +find_match_count[two]={{current}} av {{total}} treff +find_match_count[few]={{current}} av {{total}} treff +find_match_count[many]={{current}} av {{total}} treff +find_match_count[other]={{current}} av {{total}} treff +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Meir enn {{limit}} treff +find_match_count_limit[one]=Meir enn {{limit}} treff +find_match_count_limit[two]=Meir enn {{limit}} treff +find_match_count_limit[few]=Meir enn {{limit}} treff +find_match_count_limit[many]=Meir enn {{limit}} treff +find_match_count_limit[other]=Meir enn {{limit}} treff +find_not_found=Fann ikkje teksten + +# Error panel labels +error_more_info=Meir info +error_less_info=Mindre info +error_close=Lat att +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (bygg: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Melding: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stakk: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fil: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linje: {{line}} +rendering_error=Ein feil oppstod under vising av sida. + +# Predefined zoom values +page_scale_width=Sidebreidde +page_scale_fit=Tilpass til sida +page_scale_auto=Automatisk skalering +page_scale_actual=Verkeleg storleik +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Feil +loading_error=Ein feil oppstod ved lasting av PDF. +invalid_file_error=Ugyldig eller korrupt PDF-fil. +missing_file_error=Manglande PDF-fil. +unexpected_response_error=Uventa tenarrespons. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} annotasjon] +password_label=Skriv inn passordet for å opne denne PDF-fila. +password_invalid=Ugyldig passord. Prøv igjen. +password_ok=OK +password_cancel=Avbryt + +printing_not_supported=Åtvaring: Utskrift er ikkje fullstendig støtta av denne nettlesaren. +printing_not_ready=Åtvaring: PDF ikkje fullstendig innlasta for utskrift. +web_fonts_disabled=Web-skrifter er slått av: Kan ikkje bruke innbundne PDF-skrifter. +document_colors_not_allowed=PDF-dokument kan ikkje bruke eigne fargar: «Tillat sider å velje eigne fargar» er deaktivert i nettlesaren. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/oc/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/oc/viewer.properties new file mode 100644 index 0000000..3732e94 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/oc/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pagina precedenta +previous_label=Precedent +next.title=Pagina seguenta +next_label=Seguent + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=sus {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} sus {{pagesCount}}) + +zoom_out.title=Zoom arrièr +zoom_out_label=Zoom arrièr +zoom_in.title=Zoom avant +zoom_in_label=Zoom avant +zoom.title=Zoom +presentation_mode.title=Bascular en mòde presentacion +presentation_mode_label=Mòde Presentacion +open_file.title=Dobrir lo fichièr +open_file_label=Dobrir +print.title=Imprimir +print_label=Imprimir +download.title=Telecargar +download_label=Telecargar +bookmark.title=Afichatge corrent (copiar o dobrir dins una fenèstra novèla) +bookmark_label=Afichatge actual + +# Secondary toolbar and context menu +tools.title=Aisinas +tools_label=Aisinas +first_page.title=Anar a la primièra pagina +first_page.label=Anar a la primièra pagina +first_page_label=Anar a la primièra pagina +last_page.title=Anar a la darrièra pagina +last_page.label=Anar a la darrièra pagina +last_page_label=Anar a la darrièra pagina +page_rotate_cw.title=Rotacion orària +page_rotate_cw.label=Rotacion orària +page_rotate_cw_label=Rotacion orària +page_rotate_ccw.title=Rotacion antiorària +page_rotate_ccw.label=Rotacion antiorària +page_rotate_ccw_label=Rotacion antiorària + +cursor_text_select_tool.title=Activar l'aisina de seleccion de tèxte +cursor_text_select_tool_label=Aisina de seleccion de tèxte +cursor_hand_tool.title=Activar l’aisina man +cursor_hand_tool_label=Aisina man + +scroll_vertical.title=Utilizar lo desfilament vertical +scroll_vertical_label=Desfilament vertical +scroll_horizontal.title=Utilizar lo desfilament orizontal +scroll_horizontal_label=Desfilament orizontal +scroll_wrapped.title=Activar lo desfilament continú +scroll_wrapped_label=Desfilament continú + +spread_none.title=Agropar pas las paginas doas a doas +spread_none_label=Una sola pagina +spread_odd.title=Mostrar doas paginas en començant per las paginas imparas a esquèrra +spread_odd_label=Dobla pagina, impara a drecha +spread_even.title=Mostrar doas paginas en començant per las paginas paras a esquèrra +spread_even_label=Dobla pagina, para a drecha + +# Document properties dialog box +document_properties.title=Proprietats del document… +document_properties_label=Proprietats del document… +document_properties_file_name=Nom del fichièr : +document_properties_file_size=Talha del fichièr : +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} Ko ({{size_b}} octets) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} Mo ({{size_b}} octets) +document_properties_title=Títol : +document_properties_author=Autor : +document_properties_subject=Subjècte : +document_properties_keywords=Mots claus : +document_properties_creation_date=Data de creacion : +document_properties_modification_date=Data de modificacion : +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creator : +document_properties_producer=Aisina de conversion PDF : +document_properties_version=Version PDF : +document_properties_page_count=Nombre de paginas : +document_properties_page_size=Talha de la pagina : +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=retrait +document_properties_page_size_orientation_landscape=païsatge +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letra +document_properties_page_size_name_legal=Document juridic +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vista web rapida : +document_properties_linearized_yes=Òc +document_properties_linearized_no=Non +document_properties_close=Tampar + +print_progress_message=Preparacion del document per l’impression… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Anullar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Afichar/amagar lo panèl lateral +toggle_sidebar_notification.title=Afichar/amagar lo panèl lateral (lo document conten esquèmas/pèças juntas) +toggle_sidebar_label=Afichar/amagar lo panèl lateral +document_outline.title=Mostrar los esquèmas del document (dobleclicar per espandre/reduire totes los elements) +document_outline_label=Marcapaginas del document +attachments.title=Visualizar las pèças juntas +attachments_label=Pèças juntas +thumbs.title=Afichar las vinhetas +thumbs_label=Vinhetas +findbar.title=Cercar dins lo document +findbar_label=Recercar + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Pagina {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pagina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Vinheta de la pagina {{page}} + +# Find panel button title and messages +find_input.title=Recercar +find_input.placeholder=Cercar dins lo document… +find_previous.title=Tròba l'ocurréncia precedenta de la frasa +find_previous_label=Precedent +find_next.title=Tròba l'ocurréncia venenta de la frasa +find_next_label=Seguent +find_highlight=Suslinhar tot +find_match_case_label=Respectar la cassa +find_entire_word_label=Mots entièrs +find_reached_top=Naut de la pagina atenh, perseguida del bas +find_reached_bottom=Bas de la pagina atench, perseguida al començament +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]=Occuréncia {{current}} sus {{total}} +find_match_count[two]=Occuréncia {{current}} sus {{total}} +find_match_count[few]=Occuréncia {{current}} sus {{total}} +find_match_count[many]=Occuréncia {{current}} sus {{total}} +find_match_count[other]=Occuréncia {{current}} sus {{total}} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Mai de {{limit}} occuréncias +find_match_count_limit[one]=Mai de {{limit}} occuréncia +find_match_count_limit[two]=Mai de {{limit}} occuréncias +find_match_count_limit[few]=Mai de {{limit}} occuréncias +find_match_count_limit[many]=Mai de {{limit}} occuréncias +find_match_count_limit[other]=Mai de {{limit}} occuréncias +find_not_found=Frasa pas trobada + +# Error panel labels +error_more_info=Mai de detalhs +error_less_info=Mens d'informacions +error_close=Tampar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (identificant de compilacion : {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Messatge : {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila : {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fichièr : {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linha : {{line}} +rendering_error=Una error s'es produita pendent l'afichatge de la pagina. + +# Predefined zoom values +page_scale_width=Largor plena +page_scale_fit=Pagina entièra +page_scale_auto=Zoom automatic +page_scale_actual=Talha vertadièra +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=Una error s'es produita pendent lo cargament del fichièr PDF. +invalid_file_error=Fichièr PDF invalid o corromput. +missing_file_error=Fichièr PDF mancant. +unexpected_response_error=Responsa de servidor imprevista. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} a {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotacion {{type}}] +password_label=Picatz lo senhal per dobrir aqueste fichièr PDF. +password_invalid=Senhal incorrècte. Tornatz ensajar. +password_ok=D'acòrdi +password_cancel=Anullar + +printing_not_supported=Atencion : l'impression es pas completament gerida per aqueste navegador. +printing_not_ready=Atencion : lo PDF es pas entièrament cargat per lo poder imprimir. +web_fonts_disabled=Las poliças web son desactivadas : impossible d'utilizar las poliças integradas al PDF. +document_colors_not_allowed=Los documents PDF pòdon pas utilizar lors pròprias colors : « Autorizar las paginas web d'utilizar lors pròprias colors » es desactivat dins lo navegador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/pa-IN/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/pa-IN/viewer.properties new file mode 100644 index 0000000..e1ccb65 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/pa-IN/viewer.properties @@ -0,0 +1,246 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=ਪਿਛਲਾ ਸਫ਼ਾ +previous_label=ਪਿੱਛੇ +next.title=ਅਗਲਾ ਸਫ਼ਾ +next_label=ਅੱਗੇ + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=ਸਫ਼ਾ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} ਵਿੱਚੋਂ +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages={{pagesCount}}) ਵਿੱਚੋਂ ({{pageNumber}} + +zoom_out.title=ਜ਼ੂਮ ਆਉਟ +zoom_out_label=ਜ਼ੂਮ ਆਉਟ +zoom_in.title=ਜ਼ੂਮ ਇਨ +zoom_in_label=ਜ਼ੂਮ ਇਨ +zoom.title=ਜ਼ੂਨ +presentation_mode.title=ਪਰਿਜੈਂਟੇਸ਼ਨ ਮੋਡ ਵਿੱਚ ਜਾਓ +presentation_mode_label=ਪਰਿਜੈਂਟੇਸ਼ਨ ਮੋਡ +open_file.title=ਫਾਈਲ ਨੂੰ ਖੋਲ੍ਹੋ +open_file_label=ਖੋਲ੍ਹੋ +print.title=ਪਰਿੰਟ +print_label=ਪਰਿੰਟ +download.title=ਡਾਊਨਲੋਡ +download_label=ਡਾਊਨਲੋਡ +bookmark.title=ਮੌਜੂਦਾ ਝਲਕ (ਨਵੀਂ ਵਿੰਡੋ ਵਿੱਚ ਕਾਪੀ ਕਰੋ ਜਾਂ ਖੋਲ੍ਹੋ) +bookmark_label=ਮੌਜੂਦਾ ਝਲਕ + +# Secondary toolbar and context menu +tools.title=ਟੂਲ +tools_label=ਟੂਲ +first_page.title=ਪਹਿਲੇ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ +first_page.label=ਪਹਿਲੇ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ +first_page_label=ਪਹਿਲੇ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ +last_page.title=ਆਖਰੀ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ +last_page.label=ਆਖਰੀ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ +last_page_label=ਆਖਰੀ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ +page_rotate_cw.title=ਸੱਜੇ ਦਾਅ ਘੁੰਮਾਓ +page_rotate_cw.label=ਸੱਜੇ ਦਾਅ ਘੁੰਮਾਉ +page_rotate_cw_label=ਸੱਜੇ ਦਾਅ ਘੁੰਮਾਓ +page_rotate_ccw.title=ਖੱਬੇ ਦਾਅ ਘੁੰਮਾਓ +page_rotate_ccw.label=ਖੱਬੇ ਦਾਅ ਘੁੰਮਾਉ +page_rotate_ccw_label=ਖੱਬੇ ਦਾਅ ਘੁੰਮਾਓ + +cursor_text_select_tool.title=ਲਿਖਤ ਚੋਣ ਟੂਲ ਸਮਰੱਥ ਕਰੋ +cursor_text_select_tool_label=ਲਿਖਤ ਚੋਣ ਟੂਲ +cursor_hand_tool.title=ਹੱਥ ਟੂਲ ਸਮਰੱਥ ਕਰੋ +cursor_hand_tool_label=ਹੱਥ ਟੂਲ + +scroll_vertical.title=ਖੜ੍ਹਵੇਂ ਸਕਰਾਉਣ ਨੂੰ ਵਰਤੋਂ +scroll_vertical_label=ਖੜ੍ਹਵਾਂ ਸਰਕਾਉਣਾ +scroll_horizontal.title=ਲੇਟਵੇਂ ਸਰਕਾਉਣ ਨੂੰ ਵਰਤੋਂ +scroll_horizontal_label=ਲੇਟਵਾਂ ਸਰਕਾਉਣਾ +scroll_wrapped.title=ਸਮੇਟੇ ਸਰਕਾਉਣ ਨੂੰ ਵਰਤੋਂ +scroll_wrapped_label=ਸਮੇਟਿਆ ਸਰਕਾਉਣਾ + +spread_none.title=ਸਫ਼ਾ ਫੈਲਾਅ ਵਿੱਚ ਸ਼ਾਮਲ ਨਾ ਹੋਵੋ +spread_none_label=ਕੋਈ ਫੈਲਾਅ ਨਹੀਂ +spread_odd.title=ਅਜੀਬ-ਨੰਬਰ ਵਾਲੇ ਪੰਨਿਆਂ ਨਾਲ ਸ਼ੁਰੂ ਹੋਣ ਵਾਲੇ ਪੰਨੇ ਸਪਰਸ਼ਾਂ ਵਿੱਚ ਸ਼ਾਮਲ ਹੋਵੋ +spread_even.title=ਜਿਸਤ ਨੰਬਰ ਵਾਲੇ ਸਫ਼ਿਆਂ ਨਾਲ ਸ਼ੁਰੂ ਹੋਣ ਵਾਲੇ ਸਫਿਆਂ ਵਿੱਚ ਸ਼ਾਮਲ ਹੋਵੋ + +# Document properties dialog box +document_properties.title=…ਦਸਤਾਵੇਜ਼ ਦੀ ਵਿਸ਼ੇਸ਼ਤਾ +document_properties_label=…ਦਸਤਾਵੇਜ਼ ਦੀ ਵਿਸ਼ੇਸ਼ਤਾ +document_properties_file_name=ਫਾਈਲ ਦਾ ਨਾਂ: +document_properties_file_size=ਫਾਈਲ ਦਾ ਆਕਾਰ: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} ਬਾਈਟ) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} ਬਾਈਟ) +document_properties_title=ਟਾਈਟਲ: +document_properties_author=ਲੇਖਕ: +document_properties_subject=ਵਿਸ਼ਾ: +document_properties_keywords=ਸ਼ਬਦ: +document_properties_creation_date=ਬਣਾਉਣ ਦੀ ਮਿਤੀ: +document_properties_modification_date=ਸੋਧ ਦੀ ਮਿਤੀ: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=ਨਿਰਮਾਤਾ: +document_properties_producer=PDF ਪ੍ਰੋਡਿਊਸਰ: +document_properties_version=PDF ਵਰਜਨ: +document_properties_page_count=ਸਫ਼ੇ ਦੀ ਗਿਣਤੀ: +document_properties_page_size=ਸਫ਼ਾ ਆਕਾਰ: +document_properties_page_size_unit_inches=ਇੰਚ +document_properties_page_size_unit_millimeters=ਮਿਮੀ +document_properties_page_size_orientation_portrait=ਪੋਰਟਰੇਟ +document_properties_page_size_orientation_landscape=ਲੈਂਡਸਕੇਪ +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=ਲੈਟਰ +document_properties_page_size_name_legal=ਕਨੂੰਨੀ +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=ਤੇਜ਼ ਵੈੱਬ ਝਲਕ: +document_properties_linearized_yes=ਹਾਂ +document_properties_linearized_no=ਨਹੀਂ +document_properties_close=ਬੰਦ ਕਰੋ + +print_progress_message=…ਪਰਿੰਟ ਕਰਨ ਲਈ ਦਸਤਾਵੇਜ਼ ਨੂੰ ਤਿਆਰ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ਰੱਦ ਕਰੋ + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=ਬਾਹੀ ਬਦਲੋ +toggle_sidebar_notification.title=ਬਾਹੀ ਨੂੰ ਬਦਲੋ (ਦਸਤਾਵੇਜ਼ ਖਾਕਾ/ਅਟੈਚਮੈਂਟਾਂ ਰੱਖਦਾ ਹੈ) +toggle_sidebar_label=ਬਾਹੀ ਬਦਲੋ +document_outline.title=ਦਸਤਾਵੇਜ਼ ਖਾਕਾ ਦਿਖਾਓ (ਸਾਰੀਆਂ ਆਈਟਮਾਂ ਨੂੰ ਫੈਲਾਉਣ/ਸਮੇਟਣ ਲਈ ਦੋ ਵਾਰ ਕਲਿੱਕ ਕਰੋ) +document_outline_label=ਦਸਤਾਵੇਜ਼ ਖਾਕਾ +attachments.title=ਅਟੈਚਮੈਂਟ ਵੇਖਾਓ +attachments_label=ਅਟੈਚਮੈਂਟਾਂ +thumbs.title=ਥੰਮਨੇਲ ਨੂੰ ਵੇਖਾਓ +thumbs_label=ਥੰਮਨੇਲ +findbar.title=ਦਸਤਾਵੇਜ਼ ਵਿੱਚ ਲੱਭੋ +findbar_label=ਲੱਭੋ + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=ਸਫ਼ਾ {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=ਸਫ਼ਾ {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}} ਸਫ਼ੇ ਦਾ ਥੰਮਨੇਲ + +# Find panel button title and messages +find_input.title=ਲੱਭੋ +find_input.placeholder=…ਦਸਤਾਵੇਜ਼ 'ਚ ਲੱਭੋ +find_previous.title=ਵਾਕ ਦੀ ਪਿਛਲੀ ਮੌਜੂਦਗੀ ਲੱਭੋ +find_previous_label=ਪਿੱਛੇ +find_next.title=ਵਾਕ ਦੀ ਅਗਲੀ ਮੌਜੂਦਗੀ ਲੱਭੋ +find_next_label=ਅੱਗੇ +find_highlight=ਸਭ ਉਭਾਰੋ +find_match_case_label=ਅੱਖਰ ਆਕਾਰ ਨੂੰ ਮਿਲਾਉ +find_entire_word_label=ਪੂਰੇ ਸ਼ਬਦ +find_reached_top=ਦਸਤਾਵੇਜ਼ ਦੇ ਉੱਤੇ ਆ ਗਏ ਹਾਂ, ਥੱਲੇ ਤੋਂ ਜਾਰੀ ਰੱਖਿਆ ਹੈ +find_reached_bottom=ਦਸਤਾਵੇਜ਼ ਦੇ ਅੰਤ ਉੱਤੇ ਆ ਗਏ ਹਾਂ, ਉੱਤੇ ਤੋਂ ਜਾਰੀ ਰੱਖਿਆ ਹੈ +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ +find_match_count[two]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ +find_match_count[few]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ +find_match_count[many]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ +find_match_count[other]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ +find_match_count_limit[one]={{limit}} ਮੇਲ ਤੋਂ ਵੱਧ +find_match_count_limit[two]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ +find_match_count_limit[few]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ +find_match_count_limit[many]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ +find_match_count_limit[other]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ +find_not_found=ਵਾਕ ਨਹੀਂ ਲੱਭਿਆ + +# Error panel labels +error_more_info=ਹੋਰ ਜਾਣਕਾਰੀ +error_less_info=ਘੱਟ ਜਾਣਕਾਰੀ +error_close=ਬੰਦ ਕਰੋ +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (ਬਿਲਡ: {{build}} +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=ਸੁਨੇਹਾ: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=ਸਟੈਕ: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ਫਾਈਲ: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=ਲਾਈਨ: {{line}} +rendering_error=ਸਫ਼ਾ ਰੈਡਰ ਕਰਨ ਦੇ ਦੌਰਾਨ ਗਲਤੀ ਆਈ ਹੈ। + +# Predefined zoom values +page_scale_width=ਸਫ਼ੇ ਦੀ ਚੌੜਾਈ +page_scale_fit=ਸਫ਼ਾ ਫਿੱਟ +page_scale_auto=ਆਟੋਮੈਟਿਕ ਜ਼ੂਮ ਕਰੋ +page_scale_actual=ਆਟੋਮੈਟਿਕ ਆਕਾਰ +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=ਗਲਤੀ +loading_error=PDF ਲੋਡ ਕਰਨ ਦੇ ਦੌਰਾਨ ਗਲਤੀ ਆਈ ਹੈ। +invalid_file_error=ਗਲਤ ਜਾਂ ਨਿਕਾਰਾ PDF ਫਾਈਲ ਹੈ। +missing_file_error=ਨਾ-ਮੌਜੂਦ PDF ਫਾਈਲ। +unexpected_response_error=ਅਣਜਾਣ ਸਰਵਰ ਜਵਾਬ। + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} ਵਿਆਖਿਆ] +password_label=ਇਹ PDF ਫਾਈਲ ਨੂੰ ਖੋਲ੍ਹਣ ਲਈ ਪਾਸਵਰਡ ਦਿਉ। +password_invalid=ਗਲਤ ਪਾਸਵਰਡ। ਫੇਰ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜੀ। +password_ok=ਠੀਕ ਹੈ +password_cancel=ਰੱਦ ਕਰੋ + +printing_not_supported=ਸਾਵਧਾਨ: ਇਹ ਬਰਾਊਜ਼ਰ ਪਰਿੰਟ ਕਰਨ ਲਈ ਪੂਰੀ ਤਰ੍ਹਾਂ ਸਹਾਇਕ ਨਹੀਂ ਹੈ। +printing_not_ready=ਸਾਵਧਾਨ: PDF ਨੂੰ ਪਰਿੰਟ ਕਰਨ ਲਈ ਪੂਰੀ ਤਰ੍ਹਾਂ ਲੋਡ ਨਹੀਂ ਹੈ। +web_fonts_disabled=ਵੈਬ ਫੋਂਟ ਬੰਦ ਹਨ: ਇੰਬੈਡ PDF ਫੋਂਟ ਨੂੰ ਵਰਤਣ ਲਈ ਅਸਮਰੱਥ ਹੈ। +document_colors_not_allowed=PDF ਦਸਤਾਵੇਜ਼ਾਂ ਨੂੰ ਆਪਣੇ ਰੰਗ ਵਰਤਣ ਦੀ ਇਜ਼ਾਜ਼ਤ ਨਹੀਂ ਹੈ।: ਬਰਾਊਜ਼ਰ ਵਿੱਚ “ਸਫ਼ਿਆਂ ਨੂੰ ਆਪਣੇ ਰੰਗ ਚੁਣਨ ਦੀ ਇਜ਼ਾਜ਼ਤ ਦਿਓ” ਨਾ-ਸਰਗਰਮ ਹੈ। diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/pl/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/pl/viewer.properties new file mode 100644 index 0000000..c18ea5e --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/pl/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Poprzednia strona +previous_label=Poprzednia +next.title=Następna strona +next_label=Następna + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Strona +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=z {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} z {{pagesCount}}) + +zoom_out.title=Pomniejsz +zoom_out_label=Pomniejsz +zoom_in.title=Powiększ +zoom_in_label=Powiększ +zoom.title=Skala +presentation_mode.title=Przełącz na tryb prezentacji +presentation_mode_label=Tryb prezentacji +open_file.title=Otwórz plik +open_file_label=Otwórz +print.title=Drukuj +print_label=Drukuj +download.title=Pobierz +download_label=Pobierz +bookmark.title=Bieżąca pozycja (skopiuj lub otwórz jako odnośnik w nowym oknie) +bookmark_label=Bieżąca pozycja + +# Secondary toolbar and context menu +tools.title=Narzędzia +tools_label=Narzędzia +first_page.title=Przejdź do pierwszej strony +first_page.label=Przejdź do pierwszej strony +first_page_label=Przejdź do pierwszej strony +last_page.title=Przejdź do ostatniej strony +last_page.label=Przejdź do ostatniej strony +last_page_label=Przejdź do ostatniej strony +page_rotate_cw.title=Obróć zgodnie z ruchem wskazówek zegara +page_rotate_cw.label=Obróć zgodnie z ruchem wskazówek zegara +page_rotate_cw_label=Obróć zgodnie z ruchem wskazówek zegara +page_rotate_ccw.title=Obróć przeciwnie do ruchu wskazówek zegara +page_rotate_ccw.label=Obróć przeciwnie do ruchu wskazówek zegara +page_rotate_ccw_label=Obróć przeciwnie do ruchu wskazówek zegara + +cursor_text_select_tool.title=Włącz narzędzie zaznaczania tekstu +cursor_text_select_tool_label=Narzędzie zaznaczania tekstu +cursor_hand_tool.title=Włącz narzędzie rączka +cursor_hand_tool_label=Narzędzie rączka + +scroll_vertical.title=Przewijaj dokument w pionie +scroll_vertical_label=Przewijanie pionowe +scroll_horizontal.title=Przewijaj dokument w poziomie +scroll_horizontal_label=Przewijanie poziome +scroll_wrapped.title=Strony dokumentu wyświetlaj i przewijaj w kolumnach +scroll_wrapped_label=Widok dwóch stron + +spread_none.title=Nie ustawiaj stron obok siebie +spread_none_label=Brak kolumn +spread_odd.title=Strony nieparzyste ustawiaj na lewo od parzystych +spread_odd_label=Nieparzyste po lewej +spread_even.title=Strony parzyste ustawiaj na lewo od nieparzystych +spread_even_label=Parzyste po lewej + +# Document properties dialog box +document_properties.title=Właściwości dokumentu… +document_properties_label=Właściwości dokumentu… +document_properties_file_name=Nazwa pliku: +document_properties_file_size=Rozmiar pliku: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} B) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} B) +document_properties_title=Tytuł: +document_properties_author=Autor: +document_properties_subject=Temat: +document_properties_keywords=Słowa kluczowe: +document_properties_creation_date=Data utworzenia: +document_properties_modification_date=Data modyfikacji: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Utworzony przez: +document_properties_producer=PDF wyprodukowany przez: +document_properties_version=Wersja PDF: +document_properties_page_count=Liczba stron: +document_properties_page_size=Wymiary strony: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=pionowa +document_properties_page_size_orientation_landscape=pozioma +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=US Letter +document_properties_page_size_name_legal=US Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}}×{{height}} {{unit}} (orientacja {{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}}×{{height}} {{unit}} ({{name}}, orientacja {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Szybki podgląd w Internecie: +document_properties_linearized_yes=tak +document_properties_linearized_no=nie +document_properties_close=Zamknij + +print_progress_message=Przygotowywanie dokumentu do druku… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Anuluj + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Przełącz panel boczny +toggle_sidebar_notification.title=Przełącz panel boczny (dokument zawiera konspekt/załączniki) +toggle_sidebar_label=Przełącz panel boczny +document_outline.title=Konspekt dokumentu (podwójne kliknięcie rozwija lub zwija wszystkie pozycje) +document_outline_label=Konspekt dokumentu +attachments.title=Załączniki +attachments_label=Załączniki +thumbs.title=Miniatury +thumbs_label=Miniatury +findbar.title=Znajdź w dokumencie +findbar_label=Znajdź + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas={{page}}. strona +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title={{page}}. strona +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura {{page}}. strony + +# Find panel button title and messages +find_input.title=Znajdź +find_input.placeholder=Znajdź w dokumencie… +find_previous.title=Znajdź poprzednie wystąpienie tekstu +find_previous_label=Poprzednie +find_next.title=Znajdź następne wystąpienie tekstu +find_next_label=Następne +find_highlight=Wyróżnianie wszystkich +find_match_case_label=Rozróżnianie wielkości liter +find_entire_word_label=Całe słowa +find_reached_top=Początek dokumentu. Wyszukiwanie od końca. +find_reached_bottom=Koniec dokumentu. Wyszukiwanie od początku. +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]=Pierwsze z {{total}} trafień +find_match_count[two]=Drugie z {{total}} trafień +find_match_count[few]={{current}}. z {{total}} trafień +find_match_count[many]={{current}}. z {{total}} trafień +find_match_count[other]={{current}}. z {{total}} trafień +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Brak trafień. +find_match_count_limit[one]=Więcej niż jedno trafienie. +find_match_count_limit[two]=Więcej niż dwa trafienia. +find_match_count_limit[few]=Więcej niż {{limit}} trafienia. +find_match_count_limit[many]=Więcej niż {{limit}} trafień. +find_match_count_limit[other]=Więcej niż {{limit}} trafień. +find_not_found=Nie znaleziono tekstu + +# Error panel labels +error_more_info=Więcej informacji +error_less_info=Mniej informacji +error_close=Zamknij +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (kompilacja: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Komunikat: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stos: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Plik: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Wiersz: {{line}} +rendering_error=Podczas renderowania strony wystąpił błąd. + +# Predefined zoom values +page_scale_width=Szerokość strony +page_scale_fit=Dopasowanie strony +page_scale_auto=Skala automatyczna +page_scale_actual=Rozmiar oryginalny +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Błąd +loading_error=Podczas wczytywania dokumentu PDF wystąpił błąd. +invalid_file_error=Nieprawidłowy lub uszkodzony plik PDF. +missing_file_error=Brak pliku PDF. +unexpected_response_error=Nieoczekiwana odpowiedź serwera. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Adnotacja: {{type}}] +password_label=Wprowadź hasło, aby otworzyć ten dokument PDF. +password_invalid=Nieprawidłowe hasło. Proszę spróbować ponownie. +password_ok=OK +password_cancel=Anuluj + +printing_not_supported=Ostrzeżenie: drukowanie nie jest w pełni obsługiwane przez tę przeglądarkę. +printing_not_ready=Ostrzeżenie: dokument PDF nie jest całkowicie wczytany, więc nie można go wydrukować. +web_fonts_disabled=Czcionki sieciowe są wyłączone: nie można użyć osadzonych czcionek PDF. +document_colors_not_allowed=Dokumenty PDF nie mogą używać własnych kolorów: opcja „Pozwalaj stronom stosować inne kolory” w przeglądarce jest nieaktywna. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/pt-BR/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/pt-BR/viewer.properties new file mode 100644 index 0000000..5947d2d --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/pt-BR/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Página anterior +previous_label=Anterior +next.title=Próxima página +next_label=Próxima + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Reduzir +zoom_out_label=Reduzir +zoom_in.title=Ampliar +zoom_in_label=Ampliar +zoom.title=Zoom +presentation_mode.title=Alternar para o modo de apresentação +presentation_mode_label=Modo de apresentação +open_file.title=Abrir arquivo +open_file_label=Abrir +print.title=Imprimir +print_label=Imprimir +download.title=Download +download_label=Download +bookmark.title=Visualização atual (copiar ou abrir em uma nova janela) +bookmark_label=Visualização atual + +# Secondary toolbar and context menu +tools.title=Ferramentas +tools_label=Ferramentas +first_page.title=Ir para a primeira página +first_page.label=Ir para a primeira página +first_page_label=Ir para a primeira página +last_page.title=Ir para a última página +last_page.label=Ir para a última página +last_page_label=Ir para a última página +page_rotate_cw.title=Girar no sentido horário +page_rotate_cw.label=Girar no sentido horário +page_rotate_cw_label=Girar no sentido horário +page_rotate_ccw.title=Girar no sentido anti-horário +page_rotate_ccw.label=Girar no sentido anti-horário +page_rotate_ccw_label=Girar no sentido anti-horário + +cursor_text_select_tool.title=Ativar a ferramenta de seleção de texto +cursor_text_select_tool_label=Ferramenta de seleção de texto +cursor_hand_tool.title=Ativar ferramenta de mão +cursor_hand_tool_label=Ferramenta de mão + +scroll_vertical.title=Usar rolagem vertical +scroll_vertical_label=Rolagem vertical +scroll_horizontal.title=Usar rolagem horizontal +scroll_horizontal_label=Rolagem horizontal +scroll_wrapped.title=Usar rolagem contida +scroll_wrapped_label=Rolagem contida + +spread_none.title=Não reagrupar páginas +spread_none_label=Não estender +spread_odd.title=Agrupar páginas começando em páginas com números ímpares +spread_odd_label=Estender ímpares +spread_even.title=Agrupar páginas começando em páginas com números pares +spread_even_label=Estender pares + +# Document properties dialog box +document_properties.title=Propriedades do documento… +document_properties_label=Propriedades do documento… +document_properties_file_name=Nome do arquivo: +document_properties_file_size=Tamanho do arquivo: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Título: +document_properties_author=Autor: +document_properties_subject=Assunto: +document_properties_keywords=Palavras-chave: +document_properties_creation_date=Data da criação: +document_properties_modification_date=Data da modificação: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Criação: +document_properties_producer=Criador do PDF: +document_properties_version=Versão do PDF: +document_properties_page_count=Número de páginas: +document_properties_page_size=Tamanho da página: +document_properties_page_size_unit_inches=pol. +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=retrato +document_properties_page_size_orientation_landscape=paisagem +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Carta +document_properties_page_size_name_legal=Jurídico +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Visualização rápida da Web: +document_properties_linearized_yes=Sim +document_properties_linearized_no=Não +document_properties_close=Fechar + +print_progress_message=Preparando documento para impressão… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=Cancelar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Alternar painel +toggle_sidebar_notification.title=Alternar o painel (documento contém marcadores e anexos) +toggle_sidebar_label=Alternar painel +document_outline.title=Mostrar a estrutura do documento (duplo-clique para expandir/recolher todos os ítens) +document_outline_label=Estrutura do documento +attachments.title=Mostrar anexos +attachments_label=Anexos +thumbs.title=Mostrar miniaturas +thumbs_label=Miniaturas +findbar.title=Procurar no documento +findbar_label=Procurar + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Página {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Página {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura da página {{page}} + +# Find panel button title and messages +find_input.title=Procurar +find_input.placeholder=Procurar no documento… +find_previous.title=Procurar a ocorrência anterior da frase +find_previous_label=Anterior +find_next.title=Procurar a próxima ocorrência da frase +find_next_label=Próxima +find_highlight=Realçar tudo +find_match_case_label=Diferenciar maiúsculas/minúsculas +find_entire_word_label=Palavras completas +find_reached_top=Início do documento alcançado, continuando do fim +find_reached_bottom=Fim do documento alcançado, continuando do início +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} de {{total}} ocorrência +find_match_count[two]={{current}} de {{total}} ocorrências +find_match_count[few]={{current}} de {{total}} ocorrências +find_match_count[many]={{current}} de {{total}} ocorrências +find_match_count[other]={{current}} de {{total}} ocorrências +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Mais de {{limit}} ocorrências +find_match_count_limit[one]=Mais de {{limit}} ocorrência +find_match_count_limit[two]=Mais de {{limit}} ocorrências +find_match_count_limit[few]=Mais de {{limit}} ocorrências +find_match_count_limit[many]=Mais de {{limit}} ocorrências +find_match_count_limit[other]=Mais de {{limit}} ocorrências +find_not_found=Frase não encontrada + +# Error panel labels +error_more_info=Mais informações +error_less_info=Menos informações +error_close=Fechar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (compilação: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensagem: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pilha: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Arquivo: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linha: {{line}} +rendering_error=Ocorreu um erro ao renderizar a página. + +# Predefined zoom values +page_scale_width=Largura da página +page_scale_fit=Ajustar à janela +page_scale_auto=Zoom automático +page_scale_actual=Tamanho real +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Erro +loading_error=Ocorreu um erro ao carregar o PDF. +invalid_file_error=Arquivo PDF corrompido ou inválido. +missing_file_error=Arquivo PDF ausente. +unexpected_response_error=Resposta inesperada do servidor. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotação {{type}}] +password_label=Forneça a senha para abrir este arquivo PDF. +password_invalid=Senha inválida. Tente novamente. +password_ok=OK +password_cancel=Cancelar + +printing_not_supported=Aviso: a impressão não é totalmente suportada neste navegador. +printing_not_ready=Aviso: o PDF não está totalmente carregado para impressão. +web_fonts_disabled=As fontes web estão desativadas: não foi possível usar fontes incorporadas do PDF. +document_colors_not_allowed=Documentos PDF não estão autorizados a usar as próprias cores: a opção “Permitir que as páginas escolham suas próprias cores” está desativada no navegador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/pt-PT/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/pt-PT/viewer.properties new file mode 100644 index 0000000..5129a52 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/pt-PT/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Página anterior +previous_label=Anterior +next.title=Página seguinte +next_label=Seguinte + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Reduzir +zoom_out_label=Reduzir +zoom_in.title=Ampliar +zoom_in_label=Ampliar +zoom.title=Zoom +presentation_mode.title=Trocar para o modo de apresentação +presentation_mode_label=Modo de apresentação +open_file.title=Abrir ficheiro +open_file_label=Abrir +print.title=Imprimir +print_label=Imprimir +download.title=Transferir +download_label=Transferir +bookmark.title=Vista atual (copiar ou abrir numa nova janela) +bookmark_label=Visão atual + +# Secondary toolbar and context menu +tools.title=Ferramentas +tools_label=Ferramentas +first_page.title=Ir para a primeira página +first_page.label=Ir para a primeira página +first_page_label=Ir para a primeira página +last_page.title=Ir para a última página +last_page.label=Ir para a última página +last_page_label=Ir para a última página +page_rotate_cw.title=Rodar à direita +page_rotate_cw.label=Rodar à direita +page_rotate_cw_label=Rodar à direita +page_rotate_ccw.title=Rodar à esquerda +page_rotate_ccw.label=Rodar à esquerda +page_rotate_ccw_label=Rodar à esquerda + +cursor_text_select_tool.title=Ativar ferramenta de seleção de texto +cursor_text_select_tool_label=Ferramenta de seleção de texto +cursor_hand_tool.title=Ativar ferramenta de mão +cursor_hand_tool_label=Ferramenta de mão + +scroll_vertical.title=Utilizar deslocação vertical +scroll_vertical_label=Deslocação vertical +scroll_horizontal.title=Utilizar deslocação horizontal +scroll_horizontal_label=Deslocação horizontal +scroll_wrapped.title=Utilizar deslocação encapsulada +scroll_wrapped_label=Deslocação encapsulada + +spread_none.title=Não juntar páginas dispersas +spread_none_label=Sem spreads +spread_odd.title=Juntar páginas dispersas a partir de páginas com números ímpares +spread_odd_label=Spreads ímpares +spread_even.title=Juntar páginas dispersas a partir de páginas com números pares +spread_even_label=Spreads pares + +# Document properties dialog box +document_properties.title=Propriedades do documento… +document_properties_label=Propriedades do documento… +document_properties_file_name=Nome do ficheiro: +document_properties_file_size=Tamanho do ficheiro: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Título: +document_properties_author=Autor: +document_properties_subject=Assunto: +document_properties_keywords=Palavras-chave: +document_properties_creation_date=Data de criação: +document_properties_modification_date=Data de modificação: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Criador: +document_properties_producer=Produtor de PDF: +document_properties_version=Versão do PDF: +document_properties_page_count=N.º de páginas: +document_properties_page_size=Tamanho da página: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=retrato +document_properties_page_size_orientation_landscape=paisagem +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Carta +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vista rápida web: +document_properties_linearized_yes=Sim +document_properties_linearized_no=Não +document_properties_close=Fechar + +print_progress_message=A preparar o documento para impressão… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Alternar barra lateral +toggle_sidebar_notification.title=Alternar barra lateral (documento contém contorno/anexos) +toggle_sidebar_label=Alternar barra lateral +document_outline.title=Mostrar esquema do documento (duplo clique para expandir/colapsar todos os itens) +document_outline_label=Esquema do documento +attachments.title=Mostrar anexos +attachments_label=Anexos +thumbs.title=Mostrar miniaturas +thumbs_label=Miniaturas +findbar.title=Localizar em documento +findbar_label=Localizar + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Página {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Página {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura da página {{page}} + +# Find panel button title and messages +find_input.title=Localizar +find_input.placeholder=Localizar em documento… +find_previous.title=Localizar ocorrência anterior da frase +find_previous_label=Anterior +find_next.title=Localizar ocorrência seguinte da frase +find_next_label=Seguinte +find_highlight=Destacar tudo +find_match_case_label=Correspondência +find_entire_word_label=Palavras completas +find_reached_top=Topo do documento atingido, a continuar a partir do fundo +find_reached_bottom=Fim do documento atingido, a continuar a partir do topo +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} de {{total}} correspondência +find_match_count[two]={{current}} de {{total}} correspondências +find_match_count[few]={{current}} de {{total}} correspondências +find_match_count[many]={{current}} de {{total}} correspondências +find_match_count[other]={{current}} de {{total}} correspondências +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Mais de {{limit}} correspondências +find_match_count_limit[one]=Mais de {{limit}} correspondência +find_match_count_limit[two]=Mais de {{limit}} correspondências +find_match_count_limit[few]=Mais de {{limit}} correspondências +find_match_count_limit[many]=Mais de {{limit}} correspondências +find_match_count_limit[other]=Mais de {{limit}} correspondências +find_not_found=Frase não encontrada + +# Error panel labels +error_more_info=Mais informação +error_less_info=Menos informação +error_close=Fechar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (compilação: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensagem: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Ficheiro: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linha: {{line}} +rendering_error=Ocorreu um erro ao processar a página. + +# Predefined zoom values +page_scale_width=Ajustar à largura +page_scale_fit=Ajustar à página +page_scale_auto=Zoom automático +page_scale_actual=Tamanho real +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Erro +loading_error=Ocorreu um erro ao carregar o PDF. +invalid_file_error=Ficheiro PDF inválido ou danificado. +missing_file_error=Ficheiro PDF inexistente. +unexpected_response_error=Resposta inesperada do servidor. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotação {{type}}] +password_label=Introduza a palavra-passe para abrir este ficheiro PDF. +password_invalid=Palavra-passe inválida. Por favor, tente novamente. +password_ok=OK +password_cancel=Cancelar + +printing_not_supported=Aviso: a impressão não é totalmente suportada por este navegador. +printing_not_ready=Aviso: o PDF ainda não está totalmente carregado. +web_fonts_disabled=Os tipos de letra web estão desativados: não é possível utilizar os tipos de letra PDF embutidos. +document_colors_not_allowed=Os documentos PDF não permitem a utilização das suas próprias cores: “Permitir às páginas escolher as suas próprias cores” está desativado no navegador. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/rm/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/rm/viewer.properties new file mode 100644 index 0000000..99aca5c --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/rm/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pagina precedenta +previous_label=Enavos +next.title=Proxima pagina +next_label=Enavant + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=da {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} da {{pagesCount}}) + +zoom_out.title=Empitschnir +zoom_out_label=Empitschnir +zoom_in.title=Engrondir +zoom_in_label=Engrondir +zoom.title=Zoom +presentation_mode.title=Midar en il modus da preschentaziun +presentation_mode_label=Modus da preschentaziun +open_file.title=Avrir datoteca +open_file_label=Avrir +print.title=Stampar +print_label=Stampar +download.title=Telechargiar +download_label=Telechargiar +bookmark.title=Vista actuala (copiar u avrir en ina nova fanestra) +bookmark_label=Vista actuala + +# Secondary toolbar and context menu +tools.title=Utensils +tools_label=Utensils +first_page.title=Siglir a l'emprima pagina +first_page.label=Siglir a l'emprima pagina +first_page_label=Siglir a l'emprima pagina +last_page.title=Siglir a la davosa pagina +last_page.label=Siglir a la davosa pagina +last_page_label=Siglir a la davosa pagina +page_rotate_cw.title=Rotar en direcziun da l'ura +page_rotate_cw.label=Rotar en direcziun da l'ura +page_rotate_cw_label=Rotar en direcziun da l'ura +page_rotate_ccw.title=Rotar en direcziun cuntraria a l'ura +page_rotate_ccw.label=Rotar en direcziun cuntraria a l'ura +page_rotate_ccw_label=Rotar en direcziun cuntraria a l'ura + +cursor_text_select_tool.title=Activar l'utensil per selecziunar text +cursor_text_select_tool_label=Utensil per selecziunar text +cursor_hand_tool.title=Activar l'utensil da maun +cursor_hand_tool_label=Utensil da maun + +scroll_vertical.title=Utilisar il defilar vertical +scroll_vertical_label=Defilar vertical +scroll_horizontal.title=Utilisar il defilar orizontal +scroll_horizontal_label=Defilar orizontal +scroll_wrapped.title=Utilisar il defilar en colonnas +scroll_wrapped_label=Defilar en colonnas + +spread_none.title=Betg parallelisar las paginas +spread_none_label=Betg parallel +spread_odd.title=Parallelisar las paginas cun cumenzar cun paginas spèras +spread_odd_label=Parallel spèr +spread_even.title=Parallelisar las paginas cun cumenzar cun paginas pèras +spread_even_label=Parallel pèr + +# Document properties dialog box +document_properties.title=Caracteristicas dal document… +document_properties_label=Caracteristicas dal document… +document_properties_file_name=Num da la datoteca: +document_properties_file_size=Grondezza da la datoteca: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Titel: +document_properties_author=Autur: +document_properties_subject=Tema: +document_properties_keywords=Chavazzins: +document_properties_creation_date=Data da creaziun: +document_properties_modification_date=Data da modificaziun: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}} {{time}} +document_properties_creator=Creà da: +document_properties_producer=Creà il PDF cun: +document_properties_version=Versiun da PDF: +document_properties_page_count=Dumber da paginas: +document_properties_page_size=Grondezza da la pagina: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=vertical +document_properties_page_size_orientation_landscape=orizontal +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=Gea +document_properties_linearized_no=Na +document_properties_close=Serrar + +print_progress_message=Preparar il document per stampar… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Interrumper + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Activar/deactivar la trav laterala +toggle_sidebar_notification.title=Activar/deactivar la trav laterala (structura dal document/agiuntas) +toggle_sidebar_label=Activar/deactivar la trav laterala +document_outline.title=Mussar la structura dal document (cliccar duas giadas per extender/cumprimer tut ils elements) +document_outline_label=Structura dal document +attachments.title=Mussar agiuntas +attachments_label=Agiuntas +thumbs.title=Mussar las miniaturas +thumbs_label=Miniaturas +findbar.title=Tschertgar en il document +findbar_label=Tschertgar + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Pagina {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pagina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura da la pagina {{page}} + +# Find panel button title and messages +find_input.title=Tschertgar +find_input.placeholder=Tschertgar en il document… +find_previous.title=Tschertgar la posiziun precedenta da l'expressiun +find_previous_label=Enavos +find_next.title=Tschertgar la proxima posiziun da l'expressiun +find_next_label=Enavant +find_highlight=Relevar tuts +find_match_case_label=Resguardar maiusclas/minusclas +find_entire_word_label=Pleds entirs +find_reached_top=Il cumenzament dal document è cuntanschì, la tschertga cuntinuescha a la fin dal document +find_reached_bottom=La fin dal document è cuntanschì, la tschertga cuntinuescha al cumenzament dal document +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} dad {{total}} correspundenza +find_match_count[two]={{current}} da {{total}} correspundenzas +find_match_count[few]={{current}} da {{total}} correspundenzas +find_match_count[many]={{current}} da {{total}} correspundenzas +find_match_count[other]={{current}} da {{total}} correspundenzas +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Dapli che {{limit}} correspundenzas +find_match_count_limit[one]=Dapli che {{limit}} correspundenza +find_match_count_limit[two]=Dapli che {{limit}} correspundenzas +find_match_count_limit[few]=Dapli che {{limit}} correspundenzas +find_match_count_limit[many]=Dapli che {{limit}} correspundenzas +find_match_count_limit[other]=Dapli che {{limit}} correspundenzas +find_not_found=Impussibel da chattar l'expressiun + +# Error panel labels +error_more_info=Dapli infurmaziuns +error_less_info=Damain infurmaziuns +error_close=Serrar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Messadi: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Datoteca: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Lingia: {{line}} +rendering_error=Ina errur è cumparida cun visualisar questa pagina. + +# Predefined zoom values +page_scale_width=Ladezza da la pagina +page_scale_fit=Entira pagina +page_scale_auto=Zoom automatic +page_scale_actual=Grondezza actuala +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Errur +loading_error=Ina errur è cumparida cun chargiar il PDF. +invalid_file_error=Datoteca PDF nunvalida u donnegiada. +missing_file_error=Datoteca PDF manconta. +unexpected_response_error=Resposta nunspetgada dal server. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Annotaziun da {{type}}] +password_label=Endatescha il pled-clav per avrir questa datoteca da PDF. +password_invalid=Pled-clav nunvalid. Emprova anc ina giada. +password_ok=OK +password_cancel=Interrumper + +printing_not_supported=Attenziun: Il stampar na funcziunescha anc betg dal tut en quest navigatur. +printing_not_ready=Attenziun: Il PDF n'è betg chargià cumplettamain per stampar. +web_fonts_disabled=Scrittiras dal web èn deactivadas: impussibel dad utilisar las scrittiras integradas en il PDF. +document_colors_not_allowed=Documents da PDF na dastgan betg duvrar las atgnas colurs: 'Permetter a paginas da tscherner lur atgna colur' è deactivà en il navigatur. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ro/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ro/viewer.properties new file mode 100644 index 0000000..691d9dc --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ro/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pagina precedentă +previous_label=Înapoi +next.title=Pagina următoare +next_label=Înainte + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=din {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} din {{pagesCount}}) + +zoom_out.title=Micșorează +zoom_out_label=Micșorează +zoom_in.title=Mărește +zoom_in_label=Mărește +zoom.title=Focalizare +presentation_mode.title=Comută la modul de prezentare +presentation_mode_label=Mod de prezentare +open_file.title=Deschide un fișier +open_file_label=Deschide +print.title=Tipărește +print_label=Tipărește +download.title=Descarcă +download_label=Descarcă +bookmark.title=Vizualizare actuală (copiază sau deschide într-o fereastră nouă) +bookmark_label=Vizualizare actuală + +# Secondary toolbar and context menu +tools.title=Instrumente +tools_label=Instrumente +first_page.title=Mergi la prima pagină +first_page.label=Mergi la prima pagină +first_page_label=Mergi la prima pagină +last_page.title=Mergi la ultima pagină +last_page.label=Mergi la ultima pagină +last_page_label=Mergi la ultima pagină +page_rotate_cw.title=Rotește în sensul acelor de ceasornic +page_rotate_cw.label=Rotește în sensul acelor de ceasornic +page_rotate_cw_label=Rotește în sensul acelor de ceasornic +page_rotate_ccw.title=Rotește în sens invers al acelor de ceasornic +page_rotate_ccw.label=Rotește în sens invers al acelor de ceasornic +page_rotate_ccw_label=Rotește în sens invers al acelor de ceasornic + +cursor_text_select_tool.title=Activează instrumentul de selecție a textului +cursor_text_select_tool_label=Instrumentul de selecție a textului +cursor_hand_tool.title=Activează instrumentul mână +cursor_hand_tool_label=Unealta mână + +scroll_vertical.title=Folosește derularea verticală +scroll_vertical_label=Derulare verticală +scroll_horizontal.title=Folosește derularea orizontală +scroll_horizontal_label=Derulare orizontală +scroll_wrapped.title=Folosește derularea încadrată +scroll_wrapped_label=Derulare încadrată + +spread_none.title=Nu uni paginile broșate +spread_none_label=Fără pagini broșate +spread_odd.title=Unește paginile broșate începând cu cele impare +spread_odd_label=Broșare pagini impare +spread_even.title=Unește paginile broșate începând cu cele pare +spread_even_label=Broșare pagini pare + +# Document properties dialog box +document_properties.title=Proprietățile documentului… +document_properties_label=Proprietățile documentului… +document_properties_file_name=Numele fișierului: +document_properties_file_size=Mărimea fișierului: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} byți) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} byți) +document_properties_title=Titlu: +document_properties_author=Autor: +document_properties_subject=Subiect: +document_properties_keywords=Cuvinte cheie: +document_properties_creation_date=Data creării: +document_properties_modification_date=Data modificării: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Autor: +document_properties_producer=Producător PDF: +document_properties_version=Versiune PDF: +document_properties_page_count=Număr de pagini: +document_properties_page_size=Mărimea paginii: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portret +document_properties_page_size_orientation_landscape=peisaj +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Literă +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vizualizare web rapidă: +document_properties_linearized_yes=Da +document_properties_linearized_no=Nu +document_properties_close=Închide + +print_progress_message=Se pregătește documentul pentru tipărire… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Renunță + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Comută bara laterală +toggle_sidebar_notification.title=Comută bara laterală (documentul conține schițe/atașamente) +toggle_sidebar_label=Comută bara laterală +document_outline.title=Afișează schița documentului (dublu-clic pentru a extinde/restrânge toate elementele) +document_outline_label=Schița documentului +attachments.title=Afișează atașamentele +attachments_label=Atașamente +thumbs.title=Afișează miniaturi +thumbs_label=Miniaturi +findbar.title=Caută în document +findbar_label=Caută + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Pagina {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pagina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura paginii {{page}} + +# Find panel button title and messages +find_input.title=Caută +find_input.placeholder=Caută în document… +find_previous.title=Mergi la apariția anterioară a textului +find_previous_label=Înapoi +find_next.title=Mergi la apariția următoare a textului +find_next_label=Înainte +find_highlight=Evidențiază toate aparițiile +find_match_case_label=Ține cont de majuscule și minuscule +find_entire_word_label=Cuvinte întregi +find_reached_top=Am ajuns la începutul documentului, continuă de la sfârșit +find_reached_bottom=Am ajuns la sfârșitul documentului, continuă de la început +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} din {{total}} rezultat +find_match_count[two]={{current}} din {{total}} rezultate +find_match_count[few]={{current}} din {{total}} rezultate +find_match_count[many]={{current}} din {{total}} de rezultate +find_match_count[other]={{current}} din {{total}} de rezultate +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Peste {{limit}} rezultate +find_match_count_limit[one]=Peste {{limit}} rezultat +find_match_count_limit[two]=Peste {{limit}} rezultate +find_match_count_limit[few]=Peste {{limit}} rezultate +find_match_count_limit[many]=Peste {{limit}} de rezultate +find_match_count_limit[other]=Peste {{limit}} de rezultate +find_not_found=Nu s-a găsit textul + +# Error panel labels +error_more_info=Mai multe informații +error_less_info=Mai puține informații +error_close=Închide +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (versiunea compilată: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mesaj: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stivă: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fișier: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Rând: {{line}} +rendering_error=A intervenit o eroare la randarea paginii. + +# Predefined zoom values +page_scale_width=Lățime pagină +page_scale_fit=Potrivire la pagină +page_scale_auto=Focalizare automată +page_scale_actual=Mărime reală +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Eroare +loading_error=A intervenit o eroare la încărcarea PDF-ului. +invalid_file_error=Fișier PDF nevalid sau corupt. +missing_file_error=Fișier PDF lipsă. +unexpected_response_error=Răspuns neașteptat de la server. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Adnotare {{type}}] +password_label=Introdu parola pentru a deschide acest fișier PDF. +password_invalid=Parolă nevalidă. Te rugăm să încerci din nou. +password_ok=Ok +password_cancel=Renunță + +printing_not_supported=Avertisment: Tipărirea nu este suportată în totalitate de acest browser. +printing_not_ready=Avertisment: PDF-ul nu este încărcat complet pentru tipărire. +web_fonts_disabled=Fonturile web sunt dezactivate: nu se pot folosi fonturile PDF încorporate. +document_colors_not_allowed=Documentele PDF nu sunt autorizate să folosească propriile culori: „Permite paginilor să aleagă propriile culori” este dezactivat în browser. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ru/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ru/viewer.properties new file mode 100644 index 0000000..bf417bc --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ru/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Предыдущая страница +previous_label=Предыдущая +next.title=Следующая страница +next_label=Следующая + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Страница +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=из {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} из {{pagesCount}}) + +zoom_out.title=Уменьшить +zoom_out_label=Уменьшить +zoom_in.title=Увеличить +zoom_in_label=Увеличить +zoom.title=Масштаб +presentation_mode.title=Перейти в режим презентации +presentation_mode_label=Режим презентации +open_file.title=Открыть файл +open_file_label=Открыть +print.title=Печать +print_label=Печать +download.title=Загрузить +download_label=Загрузить +bookmark.title=Ссылка на текущий вид (скопировать или открыть в новом окне) +bookmark_label=Текущий вид + +# Secondary toolbar and context menu +tools.title=Инструменты +tools_label=Инструменты +first_page.title=Перейти на первую страницу +first_page.label=Перейти на первую страницу +first_page_label=Перейти на первую страницу +last_page.title=Перейти на последнюю страницу +last_page.label=Перейти на последнюю страницу +last_page_label=Перейти на последнюю страницу +page_rotate_cw.title=Повернуть по часовой стрелке +page_rotate_cw.label=Повернуть по часовой стрелке +page_rotate_cw_label=Повернуть по часовой стрелке +page_rotate_ccw.title=Повернуть против часовой стрелки +page_rotate_ccw.label=Повернуть против часовой стрелки +page_rotate_ccw_label=Повернуть против часовой стрелки + +cursor_text_select_tool.title=Включить Инструмент «Выделение текста» +cursor_text_select_tool_label=Инструмент «Выделение текста» +cursor_hand_tool.title=Включить Инструмент «Рука» +cursor_hand_tool_label=Инструмент «Рука» + +scroll_vertical.title=Использовать вертикальную прокрутку +scroll_vertical_label=Вертикальная прокрутка +scroll_horizontal.title=Использовать горизонтальную прокрутку +scroll_horizontal_label=Горизонтальная прокрутка +scroll_wrapped.title=Использовать масштабируемую прокрутку +scroll_wrapped_label=Масштабируемая прокрутка + +spread_none.title=Не использовать режим разворотов страниц +spread_none_label=Без разворотов страниц +spread_odd.title=Развороты начинаются с нечётных номеров страниц +spread_odd_label=Нечётные страницы слева +spread_even.title=Развороты начинаются с чётных номеров страниц +spread_even_label=Чётные страницы слева + +# Document properties dialog box +document_properties.title=Свойства документа… +document_properties_label=Свойства документа… +document_properties_file_name=Имя файла: +document_properties_file_size=Размер файла: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} КБ ({{size_b}} байт) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} МБ ({{size_b}} байт) +document_properties_title=Заголовок: +document_properties_author=Автор: +document_properties_subject=Тема: +document_properties_keywords=Ключевые слова: +document_properties_creation_date=Дата создания: +document_properties_modification_date=Дата изменения: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Приложение: +document_properties_producer=Производитель PDF: +document_properties_version=Версия PDF: +document_properties_page_count=Число страниц: +document_properties_page_size=Размер страницы: +document_properties_page_size_unit_inches=дюймов +document_properties_page_size_unit_millimeters=мм +document_properties_page_size_orientation_portrait=книжная +document_properties_page_size_orientation_landscape=альбомная +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Быстрый просмотр в Web: +document_properties_linearized_yes=Да +document_properties_linearized_no=Нет +document_properties_close=Закрыть + +print_progress_message=Подготовка документа к печати… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Отмена + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Показать/скрыть боковую панель +toggle_sidebar_notification.title=Показать/скрыть боковую панель (документ имеет содержание/вложения) +toggle_sidebar_label=Показать/скрыть боковую панель +document_outline.title=Показать содержание документа (двойной щелчок, чтобы развернуть/свернуть все элементы) +document_outline_label=Содержание документа +attachments.title=Показать вложения +attachments_label=Вложения +thumbs.title=Показать миниатюры +thumbs_label=Миниатюры +findbar.title=Найти в документе +findbar_label=Найти + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Страница {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Страница {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Миниатюра страницы {{page}} + +# Find panel button title and messages +find_input.title=Найти +find_input.placeholder=Найти в документе… +find_previous.title=Найти предыдущее вхождение фразы в текст +find_previous_label=Назад +find_next.title=Найти следующее вхождение фразы в текст +find_next_label=Далее +find_highlight=Подсветить все +find_match_case_label=С учётом регистра +find_entire_word_label=Слова целиком +find_reached_top=Достигнут верх документа, продолжено снизу +find_reached_bottom=Достигнут конец документа, продолжено сверху +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} из {{total}} совпадения +find_match_count[two]={{current}} из {{total}} совпадений +find_match_count[few]={{current}} из {{total}} совпадений +find_match_count[many]={{current}} из {{total}} совпадений +find_match_count[other]={{current}} из {{total}} совпадений +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Более {{limit}} совпадений +find_match_count_limit[one]=Более {{limit}} совпадения +find_match_count_limit[two]=Более {{limit}} совпадений +find_match_count_limit[few]=Более {{limit}} совпадений +find_match_count_limit[many]=Более {{limit}} совпадений +find_match_count_limit[other]=Более {{limit}} совпадений +find_not_found=Фраза не найдена + +# Error panel labels +error_more_info=Детали +error_less_info=Скрыть детали +error_close=Закрыть +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (сборка: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Сообщение: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Стeк: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Файл: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Строка: {{line}} +rendering_error=При создании страницы произошла ошибка. + +# Predefined zoom values +page_scale_width=По ширине страницы +page_scale_fit=По размеру страницы +page_scale_auto=Автоматически +page_scale_actual=Реальный размер +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Ошибка +loading_error=При загрузке PDF произошла ошибка. +invalid_file_error=Некорректный или повреждённый PDF-файл. +missing_file_error=PDF-файл отсутствует. +unexpected_response_error=Неожиданный ответ сервера. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Аннотация {{type}}] +password_label=Введите пароль, чтобы открыть этот PDF-файл. +password_invalid=Неверный пароль. Пожалуйста, попробуйте снова. +password_ok=OK +password_cancel=Отмена + +printing_not_supported=Предупреждение: В этом браузере не полностью поддерживается печать. +printing_not_ready=Предупреждение: PDF не полностью загружен для печати. +web_fonts_disabled=Веб-шрифты отключены: невозможно использовать встроенные PDF-шрифты. +document_colors_not_allowed=PDF-документам не разрешено использовать свои цвета: в браузере отключён параметр «Разрешить веб-сайтам использовать свои цвета». diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/scn/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/scn/viewer.properties new file mode 100644 index 0000000..e9a650a --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/scn/viewer.properties @@ -0,0 +1,101 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. + +zoom_out.title=Cchiù nicu +zoom_out_label=Cchiù nicu +zoom_in.title=Cchiù granni +zoom_in_label=Cchiù granni + +# Secondary toolbar and context menu + + + + +# Document properties dialog box +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Vista web lesta: +document_properties_linearized_yes=Se + +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_close=Sfai + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. + +# Find panel button title and messages +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. + +# Error panel labels +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number + +# Predefined zoom values +page_scale_width=Larghizza dâ pàggina +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. + +# Loading indicator messages + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +password_cancel=Sfai + diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/si/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/si/viewer.properties new file mode 100644 index 0000000..9a1d1e8 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/si/viewer.properties @@ -0,0 +1,207 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=මීට පෙර පිටුව +previous_label=පෙර +next.title=මීළඟ පිටුව +next_label=මීළඟ + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=පිටුව +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. + +zoom_out.title=කුඩා කරන්න +zoom_out_label=කුඩා කරන්න +zoom_in.title=විශාල කරන්න +zoom_in_label=විශාල කරන්න +zoom.title=විශාලණය +presentation_mode.title=ඉදිරිපත්කිරීම් ප්‍රකාරය වෙත මාරුවන්න +presentation_mode_label=ඉදිරිපත්කිරීම් ප්‍රකාරය +open_file.title=ගොනුව විවෘත කරන්න +open_file_label=විවෘත කරන්න +print.title=මුද්‍රණය +print_label=මුද්‍රණය +download.title=බාගන්න +download_label=බාගන්න +bookmark.title=දැනට ඇති දසුන (පිටපත් කරන්න හෝ නව කවුළුවක විවෘත කරන්න) +bookmark_label=දැනට ඇති දසුන + +# Secondary toolbar and context menu +tools.title=මෙවලම් +tools_label=මෙවලම් +first_page.title=මුල් පිටුවට යන්න +first_page.label=මුල් පිටුවට යන්න +first_page_label=මුල් පිටුවට යන්න +last_page.title=අවසන් පිටුවට යන්න +last_page.label=අවසන් පිටුවට යන්න +last_page_label=අවසන් පිටුවට යන්න +page_rotate_cw.title=දක්ශිණාවර්තව භ්‍රමණය +page_rotate_cw.label=දක්ශිණාවර්තව භ්‍රමණය +page_rotate_cw_label=දක්ශිණාවර්තව භ්‍රමණය +page_rotate_ccw.title=වාමාවර්තව භ්‍රමණය +page_rotate_ccw.label=වාමාවර්තව භ්‍රමණය +page_rotate_ccw_label=වාමාවර්තව භ්‍රමණය + +cursor_hand_tool_label=අත් මෙවලම + + + +# Document properties dialog box +document_properties.title=ලේඛන වත්කම්... +document_properties_label=ලේඛන වත්කම්... +document_properties_file_name=ගොනු නම: +document_properties_file_size=ගොනු ප්‍රමාණය: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} බයිට) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} බයිට) +document_properties_title=සිරස්තලය: +document_properties_author=කතෲ +document_properties_subject=මාතෘකාව: +document_properties_keywords=යතුරු වදන්: +document_properties_creation_date=නිර්මිත දිනය: +document_properties_modification_date=වෙනස්කල දිනය: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=නිර්මාපක: +document_properties_producer=PDF නිශ්පාදක: +document_properties_version=PDF නිකුතුව: +document_properties_page_count=පිටු ගණන: +document_properties_page_size=පිටුවේ විශාලත්වය: +document_properties_page_size_unit_inches=අඟල් +document_properties_page_size_unit_millimeters=මිමි +document_properties_page_size_orientation_portrait=සිරස් +document_properties_page_size_orientation_landscape=තිරස් +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}}×{{height}}{{unit}}{{name}}{{orientation}} +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=වේගවත් ජාල දසුන: +document_properties_linearized_yes=ඔව් +document_properties_linearized_no=නැහැ +document_properties_close=වසන්න + +print_progress_message=ලේඛනය මුද්‍රණය සඳහා සූදානම් කරමින්… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=අවලංගු කරන්න + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=පැති තීරුවට මාරුවන්න +toggle_sidebar_label=පැති තීරුවට මාරුවන්න +document_outline_label=ලේඛනයේ පිට මායිම +attachments.title=ඇමිණුම් පෙන්වන්න +attachments_label=ඇමිණුම් +thumbs.title=සිඟිති රූ පෙන්වන්න +thumbs_label=සිඟිති රූ +findbar.title=ලේඛනය තුළ සොයන්න +findbar_label=සොයන්න + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=පිටුව {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=පිටුවෙ සිඟිත රූව {{page}} + +# Find panel button title and messages +find_input.title=සොයන්න +find_previous.title=මේ වාක්‍ය ඛණ්ඩය මීට පෙර යෙදුණු ස්ථානය සොයන්න +find_previous_label=පෙර: +find_next.title=මේ වාක්‍ය ඛණ්ඩය මීළඟට යෙදෙන ස්ථානය සොයන්න +find_next_label=මීළඟ +find_highlight=සියල්ල උද්දීපනය +find_match_case_label=අකුරු ගළපන්න +find_entire_word_label=සම්පූර්ණ වචන +find_reached_top=පිටුවේ ඉහළ කෙළවරට ලගාවිය, පහළ සිට ඉදිරියට යමින් +find_reached_bottom=පිටුවේ පහළ කෙළවරට ලගාවිය, ඉහළ සිට ඉදිරියට යමින් +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit[zero]=ගැලපුම් {{limit}} ට වඩා +find_not_found=ඔබ සෙව් වචන හමු නොවීය + +# Error panel labels +error_more_info=බොහෝ තොරතුරු +error_less_info=අවම තොරතුරු +error_close=වසන්න +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (නිකුතුව: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=පණිවිඩය: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ගොනුව: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=පේළිය: {{line}} +rendering_error=පිටුව රෙන්ඩර් විමේදි ගැටලුවක් හට ගැනුණි. + +# Predefined zoom values +page_scale_width=පිටුවේ පළල +page_scale_fit=පිටුවට සුදුසු ලෙස +page_scale_auto=ස්වයංක්‍රීය විශාලණය +page_scale_actual=නියමිත ප්‍රමාණය +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=දෝෂය +loading_error=PDF පූරණය විමේදි දෝෂයක් හට ගැනුණි. +invalid_file_error=දූශිත හෝ සාවද්‍ය PDF ගොනුව. +missing_file_error=නැතිවූ PDF ගොනුව. +unexpected_response_error=බලාපොරොත්තු නොවූ සේවාදායක ප්‍රතිචාරය. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} විස්තරය] +password_label=මෙම PDF ගොනුව විවෘත කිරීමට මුරපදය ඇතුළත් කරන්න. +password_invalid=වැරදි මුරපදයක්. කරුණාකර නැවත උත්සහ කරන්න. +password_ok=හරි +password_cancel=එපා + +printing_not_supported=අවවාදයයි: මෙම ගවේශකය මුද්‍රණය සඳහා සම්පූර්ණයෙන් සහය නොදක්වයි. +printing_not_ready=අවවාදයයි: මුද්‍රණය සඳහා PDF සම්පූර්ණයෙන් පූර්ණය වී නොමැත. +web_fonts_disabled=ජාල අකුරු අක්‍රීයයි: තිළැලි PDF අකුරු භාවිත කළ නොහැක. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/sk/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/sk/viewer.properties new file mode 100644 index 0000000..a08911b --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/sk/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Predchádzajúca strana +previous_label=Predchádzajúca +next.title=Nasledujúca strana +next_label=Nasledujúca + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Strana +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=z {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} z {{pagesCount}}) + +zoom_out.title=Zmenšiť veľkosť +zoom_out_label=Zmenšiť veľkosť +zoom_in.title=Zväčšiť veľkosť +zoom_in_label=Zväčšiť veľkosť +zoom.title=Nastavenie veľkosti +presentation_mode.title=Prepnúť na režim prezentácie +presentation_mode_label=Režim prezentácie +open_file.title=Otvoriť súbor +open_file_label=Otvoriť +print.title=Tlačiť +print_label=Tlačiť +download.title=Prevziať +download_label=Prevziať +bookmark.title=Aktuálne zobrazenie (kopírovať alebo otvoriť v novom okne) +bookmark_label=Aktuálne zobrazenie + +# Secondary toolbar and context menu +tools.title=Nástroje +tools_label=Nástroje +first_page.title=Prejsť na prvú stranu +first_page.label=Prejsť na prvú stranu +first_page_label=Prejsť na prvú stranu +last_page.title=Prejsť na poslednú stranu +last_page.label=Prejsť na poslednú stranu +last_page_label=Prejsť na poslednú stranu +page_rotate_cw.title=Otočiť v smere hodinových ručičiek +page_rotate_cw.label=Otočiť v smere hodinových ručičiek +page_rotate_cw_label=Otočiť v smere hodinových ručičiek +page_rotate_ccw.title=Otočiť proti smeru hodinových ručičiek +page_rotate_ccw.label=Otočiť proti smeru hodinových ručičiek +page_rotate_ccw_label=Otočiť proti smeru hodinových ručičiek + +cursor_text_select_tool.title=Povoliť výber textu +cursor_text_select_tool_label=Výber textu +cursor_hand_tool.title=Povoliť nástroj ruka +cursor_hand_tool_label=Nástroj ruka + +scroll_vertical.title=Používať zvislé posúvanie +scroll_vertical_label=Zvislé posúvanie +scroll_horizontal.title=Používať vodorovné posúvanie +scroll_horizontal_label=Vodorovné posúvanie +scroll_wrapped.title=Použiť postupné posúvanie +scroll_wrapped_label=Postupné posúvanie + +spread_none.title=Nezdružovať stránky +spread_none_label=Žiadne združovanie +spread_odd.title=Združí stránky a umiestni nepárne stránky vľavo +spread_odd_label=Združiť stránky (nepárne vľavo) +spread_even.title=Združí stránky a umiestni párne stránky vľavo +spread_even_label=Združiť stránky (párne vľavo) + +# Document properties dialog box +document_properties.title=Vlastnosti dokumentu… +document_properties_label=Vlastnosti dokumentu… +document_properties_file_name=Názov súboru: +document_properties_file_size=Veľkosť súboru: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} kB ({{size_b}} bajtov) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bajtov) +document_properties_title=Názov: +document_properties_author=Autor: +document_properties_subject=Predmet: +document_properties_keywords=Kľúčové slová: +document_properties_creation_date=Dátum vytvorenia: +document_properties_modification_date=Dátum úpravy: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Vytvoril: +document_properties_producer=Tvorca PDF: +document_properties_version=Verzia PDF: +document_properties_page_count=Počet strán: +document_properties_page_size=Veľkosť stránky: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=na výšku +document_properties_page_size_orientation_landscape=na šírku +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=List +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Rýchle Web View: +document_properties_linearized_yes=Áno +document_properties_linearized_no=Nie +document_properties_close=Zavrieť + +print_progress_message=Príprava dokumentu na tlač… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Zrušiť + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Prepnúť bočný panel +toggle_sidebar_notification.title=Prepnúť bočný panel (dokument obsahuje osnovu/prílohy) +toggle_sidebar_label=Prepnúť bočný panel +document_outline.title=Zobraziť osnovu dokumentu (dvojitým kliknutím rozbalíte/zbalíte všetky položky) +document_outline_label=Osnova dokumentu +attachments.title=Zobraziť prílohy +attachments_label=Prílohy +thumbs.title=Zobraziť miniatúry +thumbs_label=Miniatúry +findbar.title=Hľadať v dokumente +findbar_label=Hľadať + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Strana {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Strana {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatúra strany {{page}} + +# Find panel button title and messages +find_input.title=Hľadať +find_input.placeholder=Hľadať v dokumente… +find_previous.title=Vyhľadať predchádzajúci výskyt reťazca +find_previous_label=Predchádzajúce +find_next.title=Vyhľadať ďalší výskyt reťazca +find_next_label=Ďalšie +find_highlight=Zvýrazniť všetky +find_match_case_label=Rozlišovať veľkosť písmen +find_entire_word_label=Celé slová +find_reached_top=Bol dosiahnutý začiatok stránky, pokračuje sa od konca +find_reached_bottom=Bol dosiahnutý koniec stránky, pokračuje sa od začiatku +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}}. z {{total}} výsledku +find_match_count[two]={{current}}. z {{total}} výsledkov +find_match_count[few]={{current}}. z {{total}} výsledkov +find_match_count[many]={{current}}. z {{total}} výsledkov +find_match_count[other]={{current}}. z {{total}} výsledkov +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Viac než {{limit}} výsledkov +find_match_count_limit[one]=Viac než {{limit}} výsledok +find_match_count_limit[two]=Viac než {{limit}} výsledky +find_match_count_limit[few]=Viac než {{limit}} výsledky +find_match_count_limit[many]=Viac než {{limit}} výsledkov +find_match_count_limit[other]=Viac než {{limit}} výsledkov +find_not_found=Výraz nebol nájdený + +# Error panel labels +error_more_info=Viac informácií +error_less_info=Menej informácií +error_close=Zavrieť +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (zostavenie: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Správa: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Zásobník: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Súbor: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Riadok: {{line}} +rendering_error=Pri vykresľovaní stránky sa vyskytla chyba. + +# Predefined zoom values +page_scale_width=Na šírku strany +page_scale_fit=Na veľkosť strany +page_scale_auto=Automatická veľkosť +page_scale_actual=Skutočná veľkosť +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}} % + +# Loading indicator messages +loading_error_indicator=Chyba +loading_error=Počas načítavania dokumentu PDF sa vyskytla chyba. +invalid_file_error=Neplatný alebo poškodený súbor PDF. +missing_file_error=Chýbajúci súbor PDF. +unexpected_response_error=Neočakávaná odpoveď zo servera. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotácia typu {{type}}] +password_label=Ak chcete otvoriť tento súbor PDF, zadajte jeho heslo. +password_invalid=Heslo nie je platné. Skúste to znova. +password_ok=OK +password_cancel=Zrušiť + +printing_not_supported=Upozornenie: tlač nie je v tomto prehliadači plne podporovaná. +printing_not_ready=Upozornenie: súbor PDF nie je plne načítaný pre tlač. +web_fonts_disabled=Webové písma sú vypnuté: nie je možné použiť písma vložené do súboru PDF. +document_colors_not_allowed=Dokumenty PDF nemajú povolené používať vlastné farby, pretože voľba "Povoliť stránkam používať vlastné farby" je v nastaveniach prehliadača vypnutá. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/sl/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/sl/viewer.properties new file mode 100644 index 0000000..86db2d9 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/sl/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Prejšnja stran +previous_label=Nazaj +next.title=Naslednja stran +next_label=Naprej + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Stran +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=od {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} od {{pagesCount}}) + +zoom_out.title=Pomanjšaj +zoom_out_label=Pomanjšaj +zoom_in.title=Povečaj +zoom_in_label=Povečaj +zoom.title=Povečava +presentation_mode.title=Preklopi v način predstavitve +presentation_mode_label=Način predstavitve +open_file.title=Odpri datoteko +open_file_label=Odpri +print.title=Natisni +print_label=Natisni +download.title=Prenesi +download_label=Prenesi +bookmark.title=Trenutni pogled (kopiraj ali odpri v novem oknu) +bookmark_label=Trenutni pogled + +# Secondary toolbar and context menu +tools.title=Orodja +tools_label=Orodja +first_page.title=Pojdi na prvo stran +first_page.label=Pojdi na prvo stran +first_page_label=Pojdi na prvo stran +last_page.title=Pojdi na zadnjo stran +last_page.label=Pojdi na zadnjo stran +last_page_label=Pojdi na zadnjo stran +page_rotate_cw.title=Zavrti v smeri urnega kazalca +page_rotate_cw.label=Zavrti v smeri urnega kazalca +page_rotate_cw_label=Zavrti v smeri urnega kazalca +page_rotate_ccw.title=Zavrti v nasprotni smeri urnega kazalca +page_rotate_ccw.label=Zavrti v nasprotni smeri urnega kazalca +page_rotate_ccw_label=Zavrti v nasprotni smeri urnega kazalca + +cursor_text_select_tool.title=Omogoči orodje za izbor besedila +cursor_text_select_tool_label=Orodje za izbor besedila +cursor_hand_tool.title=Omogoči roko +cursor_hand_tool_label=Roka + +scroll_vertical.title=Uporabi navpično drsenje +scroll_vertical_label=Navpično drsenje +scroll_horizontal.title=Uporabi vodoravno drsenje +scroll_horizontal_label=Vodoravno drsenje +scroll_wrapped.title=Uporabi ovito drsenje +scroll_wrapped_label=Ovito drsenje + +spread_none.title=Ne združuj razponov strani +spread_none_label=Brez razponov +spread_odd.title=Združuj razpone strani z začetkom pri lihih straneh +spread_odd_label=Lihi razponi +spread_even.title=Združuj razpone strani z začetkom pri sodih straneh +spread_even_label=Sodi razponi + +# Document properties dialog box +document_properties.title=Lastnosti dokumenta … +document_properties_label=Lastnosti dokumenta … +document_properties_file_name=Ime datoteke: +document_properties_file_size=Velikost datoteke: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bajtov) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bajtov) +document_properties_title=Ime: +document_properties_author=Avtor: +document_properties_subject=Tema: +document_properties_keywords=Ključne besede: +document_properties_creation_date=Datum nastanka: +document_properties_modification_date=Datum spremembe: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Ustvaril: +document_properties_producer=Izdelovalec PDF: +document_properties_version=Različica PDF: +document_properties_page_count=Število strani: +document_properties_page_size=Velikost strani: +document_properties_page_size_unit_inches=palcev +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=pokončno +document_properties_page_size_orientation_landscape=ležeče +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Pismo +document_properties_page_size_name_legal=Pravno +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Hitri spletni ogled: +document_properties_linearized_yes=Da +document_properties_linearized_no=Ne +document_properties_close=Zapri + +print_progress_message=Priprava dokumenta na tiskanje … +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=Prekliči + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Preklopi stransko vrstico +toggle_sidebar_notification.title=Preklopi stransko vrstico (dokument vsebuje oris/priponke) +toggle_sidebar_label=Preklopi stransko vrstico +document_outline.title=Prikaži oris dokumenta (dvokliknite za razširitev/strnitev vseh predmetov) +document_outline_label=Oris dokumenta +attachments.title=Prikaži priponke +attachments_label=Priponke +thumbs.title=Prikaži sličice +thumbs_label=Sličice +findbar.title=Iskanje po dokumentu +findbar_label=Najdi + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Stran {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Stran {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Sličica strani {{page}} + +# Find panel button title and messages +find_input.title=Najdi +find_input.placeholder=Najdi v dokumentu … +find_previous.title=Najdi prejšnjo ponovitev iskanega +find_previous_label=Najdi nazaj +find_next.title=Najdi naslednjo ponovitev iskanega +find_next_label=Najdi naprej +find_highlight=Označi vse +find_match_case_label=Razlikuj velike/male črke +find_entire_word_label=Cele besede +find_reached_top=Dosežen začetek dokumenta iz smeri konca +find_reached_bottom=Doseženo konec dokumenta iz smeri začetka +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]=Zadetek {{current}} od {{total}} +find_match_count[two]=Zadetek {{current}} od {{total}} +find_match_count[few]=Zadetek {{current}} od {{total}} +find_match_count[many]=Zadetek {{current}} od {{total}} +find_match_count[other]=Zadetek {{current}} od {{total}} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Več kot {{limit}} zadetkov +find_match_count_limit[one]=Več kot {{limit}} zadetek +find_match_count_limit[two]=Več kot {{limit}} zadetka +find_match_count_limit[few]=Več kot {{limit}} zadetki +find_match_count_limit[many]=Več kot {{limit}} zadetkov +find_match_count_limit[other]=Več kot {{limit}} zadetkov +find_not_found=Iskanega ni mogoče najti + +# Error panel labels +error_more_info=Več informacij +error_less_info=Manj informacij +error_close=Zapri +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js r{{version}} (graditev: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Sporočilo: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Sklad: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Datoteka: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Vrstica: {{line}} +rendering_error=Med pripravljanjem strani je prišlo do napake! + +# Predefined zoom values +page_scale_width=Širina strani +page_scale_fit=Prilagodi stran +page_scale_auto=Samodejno +page_scale_actual=Dejanska velikost +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}} % + +# Loading indicator messages +loading_error_indicator=Napaka +loading_error=Med nalaganjem datoteke PDF je prišlo do napake. +invalid_file_error=Neveljavna ali pokvarjena datoteka PDF. +missing_file_error=Ni datoteke PDF. +unexpected_response_error=Nepričakovan odgovor strežnika. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Opomba vrste {{type}}] +password_label=Vnesite geslo za odpiranje te datoteke PDF. +password_invalid=Neveljavno geslo. Poskusite znova. +password_ok=V redu +password_cancel=Prekliči + +printing_not_supported=Opozorilo: ta brskalnik ne podpira vseh možnosti tiskanja. +printing_not_ready=Opozorilo: PDF ni v celoti naložen za tiskanje. +web_fonts_disabled=Spletne pisave so onemogočene: vgradnih pisav za PDF ni mogoče uporabiti. +document_colors_not_allowed=Dokumenti PDF ne smejo uporabljati svojih lastnih barv: možnost 'Dovoli stranem uporabo lastnih barv' je v brskalniku onemogočena. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/son/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/son/viewer.properties new file mode 100644 index 0000000..f5c1b46 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/son/viewer.properties @@ -0,0 +1,180 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Moo bisante +previous_label=Bisante +next.title=Jinehere moo +next_label=Jine + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Moo +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} ra +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} ka hun {{pagesCount}}) ra + +zoom_out.title=Nakasandi +zoom_out_label=Nakasandi +zoom_in.title=Bebbeerandi +zoom_in_label=Bebbeerandi +zoom.title=Bebbeerandi +presentation_mode.title=Bere cebeyan alhaali +presentation_mode_label=Cebeyan alhaali +open_file.title=Tuku feeri +open_file_label=Feeri +print.title=Kar +print_label=Kar +download.title=Zumandi +download_label=Zumandi +bookmark.title=Sohõ gunarro (bere wala feeri zanfun taaga ra) +bookmark_label=Sohõ gunaroo + +# Secondary toolbar and context menu +tools.title=Goyjinawey +tools_label=Goyjinawey +first_page.title=Koy moo jinaa ga +first_page.label=Koy moo jinaa ga +first_page_label=Koy moo jinaa ga +last_page.title=Koy moo koraa ga +last_page.label=Koy moo koraa ga +last_page_label=Koy moo koraa ga +page_rotate_cw.title=Kuubi kanbe guma here +page_rotate_cw.label=Kuubi kanbe guma here +page_rotate_cw_label=Kuubi kanbe guma here +page_rotate_ccw.title=Kuubi kanbe wowa here +page_rotate_ccw.label=Kuubi kanbe wowa here +page_rotate_ccw_label=Kuubi kanbe wowa here + + +# Document properties dialog box +document_properties.title=Takadda mayrawey… +document_properties_label=Takadda mayrawey… +document_properties_file_name=Tuku maa: +document_properties_file_size=Tuku adadu: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb=KB {{size_kb}} (cebsu-ize {{size_b}}) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb=MB {{size_mb}} (cebsu-ize {{size_b}}) +document_properties_title=Tiiramaa: +document_properties_author=Hantumkaw: +document_properties_subject=Dalil: +document_properties_keywords=Kufalkalimawey: +document_properties_creation_date=Teeyan han: +document_properties_modification_date=Barmayan han: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Teekaw: +document_properties_producer=PDF berandikaw: +document_properties_version=PDF dumi: +document_properties_page_count=Moo hinna: +document_properties_close=Daabu + +print_progress_message=Goo ma takaddaa soolu k'a kar se… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Naŋ + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Kanjari ceraw zuu +toggle_sidebar_notification.title=Kanjari ceraw-zuu (takaddaa goo nda filla-boŋ/hangandiyaŋ) +toggle_sidebar_label=Kanjari ceraw zuu +document_outline.title=Takaddaa korfur alhaaloo cebe (naagu cee hinka ka haya-izey kul hayandi/kankamandi) +document_outline_label=Takadda filla-boŋ +attachments.title=Hangarey cebe +attachments_label=Hangarey +thumbs.title=Kabeboy biyey cebe +thumbs_label=Kabeboy biyey +findbar.title=Ceeci takaddaa ra +findbar_label=Ceeci + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title={{page}} moo +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Kabeboy bii {{page}} moo še + +# Find panel button title and messages +find_input.title=Ceeci +find_input.placeholder=Ceeci takaddaa ra… +find_previous.title=Kalimaɲaŋoo bangayri bisantaa ceeci +find_previous_label=Bisante +find_next.title=Kalimaɲaŋoo hiino bangayroo ceeci +find_next_label=Jine +find_highlight=Ikul šilbay +find_match_case_label=Harfu-beeriyan hawgay +find_reached_top=A too moŋoo boŋoo, koy jine ka šinitin nda cewoo +find_reached_bottom=A too moɲoo cewoo, koy jine šintioo ga +find_not_found=Kalimaɲaa mana duwandi + +# Error panel labels +error_more_info=Alhabar tontoni +error_less_info=Alhabar tontoni +error_close=Daabu +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Alhabar: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Dekeri: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Tuku: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Žeeri: {{line}} +rendering_error=Firka bangay kaŋ moɲoo goo ma willandi. + +# Predefined zoom values +page_scale_width=Mooo hayyan +page_scale_fit=Moo sawayan +page_scale_auto=Boŋše azzaati barmayyan +page_scale_actual=Adadu cimi +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Firka +loading_error=Firka bangay kaŋ PDF goo ma zumandi. +invalid_file_error=PDF tuku laala wala laybante. +missing_file_error=PDF tuku kumante. +unexpected_response_error=Manti feršikaw tuuruyan maatante. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt={{type}} maasa-caw] +password_label=Šennikufal dam ka PDF tukoo woo feeri. +password_invalid=Šennikufal laalo. Ceeci koyne taare. +password_ok=Ayyo +password_cancel=Naŋ + +printing_not_supported=Yaamar: Karyan ši tee ka timme nda ceecikaa woo. +printing_not_ready=Yaamar: PDF ši zunbu ka timme karyan še. +web_fonts_disabled=Interneti šigirawey kay: ši hin ka goy nda PDF šigira hurantey. +document_colors_not_allowed=PDF takaddawey ši duu fondo ka ngey boŋ noonawey zaa: “Naŋ moɲey ma ngey boŋ noonawey suuba” ši dira ceecikaa ga. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/sq/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/sq/viewer.properties new file mode 100644 index 0000000..b0f12b2 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/sq/viewer.properties @@ -0,0 +1,241 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Faqja e Mëparshme +previous_label=E mëparshmja +next.title=Faqja Pasuese +next_label=Pasuesja + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Faqe +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=nga {{pagesCount}} gjithsej +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} nga {{pagesCount}}) + +zoom_out.title=Zvogëlojeni +zoom_out_label=Zvogëlojeni +zoom_in.title=Zmadhojeni +zoom_in_label=Zmadhojini +zoom.title=Zoom +presentation_mode.title=Kalo te Mënyra Paraqitje +presentation_mode_label=Mënyra Paraqitje +open_file.title=Hapni Kartelë +open_file_label=Hape +print.title=Shtypje +print_label=Shtype +download.title=Shkarkim +download_label=Shkarkoje +bookmark.title=Pamja e tanishme (kopjojeni ose hapeni në dritare të re) +bookmark_label=Pamja e Tanishme + +# Secondary toolbar and context menu +tools.title=Mjete +tools_label=Mjete +first_page.title=Kaloni te Faqja e Parë +first_page.label=Kaloni te Faqja e Parë +first_page_label=Kaloni te Faqja e Parë +last_page.title=Kaloni te Faqja e Fundit +last_page.label=Kaloni te Faqja e Fundit +last_page_label=Kaloni te Faqja e Fundit +page_rotate_cw.title=Rrotullojeni Në Kahun Orar +page_rotate_cw.label=Rrotulloje Në Kahun Orar +page_rotate_cw_label=Rrotulloje Në Kahun Orar +page_rotate_ccw.title=Rrotullojeni Në Kahun Kundërorar +page_rotate_ccw.label=Rrotulloje Në Kahun Kundërorar +page_rotate_ccw_label=Rrotulloje Në Kahun Kundërorar + +cursor_text_select_tool.title=Aktivizo Mjet Përzgjedhjeje Teksti +cursor_text_select_tool_label=Mjet Përzgjedhjeje Teksti +cursor_hand_tool.title=Aktivizo Mjetin Dorë +cursor_hand_tool_label=Mjeti Dorë + +scroll_vertical.title=Përdor Rrëshqitje Vertikale +scroll_vertical_label=Rrëshqitje Vertikale +scroll_horizontal.title=Përdor Rrëshqitje Horizontale +scroll_horizontal_label=Rrëshqitje Horizontale +scroll_wrapped.title=Përdor Rrëshqitje Me Mbështjellje +scroll_wrapped_label=Rrëshqitje Me Mbështjellje + + +# Document properties dialog box +document_properties.title=Veti Dokumenti… +document_properties_label=Veti Dokumenti… +document_properties_file_name=Emër kartele: +document_properties_file_size=Madhësi kartele: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bajte) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bajte) +document_properties_title=Titull: +document_properties_author=Autor: +document_properties_subject=Subjekt: +document_properties_keywords=Fjalëkyçe: +document_properties_creation_date=Datë Krijimi: +document_properties_modification_date=Datë Ndryshimi: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Krijues: +document_properties_producer=Prodhues PDF-je: +document_properties_version=Version PDF-je: +document_properties_page_count=Numër Faqesh: +document_properties_page_size=Madhësi Faqeje: +document_properties_page_size_unit_inches=inç +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portret +document_properties_page_size_orientation_landscape=së gjeri +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized_yes=Po +document_properties_linearized_no=Jo +document_properties_close=Mbylleni + +print_progress_message=Po përgatitet dokumenti për shtypje… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Anuloje + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Shfaqni/Fshihni Anështyllën +toggle_sidebar_notification.title=Shfaqni Anështyllën (dokumenti përmban përvijim/bashkëngjitje) +toggle_sidebar_label=Shfaq/Fshih Anështyllën +document_outline.title=Shfaqni Përvijim Dokumenti (dyklikoni që të shfaqen/fshihen krejt elementët) +document_outline_label=Përvijim Dokumenti +attachments.title=Shfaqni Bashkëngjitje +attachments_label=Bashkëngjitje +thumbs.title=Shfaqni Miniatura +thumbs_label=Miniatura +findbar.title=Gjeni në Dokument +findbar_label=Gjej + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Faqja {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Faqja {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniaturë e Faqes {{page}} + +# Find panel button title and messages +find_input.title=Gjej +find_input.placeholder=Gjeni në dokument… +find_previous.title=Gjeni hasjen e mëparshme të togfjalëshit +find_previous_label=E mëparshmja +find_next.title=Gjeni hasjen pasuese të togfjalëshit +find_next_label=Pasuesja +find_highlight=Theksoji të tëra +find_match_case_label=Siç është shkruar +find_entire_word_label=Krejt fjalët +find_reached_top=U mbërrit në krye të dokumentit, vazhduar prej fundit +find_reached_bottom=U mbërrit në fund të dokumentit, vazhduar prej kreut +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} nga {{total}} përputhje gjithsej +find_match_count[two]={{current}} nga {{total}} përputhje gjithsej +find_match_count[few]={{current}} nga {{total}} përputhje gjithsej +find_match_count[many]={{current}} nga {{total}} përputhje gjithsej +find_match_count[other]={{current}} nga {{total}} përputhje gjithsej +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Më shumë se {{limit}} përputhje +find_match_count_limit[one]=Më shumë se {{limit}} përputhje +find_match_count_limit[two]=Më shumë se {{limit}} përputhje +find_match_count_limit[few]=Më shumë se {{limit}} përputhje +find_match_count_limit[many]=Më shumë se {{limit}} përputhje +find_match_count_limit[other]=Më shumë se {{limit}} përputhje +find_not_found=Togfjalësh që s’gjendet + +# Error panel labels +error_more_info=Më Tepër të Dhëna +error_less_info=Më Pak të Dhëna +error_close=Mbylleni +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mesazh: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Kartelë: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Rresht: {{line}} +rendering_error=Ndodhi një gabim gjatë riprodhimit të faqes. + +# Predefined zoom values +page_scale_width=Gjerësi Faqeje +page_scale_fit=Sa Nxë Faqja +page_scale_auto=Zoom i Vetvetishëm +page_scale_actual=Madhësia Faktike +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Gabim +loading_error=Ndodhi një gabim gjatë ngarkimit të PDF-së. +invalid_file_error=Kartelë PDF e pavlefshme ose e dëmtuar. +missing_file_error=Kartelë PDF që mungon. +unexpected_response_error=Përgjigje shërbyesi e papritur. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Nënvizim {{type}}] +password_label=Jepni fjalëkalimin që të hapet kjo kartelë PDF. +password_invalid=Fjalëkalim i pavlefshëm. Ju lutemi, riprovoni. +password_ok=OK +password_cancel=Anuloje + +printing_not_supported=Kujdes: Shtypja s’mbulohet plotësisht nga ky shfletues. +printing_not_ready=Kujdes: PDF-ja s’është ngarkuar plotësisht që ta shtypni. +web_fonts_disabled=Shkronjat Web janë të çaktivizuara: s’arrihet të përdoren shkronja të trupëzuara në PDF. +document_colors_not_allowed=Dokumenteve PDF s’u lejohet të përdorin ngjyrat e tyre: 'Lejoji faqet t’i zgjedhin vetë ngjyrat' është e çaktivizuar te shfletuesi. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/sr/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/sr/viewer.properties new file mode 100644 index 0000000..cee0a4f --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/sr/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Претходна страница +previous_label=Претходна +next.title=Следећа страница +next_label=Следећа + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Страница +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=од {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} од {{pagesCount}}) + +zoom_out.title=Умањи +zoom_out_label=Умањи +zoom_in.title=Увеличај +zoom_in_label=Увеличај +zoom.title=Увеличавање +presentation_mode.title=Промени на приказ у режиму презентације +presentation_mode_label=Режим презентације +open_file.title=Отвори датотеку +open_file_label=Отвори +print.title=Штампај +print_label=Штампај +download.title=Преузми +download_label=Преузми +bookmark.title=Тренутни приказ (копирај или отвори нови прозор) +bookmark_label=Тренутни приказ + +# Secondary toolbar and context menu +tools.title=Алатке +tools_label=Алатке +first_page.title=Иди на прву страницу +first_page.label=Иди на прву страницу +first_page_label=Иди на прву страницу +last_page.title=Иди на последњу страницу +last_page.label=Иди на последњу страницу +last_page_label=Иди на последњу страницу +page_rotate_cw.title=Ротирај у смеру казаљке на сату +page_rotate_cw.label=Ротирај у смеру казаљке на сату +page_rotate_cw_label=Ротирај у смеру казаљке на сату +page_rotate_ccw.title=Ротирај у смеру супротном од казаљке на сату +page_rotate_ccw.label=Ротирај у смеру супротном од казаљке на сату +page_rotate_ccw_label=Ротирај у смеру супротном од казаљке на сату + +cursor_text_select_tool.title=Омогући алат за селектовање текста +cursor_text_select_tool_label=Алат за селектовање текста +cursor_hand_tool.title=Омогући алат за померање +cursor_hand_tool_label=Алат за померање + +scroll_vertical.title=Користи вертикално скроловање +scroll_vertical_label=Вертикално скроловање +scroll_horizontal.title=Користи хоризонтално скроловање +scroll_horizontal_label=Хоризонтално скроловање +scroll_wrapped.title=Користи скроловање по омоту +scroll_wrapped_label=Скроловање по омоту + +spread_none.title=Немој спајати ширења страница +spread_none_label=Без распростирања +spread_odd.title=Споји ширења страница које почињу непарним бројем +spread_odd_label=Непарна распростирања +spread_even.title=Споји ширења страница које почињу парним бројем +spread_even_label=Парна распростирања + +# Document properties dialog box +document_properties.title=Параметри документа… +document_properties_label=Параметри документа… +document_properties_file_name=Име датотеке: +document_properties_file_size=Величина датотеке: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} B) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} B) +document_properties_title=Наслов: +document_properties_author=Аутор: +document_properties_subject=Тема: +document_properties_keywords=Кључне речи: +document_properties_creation_date=Датум креирања: +document_properties_modification_date=Датум модификације: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Стваралац: +document_properties_producer=PDF произвођач: +document_properties_version=PDF верзија: +document_properties_page_count=Број страница: +document_properties_page_size=Величина странице: +document_properties_page_size_unit_inches=ин +document_properties_page_size_unit_millimeters=мм +document_properties_page_size_orientation_portrait=усправно +document_properties_page_size_orientation_landscape=водоравно +document_properties_page_size_name_a3=А3 +document_properties_page_size_name_a4=А4 +document_properties_page_size_name_letter=Слово +document_properties_page_size_name_legal=Права +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Брз веб приказ: +document_properties_linearized_yes=Да +document_properties_linearized_no=Не +document_properties_close=Затвори + +print_progress_message=Припремам документ за штампање… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Откажи + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Прикажи додатну палету +toggle_sidebar_notification.title=Прикажи додатну траку (докуменат садржи оквире/прилоге) +toggle_sidebar_label=Прикажи додатну палету +document_outline.title=Прикажи контуру документа (дупли клик за проширење/скупљање елемената) +document_outline_label=Контура документа +attachments.title=Прикажи прилоге +attachments_label=Прилози +thumbs.title=Прикажи сличице +thumbs_label=Сличице +findbar.title=Пронађи у документу +findbar_label=Пронађи + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Страница {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Страница {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Сличица од странице {{page}} + +# Find panel button title and messages +find_input.title=Пронађи +find_input.placeholder=Пронађи у документу… +find_previous.title=Пронађи претходну појаву фразе +find_previous_label=Претходна +find_next.title=Пронађи следећу појаву фразе +find_next_label=Следећа +find_highlight=Истакнути све +find_match_case_label=Подударања +find_entire_word_label=Целе речи +find_reached_top=Достигнут врх документа, наставио са дна +find_reached_bottom=Достигнуто дно документа, наставио са врха +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} од {{total}} одговара +find_match_count[two]={{current}} од {{total}} одговара +find_match_count[few]={{current}} од {{total}} одговара +find_match_count[many]={{current}} од {{total}} одговара +find_match_count[other]={{current}} од {{total}} одговара +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Више од {{limit}} одговара +find_match_count_limit[one]=Више од {{limit}} одговара +find_match_count_limit[two]=Више од {{limit}} одговара +find_match_count_limit[few]=Више од {{limit}} одговара +find_match_count_limit[many]=Више од {{limit}} одговара +find_match_count_limit[other]=Више од {{limit}} одговара +find_not_found=Фраза није пронађена + +# Error panel labels +error_more_info=Више информација +error_less_info=Мање информација +error_close=Затвори +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Порука: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Стек: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Датотека: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Линија: {{line}} +rendering_error=Дошло је до грешке приликом рендеровања ове странице. + +# Predefined zoom values +page_scale_width=Ширина странице +page_scale_fit=Прилагоди страницу +page_scale_auto=Аутоматско увеличавање +page_scale_actual=Стварна величина +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Грешка +loading_error=Дошло је до грешке приликом учитавања PDF-а. +invalid_file_error=PDF датотека је оштећена или је неисправна. +missing_file_error=PDF датотека није пронађена. +unexpected_response_error=Неочекиван одговор од сервера. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} коментар] +password_label=Унесите лозинку да бисте отворили овај PDF докуменат. +password_invalid=Неисправна лозинка. Покушајте поново. +password_ok=У реду +password_cancel=Откажи + +printing_not_supported=Упозорење: Штампање није у потпуности подржано у овом прегледачу. +printing_not_ready=Упозорење: PDF није у потпуности учитан за штампу. +web_fonts_disabled=Веб фонтови су онемогућени: не могу користити уграђене PDF фонтове. +document_colors_not_allowed=PDF документи не могу да користе сопствене боје: “Дозволи страницама да изаберу своје боје” је деактивирано у прегледачу. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/sv-SE/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/sv-SE/viewer.properties new file mode 100644 index 0000000..3d2f0cf --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/sv-SE/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Föregående sida +previous_label=Föregående +next.title=Nästa sida +next_label=Nästa + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Sida +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=av {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} av {{pagesCount}}) + +zoom_out.title=Zooma ut +zoom_out_label=Zooma ut +zoom_in.title=Zooma in +zoom_in_label=Zooma in +zoom.title=Zoom +presentation_mode.title=Byt till presentationsläge +presentation_mode_label=Presentationsläge +open_file.title=Öppna fil +open_file_label=Öppna +print.title=Skriv ut +print_label=Skriv ut +download.title=Hämta +download_label=Hämta +bookmark.title=Aktuell vy (kopiera eller öppna i nytt fönster) +bookmark_label=Aktuell vy + +# Secondary toolbar and context menu +tools.title=Verktyg +tools_label=Verktyg +first_page.title=Gå till första sidan +first_page.label=Gå till första sidan +first_page_label=Gå till första sidan +last_page.title=Gå till sista sidan +last_page.label=Gå till sista sidan +last_page_label=Gå till sista sidan +page_rotate_cw.title=Rotera medurs +page_rotate_cw.label=Rotera medurs +page_rotate_cw_label=Rotera medurs +page_rotate_ccw.title=Rotera moturs +page_rotate_ccw.label=Rotera moturs +page_rotate_ccw_label=Rotera moturs + +cursor_text_select_tool.title=Aktivera textmarkeringsverktyg +cursor_text_select_tool_label=Textmarkeringsverktyg +cursor_hand_tool.title=Aktivera handverktyg +cursor_hand_tool_label=Handverktyg + +scroll_vertical.title=Använd vertikal rullning +scroll_vertical_label=Vertikal rullning +scroll_horizontal.title=Använd horisontell rullning +scroll_horizontal_label=Horisontell rullning +scroll_wrapped.title=Använd överlappande rullning +scroll_wrapped_label=Överlappande rullning + +spread_none.title=Visa enkelsidor +spread_none_label=Enkelsidor +spread_odd.title=Visa uppslag med olika sidnummer till vänster +spread_odd_label=Uppslag med framsida +spread_even.title=Visa uppslag med lika sidnummer till vänster +spread_even_label=Uppslag utan framsida + +# Document properties dialog box +document_properties.title=Dokumentegenskaper… +document_properties_label=Dokumentegenskaper… +document_properties_file_name=Filnamn: +document_properties_file_size=Filstorlek: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} kB ({{size_b}} byte) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} byte) +document_properties_title=Titel: +document_properties_author=Författare: +document_properties_subject=Ämne: +document_properties_keywords=Nyckelord: +document_properties_creation_date=Skapades: +document_properties_modification_date=Ändrades: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Skapare: +document_properties_producer=PDF-producent: +document_properties_version=PDF-version: +document_properties_page_count=Sidantal: +document_properties_page_size=Pappersstorlek: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=porträtt +document_properties_page_size_orientation_landscape=landskap +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Snabb webbvisning: +document_properties_linearized_yes=Ja +document_properties_linearized_no=Nej +document_properties_close=Stäng + +print_progress_message=Förbereder sidor för utskrift… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Avbryt + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Visa/dölj sidofält +toggle_sidebar_notification.title=Visa/dölj sidofält (dokument innehåller översikt/bilagor) +toggle_sidebar_label=Visa/dölj sidofält +document_outline.title=Visa dokumentdisposition (dubbelklicka för att expandera/komprimera alla objekt) +document_outline_label=Dokumentöversikt +attachments.title=Visa Bilagor +attachments_label=Bilagor +thumbs.title=Visa miniatyrer +thumbs_label=Miniatyrer +findbar.title=Sök i dokument +findbar_label=Sök + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Sida {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Sida {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatyr av sida {{page}} + +# Find panel button title and messages +find_input.title=Sök +find_input.placeholder=Sök i dokument… +find_previous.title=Hitta föregående förekomst av frasen +find_previous_label=Föregående +find_next.title=Hitta nästa förekomst av frasen +find_next_label=Nästa +find_highlight=Markera alla +find_match_case_label=Matcha versal/gemen +find_entire_word_label=Hela ord +find_reached_top=Nådde början av dokumentet, började från slutet +find_reached_bottom=Nådde slutet på dokumentet, började från början +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} av {{total}} träff +find_match_count[two]={{current}} av {{total}} träffar +find_match_count[few]={{current}} av {{total}} träffar +find_match_count[many]={{current}} av {{total}} träffar +find_match_count[other]={{current}} av {{total}} träffar +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Mer än {{limit}} träffar +find_match_count_limit[one]=Mer än {{limit}} träff +find_match_count_limit[two]=Mer än {{limit}} träffar +find_match_count_limit[few]=Mer än {{limit}} träffar +find_match_count_limit[many]=Mer än {{limit}} träffar +find_match_count_limit[other]=Mer än {{limit}} träffar +find_not_found=Frasen hittades inte + +# Error panel labels +error_more_info=Mer information +error_less_info=Mindre information +error_close=Stäng +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Meddelande: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fil: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Rad: {{line}} +rendering_error=Ett fel uppstod vid visning av sidan. + +# Predefined zoom values +page_scale_width=Sidbredd +page_scale_fit=Anpassa sida +page_scale_auto=Automatisk zoom +page_scale_actual=Verklig storlek +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Fel +loading_error=Ett fel uppstod vid laddning av PDF-filen. +invalid_file_error=Ogiltig eller korrupt PDF-fil. +missing_file_error=Saknad PDF-fil. +unexpected_response_error=Oväntat svar från servern. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}}-annotering] +password_label=Skriv in lösenordet för att öppna PDF-filen. +password_invalid=Ogiltigt lösenord. Försök igen. +password_ok=OK +password_cancel=Avbryt + +printing_not_supported=Varning: Utskrifter stöds inte helt av den här webbläsaren. +printing_not_ready=Varning: PDF:en är inte klar för utskrift. +web_fonts_disabled=Webbtypsnitt är inaktiverade: kan inte använda inbäddade PDF-typsnitt. +document_colors_not_allowed=PDF-dokument tillåts inte använda egna färger: “Låt sidor använda egna färger” är inaktiverat i webbläsaren. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ta/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ta/viewer.properties new file mode 100644 index 0000000..19a8de4 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ta/viewer.properties @@ -0,0 +1,201 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=முந்தைய பக்கம் +previous_label=முந்தையது +next.title=அடுத்த பக்கம் +next_label=அடுத்து + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=பக்கம் +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} இல் +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages={{pagesCount}}) இல் ({{pageNumber}} + +zoom_out.title=சிறிதாக்கு +zoom_out_label=சிறிதாக்கு +zoom_in.title=பெரிதாக்கு +zoom_in_label=பெரிதாக்கு +zoom.title=பெரிதாக்கு +presentation_mode.title=விளக்ககாட்சி பயன்முறைக்கு மாறு +presentation_mode_label=விளக்ககாட்சி பயன்முறை +open_file.title=கோப்பினை திற +open_file_label=திற +print.title=அச்சிடு +print_label=அச்சிடு +download.title=பதிவிறக்கு +download_label=பதிவிறக்கு +bookmark.title=தற்போதைய காட்சி (புதிய சாளரத்திற்கு நகலெடு அல்லது புதிய சாளரத்தில் திற) +bookmark_label=தற்போதைய காட்சி + +# Secondary toolbar and context menu +tools.title=கருவிகள் +tools_label=கருவிகள் +first_page.title=முதல் பக்கத்திற்கு செல்லவும் +first_page.label=முதல் பக்கத்திற்கு செல்லவும் +first_page_label=முதல் பக்கத்திற்கு செல்லவும் +last_page.title=கடைசி பக்கத்திற்கு செல்லவும் +last_page.label=கடைசி பக்கத்திற்கு செல்லவும் +last_page_label=கடைசி பக்கத்திற்கு செல்லவும் +page_rotate_cw.title=வலஞ்சுழியாக சுழற்று +page_rotate_cw.label=வலஞ்சுழியாக சுழற்று +page_rotate_cw_label=வலஞ்சுழியாக சுழற்று +page_rotate_ccw.title=இடஞ்சுழியாக சுழற்று +page_rotate_ccw.label=இடஞ்சுழியாக சுழற்று +page_rotate_ccw_label=இடஞ்சுழியாக சுழற்று + +cursor_text_select_tool.title=உரைத் தெரிவு கருவியைச் செயல்படுத்து +cursor_text_select_tool_label=உரைத் தெரிவு கருவி +cursor_hand_tool.title=கைக் கருவிக்ச் செயற்படுத்து +cursor_hand_tool_label=கைக்குருவி + +# Document properties dialog box +document_properties.title=ஆவண பண்புகள்... +document_properties_label=ஆவண பண்புகள்... +document_properties_file_name=கோப்பு பெயர்: +document_properties_file_size=கோப்பின் அளவு: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} கிபை ({{size_b}} பைட்டுகள்) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} மெபை ({{size_b}} பைட்டுகள்) +document_properties_title=தலைப்பு: +document_properties_author=எழுதியவர் +document_properties_subject=பொருள்: +document_properties_keywords=முக்கிய வார்த்தைகள்: +document_properties_creation_date=படைத்த தேதி : +document_properties_modification_date=திருத்திய தேதி: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=உருவாக்குபவர்: +document_properties_producer=பிடிஎஃப் தயாரிப்பாளர்: +document_properties_version=PDF பதிப்பு: +document_properties_page_count=பக்க எண்ணிக்கை: +document_properties_page_size=பக்க அளவு: +document_properties_page_size_unit_inches=இதில் +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=நிலைபதிப்பு +document_properties_page_size_orientation_landscape=நிலைபரப்பு +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=கடிதம் +document_properties_page_size_name_legal=சட்டபூர்வ +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +document_properties_close=மூடுக + +print_progress_message=அச்சிடுவதற்கான ஆவணம் தயாராகிறது... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ரத்து + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=பக்கப் பட்டியை நிலைமாற்று +toggle_sidebar_notification.title=பக்கப்பட்டையை நிலைமாற்று (வெளிக்கோடு/இணைப்புகளை ஆவணம் கொண்டுள்ளது) +toggle_sidebar_label=பக்கப் பட்டியை நிலைமாற்று +document_outline.title=ஆவண அடக்கத்தைக் காட்டு (இருமுறைச் சொடுக்கி அனைத்து உறுப்பிடிகளையும் விரி/சேர்) +document_outline_label=ஆவண வெளிவரை +attachments.title=இணைப்புகளை காண்பி +attachments_label=இணைப்புகள் +thumbs.title=சிறுபடங்களைக் காண்பி +thumbs_label=சிறுபடங்கள் +findbar.title=ஆவணத்தில் கண்டறி +findbar_label=தேடு + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=பக்கம் {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=பக்கத்தின் சிறுபடம் {{page}} + +# Find panel button title and messages +find_input.title=கண்டுபிடி +find_input.placeholder=ஆவணத்தில் கண்டறி… +find_previous.title=இந்த சொற்றொடரின் முந்தைய நிகழ்வை தேடு +find_previous_label=முந்தையது +find_next.title=இந்த சொற்றொடரின் அடுத்த நிகழ்வை தேடு +find_next_label=அடுத்து +find_highlight=அனைத்தையும் தனிப்படுத்து +find_match_case_label=பேரெழுத்தாக்கத்தை உணர் +find_reached_top=ஆவணத்தின் மேல் பகுதியை அடைந்தது, அடிப்பக்கத்திலிருந்து தொடர்ந்தது +find_reached_bottom=ஆவணத்தின் முடிவை அடைந்தது, மேலிருந்து தொடர்ந்தது +find_not_found=சொற்றொடர் காணவில்லை + +# Error panel labels +error_more_info=கூடுதல் தகவல் +error_less_info=குறைந்த தகவல் +error_close=மூடுக +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=செய்தி: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=ஸ்டேக்: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=கோப்பு: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=வரி: {{line}} +rendering_error=இந்தப் பக்கத்தை காட்சிப்படுத்தும் போது ஒரு பிழை ஏற்பட்டது. + +# Predefined zoom values +page_scale_width=பக்க அகலம் +page_scale_fit=பக்கப் பொருத்தம் +page_scale_auto=தானியக்க பெரிதாக்கல் +page_scale_actual=உண்மையான அளவு +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=பிழை +loading_error=PDF ஐ ஏற்றும் போது ஒரு பிழை ஏற்பட்டது. +invalid_file_error=செல்லுபடியாகாத அல்லது சிதைந்த PDF கோப்பு. +missing_file_error=PDF கோப்பு காணவில்லை. +unexpected_response_error=சேவகன் பதில் எதிர்பாரதது. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} விளக்கம்] +password_label=இந்த PDF கோப்பை திறக்க கடவுச்சொல்லை உள்ளிடவும். +password_invalid=செல்லுபடியாகாத கடவுச்சொல், தயை செய்து மீண்டும் முயற்சி செய்க. +password_ok=சரி +password_cancel=ரத்து + +printing_not_supported=எச்சரிக்கை: இந்த உலாவி அச்சிடுதலை முழுமையாக ஆதரிக்கவில்லை. +printing_not_ready=எச்சரிக்கை: PDF அச்சிட முழுவதுமாக ஏற்றப்படவில்லை. +web_fonts_disabled=வலை எழுத்துருக்கள் முடக்கப்பட்டுள்ளன: உட்பொதிக்கப்பட்ட PDF எழுத்துருக்களைப் பயன்படுத்த முடியவில்லை. +document_colors_not_allowed=PDF ஆவணங்களுக்குச் சொந்த நிறங்களைப் பயன்படுத்த அனுமதியில்லை: உலாவியில் "பக்கங்கள் தங்கள் சொந்த நிறங்களைத் தேர்வு செய்துகொள்ள அனுமதி" என்னும் விருப்பம் முடக்கப்பட்டுள்ளது. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/te/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/te/viewer.properties new file mode 100644 index 0000000..56f954d --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/te/viewer.properties @@ -0,0 +1,222 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=మునుపటి పేజీ +previous_label=క్రితం +next.title=తరువాత పేజీ +next_label=తరువాత + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=పేజీ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=మొత్తం {{pagesCount}} లో +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=(మొత్తం {{pagesCount}} లో {{pageNumber}}వది) + +zoom_out.title=జూమ్ తగ్గించు +zoom_out_label=జూమ్ తగ్గించు +zoom_in.title=జూమ్ చేయి +zoom_in_label=జూమ్ చేయి +zoom.title=జూమ్ +presentation_mode.title=ప్రదర్శనా రీతికి మారు +presentation_mode_label=ప్రదర్శనా రీతి +open_file.title=ఫైల్ తెరువు +open_file_label=తెరువు +print.title=ముద్రించు +print_label=ముద్రించు +download.title=దింపుకోళ్ళు +download_label=దింపుకోళ్ళు +bookmark.title=ప్రస్తుత దర్శనం (కాపీ చేయి లేదా కొత్త విండోలో తెరువు) +bookmark_label=ప్రస్తుత దర్శనం + +# Secondary toolbar and context menu +tools.title=పనిముట్లు +tools_label=పనిముట్లు +first_page.title=మొదటి పేజీకి వెళ్ళు +first_page.label=మొదటి పేజీకి వెళ్ళు +first_page_label=మొదటి పేజీకి వెళ్ళు +last_page.title=చివరి పేజీకి వెళ్ళు +last_page.label=చివరి పేజీకి వెళ్ళు +last_page_label=చివరి పేజీకి వెళ్ళు +page_rotate_cw.title=సవ్యదిశలో తిప్పు +page_rotate_cw.label=సవ్యదిశలో తిప్పు +page_rotate_cw_label=సవ్యదిశలో తిప్పు +page_rotate_ccw.title=అపసవ్యదిశలో తిప్పు +page_rotate_ccw.label=అపసవ్యదిశలో తిప్పు +page_rotate_ccw_label=అపసవ్యదిశలో తిప్పు + +cursor_text_select_tool.title=టెక్స్ట్ ఎంపిక సాధనాన్ని ప్రారంభించండి +cursor_text_select_tool_label=టెక్స్ట్ ఎంపిక సాధనం +cursor_hand_tool.title=చేతి సాధనం చేతనించు +cursor_hand_tool_label=చేతి సాధనం + +scroll_vertical_label=నిలువు స్క్రోలింగు + + +# Document properties dialog box +document_properties.title=పత్రము లక్షణాలు... +document_properties_label=పత్రము లక్షణాలు... +document_properties_file_name=దస్త్రం పేరు: +document_properties_file_size=దస్త్రం పరిమాణం: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=శీర్షిక: +document_properties_author=మూలకర్త: +document_properties_subject=విషయం: +document_properties_keywords=కీ పదాలు: +document_properties_creation_date=సృష్టించిన తేదీ: +document_properties_modification_date=సవరించిన తేదీ: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=సృష్టికర్త: +document_properties_producer=PDF ఉత్పాదకి: +document_properties_version=PDF వర్షన్: +document_properties_page_count=పేజీల సంఖ్య: +document_properties_page_size=కాగితం పరిమాణం: +document_properties_page_size_unit_inches=లో +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=నిలువుచిత్రం +document_properties_page_size_orientation_landscape=అడ్డచిత్రం +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=లేఖ +document_properties_page_size_name_legal=చట్టపరమైన +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized_yes=అవును +document_properties_linearized_no=కాదు +document_properties_close=మూసివేయి + +print_progress_message=ముద్రించడానికి పత్రము సిద్ధమవుతున్నది… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=రద్దుచేయి + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=పక్కపట్టీ మార్చు +toggle_sidebar_label=పక్కపట్టీ మార్చు +document_outline.title=పత్రము రూపము చూపించు (డబుల్ క్లిక్ చేసి అన్ని అంశాలను విస్తరించు/కూల్చు) +document_outline_label=పత్రము అవుట్‌లైన్ +attachments.title=అనుబంధాలు చూపు +attachments_label=అనుబంధాలు +thumbs.title=థంబ్‌నైల్స్ చూపు +thumbs_label=థంబ్‌నైల్స్ +findbar.title=పత్రములో కనుగొనుము +findbar_label=కనుగొను + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=పేజీ {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}} పేజీ నఖచిత్రం + +# Find panel button title and messages +find_input.title=కనుగొను +find_input.placeholder=పత్రములో కనుగొను… +find_previous.title=పదం యొక్క ముందు సంభవాన్ని కనుగొను +find_previous_label=మునుపటి +find_next.title=పదం యొక్క తర్వాతి సంభవాన్ని కనుగొను +find_next_label=తరువాత +find_highlight=అన్నిటిని ఉద్దీపనం చేయుము +find_match_case_label=అక్షరముల తేడాతో పోల్చు +find_entire_word_label=పూర్తి పదాలు +find_reached_top=పేజీ పైకి చేరుకున్నది, క్రింది నుండి కొనసాగించండి +find_reached_bottom=పేజీ చివరకు చేరుకున్నది, పైనుండి కొనసాగించండి +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_not_found=పదబంధం కనబడలేదు + +# Error panel labels +error_more_info=మరింత సమాచారం +error_less_info=తక్కువ సమాచారం +error_close=మూసివేయి +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=సందేశం: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=స్టాక్: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ఫైలు: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=వరుస: {{line}} +rendering_error=పేజీను రెండర్ చేయుటలో ఒక దోషం ఎదురైంది. + +# Predefined zoom values +page_scale_width=పేజీ వెడల్పు +page_scale_fit=పేజీ అమర్పు +page_scale_auto=స్వయంచాలక జూమ్ +page_scale_actual=యథార్ధ పరిమాణం +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=దోషం +loading_error=PDF లోడవుచున్నప్పుడు ఒక దోషం ఎదురైంది. +invalid_file_error=చెల్లని లేదా పాడైన PDF ఫైలు. +missing_file_error=దొరకని PDF ఫైలు. +unexpected_response_error=అనుకోని సర్వర్ స్పందన. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} టీకా] +password_label=ఈ PDF ఫైల్ తెరుచుటకు సంకేతపదం ప్రవేశపెట్టుము. +password_invalid=సంకేతపదం చెల్లదు. దయచేసి మళ్ళీ ప్రయత్నించండి. +password_ok=సరే +password_cancel=రద్దుచేయి + +printing_not_supported=హెచ్చరిక: ఈ విహారిణి చేత ముద్రణ పూర్తిగా తోడ్పాటు లేదు. +printing_not_ready=హెచ్చరిక: ముద్రణ కొరకు ఈ PDF పూర్తిగా లోడవలేదు. +web_fonts_disabled=వెబ్ ఫాంట్లు అచేతనించబడెను: ఎంబెడెడ్ PDF ఫాంట్లు ఉపయోగించలేక పోయింది. +document_colors_not_allowed=PDF పత్రాలు వాటి స్వంత రంగులను ఉపయోగించుకొనుటకు అనుమతించబడవు: విహరణి నందు “పేజీలను వాటి స్వంత రంగులను ఎంచుకొనుటకు అనుమతించు” అచేతనం చేయబడివుంది. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/th/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/th/viewer.properties new file mode 100644 index 0000000..b66865f --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/th/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=หน้าก่อนหน้า +previous_label=ก่อนหน้า +next.title=หน้าถัดไป +next_label=ถัดไป + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=หน้า +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=จาก {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} จาก {{pagesCount}}) + +zoom_out.title=ซูมออก +zoom_out_label=ซูมออก +zoom_in.title=ซูมเข้า +zoom_in_label=ซูมเข้า +zoom.title=ซูม +presentation_mode.title=สลับเป็นโหมดการนำเสนอ +presentation_mode_label=โหมดการนำเสนอ +open_file.title=เปิดไฟล์ +open_file_label=เปิด +print.title=พิมพ์ +print_label=พิมพ์ +download.title=ดาวน์โหลด +download_label=ดาวน์โหลด +bookmark.title=มุมมองปัจจุบัน (คัดลอกหรือเปิดในหน้าต่างใหม่) +bookmark_label=มุมมองปัจจุบัน + +# Secondary toolbar and context menu +tools.title=เครื่องมือ +tools_label=เครื่องมือ +first_page.title=ไปยังหน้าแรก +first_page.label=ไปยังหน้าแรก +first_page_label=ไปยังหน้าแรก +last_page.title=ไปยังหน้าสุดท้าย +last_page.label=ไปยังหน้าสุดท้าย +last_page_label=ไปยังหน้าสุดท้าย +page_rotate_cw.title=หมุนตามเข็มนาฬิกา +page_rotate_cw.label=หมุนตามเข็มนาฬิกา +page_rotate_cw_label=หมุนตามเข็มนาฬิกา +page_rotate_ccw.title=หมุนทวนเข็มนาฬิกา +page_rotate_ccw.label=หมุนทวนเข็มนาฬิกา +page_rotate_ccw_label=หมุนทวนเข็มนาฬิกา + +cursor_text_select_tool.title=เปิดใช้งานเครื่องมือการเลือกข้อความ +cursor_text_select_tool_label=เครื่องมือการเลือกข้อความ +cursor_hand_tool.title=เปิดใช้งานเครื่องมือมือ +cursor_hand_tool_label=เครื่องมือมือ + +scroll_vertical.title=ใช้การเลื่อนแนวตั้ง +scroll_vertical_label=การเลื่อนแนวตั้ง +scroll_horizontal.title=ใช้การเลื่อนแนวนอน +scroll_horizontal_label=การเลื่อนแนวนอน +scroll_wrapped.title=ใช้การเลื่อนแบบคลุม +scroll_wrapped_label=เลื่อนแบบคลุม + +spread_none.title=ไม่ต้องรวมการกระจายหน้า +spread_none_label=ไม่กระจาย +spread_odd.title=รวมการกระจายหน้าเริ่มจากหน้าคี่ +spread_odd_label=กระจายอย่างเหลือเศษ +spread_even.title=รวมการกระจายหน้าเริ่มจากหน้าคู่ +spread_even_label=กระจายอย่างเท่าเทียม + +# Document properties dialog box +document_properties.title=คุณสมบัติเอกสาร… +document_properties_label=คุณสมบัติเอกสาร… +document_properties_file_name=ชื่อไฟล์: +document_properties_file_size=ขนาดไฟล์: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} ไบต์) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} ไบต์) +document_properties_title=ชื่อเรื่อง: +document_properties_author=ผู้สร้าง: +document_properties_subject=ชื่อเรื่อง: +document_properties_keywords=คำสำคัญ: +document_properties_creation_date=วันที่สร้าง: +document_properties_modification_date=วันที่แก้ไข: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=ผู้สร้าง: +document_properties_producer=ผู้ผลิต PDF: +document_properties_version=รุ่น PDF: +document_properties_page_count=จำนวนหน้า: +document_properties_page_size=ขนาดหน้า: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=แนวตั้ง +document_properties_page_size_orientation_landscape=แนวนอน +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=จดหมาย +document_properties_page_size_name_legal=ข้อกฎหมาย +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=มุมมองเว็บแบบรวดเร็ว: +document_properties_linearized_yes=ใช่ +document_properties_linearized_no=ไม่ +document_properties_close=ปิด + +print_progress_message=กำลังเตรียมเอกสารสำหรับการพิมพ์… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ยกเลิก + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=เปิด/ปิดแถบข้าง +toggle_sidebar_notification.title=เปิด/ปิดแถบข้าง (เอกสารมีเค้าร่าง/ไฟล์แนบ) +toggle_sidebar_label=เปิด/ปิดแถบข้าง +document_outline.title=แสดงเค้าร่างเอกสาร (คลิกสองครั้งเพื่อขยาย/ยุบรายการทั้งหมด) +document_outline_label=เค้าร่างเอกสาร +attachments.title=แสดงไฟล์แนบ +attachments_label=ไฟล์แนบ +thumbs.title=แสดงภาพขนาดย่อ +thumbs_label=ภาพขนาดย่อ +findbar.title=ค้นหาในเอกสาร +findbar_label=ค้นหา + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=หน้า {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=หน้า {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=ภาพขนาดย่อของหน้า {{page}} + +# Find panel button title and messages +find_input.title=ค้นหา +find_input.placeholder=ค้นหาในเอกสาร… +find_previous.title=หาตำแหน่งก่อนหน้าของวลี +find_previous_label=ก่อนหน้า +find_next.title=หาตำแหน่งถัดไปของวลี +find_next_label=ถัดไป +find_highlight=เน้นสีทั้งหมด +find_match_case_label=ตัวพิมพ์ใหญ่เล็กตรงกัน +find_entire_word_label=ทั้งคำ +find_reached_top=ค้นหาถึงจุดเริ่มต้นของหน้า เริ่มค้นต่อจากด้านล่าง +find_reached_bottom=ค้นหาถึงจุดสิ้นสุดหน้า เริ่มค้นต่อจากด้านบน +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} จาก {{total}} ที่ตรงกัน +find_match_count[two]={{current}} จาก {{total}} ที่ตรงกัน +find_match_count[few]={{current}} จาก {{total}} ที่ตรงกัน +find_match_count[many]={{current}} จาก {{total}} ที่ตรงกัน +find_match_count[other]={{current}} จาก {{total}} ที่ตรงกัน +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=มากกว่า {{limit}} ที่ตรงกัน +find_match_count_limit[one]=มากกว่า {{limit}} ที่ตรงกัน +find_match_count_limit[two]=มากกว่า {{limit}} ที่ตรงกัน +find_match_count_limit[few]=มากกว่า {{limit}} ที่ตรงกัน +find_match_count_limit[many]=มากกว่า {{limit}} ที่ตรงกัน +find_match_count_limit[other]=มากกว่า {{limit}} ที่ตรงกัน +find_not_found=ไม่พบวลี + +# Error panel labels +error_more_info=ข้อมูลเพิ่มเติม +error_less_info=ข้อมูลน้อยลง +error_close=ปิด +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=ข้อความ: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=สแตก: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ไฟล์: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=บรรทัด: {{line}} +rendering_error=เกิดข้อผิดพลาดขณะเรนเดอร์หน้า + +# Predefined zoom values +page_scale_width=ความกว้างหน้า +page_scale_fit=พอดีหน้า +page_scale_auto=ซูมอัตโนมัติ +page_scale_actual=ขนาดจริง +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=ข้อผิดพลาด +loading_error=เกิดข้อผิดพลาดขณะโหลด PDF +invalid_file_error=ไฟล์ PDF ไม่ถูกต้องหรือเสียหาย +missing_file_error=ไฟล์ PDF หายไป +unexpected_response_error=การตอบสนองของเซิร์ฟเวอร์ที่ไม่คาดคิด + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[คำอธิบายประกอบ {{type}}] +password_label=ป้อนรหัสผ่านเพื่อเปิดไฟล์ PDF นี้ +password_invalid=รหัสผ่านไม่ถูกต้อง โปรดลองอีกครั้ง +password_ok=ตกลง +password_cancel=ยกเลิก + +printing_not_supported=คำเตือน: เบราว์เซอร์นี้ไม่ได้สนับสนุนการพิมพ์อย่างเต็มที่ +printing_not_ready=คำเตือน: PDF ไม่ได้รับการโหลดอย่างเต็มที่สำหรับการพิมพ์ +web_fonts_disabled=แบบอักษรเว็บถูกปิดใช้งาน: ไม่สามารถใช้แบบอักษร PDF ฝังตัว +document_colors_not_allowed=เอกสาร PDF ไม่ได้รับอนุญาตให้ใช้สีของตัวเอง: "อนุญาตให้หน้าเอกสารสามารถเลือกสีของตัวเอง" ถูกปิดใช้งานในเบราว์เซอร์ diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/tl/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/tl/viewer.properties new file mode 100644 index 0000000..32b3483 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/tl/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Naunang Pahina +previous_label=Nakaraan +next.title=Sunod na Pahina +next_label=Sunod + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pahina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=ng {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} ng {{pagesCount}}) + +zoom_out.title=Paliitin +zoom_out_label=Paliitin +zoom_in.title=Palakihin +zoom_in_label=Palakihin +zoom.title=Mag-zoom +presentation_mode.title=Switch to Presentation Mode +presentation_mode_label=Presentation Mode +open_file.title=Magbukas ng file +open_file_label=Buksan +print.title=i-Print +print_label=i-Print +download.title=Download +download_label=Download +bookmark.title=Kasalukuyang tingin (kopyahin o buksan sa bagong window) +bookmark_label=Kasalukuyang tingin + +# Secondary toolbar and context menu +tools.title=Mga Kagamitan +tools_label=Mga Kagamitan +first_page.title=Pumunta sa Unang Pahina +first_page.label=Pumunta sa Unang Pahina +first_page_label=Pumunta sa Unang Pahina +last_page.title=Pumunta sa Huling Pahina +last_page.label=Pumunta sa Huling Pahina +last_page_label=Pumunta sa Huling Pahina +page_rotate_cw.title=Paikutin ang Clockwise +page_rotate_cw.label=Paikutin ang Clockwise +page_rotate_cw_label=Paikutin ang Clockwise +page_rotate_ccw.title=Paikutin ang Counterclockwise +page_rotate_ccw.label=Paikutin ang Counterclockwise +page_rotate_ccw_label=Paikutin ang Counterclockwise + +cursor_text_select_tool.title=Enable Text Selection Tool +cursor_text_select_tool_label=Text Selection Tool +cursor_hand_tool.title=Enable Hand Tool +cursor_hand_tool_label=Hand Tool + +scroll_vertical.title=Use Vertical Scrolling +scroll_vertical_label=Vertical Scrolling +scroll_horizontal.title=Use Horizontal Scrolling +scroll_horizontal_label=Horizontal Scrolling +scroll_wrapped.title=Use Wrapped Scrolling +scroll_wrapped_label=Wrapped Scrolling + +spread_none.title=Do not join page spreads +spread_none_label=No Spreads +spread_odd.title=Join page spreads starting with odd-numbered pages +spread_odd_label=Odd Spreads +spread_even.title=Join page spreads starting with even-numbered pages +spread_even_label=Even Spreads + +# Document properties dialog box +document_properties.title=Document Properties… +document_properties_label=Document Properties… +document_properties_file_name=File name: +document_properties_file_size=File size: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Pamagat: +document_properties_author=May Akda: +document_properties_subject=Subject: +document_properties_keywords=Mga keyword: +document_properties_creation_date=Creation Date: +document_properties_modification_date=Modification Date: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creator: +document_properties_producer=PDF Producer: +document_properties_version=PDF Version: +document_properties_page_count=Page Count: +document_properties_page_size=Page Size: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portrait +document_properties_page_size_orientation_landscape=landscape +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Fast Web View: +document_properties_linearized_yes=Oo +document_properties_linearized_no=Hindi +document_properties_close=Isara + +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Kanselahin + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Toggle Sidebar +toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments) +toggle_sidebar_label=Toggle Sidebar +document_outline.title=Show Document Outline (double-click to expand/collapse all items) +document_outline_label=Document Outline +attachments.title=Show Attachments +attachments_label=Attachments +thumbs.title=Ipakita ang mga Thumbnails +thumbs_label=Thumbnails +findbar.title=Find in Document +findbar_label=Hanapin + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Pahina {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pahina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Thumbnail ng Pahina {{page}} + +# Find panel button title and messages +find_input.title=Hanapin +find_input.placeholder=Find in document… +find_previous.title=Hanapin ang nakaraang pangyayari ng parirala +find_previous_label=Nakaraang +find_next.title=Hanapin ang susunod na pangyayari ng parirala +find_next_label=Susunod +find_highlight=I-highlight lahat +find_match_case_label=Match case +find_entire_word_label=Whole words +find_reached_top=Reached top of document, continued from bottom +find_reached_bottom=Reached end of document, continued from top +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} of {{total}} match +find_match_count[two]={{current}} of {{total}} matches +find_match_count[few]={{current}} of {{total}} matches +find_match_count[many]={{current}} of {{total}} matches +find_match_count[other]={{current}} of {{total}} matches +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=More than {{limit}} matches +find_match_count_limit[one]=More than {{limit}} match +find_match_count_limit[two]=More than {{limit}} matches +find_match_count_limit[few]=More than {{limit}} matches +find_match_count_limit[many]=More than {{limit}} matches +find_match_count_limit[other]=More than {{limit}} matches +find_not_found=Hindi nakita ang prasko + +# Error panel labels +error_more_info=Karagdagang Impormasyon +error_less_info=Mas Kaunting Impormasyon +error_close=Sarado +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensahe: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=File: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linya: {{line}} +rendering_error=May naganap na pagkakamali habang pagsasalin sa pahina. + +# Predefined zoom values +page_scale_width=Lapad ng Pahina +page_scale_fit=ang pahina ay angkop +page_scale_auto=Automatic Zoom +page_scale_actual=Totoong sukat +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Error +loading_error=May maling nangyari habang kinakarga ang PDF. +invalid_file_error=Di-wasto o masira ang PDF file. +missing_file_error=Nawawalang PDF file. +unexpected_response_error=Hindi inaasahang tugon ng server. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=Ipasok ang password upang buksan ang PDF file na ito. +password_invalid=Invalid password. Please try again. +password_ok=OK +password_cancel=Kanselahin + +printing_not_supported=Warning: Printing is not fully supported by this browser. +printing_not_ready=Warning: The PDF is not fully loaded for printing. +web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts. +document_colors_not_allowed=PDF documents are not allowed to use their own colors: “Allow pages to choose their own colors” is deactivated in the browser. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/tr/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/tr/viewer.properties new file mode 100644 index 0000000..f398fc9 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/tr/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Önceki sayfa +previous_label=Önceki +next.title=Sonraki sayfa +next_label=Sonraki + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Sayfa +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) + +zoom_out.title=Uzaklaştır +zoom_out_label=Uzaklaştır +zoom_in.title=Yaklaştır +zoom_in_label=Yaklaştır +zoom.title=Yakınlaştırma +presentation_mode.title=Sunum moduna geç +presentation_mode_label=Sunum Modu +open_file.title=Dosya aç +open_file_label=Aç +print.title=Yazdır +print_label=Yazdır +download.title=İndir +download_label=İndir +bookmark.title=Geçerli görünüm (kopyala veya yeni pencerede aç) +bookmark_label=Geçerli görünüm + +# Secondary toolbar and context menu +tools.title=Araçlar +tools_label=Araçlar +first_page.title=İlk sayfaya git +first_page.label=İlk sayfaya git +first_page_label=İlk sayfaya git +last_page.title=Son sayfaya git +last_page.label=Son sayfaya git +last_page_label=Son sayfaya git +page_rotate_cw.title=Saat yönünde döndür +page_rotate_cw.label=Saat yönünde döndür +page_rotate_cw_label=Saat yönünde döndür +page_rotate_ccw.title=Saat yönünün tersine döndür +page_rotate_ccw.label=Saat yönünün tersine döndür +page_rotate_ccw_label=Saat yönünün tersine döndür + +cursor_text_select_tool.title=Metin seçme aracını etkinleştir +cursor_text_select_tool_label=Metin seçme aracı +cursor_hand_tool.title=El aracını etkinleştir +cursor_hand_tool_label=El aracı + +scroll_vertical.title=Dikey kaydırma kullan +scroll_vertical_label=Dikey kaydırma +scroll_horizontal.title=Yatay kaydırma kullan +scroll_horizontal_label=Yatay kaydırma +scroll_wrapped.title=Yan yana kaydırmayı kullan +scroll_wrapped_label=Yan yana kaydırma + +spread_none.title=Yan yana sayfaları birleştirme +spread_none_label=Birleştirme +spread_odd.title=Yan yana sayfaları tek numaralı sayfalardan başlayarak birleştir +spread_odd_label=Tek numaralı +spread_even.title=Yan yana sayfaları çift numaralı sayfalardan başlayarak birleştir +spread_even_label=Çift numaralı + +# Document properties dialog box +document_properties.title=Belge özellikleri… +document_properties_label=Belge özellikleri… +document_properties_file_name=Dosya adı: +document_properties_file_size=Dosya boyutu: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bayt) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bayt) +document_properties_title=Başlık: +document_properties_author=Yazar: +document_properties_subject=Konu: +document_properties_keywords=Anahtar kelimeler: +document_properties_creation_date=Oluturma tarihi: +document_properties_modification_date=Değiştirme tarihi: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}} {{time}} +document_properties_creator=Oluşturan: +document_properties_producer=PDF üreticisi: +document_properties_version=PDF sürümü: +document_properties_page_count=Sayfa sayısı: +document_properties_page_size=Sayfa boyutu: +document_properties_page_size_unit_inches=inç +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=dikey +document_properties_page_size_orientation_landscape=yatay +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Hızlı web görünümü: +document_properties_linearized_yes=Evet +document_properties_linearized_no=Hayır +document_properties_close=Kapat + +print_progress_message=Belge yazdırılmaya hazırlanıyor… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent=%{{progress}} +print_progress_close=İptal + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Kenar çubuğunu aç/kapat +toggle_sidebar_notification.title=Kenar çubuğunu aç/kapat (Belge ana hat/ekler içeriyor) +toggle_sidebar_label=Kenar çubuğunu aç/kapat +document_outline.title=Belge ana hatlarını göster (Tüm öğeleri genişletmek/daraltmak için çift tıklayın) +document_outline_label=Belge ana hatları +attachments.title=Ekleri göster +attachments_label=Ekler +thumbs.title=Küçük resimleri göster +thumbs_label=Küçük resimler +findbar.title=Belgede bul +findbar_label=Bul + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Sayfa {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Sayfa {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}}. sayfanın küçük hâli + +# Find panel button title and messages +find_input.title=Bul +find_input.placeholder=Belgede bul… +find_previous.title=Önceki eşleşmeyi bul +find_previous_label=Önceki +find_next.title=Sonraki eşleşmeyi bul +find_next_label=Sonraki +find_highlight=Tümünü vurgula +find_match_case_label=Büyük-küçük harfe duyarlı +find_entire_word_label=Tam sözcükler +find_reached_top=Belgenin başına ulaşıldı, sonundan devam edildi +find_reached_bottom=Belgenin sonuna ulaşıldı, başından devam edildi +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{total}} eşleşmeden {{current}}. eşleşme +find_match_count[two]={{total}} eşleşmeden {{current}}. eşleşme +find_match_count[few]={{total}} eşleşmeden {{current}}. eşleşme +find_match_count[many]={{total}} eşleşmeden {{current}}. eşleşme +find_match_count[other]={{total}} eşleşmeden {{current}}. eşleşme +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} eşleşmeden fazla +find_match_count_limit[one]={{limit}} eşleşmeden fazla +find_match_count_limit[two]={{limit}} eşleşmeden fazla +find_match_count_limit[few]={{limit}} eşleşmeden fazla +find_match_count_limit[many]={{limit}} eşleşmeden fazla +find_match_count_limit[other]={{limit}} eşleşmeden fazla +find_not_found=Eşleşme bulunamadı + +# Error panel labels +error_more_info=Daha fazla bilgi al +error_less_info=Daha az bilgi +error_close=Kapat +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js sürüm {{version}} (yapı: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=İleti: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Yığın: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Dosya: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Satır: {{line}} +rendering_error=Sayfa yorumlanırken bir hata oluştu. + +# Predefined zoom values +page_scale_width=Sayfa genişliği +page_scale_fit=Sayfayı sığdır +page_scale_auto=Otomatik yakınlaştır +page_scale_actual=Gerçek boyut +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent=%{{scale}} + +# Loading indicator messages +loading_error_indicator=Hata +loading_error=PDF yüklenirken bir hata oluştu. +invalid_file_error=Geçersiz veya bozulmuş PDF dosyası. +missing_file_error=PDF dosyası eksik. +unexpected_response_error=Beklenmeyen sunucu yanıtı. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} işareti] +password_label=Bu PDF dosyasını açmak için parolasını yazın. +password_invalid=Geçersiz parola. Lütfen yeniden deneyin. +password_ok=Tamam +password_cancel=İptal + +printing_not_supported=Uyarı: Yazdırma bu tarayıcı tarafından tam olarak desteklenmemektedir. +printing_not_ready=Uyarı: PDF tamamen yüklenmedi ve yazdırmaya hazır değil. +web_fonts_disabled=Web fontları devre dışı: Gömülü PDF fontları kullanılamıyor. +document_colors_not_allowed=PDF belgelerinin kendi renklerini kullanması için izin verilmiyor: “Sayfalara kendi renklerini seçmesi için izin ver” tarayıcıda etkinleştirilmemiş. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/trs/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/trs/viewer.properties new file mode 100644 index 0000000..65252f7 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/trs/viewer.properties @@ -0,0 +1,213 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pajinâ gunâj rukùu +previous_label=Sa gachin +next.title=Pajinâ 'na' ñaan +next_label=Ne' ñaan + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Ñanj +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=si'iaj {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) + +zoom_out.title=Nagi'iaj li' +zoom_out_label=Nagi'iaj li' +zoom_in.title=Nagi'iaj niko' +zoom_in_label=Nagi'iaj niko' +zoom.title=dàj nìko ma'an +presentation_mode.title=Naduno' daj ga ma +presentation_mode_label=Daj gà ma +open_file.title=Na'nïn' chrû ñanj +open_file_label=Na'nïn +print.title=Nari' ña du'ua +print_label=Nari' ñadu'ua +download.title=Nadunïnj +download_label=Nadunïnj +bookmark.title=Daj hua ma (Guxun' nej na'nïn' riña ventana nakàa) +bookmark_label=Daj hua ma + +# Secondary toolbar and context menu +tools.title=Rasun +tools_label=Nej rasùun +first_page.title=gun' riña pajina asiniin +first_page.label=Gun' riña pajina asiniin +first_page_label=Gun' riña pajina asiniin +last_page.title=Gun' riña pajina rukù ni'in +last_page.label=Gun' riña pajina rukù ni'inj +last_page_label=Gun' riña pajina rukù ni'inj +page_rotate_cw.title=Tanikaj ne' huat +page_rotate_cw.label=Tanikaj ne' huat +page_rotate_cw_label=Tanikaj ne' huat +page_rotate_ccw.title=Tanikaj ne' chînt' +page_rotate_ccw.label=Tanikaj ne' chint +page_rotate_ccw_label=Tanikaj ne' chint + +cursor_text_select_tool.title=Dugi'iaj sun' sa ganahui texto +cursor_text_select_tool_label=Nej rasun arajsun' da' nahui' texto +cursor_hand_tool.title=Nachrun' nej rasun +cursor_hand_tool_label=Sa rajsun ro'o' + +scroll_vertical.title=Garasun' dukuán runūu +scroll_vertical_label=Dukuán runūu +scroll_horizontal.title=Garasun' dukuán nikin' nahui +scroll_horizontal_label=Dukuán nikin' nahui +scroll_wrapped.title=Garasun' sa nachree +scroll_wrapped_label=Sa nachree + +spread_none.title=Si nagi'iaj nugun'un' nej pagina hua ninin +spread_none_label=Ni'io daj hua pagina +spread_odd.title=Nagi'iaj nugua'ant nej pajina +spread_odd_label=Ni'io' daj hua libro gurin +spread_even.title=Nakāj dugui' ngà nej pajinâ ayi'ì ngà da' hùi hùi +spread_even_label=Nahuin nìko nej + +# Document properties dialog box +document_properties.title=Nej sa nikāj ñanj… +document_properties_label=Nej sa nikāj ñanj… +document_properties_file_name=Si yugui archîbo: +document_properties_file_size=Dàj yachìj archîbo: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Si yugui: +document_properties_author=Sí girirà: +document_properties_subject=Dugui': +document_properties_keywords=Nej nuguan' huìi: +document_properties_creation_date=Gui gurugui' man: +document_properties_modification_date=Nuguan' nahuin nakà: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Guiri ro' +document_properties_producer=Sa ri PDF: +document_properties_version=PDF Version: +document_properties_page_count=Si Guendâ Pâjina: +document_properties_page_size=Dàj yachìj pâjina: +document_properties_page_size_unit_inches=riña +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=nadu'ua +document_properties_page_size_orientation_landscape=dàj huaj +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Da'ngà'a +document_properties_page_size_name_legal=Nuguan' a'nï'ïn +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Nanèt chre ni'iajt riña Web: +document_properties_linearized_yes=Ga'ue +document_properties_linearized_no=Si ga'ue +document_properties_close=Narán + +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Duyichin' + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Nadunā barrâ nù yi'nïn +toggle_sidebar_label=Nadunā barrâ nù yi'nïn +findbar_label=Narì' + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. + +# Find panel button title and messages +find_input.title=Narì' +find_previous_label=Sa gachîn +find_next_label=Ne' ñaan +find_highlight=Daran' sa ña'an +find_match_case_label=Match case +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} si'iaj {{total}} guña gè huaj +find_match_count[two]={{current}} si'iaj {{total}} guña gè huaj +find_match_count[few]={{current}} si'iaj {{total}} guña gè huaj +find_match_count[many]={{current}} si'iaj {{total}} guña gè huaj +find_match_count[other]={{current}} of {{total}} matches +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Doj ngà da' {{limit}} nej sa nari' dugui'i +find_match_count_limit[one]=Doj ngà da' {{limit}} sa nari' dugui'i +find_match_count_limit[two]=Doj ngà da' {{limit}} nej sa nari' dugui'i +find_match_count_limit[few]=Doj ngà da' {{limit}} nej sa nari' dugui'i +find_match_count_limit[many]=Doj ngà da' {{limit}} nej sa nari' dugui'i +find_match_count_limit[other]=Doj ngà da' {{limit}} nej sa nari' dugui'i +find_not_found=Nu narì'ij nugua'anj + +# Error panel labels +error_more_info=Doj nuguan' a'min rayi'î nan +error_less_info=Dòj nuguan' a'min rayi'î nan +error_close=Narán +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Message: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Naru'ui': {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Archîbo: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Lînia: {{line}} + +# Predefined zoom values +page_scale_actual=Dàj yàchi akuan' nín +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Nitaj si hua hue'ej + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +password_ok=Ga'ue +password_cancel=Duyichin' + diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/uk/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/uk/viewer.properties new file mode 100644 index 0000000..599c8f9 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/uk/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Попередня сторінка +previous_label=Попередня +next.title=Наступна сторінка +next_label=Наступна + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Сторінка +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=із {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} із {{pagesCount}}) + +zoom_out.title=Зменшити +zoom_out_label=Зменшити +zoom_in.title=Збільшити +zoom_in_label=Збільшити +zoom.title=Масштаб +presentation_mode.title=Перейти в режим презентації +presentation_mode_label=Режим презентації +open_file.title=Відкрити файл +open_file_label=Відкрити +print.title=Друк +print_label=Друк +download.title=Завантажити +download_label=Завантажити +bookmark.title=Поточний вигляд (копіювати чи відкрити в новому вікні) +bookmark_label=Поточний вигляд + +# Secondary toolbar and context menu +tools.title=Інструменти +tools_label=Інструменти +first_page.title=На першу сторінку +first_page.label=На першу сторінку +first_page_label=На першу сторінку +last_page.title=На останню сторінку +last_page.label=На останню сторінку +last_page_label=На останню сторінку +page_rotate_cw.title=Повернути за годинниковою стрілкою +page_rotate_cw.label=Повернути за годинниковою стрілкою +page_rotate_cw_label=Повернути за годинниковою стрілкою +page_rotate_ccw.title=Повернути проти годинникової стрілки +page_rotate_ccw.label=Повернути проти годинникової стрілки +page_rotate_ccw_label=Повернути проти годинникової стрілки + +cursor_text_select_tool.title=Увімкнути інструмент вибору тексту +cursor_text_select_tool_label=Інструмент вибору тексту +cursor_hand_tool.title=Увімкнути інструмент «Рука» +cursor_hand_tool_label=Інструмент «Рука» + +scroll_vertical.title=Використовувати вертикальне прокручування +scroll_vertical_label=Вертикальне прокручування +scroll_horizontal.title=Використовувати горизонтальне прокручування +scroll_horizontal_label=Горизонтальне прокручування +scroll_wrapped.title=Використовувати масштабоване прокручування +scroll_wrapped_label=Масштабоване прокручування + +spread_none.title=Не використовувати розгорнуті сторінки +spread_none_label=Без розгорнутих сторінок +spread_odd.title=Розгорнуті сторінки починаються з непарних номерів +spread_odd_label=Непарні сторінки зліва +spread_even.title=Розгорнуті сторінки починаються з парних номерів +spread_even_label=Парні сторінки зліва + +# Document properties dialog box +document_properties.title=Властивості документа… +document_properties_label=Властивості документа… +document_properties_file_name=Назва файла: +document_properties_file_size=Розмір файла: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} КБ ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} МБ ({{size_b}} bytes) +document_properties_title=Заголовок: +document_properties_author=Автор: +document_properties_subject=Тема: +document_properties_keywords=Ключові слова: +document_properties_creation_date=Дата створення: +document_properties_modification_date=Дата зміни: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Створено: +document_properties_producer=Виробник PDF: +document_properties_version=Версія PDF: +document_properties_page_count=Кількість сторінок: +document_properties_page_size=Розмір сторінки: +document_properties_page_size_unit_inches=дюймів +document_properties_page_size_unit_millimeters=мм +document_properties_page_size_orientation_portrait=книжкова +document_properties_page_size_orientation_landscape=альбомна +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Швидкий перегляд в Інтернеті: +document_properties_linearized_yes=Так +document_properties_linearized_no=Ні +document_properties_close=Закрити + +print_progress_message=Підготовка документу до друку… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Скасувати + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Бічна панель +toggle_sidebar_notification.title=Перемкнути бічну панель (документ має вміст/вкладення) +toggle_sidebar_label=Перемкнути бічну панель +document_outline.title=Показати схему документу (подвійний клік для розгортання/згортання елементів) +document_outline_label=Схема документа +attachments.title=Показати прикріплення +attachments_label=Прикріплення +thumbs.title=Показувати ескізи +thumbs_label=Ескізи +findbar.title=Знайти в документі +findbar_label=Пошук + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Сторінка {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Сторінка {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Ескіз сторінки {{page}} + +# Find panel button title and messages +find_input.title=Знайти +find_input.placeholder=Знайти в документі… +find_previous.title=Знайти попереднє входження фрази +find_previous_label=Попереднє +find_next.title=Знайти наступне входження фрази +find_next_label=Наступне +find_highlight=Підсвітити все +find_match_case_label=З урахуванням регістру +find_entire_word_label=Цілі слова +find_reached_top=Досягнуто початку документу, продовжено з кінця +find_reached_bottom=Досягнуто кінця документу, продовжено з початку +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} збіг із {{total}} +find_match_count[two]={{current}} збіги з {{total}} +find_match_count[few]={{current}} збігів із {{total}} +find_match_count[many]={{current}} збігів із {{total}} +find_match_count[other]={{current}} збігів із {{total}} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Понад {{limit}} збігів +find_match_count_limit[one]=Більше, ніж {{limit}} збіг +find_match_count_limit[two]=Більше, ніж {{limit}} збіги +find_match_count_limit[few]=Більше, ніж {{limit}} збігів +find_match_count_limit[many]=Понад {{limit}} збігів +find_match_count_limit[other]=Понад {{limit}} збігів +find_not_found=Фразу не знайдено + +# Error panel labels +error_more_info=Більше інформації +error_less_info=Менше інформації +error_close=Закрити +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Повідомлення: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Стек: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Файл: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Рядок: {{line}} +rendering_error=Під час виведення сторінки сталася помилка. + +# Predefined zoom values +page_scale_width=За шириною +page_scale_fit=Умістити +page_scale_auto=Авто-масштаб +page_scale_actual=Дійсний розмір +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Помилка +loading_error=Під час завантаження PDF сталася помилка. +invalid_file_error=Недійсний або пошкоджений PDF-файл. +missing_file_error=Відсутній PDF-файл. +unexpected_response_error=Неочікувана відповідь сервера. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}}-аннотація] +password_label=Введіть пароль для відкриття цього PDF-файла. +password_invalid=Невірний пароль. Спробуйте ще. +password_ok=Гаразд +password_cancel=Скасувати + +printing_not_supported=Попередження: Цей браузер не повністю підтримує друк. +printing_not_ready=Попередження: PDF не повністю завантажений для друку. +web_fonts_disabled=Веб-шрифти вимкнено: неможливо використати вбудовані у PDF шрифти. +document_colors_not_allowed=PDF-документам не дозволено використовувати власні кольори: в браузері вимкнено параметр «Дозволити сторінкам використовувати власні кольори». diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/ur/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/ur/viewer.properties new file mode 100644 index 0000000..78e2029 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/ur/viewer.properties @@ -0,0 +1,242 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=پچھلا صفحہ +previous_label=پچھلا +next.title=اگلا صفحہ +next_label=آگے + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=صفحہ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} کا +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} کا {{pagesCount}}) + +zoom_out.title=باہر زوم کریں +zoom_out_label=باہر زوم کریں +zoom_in.title=اندر زوم کریں +zoom_in_label=اندر زوم کریں +zoom.title=زوم +presentation_mode.title=پیشکش موڈ میں چلے جائیں +presentation_mode_label=پیشکش موڈ +open_file.title=مسل کھولیں +open_file_label=کھولیں +print.title=چھاپیں +print_label=چھاپیں +download.title=ڈاؤن لوڈ +download_label=ڈاؤن لوڈ +bookmark.title=حالیہ نظارہ (نۓ دریچہ میں نقل کریں یا کھولیں) +bookmark_label=حالیہ نظارہ + +# Secondary toolbar and context menu +tools.title=آلات +tools_label=آلات +first_page.title=پہلے صفحہ پر جائیں +first_page.label=پہلے صفحہ پر جائیں +first_page_label=پہلے صفحہ پر جائیں +last_page.title=آخری صفحہ پر جائیں +last_page.label=آخری صفحہ پر جائیں +last_page_label=آخری صفحہ پر جائیں +page_rotate_cw.title=گھڑی وار گھمائیں +page_rotate_cw.label=گھڑی وار گھمائیں +page_rotate_cw_label=گھڑی وار گھمائیں +page_rotate_ccw.title=ضد گھڑی وار گھمائیں +page_rotate_ccw.label=ضد گھڑی وار گھمائیں +page_rotate_ccw_label=ضد گھڑی وار گھمائیں + +cursor_text_select_tool.title=متن کے انتخاب کے ٹول کو فعال بناے +cursor_text_select_tool_label=متن کے انتخاب کا آلہ +cursor_hand_tool.title=ہینڈ ٹول کو فعال بناییں +cursor_hand_tool_label=ہاتھ کا آلہ + +scroll_vertical.title=عمودی اسکرولنگ کا استعمال کریں +scroll_vertical_label=عمودی اسکرولنگ +scroll_horizontal.title=افقی سکرولنگ کا استعمال کریں +scroll_horizontal_label=افقی سکرولنگ + +spread_none.title=صفحہ پھیلانے میں شامل نہ ہوں +spread_none_label=کوئی پھیلاؤ نہیں +spread_odd_label=تاک پھیلاؤ +spread_even_label=جفت پھیلاؤ + +# Document properties dialog box +document_properties.title=دستاویز خواص… +document_properties_label=دستاویز خواص…\u0020 +document_properties_file_name=نام مسل: +document_properties_file_size=مسل سائز: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=عنوان: +document_properties_author=تخلیق کار: +document_properties_subject=موضوع: +document_properties_keywords=کلیدی الفاظ: +document_properties_creation_date=تخلیق کی تاریخ: +document_properties_modification_date=ترمیم کی تاریخ: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}، {{time}} +document_properties_creator=تخلیق کار: +document_properties_producer=PDF پیدا کار: +document_properties_version=PDF ورژن: +document_properties_page_count=صفحہ شمار: +document_properties_page_size=صفہ کی لمبائ: +document_properties_page_size_unit_inches=میں +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=عمودی انداز +document_properties_page_size_orientation_landscape=افقى انداز +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=خط +document_properties_page_size_name_legal=قانونی +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} {{name}} {{orientation}} +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=تیز ویب دیکھیں: +document_properties_linearized_yes=ہاں +document_properties_linearized_no=نہیں +document_properties_close=بند کریں + +print_progress_message=چھاپنے کرنے کے لیے دستاویز تیار کیے جا رھے ھیں +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent=*{{progress}}%* +print_progress_close=منسوخ کریں + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=سلائیڈ ٹوگل کریں +toggle_sidebar_label=سلائیڈ ٹوگل کریں +document_outline.title=دستاویز کی سرخیاں دکھایں (تمام اشیاء وسیع / غائب کرنے کے لیے ڈبل کلک کریں) +document_outline_label=دستاویز آؤٹ لائن +attachments.title=منسلکات دکھائیں +attachments_label=منسلکات +thumbs.title=تھمبنیل دکھائیں +thumbs_label=مجمل +findbar.title=دستاویز میں ڈھونڈیں +findbar_label=ڈھونڈیں + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=صفحہ {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=صفحہ {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=صفحے کا مجمل {{page}} + +# Find panel button title and messages +find_input.title=ڈھونڈیں +find_input.placeholder=دستاویز… میں ڈھونڈیں +find_previous.title=فقرے کا پچھلا وقوع ڈھونڈیں +find_previous_label=پچھلا +find_next.title=فقرے کا اگلہ وقوع ڈھونڈیں +find_next_label=آگے +find_highlight=تمام نمایاں کریں +find_match_case_label=حروف مشابہ کریں +find_entire_word_label=تمام الفاظ +find_reached_top=صفحہ کے شروع پر پہنچ گیا، نیچے سے جاری کیا +find_reached_bottom=صفحہ کے اختتام پر پہنچ گیا، اوپر سے جاری کیا +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{total}} میچ کا {{current}}. +find_match_count[few]={{total}} میچوں میں سے {{current}} +find_match_count[many]={{total}} میچوں میں سے {{current}} +find_match_count[other]={{total}} میچوں میں سے {{current}} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(total) ]} +find_match_count_limit[zero]={{limit}} سے زیادہ میچ +find_match_count_limit[one]={{limit}} سے زیادہ میچ +find_match_count_limit[two]={{limit}} سے زیادہ میچ +find_match_count_limit[few]={{limit}} سے زیادہ میچ +find_match_count_limit[many]={{limit}} سے زیادہ میچ +find_match_count_limit[other]={{limit}} سے زیادہ میچ +find_not_found=فقرا نہیں ملا + +# Error panel labels +error_more_info=مزید معلومات +error_less_info=کم معلومات +error_close=بند کریں +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=پیغام: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=سٹیک: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=مسل: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=لائن: {{line}} +rendering_error=صفحہ بناتے ہوئے نقص آ گیا۔ + +# Predefined zoom values +page_scale_width=صفحہ چوڑائی +page_scale_fit=صفحہ فٹنگ +page_scale_auto=خودکار زوم +page_scale_actual=اصل سائز +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=نقص +loading_error=PDF لوڈ کرتے وقت نقص آ گیا۔ +invalid_file_error=ناجائز یا خراب PDF مسل +missing_file_error=PDF مسل غائب ہے۔ +unexpected_response_error=غیرمتوقع پیش کار جواب + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}.{{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} نوٹ] +password_label=PDF مسل کھولنے کے لیے پاس ورڈ داخل کریں. +password_invalid=ناجائز پاس ورڈ. براےؑ کرم دوبارہ کوشش کریں. +password_ok=ٹھیک ہے +password_cancel=منسوخ کریں + +printing_not_supported=تنبیہ:چھاپنا اس براؤزر پر پوری طرح معاونت شدہ نہیں ہے۔ +printing_not_ready=تنبیہ: PDF چھپائی کے لیے پوری طرح لوڈ نہیں ہوئی۔ +web_fonts_disabled=ویب فانٹ نا اہل ہیں: شامل PDF فانٹ استعمال کرنے میں ناکام۔ +document_colors_not_allowed=PDF دستاویزات کو اپنے رنگ استعمال کرنے کی اجازت نہیں: 'صفحات کو اپنے رنگ چنیں' کی اِجازت براؤزر میں بے عمل ہے۔ diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/uz/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/uz/viewer.properties new file mode 100644 index 0000000..e451c74 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/uz/viewer.properties @@ -0,0 +1,169 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Oldingi sahifa +previous_label=Oldingi +next.title=Keyingi sahifa +next_label=Keyingi + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/{{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. + +zoom_out.title=Kichiklashtirish +zoom_out_label=Kichiklashtirish +zoom_in.title=Kattalashtirish +zoom_in_label=Kattalashtirish +zoom.title=Masshtab +presentation_mode.title=Namoyish usuliga oʻtish +presentation_mode_label=Namoyish usuli +open_file.title=Faylni ochish +open_file_label=Ochish +print.title=Chop qilish +print_label=Chop qilish +download.title=Yuklab olish +download_label=Yuklab olish +bookmark.title=Joriy koʻrinish (nusxa oling yoki yangi oynada oching) +bookmark_label=Joriy koʻrinish + +# Secondary toolbar and context menu +tools.title=Vositalar +tools_label=Vositalar +first_page.title=Birinchi sahifaga oʻtish +first_page.label=Birinchi sahifaga oʻtish +first_page_label=Birinchi sahifaga oʻtish +last_page.title=Soʻnggi sahifaga oʻtish +last_page.label=Soʻnggi sahifaga oʻtish +last_page_label=Soʻnggi sahifaga oʻtish +page_rotate_cw.title=Soat yoʻnalishi boʻyicha burish +page_rotate_cw.label=Soat yoʻnalishi boʻyicha burish +page_rotate_cw_label=Soat yoʻnalishi boʻyicha burish +page_rotate_ccw.title=Soat yoʻnalishiga qarshi burish +page_rotate_ccw.label=Soat yoʻnalishiga qarshi burish +page_rotate_ccw_label=Soat yoʻnalishiga qarshi burish + + +# Document properties dialog box +document_properties.title=Hujjat xossalari +document_properties_label=Hujjat xossalari +document_properties_file_name=Fayl nomi: +document_properties_file_size=Fayl hajmi: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=Nomi: +document_properties_author=Muallifi: +document_properties_subject=Mavzusi: +document_properties_keywords=Kalit so‘zlar +document_properties_creation_date=Yaratilgan sanasi: +document_properties_modification_date=O‘zgartirilgan sanasi +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Yaratuvchi: +document_properties_producer=PDF ishlab chiqaruvchi: +document_properties_version=PDF versiyasi: +document_properties_page_count=Sahifa soni: +document_properties_close=Yopish + +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Yon panelni yoqib/oʻchirib qoʻyish +toggle_sidebar_label=Yon panelni yoqib/oʻchirib qoʻyish +document_outline_label=Hujjat tuzilishi +attachments.title=Ilovalarni ko‘rsatish +attachments_label=Ilovalar +thumbs.title=Nishonchalarni koʻrsatish +thumbs_label=Nishoncha +findbar.title=Hujjat ichidan topish + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title={{page}} sahifa +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas={{page}} sahifa nishonchasi + +# Find panel button title and messages +find_previous.title=Soʻzlardagi oldingi hodisani topish +find_previous_label=Oldingi +find_next.title=Iboradagi keyingi hodisani topish +find_next_label=Keyingi +find_highlight=Barchasini ajratib koʻrsatish +find_match_case_label=Katta-kichik harflarni farqlash +find_reached_top=Hujjatning boshigacha yetib keldik, pastdan davom ettiriladi +find_reached_bottom=Hujjatning oxiriga yetib kelindi, yuqoridan davom ettirladi +find_not_found=Soʻzlar topilmadi + +# Error panel labels +error_more_info=Koʻproq ma`lumot +error_less_info=Kamroq ma`lumot +error_close=Yopish +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Xabar: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Toʻplam: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Fayl: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Satr: {{line}} +rendering_error=Sahifa renderlanayotganda xato yuz berdi. + +# Predefined zoom values +page_scale_width=Sahifa eni +page_scale_fit=Sahifani moslashtirish +page_scale_auto=Avtomatik masshtab +page_scale_actual=Haqiqiy hajmi +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Xato +loading_error=PDF yuklanayotganda xato yuz berdi. +invalid_file_error=Xato yoki buzuq PDF fayli. +missing_file_error=PDF fayl kerak. +unexpected_response_error=Kutilmagan server javobi. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=PDF faylni ochish uchun parolni kiriting. +password_invalid=Parol - notoʻgʻri. Qaytadan urinib koʻring. +password_ok=OK + +printing_not_supported=Diqqat: chop qilish bruzer tomonidan toʻliq qoʻllab-quvvatlanmaydi. +printing_not_ready=Diqqat: PDF fayl chop qilish uchun toʻliq yuklanmadi. +web_fonts_disabled=Veb shriftlar oʻchirilgan: ichki PDF shriftlardan foydalanib boʻlmmaydi. +document_colors_not_allowed=PDF hujjat oʻzining ranglaridan foydalanishga ruxsat bermaydi: 'Sahifalarga oʻzining rangidan foydalanishga ruxsat berish' ushbu brauzerda oʻchirib qoʻyilgan. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/vi/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/vi/viewer.properties new file mode 100644 index 0000000..b8ee16e --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/vi/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Trang trước +previous_label=Trước +next.title=Trang Sau +next_label=Tiếp + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Trang +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=trên {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} trên {{pagesCount}}) + +zoom_out.title=Thu nhỏ +zoom_out_label=Thu nhỏ +zoom_in.title=Phóng to +zoom_in_label=Phóng to +zoom.title=Thu phóng +presentation_mode.title=Chuyển sang chế độ trình chiếu +presentation_mode_label=Chế độ trình chiếu +open_file.title=Mở tập tin +open_file_label=Mở tập tin +print.title=In +print_label=In +download.title=Tải xuống +download_label=Tải xuống +bookmark.title=Chế độ xem hiện tại (sao chép hoặc mở trong cửa sổ mới) +bookmark_label=Chế độ xem hiện tại + +# Secondary toolbar and context menu +tools.title=Công cụ +tools_label=Công cụ +first_page.title=Về trang đầu +first_page.label=Về trang đầu +first_page_label=Về trang đầu +last_page.title=Đến trang cuối +last_page.label=Đến trang cuối +last_page_label=Đến trang cuối +page_rotate_cw.title=Xoay theo chiều kim đồng hồ +page_rotate_cw.label=Xoay theo chiều kim đồng hồ +page_rotate_cw_label=Xoay theo chiều kim đồng hồ +page_rotate_ccw.title=Xoay ngược chiều kim đồng hồ +page_rotate_ccw.label=Xoay ngược chiều kim đồng hồ +page_rotate_ccw_label=Xoay ngược chiều kim đồng hồ + +cursor_text_select_tool.title=Kích hoạt công cụ chọn vùng văn bản +cursor_text_select_tool_label=Công cụ chọn vùng văn bản +cursor_hand_tool.title=Kích hoạt công cụ con trỏ +cursor_hand_tool_label=Công cụ con trỏ + +scroll_vertical.title=Sử dụng cuộn dọc +scroll_vertical_label=Cuộn dọc +scroll_horizontal.title=Sử dụng cuộn ngang +scroll_horizontal_label=Cuộn ngang +scroll_wrapped.title=Sử dụng cuộn ngắt dòng +scroll_wrapped_label=Cuộn ngắt dòng + +spread_none.title=Không nối rộng trang +spread_none_label=Không có phân cách +spread_odd.title=Nối trang bài bắt đầu với các trang được đánh số lẻ +spread_odd_label=Phân cách theo số lẻ +spread_even.title=Nối trang bài bắt đầu với các trang được đánh số chẵn +spread_even_label=Phân cách theo số chẵn + +# Document properties dialog box +document_properties.title=Thuộc tính của tài liệu… +document_properties_label=Thuộc tính của tài liệu… +document_properties_file_name=Tên tập tin: +document_properties_file_size=Kích thước: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} byte) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} byte) +document_properties_title=Tiêu đề: +document_properties_author=Tác giả: +document_properties_subject=Chủ đề: +document_properties_keywords=Từ khóa: +document_properties_creation_date=Ngày tạo: +document_properties_modification_date=Ngày sửa đổi: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Người tạo: +document_properties_producer=Phần mềm tạo PDF: +document_properties_version=Phiên bản PDF: +document_properties_page_count=Tổng số trang: +document_properties_page_size=Kích thước trang: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=khổ dọc +document_properties_page_size_orientation_landscape=khổ ngang +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Thư +document_properties_page_size_name_legal=Pháp lý +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Xem nhanh trên web: +document_properties_linearized_yes=Có +document_properties_linearized_no=Không +document_properties_close=Ðóng + +print_progress_message=Chuẩn bị trang để in… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Hủy bỏ + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Bật/Tắt thanh lề +toggle_sidebar_notification.title=Bật tắt thanh lề (tài liệu bao gồm bản phác thảo/tập tin đính kèm) +toggle_sidebar_label=Bật/Tắt thanh lề +document_outline.title=Hiện tài liệu phác thảo (nhấp đúp vào để mở rộng/thu gọn tất cả các mục) +document_outline_label=Bản phác tài liệu +attachments.title=Hiện nội dung đính kèm +attachments_label=Nội dung đính kèm +thumbs.title=Hiển thị ảnh thu nhỏ +thumbs_label=Ảnh thu nhỏ +findbar.title=Tìm trong tài liệu +findbar_label=Tìm + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=Trang {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Trang {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Ảnh thu nhỏ của trang {{page}} + +# Find panel button title and messages +find_input.title=Tìm +find_input.placeholder=Tìm trong tài liệu… +find_previous.title=Tìm cụm từ ở phần trước +find_previous_label=Trước +find_next.title=Tìm cụm từ ở phần sau +find_next_label=Tiếp +find_highlight=Tô sáng tất cả +find_match_case_label=Phân biệt hoa, thường +find_entire_word_label=Toàn bộ từ +find_reached_top=Đã đến phần đầu tài liệu, quay trở lại từ cuối +find_reached_bottom=Đã đến phần cuối của tài liệu, quay trở lại từ đầu +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} của {{total}} đã trùng +find_match_count[two]={{current}} của {{total}} đã trùng +find_match_count[few]={{current}} của {{total}} đã trùng +find_match_count[many]={{current}} của {{total}} đã trùng +find_match_count[other]={{current}} của {{total}} đã trùng +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Nhiều hơn {{limit}} đã trùng +find_match_count_limit[one]=Nhiều hơn {{limit}} đã trùng +find_match_count_limit[two]=Nhiều hơn {{limit}} đã trùng +find_match_count_limit[few]=Nhiều hơn {{limit}} đã trùng +find_match_count_limit[many]=Nhiều hơn {{limit}} đã trùng +find_match_count_limit[other]=Nhiều hơn {{limit}} đã trùng +find_not_found=Không tìm thấy cụm từ này + +# Error panel labels +error_more_info=Thông tin thêm +error_less_info=Hiển thị ít thông tin hơn +error_close=Đóng +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Thông điệp: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Tập tin: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Dòng: {{line}} +rendering_error=Lỗi khi hiển thị trang. + +# Predefined zoom values +page_scale_width=Vừa chiều rộng +page_scale_fit=Vừa chiều cao +page_scale_auto=Tự động chọn kích thước +page_scale_actual=Kích thước thực +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Lỗi +loading_error=Lỗi khi tải tài liệu PDF. +invalid_file_error=Tập tin PDF hỏng hoặc không hợp lệ. +missing_file_error=Thiếu tập tin PDF. +unexpected_response_error=Máy chủ có phản hồi lạ. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Chú thích] +password_label=Nhập mật khẩu để mở tập tin PDF này. +password_invalid=Mật khẩu không đúng. Vui lòng thử lại. +password_ok=OK +password_cancel=Hủy bỏ + +printing_not_supported=Cảnh báo: In ấn không được hỗ trợ đầy đủ ở trình duyệt này. +printing_not_ready=Cảnh báo: PDF chưa được tải hết để in. +web_fonts_disabled=Phông chữ Web bị vô hiệu hóa: không thể sử dụng các phông chữ PDF được nhúng. +document_colors_not_allowed=Tài liệu PDF không được cho phép dùng màu riêng: 'Cho phép trang chọn màu riêng' đã bị tắt trên trình duyệt. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/wo/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/wo/viewer.properties new file mode 100644 index 0000000..38c7bc1 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/wo/viewer.properties @@ -0,0 +1,124 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Xët wi jiitu +previous_label=Bi jiitu +next.title=Xët wi ci topp +next_label=Bi ci topp + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. + +zoom_out.title=Wàññi +zoom_out_label=Wàññi +zoom_in.title=Yaatal +zoom_in_label=Yaatal +zoom.title=Yambalaŋ +presentation_mode.title=Wañarñil ci anamu wone +presentation_mode_label=Anamu Wone +open_file.title=Ubbi benn dencukaay +open_file_label=Ubbi +print.title=Móol +print_label=Móol +download.title=Yeb yi +download_label=Yeb yi +bookmark.title=Wone bi taxaw (duppi walla ubbi palanteer bu bees) +bookmark_label=Wone bi feeñ + +# Secondary toolbar and context menu + + +# Document properties dialog box +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_title=Bopp: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. + +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +thumbs.title=Wone nataal yu ndaw yi +thumbs_label=Nataal yu ndaw yi +findbar.title=Gis ci biir jukki bi +findbar_label=Wut + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Xët {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Wiñet bu xët {{page}} + +# Find panel button title and messages +find_previous.title=Seet beneen kaddu bu ni mel te jiitu +find_previous_label=Bi jiitu +find_next.title=Seet beneen kaddu bu ni mel +find_next_label=Bi ci topp +find_highlight=Melaxal lépp +find_match_case_label=Sàmm jëmmalin wi +find_reached_top=Jot nañu ndorteel xët wi, kontine dale ko ci suuf +find_reached_bottom=Jot nañu jeexitalu xët wi, kontine ci ndorte +find_not_found=Gisiñu kaddu gi + +# Error panel labels +error_more_info=Xibaar yu gën bari +error_less_info=Xibaar yu gën bari +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Bataaxal: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Juug: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Dencukaay: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Rëdd : {{line}} +rendering_error=Am njumte bu am bi xët bi di wonewu. + +# Predefined zoom values +page_scale_width=Yaatuwaay bu mët +page_scale_fit=Xët lëmm +page_scale_auto=Yambalaŋ ci saa si +page_scale_actual=Dayo bi am +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. + +# Loading indicator messages +loading_error_indicator=Njumte +loading_error=Am na njumte ci yebum dencukaay PDF bi. +invalid_file_error=Dencukaay PDF bi baaxul walla mu sankar. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Karmat {{type}}] +password_ok=OK +password_cancel=Neenal + +printing_not_supported=Artu: Joowkat bii nanguwul lool mool. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/xh/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/xh/viewer.properties new file mode 100644 index 0000000..1fa394b --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/xh/viewer.properties @@ -0,0 +1,184 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Iphepha langaphambili +previous_label=Okwangaphambili +next.title=Iphepha elilandelayo +next_label=Okulandelayo + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Iphepha +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=kwali- {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} kwali {{pagesCount}}) + +zoom_out.title=Bhekelisela Kudana +zoom_out_label=Bhekelisela Kudana +zoom_in.title=Sondeza Kufuphi +zoom_in_label=Sondeza Kufuphi +zoom.title=Yandisa / Nciphisa +presentation_mode.title=Tshintshela kwimo yonikezelo +presentation_mode_label=Imo yonikezelo +open_file.title=Vula Ifayile +open_file_label=Vula +print.title=Printa +print_label=Printa +download.title=Khuphela +download_label=Khuphela +bookmark.title=Imbonakalo ekhoyo (kopa okanye vula kwifestile entsha) +bookmark_label=Imbonakalo ekhoyo + +# Secondary toolbar and context menu +tools.title=Izixhobo zemiyalelo +tools_label=Izixhobo zemiyalelo +first_page.title=Yiya kwiphepha lokuqala +first_page.label=Yiya kwiphepha lokuqala +first_page_label=Yiya kwiphepha lokuqala +last_page.title=Yiya kwiphepha lokugqibela +last_page.label=Yiya kwiphepha lokugqibela +last_page_label=Yiya kwiphepha lokugqibela +page_rotate_cw.title=Jikelisa ngasekunene +page_rotate_cw.label=Jikelisa ngasekunene +page_rotate_cw_label=Jikelisa ngasekunene +page_rotate_ccw.title=Jikelisa ngasekhohlo +page_rotate_ccw.label=Jikelisa ngasekhohlo +page_rotate_ccw_label=Jikelisa ngasekhohlo + +cursor_text_select_tool.title=Vumela iSixhobo sokuKhetha iTeksti +cursor_text_select_tool_label=ISixhobo sokuKhetha iTeksti +cursor_hand_tool.title=Yenza iSixhobo seSandla siSebenze +cursor_hand_tool_label=ISixhobo seSandla + +# Document properties dialog box +document_properties.title=Iipropati zoxwebhu… +document_properties_label=Iipropati zoxwebhu… +document_properties_file_name=Igama lefayile: +document_properties_file_size=Isayizi yefayile: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB (iibhayiti{{size_b}}) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB (iibhayithi{{size_b}}) +document_properties_title=Umxholo: +document_properties_author=Umbhali: +document_properties_subject=Umbandela: +document_properties_keywords=Amagama aphambili: +document_properties_creation_date=Umhla wokwenziwa kwayo: +document_properties_modification_date=Umhla wokulungiswa kwayo: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Umntu oyenzileyo: +document_properties_producer=Umvelisi we-PDF: +document_properties_version=Uhlelo lwe-PDF: +document_properties_page_count=Inani lamaphepha: +document_properties_close=Vala + +print_progress_message=Ilungisa uxwebhu ukuze iprinte… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Rhoxisa + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Togola ngebha eseCaleni +toggle_sidebar_notification.title=ISidebar yeQhosha (uxwebhu lunolwandlalo/iziqhotyoshelwa) +toggle_sidebar_label=Togola ngebha eseCaleni +document_outline.title=Bonisa uLwandlalo loXwebhu (cofa kabini ukuze wandise/diliza zonke izinto) +document_outline_label=Isishwankathelo soxwebhu +attachments.title=Bonisa iziqhotyoshelwa +attachments_label=Iziqhoboshelo +thumbs.title=Bonisa ukrobiso kumfanekiso +thumbs_label=Ukrobiso kumfanekiso +findbar.title=Fumana kuXwebhu +findbar_label=Fumana + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Iphepha {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Ukrobiso kumfanekiso wephepha {{page}} + +# Find panel button title and messages +find_input.title=Fumana +find_input.placeholder=Fumana kuXwebhu… +find_previous.title=Fumanisa isenzeko sangaphambili sebinzana lamagama +find_previous_label=Okwangaphambili +find_next.title=Fumanisa isenzeko esilandelayo sebinzana lamagama +find_next_label=Okulandelayo +find_highlight=Qaqambisa konke +find_match_case_label=Tshatisa ngobukhulu bukanobumba +find_reached_top=Ufike ngaphezulu ephepheni, kusukwa ngezantsi +find_reached_bottom=Ufike ekupheleni kwephepha, kusukwa ngaphezulu +find_not_found=Ibinzana alifunyenwanga + +# Error panel labels +error_more_info=Inkcazelo Engakumbi +error_less_info=Inkcazelo Encinane +error_close=Vala +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=I-PDF.js v{{version}} (yakha: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Umyalezo: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Imfumba: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Ifayile: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Umgca: {{line}} +rendering_error=Imposiso yenzekile xa bekunikezelwa iphepha. + +# Predefined zoom values +page_scale_width=Ububanzi bephepha +page_scale_fit=Ukulinganiswa kwephepha +page_scale_auto=Ukwandisa/Ukunciphisa Ngokwayo +page_scale_actual=Ubungakanani bokwenene +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Imposiso +loading_error=Imposiso yenzekile xa kulayishwa i-PDF. +invalid_file_error=Ifayile ye-PDF engeyiyo okanye eyonakalisiweyo. +missing_file_error=Ifayile ye-PDF edukileyo. +unexpected_response_error=Impendulo yeseva engalindelekanga. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Ubhalo-nqaku] +password_label=Faka ipasiwedi ukuze uvule le fayile yePDF. +password_invalid=Ipasiwedi ayisebenzi. Nceda uzame kwakhona. +password_ok=KULUNGILE +password_cancel=Rhoxisa + +printing_not_supported=Isilumkiso: Ukuprinta akuxhaswa ngokupheleleyo yile bhrawuza. +printing_not_ready=Isilumkiso: IPDF ayihlohlwanga ngokupheleleyo ukwenzela ukuprinta. +web_fonts_disabled=Iifonti zewebhu ziqhwalelisiwe: ayikwazi ukusebenzisa iifonti ze-PDF ezincanyathelisiweyo. +document_colors_not_allowed=Amaxwebhu ePDF akavumelekanga ukuba asebenzise imibala yawo: 'Ukuvumela amaphepha ukuba asebenzise eyawo imibala' kuvaliwe ukuba kungasebenzi kwibhrawuza. diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/zh-CN/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/zh-CN/viewer.properties new file mode 100644 index 0000000..2dc609b --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/zh-CN/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=上一页 +previous_label=上一页 +next.title=下一页 +next_label=下一页 + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=页面 +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) + +zoom_out.title=缩小 +zoom_out_label=缩小 +zoom_in.title=放大 +zoom_in_label=放大 +zoom.title=缩放 +presentation_mode.title=切换到演示模式 +presentation_mode_label=演示模式 +open_file.title=打开文件 +open_file_label=打开 +print.title=打印 +print_label=打印 +download.title=下载 +download_label=下载 +bookmark.title=当前在看的内容(复制或在新窗口中打开) +bookmark_label=当前在看 + +# Secondary toolbar and context menu +tools.title=工具 +tools_label=工具 +first_page.title=转到第一页 +first_page.label=转到第一页 +first_page_label=转到第一页 +last_page.title=转到最后一页 +last_page.label=转到最后一页 +last_page_label=转到最后一页 +page_rotate_cw.title=顺时针旋转 +page_rotate_cw.label=顺时针旋转 +page_rotate_cw_label=顺时针旋转 +page_rotate_ccw.title=逆时针旋转 +page_rotate_ccw.label=逆时针旋转 +page_rotate_ccw_label=逆时针旋转 + +cursor_text_select_tool.title=启用文本选择工具 +cursor_text_select_tool_label=文本选择工具 +cursor_hand_tool.title=启用手形工具 +cursor_hand_tool_label=手形工具 + +scroll_vertical.title=使用垂直滚动 +scroll_vertical_label=垂直滚动 +scroll_horizontal.title=使用水平滚动 +scroll_horizontal_label=水平滚动 +scroll_wrapped.title=使用平铺滚动 +scroll_wrapped_label=平铺滚动 + +spread_none.title=不加入衔接页 +spread_none_label=单页视图 +spread_odd.title=加入衔接页使奇数页作为起始页 +spread_odd_label=双页视图 +spread_even.title=加入衔接页使偶数页作为起始页 +spread_even_label=书籍视图 + +# Document properties dialog box +document_properties.title=文档属性… +document_properties_label=文档属性… +document_properties_file_name=文件名: +document_properties_file_size=文件大小: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} 字节) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} 字节) +document_properties_title=标题: +document_properties_author=作者: +document_properties_subject=主题: +document_properties_keywords=关键词: +document_properties_creation_date=创建日期: +document_properties_modification_date=修改日期: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=创建者: +document_properties_producer=PDF 生成器: +document_properties_version=PDF 版本: +document_properties_page_count=页数: +document_properties_page_size=页面大小: +document_properties_page_size_unit_inches=英寸 +document_properties_page_size_unit_millimeters=毫米 +document_properties_page_size_orientation_portrait=纵向 +document_properties_page_size_orientation_landscape=横向 +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=文本 +document_properties_page_size_name_legal=法律 +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}}({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}}({{name}},{{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=快速 Web 视图: +document_properties_linearized_yes=是 +document_properties_linearized_no=否 +document_properties_close=关闭 + +print_progress_message=正在准备打印文档… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=取消 + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=切换侧栏 +toggle_sidebar_notification.title=切换侧栏(文档所含的大纲/附件) +toggle_sidebar_label=切换侧栏 +document_outline.title=显示文档大纲(双击展开/折叠所有项) +document_outline_label=文档大纲 +attachments.title=显示附件 +attachments_label=附件 +thumbs.title=显示缩略图 +thumbs_label=缩略图 +findbar.title=在文档中查找 +findbar_label=查找 + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=页码 {{page}} +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=页码 {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=页面 {{page}} 的缩略图 + +# Find panel button title and messages +find_input.title=查找 +find_input.placeholder=在文档中查找… +find_previous.title=查找词语上一次出现的位置 +find_previous_label=上一页 +find_next.title=查找词语后一次出现的位置 +find_next_label=下一页 +find_highlight=全部高亮显示 +find_match_case_label=区分大小写 +find_entire_word_label=字词匹配 +find_reached_top=到达文档开头,从末尾继续 +find_reached_bottom=到达文档末尾,从开头继续 +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]=第 {{current}} 项,共匹配 {{total}} 项 +find_match_count[two]=第 {{current}} 项,共匹配 {{total}} 项 +find_match_count[few]=第 {{current}} 项,共匹配 {{total}} 项 +find_match_count[many]=第 {{current}} 项,共匹配 {{total}} 项 +find_match_count[other]=第 {{current}} 项,共匹配 {{total}} 项 +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=超过 {{limit}} 项匹配 +find_match_count_limit[one]=超过 {{limit}} 项匹配 +find_match_count_limit[two]=超过 {{limit}} 项匹配 +find_match_count_limit[few]=超过 {{limit}} 项匹配 +find_match_count_limit[many]=超过 {{limit}} 项匹配 +find_match_count_limit[other]=超过 {{limit}} 项匹配 +find_not_found=找不到指定词语 + +# Error panel labels +error_more_info=更多信息 +error_less_info=更少信息 +error_close=关闭 +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=信息:{{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=堆栈:{{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=文件:{{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=行号:{{line}} +rendering_error=渲染页面时发生错误。 + +# Predefined zoom values +page_scale_width=适合页宽 +page_scale_fit=适合页面 +page_scale_auto=自动缩放 +page_scale_actual=实际大小 +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=错误 +loading_error=载入 PDF 时发生错误。 +invalid_file_error=无效或损坏的 PDF 文件。 +missing_file_error=缺少 PDF 文件。 +unexpected_response_error=意外的服务器响应。 + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}},{{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} 注释] +password_label=输入密码以打开此 PDF 文件。 +password_invalid=密码无效。请重试。 +password_ok=确定 +password_cancel=取消 + +printing_not_supported=警告:此浏览器尚未完整支持打印功能。 +printing_not_ready=警告:此 PDF 未完成载入,无法打印。 +web_fonts_disabled=Web 字体已被禁用:无法使用嵌入的 PDF 字体。 +document_colors_not_allowed=PDF 文档无法使用自己的颜色:浏览器中“允许页面选择自己的颜色”的选项未被勾选。 diff --git a/src/main/resources/static/plugins/pdfjs/web/locale/zh-TW/viewer.properties b/src/main/resources/static/plugins/pdfjs/web/locale/zh-TW/viewer.properties new file mode 100644 index 0000000..29ff043 --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/locale/zh-TW/viewer.properties @@ -0,0 +1,248 @@ +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=上一頁 +previous_label=上一頁 +next.title=下一頁 +next_label=下一頁 + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=第 +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=頁,共 {{pagesCount}} 頁 +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=(第 {{pageNumber}} 頁,共 {{pagesCount}} 頁) + +zoom_out.title=縮小 +zoom_out_label=縮小 +zoom_in.title=放大 +zoom_in_label=放大 +zoom.title=縮放 +presentation_mode.title=切換至簡報模式 +presentation_mode_label=簡報模式 +open_file.title=開啟檔案 +open_file_label=開啟 +print.title=列印 +print_label=列印 +download.title=下載 +download_label=下載 +bookmark.title=目前檢視的內容(複製或開啟於新視窗) +bookmark_label=目前檢視 + +# Secondary toolbar and context menu +tools.title=工具 +tools_label=工具 +first_page.title=跳到第一頁 +first_page.label=跳到第一頁 +first_page_label=跳到第一頁 +last_page.title=跳到最後一頁 +last_page.label=跳到最後一頁 +last_page_label=跳到最後一頁 +page_rotate_cw.title=順時針旋轉 +page_rotate_cw.label=順時針旋轉 +page_rotate_cw_label=順時針旋轉 +page_rotate_ccw.title=逆時針旋轉 +page_rotate_ccw.label=逆時針旋轉 +page_rotate_ccw_label=逆時針旋轉 + +cursor_text_select_tool.title=開啟文字選擇工具 +cursor_text_select_tool_label=文字選擇工具 +cursor_hand_tool.title=開啟頁面移動工具 +cursor_hand_tool_label=頁面移動工具 + +scroll_vertical.title=使用垂直捲動版面 +scroll_vertical_label=垂直捲動 +scroll_horizontal.title=使用水平捲動版面 +scroll_horizontal_label=水平捲動 +scroll_wrapped.title=使用多頁捲動版面 +scroll_wrapped_label=多頁捲動 + +spread_none.title=不要進行跨頁顯示 +spread_none_label=不跨頁 +spread_odd.title=從奇數頁開始跨頁 +spread_odd_label=奇數跨頁 +spread_even.title=從偶數頁開始跨頁 +spread_even_label=偶數跨頁 + +# Document properties dialog box +document_properties.title=文件內容… +document_properties_label=文件內容… +document_properties_file_name=檔案名稱: +document_properties_file_size=檔案大小: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB({{size_b}} 位元組) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB({{size_b}} 位元組) +document_properties_title=標題: +document_properties_author=作者: +document_properties_subject=主旨: +document_properties_keywords=關鍵字: +document_properties_creation_date=建立日期: +document_properties_modification_date=修改日期: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}} {{time}} +document_properties_creator=建立者: +document_properties_producer=PDF 產生器: +document_properties_version=PDF 版本: +document_properties_page_count=頁數: +document_properties_page_size=頁面大小: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=垂直 +document_properties_page_size_orientation_landscape=水平 +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Letter +document_properties_page_size_name_legal=Legal +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}}({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}}({{name}},{{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=快速 Web 檢視: +document_properties_linearized_yes=是 +document_properties_linearized_no=否 +document_properties_close=關閉 + +print_progress_message=正在準備列印文件… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=取消 + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=切換側邊欄 +toggle_sidebar_notification.title=切換側邊攔(文件包含大綱或附件) +toggle_sidebar_label=切換側邊欄 +document_outline.title=顯示文件大綱(雙擊展開/摺疊所有項目) +document_outline_label=文件大綱 +attachments.title=顯示附件 +attachments_label=附件 +thumbs.title=顯示縮圖 +thumbs_label=縮圖 +findbar.title=在文件中尋找 +findbar_label=尋找 + +# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number. +page_canvas=第 {{page}} 頁 +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=第 {{page}} 頁 +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=頁 {{page}} 的縮圖 + +# Find panel button title and messages +find_input.title=尋找 +find_input.placeholder=在文件中搜尋… +find_previous.title=尋找文字前次出現的位置 +find_previous_label=上一個 +find_next.title=尋找文字下次出現的位置 +find_next_label=下一個 +find_highlight=全部強調標示 +find_match_case_label=區分大小寫 +find_entire_word_label=符合整個字 +find_reached_top=已搜尋至文件頂端,自底端繼續搜尋 +find_reached_bottom=已搜尋至文件底端,自頂端繼續搜尋 +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]=第 {{current}} 筆,共找到 {{total}} 筆 +find_match_count[two]=第 {{current}} 筆,共找到 {{total}} 筆 +find_match_count[few]=第 {{current}} 筆,共找到 {{total}} 筆 +find_match_count[many]=第 {{current}} 筆,共找到 {{total}} 筆 +find_match_count[other]=第 {{current}} 筆,共找到 {{total}} 筆 +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=找到超過 {{limit}} 筆 +find_match_count_limit[one]=找到超過 {{limit}} 筆 +find_match_count_limit[two]=找到超過 {{limit}} 筆 +find_match_count_limit[few]=找到超過 {{limit}} 筆 +find_match_count_limit[many]=找到超過 {{limit}} 筆 +find_match_count_limit[other]=找到超過 {{limit}} 筆 +find_not_found=找不到指定文字 + +# Error panel labels +error_more_info=更多資訊 +error_less_info=更少資訊 +error_close=關閉 +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=訊息: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=堆疊: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=檔案: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=行: {{line}} +rendering_error=描繪頁面時發生錯誤。 + +# Predefined zoom values +page_scale_width=頁面寬度 +page_scale_fit=縮放至頁面大小 +page_scale_auto=自動縮放 +page_scale_actual=實際大小 +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=錯誤 +loading_error=載入 PDF 時發生錯誤。 +invalid_file_error=無效或毀損的 PDF 檔案。 +missing_file_error=找不到 PDF 檔案。 +unexpected_response_error=伺服器回應未預期的內容。 + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} 註解] +password_label=請輸入用來開啟此 PDF 檔案的密碼。 +password_invalid=密碼不正確,請再試一次。 +password_ok=確定 +password_cancel=取消 + +printing_not_supported=警告: 此瀏覽器未完整支援列印功能。 +printing_not_ready=警告: 此 PDF 未完成下載以供列印。 +web_fonts_disabled=已停用網路字型 (Web fonts): 無法使用 PDF 內嵌字型。 +document_colors_not_allowed=瀏覽器的「優先使用網頁指定的色彩」未被勾選,PDF 文件無法使用自己的色彩。 diff --git a/src/main/resources/static/plugins/pdfjs/web/viewer.css b/src/main/resources/static/plugins/pdfjs/web/viewer.css new file mode 100644 index 0000000..595660a --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/viewer.css @@ -0,0 +1,2409 @@ +/* Copyright 2014 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.textLayer { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + overflow: hidden; + opacity: 0.2; + line-height: 1.0; +} + +.textLayer > span { + color: transparent; + position: absolute; + white-space: pre; + cursor: text; + transform-origin: 0% 0%; +} + +.textLayer .highlight { + margin: -1px; + padding: 1px; + background-color: rgba(180, 0, 170, 1); + border-radius: 4px; +} + +.textLayer .highlight.begin { + border-radius: 4px 0px 0px 4px; +} + +.textLayer .highlight.end { + border-radius: 0px 4px 4px 0px; +} + +.textLayer .highlight.middle { + border-radius: 0px; +} + +.textLayer .highlight.selected { + background-color: rgba(0, 100, 0, 1); +} + +.textLayer ::-moz-selection { + background: rgba(0, 0, 255, 1); +} + +.textLayer ::selection { + background: rgba(0, 0, 255, 1); +} + +.textLayer .endOfContent { + display: block; + position: absolute; + left: 0px; + top: 100%; + right: 0px; + bottom: 0px; + z-index: -1; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.textLayer .endOfContent.active { + top: 0px; +} + + +.annotationLayer section { + position: absolute; +} + +.annotationLayer .linkAnnotation > a, +.annotationLayer .buttonWidgetAnnotation.pushButton > a { + position: absolute; + font-size: 1em; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.annotationLayer .linkAnnotation > a:hover, +.annotationLayer .buttonWidgetAnnotation.pushButton > a:hover { + opacity: 0.2; + background: rgba(255, 255, 0, 1); + box-shadow: 0px 2px 10px rgba(255, 255, 0, 1); +} + +.annotationLayer .textAnnotation img { + position: absolute; + cursor: pointer; +} + +.annotationLayer .textWidgetAnnotation input, +.annotationLayer .textWidgetAnnotation textarea, +.annotationLayer .choiceWidgetAnnotation select, +.annotationLayer .buttonWidgetAnnotation.checkBox input, +.annotationLayer .buttonWidgetAnnotation.radioButton input { + background-color: rgba(0, 54, 255, 0.13); + border: 1px solid transparent; + box-sizing: border-box; + font-size: 9px; + height: 100%; + margin: 0; + padding: 0 3px; + vertical-align: top; + width: 100%; +} + +.annotationLayer .choiceWidgetAnnotation select option { + padding: 0; +} + +.annotationLayer .buttonWidgetAnnotation.radioButton input { + border-radius: 50%; +} + +.annotationLayer .textWidgetAnnotation textarea { + font: message-box; + font-size: 9px; + resize: none; +} + +.annotationLayer .textWidgetAnnotation input[disabled], +.annotationLayer .textWidgetAnnotation textarea[disabled], +.annotationLayer .choiceWidgetAnnotation select[disabled], +.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], +.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] { + background: none; + border: 1px solid transparent; + cursor: not-allowed; +} + +.annotationLayer .textWidgetAnnotation input:hover, +.annotationLayer .textWidgetAnnotation textarea:hover, +.annotationLayer .choiceWidgetAnnotation select:hover, +.annotationLayer .buttonWidgetAnnotation.checkBox input:hover, +.annotationLayer .buttonWidgetAnnotation.radioButton input:hover { + border: 1px solid rgba(0, 0, 0, 1); +} + +.annotationLayer .textWidgetAnnotation input:focus, +.annotationLayer .textWidgetAnnotation textarea:focus, +.annotationLayer .choiceWidgetAnnotation select:focus { + background: none; + border: 1px solid transparent; +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before, +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after, +.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before { + background-color: rgba(0, 0, 0, 1); + content: ''; + display: block; + position: absolute; +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before, +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after { + height: 80%; + left: 45%; + width: 1px; +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before { + transform: rotate(45deg); +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after { + transform: rotate(-45deg); +} + +.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before { + border-radius: 50%; + height: 50%; + left: 30%; + top: 20%; + width: 50%; +} + +.annotationLayer .textWidgetAnnotation input.comb { + font-family: monospace; + padding-left: 2px; + padding-right: 0; +} + +.annotationLayer .textWidgetAnnotation input.comb:focus { + /* + * Letter spacing is placed on the right side of each character. Hence, the + * letter spacing of the last character may be placed outside the visible + * area, causing horizontal scrolling. We avoid this by extending the width + * when the element has focus and revert this when it loses focus. + */ + width: 115%; +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input, +.annotationLayer .buttonWidgetAnnotation.radioButton input { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding: 0; +} + +.annotationLayer .popupWrapper { + position: absolute; + width: 20em; +} + +.annotationLayer .popup { + position: absolute; + z-index: 200; + max-width: 20em; + background-color: rgba(255, 255, 153, 1); + box-shadow: 0px 2px 5px rgba(136, 136, 136, 1); + border-radius: 2px; + padding: 6px; + margin-left: 5px; + cursor: pointer; + font: message-box; + font-size: 9px; + word-wrap: break-word; +} + +.annotationLayer .popup > * { + font-size: 9px; +} + +.annotationLayer .popup h1 { + display: inline-block; +} + +.annotationLayer .popup span { + display: inline-block; + margin-left: 5px; +} + +.annotationLayer .popup p { + border-top: 1px solid rgba(51, 51, 51, 1); + margin-top: 2px; + padding-top: 2px; +} + +.annotationLayer .highlightAnnotation, +.annotationLayer .underlineAnnotation, +.annotationLayer .squigglyAnnotation, +.annotationLayer .strikeoutAnnotation, +.annotationLayer .freeTextAnnotation, +.annotationLayer .lineAnnotation svg line, +.annotationLayer .squareAnnotation svg rect, +.annotationLayer .circleAnnotation svg ellipse, +.annotationLayer .polylineAnnotation svg polyline, +.annotationLayer .polygonAnnotation svg polygon, +.annotationLayer .caretAnnotation, +.annotationLayer .inkAnnotation svg polyline, +.annotationLayer .stampAnnotation, +.annotationLayer .fileAttachmentAnnotation { + cursor: pointer; +} + +.pdfViewer .canvasWrapper { + overflow: hidden; +} + +.pdfViewer .page { + direction: ltr; + width: 816px; + height: 1056px; + margin: 1px auto -8px auto; + position: relative; + overflow: visible; + border: 9px solid transparent; + background-clip: content-box; + -o-border-image: url(images/shadow.png) 9 9 repeat; + border-image: url(images/shadow.png) 9 9 repeat; + background-color: rgba(255, 255, 255, 1); +} + +.pdfViewer.removePageBorders .page { + margin: 0px auto 10px auto; + border: none; +} + +.pdfViewer.singlePageView { + display: inline-block; +} + +.pdfViewer.singlePageView .page { + margin: 0; + border: none; +} + +.pdfViewer.scrollHorizontal, .pdfViewer.scrollWrapped, .spread { + margin-left: 3.5px; + margin-right: 3.5px; + text-align: center; +} + +.pdfViewer.scrollHorizontal, .spread { + white-space: nowrap; +} + +.pdfViewer.removePageBorders, +.pdfViewer.scrollHorizontal .spread, +.pdfViewer.scrollWrapped .spread { + margin-left: 0; + margin-right: 0; +} + +.spread .page, +.pdfViewer.scrollHorizontal .page, +.pdfViewer.scrollWrapped .page, +.pdfViewer.scrollHorizontal .spread, +.pdfViewer.scrollWrapped .spread { + display: inline-block; + vertical-align: middle; +} + +.spread .page, +.pdfViewer.scrollHorizontal .page, +.pdfViewer.scrollWrapped .page { + margin-left: -3.5px; + margin-right: -3.5px; +} + +.pdfViewer.removePageBorders .spread .page, +.pdfViewer.removePageBorders.scrollHorizontal .page, +.pdfViewer.removePageBorders.scrollWrapped .page { + margin-left: 5px; + margin-right: 5px; +} + +.pdfViewer .page canvas { + margin: 0; + display: block; +} + +.pdfViewer .page canvas[hidden] { + display: none; +} + +.pdfViewer .page .loadingIcon { + position: absolute; + display: block; + left: 0; + top: 0; + right: 0; + bottom: 0; + background: url('images/loading-icon.gif') center no-repeat; +} + +.pdfPresentationMode .pdfViewer { + margin-left: 0; + margin-right: 0; +} + +.pdfPresentationMode .pdfViewer .page, +.pdfPresentationMode .pdfViewer .spread { + display: block; +} + +.pdfPresentationMode .pdfViewer .page, +.pdfPresentationMode .pdfViewer.removePageBorders .page { + margin-left: auto; + margin-right: auto; +} + +.pdfPresentationMode:-ms-fullscreen .pdfViewer .page { + margin-bottom: 100% !important; +} + +.pdfPresentationMode:-webkit-full-screen .pdfViewer .page { + margin-bottom: 100%; + border: 0; +} + +.pdfPresentationMode:-moz-full-screen .pdfViewer .page { + margin-bottom: 100%; + border: 0; +} + +.pdfPresentationMode:fullscreen .pdfViewer .page { + margin-bottom: 100%; + border: 0; +} + +:root { + --sidebar-width: 200px; + --sidebar-transition-duration: 200ms; + --sidebar-transition-timing-function: ease; +} + +* { + padding: 0; + margin: 0; +} + +html { + height: 100%; + width: 100%; + /* Font size is needed to make the activity bar the correct size. */ + font-size: 10px; +} + +body { + height: 100%; + width: 100%; + background-color: rgba(64, 64, 64, 1); + background-image: url(images/texture.png); +} + +body, +input, +button, +select { + font: message-box; + outline: none; +} + +.hidden { + display: none !important; +} +[hidden] { + display: none !important; +} + +.pdfViewer.enablePermissions .textLayer > span { + -webkit-user-select: none !important; + -moz-user-select: none !important; + -ms-user-select: none !important; + user-select: none !important; + cursor: not-allowed; +} + +#viewerContainer.pdfPresentationMode:-ms-fullscreen { + top: 0px !important; + overflow: hidden !important; +} + +#viewerContainer.pdfPresentationMode:-ms-fullscreen::-ms-backdrop { + background-color: rgba(0, 0, 0, 1); +} + +#viewerContainer.pdfPresentationMode:-webkit-full-screen { + top: 0px; + border-top: 2px solid rgba(0, 0, 0, 0); + background-color: rgba(0, 0, 0, 1); + width: 100%; + height: 100%; + overflow: hidden; + cursor: none; + -webkit-user-select: none; + user-select: none; +} + +#viewerContainer.pdfPresentationMode:-moz-full-screen { + top: 0px; + border-top: 2px solid rgba(0, 0, 0, 0); + background-color: rgba(0, 0, 0, 1); + width: 100%; + height: 100%; + overflow: hidden; + cursor: none; + -moz-user-select: none; + user-select: none; +} + +#viewerContainer.pdfPresentationMode:-ms-fullscreen { + top: 0px; + border-top: 2px solid rgba(0, 0, 0, 0); + background-color: rgba(0, 0, 0, 1); + width: 100%; + height: 100%; + overflow: hidden; + cursor: none; + -ms-user-select: none; + user-select: none; +} + +#viewerContainer.pdfPresentationMode:fullscreen { + top: 0px; + border-top: 2px solid rgba(0, 0, 0, 0); + background-color: rgba(0, 0, 0, 1); + width: 100%; + height: 100%; + overflow: hidden; + cursor: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.pdfPresentationMode:-webkit-full-screen a:not(.internalLink) { + display: none; +} + +.pdfPresentationMode:-moz-full-screen a:not(.internalLink) { + display: none; +} + +.pdfPresentationMode:-ms-fullscreen a:not(.internalLink) { + display: none; +} + +.pdfPresentationMode:fullscreen a:not(.internalLink) { + display: none; +} + +.pdfPresentationMode:-webkit-full-screen .textLayer > span { + cursor: none; +} + +.pdfPresentationMode:-moz-full-screen .textLayer > span { + cursor: none; +} + +.pdfPresentationMode:-ms-fullscreen .textLayer > span { + cursor: none; +} + +.pdfPresentationMode:fullscreen .textLayer > span { + cursor: none; +} + +.pdfPresentationMode.pdfPresentationModeControls > *, +.pdfPresentationMode.pdfPresentationModeControls .textLayer > span { + cursor: default; +} + +#outerContainer { + width: 100%; + height: 100%; + position: relative; +} + +#sidebarContainer { + position: absolute; + top: 32px; + bottom: 0; + width: 200px; + width: var(--sidebar-width); + visibility: hidden; + z-index: 100; + border-top: 1px solid rgba(51, 51, 51, 1); + transition-duration: 200ms; + transition-duration: var(--sidebar-transition-duration); + transition-timing-function: ease; + transition-timing-function: var(--sidebar-transition-timing-function); +} +html[dir='ltr'] #sidebarContainer { + transition-property: left; + left: -200px; + left: calc(0px - var(--sidebar-width)); +} +html[dir='rtl'] #sidebarContainer { + transition-property: right; + right: -200px; + right: calc(0px - var(--sidebar-width)); +} + +.loadingInProgress #sidebarContainer { + top: 36px; +} + +#outerContainer.sidebarResizing #sidebarContainer { + /* Improve responsiveness and avoid visual glitches when the sidebar is resized. */ + transition-duration: 0s; + /* Prevent e.g. the thumbnails being selected when the sidebar is resized. */ + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#outerContainer.sidebarMoving #sidebarContainer, +#outerContainer.sidebarOpen #sidebarContainer { + visibility: visible; +} +html[dir='ltr'] #outerContainer.sidebarOpen #sidebarContainer { + left: 0px; +} +html[dir='rtl'] #outerContainer.sidebarOpen #sidebarContainer { + right: 0px; +} + +#mainContainer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + min-width: 320px; +} + +#sidebarContent { + top: 32px; + bottom: 0; + overflow: auto; + -webkit-overflow-scrolling: touch; + position: absolute; + width: 100%; + background-color: rgba(0, 0, 0, 0.1); +} +html[dir='ltr'] #sidebarContent { + left: 0; + box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25); +} +html[dir='rtl'] #sidebarContent { + right: 0; + box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.25); +} + +#viewerContainer { + overflow: auto; + -webkit-overflow-scrolling: touch; + position: absolute; + top: 32px; + right: 0; + bottom: 0; + left: 0; + outline: none; +} +#viewerContainer:not(.pdfPresentationMode) { + transition-duration: 200ms; + transition-duration: var(--sidebar-transition-duration); + transition-timing-function: ease; + transition-timing-function: var(--sidebar-transition-timing-function); +} +html[dir='ltr'] #viewerContainer { + box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.05); +} +html[dir='rtl'] #viewerContainer { + box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05); +} + +#outerContainer.sidebarResizing #viewerContainer { + /* Improve responsiveness and avoid visual glitches when the sidebar is resized. */ + transition-duration: 0s; +} + +html[dir='ltr'] #outerContainer.sidebarOpen #viewerContainer:not(.pdfPresentationMode) { + transition-property: left; + left: 200px; + left: var(--sidebar-width); +} +html[dir='rtl'] #outerContainer.sidebarOpen #viewerContainer:not(.pdfPresentationMode) { + transition-property: right; + right: 200px; + right: var(--sidebar-width); +} + +.toolbar { + position: relative; + left: 0; + right: 0; + z-index: 9999; + cursor: default; +} + +#toolbarContainer { + width: 100%; +} + +#toolbarSidebar { + width: 100%; + height: 32px; + background-color: rgba(66, 66, 66, 1); /* fallback */ + background-image: url(images/texture.png), + linear-gradient(rgba(77, 77, 77, 0.99), rgba(64, 64, 64, 0.95)); +} +html[dir='ltr'] #toolbarSidebar { + box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25), + inset 0 -1px 0 rgba(255, 255, 255, 0.05), + 0 1px 0 rgba(0, 0, 0, 0.15), + 0 0 1px rgba(0, 0, 0, 0.1); +} +html[dir='rtl'] #toolbarSidebar { + box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.25), + inset 0 1px 0 rgba(255, 255, 255, 0.05), + 0 1px 0 rgba(0, 0, 0, 0.15), + 0 0 1px rgba(0, 0, 0, 0.1); +} + +#sidebarResizer { + position: absolute; + top: 0; + bottom: 0; + width: 6px; + z-index: 200; + cursor: ew-resize; +} +html[dir='ltr'] #sidebarResizer { + right: -6px; +} +html[dir='rtl'] #sidebarResizer { + left: -6px; +} + +#toolbarContainer, .findbar, .secondaryToolbar { + position: relative; + height: 32px; + background-color: rgba(71, 71, 71, 1); /* fallback */ + background-image: url(images/texture.png), + linear-gradient(rgba(82, 82, 82, 0.99), rgba(69, 69, 69, 0.95)); +} +html[dir='ltr'] #toolbarContainer, .findbar, .secondaryToolbar { + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.15), + inset 0 -1px 0 rgba(255, 255, 255, 0.05), + 0 1px 0 rgba(0, 0, 0, 0.15), + 0 1px 1px rgba(0, 0, 0, 0.1); +} +html[dir='rtl'] #toolbarContainer, .findbar, .secondaryToolbar { + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.15), + inset 0 -1px 0 rgba(255, 255, 255, 0.05), + 0 1px 0 rgba(0, 0, 0, 0.15), + 0 1px 1px rgba(0, 0, 0, 0.1); +} + +#toolbarViewer { + height: 32px; +} + +#loadingBar { + position: relative; + width: 100%; + height: 4px; + background-color: rgba(51, 51, 51, 1); + border-bottom: 1px solid rgba(51, 51, 51, 1); +} + +#loadingBar .progress { + position: absolute; + top: 0; + left: 0; + width: 0%; + height: 100%; + background-color: rgba(221, 221, 221, 1); + overflow: hidden; + transition: width 200ms; +} + +@-webkit-keyframes progressIndeterminate { + 0% { left: -142px; } + 100% { left: 0; } +} + +@keyframes progressIndeterminate { + 0% { left: -142px; } + 100% { left: 0; } +} + +#loadingBar .progress.indeterminate { + background-color: rgba(153, 153, 153, 1); + transition: none; +} + +#loadingBar .progress.indeterminate .glimmer { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: calc(100% + 150px); + background: repeating-linear-gradient(135deg, + rgba(187, 187, 187, 1) 0, rgba(153, 153, 153, 1) 5px, + rgba(153, 153, 153, 1) 45px, rgba(221, 221, 221, 1) 55px, + rgba(221, 221, 221, 1) 95px, rgba(187, 187, 187, 1) 100px); + -webkit-animation: progressIndeterminate 950ms linear infinite; + animation: progressIndeterminate 950ms linear infinite; +} + +.findbar, .secondaryToolbar { + top: 32px; + position: absolute; + z-index: 10000; + height: auto; + min-width: 16px; + padding: 0px 6px 0px 6px; + margin: 4px 2px 4px 2px; + color: rgba(217, 217, 217, 1); + font-size: 12px; + line-height: 14px; + text-align: left; + cursor: default; +} + +.findbar { + min-width: 300px; +} +.findbar > div { + height: 32px; +} +.findbar.wrapContainers > div { + clear: both; +} +.findbar.wrapContainers > div#findbarMessageContainer { + height: auto; +} +html[dir='ltr'] .findbar { + left: 68px; +} +html[dir='rtl'] .findbar { + right: 68px; +} + +.findbar label { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#findInput { + width: 200px; +} +#findInput::-webkit-input-placeholder { + color: rgba(191, 191, 191, 1); +} +#findInput::-moz-placeholder { + font-style: italic; +} +#findInput:-ms-input-placeholder { + font-style: italic; +} +#findInput::-ms-input-placeholder { + font-style: italic; +} +#findInput::placeholder { + font-style: italic; +} +#findInput[data-status="pending"] { + background-image: url(images/loading-small.png); + background-repeat: no-repeat; + background-position: right; +} +html[dir='rtl'] #findInput[data-status="pending"] { + background-position: left; +} + +.secondaryToolbar { + padding: 6px; + height: auto; + z-index: 30000; +} +html[dir='ltr'] .secondaryToolbar { + right: 4px; +} +html[dir='rtl'] .secondaryToolbar { + left: 4px; +} + +#secondaryToolbarButtonContainer { + max-width: 200px; + max-height: 400px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + margin-bottom: -4px; +} + +#secondaryToolbarButtonContainer.hiddenScrollModeButtons > .scrollModeButtons, +#secondaryToolbarButtonContainer.hiddenSpreadModeButtons > .spreadModeButtons { + display: none !important; +} + +.doorHanger, +.doorHangerRight { + border: 1px solid rgba(0, 0, 0, 0.5); + border-radius: 2px; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); +} +.doorHanger:after, .doorHanger:before, +.doorHangerRight:after, .doorHangerRight:before { + bottom: 100%; + border: solid rgba(0, 0, 0, 0); + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} +.doorHanger:after, +.doorHangerRight:after { + border-bottom-color: rgba(82, 82, 82, 0.99); + border-width: 8px; +} +.doorHanger:before, +.doorHangerRight:before { + border-bottom-color: rgba(0, 0, 0, 0.5); + border-width: 9px; +} + +html[dir='ltr'] .doorHanger:after, +html[dir='rtl'] .doorHangerRight:after { + left: 13px; + margin-left: -8px; +} + +html[dir='ltr'] .doorHanger:before, +html[dir='rtl'] .doorHangerRight:before { + left: 13px; + margin-left: -9px; +} + +html[dir='rtl'] .doorHanger:after, +html[dir='ltr'] .doorHangerRight:after { + right: 13px; + margin-right: -8px; +} + +html[dir='rtl'] .doorHanger:before, +html[dir='ltr'] .doorHangerRight:before { + right: 13px; + margin-right: -9px; +} + +#findResultsCount { + background-color: rgba(217, 217, 217, 1); + color: rgba(82, 82, 82, 1); + text-align: center; + padding: 3px 4px; +} + +#findMsg { + font-style: italic; + color: rgba(166, 183, 208, 1); +} +#findMsg:empty { + display: none; +} + +#findInput.notFound { + background-color: rgba(255, 102, 102, 1); +} + +#toolbarViewerMiddle { + position: absolute; + left: 50%; + transform: translateX(-50%); +} + +html[dir='ltr'] #toolbarViewerLeft, +html[dir='rtl'] #toolbarViewerRight { + float: left; +} +html[dir='ltr'] #toolbarViewerRight, +html[dir='rtl'] #toolbarViewerLeft { + float: right; +} +html[dir='ltr'] #toolbarViewerLeft > *, +html[dir='ltr'] #toolbarViewerMiddle > *, +html[dir='ltr'] #toolbarViewerRight > *, +html[dir='ltr'] .findbar * { + position: relative; + float: left; +} +html[dir='rtl'] #toolbarViewerLeft > *, +html[dir='rtl'] #toolbarViewerMiddle > *, +html[dir='rtl'] #toolbarViewerRight > *, +html[dir='rtl'] .findbar * { + position: relative; + float: right; +} + +html[dir='ltr'] .splitToolbarButton { + margin: 3px 2px 4px 0; + display: inline-block; +} +html[dir='rtl'] .splitToolbarButton { + margin: 3px 0 4px 2px; + display: inline-block; +} +html[dir='ltr'] .splitToolbarButton > .toolbarButton { + border-radius: 0; + float: left; +} +html[dir='rtl'] .splitToolbarButton > .toolbarButton { + border-radius: 0; + float: right; +} + +.toolbarButton, +.secondaryToolbarButton, +.overlayButton { + border: 0 none; + background: none; + width: 32px; + height: 25px; +} + +.toolbarButton > span { + display: inline-block; + width: 0; + height: 0; + overflow: hidden; +} + +.toolbarButton[disabled], +.secondaryToolbarButton[disabled], +.overlayButton[disabled] { + opacity: .5; +} + +.splitToolbarButton.toggled .toolbarButton { + margin: 0; +} + +.splitToolbarButton:hover > .toolbarButton, +.splitToolbarButton:focus > .toolbarButton, +.splitToolbarButton.toggled > .toolbarButton, +.toolbarButton.textButton { + background-color: rgba(0, 0, 0, 0.12); + background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)); + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.35); + border-color: rgba(0, 0, 0, 0.32) rgba(0, 0, 0, 0.38) rgba(0, 0, 0, 0.42); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, + 0 0 1px rgba(255, 255, 255, 0.15) inset, + 0 1px 0 rgba(255, 255, 255, 0.05); +} +.splitToolbarButton > .toolbarButton:hover, +.splitToolbarButton > .toolbarButton:focus, +.dropdownToolbarButton:hover, +.overlayButton:hover, +.overlayButton:focus, +.toolbarButton.textButton:hover, +.toolbarButton.textButton:focus { + background-color: rgba(0,0,0,0.2); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, + 0 0 1px rgba(255, 255, 255, 0.15) inset, + 0 0 1px rgba(0, 0, 0, 0.05); + z-index: 199; +} +.dropdownToolbarButton:hover { + background-color: rgba(0, 0, 0, 0.26); +} +.splitToolbarButton > .toolbarButton { + position: relative; +} +html[dir='ltr'] .splitToolbarButton > .toolbarButton:first-child, +html[dir='rtl'] .splitToolbarButton > .toolbarButton:last-child { + position: relative; + margin: 0; + margin-right: -1px; + border-top-left-radius: 2px; + border-bottom-left-radius: 2px; + border-right-color: rgba(0, 0, 0, 0); +} +html[dir='ltr'] .splitToolbarButton > .toolbarButton:last-child, +html[dir='rtl'] .splitToolbarButton > .toolbarButton:first-child { + position: relative; + margin: 0; + margin-left: -1px; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-left-color: rgba(0, 0, 0, 0); +} +.splitToolbarButtonSeparator { + padding: 8px 0; + width: 1px; + background-color: rgba(0, 0, 0, 0.5); + z-index: 99; + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); + display: inline-block; + margin: 5px 0; +} +html[dir='ltr'] .splitToolbarButtonSeparator { + float: left; +} +html[dir='rtl'] .splitToolbarButtonSeparator { + float: right; +} +.splitToolbarButton:hover > .splitToolbarButtonSeparator, +.splitToolbarButton.toggled > .splitToolbarButtonSeparator { + padding: 12px 0; + margin: 1px 0; + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03); +} + +.toolbarButton, +.dropdownToolbarButton, +.secondaryToolbarButton, +.overlayButton { + min-width: 16px; + padding: 2px 6px 0; + border: 1px solid rgba(0, 0, 0, 0); + border-radius: 2px; + color: rgba(255, 255, 255, 0.8); + font-size: 12px; + line-height: 14px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + /* Opera does not support user-select, use <... unselectable="on"> instead */ + cursor: default; +} + +html[dir='ltr'] .toolbarButton, +html[dir='ltr'] .overlayButton, +html[dir='ltr'] .dropdownToolbarButton { + margin: 3px 2px 4px 0; +} +html[dir='rtl'] .toolbarButton, +html[dir='rtl'] .overlayButton, +html[dir='rtl'] .dropdownToolbarButton { + margin: 3px 0 4px 2px; +} + +.toolbarButton:hover, +.toolbarButton:focus, +.dropdownToolbarButton, +.overlayButton, +.secondaryToolbarButton:hover, +.secondaryToolbarButton:focus { + background-color: rgba(0, 0, 0, 0.12); + background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)); + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.35); + border-color: rgba(0, 0, 0, 0.32) rgba(0, 0, 0, 0.38) rgba(0, 0, 0, 0.42); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, + 0 0 1px rgba(255, 255, 255, 0.15) inset, + 0 1px 0 rgba(255, 255, 255, 0.05); +} + +.toolbarButton:hover:active, +.overlayButton:hover:active, +.dropdownToolbarButton:hover:active, +.secondaryToolbarButton:hover:active { + background-color: rgba(0, 0, 0, 0.2); + background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)); + border-color: rgba(0, 0, 0, 0.35) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.45); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) inset, + 0 0 1px rgba(0, 0, 0, 0.2) inset, + 0 1px 0 rgba(255, 255, 255, 0.05); +} + +.toolbarButton.toggled, +.splitToolbarButton.toggled > .toolbarButton.toggled, +.secondaryToolbarButton.toggled { + background-color: rgba(0, 0, 0, 0.3); + background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)); + border-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.45) rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) inset, + 0 0 1px rgba(0, 0, 0, 0.2) inset, + 0 1px 0 rgba(255, 255, 255, 0.05); +} + +.toolbarButton.toggled:hover:active, +.splitToolbarButton.toggled > .toolbarButton.toggled:hover:active, +.secondaryToolbarButton.toggled:hover:active { + background-color: rgba(0, 0, 0, 0.4); + border-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.55); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) inset, + 0 0 1px rgba(0, 0, 0, 0.3) inset, + 0 1px 0 rgba(255, 255, 255, 0.05); +} + +.dropdownToolbarButton { + width: 140px; + padding: 0; + overflow: hidden; +} +.dropdownToolbarButton::after { + position: absolute; + display: inline-block; + top: 4px; + content: url(images/toolbarButton-menuArrows.png); +} +html[dir='ltr'] .dropdownToolbarButton::after { + right: 8px; +} +html[dir='rtl'] .dropdownToolbarButton::after { + left: 8px; +} + +.dropdownToolbarButton > select { + width: 162px; + height: 23px; + font-size: 12px; + color: rgba(242, 242, 242, 1); + margin: 0; + padding: 3px 2px 2px; + border: none; + background: rgba(0,0,0,0); /* Opera does not support 'transparent' +
    + +
    + +
    +
    + +
    + + + + +
    +
    + + + +
    + +
    + +
    +
    + + + +
    +
    +
    +
    + +
    + +
    + +
    + +
    + + +
    +
    + + + + + + + + + Current View + + +
    + + +
    +
    +
    + +
    + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + +
    +
    +
    + + +
    + + + + +
    + + + diff --git a/src/main/resources/static/plugins/pdfjs/web/viewer.js b/src/main/resources/static/plugins/pdfjs/web/viewer.js new file mode 100644 index 0000000..be2313a --- /dev/null +++ b/src/main/resources/static/plugins/pdfjs/web/viewer.js @@ -0,0 +1,13279 @@ +/** + * @licstart The following is the entire license notice for the + * Javascript code in this page + * + * Copyright 2020 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @licend The above is the entire license notice for the + * Javascript code in this page + */ + +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +; +let pdfjsWebApp, pdfjsWebAppOptions; +{ + pdfjsWebApp = __webpack_require__(1); + pdfjsWebAppOptions = __webpack_require__(3); +} +; +{ + __webpack_require__(33); +} +; +{ + __webpack_require__(38); +} + +function getViewerConfiguration() { + return { + appContainer: document.body, + mainContainer: document.getElementById("viewerContainer"), + viewerContainer: document.getElementById("viewer"), + eventBus: null, + toolbar: { + container: document.getElementById("toolbarViewer"), + numPages: document.getElementById("numPages"), + pageNumber: document.getElementById("pageNumber"), + scaleSelectContainer: document.getElementById("scaleSelectContainer"), + scaleSelect: document.getElementById("scaleSelect"), + customScaleOption: document.getElementById("customScaleOption"), + previous: document.getElementById("previous"), + next: document.getElementById("next"), + zoomIn: document.getElementById("zoomIn"), + zoomOut: document.getElementById("zoomOut"), + viewFind: document.getElementById("viewFind"), + openFile: document.getElementById("openFile"), + print: document.getElementById("print"), + presentationModeButton: document.getElementById("presentationMode"), + download: document.getElementById("download"), + viewBookmark: document.getElementById("viewBookmark") + }, + secondaryToolbar: { + toolbar: document.getElementById("secondaryToolbar"), + toggleButton: document.getElementById("secondaryToolbarToggle"), + toolbarButtonContainer: document.getElementById("secondaryToolbarButtonContainer"), + presentationModeButton: document.getElementById("secondaryPresentationMode"), + openFileButton: document.getElementById("secondaryOpenFile"), + printButton: document.getElementById("secondaryPrint"), + downloadButton: document.getElementById("secondaryDownload"), + viewBookmarkButton: document.getElementById("secondaryViewBookmark"), + firstPageButton: document.getElementById("firstPage"), + lastPageButton: document.getElementById("lastPage"), + pageRotateCwButton: document.getElementById("pageRotateCw"), + pageRotateCcwButton: document.getElementById("pageRotateCcw"), + cursorSelectToolButton: document.getElementById("cursorSelectTool"), + cursorHandToolButton: document.getElementById("cursorHandTool"), + scrollVerticalButton: document.getElementById("scrollVertical"), + scrollHorizontalButton: document.getElementById("scrollHorizontal"), + scrollWrappedButton: document.getElementById("scrollWrapped"), + spreadNoneButton: document.getElementById("spreadNone"), + spreadOddButton: document.getElementById("spreadOdd"), + spreadEvenButton: document.getElementById("spreadEven"), + documentPropertiesButton: document.getElementById("documentProperties") + }, + fullscreen: { + contextFirstPage: document.getElementById("contextFirstPage"), + contextLastPage: document.getElementById("contextLastPage"), + contextPageRotateCw: document.getElementById("contextPageRotateCw"), + contextPageRotateCcw: document.getElementById("contextPageRotateCcw") + }, + sidebar: { + outerContainer: document.getElementById("outerContainer"), + viewerContainer: document.getElementById("viewerContainer"), + toggleButton: document.getElementById("sidebarToggle"), + thumbnailButton: document.getElementById("viewThumbnail"), + outlineButton: document.getElementById("viewOutline"), + attachmentsButton: document.getElementById("viewAttachments"), + thumbnailView: document.getElementById("thumbnailView"), + outlineView: document.getElementById("outlineView"), + attachmentsView: document.getElementById("attachmentsView") + }, + sidebarResizer: { + outerContainer: document.getElementById("outerContainer"), + resizer: document.getElementById("sidebarResizer") + }, + findBar: { + bar: document.getElementById("findbar"), + toggleButton: document.getElementById("viewFind"), + findField: document.getElementById("findInput"), + highlightAllCheckbox: document.getElementById("findHighlightAll"), + caseSensitiveCheckbox: document.getElementById("findMatchCase"), + entireWordCheckbox: document.getElementById("findEntireWord"), + findMsg: document.getElementById("findMsg"), + findResultsCount: document.getElementById("findResultsCount"), + findPreviousButton: document.getElementById("findPrevious"), + findNextButton: document.getElementById("findNext") + }, + passwordOverlay: { + overlayName: "passwordOverlay", + container: document.getElementById("passwordOverlay"), + label: document.getElementById("passwordText"), + input: document.getElementById("password"), + submitButton: document.getElementById("passwordSubmit"), + cancelButton: document.getElementById("passwordCancel") + }, + documentProperties: { + overlayName: "documentPropertiesOverlay", + container: document.getElementById("documentPropertiesOverlay"), + closeButton: document.getElementById("documentPropertiesClose"), + fields: { + fileName: document.getElementById("fileNameField"), + fileSize: document.getElementById("fileSizeField"), + title: document.getElementById("titleField"), + author: document.getElementById("authorField"), + subject: document.getElementById("subjectField"), + keywords: document.getElementById("keywordsField"), + creationDate: document.getElementById("creationDateField"), + modificationDate: document.getElementById("modificationDateField"), + creator: document.getElementById("creatorField"), + producer: document.getElementById("producerField"), + version: document.getElementById("versionField"), + pageCount: document.getElementById("pageCountField"), + pageSize: document.getElementById("pageSizeField"), + linearized: document.getElementById("linearizedField") + } + }, + errorWrapper: { + container: document.getElementById("errorWrapper"), + errorMessage: document.getElementById("errorMessage"), + closeButton: document.getElementById("errorClose"), + errorMoreInfo: document.getElementById("errorMoreInfo"), + moreInfoButton: document.getElementById("errorShowMore"), + lessInfoButton: document.getElementById("errorShowLess") + }, + printContainer: document.getElementById("printContainer"), + openFileInputName: "fileInput", + debuggerScriptPath: "./debugger.js" + }; +} + +function webViewerLoad() { + const config = getViewerConfiguration(); + window.PDFViewerApplication = pdfjsWebApp.PDFViewerApplication; + window.PDFViewerApplicationOptions = pdfjsWebAppOptions.AppOptions; + const event = document.createEvent("CustomEvent"); + event.initCustomEvent("webviewerloaded", true, true, { + source: window + }); + + try { + parent.document.dispatchEvent(event); + } catch (ex) { + console.error(`webviewerloaded: ${ex}`); + document.dispatchEvent(event); + } + + pdfjsWebApp.PDFViewerApplication.run(config); +} + +if (document.readyState === "interactive" || document.readyState === "complete") { + webViewerLoad(); +} else { + document.addEventListener("DOMContentLoaded", webViewerLoad, true); +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFPrintServiceFactory = exports.DefaultExternalServices = exports.PDFViewerApplication = void 0; + +var _ui_utils = __webpack_require__(2); + +var _app_options = __webpack_require__(3); + +var _pdfjsLib = __webpack_require__(5); + +var _pdf_cursor_tools = __webpack_require__(6); + +var _pdf_rendering_queue = __webpack_require__(8); + +var _pdf_sidebar = __webpack_require__(9); + +var _overlay_manager = __webpack_require__(10); + +var _password_prompt = __webpack_require__(11); + +var _pdf_attachment_viewer = __webpack_require__(12); + +var _pdf_document_properties = __webpack_require__(13); + +var _pdf_find_bar = __webpack_require__(14); + +var _pdf_find_controller = __webpack_require__(15); + +var _pdf_history = __webpack_require__(17); + +var _pdf_link_service = __webpack_require__(18); + +var _pdf_outline_viewer = __webpack_require__(19); + +var _pdf_presentation_mode = __webpack_require__(20); + +var _pdf_sidebar_resizer = __webpack_require__(21); + +var _pdf_thumbnail_viewer = __webpack_require__(22); + +var _pdf_viewer = __webpack_require__(24); + +var _secondary_toolbar = __webpack_require__(29); + +var _toolbar = __webpack_require__(31); + +var _view_history = __webpack_require__(32); + +const DEFAULT_SCALE_DELTA = 1.1; +const DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; +const FORCE_PAGES_LOADED_TIMEOUT = 10000; +const WHEEL_ZOOM_DISABLED_TIMEOUT = 1000; +const ENABLE_PERMISSIONS_CLASS = "enablePermissions"; +const ViewOnLoad = { + UNKNOWN: -1, + PREVIOUS: 0, + INITIAL: 1 +}; + +class DefaultExternalServices { + constructor() { + throw new Error("Cannot initialize DefaultExternalServices."); + } + + static updateFindControlState(data) {} + + static updateFindMatchesCount(data) {} + + static initPassiveLoading(callbacks) {} + + static fallback(data, callback) {} + + static reportTelemetry(data) {} + + static createDownloadManager(options) { + throw new Error("Not implemented: createDownloadManager"); + } + + static createPreferences() { + throw new Error("Not implemented: createPreferences"); + } + + static createL10n(options) { + throw new Error("Not implemented: createL10n"); + } + + static get supportsIntegratedFind() { + return (0, _pdfjsLib.shadow)(this, "supportsIntegratedFind", false); + } + + static get supportsDocumentFonts() { + return (0, _pdfjsLib.shadow)(this, "supportsDocumentFonts", true); + } + + static get supportedMouseWheelZoomModifierKeys() { + return (0, _pdfjsLib.shadow)(this, "supportedMouseWheelZoomModifierKeys", { + ctrlKey: true, + metaKey: true + }); + } + + static get isInAutomation() { + return (0, _pdfjsLib.shadow)(this, "isInAutomation", false); + } + +} + +exports.DefaultExternalServices = DefaultExternalServices; +const PDFViewerApplication = { + initialBookmark: document.location.hash.substring(1), + _initializedCapability: (0, _pdfjsLib.createPromiseCapability)(), + fellback: false, + appConfig: null, + pdfDocument: null, + pdfLoadingTask: null, + printService: null, + pdfViewer: null, + pdfThumbnailViewer: null, + pdfRenderingQueue: null, + pdfPresentationMode: null, + pdfDocumentProperties: null, + pdfLinkService: null, + pdfHistory: null, + pdfSidebar: null, + pdfSidebarResizer: null, + pdfOutlineViewer: null, + pdfAttachmentViewer: null, + pdfCursorTools: null, + store: null, + downloadManager: null, + overlayManager: null, + preferences: null, + toolbar: null, + secondaryToolbar: null, + eventBus: null, + l10n: null, + isInitialViewSet: false, + downloadComplete: false, + isViewerEmbedded: window.parent !== window, + url: "", + baseUrl: "", + externalServices: DefaultExternalServices, + _boundEvents: {}, + contentDispositionFilename: null, + + async initialize(appConfig) { + this.preferences = this.externalServices.createPreferences(); + this.appConfig = appConfig; + await this._readPreferences(); + await this._parseHashParameters(); + await this._initializeL10n(); + + if (this.isViewerEmbedded && _app_options.AppOptions.get("externalLinkTarget") === _pdfjsLib.LinkTarget.NONE) { + _app_options.AppOptions.set("externalLinkTarget", _pdfjsLib.LinkTarget.TOP); + } + + await this._initializeViewerComponents(); + this.bindEvents(); + this.bindWindowEvents(); + const appContainer = appConfig.appContainer || document.documentElement; + this.l10n.translate(appContainer).then(() => { + this.eventBus.dispatch("localized", { + source: this + }); + }); + + this._initializedCapability.resolve(); + }, + + async _readPreferences() { + if (_app_options.AppOptions.get("disablePreferences")) { + return; + } + + try { + const prefs = await this.preferences.getAll(); + + for (const name in prefs) { + _app_options.AppOptions.set(name, prefs[name]); + } + } catch (reason) { + console.error(`_readPreferences: "${reason.message}".`); + } + }, + + async _parseHashParameters() { + if (!_app_options.AppOptions.get("pdfBugEnabled")) { + return undefined; + } + + const hash = document.location.hash.substring(1); + + if (!hash) { + return undefined; + } + + const hashParams = (0, _ui_utils.parseQueryString)(hash), + waitOn = []; + + if ("disableworker" in hashParams && hashParams.disableworker === "true") { + waitOn.push(loadFakeWorker()); + } + + if ("disablerange" in hashParams) { + _app_options.AppOptions.set("disableRange", hashParams.disablerange === "true"); + } + + if ("disablestream" in hashParams) { + _app_options.AppOptions.set("disableStream", hashParams.disablestream === "true"); + } + + if ("disableautofetch" in hashParams) { + _app_options.AppOptions.set("disableAutoFetch", hashParams.disableautofetch === "true"); + } + + if ("disablefontface" in hashParams) { + _app_options.AppOptions.set("disableFontFace", hashParams.disablefontface === "true"); + } + + if ("disablehistory" in hashParams) { + _app_options.AppOptions.set("disableHistory", hashParams.disablehistory === "true"); + } + + if ("webgl" in hashParams) { + _app_options.AppOptions.set("enableWebGL", hashParams.webgl === "true"); + } + + if ("verbosity" in hashParams) { + _app_options.AppOptions.set("verbosity", hashParams.verbosity | 0); + } + + if ("textlayer" in hashParams) { + switch (hashParams.textlayer) { + case "off": + _app_options.AppOptions.set("textLayerMode", _ui_utils.TextLayerMode.DISABLE); + + break; + + case "visible": + case "shadow": + case "hover": + const viewer = this.appConfig.viewerContainer; + viewer.classList.add("textLayer-" + hashParams.textlayer); + break; + } + } + + if ("pdfbug" in hashParams) { + _app_options.AppOptions.set("pdfBug", true); + + _app_options.AppOptions.set("fontExtraProperties", true); + + const enabled = hashParams.pdfbug.split(","); + waitOn.push(loadAndEnablePDFBug(enabled)); + } + + if ("locale" in hashParams) { + _app_options.AppOptions.set("locale", hashParams.locale); + } + + return Promise.all(waitOn).catch(reason => { + console.error(`_parseHashParameters: "${reason.message}".`); + }); + }, + + async _initializeL10n() { + this.l10n = this.externalServices.createL10n({ + locale: _app_options.AppOptions.get("locale") + }); + const dir = await this.l10n.getDirection(); + document.getElementsByTagName("html")[0].dir = dir; + }, + + async _initializeViewerComponents() { + const appConfig = this.appConfig; + const eventBus = appConfig.eventBus || new _ui_utils.EventBus({ + isInAutomation: this.externalServices.isInAutomation + }); + this.eventBus = eventBus; + this.overlayManager = new _overlay_manager.OverlayManager(); + const pdfRenderingQueue = new _pdf_rendering_queue.PDFRenderingQueue(); + pdfRenderingQueue.onIdle = this.cleanup.bind(this); + this.pdfRenderingQueue = pdfRenderingQueue; + const pdfLinkService = new _pdf_link_service.PDFLinkService({ + eventBus, + externalLinkTarget: _app_options.AppOptions.get("externalLinkTarget"), + externalLinkRel: _app_options.AppOptions.get("externalLinkRel"), + ignoreDestinationZoom: _app_options.AppOptions.get("ignoreDestinationZoom") + }); + this.pdfLinkService = pdfLinkService; + const downloadManager = this.externalServices.createDownloadManager({ + disableCreateObjectURL: _app_options.AppOptions.get("disableCreateObjectURL") + }); + this.downloadManager = downloadManager; + const findController = new _pdf_find_controller.PDFFindController({ + linkService: pdfLinkService, + eventBus + }); + this.findController = findController; + const container = appConfig.mainContainer; + const viewer = appConfig.viewerContainer; + this.pdfViewer = new _pdf_viewer.PDFViewer({ + container, + viewer, + eventBus, + renderingQueue: pdfRenderingQueue, + linkService: pdfLinkService, + downloadManager, + findController, + renderer: _app_options.AppOptions.get("renderer"), + enableWebGL: _app_options.AppOptions.get("enableWebGL"), + l10n: this.l10n, + textLayerMode: _app_options.AppOptions.get("textLayerMode"), + imageResourcesPath: _app_options.AppOptions.get("imageResourcesPath"), + renderInteractiveForms: _app_options.AppOptions.get("renderInteractiveForms"), + enablePrintAutoRotate: _app_options.AppOptions.get("enablePrintAutoRotate"), + useOnlyCssZoom: _app_options.AppOptions.get("useOnlyCssZoom"), + maxCanvasPixels: _app_options.AppOptions.get("maxCanvasPixels") + }); + pdfRenderingQueue.setViewer(this.pdfViewer); + pdfLinkService.setViewer(this.pdfViewer); + this.pdfThumbnailViewer = new _pdf_thumbnail_viewer.PDFThumbnailViewer({ + container: appConfig.sidebar.thumbnailView, + renderingQueue: pdfRenderingQueue, + linkService: pdfLinkService, + l10n: this.l10n + }); + pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer); + this.pdfHistory = new _pdf_history.PDFHistory({ + linkService: pdfLinkService, + eventBus + }); + pdfLinkService.setHistory(this.pdfHistory); + + if (!this.supportsIntegratedFind) { + this.findBar = new _pdf_find_bar.PDFFindBar(appConfig.findBar, eventBus, this.l10n); + } + + this.pdfDocumentProperties = new _pdf_document_properties.PDFDocumentProperties(appConfig.documentProperties, this.overlayManager, eventBus, this.l10n); + this.pdfCursorTools = new _pdf_cursor_tools.PDFCursorTools({ + container, + eventBus, + cursorToolOnLoad: _app_options.AppOptions.get("cursorToolOnLoad") + }); + this.toolbar = new _toolbar.Toolbar(appConfig.toolbar, eventBus, this.l10n); + this.secondaryToolbar = new _secondary_toolbar.SecondaryToolbar(appConfig.secondaryToolbar, container, eventBus); + + if (this.supportsFullscreen) { + this.pdfPresentationMode = new _pdf_presentation_mode.PDFPresentationMode({ + container, + pdfViewer: this.pdfViewer, + eventBus, + contextMenuItems: appConfig.fullscreen + }); + } + + this.passwordPrompt = new _password_prompt.PasswordPrompt(appConfig.passwordOverlay, this.overlayManager, this.l10n); + this.pdfOutlineViewer = new _pdf_outline_viewer.PDFOutlineViewer({ + container: appConfig.sidebar.outlineView, + eventBus, + linkService: pdfLinkService + }); + this.pdfAttachmentViewer = new _pdf_attachment_viewer.PDFAttachmentViewer({ + container: appConfig.sidebar.attachmentsView, + eventBus, + downloadManager + }); + this.pdfSidebar = new _pdf_sidebar.PDFSidebar({ + elements: appConfig.sidebar, + pdfViewer: this.pdfViewer, + pdfThumbnailViewer: this.pdfThumbnailViewer, + eventBus, + l10n: this.l10n + }); + this.pdfSidebar.onToggled = this.forceRendering.bind(this); + this.pdfSidebarResizer = new _pdf_sidebar_resizer.PDFSidebarResizer(appConfig.sidebarResizer, eventBus, this.l10n); + }, + + run(config) { + this.initialize(config).then(webViewerInitialized); + }, + + get initialized() { + return this._initializedCapability.settled; + }, + + get initializedPromise() { + return this._initializedCapability.promise; + }, + + zoomIn(ticks) { + if (this.pdfViewer.isInPresentationMode) { + return; + } + + let newScale = this.pdfViewer.currentScale; + + do { + newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2); + newScale = Math.ceil(newScale * 10) / 10; + newScale = Math.min(_ui_utils.MAX_SCALE, newScale); + } while (--ticks > 0 && newScale < _ui_utils.MAX_SCALE); + + this.pdfViewer.currentScaleValue = newScale; + }, + + zoomOut(ticks) { + if (this.pdfViewer.isInPresentationMode) { + return; + } + + let newScale = this.pdfViewer.currentScale; + + do { + newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2); + newScale = Math.floor(newScale * 10) / 10; + newScale = Math.max(_ui_utils.MIN_SCALE, newScale); + } while (--ticks > 0 && newScale > _ui_utils.MIN_SCALE); + + this.pdfViewer.currentScaleValue = newScale; + }, + + zoomReset() { + if (this.pdfViewer.isInPresentationMode) { + return; + } + + this.pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + }, + + get pagesCount() { + return this.pdfDocument ? this.pdfDocument.numPages : 0; + }, + + get page() { + return this.pdfViewer.currentPageNumber; + }, + + set page(val) { + this.pdfViewer.currentPageNumber = val; + }, + + get printing() { + return !!this.printService; + }, + + get supportsPrinting() { + return PDFPrintServiceFactory.instance.supportsPrinting; + }, + + get supportsFullscreen() { + let support; + const doc = document.documentElement; + support = !!(doc.requestFullscreen || doc.mozRequestFullScreen || doc.webkitRequestFullScreen || doc.msRequestFullscreen); + + if (document.fullscreenEnabled === false || document.mozFullScreenEnabled === false || document.webkitFullscreenEnabled === false || document.msFullscreenEnabled === false) { + support = false; + } + + return (0, _pdfjsLib.shadow)(this, "supportsFullscreen", support); + }, + + get supportsIntegratedFind() { + return this.externalServices.supportsIntegratedFind; + }, + + get supportsDocumentFonts() { + return this.externalServices.supportsDocumentFonts; + }, + + get loadingBar() { + const bar = new _ui_utils.ProgressBar("#loadingBar"); + return (0, _pdfjsLib.shadow)(this, "loadingBar", bar); + }, + + get supportedMouseWheelZoomModifierKeys() { + return this.externalServices.supportedMouseWheelZoomModifierKeys; + }, + + initPassiveLoading() { + throw new Error("Not implemented: initPassiveLoading"); + }, + + setTitleUsingUrl(url = "") { + this.url = url; + this.baseUrl = url.split("#")[0]; + let title = (0, _ui_utils.getPDFFileNameFromURL)(url, ""); + + if (!title) { + try { + title = decodeURIComponent((0, _pdfjsLib.getFilenameFromUrl)(url)) || url; + } catch (ex) { + title = url; + } + } + + this.setTitle(title); + }, + + setTitle(title) { + if (this.isViewerEmbedded) { + return; + } + + document.title = title; + }, + + async close() { + const errorWrapper = this.appConfig.errorWrapper.container; + errorWrapper.setAttribute("hidden", "true"); + + if (!this.pdfLoadingTask) { + return undefined; + } + + const promise = this.pdfLoadingTask.destroy(); + this.pdfLoadingTask = null; + + if (this.pdfDocument) { + this.pdfDocument = null; + this.pdfThumbnailViewer.setDocument(null); + this.pdfViewer.setDocument(null); + this.pdfLinkService.setDocument(null); + this.pdfDocumentProperties.setDocument(null); + } + + webViewerResetPermissions(); + this.store = null; + this.isInitialViewSet = false; + this.downloadComplete = false; + this.url = ""; + this.baseUrl = ""; + this.contentDispositionFilename = null; + this.pdfSidebar.reset(); + this.pdfOutlineViewer.reset(); + this.pdfAttachmentViewer.reset(); + + if (this.pdfHistory) { + this.pdfHistory.reset(); + } + + if (this.findBar) { + this.findBar.reset(); + } + + this.toolbar.reset(); + this.secondaryToolbar.reset(); + + if (typeof PDFBug !== "undefined") { + PDFBug.cleanup(); + } + + return promise; + }, + + async open(file, args) { + if (this.pdfLoadingTask) { + await this.close(); + } + + const workerParameters = _app_options.AppOptions.getAll(_app_options.OptionKind.WORKER); + + for (const key in workerParameters) { + _pdfjsLib.GlobalWorkerOptions[key] = workerParameters[key]; + } + + const parameters = Object.create(null); + + if (typeof file === "string") { + this.setTitleUsingUrl(file); + parameters.url = file; + } else if (file && "byteLength" in file) { + parameters.data = file; + } else if (file.url && file.originalUrl) { + this.setTitleUsingUrl(file.originalUrl); + parameters.url = file.url; + } + + const apiParameters = _app_options.AppOptions.getAll(_app_options.OptionKind.API); + + for (const key in apiParameters) { + let value = apiParameters[key]; + + if (key === "docBaseUrl" && !value) {} + + parameters[key] = value; + } + + if (args) { + for (const key in args) { + const value = args[key]; + + if (key === "length") { + this.pdfDocumentProperties.setFileSize(value); + } + + parameters[key] = value; + } + } + + const loadingTask = (0, _pdfjsLib.getDocument)(parameters); + this.pdfLoadingTask = loadingTask; + + loadingTask.onPassword = (updateCallback, reason) => { + this.pdfLinkService.externalLinkEnabled = false; + this.passwordPrompt.setUpdateCallback(updateCallback, reason); + this.passwordPrompt.open(); + }; + + loadingTask.onProgress = ({ + loaded, + total + }) => { + this.progress(loaded / total); + }; + + loadingTask.onUnsupportedFeature = this.fallback.bind(this); + return loadingTask.promise.then(pdfDocument => { + this.load(pdfDocument); + }, exception => { + if (loadingTask !== this.pdfLoadingTask) { + return undefined; + } + + const message = exception && exception.message; + let loadingErrorMessage; + + if (exception instanceof _pdfjsLib.InvalidPDFException) { + loadingErrorMessage = this.l10n.get("invalid_file_error", null, "Invalid or corrupted PDF file."); + } else if (exception instanceof _pdfjsLib.MissingPDFException) { + loadingErrorMessage = this.l10n.get("missing_file_error", null, "Missing PDF file."); + } else if (exception instanceof _pdfjsLib.UnexpectedResponseException) { + loadingErrorMessage = this.l10n.get("unexpected_response_error", null, "Unexpected server response."); + } else { + loadingErrorMessage = this.l10n.get("loading_error", null, "An error occurred while loading the PDF."); + } + + return loadingErrorMessage.then(msg => { + this.error(msg, { + message + }); + throw exception; + }); + }); + }, + + download() { + function downloadByUrl() { + downloadManager.downloadUrl(url, filename); + } + + const url = this.baseUrl; + const filename = this.contentDispositionFilename || (0, _ui_utils.getPDFFileNameFromURL)(this.url); + const downloadManager = this.downloadManager; + + downloadManager.onerror = err => { + this.error(`PDF failed to download: ${err}`); + }; + + if (!this.pdfDocument || !this.downloadComplete) { + downloadByUrl(); + return; + } + + this.pdfDocument.getData().then(function (data) { + const blob = new Blob([data], { + type: "application/pdf" + }); + downloadManager.download(blob, url, filename); + }).catch(downloadByUrl); + }, + + fallback(featureId) { + if (this.fellback) { + return; + } + + this.fellback = true; + this.externalServices.fallback({ + featureId, + url: this.baseUrl + }, function response(download) { + if (!download) { + return; + } + + PDFViewerApplication.download(); + }); + }, + + error(message, moreInfo) { + const moreInfoText = [this.l10n.get("error_version_info", { + version: _pdfjsLib.version || "?", + build: _pdfjsLib.build || "?" + }, "PDF.js v{{version}} (build: {{build}})")]; + + if (moreInfo) { + moreInfoText.push(this.l10n.get("error_message", { + message: moreInfo.message + }, "Message: {{message}}")); + + if (moreInfo.stack) { + moreInfoText.push(this.l10n.get("error_stack", { + stack: moreInfo.stack + }, "Stack: {{stack}}")); + } else { + if (moreInfo.filename) { + moreInfoText.push(this.l10n.get("error_file", { + file: moreInfo.filename + }, "File: {{file}}")); + } + + if (moreInfo.lineNumber) { + moreInfoText.push(this.l10n.get("error_line", { + line: moreInfo.lineNumber + }, "Line: {{line}}")); + } + } + } + + const errorWrapperConfig = this.appConfig.errorWrapper; + const errorWrapper = errorWrapperConfig.container; + errorWrapper.removeAttribute("hidden"); + const errorMessage = errorWrapperConfig.errorMessage; + errorMessage.textContent = message; + const closeButton = errorWrapperConfig.closeButton; + + closeButton.onclick = function () { + errorWrapper.setAttribute("hidden", "true"); + }; + + const errorMoreInfo = errorWrapperConfig.errorMoreInfo; + const moreInfoButton = errorWrapperConfig.moreInfoButton; + const lessInfoButton = errorWrapperConfig.lessInfoButton; + + moreInfoButton.onclick = function () { + errorMoreInfo.removeAttribute("hidden"); + moreInfoButton.setAttribute("hidden", "true"); + lessInfoButton.removeAttribute("hidden"); + errorMoreInfo.style.height = errorMoreInfo.scrollHeight + "px"; + }; + + lessInfoButton.onclick = function () { + errorMoreInfo.setAttribute("hidden", "true"); + moreInfoButton.removeAttribute("hidden"); + lessInfoButton.setAttribute("hidden", "true"); + }; + + moreInfoButton.oncontextmenu = _ui_utils.noContextMenuHandler; + lessInfoButton.oncontextmenu = _ui_utils.noContextMenuHandler; + closeButton.oncontextmenu = _ui_utils.noContextMenuHandler; + moreInfoButton.removeAttribute("hidden"); + lessInfoButton.setAttribute("hidden", "true"); + Promise.all(moreInfoText).then(parts => { + errorMoreInfo.value = parts.join("\n"); + }); + }, + + progress(level) { + if (this.downloadComplete) { + return; + } + + const percent = Math.round(level * 100); + + if (percent > this.loadingBar.percent || isNaN(percent)) { + this.loadingBar.percent = percent; + const disableAutoFetch = this.pdfDocument ? this.pdfDocument.loadingParams.disableAutoFetch : _app_options.AppOptions.get("disableAutoFetch"); + + if (disableAutoFetch && percent) { + if (this.disableAutoFetchLoadingBarTimeout) { + clearTimeout(this.disableAutoFetchLoadingBarTimeout); + this.disableAutoFetchLoadingBarTimeout = null; + } + + this.loadingBar.show(); + this.disableAutoFetchLoadingBarTimeout = setTimeout(() => { + this.loadingBar.hide(); + this.disableAutoFetchLoadingBarTimeout = null; + }, DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT); + } + } + }, + + load(pdfDocument) { + this.pdfDocument = pdfDocument; + pdfDocument.getDownloadInfo().then(() => { + this.downloadComplete = true; + this.loadingBar.hide(); + firstPagePromise.then(() => { + this.eventBus.dispatch("documentloaded", { + source: this + }); + }); + }); + const pageLayoutPromise = pdfDocument.getPageLayout().catch(function () {}); + const pageModePromise = pdfDocument.getPageMode().catch(function () {}); + const openActionPromise = pdfDocument.getOpenAction().catch(function () {}); + this.toolbar.setPagesCount(pdfDocument.numPages, false); + this.secondaryToolbar.setPagesCount(pdfDocument.numPages); + let baseDocumentUrl; + baseDocumentUrl = null; + this.pdfLinkService.setDocument(pdfDocument, baseDocumentUrl); + this.pdfDocumentProperties.setDocument(pdfDocument, this.url); + const pdfViewer = this.pdfViewer; + pdfViewer.setDocument(pdfDocument); + const { + firstPagePromise, + onePageRendered, + pagesPromise + } = pdfViewer; + const pdfThumbnailViewer = this.pdfThumbnailViewer; + pdfThumbnailViewer.setDocument(pdfDocument); + const storedPromise = (this.store = new _view_history.ViewHistory(pdfDocument.fingerprint)).getMultiple({ + page: null, + zoom: _ui_utils.DEFAULT_SCALE_VALUE, + scrollLeft: "0", + scrollTop: "0", + rotation: null, + sidebarView: _pdf_sidebar.SidebarView.UNKNOWN, + scrollMode: _ui_utils.ScrollMode.UNKNOWN, + spreadMode: _ui_utils.SpreadMode.UNKNOWN + }).catch(() => { + return Object.create(null); + }); + firstPagePromise.then(pdfPage => { + this.loadingBar.setWidth(this.appConfig.viewerContainer); + Promise.all([_ui_utils.animationStarted, storedPromise, pageLayoutPromise, pageModePromise, openActionPromise]).then(async ([timeStamp, stored, pageLayout, pageMode, openAction]) => { + const viewOnLoad = _app_options.AppOptions.get("viewOnLoad"); + + this._initializePdfHistory({ + fingerprint: pdfDocument.fingerprint, + viewOnLoad, + initialDest: openAction && openAction.dest + }); + + const initialBookmark = this.initialBookmark; + + const zoom = _app_options.AppOptions.get("defaultZoomValue"); + + let hash = zoom ? `zoom=${zoom}` : null; + let rotation = null; + + let sidebarView = _app_options.AppOptions.get("sidebarViewOnLoad"); + + let scrollMode = _app_options.AppOptions.get("scrollModeOnLoad"); + + let spreadMode = _app_options.AppOptions.get("spreadModeOnLoad"); + + if (stored.page && viewOnLoad !== ViewOnLoad.INITIAL) { + hash = `page=${stored.page}&zoom=${zoom || stored.zoom},` + `${stored.scrollLeft},${stored.scrollTop}`; + rotation = parseInt(stored.rotation, 10); + + if (sidebarView === _pdf_sidebar.SidebarView.UNKNOWN) { + sidebarView = stored.sidebarView | 0; + } + + if (scrollMode === _ui_utils.ScrollMode.UNKNOWN) { + scrollMode = stored.scrollMode | 0; + } + + if (spreadMode === _ui_utils.SpreadMode.UNKNOWN) { + spreadMode = stored.spreadMode | 0; + } + } + + if (pageMode && sidebarView === _pdf_sidebar.SidebarView.UNKNOWN) { + sidebarView = apiPageModeToSidebarView(pageMode); + } + + if (pageLayout && spreadMode === _ui_utils.SpreadMode.UNKNOWN) { + spreadMode = apiPageLayoutToSpreadMode(pageLayout); + } + + this.setInitialView(hash, { + rotation, + sidebarView, + scrollMode, + spreadMode + }); + this.eventBus.dispatch("documentinit", { + source: this + }); + + if (!this.isViewerEmbedded) { + pdfViewer.focus(); + } + + this._initializePermissions(pdfDocument); + + await Promise.race([pagesPromise, new Promise(resolve => { + setTimeout(resolve, FORCE_PAGES_LOADED_TIMEOUT); + })]); + + if (!initialBookmark && !hash) { + return; + } + + if (pdfViewer.hasEqualPageSizes) { + return; + } + + this.initialBookmark = initialBookmark; + pdfViewer.currentScaleValue = pdfViewer.currentScaleValue; + this.setInitialView(hash); + }).catch(() => { + this.setInitialView(); + }).then(function () { + pdfViewer.update(); + }); + }); + pagesPromise.then(() => { + this._initializeAutoPrint(pdfDocument, openActionPromise); + }); + onePageRendered.then(() => { + pdfDocument.getOutline().then(outline => { + this.pdfOutlineViewer.render({ + outline + }); + }); + pdfDocument.getAttachments().then(attachments => { + this.pdfAttachmentViewer.render({ + attachments + }); + }); + }); + + this._initializePageLabels(pdfDocument); + + this._initializeMetadata(pdfDocument); + }, + + async _initializeAutoPrint(pdfDocument, openActionPromise) { + const [openAction, javaScript] = await Promise.all([openActionPromise, pdfDocument.getJavaScript()]); + + if (pdfDocument !== this.pdfDocument) { + return; + } + + let triggerAutoPrint = false; + + if (openAction && openAction.action === "Print") { + triggerAutoPrint = true; + } + + if (javaScript) { + javaScript.some(js => { + if (!js) { + return false; + } + + console.warn("Warning: JavaScript is not supported"); + this.fallback(_pdfjsLib.UNSUPPORTED_FEATURES.javaScript); + return true; + }); + + if (!triggerAutoPrint) { + for (const js of javaScript) { + if (js && _ui_utils.AutoPrintRegExp.test(js)) { + triggerAutoPrint = true; + break; + } + } + } + } + + if (!this.supportsPrinting) { + return; + } + + if (triggerAutoPrint) { + setTimeout(function () { + window.print(); + }); + } + }, + + async _initializeMetadata(pdfDocument) { + const { + info, + metadata, + contentDispositionFilename + } = await pdfDocument.getMetadata(); + + if (pdfDocument !== this.pdfDocument) { + return; + } + + this.documentInfo = info; + this.metadata = metadata; + this.contentDispositionFilename = contentDispositionFilename; + console.log(`PDF ${pdfDocument.fingerprint} [${info.PDFFormatVersion} ` + `${(info.Producer || "-").trim()} / ${(info.Creator || "-").trim()}] ` + `(PDF.js: ${_pdfjsLib.version || "-"}` + `${this.pdfViewer.enableWebGL ? " [WebGL]" : ""})`); + let pdfTitle; + const infoTitle = info && info.Title; + + if (infoTitle) { + pdfTitle = infoTitle; + } + + const metadataTitle = metadata && metadata.get("dc:title"); + + if (metadataTitle) { + if (metadataTitle !== "Untitled" && !/[\uFFF0-\uFFFF]/g.test(metadataTitle)) { + pdfTitle = metadataTitle; + } + } + + if (pdfTitle) { + this.setTitle(`${pdfTitle} - ${contentDispositionFilename || document.title}`); + } else if (contentDispositionFilename) { + this.setTitle(contentDispositionFilename); + } + + if (info.IsAcroFormPresent) { + console.warn("Warning: AcroForm/XFA is not supported"); + this.fallback(_pdfjsLib.UNSUPPORTED_FEATURES.forms); + } + + let versionId = "other"; + const KNOWN_VERSIONS = ["1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "2.0", "2.1", "2.2", "2.3"]; + + if (KNOWN_VERSIONS.includes(info.PDFFormatVersion)) { + versionId = `v${info.PDFFormatVersion.replace(".", "_")}`; + } + + let generatorId = "other"; + const KNOWN_GENERATORS = ["acrobat distiller", "acrobat pdfwriter", "adobe livecycle", "adobe pdf library", "adobe photoshop", "ghostscript", "tcpdf", "cairo", "dvipdfm", "dvips", "pdftex", "pdfkit", "itext", "prince", "quarkxpress", "mac os x", "microsoft", "openoffice", "oracle", "luradocument", "pdf-xchange", "antenna house", "aspose.cells", "fpdf"]; + + if (info.Producer) { + const producer = info.Producer.toLowerCase(); + KNOWN_GENERATORS.some(function (generator) { + if (!producer.includes(generator)) { + return false; + } + + generatorId = generator.replace(/[ .\-]/g, "_"); + return true; + }); + } + + let formType = null; + + if (info.IsAcroFormPresent) { + formType = info.IsXFAPresent ? "xfa" : "acroform"; + } + + this.externalServices.reportTelemetry({ + type: "documentInfo", + version: versionId, + generator: generatorId, + formType + }); + }, + + async _initializePageLabels(pdfDocument) { + const labels = await pdfDocument.getPageLabels(); + + if (pdfDocument !== this.pdfDocument) { + return; + } + + if (!labels || _app_options.AppOptions.get("disablePageLabels")) { + return; + } + + const numLabels = labels.length; + + if (numLabels !== this.pagesCount) { + console.error("The number of Page Labels does not match the number of pages in the document."); + return; + } + + let i = 0; + + while (i < numLabels && labels[i] === (i + 1).toString()) { + i++; + } + + if (i === numLabels) { + return; + } + + const { + pdfViewer, + pdfThumbnailViewer, + toolbar + } = this; + pdfViewer.setPageLabels(labels); + pdfThumbnailViewer.setPageLabels(labels); + toolbar.setPagesCount(numLabels, true); + toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel); + }, + + _initializePdfHistory({ + fingerprint, + viewOnLoad, + initialDest = null + }) { + if (this.isViewerEmbedded || _app_options.AppOptions.get("disableHistory")) { + return; + } + + this.pdfHistory.initialize({ + fingerprint, + resetHistory: viewOnLoad === ViewOnLoad.INITIAL, + updateUrl: _app_options.AppOptions.get("historyUpdateUrl") + }); + + if (this.pdfHistory.initialBookmark) { + this.initialBookmark = this.pdfHistory.initialBookmark; + this.initialRotation = this.pdfHistory.initialRotation; + } + + if (initialDest && !this.initialBookmark && viewOnLoad === ViewOnLoad.UNKNOWN) { + this.initialBookmark = JSON.stringify(initialDest); + this.pdfHistory.push({ + explicitDest: initialDest, + pageNumber: null + }); + } + }, + + async _initializePermissions(pdfDocument) { + const permissions = await pdfDocument.getPermissions(); + + if (pdfDocument !== this.pdfDocument) { + return; + } + + if (!permissions || !_app_options.AppOptions.get("enablePermissions")) { + return; + } + + if (!permissions.includes(_pdfjsLib.PermissionFlag.COPY)) { + this.appConfig.viewerContainer.classList.add(ENABLE_PERMISSIONS_CLASS); + } + }, + + setInitialView(storedHash, { + rotation, + sidebarView, + scrollMode, + spreadMode + } = {}) { + const setRotation = angle => { + if ((0, _ui_utils.isValidRotation)(angle)) { + this.pdfViewer.pagesRotation = angle; + } + }; + + const setViewerModes = (scroll, spread) => { + if ((0, _ui_utils.isValidScrollMode)(scroll)) { + this.pdfViewer.scrollMode = scroll; + } + + if ((0, _ui_utils.isValidSpreadMode)(spread)) { + this.pdfViewer.spreadMode = spread; + } + }; + + this.isInitialViewSet = true; + this.pdfSidebar.setInitialView(sidebarView); + setViewerModes(scrollMode, spreadMode); + + if (this.initialBookmark) { + setRotation(this.initialRotation); + delete this.initialRotation; + this.pdfLinkService.setHash(this.initialBookmark); + this.initialBookmark = null; + } else if (storedHash) { + setRotation(rotation); + this.pdfLinkService.setHash(storedHash); + } + + this.toolbar.setPageNumber(this.pdfViewer.currentPageNumber, this.pdfViewer.currentPageLabel); + this.secondaryToolbar.setPageNumber(this.pdfViewer.currentPageNumber); + + if (!this.pdfViewer.currentScaleValue) { + this.pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + } + }, + + cleanup() { + if (!this.pdfDocument) { + return; + } + + this.pdfViewer.cleanup(); + this.pdfThumbnailViewer.cleanup(); + + if (this.pdfViewer.renderer !== _ui_utils.RendererType.SVG) { + this.pdfDocument.cleanup(); + } + }, + + forceRendering() { + this.pdfRenderingQueue.printing = this.printing; + this.pdfRenderingQueue.isThumbnailViewEnabled = this.pdfSidebar.isThumbnailViewVisible; + this.pdfRenderingQueue.renderHighestPriority(); + }, + + beforePrint() { + if (this.printService) { + return; + } + + if (!this.supportsPrinting) { + this.l10n.get("printing_not_supported", null, "Warning: Printing is not fully supported by this browser.").then(printMessage => { + this.error(printMessage); + }); + return; + } + + if (!this.pdfViewer.pageViewsReady) { + this.l10n.get("printing_not_ready", null, "Warning: The PDF is not fully loaded for printing.").then(notReadyMessage => { + window.alert(notReadyMessage); + }); + return; + } + + const pagesOverview = this.pdfViewer.getPagesOverview(); + const printContainer = this.appConfig.printContainer; + const printService = PDFPrintServiceFactory.instance.createPrintService(this.pdfDocument, pagesOverview, printContainer, this.l10n); + this.printService = printService; + this.forceRendering(); + printService.layout(); + this.externalServices.reportTelemetry({ + type: "print" + }); + }, + + afterPrint() { + if (this.printService) { + this.printService.destroy(); + this.printService = null; + } + + this.forceRendering(); + }, + + rotatePages(delta) { + if (!this.pdfDocument) { + return; + } + + const newRotation = (this.pdfViewer.pagesRotation + 360 + delta) % 360; + this.pdfViewer.pagesRotation = newRotation; + }, + + requestPresentationMode() { + if (!this.pdfPresentationMode) { + return; + } + + this.pdfPresentationMode.request(); + }, + + bindEvents() { + const { + eventBus, + _boundEvents + } = this; + _boundEvents.beforePrint = this.beforePrint.bind(this); + _boundEvents.afterPrint = this.afterPrint.bind(this); + + eventBus._on("resize", webViewerResize); + + eventBus._on("hashchange", webViewerHashchange); + + eventBus._on("beforeprint", _boundEvents.beforePrint); + + eventBus._on("afterprint", _boundEvents.afterPrint); + + eventBus._on("pagerendered", webViewerPageRendered); + + eventBus._on("updateviewarea", webViewerUpdateViewarea); + + eventBus._on("pagechanging", webViewerPageChanging); + + eventBus._on("scalechanging", webViewerScaleChanging); + + eventBus._on("rotationchanging", webViewerRotationChanging); + + eventBus._on("sidebarviewchanged", webViewerSidebarViewChanged); + + eventBus._on("pagemode", webViewerPageMode); + + eventBus._on("namedaction", webViewerNamedAction); + + eventBus._on("presentationmodechanged", webViewerPresentationModeChanged); + + eventBus._on("presentationmode", webViewerPresentationMode); + + eventBus._on("print", webViewerPrint); + + eventBus._on("download", webViewerDownload); + + eventBus._on("firstpage", webViewerFirstPage); + + eventBus._on("lastpage", webViewerLastPage); + + eventBus._on("nextpage", webViewerNextPage); + + eventBus._on("previouspage", webViewerPreviousPage); + + eventBus._on("zoomin", webViewerZoomIn); + + eventBus._on("zoomout", webViewerZoomOut); + + eventBus._on("zoomreset", webViewerZoomReset); + + eventBus._on("pagenumberchanged", webViewerPageNumberChanged); + + eventBus._on("scalechanged", webViewerScaleChanged); + + eventBus._on("rotatecw", webViewerRotateCw); + + eventBus._on("rotateccw", webViewerRotateCcw); + + eventBus._on("switchscrollmode", webViewerSwitchScrollMode); + + eventBus._on("scrollmodechanged", webViewerScrollModeChanged); + + eventBus._on("switchspreadmode", webViewerSwitchSpreadMode); + + eventBus._on("spreadmodechanged", webViewerSpreadModeChanged); + + eventBus._on("documentproperties", webViewerDocumentProperties); + + eventBus._on("find", webViewerFind); + + eventBus._on("findfromurlhash", webViewerFindFromUrlHash); + + eventBus._on("updatefindmatchescount", webViewerUpdateFindMatchesCount); + + eventBus._on("updatefindcontrolstate", webViewerUpdateFindControlState); + + eventBus._on("fileinputchange", webViewerFileInputChange); + + eventBus._on("openfile", webViewerOpenFile); + }, + + bindWindowEvents() { + const { + eventBus, + _boundEvents + } = this; + + _boundEvents.windowResize = () => { + eventBus.dispatch("resize", { + source: window + }); + }; + + _boundEvents.windowHashChange = () => { + eventBus.dispatch("hashchange", { + source: window, + hash: document.location.hash.substring(1) + }); + }; + + _boundEvents.windowBeforePrint = () => { + eventBus.dispatch("beforeprint", { + source: window + }); + }; + + _boundEvents.windowAfterPrint = () => { + eventBus.dispatch("afterprint", { + source: window + }); + }; + + window.addEventListener("visibilitychange", webViewerVisibilityChange); + window.addEventListener("wheel", webViewerWheel, { + passive: false + }); + window.addEventListener("click", webViewerClick); + window.addEventListener("keydown", webViewerKeyDown); + window.addEventListener("resize", _boundEvents.windowResize); + window.addEventListener("hashchange", _boundEvents.windowHashChange); + window.addEventListener("beforeprint", _boundEvents.windowBeforePrint); + window.addEventListener("afterprint", _boundEvents.windowAfterPrint); + }, + + unbindEvents() { + const { + eventBus, + _boundEvents + } = this; + + eventBus._off("resize", webViewerResize); + + eventBus._off("hashchange", webViewerHashchange); + + eventBus._off("beforeprint", _boundEvents.beforePrint); + + eventBus._off("afterprint", _boundEvents.afterPrint); + + eventBus._off("pagerendered", webViewerPageRendered); + + eventBus._off("updateviewarea", webViewerUpdateViewarea); + + eventBus._off("pagechanging", webViewerPageChanging); + + eventBus._off("scalechanging", webViewerScaleChanging); + + eventBus._off("rotationchanging", webViewerRotationChanging); + + eventBus._off("sidebarviewchanged", webViewerSidebarViewChanged); + + eventBus._off("pagemode", webViewerPageMode); + + eventBus._off("namedaction", webViewerNamedAction); + + eventBus._off("presentationmodechanged", webViewerPresentationModeChanged); + + eventBus._off("presentationmode", webViewerPresentationMode); + + eventBus._off("print", webViewerPrint); + + eventBus._off("download", webViewerDownload); + + eventBus._off("firstpage", webViewerFirstPage); + + eventBus._off("lastpage", webViewerLastPage); + + eventBus._off("nextpage", webViewerNextPage); + + eventBus._off("previouspage", webViewerPreviousPage); + + eventBus._off("zoomin", webViewerZoomIn); + + eventBus._off("zoomout", webViewerZoomOut); + + eventBus._off("zoomreset", webViewerZoomReset); + + eventBus._off("pagenumberchanged", webViewerPageNumberChanged); + + eventBus._off("scalechanged", webViewerScaleChanged); + + eventBus._off("rotatecw", webViewerRotateCw); + + eventBus._off("rotateccw", webViewerRotateCcw); + + eventBus._off("switchscrollmode", webViewerSwitchScrollMode); + + eventBus._off("scrollmodechanged", webViewerScrollModeChanged); + + eventBus._off("switchspreadmode", webViewerSwitchSpreadMode); + + eventBus._off("spreadmodechanged", webViewerSpreadModeChanged); + + eventBus._off("documentproperties", webViewerDocumentProperties); + + eventBus._off("find", webViewerFind); + + eventBus._off("findfromurlhash", webViewerFindFromUrlHash); + + eventBus._off("updatefindmatchescount", webViewerUpdateFindMatchesCount); + + eventBus._off("updatefindcontrolstate", webViewerUpdateFindControlState); + + eventBus._off("fileinputchange", webViewerFileInputChange); + + eventBus._off("openfile", webViewerOpenFile); + + _boundEvents.beforePrint = null; + _boundEvents.afterPrint = null; + }, + + unbindWindowEvents() { + const { + _boundEvents + } = this; + window.removeEventListener("visibilitychange", webViewerVisibilityChange); + window.removeEventListener("wheel", webViewerWheel, { + passive: false + }); + window.removeEventListener("click", webViewerClick); + window.removeEventListener("keydown", webViewerKeyDown); + window.removeEventListener("resize", _boundEvents.windowResize); + window.removeEventListener("hashchange", _boundEvents.windowHashChange); + window.removeEventListener("beforeprint", _boundEvents.windowBeforePrint); + window.removeEventListener("afterprint", _boundEvents.windowAfterPrint); + _boundEvents.windowResize = null; + _boundEvents.windowHashChange = null; + _boundEvents.windowBeforePrint = null; + _boundEvents.windowAfterPrint = null; + } + +}; +exports.PDFViewerApplication = PDFViewerApplication; +let validateFileURL; +{ + const HOSTED_VIEWER_ORIGINS = ["null", "http://mozilla.github.io", "https://mozilla.github.io"]; + + validateFileURL = function (file) { + if (file === undefined) { + return; + } + + try { + const viewerOrigin = new URL(window.location.href).origin || "null"; + + if (HOSTED_VIEWER_ORIGINS.includes(viewerOrigin)) { + return; + } + + const { + origin, + protocol + } = new URL(file, window.location.href); + + if (origin !== viewerOrigin && protocol !== "blob:") { + throw new Error("file origin does not match viewer's"); + } + } catch (ex) { + const message = ex && ex.message; + PDFViewerApplication.l10n.get("loading_error", null, "An error occurred while loading the PDF.").then(loadingErrorMessage => { + PDFViewerApplication.error(loadingErrorMessage, { + message + }); + }); + throw ex; + } + }; +} + +async function loadFakeWorker() { + if (!_pdfjsLib.GlobalWorkerOptions.workerSrc) { + _pdfjsLib.GlobalWorkerOptions.workerSrc = _app_options.AppOptions.get("workerSrc"); + } + + return (0, _pdfjsLib.loadScript)(_pdfjsLib.PDFWorker.getWorkerSrc()); +} + +function loadAndEnablePDFBug(enabledTabs) { + const appConfig = PDFViewerApplication.appConfig; + return (0, _pdfjsLib.loadScript)(appConfig.debuggerScriptPath).then(function () { + PDFBug.enable(enabledTabs); + PDFBug.init({ + OPS: _pdfjsLib.OPS + }, appConfig.mainContainer); + }); +} + +function webViewerInitialized() { + const appConfig = PDFViewerApplication.appConfig; + let file; + const queryString = document.location.search.substring(1); + const params = (0, _ui_utils.parseQueryString)(queryString); + file = "file" in params ? params.file : _app_options.AppOptions.get("defaultUrl"); + validateFileURL(file); + const fileInput = document.createElement("input"); + fileInput.id = appConfig.openFileInputName; + fileInput.className = "fileInput"; + fileInput.setAttribute("type", "file"); + fileInput.oncontextmenu = _ui_utils.noContextMenuHandler; + document.body.appendChild(fileInput); + + if (!window.File || !window.FileReader || !window.FileList || !window.Blob) { + appConfig.toolbar.openFile.setAttribute("hidden", "true"); + appConfig.secondaryToolbar.openFileButton.setAttribute("hidden", "true"); + } else { + fileInput.value = null; + } + + fileInput.addEventListener("change", function (evt) { + const files = evt.target.files; + + if (!files || files.length === 0) { + return; + } + + PDFViewerApplication.eventBus.dispatch("fileinputchange", { + source: this, + fileInput: evt.target + }); + }); + appConfig.mainContainer.addEventListener("dragover", function (evt) { + evt.preventDefault(); + evt.dataTransfer.dropEffect = "move"; + }); + appConfig.mainContainer.addEventListener("drop", function (evt) { + evt.preventDefault(); + const files = evt.dataTransfer.files; + + if (!files || files.length === 0) { + return; + } + + PDFViewerApplication.eventBus.dispatch("fileinputchange", { + source: this, + fileInput: evt.dataTransfer + }); + }); + + if (!PDFViewerApplication.supportsDocumentFonts) { + _app_options.AppOptions.set("disableFontFace", true); + + PDFViewerApplication.l10n.get("web_fonts_disabled", null, "Web fonts are disabled: unable to use embedded PDF fonts.").then(msg => { + console.warn(msg); + }); + } + + if (!PDFViewerApplication.supportsPrinting) { + appConfig.toolbar.print.classList.add("hidden"); + appConfig.secondaryToolbar.printButton.classList.add("hidden"); + } + + if (!PDFViewerApplication.supportsFullscreen) { + appConfig.toolbar.presentationModeButton.classList.add("hidden"); + appConfig.secondaryToolbar.presentationModeButton.classList.add("hidden"); + } + + if (PDFViewerApplication.supportsIntegratedFind) { + appConfig.toolbar.viewFind.classList.add("hidden"); + } + + appConfig.mainContainer.addEventListener("transitionend", function (evt) { + if (evt.target === this) { + PDFViewerApplication.eventBus.dispatch("resize", { + source: this + }); + } + }, true); + + try { + webViewerOpenFileViaURL(file); + } catch (reason) { + PDFViewerApplication.l10n.get("loading_error", null, "An error occurred while loading the PDF.").then(msg => { + PDFViewerApplication.error(msg, reason); + }); + } +} + +let webViewerOpenFileViaURL; +{ + webViewerOpenFileViaURL = function (file) { + if (file && file.lastIndexOf("file:", 0) === 0) { + PDFViewerApplication.setTitleUsingUrl(file); + const xhr = new XMLHttpRequest(); + + xhr.onload = function () { + PDFViewerApplication.open(new Uint8Array(xhr.response)); + }; + + xhr.open("GET", file); + xhr.responseType = "arraybuffer"; + xhr.send(); + return; + } + + if (file) { + PDFViewerApplication.open(file); + } + }; +} + +function webViewerResetPermissions() { + const { + appConfig + } = PDFViewerApplication; + + if (!appConfig) { + return; + } + + appConfig.viewerContainer.classList.remove(ENABLE_PERMISSIONS_CLASS); +} + +function webViewerPageRendered(evt) { + const pageNumber = evt.pageNumber; + const pageIndex = pageNumber - 1; + const pageView = PDFViewerApplication.pdfViewer.getPageView(pageIndex); + + if (pageNumber === PDFViewerApplication.page) { + PDFViewerApplication.toolbar.updateLoadingIndicatorState(false); + } + + if (!pageView) { + return; + } + + if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) { + const thumbnailView = PDFViewerApplication.pdfThumbnailViewer.getThumbnail(pageIndex); + thumbnailView.setImage(pageView); + } + + if (typeof Stats !== "undefined" && Stats.enabled && pageView.stats) { + Stats.add(pageNumber, pageView.stats); + } + + if (pageView.error) { + PDFViewerApplication.l10n.get("rendering_error", null, "An error occurred while rendering the page.").then(msg => { + PDFViewerApplication.error(msg, pageView.error); + }); + } + + PDFViewerApplication.externalServices.reportTelemetry({ + type: "pageInfo", + timestamp: evt.timestamp + }); + PDFViewerApplication.pdfDocument.getStats().then(function (stats) { + PDFViewerApplication.externalServices.reportTelemetry({ + type: "documentStats", + stats + }); + }); +} + +function webViewerPageMode({ + mode +}) { + let view; + + switch (mode) { + case "thumbs": + view = _pdf_sidebar.SidebarView.THUMBS; + break; + + case "bookmarks": + case "outline": + view = _pdf_sidebar.SidebarView.OUTLINE; + break; + + case "attachments": + view = _pdf_sidebar.SidebarView.ATTACHMENTS; + break; + + case "none": + view = _pdf_sidebar.SidebarView.NONE; + break; + + default: + console.error('Invalid "pagemode" hash parameter: ' + mode); + return; + } + + PDFViewerApplication.pdfSidebar.switchView(view, true); +} + +function webViewerNamedAction(evt) { + const action = evt.action; + + switch (action) { + case "GoToPage": + PDFViewerApplication.appConfig.toolbar.pageNumber.select(); + break; + + case "Find": + if (!PDFViewerApplication.supportsIntegratedFind) { + PDFViewerApplication.findBar.toggle(); + } + + break; + } +} + +function webViewerPresentationModeChanged({ + active, + switchInProgress +}) { + let state = _ui_utils.PresentationModeState.NORMAL; + + if (switchInProgress) { + state = _ui_utils.PresentationModeState.CHANGING; + } else if (active) { + state = _ui_utils.PresentationModeState.FULLSCREEN; + } + + PDFViewerApplication.pdfViewer.presentationModeState = state; +} + +function webViewerSidebarViewChanged(evt) { + PDFViewerApplication.pdfRenderingQueue.isThumbnailViewEnabled = PDFViewerApplication.pdfSidebar.isThumbnailViewVisible; + const store = PDFViewerApplication.store; + + if (store && PDFViewerApplication.isInitialViewSet) { + store.set("sidebarView", evt.view).catch(function () {}); + } +} + +function webViewerUpdateViewarea(evt) { + const location = evt.location, + store = PDFViewerApplication.store; + + if (store && PDFViewerApplication.isInitialViewSet) { + store.setMultiple({ + page: location.pageNumber, + zoom: location.scale, + scrollLeft: location.left, + scrollTop: location.top, + rotation: location.rotation + }).catch(function () {}); + } + + const href = PDFViewerApplication.pdfLinkService.getAnchorUrl(location.pdfOpenParams); + PDFViewerApplication.appConfig.toolbar.viewBookmark.href = href; + PDFViewerApplication.appConfig.secondaryToolbar.viewBookmarkButton.href = href; + const currentPage = PDFViewerApplication.pdfViewer.getPageView(PDFViewerApplication.page - 1); + const loading = currentPage.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED; + PDFViewerApplication.toolbar.updateLoadingIndicatorState(loading); +} + +function webViewerScrollModeChanged(evt) { + const store = PDFViewerApplication.store; + + if (store && PDFViewerApplication.isInitialViewSet) { + store.set("scrollMode", evt.mode).catch(function () {}); + } +} + +function webViewerSpreadModeChanged(evt) { + const store = PDFViewerApplication.store; + + if (store && PDFViewerApplication.isInitialViewSet) { + store.set("spreadMode", evt.mode).catch(function () {}); + } +} + +function webViewerResize() { + const { + pdfDocument, + pdfViewer + } = PDFViewerApplication; + + if (!pdfDocument) { + return; + } + + const currentScaleValue = pdfViewer.currentScaleValue; + + if (currentScaleValue === "auto" || currentScaleValue === "page-fit" || currentScaleValue === "page-width") { + pdfViewer.currentScaleValue = currentScaleValue; + } + + pdfViewer.update(); +} + +function webViewerHashchange(evt) { + const hash = evt.hash; + + if (!hash) { + return; + } + + if (!PDFViewerApplication.isInitialViewSet) { + PDFViewerApplication.initialBookmark = hash; + } else if (!PDFViewerApplication.pdfHistory.popStateInProgress) { + PDFViewerApplication.pdfLinkService.setHash(hash); + } +} + +let webViewerFileInputChange, webViewerOpenFile; +{ + webViewerFileInputChange = function (evt) { + if (PDFViewerApplication.pdfViewer && PDFViewerApplication.pdfViewer.isInPresentationMode) { + return; + } + + const file = evt.fileInput.files[0]; + + if (!_app_options.AppOptions.get("disableCreateObjectURL")) { + let url = URL.createObjectURL(file); + + if (file.name) { + url = { + url, + originalUrl: file.name + }; + } + + PDFViewerApplication.open(url); + } else { + PDFViewerApplication.setTitleUsingUrl(file.name); + const fileReader = new FileReader(); + + fileReader.onload = function webViewerChangeFileReaderOnload(event) { + const buffer = event.target.result; + PDFViewerApplication.open(new Uint8Array(buffer)); + }; + + fileReader.readAsArrayBuffer(file); + } + + const appConfig = PDFViewerApplication.appConfig; + appConfig.toolbar.viewBookmark.setAttribute("hidden", "true"); + appConfig.secondaryToolbar.viewBookmarkButton.setAttribute("hidden", "true"); + appConfig.toolbar.download.setAttribute("hidden", "true"); + appConfig.secondaryToolbar.downloadButton.setAttribute("hidden", "true"); + }; + + webViewerOpenFile = function (evt) { + const openFileInputName = PDFViewerApplication.appConfig.openFileInputName; + document.getElementById(openFileInputName).click(); + }; +} + +function webViewerPresentationMode() { + PDFViewerApplication.requestPresentationMode(); +} + +function webViewerPrint() { + window.print(); +} + +function webViewerDownload() { + PDFViewerApplication.download(); +} + +function webViewerFirstPage() { + if (PDFViewerApplication.pdfDocument) { + PDFViewerApplication.page = 1; + } +} + +function webViewerLastPage() { + if (PDFViewerApplication.pdfDocument) { + PDFViewerApplication.page = PDFViewerApplication.pagesCount; + } +} + +function webViewerNextPage() { + PDFViewerApplication.page++; +} + +function webViewerPreviousPage() { + PDFViewerApplication.page--; +} + +function webViewerZoomIn() { + PDFViewerApplication.zoomIn(); +} + +function webViewerZoomOut() { + PDFViewerApplication.zoomOut(); +} + +function webViewerZoomReset() { + PDFViewerApplication.zoomReset(); +} + +function webViewerPageNumberChanged(evt) { + const pdfViewer = PDFViewerApplication.pdfViewer; + + if (evt.value !== "") { + pdfViewer.currentPageLabel = evt.value; + } + + if (evt.value !== pdfViewer.currentPageNumber.toString() && evt.value !== pdfViewer.currentPageLabel) { + PDFViewerApplication.toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel); + } +} + +function webViewerScaleChanged(evt) { + PDFViewerApplication.pdfViewer.currentScaleValue = evt.value; +} + +function webViewerRotateCw() { + PDFViewerApplication.rotatePages(90); +} + +function webViewerRotateCcw() { + PDFViewerApplication.rotatePages(-90); +} + +function webViewerSwitchScrollMode(evt) { + PDFViewerApplication.pdfViewer.scrollMode = evt.mode; +} + +function webViewerSwitchSpreadMode(evt) { + PDFViewerApplication.pdfViewer.spreadMode = evt.mode; +} + +function webViewerDocumentProperties() { + PDFViewerApplication.pdfDocumentProperties.open(); +} + +function webViewerFind(evt) { + PDFViewerApplication.findController.executeCommand("find" + evt.type, { + query: evt.query, + phraseSearch: evt.phraseSearch, + caseSensitive: evt.caseSensitive, + entireWord: evt.entireWord, + highlightAll: evt.highlightAll, + findPrevious: evt.findPrevious + }); +} + +function webViewerFindFromUrlHash(evt) { + PDFViewerApplication.findController.executeCommand("find", { + query: evt.query, + phraseSearch: evt.phraseSearch, + caseSensitive: false, + entireWord: false, + highlightAll: true, + findPrevious: false + }); +} + +function webViewerUpdateFindMatchesCount({ + matchesCount +}) { + if (PDFViewerApplication.supportsIntegratedFind) { + PDFViewerApplication.externalServices.updateFindMatchesCount(matchesCount); + } else { + PDFViewerApplication.findBar.updateResultsCount(matchesCount); + } +} + +function webViewerUpdateFindControlState({ + state, + previous, + matchesCount +}) { + if (PDFViewerApplication.supportsIntegratedFind) { + PDFViewerApplication.externalServices.updateFindControlState({ + result: state, + findPrevious: previous, + matchesCount + }); + } else { + PDFViewerApplication.findBar.updateUIState(state, previous, matchesCount); + } +} + +function webViewerScaleChanging(evt) { + PDFViewerApplication.toolbar.setPageScale(evt.presetValue, evt.scale); + PDFViewerApplication.pdfViewer.update(); +} + +function webViewerRotationChanging(evt) { + PDFViewerApplication.pdfThumbnailViewer.pagesRotation = evt.pagesRotation; + PDFViewerApplication.forceRendering(); + PDFViewerApplication.pdfViewer.currentPageNumber = evt.pageNumber; +} + +function webViewerPageChanging(evt) { + const page = evt.pageNumber; + PDFViewerApplication.toolbar.setPageNumber(page, evt.pageLabel || null); + PDFViewerApplication.secondaryToolbar.setPageNumber(page); + + if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) { + PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(page); + } + + if (typeof Stats !== "undefined" && Stats.enabled) { + const pageView = PDFViewerApplication.pdfViewer.getPageView(page - 1); + + if (pageView && pageView.stats) { + Stats.add(page, pageView.stats); + } + } +} + +function webViewerVisibilityChange(evt) { + if (document.visibilityState === "visible") { + setZoomDisabledTimeout(); + } +} + +let zoomDisabledTimeout = null; + +function setZoomDisabledTimeout() { + if (zoomDisabledTimeout) { + clearTimeout(zoomDisabledTimeout); + } + + zoomDisabledTimeout = setTimeout(function () { + zoomDisabledTimeout = null; + }, WHEEL_ZOOM_DISABLED_TIMEOUT); +} + +function webViewerWheel(evt) { + const { + pdfViewer, + supportedMouseWheelZoomModifierKeys + } = PDFViewerApplication; + + if (pdfViewer.isInPresentationMode) { + return; + } + + if (evt.ctrlKey && supportedMouseWheelZoomModifierKeys.ctrlKey || evt.metaKey && supportedMouseWheelZoomModifierKeys.metaKey) { + evt.preventDefault(); + + if (zoomDisabledTimeout || document.visibilityState === "hidden") { + return; + } + + const previousScale = pdfViewer.currentScale; + const delta = (0, _ui_utils.normalizeWheelEventDelta)(evt); + const MOUSE_WHEEL_DELTA_PER_PAGE_SCALE = 3.0; + const ticks = delta * MOUSE_WHEEL_DELTA_PER_PAGE_SCALE; + + if (ticks < 0) { + PDFViewerApplication.zoomOut(-ticks); + } else { + PDFViewerApplication.zoomIn(ticks); + } + + const currentScale = pdfViewer.currentScale; + + if (previousScale !== currentScale) { + const scaleCorrectionFactor = currentScale / previousScale - 1; + const rect = pdfViewer.container.getBoundingClientRect(); + const dx = evt.clientX - rect.left; + const dy = evt.clientY - rect.top; + pdfViewer.container.scrollLeft += dx * scaleCorrectionFactor; + pdfViewer.container.scrollTop += dy * scaleCorrectionFactor; + } + } else { + setZoomDisabledTimeout(); + } +} + +function webViewerClick(evt) { + if (!PDFViewerApplication.secondaryToolbar.isOpen) { + return; + } + + const appConfig = PDFViewerApplication.appConfig; + + if (PDFViewerApplication.pdfViewer.containsElement(evt.target) || appConfig.toolbar.container.contains(evt.target) && evt.target !== appConfig.secondaryToolbar.toggleButton) { + PDFViewerApplication.secondaryToolbar.close(); + } +} + +function webViewerKeyDown(evt) { + if (PDFViewerApplication.overlayManager.active) { + return; + } + + let handled = false, + ensureViewerFocused = false; + const cmd = (evt.ctrlKey ? 1 : 0) | (evt.altKey ? 2 : 0) | (evt.shiftKey ? 4 : 0) | (evt.metaKey ? 8 : 0); + const pdfViewer = PDFViewerApplication.pdfViewer; + const isViewerInPresentationMode = pdfViewer && pdfViewer.isInPresentationMode; + + if (cmd === 1 || cmd === 8 || cmd === 5 || cmd === 12) { + switch (evt.keyCode) { + case 70: + if (!PDFViewerApplication.supportsIntegratedFind) { + PDFViewerApplication.findBar.open(); + handled = true; + } + + break; + + case 71: + if (!PDFViewerApplication.supportsIntegratedFind) { + const findState = PDFViewerApplication.findController.state; + + if (findState) { + PDFViewerApplication.findController.executeCommand("findagain", { + query: findState.query, + phraseSearch: findState.phraseSearch, + caseSensitive: findState.caseSensitive, + entireWord: findState.entireWord, + highlightAll: findState.highlightAll, + findPrevious: cmd === 5 || cmd === 12 + }); + } + + handled = true; + } + + break; + + case 61: + case 107: + case 187: + case 171: + if (!isViewerInPresentationMode) { + PDFViewerApplication.zoomIn(); + } + + handled = true; + break; + + case 173: + case 109: + case 189: + if (!isViewerInPresentationMode) { + PDFViewerApplication.zoomOut(); + } + + handled = true; + break; + + case 48: + case 96: + if (!isViewerInPresentationMode) { + setTimeout(function () { + PDFViewerApplication.zoomReset(); + }); + handled = false; + } + + break; + + case 38: + if (isViewerInPresentationMode || PDFViewerApplication.page > 1) { + PDFViewerApplication.page = 1; + handled = true; + ensureViewerFocused = true; + } + + break; + + case 40: + if (isViewerInPresentationMode || PDFViewerApplication.page < PDFViewerApplication.pagesCount) { + PDFViewerApplication.page = PDFViewerApplication.pagesCount; + handled = true; + ensureViewerFocused = true; + } + + break; + } + } + + const { + eventBus + } = PDFViewerApplication; + + if (cmd === 1 || cmd === 8) { + switch (evt.keyCode) { + case 83: + eventBus.dispatch("download", { + source: window + }); + handled = true; + break; + + case 79: + { + eventBus.dispatch("openfile", { + source: window + }); + handled = true; + } + break; + } + } + + if (cmd === 3 || cmd === 10) { + switch (evt.keyCode) { + case 80: + PDFViewerApplication.requestPresentationMode(); + handled = true; + break; + + case 71: + PDFViewerApplication.appConfig.toolbar.pageNumber.select(); + handled = true; + break; + } + } + + if (handled) { + if (ensureViewerFocused && !isViewerInPresentationMode) { + pdfViewer.focus(); + } + + evt.preventDefault(); + return; + } + + const curElement = document.activeElement || document.querySelector(":focus"); + const curElementTagName = curElement && curElement.tagName.toUpperCase(); + + if (curElementTagName === "INPUT" || curElementTagName === "TEXTAREA" || curElementTagName === "SELECT" || curElement && curElement.isContentEditable) { + if (evt.keyCode !== 27) { + return; + } + } + + if (cmd === 0) { + let turnPage = 0, + turnOnlyIfPageFit = false; + + switch (evt.keyCode) { + case 38: + case 33: + if (pdfViewer.isVerticalScrollbarEnabled) { + turnOnlyIfPageFit = true; + } + + turnPage = -1; + break; + + case 8: + if (!isViewerInPresentationMode) { + turnOnlyIfPageFit = true; + } + + turnPage = -1; + break; + + case 37: + if (pdfViewer.isHorizontalScrollbarEnabled) { + turnOnlyIfPageFit = true; + } + + case 75: + case 80: + turnPage = -1; + break; + + case 27: + if (PDFViewerApplication.secondaryToolbar.isOpen) { + PDFViewerApplication.secondaryToolbar.close(); + handled = true; + } + + if (!PDFViewerApplication.supportsIntegratedFind && PDFViewerApplication.findBar.opened) { + PDFViewerApplication.findBar.close(); + handled = true; + } + + break; + + case 40: + case 34: + if (pdfViewer.isVerticalScrollbarEnabled) { + turnOnlyIfPageFit = true; + } + + turnPage = 1; + break; + + case 13: + case 32: + if (!isViewerInPresentationMode) { + turnOnlyIfPageFit = true; + } + + turnPage = 1; + break; + + case 39: + if (pdfViewer.isHorizontalScrollbarEnabled) { + turnOnlyIfPageFit = true; + } + + case 74: + case 78: + turnPage = 1; + break; + + case 36: + if (isViewerInPresentationMode || PDFViewerApplication.page > 1) { + PDFViewerApplication.page = 1; + handled = true; + ensureViewerFocused = true; + } + + break; + + case 35: + if (isViewerInPresentationMode || PDFViewerApplication.page < PDFViewerApplication.pagesCount) { + PDFViewerApplication.page = PDFViewerApplication.pagesCount; + handled = true; + ensureViewerFocused = true; + } + + break; + + case 83: + PDFViewerApplication.pdfCursorTools.switchTool(_pdf_cursor_tools.CursorTool.SELECT); + break; + + case 72: + PDFViewerApplication.pdfCursorTools.switchTool(_pdf_cursor_tools.CursorTool.HAND); + break; + + case 82: + PDFViewerApplication.rotatePages(90); + break; + + case 115: + PDFViewerApplication.pdfSidebar.toggle(); + break; + } + + if (turnPage !== 0 && (!turnOnlyIfPageFit || pdfViewer.currentScaleValue === "page-fit")) { + if (turnPage > 0) { + if (PDFViewerApplication.page < PDFViewerApplication.pagesCount) { + PDFViewerApplication.page++; + } + } else { + if (PDFViewerApplication.page > 1) { + PDFViewerApplication.page--; + } + } + + handled = true; + } + } + + if (cmd === 4) { + switch (evt.keyCode) { + case 13: + case 32: + if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== "page-fit") { + break; + } + + if (PDFViewerApplication.page > 1) { + PDFViewerApplication.page--; + } + + handled = true; + break; + + case 82: + PDFViewerApplication.rotatePages(-90); + break; + } + } + + if (!handled && !isViewerInPresentationMode) { + if (evt.keyCode >= 33 && evt.keyCode <= 40 || evt.keyCode === 32 && curElementTagName !== "BUTTON") { + ensureViewerFocused = true; + } + } + + if (ensureViewerFocused && !pdfViewer.containsElement(curElement)) { + pdfViewer.focus(); + } + + if (handled) { + evt.preventDefault(); + } +} + +function apiPageLayoutToSpreadMode(layout) { + switch (layout) { + case "SinglePage": + case "OneColumn": + return _ui_utils.SpreadMode.NONE; + + case "TwoColumnLeft": + case "TwoPageLeft": + return _ui_utils.SpreadMode.ODD; + + case "TwoColumnRight": + case "TwoPageRight": + return _ui_utils.SpreadMode.EVEN; + } + + return _ui_utils.SpreadMode.NONE; +} + +function apiPageModeToSidebarView(mode) { + switch (mode) { + case "UseNone": + return _pdf_sidebar.SidebarView.NONE; + + case "UseThumbs": + return _pdf_sidebar.SidebarView.THUMBS; + + case "UseOutlines": + return _pdf_sidebar.SidebarView.OUTLINE; + + case "UseAttachments": + return _pdf_sidebar.SidebarView.ATTACHMENTS; + + case "UseOC": + } + + return _pdf_sidebar.SidebarView.NONE; +} + +const PDFPrintServiceFactory = { + instance: { + supportsPrinting: false, + + createPrintService() { + throw new Error("Not implemented: createPrintService"); + } + + } +}; +exports.PDFPrintServiceFactory = PDFPrintServiceFactory; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isValidRotation = isValidRotation; +exports.isValidScrollMode = isValidScrollMode; +exports.isValidSpreadMode = isValidSpreadMode; +exports.isPortraitOrientation = isPortraitOrientation; +exports.clamp = clamp; +exports.getPDFFileNameFromURL = getPDFFileNameFromURL; +exports.noContextMenuHandler = noContextMenuHandler; +exports.parseQueryString = parseQueryString; +exports.backtrackBeforeAllVisibleElements = backtrackBeforeAllVisibleElements; +exports.getVisibleElements = getVisibleElements; +exports.roundToDivide = roundToDivide; +exports.getPageSizeInches = getPageSizeInches; +exports.approximateFraction = approximateFraction; +exports.getOutputScale = getOutputScale; +exports.scrollIntoView = scrollIntoView; +exports.watchScroll = watchScroll; +exports.binarySearchFirstItem = binarySearchFirstItem; +exports.normalizeWheelEventDelta = normalizeWheelEventDelta; +exports.waitOnEventOrTimeout = waitOnEventOrTimeout; +exports.moveToEndOfArray = moveToEndOfArray; +exports.WaitOnType = exports.animationStarted = exports.ProgressBar = exports.EventBus = exports.NullL10n = exports.SpreadMode = exports.ScrollMode = exports.TextLayerMode = exports.RendererType = exports.PresentationModeState = exports.VERTICAL_PADDING = exports.SCROLLBAR_PADDING = exports.MAX_AUTO_SCALE = exports.UNKNOWN_SCALE = exports.MAX_SCALE = exports.MIN_SCALE = exports.DEFAULT_SCALE = exports.DEFAULT_SCALE_VALUE = exports.CSS_UNITS = exports.AutoPrintRegExp = void 0; +const CSS_UNITS = 96.0 / 72.0; +exports.CSS_UNITS = CSS_UNITS; +const DEFAULT_SCALE_VALUE = "auto"; +exports.DEFAULT_SCALE_VALUE = DEFAULT_SCALE_VALUE; +const DEFAULT_SCALE = 1.0; +exports.DEFAULT_SCALE = DEFAULT_SCALE; +const MIN_SCALE = 0.1; +exports.MIN_SCALE = MIN_SCALE; +const MAX_SCALE = 10.0; +exports.MAX_SCALE = MAX_SCALE; +const UNKNOWN_SCALE = 0; +exports.UNKNOWN_SCALE = UNKNOWN_SCALE; +const MAX_AUTO_SCALE = 1.25; +exports.MAX_AUTO_SCALE = MAX_AUTO_SCALE; +const SCROLLBAR_PADDING = 40; +exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING; +const VERTICAL_PADDING = 5; +exports.VERTICAL_PADDING = VERTICAL_PADDING; +const PresentationModeState = { + UNKNOWN: 0, + NORMAL: 1, + CHANGING: 2, + FULLSCREEN: 3 +}; +exports.PresentationModeState = PresentationModeState; +const RendererType = { + CANVAS: "canvas", + SVG: "svg" +}; +exports.RendererType = RendererType; +const TextLayerMode = { + DISABLE: 0, + ENABLE: 1, + ENABLE_ENHANCE: 2 +}; +exports.TextLayerMode = TextLayerMode; +const ScrollMode = { + UNKNOWN: -1, + VERTICAL: 0, + HORIZONTAL: 1, + WRAPPED: 2 +}; +exports.ScrollMode = ScrollMode; +const SpreadMode = { + UNKNOWN: -1, + NONE: 0, + ODD: 1, + EVEN: 2 +}; +exports.SpreadMode = SpreadMode; +const AutoPrintRegExp = /\bprint\s*\(/; +exports.AutoPrintRegExp = AutoPrintRegExp; + +function formatL10nValue(text, args) { + if (!args) { + return text; + } + + return text.replace(/\{\{\s*(\w+)\s*\}\}/g, (all, name) => { + return name in args ? args[name] : "{{" + name + "}}"; + }); +} + +const NullL10n = { + async getLanguage() { + return "en-us"; + }, + + async getDirection() { + return "ltr"; + }, + + async get(property, args, fallback) { + return formatL10nValue(fallback, args); + }, + + async translate(element) {} + +}; +exports.NullL10n = NullL10n; + +function getOutputScale(ctx) { + const devicePixelRatio = window.devicePixelRatio || 1; + const backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; + const pixelRatio = devicePixelRatio / backingStoreRatio; + return { + sx: pixelRatio, + sy: pixelRatio, + scaled: pixelRatio !== 1 + }; +} + +function scrollIntoView(element, spot, skipOverflowHiddenElements = false) { + let parent = element.offsetParent; + + if (!parent) { + console.error("offsetParent is not set -- cannot scroll"); + return; + } + + let offsetY = element.offsetTop + element.clientTop; + let offsetX = element.offsetLeft + element.clientLeft; + + while (parent.clientHeight === parent.scrollHeight && parent.clientWidth === parent.scrollWidth || skipOverflowHiddenElements && getComputedStyle(parent).overflow === "hidden") { + if (parent.dataset._scaleY) { + offsetY /= parent.dataset._scaleY; + offsetX /= parent.dataset._scaleX; + } + + offsetY += parent.offsetTop; + offsetX += parent.offsetLeft; + parent = parent.offsetParent; + + if (!parent) { + return; + } + } + + if (spot) { + if (spot.top !== undefined) { + offsetY += spot.top; + } + + if (spot.left !== undefined) { + offsetX += spot.left; + parent.scrollLeft = offsetX; + } + } + + parent.scrollTop = offsetY; +} + +function watchScroll(viewAreaElement, callback) { + const debounceScroll = function (evt) { + if (rAF) { + return; + } + + rAF = window.requestAnimationFrame(function viewAreaElementScrolled() { + rAF = null; + const currentX = viewAreaElement.scrollLeft; + const lastX = state.lastX; + + if (currentX !== lastX) { + state.right = currentX > lastX; + } + + state.lastX = currentX; + const currentY = viewAreaElement.scrollTop; + const lastY = state.lastY; + + if (currentY !== lastY) { + state.down = currentY > lastY; + } + + state.lastY = currentY; + callback(state); + }); + }; + + const state = { + right: true, + down: true, + lastX: viewAreaElement.scrollLeft, + lastY: viewAreaElement.scrollTop, + _eventHandler: debounceScroll + }; + let rAF = null; + viewAreaElement.addEventListener("scroll", debounceScroll, true); + return state; +} + +function parseQueryString(query) { + const parts = query.split("&"); + const params = Object.create(null); + + for (let i = 0, ii = parts.length; i < ii; ++i) { + const param = parts[i].split("="); + const key = param[0].toLowerCase(); + const value = param.length > 1 ? param[1] : null; + params[decodeURIComponent(key)] = decodeURIComponent(value); + } + + return params; +} + +function binarySearchFirstItem(items, condition) { + let minIndex = 0; + let maxIndex = items.length - 1; + + if (maxIndex < 0 || !condition(items[maxIndex])) { + return items.length; + } + + if (condition(items[minIndex])) { + return minIndex; + } + + while (minIndex < maxIndex) { + const currentIndex = minIndex + maxIndex >> 1; + const currentItem = items[currentIndex]; + + if (condition(currentItem)) { + maxIndex = currentIndex; + } else { + minIndex = currentIndex + 1; + } + } + + return minIndex; +} + +function approximateFraction(x) { + if (Math.floor(x) === x) { + return [x, 1]; + } + + const xinv = 1 / x; + const limit = 8; + + if (xinv > limit) { + return [1, limit]; + } else if (Math.floor(xinv) === xinv) { + return [1, xinv]; + } + + const x_ = x > 1 ? xinv : x; + let a = 0, + b = 1, + c = 1, + d = 1; + + while (true) { + const p = a + c, + q = b + d; + + if (q > limit) { + break; + } + + if (x_ <= p / q) { + c = p; + d = q; + } else { + a = p; + b = q; + } + } + + let result; + + if (x_ - a / b < c / d - x_) { + result = x_ === x ? [a, b] : [b, a]; + } else { + result = x_ === x ? [c, d] : [d, c]; + } + + return result; +} + +function roundToDivide(x, div) { + const r = x % div; + return r === 0 ? x : Math.round(x - r + div); +} + +function getPageSizeInches({ + view, + userUnit, + rotate +}) { + const [x1, y1, x2, y2] = view; + const changeOrientation = rotate % 180 !== 0; + const width = (x2 - x1) / 72 * userUnit; + const height = (y2 - y1) / 72 * userUnit; + return { + width: changeOrientation ? height : width, + height: changeOrientation ? width : height + }; +} + +function backtrackBeforeAllVisibleElements(index, views, top) { + if (index < 2) { + return index; + } + + let elt = views[index].div; + let pageTop = elt.offsetTop + elt.clientTop; + + if (pageTop >= top) { + elt = views[index - 1].div; + pageTop = elt.offsetTop + elt.clientTop; + } + + for (let i = index - 2; i >= 0; --i) { + elt = views[i].div; + + if (elt.offsetTop + elt.clientTop + elt.clientHeight <= pageTop) { + break; + } + + index = i; + } + + return index; +} + +function getVisibleElements(scrollEl, views, sortByVisibility = false, horizontal = false) { + const top = scrollEl.scrollTop, + bottom = top + scrollEl.clientHeight; + const left = scrollEl.scrollLeft, + right = left + scrollEl.clientWidth; + + function isElementBottomAfterViewTop(view) { + const element = view.div; + const elementBottom = element.offsetTop + element.clientTop + element.clientHeight; + return elementBottom > top; + } + + function isElementRightAfterViewLeft(view) { + const element = view.div; + const elementRight = element.offsetLeft + element.clientLeft + element.clientWidth; + return elementRight > left; + } + + const visible = [], + numViews = views.length; + let firstVisibleElementInd = numViews === 0 ? 0 : binarySearchFirstItem(views, horizontal ? isElementRightAfterViewLeft : isElementBottomAfterViewTop); + + if (firstVisibleElementInd > 0 && firstVisibleElementInd < numViews && !horizontal) { + firstVisibleElementInd = backtrackBeforeAllVisibleElements(firstVisibleElementInd, views, top); + } + + let lastEdge = horizontal ? right : -1; + + for (let i = firstVisibleElementInd; i < numViews; i++) { + const view = views[i], + element = view.div; + const currentWidth = element.offsetLeft + element.clientLeft; + const currentHeight = element.offsetTop + element.clientTop; + const viewWidth = element.clientWidth, + viewHeight = element.clientHeight; + const viewRight = currentWidth + viewWidth; + const viewBottom = currentHeight + viewHeight; + + if (lastEdge === -1) { + if (viewBottom >= bottom) { + lastEdge = viewBottom; + } + } else if ((horizontal ? currentWidth : currentHeight) > lastEdge) { + break; + } + + if (viewBottom <= top || currentHeight >= bottom || viewRight <= left || currentWidth >= right) { + continue; + } + + const hiddenHeight = Math.max(0, top - currentHeight) + Math.max(0, viewBottom - bottom); + const hiddenWidth = Math.max(0, left - currentWidth) + Math.max(0, viewRight - right); + const percent = (viewHeight - hiddenHeight) * (viewWidth - hiddenWidth) * 100 / viewHeight / viewWidth | 0; + visible.push({ + id: view.id, + x: currentWidth, + y: currentHeight, + view, + percent + }); + } + + const first = visible[0], + last = visible[visible.length - 1]; + + if (sortByVisibility) { + visible.sort(function (a, b) { + const pc = a.percent - b.percent; + + if (Math.abs(pc) > 0.001) { + return -pc; + } + + return a.id - b.id; + }); + } + + return { + first, + last, + views: visible + }; +} + +function noContextMenuHandler(evt) { + evt.preventDefault(); +} + +function isDataSchema(url) { + let i = 0; + const ii = url.length; + + while (i < ii && url[i].trim() === "") { + i++; + } + + return url.substring(i, i + 5).toLowerCase() === "data:"; +} + +function getPDFFileNameFromURL(url, defaultFilename = "document.pdf") { + if (typeof url !== "string") { + return defaultFilename; + } + + if (isDataSchema(url)) { + console.warn("getPDFFileNameFromURL: " + 'ignoring "data:" URL for performance reasons.'); + return defaultFilename; + } + + const reURI = /^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/; + const reFilename = /[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i; + const splitURI = reURI.exec(url); + let suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]); + + if (suggestedFilename) { + suggestedFilename = suggestedFilename[0]; + + if (suggestedFilename.includes("%")) { + try { + suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0]; + } catch (ex) {} + } + } + + return suggestedFilename || defaultFilename; +} + +function normalizeWheelEventDelta(evt) { + let delta = Math.sqrt(evt.deltaX * evt.deltaX + evt.deltaY * evt.deltaY); + const angle = Math.atan2(evt.deltaY, evt.deltaX); + + if (-0.25 * Math.PI < angle && angle < 0.75 * Math.PI) { + delta = -delta; + } + + const MOUSE_DOM_DELTA_PIXEL_MODE = 0; + const MOUSE_DOM_DELTA_LINE_MODE = 1; + const MOUSE_PIXELS_PER_LINE = 30; + const MOUSE_LINES_PER_PAGE = 30; + + if (evt.deltaMode === MOUSE_DOM_DELTA_PIXEL_MODE) { + delta /= MOUSE_PIXELS_PER_LINE * MOUSE_LINES_PER_PAGE; + } else if (evt.deltaMode === MOUSE_DOM_DELTA_LINE_MODE) { + delta /= MOUSE_LINES_PER_PAGE; + } + + return delta; +} + +function isValidRotation(angle) { + return Number.isInteger(angle) && angle % 90 === 0; +} + +function isValidScrollMode(mode) { + return Number.isInteger(mode) && Object.values(ScrollMode).includes(mode) && mode !== ScrollMode.UNKNOWN; +} + +function isValidSpreadMode(mode) { + return Number.isInteger(mode) && Object.values(SpreadMode).includes(mode) && mode !== SpreadMode.UNKNOWN; +} + +function isPortraitOrientation(size) { + return size.width <= size.height; +} + +const WaitOnType = { + EVENT: "event", + TIMEOUT: "timeout" +}; +exports.WaitOnType = WaitOnType; + +function waitOnEventOrTimeout({ + target, + name, + delay = 0 +}) { + return new Promise(function (resolve, reject) { + if (typeof target !== "object" || !(name && typeof name === "string") || !(Number.isInteger(delay) && delay >= 0)) { + throw new Error("waitOnEventOrTimeout - invalid parameters."); + } + + function handler(type) { + if (target instanceof EventBus) { + target._off(name, eventHandler); + } else { + target.removeEventListener(name, eventHandler); + } + + if (timeout) { + clearTimeout(timeout); + } + + resolve(type); + } + + const eventHandler = handler.bind(null, WaitOnType.EVENT); + + if (target instanceof EventBus) { + target._on(name, eventHandler); + } else { + target.addEventListener(name, eventHandler); + } + + const timeoutHandler = handler.bind(null, WaitOnType.TIMEOUT); + const timeout = setTimeout(timeoutHandler, delay); + }); +} + +const animationStarted = new Promise(function (resolve) { + window.requestAnimationFrame(resolve); +}); +exports.animationStarted = animationStarted; + +function dispatchDOMEvent(eventName, args = null) { + throw new Error("Not implemented: dispatchDOMEvent"); +} + +class EventBus { + constructor(options) { + this._listeners = Object.create(null); + } + + on(eventName, listener) { + this._on(eventName, listener, { + external: true + }); + } + + off(eventName, listener) { + this._off(eventName, listener, { + external: true + }); + } + + dispatch(eventName) { + const eventListeners = this._listeners[eventName]; + + if (!eventListeners || eventListeners.length === 0) { + return; + } + + const args = Array.prototype.slice.call(arguments, 1); + let externalListeners; + eventListeners.slice(0).forEach(function ({ + listener, + external + }) { + if (external) { + if (!externalListeners) { + externalListeners = []; + } + + externalListeners.push(listener); + return; + } + + listener.apply(null, args); + }); + + if (externalListeners) { + externalListeners.forEach(function (listener) { + listener.apply(null, args); + }); + externalListeners = null; + } + } + + _on(eventName, listener, options = null) { + let eventListeners = this._listeners[eventName]; + + if (!eventListeners) { + this._listeners[eventName] = eventListeners = []; + } + + eventListeners.push({ + listener, + external: (options && options.external) === true + }); + } + + _off(eventName, listener, options = null) { + const eventListeners = this._listeners[eventName]; + + if (!eventListeners) { + return; + } + + for (let i = 0, ii = eventListeners.length; i < ii; i++) { + if (eventListeners[i].listener === listener) { + eventListeners.splice(i, 1); + return; + } + } + } + +} + +exports.EventBus = EventBus; + +function clamp(v, min, max) { + return Math.min(Math.max(v, min), max); +} + +class ProgressBar { + constructor(id, { + height, + width, + units + } = {}) { + this.visible = true; + this.div = document.querySelector(id + " .progress"); + this.bar = this.div.parentNode; + this.height = height || 100; + this.width = width || 100; + this.units = units || "%"; + this.div.style.height = this.height + this.units; + this.percent = 0; + } + + _updateBar() { + if (this._indeterminate) { + this.div.classList.add("indeterminate"); + this.div.style.width = this.width + this.units; + return; + } + + this.div.classList.remove("indeterminate"); + const progressSize = this.width * this._percent / 100; + this.div.style.width = progressSize + this.units; + } + + get percent() { + return this._percent; + } + + set percent(val) { + this._indeterminate = isNaN(val); + this._percent = clamp(val, 0, 100); + + this._updateBar(); + } + + setWidth(viewer) { + if (!viewer) { + return; + } + + const container = viewer.parentNode; + const scrollbarWidth = container.offsetWidth - viewer.offsetWidth; + + if (scrollbarWidth > 0) { + this.bar.style.width = `calc(100% - ${scrollbarWidth}px)`; + } + } + + hide() { + if (!this.visible) { + return; + } + + this.visible = false; + this.bar.classList.add("hidden"); + document.body.classList.remove("loadingInProgress"); + } + + show() { + if (this.visible) { + return; + } + + this.visible = true; + document.body.classList.add("loadingInProgress"); + this.bar.classList.remove("hidden"); + } + +} + +exports.ProgressBar = ProgressBar; + +function moveToEndOfArray(arr, condition) { + const moved = [], + len = arr.length; + let write = 0; + + for (let read = 0; read < len; ++read) { + if (condition(arr[read])) { + moved.push(arr[read]); + } else { + arr[write] = arr[read]; + ++write; + } + } + + for (let read = 0; write < len; ++read, ++write) { + arr[write] = moved[read]; + } +} + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.OptionKind = exports.AppOptions = void 0; + +var _viewer_compatibility = __webpack_require__(4); + +const OptionKind = { + VIEWER: 0x02, + API: 0x04, + WORKER: 0x08, + PREFERENCE: 0x80 +}; +exports.OptionKind = OptionKind; +const defaultOptions = { + cursorToolOnLoad: { + value: 0, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + defaultUrl: { + value: "compressed.tracemonkey-pldi-09.pdf", + kind: OptionKind.VIEWER + }, + defaultZoomValue: { + value: "", + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + disableCreateObjectURL: { + value: false, + compatibility: _viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL, + kind: OptionKind.VIEWER + }, + disableHistory: { + value: false, + kind: OptionKind.VIEWER + }, + disablePageLabels: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + enablePermissions: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + enablePrintAutoRotate: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + enableWebGL: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + externalLinkRel: { + value: "noopener noreferrer nofollow", + kind: OptionKind.VIEWER + }, + externalLinkTarget: { + value: 0, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + historyUpdateUrl: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + ignoreDestinationZoom: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + imageResourcesPath: { + value: "./images/", + kind: OptionKind.VIEWER + }, + maxCanvasPixels: { + value: 16777216, + compatibility: _viewer_compatibility.viewerCompatibilityParams.maxCanvasPixels, + kind: OptionKind.VIEWER + }, + pdfBugEnabled: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + printResolution: { + value: 150, + kind: OptionKind.VIEWER + }, + renderer: { + value: "canvas", + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + renderInteractiveForms: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + sidebarViewOnLoad: { + value: -1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + scrollModeOnLoad: { + value: -1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + spreadModeOnLoad: { + value: -1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + textLayerMode: { + value: 1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + useOnlyCssZoom: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + viewOnLoad: { + value: 0, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + cMapPacked: { + value: true, + kind: OptionKind.API + }, + cMapUrl: { + value: "../plugins/pdfjs/web/cmaps/", + kind: OptionKind.API + }, + disableAutoFetch: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + disableFontFace: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + disableRange: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + disableStream: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + docBaseUrl: { + value: "", + kind: OptionKind.API + }, + fontExtraProperties: { + value: false, + kind: OptionKind.API + }, + isEvalSupported: { + value: true, + kind: OptionKind.API + }, + maxImageSize: { + value: -1, + kind: OptionKind.API + }, + pdfBug: { + value: false, + kind: OptionKind.API + }, + verbosity: { + value: 1, + kind: OptionKind.API + }, + workerPort: { + value: null, + kind: OptionKind.WORKER + }, + workerSrc: { + value: "/plugins/pdfjs/build/pdf.worker.js", + kind: OptionKind.WORKER + } +}; +{ + defaultOptions.disablePreferences = { + value: false, + kind: OptionKind.VIEWER + }; + defaultOptions.locale = { + value: typeof navigator !== "undefined" ? navigator.language : "en-US", + kind: OptionKind.VIEWER + }; +} +const userOptions = Object.create(null); + +class AppOptions { + constructor() { + throw new Error("Cannot initialize AppOptions."); + } + + static get(name) { + const userOption = userOptions[name]; + + if (userOption !== undefined) { + return userOption; + } + + const defaultOption = defaultOptions[name]; + + if (defaultOption !== undefined) { + return defaultOption.compatibility || defaultOption.value; + } + + return undefined; + } + + static getAll(kind = null) { + const options = Object.create(null); + + for (const name in defaultOptions) { + const defaultOption = defaultOptions[name]; + + if (kind) { + if ((kind & defaultOption.kind) === 0) { + continue; + } + + if (kind === OptionKind.PREFERENCE) { + const value = defaultOption.value, + valueType = typeof value; + + if (valueType === "boolean" || valueType === "string" || valueType === "number" && Number.isInteger(value)) { + options[name] = value; + continue; + } + + throw new Error(`Invalid type for preference: ${name}`); + } + } + + const userOption = userOptions[name]; + options[name] = userOption !== undefined ? userOption : defaultOption.compatibility || defaultOption.value; + } + + return options; + } + + static set(name, value) { + userOptions[name] = value; + } + + static remove(name) { + delete userOptions[name]; + } + +} + +exports.AppOptions = AppOptions; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.viewerCompatibilityParams = void 0; +const compatibilityParams = Object.create(null); +{ + const userAgent = typeof navigator !== "undefined" && navigator.userAgent || ""; + const platform = typeof navigator !== "undefined" && navigator.platform || ""; + const maxTouchPoints = typeof navigator !== "undefined" && navigator.maxTouchPoints || 1; + const isAndroid = /Android/.test(userAgent); + const isIE = /Trident/.test(userAgent); + const isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent) || platform === "MacIntel" && maxTouchPoints > 1; + const isIOSChrome = /CriOS/.test(userAgent); + + (function checkOnBlobSupport() { + if (isIE || isIOSChrome) { + compatibilityParams.disableCreateObjectURL = true; + } + })(); + + (function checkCanvasSizeLimitation() { + if (isIOS || isAndroid) { + compatibilityParams.maxCanvasPixels = 5242880; + } + })(); +} +const viewerCompatibilityParams = Object.freeze(compatibilityParams); +exports.viewerCompatibilityParams = viewerCompatibilityParams; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +let pdfjsLib; + +if (typeof window !== "undefined" && window["pdfjs/build/pdf"]) { + pdfjsLib = window["pdfjs/build/pdf"]; +} else { + pdfjsLib = require("../build/pdf.js"); +} + +module.exports = pdfjsLib; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFCursorTools = exports.CursorTool = void 0; + +var _grab_to_pan = __webpack_require__(7); + +const CursorTool = { + SELECT: 0, + HAND: 1, + ZOOM: 2 +}; +exports.CursorTool = CursorTool; + +class PDFCursorTools { + constructor({ + container, + eventBus, + cursorToolOnLoad = CursorTool.SELECT + }) { + this.container = container; + this.eventBus = eventBus; + this.active = CursorTool.SELECT; + this.activeBeforePresentationMode = null; + this.handTool = new _grab_to_pan.GrabToPan({ + element: this.container + }); + + this._addEventListeners(); + + Promise.resolve().then(() => { + this.switchTool(cursorToolOnLoad); + }); + } + + get activeTool() { + return this.active; + } + + switchTool(tool) { + if (this.activeBeforePresentationMode !== null) { + return; + } + + if (tool === this.active) { + return; + } + + const disableActiveTool = () => { + switch (this.active) { + case CursorTool.SELECT: + break; + + case CursorTool.HAND: + this.handTool.deactivate(); + break; + + case CursorTool.ZOOM: + } + }; + + switch (tool) { + case CursorTool.SELECT: + disableActiveTool(); + break; + + case CursorTool.HAND: + disableActiveTool(); + this.handTool.activate(); + break; + + case CursorTool.ZOOM: + default: + console.error(`switchTool: "${tool}" is an unsupported value.`); + return; + } + + this.active = tool; + + this._dispatchEvent(); + } + + _dispatchEvent() { + this.eventBus.dispatch("cursortoolchanged", { + source: this, + tool: this.active + }); + } + + _addEventListeners() { + this.eventBus._on("switchcursortool", evt => { + this.switchTool(evt.tool); + }); + + this.eventBus._on("presentationmodechanged", evt => { + if (evt.switchInProgress) { + return; + } + + let previouslyActive; + + if (evt.active) { + previouslyActive = this.active; + this.switchTool(CursorTool.SELECT); + this.activeBeforePresentationMode = previouslyActive; + } else { + previouslyActive = this.activeBeforePresentationMode; + this.activeBeforePresentationMode = null; + this.switchTool(previouslyActive); + } + }); + } + +} + +exports.PDFCursorTools = PDFCursorTools; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GrabToPan = GrabToPan; + +function GrabToPan(options) { + this.element = options.element; + this.document = options.element.ownerDocument; + + if (typeof options.ignoreTarget === "function") { + this.ignoreTarget = options.ignoreTarget; + } + + this.onActiveChanged = options.onActiveChanged; + this.activate = this.activate.bind(this); + this.deactivate = this.deactivate.bind(this); + this.toggle = this.toggle.bind(this); + this._onmousedown = this._onmousedown.bind(this); + this._onmousemove = this._onmousemove.bind(this); + this._endPan = this._endPan.bind(this); + const overlay = this.overlay = document.createElement("div"); + overlay.className = "grab-to-pan-grabbing"; +} + +GrabToPan.prototype = { + CSS_CLASS_GRAB: "grab-to-pan-grab", + activate: function GrabToPan_activate() { + if (!this.active) { + this.active = true; + this.element.addEventListener("mousedown", this._onmousedown, true); + this.element.classList.add(this.CSS_CLASS_GRAB); + + if (this.onActiveChanged) { + this.onActiveChanged(true); + } + } + }, + deactivate: function GrabToPan_deactivate() { + if (this.active) { + this.active = false; + this.element.removeEventListener("mousedown", this._onmousedown, true); + + this._endPan(); + + this.element.classList.remove(this.CSS_CLASS_GRAB); + + if (this.onActiveChanged) { + this.onActiveChanged(false); + } + } + }, + toggle: function GrabToPan_toggle() { + if (this.active) { + this.deactivate(); + } else { + this.activate(); + } + }, + ignoreTarget: function GrabToPan_ignoreTarget(node) { + return node[matchesSelector]("a[href], a[href] *, input, textarea, button, button *, select, option"); + }, + _onmousedown: function GrabToPan__onmousedown(event) { + if (event.button !== 0 || this.ignoreTarget(event.target)) { + return; + } + + if (event.originalTarget) { + try { + event.originalTarget.tagName; + } catch (e) { + return; + } + } + + this.scrollLeftStart = this.element.scrollLeft; + this.scrollTopStart = this.element.scrollTop; + this.clientXStart = event.clientX; + this.clientYStart = event.clientY; + this.document.addEventListener("mousemove", this._onmousemove, true); + this.document.addEventListener("mouseup", this._endPan, true); + this.element.addEventListener("scroll", this._endPan, true); + event.preventDefault(); + event.stopPropagation(); + const focusedElement = document.activeElement; + + if (focusedElement && !focusedElement.contains(event.target)) { + focusedElement.blur(); + } + }, + _onmousemove: function GrabToPan__onmousemove(event) { + this.element.removeEventListener("scroll", this._endPan, true); + + if (isLeftMouseReleased(event)) { + this._endPan(); + + return; + } + + const xDiff = event.clientX - this.clientXStart; + const yDiff = event.clientY - this.clientYStart; + const scrollTop = this.scrollTopStart - yDiff; + const scrollLeft = this.scrollLeftStart - xDiff; + + if (this.element.scrollTo) { + this.element.scrollTo({ + top: scrollTop, + left: scrollLeft, + behavior: "instant" + }); + } else { + this.element.scrollTop = scrollTop; + this.element.scrollLeft = scrollLeft; + } + + if (!this.overlay.parentNode) { + document.body.appendChild(this.overlay); + } + }, + _endPan: function GrabToPan__endPan() { + this.element.removeEventListener("scroll", this._endPan, true); + this.document.removeEventListener("mousemove", this._onmousemove, true); + this.document.removeEventListener("mouseup", this._endPan, true); + this.overlay.remove(); + } +}; +let matchesSelector; +["webkitM", "mozM", "msM", "oM", "m"].some(function (prefix) { + let name = prefix + "atches"; + + if (name in document.documentElement) { + matchesSelector = name; + } + + name += "Selector"; + + if (name in document.documentElement) { + matchesSelector = name; + } + + return matchesSelector; +}); +const isNotIEorIsIE10plus = !document.documentMode || document.documentMode > 9; +const chrome = window.chrome; +const isChrome15OrOpera15plus = chrome && (chrome.webstore || chrome.app); +const isSafari6plus = /Apple/.test(navigator.vendor) && /Version\/([6-9]\d*|[1-5]\d+)/.test(navigator.userAgent); + +function isLeftMouseReleased(event) { + if ("buttons" in event && isNotIEorIsIE10plus) { + return !(event.buttons & 1); + } + + if (isChrome15OrOpera15plus || isSafari6plus) { + return event.which === 0; + } + + return false; +} + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFRenderingQueue = exports.RenderingStates = void 0; +const CLEANUP_TIMEOUT = 30000; +const RenderingStates = { + INITIAL: 0, + RUNNING: 1, + PAUSED: 2, + FINISHED: 3 +}; +exports.RenderingStates = RenderingStates; + +class PDFRenderingQueue { + constructor() { + this.pdfViewer = null; + this.pdfThumbnailViewer = null; + this.onIdle = null; + this.highestPriorityPage = null; + this.idleTimeout = null; + this.printing = false; + this.isThumbnailViewEnabled = false; + } + + setViewer(pdfViewer) { + this.pdfViewer = pdfViewer; + } + + setThumbnailViewer(pdfThumbnailViewer) { + this.pdfThumbnailViewer = pdfThumbnailViewer; + } + + isHighestPriority(view) { + return this.highestPriorityPage === view.renderingId; + } + + renderHighestPriority(currentlyVisiblePages) { + if (this.idleTimeout) { + clearTimeout(this.idleTimeout); + this.idleTimeout = null; + } + + if (this.pdfViewer.forceRendering(currentlyVisiblePages)) { + return; + } + + if (this.pdfThumbnailViewer && this.isThumbnailViewEnabled) { + if (this.pdfThumbnailViewer.forceRendering()) { + return; + } + } + + if (this.printing) { + return; + } + + if (this.onIdle) { + this.idleTimeout = setTimeout(this.onIdle.bind(this), CLEANUP_TIMEOUT); + } + } + + getHighestPriority(visible, views, scrolledDown) { + const visibleViews = visible.views; + const numVisible = visibleViews.length; + + if (numVisible === 0) { + return null; + } + + for (let i = 0; i < numVisible; ++i) { + const view = visibleViews[i].view; + + if (!this.isViewFinished(view)) { + return view; + } + } + + if (scrolledDown) { + const nextPageIndex = visible.last.id; + + if (views[nextPageIndex] && !this.isViewFinished(views[nextPageIndex])) { + return views[nextPageIndex]; + } + } else { + const previousPageIndex = visible.first.id - 2; + + if (views[previousPageIndex] && !this.isViewFinished(views[previousPageIndex])) { + return views[previousPageIndex]; + } + } + + return null; + } + + isViewFinished(view) { + return view.renderingState === RenderingStates.FINISHED; + } + + renderView(view) { + switch (view.renderingState) { + case RenderingStates.FINISHED: + return false; + + case RenderingStates.PAUSED: + this.highestPriorityPage = view.renderingId; + view.resume(); + break; + + case RenderingStates.RUNNING: + this.highestPriorityPage = view.renderingId; + break; + + case RenderingStates.INITIAL: + this.highestPriorityPage = view.renderingId; + view.draw().finally(() => { + this.renderHighestPriority(); + }).catch(reason => { + console.error(`renderView: "${reason}"`); + }); + break; + } + + return true; + } + +} + +exports.PDFRenderingQueue = PDFRenderingQueue; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFSidebar = exports.SidebarView = void 0; + +var _ui_utils = __webpack_require__(2); + +var _pdf_rendering_queue = __webpack_require__(8); + +const UI_NOTIFICATION_CLASS = "pdfSidebarNotification"; +const SidebarView = { + UNKNOWN: -1, + NONE: 0, + THUMBS: 1, + OUTLINE: 2, + ATTACHMENTS: 3, + LAYERS: 4 +}; +exports.SidebarView = SidebarView; + +class PDFSidebar { + constructor({ + elements, + pdfViewer, + pdfThumbnailViewer, + eventBus, + l10n = _ui_utils.NullL10n, + disableNotification = false + }) { + this.isOpen = false; + this.active = SidebarView.THUMBS; + this.isInitialViewSet = false; + this.onToggled = null; + this.pdfViewer = pdfViewer; + this.pdfThumbnailViewer = pdfThumbnailViewer; + this.outerContainer = elements.outerContainer; + this.viewerContainer = elements.viewerContainer; + this.toggleButton = elements.toggleButton; + this.thumbnailButton = elements.thumbnailButton; + this.outlineButton = elements.outlineButton; + this.attachmentsButton = elements.attachmentsButton; + this.thumbnailView = elements.thumbnailView; + this.outlineView = elements.outlineView; + this.attachmentsView = elements.attachmentsView; + this.eventBus = eventBus; + this.l10n = l10n; + this._disableNotification = disableNotification; + + this._addEventListeners(); + } + + reset() { + this.isInitialViewSet = false; + + this._hideUINotification(null); + + this.switchView(SidebarView.THUMBS); + this.outlineButton.disabled = false; + this.attachmentsButton.disabled = false; + } + + get visibleView() { + return this.isOpen ? this.active : SidebarView.NONE; + } + + get isThumbnailViewVisible() { + return this.isOpen && this.active === SidebarView.THUMBS; + } + + get isOutlineViewVisible() { + return this.isOpen && this.active === SidebarView.OUTLINE; + } + + get isAttachmentsViewVisible() { + return this.isOpen && this.active === SidebarView.ATTACHMENTS; + } + + setInitialView(view = SidebarView.NONE) { + if (this.isInitialViewSet) { + return; + } + + this.isInitialViewSet = true; + + if (view === SidebarView.NONE || view === SidebarView.UNKNOWN) { + this._dispatchEvent(); + + return; + } + + if (!this._switchView(view, true)) { + this._dispatchEvent(); + } + } + + switchView(view, forceOpen = false) { + this._switchView(view, forceOpen); + } + + _switchView(view, forceOpen = false) { + const isViewChanged = view !== this.active; + let shouldForceRendering = false; + + switch (view) { + case SidebarView.NONE: + if (this.isOpen) { + this.close(); + return true; + } + + return false; + + case SidebarView.THUMBS: + if (this.isOpen && isViewChanged) { + shouldForceRendering = true; + } + + break; + + case SidebarView.OUTLINE: + if (this.outlineButton.disabled) { + return false; + } + + break; + + case SidebarView.ATTACHMENTS: + if (this.attachmentsButton.disabled) { + return false; + } + + break; + + default: + console.error(`PDFSidebar._switchView: "${view}" is not a valid view.`); + return false; + } + + this.active = view; + this.thumbnailButton.classList.toggle("toggled", view === SidebarView.THUMBS); + this.outlineButton.classList.toggle("toggled", view === SidebarView.OUTLINE); + this.attachmentsButton.classList.toggle("toggled", view === SidebarView.ATTACHMENTS); + this.thumbnailView.classList.toggle("hidden", view !== SidebarView.THUMBS); + this.outlineView.classList.toggle("hidden", view !== SidebarView.OUTLINE); + this.attachmentsView.classList.toggle("hidden", view !== SidebarView.ATTACHMENTS); + + if (forceOpen && !this.isOpen) { + this.open(); + return true; + } + + if (shouldForceRendering) { + this._updateThumbnailViewer(); + + this._forceRendering(); + } + + if (isViewChanged) { + this._dispatchEvent(); + } + + this._hideUINotification(this.active); + + return isViewChanged; + } + + open() { + if (this.isOpen) { + return; + } + + this.isOpen = true; + this.toggleButton.classList.add("toggled"); + this.outerContainer.classList.add("sidebarMoving", "sidebarOpen"); + + if (this.active === SidebarView.THUMBS) { + this._updateThumbnailViewer(); + } + + this._forceRendering(); + + this._dispatchEvent(); + + this._hideUINotification(this.active); + } + + close() { + if (!this.isOpen) { + return; + } + + this.isOpen = false; + this.toggleButton.classList.remove("toggled"); + this.outerContainer.classList.add("sidebarMoving"); + this.outerContainer.classList.remove("sidebarOpen"); + + this._forceRendering(); + + this._dispatchEvent(); + } + + toggle() { + if (this.isOpen) { + this.close(); + } else { + this.open(); + } + } + + _dispatchEvent() { + this.eventBus.dispatch("sidebarviewchanged", { + source: this, + view: this.visibleView + }); + } + + _forceRendering() { + if (this.onToggled) { + this.onToggled(); + } else { + this.pdfViewer.forceRendering(); + this.pdfThumbnailViewer.forceRendering(); + } + } + + _updateThumbnailViewer() { + const { + pdfViewer, + pdfThumbnailViewer + } = this; + const pagesCount = pdfViewer.pagesCount; + + for (let pageIndex = 0; pageIndex < pagesCount; pageIndex++) { + const pageView = pdfViewer.getPageView(pageIndex); + + if (pageView && pageView.renderingState === _pdf_rendering_queue.RenderingStates.FINISHED) { + const thumbnailView = pdfThumbnailViewer.getThumbnail(pageIndex); + thumbnailView.setImage(pageView); + } + } + + pdfThumbnailViewer.scrollThumbnailIntoView(pdfViewer.currentPageNumber); + } + + _showUINotification(view) { + if (this._disableNotification) { + return; + } + + this.l10n.get("toggle_sidebar_notification.title", null, "Toggle Sidebar (document contains outline/attachments)").then(msg => { + this.toggleButton.title = msg; + }); + + if (!this.isOpen) { + this.toggleButton.classList.add(UI_NOTIFICATION_CLASS); + } else if (view === this.active) { + return; + } + + switch (view) { + case SidebarView.OUTLINE: + this.outlineButton.classList.add(UI_NOTIFICATION_CLASS); + break; + + case SidebarView.ATTACHMENTS: + this.attachmentsButton.classList.add(UI_NOTIFICATION_CLASS); + break; + } + } + + _hideUINotification(view) { + if (this._disableNotification) { + return; + } + + const removeNotification = sidebarView => { + switch (sidebarView) { + case SidebarView.OUTLINE: + this.outlineButton.classList.remove(UI_NOTIFICATION_CLASS); + break; + + case SidebarView.ATTACHMENTS: + this.attachmentsButton.classList.remove(UI_NOTIFICATION_CLASS); + break; + } + }; + + if (!this.isOpen && view !== null) { + return; + } + + this.toggleButton.classList.remove(UI_NOTIFICATION_CLASS); + + if (view !== null) { + removeNotification(view); + return; + } + + for (view in SidebarView) { + removeNotification(SidebarView[view]); + } + + this.l10n.get("toggle_sidebar.title", null, "Toggle Sidebar").then(msg => { + this.toggleButton.title = msg; + }); + } + + _addEventListeners() { + this.viewerContainer.addEventListener("transitionend", evt => { + if (evt.target === this.viewerContainer) { + this.outerContainer.classList.remove("sidebarMoving"); + } + }); + this.toggleButton.addEventListener("click", () => { + this.toggle(); + }); + this.thumbnailButton.addEventListener("click", () => { + this.switchView(SidebarView.THUMBS); + }); + this.outlineButton.addEventListener("click", () => { + this.switchView(SidebarView.OUTLINE); + }); + this.outlineButton.addEventListener("dblclick", () => { + this.eventBus.dispatch("toggleoutlinetree", { + source: this + }); + }); + this.attachmentsButton.addEventListener("click", () => { + this.switchView(SidebarView.ATTACHMENTS); + }); + + this.eventBus._on("outlineloaded", evt => { + const outlineCount = evt.outlineCount; + this.outlineButton.disabled = !outlineCount; + + if (outlineCount) { + this._showUINotification(SidebarView.OUTLINE); + } else if (this.active === SidebarView.OUTLINE) { + this.switchView(SidebarView.THUMBS); + } + }); + + this.eventBus._on("attachmentsloaded", evt => { + if (evt.attachmentsCount) { + this.attachmentsButton.disabled = false; + + this._showUINotification(SidebarView.ATTACHMENTS); + + return; + } + + Promise.resolve().then(() => { + if (this.attachmentsView.hasChildNodes()) { + return; + } + + this.attachmentsButton.disabled = true; + + if (this.active === SidebarView.ATTACHMENTS) { + this.switchView(SidebarView.THUMBS); + } + }); + }); + + this.eventBus._on("presentationmodechanged", evt => { + if (!evt.active && !evt.switchInProgress && this.isThumbnailViewVisible) { + this._updateThumbnailViewer(); + } + }); + } + +} + +exports.PDFSidebar = PDFSidebar; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.OverlayManager = void 0; + +class OverlayManager { + constructor() { + this._overlays = {}; + this._active = null; + this._keyDownBound = this._keyDown.bind(this); + } + + get active() { + return this._active; + } + + async register(name, element, callerCloseMethod = null, canForceClose = false) { + let container; + + if (!name || !element || !(container = element.parentNode)) { + throw new Error("Not enough parameters."); + } else if (this._overlays[name]) { + throw new Error("The overlay is already registered."); + } + + this._overlays[name] = { + element, + container, + callerCloseMethod, + canForceClose + }; + } + + async unregister(name) { + if (!this._overlays[name]) { + throw new Error("The overlay does not exist."); + } else if (this._active === name) { + throw new Error("The overlay cannot be removed while it is active."); + } + + delete this._overlays[name]; + } + + async open(name) { + if (!this._overlays[name]) { + throw new Error("The overlay does not exist."); + } else if (this._active) { + if (this._overlays[name].canForceClose) { + this._closeThroughCaller(); + } else if (this._active === name) { + throw new Error("The overlay is already active."); + } else { + throw new Error("Another overlay is currently active."); + } + } + + this._active = name; + + this._overlays[this._active].element.classList.remove("hidden"); + + this._overlays[this._active].container.classList.remove("hidden"); + + window.addEventListener("keydown", this._keyDownBound); + } + + async close(name) { + if (!this._overlays[name]) { + throw new Error("The overlay does not exist."); + } else if (!this._active) { + throw new Error("The overlay is currently not active."); + } else if (this._active !== name) { + throw new Error("Another overlay is currently active."); + } + + this._overlays[this._active].container.classList.add("hidden"); + + this._overlays[this._active].element.classList.add("hidden"); + + this._active = null; + window.removeEventListener("keydown", this._keyDownBound); + } + + _keyDown(evt) { + if (this._active && evt.keyCode === 27) { + this._closeThroughCaller(); + + evt.preventDefault(); + } + } + + _closeThroughCaller() { + if (this._overlays[this._active].callerCloseMethod) { + this._overlays[this._active].callerCloseMethod(); + } + + if (this._active) { + this.close(this._active); + } + } + +} + +exports.OverlayManager = OverlayManager; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PasswordPrompt = void 0; + +var _ui_utils = __webpack_require__(2); + +var _pdfjsLib = __webpack_require__(5); + +class PasswordPrompt { + constructor(options, overlayManager, l10n = _ui_utils.NullL10n) { + this.overlayName = options.overlayName; + this.container = options.container; + this.label = options.label; + this.input = options.input; + this.submitButton = options.submitButton; + this.cancelButton = options.cancelButton; + this.overlayManager = overlayManager; + this.l10n = l10n; + this.updateCallback = null; + this.reason = null; + this.submitButton.addEventListener("click", this.verify.bind(this)); + this.cancelButton.addEventListener("click", this.close.bind(this)); + this.input.addEventListener("keydown", e => { + if (e.keyCode === 13) { + this.verify(); + } + }); + this.overlayManager.register(this.overlayName, this.container, this.close.bind(this), true); + } + + open() { + this.overlayManager.open(this.overlayName).then(() => { + this.input.focus(); + let promptString; + + if (this.reason === _pdfjsLib.PasswordResponses.INCORRECT_PASSWORD) { + promptString = this.l10n.get("password_invalid", null, "Invalid password. Please try again."); + } else { + promptString = this.l10n.get("password_label", null, "Enter the password to open this PDF file."); + } + + promptString.then(msg => { + this.label.textContent = msg; + }); + }); + } + + close() { + this.overlayManager.close(this.overlayName).then(() => { + this.input.value = ""; + }); + } + + verify() { + const password = this.input.value; + + if (password && password.length > 0) { + this.close(); + this.updateCallback(password); + } + } + + setUpdateCallback(updateCallback, reason) { + this.updateCallback = updateCallback; + this.reason = reason; + } + +} + +exports.PasswordPrompt = PasswordPrompt; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFAttachmentViewer = void 0; + +var _pdfjsLib = __webpack_require__(5); + +class PDFAttachmentViewer { + constructor({ + container, + eventBus, + downloadManager + }) { + this.container = container; + this.eventBus = eventBus; + this.downloadManager = downloadManager; + this.reset(); + + this.eventBus._on("fileattachmentannotation", this._appendAttachment.bind(this)); + } + + reset(keepRenderedCapability = false) { + this.attachments = null; + this.container.textContent = ""; + + if (!keepRenderedCapability) { + this._renderedCapability = (0, _pdfjsLib.createPromiseCapability)(); + } + } + + _dispatchEvent(attachmentsCount) { + this._renderedCapability.resolve(); + + this.eventBus.dispatch("attachmentsloaded", { + source: this, + attachmentsCount + }); + } + + _bindPdfLink(button, content, filename) { + let blobUrl; + + button.onclick = () => { + if (!blobUrl) { + blobUrl = URL.createObjectURL(new Blob([content], { + type: "application/pdf" + })); + } + + let viewerUrl; + viewerUrl = "?file=" + encodeURIComponent(blobUrl + "#" + filename); + + try { + window.open(viewerUrl); + } catch (ex) { + console.error(`_bindPdfLink: ${ex}`); + URL.revokeObjectURL(blobUrl); + blobUrl = null; + this.downloadManager.downloadData(content, filename, "application/pdf"); + } + + return false; + }; + } + + _bindLink(button, content, filename) { + button.onclick = () => { + this.downloadManager.downloadData(content, filename, ""); + return false; + }; + } + + render({ + attachments, + keepRenderedCapability = false + }) { + let attachmentsCount = 0; + + if (this.attachments) { + this.reset(keepRenderedCapability === true); + } + + this.attachments = attachments || null; + + if (!attachments) { + this._dispatchEvent(attachmentsCount); + + return; + } + + const names = Object.keys(attachments).sort(function (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()); + }); + attachmentsCount = names.length; + + for (let i = 0; i < attachmentsCount; i++) { + const item = attachments[names[i]]; + const filename = (0, _pdfjsLib.removeNullCharacters)((0, _pdfjsLib.getFilenameFromUrl)(item.filename)); + const div = document.createElement("div"); + div.className = "attachmentsItem"; + const button = document.createElement("button"); + button.textContent = filename; + + if (/\.pdf$/i.test(filename) && !this.downloadManager.disableCreateObjectURL) { + this._bindPdfLink(button, item.content, filename); + } else { + this._bindLink(button, item.content, filename); + } + + div.appendChild(button); + this.container.appendChild(div); + } + + this._dispatchEvent(attachmentsCount); + } + + _appendAttachment({ + id, + filename, + content + }) { + this._renderedCapability.promise.then(() => { + let attachments = this.attachments; + + if (!attachments) { + attachments = Object.create(null); + } else { + for (const name in attachments) { + if (id === name) { + return; + } + } + } + + attachments[id] = { + filename, + content + }; + this.render({ + attachments, + keepRenderedCapability: true + }); + }); + } + +} + +exports.PDFAttachmentViewer = PDFAttachmentViewer; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFDocumentProperties = void 0; + +var _pdfjsLib = __webpack_require__(5); + +var _ui_utils = __webpack_require__(2); + +const DEFAULT_FIELD_CONTENT = "-"; +const NON_METRIC_LOCALES = ["en-us", "en-lr", "my"]; +const US_PAGE_NAMES = { + "8.5x11": "Letter", + "8.5x14": "Legal" +}; +const METRIC_PAGE_NAMES = { + "297x420": "A3", + "210x297": "A4" +}; + +function getPageName(size, isPortrait, pageNames) { + const width = isPortrait ? size.width : size.height; + const height = isPortrait ? size.height : size.width; + return pageNames[`${width}x${height}`]; +} + +class PDFDocumentProperties { + constructor({ + overlayName, + fields, + container, + closeButton + }, overlayManager, eventBus, l10n = _ui_utils.NullL10n) { + this.overlayName = overlayName; + this.fields = fields; + this.container = container; + this.overlayManager = overlayManager; + this.l10n = l10n; + + this._reset(); + + closeButton.addEventListener("click", this.close.bind(this)); + this.overlayManager.register(this.overlayName, this.container, this.close.bind(this)); + + eventBus._on("pagechanging", evt => { + this._currentPageNumber = evt.pageNumber; + }); + + eventBus._on("rotationchanging", evt => { + this._pagesRotation = evt.pagesRotation; + }); + + this._isNonMetricLocale = true; + l10n.getLanguage().then(locale => { + this._isNonMetricLocale = NON_METRIC_LOCALES.includes(locale); + }); + } + + open() { + const freezeFieldData = data => { + Object.defineProperty(this, "fieldData", { + value: Object.freeze(data), + writable: false, + enumerable: true, + configurable: true + }); + }; + + Promise.all([this.overlayManager.open(this.overlayName), this._dataAvailableCapability.promise]).then(() => { + const currentPageNumber = this._currentPageNumber; + const pagesRotation = this._pagesRotation; + + if (this.fieldData && currentPageNumber === this.fieldData._currentPageNumber && pagesRotation === this.fieldData._pagesRotation) { + this._updateUI(); + + return; + } + + this.pdfDocument.getMetadata().then(({ + info, + metadata, + contentDispositionFilename + }) => { + return Promise.all([info, metadata, contentDispositionFilename || (0, _ui_utils.getPDFFileNameFromURL)(this.url), this._parseFileSize(this.maybeFileSize), this._parseDate(info.CreationDate), this._parseDate(info.ModDate), this.pdfDocument.getPage(currentPageNumber).then(pdfPage => { + return this._parsePageSize((0, _ui_utils.getPageSizeInches)(pdfPage), pagesRotation); + }), this._parseLinearization(info.IsLinearized)]); + }).then(([info, metadata, fileName, fileSize, creationDate, modDate, pageSize, isLinearized]) => { + freezeFieldData({ + fileName, + fileSize, + title: info.Title, + author: info.Author, + subject: info.Subject, + keywords: info.Keywords, + creationDate, + modificationDate: modDate, + creator: info.Creator, + producer: info.Producer, + version: info.PDFFormatVersion, + pageCount: this.pdfDocument.numPages, + pageSize, + linearized: isLinearized, + _currentPageNumber: currentPageNumber, + _pagesRotation: pagesRotation + }); + + this._updateUI(); + + return this.pdfDocument.getDownloadInfo(); + }).then(({ + length + }) => { + this.maybeFileSize = length; + return this._parseFileSize(length); + }).then(fileSize => { + if (fileSize === this.fieldData.fileSize) { + return; + } + + const data = Object.assign(Object.create(null), this.fieldData); + data.fileSize = fileSize; + freezeFieldData(data); + + this._updateUI(); + }); + }); + } + + close() { + this.overlayManager.close(this.overlayName); + } + + setDocument(pdfDocument, url = null) { + if (this.pdfDocument) { + this._reset(); + + this._updateUI(true); + } + + if (!pdfDocument) { + return; + } + + this.pdfDocument = pdfDocument; + this.url = url; + + this._dataAvailableCapability.resolve(); + } + + setFileSize(fileSize) { + if (Number.isInteger(fileSize) && fileSize > 0) { + this.maybeFileSize = fileSize; + } + } + + _reset() { + this.pdfDocument = null; + this.url = null; + this.maybeFileSize = 0; + delete this.fieldData; + this._dataAvailableCapability = (0, _pdfjsLib.createPromiseCapability)(); + this._currentPageNumber = 1; + this._pagesRotation = 0; + } + + _updateUI(reset = false) { + if (reset || !this.fieldData) { + for (const id in this.fields) { + this.fields[id].textContent = DEFAULT_FIELD_CONTENT; + } + + return; + } + + if (this.overlayManager.active !== this.overlayName) { + return; + } + + for (const id in this.fields) { + const content = this.fieldData[id]; + this.fields[id].textContent = content || content === 0 ? content : DEFAULT_FIELD_CONTENT; + } + } + + async _parseFileSize(fileSize = 0) { + const kb = fileSize / 1024; + + if (!kb) { + return undefined; + } else if (kb < 1024) { + return this.l10n.get("document_properties_kb", { + size_kb: (+kb.toPrecision(3)).toLocaleString(), + size_b: fileSize.toLocaleString() + }, "{{size_kb}} KB ({{size_b}} bytes)"); + } + + return this.l10n.get("document_properties_mb", { + size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(), + size_b: fileSize.toLocaleString() + }, "{{size_mb}} MB ({{size_b}} bytes)"); + } + + async _parsePageSize(pageSizeInches, pagesRotation) { + if (!pageSizeInches) { + return undefined; + } + + if (pagesRotation % 180 !== 0) { + pageSizeInches = { + width: pageSizeInches.height, + height: pageSizeInches.width + }; + } + + const isPortrait = (0, _ui_utils.isPortraitOrientation)(pageSizeInches); + let sizeInches = { + width: Math.round(pageSizeInches.width * 100) / 100, + height: Math.round(pageSizeInches.height * 100) / 100 + }; + let sizeMillimeters = { + width: Math.round(pageSizeInches.width * 25.4 * 10) / 10, + height: Math.round(pageSizeInches.height * 25.4 * 10) / 10 + }; + let pageName = null; + let rawName = getPageName(sizeInches, isPortrait, US_PAGE_NAMES) || getPageName(sizeMillimeters, isPortrait, METRIC_PAGE_NAMES); + + if (!rawName && !(Number.isInteger(sizeMillimeters.width) && Number.isInteger(sizeMillimeters.height))) { + const exactMillimeters = { + width: pageSizeInches.width * 25.4, + height: pageSizeInches.height * 25.4 + }; + const intMillimeters = { + width: Math.round(sizeMillimeters.width), + height: Math.round(sizeMillimeters.height) + }; + + if (Math.abs(exactMillimeters.width - intMillimeters.width) < 0.1 && Math.abs(exactMillimeters.height - intMillimeters.height) < 0.1) { + rawName = getPageName(intMillimeters, isPortrait, METRIC_PAGE_NAMES); + + if (rawName) { + sizeInches = { + width: Math.round(intMillimeters.width / 25.4 * 100) / 100, + height: Math.round(intMillimeters.height / 25.4 * 100) / 100 + }; + sizeMillimeters = intMillimeters; + } + } + } + + if (rawName) { + pageName = this.l10n.get("document_properties_page_size_name_" + rawName.toLowerCase(), null, rawName); + } + + return Promise.all([this._isNonMetricLocale ? sizeInches : sizeMillimeters, this.l10n.get("document_properties_page_size_unit_" + (this._isNonMetricLocale ? "inches" : "millimeters"), null, this._isNonMetricLocale ? "in" : "mm"), pageName, this.l10n.get("document_properties_page_size_orientation_" + (isPortrait ? "portrait" : "landscape"), null, isPortrait ? "portrait" : "landscape")]).then(([{ + width, + height + }, unit, name, orientation]) => { + return this.l10n.get("document_properties_page_size_dimension_" + (name ? "name_" : "") + "string", { + width: width.toLocaleString(), + height: height.toLocaleString(), + unit, + name, + orientation + }, "{{width}} × {{height}} {{unit}} (" + (name ? "{{name}}, " : "") + "{{orientation}})"); + }); + } + + async _parseDate(inputDate) { + const dateObject = _pdfjsLib.PDFDateString.toDateObject(inputDate); + + if (!dateObject) { + return undefined; + } + + return this.l10n.get("document_properties_date_string", { + date: dateObject.toLocaleDateString(), + time: dateObject.toLocaleTimeString() + }, "{{date}}, {{time}}"); + } + + _parseLinearization(isLinearized) { + return this.l10n.get("document_properties_linearized_" + (isLinearized ? "yes" : "no"), null, isLinearized ? "Yes" : "No"); + } + +} + +exports.PDFDocumentProperties = PDFDocumentProperties; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFFindBar = void 0; + +var _pdf_find_controller = __webpack_require__(15); + +var _ui_utils = __webpack_require__(2); + +const MATCHES_COUNT_LIMIT = 1000; + +class PDFFindBar { + constructor(options, eventBus, l10n = _ui_utils.NullL10n) { + this.opened = false; + this.bar = options.bar || null; + this.toggleButton = options.toggleButton || null; + this.findField = options.findField || null; + this.highlightAll = options.highlightAllCheckbox || null; + this.caseSensitive = options.caseSensitiveCheckbox || null; + this.entireWord = options.entireWordCheckbox || null; + this.findMsg = options.findMsg || null; + this.findResultsCount = options.findResultsCount || null; + this.findPreviousButton = options.findPreviousButton || null; + this.findNextButton = options.findNextButton || null; + this.eventBus = eventBus; + this.l10n = l10n; + this.toggleButton.addEventListener("click", () => { + this.toggle(); + }); + this.findField.addEventListener("input", () => { + this.dispatchEvent(""); + }); + this.bar.addEventListener("keydown", e => { + switch (e.keyCode) { + case 13: + if (e.target === this.findField) { + this.dispatchEvent("again", e.shiftKey); + } + + break; + + case 27: + this.close(); + break; + } + }); + this.findPreviousButton.addEventListener("click", () => { + this.dispatchEvent("again", true); + }); + this.findNextButton.addEventListener("click", () => { + this.dispatchEvent("again", false); + }); + this.highlightAll.addEventListener("click", () => { + this.dispatchEvent("highlightallchange"); + }); + this.caseSensitive.addEventListener("click", () => { + this.dispatchEvent("casesensitivitychange"); + }); + this.entireWord.addEventListener("click", () => { + this.dispatchEvent("entirewordchange"); + }); + + this.eventBus._on("resize", this._adjustWidth.bind(this)); + } + + reset() { + this.updateUIState(); + } + + dispatchEvent(type, findPrev) { + this.eventBus.dispatch("find", { + source: this, + type, + query: this.findField.value, + phraseSearch: true, + caseSensitive: this.caseSensitive.checked, + entireWord: this.entireWord.checked, + highlightAll: this.highlightAll.checked, + findPrevious: findPrev + }); + } + + updateUIState(state, previous, matchesCount) { + let notFound = false; + let findMsg = ""; + let status = ""; + + switch (state) { + case _pdf_find_controller.FindState.FOUND: + break; + + case _pdf_find_controller.FindState.PENDING: + status = "pending"; + break; + + case _pdf_find_controller.FindState.NOT_FOUND: + findMsg = this.l10n.get("find_not_found", null, "Phrase not found"); + notFound = true; + break; + + case _pdf_find_controller.FindState.WRAPPED: + if (previous) { + findMsg = this.l10n.get("find_reached_top", null, "Reached top of document, continued from bottom"); + } else { + findMsg = this.l10n.get("find_reached_bottom", null, "Reached end of document, continued from top"); + } + + break; + } + + this.findField.classList.toggle("notFound", notFound); + this.findField.setAttribute("data-status", status); + Promise.resolve(findMsg).then(msg => { + this.findMsg.textContent = msg; + + this._adjustWidth(); + }); + this.updateResultsCount(matchesCount); + } + + updateResultsCount({ + current = 0, + total = 0 + } = {}) { + if (!this.findResultsCount) { + return; + } + + const limit = MATCHES_COUNT_LIMIT; + let matchesCountMsg = ""; + + if (total > 0) { + if (total > limit) { + matchesCountMsg = this.l10n.get("find_match_count_limit", { + limit + }, "More than {{limit}} match" + (limit !== 1 ? "es" : "")); + } else { + matchesCountMsg = this.l10n.get("find_match_count", { + current, + total + }, "{{current}} of {{total}} match" + (total !== 1 ? "es" : "")); + } + } + + Promise.resolve(matchesCountMsg).then(msg => { + this.findResultsCount.textContent = msg; + this.findResultsCount.classList.toggle("hidden", !total); + + this._adjustWidth(); + }); + } + + open() { + if (!this.opened) { + this.opened = true; + this.toggleButton.classList.add("toggled"); + this.bar.classList.remove("hidden"); + } + + this.findField.select(); + this.findField.focus(); + + this._adjustWidth(); + } + + close() { + if (!this.opened) { + return; + } + + this.opened = false; + this.toggleButton.classList.remove("toggled"); + this.bar.classList.add("hidden"); + this.eventBus.dispatch("findbarclose", { + source: this + }); + } + + toggle() { + if (this.opened) { + this.close(); + } else { + this.open(); + } + } + + _adjustWidth() { + if (!this.opened) { + return; + } + + this.bar.classList.remove("wrapContainers"); + const findbarHeight = this.bar.clientHeight; + const inputContainerHeight = this.bar.firstElementChild.clientHeight; + + if (findbarHeight > inputContainerHeight) { + this.bar.classList.add("wrapContainers"); + } + } + +} + +exports.PDFFindBar = PDFFindBar; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFFindController = exports.FindState = void 0; + +var _pdfjsLib = __webpack_require__(5); + +var _pdf_find_utils = __webpack_require__(16); + +var _ui_utils = __webpack_require__(2); + +const FindState = { + FOUND: 0, + NOT_FOUND: 1, + WRAPPED: 2, + PENDING: 3 +}; +exports.FindState = FindState; +const FIND_TIMEOUT = 250; +const MATCH_SCROLL_OFFSET_TOP = -50; +const MATCH_SCROLL_OFFSET_LEFT = -400; +const CHARACTERS_TO_NORMALIZE = { + "\u2018": "'", + "\u2019": "'", + "\u201A": "'", + "\u201B": "'", + "\u201C": '"', + "\u201D": '"', + "\u201E": '"', + "\u201F": '"', + "\u00BC": "1/4", + "\u00BD": "1/2", + "\u00BE": "3/4" +}; +let normalizationRegex = null; + +function normalize(text) { + if (!normalizationRegex) { + const replace = Object.keys(CHARACTERS_TO_NORMALIZE).join(""); + normalizationRegex = new RegExp(`[${replace}]`, "g"); + } + + return text.replace(normalizationRegex, function (ch) { + return CHARACTERS_TO_NORMALIZE[ch]; + }); +} + +class PDFFindController { + constructor({ + linkService, + eventBus + }) { + this._linkService = linkService; + this._eventBus = eventBus; + + this._reset(); + + eventBus._on("findbarclose", this._onFindBarClose.bind(this)); + } + + get highlightMatches() { + return this._highlightMatches; + } + + get pageMatches() { + return this._pageMatches; + } + + get pageMatchesLength() { + return this._pageMatchesLength; + } + + get selected() { + return this._selected; + } + + get state() { + return this._state; + } + + setDocument(pdfDocument) { + if (this._pdfDocument) { + this._reset(); + } + + if (!pdfDocument) { + return; + } + + this._pdfDocument = pdfDocument; + + this._firstPageCapability.resolve(); + } + + executeCommand(cmd, state) { + if (!state) { + return; + } + + const pdfDocument = this._pdfDocument; + + if (this._state === null || this._shouldDirtyMatch(cmd, state)) { + this._dirtyMatch = true; + } + + this._state = state; + + if (cmd !== "findhighlightallchange") { + this._updateUIState(FindState.PENDING); + } + + this._firstPageCapability.promise.then(() => { + if (!this._pdfDocument || pdfDocument && this._pdfDocument !== pdfDocument) { + return; + } + + this._extractText(); + + const findbarClosed = !this._highlightMatches; + const pendingTimeout = !!this._findTimeout; + + if (this._findTimeout) { + clearTimeout(this._findTimeout); + this._findTimeout = null; + } + + if (cmd === "find") { + this._findTimeout = setTimeout(() => { + this._nextMatch(); + + this._findTimeout = null; + }, FIND_TIMEOUT); + } else if (this._dirtyMatch) { + this._nextMatch(); + } else if (cmd === "findagain") { + this._nextMatch(); + + if (findbarClosed && this._state.highlightAll) { + this._updateAllPages(); + } + } else if (cmd === "findhighlightallchange") { + if (pendingTimeout) { + this._nextMatch(); + } else { + this._highlightMatches = true; + } + + this._updateAllPages(); + } else { + this._nextMatch(); + } + }); + } + + scrollMatchIntoView({ + element = null, + pageIndex = -1, + matchIndex = -1 + }) { + if (!this._scrollMatches || !element) { + return; + } else if (matchIndex === -1 || matchIndex !== this._selected.matchIdx) { + return; + } else if (pageIndex === -1 || pageIndex !== this._selected.pageIdx) { + return; + } + + this._scrollMatches = false; + const spot = { + top: MATCH_SCROLL_OFFSET_TOP, + left: MATCH_SCROLL_OFFSET_LEFT + }; + (0, _ui_utils.scrollIntoView)(element, spot, true); + } + + _reset() { + this._highlightMatches = false; + this._scrollMatches = false; + this._pdfDocument = null; + this._pageMatches = []; + this._pageMatchesLength = []; + this._state = null; + this._selected = { + pageIdx: -1, + matchIdx: -1 + }; + this._offset = { + pageIdx: null, + matchIdx: null, + wrapped: false + }; + this._extractTextPromises = []; + this._pageContents = []; + this._matchesCountTotal = 0; + this._pagesToSearch = null; + this._pendingFindMatches = Object.create(null); + this._resumePageIdx = null; + this._dirtyMatch = false; + clearTimeout(this._findTimeout); + this._findTimeout = null; + this._firstPageCapability = (0, _pdfjsLib.createPromiseCapability)(); + } + + get _query() { + if (this._state.query !== this._rawQuery) { + this._rawQuery = this._state.query; + this._normalizedQuery = normalize(this._state.query); + } + + return this._normalizedQuery; + } + + _shouldDirtyMatch(cmd, state) { + if (state.query !== this._state.query) { + return true; + } + + switch (cmd) { + case "findagain": + const pageNumber = this._selected.pageIdx + 1; + const linkService = this._linkService; + + if (pageNumber >= 1 && pageNumber <= linkService.pagesCount && pageNumber !== linkService.page && !linkService.isPageVisible(pageNumber)) { + return true; + } + + return false; + + case "findhighlightallchange": + return false; + } + + return true; + } + + _prepareMatches(matchesWithLength, matches, matchesLength) { + function isSubTerm(currentIndex) { + const currentElem = matchesWithLength[currentIndex]; + const nextElem = matchesWithLength[currentIndex + 1]; + + if (currentIndex < matchesWithLength.length - 1 && currentElem.match === nextElem.match) { + currentElem.skipped = true; + return true; + } + + for (let i = currentIndex - 1; i >= 0; i--) { + const prevElem = matchesWithLength[i]; + + if (prevElem.skipped) { + continue; + } + + if (prevElem.match + prevElem.matchLength < currentElem.match) { + break; + } + + if (prevElem.match + prevElem.matchLength >= currentElem.match + currentElem.matchLength) { + currentElem.skipped = true; + return true; + } + } + + return false; + } + + matchesWithLength.sort(function (a, b) { + return a.match === b.match ? a.matchLength - b.matchLength : a.match - b.match; + }); + + for (let i = 0, len = matchesWithLength.length; i < len; i++) { + if (isSubTerm(i)) { + continue; + } + + matches.push(matchesWithLength[i].match); + matchesLength.push(matchesWithLength[i].matchLength); + } + } + + _isEntireWord(content, startIdx, length) { + if (startIdx > 0) { + const first = content.charCodeAt(startIdx); + const limit = content.charCodeAt(startIdx - 1); + + if ((0, _pdf_find_utils.getCharacterType)(first) === (0, _pdf_find_utils.getCharacterType)(limit)) { + return false; + } + } + + const endIdx = startIdx + length - 1; + + if (endIdx < content.length - 1) { + const last = content.charCodeAt(endIdx); + const limit = content.charCodeAt(endIdx + 1); + + if ((0, _pdf_find_utils.getCharacterType)(last) === (0, _pdf_find_utils.getCharacterType)(limit)) { + return false; + } + } + + return true; + } + + _calculatePhraseMatch(query, pageIndex, pageContent, entireWord) { + const matches = []; + const queryLen = query.length; + let matchIdx = -queryLen; + + while (true) { + matchIdx = pageContent.indexOf(query, matchIdx + queryLen); + + if (matchIdx === -1) { + break; + } + + if (entireWord && !this._isEntireWord(pageContent, matchIdx, queryLen)) { + continue; + } + + matches.push(matchIdx); + } + + this._pageMatches[pageIndex] = matches; + } + + _calculateWordMatch(query, pageIndex, pageContent, entireWord) { + const matchesWithLength = []; + const queryArray = query.match(/\S+/g); + + for (let i = 0, len = queryArray.length; i < len; i++) { + const subquery = queryArray[i]; + const subqueryLen = subquery.length; + let matchIdx = -subqueryLen; + + while (true) { + matchIdx = pageContent.indexOf(subquery, matchIdx + subqueryLen); + + if (matchIdx === -1) { + break; + } + + if (entireWord && !this._isEntireWord(pageContent, matchIdx, subqueryLen)) { + continue; + } + + matchesWithLength.push({ + match: matchIdx, + matchLength: subqueryLen, + skipped: false + }); + } + } + + this._pageMatchesLength[pageIndex] = []; + this._pageMatches[pageIndex] = []; + + this._prepareMatches(matchesWithLength, this._pageMatches[pageIndex], this._pageMatchesLength[pageIndex]); + } + + _calculateMatch(pageIndex) { + let pageContent = this._pageContents[pageIndex]; + let query = this._query; + const { + caseSensitive, + entireWord, + phraseSearch + } = this._state; + + if (query.length === 0) { + return; + } + + if (!caseSensitive) { + pageContent = pageContent.toLowerCase(); + query = query.toLowerCase(); + } + + if (phraseSearch) { + this._calculatePhraseMatch(query, pageIndex, pageContent, entireWord); + } else { + this._calculateWordMatch(query, pageIndex, pageContent, entireWord); + } + + if (this._state.highlightAll) { + this._updatePage(pageIndex); + } + + if (this._resumePageIdx === pageIndex) { + this._resumePageIdx = null; + + this._nextPageMatch(); + } + + const pageMatchesCount = this._pageMatches[pageIndex].length; + + if (pageMatchesCount > 0) { + this._matchesCountTotal += pageMatchesCount; + + this._updateUIResultsCount(); + } + } + + _extractText() { + if (this._extractTextPromises.length > 0) { + return; + } + + let promise = Promise.resolve(); + + for (let i = 0, ii = this._linkService.pagesCount; i < ii; i++) { + const extractTextCapability = (0, _pdfjsLib.createPromiseCapability)(); + this._extractTextPromises[i] = extractTextCapability.promise; + promise = promise.then(() => { + return this._pdfDocument.getPage(i + 1).then(pdfPage => { + return pdfPage.getTextContent({ + normalizeWhitespace: true + }); + }).then(textContent => { + const textItems = textContent.items; + const strBuf = []; + + for (let j = 0, jj = textItems.length; j < jj; j++) { + strBuf.push(textItems[j].str); + } + + this._pageContents[i] = normalize(strBuf.join("")); + extractTextCapability.resolve(i); + }, reason => { + console.error(`Unable to get text content for page ${i + 1}`, reason); + this._pageContents[i] = ""; + extractTextCapability.resolve(i); + }); + }); + } + } + + _updatePage(index) { + if (this._scrollMatches && this._selected.pageIdx === index) { + this._linkService.page = index + 1; + } + + this._eventBus.dispatch("updatetextlayermatches", { + source: this, + pageIndex: index + }); + } + + _updateAllPages() { + this._eventBus.dispatch("updatetextlayermatches", { + source: this, + pageIndex: -1 + }); + } + + _nextMatch() { + const previous = this._state.findPrevious; + const currentPageIndex = this._linkService.page - 1; + const numPages = this._linkService.pagesCount; + this._highlightMatches = true; + + if (this._dirtyMatch) { + this._dirtyMatch = false; + this._selected.pageIdx = this._selected.matchIdx = -1; + this._offset.pageIdx = currentPageIndex; + this._offset.matchIdx = null; + this._offset.wrapped = false; + this._resumePageIdx = null; + this._pageMatches.length = 0; + this._pageMatchesLength.length = 0; + this._matchesCountTotal = 0; + + this._updateAllPages(); + + for (let i = 0; i < numPages; i++) { + if (this._pendingFindMatches[i] === true) { + continue; + } + + this._pendingFindMatches[i] = true; + + this._extractTextPromises[i].then(pageIdx => { + delete this._pendingFindMatches[pageIdx]; + + this._calculateMatch(pageIdx); + }); + } + } + + if (this._query === "") { + this._updateUIState(FindState.FOUND); + + return; + } + + if (this._resumePageIdx) { + return; + } + + const offset = this._offset; + this._pagesToSearch = numPages; + + if (offset.matchIdx !== null) { + const numPageMatches = this._pageMatches[offset.pageIdx].length; + + if (!previous && offset.matchIdx + 1 < numPageMatches || previous && offset.matchIdx > 0) { + offset.matchIdx = previous ? offset.matchIdx - 1 : offset.matchIdx + 1; + + this._updateMatch(true); + + return; + } + + this._advanceOffsetPage(previous); + } + + this._nextPageMatch(); + } + + _matchesReady(matches) { + const offset = this._offset; + const numMatches = matches.length; + const previous = this._state.findPrevious; + + if (numMatches) { + offset.matchIdx = previous ? numMatches - 1 : 0; + + this._updateMatch(true); + + return true; + } + + this._advanceOffsetPage(previous); + + if (offset.wrapped) { + offset.matchIdx = null; + + if (this._pagesToSearch < 0) { + this._updateMatch(false); + + return true; + } + } + + return false; + } + + _nextPageMatch() { + if (this._resumePageIdx !== null) { + console.error("There can only be one pending page."); + } + + let matches = null; + + do { + const pageIdx = this._offset.pageIdx; + matches = this._pageMatches[pageIdx]; + + if (!matches) { + this._resumePageIdx = pageIdx; + break; + } + } while (!this._matchesReady(matches)); + } + + _advanceOffsetPage(previous) { + const offset = this._offset; + const numPages = this._linkService.pagesCount; + offset.pageIdx = previous ? offset.pageIdx - 1 : offset.pageIdx + 1; + offset.matchIdx = null; + this._pagesToSearch--; + + if (offset.pageIdx >= numPages || offset.pageIdx < 0) { + offset.pageIdx = previous ? numPages - 1 : 0; + offset.wrapped = true; + } + } + + _updateMatch(found = false) { + let state = FindState.NOT_FOUND; + const wrapped = this._offset.wrapped; + this._offset.wrapped = false; + + if (found) { + const previousPage = this._selected.pageIdx; + this._selected.pageIdx = this._offset.pageIdx; + this._selected.matchIdx = this._offset.matchIdx; + state = wrapped ? FindState.WRAPPED : FindState.FOUND; + + if (previousPage !== -1 && previousPage !== this._selected.pageIdx) { + this._updatePage(previousPage); + } + } + + this._updateUIState(state, this._state.findPrevious); + + if (this._selected.pageIdx !== -1) { + this._scrollMatches = true; + + this._updatePage(this._selected.pageIdx); + } + } + + _onFindBarClose(evt) { + const pdfDocument = this._pdfDocument; + + this._firstPageCapability.promise.then(() => { + if (!this._pdfDocument || pdfDocument && this._pdfDocument !== pdfDocument) { + return; + } + + if (this._findTimeout) { + clearTimeout(this._findTimeout); + this._findTimeout = null; + } + + if (this._resumePageIdx) { + this._resumePageIdx = null; + this._dirtyMatch = true; + } + + this._updateUIState(FindState.FOUND); + + this._highlightMatches = false; + + this._updateAllPages(); + }); + } + + _requestMatchesCount() { + const { + pageIdx, + matchIdx + } = this._selected; + let current = 0, + total = this._matchesCountTotal; + + if (matchIdx !== -1) { + for (let i = 0; i < pageIdx; i++) { + current += this._pageMatches[i] && this._pageMatches[i].length || 0; + } + + current += matchIdx + 1; + } + + if (current < 1 || current > total) { + current = total = 0; + } + + return { + current, + total + }; + } + + _updateUIResultsCount() { + this._eventBus.dispatch("updatefindmatchescount", { + source: this, + matchesCount: this._requestMatchesCount() + }); + } + + _updateUIState(state, previous) { + this._eventBus.dispatch("updatefindcontrolstate", { + source: this, + state, + previous, + matchesCount: this._requestMatchesCount() + }); + } + +} + +exports.PDFFindController = PDFFindController; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getCharacterType = getCharacterType; +exports.CharacterType = void 0; +const CharacterType = { + SPACE: 0, + ALPHA_LETTER: 1, + PUNCT: 2, + HAN_LETTER: 3, + KATAKANA_LETTER: 4, + HIRAGANA_LETTER: 5, + HALFWIDTH_KATAKANA_LETTER: 6, + THAI_LETTER: 7 +}; +exports.CharacterType = CharacterType; + +function isAlphabeticalScript(charCode) { + return charCode < 0x2e80; +} + +function isAscii(charCode) { + return (charCode & 0xff80) === 0; +} + +function isAsciiAlpha(charCode) { + return charCode >= 0x61 && charCode <= 0x7a || charCode >= 0x41 && charCode <= 0x5a; +} + +function isAsciiDigit(charCode) { + return charCode >= 0x30 && charCode <= 0x39; +} + +function isAsciiSpace(charCode) { + return charCode === 0x20 || charCode === 0x09 || charCode === 0x0d || charCode === 0x0a; +} + +function isHan(charCode) { + return charCode >= 0x3400 && charCode <= 0x9fff || charCode >= 0xf900 && charCode <= 0xfaff; +} + +function isKatakana(charCode) { + return charCode >= 0x30a0 && charCode <= 0x30ff; +} + +function isHiragana(charCode) { + return charCode >= 0x3040 && charCode <= 0x309f; +} + +function isHalfwidthKatakana(charCode) { + return charCode >= 0xff60 && charCode <= 0xff9f; +} + +function isThai(charCode) { + return (charCode & 0xff80) === 0x0e00; +} + +function getCharacterType(charCode) { + if (isAlphabeticalScript(charCode)) { + if (isAscii(charCode)) { + if (isAsciiSpace(charCode)) { + return CharacterType.SPACE; + } else if (isAsciiAlpha(charCode) || isAsciiDigit(charCode) || charCode === 0x5f) { + return CharacterType.ALPHA_LETTER; + } + + return CharacterType.PUNCT; + } else if (isThai(charCode)) { + return CharacterType.THAI_LETTER; + } else if (charCode === 0xa0) { + return CharacterType.SPACE; + } + + return CharacterType.ALPHA_LETTER; + } + + if (isHan(charCode)) { + return CharacterType.HAN_LETTER; + } else if (isKatakana(charCode)) { + return CharacterType.KATAKANA_LETTER; + } else if (isHiragana(charCode)) { + return CharacterType.HIRAGANA_LETTER; + } else if (isHalfwidthKatakana(charCode)) { + return CharacterType.HALFWIDTH_KATAKANA_LETTER; + } + + return CharacterType.ALPHA_LETTER; +} + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isDestHashesEqual = isDestHashesEqual; +exports.isDestArraysEqual = isDestArraysEqual; +exports.PDFHistory = void 0; + +var _ui_utils = __webpack_require__(2); + +const HASH_CHANGE_TIMEOUT = 1000; +const POSITION_UPDATED_THRESHOLD = 50; +const UPDATE_VIEWAREA_TIMEOUT = 1000; + +function getCurrentHash() { + return document.location.hash; +} + +class PDFHistory { + constructor({ + linkService, + eventBus + }) { + this.linkService = linkService; + this.eventBus = eventBus; + this._initialized = false; + this._fingerprint = ""; + this.reset(); + this._boundEvents = null; + this._isViewerInPresentationMode = false; + + this.eventBus._on("presentationmodechanged", evt => { + this._isViewerInPresentationMode = evt.active || evt.switchInProgress; + }); + + this.eventBus._on("pagesinit", () => { + this._isPagesLoaded = false; + + const onPagesLoaded = evt => { + this.eventBus._off("pagesloaded", onPagesLoaded); + + this._isPagesLoaded = !!evt.pagesCount; + }; + + this.eventBus._on("pagesloaded", onPagesLoaded); + }); + } + + initialize({ + fingerprint, + resetHistory = false, + updateUrl = false + }) { + if (!fingerprint || typeof fingerprint !== "string") { + console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.'); + return; + } + + if (this._initialized) { + this.reset(); + } + + const reInitialized = this._fingerprint !== "" && this._fingerprint !== fingerprint; + this._fingerprint = fingerprint; + this._updateUrl = updateUrl === true; + this._initialized = true; + + this._bindEvents(); + + const state = window.history.state; + this._popStateInProgress = false; + this._blockHashChange = 0; + this._currentHash = getCurrentHash(); + this._numPositionUpdates = 0; + this._uid = this._maxUid = 0; + this._destination = null; + this._position = null; + + if (!this._isValidState(state, true) || resetHistory) { + const { + hash, + page, + rotation + } = this._parseCurrentHash(true); + + if (!hash || reInitialized || resetHistory) { + this._pushOrReplaceState(null, true); + + return; + } + + this._pushOrReplaceState({ + hash, + page, + rotation + }, true); + + return; + } + + const destination = state.destination; + + this._updateInternalState(destination, state.uid, true); + + if (this._uid > this._maxUid) { + this._maxUid = this._uid; + } + + if (destination.rotation !== undefined) { + this._initialRotation = destination.rotation; + } + + if (destination.dest) { + this._initialBookmark = JSON.stringify(destination.dest); + this._destination.page = null; + } else if (destination.hash) { + this._initialBookmark = destination.hash; + } else if (destination.page) { + this._initialBookmark = `page=${destination.page}`; + } + } + + reset() { + if (this._initialized) { + this._pageHide(); + + this._initialized = false; + + this._unbindEvents(); + } + + if (this._updateViewareaTimeout) { + clearTimeout(this._updateViewareaTimeout); + this._updateViewareaTimeout = null; + } + + this._initialBookmark = null; + this._initialRotation = null; + } + + push({ + namedDest = null, + explicitDest, + pageNumber + }) { + if (!this._initialized) { + return; + } + + if (namedDest && typeof namedDest !== "string") { + console.error("PDFHistory.push: " + `"${namedDest}" is not a valid namedDest parameter.`); + return; + } else if (!Array.isArray(explicitDest)) { + console.error("PDFHistory.push: " + `"${explicitDest}" is not a valid explicitDest parameter.`); + return; + } else if (!(Number.isInteger(pageNumber) && pageNumber > 0 && pageNumber <= this.linkService.pagesCount)) { + if (pageNumber !== null || this._destination) { + console.error("PDFHistory.push: " + `"${pageNumber}" is not a valid pageNumber parameter.`); + return; + } + } + + const hash = namedDest || JSON.stringify(explicitDest); + + if (!hash) { + return; + } + + let forceReplace = false; + + if (this._destination && (isDestHashesEqual(this._destination.hash, hash) || isDestArraysEqual(this._destination.dest, explicitDest))) { + if (this._destination.page) { + return; + } + + forceReplace = true; + } + + if (this._popStateInProgress && !forceReplace) { + return; + } + + this._pushOrReplaceState({ + dest: explicitDest, + hash, + page: pageNumber, + rotation: this.linkService.rotation + }, forceReplace); + + if (!this._popStateInProgress) { + this._popStateInProgress = true; + Promise.resolve().then(() => { + this._popStateInProgress = false; + }); + } + } + + pushCurrentPosition() { + if (!this._initialized || this._popStateInProgress) { + return; + } + + this._tryPushCurrentPosition(); + } + + back() { + if (!this._initialized || this._popStateInProgress) { + return; + } + + const state = window.history.state; + + if (this._isValidState(state) && state.uid > 0) { + window.history.back(); + } + } + + forward() { + if (!this._initialized || this._popStateInProgress) { + return; + } + + const state = window.history.state; + + if (this._isValidState(state) && state.uid < this._maxUid) { + window.history.forward(); + } + } + + get popStateInProgress() { + return this._initialized && (this._popStateInProgress || this._blockHashChange > 0); + } + + get initialBookmark() { + return this._initialized ? this._initialBookmark : null; + } + + get initialRotation() { + return this._initialized ? this._initialRotation : null; + } + + _pushOrReplaceState(destination, forceReplace = false) { + const shouldReplace = forceReplace || !this._destination; + const newState = { + fingerprint: this._fingerprint, + uid: shouldReplace ? this._uid : this._uid + 1, + destination + }; + + this._updateInternalState(destination, newState.uid); + + let newUrl; + + if (this._updateUrl && destination && destination.hash) { + const baseUrl = document.location.href.split("#")[0]; + + if (!baseUrl.startsWith("file://")) { + newUrl = `${baseUrl}#${destination.hash}`; + } + } + + if (shouldReplace) { + window.history.replaceState(newState, "", newUrl); + } else { + this._maxUid = this._uid; + window.history.pushState(newState, "", newUrl); + } + } + + _tryPushCurrentPosition(temporary = false) { + if (!this._position) { + return; + } + + let position = this._position; + + if (temporary) { + position = Object.assign(Object.create(null), this._position); + position.temporary = true; + } + + if (!this._destination) { + this._pushOrReplaceState(position); + + return; + } + + if (this._destination.temporary) { + this._pushOrReplaceState(position, true); + + return; + } + + if (this._destination.hash === position.hash) { + return; + } + + if (!this._destination.page && (POSITION_UPDATED_THRESHOLD <= 0 || this._numPositionUpdates <= POSITION_UPDATED_THRESHOLD)) { + return; + } + + let forceReplace = false; + + if (this._destination.page >= position.first && this._destination.page <= position.page) { + if (this._destination.dest || !this._destination.first) { + return; + } + + forceReplace = true; + } + + this._pushOrReplaceState(position, forceReplace); + } + + _isValidState(state, checkReload = false) { + if (!state) { + return false; + } + + if (state.fingerprint !== this._fingerprint) { + if (checkReload) { + if (typeof state.fingerprint !== "string" || state.fingerprint.length !== this._fingerprint.length) { + return false; + } + + const [perfEntry] = performance.getEntriesByType("navigation"); + + if (!perfEntry || perfEntry.type !== "reload") { + return false; + } + } else { + return false; + } + } + + if (!Number.isInteger(state.uid) || state.uid < 0) { + return false; + } + + if (state.destination === null || typeof state.destination !== "object") { + return false; + } + + return true; + } + + _updateInternalState(destination, uid, removeTemporary = false) { + if (this._updateViewareaTimeout) { + clearTimeout(this._updateViewareaTimeout); + this._updateViewareaTimeout = null; + } + + if (removeTemporary && destination && destination.temporary) { + delete destination.temporary; + } + + this._destination = destination; + this._uid = uid; + this._numPositionUpdates = 0; + } + + _parseCurrentHash(checkNameddest = false) { + const hash = unescape(getCurrentHash()).substring(1); + const params = (0, _ui_utils.parseQueryString)(hash); + const nameddest = params.nameddest || ""; + let page = params.page | 0; + + if (!(Number.isInteger(page) && page > 0 && page <= this.linkService.pagesCount) || checkNameddest && nameddest.length > 0) { + page = null; + } + + return { + hash, + page, + rotation: this.linkService.rotation + }; + } + + _updateViewarea({ + location + }) { + if (this._updateViewareaTimeout) { + clearTimeout(this._updateViewareaTimeout); + this._updateViewareaTimeout = null; + } + + this._position = { + hash: this._isViewerInPresentationMode ? `page=${location.pageNumber}` : location.pdfOpenParams.substring(1), + page: this.linkService.page, + first: location.pageNumber, + rotation: location.rotation + }; + + if (this._popStateInProgress) { + return; + } + + if (POSITION_UPDATED_THRESHOLD > 0 && this._isPagesLoaded && this._destination && !this._destination.page) { + this._numPositionUpdates++; + } + + if (UPDATE_VIEWAREA_TIMEOUT > 0) { + this._updateViewareaTimeout = setTimeout(() => { + if (!this._popStateInProgress) { + this._tryPushCurrentPosition(true); + } + + this._updateViewareaTimeout = null; + }, UPDATE_VIEWAREA_TIMEOUT); + } + } + + _popState({ + state + }) { + const newHash = getCurrentHash(), + hashChanged = this._currentHash !== newHash; + this._currentHash = newHash; + + if (!state) { + this._uid++; + + const { + hash, + page, + rotation + } = this._parseCurrentHash(); + + this._pushOrReplaceState({ + hash, + page, + rotation + }, true); + + return; + } + + if (!this._isValidState(state)) { + return; + } + + this._popStateInProgress = true; + + if (hashChanged) { + this._blockHashChange++; + (0, _ui_utils.waitOnEventOrTimeout)({ + target: window, + name: "hashchange", + delay: HASH_CHANGE_TIMEOUT + }).then(() => { + this._blockHashChange--; + }); + } + + const destination = state.destination; + + this._updateInternalState(destination, state.uid, true); + + if (this._uid > this._maxUid) { + this._maxUid = this._uid; + } + + if ((0, _ui_utils.isValidRotation)(destination.rotation)) { + this.linkService.rotation = destination.rotation; + } + + if (destination.dest) { + this.linkService.navigateTo(destination.dest); + } else if (destination.hash) { + this.linkService.setHash(destination.hash); + } else if (destination.page) { + this.linkService.page = destination.page; + } + + Promise.resolve().then(() => { + this._popStateInProgress = false; + }); + } + + _pageHide() { + if (!this._destination || this._destination.temporary) { + this._tryPushCurrentPosition(); + } + } + + _bindEvents() { + if (this._boundEvents) { + return; + } + + this._boundEvents = { + updateViewarea: this._updateViewarea.bind(this), + popState: this._popState.bind(this), + pageHide: this._pageHide.bind(this) + }; + + this.eventBus._on("updateviewarea", this._boundEvents.updateViewarea); + + window.addEventListener("popstate", this._boundEvents.popState); + window.addEventListener("pagehide", this._boundEvents.pageHide); + } + + _unbindEvents() { + if (!this._boundEvents) { + return; + } + + this.eventBus._off("updateviewarea", this._boundEvents.updateViewarea); + + window.removeEventListener("popstate", this._boundEvents.popState); + window.removeEventListener("pagehide", this._boundEvents.pageHide); + this._boundEvents = null; + } + +} + +exports.PDFHistory = PDFHistory; + +function isDestHashesEqual(destHash, pushHash) { + if (typeof destHash !== "string" || typeof pushHash !== "string") { + return false; + } + + if (destHash === pushHash) { + return true; + } + + const { + nameddest + } = (0, _ui_utils.parseQueryString)(destHash); + + if (nameddest === pushHash) { + return true; + } + + return false; +} + +function isDestArraysEqual(firstDest, secondDest) { + function isEntryEqual(first, second) { + if (typeof first !== typeof second) { + return false; + } + + if (Array.isArray(first) || Array.isArray(second)) { + return false; + } + + if (first !== null && typeof first === "object" && second !== null) { + if (Object.keys(first).length !== Object.keys(second).length) { + return false; + } + + for (const key in first) { + if (!isEntryEqual(first[key], second[key])) { + return false; + } + } + + return true; + } + + return first === second || Number.isNaN(first) && Number.isNaN(second); + } + + if (!(Array.isArray(firstDest) && Array.isArray(secondDest))) { + return false; + } + + if (firstDest.length !== secondDest.length) { + return false; + } + + for (let i = 0, ii = firstDest.length; i < ii; i++) { + if (!isEntryEqual(firstDest[i], secondDest[i])) { + return false; + } + } + + return true; +} + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SimpleLinkService = exports.PDFLinkService = void 0; + +var _ui_utils = __webpack_require__(2); + +class PDFLinkService { + constructor({ + eventBus, + externalLinkTarget = null, + externalLinkRel = null, + externalLinkEnabled = true, + ignoreDestinationZoom = false + } = {}) { + this.eventBus = eventBus; + this.externalLinkTarget = externalLinkTarget; + this.externalLinkRel = externalLinkRel; + this.externalLinkEnabled = externalLinkEnabled; + this._ignoreDestinationZoom = ignoreDestinationZoom; + this.baseUrl = null; + this.pdfDocument = null; + this.pdfViewer = null; + this.pdfHistory = null; + this._pagesRefCache = null; + } + + setDocument(pdfDocument, baseUrl = null) { + this.baseUrl = baseUrl; + this.pdfDocument = pdfDocument; + this._pagesRefCache = Object.create(null); + } + + setViewer(pdfViewer) { + this.pdfViewer = pdfViewer; + } + + setHistory(pdfHistory) { + this.pdfHistory = pdfHistory; + } + + get pagesCount() { + return this.pdfDocument ? this.pdfDocument.numPages : 0; + } + + get page() { + return this.pdfViewer.currentPageNumber; + } + + set page(value) { + this.pdfViewer.currentPageNumber = value; + } + + get rotation() { + return this.pdfViewer.pagesRotation; + } + + set rotation(value) { + this.pdfViewer.pagesRotation = value; + } + + navigateTo(dest) { + const goToDestination = ({ + namedDest, + explicitDest + }) => { + const destRef = explicitDest[0]; + let pageNumber; + + if (destRef instanceof Object) { + pageNumber = this._cachedPageNumber(destRef); + + if (pageNumber === null) { + this.pdfDocument.getPageIndex(destRef).then(pageIndex => { + this.cachePageRef(pageIndex + 1, destRef); + goToDestination({ + namedDest, + explicitDest + }); + }).catch(() => { + console.error(`PDFLinkService.navigateTo: "${destRef}" is not ` + `a valid page reference, for dest="${dest}".`); + }); + return; + } + } else if (Number.isInteger(destRef)) { + pageNumber = destRef + 1; + } else { + console.error(`PDFLinkService.navigateTo: "${destRef}" is not ` + `a valid destination reference, for dest="${dest}".`); + return; + } + + if (!pageNumber || pageNumber < 1 || pageNumber > this.pagesCount) { + console.error(`PDFLinkService.navigateTo: "${pageNumber}" is not ` + `a valid page number, for dest="${dest}".`); + return; + } + + if (this.pdfHistory) { + this.pdfHistory.pushCurrentPosition(); + this.pdfHistory.push({ + namedDest, + explicitDest, + pageNumber + }); + } + + this.pdfViewer.scrollPageIntoView({ + pageNumber, + destArray: explicitDest, + ignoreDestinationZoom: this._ignoreDestinationZoom + }); + }; + + new Promise((resolve, reject) => { + if (typeof dest === "string") { + this.pdfDocument.getDestination(dest).then(destArray => { + resolve({ + namedDest: dest, + explicitDest: destArray + }); + }); + return; + } + + resolve({ + namedDest: "", + explicitDest: dest + }); + }).then(data => { + if (!Array.isArray(data.explicitDest)) { + console.error(`PDFLinkService.navigateTo: "${data.explicitDest}" is` + ` not a valid destination array, for dest="${dest}".`); + return; + } + + goToDestination(data); + }); + } + + getDestinationHash(dest) { + if (typeof dest === "string") { + return this.getAnchorUrl("#" + escape(dest)); + } + + if (Array.isArray(dest)) { + const str = JSON.stringify(dest); + return this.getAnchorUrl("#" + escape(str)); + } + + return this.getAnchorUrl(""); + } + + getAnchorUrl(anchor) { + return (this.baseUrl || "") + anchor; + } + + setHash(hash) { + let pageNumber, dest; + + if (hash.includes("=")) { + const params = (0, _ui_utils.parseQueryString)(hash); + + if ("search" in params) { + this.eventBus.dispatch("findfromurlhash", { + source: this, + query: params.search.replace(/"/g, ""), + phraseSearch: params.phrase === "true" + }); + } + + if ("page" in params) { + pageNumber = params.page | 0 || 1; + } + + if ("zoom" in params) { + const zoomArgs = params.zoom.split(","); + const zoomArg = zoomArgs[0]; + const zoomArgNumber = parseFloat(zoomArg); + + if (!zoomArg.includes("Fit")) { + dest = [null, { + name: "XYZ" + }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null, zoomArgs.length > 2 ? zoomArgs[2] | 0 : null, zoomArgNumber ? zoomArgNumber / 100 : zoomArg]; + } else { + if (zoomArg === "Fit" || zoomArg === "FitB") { + dest = [null, { + name: zoomArg + }]; + } else if (zoomArg === "FitH" || zoomArg === "FitBH" || zoomArg === "FitV" || zoomArg === "FitBV") { + dest = [null, { + name: zoomArg + }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null]; + } else if (zoomArg === "FitR") { + if (zoomArgs.length !== 5) { + console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'); + } else { + dest = [null, { + name: zoomArg + }, zoomArgs[1] | 0, zoomArgs[2] | 0, zoomArgs[3] | 0, zoomArgs[4] | 0]; + } + } else { + console.error(`PDFLinkService.setHash: "${zoomArg}" is not ` + "a valid zoom value."); + } + } + } + + if (dest) { + this.pdfViewer.scrollPageIntoView({ + pageNumber: pageNumber || this.page, + destArray: dest, + allowNegativeOffset: true + }); + } else if (pageNumber) { + this.page = pageNumber; + } + + if ("pagemode" in params) { + this.eventBus.dispatch("pagemode", { + source: this, + mode: params.pagemode + }); + } + + if ("nameddest" in params) { + this.navigateTo(params.nameddest); + } + } else { + dest = unescape(hash); + + try { + dest = JSON.parse(dest); + + if (!Array.isArray(dest)) { + dest = dest.toString(); + } + } catch (ex) {} + + if (typeof dest === "string" || isValidExplicitDestination(dest)) { + this.navigateTo(dest); + return; + } + + console.error(`PDFLinkService.setHash: "${unescape(hash)}" is not ` + "a valid destination."); + } + } + + executeNamedAction(action) { + switch (action) { + case "GoBack": + if (this.pdfHistory) { + this.pdfHistory.back(); + } + + break; + + case "GoForward": + if (this.pdfHistory) { + this.pdfHistory.forward(); + } + + break; + + case "NextPage": + if (this.page < this.pagesCount) { + this.page++; + } + + break; + + case "PrevPage": + if (this.page > 1) { + this.page--; + } + + break; + + case "LastPage": + this.page = this.pagesCount; + break; + + case "FirstPage": + this.page = 1; + break; + + default: + break; + } + + this.eventBus.dispatch("namedaction", { + source: this, + action + }); + } + + cachePageRef(pageNum, pageRef) { + if (!pageRef) { + return; + } + + const refStr = pageRef.gen === 0 ? `${pageRef.num}R` : `${pageRef.num}R${pageRef.gen}`; + this._pagesRefCache[refStr] = pageNum; + } + + _cachedPageNumber(pageRef) { + const refStr = pageRef.gen === 0 ? `${pageRef.num}R` : `${pageRef.num}R${pageRef.gen}`; + return this._pagesRefCache && this._pagesRefCache[refStr] || null; + } + + isPageVisible(pageNumber) { + return this.pdfViewer.isPageVisible(pageNumber); + } + +} + +exports.PDFLinkService = PDFLinkService; + +function isValidExplicitDestination(dest) { + if (!Array.isArray(dest)) { + return false; + } + + const destLength = dest.length; + + if (destLength < 2) { + return false; + } + + const page = dest[0]; + + if (!(typeof page === "object" && Number.isInteger(page.num) && Number.isInteger(page.gen)) && !(Number.isInteger(page) && page >= 0)) { + return false; + } + + const zoom = dest[1]; + + if (!(typeof zoom === "object" && typeof zoom.name === "string")) { + return false; + } + + let allowNull = true; + + switch (zoom.name) { + case "XYZ": + if (destLength !== 5) { + return false; + } + + break; + + case "Fit": + case "FitB": + return destLength === 2; + + case "FitH": + case "FitBH": + case "FitV": + case "FitBV": + if (destLength !== 3) { + return false; + } + + break; + + case "FitR": + if (destLength !== 6) { + return false; + } + + allowNull = false; + break; + + default: + return false; + } + + for (let i = 2; i < destLength; i++) { + const param = dest[i]; + + if (!(typeof param === "number" || allowNull && param === null)) { + return false; + } + } + + return true; +} + +class SimpleLinkService { + constructor() { + this.externalLinkTarget = null; + this.externalLinkRel = null; + this.externalLinkEnabled = true; + this._ignoreDestinationZoom = false; + } + + get pagesCount() { + return 0; + } + + get page() { + return 0; + } + + set page(value) {} + + get rotation() { + return 0; + } + + set rotation(value) {} + + navigateTo(dest) {} + + getDestinationHash(dest) { + return "#"; + } + + getAnchorUrl(hash) { + return "#"; + } + + setHash(hash) {} + + executeNamedAction(action) {} + + cachePageRef(pageNum, pageRef) {} + + isPageVisible(pageNumber) { + return true; + } + +} + +exports.SimpleLinkService = SimpleLinkService; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFOutlineViewer = void 0; + +var _pdfjsLib = __webpack_require__(5); + +const DEFAULT_TITLE = "\u2013"; + +class PDFOutlineViewer { + constructor({ + container, + linkService, + eventBus + }) { + this.container = container; + this.linkService = linkService; + this.eventBus = eventBus; + this.reset(); + + eventBus._on("toggleoutlinetree", this.toggleOutlineTree.bind(this)); + } + + reset() { + this.outline = null; + this.lastToggleIsShow = true; + this.container.textContent = ""; + this.container.classList.remove("outlineWithDeepNesting"); + } + + _dispatchEvent(outlineCount) { + this.eventBus.dispatch("outlineloaded", { + source: this, + outlineCount + }); + } + + _bindLink(element, { + url, + newWindow, + dest + }) { + const { + linkService + } = this; + + if (url) { + (0, _pdfjsLib.addLinkAttributes)(element, { + url, + target: newWindow ? _pdfjsLib.LinkTarget.BLANK : linkService.externalLinkTarget, + rel: linkService.externalLinkRel, + enabled: linkService.externalLinkEnabled + }); + return; + } + + element.href = linkService.getDestinationHash(dest); + + element.onclick = () => { + if (dest) { + linkService.navigateTo(dest); + } + + return false; + }; + } + + _setStyles(element, { + bold, + italic + }) { + if (bold) { + element.style.fontWeight = "bold"; + } + + if (italic) { + element.style.fontStyle = "italic"; + } + } + + _addToggleButton(div, { + count, + items + }) { + const toggler = document.createElement("div"); + toggler.className = "outlineItemToggler"; + + if (count < 0 && Math.abs(count) === items.length) { + toggler.classList.add("outlineItemsHidden"); + } + + toggler.onclick = evt => { + evt.stopPropagation(); + toggler.classList.toggle("outlineItemsHidden"); + + if (evt.shiftKey) { + const shouldShowAll = !toggler.classList.contains("outlineItemsHidden"); + + this._toggleOutlineItem(div, shouldShowAll); + } + }; + + div.insertBefore(toggler, div.firstChild); + } + + _toggleOutlineItem(root, show = false) { + this.lastToggleIsShow = show; + + for (const toggler of root.querySelectorAll(".outlineItemToggler")) { + toggler.classList.toggle("outlineItemsHidden", !show); + } + } + + toggleOutlineTree() { + if (!this.outline) { + return; + } + + this._toggleOutlineItem(this.container, !this.lastToggleIsShow); + } + + render({ + outline + }) { + let outlineCount = 0; + + if (this.outline) { + this.reset(); + } + + this.outline = outline || null; + + if (!outline) { + this._dispatchEvent(outlineCount); + + return; + } + + const fragment = document.createDocumentFragment(); + const queue = [{ + parent: fragment, + items: this.outline + }]; + let hasAnyNesting = false; + + while (queue.length > 0) { + const levelData = queue.shift(); + + for (const item of levelData.items) { + const div = document.createElement("div"); + div.className = "outlineItem"; + const element = document.createElement("a"); + + this._bindLink(element, item); + + this._setStyles(element, item); + + element.textContent = (0, _pdfjsLib.removeNullCharacters)(item.title) || DEFAULT_TITLE; + div.appendChild(element); + + if (item.items.length > 0) { + hasAnyNesting = true; + + this._addToggleButton(div, item); + + const itemsDiv = document.createElement("div"); + itemsDiv.className = "outlineItems"; + div.appendChild(itemsDiv); + queue.push({ + parent: itemsDiv, + items: item.items + }); + } + + levelData.parent.appendChild(div); + outlineCount++; + } + } + + if (hasAnyNesting) { + this.container.classList.add("outlineWithDeepNesting"); + this.lastToggleIsShow = fragment.querySelectorAll(".outlineItemsHidden").length === 0; + } + + this.container.appendChild(fragment); + + this._dispatchEvent(outlineCount); + } + +} + +exports.PDFOutlineViewer = PDFOutlineViewer; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFPresentationMode = void 0; + +var _ui_utils = __webpack_require__(2); + +const DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS = 1500; +const DELAY_BEFORE_HIDING_CONTROLS = 3000; +const ACTIVE_SELECTOR = "pdfPresentationMode"; +const CONTROLS_SELECTOR = "pdfPresentationModeControls"; +const MOUSE_SCROLL_COOLDOWN_TIME = 50; +const PAGE_SWITCH_THRESHOLD = 0.1; +const SWIPE_MIN_DISTANCE_THRESHOLD = 50; +const SWIPE_ANGLE_THRESHOLD = Math.PI / 6; + +class PDFPresentationMode { + constructor({ + container, + pdfViewer, + eventBus, + contextMenuItems = null + }) { + this.container = container; + this.pdfViewer = pdfViewer; + this.eventBus = eventBus; + this.active = false; + this.args = null; + this.contextMenuOpen = false; + this.mouseScrollTimeStamp = 0; + this.mouseScrollDelta = 0; + this.touchSwipeState = null; + + if (contextMenuItems) { + contextMenuItems.contextFirstPage.addEventListener("click", () => { + this.contextMenuOpen = false; + this.eventBus.dispatch("firstpage", { + source: this + }); + }); + contextMenuItems.contextLastPage.addEventListener("click", () => { + this.contextMenuOpen = false; + this.eventBus.dispatch("lastpage", { + source: this + }); + }); + contextMenuItems.contextPageRotateCw.addEventListener("click", () => { + this.contextMenuOpen = false; + this.eventBus.dispatch("rotatecw", { + source: this + }); + }); + contextMenuItems.contextPageRotateCcw.addEventListener("click", () => { + this.contextMenuOpen = false; + this.eventBus.dispatch("rotateccw", { + source: this + }); + }); + } + } + + request() { + if (this.switchInProgress || this.active || !this.pdfViewer.pagesCount) { + return false; + } + + this._addFullscreenChangeListeners(); + + this._setSwitchInProgress(); + + this._notifyStateChange(); + + if (this.container.requestFullscreen) { + this.container.requestFullscreen(); + } else if (this.container.mozRequestFullScreen) { + this.container.mozRequestFullScreen(); + } else if (this.container.webkitRequestFullscreen) { + this.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); + } else if (this.container.msRequestFullscreen) { + this.container.msRequestFullscreen(); + } else { + return false; + } + + this.args = { + page: this.pdfViewer.currentPageNumber, + previousScale: this.pdfViewer.currentScaleValue + }; + return true; + } + + _mouseWheel(evt) { + if (!this.active) { + return; + } + + evt.preventDefault(); + const delta = (0, _ui_utils.normalizeWheelEventDelta)(evt); + const currentTime = new Date().getTime(); + const storedTime = this.mouseScrollTimeStamp; + + if (currentTime > storedTime && currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME) { + return; + } + + if (this.mouseScrollDelta > 0 && delta < 0 || this.mouseScrollDelta < 0 && delta > 0) { + this._resetMouseScrollState(); + } + + this.mouseScrollDelta += delta; + + if (Math.abs(this.mouseScrollDelta) >= PAGE_SWITCH_THRESHOLD) { + const totalDelta = this.mouseScrollDelta; + + this._resetMouseScrollState(); + + const success = totalDelta > 0 ? this._goToPreviousPage() : this._goToNextPage(); + + if (success) { + this.mouseScrollTimeStamp = currentTime; + } + } + } + + get isFullscreen() { + return !!(document.fullscreenElement || document.mozFullScreen || document.webkitIsFullScreen || document.msFullscreenElement); + } + + _goToPreviousPage() { + const page = this.pdfViewer.currentPageNumber; + + if (page <= 1) { + return false; + } + + this.pdfViewer.currentPageNumber = page - 1; + return true; + } + + _goToNextPage() { + const page = this.pdfViewer.currentPageNumber; + + if (page >= this.pdfViewer.pagesCount) { + return false; + } + + this.pdfViewer.currentPageNumber = page + 1; + return true; + } + + _notifyStateChange() { + this.eventBus.dispatch("presentationmodechanged", { + source: this, + active: this.active, + switchInProgress: !!this.switchInProgress + }); + } + + _setSwitchInProgress() { + if (this.switchInProgress) { + clearTimeout(this.switchInProgress); + } + + this.switchInProgress = setTimeout(() => { + this._removeFullscreenChangeListeners(); + + delete this.switchInProgress; + + this._notifyStateChange(); + }, DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS); + } + + _resetSwitchInProgress() { + if (this.switchInProgress) { + clearTimeout(this.switchInProgress); + delete this.switchInProgress; + } + } + + _enter() { + this.active = true; + + this._resetSwitchInProgress(); + + this._notifyStateChange(); + + this.container.classList.add(ACTIVE_SELECTOR); + setTimeout(() => { + this.pdfViewer.currentPageNumber = this.args.page; + this.pdfViewer.currentScaleValue = "page-fit"; + }, 0); + + this._addWindowListeners(); + + this._showControls(); + + this.contextMenuOpen = false; + this.container.setAttribute("contextmenu", "viewerContextMenu"); + window.getSelection().removeAllRanges(); + } + + _exit() { + const page = this.pdfViewer.currentPageNumber; + this.container.classList.remove(ACTIVE_SELECTOR); + setTimeout(() => { + this.active = false; + + this._removeFullscreenChangeListeners(); + + this._notifyStateChange(); + + this.pdfViewer.currentScaleValue = this.args.previousScale; + this.pdfViewer.currentPageNumber = page; + this.args = null; + }, 0); + + this._removeWindowListeners(); + + this._hideControls(); + + this._resetMouseScrollState(); + + this.container.removeAttribute("contextmenu"); + this.contextMenuOpen = false; + } + + _mouseDown(evt) { + if (this.contextMenuOpen) { + this.contextMenuOpen = false; + evt.preventDefault(); + return; + } + + if (evt.button === 0) { + const isInternalLink = evt.target.href && evt.target.classList.contains("internalLink"); + + if (!isInternalLink) { + evt.preventDefault(); + + if (evt.shiftKey) { + this._goToPreviousPage(); + } else { + this._goToNextPage(); + } + } + } + } + + _contextMenu() { + this.contextMenuOpen = true; + } + + _showControls() { + if (this.controlsTimeout) { + clearTimeout(this.controlsTimeout); + } else { + this.container.classList.add(CONTROLS_SELECTOR); + } + + this.controlsTimeout = setTimeout(() => { + this.container.classList.remove(CONTROLS_SELECTOR); + delete this.controlsTimeout; + }, DELAY_BEFORE_HIDING_CONTROLS); + } + + _hideControls() { + if (!this.controlsTimeout) { + return; + } + + clearTimeout(this.controlsTimeout); + this.container.classList.remove(CONTROLS_SELECTOR); + delete this.controlsTimeout; + } + + _resetMouseScrollState() { + this.mouseScrollTimeStamp = 0; + this.mouseScrollDelta = 0; + } + + _touchSwipe(evt) { + if (!this.active) { + return; + } + + if (evt.touches.length > 1) { + this.touchSwipeState = null; + return; + } + + switch (evt.type) { + case "touchstart": + this.touchSwipeState = { + startX: evt.touches[0].pageX, + startY: evt.touches[0].pageY, + endX: evt.touches[0].pageX, + endY: evt.touches[0].pageY + }; + break; + + case "touchmove": + if (this.touchSwipeState === null) { + return; + } + + this.touchSwipeState.endX = evt.touches[0].pageX; + this.touchSwipeState.endY = evt.touches[0].pageY; + evt.preventDefault(); + break; + + case "touchend": + if (this.touchSwipeState === null) { + return; + } + + let delta = 0; + const dx = this.touchSwipeState.endX - this.touchSwipeState.startX; + const dy = this.touchSwipeState.endY - this.touchSwipeState.startY; + const absAngle = Math.abs(Math.atan2(dy, dx)); + + if (Math.abs(dx) > SWIPE_MIN_DISTANCE_THRESHOLD && (absAngle <= SWIPE_ANGLE_THRESHOLD || absAngle >= Math.PI - SWIPE_ANGLE_THRESHOLD)) { + delta = dx; + } else if (Math.abs(dy) > SWIPE_MIN_DISTANCE_THRESHOLD && Math.abs(absAngle - Math.PI / 2) <= SWIPE_ANGLE_THRESHOLD) { + delta = dy; + } + + if (delta > 0) { + this._goToPreviousPage(); + } else if (delta < 0) { + this._goToNextPage(); + } + + break; + } + } + + _addWindowListeners() { + this.showControlsBind = this._showControls.bind(this); + this.mouseDownBind = this._mouseDown.bind(this); + this.mouseWheelBind = this._mouseWheel.bind(this); + this.resetMouseScrollStateBind = this._resetMouseScrollState.bind(this); + this.contextMenuBind = this._contextMenu.bind(this); + this.touchSwipeBind = this._touchSwipe.bind(this); + window.addEventListener("mousemove", this.showControlsBind); + window.addEventListener("mousedown", this.mouseDownBind); + window.addEventListener("wheel", this.mouseWheelBind, { + passive: false + }); + window.addEventListener("keydown", this.resetMouseScrollStateBind); + window.addEventListener("contextmenu", this.contextMenuBind); + window.addEventListener("touchstart", this.touchSwipeBind); + window.addEventListener("touchmove", this.touchSwipeBind); + window.addEventListener("touchend", this.touchSwipeBind); + } + + _removeWindowListeners() { + window.removeEventListener("mousemove", this.showControlsBind); + window.removeEventListener("mousedown", this.mouseDownBind); + window.removeEventListener("wheel", this.mouseWheelBind, { + passive: false + }); + window.removeEventListener("keydown", this.resetMouseScrollStateBind); + window.removeEventListener("contextmenu", this.contextMenuBind); + window.removeEventListener("touchstart", this.touchSwipeBind); + window.removeEventListener("touchmove", this.touchSwipeBind); + window.removeEventListener("touchend", this.touchSwipeBind); + delete this.showControlsBind; + delete this.mouseDownBind; + delete this.mouseWheelBind; + delete this.resetMouseScrollStateBind; + delete this.contextMenuBind; + delete this.touchSwipeBind; + } + + _fullscreenChange() { + if (this.isFullscreen) { + this._enter(); + } else { + this._exit(); + } + } + + _addFullscreenChangeListeners() { + this.fullscreenChangeBind = this._fullscreenChange.bind(this); + window.addEventListener("fullscreenchange", this.fullscreenChangeBind); + window.addEventListener("mozfullscreenchange", this.fullscreenChangeBind); + window.addEventListener("webkitfullscreenchange", this.fullscreenChangeBind); + window.addEventListener("MSFullscreenChange", this.fullscreenChangeBind); + } + + _removeFullscreenChangeListeners() { + window.removeEventListener("fullscreenchange", this.fullscreenChangeBind); + window.removeEventListener("mozfullscreenchange", this.fullscreenChangeBind); + window.removeEventListener("webkitfullscreenchange", this.fullscreenChangeBind); + window.removeEventListener("MSFullscreenChange", this.fullscreenChangeBind); + delete this.fullscreenChangeBind; + } + +} + +exports.PDFPresentationMode = PDFPresentationMode; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFSidebarResizer = void 0; + +var _ui_utils = __webpack_require__(2); + +const SIDEBAR_WIDTH_VAR = "--sidebar-width"; +const SIDEBAR_MIN_WIDTH = 200; +const SIDEBAR_RESIZING_CLASS = "sidebarResizing"; + +class PDFSidebarResizer { + constructor(options, eventBus, l10n = _ui_utils.NullL10n) { + this.enabled = false; + this.isRTL = false; + this.sidebarOpen = false; + this.doc = document.documentElement; + this._width = null; + this._outerContainerWidth = null; + this._boundEvents = Object.create(null); + this.outerContainer = options.outerContainer; + this.resizer = options.resizer; + this.eventBus = eventBus; + this.l10n = l10n; + + if (typeof CSS === "undefined" || typeof CSS.supports !== "function" || !CSS.supports(SIDEBAR_WIDTH_VAR, `calc(-1 * ${SIDEBAR_MIN_WIDTH}px)`)) { + console.warn("PDFSidebarResizer: " + "The browser does not support resizing of the sidebar."); + return; + } + + this.enabled = true; + this.resizer.classList.remove("hidden"); + this.l10n.getDirection().then(dir => { + this.isRTL = dir === "rtl"; + }); + + this._addEventListeners(); + } + + get outerContainerWidth() { + if (!this._outerContainerWidth) { + this._outerContainerWidth = this.outerContainer.clientWidth; + } + + return this._outerContainerWidth; + } + + _updateWidth(width = 0) { + if (!this.enabled) { + return false; + } + + const newWidth = (0, _ui_utils.clamp)(width, SIDEBAR_MIN_WIDTH, Math.floor(this.outerContainerWidth / 2)); + + if (newWidth === this._width) { + return false; + } + + this._width = newWidth; + this.doc.style.setProperty(SIDEBAR_WIDTH_VAR, `${newWidth}px`); + return true; + } + + _mouseMove(evt) { + let width = evt.clientX; + + if (this.isRTL) { + width = this.outerContainerWidth - width; + } + + this._updateWidth(width); + } + + _mouseUp(evt) { + this.outerContainer.classList.remove(SIDEBAR_RESIZING_CLASS); + this.eventBus.dispatch("resize", { + source: this + }); + const _boundEvents = this._boundEvents; + window.removeEventListener("mousemove", _boundEvents.mouseMove); + window.removeEventListener("mouseup", _boundEvents.mouseUp); + } + + _addEventListeners() { + if (!this.enabled) { + return; + } + + const _boundEvents = this._boundEvents; + _boundEvents.mouseMove = this._mouseMove.bind(this); + _boundEvents.mouseUp = this._mouseUp.bind(this); + this.resizer.addEventListener("mousedown", evt => { + if (evt.button !== 0) { + return; + } + + this.outerContainer.classList.add(SIDEBAR_RESIZING_CLASS); + window.addEventListener("mousemove", _boundEvents.mouseMove); + window.addEventListener("mouseup", _boundEvents.mouseUp); + }); + + this.eventBus._on("sidebarviewchanged", evt => { + this.sidebarOpen = !!(evt && evt.view); + }); + + this.eventBus._on("resize", evt => { + if (!evt || evt.source !== window) { + return; + } + + this._outerContainerWidth = null; + + if (!this._width) { + return; + } + + if (!this.sidebarOpen) { + this._updateWidth(this._width); + + return; + } + + this.outerContainer.classList.add(SIDEBAR_RESIZING_CLASS); + + const updated = this._updateWidth(this._width); + + Promise.resolve().then(() => { + this.outerContainer.classList.remove(SIDEBAR_RESIZING_CLASS); + + if (updated) { + this.eventBus.dispatch("resize", { + source: this + }); + } + }); + }); + } + +} + +exports.PDFSidebarResizer = PDFSidebarResizer; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFThumbnailViewer = void 0; + +var _ui_utils = __webpack_require__(2); + +var _pdf_thumbnail_view = __webpack_require__(23); + +const THUMBNAIL_SCROLL_MARGIN = -19; +const THUMBNAIL_SELECTED_CLASS = "selected"; + +class PDFThumbnailViewer { + constructor({ + container, + linkService, + renderingQueue, + l10n = _ui_utils.NullL10n + }) { + this.container = container; + this.linkService = linkService; + this.renderingQueue = renderingQueue; + this.l10n = l10n; + this.scroll = (0, _ui_utils.watchScroll)(this.container, this._scrollUpdated.bind(this)); + + this._resetView(); + } + + _scrollUpdated() { + this.renderingQueue.renderHighestPriority(); + } + + getThumbnail(index) { + return this._thumbnails[index]; + } + + _getVisibleThumbs() { + return (0, _ui_utils.getVisibleElements)(this.container, this._thumbnails); + } + + scrollThumbnailIntoView(pageNumber) { + if (!this.pdfDocument) { + return; + } + + const thumbnailView = this._thumbnails[pageNumber - 1]; + + if (!thumbnailView) { + console.error('scrollThumbnailIntoView: Invalid "pageNumber" parameter.'); + return; + } + + if (pageNumber !== this._currentPageNumber) { + const prevThumbnailView = this._thumbnails[this._currentPageNumber - 1]; + prevThumbnailView.div.classList.remove(THUMBNAIL_SELECTED_CLASS); + thumbnailView.div.classList.add(THUMBNAIL_SELECTED_CLASS); + } + + const visibleThumbs = this._getVisibleThumbs(); + + const numVisibleThumbs = visibleThumbs.views.length; + + if (numVisibleThumbs > 0) { + const first = visibleThumbs.first.id; + const last = numVisibleThumbs > 1 ? visibleThumbs.last.id : first; + let shouldScroll = false; + + if (pageNumber <= first || pageNumber >= last) { + shouldScroll = true; + } else { + visibleThumbs.views.some(function (view) { + if (view.id !== pageNumber) { + return false; + } + + shouldScroll = view.percent < 100; + return true; + }); + } + + if (shouldScroll) { + (0, _ui_utils.scrollIntoView)(thumbnailView.div, { + top: THUMBNAIL_SCROLL_MARGIN + }); + } + } + + this._currentPageNumber = pageNumber; + } + + get pagesRotation() { + return this._pagesRotation; + } + + set pagesRotation(rotation) { + if (!(0, _ui_utils.isValidRotation)(rotation)) { + throw new Error("Invalid thumbnails rotation angle."); + } + + if (!this.pdfDocument) { + return; + } + + if (this._pagesRotation === rotation) { + return; + } + + this._pagesRotation = rotation; + + for (let i = 0, ii = this._thumbnails.length; i < ii; i++) { + this._thumbnails[i].update(rotation); + } + } + + cleanup() { + _pdf_thumbnail_view.PDFThumbnailView.cleanup(); + } + + _resetView() { + this._thumbnails = []; + this._currentPageNumber = 1; + this._pageLabels = null; + this._pagesRotation = 0; + this._pagesRequests = new WeakMap(); + this.container.textContent = ""; + } + + setDocument(pdfDocument) { + if (this.pdfDocument) { + this._cancelRendering(); + + this._resetView(); + } + + this.pdfDocument = pdfDocument; + + if (!pdfDocument) { + return; + } + + pdfDocument.getPage(1).then(firstPdfPage => { + const pagesCount = pdfDocument.numPages; + const viewport = firstPdfPage.getViewport({ + scale: 1 + }); + + for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) { + const thumbnail = new _pdf_thumbnail_view.PDFThumbnailView({ + container: this.container, + id: pageNum, + defaultViewport: viewport.clone(), + linkService: this.linkService, + renderingQueue: this.renderingQueue, + disableCanvasToImageConversion: false, + l10n: this.l10n + }); + + this._thumbnails.push(thumbnail); + } + + const firstThumbnailView = this._thumbnails[0]; + + if (firstThumbnailView) { + firstThumbnailView.setPdfPage(firstPdfPage); + } + + const thumbnailView = this._thumbnails[this._currentPageNumber - 1]; + thumbnailView.div.classList.add(THUMBNAIL_SELECTED_CLASS); + }).catch(reason => { + console.error("Unable to initialize thumbnail viewer", reason); + }); + } + + _cancelRendering() { + for (let i = 0, ii = this._thumbnails.length; i < ii; i++) { + if (this._thumbnails[i]) { + this._thumbnails[i].cancelRendering(); + } + } + } + + setPageLabels(labels) { + if (!this.pdfDocument) { + return; + } + + if (!labels) { + this._pageLabels = null; + } else if (!(Array.isArray(labels) && this.pdfDocument.numPages === labels.length)) { + this._pageLabels = null; + console.error("PDFThumbnailViewer_setPageLabels: Invalid page labels."); + } else { + this._pageLabels = labels; + } + + for (let i = 0, ii = this._thumbnails.length; i < ii; i++) { + const label = this._pageLabels && this._pageLabels[i]; + + this._thumbnails[i].setPageLabel(label); + } + } + + _ensurePdfPageLoaded(thumbView) { + if (thumbView.pdfPage) { + return Promise.resolve(thumbView.pdfPage); + } + + if (this._pagesRequests.has(thumbView)) { + return this._pagesRequests.get(thumbView); + } + + const promise = this.pdfDocument.getPage(thumbView.id).then(pdfPage => { + if (!thumbView.pdfPage) { + thumbView.setPdfPage(pdfPage); + } + + this._pagesRequests.delete(thumbView); + + return pdfPage; + }).catch(reason => { + console.error("Unable to get page for thumb view", reason); + + this._pagesRequests.delete(thumbView); + }); + + this._pagesRequests.set(thumbView, promise); + + return promise; + } + + forceRendering() { + const visibleThumbs = this._getVisibleThumbs(); + + const thumbView = this.renderingQueue.getHighestPriority(visibleThumbs, this._thumbnails, this.scroll.down); + + if (thumbView) { + this._ensurePdfPageLoaded(thumbView).then(() => { + this.renderingQueue.renderView(thumbView); + }); + + return true; + } + + return false; + } + +} + +exports.PDFThumbnailViewer = PDFThumbnailViewer; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFThumbnailView = void 0; + +var _pdfjsLib = __webpack_require__(5); + +var _ui_utils = __webpack_require__(2); + +var _pdf_rendering_queue = __webpack_require__(8); + +const MAX_NUM_SCALING_STEPS = 3; +const THUMBNAIL_CANVAS_BORDER_WIDTH = 1; +const THUMBNAIL_WIDTH = 98; + +const TempImageFactory = function TempImageFactoryClosure() { + let tempCanvasCache = null; + return { + getCanvas(width, height) { + let tempCanvas = tempCanvasCache; + + if (!tempCanvas) { + tempCanvas = document.createElement("canvas"); + tempCanvasCache = tempCanvas; + } + + tempCanvas.width = width; + tempCanvas.height = height; + tempCanvas.mozOpaque = true; + const ctx = tempCanvas.getContext("2d", { + alpha: false + }); + ctx.save(); + ctx.fillStyle = "rgb(255, 255, 255)"; + ctx.fillRect(0, 0, width, height); + ctx.restore(); + return tempCanvas; + }, + + destroyCanvas() { + const tempCanvas = tempCanvasCache; + + if (tempCanvas) { + tempCanvas.width = 0; + tempCanvas.height = 0; + } + + tempCanvasCache = null; + } + + }; +}(); + +class PDFThumbnailView { + constructor({ + container, + id, + defaultViewport, + linkService, + renderingQueue, + disableCanvasToImageConversion = false, + l10n = _ui_utils.NullL10n + }) { + this.id = id; + this.renderingId = "thumbnail" + id; + this.pageLabel = null; + this.pdfPage = null; + this.rotation = 0; + this.viewport = defaultViewport; + this.pdfPageRotate = defaultViewport.rotation; + this.linkService = linkService; + this.renderingQueue = renderingQueue; + this.renderTask = null; + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + this.resume = null; + this.disableCanvasToImageConversion = disableCanvasToImageConversion; + this.pageWidth = this.viewport.width; + this.pageHeight = this.viewport.height; + this.pageRatio = this.pageWidth / this.pageHeight; + this.canvasWidth = THUMBNAIL_WIDTH; + this.canvasHeight = this.canvasWidth / this.pageRatio | 0; + this.scale = this.canvasWidth / this.pageWidth; + this.l10n = l10n; + const anchor = document.createElement("a"); + anchor.href = linkService.getAnchorUrl("#page=" + id); + + this._thumbPageTitle.then(msg => { + anchor.title = msg; + }); + + anchor.onclick = function () { + linkService.page = id; + return false; + }; + + this.anchor = anchor; + const div = document.createElement("div"); + div.className = "thumbnail"; + div.setAttribute("data-page-number", this.id); + this.div = div; + const ring = document.createElement("div"); + ring.className = "thumbnailSelectionRing"; + const borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH; + ring.style.width = this.canvasWidth + borderAdjustment + "px"; + ring.style.height = this.canvasHeight + borderAdjustment + "px"; + this.ring = ring; + div.appendChild(ring); + anchor.appendChild(div); + container.appendChild(anchor); + } + + setPdfPage(pdfPage) { + this.pdfPage = pdfPage; + this.pdfPageRotate = pdfPage.rotate; + const totalRotation = (this.rotation + this.pdfPageRotate) % 360; + this.viewport = pdfPage.getViewport({ + scale: 1, + rotation: totalRotation + }); + this.reset(); + } + + reset() { + this.cancelRendering(); + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + this.pageWidth = this.viewport.width; + this.pageHeight = this.viewport.height; + this.pageRatio = this.pageWidth / this.pageHeight; + this.canvasHeight = this.canvasWidth / this.pageRatio | 0; + this.scale = this.canvasWidth / this.pageWidth; + this.div.removeAttribute("data-loaded"); + const ring = this.ring; + const childNodes = ring.childNodes; + + for (let i = childNodes.length - 1; i >= 0; i--) { + ring.removeChild(childNodes[i]); + } + + const borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH; + ring.style.width = this.canvasWidth + borderAdjustment + "px"; + ring.style.height = this.canvasHeight + borderAdjustment + "px"; + + if (this.canvas) { + this.canvas.width = 0; + this.canvas.height = 0; + delete this.canvas; + } + + if (this.image) { + this.image.removeAttribute("src"); + delete this.image; + } + } + + update(rotation) { + if (typeof rotation !== "undefined") { + this.rotation = rotation; + } + + const totalRotation = (this.rotation + this.pdfPageRotate) % 360; + this.viewport = this.viewport.clone({ + scale: 1, + rotation: totalRotation + }); + this.reset(); + } + + cancelRendering() { + if (this.renderTask) { + this.renderTask.cancel(); + this.renderTask = null; + } + + this.resume = null; + } + + _getPageDrawContext(noCtxScale = false) { + const canvas = document.createElement("canvas"); + this.canvas = canvas; + canvas.mozOpaque = true; + const ctx = canvas.getContext("2d", { + alpha: false + }); + const outputScale = (0, _ui_utils.getOutputScale)(ctx); + canvas.width = this.canvasWidth * outputScale.sx | 0; + canvas.height = this.canvasHeight * outputScale.sy | 0; + canvas.style.width = this.canvasWidth + "px"; + canvas.style.height = this.canvasHeight + "px"; + + if (!noCtxScale && outputScale.scaled) { + ctx.scale(outputScale.sx, outputScale.sy); + } + + return ctx; + } + + _convertCanvasToImage() { + if (!this.canvas) { + return; + } + + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) { + return; + } + + const className = "thumbnailImage"; + + if (this.disableCanvasToImageConversion) { + this.canvas.className = className; + + this._thumbPageCanvas.then(msg => { + this.canvas.setAttribute("aria-label", msg); + }); + + this.div.setAttribute("data-loaded", true); + this.ring.appendChild(this.canvas); + return; + } + + const image = document.createElement("img"); + image.className = className; + + this._thumbPageCanvas.then(msg => { + image.setAttribute("aria-label", msg); + }); + + image.style.width = this.canvasWidth + "px"; + image.style.height = this.canvasHeight + "px"; + image.src = this.canvas.toDataURL(); + this.image = image; + this.div.setAttribute("data-loaded", true); + this.ring.appendChild(image); + this.canvas.width = 0; + this.canvas.height = 0; + delete this.canvas; + } + + draw() { + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { + console.error("Must be in new state before drawing"); + return Promise.resolve(undefined); + } + + const { + pdfPage + } = this; + + if (!pdfPage) { + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + return Promise.reject(new Error("pdfPage is not loaded")); + } + + this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + const renderCapability = (0, _pdfjsLib.createPromiseCapability)(); + + const finishRenderTask = error => { + if (renderTask === this.renderTask) { + this.renderTask = null; + } + + if (error instanceof _pdfjsLib.RenderingCancelledException) { + renderCapability.resolve(undefined); + return; + } + + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + + this._convertCanvasToImage(); + + if (!error) { + renderCapability.resolve(undefined); + } else { + renderCapability.reject(error); + } + }; + + const ctx = this._getPageDrawContext(); + + const drawViewport = this.viewport.clone({ + scale: this.scale + }); + + const renderContinueCallback = cont => { + if (!this.renderingQueue.isHighestPriority(this)) { + this.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED; + + this.resume = () => { + this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + cont(); + }; + + return; + } + + cont(); + }; + + const renderContext = { + canvasContext: ctx, + viewport: drawViewport + }; + const renderTask = this.renderTask = pdfPage.render(renderContext); + renderTask.onContinue = renderContinueCallback; + renderTask.promise.then(function () { + finishRenderTask(null); + }, function (error) { + finishRenderTask(error); + }); + return renderCapability.promise; + } + + setImage(pageView) { + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { + return; + } + + const img = pageView.canvas; + + if (!img) { + return; + } + + if (!this.pdfPage) { + this.setPdfPage(pageView.pdfPage); + } + + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + + const ctx = this._getPageDrawContext(true); + + const canvas = ctx.canvas; + + if (img.width <= 2 * canvas.width) { + ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, canvas.height); + + this._convertCanvasToImage(); + + return; + } + + let reducedWidth = canvas.width << MAX_NUM_SCALING_STEPS; + let reducedHeight = canvas.height << MAX_NUM_SCALING_STEPS; + const reducedImage = TempImageFactory.getCanvas(reducedWidth, reducedHeight); + const reducedImageCtx = reducedImage.getContext("2d"); + + while (reducedWidth > img.width || reducedHeight > img.height) { + reducedWidth >>= 1; + reducedHeight >>= 1; + } + + reducedImageCtx.drawImage(img, 0, 0, img.width, img.height, 0, 0, reducedWidth, reducedHeight); + + while (reducedWidth > 2 * canvas.width) { + reducedImageCtx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, reducedWidth >> 1, reducedHeight >> 1); + reducedWidth >>= 1; + reducedHeight >>= 1; + } + + ctx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, canvas.width, canvas.height); + + this._convertCanvasToImage(); + } + + get _thumbPageTitle() { + return this.l10n.get("thumb_page_title", { + page: this.pageLabel !== null ? this.pageLabel : this.id + }, "Page {{page}}"); + } + + get _thumbPageCanvas() { + return this.l10n.get("thumb_page_canvas", { + page: this.pageLabel !== null ? this.pageLabel : this.id + }, "Thumbnail of Page {{page}}"); + } + + setPageLabel(label) { + this.pageLabel = typeof label === "string" ? label : null; + + this._thumbPageTitle.then(msg => { + this.anchor.title = msg; + }); + + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) { + return; + } + + this._thumbPageCanvas.then(msg => { + if (this.image) { + this.image.setAttribute("aria-label", msg); + } else if (this.disableCanvasToImageConversion && this.canvas) { + this.canvas.setAttribute("aria-label", msg); + } + }); + } + + static cleanup() { + TempImageFactory.destroyCanvas(); + } + +} + +exports.PDFThumbnailView = PDFThumbnailView; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFViewer = void 0; + +var _base_viewer = __webpack_require__(25); + +var _pdfjsLib = __webpack_require__(5); + +class PDFViewer extends _base_viewer.BaseViewer { + get _viewerElement() { + return (0, _pdfjsLib.shadow)(this, "_viewerElement", this.viewer); + } + + _scrollIntoView({ + pageDiv, + pageSpot = null, + pageNumber = null + }) { + if (!pageSpot && !this.isInPresentationMode) { + const left = pageDiv.offsetLeft + pageDiv.clientLeft; + const right = left + pageDiv.clientWidth; + const { + scrollLeft, + clientWidth + } = this.container; + + if (this._isScrollModeHorizontal || left < scrollLeft || right > scrollLeft + clientWidth) { + pageSpot = { + left: 0, + top: 0 + }; + } + } + + super._scrollIntoView({ + pageDiv, + pageSpot, + pageNumber + }); + } + + _getVisiblePages() { + if (this.isInPresentationMode) { + return this._getCurrentVisiblePage(); + } + + return super._getVisiblePages(); + } + + _updateHelper(visiblePages) { + if (this.isInPresentationMode) { + return; + } + + let currentId = this._currentPageNumber; + let stillFullyVisible = false; + + for (const page of visiblePages) { + if (page.percent < 100) { + break; + } + + if (page.id === currentId) { + stillFullyVisible = true; + break; + } + } + + if (!stillFullyVisible) { + currentId = visiblePages[0].id; + } + + this._setCurrentPageNumber(currentId); + } + +} + +exports.PDFViewer = PDFViewer; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.BaseViewer = void 0; + +var _ui_utils = __webpack_require__(2); + +var _pdf_rendering_queue = __webpack_require__(8); + +var _annotation_layer_builder = __webpack_require__(26); + +var _pdfjsLib = __webpack_require__(5); + +var _pdf_page_view = __webpack_require__(27); + +var _pdf_link_service = __webpack_require__(18); + +var _text_layer_builder = __webpack_require__(28); + +const DEFAULT_CACHE_SIZE = 10; + +function PDFPageViewBuffer(size) { + const data = []; + + this.push = function (view) { + const i = data.indexOf(view); + + if (i >= 0) { + data.splice(i, 1); + } + + data.push(view); + + if (data.length > size) { + data.shift().destroy(); + } + }; + + this.resize = function (newSize, pagesToKeep) { + size = newSize; + + if (pagesToKeep) { + const pageIdsToKeep = new Set(); + + for (let i = 0, iMax = pagesToKeep.length; i < iMax; ++i) { + pageIdsToKeep.add(pagesToKeep[i].id); + } + + (0, _ui_utils.moveToEndOfArray)(data, function (page) { + return pageIdsToKeep.has(page.id); + }); + } + + while (data.length > size) { + data.shift().destroy(); + } + }; +} + +function isSameScale(oldScale, newScale) { + if (newScale === oldScale) { + return true; + } + + if (Math.abs(newScale - oldScale) < 1e-15) { + return true; + } + + return false; +} + +class BaseViewer { + constructor(options) { + if (this.constructor === BaseViewer) { + throw new Error("Cannot initialize BaseViewer."); + } + + this._name = this.constructor.name; + this.container = options.container; + this.viewer = options.viewer || options.container.firstElementChild; + this.eventBus = options.eventBus; + this.linkService = options.linkService || new _pdf_link_service.SimpleLinkService(); + this.downloadManager = options.downloadManager || null; + this.findController = options.findController || null; + this.removePageBorders = options.removePageBorders || false; + this.textLayerMode = Number.isInteger(options.textLayerMode) ? options.textLayerMode : _ui_utils.TextLayerMode.ENABLE; + this.imageResourcesPath = options.imageResourcesPath || ""; + this.renderInteractiveForms = options.renderInteractiveForms || false; + this.enablePrintAutoRotate = options.enablePrintAutoRotate || false; + this.renderer = options.renderer || _ui_utils.RendererType.CANVAS; + this.enableWebGL = options.enableWebGL || false; + this.useOnlyCssZoom = options.useOnlyCssZoom || false; + this.maxCanvasPixels = options.maxCanvasPixels; + this.l10n = options.l10n || _ui_utils.NullL10n; + this.defaultRenderingQueue = !options.renderingQueue; + + if (this.defaultRenderingQueue) { + this.renderingQueue = new _pdf_rendering_queue.PDFRenderingQueue(); + this.renderingQueue.setViewer(this); + } else { + this.renderingQueue = options.renderingQueue; + } + + this.scroll = (0, _ui_utils.watchScroll)(this.container, this._scrollUpdate.bind(this)); + this.presentationModeState = _ui_utils.PresentationModeState.UNKNOWN; + this._onBeforeDraw = this._onAfterDraw = null; + + this._resetView(); + + if (this.removePageBorders) { + this.viewer.classList.add("removePageBorders"); + } + + Promise.resolve().then(() => { + this.eventBus.dispatch("baseviewerinit", { + source: this + }); + }); + } + + get pagesCount() { + return this._pages.length; + } + + getPageView(index) { + return this._pages[index]; + } + + get pageViewsReady() { + if (!this._pagesCapability.settled) { + return false; + } + + return this._pages.every(function (pageView) { + return pageView && pageView.pdfPage; + }); + } + + get currentPageNumber() { + return this._currentPageNumber; + } + + set currentPageNumber(val) { + if (!Number.isInteger(val)) { + throw new Error("Invalid page number."); + } + + if (!this.pdfDocument) { + return; + } + + if (!this._setCurrentPageNumber(val, true)) { + console.error(`${this._name}.currentPageNumber: "${val}" is not a valid page.`); + } + } + + _setCurrentPageNumber(val, resetCurrentPageView = false) { + if (this._currentPageNumber === val) { + if (resetCurrentPageView) { + this._resetCurrentPageView(); + } + + return true; + } + + if (!(0 < val && val <= this.pagesCount)) { + return false; + } + + this._currentPageNumber = val; + this.eventBus.dispatch("pagechanging", { + source: this, + pageNumber: val, + pageLabel: this._pageLabels && this._pageLabels[val - 1] + }); + + if (resetCurrentPageView) { + this._resetCurrentPageView(); + } + + return true; + } + + get currentPageLabel() { + return this._pageLabels && this._pageLabels[this._currentPageNumber - 1]; + } + + set currentPageLabel(val) { + if (!this.pdfDocument) { + return; + } + + let page = val | 0; + + if (this._pageLabels) { + const i = this._pageLabels.indexOf(val); + + if (i >= 0) { + page = i + 1; + } + } + + if (!this._setCurrentPageNumber(page, true)) { + console.error(`${this._name}.currentPageLabel: "${val}" is not a valid page.`); + } + } + + get currentScale() { + return this._currentScale !== _ui_utils.UNKNOWN_SCALE ? this._currentScale : _ui_utils.DEFAULT_SCALE; + } + + set currentScale(val) { + if (isNaN(val)) { + throw new Error("Invalid numeric scale."); + } + + if (!this.pdfDocument) { + return; + } + + this._setScale(val, false); + } + + get currentScaleValue() { + return this._currentScaleValue; + } + + set currentScaleValue(val) { + if (!this.pdfDocument) { + return; + } + + this._setScale(val, false); + } + + get pagesRotation() { + return this._pagesRotation; + } + + set pagesRotation(rotation) { + if (!(0, _ui_utils.isValidRotation)(rotation)) { + throw new Error("Invalid pages rotation angle."); + } + + if (!this.pdfDocument) { + return; + } + + if (this._pagesRotation === rotation) { + return; + } + + this._pagesRotation = rotation; + const pageNumber = this._currentPageNumber; + + for (let i = 0, ii = this._pages.length; i < ii; i++) { + const pageView = this._pages[i]; + pageView.update(pageView.scale, rotation); + } + + if (this._currentScaleValue) { + this._setScale(this._currentScaleValue, true); + } + + this.eventBus.dispatch("rotationchanging", { + source: this, + pagesRotation: rotation, + pageNumber + }); + + if (this.defaultRenderingQueue) { + this.update(); + } + } + + get firstPagePromise() { + return this.pdfDocument ? this._firstPageCapability.promise : null; + } + + get onePageRendered() { + return this.pdfDocument ? this._onePageRenderedCapability.promise : null; + } + + get pagesPromise() { + return this.pdfDocument ? this._pagesCapability.promise : null; + } + + get _viewerElement() { + throw new Error("Not implemented: _viewerElement"); + } + + _onePageRenderedOrForceFetch() { + if (!this.container.offsetParent || this._getVisiblePages().views.length === 0) { + return Promise.resolve(); + } + + return this._onePageRenderedCapability.promise; + } + + setDocument(pdfDocument) { + if (this.pdfDocument) { + this._cancelRendering(); + + this._resetView(); + + if (this.findController) { + this.findController.setDocument(null); + } + } + + this.pdfDocument = pdfDocument; + + if (!pdfDocument) { + return; + } + + const pagesCount = pdfDocument.numPages; + const firstPagePromise = pdfDocument.getPage(1); + + this._pagesCapability.promise.then(() => { + this.eventBus.dispatch("pagesloaded", { + source: this, + pagesCount + }); + }); + + this._onBeforeDraw = evt => { + const pageView = this._pages[evt.pageNumber - 1]; + + if (!pageView) { + return; + } + + this._buffer.push(pageView); + }; + + this.eventBus._on("pagerender", this._onBeforeDraw); + + this._onAfterDraw = evt => { + if (evt.cssTransform || this._onePageRenderedCapability.settled) { + return; + } + + this._onePageRenderedCapability.resolve(); + + this.eventBus._off("pagerendered", this._onAfterDraw); + + this._onAfterDraw = null; + }; + + this.eventBus._on("pagerendered", this._onAfterDraw); + + firstPagePromise.then(firstPdfPage => { + this._firstPageCapability.resolve(firstPdfPage); + + const scale = this.currentScale; + const viewport = firstPdfPage.getViewport({ + scale: scale * _ui_utils.CSS_UNITS + }); + const textLayerFactory = this.textLayerMode !== _ui_utils.TextLayerMode.DISABLE ? this : null; + + for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) { + const pageView = new _pdf_page_view.PDFPageView({ + container: this._viewerElement, + eventBus: this.eventBus, + id: pageNum, + scale, + defaultViewport: viewport.clone(), + renderingQueue: this.renderingQueue, + textLayerFactory, + textLayerMode: this.textLayerMode, + annotationLayerFactory: this, + imageResourcesPath: this.imageResourcesPath, + renderInteractiveForms: this.renderInteractiveForms, + renderer: this.renderer, + enableWebGL: this.enableWebGL, + useOnlyCssZoom: this.useOnlyCssZoom, + maxCanvasPixels: this.maxCanvasPixels, + l10n: this.l10n + }); + + this._pages.push(pageView); + } + + const firstPageView = this._pages[0]; + + if (firstPageView) { + firstPageView.setPdfPage(firstPdfPage); + this.linkService.cachePageRef(1, firstPdfPage.ref); + } + + if (this._spreadMode !== _ui_utils.SpreadMode.NONE) { + this._updateSpreadMode(); + } + + this._onePageRenderedOrForceFetch().then(() => { + if (this.findController) { + this.findController.setDocument(pdfDocument); + } + + if (pdfDocument.loadingParams.disableAutoFetch || pagesCount > 7500) { + this._pagesCapability.resolve(); + + return; + } + + let getPagesLeft = pagesCount - 1; + + if (getPagesLeft <= 0) { + this._pagesCapability.resolve(); + + return; + } + + for (let pageNum = 2; pageNum <= pagesCount; ++pageNum) { + pdfDocument.getPage(pageNum).then(pdfPage => { + const pageView = this._pages[pageNum - 1]; + + if (!pageView.pdfPage) { + pageView.setPdfPage(pdfPage); + } + + this.linkService.cachePageRef(pageNum, pdfPage.ref); + + if (--getPagesLeft === 0) { + this._pagesCapability.resolve(); + } + }, reason => { + console.error(`Unable to get page ${pageNum} to initialize viewer`, reason); + + if (--getPagesLeft === 0) { + this._pagesCapability.resolve(); + } + }); + } + }); + + this.eventBus.dispatch("pagesinit", { + source: this + }); + + if (this.defaultRenderingQueue) { + this.update(); + } + }).catch(reason => { + console.error("Unable to initialize viewer", reason); + }); + } + + setPageLabels(labels) { + if (!this.pdfDocument) { + return; + } + + if (!labels) { + this._pageLabels = null; + } else if (!(Array.isArray(labels) && this.pdfDocument.numPages === labels.length)) { + this._pageLabels = null; + console.error(`${this._name}.setPageLabels: Invalid page labels.`); + } else { + this._pageLabels = labels; + } + + for (let i = 0, ii = this._pages.length; i < ii; i++) { + const pageView = this._pages[i]; + const label = this._pageLabels && this._pageLabels[i]; + pageView.setPageLabel(label); + } + } + + _resetView() { + this._pages = []; + this._currentPageNumber = 1; + this._currentScale = _ui_utils.UNKNOWN_SCALE; + this._currentScaleValue = null; + this._pageLabels = null; + this._buffer = new PDFPageViewBuffer(DEFAULT_CACHE_SIZE); + this._location = null; + this._pagesRotation = 0; + this._pagesRequests = new WeakMap(); + this._firstPageCapability = (0, _pdfjsLib.createPromiseCapability)(); + this._onePageRenderedCapability = (0, _pdfjsLib.createPromiseCapability)(); + this._pagesCapability = (0, _pdfjsLib.createPromiseCapability)(); + this._scrollMode = _ui_utils.ScrollMode.VERTICAL; + this._spreadMode = _ui_utils.SpreadMode.NONE; + + if (this._onBeforeDraw) { + this.eventBus._off("pagerender", this._onBeforeDraw); + + this._onBeforeDraw = null; + } + + if (this._onAfterDraw) { + this.eventBus._off("pagerendered", this._onAfterDraw); + + this._onAfterDraw = null; + } + + this.viewer.textContent = ""; + + this._updateScrollMode(); + } + + _scrollUpdate() { + if (this.pagesCount === 0) { + return; + } + + this.update(); + } + + _scrollIntoView({ + pageDiv, + pageSpot = null, + pageNumber = null + }) { + (0, _ui_utils.scrollIntoView)(pageDiv, pageSpot); + } + + _setScaleUpdatePages(newScale, newValue, noScroll = false, preset = false) { + this._currentScaleValue = newValue.toString(); + + if (isSameScale(this._currentScale, newScale)) { + if (preset) { + this.eventBus.dispatch("scalechanging", { + source: this, + scale: newScale, + presetValue: newValue + }); + } + + return; + } + + for (let i = 0, ii = this._pages.length; i < ii; i++) { + this._pages[i].update(newScale); + } + + this._currentScale = newScale; + + if (!noScroll) { + let page = this._currentPageNumber, + dest; + + if (this._location && !(this.isInPresentationMode || this.isChangingPresentationMode)) { + page = this._location.pageNumber; + dest = [null, { + name: "XYZ" + }, this._location.left, this._location.top, null]; + } + + this.scrollPageIntoView({ + pageNumber: page, + destArray: dest, + allowNegativeOffset: true + }); + } + + this.eventBus.dispatch("scalechanging", { + source: this, + scale: newScale, + presetValue: preset ? newValue : undefined + }); + + if (this.defaultRenderingQueue) { + this.update(); + } + } + + _setScale(value, noScroll = false) { + let scale = parseFloat(value); + + if (scale > 0) { + this._setScaleUpdatePages(scale, value, noScroll, false); + } else { + const currentPage = this._pages[this._currentPageNumber - 1]; + + if (!currentPage) { + return; + } + + const noPadding = this.isInPresentationMode || this.removePageBorders; + let hPadding = noPadding ? 0 : _ui_utils.SCROLLBAR_PADDING; + let vPadding = noPadding ? 0 : _ui_utils.VERTICAL_PADDING; + + if (!noPadding && this._isScrollModeHorizontal) { + [hPadding, vPadding] = [vPadding, hPadding]; + } + + const pageWidthScale = (this.container.clientWidth - hPadding) / currentPage.width * currentPage.scale; + const pageHeightScale = (this.container.clientHeight - vPadding) / currentPage.height * currentPage.scale; + + switch (value) { + case "page-actual": + scale = 1; + break; + + case "page-width": + scale = pageWidthScale; + break; + + case "page-height": + scale = pageHeightScale; + break; + + case "page-fit": + scale = Math.min(pageWidthScale, pageHeightScale); + break; + + case "auto": + const horizontalScale = (0, _ui_utils.isPortraitOrientation)(currentPage) ? pageWidthScale : Math.min(pageHeightScale, pageWidthScale); + scale = Math.min(_ui_utils.MAX_AUTO_SCALE, horizontalScale); + break; + + default: + console.error(`${this._name}._setScale: "${value}" is an unknown zoom value.`); + return; + } + + this._setScaleUpdatePages(scale, value, noScroll, true); + } + } + + _resetCurrentPageView() { + if (this.isInPresentationMode) { + this._setScale(this._currentScaleValue, true); + } + + const pageView = this._pages[this._currentPageNumber - 1]; + + this._scrollIntoView({ + pageDiv: pageView.div + }); + } + + scrollPageIntoView({ + pageNumber, + destArray = null, + allowNegativeOffset = false, + ignoreDestinationZoom = false + }) { + if (!this.pdfDocument) { + return; + } + + const pageView = Number.isInteger(pageNumber) && this._pages[pageNumber - 1]; + + if (!pageView) { + console.error(`${this._name}.scrollPageIntoView: ` + `"${pageNumber}" is not a valid pageNumber parameter.`); + return; + } + + if (this.isInPresentationMode || !destArray) { + this._setCurrentPageNumber(pageNumber, true); + + return; + } + + let x = 0, + y = 0; + let width = 0, + height = 0, + widthScale, + heightScale; + const changeOrientation = pageView.rotation % 180 !== 0; + const pageWidth = (changeOrientation ? pageView.height : pageView.width) / pageView.scale / _ui_utils.CSS_UNITS; + const pageHeight = (changeOrientation ? pageView.width : pageView.height) / pageView.scale / _ui_utils.CSS_UNITS; + let scale = 0; + + switch (destArray[1].name) { + case "XYZ": + x = destArray[2]; + y = destArray[3]; + scale = destArray[4]; + x = x !== null ? x : 0; + y = y !== null ? y : pageHeight; + break; + + case "Fit": + case "FitB": + scale = "page-fit"; + break; + + case "FitH": + case "FitBH": + y = destArray[2]; + scale = "page-width"; + + if (y === null && this._location) { + x = this._location.left; + y = this._location.top; + } + + break; + + case "FitV": + case "FitBV": + x = destArray[2]; + width = pageWidth; + height = pageHeight; + scale = "page-height"; + break; + + case "FitR": + x = destArray[2]; + y = destArray[3]; + width = destArray[4] - x; + height = destArray[5] - y; + const hPadding = this.removePageBorders ? 0 : _ui_utils.SCROLLBAR_PADDING; + const vPadding = this.removePageBorders ? 0 : _ui_utils.VERTICAL_PADDING; + widthScale = (this.container.clientWidth - hPadding) / width / _ui_utils.CSS_UNITS; + heightScale = (this.container.clientHeight - vPadding) / height / _ui_utils.CSS_UNITS; + scale = Math.min(Math.abs(widthScale), Math.abs(heightScale)); + break; + + default: + console.error(`${this._name}.scrollPageIntoView: ` + `"${destArray[1].name}" is not a valid destination type.`); + return; + } + + if (!ignoreDestinationZoom) { + if (scale && scale !== this._currentScale) { + this.currentScaleValue = scale; + } else if (this._currentScale === _ui_utils.UNKNOWN_SCALE) { + this.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + } + } + + if (scale === "page-fit" && !destArray[4]) { + this._scrollIntoView({ + pageDiv: pageView.div, + pageNumber + }); + + return; + } + + const boundingRect = [pageView.viewport.convertToViewportPoint(x, y), pageView.viewport.convertToViewportPoint(x + width, y + height)]; + let left = Math.min(boundingRect[0][0], boundingRect[1][0]); + let top = Math.min(boundingRect[0][1], boundingRect[1][1]); + + if (!allowNegativeOffset) { + left = Math.max(left, 0); + top = Math.max(top, 0); + } + + this._scrollIntoView({ + pageDiv: pageView.div, + pageSpot: { + left, + top + }, + pageNumber + }); + } + + _updateLocation(firstPage) { + const currentScale = this._currentScale; + const currentScaleValue = this._currentScaleValue; + const normalizedScaleValue = parseFloat(currentScaleValue) === currentScale ? Math.round(currentScale * 10000) / 100 : currentScaleValue; + const pageNumber = firstPage.id; + let pdfOpenParams = "#page=" + pageNumber; + pdfOpenParams += "&zoom=" + normalizedScaleValue; + const currentPageView = this._pages[pageNumber - 1]; + const container = this.container; + const topLeft = currentPageView.getPagePoint(container.scrollLeft - firstPage.x, container.scrollTop - firstPage.y); + const intLeft = Math.round(topLeft[0]); + const intTop = Math.round(topLeft[1]); + pdfOpenParams += "," + intLeft + "," + intTop; + this._location = { + pageNumber, + scale: normalizedScaleValue, + top: intTop, + left: intLeft, + rotation: this._pagesRotation, + pdfOpenParams + }; + } + + _updateHelper(visiblePages) { + throw new Error("Not implemented: _updateHelper"); + } + + update() { + const visible = this._getVisiblePages(); + + const visiblePages = visible.views, + numVisiblePages = visiblePages.length; + + if (numVisiblePages === 0) { + return; + } + + const newCacheSize = Math.max(DEFAULT_CACHE_SIZE, 2 * numVisiblePages + 1); + + this._buffer.resize(newCacheSize, visiblePages); + + this.renderingQueue.renderHighestPriority(visible); + + this._updateHelper(visiblePages); + + this._updateLocation(visible.first); + + this.eventBus.dispatch("updateviewarea", { + source: this, + location: this._location + }); + } + + containsElement(element) { + return this.container.contains(element); + } + + focus() { + this.container.focus(); + } + + get _isScrollModeHorizontal() { + return this.isInPresentationMode ? false : this._scrollMode === _ui_utils.ScrollMode.HORIZONTAL; + } + + get isInPresentationMode() { + return this.presentationModeState === _ui_utils.PresentationModeState.FULLSCREEN; + } + + get isChangingPresentationMode() { + return this.presentationModeState === _ui_utils.PresentationModeState.CHANGING; + } + + get isHorizontalScrollbarEnabled() { + return this.isInPresentationMode ? false : this.container.scrollWidth > this.container.clientWidth; + } + + get isVerticalScrollbarEnabled() { + return this.isInPresentationMode ? false : this.container.scrollHeight > this.container.clientHeight; + } + + _getCurrentVisiblePage() { + if (!this.pagesCount) { + return { + views: [] + }; + } + + const pageView = this._pages[this._currentPageNumber - 1]; + const element = pageView.div; + const view = { + id: pageView.id, + x: element.offsetLeft + element.clientLeft, + y: element.offsetTop + element.clientTop, + view: pageView + }; + return { + first: view, + last: view, + views: [view] + }; + } + + _getVisiblePages() { + return (0, _ui_utils.getVisibleElements)(this.container, this._pages, true, this._isScrollModeHorizontal); + } + + isPageVisible(pageNumber) { + if (!this.pdfDocument) { + return false; + } + + if (pageNumber < 1 || pageNumber > this.pagesCount) { + console.error(`${this._name}.isPageVisible: "${pageNumber}" is out of bounds.`); + return false; + } + + return this._getVisiblePages().views.some(function (view) { + return view.id === pageNumber; + }); + } + + cleanup() { + for (let i = 0, ii = this._pages.length; i < ii; i++) { + if (this._pages[i] && this._pages[i].renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) { + this._pages[i].reset(); + } + } + } + + _cancelRendering() { + for (let i = 0, ii = this._pages.length; i < ii; i++) { + if (this._pages[i]) { + this._pages[i].cancelRendering(); + } + } + } + + _ensurePdfPageLoaded(pageView) { + if (pageView.pdfPage) { + return Promise.resolve(pageView.pdfPage); + } + + if (this._pagesRequests.has(pageView)) { + return this._pagesRequests.get(pageView); + } + + const promise = this.pdfDocument.getPage(pageView.id).then(pdfPage => { + if (!pageView.pdfPage) { + pageView.setPdfPage(pdfPage); + } + + this._pagesRequests.delete(pageView); + + return pdfPage; + }).catch(reason => { + console.error("Unable to get page for page view", reason); + + this._pagesRequests.delete(pageView); + }); + + this._pagesRequests.set(pageView, promise); + + return promise; + } + + forceRendering(currentlyVisiblePages) { + const visiblePages = currentlyVisiblePages || this._getVisiblePages(); + + const scrollAhead = this._isScrollModeHorizontal ? this.scroll.right : this.scroll.down; + const pageView = this.renderingQueue.getHighestPriority(visiblePages, this._pages, scrollAhead); + + if (pageView) { + this._ensurePdfPageLoaded(pageView).then(() => { + this.renderingQueue.renderView(pageView); + }); + + return true; + } + + return false; + } + + createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection = false, eventBus) { + return new _text_layer_builder.TextLayerBuilder({ + textLayerDiv, + eventBus, + pageIndex, + viewport, + findController: this.isInPresentationMode ? null : this.findController, + enhanceTextSelection: this.isInPresentationMode ? false : enhanceTextSelection + }); + } + + createAnnotationLayerBuilder(pageDiv, pdfPage, imageResourcesPath = "", renderInteractiveForms = false, l10n = _ui_utils.NullL10n) { + return new _annotation_layer_builder.AnnotationLayerBuilder({ + pageDiv, + pdfPage, + imageResourcesPath, + renderInteractiveForms, + linkService: this.linkService, + downloadManager: this.downloadManager, + l10n + }); + } + + get hasEqualPageSizes() { + const firstPageView = this._pages[0]; + + for (let i = 1, ii = this._pages.length; i < ii; ++i) { + const pageView = this._pages[i]; + + if (pageView.width !== firstPageView.width || pageView.height !== firstPageView.height) { + return false; + } + } + + return true; + } + + getPagesOverview() { + const pagesOverview = this._pages.map(function (pageView) { + const viewport = pageView.pdfPage.getViewport({ + scale: 1 + }); + return { + width: viewport.width, + height: viewport.height, + rotation: viewport.rotation + }; + }); + + if (!this.enablePrintAutoRotate) { + return pagesOverview; + } + + const isFirstPagePortrait = (0, _ui_utils.isPortraitOrientation)(pagesOverview[0]); + return pagesOverview.map(function (size) { + if (isFirstPagePortrait === (0, _ui_utils.isPortraitOrientation)(size)) { + return size; + } + + return { + width: size.height, + height: size.width, + rotation: (size.rotation + 90) % 360 + }; + }); + } + + get scrollMode() { + return this._scrollMode; + } + + set scrollMode(mode) { + if (this._scrollMode === mode) { + return; + } + + if (!(0, _ui_utils.isValidScrollMode)(mode)) { + throw new Error(`Invalid scroll mode: ${mode}`); + } + + this._scrollMode = mode; + this.eventBus.dispatch("scrollmodechanged", { + source: this, + mode + }); + + this._updateScrollMode(this._currentPageNumber); + } + + _updateScrollMode(pageNumber = null) { + const scrollMode = this._scrollMode, + viewer = this.viewer; + viewer.classList.toggle("scrollHorizontal", scrollMode === _ui_utils.ScrollMode.HORIZONTAL); + viewer.classList.toggle("scrollWrapped", scrollMode === _ui_utils.ScrollMode.WRAPPED); + + if (!this.pdfDocument || !pageNumber) { + return; + } + + if (this._currentScaleValue && isNaN(this._currentScaleValue)) { + this._setScale(this._currentScaleValue, true); + } + + this._setCurrentPageNumber(pageNumber, true); + + this.update(); + } + + get spreadMode() { + return this._spreadMode; + } + + set spreadMode(mode) { + if (this._spreadMode === mode) { + return; + } + + if (!(0, _ui_utils.isValidSpreadMode)(mode)) { + throw new Error(`Invalid spread mode: ${mode}`); + } + + this._spreadMode = mode; + this.eventBus.dispatch("spreadmodechanged", { + source: this, + mode + }); + + this._updateSpreadMode(this._currentPageNumber); + } + + _updateSpreadMode(pageNumber = null) { + if (!this.pdfDocument) { + return; + } + + const viewer = this.viewer, + pages = this._pages; + viewer.textContent = ""; + + if (this._spreadMode === _ui_utils.SpreadMode.NONE) { + for (let i = 0, iMax = pages.length; i < iMax; ++i) { + viewer.appendChild(pages[i].div); + } + } else { + const parity = this._spreadMode - 1; + let spread = null; + + for (let i = 0, iMax = pages.length; i < iMax; ++i) { + if (spread === null) { + spread = document.createElement("div"); + spread.className = "spread"; + viewer.appendChild(spread); + } else if (i % 2 === parity) { + spread = spread.cloneNode(false); + viewer.appendChild(spread); + } + + spread.appendChild(pages[i].div); + } + } + + if (!pageNumber) { + return; + } + + this._setCurrentPageNumber(pageNumber, true); + + this.update(); + } + +} + +exports.BaseViewer = BaseViewer; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DefaultAnnotationLayerFactory = exports.AnnotationLayerBuilder = void 0; + +var _pdfjsLib = __webpack_require__(5); + +var _ui_utils = __webpack_require__(2); + +var _pdf_link_service = __webpack_require__(18); + +class AnnotationLayerBuilder { + constructor({ + pageDiv, + pdfPage, + linkService, + downloadManager, + imageResourcesPath = "", + renderInteractiveForms = false, + l10n = _ui_utils.NullL10n + }) { + this.pageDiv = pageDiv; + this.pdfPage = pdfPage; + this.linkService = linkService; + this.downloadManager = downloadManager; + this.imageResourcesPath = imageResourcesPath; + this.renderInteractiveForms = renderInteractiveForms; + this.l10n = l10n; + this.div = null; + this._cancelled = false; + } + + render(viewport, intent = "display") { + this.pdfPage.getAnnotations({ + intent + }).then(annotations => { + if (this._cancelled) { + return; + } + + const parameters = { + viewport: viewport.clone({ + dontFlip: true + }), + div: this.div, + annotations, + page: this.pdfPage, + imageResourcesPath: this.imageResourcesPath, + renderInteractiveForms: this.renderInteractiveForms, + linkService: this.linkService, + downloadManager: this.downloadManager + }; + + if (this.div) { + _pdfjsLib.AnnotationLayer.update(parameters); + } else { + if (annotations.length === 0) { + return; + } + + this.div = document.createElement("div"); + this.div.className = "annotationLayer"; + this.pageDiv.appendChild(this.div); + parameters.div = this.div; + + _pdfjsLib.AnnotationLayer.render(parameters); + + this.l10n.translate(this.div); + } + }); + } + + cancel() { + this._cancelled = true; + } + + hide() { + if (!this.div) { + return; + } + + this.div.setAttribute("hidden", "true"); + } + +} + +exports.AnnotationLayerBuilder = AnnotationLayerBuilder; + +class DefaultAnnotationLayerFactory { + createAnnotationLayerBuilder(pageDiv, pdfPage, imageResourcesPath = "", renderInteractiveForms = false, l10n = _ui_utils.NullL10n) { + return new AnnotationLayerBuilder({ + pageDiv, + pdfPage, + imageResourcesPath, + renderInteractiveForms, + linkService: new _pdf_link_service.SimpleLinkService(), + l10n + }); + } + +} + +exports.DefaultAnnotationLayerFactory = DefaultAnnotationLayerFactory; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFPageView = void 0; + +var _ui_utils = __webpack_require__(2); + +var _pdfjsLib = __webpack_require__(5); + +var _pdf_rendering_queue = __webpack_require__(8); + +var _viewer_compatibility = __webpack_require__(4); + +const MAX_CANVAS_PIXELS = _viewer_compatibility.viewerCompatibilityParams.maxCanvasPixels || 16777216; + +class PDFPageView { + constructor(options) { + const container = options.container; + const defaultViewport = options.defaultViewport; + this.id = options.id; + this.renderingId = "page" + this.id; + this.pdfPage = null; + this.pageLabel = null; + this.rotation = 0; + this.scale = options.scale || _ui_utils.DEFAULT_SCALE; + this.viewport = defaultViewport; + this.pdfPageRotate = defaultViewport.rotation; + this.hasRestrictedScaling = false; + this.textLayerMode = Number.isInteger(options.textLayerMode) ? options.textLayerMode : _ui_utils.TextLayerMode.ENABLE; + this.imageResourcesPath = options.imageResourcesPath || ""; + this.renderInteractiveForms = options.renderInteractiveForms || false; + this.useOnlyCssZoom = options.useOnlyCssZoom || false; + this.maxCanvasPixels = options.maxCanvasPixels || MAX_CANVAS_PIXELS; + this.eventBus = options.eventBus; + this.renderingQueue = options.renderingQueue; + this.textLayerFactory = options.textLayerFactory; + this.annotationLayerFactory = options.annotationLayerFactory; + this.renderer = options.renderer || _ui_utils.RendererType.CANVAS; + this.enableWebGL = options.enableWebGL || false; + this.l10n = options.l10n || _ui_utils.NullL10n; + this.paintTask = null; + this.paintedViewportMap = new WeakMap(); + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + this.resume = null; + this.error = null; + this.annotationLayer = null; + this.textLayer = null; + this.zoomLayer = null; + const div = document.createElement("div"); + div.className = "page"; + div.style.width = Math.floor(this.viewport.width) + "px"; + div.style.height = Math.floor(this.viewport.height) + "px"; + div.setAttribute("data-page-number", this.id); + this.div = div; + container.appendChild(div); + } + + setPdfPage(pdfPage) { + this.pdfPage = pdfPage; + this.pdfPageRotate = pdfPage.rotate; + const totalRotation = (this.rotation + this.pdfPageRotate) % 360; + this.viewport = pdfPage.getViewport({ + scale: this.scale * _ui_utils.CSS_UNITS, + rotation: totalRotation + }); + this.stats = pdfPage.stats; + this.reset(); + } + + destroy() { + this.reset(); + + if (this.pdfPage) { + this.pdfPage.cleanup(); + } + } + + _resetZoomLayer(removeFromDOM = false) { + if (!this.zoomLayer) { + return; + } + + const zoomLayerCanvas = this.zoomLayer.firstChild; + this.paintedViewportMap.delete(zoomLayerCanvas); + zoomLayerCanvas.width = 0; + zoomLayerCanvas.height = 0; + + if (removeFromDOM) { + this.zoomLayer.remove(); + } + + this.zoomLayer = null; + } + + reset(keepZoomLayer = false, keepAnnotations = false) { + this.cancelRendering(keepAnnotations); + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + const div = this.div; + div.style.width = Math.floor(this.viewport.width) + "px"; + div.style.height = Math.floor(this.viewport.height) + "px"; + const childNodes = div.childNodes; + const currentZoomLayerNode = keepZoomLayer && this.zoomLayer || null; + const currentAnnotationNode = keepAnnotations && this.annotationLayer && this.annotationLayer.div || null; + + for (let i = childNodes.length - 1; i >= 0; i--) { + const node = childNodes[i]; + + if (currentZoomLayerNode === node || currentAnnotationNode === node) { + continue; + } + + div.removeChild(node); + } + + div.removeAttribute("data-loaded"); + + if (currentAnnotationNode) { + this.annotationLayer.hide(); + } else if (this.annotationLayer) { + this.annotationLayer.cancel(); + this.annotationLayer = null; + } + + if (!currentZoomLayerNode) { + if (this.canvas) { + this.paintedViewportMap.delete(this.canvas); + this.canvas.width = 0; + this.canvas.height = 0; + delete this.canvas; + } + + this._resetZoomLayer(); + } + + if (this.svg) { + this.paintedViewportMap.delete(this.svg); + delete this.svg; + } + + this.loadingIconDiv = document.createElement("div"); + this.loadingIconDiv.className = "loadingIcon"; + div.appendChild(this.loadingIconDiv); + } + + update(scale, rotation) { + this.scale = scale || this.scale; + + if (typeof rotation !== "undefined") { + this.rotation = rotation; + } + + const totalRotation = (this.rotation + this.pdfPageRotate) % 360; + this.viewport = this.viewport.clone({ + scale: this.scale * _ui_utils.CSS_UNITS, + rotation: totalRotation + }); + + if (this.svg) { + this.cssTransform(this.svg, true); + this.eventBus.dispatch("pagerendered", { + source: this, + pageNumber: this.id, + cssTransform: true, + timestamp: performance.now() + }); + return; + } + + let isScalingRestricted = false; + + if (this.canvas && this.maxCanvasPixels > 0) { + const outputScale = this.outputScale; + + if ((Math.floor(this.viewport.width) * outputScale.sx | 0) * (Math.floor(this.viewport.height) * outputScale.sy | 0) > this.maxCanvasPixels) { + isScalingRestricted = true; + } + } + + if (this.canvas) { + if (this.useOnlyCssZoom || this.hasRestrictedScaling && isScalingRestricted) { + this.cssTransform(this.canvas, true); + this.eventBus.dispatch("pagerendered", { + source: this, + pageNumber: this.id, + cssTransform: true, + timestamp: performance.now() + }); + return; + } + + if (!this.zoomLayer && !this.canvas.hasAttribute("hidden")) { + this.zoomLayer = this.canvas.parentNode; + this.zoomLayer.style.position = "absolute"; + } + } + + if (this.zoomLayer) { + this.cssTransform(this.zoomLayer.firstChild); + } + + this.reset(true, true); + } + + cancelRendering(keepAnnotations = false) { + if (this.paintTask) { + this.paintTask.cancel(); + this.paintTask = null; + } + + this.resume = null; + + if (this.textLayer) { + this.textLayer.cancel(); + this.textLayer = null; + } + + if (!keepAnnotations && this.annotationLayer) { + this.annotationLayer.cancel(); + this.annotationLayer = null; + } + } + + cssTransform(target, redrawAnnotations = false) { + const width = this.viewport.width; + const height = this.viewport.height; + const div = this.div; + target.style.width = target.parentNode.style.width = div.style.width = Math.floor(width) + "px"; + target.style.height = target.parentNode.style.height = div.style.height = Math.floor(height) + "px"; + const relativeRotation = this.viewport.rotation - this.paintedViewportMap.get(target).rotation; + const absRotation = Math.abs(relativeRotation); + let scaleX = 1, + scaleY = 1; + + if (absRotation === 90 || absRotation === 270) { + scaleX = height / width; + scaleY = width / height; + } + + const cssTransform = "rotate(" + relativeRotation + "deg) " + "scale(" + scaleX + "," + scaleY + ")"; + target.style.transform = cssTransform; + + if (this.textLayer) { + const textLayerViewport = this.textLayer.viewport; + const textRelativeRotation = this.viewport.rotation - textLayerViewport.rotation; + const textAbsRotation = Math.abs(textRelativeRotation); + let scale = width / textLayerViewport.width; + + if (textAbsRotation === 90 || textAbsRotation === 270) { + scale = width / textLayerViewport.height; + } + + const textLayerDiv = this.textLayer.textLayerDiv; + let transX, transY; + + switch (textAbsRotation) { + case 0: + transX = transY = 0; + break; + + case 90: + transX = 0; + transY = "-" + textLayerDiv.style.height; + break; + + case 180: + transX = "-" + textLayerDiv.style.width; + transY = "-" + textLayerDiv.style.height; + break; + + case 270: + transX = "-" + textLayerDiv.style.width; + transY = 0; + break; + + default: + console.error("Bad rotation value."); + break; + } + + textLayerDiv.style.transform = "rotate(" + textAbsRotation + "deg) " + "scale(" + scale + ", " + scale + ") " + "translate(" + transX + ", " + transY + ")"; + textLayerDiv.style.transformOrigin = "0% 0%"; + } + + if (redrawAnnotations && this.annotationLayer) { + this.annotationLayer.render(this.viewport, "display"); + } + } + + get width() { + return this.viewport.width; + } + + get height() { + return this.viewport.height; + } + + getPagePoint(x, y) { + return this.viewport.convertToPdfPoint(x, y); + } + + draw() { + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { + console.error("Must be in new state before drawing"); + this.reset(); + } + + const { + div, + pdfPage + } = this; + + if (!pdfPage) { + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + + if (this.loadingIconDiv) { + div.removeChild(this.loadingIconDiv); + delete this.loadingIconDiv; + } + + return Promise.reject(new Error("pdfPage is not loaded")); + } + + this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + const canvasWrapper = document.createElement("div"); + canvasWrapper.style.width = div.style.width; + canvasWrapper.style.height = div.style.height; + canvasWrapper.classList.add("canvasWrapper"); + + if (this.annotationLayer && this.annotationLayer.div) { + div.insertBefore(canvasWrapper, this.annotationLayer.div); + } else { + div.appendChild(canvasWrapper); + } + + let textLayer = null; + + if (this.textLayerMode !== _ui_utils.TextLayerMode.DISABLE && this.textLayerFactory) { + const textLayerDiv = document.createElement("div"); + textLayerDiv.className = "textLayer"; + textLayerDiv.style.width = canvasWrapper.style.width; + textLayerDiv.style.height = canvasWrapper.style.height; + + if (this.annotationLayer && this.annotationLayer.div) { + div.insertBefore(textLayerDiv, this.annotationLayer.div); + } else { + div.appendChild(textLayerDiv); + } + + textLayer = this.textLayerFactory.createTextLayerBuilder(textLayerDiv, this.id - 1, this.viewport, this.textLayerMode === _ui_utils.TextLayerMode.ENABLE_ENHANCE, this.eventBus); + } + + this.textLayer = textLayer; + let renderContinueCallback = null; + + if (this.renderingQueue) { + renderContinueCallback = cont => { + if (!this.renderingQueue.isHighestPriority(this)) { + this.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED; + + this.resume = () => { + this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + cont(); + }; + + return; + } + + cont(); + }; + } + + const finishPaintTask = async error => { + if (paintTask === this.paintTask) { + this.paintTask = null; + } + + if (error instanceof _pdfjsLib.RenderingCancelledException) { + this.error = null; + return; + } + + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + + if (this.loadingIconDiv) { + div.removeChild(this.loadingIconDiv); + delete this.loadingIconDiv; + } + + this._resetZoomLayer(true); + + this.error = error; + this.stats = pdfPage.stats; + this.eventBus.dispatch("pagerendered", { + source: this, + pageNumber: this.id, + cssTransform: false, + timestamp: performance.now() + }); + + if (error) { + throw error; + } + }; + + const paintTask = this.renderer === _ui_utils.RendererType.SVG ? this.paintOnSvg(canvasWrapper) : this.paintOnCanvas(canvasWrapper); + paintTask.onRenderContinue = renderContinueCallback; + this.paintTask = paintTask; + const resultPromise = paintTask.promise.then(function () { + return finishPaintTask(null).then(function () { + if (textLayer) { + const readableStream = pdfPage.streamTextContent({ + normalizeWhitespace: true + }); + textLayer.setTextContentStream(readableStream); + textLayer.render(); + } + }); + }, function (reason) { + return finishPaintTask(reason); + }); + + if (this.annotationLayerFactory) { + if (!this.annotationLayer) { + this.annotationLayer = this.annotationLayerFactory.createAnnotationLayerBuilder(div, pdfPage, this.imageResourcesPath, this.renderInteractiveForms, this.l10n); + } + + this.annotationLayer.render(this.viewport, "display"); + } + + div.setAttribute("data-loaded", true); + this.eventBus.dispatch("pagerender", { + source: this, + pageNumber: this.id + }); + return resultPromise; + } + + paintOnCanvas(canvasWrapper) { + const renderCapability = (0, _pdfjsLib.createPromiseCapability)(); + const result = { + promise: renderCapability.promise, + + onRenderContinue(cont) { + cont(); + }, + + cancel() { + renderTask.cancel(); + } + + }; + const viewport = this.viewport; + const canvas = document.createElement("canvas"); + this.l10n.get("page_canvas", { + page: this.id + }, "Page {{page}}").then(msg => { + canvas.setAttribute("aria-label", msg); + }); + canvas.setAttribute("hidden", "hidden"); + let isCanvasHidden = true; + + const showCanvas = function () { + if (isCanvasHidden) { + canvas.removeAttribute("hidden"); + isCanvasHidden = false; + } + }; + + canvasWrapper.appendChild(canvas); + this.canvas = canvas; + canvas.mozOpaque = true; + const ctx = canvas.getContext("2d", { + alpha: false + }); + const outputScale = (0, _ui_utils.getOutputScale)(ctx); + this.outputScale = outputScale; + + if (this.useOnlyCssZoom) { + const actualSizeViewport = viewport.clone({ + scale: _ui_utils.CSS_UNITS + }); + outputScale.sx *= actualSizeViewport.width / viewport.width; + outputScale.sy *= actualSizeViewport.height / viewport.height; + outputScale.scaled = true; + } + + if (this.maxCanvasPixels > 0) { + const pixelsInViewport = viewport.width * viewport.height; + const maxScale = Math.sqrt(this.maxCanvasPixels / pixelsInViewport); + + if (outputScale.sx > maxScale || outputScale.sy > maxScale) { + outputScale.sx = maxScale; + outputScale.sy = maxScale; + outputScale.scaled = true; + this.hasRestrictedScaling = true; + } else { + this.hasRestrictedScaling = false; + } + } + + const sfx = (0, _ui_utils.approximateFraction)(outputScale.sx); + const sfy = (0, _ui_utils.approximateFraction)(outputScale.sy); + canvas.width = (0, _ui_utils.roundToDivide)(viewport.width * outputScale.sx, sfx[0]); + canvas.height = (0, _ui_utils.roundToDivide)(viewport.height * outputScale.sy, sfy[0]); + canvas.style.width = (0, _ui_utils.roundToDivide)(viewport.width, sfx[1]) + "px"; + canvas.style.height = (0, _ui_utils.roundToDivide)(viewport.height, sfy[1]) + "px"; + this.paintedViewportMap.set(canvas, viewport); + const transform = !outputScale.scaled ? null : [outputScale.sx, 0, 0, outputScale.sy, 0, 0]; + const renderContext = { + canvasContext: ctx, + transform, + viewport: this.viewport, + enableWebGL: this.enableWebGL, + renderInteractiveForms: this.renderInteractiveForms + }; + const renderTask = this.pdfPage.render(renderContext); + + renderTask.onContinue = function (cont) { + showCanvas(); + + if (result.onRenderContinue) { + result.onRenderContinue(cont); + } else { + cont(); + } + }; + + renderTask.promise.then(function () { + showCanvas(); + renderCapability.resolve(undefined); + }, function (error) { + showCanvas(); + renderCapability.reject(error); + }); + return result; + } + + paintOnSvg(wrapper) { + let cancelled = false; + + const ensureNotCancelled = () => { + if (cancelled) { + throw new _pdfjsLib.RenderingCancelledException(`Rendering cancelled, page ${this.id}`, "svg"); + } + }; + + const pdfPage = this.pdfPage; + const actualSizeViewport = this.viewport.clone({ + scale: _ui_utils.CSS_UNITS + }); + const promise = pdfPage.getOperatorList().then(opList => { + ensureNotCancelled(); + const svgGfx = new _pdfjsLib.SVGGraphics(pdfPage.commonObjs, pdfPage.objs); + return svgGfx.getSVG(opList, actualSizeViewport).then(svg => { + ensureNotCancelled(); + this.svg = svg; + this.paintedViewportMap.set(svg, actualSizeViewport); + svg.style.width = wrapper.style.width; + svg.style.height = wrapper.style.height; + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + wrapper.appendChild(svg); + }); + }); + return { + promise, + + onRenderContinue(cont) { + cont(); + }, + + cancel() { + cancelled = true; + } + + }; + } + + setPageLabel(label) { + this.pageLabel = typeof label === "string" ? label : null; + + if (this.pageLabel !== null) { + this.div.setAttribute("data-page-label", this.pageLabel); + } else { + this.div.removeAttribute("data-page-label"); + } + } + +} + +exports.PDFPageView = PDFPageView; + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DefaultTextLayerFactory = exports.TextLayerBuilder = void 0; + +var _pdfjsLib = __webpack_require__(5); + +const EXPAND_DIVS_TIMEOUT = 300; + +class TextLayerBuilder { + constructor({ + textLayerDiv, + eventBus, + pageIndex, + viewport, + findController = null, + enhanceTextSelection = false + }) { + this.textLayerDiv = textLayerDiv; + this.eventBus = eventBus; + this.textContent = null; + this.textContentItemsStr = []; + this.textContentStream = null; + this.renderingDone = false; + this.pageIdx = pageIndex; + this.pageNumber = this.pageIdx + 1; + this.matches = []; + this.viewport = viewport; + this.textDivs = []; + this.findController = findController; + this.textLayerRenderTask = null; + this.enhanceTextSelection = enhanceTextSelection; + this._onUpdateTextLayerMatches = null; + + this._bindMouse(); + } + + _finishRendering() { + this.renderingDone = true; + + if (!this.enhanceTextSelection) { + const endOfContent = document.createElement("div"); + endOfContent.className = "endOfContent"; + this.textLayerDiv.appendChild(endOfContent); + } + + this.eventBus.dispatch("textlayerrendered", { + source: this, + pageNumber: this.pageNumber, + numTextDivs: this.textDivs.length + }); + } + + render(timeout = 0) { + if (!(this.textContent || this.textContentStream) || this.renderingDone) { + return; + } + + this.cancel(); + this.textDivs = []; + const textLayerFrag = document.createDocumentFragment(); + this.textLayerRenderTask = (0, _pdfjsLib.renderTextLayer)({ + textContent: this.textContent, + textContentStream: this.textContentStream, + container: textLayerFrag, + viewport: this.viewport, + textDivs: this.textDivs, + textContentItemsStr: this.textContentItemsStr, + timeout, + enhanceTextSelection: this.enhanceTextSelection + }); + this.textLayerRenderTask.promise.then(() => { + this.textLayerDiv.appendChild(textLayerFrag); + + this._finishRendering(); + + this._updateMatches(); + }, function (reason) {}); + + if (!this._onUpdateTextLayerMatches) { + this._onUpdateTextLayerMatches = evt => { + if (evt.pageIndex === this.pageIdx || evt.pageIndex === -1) { + this._updateMatches(); + } + }; + + this.eventBus._on("updatetextlayermatches", this._onUpdateTextLayerMatches); + } + } + + cancel() { + if (this.textLayerRenderTask) { + this.textLayerRenderTask.cancel(); + this.textLayerRenderTask = null; + } + + if (this._onUpdateTextLayerMatches) { + this.eventBus._off("updatetextlayermatches", this._onUpdateTextLayerMatches); + + this._onUpdateTextLayerMatches = null; + } + } + + setTextContentStream(readableStream) { + this.cancel(); + this.textContentStream = readableStream; + } + + setTextContent(textContent) { + this.cancel(); + this.textContent = textContent; + } + + _convertMatches(matches, matchesLength) { + if (!matches) { + return []; + } + + const { + findController, + textContentItemsStr + } = this; + let i = 0, + iIndex = 0; + const end = textContentItemsStr.length - 1; + const queryLen = findController.state.query.length; + const result = []; + + for (let m = 0, mm = matches.length; m < mm; m++) { + let matchIdx = matches[m]; + + while (i !== end && matchIdx >= iIndex + textContentItemsStr[i].length) { + iIndex += textContentItemsStr[i].length; + i++; + } + + if (i === textContentItemsStr.length) { + console.error("Could not find a matching mapping"); + } + + const match = { + begin: { + divIdx: i, + offset: matchIdx - iIndex + } + }; + + if (matchesLength) { + matchIdx += matchesLength[m]; + } else { + matchIdx += queryLen; + } + + while (i !== end && matchIdx > iIndex + textContentItemsStr[i].length) { + iIndex += textContentItemsStr[i].length; + i++; + } + + match.end = { + divIdx: i, + offset: matchIdx - iIndex + }; + result.push(match); + } + + return result; + } + + _renderMatches(matches) { + if (matches.length === 0) { + return; + } + + const { + findController, + pageIdx, + textContentItemsStr, + textDivs + } = this; + const isSelectedPage = pageIdx === findController.selected.pageIdx; + const selectedMatchIdx = findController.selected.matchIdx; + const highlightAll = findController.state.highlightAll; + let prevEnd = null; + const infinity = { + divIdx: -1, + offset: undefined + }; + + function beginText(begin, className) { + const divIdx = begin.divIdx; + textDivs[divIdx].textContent = ""; + appendTextToDiv(divIdx, 0, begin.offset, className); + } + + function appendTextToDiv(divIdx, fromOffset, toOffset, className) { + const div = textDivs[divIdx]; + const content = textContentItemsStr[divIdx].substring(fromOffset, toOffset); + const node = document.createTextNode(content); + + if (className) { + const span = document.createElement("span"); + span.className = className; + span.appendChild(node); + div.appendChild(span); + return; + } + + div.appendChild(node); + } + + let i0 = selectedMatchIdx, + i1 = i0 + 1; + + if (highlightAll) { + i0 = 0; + i1 = matches.length; + } else if (!isSelectedPage) { + return; + } + + for (let i = i0; i < i1; i++) { + const match = matches[i]; + const begin = match.begin; + const end = match.end; + const isSelected = isSelectedPage && i === selectedMatchIdx; + const highlightSuffix = isSelected ? " selected" : ""; + + if (isSelected) { + findController.scrollMatchIntoView({ + element: textDivs[begin.divIdx], + pageIndex: pageIdx, + matchIndex: selectedMatchIdx + }); + } + + if (!prevEnd || begin.divIdx !== prevEnd.divIdx) { + if (prevEnd !== null) { + appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); + } + + beginText(begin); + } else { + appendTextToDiv(prevEnd.divIdx, prevEnd.offset, begin.offset); + } + + if (begin.divIdx === end.divIdx) { + appendTextToDiv(begin.divIdx, begin.offset, end.offset, "highlight" + highlightSuffix); + } else { + appendTextToDiv(begin.divIdx, begin.offset, infinity.offset, "highlight begin" + highlightSuffix); + + for (let n0 = begin.divIdx + 1, n1 = end.divIdx; n0 < n1; n0++) { + textDivs[n0].className = "highlight middle" + highlightSuffix; + } + + beginText(end, "highlight end" + highlightSuffix); + } + + prevEnd = end; + } + + if (prevEnd) { + appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); + } + } + + _updateMatches() { + if (!this.renderingDone) { + return; + } + + const { + findController, + matches, + pageIdx, + textContentItemsStr, + textDivs + } = this; + let clearedUntilDivIdx = -1; + + for (let i = 0, ii = matches.length; i < ii; i++) { + const match = matches[i]; + const begin = Math.max(clearedUntilDivIdx, match.begin.divIdx); + + for (let n = begin, end = match.end.divIdx; n <= end; n++) { + const div = textDivs[n]; + div.textContent = textContentItemsStr[n]; + div.className = ""; + } + + clearedUntilDivIdx = match.end.divIdx + 1; + } + + if (!findController || !findController.highlightMatches) { + return; + } + + const pageMatches = findController.pageMatches[pageIdx] || null; + const pageMatchesLength = findController.pageMatchesLength[pageIdx] || null; + this.matches = this._convertMatches(pageMatches, pageMatchesLength); + + this._renderMatches(this.matches); + } + + _bindMouse() { + const div = this.textLayerDiv; + let expandDivsTimer = null; + div.addEventListener("mousedown", evt => { + if (this.enhanceTextSelection && this.textLayerRenderTask) { + this.textLayerRenderTask.expandTextDivs(true); + + if (expandDivsTimer) { + clearTimeout(expandDivsTimer); + expandDivsTimer = null; + } + + return; + } + + const end = div.querySelector(".endOfContent"); + + if (!end) { + return; + } + + let adjustTop = evt.target !== div; + adjustTop = adjustTop && window.getComputedStyle(end).getPropertyValue("-moz-user-select") !== "none"; + + if (adjustTop) { + const divBounds = div.getBoundingClientRect(); + const r = Math.max(0, (evt.pageY - divBounds.top) / divBounds.height); + end.style.top = (r * 100).toFixed(2) + "%"; + } + + end.classList.add("active"); + }); + div.addEventListener("mouseup", () => { + if (this.enhanceTextSelection && this.textLayerRenderTask) { + expandDivsTimer = setTimeout(() => { + if (this.textLayerRenderTask) { + this.textLayerRenderTask.expandTextDivs(false); + } + + expandDivsTimer = null; + }, EXPAND_DIVS_TIMEOUT); + return; + } + + const end = div.querySelector(".endOfContent"); + + if (!end) { + return; + } + + end.style.top = ""; + end.classList.remove("active"); + }); + } + +} + +exports.TextLayerBuilder = TextLayerBuilder; + +class DefaultTextLayerFactory { + createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection = false, eventBus) { + return new TextLayerBuilder({ + textLayerDiv, + pageIndex, + viewport, + enhanceTextSelection, + eventBus + }); + } + +} + +exports.DefaultTextLayerFactory = DefaultTextLayerFactory; + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SecondaryToolbar = void 0; + +var _ui_utils = __webpack_require__(2); + +var _pdf_cursor_tools = __webpack_require__(6); + +var _pdf_single_page_viewer = __webpack_require__(30); + +class SecondaryToolbar { + constructor(options, mainContainer, eventBus) { + this.toolbar = options.toolbar; + this.toggleButton = options.toggleButton; + this.toolbarButtonContainer = options.toolbarButtonContainer; + this.buttons = [{ + element: options.presentationModeButton, + eventName: "presentationmode", + close: true + }, { + element: options.openFileButton, + eventName: "openfile", + close: true + }, { + element: options.printButton, + eventName: "print", + close: true + }, { + element: options.downloadButton, + eventName: "download", + close: true + }, { + element: options.viewBookmarkButton, + eventName: null, + close: true + }, { + element: options.firstPageButton, + eventName: "firstpage", + close: true + }, { + element: options.lastPageButton, + eventName: "lastpage", + close: true + }, { + element: options.pageRotateCwButton, + eventName: "rotatecw", + close: false + }, { + element: options.pageRotateCcwButton, + eventName: "rotateccw", + close: false + }, { + element: options.cursorSelectToolButton, + eventName: "switchcursortool", + eventDetails: { + tool: _pdf_cursor_tools.CursorTool.SELECT + }, + close: true + }, { + element: options.cursorHandToolButton, + eventName: "switchcursortool", + eventDetails: { + tool: _pdf_cursor_tools.CursorTool.HAND + }, + close: true + }, { + element: options.scrollVerticalButton, + eventName: "switchscrollmode", + eventDetails: { + mode: _ui_utils.ScrollMode.VERTICAL + }, + close: true + }, { + element: options.scrollHorizontalButton, + eventName: "switchscrollmode", + eventDetails: { + mode: _ui_utils.ScrollMode.HORIZONTAL + }, + close: true + }, { + element: options.scrollWrappedButton, + eventName: "switchscrollmode", + eventDetails: { + mode: _ui_utils.ScrollMode.WRAPPED + }, + close: true + }, { + element: options.spreadNoneButton, + eventName: "switchspreadmode", + eventDetails: { + mode: _ui_utils.SpreadMode.NONE + }, + close: true + }, { + element: options.spreadOddButton, + eventName: "switchspreadmode", + eventDetails: { + mode: _ui_utils.SpreadMode.ODD + }, + close: true + }, { + element: options.spreadEvenButton, + eventName: "switchspreadmode", + eventDetails: { + mode: _ui_utils.SpreadMode.EVEN + }, + close: true + }, { + element: options.documentPropertiesButton, + eventName: "documentproperties", + close: true + }]; + this.items = { + firstPage: options.firstPageButton, + lastPage: options.lastPageButton, + pageRotateCw: options.pageRotateCwButton, + pageRotateCcw: options.pageRotateCcwButton + }; + this.mainContainer = mainContainer; + this.eventBus = eventBus; + this.opened = false; + this.containerHeight = null; + this.previousContainerHeight = null; + this.reset(); + + this._bindClickListeners(); + + this._bindCursorToolsListener(options); + + this._bindScrollModeListener(options); + + this._bindSpreadModeListener(options); + + this.eventBus._on("resize", this._setMaxHeight.bind(this)); + + this.eventBus._on("baseviewerinit", evt => { + if (evt.source instanceof _pdf_single_page_viewer.PDFSinglePageViewer) { + this.toolbarButtonContainer.classList.add("hiddenScrollModeButtons", "hiddenSpreadModeButtons"); + } else { + this.toolbarButtonContainer.classList.remove("hiddenScrollModeButtons", "hiddenSpreadModeButtons"); + } + }); + } + + get isOpen() { + return this.opened; + } + + setPageNumber(pageNumber) { + this.pageNumber = pageNumber; + + this._updateUIState(); + } + + setPagesCount(pagesCount) { + this.pagesCount = pagesCount; + + this._updateUIState(); + } + + reset() { + this.pageNumber = 0; + this.pagesCount = 0; + + this._updateUIState(); + + this.eventBus.dispatch("secondarytoolbarreset", { + source: this + }); + } + + _updateUIState() { + this.items.firstPage.disabled = this.pageNumber <= 1; + this.items.lastPage.disabled = this.pageNumber >= this.pagesCount; + this.items.pageRotateCw.disabled = this.pagesCount === 0; + this.items.pageRotateCcw.disabled = this.pagesCount === 0; + } + + _bindClickListeners() { + this.toggleButton.addEventListener("click", this.toggle.bind(this)); + + for (const { + element, + eventName, + close, + eventDetails + } of this.buttons) { + element.addEventListener("click", evt => { + if (eventName !== null) { + const details = { + source: this + }; + + for (const property in eventDetails) { + details[property] = eventDetails[property]; + } + + this.eventBus.dispatch(eventName, details); + } + + if (close) { + this.close(); + } + }); + } + } + + _bindCursorToolsListener(buttons) { + this.eventBus._on("cursortoolchanged", function ({ + tool + }) { + buttons.cursorSelectToolButton.classList.toggle("toggled", tool === _pdf_cursor_tools.CursorTool.SELECT); + buttons.cursorHandToolButton.classList.toggle("toggled", tool === _pdf_cursor_tools.CursorTool.HAND); + }); + } + + _bindScrollModeListener(buttons) { + function scrollModeChanged({ + mode + }) { + buttons.scrollVerticalButton.classList.toggle("toggled", mode === _ui_utils.ScrollMode.VERTICAL); + buttons.scrollHorizontalButton.classList.toggle("toggled", mode === _ui_utils.ScrollMode.HORIZONTAL); + buttons.scrollWrappedButton.classList.toggle("toggled", mode === _ui_utils.ScrollMode.WRAPPED); + const isScrollModeHorizontal = mode === _ui_utils.ScrollMode.HORIZONTAL; + buttons.spreadNoneButton.disabled = isScrollModeHorizontal; + buttons.spreadOddButton.disabled = isScrollModeHorizontal; + buttons.spreadEvenButton.disabled = isScrollModeHorizontal; + } + + this.eventBus._on("scrollmodechanged", scrollModeChanged); + + this.eventBus._on("secondarytoolbarreset", evt => { + if (evt.source === this) { + scrollModeChanged({ + mode: _ui_utils.ScrollMode.VERTICAL + }); + } + }); + } + + _bindSpreadModeListener(buttons) { + function spreadModeChanged({ + mode + }) { + buttons.spreadNoneButton.classList.toggle("toggled", mode === _ui_utils.SpreadMode.NONE); + buttons.spreadOddButton.classList.toggle("toggled", mode === _ui_utils.SpreadMode.ODD); + buttons.spreadEvenButton.classList.toggle("toggled", mode === _ui_utils.SpreadMode.EVEN); + } + + this.eventBus._on("spreadmodechanged", spreadModeChanged); + + this.eventBus._on("secondarytoolbarreset", evt => { + if (evt.source === this) { + spreadModeChanged({ + mode: _ui_utils.SpreadMode.NONE + }); + } + }); + } + + open() { + if (this.opened) { + return; + } + + this.opened = true; + + this._setMaxHeight(); + + this.toggleButton.classList.add("toggled"); + this.toolbar.classList.remove("hidden"); + } + + close() { + if (!this.opened) { + return; + } + + this.opened = false; + this.toolbar.classList.add("hidden"); + this.toggleButton.classList.remove("toggled"); + } + + toggle() { + if (this.opened) { + this.close(); + } else { + this.open(); + } + } + + _setMaxHeight() { + if (!this.opened) { + return; + } + + this.containerHeight = this.mainContainer.clientHeight; + + if (this.containerHeight === this.previousContainerHeight) { + return; + } + + this.toolbarButtonContainer.style.maxHeight = `${this.containerHeight - _ui_utils.SCROLLBAR_PADDING}px`; + this.previousContainerHeight = this.containerHeight; + } + +} + +exports.SecondaryToolbar = SecondaryToolbar; + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFSinglePageViewer = void 0; + +var _base_viewer = __webpack_require__(25); + +var _pdfjsLib = __webpack_require__(5); + +class PDFSinglePageViewer extends _base_viewer.BaseViewer { + constructor(options) { + super(options); + + this.eventBus._on("pagesinit", evt => { + this._ensurePageViewVisible(); + }); + } + + get _viewerElement() { + return (0, _pdfjsLib.shadow)(this, "_viewerElement", this._shadowViewer); + } + + _resetView() { + super._resetView(); + + this._previousPageNumber = 1; + this._shadowViewer = document.createDocumentFragment(); + this._updateScrollDown = null; + } + + _ensurePageViewVisible() { + const pageView = this._pages[this._currentPageNumber - 1]; + const previousPageView = this._pages[this._previousPageNumber - 1]; + const viewerNodes = this.viewer.childNodes; + + switch (viewerNodes.length) { + case 0: + this.viewer.appendChild(pageView.div); + break; + + case 1: + if (viewerNodes[0] !== previousPageView.div) { + throw new Error("_ensurePageViewVisible: Unexpected previously visible page."); + } + + if (pageView === previousPageView) { + break; + } + + this._shadowViewer.appendChild(previousPageView.div); + + this.viewer.appendChild(pageView.div); + this.container.scrollTop = 0; + break; + + default: + throw new Error("_ensurePageViewVisible: Only one page should be visible at a time."); + } + + this._previousPageNumber = this._currentPageNumber; + } + + _scrollUpdate() { + if (this._updateScrollDown) { + this._updateScrollDown(); + } + + super._scrollUpdate(); + } + + _scrollIntoView({ + pageDiv, + pageSpot = null, + pageNumber = null + }) { + if (pageNumber) { + this._setCurrentPageNumber(pageNumber); + } + + const scrolledDown = this._currentPageNumber >= this._previousPageNumber; + + this._ensurePageViewVisible(); + + this.update(); + + super._scrollIntoView({ + pageDiv, + pageSpot, + pageNumber + }); + + this._updateScrollDown = () => { + this.scroll.down = scrolledDown; + this._updateScrollDown = null; + }; + } + + _getVisiblePages() { + return this._getCurrentVisiblePage(); + } + + _updateHelper(visiblePages) {} + + get _isScrollModeHorizontal() { + return (0, _pdfjsLib.shadow)(this, "_isScrollModeHorizontal", false); + } + + _updateScrollMode() {} + + _updateSpreadMode() {} + +} + +exports.PDFSinglePageViewer = PDFSinglePageViewer; + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Toolbar = void 0; + +var _ui_utils = __webpack_require__(2); + +const PAGE_NUMBER_LOADING_INDICATOR = "visiblePageIsLoading"; +const SCALE_SELECT_CONTAINER_WIDTH = 140; +const SCALE_SELECT_WIDTH = 162; + +class Toolbar { + constructor(options, eventBus, l10n = _ui_utils.NullL10n) { + this.toolbar = options.container; + this.eventBus = eventBus; + this.l10n = l10n; + this.buttons = [{ + element: options.previous, + eventName: "previouspage" + }, { + element: options.next, + eventName: "nextpage" + }, { + element: options.zoomIn, + eventName: "zoomin" + }, { + element: options.zoomOut, + eventName: "zoomout" + }, { + element: options.openFile, + eventName: "openfile" + }, { + element: options.print, + eventName: "print" + }, { + element: options.presentationModeButton, + eventName: "presentationmode" + }, { + element: options.download, + eventName: "download" + }, { + element: options.viewBookmark, + eventName: null + }]; + this.items = { + numPages: options.numPages, + pageNumber: options.pageNumber, + scaleSelectContainer: options.scaleSelectContainer, + scaleSelect: options.scaleSelect, + customScaleOption: options.customScaleOption, + previous: options.previous, + next: options.next, + zoomIn: options.zoomIn, + zoomOut: options.zoomOut + }; + this._wasLocalized = false; + this.reset(); + + this._bindListeners(); + } + + setPageNumber(pageNumber, pageLabel) { + this.pageNumber = pageNumber; + this.pageLabel = pageLabel; + + this._updateUIState(false); + } + + setPagesCount(pagesCount, hasPageLabels) { + this.pagesCount = pagesCount; + this.hasPageLabels = hasPageLabels; + + this._updateUIState(true); + } + + setPageScale(pageScaleValue, pageScale) { + this.pageScaleValue = (pageScaleValue || pageScale).toString(); + this.pageScale = pageScale; + + this._updateUIState(false); + } + + reset() { + this.pageNumber = 0; + this.pageLabel = null; + this.hasPageLabels = false; + this.pagesCount = 0; + this.pageScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + this.pageScale = _ui_utils.DEFAULT_SCALE; + + this._updateUIState(true); + + this.updateLoadingIndicatorState(); + } + + _bindListeners() { + const { + pageNumber, + scaleSelect + } = this.items; + const self = this; + + for (const { + element, + eventName + } of this.buttons) { + element.addEventListener("click", evt => { + if (eventName !== null) { + this.eventBus.dispatch(eventName, { + source: this + }); + } + }); + } + + pageNumber.addEventListener("click", function () { + this.select(); + }); + pageNumber.addEventListener("change", function () { + self.eventBus.dispatch("pagenumberchanged", { + source: self, + value: this.value + }); + }); + scaleSelect.addEventListener("change", function () { + if (this.value === "custom") { + return; + } + + self.eventBus.dispatch("scalechanged", { + source: self, + value: this.value + }); + }); + scaleSelect.oncontextmenu = _ui_utils.noContextMenuHandler; + + this.eventBus._on("localized", () => { + this._wasLocalized = true; + + this._adjustScaleWidth(); + + this._updateUIState(true); + }); + } + + _updateUIState(resetNumPages = false) { + if (!this._wasLocalized) { + return; + } + + const { + pageNumber, + pagesCount, + pageScaleValue, + pageScale, + items + } = this; + + if (resetNumPages) { + if (this.hasPageLabels) { + items.pageNumber.type = "text"; + } else { + items.pageNumber.type = "number"; + this.l10n.get("of_pages", { + pagesCount + }, "of {{pagesCount}}").then(msg => { + items.numPages.textContent = msg; + }); + } + + items.pageNumber.max = pagesCount; + } + + if (this.hasPageLabels) { + items.pageNumber.value = this.pageLabel; + this.l10n.get("page_of_pages", { + pageNumber, + pagesCount + }, "({{pageNumber}} of {{pagesCount}})").then(msg => { + items.numPages.textContent = msg; + }); + } else { + items.pageNumber.value = pageNumber; + } + + items.previous.disabled = pageNumber <= 1; + items.next.disabled = pageNumber >= pagesCount; + items.zoomOut.disabled = pageScale <= _ui_utils.MIN_SCALE; + items.zoomIn.disabled = pageScale >= _ui_utils.MAX_SCALE; + const customScale = Math.round(pageScale * 10000) / 100; + this.l10n.get("page_scale_percent", { + scale: customScale + }, "{{scale}}%").then(msg => { + let predefinedValueFound = false; + + for (const option of items.scaleSelect.options) { + if (option.value !== pageScaleValue) { + option.selected = false; + continue; + } + + option.selected = true; + predefinedValueFound = true; + } + + if (!predefinedValueFound) { + items.customScaleOption.textContent = msg; + items.customScaleOption.selected = true; + } + }); + } + + updateLoadingIndicatorState(loading = false) { + const pageNumberInput = this.items.pageNumber; + pageNumberInput.classList.toggle(PAGE_NUMBER_LOADING_INDICATOR, loading); + } + + async _adjustScaleWidth() { + const { + items, + l10n + } = this; + const predefinedValuesPromise = Promise.all([l10n.get("page_scale_auto", null, "Automatic Zoom"), l10n.get("page_scale_actual", null, "Actual Size"), l10n.get("page_scale_fit", null, "Page Fit"), l10n.get("page_scale_width", null, "Page Width")]); + let canvas = document.createElement("canvas"); + canvas.mozOpaque = true; + let ctx = canvas.getContext("2d", { + alpha: false + }); + await _ui_utils.animationStarted; + const { + fontSize, + fontFamily + } = getComputedStyle(items.scaleSelect); + ctx.font = `${fontSize} ${fontFamily}`; + let maxWidth = 0; + + for (const predefinedValue of await predefinedValuesPromise) { + const { + width + } = ctx.measureText(predefinedValue); + + if (width > maxWidth) { + maxWidth = width; + } + } + + const overflow = SCALE_SELECT_WIDTH - SCALE_SELECT_CONTAINER_WIDTH; + maxWidth += 1.5 * overflow; + + if (maxWidth > SCALE_SELECT_CONTAINER_WIDTH) { + items.scaleSelect.style.width = `${maxWidth + overflow}px`; + items.scaleSelectContainer.style.width = `${maxWidth}px`; + } + + canvas.width = 0; + canvas.height = 0; + canvas = ctx = null; + } + +} + +exports.Toolbar = Toolbar; + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ViewHistory = void 0; +const DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20; + +class ViewHistory { + constructor(fingerprint, cacheSize = DEFAULT_VIEW_HISTORY_CACHE_SIZE) { + this.fingerprint = fingerprint; + this.cacheSize = cacheSize; + this._initializedPromise = this._readFromStorage().then(databaseStr => { + const database = JSON.parse(databaseStr || "{}"); + let index = -1; + + if (!Array.isArray(database.files)) { + database.files = []; + } else { + while (database.files.length >= this.cacheSize) { + database.files.shift(); + } + + for (let i = 0, ii = database.files.length; i < ii; i++) { + const branch = database.files[i]; + + if (branch.fingerprint === this.fingerprint) { + index = i; + break; + } + } + } + + if (index === -1) { + index = database.files.push({ + fingerprint: this.fingerprint + }) - 1; + } + + this.file = database.files[index]; + this.database = database; + }); + } + + async _writeToStorage() { + const databaseStr = JSON.stringify(this.database); + localStorage.setItem("pdfjs.history", databaseStr); + } + + async _readFromStorage() { + return localStorage.getItem("pdfjs.history"); + } + + async set(name, val) { + await this._initializedPromise; + this.file[name] = val; + return this._writeToStorage(); + } + + async setMultiple(properties) { + await this._initializedPromise; + + for (const name in properties) { + this.file[name] = properties[name]; + } + + return this._writeToStorage(); + } + + async get(name, defaultValue) { + await this._initializedPromise; + const val = this.file[name]; + return val !== undefined ? val : defaultValue; + } + + async getMultiple(properties) { + await this._initializedPromise; + const values = Object.create(null); + + for (const name in properties) { + const val = this.file[name]; + values[name] = val !== undefined ? val : properties[name]; + } + + return values; + } + +} + +exports.ViewHistory = ViewHistory; + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GenericCom = void 0; + +var _app = __webpack_require__(1); + +var _preferences = __webpack_require__(34); + +var _download_manager = __webpack_require__(35); + +var _genericl10n = __webpack_require__(36); + +; +const GenericCom = {}; +exports.GenericCom = GenericCom; + +class GenericPreferences extends _preferences.BasePreferences { + async _writeToStorage(prefObj) { + localStorage.setItem("pdfjs.preferences", JSON.stringify(prefObj)); + } + + async _readFromStorage(prefObj) { + return JSON.parse(localStorage.getItem("pdfjs.preferences")); + } + +} + +class GenericExternalServices extends _app.DefaultExternalServices { + static createDownloadManager(options) { + return new _download_manager.DownloadManager(options); + } + + static createPreferences() { + return new GenericPreferences(); + } + + static createL10n({ + locale = "en-US" + }) { + return new _genericl10n.GenericL10n(locale); + } + +} + +_app.PDFViewerApplication.externalServices = GenericExternalServices; + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.BasePreferences = void 0; + +var _app_options = __webpack_require__(3); + +let defaultPreferences = null; + +function getDefaultPreferences() { + if (!defaultPreferences) { + defaultPreferences = Promise.resolve({ + "cursorToolOnLoad": 0, + "defaultZoomValue": "", + "disablePageLabels": false, + "enablePermissions": false, + "enablePrintAutoRotate": false, + "enableWebGL": false, + "externalLinkTarget": 0, + "historyUpdateUrl": false, + "ignoreDestinationZoom": false, + "pdfBugEnabled": false, + "renderer": "canvas", + "renderInteractiveForms": false, + "sidebarViewOnLoad": -1, + "scrollModeOnLoad": -1, + "spreadModeOnLoad": -1, + "textLayerMode": 1, + "useOnlyCssZoom": false, + "viewOnLoad": 0, + "disableAutoFetch": false, + "disableFontFace": false, + "disableRange": false, + "disableStream": false + }); + } + + return defaultPreferences; +} + +class BasePreferences { + constructor() { + if (this.constructor === BasePreferences) { + throw new Error("Cannot initialize BasePreferences."); + } + + this.prefs = null; + this._initializedPromise = getDefaultPreferences().then(defaults => { + Object.defineProperty(this, "defaults", { + value: Object.freeze(defaults), + writable: false, + enumerable: true, + configurable: false + }); + this.prefs = Object.assign(Object.create(null), defaults); + return this._readFromStorage(defaults); + }).then(prefs => { + if (!prefs) { + return; + } + + for (const name in prefs) { + const defaultValue = this.defaults[name], + prefValue = prefs[name]; + + if (defaultValue === undefined || typeof prefValue !== typeof defaultValue) { + continue; + } + + this.prefs[name] = prefValue; + } + }); + } + + async _writeToStorage(prefObj) { + throw new Error("Not implemented: _writeToStorage"); + } + + async _readFromStorage(prefObj) { + throw new Error("Not implemented: _readFromStorage"); + } + + async reset() { + await this._initializedPromise; + this.prefs = Object.assign(Object.create(null), this.defaults); + return this._writeToStorage(this.defaults); + } + + async set(name, value) { + await this._initializedPromise; + const defaultValue = this.defaults[name]; + + if (defaultValue === undefined) { + throw new Error(`Set preference: "${name}" is undefined.`); + } else if (value === undefined) { + throw new Error("Set preference: no value is specified."); + } + + const valueType = typeof value; + const defaultType = typeof defaultValue; + + if (valueType !== defaultType) { + if (valueType === "number" && defaultType === "string") { + value = value.toString(); + } else { + throw new Error(`Set preference: "${value}" is a ${valueType}, ` + `expected a ${defaultType}.`); + } + } else { + if (valueType === "number" && !Number.isInteger(value)) { + throw new Error(`Set preference: "${value}" must be an integer.`); + } + } + + this.prefs[name] = value; + return this._writeToStorage(this.prefs); + } + + async get(name) { + await this._initializedPromise; + const defaultValue = this.defaults[name]; + + if (defaultValue === undefined) { + throw new Error(`Get preference: "${name}" is undefined.`); + } else { + const prefValue = this.prefs[name]; + + if (prefValue !== undefined) { + return prefValue; + } + } + + return defaultValue; + } + + async getAll() { + await this._initializedPromise; + return Object.assign(Object.create(null), this.defaults, this.prefs); + } + +} + +exports.BasePreferences = BasePreferences; + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DownloadManager = void 0; + +var _pdfjsLib = __webpack_require__(5); + +var _viewer_compatibility = __webpack_require__(4); + +; +const DISABLE_CREATE_OBJECT_URL = _viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL || false; + +function download(blobUrl, filename) { + const a = document.createElement("a"); + + if (!a.click) { + throw new Error('DownloadManager: "a.click()" is not supported.'); + } + + a.href = blobUrl; + a.target = "_parent"; + + if ("download" in a) { + a.download = filename; + } + + (document.body || document.documentElement).appendChild(a); + a.click(); + a.remove(); +} + +class DownloadManager { + constructor({ + disableCreateObjectURL = DISABLE_CREATE_OBJECT_URL + }) { + this.disableCreateObjectURL = disableCreateObjectURL; + } + + downloadUrl(url, filename) { + if (!(0, _pdfjsLib.createValidAbsoluteUrl)(url, "http://example.com")) { + return; + } + + download(url + "#pdfjs.action=download", filename); + } + + downloadData(data, filename, contentType) { + if (navigator.msSaveBlob) { + navigator.msSaveBlob(new Blob([data], { + type: contentType + }), filename); + return; + } + + const blobUrl = (0, _pdfjsLib.createObjectURL)(data, contentType, this.disableCreateObjectURL); + download(blobUrl, filename); + } + + download(blob, url, filename) { + if (navigator.msSaveBlob) { + if (!navigator.msSaveBlob(blob, filename)) { + this.downloadUrl(url, filename); + } + + return; + } + + if (this.disableCreateObjectURL) { + this.downloadUrl(url, filename); + return; + } + + const blobUrl = URL.createObjectURL(blob); + download(blobUrl, filename); + } + +} + +exports.DownloadManager = DownloadManager; + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GenericL10n = void 0; + +__webpack_require__(37); + +const webL10n = document.webL10n; + +class GenericL10n { + constructor(lang) { + this._lang = lang; + this._ready = new Promise((resolve, reject) => { + webL10n.setLanguage(lang, () => { + resolve(webL10n); + }); + }); + } + + async getLanguage() { + const l10n = await this._ready; + return l10n.getLanguage(); + } + + async getDirection() { + const l10n = await this._ready; + return l10n.getDirection(); + } + + async get(property, args, fallback) { + const l10n = await this._ready; + return l10n.get(property, args, fallback); + } + + async translate(element) { + const l10n = await this._ready; + return l10n.translate(element); + } + +} + +exports.GenericL10n = GenericL10n; + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +document.webL10n = function (window, document, undefined) { + var gL10nData = {}; + var gTextData = ''; + var gTextProp = 'textContent'; + var gLanguage = ''; + var gMacros = {}; + var gReadyState = 'loading'; + var gAsyncResourceLoading = true; + + function getL10nResourceLinks() { + return document.querySelectorAll('link[type="application/l10n"]'); + } + + function getL10nDictionary() { + var script = document.querySelector('script[type="application/l10n"]'); + return script ? JSON.parse(script.innerHTML) : null; + } + + function getTranslatableChildren(element) { + return element ? element.querySelectorAll('*[data-l10n-id]') : []; + } + + function getL10nAttributes(element) { + if (!element) return {}; + var l10nId = element.getAttribute('data-l10n-id'); + var l10nArgs = element.getAttribute('data-l10n-args'); + var args = {}; + + if (l10nArgs) { + try { + args = JSON.parse(l10nArgs); + } catch (e) { + console.warn('could not parse arguments for #' + l10nId); + } + } + + return { + id: l10nId, + args: args + }; + } + + function xhrLoadText(url, onSuccess, onFailure) { + onSuccess = onSuccess || function _onSuccess(data) {}; + + onFailure = onFailure || function _onFailure() {}; + + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, gAsyncResourceLoading); + + if (xhr.overrideMimeType) { + xhr.overrideMimeType('text/plain; charset=utf-8'); + } + + xhr.onreadystatechange = function () { + if (xhr.readyState == 4) { + if (xhr.status == 200 || xhr.status === 0) { + onSuccess(xhr.responseText); + } else { + onFailure(); + } + } + }; + + xhr.onerror = onFailure; + xhr.ontimeout = onFailure; + + try { + xhr.send(null); + } catch (e) { + onFailure(); + } + } + + function parseResource(href, lang, successCallback, failureCallback) { + var baseURL = href.replace(/[^\/]*$/, '') || './'; + + function evalString(text) { + if (text.lastIndexOf('\\') < 0) return text; + return text.replace(/\\\\/g, '\\').replace(/\\n/g, '\n').replace(/\\r/g, '\r').replace(/\\t/g, '\t').replace(/\\b/g, '\b').replace(/\\f/g, '\f').replace(/\\{/g, '{').replace(/\\}/g, '}').replace(/\\"/g, '"').replace(/\\'/g, "'"); + } + + function parseProperties(text, parsedPropertiesCallback) { + var dictionary = {}; + var reBlank = /^\s*|\s*$/; + var reComment = /^\s*#|^\s*$/; + var reSection = /^\s*\[(.*)\]\s*$/; + var reImport = /^\s*@import\s+url\((.*)\)\s*$/i; + var reSplit = /^([^=\s]*)\s*=\s*(.+)$/; + + function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) { + var entries = rawText.replace(reBlank, '').split(/[\r\n]+/); + var currentLang = '*'; + var genericLang = lang.split('-', 1)[0]; + var skipLang = false; + var match = ''; + + function nextEntry() { + while (true) { + if (!entries.length) { + parsedRawLinesCallback(); + return; + } + + var line = entries.shift(); + if (reComment.test(line)) continue; + + if (extendedSyntax) { + match = reSection.exec(line); + + if (match) { + currentLang = match[1].toLowerCase(); + skipLang = currentLang !== '*' && currentLang !== lang && currentLang !== genericLang; + continue; + } else if (skipLang) { + continue; + } + + match = reImport.exec(line); + + if (match) { + loadImport(baseURL + match[1], nextEntry); + return; + } + } + + var tmp = line.match(reSplit); + + if (tmp && tmp.length == 3) { + dictionary[tmp[1]] = evalString(tmp[2]); + } + } + } + + nextEntry(); + } + + function loadImport(url, callback) { + xhrLoadText(url, function (content) { + parseRawLines(content, false, callback); + }, function () { + console.warn(url + ' not found.'); + callback(); + }); + } + + parseRawLines(text, true, function () { + parsedPropertiesCallback(dictionary); + }); + } + + xhrLoadText(href, function (response) { + gTextData += response; + parseProperties(response, function (data) { + for (var key in data) { + var id, + prop, + index = key.lastIndexOf('.'); + + if (index > 0) { + id = key.substring(0, index); + prop = key.substring(index + 1); + } else { + id = key; + prop = gTextProp; + } + + if (!gL10nData[id]) { + gL10nData[id] = {}; + } + + gL10nData[id][prop] = data[key]; + } + + if (successCallback) { + successCallback(); + } + }); + }, failureCallback); + } + + function loadLocale(lang, callback) { + if (lang) { + lang = lang.toLowerCase(); + } + + callback = callback || function _callback() {}; + + clear(); + gLanguage = lang; + var langLinks = getL10nResourceLinks(); + var langCount = langLinks.length; + + if (langCount === 0) { + var dict = getL10nDictionary(); + + if (dict && dict.locales && dict.default_locale) { + console.log('using the embedded JSON directory, early way out'); + gL10nData = dict.locales[lang]; + + if (!gL10nData) { + var defaultLocale = dict.default_locale.toLowerCase(); + + for (var anyCaseLang in dict.locales) { + anyCaseLang = anyCaseLang.toLowerCase(); + + if (anyCaseLang === lang) { + gL10nData = dict.locales[lang]; + break; + } else if (anyCaseLang === defaultLocale) { + gL10nData = dict.locales[defaultLocale]; + } + } + } + + callback(); + } else { + console.log('no resource to load, early way out'); + } + + gReadyState = 'complete'; + return; + } + + var onResourceLoaded = null; + var gResourceCount = 0; + + onResourceLoaded = function () { + gResourceCount++; + + if (gResourceCount >= langCount) { + callback(); + gReadyState = 'complete'; + } + }; + + function L10nResourceLink(link) { + var href = link.href; + + this.load = function (lang, callback) { + parseResource(href, lang, callback, function () { + console.warn(href + ' not found.'); + console.warn('"' + lang + '" resource not found'); + gLanguage = ''; + callback(); + }); + }; + } + + for (var i = 0; i < langCount; i++) { + var resource = new L10nResourceLink(langLinks[i]); + resource.load(lang, onResourceLoaded); + } + } + + function clear() { + gL10nData = {}; + gTextData = ''; + gLanguage = ''; + } + + function getPluralRules(lang) { + var locales2rules = { + 'af': 3, + 'ak': 4, + 'am': 4, + 'ar': 1, + 'asa': 3, + 'az': 0, + 'be': 11, + 'bem': 3, + 'bez': 3, + 'bg': 3, + 'bh': 4, + 'bm': 0, + 'bn': 3, + 'bo': 0, + 'br': 20, + 'brx': 3, + 'bs': 11, + 'ca': 3, + 'cgg': 3, + 'chr': 3, + 'cs': 12, + 'cy': 17, + 'da': 3, + 'de': 3, + 'dv': 3, + 'dz': 0, + 'ee': 3, + 'el': 3, + 'en': 3, + 'eo': 3, + 'es': 3, + 'et': 3, + 'eu': 3, + 'fa': 0, + 'ff': 5, + 'fi': 3, + 'fil': 4, + 'fo': 3, + 'fr': 5, + 'fur': 3, + 'fy': 3, + 'ga': 8, + 'gd': 24, + 'gl': 3, + 'gsw': 3, + 'gu': 3, + 'guw': 4, + 'gv': 23, + 'ha': 3, + 'haw': 3, + 'he': 2, + 'hi': 4, + 'hr': 11, + 'hu': 0, + 'id': 0, + 'ig': 0, + 'ii': 0, + 'is': 3, + 'it': 3, + 'iu': 7, + 'ja': 0, + 'jmc': 3, + 'jv': 0, + 'ka': 0, + 'kab': 5, + 'kaj': 3, + 'kcg': 3, + 'kde': 0, + 'kea': 0, + 'kk': 3, + 'kl': 3, + 'km': 0, + 'kn': 0, + 'ko': 0, + 'ksb': 3, + 'ksh': 21, + 'ku': 3, + 'kw': 7, + 'lag': 18, + 'lb': 3, + 'lg': 3, + 'ln': 4, + 'lo': 0, + 'lt': 10, + 'lv': 6, + 'mas': 3, + 'mg': 4, + 'mk': 16, + 'ml': 3, + 'mn': 3, + 'mo': 9, + 'mr': 3, + 'ms': 0, + 'mt': 15, + 'my': 0, + 'nah': 3, + 'naq': 7, + 'nb': 3, + 'nd': 3, + 'ne': 3, + 'nl': 3, + 'nn': 3, + 'no': 3, + 'nr': 3, + 'nso': 4, + 'ny': 3, + 'nyn': 3, + 'om': 3, + 'or': 3, + 'pa': 3, + 'pap': 3, + 'pl': 13, + 'ps': 3, + 'pt': 3, + 'rm': 3, + 'ro': 9, + 'rof': 3, + 'ru': 11, + 'rwk': 3, + 'sah': 0, + 'saq': 3, + 'se': 7, + 'seh': 3, + 'ses': 0, + 'sg': 0, + 'sh': 11, + 'shi': 19, + 'sk': 12, + 'sl': 14, + 'sma': 7, + 'smi': 7, + 'smj': 7, + 'smn': 7, + 'sms': 7, + 'sn': 3, + 'so': 3, + 'sq': 3, + 'sr': 11, + 'ss': 3, + 'ssy': 3, + 'st': 3, + 'sv': 3, + 'sw': 3, + 'syr': 3, + 'ta': 3, + 'te': 3, + 'teo': 3, + 'th': 0, + 'ti': 4, + 'tig': 3, + 'tk': 3, + 'tl': 4, + 'tn': 3, + 'to': 0, + 'tr': 0, + 'ts': 3, + 'tzm': 22, + 'uk': 11, + 'ur': 3, + 've': 3, + 'vi': 0, + 'vun': 3, + 'wa': 4, + 'wae': 3, + 'wo': 0, + 'xh': 3, + 'xog': 3, + 'yo': 0, + 'zh': 0, + 'zu': 3 + }; + + function isIn(n, list) { + return list.indexOf(n) !== -1; + } + + function isBetween(n, start, end) { + return start <= n && n <= end; + } + + var pluralRules = { + '0': function (n) { + return 'other'; + }, + '1': function (n) { + if (isBetween(n % 100, 3, 10)) return 'few'; + if (n === 0) return 'zero'; + if (isBetween(n % 100, 11, 99)) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '2': function (n) { + if (n !== 0 && n % 10 === 0) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '3': function (n) { + if (n == 1) return 'one'; + return 'other'; + }, + '4': function (n) { + if (isBetween(n, 0, 1)) return 'one'; + return 'other'; + }, + '5': function (n) { + if (isBetween(n, 0, 2) && n != 2) return 'one'; + return 'other'; + }, + '6': function (n) { + if (n === 0) return 'zero'; + if (n % 10 == 1 && n % 100 != 11) return 'one'; + return 'other'; + }, + '7': function (n) { + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '8': function (n) { + if (isBetween(n, 3, 6)) return 'few'; + if (isBetween(n, 7, 10)) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '9': function (n) { + if (n === 0 || n != 1 && isBetween(n % 100, 1, 19)) return 'few'; + if (n == 1) return 'one'; + return 'other'; + }, + '10': function (n) { + if (isBetween(n % 10, 2, 9) && !isBetween(n % 100, 11, 19)) return 'few'; + if (n % 10 == 1 && !isBetween(n % 100, 11, 19)) return 'one'; + return 'other'; + }, + '11': function (n) { + if (isBetween(n % 10, 2, 4) && !isBetween(n % 100, 12, 14)) return 'few'; + if (n % 10 === 0 || isBetween(n % 10, 5, 9) || isBetween(n % 100, 11, 14)) return 'many'; + if (n % 10 == 1 && n % 100 != 11) return 'one'; + return 'other'; + }, + '12': function (n) { + if (isBetween(n, 2, 4)) return 'few'; + if (n == 1) return 'one'; + return 'other'; + }, + '13': function (n) { + if (isBetween(n % 10, 2, 4) && !isBetween(n % 100, 12, 14)) return 'few'; + if (n != 1 && isBetween(n % 10, 0, 1) || isBetween(n % 10, 5, 9) || isBetween(n % 100, 12, 14)) return 'many'; + if (n == 1) return 'one'; + return 'other'; + }, + '14': function (n) { + if (isBetween(n % 100, 3, 4)) return 'few'; + if (n % 100 == 2) return 'two'; + if (n % 100 == 1) return 'one'; + return 'other'; + }, + '15': function (n) { + if (n === 0 || isBetween(n % 100, 2, 10)) return 'few'; + if (isBetween(n % 100, 11, 19)) return 'many'; + if (n == 1) return 'one'; + return 'other'; + }, + '16': function (n) { + if (n % 10 == 1 && n != 11) return 'one'; + return 'other'; + }, + '17': function (n) { + if (n == 3) return 'few'; + if (n === 0) return 'zero'; + if (n == 6) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '18': function (n) { + if (n === 0) return 'zero'; + if (isBetween(n, 0, 2) && n !== 0 && n != 2) return 'one'; + return 'other'; + }, + '19': function (n) { + if (isBetween(n, 2, 10)) return 'few'; + if (isBetween(n, 0, 1)) return 'one'; + return 'other'; + }, + '20': function (n) { + if ((isBetween(n % 10, 3, 4) || n % 10 == 9) && !(isBetween(n % 100, 10, 19) || isBetween(n % 100, 70, 79) || isBetween(n % 100, 90, 99))) return 'few'; + if (n % 1000000 === 0 && n !== 0) return 'many'; + if (n % 10 == 2 && !isIn(n % 100, [12, 72, 92])) return 'two'; + if (n % 10 == 1 && !isIn(n % 100, [11, 71, 91])) return 'one'; + return 'other'; + }, + '21': function (n) { + if (n === 0) return 'zero'; + if (n == 1) return 'one'; + return 'other'; + }, + '22': function (n) { + if (isBetween(n, 0, 1) || isBetween(n, 11, 99)) return 'one'; + return 'other'; + }, + '23': function (n) { + if (isBetween(n % 10, 1, 2) || n % 20 === 0) return 'one'; + return 'other'; + }, + '24': function (n) { + if (isBetween(n, 3, 10) || isBetween(n, 13, 19)) return 'few'; + if (isIn(n, [2, 12])) return 'two'; + if (isIn(n, [1, 11])) return 'one'; + return 'other'; + } + }; + var index = locales2rules[lang.replace(/-.*$/, '')]; + + if (!(index in pluralRules)) { + console.warn('plural form unknown for [' + lang + ']'); + return function () { + return 'other'; + }; + } + + return pluralRules[index]; + } + + gMacros.plural = function (str, param, key, prop) { + var n = parseFloat(param); + if (isNaN(n)) return str; + if (prop != gTextProp) return str; + + if (!gMacros._pluralRules) { + gMacros._pluralRules = getPluralRules(gLanguage); + } + + var index = '[' + gMacros._pluralRules(n) + ']'; + + if (n === 0 && key + '[zero]' in gL10nData) { + str = gL10nData[key + '[zero]'][prop]; + } else if (n == 1 && key + '[one]' in gL10nData) { + str = gL10nData[key + '[one]'][prop]; + } else if (n == 2 && key + '[two]' in gL10nData) { + str = gL10nData[key + '[two]'][prop]; + } else if (key + index in gL10nData) { + str = gL10nData[key + index][prop]; + } else if (key + '[other]' in gL10nData) { + str = gL10nData[key + '[other]'][prop]; + } + + return str; + }; + + function getL10nData(key, args, fallback) { + var data = gL10nData[key]; + + if (!data) { + console.warn('#' + key + ' is undefined.'); + + if (!fallback) { + return null; + } + + data = fallback; + } + + var rv = {}; + + for (var prop in data) { + var str = data[prop]; + str = substIndexes(str, args, key, prop); + str = substArguments(str, args, key); + rv[prop] = str; + } + + return rv; + } + + function substIndexes(str, args, key, prop) { + var reIndex = /\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/; + var reMatch = reIndex.exec(str); + if (!reMatch || !reMatch.length) return str; + var macroName = reMatch[1]; + var paramName = reMatch[2]; + var param; + + if (args && paramName in args) { + param = args[paramName]; + } else if (paramName in gL10nData) { + param = gL10nData[paramName]; + } + + if (macroName in gMacros) { + var macro = gMacros[macroName]; + str = macro(str, param, key, prop); + } + + return str; + } + + function substArguments(str, args, key) { + var reArgs = /\{\{\s*(.+?)\s*\}\}/g; + return str.replace(reArgs, function (matched_text, arg) { + if (args && arg in args) { + return args[arg]; + } + + if (arg in gL10nData) { + return gL10nData[arg]; + } + + console.log('argument {{' + arg + '}} for #' + key + ' is undefined.'); + return matched_text; + }); + } + + function translateElement(element) { + var l10n = getL10nAttributes(element); + if (!l10n.id) return; + var data = getL10nData(l10n.id, l10n.args); + + if (!data) { + console.warn('#' + l10n.id + ' is undefined.'); + return; + } + + if (data[gTextProp]) { + if (getChildElementCount(element) === 0) { + element[gTextProp] = data[gTextProp]; + } else { + var children = element.childNodes; + var found = false; + + for (var i = 0, l = children.length; i < l; i++) { + if (children[i].nodeType === 3 && /\S/.test(children[i].nodeValue)) { + if (found) { + children[i].nodeValue = ''; + } else { + children[i].nodeValue = data[gTextProp]; + found = true; + } + } + } + + if (!found) { + var textNode = document.createTextNode(data[gTextProp]); + element.insertBefore(textNode, element.firstChild); + } + } + + delete data[gTextProp]; + } + + for (var k in data) { + element[k] = data[k]; + } + } + + function getChildElementCount(element) { + if (element.children) { + return element.children.length; + } + + if (typeof element.childElementCount !== 'undefined') { + return element.childElementCount; + } + + var count = 0; + + for (var i = 0; i < element.childNodes.length; i++) { + count += element.nodeType === 1 ? 1 : 0; + } + + return count; + } + + function translateFragment(element) { + element = element || document.documentElement; + var children = getTranslatableChildren(element); + var elementCount = children.length; + + for (var i = 0; i < elementCount; i++) { + translateElement(children[i]); + } + + translateElement(element); + } + + return { + get: function (key, args, fallbackString) { + var index = key.lastIndexOf('.'); + var prop = gTextProp; + + if (index > 0) { + prop = key.substring(index + 1); + key = key.substring(0, index); + } + + var fallback; + + if (fallbackString) { + fallback = {}; + fallback[prop] = fallbackString; + } + + var data = getL10nData(key, args, fallback); + + if (data && prop in data) { + return data[prop]; + } + + return '{{' + key + '}}'; + }, + getData: function () { + return gL10nData; + }, + getText: function () { + return gTextData; + }, + getLanguage: function () { + return gLanguage; + }, + setLanguage: function (lang, callback) { + loadLocale(lang, function () { + if (callback) callback(); + }); + }, + getDirection: function () { + var rtlList = ['ar', 'he', 'fa', 'ps', 'ur']; + var shortCode = gLanguage.split('-', 1)[0]; + return rtlList.indexOf(shortCode) >= 0 ? 'rtl' : 'ltr'; + }, + translate: translateFragment, + getReadyState: function () { + return gReadyState; + }, + ready: function (callback) { + if (!callback) { + return; + } else if (gReadyState == 'complete' || gReadyState == 'interactive') { + window.setTimeout(function () { + callback(); + }); + } else if (document.addEventListener) { + document.addEventListener('localized', function once() { + document.removeEventListener('localized', once); + callback(); + }); + } + } + }; +}(window, document); + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFPrintService = PDFPrintService; + +var _ui_utils = __webpack_require__(2); + +var _app = __webpack_require__(1); + +var _app_options = __webpack_require__(3); + +let activeService = null; +let overlayManager = null; + +function renderPage(activeServiceOnEntry, pdfDocument, pageNumber, size) { + const scratchCanvas = activeService.scratchCanvas; + const PRINT_RESOLUTION = _app_options.AppOptions.get("printResolution") || 150; + const PRINT_UNITS = PRINT_RESOLUTION / 72.0; + scratchCanvas.width = Math.floor(size.width * PRINT_UNITS); + scratchCanvas.height = Math.floor(size.height * PRINT_UNITS); + const width = Math.floor(size.width * _ui_utils.CSS_UNITS) + "px"; + const height = Math.floor(size.height * _ui_utils.CSS_UNITS) + "px"; + const ctx = scratchCanvas.getContext("2d"); + ctx.save(); + ctx.fillStyle = "rgb(255, 255, 255)"; + ctx.fillRect(0, 0, scratchCanvas.width, scratchCanvas.height); + ctx.restore(); + return pdfDocument.getPage(pageNumber).then(function (pdfPage) { + const renderContext = { + canvasContext: ctx, + transform: [PRINT_UNITS, 0, 0, PRINT_UNITS, 0, 0], + viewport: pdfPage.getViewport({ + scale: 1, + rotation: size.rotation + }), + intent: "print" + }; + return pdfPage.render(renderContext).promise; + }).then(function () { + return { + width, + height + }; + }); +} + +function PDFPrintService(pdfDocument, pagesOverview, printContainer, l10n) { + this.pdfDocument = pdfDocument; + this.pagesOverview = pagesOverview; + this.printContainer = printContainer; + this.l10n = l10n || _ui_utils.NullL10n; + this.disableCreateObjectURL = _app_options.AppOptions.get("disableCreateObjectURL"); + this.currentPage = -1; + this.scratchCanvas = document.createElement("canvas"); +} + +PDFPrintService.prototype = { + layout() { + this.throwIfInactive(); + const body = document.querySelector("body"); + body.setAttribute("data-pdfjsprinting", true); + const hasEqualPageSizes = this.pagesOverview.every(function (size) { + return size.width === this.pagesOverview[0].width && size.height === this.pagesOverview[0].height; + }, this); + + if (!hasEqualPageSizes) { + console.warn("Not all pages have the same size. The printed " + "result may be incorrect!"); + } + + this.pageStyleSheet = document.createElement("style"); + const pageSize = this.pagesOverview[0]; + this.pageStyleSheet.textContent = "@supports ((size:A4) and (size:1pt 1pt)) {" + "@page { size: " + pageSize.width + "pt " + pageSize.height + "pt;}" + "}"; + body.appendChild(this.pageStyleSheet); + }, + + destroy() { + if (activeService !== this) { + return; + } + + this.printContainer.textContent = ""; + const body = document.querySelector("body"); + body.removeAttribute("data-pdfjsprinting"); + + if (this.pageStyleSheet) { + this.pageStyleSheet.remove(); + this.pageStyleSheet = null; + } + + this.scratchCanvas.width = this.scratchCanvas.height = 0; + this.scratchCanvas = null; + activeService = null; + ensureOverlay().then(function () { + if (overlayManager.active !== "printServiceOverlay") { + return; + } + + overlayManager.close("printServiceOverlay"); + }); + }, + + renderPages() { + const pageCount = this.pagesOverview.length; + + const renderNextPage = (resolve, reject) => { + this.throwIfInactive(); + + if (++this.currentPage >= pageCount) { + renderProgress(pageCount, pageCount, this.l10n); + resolve(); + return; + } + + const index = this.currentPage; + renderProgress(index, pageCount, this.l10n); + renderPage(this, this.pdfDocument, index + 1, this.pagesOverview[index]).then(this.useRenderedPage.bind(this)).then(function () { + renderNextPage(resolve, reject); + }, reject); + }; + + return new Promise(renderNextPage); + }, + + useRenderedPage(printItem) { + this.throwIfInactive(); + const img = document.createElement("img"); + img.style.width = printItem.width; + img.style.height = printItem.height; + const scratchCanvas = this.scratchCanvas; + + if ("toBlob" in scratchCanvas && !this.disableCreateObjectURL) { + scratchCanvas.toBlob(function (blob) { + img.src = URL.createObjectURL(blob); + }); + } else { + img.src = scratchCanvas.toDataURL(); + } + + const wrapper = document.createElement("div"); + wrapper.appendChild(img); + this.printContainer.appendChild(wrapper); + return new Promise(function (resolve, reject) { + img.onload = resolve; + img.onerror = reject; + }); + }, + + performPrint() { + this.throwIfInactive(); + return new Promise(resolve => { + setTimeout(() => { + if (!this.active) { + resolve(); + return; + } + + print.call(window); + setTimeout(resolve, 20); + }, 0); + }); + }, + + get active() { + return this === activeService; + }, + + throwIfInactive() { + if (!this.active) { + throw new Error("This print request was cancelled or completed."); + } + } + +}; +const print = window.print; + +window.print = function () { + if (activeService) { + console.warn("Ignored window.print() because of a pending print job."); + return; + } + + ensureOverlay().then(function () { + if (activeService) { + overlayManager.open("printServiceOverlay"); + } + }); + + try { + dispatchEvent("beforeprint"); + } finally { + if (!activeService) { + console.error("Expected print service to be initialized."); + ensureOverlay().then(function () { + if (overlayManager.active === "printServiceOverlay") { + overlayManager.close("printServiceOverlay"); + } + }); + return; + } + + const activeServiceOnEntry = activeService; + activeService.renderPages().then(function () { + return activeServiceOnEntry.performPrint(); + }).catch(function () {}).then(function () { + if (activeServiceOnEntry.active) { + abort(); + } + }); + } +}; + +function dispatchEvent(eventType) { + const event = document.createEvent("CustomEvent"); + event.initCustomEvent(eventType, false, false, "custom"); + window.dispatchEvent(event); +} + +function abort() { + if (activeService) { + activeService.destroy(); + dispatchEvent("afterprint"); + } +} + +function renderProgress(index, total, l10n) { + const progressContainer = document.getElementById("printServiceOverlay"); + const progress = Math.round(100 * index / total); + const progressBar = progressContainer.querySelector("progress"); + const progressPerc = progressContainer.querySelector(".relative-progress"); + progressBar.value = progress; + l10n.get("print_progress_percent", { + progress + }, progress + "%").then(msg => { + progressPerc.textContent = msg; + }); +} + +window.addEventListener("keydown", function (event) { + if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) { + window.print(); + event.preventDefault(); + + if (event.stopImmediatePropagation) { + event.stopImmediatePropagation(); + } else { + event.stopPropagation(); + } + } +}, true); + +if ("onbeforeprint" in window) { + const stopPropagationIfNeeded = function (event) { + if (event.detail !== "custom" && event.stopImmediatePropagation) { + event.stopImmediatePropagation(); + } + }; + + window.addEventListener("beforeprint", stopPropagationIfNeeded); + window.addEventListener("afterprint", stopPropagationIfNeeded); +} + +let overlayPromise; + +function ensureOverlay() { + if (!overlayPromise) { + overlayManager = _app.PDFViewerApplication.overlayManager; + + if (!overlayManager) { + throw new Error("The overlay manager has not yet been initialized."); + } + + overlayPromise = overlayManager.register("printServiceOverlay", document.getElementById("printServiceOverlay"), abort, true); + document.getElementById("printCancel").onclick = abort; + } + + return overlayPromise; +} + +_app.PDFPrintServiceFactory.instance = { + supportsPrinting: true, + + createPrintService(pdfDocument, pagesOverview, printContainer, l10n) { + if (activeService) { + throw new Error("The print service is created and active."); + } + + activeService = new PDFPrintService(pdfDocument, pagesOverview, printContainer, l10n); + return activeService; + } + +}; + +/***/ }) +/******/ ]); +//# sourceMappingURL=viewer.js.map \ No newline at end of file diff --git a/src/main/resources/static/ruoyi.png b/src/main/resources/static/ruoyi.png new file mode 100644 index 0000000..b0af01f Binary files /dev/null and b/src/main/resources/static/ruoyi.png differ diff --git a/src/main/resources/static/ruoyi/css/ry-ui.css b/src/main/resources/static/ruoyi/css/ry-ui.css new file mode 100644 index 0000000..e43b42f --- /dev/null +++ b/src/main/resources/static/ruoyi/css/ry-ui.css @@ -0,0 +1,1179 @@ +/** + * 通用css样式布局处理 + * Copyright (c) 2019 ruoyi + */ + +/** 基础通用 **/ +.pt5 { + padding-top: 5px; +} +.pr5 { + padding-right: 5px; +} +.pb5 { + padding-bottom: 5px; +} +.mt5 { + margin-top: 5px; +} +.mr5 { + margin-right: 5px; +} +.mb5 { + margin-bottom: 5px; +} +.ml5 { + margin-left: 5px; +} +.mt10 { + margin-top: 10px; +} +.mr10 { + margin-right: 10px; +} +.mb10 { + margin-bottom: 10px; +} +.ml0 { + margin-left: 10px; +} +.mt20 { + margin-top: 20px; +} +.mr20 { + margin-right: 20px; +} +.mb20 { + margin-bottom: 20px; +} +.m20 { + margin-left: 20px; +} +.m50 { + margin-left: 50px; +} +.img-xs { + width: 32px; + height: 32px; +} +.img-sm { + width: 64px; + height: 64px; +} +.img-md { + width: 96px; + height: 96px; +} +.img-lg { + width: 120px; + height: 120px; +} +.section-content { + min-height: 250px; + margin-right: auto; + margin-left: auto; + padding: 5px 5px 5px 5px; + width: 100%; + height: 100%; + position: absolute; +} + +.ibox { + margin-bottom: 25px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + height: 100%; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); +} + +.list-group-striped > .list-group-item { + border-left: 0; + border-right: 0; + border-radius: 0; + padding-left: 0; + padding-right: 0 +} + +.ibox-title-gray { + height: 41px; + background-color: #f0f3f4; + color: #333; + font-weight: 700; + border-radius: 2px 2px 0 0; + padding: 13px !important; + border-bottom: 1px solid #eee; + display: block; + clear: both; +} + +.dashboard-header h5 { + padding: 8px 0 0 0; + display: inline-block; + font-size: 14px; + text-overflow: ellipsis; + float: left; + font-weight: 400; +} + +.ibox-title-gray h5 { + display: inline-block; + font-size: 14px; + margin: 0 0 7px; + padding: 0; + text-overflow: ellipsis; + float: left; +} + +/* 导航页签 */ +.nav-tabs-custom { + margin-bottom: 20px; + background: #fff; + box-shadow: 0 1px 1px rgba(0,0,0,0.1); + border-radius: 3px +} + +.nav-tabs-custom>.nav-tabs { + margin: 0; + border-bottom-color: #f4f4f4; + border-top-right-radius: 3px; + border-top-left-radius: 3px +} + +.nav-tabs-custom>.nav-tabs>li { + border-top: 3px solid transparent; + margin-bottom: -2px; + margin-right: 5px +} + +.nav-tabs-custom>.nav-tabs>li.header { + padding-left: 5px; + font-size: 16px; + line-height: 30px; +} + +.nav-tabs-custom>.nav-tabs>li.disabled>a { + color: #777 +} + +.nav-tabs-custom>.nav-tabs>li>a { + color: #444; + font-weight: normal; + border-radius: 0 +} + +.nav-tabs-custom>.nav-tabs>li>a,.nav-tabs-custom>.nav-tabs>li>a:hover { + background: transparent; + margin: 0 +} + +.nav-tabs-custom>.nav-tabs>li>a:hover { + color: #999 +} + +.nav-tabs-custom>.nav-tabs>li:not(.active)>a:hover,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:focus,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:active { + border-color: transparent +} + +.nav-tabs-custom>.nav-tabs>li.active { + border-top-color: #1890ff +} + +.nav-tabs-custom>.nav-tabs>li.active>a,.nav-tabs-custom>.nav-tabs>li.active:hover>a { + background-color: #fff; + color: #444 +} + +.nav-tabs-custom>.nav-tabs>li.active>a { + border-top-color: transparent; + border-bottom-color: transparent; + border-left-color: #f4f4f4; + border-right-color: #f4f4f4 +} + +.nav-tabs-custom>.tab-content { + background: #fff; + padding: 10px; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px +} + +/** 弹层组件 禁用样式 **/ +.layer-disabled { + border: 1px #dedede solid !important; + background-color: #f1f1f1 !important; + color: #333 !important; + pointer-events: none; +} + +/** 用户管理 样式布局 **/ +.box { + position: relative; + border-radius: 3px; + background: #ffffff; + border-top: 3px solid #d2d6de; + margin-bottom: 20px; + width: 100%; + box-shadow: 0 1px 1px rgba(0,0,0,0.1) +} + +.box-header:before,.box-body:before,.box-footer:before,.box-header:after,.box-body:after,.box-footer:after { + content: " "; + display: table +} + +.box-header:after,.box-body:after,.box-footer:after { + clear: both +} + +.btn-box-tool { + padding: 5px; + font-size: 12px; + background: transparent; + color: #97a0b3; +} + +.open .btn-box-tool, +.btn-box-tool:hover { + color: #606c84; +} + +.box-main { + margin: 0; + border: 0; + padding-top: 2px; + border-radius: 0; + box-shadow: none +} + +.box-main>.box-header { + border-bottom: 1px solid #eee; + padding: 12px 10px 2px 15px +} + +.box-header .box-title { + display: inline-block; + font-size: 18px; + margin: 0; + line-height: 1; +} + +.box-main>.box-header .box-title { + font-size: 16px; + margin-bottom: 13px; + float: left +} + +.box-main>.box-header .box-title .fa { + font-size: 14px; + padding-right: 3px; + margin-top: -2px +} + +.box-main>.box-header .box-tools { + position: relative; + top: -5px; + right: 0 +} + +.box-main>.box-header .box-tools .btn { + padding: 3px 10px 5px 10px; + font-size: 14px; + margin-bottom: 2px +} + +.box-main>.box-header .box-tools .btn-box-tool { + padding: 4px 2px +} + +.box-main form>.box-footer,.nav-main form>.box-footer { + background: #fafafa +} + +.box-main form>.box-footer .row,.nav-main form>.box-footer .row { + margin: 5px 0 5px -25px +} + +@media ( min-width : 768px) { + .section-content .about { + padding-left: 0px + } +} + +/** select2 样式修改 **/ +.select2-container--default .select2-selection--multiple .select2-selection__choice { + background-color: #1AB394; + border-color: #1AB394; + padding: 1px 10px; + color: #fff +} + +.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { + margin-right: 5px; + color: rgba(255,255,255,0.7) +} + +.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { + color: #fff +} + +.select2-container .select2-selection--single .select2-selection__rendered { + padding-right: 10px +} + +/** 表单验证 样式布局 **/ +.control-label.is-required:before { + content: '* '; + color: red; +} + +label.error { + position: absolute; + right: 18px; + top: 6px; + color: #ef392b; + font-size: 12px; + z-index:99; +} + +.input-group label.error { + z-index:99; + right: 42px +} + +.input-group input.error + label.error + .input-group-addon>i { + color: #ed5565; +} + +.input-group.date label.error { + z-index:99; + right: 3px +} + +.Validform_error,input.error,textarea.error,select.error { + background-color: #fbe2e2; + border-color: #c66161; + color: #c00 +} + +.Validform_wrong,.Validform_right,.Validform_warning { + display: inline-block; + height: 20px; + font-size: 12px; + vertical-align: middle; + padding-left: 25px +} + +.i-checks label.error, .check-box label.error, .radio-box label.error { + right: auto; + width: 150px; + left: 210px; + top: 1px; + max-width: none; +} + +/** 复选框&单选框 **/ +.check-box,.radio-box { + display: inline-block; + box-sizing: border-box; + cursor: pointer; + position: relative; + padding-left: 25px; + padding-right: 15px; + padding-top: 8px; +} + +.icheckbox, .icheckbox-blue, .iradio, .iradio-blue, .iradio-purple { + position: absolute; + top: 8px; + left: 0 +} + +/** iCheck **/ +.icheckbox-blue,.iradio-blue { + display: block; + margin: 0; + padding: 0; + width: 18px; + height: 18px; + background: url(../../img/blue.png) no-repeat; + border: none; + cursor: pointer +} + +.icheckbox-blue,.icheckbox-blue.static:hover { + background-position: 0 0 +} + +.icheckbox-blue.hover,.icheckbox-blue:hover { + background-position: -20px 0 +} + +.icheckbox-blue.checked { + background-position: -40px 0 +} + +.icheckbox-blue.disabled { + background-position: -60px 0; + cursor: default +} + +.icheckbox-blue.checked.disabled { + background-position: -80px 0 +} + +.iradio-blue,.iradio-blue.static:hover { + background-position: -100px 0 +} + +.iradio-blue.hover,.iradio-blue:hover { + background-position: -120px 0 +} + +.iradio-blue.checked { + background-position: -140px 0 +} + +.iradio-blue.disabled { + background-position: -160px 0; + cursor: default +} + +.iradio-blue.checked.disabled { + background-position: -180px 0 +} + +/* ztree */ +div.ztree-border { + margin-top: 10px; + border: 1px solid #e5e6e7; + background: #FFFFFF none; + border-radius:4px; +} + +/* 切换开关 */ +.toggle-switch { + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + margin-bottom: 0; + padding-top: 8px; +} +.toggle-switch input { + height: 0; + width: 0; + position: absolute; + opacity: 0; +} +.toggle-switch span { + display: inline-block; + position: relative; + width: 40px; + height: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + background-color: #ebebeb; + border: 2px solid #ebebeb; + cursor: pointer; + -webkit-transition: all .1s ease; + -o-transition: all .1s ease; + transition: all .1s ease +} +.toggle-switch span:after { + content: ''; + height: 20px; + width: 20px; + -webkit-border-radius: 50%; + border-radius: 50%; + position: absolute; + left: 1px; + top: -7px; + color: #aaa; + -webkit-transition: all .1s ease; + -o-transition: all .1s ease; + transition: all .1s ease; + text-align: center; + font-size: 13px; + background-color: #fff; + -webkit-box-shadow: rgba(0,0,0,.12) 0 1px 6px,rgba(0,0,0,.12) 0 1px 4px; + box-shadow: rgba(0,0,0,.12) 0 1px 6px,rgba(0,0,0,.12) 0 1px 4px +} +.toggle-switch input:checked~span:after { + left: -webkit-calc(100% - 20px); + left: calc(100% - 20px); + background-color: #33cabb +} + +.toggle-switch.switch-solid span { + height: 20px; +} +.toggle-switch.switch-solid span:after { + top: -2px; +} +.switch-solid input:checked~span { + background-color: #33cabb; + border-color: #33cabb +} +.switch-solid input:checked~span:after { + background-color: #fff; + color: #33cabb +} + +/** 遮罩层 **/ +.loaderbox { + display: inline-block; + min-width: 125px; + padding: 10px; + margin: 0 auto; + color: #000 !important; + font-size: 13px; + font-weight: 400; + text-align: center; + vertical-align: middle; + border: 1px solid #ddd; + background-color: #eee; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); +} + +.loaderbox .loading-activity { + float: left; + width: 18px; + height: 18px; + border: solid 2px transparent; + border-top-color: #000; + border-left-color: #000; + border-radius: 10px; + -webkit-animation: pace-spinner 400ms linear infinite; + -moz-animation: pace-spinner 400ms linear infinite; + -ms-animation: pace-spinner 400ms linear infinite; + -o-animation: pace-spinner 400ms linear infinite; + animation: pace-spinner 400ms linear infinite; +} + +@media (max-width: 767px) { + .loading-activity { + width: 18px; + height: 18px; + } +} + +@-ms-keyframes pace-spinner { + 0% { + -ms-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -ms-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes pace-spinner { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +/** 表单查询条件 **/ +.select-list ul, .layui-layer-content ul { + margin: 0; + padding: 0; + -webkit-tap-highlight-color: rgba(0,0,0,0); +} + +.select-list li, .layui-layer-content li { + list-style: none; +} + +.select-time .time-input { + display: block; + width: 100%; + padding-left: 10px; +} + +label { + font-weight: normal; +} + +.container-div { + padding: 0px 28px; + height: 100%; +} + +.container-div .row { + height: 100%; +} + +.search-collapse,.select-table { + width: 100%; + background: #fff; + border-radius: 6px; + margin-top: 10px; + padding-top: 5px; + padding-bottom: 13px; + box-shadow: 1px 1px 3px rgba(0,0,0,.2); +} + +.search-collapse { + position: relative; +} + +.search-collapse .col-sm-6 .control-label { + color: #333; +} + +@media ( max-width : 768px) { + .search-collapse { + display: none; + } +} + +@media ( min-width : 768px) { + .select-list li { + float: left; + } +} + +.select-list li { + color: #333; + margin: 5px 15px 5px 0px; +} + +.select-list li p, .select-list li label:not(.radio-box){ + float: left; + width: 65px; + margin: 5px 0px 0px 0px; + text-align:right; +} + +.select-list li input { + border: 1px solid #ddd; + border-radius: 4px; + background: transparent; + outline: none; + height: 30px; + width: 200px; + padding-left: 5px; +} + +.select-list li .submit-btn { + border: 0px; + border-radius: 4px; + background: transparent; + outline: none; + width: 40px; + height: 23px; +} + +.select-list li select { + border: 1px solid #ddd; + border-radius: 4px; + background: transparent; + outline: none; + height: 30px; + width: 200px; +} + +.bootstrap-select.form-control .btn-default { + color: inherit; + padding: 4px 6px 4px; + border-radius: 4px; + border: 1px solid #e5e6e7; + outline: none; + height: 31px; + background: #FFFFFF none +} + +.file-input .btn-default { + color: inherit; + background: white; + border: 1px solid #e7eaec; +} + +.select-list .btn-default { + color: #555; + padding: 5px 5px; + border: 1px solid #ddd; + border-radius: 4px; + background: transparent; + outline: none; + height: 30px; + width: 200px; +} + +.select-list .btn-default:hover,.select-list .btn-default:focus,.select-list .btn-default:active,.select-list .btn-default.active,.open .dropdown-toggle.btn-default { + color: #555; + background-color: #e4e4e4; + border-color: #b2b2b2 +} + +.select-list .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) { + height: 30px; + width: 200px; +} + +.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder, +.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder:hover, +.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder:focus, +.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder:active { + color: inherit; + font-size: 13px; +} + +.select-list .bootstrap-select .dropdown-toggle .caret { + position: inherit; +} + +.select-list .select-selectpicker li { + float: none; +} + +.select-list .dropdown-menu>li>a,.bootstrap-select.form-control .dropdown-menu>li>a { + line-height: inherit; +} + +.select-list .dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a,.bootstrap-select.form-control .dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{ + color: #fff; + text-decoration: none; + background-color: #12889a +} + +.select-list .select2-container--bootstrap { + width: 200px!important; + display: inline-block; +} + +.select-list .select2-container--bootstrap .select2-selection { + border-radius: 6px; +} + +.select-list .select2-container--bootstrap .select2-selection--single { + height: 30px!important; + padding: 5px 10px; +} + +.select-list .select-time input { + width: 93px; +} + +.select-time label,.select-time span,.select-time input { + float: left; +} + +@media (max-width:767px) { + .select-time label,.select-time span,.select-time input { + float: none; + } + .select-list .select-time input { + width: 200px; + } +} + +.select-time label { + margin-top: 5px; +} + +.select-time span { + display: block; + margin: 5px 5px; +} + +.search-btn { + background-color: #1ab394; + border-color: #1ab394; + color: #FFF; + margin-bottom: 5px; + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: 400; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + border-radius: 3px; + vertical-align: middle; + cursor: pointer; +} + +.select-title{ + color:#3d5266; + font-size:15px; + padding:10px 0px; + font-weight: normal; +} + +/** 表格查询数据 **/ +.table-striped { + min-height: 75%; +} + +.table-striped .bootstrap-table, .table-striped .table-bordered { + border: 0px!important; +} + +.table-bordered .table>thead>tr>th, .table-bordered .table>tbody>tr>th { + font-weight: normal; + font-size: 13px +} + +.table-striped table>thead>tr>th, .table-striped table>tbody>tr>th, .table-striped table>tfoot>tr>th, .table-striped table>thead>tr>td, .table-striped table>tbody>tr>td, .table-striped table>tfoot>tr>td { + border-bottom: 1px solid #e7eaec!important; + background-color: transparent; + border: 0px; +} + +.table-bordered table>thead>tr>th:first-child, .table-bordered table>tbody>tr>td:first-child { + border-left: 1px solid #ddd; +} + +.table-bordered table>thead>tr>th:last-child, .table-bordered table>tbody>tr>td:last-child { + border-right: 1px solid #ddd; +} + +.table-bordered table>thead>tr>th, .table-bordered table>tbody>tr>td { + border-top: 1px solid #ddd!important; + border-bottom: 1px solid #ddd; +} + +.fixed-table-footer { + border-top: 0px solid #ddd; +} + +.fixed-table-container { + border: 0px solid #ddd; +} + +.table-striped .table>thead>tr>th, .table-striped .table>tbody>tr>th { + border-bottom: 1px solid #ccc!important; + border-top: 0px!important; + font-weight: normal; + font-size: 13px +} + +.table-striped table thead { + background-color: #eff3f8; +} + +.fixed-table-container thead th >.both{ + display: inline-block +} + +.editable-input .input-sm { + height: 32px!important; +} + +/** 表格列宽拖动样式 **/ +.rc-handle-container { + position: relative; +} +.rc-handle { + position: absolute; + width: 7px; + cursor: ew-resize; + margin-left: -3px; + z-index: 2; +} +table.rc-table-resizing { + cursor: ew-resize; +} +table.rc-table-resizing thead, +table.rc-table-resizing thead > th, +table.rc-table-resizing thead > th > a { + cursor: ew-resize; +} + +/** 表格冻结列样式 **/ +.fixed-columns, .fixed-columns-right { + position: absolute; + top: 0; + height: 100%; + background-color: #fff; + box-sizing: border-box; + z-index: 1; +} + +.fixed-columns { + left: 0; +} + +.fixed-columns .fixed-table-body { + overflow: hidden !important; +} + +.fixed-columns-right { + right: 0; +} + +.fixed-columns-right .fixed-table-body { + overflow-x: hidden !important; +} + +.bootstrap-table .table-hover > tbody > tr.hover > td { + background-color: #f5f5f5; +} + +/** 表格树样式 **/ +.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;} +.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;} +.bootstrap-tree-table .treetable-selected{background: #f5f5f5 !important;} +.bootstrap-tree-table .treetable-table{border:0 !important;margin-bottom:0} +.bootstrap-tree-table .treetable-table tbody {display:block;height:auto;overflow-y:auto;} +.bootstrap-tree-table .treetable-table thead, .treetable-table tbody tr {display:table;width:100%;table-layout:fixed;} +.bootstrap-tree-table .treetable-thead th{line-height:24px;border: 0 !important;border-radius: 4px;border-left:0px solid #e7eaec !important;border-bottom:1px solid #ccc!important;text-align: left;} +.bootstrap-tree-table .treetable-thead tr :first-child{border-left:0 !important} +.bootstrap-tree-table .treetable-tbody td{border: 0 !important;border-left:0px solid #e7eaec !important;border-bottom:1px solid #e7eaec!important;white-space: nowrap; text-overflow: ellipsis;} +.bootstrap-tree-table .treetable-tbody tr :first-child{border-left:0 !important} +.bootstrap-tree-table .treetable-bars .tool-left, .bootstrap-tree-table .treetable-bars .tool-right{margin-top: 10px; margin-bottom: 10px;} +.bootstrap-tree-table .treetable-bars .tool-left{float: left;} +.bootstrap-tree-table .treetable-bars .tool-right{float: right;} +.bootstrap-tree-table .treetable-bars .columns li label{display: block;padding: 3px 20px;clear: both;font-weight: 400;line-height: 1.428571429;max-width: 100%;margin-bottom: 5px;cursor:pointer;} +.bootstrap-tree-table .table{border-bottom: 0px solid #e7eaec!important;} +.bootstrap-tree-table .table-bordered .treetable-thead th {border-left: 1px solid #e7eaec!important;} +.bootstrap-tree-table .table-bordered .treetable-tbody td {border-right: 1px solid #e7eaec!important;} + +/** 首页样式 **/ +.ax_close_max { + position: fixed; + top: 5px; + left: 5px; + z-index: 9999; + display: none; + color: #ccc; +} +.navbar-right > .user-menu > .dropdown-menu { + border-top-right-radius:0; + border-top-left-radius:0; + padding:1px 0 0 0; + border-top-width:0; + width:138px; +} +.navbar-right > .user-menu .user-image { + float:left; + width:27px; + height:27px; + border-radius:50%; + margin-right:8px; + margin-top:-3px; +} +@media (max-width:767px) { + .navbar-right > .user-menu .user-image { + float:none; + margin-right:0; + margin-top:-8px; + line-height:10px; +} +}.dropdown-menu > li > a > .glyphicon,.dropdown-menu > li > a > .fa,.dropdown-menu > li > a > .ion { + margin-right:10px; +} +.dropdown-menu > li > a:hover { + background-color:#e1e3e9; + color:#333; +} +.dropdown-menu > .divider { + background-color:#eee; +} + +/** 表单布局 **/ +.form-header { + font-size:15px; + color:#6379bb; + border-bottom:1px solid #ddd; + margin:8px 10px 25px 10px; + padding-bottom:5px +} + +.main-content { + background-color: #ffffff; + color: inherit; + padding: 10px 15px 15px 15px; + border-color: #e7eaec; + -webkit-border-image: none; + -o-border-image: none; + border-image: none; + border-width: 1px 0px; +} + +/** 表格跳转样式 **/ +.pageGo input { + height: 32px; + width: 50px; + margin-left: 5px; + margin-right: 5px; + text-align: center; + display: block; + float:left; +} +.pageGo button { + height: 32px; + display: block; + float:left; +} + +/** 表格行拖拽样式 **/ +.reorder_rows_onDragClass td { + color:yellow!important; + background-color:#999!important; + text-shadow:0 0 10px black,0 0 10px black,0 0 8px black,0 0 6px black,0 0 6px black; + box-shadow:0 12px 14px -12px #111 inset,0 -2px 2px -1px #333 inset +} + +/** 表格列拖拽样式 **/ +.dragtable-sortable { + list-style-type: none; margin: 0; padding: 0; -moz-user-select: none; +} + +.dragtable-sortable li { + margin: 0; padding: 0; float: left; font-size: 1em; background: white; +} + +.dragtable-sortable th, .dragtable-sortable td{ + border-left: 0px; +} + +.dragtable-sortable li:first-child th, .dragtable-sortable li:first-child td { + border-left: 1px solid #CCC; +} + +.ui-sortable-helper { + opacity: 0.7;filter: alpha(opacity=70); +} + +.ui-sortable-placeholder { + -moz-box-shadow: 4px 5px 4px #C6C6C6 inset; + -webkit-box-shadow: 4px 5px 4px #C6C6C6 inset; + box-shadow: 4px 5px 4px #C6C6C6 inset; + border-bottom: 1px solid #CCCCCC; + border-top: 1px solid #CCCCCC; + visibility: visible !important; + background: #EFEFEF !important; + visibility: visible !important; +} + +.ui-sortable-placeholder * { + opacity: 0.0; visibility: hidden; +} + +/** 表格选中样式 **/ +.bootstrap-table .fixed-table-container .table tbody tr.selected td { + background-color: #E8F7FD; + color: #1890ff; +} + +/** 滚动条样式 **/ +::-webkit-scrollbar-track { + background-color: #F5F5F5; +} + +/** 气泡弹出框样式 **/ +.popover { + font-size: 13px; + max-width: unset; +} + +.popover-title { + padding: 8px 14px; + margin: 0 !important; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} + +.popover-content { + padding: 5px; +} + +/** 向上滚动样式 **/ +#scroll-up { + border-width: 0; + position: fixed; + right: 2px; + z-index: 99; + -webkit-transition-duration: .3s; + transition-duration: .3s; + opacity: 0; + filter: alpha(opacity=0); + bottom: -24px; + visibility: hidden; + background-color: #aaa; + color: #fff; + font-size: 14px; + display: none; +} + +#scroll-up.display { + opacity: .7; + filter: alpha(opacity=70); + bottom: 2px; + visibility: visible; +} + +/* 设置菜单样式 */ +.menu-content { + padding: 10px 10px 10px 25px !important; +} + +.tab-content > .tab-pane { + display: none; +} + +.tab-content > .active { + display: block; +} + +.height-full { + height: 100% !important; +} + +/* 设置滚动条样式 */ +::-webkit-scrollbar { + width:10px!important; + height:10px!important; + -webkit-appearance:none; + background:#f1f1f1 +} + +::-webkit-scrollbar-thumb { + height:5px; + border:1px solid transparent; + border-top:0; + border-bottom:0; + border-radius:6px; + background-color:#ccc; + background-clip:padding-box +} + +/* 设置placeholder样式 */ +::-webkit-input-placeholder { + color: #b3b3b3!important; +} + +:-moz-placeholder { + color: #b3b3b3!important; +} + +::-moz-placeholder { + color: #b3b3b3!important; +} + +:-ms-input-placeholder { + color: #b3b3b3!important; +} diff --git a/src/main/resources/static/ruoyi/index.js b/src/main/resources/static/ruoyi/index.js new file mode 100644 index 0000000..a6b44c4 --- /dev/null +++ b/src/main/resources/static/ruoyi/index.js @@ -0,0 +1,649 @@ +/** + * 首页方法封装处理 + * Copyright (c) 2019 ruoyi + */ +layer.config({ + extend: 'moon/style.css', + skin: 'layer-ext-moon' +}); + +var isMobile = false; +var sidebarHeight = isMobile ? '100%' : '96%'; + +$(function() { + // MetsiMenu + $('#side-menu').metisMenu(); + + // 固定菜单栏 + $('.sidebar-collapse').slimScroll({ + height: sidebarHeight, + railOpacity: 0.9, + alwaysVisible: false + }); + + // 菜单切换 + $('.navbar-minimalize').click(function() { + if (isMobile) { + $("body").toggleClass("canvas-menu"); + } else { + $("body").toggleClass("mini-navbar"); + } + SmoothlyMenu(); + }); + + $('#side-menu>li').click(function() { + if ($('body').hasClass('canvas-menu mini-navbar')) { + NavToggle(); + } + + }); + $('#side-menu>li li a:not(:has(span))').click(function() { + if ($(window).width() < 769) { + NavToggle(); + } + }); + + $('.nav-close').click(NavToggle); + + //ios浏览器兼容性处理 + if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { + $('#content-main').css('overflow-y', 'auto'); + } + +}); + +$(window).bind("load resize", function() { + isMobile = $.common.isMobile() || $(window).width() < 769; + if (isMobile) { + $('body').addClass('canvas-menu'); + $("body").removeClass("mini-navbar"); + $("nav .logo").addClass("hide"); + $(".slimScrollDiv").css({ "overflow": "hidden" }); + $('.navbar-static-side').fadeOut(); + } else { + if($('body').hasClass('canvas-menu')) { + $('body').addClass('fixed-sidebar'); + $('body').removeClass('canvas-menu'); + $("body").removeClass("mini-navbar"); + $("nav .logo").removeClass("hide"); + $(".slimScrollDiv").css({ "overflow": "visible" }); + $('.navbar-static-side').fadeIn(); + } + } +}); + +function syncMenuTab(dataId) { + if(isLinkage) { + var $dataObj = $('a[href$="' + decodeURI(dataId) + '"]'); + if ($dataObj.attr("class") != null && !$dataObj.hasClass("noactive")) { + $('.nav ul').removeClass("in"); + $dataObj.parents("ul").addClass("in") + $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); + $dataObj.parents("ul").css('height', 'auto').height(); + $(".nav ul li, .nav li").removeClass("selected"); + $dataObj.parent("li").addClass("selected"); + setIframeUrl(dataId); + + // 顶部菜单同步处理 + var tabStr = $dataObj.parents(".tab-pane").attr("id"); + if ($.common.isNotEmpty(tabStr)) { + var sepIndex = tabStr.lastIndexOf('_'); + var menuId = tabStr.substring(sepIndex + 1, tabStr.length); + $("#tab_" + menuId + " a").click(); + } + } + } +} + +function NavToggle() { + $('.navbar-minimalize').trigger('click'); +} + +function fixedSidebar() { + $('#side-menu').hide(); + $("nav .logo").addClass("hide"); + setTimeout(function() { + $('#side-menu').fadeIn(500); + }, 100); +} + +// 设置锚点 +function setIframeUrl(href) { + if($.common.equals("history", mode)) { + storage.set('publicPath', href); + } else { + var nowUrl = window.location.href; + var newUrl = nowUrl.substring(0, nowUrl.indexOf("#")); + window.location.href = newUrl + "#" + href; + } +} + +function SmoothlyMenu() { + if (isMobile && !$('body').hasClass('canvas-menu')) { + $('.navbar-static-side').fadeIn(); + fixedSidebar(); + } else if (!isMobile &&!$('body').hasClass('mini-navbar')) { + fixedSidebar(); + $("nav .logo").removeClass("hide"); + } else if (isMobile && $('body').hasClass('fixed-sidebar')) { + $('.navbar-static-side').fadeOut(); + fixedSidebar(); + } else if (!isMobile && $('body').hasClass('fixed-sidebar')) { + fixedSidebar(); + } else { + $('#side-menu').removeAttr('style'); + } +} + +/** + * iframe处理 + */ +$(function() { + //计算元素集合的总宽度 + function calSumWidth(elements) { + var width = 0; + $(elements).each(function() { + width += $(this).outerWidth(true); + }); + return width; + } + + // 激活指定选项卡 + function setActiveTab(element) { + if (!$(element).hasClass('active')) { + var currentId = $(element).data('id'); + syncMenuTab(currentId); + // 显示tab对应的内容区 + $('.RuoYi_iframe').each(function() { + if ($(this).data('id') == currentId) { + $(this).show().siblings('.RuoYi_iframe').hide(); + } + }); + $(element).addClass('active').siblings('.menuTab').removeClass('active'); + scrollToTab(element); + } + } + + //滚动到指定选项卡 + function scrollToTab(element) { + var marginLeftVal = calSumWidth($(element).prevAll()), + marginRightVal = calSumWidth($(element).nextAll()); + // 可视区域非tab宽度 + var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); + //可视区域tab宽度 + var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth; + //实际滚动宽度 + var scrollVal = 0; + if ($(".page-tabs-content").outerWidth() < visibleWidth) { + scrollVal = 0; + } else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) { + if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) { + scrollVal = marginLeftVal; + var tabElement = element; + while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content").outerWidth() - visibleWidth)) { + scrollVal -= $(tabElement).prev().outerWidth(); + tabElement = $(tabElement).prev(); + } + } + } else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) { + scrollVal = marginLeftVal - $(element).prev().outerWidth(true); + } + $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); + } + + //查看左侧隐藏的选项卡 + function scrollTabLeft() { + var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left'))); + // 可视区域非tab宽度 + var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); + //可视区域tab宽度 + var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth; + //实际滚动宽度 + var scrollVal = 0; + if (($(".page-tabs-content").width()) < visibleWidth) { + return false; + } else { + var tabElement = $(".menuTab:first"); + var offsetVal = 0; + while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) { //找到离当前tab最近的元素 + offsetVal += $(tabElement).outerWidth(true); + tabElement = $(tabElement).next(); + } + offsetVal = 0; + if (calSumWidth($(tabElement).prevAll()) > visibleWidth) { + while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) { + offsetVal += $(tabElement).outerWidth(true); + tabElement = $(tabElement).prev(); + } + scrollVal = calSumWidth($(tabElement).prevAll()); + } + } + $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); + } + + //查看右侧隐藏的选项卡 + function scrollTabRight() { + var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left'))); + // 可视区域非tab宽度 + var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); + //可视区域tab宽度 + var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth; + //实际滚动宽度 + var scrollVal = 0; + if ($(".page-tabs-content").width() < visibleWidth) { + return false; + } else { + var tabElement = $(".menuTab:first"); + var offsetVal = 0; + while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) { //找到离当前tab最近的元素 + offsetVal += $(tabElement).outerWidth(true); + tabElement = $(tabElement).next(); + } + offsetVal = 0; + while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) { + offsetVal += $(tabElement).outerWidth(true); + tabElement = $(tabElement).next(); + } + scrollVal = calSumWidth($(tabElement).prevAll()); + if (scrollVal > 0) { + $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); + } + } + } + + //通过遍历给菜单项加上data-index属性 + $(".menuItem").each(function(index) { + if (!$(this).attr('data-index')) { + $(this).attr('data-index', index); + } + }); + + function menuItem() { + // 获取标识数据 + var dataUrl = $(this).attr('href'), + dataIndex = $(this).data('index'), + menuName = $.trim($(this).text()), + isRefresh = $(this).data("refresh"), + flag = true; + + var $dataObj = $('a[href$="' + decodeURI(dataUrl) + '"]'); + if (!$dataObj.hasClass("noactive")) { + $('.tab-pane li').removeClass("active"); + $('.nav ul').removeClass("in"); + $dataObj.parents("ul").addClass("in") + $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); + $dataObj.parents("ul").css('height', 'auto').height(); + $(".nav ul li, .nav li").removeClass("selected"); + $(this).parent("li").addClass("selected"); + } + setIframeUrl(dataUrl); + if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false; + + // 选项卡菜单已存在 + $('.menuTab').each(function() { + if ($(this).data('id') == dataUrl) { + if (!$(this).hasClass('active')) { + $(this).addClass('active').siblings('.menuTab').removeClass('active'); + scrollToTab(this); + // 显示tab对应的内容区 + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == dataUrl) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + } + if (isRefresh) { + refreshTab(); + } + flag = false; + return false; + } + }); + // 选项卡菜单不存在 + if (flag) { + var str = '' + menuName + ' '; + $('.menuTab').removeClass('active'); + + // 添加选项卡对应的iframe + var str1 = ''; + $('.mainContent').find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1); + + $.modal.loading("数据加载中,请稍候..."); + + $('.mainContent iframe:visible').on('load', function() { + $.modal.closeLoading(); + }); + + // 添加选项卡 + $('.menuTabs .page-tabs-content').append(str); + scrollToTab($('.menuTab.active')); + } + return false; + } + + function menuBlank() { + // 新窗口打开外网以http://开头,如http://ruoyi.vip + var dataUrl = $(this).attr('href'); + window.open(dataUrl); + return false; + } + + $('.menuItem').on('click', menuItem); + + $('.menuBlank').on('click', menuBlank); + + // 关闭选项卡菜单 + function closeTab() { + var closeTabId = $(this).parents('.menuTab').data('id'); + var currentWidth = $(this).parents('.menuTab').width(); + var panelUrl = $(this).parents('.menuTab').data('panel'); + // 当前元素处于活动状态 + if ($(this).parents('.menuTab').hasClass('active')) { + + // 当前元素后面有同辈元素,使后面的一个元素处于活动状态 + if ($(this).parents('.menuTab').next('.menuTab').length) { + + var activeId = $(this).parents('.menuTab').next('.menuTab:eq(0)').data('id'); + $(this).parents('.menuTab').next('.menuTab:eq(0)').addClass('active'); + + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == activeId) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + + var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left')); + if (marginLeftVal < 0) { + $('.page-tabs-content').animate({ marginLeft: (marginLeftVal + currentWidth) + 'px' }, "fast"); + } + + // 移除当前选项卡 + $(this).parents('.menuTab').remove(); + + // 移除tab对应的内容区 + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == closeTabId) { + $(this).remove(); + return false; + } + }); + } + + // 当前元素后面没有同辈元素,使当前元素的上一个元素处于活动状态 + if ($(this).parents('.menuTab').prev('.menuTab').length) { + var activeId = $(this).parents('.menuTab').prev('.menuTab:last').data('id'); + $(this).parents('.menuTab').prev('.menuTab:last').addClass('active'); + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == activeId) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + + // 移除当前选项卡 + $(this).parents('.menuTab').remove(); + + // 移除tab对应的内容区 + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == closeTabId) { + $(this).remove(); + return false; + } + }); + + if($.common.isNotEmpty(panelUrl)){ + $('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active'); + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == panelUrl) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + } + } + } + // 当前元素不处于活动状态 + else { + // 移除当前选项卡 + $(this).parents('.menuTab').remove(); + + // 移除相应tab对应的内容区 + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == closeTabId) { + $(this).remove(); + return false; + } + }); + } + scrollToTab($('.menuTab.active')); + syncMenuTab($('.page-tabs-content').find('.active').attr('data-id')); + return false; + } + + $('.menuTabs').on('click', '.menuTab i', closeTab); + + //滚动到已激活的选项卡 + function showActiveTab() { + scrollToTab($('.menuTab.active')); + } + $('.tabShowActive').on('click', showActiveTab); + + // 点击选项卡菜单 + function activeTab() { + if (!$(this).hasClass('active')) { + var currentId = $(this).data('id'); + syncMenuTab(currentId); + // 显示tab对应的内容区 + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == currentId) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + $(this).addClass('active').siblings('.menuTab').removeClass('active'); + scrollToTab(this); + } + } + + // 点击选项卡菜单 + $('.menuTabs').on('click', '.menuTab', activeTab); + + // 刷新iframe + function refreshTab() { + var currentId = $('.page-tabs-content').find('.active').attr('data-id'); + var target = $('.RuoYi_iframe[data-id="' + currentId + '"]'); + var url = target.attr('src'); + target.attr('src', url).ready(); + } + + // 页签全屏 + function fullScreenTab() { + var currentId = $('.page-tabs-content').find('.active').attr('data-id'); + var target = $('.RuoYi_iframe[data-id="' + currentId + '"]'); + target.fullScreen(true); + } + + // 关闭当前选项卡 + function tabCloseCurrent() { + $('.page-tabs-content').find('.active i').trigger("click"); + } + + //关闭其他选项卡 + function tabCloseOther() { + $('.page-tabs-content').children("[data-id]").not(":first").not(".active").each(function() { + $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); + $(this).remove(); + }); + $('.page-tabs-content').animate({ marginLeft: '0px' }, "fast"); + } + + // 关闭全部选项卡 + function tabCloseAll() { + $('.page-tabs-content').children("[data-id]").not(":first").each(function() { + $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); + $(this).remove(); + }); + $('.page-tabs-content').children("[data-id]:first").each(function() { + $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').show(); + $(this).addClass("active"); + }); + $('.page-tabs-content').css("margin-left", "0"); + syncMenuTab($('.page-tabs-content').find('.active').attr('data-id')); + } + + + // 全屏显示 + $('#fullScreen').on('click', function () { + $(document).toggleFullScreen(); + }); + + // 锁定屏幕 + $('#lockScreen').on('click', function () { + storage.set('lockPath', $('.page-tabs-content').find('.active').attr('data-id')); + location.href = ctx + "lockscreen"; + }); + + // 页签刷新按钮 + $('.tabReload').on('click', refreshTab); + + // 页签全屏按钮 + $('.tabFullScreen').on('click', fullScreenTab); + + // 双击选项卡全屏显示 + $('.menuTabs').on('dblclick', '.menuTab', activeTabMax); + + // 左移按扭 + $('.tabLeft').on('click', scrollTabLeft); + + // 右移按扭 + $('.tabRight').on('click', scrollTabRight); + + // 关闭当前 + $('.tabCloseCurrent').on('click', tabCloseCurrent); + + // 关闭其他 + $('.tabCloseOther').on('click', tabCloseOther); + + // 关闭全部 + $('.tabCloseAll').on('click', tabCloseAll); + + // tab全屏显示 + $('.tabMaxCurrent').on('click', function () { + $('.page-tabs-content').find('.active').trigger("dblclick"); + }); + + // 关闭全屏 + $('#ax_close_max').click(function(){ + $('#content-main').toggleClass('max'); + $('#ax_close_max').hide(); + }) + + // 双击选项卡全屏显示 + function activeTabMax() { + $('#content-main').toggleClass('max'); + $('#ax_close_max').show(); + } + + $(window).keydown(function(event) { + if (event.keyCode == 27) { + $('#content-main').removeClass('max'); + $('#ax_close_max').hide(); + } + }); + + window.onhashchange = function() { + var hash = location.hash; + var url = hash.substring(1, hash.length); + $('a[href$="' + url + '"]').click(); + }; + + // 右键菜单实现 + $.contextMenu({ + selector: ".menuTab", + trigger: 'right', + autoHide: true, + items: { + "close_current": { + name: "关闭当前", + icon: "fa-close", + callback: function(key, opt) { + opt.$trigger.find('i').trigger("click"); + } + }, + "close_other": { + name: "关闭其他", + icon: "fa-window-close-o", + callback: function(key, opt) { + setActiveTab(this); + tabCloseOther(); + } + }, + "close_left": { + name: "关闭左侧", + icon: "fa-reply", + callback: function(key, opt) { + setActiveTab(this); + this.prevAll('.menuTab').not(":last").each(function() { + if ($(this).hasClass('active')) { + setActiveTab(this); + } + $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); + $(this).remove(); + }); + $('.page-tabs-content').animate({ marginLeft: '0px' }, "fast"); + } + }, + "close_right": { + name: "关闭右侧", + icon: "fa-share", + callback: function(key, opt) { + setActiveTab(this); + this.nextAll('.menuTab').each(function() { + $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); + $(this).remove(); + }); + } + }, + "close_all": { + name: "全部关闭", + icon: "fa-window-close", + callback: function(key, opt) { + tabCloseAll(); + } + }, + "step": "---------", + "full": { + name: "全屏显示", + icon: "fa-arrows-alt", + callback: function(key, opt) { + setActiveTab(this); + var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]'); + target.fullScreen(true); + } + }, + "refresh": { + name: "刷新页面", + icon: "fa-refresh", + callback: function(key, opt) { + setActiveTab(this); + var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]'); + var url = target.attr('src'); + $.modal.loading("数据加载中,请稍候..."); + target.attr('src', url).on('load', function() { + $.modal.closeLoading(); + }); + } + }, + "open": { + name: "新窗口打开", + icon: "fa-link", + callback: function(key, opt) { + var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]'); + window.open(target.attr('src')); + } + }, + } + }); +}); diff --git a/src/main/resources/static/ruoyi/js/common.js b/src/main/resources/static/ruoyi/js/common.js new file mode 100644 index 0000000..aa43148 --- /dev/null +++ b/src/main/resources/static/ruoyi/js/common.js @@ -0,0 +1,546 @@ +/** + * 通用方法封装处理 + * Copyright (c) 2019 ruoyi + */ + +var startLayDate; +var endLayDate; +$(function() { + + // layer扩展皮肤 + if (window.layer !== undefined) { + layer.config({ + extend: 'moon/style.css', + skin: 'layer-ext-moon' + }); + } + + // 回到顶部绑定 + if ($.fn.toTop !== undefined) { + $('#scroll-up').toTop(); + } + + // select2复选框事件绑定 + if ($.fn.select2 !== undefined) { + $.fn.select2.defaults.set( "theme", "bootstrap" ); + $("select.form-control:not(.noselect2)").each(function () { + $(this).select2().on("change", function () { + $(this).valid(); + }) + }) + } + + // iCheck单选框及复选框事件绑定 + if ($.fn.iCheck !== undefined) { + $(".check-box:not(.noicheck),.radio-box:not(.noicheck)").each(function() { + $(this).iCheck({ + checkboxClass: 'icheckbox-blue', + radioClass: 'iradio-blue', + }) + }) + } + + // 取消回车自动提交表单 + $(document).on("keypress", ":input:not(textarea):not([type=submit])", function(event) { + if (event.keyCode == 13) { + event.preventDefault(); + } + }); + + // laydate 时间控件绑定 + if ($(".select-time").length > 0) { + layui.use('laydate', function() { + var laydate = layui.laydate; + startLayDate = laydate.render({ + elem: '#startTime', + max: $('#endTime').val(), + theme: 'molv', + type: $('#startTime').attr("data-type") || 'date', + trigger: 'click', + done: function(value, date) { + // 结束时间大于开始时间 + if (value !== '') { + endLayDate.config.min.year = date.year; + endLayDate.config.min.month = date.month - 1; + endLayDate.config.min.date = date.date; + } else { + endLayDate.config.min.year = ''; + endLayDate.config.min.month = ''; + endLayDate.config.min.date = ''; + } + } + }); + endLayDate = laydate.render({ + elem: '#endTime', + min: $('#startTime').val(), + theme: 'molv', + type: $('#endTime').attr("data-type") || 'date', + trigger: 'click', + done: function(value, date) { + // 开始时间小于结束时间 + if (value !== '') { + startLayDate.config.max.year = date.year; + startLayDate.config.max.month = date.month - 1; + startLayDate.config.max.date = date.date; + } else { + startLayDate.config.max.year = '2099'; + startLayDate.config.max.month = '12'; + startLayDate.config.max.date = '31'; + } + } + }); + }); + } + + // laydate time-input 时间控件绑定 + if ($(".time-input").length > 0) { + layui.use('laydate', function () { + var com = layui.laydate; + $(".time-input").each(function (index, item) { + var time = $(item); + // 控制控件外观 + var type = time.attr("data-type") || 'date'; + // 控制回显格式 + var format = time.attr("data-format") || 'yyyy-MM-dd'; + // 控制日期控件按钮 + var buttons = time.attr("data-btn") || 'clear|now|confirm', newBtnArr = []; + // 日期控件选择完成后回调处理 + var callback = time.attr("data-callback") || {}; + if (buttons) { + if (buttons.indexOf("|") > 0) { + var btnArr = buttons.split("|"), btnLen = btnArr.length; + for (var j = 0; j < btnLen; j++) { + if ("clear" === btnArr[j] || "now" === btnArr[j] || "confirm" === btnArr[j]) { + newBtnArr.push(btnArr[j]); + } + } + } else { + if ("clear" === buttons || "now" === buttons || "confirm" === buttons) { + newBtnArr.push(buttons); + } + } + } else { + newBtnArr = ['clear', 'now', 'confirm']; + } + com.render({ + elem: item, + theme: 'molv', + trigger: 'click', + type: type, + format: format, + btns: newBtnArr, + done: function (value, data) { + if (typeof window[callback] != 'undefined' + && window[callback] instanceof Function) { + window[callback](value, data); + } + } + }); + }); + }); + } + + // tree 关键字搜索绑定 + if ($("#keyword").length > 0) { + $("#keyword").bind("focus", function focusKey(e) { + if ($("#keyword").hasClass("empty")) { + $("#keyword").removeClass("empty"); + } + }).bind("blur", function blurKey(e) { + if ($("#keyword").val() === "") { + $("#keyword").addClass("empty"); + } + $.tree.searchNode(e); + }).bind("input propertychange", $.tree.searchNode); + } + + // tree表格树 展开/折叠 + var expandFlag; + $("#expandAllBtn").click(function() { + var dataExpand = $.common.isEmpty(table.options.expandAll) ? true : table.options.expandAll; + expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag; + if (!expandFlag) { + $.bttTable.bootstrapTreeTable('expandAll'); + } else { + $.bttTable.bootstrapTreeTable('collapseAll'); + } + expandFlag = expandFlag ? false: true; + }) + + // 按下ESC按钮关闭弹层 + $('body', document).on('keyup', function(e) { + if (e.which === 27) { + $.modal.closeAll(); + } + }); +}); + +(function ($) { + 'use strict'; + $.fn.toTop = function(opt) { + var elem = this; + var win = (opt && opt.hasOwnProperty('win')) ? opt.win : $(window); + var doc = (opt && opt.hasOwnProperty('doc')) ? opt.doc : $('html, body'); + var options = $.extend({ + autohide: true, + offset: 50, + speed: 500, + position: true, + right: 15, + bottom: 5 + }, opt); + elem.css({ + 'cursor': 'pointer' + }); + if (options.autohide) { + elem.css('display', 'none'); + } + if (options.position) { + elem.css({ + 'position': 'fixed', + 'right': options.right, + 'bottom': options.bottom, + }); + } + elem.click(function() { + doc.animate({ + scrollTop: 0 + }, options.speed); + }); + win.scroll(function() { + var scrolling = win.scrollTop(); + if (options.autohide) { + if (scrolling > options.offset) { + elem.fadeIn(options.speed); + } else elem.fadeOut(options.speed); + } + }); + }; +})(jQuery); + +/** 刷新选项卡 */ +var refreshItem = function(){ + var topWindow = $(window.parent.document); + var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-id'); + var target = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow); + var url = target.attr('src'); + target.attr('src', url).ready(); +} + +/** 关闭选项卡 */ +var closeItem = function(dataId){ + var topWindow = $(window.parent.document); + if($.common.isNotEmpty(dataId)){ + window.parent.$.modal.closeLoading(); + // 根据dataId关闭指定选项卡 + $('.menuTab[data-id="' + dataId + '"]', topWindow).remove(); + // 移除相应tab对应的内容区 + $('.mainContent .RuoYi_iframe[data-id="' + dataId + '"]', topWindow).remove(); + return; + } + var panelUrl = window.frameElement.getAttribute('data-panel'); + $('.page-tabs-content .active i', topWindow).click(); + if($.common.isNotEmpty(panelUrl)){ + $('.menuTab[data-id="' + panelUrl + '"]', topWindow).addClass('active').siblings('.menuTab').removeClass('active'); + $('.mainContent .RuoYi_iframe', topWindow).each(function() { + if ($(this).data('id') == panelUrl) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + } +} + +/** 创建选项卡 */ +function createMenuItem(dataUrl, menuName, isRefresh) { + var panelUrl = window.frameElement.getAttribute('data-id'), + dataIndex = $.common.random(1, 100), + flag = true; + if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false; + var topWindow = $(window.parent.document); + // 选项卡菜单已存在 + $('.menuTab', topWindow).each(function() { + if ($(this).data('id') == dataUrl) { + if (!$(this).hasClass('active')) { + $(this).addClass('active').siblings('.menuTab').removeClass('active'); + scrollToTab(this); + $('.page-tabs-content').animate({ marginLeft: ""}, "fast"); + // 显示tab对应的内容区 + $('.mainContent .RuoYi_iframe', topWindow).each(function() { + if ($(this).data('id') == dataUrl) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + } + if (isRefresh) { + refreshTab(); + } + flag = false; + return false; + } + }); + // 选项卡菜单不存在 + if (flag) { + var str = '' + menuName + ' '; + $('.menuTab', topWindow).removeClass('active'); + + // 添加选项卡对应的iframe + var str1 = ''; + $('.mainContent', topWindow).find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1); + + window.parent.$.modal.loading("数据加载中,请稍候..."); + $('.mainContent iframe:visible', topWindow).on('load', function() { + window.parent.$.modal.closeLoading(); + }); + + // 添加选项卡 + $('.menuTabs .page-tabs-content', topWindow).append(str); + scrollToTab($('.menuTab.active', topWindow)); + } + return false; +} + +// 刷新iframe +function refreshTab() { + var topWindow = $(window.parent.document); + var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-id'); + var target = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow); + var url = target.attr('src'); + target.attr('src', url).ready(); +} + +// 滚动到指定选项卡 +function scrollToTab(element) { + var topWindow = $(window.parent.document); + var marginLeftVal = calSumWidth($(element).prevAll()), + marginRightVal = calSumWidth($(element).nextAll()); + // 可视区域非tab宽度 + var tabOuterWidth = calSumWidth($(".content-tabs", topWindow).children().not(".menuTabs")); + //可视区域tab宽度 + var visibleWidth = $(".content-tabs", topWindow).outerWidth(true) - tabOuterWidth; + //实际滚动宽度 + var scrollVal = 0; + if ($(".page-tabs-content", topWindow).outerWidth() < visibleWidth) { + scrollVal = 0; + } else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) { + if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) { + scrollVal = marginLeftVal; + var tabElement = element; + while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content", topWindow).outerWidth() - visibleWidth)) { + scrollVal -= $(tabElement).prev().outerWidth(); + tabElement = $(tabElement).prev(); + } + } + } else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) { + scrollVal = marginLeftVal - $(element).prev().outerWidth(true); + } + $('.page-tabs-content', topWindow).animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); +} + +// 计算元素集合的总宽度 +function calSumWidth(elements) { + var width = 0; + $(elements).each(function() { + width += $(this).outerWidth(true); + }); + return width; +} + +// 返回当前激活的Tab页面关联的iframe的Windows对象 +function activeWindow() { + var topWindow = $(window.parent.document); + var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-id'); + if (!currentId) { + return window.parent; + } + return $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow; +} + +/** 密码规则范围验证 */ +function checkpwd(chrtype, password) { + if (chrtype == 1) { + if(!$.common.numValid(password)){ + $.modal.alertWarning("密码只能为0-9数字"); + return false; + } + } else if (chrtype == 2) { + if(!$.common.enValid(password)){ + $.modal.alertWarning("密码只能为a-z和A-Z字母"); + return false; + } + } else if (chrtype == 3) { + if(!$.common.enNumValid(password)){ + $.modal.alertWarning("密码必须包含字母以及数字"); + return false; + } + } else if (chrtype == 4) { + if(!$.common.charValid(password)){ + $.modal.alertWarning("密码必须包含字母、数字、以及特殊符号~!@#$%^&*()-=_+"); + return false; + } + } + return true; +} + +// 日志打印封装处理 +var log = { + log: function(msg) { + console.log(msg); + }, + info: function(msg) { + console.info(msg); + }, + warn: function(msg) { + console.warn(msg); + }, + error: function(msg) { + console.error(msg); + } +}; + +// 本地缓存处理 +var storage = { + set: function(key, value) { + window.localStorage.setItem(key, value); + }, + get: function(key) { + return window.localStorage.getItem(key); + }, + remove: function(key) { + window.localStorage.removeItem(key); + }, + clear: function() { + window.localStorage.clear(); + } +}; + +// 主子表操作封装处理 +var sub = { + editColumn: function() { + var dataColumns = []; + for (var columnIndex = 0; columnIndex < table.options.columns.length; columnIndex++) { + if (table.options.columns[columnIndex].visible != false) { + dataColumns.push(table.options.columns[columnIndex]); + } + } + var params = new Array(); + var data = $("#" + table.options.id).bootstrapTable('getData'); + var count = data.length; + for (var dataIndex = 0; dataIndex < count; dataIndex++) { + var columns = $('#' + table.options.id + ' tr[data-index="' + dataIndex + '"] td'); + var obj = new Object(); + for (var i = 0; i < columns.length; i++) { + var inputValue = $(columns[i]).find('input'); + var selectValue = $(columns[i]).find('select'); + var textareaValue = $(columns[i]).find('textarea'); + var key = dataColumns[i].field; + if ($.common.isNotEmpty(inputValue.val())) { + obj[key] = inputValue.val(); + } else if ($.common.isNotEmpty(selectValue.val())) { + obj[key] = selectValue.val(); + } else if ($.common.isNotEmpty(textareaValue.val())) { + obj[key] = textareaValue.val(); + } else { + obj[key] = ""; + } + } + var item = data[dataIndex]; + var extendObj = $.extend({}, item, obj); + params.push({ index: dataIndex, row: extendObj }); + } + $("#" + table.options.id).bootstrapTable("updateRow", params); + }, + delColumn: function(column) { + sub.editColumn(); + var subColumn = $.common.isEmpty(column) ? "index" : column; + var ids = $.table.selectColumns(subColumn); + if (ids.length == 0) { + $.modal.alertWarning("请至少选择一条记录"); + return; + } + $("#" + table.options.id).bootstrapTable('remove', { field: subColumn, values: ids }); + }, + addColumn: function(row, tableId) { + var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId; + table.set(currentId); + var count = $("#" + currentId).bootstrapTable('getData').length; + sub.editColumn(); + $("#" + currentId).bootstrapTable('insertRow', { + index: count + 1, + row: row + }); + } +}; + +// 动态加载css文件 +function loadCss(file, headElem) { + var link = document.createElement('link'); + link.href = file; + link.rel = 'stylesheet'; + link.type = 'text/css'; + if (headElem) headElem.appendChild(link); + else document.getElementsByTagName('head')[0].appendChild(link); +} + +// 动态加载js文件 +function loadJs(file, headElem) { + var script = document.createElement('script'); + script.src = file; + script.type = 'text/javascript'; + if (headElem) headElem.appendChild(script); + else document.getElementsByTagName('head')[0].appendChild(script); +} + +// 禁止后退键(Backspace) +window.onload = function() { + document.getElementsByTagName("body")[0].onkeydown = function() { + // 获取事件对象 + var elem = event.relatedTarget || event.srcElement || event.target || event.currentTarget; + // 判断按键为backSpace键 + if (event.keyCode == 8) { + // 判断是否需要阻止按下键盘的事件默认传递 + var name = elem.nodeName; + var className = elem.className; + // 屏蔽特定的样式名称 + if (className.indexOf('note-editable') != -1) + { + return true; + } + if (name != 'INPUT' && name != 'TEXTAREA') { + return _stopIt(event); + } + var type_e = elem.type.toUpperCase(); + if (name == 'INPUT' && (type_e != 'TEXT' && type_e != 'TEXTAREA' && type_e != 'PASSWORD' && type_e != 'FILE' && type_e != 'SEARCH' && type_e != 'NUMBER')) { + return _stopIt(event); + } + if (name == 'INPUT' && (elem.readOnly == true || elem.disabled == true)) { + return _stopIt(event); + } + } + }; +}; +function _stopIt(e) { + if (e.returnValue) { + e.returnValue = false; + } + if (e.preventDefault) { + e.preventDefault(); + } + return false; +} + +/** 设置全局ajax处理 */ +$.ajaxSetup({ + complete: function(XMLHttpRequest, textStatus) { + if (textStatus == 'timeout') { + $.modal.alertWarning("服务器超时,请稍后再试!"); + $.modal.enable(); + $.modal.closeLoading(); + } else if (textStatus == "parsererror" || textStatus == "error") { + $.modal.alertWarning("服务器错误,请联系管理员!"); + $.modal.enable(); + $.modal.closeLoading(); + } + } +}); diff --git a/src/main/resources/static/ruoyi/js/ry-ui.js b/src/main/resources/static/ruoyi/js/ry-ui.js new file mode 100644 index 0000000..50ce20d --- /dev/null +++ b/src/main/resources/static/ruoyi/js/ry-ui.js @@ -0,0 +1,1742 @@ +/** + * 通用js方法封装处理 + * Copyright (c) 2019 ruoyi + */ + +// 当前table相关信息 +var table = { + config: {}, + // 当前实例配置 + options: {}, + // 设置实例配置 + set: function(id) { + if($.common.getLength(table.config) > 1 && $.common.isNotEmpty(event)) { + var tableId = $.common.isEmpty(id) ? $(event.currentTarget).parents(".bootstrap-table").find("table.table").attr("id") : id; + if ($.common.isNotEmpty(tableId)) { + table.options = table.get(tableId); + } + } + }, + // 获取实例配置 + get: function(id) { + return table.config[id]; + }, + // 记住选择实例组 + rememberSelecteds: {}, + // 记住选择ID组 + rememberSelectedIds: {} +}; + +(function ($) { + $.extend({ + _tree: {}, + bttTable: {}, + // 表格封装处理 + table: { + // 初始化表格参数 + init: function(options) { + var defaults = { + id: "bootstrap-table", + type: 0, // 0 代表bootstrapTable 1代表bootstrapTreeTable + method: 'post', + height: undefined, + sidePagination: "server", + sortName: undefined, + sortOrder: "asc", + pagination: true, + paginationLoop: false, + pageSize: 10, + pageNumber: 1, + pageList: [10, 25, 50], + toolbar: "toolbar", + loadingFontSize: 13, + striped: false, + escape: false, + firstLoad: true, + showFooter: false, + search: false, + showSearch: true, + showPageGo: false, + showRefresh: true, + showColumns: true, + showToggle: true, + showExport: false, + showPrint: false, + exportDataType: 'all', + exportTypes: ['csv', 'txt', 'doc', 'excel'], + clickToSelect: false, + singleSelect: false, + mobileResponsive: true, + maintainSelected: false, + rememberSelected: false, + fixedColumns: false, + fixedNumber: 0, + fixedRightNumber: 0, + queryParams: $.table.queryParams, + rowStyle: undefined + }; + var options = $.extend(defaults, options); + table.options = options; + table.config[options.id] = options; + $.table.initEvent(); + $('#' + options.id).bootstrapTable({ + id: options.id, + url: options.url, // 请求后台的URL(*) + contentType: "application/x-www-form-urlencoded", // 编码类型 + method: options.method, // 请求方式(*) + cache: false, // 是否使用缓存 + height: options.height, // 表格的高度 + striped: options.striped, // 是否显示行间隔色 + sortable: true, // 是否启用排序 + sortStable: true, // 设置为 true 将获得稳定的排序 + sortName: options.sortName, // 排序列名称 + sortOrder: options.sortOrder, // 排序方式 asc 或者 desc + pagination: options.pagination, // 是否显示分页(*) + paginationLoop: options.paginationLoop, // 是否启用分页条无限循环的功能 + pageNumber: 1, // 初始化加载第一页,默认第一页 + pageSize: options.pageSize, // 每页的记录行数(*) + pageList: options.pageList, // 可供选择的每页的行数(*) + firstLoad: options.firstLoad, // 是否首次请求加载数据,对于数据较大可以配置false + escape: options.escape, // 转义HTML字符串 + showFooter: options.showFooter, // 是否显示表尾 + iconSize: 'outline', // 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮 + toolbar: '#' + options.toolbar, // 指定工作栏 + loadingFontSize: options.loadingFontSize, // 自定义加载文本的字体大小 + sidePagination: options.sidePagination, // server启用服务端分页client客户端分页 + search: options.search, // 是否显示搜索框功能 + searchText: options.searchText, // 搜索框初始显示的内容,默认为空 + showSearch: options.showSearch, // 是否显示检索信息 + showPageGo: options.showPageGo, // 是否显示跳转页 + showRefresh: options.showRefresh, // 是否显示刷新按钮 + showColumns: options.showColumns, // 是否显示隐藏某列下拉框 + showToggle: options.showToggle, // 是否显示详细视图和列表视图的切换按钮 + showExport: options.showExport, // 是否支持导出文件 + showPrint: options.showPrint, // 是否支持打印页面 + showHeader: options.showHeader, // 是否显示表头 + showFullscreen: options.showFullscreen, // 是否显示全屏按钮 + uniqueId: options.uniqueId, // 唯一的标识符 + clickToSelect: options.clickToSelect, // 是否启用点击选中行 + singleSelect: options.singleSelect, // 是否单选checkbox + mobileResponsive: options.mobileResponsive, // 是否支持移动端适配 + cardView: options.cardView, // 是否启用显示卡片视图 + detailView: options.detailView, // 是否启用显示细节视图 + onCheck: options.onCheck, // 当选择此行时触发 + onUncheck: options.onUncheck, // 当取消此行时触发 + onCheckAll: options.onCheckAll, // 当全选行时触发 + onUncheckAll: options.onUncheckAll, // 当取消全选行时触发 + onClickRow: options.onClickRow, // 点击某行触发的事件 + onDblClickRow: options.onDblClickRow, // 双击某行触发的事件 + onClickCell: options.onClickCell, // 单击某格触发的事件 + onDblClickCell: options.onDblClickCell, // 双击某格触发的事件 + onEditableSave: options.onEditableSave, // 行内编辑保存的事件 + onExpandRow: options.onExpandRow, // 点击详细视图的事件 + onPostBody: options.onPostBody, // 渲染完成后执行的事件 + maintainSelected: options.maintainSelected, // 前端翻页时保留所选行 + rememberSelected: options.rememberSelected, // 启用翻页记住前面的选择 + fixedColumns: options.fixedColumns, // 是否启用冻结列(左侧) + fixedNumber: options.fixedNumber, // 列冻结的个数(左侧) + fixedRightNumber: options.fixedRightNumber, // 列冻结的个数(右侧) + onReorderRow: options.onReorderRow, // 当拖拽结束后处理函数 + queryParams: options.queryParams, // 传递参数(*) + rowStyle: options.rowStyle, // 通过自定义函数设置行样式 + footerStyle: options.footerStyle, // 通过自定义函数设置页脚样式 + headerStyle: options.headerStyle, // 通过自定义函数设置标题样式 + columns: options.columns, // 显示列信息(*) + data: options.data, // 被加载的数据 + responseHandler: $.table.responseHandler, // 在加载服务器发送来的数据之前处理函数 + onLoadSuccess: $.table.onLoadSuccess, // 当所有数据被加载时触发处理函数 + exportOptions: options.exportOptions, // 前端导出忽略列索引 + exportDataType: options.exportDataType, // 导出方式(默认all:导出所有数据;basic:导出当前页的数据;selected:导出选中的数据) + exportTypes: options.exportTypes, // 导出文件类型 (json、xml、png、csv、txt、sql、doc、excel、xlsx、powerpoint、pdf) + printPageBuilder: options.printPageBuilder, // 自定义打印页面模板 + detailFormatter: options.detailFormatter, // 在行下面展示其他数据列表 + }); + }, + // 获取实例ID,如存在多个返回#id1,#id2 delimeter分隔符 + getOptionsIds: function(separator) { + var _separator = $.common.isEmpty(separator) ? "," : separator; + var optionsIds = ""; + $.each(table.config, function(key, value){ + optionsIds += "#" + key + _separator; + }); + return optionsIds.substring(0, optionsIds.length - 1); + }, + // 查询条件 + queryParams: function(params) { + table.set(); + var curParams = { + // 传递参数查询参数 + pageSize: params.limit, + pageNum: params.offset / params.limit + 1, + searchValue: params.search, + orderByColumn: params.sort, + isAsc: params.order + }; + var currentId = $.common.isEmpty(table.options.formId) ? $('form').attr('id') : table.options.formId; + return $.extend(curParams, $.common.formToJSON(currentId)); + }, + // 请求获取数据后处理回调函数 + responseHandler: function(res) { + if (typeof table.get(this.id).responseHandler == "function") { + table.get(this.id).responseHandler(res); + } + if (res.code == web_status.SUCCESS) { + if ($.common.isNotEmpty(table.options.sidePagination) && table.options.sidePagination == 'client') { + return res.rows; + } else { + if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) { + var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId; + $.each(res.rows, function(i, row) { + row.state = $.inArray(row[column], table.rememberSelectedIds[table.options.id]) !== -1; + }) + } + return { rows: res.rows, total: res.total }; + } + } else { + $.modal.alertWarning(res.msg); + return { rows: [], total: 0 }; + } + }, + // 初始化事件 + initEvent: function() { + // 实例ID信息 + var optionsIds = $.table.getOptionsIds(); + // 监听事件处理 + $(optionsIds).on(TABLE_EVENTS, function () { + table.set($(this).attr("id")); + }); + // 在表格体渲染完成,并在 DOM 中可见后触发(事件) + $(optionsIds).on("post-body.bs.table", function (e, args) { + // 浮动提示框特效 + $(".table [data-toggle='tooltip']").tooltip(); + // 气泡弹出框特效 + $('.table [data-toggle="popover"]').popover(); + }); + // 选中、取消、全部选中、全部取消(事件) + $(optionsIds).on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rowsAfter, rowsBefore) { + // 复选框分页保留保存选中数组 + var rows = $.common.equals("uncheck-all", e.type) ? rowsBefore : rowsAfter; + var rowIds = $.table.affectedRowIds(rows); + if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) { + func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference'; + var selectedIds = table.rememberSelectedIds[table.options.id]; + if($.common.isNotEmpty(selectedIds)) { + table.rememberSelectedIds[table.options.id] = _[func](selectedIds, rowIds); + } else { + table.rememberSelectedIds[table.options.id] = _[func]([], rowIds); + } + var selectedRows = table.rememberSelecteds[table.options.id]; + if($.common.isNotEmpty(selectedRows)) { + table.rememberSelecteds[table.options.id] = _[func](selectedRows, rows); + } else { + table.rememberSelecteds[table.options.id] = _[func]([], rows); + } + } + }); + // 加载成功、选中、取消、全部选中、全部取消(事件) + $(optionsIds).on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () { + var toolbar = table.options.toolbar; + var uniqueId = table.options.uniqueId; + // 工具栏按钮控制 + var rows = $.common.isEmpty(uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(uniqueId); + // 非多个禁用 + $('#' + toolbar + ' .multiple').toggleClass('disabled', !rows.length); + // 非单个禁用 + $('#' + toolbar + ' .single').toggleClass('disabled', rows.length!=1); + }); + // 图片预览事件 + $(optionsIds).off("click").on("click", '.img-circle', function() { + var src = $(this).attr('src'); + var target = $(this).data('target'); + if($.common.equals("self", target)) { + var height = $(this).data('height'); + var width = $(this).data('width'); + top.layer.open({ + title: false, + type: 1, + closeBtn: true, + shadeClose: true, + area: ['auto', 'auto'], + content: "" + }); + } else if ($.common.equals("blank", target)) { + window.open(src); + } + }); + // 单击tooltip事件 + $(optionsIds).on("click", '.tooltip-show', function() { + var target = $(this).data('target'); + var input = $(this).prev(); + if ($.common.equals("copy", target)) { + input.select(); + document.execCommand("copy"); + } else if ($.common.equals("open", target)) { + top.layer.alert(input.val(), { + title: "信息内容", + shadeClose: true, + btn: ['确认'], + btnclass: ['btn btn-primary'], + }); + } + }); + }, + // 当所有数据被加载时触发 + onLoadSuccess: function(data) { + if (typeof table.options.onLoadSuccess == "function") { + table.options.onLoadSuccess(data); + } + }, + // 表格销毁 + destroy: function (tableId) { + var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId; + $("#" + currentId).bootstrapTable('destroy'); + delete table.rememberSelectedIds[currentId]; + delete table.rememberSelecteds[currentId]; + }, + // 序列号生成 + serialNumber: function (index, tableId) { + var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId; + var tableParams = $("#" + currentId).bootstrapTable('getOptions'); + var pageSize = $.common.isNotEmpty(tableParams.pageSize) ? tableParams.pageSize: table.options.pageSize; + var pageNumber = $.common.isNotEmpty(tableParams.pageNumber) ? tableParams.pageNumber: table.options.pageNumber; + return pageSize * (pageNumber - 1) + index + 1; + }, + // 列超出指定长度浮动提示 target(copy单击复制文本 open弹窗打开文本) + tooltip: function (value, length, target) { + var _length = $.common.isEmpty(length) ? 20 : length; + var _text = ""; + var _value = $.common.nullToStr(value); + var _target = $.common.isEmpty(target) ? 'copy' : target; + if (_value.length > _length) { + _text = _value.substr(0, _length) + "..."; + _value = _value.replace(/\'/g,"'"); + _value = _value.replace(/\"/g,"""); + var actions = []; + actions.push($.common.sprintf('', _value)); + actions.push($.common.sprintf('%s', _target, _value, _text)); + return actions.join(''); + } else { + _text = _value; + return _text; + } + }, + // 下拉按钮切换 + dropdownToggle: function (value) { + var actions = []; + actions.push('
    '); + actions.push(''); + actions.push(''); + actions.push('
    '); + return actions.join(''); + }, + // 图片预览 + imageView: function (value, height, width, target) { + if ($.common.isEmpty(width)) { + width = 'auto'; + } + if ($.common.isEmpty(height)) { + height = 'auto'; + } + // blank or self + var _target = $.common.isEmpty(target) ? 'self' : target; + if ($.common.isNotEmpty(value)) { + return $.common.sprintf("", height, width, _target, value); + } else { + return $.common.nullToStr(value); + } + }, + // 搜索-默认第一个form + search: function(formId, tableId, pageNumber, pageSize) { + table.set(tableId); + table.options.formId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; + var params = $.common.isEmpty(tableId) ? $("#" + table.options.id).bootstrapTable('getOptions') : $("#" + tableId).bootstrapTable('getOptions'); + if ($.common.isNotEmpty(pageNumber)) { + params.pageNumber = pageNumber; + } + if ($.common.isNotEmpty(pageSize)) { + params.pageSize = pageSize; + } + if($.common.isNotEmpty(tableId)){ + $("#" + tableId).bootstrapTable('refresh', params); + } else{ + $("#" + table.options.id).bootstrapTable('refresh', params); + } + }, + // 导出数据 + exportExcel: function(formId) { + table.set(); + $.modal.confirm("确定导出所有" + table.options.modalName + "吗?", function() { + var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; + var params = $("#" + table.options.id).bootstrapTable('getOptions'); + var dataParam = $("#" + currentId).serializeArray(); + dataParam.push({ "name": "orderByColumn", "value": params.sortName }); + dataParam.push({ "name": "isAsc", "value": params.sortOrder }); + $.modal.loading("正在导出数据,请稍候..."); + $.post(table.options.exportUrl, dataParam, function(result) { + if (result.code == web_status.SUCCESS) { + window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; + } else if (result.code == web_status.WARNING) { + $.modal.alertWarning(result.msg) + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); + }); + }); + }, + // 下载模板 + importTemplate: function() { + $.get(activeWindow().table.options.importTemplateUrl, function(result) { + if (result.code == web_status.SUCCESS) { + window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; + } else if (result.code == web_status.WARNING) { + $.modal.alertWarning(result.msg) + } else { + $.modal.alertError(result.msg); + } + }); + }, + // 导入数据 + importExcel: function(formId, width, height) { + table.set(); + var currentId = $.common.isEmpty(formId) ? 'importTpl' : formId; + var _width = $.common.isEmpty(width) ? "400" : width; + var _height = $.common.isEmpty(height) ? "230" : height; + top.layer.open({ + type: 1, + area: [_width + 'px', _height + 'px'], + fix: false, + //不固定 + maxmin: true, + shade: 0.3, + title: '导入' + table.options.modalName + '数据', + content: $('#' + currentId).html(), + btn: [' 导入', ' 取消'], + // 弹层外区域关闭 + shadeClose: true, + btn1: function(index, layero){ + var file = layero.find('#file').val(); + if (file == '' || (!$.common.endWith(file, '.xls') && !$.common.endWith(file, '.xlsx'))){ + $.modal.msgWarning("请选择后缀为 “xls”或“xlsx”的文件。"); + return false; + } + var index = top.layer.load(2, {shade: false}); + $.modal.disable(); + var formData = new FormData(layero.find('form')[0]); + $.ajax({ + url: table.options.importUrl, + data: formData, + cache: false, + contentType: false, + processData: false, + type: 'POST', + success: function (result) { + if (result.code == web_status.SUCCESS) { + $.modal.close(index); + $.modal.closeAll(); + $.modal.alertSuccess(result.msg); + $.table.refresh(); + } else if (result.code == web_status.WARNING) { + $.modal.close(index); + $.modal.enable(); + $.modal.alertWarning(result.msg) + } else { + $.modal.close(index); + $.modal.enable(); + $.modal.alertError(result.msg); + } + }, + complete: function () { + layero.find('#file').val(''); + } + }); + } + }); + }, + // 刷新表格 + refresh: function(tableId, pageNumber, pageSize, url) { + var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId; + var params = $("#" + currentId).bootstrapTable('getOptions'); + if ($.common.isEmpty(pageNumber)) { + pageNumber = params.pageNumber; + } + if ($.common.isEmpty(pageSize)) { + pageSize = params.pageSize; + } + if ($.common.isEmpty(url)) { + url = $.common.isEmpty(url) ? params.url : url; + } + $("#" + currentId).bootstrapTable('refresh', { + silent: true, + url: url, + pageNumber: pageNumber, + pageSize: pageSize + }); + }, + // 刷新options配置 + refreshOptions: function(options, tableId) { + var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId; + $("#" + currentId).bootstrapTable('refreshOptions', options); + }, + // 查询表格指定列值 deDuplication( true去重、false不去重) + selectColumns: function(column, deDuplication) { + var distinct = $.common.isEmpty(deDuplication) ? true : deDuplication; + var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) { + return $.common.getItemField(row, column); + }); + if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) { + var selectedRows = table.rememberSelecteds[table.options.id]; + if($.common.isNotEmpty(selectedRows)) { + rows = $.map(table.rememberSelecteds[table.options.id], function (row) { + return $.common.getItemField(row, column); + }); + } + } + return distinct ? $.common.uniqueFn(rows) : rows; + }, + // 获取当前页选中或者取消的行ID + affectedRowIds: function(rows) { + var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId; + var rowIds; + if ($.isArray(rows)) { + rowIds = $.map(rows, function(row) { + return $.common.getItemField(row, column); + }); + } else { + rowIds = [rows[column]]; + } + return rowIds; + }, + // 查询表格首列值deDuplication( true去重、false不去重) + selectFirstColumns: function(deDuplication) { + var distinct = $.common.isEmpty(deDuplication) ? true : deDuplication; + var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) { + return $.common.getItemField(row, table.options.columns[1].field); + }); + if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) { + var selectedRows = table.rememberSelecteds[table.options.id]; + if($.common.isNotEmpty(selectedRows)) { + rows = $.map(selectedRows, function (row) { + return $.common.getItemField(row, table.options.columns[1].field); + }); + } + } + return distinct ? $.common.uniqueFn(rows) : rows; + }, + // 回显数据字典 + selectDictLabel: function(datas, value) { + if ($.common.isEmpty(datas) || $.common.isEmpty(value)) { + return ''; + } + var actions = []; + $.each(datas, function(index, dict) { + if (dict.dictValue == ('' + value)) { + var listClass = $.common.equals("default", dict.listClass) || $.common.isEmpty(dict.listClass) ? "" : "badge badge-" + dict.listClass; + actions.push($.common.sprintf("%s", listClass, dict.dictLabel)); + return false; + } + }); + return actions.join(''); + }, + // 回显数据字典(字符串数组) + selectDictLabels: function(datas, value, separator) { + if ($.common.isEmpty(datas) || $.common.isEmpty(value)) { + return ''; + } + var currentSeparator = $.common.isEmpty(separator) ? "," : separator; + var actions = []; + $.each(value.split(currentSeparator), function(i, val) { + $.each(datas, function(index, dict) { + if (dict.dictValue == ('' + val)) { + var listClass = $.common.equals("default", dict.listClass) || $.common.isEmpty(dict.listClass) ? "" : "badge badge-" + dict.listClass; + actions.push($.common.sprintf("%s ", listClass, dict.dictLabel)); + return false; + } + }); + }); + return actions.join(''); + }, + // 显示表格指定列 + showColumn: function(column, tableId) { + var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId; + $("#" + currentId).bootstrapTable('showColumn', column); + }, + // 隐藏表格指定列 + hideColumn: function(column, tableId) { + var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId; + $("#" + currentId).bootstrapTable('hideColumn', column); + }, + // 显示所有表格列 + showAllColumns: function(tableId) { + var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId; + $("#" + currentId).bootstrapTable('showAllColumns'); + }, + // 隐藏所有表格列 + hideAllColumns: function(tableId) { + var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId; + $("#" + currentId).bootstrapTable('hideAllColumns'); + } + }, + // 表格树封装处理 + treeTable: { + // 初始化表格 + init: function(options) { + var defaults = { + id: "bootstrap-tree-table", + type: 1, // 0 代表bootstrapTable 1代表bootstrapTreeTable + height: 0, + rootIdValue: null, + ajaxParams: {}, + toolbar: "toolbar", + striped: false, + expandColumn: 1, + showSearch: true, + showRefresh: true, + showColumns: true, + expandAll: true, + expandFirst: true + }; + var options = $.extend(defaults, options); + table.options = options; + table.config[options.id] = options; + $.table.initEvent(); + $.bttTable = $('#' + options.id).bootstrapTreeTable({ + code: options.code, // 用于设置父子关系 + parentCode: options.parentCode, // 用于设置父子关系 + type: 'post', // 请求方式(*) + url: options.url, // 请求后台的URL(*) + data: options.data, // 无url时用于渲染的数据 + ajaxParams: options.ajaxParams, // 请求数据的ajax的data属性 + rootIdValue: options.rootIdValue, // 设置指定根节点id值 + height: options.height, // 表格树的高度 + expandColumn: options.expandColumn, // 在哪一列上面显示展开按钮 + striped: options.striped, // 是否显示行间隔色 + bordered: options.bordered, // 是否显示边框 + toolbar: '#' + options.toolbar, // 指定工作栏 + showSearch: options.showSearch, // 是否显示检索信息 + showRefresh: options.showRefresh, // 是否显示刷新按钮 + showColumns: options.showColumns, // 是否显示隐藏某列下拉框 + expandAll: options.expandAll, // 是否全部展开 + expandFirst: options.expandFirst, // 是否默认第一级展开--expandAll为false时生效 + columns: options.columns, // 显示列信息(*) + responseHandler: $.treeTable.responseHandler, // 在加载服务器发送来的数据之前处理函数 + onLoadSuccess: $.treeTable.onLoadSuccess // 当所有数据被加载时触发处理函数 + }); + }, + // 条件查询 + search: function(formId) { + var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; + var params = $.common.formToJSON(currentId); + $.bttTable.bootstrapTreeTable('refresh', params); + }, + // 刷新 + refresh: function() { + $.bttTable.bootstrapTreeTable('refresh'); + }, + // 查询表格树指定列值deDuplication( true去重、false不去重) + selectColumns: function(column, deDuplication) { + var distinct = $.common.isEmpty(deDuplication) ? true : deDuplication; + var rows = $.map($.bttTable.bootstrapTreeTable('getSelections'), function (row) { + return $.common.getItemField(row, column); + }); + return distinct ? $.common.uniqueFn(rows) : rows; + }, + // 请求获取数据后处理回调函数,校验异常状态提醒 + responseHandler: function(res) { + if (typeof table.options.responseHandler == "function") { + table.options.responseHandler(res); + } + if (res.code != undefined && res.code != web_status.SUCCESS) { + $.modal.alertWarning(res.msg); + return []; + } else { + return res; + } + }, + // 当所有数据被加载时触发 + onLoadSuccess: function(data) { + if (typeof table.options.onLoadSuccess == "function") { + table.options.onLoadSuccess(data); + } + $(".table [data-toggle='tooltip']").tooltip(); + }, + }, + // 表单封装处理 + form: { + // 表单重置 + reset: function(formId, tableId, pageNumber, pageSize) { + table.set(tableId); + formId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; + $("#" + formId)[0].reset(); + var tableId = $.common.isEmpty(tableId) ? table.options.id : tableId; + if (table.options.type == table_type.bootstrapTable) { + var params = $("#" + tableId).bootstrapTable('getOptions'); + if ($.common.isNotEmpty(pageNumber)) { + params.pageNumber = pageNumber; + } + if ($.common.isNotEmpty(pageSize)) { + params.pageSize = pageSize; + } + $("#" + tableId).bootstrapTable('refresh', params); + } else if (table.options.type == table_type.bootstrapTreeTable) { + $("#" + tableId).bootstrapTreeTable('refresh', []); + } + if ($.common.isNotEmpty(startLayDate) && $.common.isNotEmpty(endLayDate)) { + endLayDate.config.min.year = ''; + endLayDate.config.min.month = ''; + endLayDate.config.min.date = ''; + startLayDate.config.max.year = '2099'; + startLayDate.config.max.month = '12'; + startLayDate.config.max.date = '31'; + } + }, + // 获取选中复选框项 + selectCheckeds: function(name) { + var checkeds = ""; + $('input:checkbox[name="' + name + '"]:checked').each(function(i) { + if (0 == i) { + checkeds = $(this).val(); + } else { + checkeds += ("," + $(this).val()); + } + }); + return checkeds; + }, + // 获取选中下拉框项 + selectSelects: function(name) { + var selects = ""; + $('#' + name + ' option:selected').each(function (i) { + if (0 == i) { + selects = $(this).val(); + } else { + selects += ("," + $(this).val()); + } + }); + return selects; + } + }, + // 弹出层封装处理 + modal: { + // 显示图标 + icon: function(type) { + var icon = ""; + if (type == modal_status.WARNING) { + icon = 0; + } else if (type == modal_status.SUCCESS) { + icon = 1; + } else if (type == modal_status.FAIL) { + icon = 2; + } else { + icon = 3; + } + return icon; + }, + // 消息提示 + msg: function(content, type) { + if (type != undefined) { + top.layer.msg(content, { icon: $.modal.icon(type), time: 1000, shift: 5 }); + } else { + top.layer.msg(content); + } + }, + // 错误消息 + msgError: function(content) { + $.modal.msg(content, modal_status.FAIL); + }, + // 成功消息 + msgSuccess: function(content) { + $.modal.msg(content, modal_status.SUCCESS); + }, + // 警告消息 + msgWarning: function(content) { + $.modal.msg(content, modal_status.WARNING); + }, + // 弹出提示 + alert: function(content, type) { + top.layer.alert(content, { + icon: $.modal.icon(type), + title: "系统提示", + btn: ['确认'], + btnclass: ['btn btn-primary'], + }); + }, + // 错误提示 + alertError: function(content) { + $.modal.alert(content, modal_status.FAIL); + }, + // 成功提示 + alertSuccess: function(content) { + $.modal.alert(content, modal_status.SUCCESS); + }, + // 警告提示 + alertWarning: function(content) { + $.modal.alert(content, modal_status.WARNING); + }, + // 消息提示,重新加载页面 + msgReload: function(msg, type) { + top.layer.msg(msg, { + icon: $.modal.icon(type), + time: 500, + shade: [0.1, '#8F8F8F'] + }, + function() { + $.modal.reload(); + }); + }, + // 消息提示成功并刷新父窗体 + msgSuccessReload: function(msg) { + $.modal.msgReload(msg, modal_status.SUCCESS); + }, + // 获取iframe页的DOM + getChildFrame: function (index) { + if($.common.isEmpty(index)){ + var index = parent.layer.getFrameIndex(window.name); + return parent.layer.getChildFrame('body', index); + } else { + return top.layer.getChildFrame('body', index); + } + }, + // 关闭窗体 + close: function (index) { + if($.common.isEmpty(index)){ + var index = parent.layer.getFrameIndex(window.name); + parent.layer.close(index); + } else { + top.layer.close(index); + } + }, + // 关闭全部窗体 + closeAll: function () { + top.layer.closeAll(); + }, + // 确认窗体 + confirm: function (content, callBack) { + top.layer.confirm(content, { + icon: 3, + title: "系统提示", + btn: ['确认', '取消'] + }, function (index) { + $.modal.close(index); + callBack(true); + }); + }, + // 弹出层指定宽度 + open: function (title, url, width, height, callback) { + // 如果是移动端,就使用自适应大小弹窗 + if ($.common.isMobile()) { + width = 'auto'; + height = 'auto'; + } + if ($.common.isEmpty(title)) { + title = false; + } + if ($.common.isEmpty(url)) { + url = "/404.html"; + } + if ($.common.isEmpty(width)) { + width = 800; + } + if ($.common.isEmpty(height)) { + height = ($(window).height() - 50); + } + if ($.common.isEmpty(callback)) { + callback = function(index, layero) { + var iframeWin = layero.find('iframe')[0]; + iframeWin.contentWindow.submitHandler(index, layero); + } + } + top.layer.open({ + type: 2, + area: [width + 'px', height + 'px'], + fix: false, + //不固定 + maxmin: true, + shade: 0.3, + title: title, + content: url, + btn: ['确定', '关闭'], + // 弹层外区域关闭 + shadeClose: true, + yes: callback, + cancel: function(index) { + return true; + } + }); + }, + // 弹出层指定参数选项 + openOptions: function (options) { + var _url = $.common.isEmpty(options.url) ? "/404.html" : options.url; + var _title = $.common.isEmpty(options.title) ? "系统窗口" : options.title; + var _width = $.common.isEmpty(options.width) ? "800" : options.width; + var _height = $.common.isEmpty(options.height) ? ($(window).height() - 50) : options.height; + var _btn = [' 确认', ' 关闭']; + // 如果是移动端,就使用自适应大小弹窗 + if ($.common.isMobile()) { + _width = 'auto'; + _height = 'auto'; + } + if ($.common.isEmpty(options.yes)) { + options.yes = function(index, layero) { + options.callBack(index, layero); + } + } + var btnCallback = {}; + if(options.btn instanceof Array){ + for (var i = 1, len = options.btn.length; i < len; i++) { + var btn = options["btn" + (i + 1)]; + if (btn) { + btnCallback["btn" + (i + 1)] = btn; + } + } + } + var index = top.layer.open($.extend({ + id: options.id, // 唯一id + anim: options.anim, // 弹出动画 0-6 + type: 2, + maxmin: $.common.isEmpty(options.maxmin) ? true : options.maxmin, + shade: 0.3, + title: _title, + fix: false, + area: [_width + 'px', _height + 'px'], + content: _url, + shadeClose: $.common.isEmpty(options.shadeClose) ? true : options.shadeClose, + skin: options.skin, + // options.btn设置为0表示不显示按钮 + btn: $.common.isEmpty(options.btn) ? _btn : options.btn, + yes: options.yes, + cancel: function () { + return true; + } + }, btnCallback)); + if ($.common.isNotEmpty(options.full) && options.full === true) { + top.layer.full(index); + } + }, + // 弹出层全屏 + openFull: function (title, url, width, height) { + // 如果是移动端,就使用自适应大小弹窗 + if ($.common.isMobile()) { + width = 'auto'; + height = 'auto'; + } + if ($.common.isEmpty(title)) { + title = false; + } + if ($.common.isEmpty(url)) { + url = "/404.html"; + } + if ($.common.isEmpty(width)) { + width = 800; + } + if ($.common.isEmpty(height)) { + height = ($(window).height() - 50); + } + var index = top.layer.open({ + type: 2, + area: [width + 'px', height + 'px'], + fix: false, + //不固定 + maxmin: true, + shade: 0.3, + title: title, + content: url, + btn: ['确定', '关闭'], + // 弹层外区域关闭 + shadeClose: true, + yes: function(index, layero) { + var iframeWin = layero.find('iframe')[0]; + iframeWin.contentWindow.submitHandler(index, layero); + }, + cancel: function(index) { + return true; + } + }); + top.layer.full(index); + }, + // 选卡页方式打开 + openTab: function (title, url, isRefresh) { + createMenuItem(url, title, isRefresh); + }, + // 选卡页同一页签打开 + parentTab: function (title, url) { + var dataId = window.frameElement.getAttribute('data-id'); + createMenuItem(url, title); + closeItem(dataId); + }, + // 关闭选项卡 + closeTab: function (dataId) { + closeItem(dataId); + }, + // 禁用按钮 + disable: function() { + var doc = window.top == window.parent ? window.document : window.parent.document; + $("a[class*=layui-layer-btn]", doc).addClass("layer-disabled"); + }, + // 启用按钮 + enable: function() { + var doc = window.top == window.parent ? window.document : window.parent.document; + $("a[class*=layui-layer-btn]", doc).removeClass("layer-disabled"); + }, + // 打开遮罩层 + loading: function (message) { + $.blockUI({ message: '
    ' + message + '
    ' }); + }, + // 关闭遮罩层 + closeLoading: function () { + setTimeout(function(){ + $.unblockUI(); + }, 50); + }, + // 重新加载 + reload: function () { + parent.location.reload(); + } + }, + // 操作封装处理 + operate: { + // 提交数据 + submit: function(url, type, dataType, data, callback) { + var config = { + url: url, + type: type, + dataType: dataType, + data: data, + beforeSend: function () { + $.modal.loading("正在处理中,请稍候..."); + }, + success: function(result) { + if (typeof callback == "function") { + callback(result); + } + $.operate.ajaxSuccess(result); + } + }; + $.ajax(config) + }, + // post请求传输 + post: function(url, data, callback) { + $.operate.submit(url, "post", "json", data, callback); + }, + // get请求传输 + get: function(url, callback) { + $.operate.submit(url, "get", "json", "", callback); + }, + // 详细信息 + detail: function(id, width, height) { + table.set(); + var _url = $.operate.detailUrl(id); + var options = { + title: table.options.modalName + "详细", + width: width, + height: height, + url: _url, + skin: 'layui-layer-gray', + btn: ['关闭'], + yes: function (index, layero) { + $.modal.close(index); + } + }; + $.modal.openOptions(options); + }, + // 详细信息,以tab页展现 + detailTab: function(id) { + table.set(); + $.modal.openTab("详细" + table.options.modalName, $.operate.detailUrl(id)); + }, + // 详细访问地址 + detailUrl: function(id) { + var url = "/404.html"; + if ($.common.isNotEmpty(id)) { + url = table.options.detailUrl.replace("{id}", id); + } else { + var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); + if (id.length == 0) { + $.modal.alertWarning("请至少选择一条记录"); + return; + } + url = table.options.detailUrl.replace("{id}", id); + } + return url; + }, + // 删除信息 + remove: function(id) { + table.set(); + $.modal.confirm("确定删除该条" + table.options.modalName + "信息吗?", function() { + var url = $.common.isEmpty(id) ? table.options.removeUrl : table.options.removeUrl.replace("{id}", id); + if(table.options.type == table_type.bootstrapTreeTable) { + $.operate.get(url); + } else { + var data = { "ids": id }; + $.operate.submit(url, "post", "json", data); + } + }); + }, + // 批量删除信息 + removeAll: function() { + table.set(); + var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); + if (rows.length == 0) { + $.modal.alertWarning("请至少选择一条记录"); + return; + } + $.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() { + var url = table.options.removeUrl; + var data = { "ids": rows.join() }; + $.operate.submit(url, "post", "json", data); + }); + }, + // 清空信息 + clean: function() { + table.set(); + $.modal.confirm("确定清空所有" + table.options.modalName + "吗?", function() { + var url = table.options.cleanUrl; + $.operate.submit(url, "post", "json", ""); + }); + }, + // 添加信息 + add: function(id) { + table.set(); + $.modal.open("添加" + table.options.modalName, $.operate.addUrl(id)); + }, + // 添加信息,以tab页展现 + addTab: function (id) { + table.set(); + $.modal.openTab("添加" + table.options.modalName, $.operate.addUrl(id)); + }, + // 添加信息 全屏 + addFull: function(id) { + table.set(); + $.modal.openFull("添加" + table.options.modalName, $.operate.addUrl(id)); + }, + // 添加访问地址 + addUrl: function(id) { + var url = $.common.isEmpty(id) ? table.options.createUrl.replace("{id}", "") : table.options.createUrl.replace("{id}", id); + return url; + }, + // 修改信息 + edit: function(id) { + table.set(); + if($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) { + var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0]; + if ($.common.isEmpty(row)) { + $.modal.alertWarning("请至少选择一条记录"); + return; + } + var url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]); + $.modal.open("修改" + table.options.modalName, url); + } else { + $.modal.open("修改" + table.options.modalName, $.operate.editUrl(id)); + } + }, + // 修改信息,以tab页展现 + editTab: function(id) { + table.set(); + $.modal.openTab("修改" + table.options.modalName, $.operate.editUrl(id)); + }, + // 修改信息 全屏 + editFull: function(id) { + table.set(); + var url = "/404.html"; + if ($.common.isNotEmpty(id)) { + url = table.options.updateUrl.replace("{id}", id); + } else { + if(table.options.type == table_type.bootstrapTreeTable) { + var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0]; + if ($.common.isEmpty(row)) { + $.modal.alertWarning("请至少选择一条记录"); + return; + } + url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]); + } else { + var row = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); + url = table.options.updateUrl.replace("{id}", row); + } + } + $.modal.openFull("修改" + table.options.modalName, url); + }, + // 修改访问地址 + editUrl: function(id) { + var url = "/404.html"; + if ($.common.isNotEmpty(id)) { + url = table.options.updateUrl.replace("{id}", id); + } else { + var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); + if (id.length == 0) { + $.modal.alertWarning("请至少选择一条记录"); + return; + } + url = table.options.updateUrl.replace("{id}", id); + } + return url; + }, + // 保存信息 刷新表格 + save: function(url, data, callback) { + var config = { + url: url, + type: "post", + dataType: "json", + data: data, + beforeSend: function () { + $.modal.loading("正在处理中,请稍候..."); + $.modal.disable(); + }, + success: function(result) { + if (typeof callback == "function") { + callback(result); + } + $.operate.successCallback(result); + } + }; + $.ajax(config) + }, + // 保存信息 弹出结果提示框 + saveModal: function(url, data, callback) { + var config = { + url: url, + type: "post", + dataType: "json", + data: data, + beforeSend: function () { + $.modal.loading("正在处理中,请稍候..."); + }, + success: function(result) { + if (typeof callback == "function") { + callback(result); + } + if (result.code == web_status.SUCCESS) { + $.modal.alertSuccess(result.msg) + } else if (result.code == web_status.WARNING) { + $.modal.alertWarning(result.msg) + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); + } + }; + $.ajax(config) + }, + // 保存选项卡信息 + saveTab: function(url, data, callback) { + var config = { + url: url, + type: "post", + dataType: "json", + data: data, + beforeSend: function () { + $.modal.loading("正在处理中,请稍候..."); + }, + success: function(result) { + if (typeof callback == "function") { + callback(result); + } + $.operate.successTabCallback(result); + } + }; + $.ajax(config) + }, + // 保存结果弹出msg刷新table表格 + ajaxSuccess: function (result) { + if (result.code == web_status.SUCCESS && table.options.type == table_type.bootstrapTable) { + $.modal.msgSuccess(result.msg); + $.table.refresh(); + } else if (result.code == web_status.SUCCESS && table.options.type == table_type.bootstrapTreeTable) { + $.modal.msgSuccess(result.msg); + $.treeTable.refresh(); + } else if (result.code == web_status.SUCCESS && $.common.isEmpty(table.options.type)) { + $.modal.msgSuccess(result.msg) + } else if (result.code == web_status.WARNING) { + $.modal.alertWarning(result.msg) + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); + }, + // 保存结果重新加载页面 + saveReload: function (result) { + if (result.code == web_status.SUCCESS) { + $.modal.msgSuccessReload(result.msg); + } else if (result.code == web_status.WARNING) { + $.modal.alertWarning(result.msg) + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); + }, + // 成功回调执行事件(父窗体静默更新) + successCallback: function(result) { + if (result.code == web_status.SUCCESS) { + var parent = activeWindow(); + if($.common.isEmpty(parent.table)) { + $.modal.msgSuccessReload(result.msg); + } else if (parent.table.options.type == table_type.bootstrapTable) { + $.modal.close(); + parent.$.modal.msgSuccess(result.msg); + parent.$.table.refresh(); + } else if (parent.table.options.type == table_type.bootstrapTreeTable) { + $.modal.close(); + parent.$.modal.msgSuccess(result.msg); + parent.$.treeTable.refresh(); + } + } else if (result.code == web_status.WARNING) { + $.modal.alertWarning(result.msg) + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); + $.modal.enable(); + }, + // 选项卡成功回调执行事件(父窗体静默更新) + successTabCallback: function(result) { + if (result.code == web_status.SUCCESS) { + var topWindow = $(window.parent.document); + var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-panel'); + var $contentWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow; + $.modal.close(); + $contentWindow.$.modal.msgSuccess(result.msg); + $contentWindow.$(".layui-layer-padding").removeAttr("style"); + if ($contentWindow.table.options.type == table_type.bootstrapTable) { + $contentWindow.$.table.refresh(); + } else if ($contentWindow.table.options.type == table_type.bootstrapTreeTable) { + $contentWindow.$.treeTable.refresh(); + } + $.modal.closeTab(); + } else if (result.code == web_status.WARNING) { + $.modal.alertWarning(result.msg) + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); + } + }, + // 校验封装处理 + validate: { + // 判断返回标识是否唯一 false 不存在 true 存在 + unique: function (value) { + if (value == "0") { + return true; + } + return false; + }, + // 表单验证 + form: function (formId) { + var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; + return $("#" + currentId).validate().form(); + }, + // 重置表单验证(清除提示信息) + reset: function (formId) { + var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; + return $("#" + currentId).validate().resetForm(); + } + }, + // 树插件封装处理 + tree: { + _option: {}, + _lastValue: {}, + // 初始化树结构 + init: function(options) { + var defaults = { + id: "tree", // 属性ID + expandLevel: 0, // 展开等级节点 + view: { + selectedMulti: false, // 设置是否允许同时选中多个节点 + nameIsHTML: true // 设置 name 属性是否支持 HTML 脚本 + }, + check: { + enable: false, // 置 zTree 的节点上是否显示 checkbox / radio + nocheckInherit: true, // 设置子节点是否自动继承 + chkboxType: { "Y": "ps", "N": "ps" } // 父子节点的关联关系 + }, + data: { + key: { + title: "title" // 节点数据保存节点提示信息的属性名称 + }, + simpleData: { + enable: true // true / false 分别表示 使用 / 不使用 简单数据模式 + } + }, + }; + var options = $.extend(defaults, options); + $.tree._option = options; + // 树结构初始化加载 + var setting = { + callback: { + onClick: options.onClick, // 用于捕获节点被点击的事件回调函数 + onCheck: options.onCheck, // 用于捕获 checkbox / radio 被勾选 或 取消勾选的事件回调函数 + onDblClick: options.onDblClick // 用于捕获鼠标双击之后的事件回调函数 + }, + check: options.check, + view: options.view, + data: options.data + }; + $.get(options.url, function(data) { + var treeId = $("#treeId").val(); + tree = $.fn.zTree.init($("#" + options.id), setting, data); + $._tree = tree; + for (var i = 0; i < options.expandLevel; i++) { + var nodes = tree.getNodesByParam("level", i); + for (var j = 0; j < nodes.length; j++) { + tree.expandNode(nodes[j], true, false, false); + } + } + var node = tree.getNodesByParam("id", treeId, null)[0]; + $.tree.selectByIdName(treeId, node); + // 回调tree方法 + if(typeof(options.callBack) === "function"){ + options.callBack(tree); + } + }); + }, + // 搜索节点 + searchNode: function() { + // 取得输入的关键字的值 + var value = $.common.trim($("#keyword").val()); + if ($.tree._lastValue == value) { + return; + } + // 保存最后一次搜索名称 + $.tree._lastValue = value; + var nodes = $._tree.getNodes(); + // 如果要查空字串,就退出不查了。 + if (value == "") { + $.tree.showAllNode(nodes); + return; + } + $.tree.hideAllNode(nodes); + // 根据搜索值模糊匹配 + $.tree.updateNodes($._tree.getNodesByParamFuzzy("name", value)); + }, + // 根据Id和Name选中指定节点 + selectByIdName: function(treeId, node) { + if ($.common.isNotEmpty(treeId) && node && treeId == node.id) { + $._tree.selectNode(node, true); + } + }, + // 显示所有节点 + showAllNode: function(nodes) { + nodes = $._tree.transformToArray(nodes); + for (var i = nodes.length - 1; i >= 0; i--) { + if (nodes[i].getParentNode() != null) { + $._tree.expandNode(nodes[i], true, false, false, false); + } else { + $._tree.expandNode(nodes[i], true, true, false, false); + } + $._tree.showNode(nodes[i]); + $.tree.showAllNode(nodes[i].children); + } + }, + // 隐藏所有节点 + hideAllNode: function(nodes) { + var nodes = $._tree.transformToArray(nodes); + for (var i = nodes.length - 1; i >= 0; i--) { + $._tree.hideNode(nodes[i]); + } + }, + // 显示所有父节点 + showParent: function(treeNode) { + var parentNode; + while ((parentNode = treeNode.getParentNode()) != null) { + $._tree.showNode(parentNode); + $._tree.expandNode(parentNode, true, false, false); + treeNode = parentNode; + } + }, + // 显示所有孩子节点 + showChildren: function(treeNode) { + if (treeNode.isParent) { + for (var idx in treeNode.children) { + var node = treeNode.children[idx]; + $._tree.showNode(node); + $.tree.showChildren(node); + } + } + }, + // 更新节点状态 + updateNodes: function(nodeList) { + $._tree.showNodes(nodeList); + for (var i = 0, l = nodeList.length; i < l; i++) { + var treeNode = nodeList[i]; + $.tree.showChildren(treeNode); + $.tree.showParent(treeNode) + } + }, + // 获取当前被勾选集合 + getCheckedNodes: function(column) { + var _column = $.common.isEmpty(column) ? "id" : column; + var nodes = $._tree.getCheckedNodes(true); + return $.map(nodes, function (row) { + return row[_column]; + }).join(); + }, + // 不允许根父节点选择 + notAllowParents: function(_tree) { + var nodes = _tree.getSelectedNodes(); + if(nodes.length == 0){ + $.modal.msgError("请选择节点后提交"); + return false; + } + for (var i = 0; i < nodes.length; i++) { + if (nodes[i].level == 0) { + $.modal.msgError("不能选择根节点(" + nodes[i].name + ")"); + return false; + } + if (nodes[i].isParent) { + $.modal.msgError("不能选择父节点(" + nodes[i].name + ")"); + return false; + } + } + return true; + }, + // 不允许最后层级节点选择 + notAllowLastLevel: function(_tree) { + var nodes = _tree.getSelectedNodes(); + for (var i = 0; i < nodes.length; i++) { + if (!nodes[i].isParent) { + $.modal.msgError("不能选择最后层级节点(" + nodes[i].name + ")"); + return false; + } + } + return true; + }, + // 隐藏/显示搜索栏 + toggleSearch: function() { + $('#search').slideToggle(200); + $('#btnShow').toggle(); + $('#btnHide').toggle(); + $('#keyword').focus(); + }, + // 折叠 + collapse: function() { + $._tree.expandAll(false); + }, + // 展开 + expand: function() { + $._tree.expandAll(true); + } + }, + // 通用方法封装处理 + common: { + // 判断字符串是否为空 + isEmpty: function (value) { + if (value == null || this.trim(value) == "") { + return true; + } + return false; + }, + // 判断一个字符串是否为非空串 + isNotEmpty: function (value) { + return !$.common.isEmpty(value); + }, + // 空对象转字符串 + nullToStr: function(value) { + if ($.common.isEmpty(value)) { + return "-"; + } + return value; + }, + // 是否显示数据 为空默认为显示 + visible: function (value) { + if ($.common.isEmpty(value) || value == true) { + return true; + } + return false; + }, + // 空格截取 + trim: function (value) { + if (value == null) { + return ""; + } + return value.toString().replace(/(^\s*)|(\s*$)|\r|\n/g, ""); + }, + // 比较两个字符串(大小写敏感) + equals: function (str, that) { + return str == that; + }, + // 比较两个字符串(大小写不敏感) + equalsIgnoreCase: function (str, that) { + return String(str).toUpperCase() === String(that).toUpperCase(); + }, + // 将字符串按指定字符分割 + split: function (str, sep, maxLen) { + if ($.common.isEmpty(str)) { + return null; + } + var value = String(str).split(sep); + return maxLen ? value.slice(0, maxLen - 1) : value; + }, + // 字符串格式化(%s ) + sprintf: function (str) { + var args = arguments, flag = true, i = 1; + str = str.replace(/%s/g, function () { + var arg = args[i++]; + if (typeof arg === 'undefined') { + flag = false; + return ''; + } + return arg == null ? '' : arg; + }); + return flag ? str : ''; + }, + // 日期格式化 时间戳 -> yyyy-MM-dd HH-mm-ss + dateFormat: function(date, format) { + var that = this; + if (that.isEmpty(date)) return ""; + if (!date) return; + if (!format) format = "yyyy-MM-dd"; + switch (typeof date) { + case "string": + date = new Date(date.replace(/-/g, "/")); + break; + case "number": + date = new Date(date); + break; + } + if (!date instanceof Date) return; + var dict = { + "yyyy": date.getFullYear(), + "M": date.getMonth() + 1, + "d": date.getDate(), + "H": date.getHours(), + "m": date.getMinutes(), + "s": date.getSeconds(), + "MM": ("" + (date.getMonth() + 101)).substr(1), + "dd": ("" + (date.getDate() + 100)).substr(1), + "HH": ("" + (date.getHours() + 100)).substr(1), + "mm": ("" + (date.getMinutes() + 100)).substr(1), + "ss": ("" + (date.getSeconds() + 100)).substr(1) + }; + return format.replace(/(yyyy|MM?|dd?|HH?|ss?|mm?)/g, + function() { + return dict[arguments[0]]; + }); + }, + // 获取节点数据,支持多层级访问 + getItemField: function (item, field) { + var value = item; + if (typeof field !== 'string' || item.hasOwnProperty(field)) { + return item[field]; + } + var props = field.split('.'); + for (var p in props) { + value = value && value[props[p]]; + } + return value; + }, + // 指定随机数返回 + random: function (min, max) { + return Math.floor((Math.random() * max) + min); + }, + // 判断字符串是否是以start开头 + startWith: function(value, start) { + var reg = new RegExp("^" + start); + return reg.test(value) + }, + // 判断字符串是否是以end结尾 + endWith: function(value, end) { + var reg = new RegExp(end + "$"); + return reg.test(value) + }, + // 数组去重 + uniqueFn: function(array) { + var result = []; + var hashObj = {}; + for (var i = 0; i < array.length; i++) { + if (!hashObj[array[i]]) { + hashObj[array[i]] = true; + result.push(array[i]); + } + } + return result; + }, + // 数组中的所有元素放入一个字符串 + join: function(array, separator) { + if ($.common.isEmpty(array)) { + return null; + } + return array.join(separator); + }, + // 获取form下所有的字段并转换为json对象 + formToJSON: function(formId) { + var json = {}; + $.each($("#" + formId).serializeArray(), function(i, field) { + if(json[field.name]) { + json[field.name] += ("," + field.value); + } else { + json[field.name] = field.value; + } + }); + return json; + }, + // 数据字典转下拉框 + dictToSelect: function(datas, value, name) { + var actions = []; + actions.push($.common.sprintf("'); + return actions.join(''); + }, + // 获取obj对象长度 + getLength: function(obj) { + var count = 0;   + for (var i in obj) { + if (obj.hasOwnProperty(i)) { + count++; + }   + } + return count; + }, + // 判断移动端 + isMobile: function () { + return navigator.userAgent.match(/(Android|iPhone|SymbianOS|Windows Phone|iPad|iPod)/i); + }, + // 数字正则表达式,只能为0-9数字 + numValid : function(text){ + var patten = new RegExp(/^[0-9]+$/); + return patten.test(text); + }, + // 英文正则表达式,只能为a-z和A-Z字母 + enValid : function(text){ + var patten = new RegExp(/^[a-zA-Z]+$/); + return patten.test(text); + }, + // 英文、数字正则表达式,必须包含(字母,数字) + enNumValid : function(text){ + var patten = new RegExp(/^(?=.*[a-zA-Z]+)(?=.*[0-9]+)[a-zA-Z0-9]+$/); + return patten.test(text); + }, + // 英文、数字、特殊字符正则表达式,必须包含(字母,数字,特殊字符!@#$%^&*()-=_+) + charValid : function(text){ + var patten = new RegExp(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[~!@#\$%\^&\*\(\)\-=_\+])[A-Za-z\d~!@#\$%\^&\*\(\)\-=_\+]{6,}$/); + return patten.test(text); + }, + } + }); +})(jQuery); + +/** 表格类型 */ +table_type = { + bootstrapTable: 0, + bootstrapTreeTable: 1 +}; + +/** 消息状态码 */ +web_status = { + SUCCESS: 0, + FAIL: 500, + WARNING: 301 +}; + +/** 弹窗状态码 */ +modal_status = { + SUCCESS: "success", + FAIL: "error", + WARNING: "warning" +}; \ No newline at end of file diff --git a/src/main/resources/static/ruoyi/login.js b/src/main/resources/static/ruoyi/login.js new file mode 100644 index 0000000..f40f110 --- /dev/null +++ b/src/main/resources/static/ruoyi/login.js @@ -0,0 +1,95 @@ + +$(function() { + validateKickout(); + validateRule(); + $('.imgcode').click(function() { + var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random(); + $(".imgcode").attr("src", url); + }); +}); + +$.validator.setDefaults({ + submitHandler: function() { + login(); + } +}); + +function login() { + $.modal.loading($("#btnSubmit").data("loading")); + var username = $.common.trim($("input[name='username']").val()); + var password = $.common.trim($("input[name='password']").val()); + var validateCode = $("input[name='validateCode']").val(); + var rememberMe = $("input[name='rememberme']").is(':checked'); + $.ajax({ + type: "post", + url: ctx + "login", + data: { + "username": username, + "password": password, + "validateCode": validateCode, + "rememberMe": rememberMe + }, + success: function(r) { + if (r.code == web_status.SUCCESS) { + location.href = ctx + 'index'; + } else { + $.modal.closeLoading(); + $('.imgcode').click(); + $(".code").val(""); + $.modal.msg(r.msg); + } + } + }); +} + +function validateRule() { + var icon = " "; + $("#signupForm").validate({ + rules: { + username: { + required: true + }, + password: { + required: true + } + }, + messages: { + username: { + required: icon + "请输入您的用户名", + }, + password: { + required: icon + "请输入您的密码", + } + } + }) +} + +function validateKickout() { + if (getParam("kickout") == 1) { + layer.alert("您已在别处登录,请您修改密码或重新登录", { + icon: 0, + title: "系统提示" + }, + function(index) { + //关闭弹窗 + layer.close(index); + if (top != self) { + top.location = self.location; + } else { + var url = location.search; + if (url) { + var oldUrl = window.location.href; + var newUrl = oldUrl.substring(0, oldUrl.indexOf('?')); + self.location = newUrl; + } + } + }); + } +} + +function getParam(paramName) { + var reg = new RegExp("(^|&)" + paramName + "=([^&]*)(&|$)"); + var r = window.location.search.substr(1).match(reg); + if (r != null) return decodeURI(r[2]); + return null; +} \ No newline at end of file diff --git a/src/main/resources/static/ruoyi/register.js b/src/main/resources/static/ruoyi/register.js new file mode 100644 index 0000000..9887b4b --- /dev/null +++ b/src/main/resources/static/ruoyi/register.js @@ -0,0 +1,82 @@ + +$(function() { + validateRule(); + $('.imgcode').click(function() { + var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random(); + $(".imgcode").attr("src", url); + }); +}); + +$.validator.setDefaults({ + submitHandler: function() { + register(); + } +}); + +function register() { + $.modal.loading($("#btnSubmit").data("loading")); + var username = $.common.trim($("input[name='username']").val()); + var password = $.common.trim($("input[name='password']").val()); + var validateCode = $("input[name='validateCode']").val(); + $.ajax({ + type: "post", + url: ctx + "register", + data: { + "loginName": username, + "password": password, + "validateCode": validateCode + }, + success: function(r) { + if (r.code == web_status.SUCCESS) { + layer.alert("恭喜你,您的账号 " + username + " 注册成功!", { + icon: 1, + title: "系统提示" + }, + function(index) { + //关闭弹窗 + layer.close(index); + location.href = ctx + 'login'; + }); + } else { + $.modal.closeLoading(); + $('.imgcode').click(); + $(".code").val(""); + $.modal.msg(r.msg); + } + } + }); +} + +function validateRule() { + var icon = " "; + $("#registerForm").validate({ + rules: { + username: { + required: true, + minlength: 2 + }, + password: { + required: true, + minlength: 5 + }, + confirmPassword: { + required: true, + equalTo: "[name='password']" + } + }, + messages: { + username: { + required: icon + "请输入您的用户名", + minlength: icon + "用户名不能小于2个字符" + }, + password: { + required: icon + "请输入您的密码", + minlength: icon + "密码不能小于5个字符", + }, + confirmPassword: { + required: icon + "请再次输入您的密码", + equalTo: icon + "两次密码输入不一致" + } + } + }) +} diff --git a/src/main/resources/templates/browse/browse.html b/src/main/resources/templates/browse/browse.html new file mode 100644 index 0000000..ec57be8 --- /dev/null +++ b/src/main/resources/templates/browse/browse.html @@ -0,0 +1,310 @@ + + + + + + + + + + + + +
    +
    +
    +
    + 电子文件 +
    +
    +
    +
    +
    +
    +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +   +   +
      +
      +
      + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + + + + + + + + + + + + diff --git a/src/main/resources/templates/browse/browsesimple.html b/src/main/resources/templates/browse/browsesimple.html new file mode 100644 index 0000000..9ccc3e9 --- /dev/null +++ b/src/main/resources/templates/browse/browsesimple.html @@ -0,0 +1,269 @@ + + + + + + + + + + + +
      + +
      +
      +
      + +
      +
      +
      + 条目信息 +

      +
      +
      +
      +
      +
      + +
      + +
      + + +
        +
        +
        + + +
        + +
        +
        +
        + +
        + + + + + + + + + diff --git a/src/main/resources/templates/browse/metadata.html b/src/main/resources/templates/browse/metadata.html new file mode 100644 index 0000000..f4852cd --- /dev/null +++ b/src/main/resources/templates/browse/metadata.html @@ -0,0 +1,33 @@ + + + + + + + +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dabg/bfgl/add.html b/src/main/resources/templates/dabg/bfgl/add.html new file mode 100644 index 0000000..eb878fe --- /dev/null +++ b/src/main/resources/templates/dabg/bfgl/add.html @@ -0,0 +1,84 @@ + + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dabg/bfgl/bfgl.html b/src/main/resources/templates/dabg/bfgl/bfgl.html new file mode 100644 index 0000000..8281496 --- /dev/null +++ b/src/main/resources/templates/dabg/bfgl/bfgl.html @@ -0,0 +1,132 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • + +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dabg/bfgl/edit.html b/src/main/resources/templates/dabg/bfgl/edit.html new file mode 100644 index 0000000..9d38e05 --- /dev/null +++ b/src/main/resources/templates/dabg/bfgl/edit.html @@ -0,0 +1,91 @@ + + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + +
        +
        + +
        + +
        +
        + + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dabg/wsddj/add.html b/src/main/resources/templates/dabg/wsddj/add.html new file mode 100644 index 0000000..3b2d8a4 --- /dev/null +++ b/src/main/resources/templates/dabg/wsddj/add.html @@ -0,0 +1,90 @@ + + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        + + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dabg/wsddj/edit.html b/src/main/resources/templates/dabg/wsddj/edit.html new file mode 100644 index 0000000..dadc722 --- /dev/null +++ b/src/main/resources/templates/dabg/wsddj/edit.html @@ -0,0 +1,95 @@ + + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        + +
        + +
        +
        + + + + +
        +
        +
        +
        + +
        + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dabg/wsddj/wsddj.html b/src/main/resources/templates/dabg/wsddj/wsddj.html new file mode 100644 index 0000000..7331952 --- /dev/null +++ b/src/main/resources/templates/dabg/wsddj/wsddj.html @@ -0,0 +1,141 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • + +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dacx/archivesearch/archivesearch.html b/src/main/resources/templates/dacx/archivesearch/archivesearch.html new file mode 100644 index 0000000..dfbe6e1 --- /dev/null +++ b/src/main/resources/templates/dacx/archivesearch/archivesearch.html @@ -0,0 +1,221 @@ + + + + + + + + + + + +
        +
        +
        +
        +
        + +  搜索 + + + + +
        +
        + + +
        +
        +
        +
        +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/archiveimportbatch/addgsbdr.html b/src/main/resources/templates/dajs/archiveimportbatch/addgsbdr.html new file mode 100644 index 0000000..3fa9661 --- /dev/null +++ b/src/main/resources/templates/dajs/archiveimportbatch/addgsbdr.html @@ -0,0 +1,141 @@ + + + + + + + + + +
        +
        + + + + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + + + +
        +
        + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/archiveimportbatch/addmldraj.html b/src/main/resources/templates/dajs/archiveimportbatch/addmldraj.html new file mode 100644 index 0000000..ddcbe43 --- /dev/null +++ b/src/main/resources/templates/dajs/archiveimportbatch/addmldraj.html @@ -0,0 +1,164 @@ + + + + + + + + +
        +
        + + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + + +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/archiveimportbatch/addmldrwj.html b/src/main/resources/templates/dajs/archiveimportbatch/addmldrwj.html new file mode 100644 index 0000000..20dfc40 --- /dev/null +++ b/src/main/resources/templates/dajs/archiveimportbatch/addmldrwj.html @@ -0,0 +1,219 @@ + + + + + + + + +
        +
        + + +
        + +
        + +
        +
        +
        + +
        + +
        +
        + + +
        + +
        + +
        +
        + + +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/archiveimportbatch/addqwgj.html b/src/main/resources/templates/dajs/archiveimportbatch/addqwgj.html new file mode 100644 index 0000000..51652a6 --- /dev/null +++ b/src/main/resources/templates/dajs/archiveimportbatch/addqwgj.html @@ -0,0 +1,143 @@ + + + + + + + + + +
        +
        + + + + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + + + +
        +
        + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/archiveimportbatch/archiveimportbatch.html b/src/main/resources/templates/dajs/archiveimportbatch/archiveimportbatch.html new file mode 100644 index 0000000..a5a9754 --- /dev/null +++ b/src/main/resources/templates/dajs/archiveimportbatch/archiveimportbatch.html @@ -0,0 +1,169 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/archiveimportbatch/edit.html b/src/main/resources/templates/dajs/archiveimportbatch/edit.html new file mode 100644 index 0000000..2e2251d --- /dev/null +++ b/src/main/resources/templates/dajs/archiveimportbatch/edit.html @@ -0,0 +1,101 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + 代码生成请选择字典属性 +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/archiveimportbatch/importbatchmessage.html b/src/main/resources/templates/dajs/archiveimportbatch/importbatchmessage.html new file mode 100644 index 0000000..85cbdf3 --- /dev/null +++ b/src/main/resources/templates/dajs/archiveimportbatch/importbatchmessage.html @@ -0,0 +1,21 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + + + diff --git a/src/main/resources/templates/dajs/gsbdr/gsbdr.html b/src/main/resources/templates/dajs/gsbdr/gsbdr.html new file mode 100644 index 0000000..56e4407 --- /dev/null +++ b/src/main/resources/templates/dajs/gsbdr/gsbdr.html @@ -0,0 +1,231 @@ + + + + + + + + +
        +
        +
        +
        + 档案类型 +
        +
        + + + +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        + +
        +

        请点击左侧树节点!

        +
        +
        +
        +
        + + + + + + + + diff --git a/src/main/resources/templates/dajs/jsgl/add.html b/src/main/resources/templates/dajs/jsgl/add.html new file mode 100644 index 0000000..7263c0c --- /dev/null +++ b/src/main/resources/templates/dajs/jsgl/add.html @@ -0,0 +1,118 @@ + + + + + + + + +
        +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/jsgl/detail.html b/src/main/resources/templates/dajs/jsgl/detail.html new file mode 100644 index 0000000..91570e8 --- /dev/null +++ b/src/main/resources/templates/dajs/jsgl/detail.html @@ -0,0 +1,67 @@ + + + + + + + + +
        +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/jsgl/jnwj.html b/src/main/resources/templates/dajs/jsgl/jnwj.html new file mode 100644 index 0000000..7b0a390 --- /dev/null +++ b/src/main/resources/templates/dajs/jsgl/jnwj.html @@ -0,0 +1,391 @@ + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/dajs/jsgl/jsgl.html b/src/main/resources/templates/dajs/jsgl/jsgl.html new file mode 100644 index 0000000..b7b9da6 --- /dev/null +++ b/src/main/resources/templates/dajs/jsgl/jsgl.html @@ -0,0 +1,544 @@ + + + + + + + + +
        +
        +
        +
        + 档案类型 +
        +
        + + + +
        +
        +
        +
        +
        +
        +
        + + + + + + + + + + + diff --git a/src/main/resources/templates/dajs/jsgl/update.html b/src/main/resources/templates/dajs/jsgl/update.html new file mode 100644 index 0000000..f77fb09 --- /dev/null +++ b/src/main/resources/templates/dajs/jsgl/update.html @@ -0,0 +1,95 @@ + + + + + + + + +
        +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/jsgl/uploadFile.html b/src/main/resources/templates/dajs/jsgl/uploadFile.html new file mode 100644 index 0000000..c4764f9 --- /dev/null +++ b/src/main/resources/templates/dajs/jsgl/uploadFile.html @@ -0,0 +1,60 @@ + + + + + + + +
        +
        + + +
        + +
        + +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dajs/mldr/mldr.html b/src/main/resources/templates/dajs/mldr/mldr.html new file mode 100644 index 0000000..03f4795 --- /dev/null +++ b/src/main/resources/templates/dajs/mldr/mldr.html @@ -0,0 +1,295 @@ + + + + + + + + +
        +
        +
        +
        + 档案类型 +
        +
        + + + +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        + +
        +

        请点击左侧树节点!

        +
        +
        +
        +
        + + + + + + + + diff --git a/src/main/resources/templates/dajs/qwgj/qwgj.html b/src/main/resources/templates/dajs/qwgj/qwgj.html new file mode 100644 index 0000000..0c2b9c9 --- /dev/null +++ b/src/main/resources/templates/dajs/qwgj/qwgj.html @@ -0,0 +1,256 @@ + + + + + + + + +
        +
        +
        +
        + 档案类型 +
        +
        + + + +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        + + +
        +

        请点击左侧树节点!

        +
        +
        +
        +
        + + + + + + + + diff --git a/src/main/resources/templates/dajs/recycle/recycle.html b/src/main/resources/templates/dajs/recycle/recycle.html new file mode 100644 index 0000000..8ad52d5 --- /dev/null +++ b/src/main/resources/templates/dajs/recycle/recycle.html @@ -0,0 +1,439 @@ + + + + + + + + +
        +
        +
        +
        + 档案类型 +
        +
        + + + +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        + + +
        +

        请点击左侧树节点!

        +
        +
        +
        +
        + + + + + + + + + diff --git a/src/main/resources/templates/dajs/recycle/recyclewj.html b/src/main/resources/templates/dajs/recycle/recyclewj.html new file mode 100644 index 0000000..8178ac7 --- /dev/null +++ b/src/main/resources/templates/dajs/recycle/recyclewj.html @@ -0,0 +1,295 @@ + + + + + + + + + +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        +
        + + + + + + diff --git a/src/main/resources/templates/dasz/archivetype/add.html b/src/main/resources/templates/dasz/archivetype/add.html new file mode 100644 index 0000000..c8f2dad --- /dev/null +++ b/src/main/resources/templates/dasz/archivetype/add.html @@ -0,0 +1,68 @@ + + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/archivetype/archivetype.html b/src/main/resources/templates/dasz/archivetype/archivetype.html new file mode 100644 index 0000000..bfe78ae --- /dev/null +++ b/src/main/resources/templates/dasz/archivetype/archivetype.html @@ -0,0 +1,571 @@ + + + + + + + + + +
        +
        +
        +
        + 档案类型 +
        +
        + + + +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        + +
        + +
        +
        +
        + + +
        +
        +
        +
        +
        +
        + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/archivetype/edit.html b/src/main/resources/templates/dasz/archivetype/edit.html new file mode 100644 index 0000000..467fe5a --- /dev/null +++ b/src/main/resources/templates/dasz/archivetype/edit.html @@ -0,0 +1,69 @@ + + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/archivetype/formbuild.html b/src/main/resources/templates/dasz/archivetype/formbuild.html new file mode 100644 index 0000000..b9b578d --- /dev/null +++ b/src/main/resources/templates/dasz/archivetype/formbuild.html @@ -0,0 +1,313 @@ + + + + + + + + + +
        +
        +
        +
        +
        +
        表字段
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        +
        拖拽左侧表单元素到此区域
        +
        + +
        +
        +
        +
        + + +
        + + +
        +
        +
        +
        +
        + + + + + + + + diff --git a/src/main/resources/templates/dasz/basecolumn/columndocument/add.html b/src/main/resources/templates/dasz/basecolumn/columndocument/add.html new file mode 100644 index 0000000..0bd05c5 --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columndocument/add.html @@ -0,0 +1,140 @@ + + + + + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columndocument/document.html b/src/main/resources/templates/dasz/basecolumn/columndocument/document.html new file mode 100644 index 0000000..105150c --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columndocument/document.html @@ -0,0 +1,194 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columndocument/edit.html b/src/main/resources/templates/dasz/basecolumn/columndocument/edit.html new file mode 100644 index 0000000..93ebb79 --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columndocument/edit.html @@ -0,0 +1,163 @@ + + + + + + +
        +
        + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columnfile/add.html b/src/main/resources/templates/dasz/basecolumn/columnfile/add.html new file mode 100644 index 0000000..4412a93 --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columnfile/add.html @@ -0,0 +1,140 @@ + + + + + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columnfile/edit.html b/src/main/resources/templates/dasz/basecolumn/columnfile/edit.html new file mode 100644 index 0000000..4aff046 --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columnfile/edit.html @@ -0,0 +1,163 @@ + + + + + + +
        +
        + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columnfile/file.html b/src/main/resources/templates/dasz/basecolumn/columnfile/file.html new file mode 100644 index 0000000..da4de44 --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columnfile/file.html @@ -0,0 +1,194 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columnfolder/add.html b/src/main/resources/templates/dasz/basecolumn/columnfolder/add.html new file mode 100644 index 0000000..ed034f7 --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columnfolder/add.html @@ -0,0 +1,140 @@ + + + + + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columnfolder/edit.html b/src/main/resources/templates/dasz/basecolumn/columnfolder/edit.html new file mode 100644 index 0000000..c5d8bbf --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columnfolder/edit.html @@ -0,0 +1,164 @@ + + + + + + +
        +
        + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columnfolder/folder.html b/src/main/resources/templates/dasz/basecolumn/columnfolder/folder.html new file mode 100644 index 0000000..657b874 --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columnfolder/folder.html @@ -0,0 +1,190 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columninfo/add.html b/src/main/resources/templates/dasz/basecolumn/columninfo/add.html new file mode 100644 index 0000000..bce4080 --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columninfo/add.html @@ -0,0 +1,140 @@ + + + + + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columninfo/edit.html b/src/main/resources/templates/dasz/basecolumn/columninfo/edit.html new file mode 100644 index 0000000..a279125 --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columninfo/edit.html @@ -0,0 +1,163 @@ + + + + + + +
        +
        + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/basecolumn/columninfo/info.html b/src/main/resources/templates/dasz/basecolumn/columninfo/info.html new file mode 100644 index 0000000..81be1db --- /dev/null +++ b/src/main/resources/templates/dasz/basecolumn/columninfo/info.html @@ -0,0 +1,194 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/ccgl/add.html b/src/main/resources/templates/dasz/ccgl/add.html new file mode 100644 index 0000000..49a04e9 --- /dev/null +++ b/src/main/resources/templates/dasz/ccgl/add.html @@ -0,0 +1,71 @@ + + + + + + +
        +
        +
        + +
        + + +
        +
        +
        + +
        + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/ccgl/ccgl.html b/src/main/resources/templates/dasz/ccgl/ccgl.html new file mode 100644 index 0000000..c1d3220 --- /dev/null +++ b/src/main/resources/templates/dasz/ccgl/ccgl.html @@ -0,0 +1,102 @@ + + + + + + +
        +
        +
        +
        +
        + +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/ccgl/edit.html b/src/main/resources/templates/dasz/ccgl/edit.html new file mode 100644 index 0000000..15893f9 --- /dev/null +++ b/src/main/resources/templates/dasz/ccgl/edit.html @@ -0,0 +1,53 @@ + + + + + + +
        +
        + +
        + +
        + + +
        +
        +
        + +
        + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/gridcolumns/gridadd.html b/src/main/resources/templates/dasz/gridcolumns/gridadd.html new file mode 100644 index 0000000..e855a10 --- /dev/null +++ b/src/main/resources/templates/dasz/gridcolumns/gridadd.html @@ -0,0 +1,79 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/gridcolumns/gridcolumns.html b/src/main/resources/templates/dasz/gridcolumns/gridcolumns.html new file mode 100644 index 0000000..cc22e51 --- /dev/null +++ b/src/main/resources/templates/dasz/gridcolumns/gridcolumns.html @@ -0,0 +1,168 @@ + + + + + + +
        +
        + + +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/gridcolumns/gridedit.html b/src/main/resources/templates/dasz/gridcolumns/gridedit.html new file mode 100644 index 0000000..95774bc --- /dev/null +++ b/src/main/resources/templates/dasz/gridcolumns/gridedit.html @@ -0,0 +1,80 @@ + + + + + + +
        +
        + + + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + + + +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/mgc/add.html b/src/main/resources/templates/dasz/mgc/add.html new file mode 100644 index 0000000..516a30d --- /dev/null +++ b/src/main/resources/templates/dasz/mgc/add.html @@ -0,0 +1,44 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/mgc/edit.html b/src/main/resources/templates/dasz/mgc/edit.html new file mode 100644 index 0000000..47b50dd --- /dev/null +++ b/src/main/resources/templates/dasz/mgc/edit.html @@ -0,0 +1,45 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/mgc/mgc.html b/src/main/resources/templates/dasz/mgc/mgc.html new file mode 100644 index 0000000..409aaa3 --- /dev/null +++ b/src/main/resources/templates/dasz/mgc/mgc.html @@ -0,0 +1,98 @@ + + + + + + +
        +
        +
        +
        +
        + +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/physicaltable/add.html b/src/main/resources/templates/dasz/physicaltable/add.html new file mode 100644 index 0000000..c348bed --- /dev/null +++ b/src/main/resources/templates/dasz/physicaltable/add.html @@ -0,0 +1,67 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/physicaltable/edit.html b/src/main/resources/templates/dasz/physicaltable/edit.html new file mode 100644 index 0000000..e395e69 --- /dev/null +++ b/src/main/resources/templates/dasz/physicaltable/edit.html @@ -0,0 +1,68 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/physicaltable/physicaltable.html b/src/main/resources/templates/dasz/physicaltable/physicaltable.html new file mode 100644 index 0000000..1b34a72 --- /dev/null +++ b/src/main/resources/templates/dasz/physicaltable/physicaltable.html @@ -0,0 +1,134 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/physicaltablecolumn/add.html b/src/main/resources/templates/dasz/physicaltablecolumn/add.html new file mode 100644 index 0000000..b77c0fa --- /dev/null +++ b/src/main/resources/templates/dasz/physicaltablecolumn/add.html @@ -0,0 +1,182 @@ + + + + + + + +
        +
        + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/physicaltablecolumn/edit.html b/src/main/resources/templates/dasz/physicaltablecolumn/edit.html new file mode 100644 index 0000000..7290e57 --- /dev/null +++ b/src/main/resources/templates/dasz/physicaltablecolumn/edit.html @@ -0,0 +1,197 @@ + + + + + + + +
        +
        + + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/physicaltablecolumn/physicaltablecolumn.html b/src/main/resources/templates/dasz/physicaltablecolumn/physicaltablecolumn.html new file mode 100644 index 0000000..12d4f3e --- /dev/null +++ b/src/main/resources/templates/dasz/physicaltablecolumn/physicaltablecolumn.html @@ -0,0 +1,180 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/qzgl/add.html b/src/main/resources/templates/dasz/qzgl/add.html new file mode 100644 index 0000000..a1ea450 --- /dev/null +++ b/src/main/resources/templates/dasz/qzgl/add.html @@ -0,0 +1,61 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + +
        + +
        + +
        +
        + +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/qzgl/edit.html b/src/main/resources/templates/dasz/qzgl/edit.html new file mode 100644 index 0000000..7dd531e --- /dev/null +++ b/src/main/resources/templates/dasz/qzgl/edit.html @@ -0,0 +1,62 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        + +
        + +
        + +
        +
        + +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dasz/qzgl/qzgl.html b/src/main/resources/templates/dasz/qzgl/qzgl.html new file mode 100644 index 0000000..a7cd66d --- /dev/null +++ b/src/main/resources/templates/dasz/qzgl/qzgl.html @@ -0,0 +1,129 @@ + + + + + + +
        +
        +
        +
        +
        + +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/dagl/dagl.html b/src/main/resources/templates/dazl/dagl/dagl.html new file mode 100644 index 0000000..36a3d06 --- /dev/null +++ b/src/main/resources/templates/dazl/dagl/dagl.html @@ -0,0 +1,491 @@ + + + + + + + + +
        +
        +
        +
        + 档案类型 +
        +
        + + + +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        + + +
        +

        请点击左侧树节点!

        +
        +
        +
        +
        + + + + + + + + + diff --git a/src/main/resources/templates/dazl/dagl/dajn.html b/src/main/resources/templates/dazl/dagl/dajn.html new file mode 100644 index 0000000..990e8e2 --- /dev/null +++ b/src/main/resources/templates/dazl/dagl/dajn.html @@ -0,0 +1,336 @@ + + + + + + + + + +
        +
        +
        +
        + + + +
        + +
        +
        +
        +
        +
        + + + + + + diff --git a/src/main/resources/templates/dazl/dajd/add.html b/src/main/resources/templates/dazl/dajd/add.html new file mode 100644 index 0000000..259718e --- /dev/null +++ b/src/main/resources/templates/dazl/dajd/add.html @@ -0,0 +1,101 @@ + + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + + +
        +
        + + + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/dajd/dajd.html b/src/main/resources/templates/dazl/dajd/dajd.html new file mode 100644 index 0000000..ab9352e --- /dev/null +++ b/src/main/resources/templates/dazl/dajd/dajd.html @@ -0,0 +1,268 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • + +
        • + + +
        • + +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/dajd/edit.html b/src/main/resources/templates/dazl/dajd/edit.html new file mode 100644 index 0000000..ccc1dde --- /dev/null +++ b/src/main/resources/templates/dazl/dajd/edit.html @@ -0,0 +1,100 @@ + + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + + + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/ggfj/add.html b/src/main/resources/templates/dazl/ggfj/add.html new file mode 100644 index 0000000..6355636 --- /dev/null +++ b/src/main/resources/templates/dazl/ggfj/add.html @@ -0,0 +1,82 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/ggfj/edit.html b/src/main/resources/templates/dazl/ggfj/edit.html new file mode 100644 index 0000000..69c7df7 --- /dev/null +++ b/src/main/resources/templates/dazl/ggfj/edit.html @@ -0,0 +1,83 @@ + + + + + + +
        +
        + +
        + +
        + + 代码生成请选择字典属性 +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/ggfj/ggfj.html b/src/main/resources/templates/dazl/ggfj/ggfj.html new file mode 100644 index 0000000..569b4a2 --- /dev/null +++ b/src/main/resources/templates/dazl/ggfj/ggfj.html @@ -0,0 +1,153 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/jdmx/add.html b/src/main/resources/templates/dazl/jdmx/add.html new file mode 100644 index 0000000..d193d97 --- /dev/null +++ b/src/main/resources/templates/dazl/jdmx/add.html @@ -0,0 +1,141 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/jdmx/edit.html b/src/main/resources/templates/dazl/jdmx/edit.html new file mode 100644 index 0000000..f109b20 --- /dev/null +++ b/src/main/resources/templates/dazl/jdmx/edit.html @@ -0,0 +1,136 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/jdmx/jdmx.html b/src/main/resources/templates/dazl/jdmx/jdmx.html new file mode 100644 index 0000000..f705f7e --- /dev/null +++ b/src/main/resources/templates/dazl/jdmx/jdmx.html @@ -0,0 +1,441 @@ + + + + + + + +
        +
        +
        +
        +
        +
          + + + + + +
        • + + +
        • + +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • + +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/jdmx/jdsearch.html b/src/main/resources/templates/dazl/jdmx/jdsearch.html new file mode 100644 index 0000000..71c853e --- /dev/null +++ b/src/main/resources/templates/dazl/jdmx/jdsearch.html @@ -0,0 +1,260 @@ + + + + + + + + + + + +
        +
        +
        +
        +
        + +  搜索 + + + +
        +
        + + +
        +
        +
        +
        +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/wsnj/add.html b/src/main/resources/templates/dazl/wsnj/add.html new file mode 100644 index 0000000..db587ea --- /dev/null +++ b/src/main/resources/templates/dazl/wsnj/add.html @@ -0,0 +1,83 @@ + + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + + + + +
        + +
        + +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/wsnj/edit.html b/src/main/resources/templates/dazl/wsnj/edit.html new file mode 100644 index 0000000..eef835b --- /dev/null +++ b/src/main/resources/templates/dazl/wsnj/edit.html @@ -0,0 +1,82 @@ + + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        + + + +
        + +
        + +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/dazl/wsnj/wsnj.html b/src/main/resources/templates/dazl/wsnj/wsnj.html new file mode 100644 index 0000000..304df04 --- /dev/null +++ b/src/main/resources/templates/dazl/wsnj/wsnj.html @@ -0,0 +1,137 @@ + + + + + + +
        +
        +
        +
        +
        + +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/form/autocomplete.html b/src/main/resources/templates/demo/form/autocomplete.html new file mode 100644 index 0000000..a43643d --- /dev/null +++ b/src/main/resources/templates/demo/form/autocomplete.html @@ -0,0 +1,323 @@ + + + + + + +
        +
        +
        +
        +
        +
        搜索自动补全https://github.com/lzwme/bootstrap-suggest-plugin
        +
        +
        +

        展示下拉菜单按钮。

        +
        +
        +
        + +
        + + +
        +
        +
        +
        + +

        不展示下拉菜单按钮。

        +
        +
        +
        + +
        + + +
        +
        +
        +
        + +

        前端json中获取数据

        +
        +
        +
        + +
        + + +
        + +
        +
        +
        + +

        百度搜索

        +

        支持逗号分隔多关键字

        +
        +
        +
        + +
        + + +
        + +
        +
        +
        + +

        淘宝搜索

        +

        支持逗号分隔多关键字

        +
        +
        +
        + +
        + + +
        + +
        +
        +
        +
        + +
        +
        +
        + +
        +
        +
        +
        搜索自动补全https://github.com/bassjobsen/Bootstrap-3-Typeahead
        +
        +
        +

        通过数据属性的基本示例。

        +
        +
        + +
        +
        +
        + +

        通过javascript的基本示例。

        +
        +
        + +
        +
        + +
        +

        通过javascript的复杂示例。

        +
        +
        + +
        +
        + +
        +

        后台url中获取简单数据

        +
        +
        + +
        +
        + +
        + +
        +
        +
        +
        +
        + + + + + + diff --git a/src/main/resources/templates/demo/form/basic.html b/src/main/resources/templates/demo/form/basic.html new file mode 100644 index 0000000..38fe7aa --- /dev/null +++ b/src/main/resources/templates/demo/form/basic.html @@ -0,0 +1,593 @@ + + + + + + +
        +
        +
        +
        +
        +
        基本表单 简单登录表单示例
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        +

        登录

        +

        欢迎登录本站(⊙o⊙)

        +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        +
        +
        +

        还不是会员?

        +

        您可以注册一个新账户

        +

        + +

        +
        +
        +
        +
        +
        +
        +
        +
        +
        横向表单
        +
        + + + + + + + + + + +
        +
        +
        +
        +

        欢迎登录本站(⊙o⊙)

        +
        + + +
        + 请输入您注册时所填的E-mail +
        +
        +
        + + +
        + +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        内联表单
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        + + +
        +
        + + +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        +
        弹出表单 弹出框登录示例
        +
        + + + + + + + + + + +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        所有表单元素 包括自定义样式的复选和单选按钮
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        + + +
        + +
        +
        +
        +
        + +
        + 帮助文本,可能会超过一行,以块级元素显示 +
        +
        +
        +
        + + +
        + +
        +
        +
        +
        + + +
        + +
        +
        +
        +
        + + +
        + +
        +
        +
        +
        + + +
        +

        archive.vip

        +
        +
        +
        +
        + + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        +
        + + +
        + + + +
        +
        +
        +
        + + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        +
        + + +
        + + + +
        +
        +
        +
        + + +
        + + +
        + +
        +
        +
        +
        +
        + + +
        + +
        +
        +
        +
        + + +
        + +
        +
        +
        +
        + + +
        + +
        +
        +
        +
        + + +
        + + + +
        +
        +
        +
        + + +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        +
        +
        + + +
        +
        @ + +
        +
        + .00 +
        +
        ¥ + .00 +
        +
        + +
        +
        + +
        +
        +
        +
        +
        + + +
        +
        + + +
        +
        + +
        +
        +
        +
        +
        + + +
        +
        +
        + + +
        + +
        +
        + + +
        + + +
        +
        +
        +
        +
        +
        + + +
        +
        +
        + + + +
        + +
        +
        + + +
        + + + +
        +
        +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/demo/form/button.html b/src/main/resources/templates/demo/form/button.html new file mode 100644 index 0000000..f45bd6b --- /dev/null +++ b/src/main/resources/templates/demo/form/button.html @@ -0,0 +1,620 @@ + + + + + + +
        +
        +
        +
        +
        按钮颜色
        +
        + + + + + + + + + + +
        +
        +
        +

        + 可使用class来快速改变按钮的颜色,如.btn-primary +

        + +

        + 普通按钮 +

        +

        + + + + + + + + +

        +
        +
        +
        +
        +
        +
        +
        按钮大小
        +
        + + + + + + + + + + +
        +
        +
        +

        + 可以通过添加class的值为.btn-lg, .btn-sm, or .btn-xs来修改按钮的大小 +

        +

        按钮尺寸

        +

        + + +
        + + +
        + + +
        + + +

        +
        +
        +
        +
        +
        +
        +
        线性按钮
        +
        + + + + + + + + + + +
        +
        +
        +

        + 要使用线性按钮,可添加class.btn-block.btn-outline +

        + +

        线性按钮

        +

        + + + + + + + +

        +

        块级按钮

        +

        + +

        +
        +
        +
        +
        +
        +
        +
        3D按钮
        +
        + + + + + + + + + + +
        +
        +
        +

        + 可以通过添加.dimclass来使用3D按钮. +

        +

        3D按钮

        + + + + + + + + + + + + + + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        下拉按钮
        +
        + + + + + + + + + + +
        +
        +
        +

        + 下拉按钮可使用任何颜色任何大小 +

        + +

        下拉按钮

        +
        + + +
        +
        + + +
        +
        + + +
        + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        按钮组
        +
        + + + + + + + + + + +
        +
        +
        + +

        按钮组

        +
        + + + +
        +
        +
        +
        + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        图标按钮
        +
        + + + + + + + + + + +
        +
        +
        +

        + 任何按钮都可以在左侧或右侧添加图标 +

        + +

        图标按钮

        +

        + + + + + + + + 分享到微信 + + + 使用QQ账号登录 + + + + + + + + + + + + + + + + + + + + + + + + 收藏 + +

        + +

        按钮切换

        + + +
        + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        圆形图标按钮
        +
        + + + + + + + + + + +
        +
        +
        +

        + 要使用圆形图标按钮,可以通过添加class为.btn-circle实现 +

        + +

        圆形按钮

        +
        + + + + + + + +
        +
        + + + + + + + + +
        +
        +
        +
        +
        +
        +
        圆角按钮
        +
        + + + + + + + + + + +
        +
        +
        +

        + 可以通过添加class的值微.btn-rounded来实现圆角按钮 +

        + +

        按钮组

        +

        + 默认 + 主要 + 成果 + 信息 + 警告 + 危险 + 危险 +
        +
        + 圆角块级带图标按钮 +

        +
        +
        +
        + +
        +
        +
        + + + diff --git a/src/main/resources/templates/demo/form/cards.html b/src/main/resources/templates/demo/form/cards.html new file mode 100644 index 0000000..35a7f68 --- /dev/null +++ b/src/main/resources/templates/demo/form/cards.html @@ -0,0 +1,319 @@ + + + + + + +
        +
        +
        +
        +
        + NEW +
        IT-01 - 设计部
        +
        +
        +

        部门简介

        +

        + 平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。 +

        +
        + 当前项目进度: +
        48%
        +
        +
        +
        +
        +
        +
        +
        项目
        + 12 +
        +
        +
        周期
        + 4个月 +
        +
        +
        预算
        + ¥200,913 +
        +
        + +
        +
        +
        +
        +
        IT-04 - 市场部
        +
        +
        +

        部门简介

        +

        + 平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。 +

        +
        + 当前项目进度: +
        32%
        +
        +
        +
        +
        +
        +
        +
        项目
        + 24 +
        +
        +
        周期
        + 3个月 +
        +
        +
        预算
        + ¥190,325 +
        +
        + +
        +
        +
        +
        +
        IT-07 - 财务部
        +
        +
        +

        部门简介

        +

        + 平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。 +

        +
        + 当前项目进度: +
        73%
        +
        +
        +
        +
        +
        +
        +
        项目
        + 11 +
        +
        +
        周期
        + 6个月 +
        +
        +
        预算
        + ¥560,105 +
        +
        + +
        +
        +
        +
        +
        +
        +
        IT-02 - 开发部
        +
        +
        +

        部门简介

        +

        + 平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。 +

        +
        + 当前项目进度: +
        61%
        +
        +
        +
        +
        +
        +
        +
        项目
        + 43 +
        +
        +
        周期
        + 1个月 +
        +
        +
        预算
        + ¥705,913 +
        +
        + +
        +
        +
        +
        + 截止 +
        IT-05 - 管理层
        +
        +
        +

        部门简介

        +

        + 平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。 +

        +
        + 当前项目进度: +
        14%
        +
        +
        +
        +
        +
        +
        +
        项目
        + 8 +
        +
        +
        周期
        + 7个月 +
        +
        +
        预算
        + ¥40,200 +
        +
        + +
        +
        +
        +
        +
        IT-08 - 销售部
        +
        +
        +

        部门简介

        +

        + 平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。 +

        +
        + 当前项目进度: +
        25%
        +
        +
        +
        +
        +
        +
        +
        项目
        + 25 +
        +
        +
        周期
        + 4个月 +
        +
        +
        预算
        + ¥140,105 +
        +
        + +
        +
        +
        +
        +
        +
        + +
        IT-02 - 销售部
        +
        +
        +

        部门简介

        +

        + 平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。 +

        +
        + 当前项目进度: +
        82%
        +
        +
        +
        +
        +
        +
        +
        项目
        + 68 +
        +
        +
        周期
        + 2个月 +
        +
        +
        预算
        + ¥701,400 +
        +
        + +
        +
        +
        +
        +
        IT-06 - 销售部
        +
        +
        +

        部门简介

        +

        + 平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。 +

        +
        + 当前项目进度: +
        26%
        +
        +
        +
        +
        +
        +
        +
        项目
        + 16 +
        +
        +
        周期
        + 8个月 +
        +
        +
        预算
        + ¥160,100 +
        +
        + +
        +
        +
        +
        +
        IT-09 - 销售部
        +
        +
        +

        部门简介

        +

        + 平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。 +

        +
        + 当前项目进度: +
        18%
        +
        +
        +
        +
        +
        +
        +
        项目
        + 53 +
        +
        +
        周期
        + 9个月 +
        +
        +
        预算
        + ¥60,140 +
        +
        + +
        +
        +
        +
        +
        + + + diff --git a/src/main/resources/templates/demo/form/cxselect.html b/src/main/resources/templates/demo/form/cxselect.html new file mode 100644 index 0000000..3db45a9 --- /dev/null +++ b/src/main/resources/templates/demo/form/cxselect.html @@ -0,0 +1,161 @@ + + + + + + +
        +
        +
        +
        +
        +
        多级联动下拉https://github.com/ciaoca/cxSelect
        +
        +
        +

        简单联动示例。

        +
        +
        + +
        +
        + +
        +
        +
        + +

        国内省市区联动。

        +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + +

        自定义选项。

        +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/demo/form/datetime.html b/src/main/resources/templates/demo/form/datetime.html new file mode 100644 index 0000000..03e0421 --- /dev/null +++ b/src/main/resources/templates/demo/form/datetime.html @@ -0,0 +1,236 @@ + + + + + + + +
        +
        +
        +
        +
        +
        日期选择器 https://github.com/smalot/bootstrap-datetimepicker
        +
        +
        +
        + +
        + + +
        +
        + +
        + +
        + + +
        +
        + +
        + +
        + + +
        +
        + +
        + +
        + + + +
        +
        + +
        + +
        + + + +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        日期选择器 https://github.com/sentsin/laydate
        +
        +
        +
        + +
        + + +
        +
        + +
        + +
        + + +
        +
        + +
        + +
        + + +
        +
        + +
        + +
        + + +
        +
        + +
        + +
        + + + +
        +
        +
        + +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/demo/form/duallistbox.html b/src/main/resources/templates/demo/form/duallistbox.html new file mode 100644 index 0000000..f1b08f5 --- /dev/null +++ b/src/main/resources/templates/demo/form/duallistbox.html @@ -0,0 +1,65 @@ + + + + + + + +
        +
        +
        +
        +
        +
        双重列表框 https://github.com/istvan-ujjmeszaros/bootstrap-duallistbox
        +
        +
        +

        + Bootstrap Dual Listbox是针对Twitter Bootstrap进行了优化的响应式双列表框。它适用于所有现代浏览器和触摸设备。 +

        + +
        + +
        +
        + +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/demo/form/grid.html b/src/main/resources/templates/demo/form/grid.html new file mode 100644 index 0000000..2274d30 --- /dev/null +++ b/src/main/resources/templates/demo/form/grid.html @@ -0,0 +1,432 @@ + + + + + + +
        +
        +
        +
        +
        +
        栅格设置
        +
        + + + + + + + + + + +
        +
        +
        + +

        通过下表可以详细查看 Bootstrap 的栅格系统是如何在多种屏幕设备上工作的。

        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + 超小屏幕 + 手机 (<768px) + + 小屏幕 + 平板 (≥768px) + + 中等屏幕 + 桌面显示器 (≥992px) + + 大屏幕 + 大桌面显示器 (≥1200px) +
        栅格系统行为总是水平排列开始是堆叠在一起的,当大于这些阈值时将变为水平排列C
        .container 最大宽度None (自动)750px970px1170px
        类前缀.col-xs- + .col-sm- + .col-md- + .col-lg- +
        列(column)数12
        最大列(column)宽自动~62px~81px~97px
        槽(gutter)宽30px (每列左右均有 15px)
        可嵌套
        偏移(Offsets)
        列排序
        +
        + + +
        +
        +
        + +
        +
        +
        +
        +
        +
        从堆叠到水平排列
        +
        + + + + + + + + + + +
        +
        +
        + +

        使用单一的一组 .col-md-* 栅格类,就可以创建一个基本的栅格系统,在手机和平板设备上一开始是堆叠在一起的(超小屏幕到小屏幕这一范围),在桌面(中等)屏幕设备上变为水平排列。所有“列(column)必须放在 ” .row 内。

        +
        +
        .col-md-1
        +
        .col-md-1
        +
        .col-md-1
        +
        .col-md-1
        +
        .col-md-1
        +
        .col-md-1
        +
        .col-md-1
        +
        .col-md-1
        +
        .col-md-1
        +
        .col-md-1
        +
        .col-md-1
        +
        .col-md-1
        +
        +
        +
        .col-md-8
        +
        .col-md-4
        +
        +
        +
        .col-md-4
        +
        .col-md-4
        +
        .col-md-4
        +
        +
        +
        .col-md-6
        +
        .col-md-6
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        移动设备和桌面屏幕
        +
        + + + + + + + + + + +
        +
        +
        + +

        是否不希望在小屏幕设备上所有列都堆叠在一起?那就使用针对超小屏幕和中等屏幕设备所定义的类吧,即 .col-xs-*.col-md-*。请看下面的实例,研究一下这些是如何工作的。

        +
        +
        .col-xs-12 .col-md-8
        +
        .col-xs-6 .col-md-4
        +
        +
        +
        .col-xs-6 .col-md-4
        +
        .col-xs-6 .col-md-4
        +
        .col-xs-6 .col-md-4
        +
        +
        +
        .col-xs-6
        +
        .col-xs-6
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        手机、平板、桌面
        +
        + + + + + + + + + + +
        +
        +
        + +

        在上面案例的基础上,通过使用针对平板设备的 .col-sm-* 类,我们来创建更加动态和强大的布局吧。

        +
        +
        .col-xs-12 .col-sm-6 .col-md-8
        +
        .col-xs-6 .col-md-4
        +
        +
        +
        .col-xs-6 .col-sm-4
        +
        .col-xs-6 .col-sm-4
        + +
        +
        .col-xs-6 .col-sm-4
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        多余的列(column)将另起一行排列
        + +
        + + + + + + + + + + +
        +
        +
        +

        在等宽的4网格中,网格不等高会碰到问题,为了解决这个问题,可使用.clearfix响应实用工具类 +

        +
        +
        + .col-xs-6 .col-sm-3 +
        调整窗口大小或者在手机上查看本示例 +
        +
        .col-xs-6 .col-sm-3
        + + +
        + +
        .col-xs-6 .col-sm-3
        +
        .col-xs-6 .col-sm-3
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        列偏移
        + +
        + + + + + + + + + + +
        +
        +
        + +

        使用 .col-md-offset-* 类可以将列向右侧偏移。这些类实际是通过使用 * 选择器为当前元素增加了左侧的边距(margin)。例如,.col-md-offset-4 类将 .col-md-4 元素向右侧偏移了4个列(column)的宽度。

        +
        +
        .col-md-4
        +
        .col-md-4 .col-md-offset-4
        +
        +
        +
        .col-md-3 .col-md-offset-3
        +
        .col-md-3 .col-md-offset-3
        +
        +
        +
        .col-md-6 .col-md-offset-3
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        嵌套列
        + +
        + + + + + + + + + + +
        +
        +
        +

        为了使用内置的栅格系统将内容再次嵌套,可以通过添加一个新的 .row 元素和一系列 .col-sm-* 元素到已经存在的 .col-sm-* 元素内。被嵌套的行(row)所包含的列(column)的个数不能超过12(其实,没有要求你必须占满12列)。

        +
        +
        + 第一级: .col-md-9 +
        +
        + 第二级: .col-md-6 +
        +
        + 第二级: .col-md-6 +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        列排序
        +
        + + + + + + + + + + +
        +
        +
        +

        通过使用 .col-md-push-*.col-md-pull-* 类就可以很容易的改变列(column)的顺序。

        +
        +
        .col-md-9 .col-md-push-3
        +
        .col-md-3 .col-md-pull-9
        +
        +
        +
        + +
        +
        +
        + + + diff --git a/src/main/resources/templates/demo/form/invoice.html b/src/main/resources/templates/demo/form/invoice.html new file mode 100644 index 0000000..42b4e80 --- /dev/null +++ b/src/main/resources/templates/demo/form/invoice.html @@ -0,0 +1,122 @@ + + + + + + +
        + +
        +
        +
        +
        +
        +
        + 北京百度在线网络技术有限公司
        + 北京市海淀区上地十街10号
        + 总机: (+86 10) 5992 8888 +
        +
        + +
        +

        单据编号:

        +

        H+-000567F7-00

        +
        + 阿里巴巴集团
        + 中国杭州市华星路99号东部软件园创业大厦6层(310099)
        + 总机: (86) 571-8502-2088 +
        +

        + 日期: 2014-11-11 +

        +
        +
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        清单数量单价税率总价
        +
        尚都比拉2013冬装新款女装 韩版修身呢子大衣 秋冬气质羊毛呢外套 +
        +
        1¥26.00¥1.20¥31,98
        +
        11*11夏娜 新款斗篷毛呢外套 女秋冬呢子大衣 韩版大码宽松呢大衣 +
        + 双十一特价 + +
        2¥80.00¥1.20¥196.80
        +
        2013秋装 新款女装韩版学生秋冬加厚加绒保暖开衫卫衣 百搭女外套 +
        +
        3¥420.00¥1.20¥1033.20
        +
        + + + + + + + + + + + + + + + + + +
        总价: + ¥1026.00
        税: + ¥235.98
        总计 + ¥1261.98
        + +
        + +
        + +
        注意: 请在30日内完成付款,否则订单会自动取消。 +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/demo/form/jasny.html b/src/main/resources/templates/demo/form/jasny.html new file mode 100644 index 0000000..5e6a5bb --- /dev/null +++ b/src/main/resources/templates/demo/form/jasny.html @@ -0,0 +1,118 @@ + + + + + + + +
        +
        +
        +
        +
        +
        文件上传控件 https://github.com/jasny/bootstrap
        +
        +
        +
        + + +
        +
        + 选择文件更改 + 清除 +
        +
        + +
        + +
        +
        + 选择文件更改 + + × +
        +
        + +
        + +
        +
        +
        +
        + 选择图片更改 + 清除 +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        +
        + 选择图片更改 + 清除 +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        固定格式文本 https://github.com/jasny/bootstrap
        +
        +
        +
        + + + 158-8888-88888 +
        + +
        + + + 0730-8888888 +
        + +
        + + + yyyy-mm-dd +
        + +
        + + + 192.168.100.200 +
        + +
        + + + 99-9999999 +
        +
        + +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/demo/form/labels_tips.html b/src/main/resources/templates/demo/form/labels_tips.html new file mode 100644 index 0000000..91f0c0d --- /dev/null +++ b/src/main/resources/templates/demo/form/labels_tips.html @@ -0,0 +1,237 @@ + + + + + + +
        +
        +
        +
        +
        +
        徽章 (Badges)
        +
        + + + + + + + + + + +
        +
        +
        +

        + 要添加徽章,只需要在元素上添加.badge即可,改变徽章的颜色可使用如下class,如.badge-primary。 +

        +

        +

        +

        badge-primary +

        +

        badge-info +

        +

        badge-success +

        +

        badge-warning +

        +

        badge-danger +

        +
        +
        +
        + +
        +
        +
        +
        标签 (Labels)
        +
        + + + + + + + + + + +
        +
        +
        +

        + 要添加徽章,只需要在元素上添加class.label即可,如果需要修改颜色,添加如下class,如.label-primary +

        +

        +

        +

        label-primary +

        +

        label-info +

        +

        label-success +

        +

        label-warning +

        +

        label-danger +

        +
        +
        +
        +
        + +
        +
        +
        +
        +
        通知样式
        +
        + + + + + + + + + + +
        +
        +
        +
        + archive是一个很棒的后台UI框架 了解更多. +
        +
        + archive是一个很棒的后台UI框架 了解更多. +
        +
        + archive是一个很棒的后台UI框架 了解更多. +
        +
        + archive是一个很棒的后台UI框架 了解更多. +
        +
        +
        +
        +
        +
        +
        +
        带关闭按钮的通知样式
        +
        + + + + + + + + + + +
        +
        +
        +
        + + archive是一个很棒的后台UI框架 了解更多. +
        +
        + + archive是一个很棒的后台UI框架 了解更多. +
        +
        + + archive是一个很棒的后台UI框架 了解更多. +
        +
        + + archive是一个很棒的后台UI框架 了解更多. +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        工具提示
        +
        + + + + + + + + + + +
        +
        +
        +

        工具提示示例 深色背景

        +
        + + + + +
        +
        +

        工具提示 - 单击提示

        +
        + + + + +
        +
        +
        +
        + +
        + +
        + + + + diff --git a/src/main/resources/templates/demo/form/localrefresh.html b/src/main/resources/templates/demo/form/localrefresh.html new file mode 100644 index 0000000..cc2ad09 --- /dev/null +++ b/src/main/resources/templates/demo/form/localrefresh.html @@ -0,0 +1,61 @@ + + + + + + +
        +
        +
        +
        +
        +

        任务列表

        +

        + + 点击刷新按钮刷新数据到列表中 +

        + +
        + + + + +
        +
        + +
        +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/demo/form/select.html b/src/main/resources/templates/demo/form/select.html new file mode 100644 index 0000000..7347c5c --- /dev/null +++ b/src/main/resources/templates/demo/form/select.html @@ -0,0 +1,148 @@ + + + + + + + + +
        +
        +
        +
        +
        +
        +
        下拉框 https://github.com/select2/select2
        +
        +
        +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        +
        + +
        +
        +
        +
        +
        +
        +
        下拉框 https://github.com/snapappointments/bootstrap-select
        +
        +
        +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        +
        + +
        +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/demo/form/sortable.html b/src/main/resources/templates/demo/form/sortable.html new file mode 100644 index 0000000..478be4c --- /dev/null +++ b/src/main/resources/templates/demo/form/sortable.html @@ -0,0 +1,198 @@ + + + + + + +
        +
        +
        +
        +
        +

        任务列表

        +

        在列表之间拖动任务面板

        + +
        + + + + +
        + +
          +
        • + 加强过程管理,及时统计教育经费使用情况,做到底码清楚, +
          + 标签 + 2018.09.01 +
          +
        • +
        • + 支持财会人员的继续培训工作。 +
          + 标记 + 2018.05.12 +
          +
        • +
        • + 协同教导处搞好助学金、减免教科书费的工作。 +
          + 标记 + 2018.09.10 +
          +
        • +
        • + 要求会计、出纳人员严格执行财务制度,遵守岗位职责,按时上报各种资料。 +
          + 确定 + 2018.06.10 +
          +
        • +
        • + 做好职工公费医疗工作,按时发放门诊费。 +
          + 标签 + 2018.09.09 +
          +
        • +
        • + 有计划地把课本复习三至五遍。 +
          + 确定 + 2018.08.04 +
          +
        • +
        • + 看一本高质量的高中语法书 +
          + 标记 + 2018.05.12 +
          +
        • +
        • + 选择一份较好的英语报纸,通过阅读提高英语学习效果。 +
          + 标记 + 2018.09.10 +
          +
        • +
        +
        +
        +
        +
        +
        +
        +

        进行中

        +

        在列表之间拖动任务面板

        +
          +
        • + 全面、较深入地掌握我们“产品”的功能、特色和优势并做到应用自如。 +
          + 标签 + 2018.09.01 +
          +
        • +
        • + 根据自己以前所了解的和从其他途径搜索到的信息,录入客户资料150家。 +
          + 标记 + 2018.05.12 +
          +
        • +
        • + 锁定有意向客户20家。 +
          + 标记 + 2018.09.10 +
          +
        • +
        • + 力争完成销售指标。 +
          + 标签 + 2018.09.09 +
          +
        • +
        • + 在总结和摸索中前进。 +
          + 确定 + 2018.08.04 +
          +
        • +
        • + 不断学习行业知识、产品知识,为客户带来实用介绍内容 +
          + 标记 + 2018.05.12 +
          +
        • +
        • + 先友后单:与客户发展良好友谊,转换销售员角色,处处为客户着想 +
          + 标记 + 2018.11.04 +
          +
        • +
        +
        +
        +
        +
        +
        +
        +

        已完成

        +

        在列表之间拖动任务面板

        +
          +
        • + 制定工作日程表 +
          + 标记 + 2018.09.10 +
          +
        • +
        • + 每天坚持打40个有效电话,挖掘潜在客户 +
          + 标签 + 2018.09.09 +
          +
        • +
        • + 拜访客户之前要对该客户做全面的了解(客户的潜在需求、职位、权限以及个人性格和爱好) +
          + 标签 + 2018.09.09 +
          +
        • +
        • + 提高自己电话营销技巧,灵活专业地与客户进行电话交流 +
          + 确定 + 2018.08.04 +
          +
        • +
        • + 通过电话销售过程中了解各盛市的设备仪器使用、采购情况及相关重要追踪人 +
          + 标记 + 2018.05.12 +
          +
        • + +
        +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/demo/form/summernote.html b/src/main/resources/templates/demo/form/summernote.html new file mode 100644 index 0000000..2bc6dec --- /dev/null +++ b/src/main/resources/templates/demo/form/summernote.html @@ -0,0 +1,93 @@ + + + + + + + +
        +
        +
        +
        +
        +
        Summernote 富文本编辑器
        +
        +
        +
        +

        若依后台管理系统

        +

        archive是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如网站管理后台网站会员中心CMSCRMOA等等,当然,您也可以对她进行深度定制,以做出更强系统。

        +

        + 当前版本:v4.6.0 +

        +

        + 免费开源 +

        +
        +
        +
        +
        +
        +
        +
        +
        +
        +

        Summernote

        +

        + Summernote是一个简单的基于Bootstrap的WYSIWYG富文本编辑器 +

        +
        官方文档请参考: + https://github.com/summernote/summernote +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        编辑/保存为html代码示例
        + + +
        +
        + +
        +

        你好,若依

        +

        H+是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如网站管理后台网站会员中心CMSCRMOA等等,当然,您也可以对她进行深度定制,以做出更强系统。

        +

        + 当前版本:v4.6.0 +

        +

        + 开源免费 +

        +
        + +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/demo/form/tabs_panels.html b/src/main/resources/templates/demo/form/tabs_panels.html new file mode 100644 index 0000000..88f00d7 --- /dev/null +++ b/src/main/resources/templates/demo/form/tabs_panels.html @@ -0,0 +1,353 @@ + + + + + + +
        +
        +
        +
        +
        +
        基本面板 这是一个自定义面板
        +
        + + + + + + + + + + +
        +
        +
        +

        + Bootstrap
        +

        +

        + 简洁、直观、强悍的前端开发框架,让web开发更迅速、简单。

        +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        + HTML5 文档类型 +

        Bootstrap 使用到的某些 HTML 元素和 CSS 属性需要将页面设置为 HTML5 文档类型。在你项目中的每个页面都要参照下面的格式进行设置。

        +
        +
        +
        +
        + 移动设备优先 +

        在 Bootstrap 2 中,我们对框架中的某些关键部分增加了对移动设备友好的样式。而在 Bootstrap 3 中,我们重写了整个框架,使其一开始就是对移动设备友好的。这次不是简单的增加一些可选的针对移动设备的样式,而是直接融合进了框架的内核中。也就是说,Bootstrap 是移动设备优先的。针对移动设备的样式融合进了框架的每个角落,而不是增加一个额外的文件。

        +
        +
        +
        + + +
        +
        + +
        +
        + +
        +
        +

        图标选项卡

        +
        +
        + + +
        +
        + +
        +
        +
        + 排版与链接 + +

        Bootstrap 排版、链接样式设置了基本的全局样式。分别是: 为 body 元素设置 background-color: #fff; 使用 @font-family-base、@font-size-base 和 @line-height-base a变量作为排版的基本参数 为所有链接设置了基本颜色 @link-color ,并且当链接处于 :hover 状态时才添加下划线 这些样式都能在 scaffolding.less 文件中找到对应的源码。

        +
        + +
        + Normalize.css + +

        为了增强跨浏览器表现的一致性,我们使用了 Normalize.css,这是由 Nicolas Gallagher 和 Jonathan Neal 维护的一个CSS 重置样式库。

        +
        +
        + 布局容器 + +

        Bootstrap 需要为页面内容和栅格系统包裹一个 .container 容器。我们提供了两个作此用处的类。注意,由于 padding 等属性的原因,这两种 容器类不能互相嵌套。

        +
        +
        + 栅格系统 + +

        Bootstrap 提供了一套响应式、移动设备优先的流式栅格系统,随着屏幕或视口(viewport)尺寸的增加,系统会自动分为最多12列。它包含了易于使用的预定义类,还有强大的mixin 用于生成更具语义的布局。

        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + 排版与链接 + +

        Bootstrap 排版、链接样式设置了基本的全局样式。分别是: 为 body 元素设置 background-color: #fff; 使用 @font-family-base、@font-size-base 和 @line-height-base a变量作为排版的基本参数 为所有链接设置了基本颜色 @link-color ,并且当链接处于 :hover 状态时才添加下划线 这些样式都能在 scaffolding.less 文件中找到对应的源码。

        +
        +
        +
        +
        + 栅格系统 + +

        Bootstrap 提供了一套响应式、移动设备优先的流式栅格系统,随着屏幕或视口(viewport)尺寸的增加,系统会自动分为最多12列。它包含了易于使用的预定义类,还有强大的mixin 用于生成更具语义的布局。

        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        +
        + 排版与链接 + +

        Bootstrap 排版、链接样式设置了基本的全局样式。分别是: 为 body 元素设置 background-color: #fff; 使用 @font-family-base、@font-size-base 和 @line-height-base a变量作为排版的基本参数 为所有链接设置了基本颜色 @link-color ,并且当链接处于 :hover 状态时才添加下划线 这些样式都能在 scaffolding.less 文件中找到对应的源码。

        +
        +
        +
        +
        + 栅格系统 + +

        Bootstrap 提供了一套响应式、移动设备优先的流式栅格系统,随着屏幕或视口(viewport)尺寸的增加,系统会自动分为最多12列。它包含了易于使用的预定义类,还有强大的mixin 用于生成更具语义的布局。

        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        +
        Bootstrap面板 自定义背景
        +
        +
        + +
        +
        +
        +
        + 默认面板 +
        +
        +

        通过 .panel-heading 可以很简单地为面板加入一个标题容器。你也可以通过添加设置了 .panel-title 类的标签,添加一个预定义样式的标题。 为了给链接设置合适的颜色,务必将链接放到带有 .panel-title 类的标题标签内。

        +
        + +
        +
        +
        +
        +
        + 主要 +
        +
        +

        通过 .panel-heading 可以很简单地为面板加入一个标题容器。你也可以通过添加设置了 .panel-title 类的标签,添加一个预定义样式的标题。 为了给链接设置合适的颜色,务必将链接放到带有 .panel-title 类的标题标签内。

        +
        +
        +
        +
        +
        +
        + 成功 +
        +
        +

        通过 .panel-heading 可以很简单地为面板加入一个标题容器。你也可以通过添加设置了 .panel-title 类的标签,添加一个预定义样式的标题。 为了给链接设置合适的颜色,务必将链接放到带有 .panel-title 类的标题标签内。

        +
        +
        +
        +
        +
        +
        +
        +
        + 信息 +
        +
        +

        通过 .panel-heading 可以很简单地为面板加入一个标题容器。你也可以通过添加设置了 .panel-title 类的标签,添加一个预定义样式的标题。 为了给链接设置合适的颜色,务必将链接放到带有 .panel-title 类的标题标签内。

        +
        + +
        +
        +
        +
        +
        + 警告 +
        +
        +

        通过 .panel-heading 可以很简单地为面板加入一个标题容器。你也可以通过添加设置了 .panel-title 类的标签,添加一个预定义样式的标题。 为了给链接设置合适的颜色,务必将链接放到带有 .panel-title 类的标题标签内。

        +
        +
        +
        +
        +
        +
        + 危险 +
        +
        +

        通过 .panel-heading 可以很简单地为面板加入一个标题容器。你也可以通过添加设置了 .panel-title 类的标签,添加一个预定义样式的标题。 为了给链接设置合适的颜色,务必将链接放到带有 .panel-title 类的标题标签内。

        +
        + +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        +
        折叠面板
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + 标题 #1 +
        +
        +
        +
        + Bootstrap相关优质项目推荐 这些项目或者是对Bootstrap进行了有益的补充,或者是基于Bootstrap开发的 +
        +
        +
        +
        +
        +

        + 标题 #2 +

        +
        +
        +
        + Bootstrap相关优质项目推荐 这些项目或者是对Bootstrap进行了有益的补充,或者是基于Bootstrap开发的 +
        +
        +
        +
        +
        +

        + 标题 #3 +

        +
        +
        +
        + Bootstrap相关优质项目推荐 这些项目或者是对Bootstrap进行了有益的补充,或者是基于Bootstrap开发的 +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +

        超大屏幕

        +

        Bootstrap 支持的另一个特性,超大屏幕(Jumbotron)。顾名思义该组件可以增加标题的大小,并为登录页面内容添加更多的外边距(margin)。使用超大屏幕(Jumbotron)的步骤如下:

        +
        +
          +
        1. 创建一个带有 class .jumbotron. 的容器
        2. +
        3. 除了更大的 <h1>,字体粗细 font-weight 被减为 200px。
        4. +
        +
        + +

        了解更多 +

        +
        +
        +
        +
        + + + diff --git a/src/main/resources/templates/demo/form/timeline.html b/src/main/resources/templates/demo/form/timeline.html new file mode 100644 index 0000000..0b0239e --- /dev/null +++ b/src/main/resources/templates/demo/form/timeline.html @@ -0,0 +1,113 @@ + + + + + + 时间轴 + + + + + + +
        +
        +
        + 打开/关闭颜色/背景或方向版本: + 轻型版本 + 黑色版本 +
        +
        +
        +
        + + +
        +

        会议

        +

        上一年的销售业绩发布会。总结产品营销和销售趋势及销售的现状。 +

        + 更多信息 + + 今天
        + 2月3日 +
        +
        +
        + +
        +
        + +
        + +
        +

        给张三发送文档

        +

        发送上年度《销售业绩报告》

        + 下载文档 + + 今天
        + 2月3日 +
        +
        +
        + +
        +
        + +
        + +
        +

        喝咖啡休息

        +

        喝咖啡啦,啦啦啦~~

        + 更多 + 昨天
        2月2日
        +
        +
        + +
        +
        + +
        + +
        +

        给李四打电话

        +

        给李四打电话分配本月工作任务

        + 昨天
        2月2日
        +
        +
        + +
        +
        + +
        + +
        +

        公司年会

        +

        发年终奖啦,啦啦啦~~

        + 前天
        2月1日
        +
        +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/demo/form/upload.html b/src/main/resources/templates/demo/form/upload.html new file mode 100644 index 0000000..514c0fa --- /dev/null +++ b/src/main/resources/templates/demo/form/upload.html @@ -0,0 +1,63 @@ + + + + + + + +
        +
        +
        +
        +
        +
        文件上传控件 https://github.com/kartik-v/bootstrap-fileinput
        +
        +
        +
        + +
        + +
        +
        + +
        + +
        + +
        +
        +
        + +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/demo/form/validate.html b/src/main/resources/templates/demo/form/validate.html new file mode 100644 index 0000000..20bb4f8 --- /dev/null +++ b/src/main/resources/templates/demo/form/validate.html @@ -0,0 +1,193 @@ + + + + + + +
        +
        +
        +
        +
        +
        jQuery Validate 简介
        +
        +
        +

        jquery.validate.js 是一款优秀的jQuery表单验证插件。它具有如下特点:

        +
          +
        • 安装简单
        • +
        • 内置超过20种数据验证方法
        • +
        • 直列错误提示信息
        • +
        • 可扩展的数据验证方法
        • +
        • 使用内置的元数据或插件选项来指定您的验证规则
        • +
        • 优雅的交互设计
        • +
        +

        官网:http://jqueryvalidation.org/ +

        +
        +
        +
        +
        +
        +
        +
        +
        +
        简单示例
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        +

        更多示例请访问官方示例页面:查看 +

        +

        中文API可参考:http://doc.archive.vip/archive/document/zjwd.html#jquery-validate +

        +
        +
        +
        +
        +
        +
        +
        完整验证表单
        +
        +
        +
        +
        + +
        + + 这里写点提示的内容 +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + 请再次输入您的密码 +
        +
        +
        + +
        + +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/demo/form/wizard.html b/src/main/resources/templates/demo/form/wizard.html new file mode 100644 index 0000000..44bc00c --- /dev/null +++ b/src/main/resources/templates/demo/form/wizard.html @@ -0,0 +1,332 @@ + + + + + + + + +
        +
        +
        +
        +
        +
        + 表单向导 + https://github.com/techlab/jquery-smartwizard +
        +
        +
        +
        + + +
        +
        + +
        +
        +
        +
        +
        + +
        + + + + 这里写点提示的内容 + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + + 请再次输入您的密码 + +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        +

        1、如果需要工具栏在页面底部显示, 将style中下面的部分取消注释

        .sw>.toolbar-bottom

        +

        2、如果设置了自动调节高度为false, 将style中下面的部分取消注释

        .sw>.tab-content

        +

        3、工具栏的按钮样式会被表单插件中.btn样式覆盖导致bootstrap中的按钮样式无效, 如果需要改变按钮样式可以自己定义并提高优先级

        +
        +
        +
        +
        +

        测试多行显示

        +
        +$('#smartwizard').smartWizard({
        +  selected: 0, // Initial selected step, 0 = first step
        +  theme: 'default', // theme for the wizard, related css need to include for other than default theme
        +  justified: true, // Nav menu justification. true/false
        +  darkMode:false, // Enable/disable Dark Mode if the theme supports. true/false
        +  autoAdjustHeight: true, // Automatically adjust content height
        +  cycleSteps: false, // Allows to cycle the navigation of steps
        +  backButtonSupport: true, // Enable the back button support
        +  enableURLhash: true, // Enable selection of the step based on url hash
        +  transition: {
        +      animation: 'none', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
        +      speed: '400', // Transion animation speed
        +      easing:'' // Transition animation easing. Not supported without a jQuery easing plugin
        +  },
        +  toolbarSettings: {
        +      toolbarPosition: 'bottom', // none, top, bottom, both
        +      toolbarButtonPosition: 'right', // left, right, center
        +      showNextButton: true, // show/hide a Next button
        +      showPreviousButton: true, // show/hide a Previous button
        +      toolbarExtraButtons: [] // Extra buttons to show on toolbar, array of jQuery input/buttons elements
        +  },
        +  anchorSettings: {
        +      anchorClickable: true, // Enable/Disable anchor navigation
        +      enableAllAnchors: false, // Activates all anchors clickable all times
        +      markDoneStep: true, // Add done state on navigation
        +      markAllPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done
        +      removeDoneStepOnNavigateBack: false, // While navigate back done step after active step will be cleared
        +      enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation
        +  },
        +  keyboardSettings: {
        +      keyNavigation: true, // Enable/Disable keyboard navigation(left and right keys are used if enabled)
        +      keyLeft: [37], // Left key code
        +      keyRight: [39] // Right key code
        +  },
        +  lang: { // Language variables for button
        +      next: 'Next',
        +      previous: 'Previous'
        +  },
        +  disabledSteps: [], // Array Steps disabled
        +  errorSteps: [], // Highlight step with errors
        +  hiddenSteps: [] // Hidden steps
        +});
        +										
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        + + + + + diff --git a/src/main/resources/templates/demo/icon/fontawesome.html b/src/main/resources/templates/demo/icon/fontawesome.html new file mode 100644 index 0000000..634e2ec --- /dev/null +++ b/src/main/resources/templates/demo/icon/fontawesome.html @@ -0,0 +1,1944 @@ + + + + + + +
        +
        +
        +
        +

        Font Awesome 4.4.0

        字体图标的最佳集合。提供可伸缩矢量图标,可以立即进行定制大小、颜色、阴影,所有都可以用CSS样式来完成。 +
        +
        +
        +
        +
        +
        所有图标 所有图标集合 - Font Awesome
        +
        + + + + + + + + + + +
        +
        +
        +
        + + + + + +
        +
        + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
        +
        + + + + +
        + +
        + + + + +
        +
        + + + + +
        +
        + + + + +
        +
        + + +
        +
          +
        • + 给这些图标加上 + fa-spin class,就可以表现出加载动画了 +
        • +
        +
        + + +
        +
        + + + +
        +
        + + + + +
        +
        + + + + +
        +
        + + + + +
        +
        + + + + +
        +
        + + + + +
        +
        + + + + +
        +
        + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
        +
          +
        • 所有品牌图标均为其各自所有者的商标
        • +
        • 使用这些商标并不表示该商标持有人的认可,反之亦然
        • +
        + +
        +
        +
        + + + + +
        +
        +
        +
        +
        +
        + + + diff --git a/src/main/resources/templates/demo/icon/glyphicons.html b/src/main/resources/templates/demo/icon/glyphicons.html new file mode 100644 index 0000000..b9c6f6b --- /dev/null +++ b/src/main/resources/templates/demo/icon/glyphicons.html @@ -0,0 +1,1364 @@ + + + + + + +
        +
        +
        +
        +

        Glyphicons 字体图标

        包括250多个来自 Glyphicon Halflings 的字体图标。Glyphicons Halflings 一般是收费的,但是他们的作者允许 Bootstrap 免费使用。为了表示感谢,希望你在使用时尽量为 Glyphicons 添加一个友情链接。 +
        +
        +
        +
        +
        +
        所有图标 所有图标集合 - Glyphicons
        +
        + + + + + + + + + + +
        +
        +
        +
        +
          + +
        • + + glyphicon glyphicon-asterisk +
        • + +
        • + + glyphicon glyphicon-plus +
        • + +
        • + + glyphicon glyphicon-euro +
        • + +
        • + + glyphicon glyphicon-eur +
        • + +
        • + + glyphicon glyphicon-minus +
        • + +
        • + + glyphicon glyphicon-cloud +
        • + +
        • + + glyphicon glyphicon-envelope +
        • + +
        • + + glyphicon glyphicon-pencil +
        • + +
        • + + glyphicon glyphicon-glass +
        • + +
        • + + glyphicon glyphicon-music +
        • + +
        • + + glyphicon glyphicon-search +
        • + +
        • + + glyphicon glyphicon-heart +
        • + +
        • + + glyphicon glyphicon-star +
        • + +
        • + + glyphicon glyphicon-star-empty +
        • + +
        • + + glyphicon glyphicon-user +
        • + +
        • + + glyphicon glyphicon-film +
        • + +
        • + + glyphicon glyphicon-th-large +
        • + +
        • + + glyphicon glyphicon-th +
        • + +
        • + + glyphicon glyphicon-th-list +
        • + +
        • + + glyphicon glyphicon-ok +
        • + +
        • + + glyphicon glyphicon-remove +
        • + +
        • + + glyphicon glyphicon-zoom-in +
        • + +
        • + + glyphicon glyphicon-zoom-out +
        • + +
        • + + glyphicon glyphicon-off +
        • + +
        • + + glyphicon glyphicon-signal +
        • + +
        • + + glyphicon glyphicon-cog +
        • + +
        • + + glyphicon glyphicon-trash +
        • + +
        • + + glyphicon glyphicon-home +
        • + +
        • + + glyphicon glyphicon-file +
        • + +
        • + + glyphicon glyphicon-time +
        • + +
        • + + glyphicon glyphicon-road +
        • + +
        • + + glyphicon glyphicon-download-alt +
        • + +
        • + + glyphicon glyphicon-download +
        • + +
        • + + glyphicon glyphicon-upload +
        • + +
        • + + glyphicon glyphicon-inbox +
        • + +
        • + + glyphicon glyphicon-play-circle +
        • + +
        • + + glyphicon glyphicon-repeat +
        • + +
        • + + glyphicon glyphicon-refresh +
        • + +
        • + + glyphicon glyphicon-list-alt +
        • + +
        • + + glyphicon glyphicon-lock +
        • + +
        • + + glyphicon glyphicon-flag +
        • + +
        • + + glyphicon glyphicon-headphones +
        • + +
        • + + glyphicon glyphicon-volume-off +
        • + +
        • + + glyphicon glyphicon-volume-down +
        • + +
        • + + glyphicon glyphicon-volume-up +
        • + +
        • + + glyphicon glyphicon-qrcode +
        • + +
        • + + glyphicon glyphicon-barcode +
        • + +
        • + + glyphicon glyphicon-tag +
        • + +
        • + + glyphicon glyphicon-tags +
        • + +
        • + + glyphicon glyphicon-book +
        • + +
        • + + glyphicon glyphicon-bookmark +
        • + +
        • + + glyphicon glyphicon-print +
        • + +
        • + + glyphicon glyphicon-camera +
        • + +
        • + + glyphicon glyphicon-font +
        • + +
        • + + glyphicon glyphicon-bold +
        • + +
        • + + glyphicon glyphicon-italic +
        • + +
        • + + glyphicon glyphicon-text-height +
        • + +
        • + + glyphicon glyphicon-text-width +
        • + +
        • + + glyphicon glyphicon-align-left +
        • + +
        • + + glyphicon glyphicon-align-center +
        • + +
        • + + glyphicon glyphicon-align-right +
        • + +
        • + + glyphicon glyphicon-align-justify +
        • + +
        • + + glyphicon glyphicon-list +
        • + +
        • + + glyphicon glyphicon-indent-left +
        • + +
        • + + glyphicon glyphicon-indent-right +
        • + +
        • + + glyphicon glyphicon-facetime-video +
        • + +
        • + + glyphicon glyphicon-picture +
        • + +
        • + + glyphicon glyphicon-map-marker +
        • + +
        • + + glyphicon glyphicon-adjust +
        • + +
        • + + glyphicon glyphicon-tint +
        • + +
        • + + glyphicon glyphicon-edit +
        • + +
        • + + glyphicon glyphicon-share +
        • + +
        • + + glyphicon glyphicon-check +
        • + +
        • + + glyphicon glyphicon-move +
        • + +
        • + + glyphicon glyphicon-step-backward +
        • + +
        • + + glyphicon glyphicon-fast-backward +
        • + +
        • + + glyphicon glyphicon-backward +
        • + +
        • + + glyphicon glyphicon-play +
        • + +
        • + + glyphicon glyphicon-pause +
        • + +
        • + + glyphicon glyphicon-stop +
        • + +
        • + + glyphicon glyphicon-forward +
        • + +
        • + + glyphicon glyphicon-fast-forward +
        • + +
        • + + glyphicon glyphicon-step-forward +
        • + +
        • + + glyphicon glyphicon-eject +
        • + +
        • + + glyphicon glyphicon-chevron-left +
        • + +
        • + + glyphicon glyphicon-chevron-right +
        • + +
        • + + glyphicon glyphicon-plus-sign +
        • + +
        • + + glyphicon glyphicon-minus-sign +
        • + +
        • + + glyphicon glyphicon-remove-sign +
        • + +
        • + + glyphicon glyphicon-ok-sign +
        • + +
        • + + glyphicon glyphicon-question-sign +
        • + +
        • + + glyphicon glyphicon-info-sign +
        • + +
        • + + glyphicon glyphicon-screenshot +
        • + +
        • + + glyphicon glyphicon-remove-circle +
        • + +
        • + + glyphicon glyphicon-ok-circle +
        • + +
        • + + glyphicon glyphicon-ban-circle +
        • + +
        • + + glyphicon glyphicon-arrow-left +
        • + +
        • + + glyphicon glyphicon-arrow-right +
        • + +
        • + + glyphicon glyphicon-arrow-up +
        • + +
        • + + glyphicon glyphicon-arrow-down +
        • + +
        • + + glyphicon glyphicon-share-alt +
        • + +
        • + + glyphicon glyphicon-resize-full +
        • + +
        • + + glyphicon glyphicon-resize-small +
        • + +
        • + + glyphicon glyphicon-exclamation-sign +
        • + +
        • + + glyphicon glyphicon-gift +
        • + +
        • + + glyphicon glyphicon-leaf +
        • + +
        • + + glyphicon glyphicon-fire +
        • + +
        • + + glyphicon glyphicon-eye-open +
        • + +
        • + + glyphicon glyphicon-eye-close +
        • + +
        • + + glyphicon glyphicon-warning-sign +
        • + +
        • + + glyphicon glyphicon-plane +
        • + +
        • + + glyphicon glyphicon-calendar +
        • + +
        • + + glyphicon glyphicon-random +
        • + +
        • + + glyphicon glyphicon-comment +
        • + +
        • + + glyphicon glyphicon-magnet +
        • + +
        • + + glyphicon glyphicon-chevron-up +
        • + +
        • + + glyphicon glyphicon-chevron-down +
        • + +
        • + + glyphicon glyphicon-retweet +
        • + +
        • + + glyphicon glyphicon-shopping-cart +
        • + +
        • + + glyphicon glyphicon-folder-close +
        • + +
        • + + glyphicon glyphicon-folder-open +
        • + +
        • + + glyphicon glyphicon-resize-vertical +
        • + +
        • + + glyphicon glyphicon-resize-horizontal +
        • + +
        • + + glyphicon glyphicon-hdd +
        • + +
        • + + glyphicon glyphicon-bullhorn +
        • + +
        • + + glyphicon glyphicon-bell +
        • + +
        • + + glyphicon glyphicon-certificate +
        • + +
        • + + glyphicon glyphicon-thumbs-up +
        • + +
        • + + glyphicon glyphicon-thumbs-down +
        • + +
        • + + glyphicon glyphicon-hand-right +
        • + +
        • + + glyphicon glyphicon-hand-left +
        • + +
        • + + glyphicon glyphicon-hand-up +
        • + +
        • + + glyphicon glyphicon-hand-down +
        • + +
        • + + glyphicon glyphicon-circle-arrow-right +
        • + +
        • + + glyphicon glyphicon-circle-arrow-left +
        • + +
        • + + glyphicon glyphicon-circle-arrow-up +
        • + +
        • + + glyphicon glyphicon-circle-arrow-down +
        • + +
        • + + glyphicon glyphicon-globe +
        • + +
        • + + glyphicon glyphicon-wrench +
        • + +
        • + + glyphicon glyphicon-tasks +
        • + +
        • + + glyphicon glyphicon-filter +
        • + +
        • + + glyphicon glyphicon-briefcase +
        • + +
        • + + glyphicon glyphicon-fullscreen +
        • + +
        • + + glyphicon glyphicon-dashboard +
        • + +
        • + + glyphicon glyphicon-paperclip +
        • + +
        • + + glyphicon glyphicon-heart-empty +
        • + +
        • + + glyphicon glyphicon-link +
        • + +
        • + + glyphicon glyphicon-phone +
        • + +
        • + + glyphicon glyphicon-pushpin +
        • + +
        • + + glyphicon glyphicon-usd +
        • + +
        • + + glyphicon glyphicon-gbp +
        • + +
        • + + glyphicon glyphicon-sort +
        • + +
        • + + glyphicon glyphicon-sort-by-alphabet +
        • + +
        • + + glyphicon glyphicon-sort-by-alphabet-alt +
        • + +
        • + + glyphicon glyphicon-sort-by-order +
        • + +
        • + + glyphicon glyphicon-sort-by-order-alt +
        • + +
        • + + glyphicon glyphicon-sort-by-attributes +
        • + +
        • + + glyphicon glyphicon-sort-by-attributes-alt +
        • + +
        • + + glyphicon glyphicon-unchecked +
        • + +
        • + + glyphicon glyphicon-expand +
        • + +
        • + + glyphicon glyphicon-collapse-down +
        • + +
        • + + glyphicon glyphicon-collapse-up +
        • + +
        • + + glyphicon glyphicon-log-in +
        • + +
        • + + glyphicon glyphicon-flash +
        • + +
        • + + glyphicon glyphicon-log-out +
        • + +
        • + + glyphicon glyphicon-new-window +
        • + +
        • + + glyphicon glyphicon-record +
        • + +
        • + + glyphicon glyphicon-save +
        • + +
        • + + glyphicon glyphicon-open +
        • + +
        • + + glyphicon glyphicon-saved +
        • + +
        • + + glyphicon glyphicon-import +
        • + +
        • + + glyphicon glyphicon-export +
        • + +
        • + + glyphicon glyphicon-send +
        • + +
        • + + glyphicon glyphicon-floppy-disk +
        • + +
        • + + glyphicon glyphicon-floppy-saved +
        • + +
        • + + glyphicon glyphicon-floppy-remove +
        • + +
        • + + glyphicon glyphicon-floppy-save +
        • + +
        • + + glyphicon glyphicon-floppy-open +
        • + +
        • + + glyphicon glyphicon-credit-card +
        • + +
        • + + glyphicon glyphicon-transfer +
        • + +
        • + + glyphicon glyphicon-cutlery +
        • + +
        • + + glyphicon glyphicon-header +
        • + +
        • + + glyphicon glyphicon-compressed +
        • + +
        • + + glyphicon glyphicon-earphone +
        • + +
        • + + glyphicon glyphicon-phone-alt +
        • + +
        • + + glyphicon glyphicon-tower +
        • + +
        • + + glyphicon glyphicon-stats +
        • + +
        • + + glyphicon glyphicon-sd-video +
        • + +
        • + + glyphicon glyphicon-hd-video +
        • + +
        • + + glyphicon glyphicon-subtitles +
        • + +
        • + + glyphicon glyphicon-sound-stereo +
        • + +
        • + + glyphicon glyphicon-sound-dolby +
        • + +
        • + + glyphicon glyphicon-sound-5-1 +
        • + +
        • + + glyphicon glyphicon-sound-6-1 +
        • + +
        • + + glyphicon glyphicon-sound-7-1 +
        • + +
        • + + glyphicon glyphicon-copyright-mark +
        • + +
        • + + glyphicon glyphicon-registration-mark +
        • + +
        • + + glyphicon glyphicon-cloud-download +
        • + +
        • + + glyphicon glyphicon-cloud-upload +
        • + +
        • + + glyphicon glyphicon-tree-conifer +
        • + +
        • + + glyphicon glyphicon-tree-deciduous +
        • + +
        • + + glyphicon glyphicon-cd +
        • + +
        • + + glyphicon glyphicon-save-file +
        • + +
        • + + glyphicon glyphicon-open-file +
        • + +
        • + + glyphicon glyphicon-level-up +
        • + +
        • + + glyphicon glyphicon-copy +
        • + +
        • + + glyphicon glyphicon-paste +
        • + +
        • + + glyphicon glyphicon-alert +
        • + +
        • + + glyphicon glyphicon-equalizer +
        • + +
        • + + glyphicon glyphicon-king +
        • + +
        • + + glyphicon glyphicon-queen +
        • + +
        • + + glyphicon glyphicon-pawn +
        • + +
        • + + glyphicon glyphicon-bishop +
        • + +
        • + + glyphicon glyphicon-knight +
        • + +
        • + + glyphicon glyphicon-baby-formula +
        • + +
        • + + glyphicon glyphicon-tent +
        • + +
        • + + glyphicon glyphicon-blackboard +
        • + +
        • + + glyphicon glyphicon-bed +
        • + +
        • + + glyphicon glyphicon-apple +
        • + +
        • + + glyphicon glyphicon-erase +
        • + +
        • + + glyphicon glyphicon-hourglass +
        • + +
        • + + glyphicon glyphicon-lamp +
        • + +
        • + + glyphicon glyphicon-duplicate +
        • + +
        • + + glyphicon glyphicon-piggy-bank +
        • + +
        • + + glyphicon glyphicon-scissors +
        • + +
        • + + glyphicon glyphicon-bitcoin +
        • + +
        • + + glyphicon glyphicon-btc +
        • + +
        • + + glyphicon glyphicon-xbt +
        • + +
        • + + glyphicon glyphicon-yen +
        • + +
        • + + glyphicon glyphicon-jpy +
        • + +
        • + + glyphicon glyphicon-ruble +
        • + +
        • + + glyphicon glyphicon-rub +
        • + +
        • + + glyphicon glyphicon-scale +
        • + +
        • + + glyphicon glyphicon-ice-lolly +
        • + +
        • + + glyphicon glyphicon-ice-lolly-tasted +
        • + +
        • + + glyphicon glyphicon-education +
        • + +
        • + + glyphicon glyphicon-option-horizontal +
        • + +
        • + + glyphicon glyphicon-option-vertical +
        • + +
        • + + glyphicon glyphicon-menu-hamburger +
        • + +
        • + + glyphicon glyphicon-modal-window +
        • + +
        • + + glyphicon glyphicon-oil +
        • + +
        • + + glyphicon glyphicon-grain +
        • + +
        • + + glyphicon glyphicon-sunglasses +
        • + +
        • + + glyphicon glyphicon-text-size +
        • + +
        • + + glyphicon glyphicon-text-color +
        • + +
        • + + glyphicon glyphicon-text-background +
        • + +
        • + + glyphicon glyphicon-object-align-top +
        • + +
        • + + glyphicon glyphicon-object-align-bottom +
        • + +
        • + + glyphicon glyphicon-object-align-horizontal +
        • + +
        • + + glyphicon glyphicon-object-align-left +
        • + +
        • + + glyphicon glyphicon-object-align-vertical +
        • + +
        • + + glyphicon glyphicon-object-align-right +
        • + +
        • + + glyphicon glyphicon-triangle-right +
        • + +
        • + + glyphicon glyphicon-triangle-left +
        • + +
        • + + glyphicon glyphicon-triangle-bottom +
        • + +
        • + + glyphicon glyphicon-triangle-top +
        • + +
        • + + glyphicon glyphicon-console +
        • + +
        • + + glyphicon glyphicon-superscript +
        • + +
        • + + glyphicon glyphicon-subscript +
        • + +
        • + + glyphicon glyphicon-menu-left +
        • + +
        • + + glyphicon glyphicon-menu-right +
        • + +
        • + + glyphicon glyphicon-menu-down +
        • + +
        • + + glyphicon glyphicon-menu-up +
        • + +
        +
        +
        +
        +
        +
        +
        + + + diff --git a/src/main/resources/templates/demo/modal/dialog.html b/src/main/resources/templates/demo/modal/dialog.html new file mode 100644 index 0000000..cd0696c --- /dev/null +++ b/src/main/resources/templates/demo/modal/dialog.html @@ -0,0 +1,215 @@ + + + + + + +
        +
        +
        +
        +
        +
        模态窗口
        + +
        +
        +

        创建自定义的archive模态窗口可通过添加.inmodal类来实现。

        +
        + +
        + + +
        +
        +
        +
        +
        大小设置
        + +
        +
        +

        模态窗口提供两种大小尺寸,可以通过为模态窗口的.modal-dialog添加类来实现

        + +
        + + +
        + + + +
        +
        +
        +
        +
        +
        +
        动画窗口
        + +
        +
        +

        您可以通过为模态窗口的.modal-content添加类来实现动画效果

        + + + + + + + +
        +
        +
        +
        +
        设置选项
        + +
        +
        +

        可以通过数据绑定或者Javascript来实现模态窗口的相关功能,如果使用数据绑定,可以为元素添加data-,如data-backdrop=""

        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        名称类型默认值说明
        backdropboolean 或 string 'static'true遮罩层,或使用'static'指定遮罩层与关闭模态窗口不关联
        keyboardbooleantrue按Esc键时退出模态窗口
        showbooleantrue初始化完成后显示模态窗口
        remotepathfalse +

        推荐使用数据绑定方式,或使用 + jQuery.load

        +

        远程URL示例:

        +
        +
        <a data-toggle="modal" href="remote.html" data-target="#modal">Click me</a>
        +
        +
        +
        +
        +
        +
        +
        +
        + + + diff --git a/src/main/resources/templates/demo/modal/form.html b/src/main/resources/templates/demo/modal/form.html new file mode 100644 index 0000000..b690450 --- /dev/null +++ b/src/main/resources/templates/demo/modal/form.html @@ -0,0 +1,95 @@ + + + + + + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        + +
        +
        + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        + + + diff --git a/src/main/resources/templates/demo/modal/layer.html b/src/main/resources/templates/demo/modal/layer.html new file mode 100644 index 0000000..66ae8af --- /dev/null +++ b/src/main/resources/templates/demo/modal/layer.html @@ -0,0 +1,256 @@ + + + + + + +
        +
        +
        +
        +
        +
        信息框
        +
        +
        +

        通过调用$.modal.alert()实现。

        + + + + +
        +
        +
        + +
        +
        +
        +
        提示框
        +
        +
        +

        通过调用$.modal.msg()实现。

        + + + + +
        +
        +
        +
        + +
        +
        +
        +
        +
        询问框
        +
        +
        +

        通过调用$.modal.confirm()实现。

        + +
        +
        +
        + +
        +
        +
        +
        消息提示并刷新父窗体
        +
        +
        +

        通过调用$.modal.msgReload()实现。

        + +
        +
        +
        + +
        +
        +
        +
        普通弹出层
        +
        +
        +

        通过调用$.modal.open()实现。

        + + + + + +
        +
        +
        + +
        +
        +
        +
        选卡页方式
        +
        +
        +

        通过调用$.modal.openTab()实现。

        + + + + +
        +
        +
        + +
        +
        +
        +
        其他内容
        +
        +
        +

        通过调用layer实现。

        + + + +
        +
        +
        + +
        +
        +
        +
        遮罩层
        +
        +
        +

        通过调用blockUI实现。

        + + + +
        +
        +
        + +
        +
        +
        + + +
        +
        + +
        +
        + + + + diff --git a/src/main/resources/templates/demo/modal/table.html b/src/main/resources/templates/demo/modal/table.html new file mode 100644 index 0000000..9feec45 --- /dev/null +++ b/src/main/resources/templates/demo/modal/table.html @@ -0,0 +1,56 @@ + + + + + + +
        +
        +
        +
        +
        +
        弹层框
        +
        +
        +

        弹出复选框表格及单选框表格(点击提交后得到数据)。

        + + +
        +
        +
        +
        +
        +
        +
        弹层框
        +
        +
        +

        弹出复选框表格及单选框表格(点击提交后得到数据并回显到父窗体)。

        + +

        +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/demo/modal/table/check.html b/src/main/resources/templates/demo/modal/table/check.html new file mode 100644 index 0000000..1ba7784 --- /dev/null +++ b/src/main/resources/templates/demo/modal/table/check.html @@ -0,0 +1,86 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/modal/table/frame1.html b/src/main/resources/templates/demo/modal/table/frame1.html new file mode 100644 index 0000000..af5fe62 --- /dev/null +++ b/src/main/resources/templates/demo/modal/table/frame1.html @@ -0,0 +1,53 @@ + + + + + + +
        +
        +
        +
        +
        +
        + +
        + +
        + +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/modal/table/frame2.html b/src/main/resources/templates/demo/modal/table/frame2.html new file mode 100644 index 0000000..b4940fe --- /dev/null +++ b/src/main/resources/templates/demo/modal/table/frame2.html @@ -0,0 +1,24 @@ + + + + + + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/modal/table/parent.html b/src/main/resources/templates/demo/modal/table/parent.html new file mode 100644 index 0000000..0807206 --- /dev/null +++ b/src/main/resources/templates/demo/modal/table/parent.html @@ -0,0 +1,90 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/modal/table/radio.html b/src/main/resources/templates/demo/modal/table/radio.html new file mode 100644 index 0000000..0df48f0 --- /dev/null +++ b/src/main/resources/templates/demo/modal/table/radio.html @@ -0,0 +1,86 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/operate/add.html b/src/main/resources/templates/demo/operate/add.html new file mode 100644 index 0000000..ee8e332 --- /dev/null +++ b/src/main/resources/templates/demo/operate/add.html @@ -0,0 +1,78 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/demo/operate/detail.html b/src/main/resources/templates/demo/operate/detail.html new file mode 100644 index 0000000..8e083c1 --- /dev/null +++ b/src/main/resources/templates/demo/operate/detail.html @@ -0,0 +1,71 @@ + + + + + + +
        +
        +
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/demo/operate/edit.html b/src/main/resources/templates/demo/operate/edit.html new file mode 100644 index 0000000..94ed965 --- /dev/null +++ b/src/main/resources/templates/demo/operate/edit.html @@ -0,0 +1,79 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/demo/operate/other.html b/src/main/resources/templates/demo/operate/other.html new file mode 100644 index 0000000..b3e926b --- /dev/null +++ b/src/main/resources/templates/demo/operate/other.html @@ -0,0 +1,77 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        +   +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        +   +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/operate/table.html b/src/main/resources/templates/demo/operate/table.html new file mode 100644 index 0000000..6a3f897 --- /dev/null +++ b/src/main/resources/templates/demo/operate/table.html @@ -0,0 +1,125 @@ + + + + + + + +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/report/echarts.html b/src/main/resources/templates/demo/report/echarts.html new file mode 100644 index 0000000..311ebff --- /dev/null +++ b/src/main/resources/templates/demo/report/echarts.html @@ -0,0 +1,1264 @@ + + + + + + +
        +
        +

        ECharts开源来自百度商业前端数据可视化团队,基于html5 Canvas,是一个纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据可视化图表。创新的拖拽重计算、数据视图、值域漫游等特性大大增强了用户体验,赋予了用户对数据进行挖掘、整合的能力。 了解更多 +

        +

        ECharts官网:http://echarts.baidu.com/ +

        + +
        +
        +
        +
        +
        +
        +
        +
        折线图
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        柱状图
        +
        + + + + + + + + + + +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        散点图
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        K线图
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        饼状图
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        雷达图
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        仪表盘
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        漏斗图
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        中国地图
        +
        + + + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/report/metrics.html b/src/main/resources/templates/demo/report/metrics.html new file mode 100644 index 0000000..853f672 --- /dev/null +++ b/src/main/resources/templates/demo/report/metrics.html @@ -0,0 +1,478 @@ + + + + + + +
        +
        +
        +
        +
        +
        Q1 销量
        +

        + 上升 +

        + 更新时间:12天以前 +
        +
        +
        +
        +
        +
        +
        Q2 销量
        +

        + 上升 +

        + 更新时间:12天以前 +
        +
        +
        +
        +
        +
        +
        Q3 销量
        +

        + 下降 +

        + 更新时间:12天以前 +
        +
        +
        +
        +
        +
        +
        Q4 销量
        +

        + 下降 +

        + 更新时间:12天以前 +
        +
        +
        + +
        +
        +
        +
        +
        +
        本日访问量
        +

        198 009

        +
        +
        +
        +
        +
        +
        +
        +
        本周访问量
        +

        65 000

        +
        +
        +
        +
        +
        +
        +
        +
        本月访问量
        +

        680 900

        +
        +
        +
        +
        +
        +
        +
        +
        平均停留时间
        +

        00:06:40

        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        使用率
        +

        65%

        +
        +
        +
        + +
        4:32更新
        +
        +
        +
        + +
        +
        +
        +
        使用率
        +

        50%

        +
        +
        +
        + +
        4:32更新
        +
        +
        +
        + +
        +
        +
        +
        使用率
        +

        14%

        +
        +
        +
        + +
        4:32更新
        +
        +
        +
        + +
        +
        +
        +
        使用率
        +

        20%

        +
        +
        +
        + +
        4:32更新
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        百分比
        +

        42/20

        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        百分比
        +

        100/54

        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        百分比
        +

        685/211

        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        百分比
        +

        240/32

        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        收入
        +

        886,200

        +
        98%
        + 总收入 +
        +
        +
        +
        +
        +
        +
        本月收入
        +

        1 738,200

        +
        98%
        + 总收入 +
        +
        +
        +
        +
        +
        +
        本日收入
        +

        -200,100

        +
        12%
        + 总收入 +
        +
        +
        +
        +
        +
        +
        搜索有收入
        +

        54,200

        +
        24%
        + 总收入 +
        +
        +
        +
        +
        +
        +
        +
        +
        预警
        + + + + + + + + + + + + + + + +
        + + + 示例 01 +
        + + + 示例 02 +
        + + + 示例 03 +
        +
        +
        +
        +
        +
        +
        +
        项目
        + + + + + + + + + + + + + + + +
        + + + 示例 01 +
        + + + 示例 02 +
        + + + 示例 03 +
        +
        +
        +
        +
        +
        +
        +
        消息
        + + + + + + + + + + + + + + + +
        + + + 示例 01 +
        + + + 示例 02 +
        + + + 示例 03 +
        +
        +
        +
        +
        +
        +
        +
        通知
        + + + + + + + + + + + + + + + +
        + + + 示例 01 +
        + + + 示例 02 +
        + + + 示例 03 +
        +
        +
        +
        +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/report/peity.html b/src/main/resources/templates/demo/report/peity.html new file mode 100644 index 0000000..93c5194 --- /dev/null +++ b/src/main/resources/templates/demo/report/peity.html @@ -0,0 +1,206 @@ + + + + + + +
        + +
        +
        +
        +

        Peity图表

        +

        是一个内嵌数据图形可视化的图表库

        +

        了解 Peity +

        +
        +
        +
        +
        +
        +
        饼状图 自定义颜色
        +
        + + + +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        图表代码
        + 1/5 + + <span class="pie">1/5</span> +
        + 226/360 + + <span class="pie">226/360</span> +
        + 0.52/1.561 + + <span class="pie">0.52/1.561</span> +
        + 1,4 + + <span class="pie">1,4</span> +
        + 226,134 + + <span class="pie">226,134</span> +
        + 0.52,1.041 + + <span class="pie">0.52,1.041</span> +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        线性图
        +
        + + + +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        图表代码
        + 5,3,9,6,5,9,7,3,5,2,5,3,9,6,5,9,7,3,5,2 + + <span class="line">5,3,9,6,5,9,7,3,5,2</span> +
        + 5,3,9,6,5,9,7,3,5,2 + + <span class="line">5,3,9,6,5,9,7,3,5,2</span> +
        + 5,3,2,-1,-3,-2,2,3,5,2 + + <span class="line">5,3,2,-1,-3,-2,2,3,5,2</span> +
        + 0,-3,-6,-4,-5,-4,-7,-3,-5,-2 + + <span class="line">0,-3,-6,-4,-5,-4,-7,-3,-5,-2</span> +
        + 5,3,9,6,5,9,7,3,5,2 + + <span class="bar">5,3,9,6,5,9,7,3,5,2</span> +
        + 5,3,2,-1,-3,-2,2,3,5,2 + + <span class="bar">5,3,2,-1,-3,-2,2,3,5,2</span> +
        +
        +
        +
        + +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/report/sparkline.html b/src/main/resources/templates/demo/report/sparkline.html new file mode 100644 index 0000000..d73c18f --- /dev/null +++ b/src/main/resources/templates/demo/report/sparkline.html @@ -0,0 +1,232 @@ + + + + + + +
        + +
        +
        +
        +

        Sparkline

        +

        这是另一个可视化图表库

        +

        了解 Sparkline +

        +
        +
        +
        +
        +
        +
        Sparkline图表 自定义颜色
        +
        + + + +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        图表类型
        + + + 内联线性图 +
        + + + 柱状图 +
        + + + 饼状图 +
        + + + 长线性图 +
        + + + 三态图 +
        + + + 散点图 +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        自定义饼状图尺寸
        +
        + + + + + + + + + + +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        自定义柱状图尺寸
        +
        + + + + + + + + + + +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        自定义线性图尺寸
        +
        + + + + + + + + + + +
        +
        +
        + +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/button.html b/src/main/resources/templates/demo/table/button.html new file mode 100644 index 0000000..7a86644 --- /dev/null +++ b/src/main/resources/templates/demo/table/button.html @@ -0,0 +1,92 @@ + + + + + + +
        +
        +
        +
        +
        + +
        +
        +
        + +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/child.html b/src/main/resources/templates/demo/table/child.html new file mode 100644 index 0000000..8a50491 --- /dev/null +++ b/src/main/resources/templates/demo/table/child.html @@ -0,0 +1,113 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/curd.html b/src/main/resources/templates/demo/table/curd.html new file mode 100644 index 0000000..ee76177 --- /dev/null +++ b/src/main/resources/templates/demo/table/curd.html @@ -0,0 +1,178 @@ + + + + + + + +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/customView.html b/src/main/resources/templates/demo/table/customView.html new file mode 100644 index 0000000..a2f4d1c --- /dev/null +++ b/src/main/resources/templates/demo/table/customView.html @@ -0,0 +1,122 @@ + + + + + + +
        +
        +
        + +
        +
        +
        +
        + + + +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/data.html b/src/main/resources/templates/demo/table/data.html new file mode 100644 index 0000000..ce43cef --- /dev/null +++ b/src/main/resources/templates/demo/table/data.html @@ -0,0 +1,76 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/detail.html b/src/main/resources/templates/demo/table/detail.html new file mode 100644 index 0000000..e5b8ad0 --- /dev/null +++ b/src/main/resources/templates/demo/table/detail.html @@ -0,0 +1,86 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/dynamicColumns.html b/src/main/resources/templates/demo/table/dynamicColumns.html new file mode 100644 index 0000000..f7b664e --- /dev/null +++ b/src/main/resources/templates/demo/table/dynamicColumns.html @@ -0,0 +1,123 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 要增加的列: + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/editable.html b/src/main/resources/templates/demo/table/editable.html new file mode 100644 index 0000000..33af09b --- /dev/null +++ b/src/main/resources/templates/demo/table/editable.html @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/event.html b/src/main/resources/templates/demo/table/event.html new file mode 100644 index 0000000..b6d268b --- /dev/null +++ b/src/main/resources/templates/demo/table/event.html @@ -0,0 +1,133 @@ + + + + + + +
        +
        +
        +

        自定义触发事件(点击某行/双击某行/单击某格/双击某格/服务器发送数据前触发/数据被加载时触发)

        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/export.html b/src/main/resources/templates/demo/table/export.html new file mode 100644 index 0000000..23f4db5 --- /dev/null +++ b/src/main/resources/templates/demo/table/export.html @@ -0,0 +1,81 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/exportSelected.html b/src/main/resources/templates/demo/table/exportSelected.html new file mode 100644 index 0000000..18e0014 --- /dev/null +++ b/src/main/resources/templates/demo/table/exportSelected.html @@ -0,0 +1,120 @@ + + + + + + +
        +
        +
        +
        +
        + +
        +
        +
        +
        + 勾选数据导出指定列,否则为全部 + + 导出 + +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/fixedColumns.html b/src/main/resources/templates/demo/table/fixedColumns.html new file mode 100644 index 0000000..c79dc6c --- /dev/null +++ b/src/main/resources/templates/demo/table/fixedColumns.html @@ -0,0 +1,145 @@ + + + + + + + +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/footer.html b/src/main/resources/templates/demo/table/footer.html new file mode 100644 index 0000000..e4654b6 --- /dev/null +++ b/src/main/resources/templates/demo/table/footer.html @@ -0,0 +1,95 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/groupHeader.html b/src/main/resources/templates/demo/table/groupHeader.html new file mode 100644 index 0000000..77226ff --- /dev/null +++ b/src/main/resources/templates/demo/table/groupHeader.html @@ -0,0 +1,80 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/headerStyle.html b/src/main/resources/templates/demo/table/headerStyle.html new file mode 100644 index 0000000..5d63bb4 --- /dev/null +++ b/src/main/resources/templates/demo/table/headerStyle.html @@ -0,0 +1,91 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/image.html b/src/main/resources/templates/demo/table/image.html new file mode 100644 index 0000000..edc5e48 --- /dev/null +++ b/src/main/resources/templates/demo/table/image.html @@ -0,0 +1,79 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/multi.html b/src/main/resources/templates/demo/table/multi.html new file mode 100644 index 0000000..1fd10c2 --- /dev/null +++ b/src/main/resources/templates/demo/table/multi.html @@ -0,0 +1,222 @@ + + + + + + +
        +
        +
        +
        +
        + +
        +
        +
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        +
        +
        + + +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/other.html b/src/main/resources/templates/demo/table/other.html new file mode 100644 index 0000000..6321db6 --- /dev/null +++ b/src/main/resources/templates/demo/table/other.html @@ -0,0 +1,106 @@ + + + + + + + +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/pageGo.html b/src/main/resources/templates/demo/table/pageGo.html new file mode 100644 index 0000000..26db1f6 --- /dev/null +++ b/src/main/resources/templates/demo/table/pageGo.html @@ -0,0 +1,77 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/params.html b/src/main/resources/templates/demo/table/params.html new file mode 100644 index 0000000..ff64ea7 --- /dev/null +++ b/src/main/resources/templates/demo/table/params.html @@ -0,0 +1,158 @@ + + + + + + +
        +
        +
        +

        通过queryParams方法设置

        +
        +
        + +
        +
        +
        +
          +
        • + 用户姓名: +
        • +
        +
        +
        +
        +
        +

        通过form自动填充

        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/print.html b/src/main/resources/templates/demo/table/print.html new file mode 100644 index 0000000..85c0c40 --- /dev/null +++ b/src/main/resources/templates/demo/table/print.html @@ -0,0 +1,130 @@ + + + + + + +
        +
        +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/refresh.html b/src/main/resources/templates/demo/table/refresh.html new file mode 100644 index 0000000..5917bff --- /dev/null +++ b/src/main/resources/templates/demo/table/refresh.html @@ -0,0 +1,79 @@ + + + + + + +
        +
        +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/remember.html b/src/main/resources/templates/demo/table/remember.html new file mode 100644 index 0000000..2f55670 --- /dev/null +++ b/src/main/resources/templates/demo/table/remember.html @@ -0,0 +1,86 @@ + + + + + + +
        + +
        +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/reorder.html b/src/main/resources/templates/demo/table/reorder.html new file mode 100644 index 0000000..8c40c4d --- /dev/null +++ b/src/main/resources/templates/demo/table/reorder.html @@ -0,0 +1,75 @@ + + + + + + +
        +
        +
        +

        按住表格拖拽

        +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/reorderColumns.html b/src/main/resources/templates/demo/table/reorderColumns.html new file mode 100644 index 0000000..a461d60 --- /dev/null +++ b/src/main/resources/templates/demo/table/reorderColumns.html @@ -0,0 +1,84 @@ + + + + + + +
        + +
        +
        +

        按住表格列拖拽

        +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/reorderRows.html b/src/main/resources/templates/demo/table/reorderRows.html new file mode 100644 index 0000000..e788ccb --- /dev/null +++ b/src/main/resources/templates/demo/table/reorderRows.html @@ -0,0 +1,88 @@ + + + + + + +
        + +
        +
        +

        按住表格行拖拽

        +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/resizable.html b/src/main/resources/templates/demo/table/resizable.html new file mode 100644 index 0000000..224c7df --- /dev/null +++ b/src/main/resources/templates/demo/table/resizable.html @@ -0,0 +1,78 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/demo/table/search.html b/src/main/resources/templates/demo/table/search.html new file mode 100644 index 0000000..e6781b1 --- /dev/null +++ b/src/main/resources/templates/demo/table/search.html @@ -0,0 +1,202 @@ + + + + + + + +
        +
        +
        +

        普通条件查询

        +
        +
        +
          +
        • + 商户编号: +
        • +
        • + 终端编号: +
        • +
        • + 处理状态: +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + +
        +

        时间条件查询

        +
        +
        +
          +
        • + 商户编号: +
        • +
        • + 终端编号: +
        • +
        • + + + - + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + +
        +

        多级联动下拉查询

        +
        +
        +
          +
        • + 商户编号: +
        • +
        • + 充值类型: +
        • +
        • + 充值路由: +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + +
        +

        下拉多选条件查询

        +
        +
        +
          +
        • + 商户编号: +
        • +
        • + 终端编号: +
        • +
        • + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + +
        +

        复杂条件查询

        +
        +
        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + + - + +
        • + +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        +
        +
        + + + + + + + diff --git a/src/main/resources/templates/demo/table/subdata.html b/src/main/resources/templates/demo/table/subdata.html new file mode 100644 index 0000000..d9fda98 --- /dev/null +++ b/src/main/resources/templates/demo/table/subdata.html @@ -0,0 +1,220 @@ + + + + + + + +
        +
        + +

        客户信息

        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +

        商品数据

        +
        +
        + + +
        +
        +
        +
        +
        +
        +
        + +
        +
        +   + +
        +
        + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/document/document.html b/src/main/resources/templates/document/document.html new file mode 100644 index 0000000..5cf13ec --- /dev/null +++ b/src/main/resources/templates/document/document.html @@ -0,0 +1,145 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/error/404.html b/src/main/resources/templates/error/404.html new file mode 100644 index 0000000..4598415 --- /dev/null +++ b/src/main/resources/templates/error/404.html @@ -0,0 +1,27 @@ + + + + + + archive - 404 + + + + + +
        +

        404

        +

        找不到网页!

        +
        + 对不起,您正在寻找的页面不存在。尝试检查URL的错误,然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。 + 主页 +
        +
        + + + diff --git a/src/main/resources/templates/error/500.html b/src/main/resources/templates/error/500.html new file mode 100644 index 0000000..7271cc7 --- /dev/null +++ b/src/main/resources/templates/error/500.html @@ -0,0 +1,28 @@ + + + + + + archive - 500 + + + + + +
        +

        500

        +

        内部服务器错误!

        + +
        + 服务器遇到意外事件,不允许完成请求。我们抱歉。您可以返回主页面。 + 主页 +
        +
        + + + diff --git a/src/main/resources/templates/error/business.html b/src/main/resources/templates/error/business.html new file mode 100644 index 0000000..757b235 --- /dev/null +++ b/src/main/resources/templates/error/business.html @@ -0,0 +1,20 @@ + + + + + + archive - 403 + + + + + +
        +

        操作异常!

        + +
        + [[${errorMessage}]] +
        +
        + + diff --git a/src/main/resources/templates/error/service.html b/src/main/resources/templates/error/service.html new file mode 100644 index 0000000..b64341d --- /dev/null +++ b/src/main/resources/templates/error/service.html @@ -0,0 +1,20 @@ + + + + + + RuoYi - 500 + + + + + +
        +

        操作异常!

        + +
        + [[${errorMessage}]] +
        +
        + + diff --git a/src/main/resources/templates/error/unauth.html b/src/main/resources/templates/error/unauth.html new file mode 100644 index 0000000..9ddf3ce --- /dev/null +++ b/src/main/resources/templates/error/unauth.html @@ -0,0 +1,28 @@ + + + + + + archive - 403 + + + + + +
        +

        403

        +

        您没有访问权限!

        + +
        + 对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面 + 返回主页 +
        +
        + + + diff --git a/src/main/resources/templates/include.html b/src/main/resources/templates/include.html new file mode 100644 index 0000000..7aa77e4 --- /dev/null +++ b/src/main/resources/templates/include.html @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + + + +
        + + +
        + +
        +
        + +
        + + +
        + + +
        +
        + +
        + + +
        + +
        +
        + +
        + + +
        + +
        +
        + +
        + + +
        + +
        +
        + +
        + + +
        + + +
        +
        + + +
        + + +
        + +
        +
        + +
        + + +
        + +
        +
        + +
        + + +
        + +
        +
        + +
        + + +
        + +
        +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        +
        + +
        + + +
        + +
        +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + + +
        + + +
        + + +
        + + +
        + +
        +
        + + +
        + + +
        + + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        diff --git a/src/main/resources/templates/index-topnav.html b/src/main/resources/templates/index-topnav.html new file mode 100644 index 0000000..401c9f5 --- /dev/null +++ b/src/main/resources/templates/index-topnav.html @@ -0,0 +1,432 @@ + + + + + + + 档案管理系统首页 + + + + + + + + + + + + +
        + + + + + + +
        + +
        + + + + 刷新 +
        + + + +
        + +
        + + +
        + +
        + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html new file mode 100644 index 0000000..bd59bf7 --- /dev/null +++ b/src/main/resources/templates/index.html @@ -0,0 +1,375 @@ + + + + + + + 档案管理系统首页 + + + + + + + + + + + + +
        + + + + + + +
        + +
        + + + + 刷新 +
        + + + +
        + +
        + + +
        + +
        + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/jyly/borrow/add.html b/src/main/resources/templates/jyly/borrow/add.html new file mode 100644 index 0000000..8b9f776 --- /dev/null +++ b/src/main/resources/templates/jyly/borrow/add.html @@ -0,0 +1,301 @@ + + + + + + + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + +
        + +
        +
        +
        + + +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/jyly/borrow/borrow.html b/src/main/resources/templates/jyly/borrow/borrow.html new file mode 100644 index 0000000..0ae8690 --- /dev/null +++ b/src/main/resources/templates/jyly/borrow/borrow.html @@ -0,0 +1,236 @@ + + + + + + +
        +
        +
        +
        +
        +
          + +
        • + + + - + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • + + +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/jyly/borrow/edit.html b/src/main/resources/templates/jyly/borrow/edit.html new file mode 100644 index 0000000..ea027ef --- /dev/null +++ b/src/main/resources/templates/jyly/borrow/edit.html @@ -0,0 +1,305 @@ + + + + + + + + + + +
        +
        + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + + +
        +
        +
        + + + + + + + +
        +
        + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/jyly/borrow/lywb.html b/src/main/resources/templates/jyly/borrow/lywb.html new file mode 100644 index 0000000..d1f0e34 --- /dev/null +++ b/src/main/resources/templates/jyly/borrow/lywb.html @@ -0,0 +1,160 @@ + + + + + + + + + + +
        +
        + + +
        +
        + +
        + + +
        +
        +
        + + +
        +
        + +
        + + + + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/jyly/detail/add.html b/src/main/resources/templates/jyly/detail/add.html new file mode 100644 index 0000000..ca03dc0 --- /dev/null +++ b/src/main/resources/templates/jyly/detail/add.html @@ -0,0 +1,218 @@ + + + + + + +
        +
        + + + + + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + + + + + +
        +
        + +
        + + +
        +
        +
        +
        +
        + +
        + + + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + + +
        +
        +
        + + + + + +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/jyly/detail/borrowsearch.html b/src/main/resources/templates/jyly/detail/borrowsearch.html new file mode 100644 index 0000000..24eda5c --- /dev/null +++ b/src/main/resources/templates/jyly/detail/borrowsearch.html @@ -0,0 +1,260 @@ + + + + + + + + + + + +
        +
        +
        +
        +
        + +  搜索 + + + +
        +
        + + +
        +
        +
        +
        +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/jyly/detail/detail.html b/src/main/resources/templates/jyly/detail/detail.html new file mode 100644 index 0000000..6fa4a65 --- /dev/null +++ b/src/main/resources/templates/jyly/detail/detail.html @@ -0,0 +1,182 @@ + + + + + + +
        +
        +
        +
        +
        + +
          + +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/jyly/detail/edit.html b/src/main/resources/templates/jyly/detail/edit.html new file mode 100644 index 0000000..0c61567 --- /dev/null +++ b/src/main/resources/templates/jyly/detail/edit.html @@ -0,0 +1,229 @@ + + + + + + +
        +
        + + + + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + + +
        +
        + +
        + + +
        +
        +
        +
        +
        + +
        + + + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + + +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + + +
        +
        +
        + + + +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/jyly/person/add.html b/src/main/resources/templates/jyly/person/add.html new file mode 100644 index 0000000..9b5aa2a --- /dev/null +++ b/src/main/resources/templates/jyly/person/add.html @@ -0,0 +1,140 @@ + + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        + +
        + +
        + +
        +
        + + + +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/jyly/person/edit.html b/src/main/resources/templates/jyly/person/edit.html new file mode 100644 index 0000000..29cac2d --- /dev/null +++ b/src/main/resources/templates/jyly/person/edit.html @@ -0,0 +1,141 @@ + + + + + + + +
        +
        + + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        + +
        + +
        + +
        +
        + +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/jyly/person/person.html b/src/main/resources/templates/jyly/person/person.html new file mode 100644 index 0000000..7b8c521 --- /dev/null +++ b/src/main/resources/templates/jyly/person/person.html @@ -0,0 +1,208 @@ + + + + + + +
        +
        +
        +
        +
        + +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/lock.html b/src/main/resources/templates/lock.html new file mode 100644 index 0000000..55a969c --- /dev/null +++ b/src/main/resources/templates/lock.html @@ -0,0 +1,208 @@ + + + + + + + 锁定屏幕 + + + + + + +
        +
        +
        [[ ${user.loginName} ]] / [[${#strings.defaultString(user.userName, '-')}]]
        + +
        +
        + User Image +
        +
        +
        + +
        + +
        +
        +
        +
        + +
        系统锁屏,请输入密码登陆!
        + +
        + + + + + + + + diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html new file mode 100644 index 0000000..ea4a276 --- /dev/null +++ b/src/main/resources/templates/login.html @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + +
        +

        + +

        +
        +
        + +
        + +
        +
        +

        登录:

        +

        为党管档、为国守史、为民服务

        + + +
        +
        + +
        +
        + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/main.html b/src/main/resources/templates/main.html new file mode 100644 index 0000000..ee5c377 --- /dev/null +++ b/src/main/resources/templates/main.html @@ -0,0 +1,369 @@ + + + + + + 统计 + + + + + + + + + +
        +
        +
        +
        +
        +
        +   档案数据总计 +
        +
        +
        +
        +
        +
        +
        + 档案总量 +
        +
        +

        0

        +
        + +
        +
        +
        +
        +
        + 卷数 +
        +
        +

        0

        +
        +
        +
        +
        +
        +
        + 卷内数 +
        +
        +

        0

        +
        + +
        +
        +
        +
        +
        + 件数 +
        +
        +

        0

        +
        + +
        +
        +
        +
        +
        + 电子全文数 +
        +
        +

        0

        +
        + +
        +
        +
        +
        +
        + 数字化率 +
        +
        +

        0

        +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +   满意度统计 +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +   档案类型统计 +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        +   利用记录统计 +
        + +
        +
        +
        + + + + + + + + + + +
        登记编号姓名利用时间查阅内容
        +
        +
        +
        +
        +
        +
        +
        + + + + + + + + diff --git a/src/main/resources/templates/main2.html b/src/main/resources/templates/main2.html new file mode 100644 index 0000000..f310fac --- /dev/null +++ b/src/main/resources/templates/main2.html @@ -0,0 +1,421 @@ + + + + + + 首页 + + + + + + + + + + + + + + +
        +
        +
        档案数据总计
        +
          +
        • + 卷数 + +
        • +
        • + 卷内数 + +
        • +
        • + 件数 + +
        • +
        • + 电子全文数 + +
        • +
        • + 数字化率 + +
        • +
        +
        +
        +
        档案类型
        +
        +
          + +
        +
        +
        +
        +
        满意度统计
        +
        +
        +
        +
        +
        历年档案数量统计
        +
        +
        +
        +
        利用记录统计
        +
        +
        + 登记编号姓名 + 利用时间查阅内容 +
        +
        +
          + +
        +
        +
        +
        + + + + + + diff --git a/src/main/resources/templates/main3.html b/src/main/resources/templates/main3.html new file mode 100644 index 0000000..3f9c0b7 --- /dev/null +++ b/src/main/resources/templates/main3.html @@ -0,0 +1,336 @@ + + + + + + 统计 + + + + + + + + +
        + +
        +
        +
        +
        + +
        收入
        +
        +
        +

        40 886,200

        +
        98% +
        + 总收入 +
        +
        +
        +
        +
        +
        + 全年 +
        订单
        +
        +
        +

        275,800

        +
        20% +
        + 新订单 +
        +
        +
        +
        +
        +
        + 今天 +
        访客
        +
        +
        +

        106,120

        +
        44% +
        + 新访客 +
        +
        +
        +
        +
        +
        + 最近一个月 +
        活跃用户
        +
        +
        +

        80,600

        +
        38% +
        + 12月 +
        +
        +
        +
        + +
        +
        +
        +
        +
        订单
        +
        +
        + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
          +
        • +

          2,346

          + 订单总数 +
          48% +
          +
          +
          +
          +
        • +
        • +

          4,422

          + 最近一个月订单 +
          60% +
          +
          +
          +
          +
        • +
        • +

          9,180

          + 最近一个月销售额 +
          22% +
          +
          +
          +
          +
        • +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        用户项目列表
        + +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        状态日期用户
        进行中... + 11:20青衣5858 24%
        已取消 + 10:40徐子崴 66%
        进行中... + 01:30姜岚昕 54%
        进行中... + 02:20武汉大兵哥 12%
        进行中... + 09:40荆莹儿 22%
        已完成 + 04:10栾某某 66%
        进行中... + 12:08范范范二妮 23%
        +
        +
        +
        +
        +
        +
        + + + + + + + + diff --git a/src/main/resources/templates/main_v1.html b/src/main/resources/templates/main_v1.html new file mode 100644 index 0000000..70cd207 --- /dev/null +++ b/src/main/resources/templates/main_v1.html @@ -0,0 +1,1222 @@ + + + + + + + 若依介绍 + + + + + + + + +
        +
        +
        + 领取1111 +
        https://www.aliyun.com/minisite/goods?userCode=brki8iof
        + 领取腾讯云通用云产品2860优惠券 +
        https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console
        + 阿里云服务器折扣区 ☛☛点我进入☚☚     腾讯云服务器秒杀区 ☛☛点我进入☚☚
        +

        云产品通用红包,可叠加官网常规优惠使用。(仅限新用户)

        +
        + +
        +
        +
        +

        Hello,Guest

        + 移动设备访问请扫描以下二维码: +
        +
        + +
        +
        +
        +

        若依后台管理框架1111

        +

        一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统。,她可以用于所有的Web应用程序,如网站管理后台网站会员中心CMSCRMOA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。

        +

        + 当前版本:v[[${version}]] +

        +

        + ¥免费开源 +

        +
        +

        + + 访问码云 + + + 访问主页 + +

        +
        +
        +

        技术选型:

        +
          +
        1. 核心框架:Spring Boot。
        2. +
        3. 安全框架:Apache Shiro。
        4. +
        5. 模板引擎:Thymeleaf。
        6. +
        7. 持久层框架:MyBatis。
        8. +
        9. 定时任务:Quartz。
        10. +
        11. 数据库连接池:Druid。
        12. +
        13. 工具类:Fastjson。
        14. +
        15. 更多……
        16. +
        +
        + +
        +
        +
        +
        + +
        +
        +
        联系信息
        + +
        +
        +

        官网:http://www.archive.vip +

        +

        QQ群:满1389287 满1679294 满1529866 满1772718 满1366522 满1382251 满1145125 满86752435 满134072510 满210336300 满339522636 满130035985 143151071 +

        +

        微信:/ *若依 +

        +

        支付宝:/ *若依 +

        +
        +
        +
        +
        +
        +
        +
        更新日志
        +
        +
        +
        +
        +
        +
        +
        + v4.6.02021.01.01 +
        +
        +
        +
        +
          +
        1. 新增缓存监控管理
        2. +
        3. 新增锁定屏幕功能
        4. +
        5. 菜单新增是否刷新页面
        6. +
        7. 删除用户和角色解绑关联
        8. +
        9. 新增密码强度字符范围提示
        10. +
        11. 防止匿名访问进行过滤
        12. +
        13. 升级SpringBoot到最新版本2.2.12
        14. +
        15. 升级poi到最新版本4.1.2
        16. +
        17. 升级bitwalker到最新版本1.21
        18. +
        19. 升级bootstrap-fileinput到最新版本5.1.3
        20. +
        21. 升级bootstrapTable到最新版本v1.18.0
        22. +
        23. 升级bootstrapTable相关组件到最新版本v1.18.0
        24. +
        25. 升级oshi到最新版本v5.3.6
        26. +
        27. 新增示例(标签 & 提示)
        28. +
        29. 添加单据打印示例
        30. +
        31. 修改表格初始参数sortName默认值为undefined
        32. +
        33. 新增表格参数(自定义打印页面模板printPageBuilder)
        34. +
        35. 新增表格参数(是否显示行间隔色striped)
        36. +
        37. 新增表格参数(渲染完成后执行的事件onPostBody)
        38. +
        39. Excel注解支持Image图片导出
        40. +
        41. Excel支持注解align对齐方式
        42. +
        43. Excel支持导入Boolean型数据
        44. +
        45. 主子表操作添加通用addColumn方法
        46. +
        47. 代码生成日期控件区分范围
        48. +
        49. 代码生成数据库文本类型生成表单文本域
        50. +
        51. 修复生成主子表外键名错误
        52. +
        53. 选项卡新增是否刷新属性
        54. +
        55. 修复树表格表头跟表格宽度不同步的问题
        56. +
        57. 表格树加载完成触发tooltip方法
        58. +
        59. 使用widthUnit定义树表格选项单位
        60. +
        61. 修复主子表editColumn序列问题
        62. +
        63. 修复添加全屏在无参数时没有替换url参数问题
        64. +
        65. 弹出层openOptions移动端自适应
        66. +
        67. 防止错误页返回主页出现嵌套问题
        68. +
        69. 设置回显数据字典验证防止空值
        70. +
        71. 其他细节优化
        72. +
        +
        +
        +
        +
        +
        +
        + v4.5.12020.11.18 +
        +
        +
        +
        +
          +
        1. 阻止任意文件下载漏洞
        2. +
        3. 升级shiro到最新版1.7.0 阻止权限绕过漏洞
        4. +
        5. 升级druid到最新版本v1.2.2
        6. +
        7. 新增表格行触发事件(onCheck、onUncheck、onCheckAll、onUncheckAll)
        8. +
        9. 修复多页签关闭非当前选项出现空白问题
        10. +
        11. 代码生成预览支持高亮显示
        12. +
        13. mapperLocations配置支持分隔符
        14. +
        15. 权限信息调整
        16. +
        17. 个人中心头像和上传头像增加默认图片
        18. +
        19. 全局配置类保持和其他应用命名相同
        20. +
        +
        +
        +
        +
        +
        +
        + v4.5.02020.10.20 +
        +
        +
        +
        +
          +
        1. 新增菜单导航显示风格(default为左侧导航菜单,topnav为顶部导航菜单)
        2. +
        3. 菜单&数据权限新增(展开/折叠 全选/全不选 父子联动)
        4. +
        5. 账号密码支持自定义更新周期
        6. +
        7. 初始密码支持自定义修改策略
        8. +
        9. 新增校验用户修改新密码不能与旧密码相同
        10. +
        11. 添加检查密码范围支持的特殊字符包括:~!@#$%^&*()-=_+
        12. +
        13. 注册账号设置默认用户名称及密码最后更新时间
        14. +
        15. 去除用户手机邮箱部门必填验证
        16. +
        17. 新增日期格式化方法
        18. +
        19. 代码生成添加bit类型
        20. +
        21. 树结构加载添加callBack回调方法
        22. +
        23. 修复用户管理页面滚动返回顶部条失效
        24. +
        25. 修复代码生成模板文件上传组件缺少ctx的问题
        26. +
        27. 限制系统内置参数不允许删除
        28. +
        29. 新增表格列宽拖动插件
        30. +
        31. 新增Ajax局部刷新demo
        32. +
        33. 新增是否开启页脚功能
        34. +
        35. 新增表格参数(通过自定义函数设置标题样式headerStyle)
        36. +
        37. 新增表格参数(通过自定义函数设置页脚样式footerStyle)
        38. +
        39. 修复窗体大小改变后浮动提示框失效问题
        40. +
        41. 生成代码补充必填样式
        42. +
        43. 生成页面时不忽略remark属性
        44. +
        45. 字典数据列表页添加关闭按钮
        46. +
        47. Excel注解支持自动统计数据总和
        48. +
        49. 升级springboot到2.1.17 提升安全性
        50. +
        51. 升级pagehelper到最新版1.3.0
        52. +
        53. 升级druid到最新版本v1.2.1
        54. +
        55. 升级fastjson到最新版1.2.74
        56. +
        57. 升级bootstrap-fileinput到最新版本5.1.2
        58. +
        59. 升级oshi到最新版本v5.2.5
        60. +
        61. 表单向导插件更换为jquery-smartwizard
        62. +
        63. 修改主子表提交示例代码防止渲染失效
        64. +
        65. 添加导入数据弹出窗体自定义宽高
        66. +
        67. 用户信息参数返回忽略掉密码字段
        68. +
        69. 优化关闭窗体添加index参数
        70. +
        71. 回显数据字典(字符串数组)增加空值判断
        72. +
        73. 修改前端密码长度校验和错误提示不符问题
        74. +
        75. AjaxResult重写put方法,以方便链式调用
        76. +
        77. 增强验证码校验的语义,更易懂
        78. +
        79. 导入excel整形值校验优化
        80. +
        81. Excel导出类型NUMERIC支持精度浮点类型
        82. +
        83. 导出Excel调整targetAttr获取值方法,防止get方法不规范
        84. +
        85. 输入框组验证错误后置图标提示颜色
        86. +
        87. 上传媒体类型添加视频格式
        88. +
        89. 数据权限判断参数类型
        90. +
        91. 修正数据库字符串类型nvarchar
        92. +
        93. 优化递归子节点
        94. +
        95. 修复多表格搜索formId无效
        96. +
        97. 其他细节优化
        98. +
        +
        +
        +
        +
        +
        +
        + v4.4.02020.08.24 +
        +
        +
        +
        +
          +
        1. 升级bootstrapTable到最新版本1.17.1
        2. +
        3. 升级shiro到最新版1.6.0 阻止权限绕过漏洞
        4. +
        5. 升级fastjson到最新版1.2.73
        6. +
        7. 代码生成支持同步数据库
        8. +
        9. 代码生成支持富文本控件
        10. +
        11. 用户密码支持自定义配置规则
        12. +
        13. 新增表格自动刷新插件
        14. +
        15. 新增表格打印配置插件
        16. +
        17. 更换图片裁剪工具为cropper
        18. +
        19. Excel支持sort导出排序
        20. +
        21. 代码生成支持自定义路径
        22. +
        23. 代码生成支持选择上级菜单
        24. +
        25. 代码生成支持上传控件
        26. +
        27. 新增表格参数(自定义加载文本的字体大小loadingFontSize)
        28. +
        29. Excel注解支持设置BigDecimal精度&舍入规则
        30. +
        31. 操作日志记录排除敏感属性字段
        32. +
        33. 修复不同浏览器附件下载中文名乱码的问题
        34. +
        35. 用户分配角色不允许选择超级管理员角色
        36. +
        37. 更换表格冻结列插件
        38. +
        39. 添加右侧冻结列示例
        40. +
        41. 升级表格行编辑&移动端适应插件
        42. +
        43. 修复更新表格插件后无法设置实例配置问题
        44. +
        45. 修复更新表格插件后导致的主子表错误
        46. +
        47. 修复页面存在多表格,回调函数res数据不正确问题
        48. +
        49. 强退&过期清理登录帐号缓存会话
        50. +
        51. 表格树标题内容支持html语义化标签
        52. +
        53. 修复配置应用的访问路径首页页签重复问题
        54. +
        55. 优化openTab打开时滚动到当前页签
        56. +
        57. 表格请求方式method支持自定义配置
        58. +
        59. 菜单页签联动优化
        60. +
        61. 用户邮箱长度限制修改为50
        62. +
        63. 主子表示例添加日期格式案例
        64. +
        65. 修改表格行内编辑示例旧值参数
        66. +
        67. 操作日志查询方式调整
        68. +
        69. 唯一限制条件只返回单条数据
        70. +
        71. 修改Excel设置STRING单元格类型
        72. +
        73. 添加获取当前的环境配置方法
        74. +
        75. 截取返回参数长度,防止超出异常
        76. +
        77. 定时任务cron表达式验证
        78. +
        79. 拆分表格插件,按需引入
        80. +
        81. 多行文本框补齐必填错误提示背景
        82. +
        83. 其他细节优化
        84. +
        +
        +
        +
        +
        +
        +
        + v4.3.12020.07.05 +
        +
        +
        +
        +
          +
        1. 国家信息安全漏洞(请务必保持cipherKey密钥唯一性)
        2. +
        3. 升级shiro到最新版1.5.3 阻止权限绕过漏洞
        4. +
        5. 修改验证码在使用后清除,防止多次使用
        6. +
        7. 检查字符支持小数点&降级改成异常提醒
        8. +
        9. openOptions函数中加入自定义maxmin属性
        10. +
        11. 支持openOptions方法最大化
        12. +
        13. 支持openOptions方法多个按钮回调
        14. +
        15. 新增isLinkage支持页签与菜单联动
        16. +
        17. 修改代码生成导入表结构出现异常页面不提醒问题
        18. +
        19. 优化用户头像发生错误,则显示一个默认头像
        20. +
        21. Excel导出支持字典类型
        22. +
        +
        +
        +
        +
        +
        +
        + v4.3.02020.06.22 +
        +
        +
        +
        +
          +
        1. 代码生成模板支持主子表
        2. +
        3. 代码生成显示类型支持复选框
        4. +
        5. 前端表单样式修改成圆角
        6. +
        7. 新增回显数据字典(字符串数组)
        8. +
        9. 修复浏览器手动缩放比例后菜单无法自适应问题
        10. +
        11. 限制用户不允许选择系统管理员角色
        12. +
        13. 用户信息添加输入框组图标&鼠标按下显示密码
        14. +
        15. 升级fastjson到最新版1.2.70 修复高危安全漏洞
        16. +
        17. 升级Bootstrap版本到v3.3.7
        18. +
        19. 修复selectColumns方法获取子对象数据无效问题
        20. +
        21. 修改数据源类型优先级,先根据方法,再根据类
        22. +
        23. 修改上级部门(选择项排除本身和下级)
        24. +
        25. 首页菜单显示调整
        26. +
        27. 添加是否开启swagger配置
        28. +
        29. 新增示例(主子表提交)
        30. +
        31. 新增示例(多级联动下拉示例)
        32. +
        33. 新增示例(表格属性data数据加载)
        34. +
        35. 新增表格列参数(是否列选项可见ignore)
        36. +
        37. 新增表格参数(是否启用显示卡片视图cardView)
        38. +
        39. 新增表格参数(是否显示全屏按钮showFullscreen)
        40. +
        41. 新增表格参数(是否启用分页条无限循环的功能paginationLoop)
        42. +
        43. 新增表格参数(是否显示表头showHeader)
        44. +
        45. 表格添加显示/隐藏所有列方法 showAllColumns/hideAllColumns
        46. +
        47. 修复部分情况节点不展开问题
        48. +
        49. 修复关闭标签页后刷新还是上次地址问题
        50. +
        51. 修复选择菜单后刷新页面,菜单箭头显示不对问题
        52. +
        53. 修复jquery表单序列化时复选框未选中不会序列化到对象中问题
        54. +
        55. Excel支持readConverterExp读取字符串组内容
        56. +
        57. 更换IP地址查询接口
        58. +
        59. 默认关闭获取ip地址
        60. +
        61. 操作处理ajaxSuccess判断修正
        62. +
        63. HttpUtils.sendPost()方法,参数无需拼接参数到url
        64. +
        65. 通用http发送方法增加参数 contentType 编码类型
        66. +
        67. HTML过滤器不替换&实体
        68. +
        69. 代码生成浮点型改用BigDecimal
        70. +
        71. 修复表单构建单选和多选框渲染问题
        72. +
        73. 代码生成模板调整,字段为String并且必填则加空串条件
        74. +
        75. 字典数据查询列表根据dictSort升序排序
        76. +
        77. 修复树表对imageView和tooltip方法无效问题
        78. +
        79. 修复Long类型比较相等问题调整
        80. +
        81. 示例demo页面清除html链接,防止点击后跳转出现404
        82. +
        83. 在线用户强退方法合并
        84. +
        85. 添加校验部门包含未停用的子部门
        86. +
        87. 取消回车自动提交表单
        88. +
        89. 'A','I','BUTTON' 标签忽略clickToSelect事件,防止点击操作按钮时选中
        90. +
        91. 邮箱显示截取部分字符串,防止低分辨率错位
        92. +
        93. 代码生成列属性根据sort排序
        94. +
        95. 修复更多操作部分浏览器不兼容情况
        96. +
        97. 图片预览事件属性修正
        98. +
        99. 修复冻结列排序样式无效问题
        100. +
        101. 修复context-path的情况下个人中心刷新导致样式问题
        102. +
        103. 全屏editFull打开适配表树
        104. +
        105. 其他细节优化
        106. +
        +
        +
        +
        +
        +
        +
        + v4.2.02020.03.23 +
        +
        +
        +
        +
          +
        1. 用户管理添加分配角色页面
        2. +
        3. 定时任务添加调度日志按钮
        4. +
        5. 新增是否开启用户注册功能
        6. +
        7. 新增页面滚动显示返回顶部按钮
        8. +
        9. 用户&角色&任务添加更多操作按钮
        10. +
        11. iframe框架页会话过期弹出超时提示
        12. +
        13. 移动端登录不显示左侧菜单
        14. +
        15. 侧边栏添加一套深蓝色主题
        16. +
        17. 首页logo固定,不随菜单滚动
        18. +
        19. 支持mode配置history(表示去掉地址栏的#)
        20. +
        21. 任务分组字典翻译(调度日志详细)
        22. +
        23. 字典管理添加缓存读取
        24. +
        25. 字典数据列表标签显示样式
        26. +
        27. 参数管理支持缓存操作
        28. +
        29. 日期控件清空结束时间设置开始默认值为2099-12-31
        30. +
        31. 表格树添加获取数据后响应回调处理
        32. +
        33. 批量替换表前缀调整
        34. +
        35. 支持表格导入模板的弹窗表单加入其它输入控件
        36. +
        37. 表单重置刷新表格树
        38. +
        39. 新增支持导出数据字段排序
        40. +
        41. 新增表格参数(是否单选checkbox)
        42. +
        43. druid未授权不允许访问
        44. +
        45. 表格树父节点兼容0,'0','',null
        46. +
        47. 表单必填的项添加星号
        48. +
        49. 修复select2不显示校验错误信息
        50. +
        51. 添加自定义HTML过滤器
        52. +
        53. 修复多数据源下开关关闭出现异常问题
        54. +
        55. 修复翻页记住选择项数据问题
        56. +
        57. 用户邮箱长度限制20
        58. +
        59. 修改错误页面返回主页出现嵌套问题
        60. +
        61. 表格浮动提示单双引号转义
        62. +
        63. 支持配置四级菜单
        64. +
        65. 升级shiro到最新版1.4.2 阻止rememberMe漏洞攻击
        66. +
        67. 升级summernote到最新版本v0.8.12
        68. +
        69. 导入Excel根据dateFormat属性格式处理
        70. +
        71. 修复War部署无法正常shutdown,ehcache内存泄漏
        72. +
        73. 修复代码生成短字段无法识别问题
        74. +
        75. 修复serviceImpl模版,修改方法判断日期错误
        76. +
        77. 代码生成模板增加导出功能日志记录
        78. +
        79. 代码生成唯一编号调整为tableId
        80. +
        81. 代码生成查询时忽略大小写
        82. +
        83. 代码生成支持翻页记住选中
        84. +
        85. 代码生成表注释未填写也允许导入
        86. +
        87. Global全局配置类修改为注解,防止多环境配置下读取问题
        88. +
        89. 修复多表格情况下,firstLoad只对第一个表格生效
        90. +
        91. 处理Maven打包出现警告问题
        92. +
        93. 默认主题样式,防止网速慢情况下出现空白
        94. +
        95. 修复文件上传多级目录识别问题
        96. +
        97. 锚链接解码url,防止中文导致页面不能加载问题
        98. +
        99. 修复右键Tab页刷新事件重复请求问题
        100. +
        101. 角色禁用&菜单隐藏不查询权限
        102. +
        103. 其他细节优化
        104. +
        +
        +
        +
        +
        +
        +
        + v4.1.02019.10.22 +
        +
        +
        +
        +
          +
        1. 支持多表格实例操作
        2. +
        3. 浮动提示方法tooltip支持弹窗
        4. +
        5. 代码生成&字典数据支持模糊条件查询
        6. +
        7. 增加页签全屏方法
        8. +
        9. 增加清除表单验证错误信息方法
        10. +
        11. 支持iframe局部刷新页面
        12. +
        13. 支持在线切换主题
        14. +
        15. 修改图片预览设置的高宽参数颠倒问题
        16. +
        17. 操作日志新增解锁账户功能
        18. +
        19. 管理员用户&角色不允许操作
        20. +
        21. 去掉jsoup包调用自定义转义工具
        22. +
        23. 添加时间轴示例
        24. +
        25. 修复翻页记住选择时获取指定列值的问题
        26. +
        27. 代码生成sql脚本添加导出按钮
        28. +
        29. 添加表格父子视图示例
        30. +
        31. 添加表格行内编辑示例
        32. +
        33. 升级fastjson到最新版1.2.60 阻止漏洞攻击
        34. +
        35. 升级echarts到最新版4.2.1
        36. +
        37. 操作日志新增返回参数
        38. +
        39. 支持mybatis通配符扫描任意多个包
        40. +
        41. 权限验证多种情况处理
        42. +
        43. 修复树形类型的代码生成的部分必要属性无法显示
        44. +
        45. 修复非表格插件情况下重置出现异常
        46. +
        47. 修复富文本编辑器有序列表冲突
        48. +
        49. 代码生成表前缀配置支持多个
        50. +
        51. 修复自动去除表前缀配置无效问题
        52. +
        53. 菜单列表按钮数据可见不显示(权限标识控制)
        54. +
        55. 修复设置会话超时时间无效问题
        56. +
        57. 新增本地资源通用下载方法
        58. +
        59. 操作日志记录新增请求方式
        60. +
        61. 代码生成单选按钮属性重名修复
        62. +
        63. 优化select2下拉框宽度不会随浏览器改变
        64. +
        65. 修复代码生成树表异常
        66. +
        67. 其他细节优化
        68. +
        +
        +
        +
        +
        +
        +
        + v4.0.02019.08.08 +
        +
        +
        +
        +
          +
        1. 代码生成支持预览、编辑,保存方案
        2. +
        3. 新增防止表单重复提交注解
        4. +
        5. 新增后端校验(和前端保持一致)
        6. +
        7. 新增同一个用户最大会话数控制
        8. +
        9. Excel导出子对象支持多个字段
        10. +
        11. 定时任务支持静态调用和多参数
        12. +
        13. 定时任务增加分组条件查询
        14. +
        15. 字典类型增加任务分组数据
        16. +
        17. 新增表格是否首次加载数据
        18. +
        19. 新增parentTab选项卡可在同一页签打开
        20. +
        21. 多数据源支持类注解(允许继承父类的注解)
        22. +
        23. 部门及以下数据权限(调整为以下及所有子节点)
        24. +
        25. 新增角色数据权限配(仅本人数据权限)
        26. +
        27. 修改菜单权限显示问题
        28. +
        29. 上传文件修改路径及返回名称
        30. +
        31. 添加报表插件及示例
        32. +
        33. 添加首页统计模板
        34. +
        35. 添加表格拖拽示例
        36. +
        37. 添加卡片列表示例
        38. +
        39. 添加富文本编辑器示例
        40. +
        41. 添加表格动态增删改查示例
        42. +
        43. 添加用户页面岗位选择框提示
        44. +
        45. 点击菜单操作添加背景高亮显示
        46. +
        47. 表格树新增showSearch是否显示检索信息
        48. +
        49. 解决表格列设置sortName无效问题
        50. +
        51. 表格图片预览支持自定义设置宽高
        52. +
        53. 添加表格列浮动提示(单击文本复制)
        54. +
        55. PC端收起菜单后支持浮动显示
        56. +
        57. 详细操作样式调整
        58. +
        59. 修改用户更新描述空串不更新问题
        60. +
        61. 导入修改为模板渲染
        62. +
        63. 修改菜单及部门排序规则
        64. +
        65. 角色导出数据范围表达式翻译
        66. +
        67. 添加summernote富文本字体大小
        68. +
        69. 优化表格底部下边框防重叠&汇总像素问题
        70. +
        71. 树表格支持属性多层级访问
        72. +
        73. 修复IE浏览器用户管理界面右侧留白问题
        74. +
        75. 重置按钮刷新表格
        76. +
        77. 重置密码更新用户缓存
        78. +
        79. 优化验证码属性参数
        80. +
        81. 支持数据监控配置用户名和密码
        82. +
        83. 文件上传修改按钮背景及加载动画
        84. +
        85. 支持配置一级菜单href跳转
        86. +
        87. 侧边栏添加一套浅色主题
        88. +
        89. 树表格添加回调函数(校验异常状态)
        90. +
        91. 用户个人中心适配手机端显示
        92. +
        93. Excel支持设置导出类型&更换样式
        94. +
        95. 检查属性改变修改为克隆方式(防止热部署强转异常)
        96. +
        97. 其他细节优化
        98. +
        +
        +
        +
        +
        +
        +
        + v3.4.02019.06.03 +
        +
        +
        +
        +
          +
        1. 新增实例演示菜单及demo
        2. +
        3. 新增页签右键操作
        4. +
        5. 菜单管理新增打开方式
        6. +
        7. 新增点击某行触发的事件
        8. +
        9. 新增双击某行触发的事件
        10. +
        11. 新增单击某格触发的事件
        12. +
        13. 新增双击某格触发的事件
        14. +
        15. 新增是否启用显示细节视图
        16. +
        17. 支持上传任意格式文件
        18. +
        19. 修复角色权限注解失效问题
        20. +
        21. 左侧的菜单栏宽度调整
        22. +
        23. 新增响应完成后自定义回调函数
        24. +
        25. 支持前端及其他模块直接获取用户信息
        26. +
        27. 升级swagger到最新版2.9.2
        28. +
        29. 升级jquery.slimscroll到最新版1.3.8
        30. +
        31. 升级select2到最新版4.0.7
        32. +
        33. 新增角色配置本部门数据权限
        34. +
        35. 新增角色配置本部门及以下数据权限
        36. +
        37. 优化底部操作防止跳到页面顶端
        38. +
        39. 修改冻结列选框无效及样式问题
        40. +
        41. 修复部门四层级修改祖级无效问题
        42. +
        43. 更换开关切换按钮样式
        44. +
        45. 新增select2-bootstrap美化下拉框
        46. +
        47. 添加表格内图片预览方法
        48. +
        49. 修复权限校验失败跳转页面路径错误
        50. +
        51. 国际化资源文件调整
        52. +
        53. 通知公告布局调整
        54. +
        55. 删除页签操作功能
        56. +
        57. 表格树新增查询指定列值
        58. +
        59. 更改系统接口扫描方式及完善测试案例
        60. +
        61. 表格列浮动提示及字典回显默认去背景
        62. +
        63. 修复启用翻页记住前面的选择check没选中问题
        64. +
        65. 去除监控页面底部的广告
        66. +
        67. 日期控件功问题修复及data功能增强
        68. +
        69. 新增角色权限可见性(前端直接调用)
        70. +
        71. 新增获取当前登录用户方法(前端及子模块调用)
        72. +
        73. 修复热部署重启导致菜单丢失问题
        74. +
        75. 优化业务校验失败普通请求跳转页面
        76. +
        77. 操作日志新增状态条件查询
        78. +
        79. 操作类型支持多选条件查询
        80. +
        81. 通知公告防止滚动触底回弹优化
        82. +
        83. 其他细节优化
        84. +
        +
        +
        +
        +
        +
        +
        + v3.3.02019.04.01 +
        +
        +
        +
        +
          +
        1. 新增线程池统一管理
        2. +
        3. 新增支持左右冻结列
        4. +
        5. 新增表格字符超长浮动提示
        6. +
        7. 升级datepicker拓展并汉化
        8. +
        9. 升级druid到最新版本v1.1.14
        10. +
        11. 修复个人头像为图片服务器跨域问题
        12. +
        13. 修改上传文件按日期存储
        14. +
        15. 新增表格客户端分页选项
        16. +
        17. 新增表格的高度参数
        18. +
        19. 新增表格销毁方法
        20. +
        21. 新增表格下拉按钮切换方法
        22. +
        23. 新增表格分页跳转到指定页码
        24. +
        25. 新增表格启用点击选中行参数
        26. +
        27. 修复表格数据重新加载未触发部分按钮禁用
        28. +
        29. 使用jsonview展示操作日志参数
        30. +
        31. 新增方法(addTab、editTab)
        32. +
        33. 修改用户管理界面为Tab打开方式
        34. +
        35. 表单验证代码优化
        36. +
        37. 修复@Excel注解 prompt 属性使用报错
        38. +
        39. 修复combo属性Excel兼容性问题
        40. +
        41. 新增@Excel导入导出支持父类字段
        42. +
        43. 修复关闭最后选项卡无法激活滚动问题
        44. +
        45. 增加日期控件显示类型及回显格式扩展选项
        46. +
        47. 修复定时任务执行失败后入库状态为成功状态
        48. +
        49. 支持定时任务并发开关控制
        50. +
        51. 优化权限校验失败普通请求跳转页面
        52. +
        53. 捕获线程池执行任务抛出的异常
        54. +
        55. 修复IE浏览器导出功能报错
        56. +
        57. 新增角色管理分配用户功能
        58. +
        59. 新增表格翻页记住前面的选择
        60. +
        61. 调整用户个人中心页面
        62. +
        63. 修复界面存在的一些安全问题
        64. +
        65. 其他细节优化
        66. +
        +
        +
        +
        +
        +
        +
        + v3.2.02019.01.18 +
        +
        +
        +
        +
          +
        1. 部门修改时不允许选择最后节点
        2. +
        3. 修复部门菜单排序字段无效
        4. +
        5. 修复光驱磁盘导致服务监控异常
        6. +
        7. 登录界面去除check插件
        8. +
        9. 验证码文本字符间距修正
        10. +
        11. 升级SpringBoot到最新版本2.1.1
        12. +
        13. 升级MYSQL驱动
        14. +
        15. 修正登录必填项位置偏移
        16. +
        17. Session会话检查优化
        18. +
        19. Excel注解支持多级获取
        20. +
        21. 新增序列号生成方法
        22. +
        23. 修复WAR部署tomcat退出线程异常
        24. +
        25. 全屏操作增加默认确认/关闭
        26. +
        27. 修复个人信息可能导致漏洞
        28. +
        29. 字典数据根据下拉选择新增类型
        30. +
        31. 升级Summernote到最新版本v0.8.11
        32. +
        33. 新增用户数据导入
        34. +
        35. 首页主题样式更换
        36. +
        37. layer扩展主题更换
        38. +
        39. 用户管理移动端默认隐藏左侧布局
        40. +
        41. 详细信息弹出层显示在顶层
        42. +
        43. 表格支持切换状态(用户/角色/定时任务)
        44. +
        45. Druid数据源支持配置继承
        46. +
        47. 修正部分iPhone手机端表格适配问题
        48. +
        49. 新增防止重复提交表单方法
        50. +
        51. 新增表格数据统计汇总方法
        52. +
        53. 支持富文本上传图片文件
        54. +
        +
        +
        +
        +
        +
        +
        + v3.1.02018.12.03 +
        +
        +
        +
        +
          +
        1. 新增内网不获取IP地址
        2. +
        3. 新增cron表达式有效校验
        4. +
        5. 定时任务新增详细信息
        6. +
        7. 定时任务默认策略修改(不触发立即执行)
        8. +
        9. 定时任务显示下一个执行周期
        10. +
        11. 支持前端任意日期格式处理
        12. +
        13. 上传头像删除多余提交按钮
        14. +
        15. 表格增加行间隔色配置项
        16. +
        17. 表格增加转义HTML字符串配置项
        18. +
        19. 表格增加显示/隐藏指定列
        20. +
        21. 代码生成优化
        22. +
        23. 操作日志参数格式化显示
        24. +
        25. 页签新增新增全屏显示
        26. +
        27. 新增一键打包部署
        28. +
        29. Excel注解新增多个参数
        30. +
        31. 新增提交静默更新表格方法
        32. +
        33. 新增服务监控菜单
        34. +
        +
        +
        +
        +
        +
        +
        + v3.0.02018.10.08 +
        +
        +
        +
        +
          +
        1. 升级poi到最新版3.17
        2. +
        3. 导出修改临时目录绝对路径
        4. +
        5. 升级laydate到最新版5.0.9
        6. +
        7. 升级SpringBoot到最新版本2.0.5
        8. +
        9. 优化开始/结束时间校验限制
        10. +
        11. 重置密码参数表中获取默认值
        12. +
        13. 修复头像修改显示问题
        14. +
        15. 新增数据权限过滤注解
        16. +
        17. 新增表格检索折叠按钮
        18. +
        19. 新增清空(登录、操作、调度)日志
        20. +
        21. 固定按钮位置(提交/关闭)
        22. +
        23. 部门/菜单支持(展开/折叠)
        24. +
        25. 部分细节调整优化
        26. +
        27. 项目采用分模块
        28. +
        +
        +
        +
        +
        +
        +
        + v2.4.02018.09.03 +
        +
        +
        +
        +
          +
        1. 支持部门多级查询
        2. +
        3. 修复菜单状态查询无效
        4. +
        5. 支持IP地址开关
        6. +
        7. 支持XSS开关
        8. +
        9. 记录日志异步处理
        10. +
        11. 字典回显样式更改为下拉框
        12. +
        13. 菜单类型必填校验
        14. +
        15. 修复在线用户排序报错
        16. +
        17. 增加重置按钮
        18. +
        19. 支持注解导入数据
        20. +
        21. 支持弹层外区域关闭
        22. +
        23. 备注更换为文本区域
        24. +
        25. 新增角色逻辑删除
        26. +
        27. 新增部门逻辑删除
        28. +
        29. 支持部门数据权限
        30. +
        31. 管理员默认拥有所有授权
        32. +
        33. 字典数据采用分页
        34. +
        35. 部分细节调整优化
        36. +
        +
        +
        +
        +
        +
        +
        + v2.3.02018.08.06 +
        +
        +
        +
        +
          +
        1. 支持表格不分页开关控制
        2. +
        3. 修改字典类型同步修改字典数据
        4. +
        5. 代码生成新增修改后缀处理
        6. +
        7. 代码生成新增实体toString
        8. +
        9. 代码生成非字符串去除!=''
        10. +
        11. 导出数据前加载遮罩层
        12. +
        13. 部门删除校验条件修改
        14. +
        15. 搜索查询下载优化
        16. +
        17. 手机打开弹出层自适应
        18. +
        19. 角色岗位禁用显示置灰
        20. +
        21. 角色禁用不显示菜单
        22. +
        23. 新增导出权限
        24. +
        25. 角色权限唯一校验
        26. +
        27. 岗位名称编码唯一校验
        28. +
        29. TreeTable优化
        30. +
        31. 支持多数据源
        32. +
        33. 其他细节优化
        34. +
        +
        +
        +
        +
        +
        +
        + v2.2.02018.07.23 +
        +
        +
        +
        +
          +
        1. 修复批量生成代码异常问题
        2. +
        3. 修复定时器保存失败问题
        4. +
        5. 修复热部署转换问题
        6. +
        7. 支持查询菜单管理,部门管理
        8. +
        9. 大多数功能支持时间查询
        10. +
        11. 自定义导出注解自动匹配column
        12. +
        13. 新增任务执行策略
        14. +
        15. 操作详细动态显示类型
        16. +
        17. 支持动态回显字典数据
        18. +
        19. 后台代码优化调整
        20. +
        21. 其他细节优化
        22. +
        +
        +
        +
        +
        +
        +
        + v2.1.02018.07.10 +
        +
        +
        +
        +
          +
        1. 新增登录超时提醒
        2. +
        3. 修复定时器热部署转换问题
        4. +
        5. 修复登录验证码校验无效问题
        6. +
        7. 定时任务新增立即执行一次
        8. +
        9. 存在字典数据不允许删除字典
        10. +
        11. 字典数据支持按名称查询
        12. +
        13. 代码生成增加日志注解&表格优化
        14. +
        15. 修复用户逻辑删除后能登录问题
        16. +
        17. 表格支持多字段动态排序
        18. +
        19. 支持三级菜单显示
        20. +
        21. 新增ry.sh启动程序脚本
        22. +
        23. 其他细节优化
        24. +
        +
        +
        +
        +
        +
        +
        + v2.0.02018.07.02 +
        +
        +
        +
        +
          +
        1. 升级SpringBoot到最新版本2.0.3
        2. +
        3. 新增公告管理
        4. +
        5. 表单校验示提体验优化
        6. +
        7. 前端通用方法封装调整
        8. +
        9. 前端去除js文件,合并到html
        10. +
        11. 操作加载遮罩层
        12. +
        13. 支持全屏模式操作
        14. +
        15. 支持注解导出数据
        16. +
        17. 系统支持多查询&下载
        18. +
        19. 系统样式调整
        20. +
        +
        +
        +
        +
        +
        +
        + v1.1.62018.06.04 +
        +
        +
        +
        +
          +
        1. 新增用户列表部门列
        2. +
        3. 新增登录地点
        4. +
        5. 新增swagger
        6. +
        7. 修复排序数字校验
        8. +
        9. 优化头像上传文件类型限定为图片
        10. +
        11. 新增XSS过滤
        12. +
        13. 新增热部署提高开发效率
        14. +
        15. 修复treegrid居中无效
        16. +
        17. 角色多条件查询
        18. +
        +
        +
        +
        +
        +
        +
        + v1.1.52018.05.28 +
        +
        +
        +
        +
          +
        1. 优化登录失败刷新验证码
        2. +
        3. 新增用户登录地址时间
        4. +
        5. 修复ajax超时退出问题
        6. +
        7. 新增html调用数据字典(若依首创)
        8. +
        9. 调整系统部分样式
        10. +
        11. 新增用户逻辑删除
        12. +
        13. 新增管理员不允许删除修改
        14. +
        15. 升级bootstrapTable到最新版本1.12.1
        16. +
        17. 升级layer到最新版本3.1.1
        18. +
        +
        +
        +
        +
        +
        +
        + v1.1.42018.05.20 +
        +
        +
        +
        +
          +
        1. 新增参数管理
        2. +
        3. 修复头像上传bug
        4. +
        5. 手机邮箱唯一校验
        6. +
        7. 支持手机邮箱登录
        8. +
        9. 代码生成优化
        10. +
        11. 支持模糊查询
        12. +
        13. 支持切换主题皮肤
        14. +
        15. 修改权限即时生效
        16. +
        17. 修复页签Tab关闭问题
        18. +
        +
        +
        +
        +
        +
        +
        + v1.1.32018.05.14 +
        +
        +
        +
        +
          +
        1. 新增验证码(数组计算、字符验证)
        2. +
        3. 新增cookie记住我
        4. +
        5. 新增头像上传
        6. +
        7. 用户名密码长度限制
        8. +
        9. 通用字段提取
        10. +
        11. 支持自定义条件查询
        12. +
        13. 部门名称必填、时间格式调整
        14. +
        15. 其他细节优化
        16. +
        +
        +
        +
        +
        +
        +
        + v1.1.22018.05.07 +
        +
        +
        +
        +
          +
        1. 新增个人信息修改
        2. +
        3. 菜单存在子菜单不允许删除
        4. +
        5. 菜单分配角色不允许删除
        6. +
        7. 角色分配人员不允许删除
        8. +
        9. 岗位使用后不允许删除
        10. +
        11. 保证用户的数据完整性加入事物
        12. +
        13. 新增环境使用手册、数据建模
        14. +
        15. Thymeleaf升级到3.0
        16. +
        17. 支持非ROOT部署
        18. +
        +
        +
        +
        +
        +
        +
        + v1.1.12018.04.23 +
        +
        +
        +
        +
          +
        1. 新增表单构建器
        2. +
        3. 代码生成优化
        4. +
        5. 支持新增主部门
        6. +
        7. 支持选择上级部门、上级菜单
        8. +
        9. 新增字典管理单条删除
        10. +
        11. 优化一些其他细节
        12. +
        +
        +
        +
        +
        +
        +
        + v1.1.02018.04.20 +
        +
        +
        +
        +
          +
        1. 支持密码盐
        2. +
        3. 支持新增主目录
        4. +
        5. 支持批量生成代码
        6. +
        7. 支持表格导出(csv、txt、doc、excel)
        8. +
        9. 自动适应宽高模式窗体
        10. +
        11. 重复校验(角色名、菜单名、部门名)
        12. +
        13. 优化一些其他细节
        14. +
        +
        +
        +
        +
        +
        +
        + v1.0.92018.04.14 +
        +
        +
        +
        +
          +
        1. 新增代码生成(生成包括 java、html、js、xml、sql)
        2. +
        3. 新增按钮权限控制隐藏(若依首创)
        4. +
        +
        +
        +
        +
        +
        +
        + v1.0.82018.04.08 +
        +
        +
        +
        +
          +
        1. 新增定时任务(新增、修改、删除、查询、启动/暂停)
        2. +
        3. 新增调度日志(查询、删除)
        4. +
        +
        +
        +
        +
        +
        +
        + v1.0.72018.04.04 +
        +
        +
        +
        +
          +
        1. 新增岗位管理(新增、修改、删除、查询)
        2. +
        3. 优化用户管理,菜单管理部分细节
        4. +
        +
        +
        +
        +
        +
        +
        + v1.0.62018.03.15 +
        +
        +
        +
        +
          +
        1. 新增字典管理(新增、删除、修改、查询、数据选择)
        2. +
        3. 新增用户密码重置
        4. +
        5. 优化一些其他细节
        6. +
        +
        +
        +
        +
        +
        +
        + v1.0.52018.03.12 +
        +
        +
        +
        +
          +
        1. 新增菜单管理(新增、删除、修改、查询、图标选择)
        2. +
        3. 部门管理优化(添加责任人、联系电话、邮箱、修改者)
        4. +
        +
        +
        +
        +
        +
        +
        + v1.0.42018.03.11 +
        +
        +
        +
        +
          +
        1. 新增角色管理(新增、删除、修改、查询、菜单选择)
        2. +
        +
        +
        +
        +
        +
        +
        + v1.0.32018.03.08 +
        +
        +
        +
        +
          +
        1. 新增用户管理(新增、删除、修改、查询、部门选择)
        2. +
        +
        +
        +
        +
        +
        +
        + v1.0.22018.03.04 +
        +
        +
        +
        +
          +
        1. 新增部门管理 (新增、删除、修改、查询)
        2. +
        +
        +
        +
        +
        +
        +
        + v1.0.12018.03.03 +
        +
        +
        +
        +
          +
        1. 新增在线用户 (批量强退、单条强退、查询)
        2. +
        3. 新增登录日志 (批量删除、查询)
        4. +
        5. 新增操作日志 (批量删除、查询、详细)
        6. +
        7. 新增数据监控 (监控DB池连接和SQL的执行)
        8. +
        +
        +
        +
        +
        +
        +

        + v1.0.02018.03.01 +

        +
        +
        +
        +
          +
        1. 若依管理系统正式发布。
        2. +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        捐赠
        +
        +
        +
        + 请作者喝杯咖啡(点击图片放大) +
        +

        + 请使用手机支付宝或者微信扫码支付 + +

        + +
        +
        +
        +
        +
        + + + + + + diff --git a/src/main/resources/templates/monitor/cache/cache.html b/src/main/resources/templates/monitor/cache/cache.html new file mode 100644 index 0000000..a178f1a --- /dev/null +++ b/src/main/resources/templates/monitor/cache/cache.html @@ -0,0 +1,184 @@ + + + + + + +
        + +
        +
        +
        +
        +
        +
        缓存列表
        +
        + +
        +
        +
        + + + + + + + + + + + + + + + +
        缓存名称操作
        [[${stat.index + 1}]][[${cacheName}]]
        +
        +
        +
        +
        +
        +
        +
        键名列表
        +
        + +
        +
        +
        + + + + + + + + + + + + + + + + +
        缓存键名操作
        [[${stat.index + 1}]][[${cacheKey}]]
        +
        +
        +
        +
        +
        +
        +
        缓存内容
        + +
        +
        +
        +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/monitor/job/add.html b/src/main/resources/templates/monitor/job/add.html new file mode 100644 index 0000000..253af03 --- /dev/null +++ b/src/main/resources/templates/monitor/job/add.html @@ -0,0 +1,108 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + Bean调用示例:ryTask.ryParams('ry') + Class类调用示例:com.archive.quartz.task.RyTask.ryParams('ry') + 参数说明:支持字符串,布尔类型,长整型,浮点型,整型 +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + +
        +
        +
        + +
        + + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/monitor/job/cron.html b/src/main/resources/templates/monitor/job/cron.html new file mode 100644 index 0000000..2d4b36f --- /dev/null +++ b/src/main/resources/templates/monitor/job/cron.html @@ -0,0 +1,1172 @@ + + + + + + Cron表达式在线生成 + + + + +
        +
        + +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        +
        +

        表达式

        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        分钟小时星期
        表达式字段
        Cron 表达式
        +
        + + + +
        +
        +
        +
        + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/monitor/job/detail.html b/src/main/resources/templates/monitor/job/detail.html new file mode 100644 index 0000000..730fa81 --- /dev/null +++ b/src/main/resources/templates/monitor/job/detail.html @@ -0,0 +1,99 @@ + + + + + + +
        + +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        默认策略
        +
        立即执行
        +
        执行一次
        +
        放弃执行
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        + + \ No newline at end of file diff --git a/src/main/resources/templates/monitor/job/edit.html b/src/main/resources/templates/monitor/job/edit.html new file mode 100644 index 0000000..ce212e5 --- /dev/null +++ b/src/main/resources/templates/monitor/job/edit.html @@ -0,0 +1,110 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + Bean调用示例:ryTask.ryParams('ry') + Class类调用示例:com.archive.quartz.task.RyTask.ryParams('ry') + 参数说明:支持字符串,布尔类型,长整型,浮点型,整型 +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + +
        +
        +
        + +
        + + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/monitor/job/job.html b/src/main/resources/templates/monitor/job/job.html new file mode 100644 index 0000000..eb7af59 --- /dev/null +++ b/src/main/resources/templates/monitor/job/job.html @@ -0,0 +1,181 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 任务名称: +
        • +
        • + 任务分组: +
        • +
        • + 任务状态: +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/monitor/job/jobLog.html b/src/main/resources/templates/monitor/job/jobLog.html new file mode 100644 index 0000000..39684d6 --- /dev/null +++ b/src/main/resources/templates/monitor/job/jobLog.html @@ -0,0 +1,135 @@ + + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 任务名称: +
        • +
        • + 任务分组: +
        • +
        • + 执行状态: +
        • +
        • + + + - + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/monitor/logininfor/logininfor.html b/src/main/resources/templates/monitor/logininfor/logininfor.html new file mode 100644 index 0000000..5208881 --- /dev/null +++ b/src/main/resources/templates/monitor/logininfor/logininfor.html @@ -0,0 +1,133 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        • + + + - + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/monitor/online/online.html b/src/main/resources/templates/monitor/online/online.html new file mode 100644 index 0000000..158126e --- /dev/null +++ b/src/main/resources/templates/monitor/online/online.html @@ -0,0 +1,152 @@ + + + + + + +
        +
        +
        +
        +
        + +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/monitor/operlog/detail.html b/src/main/resources/templates/monitor/operlog/detail.html new file mode 100644 index 0000000..02c5db6 --- /dev/null +++ b/src/main/resources/templates/monitor/operlog/detail.html @@ -0,0 +1,74 @@ + + + + + + + +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        + +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/monitor/operlog/operlog.html b/src/main/resources/templates/monitor/operlog/operlog.html new file mode 100644 index 0000000..a383e46 --- /dev/null +++ b/src/main/resources/templates/monitor/operlog/operlog.html @@ -0,0 +1,169 @@ + + + + + + + +
        +
        +
        +
        +
        +
          +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        • + + + - + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/monitor/server/server.html b/src/main/resources/templates/monitor/server/server.html new file mode 100644 index 0000000..8cd1c7b --- /dev/null +++ b/src/main/resources/templates/monitor/server/server.html @@ -0,0 +1,254 @@ + + + + + + +
        +
        +
        +
        +
        +
        +
        CPU
        +
        + + + +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + +
        属性
        核心数0个
        用户使用率0%
        系统使用率0%
        当前空闲率0%
        +
        +
        +
        + +
        +
        +
        +
        内存
        +
        + + +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        属性内存JVM
        总内存0GB0MB
        已用内存0GB0MB
        剩余内存0GB0MB
        使用率[[${server.mem.usage}]]%[[${server.jvm.usage}]]%
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        服务器信息
        + +
        +
        +
        +
        + + + + + + + + + + + + + + + +
        服务器名称archive操作系统Linux
        服务器IP127.0.0.1系统架构amd64
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        Java虚拟机信息
        + +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + + + + + +
        Java名称JavaJava版本1.8.0
        启动时间2018-12-31 00:00:00运行时长0天0时0分0秒
        安装路径
        项目路径
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        磁盘状态
        + +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + + + + + +
        盘符路径文件系统盘符类型总大小可用大小已用大小已用百分比
        C:\NTFSlocal0GB0GB0GB[[${sysFile.usage}]]%
        +
        +
        +
        +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/plugins/pdfjs/web/viewer.html b/src/main/resources/templates/plugins/pdfjs/web/viewer.html new file mode 100644 index 0000000..2459b9b --- /dev/null +++ b/src/main/resources/templates/plugins/pdfjs/web/viewer.html @@ -0,0 +1,394 @@ + + + + + + + + + PDF.js viewer + + + + + + + + + + + + + + + +
        + +
        +
        +
        + + + +
        +
        +
        +
        +
        + + +
        + +
        + +
        + + + + +
        +
        +
        +
        + +
        + +
        + +
        + +
        + + +
        +
        + + + + + + + + + Current View + + +
        + + +
        +
        +
        + +
        + +
        + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + + + + + + + + +
        +
        +
        + + +
        + + + +
        +
        + + + diff --git a/src/main/resources/templates/register.html b/src/main/resources/templates/register.html new file mode 100644 index 0000000..0cab40d --- /dev/null +++ b/src/main/resources/templates/register.html @@ -0,0 +1,83 @@ + + + + + + 注册若依系统 + + + + + + + + + + + + + + +
        +
        +
        + +
        +
        +
        +

        注册:

        +

        你若不离不弃,我必生死相依

        + + + +
        +
        + +
        +
        + + + +
        +
        +
        + + 使用条款 +
        + +
        +
        +
        + +
        + + + + + + + + + + + + + diff --git a/src/main/resources/templates/skin.html b/src/main/resources/templates/skin.html new file mode 100644 index 0000000..7bb76c2 --- /dev/null +++ b/src/main/resources/templates/skin.html @@ -0,0 +1,165 @@ + + + + + + + 主题选择 + + + + + + + + + + + + + diff --git a/src/main/resources/templates/system/config/add.html b/src/main/resources/templates/system/config/add.html new file mode 100644 index 0000000..388ddd1 --- /dev/null +++ b/src/main/resources/templates/system/config/add.html @@ -0,0 +1,82 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/config/config.html b/src/main/resources/templates/system/config/config.html new file mode 100644 index 0000000..fa38a75 --- /dev/null +++ b/src/main/resources/templates/system/config/config.html @@ -0,0 +1,144 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 参数名称: +
        • +
        • + 参数键名: +
        • +
        • + 系统内置: +
        • +
        • + + + - + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/config/edit.html b/src/main/resources/templates/system/config/edit.html new file mode 100644 index 0000000..cb7e202 --- /dev/null +++ b/src/main/resources/templates/system/config/edit.html @@ -0,0 +1,86 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/dept/add.html b/src/main/resources/templates/system/dept/add.html new file mode 100644 index 0000000..9b51930 --- /dev/null +++ b/src/main/resources/templates/system/dept/add.html @@ -0,0 +1,128 @@ + + + + + + +
        +
        + +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/dept/dept.html b/src/main/resources/templates/system/dept/dept.html new file mode 100644 index 0000000..56d94e3 --- /dev/null +++ b/src/main/resources/templates/system/dept/dept.html @@ -0,0 +1,112 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 部门名称: +
        • +
        • + 部门状态: +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/dept/edit.html b/src/main/resources/templates/system/dept/edit.html new file mode 100644 index 0000000..3f0f594 --- /dev/null +++ b/src/main/resources/templates/system/dept/edit.html @@ -0,0 +1,141 @@ + + + + + + +
        +
        + + +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/dept/tree.html b/src/main/resources/templates/system/dept/tree.html new file mode 100644 index 0000000..2dc3676 --- /dev/null +++ b/src/main/resources/templates/system/dept/tree.html @@ -0,0 +1,52 @@ + + + + + + + + + + +
        + + +
        + +
        + 展开 / + 折叠 +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/system/dict/data/add.html b/src/main/resources/templates/system/dict/data/add.html new file mode 100644 index 0000000..a050762 --- /dev/null +++ b/src/main/resources/templates/system/dict/data/add.html @@ -0,0 +1,100 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + table表格字典列显示样式属性 +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/dict/data/data.html b/src/main/resources/templates/system/dict/data/data.html new file mode 100644 index 0000000..49ca424 --- /dev/null +++ b/src/main/resources/templates/system/dict/data/data.html @@ -0,0 +1,151 @@ + + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 字典名称: +
        • +
        • + 字典标签: +
        • +
        • + 数据状态: +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/dict/data/edit.html b/src/main/resources/templates/system/dict/data/edit.html new file mode 100644 index 0000000..0855513 --- /dev/null +++ b/src/main/resources/templates/system/dict/data/edit.html @@ -0,0 +1,101 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + table表格字典列显示样式属性 +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/dict/type/add.html b/src/main/resources/templates/system/dict/type/add.html new file mode 100644 index 0000000..40da467 --- /dev/null +++ b/src/main/resources/templates/system/dict/type/add.html @@ -0,0 +1,83 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/dict/type/edit.html b/src/main/resources/templates/system/dict/type/edit.html new file mode 100644 index 0000000..61d3bb1 --- /dev/null +++ b/src/main/resources/templates/system/dict/type/edit.html @@ -0,0 +1,87 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/dict/type/tree.html b/src/main/resources/templates/system/dict/type/tree.html new file mode 100644 index 0000000..88ea049 --- /dev/null +++ b/src/main/resources/templates/system/dict/type/tree.html @@ -0,0 +1,42 @@ + + + + + + + + + + + +
        + + +
        + +
        +
        + + + + + diff --git a/src/main/resources/templates/system/dict/type/type.html b/src/main/resources/templates/system/dict/type/type.html new file mode 100644 index 0000000..1f9765c --- /dev/null +++ b/src/main/resources/templates/system/dict/type/type.html @@ -0,0 +1,155 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 字典名称: +
        • +
        • + 字典类型: +
        • +
        • + 字典状态: +
        • +
        • + + + - + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/menu/add.html b/src/main/resources/templates/system/menu/add.html new file mode 100644 index 0000000..45e26a5 --- /dev/null +++ b/src/main/resources/templates/system/menu/add.html @@ -0,0 +1,202 @@ + + + + + + +
        +
        + +
        + +
        +
        + + +
        +
        +
        +
        + +
        + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + 控制器中定义的权限标识,如:@RequiresPermissions("") +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        + +
        +
        +
        +
        + +
        +
        + + +
        +
        + +
        +
        + + +
        +
        + + +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/menu/edit.html b/src/main/resources/templates/system/menu/edit.html new file mode 100644 index 0000000..50b5ff9 --- /dev/null +++ b/src/main/resources/templates/system/menu/edit.html @@ -0,0 +1,230 @@ + + + + + + +
        +
        + + +
        + +
        +
        + + +
        +
        +
        +
        + +
        + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + 控制器中定义的权限标识,如:@RequiresPermissions("") +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        + +
        +
        +
        +
        + +
        +
        + + +
        +
        + +
        +
        + + +
        +
        + + +
        +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/menu/icon.html b/src/main/resources/templates/system/menu/icon.html new file mode 100644 index 0000000..f9f7f19 --- /dev/null +++ b/src/main/resources/templates/system/menu/icon.html @@ -0,0 +1,928 @@ + + + + + Font Awesome Ico list + + + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + \ No newline at end of file diff --git a/src/main/resources/templates/system/menu/menu.html b/src/main/resources/templates/system/menu/menu.html new file mode 100644 index 0000000..3b7c2c1 --- /dev/null +++ b/src/main/resources/templates/system/menu/menu.html @@ -0,0 +1,161 @@ + + + + + + +
        +
        +
        + +
        + + +
        +
        +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/menu/tree.html b/src/main/resources/templates/system/menu/tree.html new file mode 100644 index 0000000..a38e851 --- /dev/null +++ b/src/main/resources/templates/system/menu/tree.html @@ -0,0 +1,49 @@ + + + + + + + + + + +
        + + +
        + +
        + 展开 / + 折叠 +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/system/notice/add.html b/src/main/resources/templates/system/notice/add.html new file mode 100644 index 0000000..b47f7ce --- /dev/null +++ b/src/main/resources/templates/system/notice/add.html @@ -0,0 +1,97 @@ + + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/system/notice/edit.html b/src/main/resources/templates/system/notice/edit.html new file mode 100644 index 0000000..1c9f109 --- /dev/null +++ b/src/main/resources/templates/system/notice/edit.html @@ -0,0 +1,102 @@ + + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/system/notice/notice.html b/src/main/resources/templates/system/notice/notice.html new file mode 100644 index 0000000..91ecd78 --- /dev/null +++ b/src/main/resources/templates/system/notice/notice.html @@ -0,0 +1,117 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 公告标题: +
        • +
        • + 操作人员: +
        • +
        • + 公告类型: +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/post/add.html b/src/main/resources/templates/system/post/add.html new file mode 100644 index 0000000..70381a2 --- /dev/null +++ b/src/main/resources/templates/system/post/add.html @@ -0,0 +1,103 @@ + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/post/edit.html b/src/main/resources/templates/system/post/edit.html new file mode 100644 index 0000000..ee3e341 --- /dev/null +++ b/src/main/resources/templates/system/post/edit.html @@ -0,0 +1,110 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + diff --git a/src/main/resources/templates/system/post/post.html b/src/main/resources/templates/system/post/post.html new file mode 100644 index 0000000..3c3fc42 --- /dev/null +++ b/src/main/resources/templates/system/post/post.html @@ -0,0 +1,120 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 岗位编码: +
        • +
        • + 岗位名称: +
        • +
        • + 岗位状态: +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/role/add.html b/src/main/resources/templates/system/role/add.html new file mode 100644 index 0000000..1083c7d --- /dev/null +++ b/src/main/resources/templates/system/role/add.html @@ -0,0 +1,180 @@ + + + + + + + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + 控制器中定义的权限字符,如:@RequiresRoles("") +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + + +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/system/role/authUser.html b/src/main/resources/templates/system/role/authUser.html new file mode 100644 index 0000000..7d08040 --- /dev/null +++ b/src/main/resources/templates/system/role/authUser.html @@ -0,0 +1,149 @@ + + + + + + +
        +
        +
        +
        + +
        + +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/role/dataScope.html b/src/main/resources/templates/system/role/dataScope.html new file mode 100644 index 0000000..45d3633 --- /dev/null +++ b/src/main/resources/templates/system/role/dataScope.html @@ -0,0 +1,137 @@ + + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + 特殊情况下,设置为“自定数据权限” +
        +
        +
        + +
        + + + +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/system/role/edit.html b/src/main/resources/templates/system/role/edit.html new file mode 100644 index 0000000..994d0fa --- /dev/null +++ b/src/main/resources/templates/system/role/edit.html @@ -0,0 +1,189 @@ + + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + + 控制器中定义的权限字符,如:@RequiresRoles("") +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + + +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/system/role/role.html b/src/main/resources/templates/system/role/role.html new file mode 100644 index 0000000..b383661 --- /dev/null +++ b/src/main/resources/templates/system/role/role.html @@ -0,0 +1,165 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 角色名称: +
        • +
        • + 权限字符: +
        • +
        • + 角色状态: +
        • +
        • + + + - + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/role/selectUser.html b/src/main/resources/templates/system/role/selectUser.html new file mode 100644 index 0000000..01216cc --- /dev/null +++ b/src/main/resources/templates/system/role/selectUser.html @@ -0,0 +1,120 @@ + + + + + + + +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/user/add.html b/src/main/resources/templates/system/user/add.html new file mode 100644 index 0000000..342fa07 --- /dev/null +++ b/src/main/resources/templates/system/user/add.html @@ -0,0 +1,268 @@ + + + + + + + +
        +
        + +

        基本信息

        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +

        其他信息

        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        + +
        +
        +   + +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/user/authRole.html b/src/main/resources/templates/system/user/authRole.html new file mode 100644 index 0000000..82ff365 --- /dev/null +++ b/src/main/resources/templates/system/user/authRole.html @@ -0,0 +1,109 @@ + + + + + + +
        +
        + +

        基本信息

        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + +

        分配角色

        +
        +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        +   + +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/user/edit.html b/src/main/resources/templates/system/user/edit.html new file mode 100644 index 0000000..f977a7e --- /dev/null +++ b/src/main/resources/templates/system/user/edit.html @@ -0,0 +1,232 @@ + + + + + + + +
        +
        + + +

        基本信息

        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +

        其他信息

        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        +
        +
        +
        +   + +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/system/user/profile/avatar.html b/src/main/resources/templates/system/user/profile/avatar.html new file mode 100644 index 0000000..c72e2e0 --- /dev/null +++ b/src/main/resources/templates/system/user/profile/avatar.html @@ -0,0 +1,261 @@ + + + + + + + + +
        +
        +
        + +
        +
        + + + + + + + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/system/user/profile/profile.html b/src/main/resources/templates/system/user/profile/profile.html new file mode 100644 index 0000000..b62c1b6 --- /dev/null +++ b/src/main/resources/templates/system/user/profile/profile.html @@ -0,0 +1,304 @@ + + + + + + + + + +
        +
        +
        +
        +
        +
        个人资料
        +
        +
        +
        + +

        修改头像

        +
        +
          +
        • + 登录名称: +

          [[${user.loginName}]]

          +
        • +
        • + 手机号码: +

          [[${user.phonenumber}]]

          +
        • +
        • + 所属部门: +

          [[${user.dept?.deptName}]] / [[${#strings.defaultString(postGroup,'无岗位')}]]

          +
        • +
        • + 邮箱地址: +

          [[${#strings.abbreviate(user.email, 16)}]]

          +
        • +
        • + 创建时间: +

          [[${#dates.format(user.createTime, 'yyyy-MM-dd')}]]

          +
        • +
        +
        +
        +
        + +
        +
        +
        +
        基本资料
        +
        +
        + +
        +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/system/user/profile/resetPwd.html b/src/main/resources/templates/system/user/profile/resetPwd.html new file mode 100644 index 0000000..92f621d --- /dev/null +++ b/src/main/resources/templates/system/user/profile/resetPwd.html @@ -0,0 +1,104 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + + + 密码只能为0-9数字 + 密码只能为a-z和A-Z字母 + 密码必须包含(字母,数字) + 密码必须包含(字母,数字,特殊字符!@#$%^&*()-=_+) + + + +
        +
        +
        + +
        + + 请再次输入您的密码 +
        +
        +
        +
        + + + + + + diff --git a/src/main/resources/templates/system/user/resetPwd.html b/src/main/resources/templates/system/user/resetPwd.html new file mode 100644 index 0000000..ec00812 --- /dev/null +++ b/src/main/resources/templates/system/user/resetPwd.html @@ -0,0 +1,45 @@ + + + + + + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + + diff --git a/src/main/resources/templates/system/user/user.html b/src/main/resources/templates/system/user/user.html new file mode 100644 index 0000000..d545968 --- /dev/null +++ b/src/main/resources/templates/system/user/user.html @@ -0,0 +1,278 @@ + + + + + + + + +
        +
        +
        +
        + 组织机构 +
        +
        + + + + +
        +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + + +
        +
          +
        • + 登录名称: +
        • +
        • + 手机号码: +
        • +
        • + 用户状态: +
        • +
        • + + + - + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        +
        + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/tool/build/build.html b/src/main/resources/templates/tool/build/build.html new file mode 100644 index 0000000..1fbf8a9 --- /dev/null +++ b/src/main/resources/templates/tool/build/build.html @@ -0,0 +1,168 @@ + + + + + + + + +
        +
        +
        +
        +
        +
        元素
        +
        + + + + + + + + + + +
        +
        +
        +
        + 拖拽左侧的表单元素到右侧区域,即可生成相应的HTML代码,表单代码,轻松搞定! +
        +
        +
        + +
        + +
        +
        + +
        + +
        + +
        +
        + +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + + +
        +

        这里是纯文字信息

        +
        +
        +
        + + +
        + + +
        +
        +
        + + +
        + + + +
        +
        +
        + + +
        + +
        +
        +
        + + +
        +
        + + +
        +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        拖拽左侧表单元素到此区域
        +
        + 请选择显示的列数: + +
        +
        + +
        +
        +
        +
        + + +
        + +
        +
        +
        +
        +
        + + + + + + + diff --git a/src/main/resources/templates/tool/gen/createTable.html b/src/main/resources/templates/tool/gen/createTable.html new file mode 100644 index 0000000..c9b9dcf --- /dev/null +++ b/src/main/resources/templates/tool/gen/createTable.html @@ -0,0 +1,30 @@ + + + + + + +
        + +
        + +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/tool/gen/edit.html b/src/main/resources/templates/tool/gen/edit.html new file mode 100644 index 0000000..c67db54 --- /dev/null +++ b/src/main/resources/templates/tool/gen/edit.html @@ -0,0 +1,607 @@ + + + + + + + + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/tool/gen/gen.html b/src/main/resources/templates/tool/gen/gen.html new file mode 100644 index 0000000..bbb9ae0 --- /dev/null +++ b/src/main/resources/templates/tool/gen/gen.html @@ -0,0 +1,209 @@ + + + + + + +
        +
        +
        +
        +
        +
          +
        • + 表名称: +
        • +
        • + 表描述: +
        • +
        • + + + - + +
        • +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/tool/gen/importTable.html b/src/main/resources/templates/tool/gen/importTable.html new file mode 100644 index 0000000..f5d04b7 --- /dev/null +++ b/src/main/resources/templates/tool/gen/importTable.html @@ -0,0 +1,101 @@ + + + + + + +
        +
        +
        +
        +
        + +
        +
        +
        + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/templates/ycts/fileNotExists.html b/src/main/resources/templates/ycts/fileNotExists.html new file mode 100644 index 0000000..d0f3b5b --- /dev/null +++ b/src/main/resources/templates/ycts/fileNotExists.html @@ -0,0 +1,10 @@ + + + + + Title + + +

        文件不存在

        + + \ No newline at end of file diff --git a/src/main/resources/templates/zgda_logo.png b/src/main/resources/templates/zgda_logo.png new file mode 100644 index 0000000..27bfe62 Binary files /dev/null and b/src/main/resources/templates/zgda_logo.png differ diff --git a/src/main/resources/templates/zhtj/datj/bgqxtj.html b/src/main/resources/templates/zhtj/datj/bgqxtj.html new file mode 100644 index 0000000..b03eb56 --- /dev/null +++ b/src/main/resources/templates/zhtj/datj/bgqxtj.html @@ -0,0 +1,188 @@ + + + + + + + + + + + + + +
        + +
        +
        +
        + +
        +
        +
        + +
        + + + + + + + + +
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + + + + + diff --git a/src/main/resources/templates/zhtj/datj/datj.html b/src/main/resources/templates/zhtj/datj/datj.html new file mode 100644 index 0000000..8b52b58 --- /dev/null +++ b/src/main/resources/templates/zhtj/datj/datj.html @@ -0,0 +1,123 @@ + + + + + + + + + + +
        +
        +
        +
        + 档案统计 +
        + +
        +
        +
        +
        +
        +
        + +
        +
        +
        + +
        +

        请点击左侧树节点!

        +
        +
        +
        +
        + + + + + + + + + diff --git a/src/main/resources/templates/zhtj/datj/mlsltj.html b/src/main/resources/templates/zhtj/datj/mlsltj.html new file mode 100644 index 0000000..ef7b51c --- /dev/null +++ b/src/main/resources/templates/zhtj/datj/mlsltj.html @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + +
        + +
        +
        +
        + +
        +
        +
        + +
        + + + + + + + + + + + + + + + + + + +
        门类数量统计
        档案类型名称卷数卷内数量件数已挂接全文数量
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + + + + + diff --git a/src/main/resources/templates/zhtj/datj/qztj.html b/src/main/resources/templates/zhtj/datj/qztj.html new file mode 100644 index 0000000..3e4b493 --- /dev/null +++ b/src/main/resources/templates/zhtj/datj/qztj.html @@ -0,0 +1,272 @@ + + + + + + + + + + + + + +
        + +
        +
        +
        + +
        +
        +
        + +
        + + + + + + + + + + + + + + + + + + +
        全宗统计
        全宗卷数卷内数量件数已挂接全文数量
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + + + + + diff --git a/src/main/resources/templates/zhtj/lytj/lymxtj.html b/src/main/resources/templates/zhtj/lytj/lymxtj.html new file mode 100644 index 0000000..6716032 --- /dev/null +++ b/src/main/resources/templates/zhtj/lytj/lymxtj.html @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + +
        + +
        +
        +
        + +
        +
        +
        + +
        + + + + + + + + + + + + + + + + + +
        利用明细统计
        档案类型总数量电子数量实体数量
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + + + + + diff --git a/src/main/resources/templates/zhtj/lytj/lyrcndtj.html b/src/main/resources/templates/zhtj/lytj/lyrcndtj.html new file mode 100644 index 0000000..84c9a24 --- /dev/null +++ b/src/main/resources/templates/zhtj/lytj/lyrcndtj.html @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + +
        + +
        +
        +
        + +
        +
        +
        + +
        + + + + + + + + + + + + + + + + + + +
        利用人次统计
        年度月份人次电子借阅数实体借阅数
        + +
        +
        +
        + + +
        + +
        +
        +
        + +
        + + + + + + + diff --git a/src/main/resources/templates/zhtj/lytj/lytj.html b/src/main/resources/templates/zhtj/lytj/lytj.html new file mode 100644 index 0000000..f6c55b1 --- /dev/null +++ b/src/main/resources/templates/zhtj/lytj/lytj.html @@ -0,0 +1,118 @@ + + + + + + + + +
        +
        +
        +
        + 利用统计 +
        + +
        +
        +
        +
        +
        +
        + +
        +
        +
        + +
        +

        请点击左侧树节点!

        +
        +
        +
        +
        + + + + + + + + + diff --git a/src/main/resources/templates/zhtj/lytj/mydtj.html b/src/main/resources/templates/zhtj/lytj/mydtj.html new file mode 100644 index 0000000..4857ef6 --- /dev/null +++ b/src/main/resources/templates/zhtj/lytj/mydtj.html @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + +
        + +
        +
        +
        + +
        +
        +
        + +
        + + + + + + + + + + + + + + + + + + + +
        满意度统计
        年度月份人次非常满意满意不满意
        + +
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + + + + + + + diff --git a/src/main/resources/templates/zhtj/nbtj/nbtj.html b/src/main/resources/templates/zhtj/nbtj/nbtj.html new file mode 100644 index 0000000..e4b7e03 --- /dev/null +++ b/src/main/resources/templates/zhtj/nbtj/nbtj.html @@ -0,0 +1,1896 @@ + + + + + + + + + + + + + + +
        +
        +
        +
        + +
        +
        +
        + + +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +

        + (二)档案馆基本情况表

        +

        + 单位名称: + 单位类别代码: + 统一社会信用代码: +

        +

        +

        + 表号:DA-2表 + 制表机关:国家档案局 + 批准单位:国家统计局 + 批准文号:国家制【2019】8号 + 有效期至:2022年1月 +

        +
        指标名称 计量单位 代码 数量

        1

        +

        一、机构数

        +

        1

        +

        二、定编

        +

        2

        三、专职人员

        3

        其中: 女性

        4

        文化程度

        -

        -

        -

        博士研究生

        5

        50岁以上

        6

        35-49岁

        7

        34以下

        8

        硕士研究生

        9

        50岁以上

        10

        35-49岁

        11

        34以下

        12

        研究生班研究生

        13

        50岁以上

        14

        35-49岁

        15

        34以下

        16

        双学士

        17

        50岁以上

        18

        35-49岁

        19

        34以下

        20

        大学本科

        21

        50岁以上

        22

        35-49岁

        23

        34以下

        24

        大专

        25

        50岁以上

        26

        35-49岁

        27

        34以下

        28

        高中(含中专)及以下

        29

        50岁以上

        30

        35-49岁

        31

        34以下

        32

        专业文化程度

        -

        -

        -

        博士研究生

        33

        硕士研究生

        34

        研究生班研究生

        35

        大学本科

        36

        大专

        37

        中专

        38

        本年度接受档案业务在职培训教育

        39

        40

        档案干部专业技术职务

        -

        -

        -

        研究馆员

        41

        副研究馆员

        42

        馆员

        43

        助力馆员

        44

        管理员

        45

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        指标名称 计量单位 代码 数量

        1

        四、馆藏情况

        -

        -

        -

        纸质档案

        -

        -

        -

        全宗

        46

        案卷

        47

        以件为保管单位档案

        48

        总排架长度

        49

        底图

        50

        电子档案

        GB

        51

        数码照片

        GB

        52

        数字录音、数字录像

        GB

        53

        其他载体档案

        -

        -

        -

        照片档案

        54

        录音磁带、录像磁带、影片档案

        55

        缩微胶片

        万幅

        56

        实物档案

        57

        档案数字化成果

        -

        -

        -

        纸质档案

        -

        -

        -

        案卷

        58

        GB

        59

        以件为保管单位档案

        60

        GB

        61

        其他载体档案

        -

        -

        -

        照片档案

        GB

        62

        录音磁带、录像磁带、影片档案

        GB

        63

        其他

        GB

        64

        馆藏资料

        -

        -

        -

        纸质资料

        65

        电子资料

        GB

        66

        馆藏档案历史分期

        -

        -

        -

        新中国成立前档案

        67

        68

        明清以前档案

        69

        明清档案

        70

         

        71

        民国档案

        72

         

        73

        革命历史档案

        74

        75

        新中国成立后档案

        76

         

        77

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        指标名称 计量单位 代码 数量

        1

        档案编目情况

        -

        -

        -

        手工目录

        78

        机读目录

        -

        -

        -

        案卷级

        万条

        79

        文件级

        万条

        80

        国家重点档案抢救情况

        -

        -

        -

        应抢救档案总数

        81

         

        82

        已抢救档案数量

        83

         

        84

        本年度抢救档案数量

        85

         

        86

        本年接收档案情况

        -

        -

        -

        纸质档案

        -

        -

        -

        案卷

        87

        以件为保管单位档案

        88

        底图

        89

        电子档案

        GB

        90

        数码照片

        GB

        91

        数字录音、数字录像

        GB

        92

        其他载体档案

        -

        -

        -

        照片档案

        93

        录音磁带、录像磁带、影片档案

        94

        实物档案

        95

        档案数字化成果

        -

        -

        -

        纸质档案

        -

        -

        -

        案卷

        96

         

        GB

        97

        以件为保管单位档案

        98

         

        GB

        99

        其他载体档案

        -

        -

        -

        照片档案

        GB

        100

        录音磁带、录像磁带、影片档案

        GB

        101

        其他

        GB

        102

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        指标名称 计量单位 代码 数量

        1

        本年征集档案情况

        -

        -

        -

        纸质档案

        -

        -

        -

        案卷

        103

        以件为保管单位档案

        104

        底图

        105

        电子档案

        GB

        106

        数码照片

        GB

        107

        数字录音、数字录像

        GB

        108

        其他载体档案

        -

        -

        -

        照片档案

        109

        录音磁带、录像磁带、影片档案

        110

        实物档案

        111

        档案数字化成果

        -

        -

        -

        纸质档案

        -

        -

        -

        案卷

        112

         

        GB

        113

        以件为保管单位档案

        114

         

        GB

        115

        其他载体档案

        -

        -

        -

        照片档案

        GB

        116

        录音磁带、录像磁带、影片档案

        GB

        117

        其他

        GB

        118

        本年销毁档案情况

        -

        -

        -

        纸质档案

        -

        -

        -

        案卷

        119

        以件为保管单位档案

        120

        电子档案

        GB

        121

        其他载体档案

        -

        -

        -

        照片档案

        122

        录音磁带、录像磁带、影片档案

        123

        接收寄存档案

        124

        125

        五、档案开放情况

        -

        -

        -

        新中国成立前档案

        126

        127

        新中国成立后档案

        128

        129

        开发档案目录

        -

        -

        -

        案卷级

        万条

        130

        文件级

        万条

        131

        在线目录

        -

        -

        -

        案卷级

        万条

        132

        文件级

        万条

        133

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        指标名称 计量单位 代码 数量

        1

        六、档案开放情况

        -

        -

        -

        本年利用档案

        人次

        134

        卷(件)次

        135

        利用目的

        -

        -

        -

        单位

        -

        -

        -

        工作考查

        卷(件)次

        136

        其他

        卷(件)次

        137

        个人

        -

        -

        -

        学术研究

        卷(件)次

        138

        权益维护

        卷(件)次

        139

        其他

        卷(件)次

        140

        政府信息公开查阅场所

        141

        本年利用政府公开信息

        人次

        142

        件次

        143

        本年利用资料

        人次

        144

        册次

        145

        七、档案开放情况

        -

        -

        -

        档案网站

        146

        本年IP访问次数

        147

        档案微信公众号

        148

        推送数量

        149

        爱国主义教育基地

        150

        本年举办档案展览

        151

        基本陈列

        152

        本年参考档案展览人次

        人次

        153

        本年编研档案资料

        -

        -

        -

        公开出版

        154

        -

        万字

        155

        -

        内部参考

        156

        万字

        157

        档案期刊出版情况

        158

        年度出版

        159

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        指标名称 计量单位 代码 数量

        1

        八、档案馆基本建设情况

        -

        -

        -

        档案馆总建设面积

        平方米

        160

        档案库房建筑面积

        平方米

        161

        后库面积

        平方米

        162

        档案业务技术用房建筑面积

        平方米

        163

        对外服务用房建筑面积

        平方米

        164

        本年度在建项目

        -

        -

        -

        新建

        165

        改、扩建

        166

        建筑面积

        平方米

        167

        档案库房建筑面积

        平方米

        168

        计划总投资额

        万元

        169

        累计完成投资额

        万元

        170

        本年度完成投资额

        万元

        171

        本年度竣工项目

        -

        -

        -

        新建

        172

        改、扩建

        173

        建筑面积

        平方米

        174

        档案库房建筑面积

        平方米

        175

        计划总投资额

        万元

        176

        实际完成投资额

        万元

        177

        九、馆内实施设备情况

        -

        -

        -

        缩微设备

        178

        服务器

        179

        安全防范系统

        -

        -

        -

        视频监控系统

        180

        温湿度控制系统

        181

        火灾自动报警系统

        182

        库房灭火系统

        -

        -

        -

        气体灭火系统

        183

        细水雾灭火系统

        184

        十、数字档案馆

        185

        +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        指标名称 计量单位 代码 数量

        1

        十一、档案部门服务业事业单位财务情况

        -

        -

        -

        存货

        万元

        186

        固定资源原价

        万元

        187

        资产合计

        万元

        188

        负责合计

        万元

        189

        本年收入合计

        万元

        190

        事业收入

        万元

        191

        经营收入

        万元

        192

        本年支出合计

        万元

        193

        工资福利支出

        万元

        194

        商品和服务支出

        万元

        195

        取暖费

        万元

        196

        差旅费

        万元

        197

        因公出国(境)费用

        万元

        198

        劳务费

        万元

        199

        工会经费费

        万元

        200

        福利费

        万元

        201

        -

        对个人和家庭的补助

        万元

        202

        -

        抚恤金

        万元

        203

        -

        生活补助

        万元

        204

        -

        救济费

        万元

        205

        -

        助学金

        万元

        206

        -

        奖励金

        万元

        207

        -

        生产补贴

        万元

        208

        -

        经营支出

        万元

        209

        -

        销售税金

        万元

        210

        -

        项目经费

        万元

        211

        -

        +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        + + + + + + + diff --git a/src/main/resources/tessdata/chi_sim.traineddata b/src/main/resources/tessdata/chi_sim.traineddata new file mode 100644 index 0000000..388bac2 Binary files /dev/null and b/src/main/resources/tessdata/chi_sim.traineddata differ diff --git a/src/main/resources/vm/html/add.html.vm b/src/main/resources/vm/html/add.html.vm new file mode 100644 index 0000000..35e0422 --- /dev/null +++ b/src/main/resources/vm/html/add.html.vm @@ -0,0 +1,378 @@ + + + + +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "datetime") + +#break +#end +#end +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "upload") + +#break +#end +#end +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "summernote") + +#break +#end +#end + + +
        +
        +#if($table.sub) +

        ${functionName}信息

        +#end +#foreach($column in $columns) +#set($field=$column.javaField) +#if($column.insert && !$column.pk) +#if(($column.usableColumn) || (!$column.superColumn)) +#set($parentheseIndex=$column.columnComment.indexOf("(")) +#if($parentheseIndex != -1) +#set($comment=$column.columnComment.substring(0, $parentheseIndex)) +#else +#set($comment=$column.columnComment) +#end +#set($dictType=$column.dictType) +#if("" != $treeParentCode && $column.javaField == $treeParentCode) +
        + +
        +
        +#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)}) +#set($treeId = "${className}?.${treeCode}") + + + +
        +
        +
        +#elseif($column.htmlType == "input") +
        + +
        + +
        +
        +#elseif($column.htmlType == "upload") +
        + +
        + +
        + +
        +
        +
        +#elseif($column.htmlType == "summernote") +
        + +
        + +
        +
        +
        +#elseif($column.htmlType == "select" && "" != $dictType) +
        + +
        + +
        +
        +#elseif($column.htmlType == "select" && $dictType) +
        + +
        + + 代码生成请选择字典属性 +
        +
        +#elseif($column.htmlType == "checkbox" && "" != $dictType) +
        + +
        + +
        +
        +#elseif($column.htmlType == "checkbox" && $dictType) +
        + +
        + + 代码生成请选择字典属性 +
        +
        +#elseif($column.htmlType == "radio" && "" != $dictType) +
        + +
        +
        + + +
        +
        +
        +#elseif($column.htmlType == "radio" && $dictType) +
        + +
        +
        + + +
        + 代码生成请选择字典属性 +
        +
        +#elseif($column.htmlType == "datetime") +
        + +
        +
        + + +
        +
        +
        +#elseif($column.htmlType == "textarea") +
        + +
        + +
        +
        +#end +#end +#end +#end +#if($table.sub) +

        ${subTable.functionName}信息

        +
        +
        + + +
        +
        +
        +
        +
        +#end +
        +
        + +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "datetime") + +#break +#end +#end +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "upload") + +#break +#end +#end +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "summernote") + +#break +#end +#end + + + \ No newline at end of file diff --git a/src/main/resources/vm/html/edit.html.vm b/src/main/resources/vm/html/edit.html.vm new file mode 100644 index 0000000..f9be71d --- /dev/null +++ b/src/main/resources/vm/html/edit.html.vm @@ -0,0 +1,389 @@ + + + + +#foreach($column in $columns) +#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime") + +#break +#end +#end +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "upload") + +#break +#end +#end +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "summernote") + +#break +#end +#end + + +
        +
        +#if($table.sub) +

        ${functionName}信息

        +#end + +#foreach($column in $columns) +#if($column.edit && !$column.pk) +#if(($column.usableColumn) || (!$column.superColumn)) +#set($parentheseIndex=$column.columnComment.indexOf("(")) +#if($parentheseIndex != -1) +#set($comment=$column.columnComment.substring(0, $parentheseIndex)) +#else +#set($comment=$column.columnComment) +#end +#set($field=$column.javaField) +#set($dictType=$column.dictType) +#if("" != $treeParentCode && $column.javaField == $treeParentCode) +
        + +
        +
        +#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)}) + + + +
        +
        +
        +#elseif($column.htmlType == "input") +
        + +
        + +
        +
        +#elseif($column.htmlType == "upload") +
        + +
        + +
        + +
        +
        +
        +#elseif($column.htmlType == "summernote") +
        + +
        + +
        +
        +
        +#elseif($column.htmlType == "select" && "" != $dictType) +
        + +
        + +
        +
        +#elseif($column.htmlType == "select" && $dictType) +
        + +
        + + 代码生成请选择字典属性 +
        +
        +#elseif($column.htmlType == "checkbox" && "" != $dictType) +
        + +
        + +
        +
        +#elseif($column.htmlType == "checkbox" && $dictType) +
        + +
        + + 代码生成请选择字典属性 +
        +
        +#elseif($column.htmlType == "radio" && "" != $dictType) +
        + +
        +
        + + +
        +
        +
        +#elseif($column.htmlType == "radio" && $dictType) +
        + +
        +
        + + +
        + 代码生成请选择字典属性 +
        +
        +#elseif($column.htmlType == "datetime") +
        + +
        +
        + + +
        +
        +
        +#elseif($column.htmlType == "textarea") +
        + +
        + +
        +
        +#end +#end +#end +#end +#if($table.sub) +

        ${subTable.functionName}信息

        +
        +
        + + +
        +
        +
        +
        +
        +#end +
        +
        + +#foreach($column in $columns) +#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime") + +#break +#end +#end +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "upload") + +#break +#end +#end +#foreach($column in $columns) +#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "summernote") + +#break +#end +#end + + + \ No newline at end of file diff --git a/src/main/resources/vm/html/list-tree.html.vm b/src/main/resources/vm/html/list-tree.html.vm new file mode 100644 index 0000000..f7f797d --- /dev/null +++ b/src/main/resources/vm/html/list-tree.html.vm @@ -0,0 +1,156 @@ + + + + + + +
        +
        +
        +
        +
        +
          +#foreach($column in $columns) +#if($column.query) +#set($dictType=$column.dictType) +#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#set($parentheseIndex=$column.columnComment.indexOf("(")) +#if($parentheseIndex != -1) +#set($comment=$column.columnComment.substring(0, $parentheseIndex)) +#else +#set($comment=$column.columnComment) +#end +#if($column.htmlType == "input") +
        • + + +
        • +#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) +
        • + + +
        • +#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) +
        • + + +
        • +#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") +
        • + + +
        • +#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") +
        • + + + - + +
        • +#end +#end +#end +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/vm/html/list.html.vm b/src/main/resources/vm/html/list.html.vm new file mode 100644 index 0000000..f2e9c5a --- /dev/null +++ b/src/main/resources/vm/html/list.html.vm @@ -0,0 +1,154 @@ + + + + + + +
        +
        +
        +
        +
        +
          +#foreach($column in $columns) +#if($column.query) +#set($dictType=$column.dictType) +#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#set($parentheseIndex=$column.columnComment.indexOf("(")) +#if($parentheseIndex != -1) +#set($comment=$column.columnComment.substring(0, $parentheseIndex)) +#else +#set($comment=$column.columnComment) +#end +#if($column.htmlType == "input") +
        • + + +
        • +#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) +
        • + + +
        • +#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) +
        • + + +
        • +#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") +
        • + + +
        • +#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") +
        • + + + - + +
        • +#end +#end +#end +
        • +  搜索 +  重置 +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + + + + \ No newline at end of file diff --git a/src/main/resources/vm/html/tree.html.vm b/src/main/resources/vm/html/tree.html.vm new file mode 100644 index 0000000..80364ad --- /dev/null +++ b/src/main/resources/vm/html/tree.html.vm @@ -0,0 +1,51 @@ + + + + + + + + +#set($treeId = "${className}?." + $treeCode) +#set($treeName = "${className}?." + $treeName) + + +
        + + +
        + +
        + 展开 / + 折叠 +
        +
        +
        + + + + + \ No newline at end of file diff --git a/src/main/resources/vm/java/controller.java.vm b/src/main/resources/vm/java/controller.java.vm new file mode 100644 index 0000000..830a87e --- /dev/null +++ b/src/main/resources/vm/java/controller.java.vm @@ -0,0 +1,201 @@ +package ${packageName}.${businessName}.controller; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.archive.framework.aspectj.lang.annotation.Log; +import com.archive.framework.aspectj.lang.enums.BusinessType; +import ${packageName}.${businessName}.domain.${ClassName}; +import ${packageName}.${businessName}.service.I${ClassName}Service; +import com.archive.framework.web.controller.BaseController; +import com.archive.framework.web.domain.AjaxResult; +import com.archive.common.utils.poi.ExcelUtil; +#if($table.crud || $table.sub) +import com.archive.framework.web.page.TableDataInfo; +#elseif($table.tree) +import com.archive.common.utils.StringUtils; +import com.archive.framework.web.domain.Ztree; +#end + +/** + * ${functionName}Controller + * + * @author ${author} + * @date ${datetime} + */ +@Controller +@RequestMapping("/${moduleName}/${businessName}") +public class ${ClassName}Controller extends BaseController +{ + private String prefix = "${moduleName}/${businessName}"; + + @Autowired + private I${ClassName}Service ${className}Service; + + @RequiresPermissions("${permissionPrefix}:view") + @GetMapping() + public String ${businessName}() + { + return prefix + "/${businessName}"; + } + +#if($table.crud || $table.sub) + /** + * 查询${functionName}列表 + */ + @RequiresPermissions("${permissionPrefix}:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(${ClassName} ${className}) + { + startPage(); + List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + return getDataTable(list); + } +#elseif($table.tree) + /** + * 查询${functionName}树列表 + */ + @RequiresPermissions("${permissionPrefix}:list") + @PostMapping("/list") + @ResponseBody + public List<${ClassName}> list(${ClassName} ${className}) + { + List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + return list; + } +#end + + /** + * 导出${functionName}列表 + */ + @RequiresPermissions("${permissionPrefix}:export") + @Log(title = "${functionName}", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(${ClassName} ${className}) + { + List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class); + return util.exportExcel(list, "${businessName}"); + } + +#if($table.crud || $table.sub) + /** + * 新增${functionName} + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } +#elseif($table.tree) + /** + * 新增${functionName} + */ + @GetMapping(value = { "/add/{${pkColumn.javaField}}", "/add/" }) + public String add(@PathVariable(value = "${pkColumn.javaField}", required = false) Long ${pkColumn.javaField}, ModelMap mmap) + { + if (StringUtils.isNotNull(${pkColumn.javaField})) + { + mmap.put("${className}", ${className}Service.select${ClassName}ById(${pkColumn.javaField})); + } + return prefix + "/add"; + } +#end + + /** + * 新增保存${functionName} + */ + @RequiresPermissions("${permissionPrefix}:add") + @Log(title = "${functionName}", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(${ClassName} ${className}) + { + return toAjax(${className}Service.insert${ClassName}(${className})); + } + + /** + * 修改${functionName} + */ + @GetMapping("/edit/{${pkColumn.javaField}}") + public String edit(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}, ModelMap mmap) + { + ${ClassName} ${className} = ${className}Service.select${ClassName}ById(${pkColumn.javaField}); + mmap.put("${className}", ${className}); + return prefix + "/edit"; + } + + /** + * 修改保存${functionName} + */ + @RequiresPermissions("${permissionPrefix}:edit") + @Log(title = "${functionName}", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(${ClassName} ${className}) + { + return toAjax(${className}Service.update${ClassName}(${className})); + } + +#if($table.crud || $table.sub) + /** + * 删除${functionName} + */ + @RequiresPermissions("${permissionPrefix}:remove") + @Log(title = "${functionName}", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(${className}Service.delete${ClassName}ByIds(ids)); + } +#elseif($table.tree) + /** + * 删除 + */ + @RequiresPermissions("${permissionPrefix}:remove") + @Log(title = "${functionName}", businessType = BusinessType.DELETE) + @GetMapping("/remove/{${pkColumn.javaField}}") + @ResponseBody + public AjaxResult remove(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) + { + return toAjax(${className}Service.delete${ClassName}ById(${pkColumn.javaField})); + } +#end +#if($table.tree) + + /** + * 选择${functionName}树 + */ +#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)}) + @GetMapping(value = { "/select${BusinessName}Tree/{${pkColumn.javaField}}", "/select${BusinessName}Tree/" }) + public String select${BusinessName}Tree(@PathVariable(value = "${pkColumn.javaField}", required = false) Long ${pkColumn.javaField}, ModelMap mmap) + { + if (StringUtils.isNotNull(${pkColumn.javaField})) + { + mmap.put("${className}", ${className}Service.select${ClassName}ById(${pkColumn.javaField})); + } + return prefix + "/tree"; + } + + /** + * 加载${functionName}树列表 + */ + @GetMapping("/treeData") + @ResponseBody + public List treeData() + { + List ztrees = ${className}Service.select${ClassName}Tree(); + return ztrees; + } +#end +} diff --git a/src/main/resources/vm/java/domain.java.vm b/src/main/resources/vm/java/domain.java.vm new file mode 100644 index 0000000..60e58f8 --- /dev/null +++ b/src/main/resources/vm/java/domain.java.vm @@ -0,0 +1,105 @@ +package ${packageName}.${businessName}.domain; + +#foreach ($import in $importList) +import ${import}; +#end +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.archive.framework.aspectj.lang.annotation.Excel; +#if($table.crud || $table.sub) +import com.archive.framework.web.domain.BaseEntity; +#elseif($table.tree) +import com.archive.framework.web.domain.TreeEntity; +#end + +/** + * ${functionName}对象 ${tableName} + * + * @author ${author} + * @date ${datetime} + */ +#if($table.crud || $table.sub) +#set($Entity="BaseEntity") +#elseif($table.tree) +#set($Entity="TreeEntity") +#end +public class ${ClassName} extends ${Entity} +{ + private static final long serialVersionUID = 1L; + +#foreach ($column in $columns) +#if(!$table.isSuperColumn($column.javaField)) + /** $column.columnComment */ +#if($column.list) +#set($parentheseIndex=$column.columnComment.indexOf("(")) +#if($parentheseIndex != -1) +#set($comment=$column.columnComment.substring(0, $parentheseIndex)) +#else +#set($comment=$column.columnComment) +#end +#if($parentheseIndex != -1) + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") +#elseif($column.javaType == 'Date') + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd") +#else + @Excel(name = "${comment}") +#end +#end + private $column.javaType $column.javaField; + +#end +#end +#if($table.sub) + /** $table.subTable.functionName信息 */ + private List<${subClassName}> ${subclassName}List; + +#end +#foreach ($column in $columns) +#if(!$table.isSuperColumn($column.javaField)) +#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) +#set($AttrName=$column.javaField) +#else +#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#end + public void set${AttrName}($column.javaType $column.javaField) + { + this.$column.javaField = $column.javaField; + } + + public $column.javaType get${AttrName}() + { + return $column.javaField; + } +#end +#end + +#if($table.sub) + public List<${subClassName}> get${subClassName}List() + { + return ${subclassName}List; + } + + public void set${subClassName}List(List<${subClassName}> ${subclassName}List) + { + this.${subclassName}List = ${subclassName}List; + } + +#end + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) +#foreach ($column in $columns) +#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) +#set($AttrName=$column.javaField) +#else +#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#end + .append("${column.javaField}", get${AttrName}()) +#end +#if($table.sub) + .append("${subclassName}List", get${subClassName}List()) +#end + .toString(); + } +} diff --git a/src/main/resources/vm/java/mapper.java.vm b/src/main/resources/vm/java/mapper.java.vm new file mode 100644 index 0000000..f1c9856 --- /dev/null +++ b/src/main/resources/vm/java/mapper.java.vm @@ -0,0 +1,91 @@ +package ${packageName}.${businessName}.mapper; + +import java.util.List; +import ${packageName}.${businessName}.domain.${ClassName}; +#if($table.sub) +import ${packageName}.${businessName}.domain.${subClassName}; +#end + +/** + * ${functionName}Mapper接口 + * + * @author ${author} + * @date ${datetime} + */ +public interface ${ClassName}Mapper +{ + /** + * 查询${functionName} + * + * @param ${pkColumn.javaField} ${functionName}ID + * @return ${functionName} + */ + public ${ClassName} select${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}); + + /** + * 查询${functionName}列表 + * + * @param ${className} ${functionName} + * @return ${functionName}集合 + */ + public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); + + /** + * 新增${functionName} + * + * @param ${className} ${functionName} + * @return 结果 + */ + public int insert${ClassName}(${ClassName} ${className}); + + /** + * 修改${functionName} + * + * @param ${className} ${functionName} + * @return 结果 + */ + public int update${ClassName}(${ClassName} ${className}); + + /** + * 删除${functionName} + * + * @param ${pkColumn.javaField} ${functionName}ID + * @return 结果 + */ + public int delete${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}); + + /** + * 批量删除${functionName} + * + * @param ${pkColumn.javaField}s 需要删除的数据ID + * @return 结果 + */ + public int delete${ClassName}ByIds(String[] ${pkColumn.javaField}s); +#if($table.sub) + + /** + * 批量删除${subTable.functionName} + * + * @param customerIds 需要删除的数据ID + * @return 结果 + */ + public int delete${subClassName}By${subTableFkClassName}s(String[] ${pkColumn.javaField}s); + + /** + * 批量新增${subTable.functionName} + * + * @param ${subclassName}List ${subTable.functionName}列表 + * @return 结果 + */ + public int batch${subClassName}(List<${subClassName}> ${subclassName}List); + + + /** + * 通过${functionName}ID删除${subTable.functionName}信息 + * + * @param roleId 角色ID + * @return 结果 + */ + public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); +#end +} diff --git a/src/main/resources/vm/java/service.java.vm b/src/main/resources/vm/java/service.java.vm new file mode 100644 index 0000000..307fdf6 --- /dev/null +++ b/src/main/resources/vm/java/service.java.vm @@ -0,0 +1,73 @@ +package ${packageName}.${businessName}.service; + +import java.util.List; +import ${packageName}.${businessName}.domain.${ClassName}; +#if($table.tree) +import com.archive.framework.web.domain.Ztree; +#end + +/** + * ${functionName}Service接口 + * + * @author ${author} + * @date ${datetime} + */ +public interface I${ClassName}Service +{ + /** + * 查询${functionName} + * + * @param ${pkColumn.javaField} ${functionName}ID + * @return ${functionName} + */ + public ${ClassName} select${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}); + + /** + * 查询${functionName}列表 + * + * @param ${className} ${functionName} + * @return ${functionName}集合 + */ + public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); + + /** + * 新增${functionName} + * + * @param ${className} ${functionName} + * @return 结果 + */ + public int insert${ClassName}(${ClassName} ${className}); + + /** + * 修改${functionName} + * + * @param ${className} ${functionName} + * @return 结果 + */ + public int update${ClassName}(${ClassName} ${className}); + + /** + * 批量删除${functionName} + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int delete${ClassName}ByIds(String ids); + + /** + * 删除${functionName}信息 + * + * @param ${pkColumn.javaField} ${functionName}ID + * @return 结果 + */ + public int delete${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}); +#if($table.tree) + + /** + * 查询${functionName}树列表 + * + * @return 所有${functionName}信息 + */ + public List select${ClassName}Tree(); +#end +} diff --git a/src/main/resources/vm/java/serviceImpl.java.vm b/src/main/resources/vm/java/serviceImpl.java.vm new file mode 100644 index 0000000..029693b --- /dev/null +++ b/src/main/resources/vm/java/serviceImpl.java.vm @@ -0,0 +1,198 @@ +package ${packageName}.${businessName}.service.impl; + +import java.util.List; +#if($table.tree) +import java.util.ArrayList; +import com.archive.framework.web.domain.Ztree; +#end +#foreach ($column in $columns) +#if($column.javaField == 'createTime' || $column.javaField == 'updateTime') +import com.archive.common.utils.DateUtils; +#break +#end +#end +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +#if($table.sub) +import java.util.ArrayList; +import com.archive.common.utils.StringUtils; +import org.springframework.transaction.annotation.Transactional; +import ${packageName}.${businessName}.domain.${subClassName}; +#end +import ${packageName}.${businessName}.mapper.${ClassName}Mapper; +import ${packageName}.${businessName}.domain.${ClassName}; +import ${packageName}.${businessName}.service.I${ClassName}Service; +import com.archive.common.utils.text.Convert; + +/** + * ${functionName}Service业务层处理 + * + * @author ${author} + * @date ${datetime} + */ +@Service +public class ${ClassName}ServiceImpl implements I${ClassName}Service +{ + @Autowired + private ${ClassName}Mapper ${className}Mapper; + + /** + * 查询${functionName} + * + * @param ${pkColumn.javaField} ${functionName}ID + * @return ${functionName} + */ + @Override + public ${ClassName} select${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}) + { + return ${className}Mapper.select${ClassName}ById(${pkColumn.javaField}); + } + + /** + * 查询${functionName}列表 + * + * @param ${className} ${functionName} + * @return ${functionName} + */ + @Override + public List<${ClassName}> select${ClassName}List(${ClassName} ${className}) + { + return ${className}Mapper.select${ClassName}List(${className}); + } + + /** + * 新增${functionName} + * + * @param ${className} ${functionName} + * @return 结果 + */ +#if($table.sub) + @Transactional +#end + @Override + public int insert${ClassName}(${ClassName} ${className}) + { +#foreach ($column in $columns) +#if($column.javaField == 'createTime') + ${className}.setCreateTime(DateUtils.getNowDate()); +#end +#end +#if($table.sub) + int rows = ${className}Mapper.insert${ClassName}(${className}); + insert${subClassName}(${className}); + return rows; +#else + return ${className}Mapper.insert${ClassName}(${className}); +#end + } + + /** + * 修改${functionName} + * + * @param ${className} ${functionName} + * @return 结果 + */ +#if($table.sub) + @Transactional +#end + @Override + public int update${ClassName}(${ClassName} ${className}) + { +#foreach ($column in $columns) +#if($column.javaField == 'updateTime') + ${className}.setUpdateTime(DateUtils.getNowDate()); +#end +#end +#if($table.sub) + ${className}Mapper.delete${subClassName}By${subTableFkClassName}(${className}.get${pkColumn.capJavaField}()); + insert${subClassName}(${className}); +#end + return ${className}Mapper.update${ClassName}(${className}); + } + + /** + * 删除${functionName}对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ +#if($table.sub) + @Transactional +#end + @Override + public int delete${ClassName}ByIds(String ids) + { +#if($table.sub) + ${className}Mapper.delete${subClassName}By${subTableFkClassName}s(Convert.toStrArray(ids)); +#end + return ${className}Mapper.delete${ClassName}ByIds(Convert.toStrArray(ids)); + } + + /** + * 删除${functionName}信息 + * + * @param ${pkColumn.javaField} ${functionName}ID + * @return 结果 + */ + @Override + public int delete${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}) + { +#if($table.sub) + ${className}Mapper.delete${subClassName}By${subTableFkClassName}(${pkColumn.javaField}); +#end + return ${className}Mapper.delete${ClassName}ById(${pkColumn.javaField}); + } +#if($table.tree) + + /** + * 查询${functionName}树列表 + * + * @return 所有${functionName}信息 + */ + @Override + public List select${ClassName}Tree() + { + List<${ClassName}> ${className}List = ${className}Mapper.select${ClassName}List(new ${ClassName}()); + List ztrees = new ArrayList(); + for (${ClassName} ${className} : ${className}List) + { + Ztree ztree = new Ztree(); +#set($TreeCode=$treeCode.substring(0,1).toUpperCase() + ${treeCode.substring(1)}) +#set($TreeParentCode=$treeParentCode.substring(0,1).toUpperCase() + ${treeParentCode.substring(1)}) +#set($TreeName=$treeName.substring(0,1).toUpperCase() + ${treeName.substring(1)}) + ztree.setId(${className}.get${TreeCode}()); + ztree.setpId(${className}.get${TreeParentCode}()); + ztree.setName(${className}.get${TreeName}()); + ztree.setTitle(${className}.get${TreeName}()); + ztrees.add(ztree); + } + return ztrees; + } +#end +#if($table.sub) + + /** + * 新增${subTable.functionName}信息 + * + * @param ${className} ${functionName}对象 + */ + public void insert${subClassName}(${ClassName} ${className}) + { + List<${subClassName}> ${subclassName}List = ${className}.get${subClassName}List(); + Long ${pkColumn.javaField} = ${className}.get${pkColumn.capJavaField}(); + if (StringUtils.isNotNull(${subclassName}List)) + { + List<${subClassName}> list = new ArrayList<${subClassName}>(); + for (${subClassName} ${subclassName} : ${subclassName}List) + { + ${subclassName}.set${subTableFkClassName}(${pkColumn.javaField}); + list.add(${subclassName}); + } + if (list.size() > 0) + { + ${className}Mapper.batch${subClassName}(list); + } + } + } +#end +} diff --git a/src/main/resources/vm/java/sub-domain.java.vm b/src/main/resources/vm/java/sub-domain.java.vm new file mode 100644 index 0000000..84e7b7c --- /dev/null +++ b/src/main/resources/vm/java/sub-domain.java.vm @@ -0,0 +1,75 @@ +package ${packageName}.${businessName}.domain; + +#foreach ($import in $subImportList) +import ${import}; +#end +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.archive.framework.aspectj.lang.annotation.Excel; +import com.archive.framework.web.domain.BaseEntity; + +/** + * ${subTable.functionName}对象 ${subTableName} + * + * @author ${author} + * @date ${datetime} + */ +public class ${subClassName} extends BaseEntity +{ + private static final long serialVersionUID = 1L; + +#foreach ($column in $subTable.columns) +#if(!$table.isSuperColumn($column.javaField)) + /** $column.columnComment */ +#if($column.list) +#set($parentheseIndex=$column.columnComment.indexOf("(")) +#if($parentheseIndex != -1) +#set($comment=$column.columnComment.substring(0, $parentheseIndex)) +#else +#set($comment=$column.columnComment) +#end +#if($parentheseIndex != -1) + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") +#elseif($column.javaType == 'Date') + @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd") +#else + @Excel(name = "${comment}") +#end +#end + private $column.javaType $column.javaField; + +#end +#end +#foreach ($column in $subTable.columns) +#if(!$table.isSuperColumn($column.javaField)) +#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) +#set($AttrName=$column.javaField) +#else +#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#end + public void set${AttrName}($column.javaType $column.javaField) + { + this.$column.javaField = $column.javaField; + } + + public $column.javaType get${AttrName}() + { + return $column.javaField; + } +#end +#end + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) +#foreach ($column in $subTable.columns) +#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) +#set($AttrName=$column.javaField) +#else +#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#end + .append("${column.javaField}", get${AttrName}()) +#end + .toString(); + } +} diff --git a/src/main/resources/vm/sql/sql.vm b/src/main/resources/vm/sql/sql.vm new file mode 100644 index 0000000..d5121af --- /dev/null +++ b/src/main/resources/vm/sql/sql.vm @@ -0,0 +1,22 @@ +-- 菜单 SQL +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}', '${parentMenuId}', '1', '/${moduleName}/${businessName}', 'C', '0', '${permissionPrefix}:view', '#', 'admin', sysdate(), '', null, '${functionName}菜单'); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}查询', @parentId, '1', '#', 'F', '0', '${permissionPrefix}:list', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}新增', @parentId, '2', '#', 'F', '0', '${permissionPrefix}:add', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}修改', @parentId, '3', '#', 'F', '0', '${permissionPrefix}:edit', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}删除', @parentId, '4', '#', 'F', '0', '${permissionPrefix}:remove', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}导出', @parentId, '5', '#', 'F', '0', '${permissionPrefix}:export', '#', 'admin', sysdate(), '', null, ''); diff --git a/src/main/resources/vm/xml/mapper.xml.vm b/src/main/resources/vm/xml/mapper.xml.vm new file mode 100644 index 0000000..5a5ed3d --- /dev/null +++ b/src/main/resources/vm/xml/mapper.xml.vm @@ -0,0 +1,147 @@ + + + + + +#foreach ($column in $columns) + +#end +#if($table.tree) + +#end + +#if($table.sub) + + + + + + +#foreach ($column in $subTable.columns) + +#end + +#end + + + select#foreach($column in $columns) $column.columnName#if($velocityCount != $columns.size()),#end#end from ${tableName} + + + + + + + + insert into ${tableName} + +#foreach($column in $columns) +#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment) + $column.columnName, +#end +#end + + +#foreach($column in $columns) +#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment) + #{$column.javaField}, +#end +#end + + + + + update ${tableName} + +#foreach($column in $columns) +#if($column.columnName != $pkColumn.columnName) + $column.columnName = #{$column.javaField}, +#end +#end + + where ${pkColumn.columnName} = #{${pkColumn.javaField}} + + + + delete from ${tableName} where ${pkColumn.columnName} = #{${pkColumn.javaField}} + + + + delete from ${tableName} where ${pkColumn.columnName} in + + #{${pkColumn.javaField}} + + +#if($table.sub) + + + delete from ${subTableName} where ${subTableFkName} in + + #{${subTableFkclassName}} + + + + + delete from ${subTableName} where ${subTableFkName} = #{${subTableFkclassName}} + + + + insert into ${subTableName}(#foreach($column in $subTable.columns) $column.columnName#if($velocityCount != $subTable.columns.size()),#end#end) values + + (#foreach($column in $subTable.columns) #{item.$column.javaField}#if($velocityCount != $subTable.columns.size()),#end#end) + + +#end + + \ No newline at end of file