增加工具与js

This commit is contained in:
wanggeng 2022-09-07 17:38:18 +08:00
parent 88342a08ae
commit e51ffd3aa0
7 changed files with 10445 additions and 0 deletions

View File

@ -0,0 +1,855 @@
function LayuiFileUpload(layui, viewer) {
let $ = layui.$;
let form = layui.form;
let upload = layui.upload;
let ajax = top.restAjax || top.ajax;
let dialog = top.dialog;
let Viewer = viewer;
let viewerObj = {};
let style = `
<style>
/* 上传图片 */
.form-upload-image { position: relative; display: inline-block; margin: 10px 10px 0 0; }
.form-upload-image:last-child { margin-right: 0; }
.form-upload-image img { height: 100px; }
.form-upload-image .delete-btn { position: absolute; top: 0; right: 0; margin: 0; }
.layui-form-item .upload-image-box { clear: both; width: 100%; padding: 0; display: block; }
/* 上传附件 */
.form-upload-file { }
.form-upload-file .operation { text-align: center; }
.form-upload-file .delete-btn { margin: 0; }
/* 上传视频 */
.form-upload-video { position: relative; display: inline-block; margin: 10px 10px 0 0; }
.form-upload-video:last-child { margin-right: 0; }
.form-upload-video .delete-btn { position: absolute; top: 0; right: 0; margin: 0; }
/* 上传音频 */
.form-upload-audio { position: relative; display: inline-block; margin: 10px 10px 0 0; }
.form-upload-audio:last-child { margin-right: 0; }
.form-upload-audio .delete-btn { position: absolute; top: 0; right: 0; margin: 0; }
</style>
`
$(document.head).append(style);
/**
* 初始化图片上传
* @param opt
*/
function initUploadImage(opt) {
let maxCount = opt.maxCount ? parseInt(opt.maxCount) : 9
maxCount = opt.maxCount < 0 ? 9 : opt.maxCount;
let fieldName = opt.fieldName;
let headers = opt.headers;
headers = headers ? headers : {};
let isApp = opt.isApp;
let isAppRelease = opt.isAppRelease;
let isShow = opt.isShow;
let id = '#' + fieldName;
let fileBoxId = id + 'FileBox';
let uploadBtnId = id + 'UploadBtn';
let deleteBtnClass = `.delete-${fieldName}-btn`;
function init(callback) {
let fileIds = $(id).val();
let fileIdArray = fileIds ? fileIds.split(',') : [];
let html = '';
for (let i = 0, fileId; fileId = fileIdArray[i++];) {
html += `
<div class="form-upload-image">
<img src="route/file/v2/download/true/${fileId}" align="加载失败">
<a class="layui-btn layui-btn-xs layui-btn-danger delete-btn delete-${fieldName}-btn" href="javascript:void(0);" data-id="${fileId}" data-name="${fieldName}">
<i class="fa fa-trash-o"></i>
</a>
</div>
`;
}
$(fileBoxId).empty();
$(fileBoxId).append(html);
if (fileIdArray.length < maxCount) {
$(uploadBtnId).removeClass('layui-btn-disabled');
$(uploadBtnId).attr('disabled', false);
} else {
$(uploadBtnId).addClass('layui-btn-disabled');
$(uploadBtnId).attr('disabled', true);
}
callback ? callback() : '';
}
function addClick() {
let layerLoadingIndex;
let url = 'api/file/v2/upload-image';
if (isApp) {
url = 'app/file/v2/upload-image'
}
if (isAppRelease) {
url = 'app/file/v2/upload-image-release'
}
upload.render({
elem: uploadBtnId,
url: url,
accept: 'images',
acceptMime: 'image/*',
field: 'image',
exts: 'jpg|png|gif|bmp|jpeg',
name: fieldName,
headers: headers,
before: function (obj) {
layerLoadingIndex = layer.msg('上传中...', {icon: 16, time: 0, shade: 0.3})
},
done: function (res, index, upload) {
layer.close(layerLoadingIndex);
let name = this.name;
let files = $('#' + this.name).val();
if (files.length > 0) {
files += ',';
}
files += res.data.fileId;
$('#' + name).val(files);
init(function () {
viewerObj[name].update();
});
},
error: function (index, upload) {
layer.close(layerLoadingIndex);
layer.msg('文件上传失败');
},
progress: function (n, elem, res, index) {
let percent = n + '%'
console.log(percent);
console.log(elem);
console.log(res);
console.log(index);
// element.progress('demo-' + index, n + '%');
}
});
$(document).on('click', deleteBtnClass, function () {
let name = this.dataset.name;
let id = this.dataset.id;
let files = $('#' + name).val().replace(id, '');
files = files.replace(/\,+/g, ',');
if (files.charAt(0) == ',') {
files = files.substring(1);
}
if (files.charAt(files.length - 1) == ',') {
files = files.substring(0, files.length - 1);
}
$('#' + name).val(files);
init(function () {
viewerObj[name].update();
});
});
}
init(function () {
viewerObj[fieldName] = new Viewer(document.getElementById(fieldName + 'FileBox'), {navbar: false});
});
if (!isShow) {
addClick();
} else {
$(uploadBtnId).hide();
}
}
/**
* 初始化图片上传
* @param fieldName
* @param maxCount
*/
this.initUploadImage = function (fieldName, maxCount) {
initUploadImage({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: false,
isShow: false
});
}
/**
* 初始化APP图片上传
* @param fieldName
* @param maxCount
* @param headers
*/
this.initAppUploadImage = function (fieldName, maxCount, headers) {
initUploadImage({
fieldName: fieldName,
maxCount: maxCount,
isApp: true,
isAppRelease: false,
isShow: false,
headers: headers
});
}
/**
* 初始化APP放行图片上传
* @param fieldName
* @param maxCount
* @param headers
*/
this.initAppReleaseUploadImage = function (fieldName, maxCount, headers) {
initUploadImage({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: true,
isShow: false,
headers: headers
});
}
/**
* 显示上传图片
* @param fieldName
* @param maxCount
*/
this.initShowUploadImage = function (fieldName, maxCount) {
initUploadImage({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: false,
isShow: true
});
}
/**
* 初始化文件上传
* @param opt
*/
function initUploadFile(opt) {
let maxCount = opt.maxCount ? parseInt(opt.maxCount) : 3
maxCount = opt.maxCount < 0 ? 3 : opt.maxCount;
let fieldName = opt.fieldName;
let headers = opt.headers;
headers = headers ? headers : {};
let isApp = opt.isApp;
let isAppRelease = opt.isAppRelease;
let isShow = opt.isShow;
let id = '#' + fieldName;
let fileBoxId = id + 'FileBox';
let uploadBtnId = id + 'UploadBtn';
let deleteBtnClass = '.delete-' + fieldName + '-btn';
function init() {
let files = $(id).val();
let fileArray = files ? files.split(',') : [];
let html = '';
if (fileArray.length > 0) {
html += [
'<div class="form-upload-file">',
' <table class="layui-table" lay-size="sm">',
' <colgroup>',
' <col>',
' <col width="60">',
' </colgroup>',
' <thead>',
' <tr>',
' <th>文件名</th>',
' <th class="operation">操作</th>',
' </tr>',
' </thead>',
' <tbody>',
].join('');
for (let i = 0, file; file = fileArray[i++];) {
let idNameArray = file.split(':');
let fileId = idNameArray[0];
let fileName = idNameArray[1];
html += [
'<tr>',
' <td><a href="route/file/v2/download/false/'+ fileId +'" target="_blank">' + fileName + '</a></td>',
' <td class="operation">',
' <button type="button" class="layui-btn layui-btn-xs layui-btn-danger delete-btn delete-' + fieldName + '-btn" data-id="' + fileId + '" data-name="' + fileName + '" data-field-name="' + fieldName + '">删除</button>',
' </td>',
'</tr>',
].join('');
}
html += [
' </tbody>',
' </table>',
'</div>'
].join('');
}
$(fileBoxId).empty();
$(fileBoxId).append(html);
if (fileArray.length < maxCount) {
$(uploadBtnId).removeClass('layui-btn-disabled');
$(uploadBtnId).attr('disabled', false);
} else {
$(uploadBtnId).addClass('layui-btn-disabled');
$(uploadBtnId).attr('disabled', true);
}
}
function addClick() {
let layerLoadingIndex;
let url = 'api/file/v2/upload-file';
if (isApp) {
url = 'app/file/v2/upload-file'
}
if (isAppRelease) {
url = 'app/file/v2/upload-file-release'
}
upload.render({
elem: uploadBtnId,
url: url,
accept: 'file',
acceptMime: [
'application/pdf',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.ms-excel',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd.ms-powerpoint',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/vnd.ms-works',
'text/plain',
'application/x-rar',
'application/x-zip-compressed'
].join(','),
field: 'file',
exts: 'pdf|doc|docx|xls|xlsx|ppt|pptx|wps|txt|rar|zip',
name: fieldName,
headers: headers,
before: function (obj) {
layerLoadingIndex = layer.msg('上传中...', {icon: 16, time: 0, shade: 0.3})
},
done: function (res, index, upload) {
layer.close(layerLoadingIndex);
let name = this.name;
let files = $('#' + this.name).val();
if (files.length > 0) {
files += ',';
}
files += res.data.fileId + ':' + res.data.fileName.replace(/\,/g, '');
$('#' + name).val(files);
init();
},
error: function (index, upload) {
layer.close(layerLoadingIndex);
layer.msg('文件上传失败');
},
progress: function (n, elem, res, index) {}
});
$(document).on('click', deleteBtnClass, function () {
let id = this.dataset.id;
let name = this.dataset.name;
let fieldName = this.dataset.fieldName;
let files = $('#' + fieldName).val().replace(id + ':' + name, '');
files = files.replace(/\,+/g, ',');
if (files.charAt(0) == ',') {
files = files.substring(1);
}
if (files.charAt(files.length - 1) == ',') {
files = files.substring(0, files.length - 1);
}
$('#' + fieldName).val(files);
init();
});
}
init();
if (!isShow) {
addClick();
} else {
$(uploadBtnId).hide();
}
}
/**
* 初始化文件上传
* @param fieldName
* @param maxCount
*/
this.initUploadFile = function (fieldName, maxCount) {
initUploadFile({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: false,
isShow: false
})
}
/**
* 初始化APP文件上传
* @param fieldName
* @param maxCount
* @param headers
*/
this.initAppUploadFile = function (fieldName, maxCount, headers) {
initUploadFile({
fieldName: fieldName,
maxCount: maxCount,
isApp: true,
isAppRelease: false,
isShow: false,
headers: headers
});
}
/**
* 初始化APP放行文件上传
* @param fieldName
* @param maxCount
* @param headers
*/
this.initAppReleaseUploadFile = function (fieldName, maxCount, headers) {
initUploadFile({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: true,
isShow: false,
headers: headers
});
}
/**
* 显示上传文件
* @param fieldName
* @param maxCount
*/
this.initShowUploadFile = function (fieldName, maxCount) {
initUploadFile({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: false,
isShow: true
});
}
/**
* 初始化视频上传
* @param opt
*/
function initUploadVideo(opt) {
let maxCount = opt.maxCount ? parseInt(opt.maxCount) : 1
maxCount = opt.maxCount < 0 ? 1 : opt.maxCount;
let fieldName = opt.fieldName;
let headers = opt.headers;
headers = headers ? headers : {};
let isApp = opt.isApp;
let isAppRelease = opt.isAppRelease;
let isShow = opt.isShow;
let id = '#' + fieldName;
let fileBoxId = id + 'FileBox';
let uploadBtnId = id + 'UploadBtn';
let deleteBtnClass = '.delete-' + fieldName + '-btn';
function init() {
let files = $(id).val();
let fileArray = files ? files.split(',') : [];
let html = '';
for (let i = 0, file; file = fileArray[i++];) {
let idNameArray = file.split(':');
let fileId = idNameArray[0];
let fileName = idNameArray[1];
html += [
'<div class="form-upload-video">',
' <video width="320" height="240" controls>',
' <source src="route/file/v2/download/true/' + fileId + '" type="video/mp4">',
' 您的浏览器不支持 video 标签',
' </video>',
' <a class="layui-btn layui-btn-xs layui-btn-danger delete-btn delete-' + fieldName + '-btn" href="javascript:void(0);" data-id="' + fileId + '" data-name="' + fileName + '" data-field-name="' + fieldName + '">',
' <i class="fa fa-trash-o"></i>',
' </a>',
'</div>',
].join('');
}
$(fileBoxId).empty();
$(fileBoxId).append(html);
if (fileArray.length < maxCount) {
$(uploadBtnId).removeClass('layui-btn-disabled');
$(uploadBtnId).attr('disabled', false);
} else {
$(uploadBtnId).addClass('layui-btn-disabled');
$(uploadBtnId).attr('disabled', true);
}
}
function addClick() {
let layerLoadingIndex;
let url = 'api/file/v2/upload-video';
if (isApp) {
url = 'app/file/v2/upload-video'
}
if (isAppRelease) {
url = 'app/file/v2/upload-video-release'
}
upload.render({
elem: uploadBtnId,
url: url,
accept: 'video',
acceptMime: 'video/mp4',
exts: 'mp4',
field: 'video',
name: fieldName,
headers: headers,
before: function (obj) {
layerLoadingIndex = layer.msg('上传中...', {icon: 16, time: 0, shade: 0.3})
},
done: function (res, index, upload) {
layer.close(layerLoadingIndex);
let name = this.name;
let files = $('#' + this.name).val();
if (files.length > 0) {
files += ',';
}
files += res.data.fileId + ':' + res.data.fileName.replace(/\,/g, '');
$('#' + name).val(files);
init();
},
error: function (index, upload) {
layer.close(layerLoadingIndex);
layer.msg('文件上传失败');
},
progress: function (n, elem, res, index) {}
});
$(document).on('click', deleteBtnClass, function () {
let name = this.dataset.name;
let id = this.dataset.id;
let fieldName = this.dataset.fieldName;
let files = $('#' + fieldName).val().replace(id + ':' + name, '');
files = files.replace(/\,+/g, ',');
if (files.charAt(0) == ',') {
files = files.substring(1);
}
if (files.charAt(files.length - 1) == ',') {
files = files.substring(0, files.length - 1);
}
$('#' + fieldName).val(files);
init();
});
}
init();
if (!isShow) {
addClick();
} else {
$(uploadBtnId).hide();
}
}
/**
* 初始化视频上传
* @param fieldName
* @param maxCount
*/
this.initUploadVideo = function (fieldName, maxCount) {
initUploadVideo({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: false,
isShow: false
})
}
/**
* 初始化APP视频上传
* @param fieldName
* @param maxCount
* @param headers
*/
this.initAppUploadVideo = function (fieldName, maxCount, headers) {
initUploadVideo({
fieldName: fieldName,
maxCount: maxCount,
isApp: true,
isAppRelease: false,
isShow: false,
headers: headers
});
}
/**
* 初始化APP放行视频上传
* @param fieldName
* @param maxCount
* @param headers
*/
this.initAppReleaseUploadVideo = function (fieldName, maxCount, headers) {
initUploadVideo({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: true,
isShow: false,
headers: headers
});
}
/**
* 显示上传视频
* @param fieldName
* @param maxCount
*/
this.initShowUploadVideo = function (fieldName, maxCount) {
initUploadVideo({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: false,
isShow: true
});
}
function initUploadAudio(opt) {
let maxCount = opt.maxCount ? parseInt(opt.maxCount) : 1
maxCount = opt.maxCount < 0 ? 1 : opt.maxCount;
let fieldName = opt.fieldName;
let headers = opt.headers;
headers = headers ? headers : {};
let isApp = opt.isApp;
let isAppRelease = opt.isAppRelease;
let isShow = opt.isShow;
let id = '#' + fieldName;
let fileBoxId = id + 'FileBox';
let uploadBtnId = id + 'UploadBtn';
let deleteBtnClass = '.delete-' + fieldName + '-btn';
function init() {
let files = $(id).val();
let fileArray = files ? files.split(',') : [];
let html = '';
for (let i = 0, file; file = fileArray[i++];) {
let idNameArray = file.split(':');
let fileId = idNameArray[0];
let fileName = idNameArray[1];
html += [
'<div class="form-upload-video">',
' <audio src="route/file/v2/download/true/' + fileId + '" controls>',
' 您的浏览器不支持 audio 标签。',
' </audio>',
' <a class="layui-btn layui-btn-xs layui-btn-danger delete-btn delete-' + fieldName + '-btn" href="javascript:void(0);" data-id="' + fileId + '" data-name="' + fileName + '" data-field-name="' + fieldName + '">',
' <i class="fa fa-trash-o"></i>',
' </a>',
'</div>',
].join('');
}
$(fileBoxId).empty();
$(fileBoxId).append(html);
if (fileArray.length < maxCount) {
$(uploadBtnId).removeClass('layui-btn-disabled');
$(uploadBtnId).attr('disabled', false);
} else {
$(uploadBtnId).addClass('layui-btn-disabled');
$(uploadBtnId).attr('disabled', true);
}
}
function addClick() {
let layerLoadingIndex;
let url = 'api/file/v2/upload-audio';
if (isApp) {
url = 'app/file/v2/upload-audio'
}
if (isAppRelease) {
url = 'app/file/v2/upload-audio-release'
}
upload.render({
elem: uploadBtnId,
url: url,
accept: 'audio',
acceptMime: [
'audio/wav',
'audio/mp3'
],
exts: 'wav|mp3',
field: 'audio',
name: fieldName,
headers: headers,
before: function (obj) {
layerLoadingIndex = layer.msg('上传中...', {icon: 16, time: 0, shade: 0.3})
},
done: function (res, index, upload) {
layer.close(layerLoadingIndex);
let name = this.name;
let files = $('#' + this.name).val();
if (files.length > 0) {
files += ',';
}
files += res.data.fileId + ':' + res.data.fileName.replace(/\,/g, '');
$('#' + name).val(files);
init();
},
error: function (index, upload) {
layer.close(layerLoadingIndex);
layer.msg('文件上传失败');
},
progress: function (n, elem, res, index) {}
});
$(document).on('click', deleteBtnClass, function () {
let name = this.dataset.name;
let id = this.dataset.id;
let fieldName = this.dataset.fieldName;
let files = $('#' + fieldName).val().replace(id + ':' + name, '');
files = files.replace(/\,+/g, ',');
if (files.charAt(0) == ',') {
files = files.substring(1);
}
if (files.charAt(files.length - 1) == ',') {
files = files.substring(0, files.length - 1);
}
$('#' + fieldName).val(files);
init();
});
}
init();
if (!isShow) {
addClick();
} else {
$(uploadBtnId).hide();
}
}
/**
* 初始化音频上传
* @param fieldName
* @param maxCount
*/
this.initUploadAudio = function (fieldName, maxCount) {
initUploadAudio({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: false,
isShow: false
})
}
/**
* 初始化APP音频上传
* @param fieldName
* @param maxCount
* @param headers
*/
this.initAppUploadAudio = function (fieldName, maxCount, headers) {
initUploadAudio({
fieldName: fieldName,
maxCount: maxCount,
isApp: true,
isAppRelease: false,
isShow: false,
headers: headers
});
}
/**
* 初始化APP放行音频上传
* @param fieldName
* @param maxCount
* @param headers
*/
this.initAppReleaseUploadAudio = function (fieldName, maxCount, headers) {
initUploadAudio({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: true,
isShow: false,
headers: headers
});
}
/**
* 显示上传音频
* @param fieldName
* @param maxCount
*/
this.initShowUploadAudio = function (fieldName, maxCount) {
initUploadAudio({
fieldName: fieldName,
maxCount: maxCount,
isApp: false,
isAppRelease: false,
isShow: true
});
}
/**
* 初始化日期
* @param opt
*/
this.initDate = function (opt) {
laydate.render({
elem: '#' + opt.id,
type: opt.datetype,
format: opt.dateformat,
value: opt.dateDefaultValue,
min: opt.dataMinValue,
max: opt.dataMaxValue,
trigger: 'click'
});
}
/**
* 初始化checkbox数据
* @param form
* @param checkedData
* @param id
*/
this.initCheckboxData = function (formName, checkedData, id) {
let dataArray = checkedData.split(',');
let obj = {};
for (let i = 0, data; data = dataArray[i++];) {
obj[id + '[' + data + ']'] = true;
}
form.val(formName, obj);
}
/**
* 设置复选框值
* @param formData
* @param id
*/
this.setCheckboxValue = function (formData, id) {
formData.field[id] = ajax.checkBoxToString(formData.field, id);
}
/**
* 设置开关值
* @param formData
* @param id
*/
this.setSwitchValue = function (formData, id) {
formData.field[id] = formData.field[id] ? 1 : 0;
}
/**
* 清空上传字段
* @param formData
*/
this.clearUploadField = function (formData) {
let fileInputs = $(formData.form).find('input[type="file"]');
if (fileInputs.length === 0) {
return;
}
$.each(fileInputs, function (index, item) {
delete formData.field[item.name];
});
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,456 @@
/*!
* Viewer.js v1.3.5
* https://fengyuanchen.github.io/viewerjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-07-04T11:00:13.705Z
*/
.viewer-zoom-in::before,
.viewer-zoom-out::before,
.viewer-one-to-one::before,
.viewer-reset::before,
.viewer-prev::before,
.viewer-play::before,
.viewer-next::before,
.viewer-rotate-left::before,
.viewer-rotate-right::before,
.viewer-flip-horizontal::before,
.viewer-flip-vertical::before,
.viewer-fullscreen::before,
.viewer-fullscreen-exit::before,
.viewer-close::before {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-size: 280px;
color: transparent;
display: block;
font-size: 0;
height: 20px;
line-height: 0;
width: 20px;
}
.viewer-zoom-in::before {
background-position: 0 0;
content: 'Zoom In';
}
.viewer-zoom-out::before {
background-position: -20px 0;
content: 'Zoom Out';
}
.viewer-one-to-one::before {
background-position: -40px 0;
content: 'One to One';
}
.viewer-reset::before {
background-position: -60px 0;
content: 'Reset';
}
.viewer-prev::before {
background-position: -80px 0;
content: 'Previous';
}
.viewer-play::before {
background-position: -100px 0;
content: 'Play';
}
.viewer-next::before {
background-position: -120px 0;
content: 'Next';
}
.viewer-rotate-left::before {
background-position: -140px 0;
content: 'Rotate Left';
}
.viewer-rotate-right::before {
background-position: -160px 0;
content: 'Rotate Right';
}
.viewer-flip-horizontal::before {
background-position: -180px 0;
content: 'Flip Horizontal';
}
.viewer-flip-vertical::before {
background-position: -200px 0;
content: 'Flip Vertical';
}
.viewer-fullscreen::before {
background-position: -220px 0;
content: 'Enter Full Screen';
}
.viewer-fullscreen-exit::before {
background-position: -240px 0;
content: 'Exit Full Screen';
}
.viewer-close::before {
background-position: -260px 0;
content: 'Close';
}
.viewer-container {
bottom: 0;
direction: ltr;
font-size: 0;
left: 0;
line-height: 0;
overflow: hidden;
position: absolute;
right: 0;
-webkit-tap-highlight-color: transparent;
top: 0;
-ms-touch-action: none;
touch-action: none;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.viewer-container::-moz-selection,
.viewer-container *::-moz-selection {
background-color: transparent;
}
.viewer-container::selection,
.viewer-container *::selection {
background-color: transparent;
}
.viewer-container img {
display: block;
height: auto;
max-height: none !important;
max-width: none !important;
min-height: 0 !important;
min-width: 0 !important;
width: 100%;
}
.viewer-canvas {
bottom: 0;
left: 0;
overflow: hidden;
position: absolute;
right: 0;
top: 0;
}
.viewer-canvas > img {
height: auto;
margin: 15px auto;
max-width: 90% !important;
width: auto;
}
.viewer-footer {
bottom: 0;
left: 0;
overflow: hidden;
position: absolute;
right: 0;
text-align: center;
}
.viewer-navbar {
background-color: rgba(0, 0, 0, 0.5);
overflow: hidden;
}
.viewer-list {
-webkit-box-sizing: content-box;
box-sizing: content-box;
height: 50px;
margin: 0;
overflow: hidden;
padding: 1px 0;
}
.viewer-list > li {
color: transparent;
cursor: pointer;
float: left;
font-size: 0;
height: 50px;
line-height: 0;
opacity: 0.5;
overflow: hidden;
-webkit-transition: opacity 0.15s;
transition: opacity 0.15s;
width: 30px;
}
.viewer-list > li:hover {
opacity: 0.75;
}
.viewer-list > li + li {
margin-left: 1px;
}
.viewer-list > .viewer-loading {
position: relative;
}
.viewer-list > .viewer-loading::after {
border-width: 2px;
height: 20px;
margin-left: -10px;
margin-top: -10px;
width: 20px;
}
.viewer-list > .viewer-active,
.viewer-list > .viewer-active:hover {
opacity: 1;
}
.viewer-player {
background-color: #000;
bottom: 0;
cursor: none;
display: none;
left: 0;
position: absolute;
right: 0;
top: 0;
}
.viewer-player > img {
left: 0;
position: absolute;
top: 0;
}
.viewer-toolbar > ul {
display: inline-block;
margin: 0 auto 5px;
overflow: hidden;
padding: 3px 0;
}
.viewer-toolbar > ul > li {
background-color: rgba(0, 0, 0, 0.5);
border-radius: 50%;
cursor: pointer;
float: left;
height: 24px;
overflow: hidden;
-webkit-transition: background-color 0.15s;
transition: background-color 0.15s;
width: 24px;
}
.viewer-toolbar > ul > li:hover {
background-color: rgba(0, 0, 0, 0.8);
}
.viewer-toolbar > ul > li::before {
margin: 2px;
}
.viewer-toolbar > ul > li + li {
margin-left: 1px;
}
.viewer-toolbar > ul > .viewer-small {
height: 18px;
margin-bottom: 3px;
margin-top: 3px;
width: 18px;
}
.viewer-toolbar > ul > .viewer-small::before {
margin: -1px;
}
.viewer-toolbar > ul > .viewer-large {
height: 30px;
margin-bottom: -3px;
margin-top: -3px;
width: 30px;
}
.viewer-toolbar > ul > .viewer-large::before {
margin: 5px;
}
.viewer-tooltip {
background-color: rgba(0, 0, 0, 0.8);
border-radius: 10px;
color: #fff;
display: none;
font-size: 12px;
height: 20px;
left: 50%;
line-height: 20px;
margin-left: -25px;
margin-top: -10px;
position: absolute;
text-align: center;
top: 50%;
width: 50px;
}
.viewer-title {
color: #ccc;
display: inline-block;
font-size: 12px;
line-height: 1;
margin: 0 5% 5px;
max-width: 90%;
opacity: 0.8;
overflow: hidden;
text-overflow: ellipsis;
-webkit-transition: opacity 0.15s;
transition: opacity 0.15s;
white-space: nowrap;
}
.viewer-title:hover {
opacity: 1;
}
.viewer-button {
background-color: rgba(0, 0, 0, 0.5);
border-radius: 50%;
cursor: pointer;
height: 80px;
overflow: hidden;
position: absolute;
right: -40px;
top: -40px;
-webkit-transition: background-color 0.15s;
transition: background-color 0.15s;
width: 80px;
}
.viewer-button:focus,
.viewer-button:hover {
background-color: rgba(0, 0, 0, 0.8);
}
.viewer-button::before {
bottom: 15px;
left: 15px;
position: absolute;
}
.viewer-fixed {
position: fixed;
}
.viewer-open {
overflow: hidden;
}
.viewer-show {
display: block;
}
.viewer-hide {
display: none;
}
.viewer-backdrop {
background-color: rgba(0, 0, 0, 0.5);
}
.viewer-invisible {
visibility: hidden;
}
.viewer-move {
cursor: move;
cursor: -webkit-grab;
cursor: grab;
}
.viewer-fade {
opacity: 0;
}
.viewer-in {
opacity: 1;
}
.viewer-transition {
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
@-webkit-keyframes viewer-spinner {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes viewer-spinner {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.viewer-loading::after {
-webkit-animation: viewer-spinner 1s linear infinite;
animation: viewer-spinner 1s linear infinite;
border: 4px solid rgba(255, 255, 255, 0.1);
border-left-color: rgba(255, 255, 255, 0.5);
border-radius: 50%;
content: '';
display: inline-block;
height: 40px;
left: 50%;
margin-left: -20px;
margin-top: -20px;
position: absolute;
top: 50%;
width: 40px;
z-index: 1;
}
@media (max-width: 767px) {
.viewer-hide-xs-down {
display: none;
}
}
@media (max-width: 991px) {
.viewer-hide-sm-down {
display: none;
}
}
@media (max-width: 1199px) {
.viewer-hide-md-down {
display: none;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long