From c5b33289299e78f0fba139948e2a0ed1510a7a98 Mon Sep 17 00:00:00 2001 From: ModStart Date: Fri, 3 Feb 2023 20:14:41 +0800 Subject: [PATCH] feat: readme update --- README.md | 85 ++++++++++--------- module/AdminManager/Docs/release.md | 2 +- module/Banner/Docs/release.md | 1 + .../Banner/View/pc/public/bannerNav.blade.php | 2 +- module/Cms/Docs/release.md | 2 +- module/Vendor/Docs/release.md | 6 ++ module/Vendor/Installer/function.php | 10 ++- .../View/quickRun/import/excel.blade.php | 2 +- module/Vendor/config.json | 2 +- public/asset/common/base.js | 2 +- storage/cache/.gitignore | 2 +- vendor/modstart/modstart/asset/common/base.js | 2 +- .../resources/asset/src/common/base.js | 14 ++- .../modstart/resources/asset/src/lib/form.js | 9 +- .../component/header/header-default.html | 6 +- .../sui/bricks/component/search/search.less | 11 +++ .../modstart/src/Admin/Auth/Admin.php | 2 +- .../modstart/src/Core/Input/Request.php | 14 +++ .../modstart/src/Core/Util/MetaUtil.php | 42 +++++++++ .../src/Field/Concern/CanCascadeFields.php | 1 + .../modstart/src/Field/SelectRemote.php | 4 +- .../src/Grid/Displayer/ItemOperate.php | 6 +- .../modstart/views/admin/frame.blade.php | 1 + .../modstart/views/admin/login.blade.php | 4 +- .../core/field/customField-render.blade.php | 19 +++++ .../modstart/views/core/grid/index.blade.php | 2 +- 26 files changed, 187 insertions(+), 66 deletions(-) create mode 100644 vendor/modstart/modstart/src/Core/Util/MetaUtil.php create mode 100644 vendor/modstart/modstart/views/core/field/customField-render.blade.php diff --git a/README.md b/README.md index 722fcc9d..dea1d657 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +

ModStart @@ -7,7 +8,6 @@ 基于 Laravel 的企业内容建站系统

-

License Apache2.0 @@ -44,7 +44,6 @@ 最新版本 GitHub last release 功能完善,模块市场丰富,欢迎交流。 -QQ群: [467107293](https://qm.qq.com/cgi-bin/qm/qr?k=JP5GySRSCM8BUVoIGwfXF_bCe6gPajEb&jump_from=webapi) - 会员模块通用且完整,支持完整的API调用 - 大文件分片上传,进度条显示,已上传文件管理 @@ -57,34 +56,35 @@ QQ群: [467107293](https://qm.qq.com/cgi-bin/qm/qr?k=JP5GySRSCM8BUVoIGwfXF_bCe - 第三方云存储支持,支持云储存分片上传(阿里云、百度云、华为云、腾讯云、FTP、七牛云、UCloud、又拍云) - 第三方短信支持(阿里云、腾讯云、华为云、百度云、253云通讯、聚合、七牛云、融云、赛邮、UCloud、云片、网易云) - 丰富优秀的模块支持: - - [视频点播课](https://modstart.com/m/CourseVideo) - - [一物一码防伪溯源](https://modstart.com/m/Tracking) - - [文章投稿系统](https://modstart.com/m/CmsWriter) - - [Markdown文档管理](https://modstart.com/m/Markdown) - - [视频管理系统](https://modstart.com/m/Video) - - [邮件营销系统](https://modstart.com/m/Edm) - - [视频直播系统](https://modstart.com/m/CourseLive) - - [文库系统](https://modstart.com/m/Wenku) - - [相册系统](https://modstart.com/m/Photo) - - [文库系统](https://modstart.com/m/Wenku) - - [问答系统](https://modstart.com/m/Wenda) - - [IT工具箱](https://modstart.com/m/Tools) - - [帮助中心系统](https://modstart.com/m/CmsHelp) - - [短连接系统](https://modstart.com/m/ShortLink) - - [论坛系统](https://modstart.com/m/Forum) - - [个人博客系统](https://modstart.com/m/Blog) - - [发卡系统](https://modstart.com/m/Faka) - - [积分商城](https://modstart.com/m/CreditShop) - - [兼职招聘系统](https://modstart.com/m/Hire) - - [课程报名系统](https://modstart.com/m/Course) - - [活动报名系统](https://modstart.com/m/Event) - - [简单商城系统](https://modstart.com/m/Shop) - - [网盘系统](https://modstart.com/m/Pan) - - [微信公众号管理系统](https://modstart.com/m/WechatMP) - - [在线客服系统](https://modstart.com/m/LiveChat) - - [图床系统](https://modstart.com/m/PicUploader) - - [通用CMS系统](https://modstart.com/m/Cms) - - ... + - [视频点播课](https://modstart.com/m/CourseVideo) + - [一物一码防伪溯源](https://modstart.com/m/Tracking) + - [文章投稿系统](https://modstart.com/m/CmsWriter) + - [Markdown文档管理](https://modstart.com/m/Markdown) + - [视频管理系统](https://modstart.com/m/Video) + - [邮件营销系统](https://modstart.com/m/Edm) + - [视频直播系统](https://modstart.com/m/CourseLive) + - [文库系统](https://modstart.com/m/Wenku) + - [相册系统](https://modstart.com/m/Photo) + - [文库系统](https://modstart.com/m/Wenku) + - [问答系统](https://modstart.com/m/Wenda) + - [IT工具箱](https://modstart.com/m/Tools) + - [帮助中心系统](https://modstart.com/m/CmsHelp) + - [短连接系统](https://modstart.com/m/ShortLink) + - [论坛系统](https://modstart.com/m/Forum) + - [个人博客系统](https://modstart.com/m/Blog) + - [发卡系统](https://modstart.com/m/Faka) + - [积分商城](https://modstart.com/m/CreditShop) + - [兼职招聘系统](https://modstart.com/m/Hire) + - [课程报名系统](https://modstart.com/m/Course) + - [活动报名系统](https://modstart.com/m/Event) + - [简单商城系统](https://modstart.com/m/Shop) + - [网盘系统](https://modstart.com/m/Pan) + - [微信公众号管理系统](https://modstart.com/m/WechatMP) + - [在线客服系统](https://modstart.com/m/LiveChat) + - [图床系统](https://modstart.com/m/PicUploader) + - [通用CMS系统](https://modstart.com/m/Cms) + - ... + ## 💡 系统简介 @@ -93,6 +93,7 @@ QQ群: [467107293](https://qm.qq.com/cgi-bin/qm/qr?k=JP5GySRSCM8BUVoIGwfXF_bCe 系统完全开源,基于 **Apache 2.0** 开源协议,**免费且不限制商业使用**。 + 功能架构 - [ModStart官方网站](https://modstart.com) @@ -155,17 +156,17 @@ QQ群: [467107293](https://qm.qq.com/cgi-bin/qm/qr?k=JP5GySRSCM8BUVoIGwfXF_bCe - **Laravel 5.1 版本** - - `PHP 5.6` `PHP 7.0` - - `MySQL` `>=5.0` - - `PHP Extension`:`Fileinfo` - - `Apache/Nginx` + - `PHP 5.6` `PHP 7.0` + - `MySQL` `>=5.0` + - `PHP Extension`:`Fileinfo` + - `Apache/Nginx` - **Laravel 9.0 版本** - - `PHP 8.0` `PHP 8.1` - - `MySQL` `>=5.0` - - `PHP Extension`:`Fileinfo` - - `Apache/Nginx` + - `PHP 8.1` + - `MySQL` `>=5.0` + - `PHP Extension`:`Fileinfo` + - `Apache/Nginx` > 我们的测试基于 PHP 的 5.6 / 7.0 / 8.0 / 8.1 版本,系统稳定性最好 @@ -286,4 +287,10 @@ AdminMenu::register(function () { ## ✉️ 使用交流 -QQ交流群: [467107293](https://qm.qq.com/cgi-bin/qm/qr?k=JP5GySRSCM8BUVoIGwfXF_bCe6gPajEb&jump_from=webapi) +### QQ交流群 + + + +### 微信交流群 + + diff --git a/module/AdminManager/Docs/release.md b/module/AdminManager/Docs/release.md index 9144fd16..7b7a2d00 100644 --- a/module/AdminManager/Docs/release.md +++ b/module/AdminManager/Docs/release.md @@ -1,4 +1,4 @@ -## 1.8.0 +## 1.8.0 调用命令升级,日志优化显示 - 新增:系统升级调用命令容错处理 - 优化:系统升级界面日志颜色优化 diff --git a/module/Banner/Docs/release.md b/module/Banner/Docs/release.md index ba54136f..6b76a537 100644 --- a/module/Banner/Docs/release.md +++ b/module/Banner/Docs/release.md @@ -3,6 +3,7 @@ - 新增:快速渲染方式 - 新增:手机自适应宽高比 - 优化:浏览器自适应或尺寸变更时自动更新 +- 修复:导航轮播适配最新版本方法调用 --- diff --git a/module/Banner/View/pc/public/bannerNav.blade.php b/module/Banner/View/pc/public/bannerNav.blade.php index d9f0d29d..95c3df6c 100644 --- a/module/Banner/View/pc/public/bannerNav.blade.php +++ b/module/Banner/View/pc/public/bannerNav.blade.php @@ -40,7 +40,7 @@ @endforeach @endif - + diff --git a/module/Cms/Docs/release.md b/module/Cms/Docs/release.md index 34ed662d..ef75f17a 100644 --- a/module/Cms/Docs/release.md +++ b/module/Cms/Docs/release.md @@ -1,4 +1,4 @@ -## 3.2.0 +## 3.2.0 内容访问优化,模型字段编辑修复 - 优化:内容访问无权限时基础字段保留 - 修复:模型字段不能编辑问题修复 diff --git a/module/Vendor/Docs/release.md b/module/Vendor/Docs/release.md index 982feb31..72136cd1 100644 --- a/module/Vendor/Docs/release.md +++ b/module/Vendor/Docs/release.md @@ -1,3 +1,9 @@ +## 3.8.0 + +- 优化:导入页面兼容后台多标签方式展示 + +--- + ## 3.7.0 任务调度升级,订单处理优化 - 新增:任务调度执行器ScheduleRunner diff --git a/module/Vendor/Installer/function.php b/module/Vendor/Installer/function.php index 77583b0a..96438b7f 100644 --- a/module/Vendor/Installer/function.php +++ b/module/Vendor/Installer/function.php @@ -50,11 +50,15 @@ file_put_contents(ENV_FILE, "APP_ENV=beta\nAPP_DEBUG=true\nAPP_KEY=" . \ModStart\Core\Util\RandomUtil::string(32)); } +function php_is_laravel9() +{ + return in_array(INSTALL_APP, ['CMS9', 'BLOG9']); +} + function php_version_requires() { - if (INSTALL_APP == 'CMS9') { + if (php_is_laravel9()) { return join(',', [ - '8.0.x', '8.1.x', ]); } @@ -66,7 +70,7 @@ function php_version_requires() function php_version_ok() { - if (INSTALL_APP == 'CMS9') { + if (php_is_laravel9()) { if (version_compare(PHP_VERSION, '8.1.0', '<')) { return false; } diff --git a/module/Vendor/View/quickRun/import/excel.blade.php b/module/Vendor/View/quickRun/import/excel.blade.php index 6177cb5c..cb1d7bc5 100644 --- a/module/Vendor/View/quickRun/import/excel.blade.php +++ b/module/Vendor/View/quickRun/import/excel.blade.php @@ -149,7 +149,7 @@ @endsection -@section('bodyContent') +@section($_tabSectionName)

diff --git a/module/Vendor/config.json b/module/Vendor/config.json index 0f6f8d93..8e7265a6 100644 --- a/module/Vendor/config.json +++ b/module/Vendor/config.json @@ -1,7 +1,7 @@ { "name": "Vendor", "title": "通用功能包", - "version": "3.7.0", + "version": "3.8.0", "author": "官方", "description": "提供基础功能", "modstartVersion": ">=3.3.0", diff --git a/public/asset/common/base.js b/public/asset/common/base.js index ffc40d66..cf6d853a 100644 --- a/public/asset/common/base.js +++ b/public/asset/common/base.js @@ -1 +1 @@ -!function(t){var i={};function a(e){if(i[e])return i[e].exports;var n=i[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=t,a.c=i,a.d=function(e,n,t){a.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(n,e){if(1&e&&(n=a(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var i in n)a.d(t,i,function(e){return n[e]}.bind(null,i));return t},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="/asset//",a(a.s=295)}({124:function(e,n,t){var y,g=t(125),m=t(63).utf8,x=t(126),b=t(63).bin;(y=function(e,n){e.constructor==String?e=(n&&"binary"===n.encoding?b:m).stringToBytes(e):x(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var t=g.bytesToWords(e),e=8*e.length,i=1732584193,a=-271733879,o=-1732584194,r=271733878,l=0;l>>24)|4278255360&(t[l]<<24|t[l]>>>8);t[e>>>5]|=128<>>9<<4)]=e;for(var s=y._ff,c=y._gg,u=y._hh,d=y._ii,l=0;l>>0,a=a+p>>>0,o=o+A>>>0,r=r+h>>>0}return g.endian([i,a,o,r])})._ff=function(e,n,t,i,a,o,r){r=e+(n&t|~n&i)+(a>>>0)+r;return(r<>>32-o)+n},y._gg=function(e,n,t,i,a,o,r){r=e+(n&i|t&~i)+(a>>>0)+r;return(r<>>32-o)+n},y._hh=function(e,n,t,i,a,o,r){r=e+(n^t^i)+(a>>>0)+r;return(r<>>32-o)+n},y._ii=function(e,n,t,i,a,o,r){r=e+(t^(n|~i))+(a>>>0)+r;return(r<>>32-o)+n},y._blocksize=16,y._digestsize=16,e.exports=function(e,n){if(null==e)throw new Error("Illegal argument "+e);e=g.wordsToBytes(y(e,n));return n&&n.asBytes?e:n&&n.asString?b.bytesToString(e):g.bytesToHex(e)}},125:function(e,n){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(e,n){return e<>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var n=0;n>>5]|=e[t]<<24-i%32;return n},wordsToBytes:function(e){for(var n=[],t=0;t<32*e.length;t+=8)n.push(e[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(e){for(var n=[],t=0;t>>4).toString(16)),n.push((15&e[t]).toString(16));return n.join("")},hexToBytes:function(e){for(var n=[],t=0;t>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,i=0;t>>6-2*i);return n}};e.exports=t},126:function(e,n){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||"function"==typeof(n=e).readFloatLE&&"function"==typeof n.slice&&t(n.slice(0,0))||!!e._isBuffer);var n}},127:function(n,t,i){var a;!function(){"use strict";var p={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function A(e){return function(e,n){var t,i,a,o,r,l,s,c,u=1,d=e.length,f="";for(i=0;i>>0).toString(8);break;case"s":t=String(t),t=o.precision?t.substring(0,o.precision):t;break;case"t":t=String(!!t),t=o.precision?t.substring(0,o.precision):t;break;case"T":t=Object.prototype.toString.call(t).slice(8,-1).toLowerCase(),t=o.precision?t.substring(0,o.precision):t;break;case"u":t=parseInt(t,10)>>>0;break;case"v":t=t.valueOf(),t=o.precision?t.substring(0,o.precision):t;break;case"x":t=(parseInt(t,10)>>>0).toString(16);break;case"X":t=(parseInt(t,10)>>>0).toString(16).toUpperCase()}p.json.test(o.type)?f+=t:(!p.number.test(o.type)||s&&!o.sign?c="":(c=s?"+":"-",t=t.toString().replace(p.sign,"")),r=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",l=o.width-(c+t).length,l=o.width&&0
'+e+"
",shade:[.3,"#000"],closeBtn:!1,title:!1,area:["auto","auto"]});return u("#layui-layer"+e).attr("type","loading"),e}return a.load(2)},loadingOff:function(){a.closeAll("loading")},tipSuccess:function(e,n){let t=2e3;e&&10','
',t.label,"
",'
','
确定
',"
"].join(""),{openCallback:function(){u("#dialog-input-box").find(".ok").on("click",function(){a=!0,d.dialogClose(o)}),u("#dialog-input-box").find("input").on("change",function(){i=u(this).val()})},closeCallback:function(){a&&e&&e(i)}})},preview:function(o,e){e=e||{};let r=u.extend({title:null,width:"auto",height:"auto"},e),l=u(window).width(),s=u(window).height();d&&d.loadingOn();let c=new Image;return c.onerror=function(){d.loadingOff(),d.tipError("Image load error")},c.onload=function(){d.loadingOff();let e=l-40,n=s-40,t=c.width,i=c.height;t>e&&(i=parseInt(i*e/t),t=e),i>n&&(t=parseInt(t*n/i),i=n);var a=['
',' ',"
"].join("");d.dialogContent(a,r)},c.src=o,!1}};e.exports=d},261:function(e,n,t){!function(r){const a=t(124);var i={specialchars:function(e){var n=[];if(!e)return"";if(0==e.length)return"";for(var t=0;t":n.push(">");break;case"&":n.push("&");break;case" ":n.push(" ");break;case'"':n.push(""");break;default:n.push(e.substr(t,1))}return n.join("")},text2html:function(e){return"

"+(e=i.specialchars(e)).replace(/\n/g,"

")+"

"},text2paragraph:function(e){return"

"+e.replace(/\n/g,"

")+"

"},urlencode:function(e){return e=(e+"").toString(),encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")},randomString:function(e){e=e||16;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=n.length,i="",a=0;a{n&&n({isNew:!0})},document.getElementsByTagName("head")[0].appendChild(i))},loadStylesheet:function(e,n){let t="s_"+a(e),i=document.getElementById(t);i?n&&n({isNew:!1}):(i=document.createElement("link"),i.id=t,i.rel="stylesheet",i.type="text/css",i.href=e,i.onload=()=>{n&&n({isNew:!0})},document.getElementsByTagName("head")[0].appendChild(i))},md5:function(e){return a(e)},iframeMessage:{queue:[],serve:{},win:{recv:null,send:null},mount:function(e,n){MS.util.iframeMessage.win.recv!==e&&e.addEventListener("message",function(e){if(e.data&&e.data.group&&e.data.id){for(var n,t=0;t{let t;if(n[a]===i)return r=n,r;if(n[o]&&(t=u.filterAncestors(n[o],i,a,o))){let e={};return e[o]=t,r=Object.assign({},n,e),r}}),r},listAncestors:function(e,n,t,i){t=t||"id",i=i||"_child";t=u.filterAncestors(e,n,t,i);if(null===t)return[];let a=t,o=[];do{let e=Object.assign({},a);delete e[i],o.push(e),a=a[i]}while(a);return o},findChildrenIdsIncludeSelf:function(e,n,t,i){return[n].concat(u.findChildren(e,n,t,i).map(e=>e[t]))},findChildrenIds:function(e,n,t,i){return u.findChildren(e,n,t,i).map(e=>e[t])},findChildren:function(e,n,t,i){let a=[];for(var o of e)o[i]===n&&(a.push(o),a=a.concat(u.findChildren(e,o[t],t,i)));return a},findAncestors:function(e,n,t,i){let a=[];for(var o of e)if(o[t]===n){a.push(o),0!==o[i]&&(a=a.concat(u.findAncestors(e,o[i],t,i)));break}return a.reverse()},sort:function(e,n,t,i,a){return n=n||"",t=t||"id",i=i||"pid",a=a||"sort",e.forEach(e=>{e[t]||(e[t]=""),e[i]||(e[i]="")}),e=e.sort((e,n)=>e[a]-n[a]),u._sort(e,n,t,i,a)},_sort:function(n,t,i,a,o,r,l){r=r||1,l=l||{};let s=[];return n.filter(e=>e[a]===t).forEach(e=>{if(e[i]in l)throw"duplicate sort tree : "+JSON.stringify(e)+" "+JSON.stringify(l);l[e[i]]=!0,s.push(Object.assign(e,{level:r})),u._sort(n,e[i],i,a,o,r+1,l).forEach(e=>{s.push(Object.assign(e))})}),s},tree:function(e,n,t,i,a,o){return n=n||"",t=t||"id",i=i||"pid",a=a||"sort",o=o||"_child",e.map(e=>{e[t]||(e[t]=""),e[i]||(e[i]="")}),e=e.sort((e,n)=>e[a]-n[a]),u._tree(e,n,t,i,a,o)},_tree:function(t,n,i,a,o,r,l,s){l=l||1,s=s||{};let c=[];return t.filter(e=>e[a]===n).forEach(e=>{if(e[i]in s)throw"duplicate sort tree : "+JSON.stringify(e)+" "+JSON.stringify(s);s[e[i]]=!0;let n={level:l};n[r]=u._tree(t,e[i],i,a,o,r,l+1,s),n[r].length||delete n[r],c.push(Object.assign(e,n))}),c},nodes:function(e,n,t,i,a){return n=n||"id",t=t||"pid",i=i||"sort",a=a||"_child",u._nodes(JSON.parse(JSON.stringify(e)),0,n,t,i,a)},_nodes:function(e,t,i,a,o,r,l){l=l||1;let s=[];return e.forEach(e=>{let n=e;n[a]=t,n.level=l,r in n&&"object"==typeof n[r]?(e=n[r],delete n[r],s.push(n),u._nodes(e,n[i],i,a,o,r,l+1).forEach(e=>{s.push(e)})):(delete n[r],s.push(n))}),s},resortAndDiff:function(e,n,t,i,a){t=t||"id",i=i||"pid",a=a||"sort";let o={};n.forEach(e=>o[e[t]]=e);let r=1;e.forEach(e=>e[a]=r++);let l=[];return e.forEach(e=>{var n;e[t]in o&&(n=o[e[t]])[i]===e[i]&&n[a]===e[a]||l.push(e)}),l}}},295:function(e,n,d){"use strict";d.r(n),function(a){var e=d(284);const n=d(6),t=d(296),i=d(259),o=d(301),r=d(261),l=d(302),s=d(127).sprintf;n.fn.isInViewport=function(){var e=a(this).offset().top,n=e+a(this).outerHeight(),t=a(window).scrollTop(),i=t+a(window).height();return t{u.ready.call(this,...arguments)},50)},dialog:i,util:r,api:{defaultCallback:t.defaultFormCallback,post:t.post,postSuccess:t.postSuccess},selectorDialog:l,header:c,tree:e.a,L:function(){var e=arguments[0];return u.trans&&e in u.trans&&(arguments[0]=u.trans[e]),s.call(null,...arguments)}};window.api=window.api||{},window.api.jquery=n,window.api.base=t,window.api.dialog=i,window.api.lister=o,window.api.selectorDialog=l,window.api.util=r,t.init(),window.MS=u}.call(this,d(6))},296:function(e,n,t){var i=t(6),a=t(259),o=t(262),r=t(300),l={init:function(){i(function(){i("form").each(function(e,n){i(n).unbind("submit"),void 0!==i(n).attr("data-ajax-form")?o.initAjax(n,a):i(n).is("[data-form-no-loading]")||o.initCommon(n,a)})}),r.init(a)},defaultFormCallback:function(e,n){return o.defaultCallback(e,n,a)},post:function(e,n,t){i.ajax({type:"post",url:e,dataType:"json",timeout:6e5,data:n,success:function(e){t&&t(e)},error:function(){t&&t({code:-999,msg:"请求出现错误 T_T"})}})},postSuccess:function(e,n,t,i){t=t||l.defaultFormCallback,i=i||l.defaultFormCallback,l.post(e,n,function(e){l.defaultFormCallback(e,{success:function(e){t(e)},error:function(e){i(e)}})})}};e.exports=l},297:function(r,l,s){!function(a){var o;!function(p){"use strict";function n(e){var n=this;n.index=++h.index,n.config=A.extend({},n.config,u.config,e),document.body?n.creat():setTimeout(function(){n.creat()},30)}var A,c,e,t=p.layui&&layui.define,u={getPath:(e=document.currentScript?document.currentScript.src:function(){for(var e,n=document.scripts,t=n.length-1,i=t;0'+(o?i.title[0]:i.title)+"
":"";return i.zIndex=a,n([i.shade?'
':"",'
'+(e&&2!=i.type?"":o)+'
'+(0==i.type&&-1!==i.icon?'':"")+((1!=i.type||!e)&&i.content||"")+'
'+(r=r?'':"",i.closeBtn&&(r+=''),r)+""+(i.btn?function(){var e="";"string"==typeof i.btn&&(i.btn=[i.btn]);for(var n=0,t=i.btn.length;n'+i.btn[n]+"";return'
'+e+"
"}():"")+(i.resize?'':"")+"
"],o,A('
')),this},n.pt.creat=function(){var e,i=this,a=i.config,o=i.index,r="object"==typeof(s=a.content),l=A("body");if(!a.id||!A("#"+a.id)[0]){switch("string"==typeof a.area&&(a.area="auto"===a.area?["",""]:[a.area,""]),a.shift&&(a.anim=a.shift),6==h.ie&&(a.fixed=!1),a.type){case 0:a.btn="btn"in a?a.btn:u.btn[0],h.closeAll("dialog");break;case 2:var s=a.content=r?a.content:[a.content||"http://layer.layui.com","auto"];a.content='';break;case 3:delete a.title,delete a.closeBtn,-1===a.icon&&a.icon,h.closeAll("loading");break;case 4:r||(a.content=[a.content,"body"]),a.follow=a.content[1],a.content=a.content[0]+'',delete a.title,a.tips="object"==typeof a.tips?a.tips:[a.tips,!0],a.tipsMore||h.closeAll("tips")}i.vessel(r,function(e,n,t){l.append(e[0]),r?2==a.type||4==a.type?A("body").append(e[1]):s.parents("."+d[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),A("#"+d[0]+o).find("."+d[5]).before(n)):l.append(e[1]),A(".layui-layer-move")[0]||l.append(u.moveElem=t),i.layero=A("#"+d[0]+o),a.scrollbar||d.html.css("overflow","hidden").attr("layer-full",o)}).auto(o),A("#layui-layer-shade"+i.index).css({"background-color":a.shade[1]||"#000",opacity:a.shade[0]||a.shade}),2==a.type&&6==h.ie&&i.layero.find("iframe").attr("src",s[0]),4==a.type?i.tips():i.offset(),a.fixed&&c.on("resize",function(){i.offset(),(/^\d+%$/.test(a.area[0])||/^\d+%$/.test(a.area[1]))&&i.auto(o),4==a.type&&i.tips()}),a.time<=0||setTimeout(function(){h.close(i.index)},a.time),i.move().callback(),d.anim[a.anim]&&(e="layer-anim "+d.anim[a.anim],i.layero.addClass(e).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){A(this).removeClass(e)})),a.isOutAnim&&i.layero.data("isOutAnim",!0)}},n.pt.auto=function(e){var n=this.config,t=A("#"+d[0]+e);""===n.area[0]&&0n.maxWidth&&t.width(n.maxWidth));var i=[t.innerWidth(),t.innerHeight()],a=t.find(d[1]).outerHeight()||0,o=t.find("."+d[6]).outerHeight()||0,e=function(e){(e=t.find(e)).height(i[1]-a-o-2*(0|parseFloat(e.css("padding-top"))))};return 2===n.type?e("iframe"):""===n.area[1]?0n.maxHeight?(i[1]=n.maxHeight,e("."+d[5])):n.fixed&&i[1]>=c.height()&&(i[1]=c.height(),e("."+d[5])):e("."+d[5]),this},n.pt.offset=function(){var e=this,n=e.config,t=e.layero,i=[t.outerWidth(),t.outerHeight()],a="object"==typeof n.offset;e.offsetTop=(c.height()-i[1])/2,e.offsetLeft=(c.width()-i[0])/2,a?(e.offsetTop=n.offset[0],e.offsetLeft=n.offset[1]||e.offsetLeft):"auto"!==n.offset&&("t"===n.offset?e.offsetTop=0:"r"===n.offset?e.offsetLeft=c.width()-i[0]:"b"===n.offset?e.offsetTop=c.height()-i[1]:"l"===n.offset?e.offsetLeft=0:"lt"===n.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===n.offset?(e.offsetTop=c.height()-i[1],e.offsetLeft=0):"rt"===n.offset?(e.offsetTop=0,e.offsetLeft=c.width()-i[0]):"rb"===n.offset?(e.offsetTop=c.height()-i[1],e.offsetLeft=c.width()-i[0]):e.offsetTop=n.offset),n.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?c.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?c.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=c.scrollTop(),e.offsetLeft+=c.scrollLeft()),t.attr("minLeft")&&(e.offsetTop=c.height()-(t.find(d[1]).outerHeight()||0),e.offsetLeft=t.css("left")),t.css({top:e.offsetTop,left:e.offsetLeft})},n.pt.tips=function(){var e=this.config,n=this.layero,t=[n.outerWidth(),n.outerHeight()],i=A(e.follow),a={width:(i=!i[0]?A("body"):i).outerWidth(),height:i.outerHeight(),top:i.offset().top,left:i.offset().left},o=n.find(".layui-layer-TipsG"),i=e.tips[0];e.tips[1]||o.remove(),a.autoLeft=function(){0"+(t.value||"")+"":'',o=t.success;return delete t.success,h.open(A.extend({type:1,btn:["确定","取消"],content:n,skin:"layui-layer-prompt"+y("prompt"),maxWidth:c.width(),success:function(e){(a=e.find(".layui-layer-input")).focus(),"function"==typeof o&&o(e)},resize:!1,yes:function(e){var n=a.val();""===n?a.focus():n.length>(t.maxlength||500)?h.tips("最多输入"+(t.maxlength||500)+"个字数",a,{tips:1}):i&&i(n,e,a)}},t))},h.tab=function(i){var a=(i=i||{}).tab||{},o="layui-this",r=i.success;return delete i.success,h.open(A.extend({type:1,skin:"layui-layer-tab"+y("tab"),resize:!1,title:function(){var e=a.length,n=1,t="";if(0'+a[0].title+"";n"+a[n].title+"";return t}(),content:'
    '+function(){var e=a.length,n=1,t="";if(0'+(a[0].content||"no content")+"";n'+(a[n].content||"no content")+"";return t}()+"
",success:function(e){var n=e.find(".layui-layer-title").children(),t=e.find(".layui-layer-tabmain").children();n.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var n=A(this),e=n.index();n.addClass(o).siblings().removeClass(o),t.eq(e).show().siblings().hide(),"function"==typeof i.change&&i.change(e)}),"function"==typeof r&&r(e)}},i))},h.photos=function(t,e,i){var n,a,o={};if((t=t||{}).photos){var r=t.photos.constructor===Object,l=r?t.photos:{},s=l.data||[],c=l.start||0;o.imgIndex=1+(0|c),t.img=t.img||"img";var u=t.success;if(delete t.success,r){if(0===s.length)return h.msg("没有图片")}else{var d=A(t.photos),f=function(){s=[],d.find(t.img).each(function(e){var n=A(this);n.attr("layer-index",e),s.push({alt:n.attr("alt"),pid:n.attr("layer-pid"),src:n.attr("layer-src")||n.attr("src"),thumb:n.attr("src")})})};if(f(),0===s.length)return;if(e||d.on("click",t.img,function(){var e=A(this).attr("layer-index");h.photos(A.extend(t,{photos:{start:e,data:s,tab:t.tab},full:t.full}),!0),f()}),!e)return}o.imgprev=function(e){o.imgIndex--,o.imgIndex<1&&(o.imgIndex=s.length),o.tabimg(e)},o.imgnext=function(e,n){o.imgIndex++,o.imgIndex>s.length&&(o.imgIndex=1,n)||o.tabimg(e)},o.keyup=function(e){var n;o.end||(n=e.keyCode,e.preventDefault(),37===n?o.imgprev(!0):39===n?o.imgnext(!0):27===n&&h.close(o.index))},o.tabimg=function(e){if(!(s.length<=1))return l.start=o.imgIndex-1,h.close(o.index),h.photos(t,!0,e)},o.event=function(){o.bigimg.hover(function(){o.imgsee.show()},function(){o.imgsee.hide()}),o.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),o.imgprev()}),o.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),o.imgnext()}),A(document).on("keyup",o.keyup)},o.loadi=h.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),e=s[c].src,n=function(e){var n;h.close(o.loadi),o.index=h.open(A.extend({type:1,id:"layui-layer-photos",area:(n=[e.width,e.height],e=[A(p).width()-100,A(p).height()-100],!t.full&&(n[0]>e[0]||n[1]>e[1])&&((e=[n[0]/e[0],n[1]/e[1]])[1]'+(s[c].alt||
'+(1':"")+'
'+(s[c].alt||"")+""+o.imgIndex+"/"+s.length+"
",success:function(e,n){o.bigimg=e.find(".layui-layer-phimg"),o.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),o.event(e),t.tab&&t.tab(s[c],e),"function"==typeof u&&u(e)},end:function(){o.end=!0,A(document).off("keyup",o.keyup)}},t))},(a=new Image).src=e,a.complete?n(a):(a.onload=function(){a.onload=null,n(a)},a.onerror=function(e){a.onerror=null,h.close(o.loadi),h.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1',' ',""].join("");Dialog.dialogContent(i,opt)},img.src=imgUrl,!1})},initSmartImage:function(){$(document).ready(function(){setTimeout(function(){$("[data-smart-image]").each(function(e,n){$(n).attr("src",$(n).attr("data-smart-image"))})},0)})},initTip:function(t){t=t||null,$(document).on("click","[data-tip-error]",function(){return t?t.tipError($(this).attr("data-tip-error")):alert($(this).attr("data-tip-error")),!1}),$(document).on("click","[data-tip-success]",function(){return t?t.tipError($(this).attr("data-tip-success")):alert($(this).attr("data-tip-success")),!1}),$(document).on("mouseenter","[data-tip-popover]",function(e){var n=$(this).attr("data-tip-popover");t?t.tipPopoverShow(this,n):$(this).attr("title",n)}).on("mouseleave","[data-tip-popover]",function(e){t&&t.tipPopoverHide(this)})},init:function(e){inited||(inited=!0,Convenient.initAll(e),Convenient.initSmartImage(),Convenient.initTip(e))}};module.exports=Convenient},301:function(e,n,t){!function(s){let c=t(262),u=t(259);e.exports=function(e,n){let i=s(e.lister||null),t=s(e.search||null),a=this,o={page:1,pageSize:10,field:[],order:[],search:[]},r=null;n&&"param"in n&&(o=s.extend(o,n.param));let l=s.extend({server:"/path/to/server",editQuickServer:"/path/to/edit/quick",hashUrl:!0,showLoading:!0,customLoading:function(e){},render:function(e){}},n);this.getData=function(){return r},this.init=function(){let e=window.location.hash;0===e.indexOf("#")&&(e=e.substring(1));try{e=decodeURIComponent(e);var n,t=JSON.parse(e);for(n in t)n in o&&(o[n]=t[n])}catch(e){}i&&i.on("click","[data-refresh-button]",function(){return a.load(!0),!1})},this.initSearch=function(){t.on("click","[data-search-button]",function(){return o.page=1,a.prepareSearch(),a.load(!0),!1}),t.on("click","[data-reset-search-button]",function(){return a.resetSearch(),a.resetOrder(),a.load(!0),!1}),t.on("click","[data-expand-search-button]",function(){return t.find(".field-more-expand").toggleClass("field-more-expand__active"),!1}),t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("init")&&s(n).data("init")(o.search)})},this.initTable=function(){},this.prepareSearch=function(){o.search=[],t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("get")&&o.search.push(s(n).data("get")())})},this.resetSearch=function(){o.search=[],t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("reset")&&o.search.push(s(n).data("reset")())})},this.resetOrder=function(){o.order=[]},this.setPageSize=function(e){o.pageSize=e},this.setPage=function(e){o.page=e},this.setParam=function(e,n){e in o&&(o[e]=n)},this.getParam=function(){return o},this.setOption=function(e,n){l[e]=n},this.refresh=function(){a.load()},this.load=function(){l.showLoading&&u.loadingOn(),l.customLoading(!0),r=null,s.post(l.server,o).done(function(e){l.hashUrl&&window.location.replace("#"+JSON.stringify(o)),l.showLoading&&u.loadingOff(),l.customLoading(!1),c.defaultCallback(e,{success:function(e){l.render(e.data)}})}).fail(function(e){try{l.showLoading&&u.loadingOff(),l.customLoading(!1),c.defaultCallback(e)}catch(e){}})},this.init(),this.initSearch(),this.initTable(),this.prepareSearch(),this.load()}}.call(this,t(6))},302:function(i,e,a){!function(n){function e(e){null==t&&alert("Dialog must defined"),this.opt=n.extend({limitMax:100,limitMin:1,dialogWidth:"940px",dialogHeight:"90%",server:"/path/to/link/choose/dialog",callback:function(e){alert("Select : "+JSON.stringify(e))}},e),n(window).width()<800&&(this.opt.dialogWidth="90%"),this.dialog=t,this.runtime={dialog:null}}var t=a(259);e.prototype.show=function(){var n=this;return window.__selectorDialogOption=n.opt,window.__dialogSelectIds=[],window.__selectorDialogItems=[],this.runtime.dialog=this.dialog.dialog(this.opt.server,{width:this.opt.dialogWidth,height:this.opt.dialogHeight,closeCallback:function(){var e=window.__selectorDialogItems;e.length&&(e.length>n.opt.limitMax?n.dialog.tipError("Select limit max "+n.opt.limitMax+" item(s)"):e.length>>24)|4278255360&(t[l]<<24|t[l]>>>8);t[e>>>5]|=128<>>9<<4)]=e;for(var s=y._ff,c=y._gg,u=y._hh,d=y._ii,l=0;l>>0,a=a+p>>>0,o=o+A>>>0,r=r+h>>>0}return g.endian([i,a,o,r])})._ff=function(e,n,t,i,a,o,r){r=e+(n&t|~n&i)+(a>>>0)+r;return(r<>>32-o)+n},y._gg=function(e,n,t,i,a,o,r){r=e+(n&i|t&~i)+(a>>>0)+r;return(r<>>32-o)+n},y._hh=function(e,n,t,i,a,o,r){r=e+(n^t^i)+(a>>>0)+r;return(r<>>32-o)+n},y._ii=function(e,n,t,i,a,o,r){r=e+(t^(n|~i))+(a>>>0)+r;return(r<>>32-o)+n},y._blocksize=16,y._digestsize=16,e.exports=function(e,n){if(null==e)throw new Error("Illegal argument "+e);e=g.wordsToBytes(y(e,n));return n&&n.asBytes?e:n&&n.asString?x.bytesToString(e):g.bytesToHex(e)}},125:function(e,n){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(e,n){return e<>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var n=0;n>>5]|=e[t]<<24-i%32;return n},wordsToBytes:function(e){for(var n=[],t=0;t<32*e.length;t+=8)n.push(e[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(e){for(var n=[],t=0;t>>4).toString(16)),n.push((15&e[t]).toString(16));return n.join("")},hexToBytes:function(e){for(var n=[],t=0;t>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,i=0;t>>6-2*i);return n}};e.exports=t},126:function(e,n){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||"function"==typeof(n=e).readFloatLE&&"function"==typeof n.slice&&t(n.slice(0,0))||!!e._isBuffer);var n}},127:function(n,t,i){var a;!function(){"use strict";var p={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function A(e){return function(e,n){var t,i,a,o,r,l,s,c,u=1,d=e.length,f="";for(i=0;i>>0).toString(8);break;case"s":t=String(t),t=o.precision?t.substring(0,o.precision):t;break;case"t":t=String(!!t),t=o.precision?t.substring(0,o.precision):t;break;case"T":t=Object.prototype.toString.call(t).slice(8,-1).toLowerCase(),t=o.precision?t.substring(0,o.precision):t;break;case"u":t=parseInt(t,10)>>>0;break;case"v":t=t.valueOf(),t=o.precision?t.substring(0,o.precision):t;break;case"x":t=(parseInt(t,10)>>>0).toString(16);break;case"X":t=(parseInt(t,10)>>>0).toString(16).toUpperCase()}p.json.test(o.type)?f+=t:(!p.number.test(o.type)||s&&!o.sign?c="":(c=s?"+":"-",t=t.toString().replace(p.sign,"")),r=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",l=o.width-(c+t).length,l=o.width&&0
'+e+"
",shade:[.3,"#000"],closeBtn:!1,title:!1,area:["auto","auto"]});return u("#layui-layer"+e).attr("type","loading"),e}return a.load(2)},loadingOff:function(){a.closeAll("loading")},tipSuccess:function(e,n){let t=2e3;e&&10','
',t.label,"
",'
','
确定
',""].join(""),{openCallback:function(){u("#dialog-input-box").find(".ok").on("click",function(){a=!0,d.dialogClose(o)}),u("#dialog-input-box").find("input").on("change",function(){i=u(this).val()})},closeCallback:function(){a&&e&&e(i)}})},preview:function(o,e){e=e||{};let r=u.extend({title:null,width:"auto",height:"auto"},e),l=u(window).width(),s=u(window).height();d&&d.loadingOn();let c=new Image;return c.onerror=function(){d.loadingOff(),d.tipError("Image load error")},c.onload=function(){d.loadingOff();let e=l-40,n=s-40,t=c.width,i=c.height;t>e&&(i=parseInt(i*e/t),t=e),i>n&&(t=parseInt(t*n/i),i=n);var a=['
',' ',"
"].join("");d.dialogContent(a,r)},c.src=o,!1}};e.exports=d},261:function(e,n,t){!function(r){const a=t(124);var i={specialchars:function(e){var n=[];if(!e)return"";if(0==e.length)return"";for(var t=0;t":n.push(">");break;case"&":n.push("&");break;case" ":n.push(" ");break;case'"':n.push(""");break;default:n.push(e.substr(t,1))}return n.join("")},text2html:function(e){return"

"+(e=i.specialchars(e)).replace(/\n/g,"

")+"

"},text2paragraph:function(e){return"

"+e.replace(/\n/g,"

")+"

"},urlencode:function(e){return e=(e+"").toString(),encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")},randomString:function(e){e=e||16;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=n.length,i="",a=0;a{n&&n({isNew:!0})},document.getElementsByTagName("head")[0].appendChild(i))},loadStylesheet:function(e,n){let t="s_"+a(e),i=document.getElementById(t);i?n&&n({isNew:!1}):(i=document.createElement("link"),i.id=t,i.rel="stylesheet",i.type="text/css",i.href=e,i.onload=()=>{n&&n({isNew:!0})},document.getElementsByTagName("head")[0].appendChild(i))},md5:function(e){return a(e)},iframeMessage:{queue:[],serve:{},win:{recv:null,send:null},mount:function(e,n){MS.util.iframeMessage.win.recv!==e&&e.addEventListener("message",function(e){if(e.data&&e.data.group&&e.data.id){for(var n,t=0;t{let t;if(n[a]===i)return r=n,r;if(n[o]&&(t=u.filterAncestors(n[o],i,a,o))){let e={};return e[o]=t,r=Object.assign({},n,e),r}}),r},listAncestors:function(e,n,t,i){t=t||"id",i=i||"_child";t=u.filterAncestors(e,n,t,i);if(null===t)return[];let a=t,o=[];do{let e=Object.assign({},a);delete e[i],o.push(e),a=a[i]}while(a);return o},findChildrenIdsIncludeSelf:function(e,n,t,i){return[n].concat(u.findChildren(e,n,t,i).map(e=>e[t]))},findChildrenIds:function(e,n,t,i){return u.findChildren(e,n,t,i).map(e=>e[t])},findChildren:function(e,n,t,i){let a=[];for(var o of e)o[i]===n&&(a.push(o),a=a.concat(u.findChildren(e,o[t],t,i)));return a},findAncestors:function(e,n,t,i){let a=[];for(var o of e)if(o[t]===n){a.push(o),0!==o[i]&&(a=a.concat(u.findAncestors(e,o[i],t,i)));break}return a.reverse()},sort:function(e,n,t,i,a){return n=n||"",t=t||"id",i=i||"pid",a=a||"sort",e.forEach(e=>{e[t]||(e[t]=""),e[i]||(e[i]="")}),e=e.sort((e,n)=>e[a]-n[a]),u._sort(e,n,t,i,a)},_sort:function(n,t,i,a,o,r,l){r=r||1,l=l||{};let s=[];return n.filter(e=>e[a]===t).forEach(e=>{if(e[i]in l)throw"duplicate sort tree : "+JSON.stringify(e)+" "+JSON.stringify(l);l[e[i]]=!0,s.push(Object.assign(e,{level:r})),u._sort(n,e[i],i,a,o,r+1,l).forEach(e=>{s.push(Object.assign(e))})}),s},tree:function(e,n,t,i,a,o){return n=n||"",t=t||"id",i=i||"pid",a=a||"sort",o=o||"_child",e.map(e=>{e[t]||(e[t]=""),e[i]||(e[i]="")}),e=e.sort((e,n)=>e[a]-n[a]),u._tree(e,n,t,i,a,o)},_tree:function(t,n,i,a,o,r,l,s){l=l||1,s=s||{};let c=[];return t.filter(e=>e[a]===n).forEach(e=>{if(e[i]in s)throw"duplicate sort tree : "+JSON.stringify(e)+" "+JSON.stringify(s);s[e[i]]=!0;let n={level:l};n[r]=u._tree(t,e[i],i,a,o,r,l+1,s),n[r].length||delete n[r],c.push(Object.assign(e,n))}),c},nodes:function(e,n,t,i,a){return n=n||"id",t=t||"pid",i=i||"sort",a=a||"_child",u._nodes(JSON.parse(JSON.stringify(e)),0,n,t,i,a)},_nodes:function(e,t,i,a,o,r,l){l=l||1;let s=[];return e.forEach(e=>{let n=e;n[a]=t,n.level=l,r in n&&"object"==typeof n[r]?(e=n[r],delete n[r],s.push(n),u._nodes(e,n[i],i,a,o,r,l+1).forEach(e=>{s.push(e)})):(delete n[r],s.push(n))}),s},resortAndDiff:function(e,n,t,i,a){t=t||"id",i=i||"pid",a=a||"sort";let o={};n.forEach(e=>o[e[t]]=e);let r=1;e.forEach(e=>e[a]=r++);let l=[];return e.forEach(e=>{var n;e[t]in o&&(n=o[e[t]])[i]===e[i]&&n[a]===e[a]||l.push(e)}),l}}},295:function(e,n,d){"use strict";d.r(n),function(a){var e=d(284);const n=d(6),t=d(296),i=d(259),o=d(301),r=d(261),l=d(302),s=d(127).sprintf;n.fn.isInViewport=function(){var e=a(this).offset().top,n=e+a(this).outerHeight(),t=a(window).scrollTop(),i=t+a(window).height();return t{u.ready.call(this,...arguments)},50)},dialog:i,util:r,api:{defaultCallback:t.defaultFormCallback,post:t.post,postSuccess:t.postSuccess},selectorDialog:l,header:c,tree:e.a,L:function(){var e=arguments[0];return u.trans&&e in u.trans&&(arguments[0]=u.trans[e]),s.call(null,...arguments)}};window.api=window.api||{},window.api.jquery=n,window.api.base=t,window.api.dialog=i,window.api.lister=o,window.api.selectorDialog=l,window.api.util=r,t.init(),window.MS=u}.call(this,d(6))},296:function(e,n,t){var i=t(6),a=t(259),o=t(262),r=t(300),l={init:function(){i(function(){i("form").each(function(e,n){i(n).unbind("submit"),void 0!==i(n).attr("data-ajax-form")?o.initAjax(n,a):i(n).is("[data-form-no-loading]")||o.initCommon(n,a)})}),r.init(a)},defaultFormCallback:function(e,n){return o.defaultCallback(e,n,a)},post:function(e,n,t){i.ajax({type:"post",url:e,dataType:"json",timeout:6e5,data:n,success:function(e){t&&t(e)},error:function(){t&&t({code:-999,msg:"请求出现错误 T_T"})}})},postSuccess:function(e,n,t,i){t=t||l.defaultFormCallback,i=i||l.defaultFormCallback,l.post(e,n,function(e){l.defaultFormCallback(e,{success:function(e){t(e)},error:function(e){i(e)}})})}};e.exports=l},297:function(r,l,s){!function(a){var o;!function(p){"use strict";function n(e){var n=this;n.index=++h.index,n.config=A.extend({},n.config,u.config,e),document.body?n.creat():setTimeout(function(){n.creat()},30)}var A,c,e,t=p.layui&&layui.define,u={getPath:(e=document.currentScript?document.currentScript.src:function(){for(var e,n=document.scripts,t=n.length-1,i=t;0'+(o?i.title[0]:i.title)+"":"";return i.zIndex=a,n([i.shade?'
':"",'
'+(e&&2!=i.type?"":o)+'
'+(0==i.type&&-1!==i.icon?'':"")+((1!=i.type||!e)&&i.content||"")+'
'+(r=r?'':"",i.closeBtn&&(r+=''),r)+""+(i.btn?function(){var e="";"string"==typeof i.btn&&(i.btn=[i.btn]);for(var n=0,t=i.btn.length;n'+i.btn[n]+"";return'
'+e+"
"}():"")+(i.resize?'':"")+"
"],o,A('
')),this},n.pt.creat=function(){var e,i=this,a=i.config,o=i.index,r="object"==typeof(s=a.content),l=A("body");if(!a.id||!A("#"+a.id)[0]){switch("string"==typeof a.area&&(a.area="auto"===a.area?["",""]:[a.area,""]),a.shift&&(a.anim=a.shift),6==h.ie&&(a.fixed=!1),a.type){case 0:a.btn="btn"in a?a.btn:u.btn[0],h.closeAll("dialog");break;case 2:var s=a.content=r?a.content:[a.content||"http://layer.layui.com","auto"];a.content='';break;case 3:delete a.title,delete a.closeBtn,-1===a.icon&&a.icon,h.closeAll("loading");break;case 4:r||(a.content=[a.content,"body"]),a.follow=a.content[1],a.content=a.content[0]+'',delete a.title,a.tips="object"==typeof a.tips?a.tips:[a.tips,!0],a.tipsMore||h.closeAll("tips")}i.vessel(r,function(e,n,t){l.append(e[0]),r?2==a.type||4==a.type?A("body").append(e[1]):s.parents("."+d[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),A("#"+d[0]+o).find("."+d[5]).before(n)):l.append(e[1]),A(".layui-layer-move")[0]||l.append(u.moveElem=t),i.layero=A("#"+d[0]+o),a.scrollbar||d.html.css("overflow","hidden").attr("layer-full",o)}).auto(o),A("#layui-layer-shade"+i.index).css({"background-color":a.shade[1]||"#000",opacity:a.shade[0]||a.shade}),2==a.type&&6==h.ie&&i.layero.find("iframe").attr("src",s[0]),4==a.type?i.tips():i.offset(),a.fixed&&c.on("resize",function(){i.offset(),(/^\d+%$/.test(a.area[0])||/^\d+%$/.test(a.area[1]))&&i.auto(o),4==a.type&&i.tips()}),a.time<=0||setTimeout(function(){h.close(i.index)},a.time),i.move().callback(),d.anim[a.anim]&&(e="layer-anim "+d.anim[a.anim],i.layero.addClass(e).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){A(this).removeClass(e)})),a.isOutAnim&&i.layero.data("isOutAnim",!0)}},n.pt.auto=function(e){var n=this.config,t=A("#"+d[0]+e);""===n.area[0]&&0n.maxWidth&&t.width(n.maxWidth));var i=[t.innerWidth(),t.innerHeight()],a=t.find(d[1]).outerHeight()||0,o=t.find("."+d[6]).outerHeight()||0,e=function(e){(e=t.find(e)).height(i[1]-a-o-2*(0|parseFloat(e.css("padding-top"))))};return 2===n.type?e("iframe"):""===n.area[1]?0n.maxHeight?(i[1]=n.maxHeight,e("."+d[5])):n.fixed&&i[1]>=c.height()&&(i[1]=c.height(),e("."+d[5])):e("."+d[5]),this},n.pt.offset=function(){var e=this,n=e.config,t=e.layero,i=[t.outerWidth(),t.outerHeight()],a="object"==typeof n.offset;e.offsetTop=(c.height()-i[1])/2,e.offsetLeft=(c.width()-i[0])/2,a?(e.offsetTop=n.offset[0],e.offsetLeft=n.offset[1]||e.offsetLeft):"auto"!==n.offset&&("t"===n.offset?e.offsetTop=0:"r"===n.offset?e.offsetLeft=c.width()-i[0]:"b"===n.offset?e.offsetTop=c.height()-i[1]:"l"===n.offset?e.offsetLeft=0:"lt"===n.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===n.offset?(e.offsetTop=c.height()-i[1],e.offsetLeft=0):"rt"===n.offset?(e.offsetTop=0,e.offsetLeft=c.width()-i[0]):"rb"===n.offset?(e.offsetTop=c.height()-i[1],e.offsetLeft=c.width()-i[0]):e.offsetTop=n.offset),n.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?c.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?c.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=c.scrollTop(),e.offsetLeft+=c.scrollLeft()),t.attr("minLeft")&&(e.offsetTop=c.height()-(t.find(d[1]).outerHeight()||0),e.offsetLeft=t.css("left")),t.css({top:e.offsetTop,left:e.offsetLeft})},n.pt.tips=function(){var e=this.config,n=this.layero,t=[n.outerWidth(),n.outerHeight()],i=A(e.follow),a={width:(i=!i[0]?A("body"):i).outerWidth(),height:i.outerHeight(),top:i.offset().top,left:i.offset().left},o=n.find(".layui-layer-TipsG"),i=e.tips[0];e.tips[1]||o.remove(),a.autoLeft=function(){0"+(t.value||"")+"":'',o=t.success;return delete t.success,h.open(A.extend({type:1,btn:["确定","取消"],content:n,skin:"layui-layer-prompt"+y("prompt"),maxWidth:c.width(),success:function(e){(a=e.find(".layui-layer-input")).focus(),"function"==typeof o&&o(e)},resize:!1,yes:function(e){var n=a.val();""===n?a.focus():n.length>(t.maxlength||500)?h.tips("最多输入"+(t.maxlength||500)+"个字数",a,{tips:1}):i&&i(n,e,a)}},t))},h.tab=function(i){var a=(i=i||{}).tab||{},o="layui-this",r=i.success;return delete i.success,h.open(A.extend({type:1,skin:"layui-layer-tab"+y("tab"),resize:!1,title:function(){var e=a.length,n=1,t="";if(0'+a[0].title+"";n"+a[n].title+"";return t}(),content:'
    '+function(){var e=a.length,n=1,t="";if(0'+(a[0].content||"no content")+"";n'+(a[n].content||"no content")+"";return t}()+"
",success:function(e){var n=e.find(".layui-layer-title").children(),t=e.find(".layui-layer-tabmain").children();n.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var n=A(this),e=n.index();n.addClass(o).siblings().removeClass(o),t.eq(e).show().siblings().hide(),"function"==typeof i.change&&i.change(e)}),"function"==typeof r&&r(e)}},i))},h.photos=function(t,e,i){var n,a,o={};if((t=t||{}).photos){var r=t.photos.constructor===Object,l=r?t.photos:{},s=l.data||[],c=l.start||0;o.imgIndex=1+(0|c),t.img=t.img||"img";var u=t.success;if(delete t.success,r){if(0===s.length)return h.msg("没有图片")}else{var d=A(t.photos),f=function(){s=[],d.find(t.img).each(function(e){var n=A(this);n.attr("layer-index",e),s.push({alt:n.attr("alt"),pid:n.attr("layer-pid"),src:n.attr("layer-src")||n.attr("src"),thumb:n.attr("src")})})};if(f(),0===s.length)return;if(e||d.on("click",t.img,function(){var e=A(this).attr("layer-index");h.photos(A.extend(t,{photos:{start:e,data:s,tab:t.tab},full:t.full}),!0),f()}),!e)return}o.imgprev=function(e){o.imgIndex--,o.imgIndex<1&&(o.imgIndex=s.length),o.tabimg(e)},o.imgnext=function(e,n){o.imgIndex++,o.imgIndex>s.length&&(o.imgIndex=1,n)||o.tabimg(e)},o.keyup=function(e){var n;o.end||(n=e.keyCode,e.preventDefault(),37===n?o.imgprev(!0):39===n?o.imgnext(!0):27===n&&h.close(o.index))},o.tabimg=function(e){if(!(s.length<=1))return l.start=o.imgIndex-1,h.close(o.index),h.photos(t,!0,e)},o.event=function(){o.bigimg.hover(function(){o.imgsee.show()},function(){o.imgsee.hide()}),o.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),o.imgprev()}),o.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),o.imgnext()}),A(document).on("keyup",o.keyup)},o.loadi=h.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),e=s[c].src,n=function(e){var n;h.close(o.loadi),o.index=h.open(A.extend({type:1,id:"layui-layer-photos",area:(n=[e.width,e.height],e=[A(p).width()-100,A(p).height()-100],!t.full&&(n[0]>e[0]||n[1]>e[1])&&((e=[n[0]/e[0],n[1]/e[1]])[1]'+(s[c].alt||
'+(1':"")+'
'+(s[c].alt||"")+""+o.imgIndex+"/"+s.length+"
",success:function(e,n){o.bigimg=e.find(".layui-layer-phimg"),o.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),o.event(e),t.tab&&t.tab(s[c],e),"function"==typeof u&&u(e)},end:function(){o.end=!0,A(document).off("keyup",o.keyup)}},t))},(a=new Image).src=e,a.complete?n(a):(a.onload=function(){a.onload=null,n(a)},a.onerror=function(e){a.onerror=null,h.close(o.loadi),h.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1',' ',""].join("");Dialog.dialogContent(i,opt)},img.src=imgUrl,!1})},initSmartImage:function(){$(document).ready(function(){setTimeout(function(){$("[data-smart-image]").each(function(e,n){$(n).attr("src",$(n).attr("data-smart-image"))})},0)})},initTip:function(t){t=t||null,$(document).on("click","[data-tip-error]",function(){return t?t.tipError($(this).attr("data-tip-error")):alert($(this).attr("data-tip-error")),!1}),$(document).on("click","[data-tip-success]",function(){return t?t.tipError($(this).attr("data-tip-success")):alert($(this).attr("data-tip-success")),!1}),$(document).on("mouseenter","[data-tip-popover]",function(e){var n=$(this).attr("data-tip-popover");t?t.tipPopoverShow(this,n):$(this).attr("title",n)}).on("mouseleave","[data-tip-popover]",function(e){t&&t.tipPopoverHide(this)})},init:function(e){inited||(inited=!0,Convenient.initAll(e),Convenient.initSmartImage(),Convenient.initTip(e))}};module.exports=Convenient},301:function(e,n,t){!function(s){let c=t(262),u=t(259);e.exports=function(e,n){let i=s(e.lister||null),t=s(e.search||null),a=this,o={page:1,pageSize:10,field:[],order:[],search:[]},r=null;n&&"param"in n&&(o=s.extend(o,n.param));let l=s.extend({server:"/path/to/server",editQuickServer:"/path/to/edit/quick",hashUrl:!0,showLoading:!0,customLoading:function(e){},render:function(e){}},n);this.getData=function(){return r},this.init=function(){let e=window.location.hash;0===e.indexOf("#")&&(e=e.substring(1));try{e=decodeURIComponent(e);var n,t=JSON.parse(e);for(n in t)n in o&&(o[n]=t[n])}catch(e){}i&&i.on("click","[data-refresh-button]",function(){return a.load(!0),!1})},this.initSearch=function(){t.on("click","[data-search-button]",function(){return o.page=1,a.prepareSearch(),a.load(!0),!1}),t.on("click","[data-reset-search-button]",function(){return a.resetSearch(),a.resetOrder(),a.load(!0),!1}),t.on("click","[data-expand-search-button]",function(){return t.find(".field-more-expand").toggleClass("field-more-expand__active"),!1}),t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("init")&&s(n).data("init")(o.search)})},this.initTable=function(){},this.prepareSearch=function(){o.search=[],t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("get")&&o.search.push(s(n).data("get")())})},this.resetSearch=function(){o.search=[],t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("reset")&&o.search.push(s(n).data("reset")())})},this.resetOrder=function(){o.order=[]},this.setPageSize=function(e){o.pageSize=e},this.setPage=function(e){o.page=e},this.setParam=function(e,n){e in o&&(o[e]=n)},this.getParam=function(){return o},this.setOption=function(e,n){l[e]=n},this.refresh=function(){a.load()},this.load=function(){l.showLoading&&u.loadingOn(),l.customLoading(!0),r=null,s.post(l.server,o).done(function(e){l.hashUrl&&window.location.replace("#"+JSON.stringify(o)),l.showLoading&&u.loadingOff(),l.customLoading(!1),c.defaultCallback(e,{success:function(e){l.render(e.data)}})}).fail(function(e){try{l.showLoading&&u.loadingOff(),l.customLoading(!1),c.defaultCallback(e)}catch(e){}})},this.init(),this.initSearch(),this.initTable(),this.prepareSearch(),this.load()}}.call(this,t(6))},302:function(i,e,a){!function(n){function e(e){null==t&&alert("Dialog must defined"),this.opt=n.extend({limitMax:100,limitMin:1,dialogWidth:"940px",dialogHeight:"90%",server:"/path/to/link/choose/dialog",callback:function(e){alert("Select : "+JSON.stringify(e))}},e),n(window).width()<800&&(this.opt.dialogWidth="90%"),this.dialog=t,this.runtime={dialog:null}}var t=a(259);e.prototype.show=function(){var n=this;return window.__selectorDialogOption=n.opt,window.__dialogSelectIds=[],window.__selectorDialogItems=[],this.runtime.dialog=this.dialog.dialog(this.opt.server,{width:this.opt.dialogWidth,height:this.opt.dialogHeight,closeCallback:function(){var e=window.__selectorDialogItems;e.length&&(e.length>n.opt.limitMax?n.dialog.tipError("Select limit max "+n.opt.limitMax+" item(s)"):e.length>>24)|4278255360&(t[l]<<24|t[l]>>>8);t[e>>>5]|=128<>>9<<4)]=e;for(var s=y._ff,c=y._gg,u=y._hh,d=y._ii,l=0;l>>0,a=a+p>>>0,o=o+A>>>0,r=r+h>>>0}return g.endian([i,a,o,r])})._ff=function(e,n,t,i,a,o,r){r=e+(n&t|~n&i)+(a>>>0)+r;return(r<>>32-o)+n},y._gg=function(e,n,t,i,a,o,r){r=e+(n&i|t&~i)+(a>>>0)+r;return(r<>>32-o)+n},y._hh=function(e,n,t,i,a,o,r){r=e+(n^t^i)+(a>>>0)+r;return(r<>>32-o)+n},y._ii=function(e,n,t,i,a,o,r){r=e+(t^(n|~i))+(a>>>0)+r;return(r<>>32-o)+n},y._blocksize=16,y._digestsize=16,e.exports=function(e,n){if(null==e)throw new Error("Illegal argument "+e);e=g.wordsToBytes(y(e,n));return n&&n.asBytes?e:n&&n.asString?b.bytesToString(e):g.bytesToHex(e)}},125:function(e,n){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(e,n){return e<>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var n=0;n>>5]|=e[t]<<24-i%32;return n},wordsToBytes:function(e){for(var n=[],t=0;t<32*e.length;t+=8)n.push(e[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(e){for(var n=[],t=0;t>>4).toString(16)),n.push((15&e[t]).toString(16));return n.join("")},hexToBytes:function(e){for(var n=[],t=0;t>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,i=0;t>>6-2*i);return n}};e.exports=t},126:function(e,n){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||"function"==typeof(n=e).readFloatLE&&"function"==typeof n.slice&&t(n.slice(0,0))||!!e._isBuffer);var n}},127:function(n,t,i){var a;!function(){"use strict";var p={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function A(e){return function(e,n){var t,i,a,o,r,l,s,c,u=1,d=e.length,f="";for(i=0;i>>0).toString(8);break;case"s":t=String(t),t=o.precision?t.substring(0,o.precision):t;break;case"t":t=String(!!t),t=o.precision?t.substring(0,o.precision):t;break;case"T":t=Object.prototype.toString.call(t).slice(8,-1).toLowerCase(),t=o.precision?t.substring(0,o.precision):t;break;case"u":t=parseInt(t,10)>>>0;break;case"v":t=t.valueOf(),t=o.precision?t.substring(0,o.precision):t;break;case"x":t=(parseInt(t,10)>>>0).toString(16);break;case"X":t=(parseInt(t,10)>>>0).toString(16).toUpperCase()}p.json.test(o.type)?f+=t:(!p.number.test(o.type)||s&&!o.sign?c="":(c=s?"+":"-",t=t.toString().replace(p.sign,"")),r=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",l=o.width-(c+t).length,l=o.width&&0
'+e+"
",shade:[.3,"#000"],closeBtn:!1,title:!1,area:["auto","auto"]});return u("#layui-layer"+e).attr("type","loading"),e}return a.load(2)},loadingOff:function(){a.closeAll("loading")},tipSuccess:function(e,n){let t=2e3;e&&10','
',t.label,"
",'
','
确定
',""].join(""),{openCallback:function(){u("#dialog-input-box").find(".ok").on("click",function(){a=!0,d.dialogClose(o)}),u("#dialog-input-box").find("input").on("change",function(){i=u(this).val()})},closeCallback:function(){a&&e&&e(i)}})},preview:function(o,e){e=e||{};let r=u.extend({title:null,width:"auto",height:"auto"},e),l=u(window).width(),s=u(window).height();d&&d.loadingOn();let c=new Image;return c.onerror=function(){d.loadingOff(),d.tipError("Image load error")},c.onload=function(){d.loadingOff();let e=l-40,n=s-40,t=c.width,i=c.height;t>e&&(i=parseInt(i*e/t),t=e),i>n&&(t=parseInt(t*n/i),i=n);var a=['
',' ',"
"].join("");d.dialogContent(a,r)},c.src=o,!1}};e.exports=d},261:function(e,n,t){!function(r){const a=t(124);var i={specialchars:function(e){var n=[];if(!e)return"";if(0==e.length)return"";for(var t=0;t":n.push(">");break;case"&":n.push("&");break;case" ":n.push(" ");break;case'"':n.push(""");break;default:n.push(e.substr(t,1))}return n.join("")},text2html:function(e){return"

"+(e=i.specialchars(e)).replace(/\n/g,"

")+"

"},text2paragraph:function(e){return"

"+e.replace(/\n/g,"

")+"

"},urlencode:function(e){return e=(e+"").toString(),encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")},randomString:function(e){e=e||16;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=n.length,i="",a=0;a{n&&n({isNew:!0})},document.getElementsByTagName("head")[0].appendChild(i))},loadStylesheet:function(e,n){let t="s_"+a(e),i=document.getElementById(t);i?n&&n({isNew:!1}):(i=document.createElement("link"),i.id=t,i.rel="stylesheet",i.type="text/css",i.href=e,i.onload=()=>{n&&n({isNew:!0})},document.getElementsByTagName("head")[0].appendChild(i))},md5:function(e){return a(e)},iframeMessage:{queue:[],serve:{},win:{recv:null,send:null},mount:function(e,n){MS.util.iframeMessage.win.recv!==e&&e.addEventListener("message",function(e){if(e.data&&e.data.group&&e.data.id){for(var n,t=0;t{let t;if(n[a]===i)return r=n,r;if(n[o]&&(t=u.filterAncestors(n[o],i,a,o))){let e={};return e[o]=t,r=Object.assign({},n,e),r}}),r},listAncestors:function(e,n,t,i){t=t||"id",i=i||"_child";t=u.filterAncestors(e,n,t,i);if(null===t)return[];let a=t,o=[];do{let e=Object.assign({},a);delete e[i],o.push(e),a=a[i]}while(a);return o},findChildrenIdsIncludeSelf:function(e,n,t,i){return[n].concat(u.findChildren(e,n,t,i).map(e=>e[t]))},findChildrenIds:function(e,n,t,i){return u.findChildren(e,n,t,i).map(e=>e[t])},findChildren:function(e,n,t,i){let a=[];for(var o of e)o[i]===n&&(a.push(o),a=a.concat(u.findChildren(e,o[t],t,i)));return a},findAncestors:function(e,n,t,i){let a=[];for(var o of e)if(o[t]===n){a.push(o),0!==o[i]&&(a=a.concat(u.findAncestors(e,o[i],t,i)));break}return a.reverse()},sort:function(e,n,t,i,a){return n=n||"",t=t||"id",i=i||"pid",a=a||"sort",e.forEach(e=>{e[t]||(e[t]=""),e[i]||(e[i]="")}),e=e.sort((e,n)=>e[a]-n[a]),u._sort(e,n,t,i,a)},_sort:function(n,t,i,a,o,r,l){r=r||1,l=l||{};let s=[];return n.filter(e=>e[a]===t).forEach(e=>{if(e[i]in l)throw"duplicate sort tree : "+JSON.stringify(e)+" "+JSON.stringify(l);l[e[i]]=!0,s.push(Object.assign(e,{level:r})),u._sort(n,e[i],i,a,o,r+1,l).forEach(e=>{s.push(Object.assign(e))})}),s},tree:function(e,n,t,i,a,o){return n=n||"",t=t||"id",i=i||"pid",a=a||"sort",o=o||"_child",e.map(e=>{e[t]||(e[t]=""),e[i]||(e[i]="")}),e=e.sort((e,n)=>e[a]-n[a]),u._tree(e,n,t,i,a,o)},_tree:function(t,n,i,a,o,r,l,s){l=l||1,s=s||{};let c=[];return t.filter(e=>e[a]===n).forEach(e=>{if(e[i]in s)throw"duplicate sort tree : "+JSON.stringify(e)+" "+JSON.stringify(s);s[e[i]]=!0;let n={level:l};n[r]=u._tree(t,e[i],i,a,o,r,l+1,s),n[r].length||delete n[r],c.push(Object.assign(e,n))}),c},nodes:function(e,n,t,i,a){return n=n||"id",t=t||"pid",i=i||"sort",a=a||"_child",u._nodes(JSON.parse(JSON.stringify(e)),0,n,t,i,a)},_nodes:function(e,t,i,a,o,r,l){l=l||1;let s=[];return e.forEach(e=>{let n=e;n[a]=t,n.level=l,r in n&&"object"==typeof n[r]?(e=n[r],delete n[r],s.push(n),u._nodes(e,n[i],i,a,o,r,l+1).forEach(e=>{s.push(e)})):(delete n[r],s.push(n))}),s},resortAndDiff:function(e,n,t,i,a){t=t||"id",i=i||"pid",a=a||"sort";let o={};n.forEach(e=>o[e[t]]=e);let r=1;e.forEach(e=>e[a]=r++);let l=[];return e.forEach(e=>{var n;e[t]in o&&(n=o[e[t]])[i]===e[i]&&n[a]===e[a]||l.push(e)}),l}}},295:function(e,n,d){"use strict";d.r(n),function(a){var e=d(284);const n=d(6),t=d(296),i=d(259),o=d(301),r=d(261),l=d(302),s=d(127).sprintf;n.fn.isInViewport=function(){var e=a(this).offset().top,n=e+a(this).outerHeight(),t=a(window).scrollTop(),i=t+a(window).height();return t{u.ready.call(this,...arguments)},50)},dialog:i,util:r,api:{defaultCallback:t.defaultFormCallback,post:t.post,postSuccess:t.postSuccess},selectorDialog:l,header:c,tree:e.a,L:function(){var e=arguments[0];return u.trans&&e in u.trans&&(arguments[0]=u.trans[e]),s.call(null,...arguments)}};window.api=window.api||{},window.api.jquery=n,window.api.base=t,window.api.dialog=i,window.api.lister=o,window.api.selectorDialog=l,window.api.util=r,t.init(),window.MS=u}.call(this,d(6))},296:function(e,n,t){var i=t(6),a=t(259),o=t(262),r=t(300),l={init:function(){i(function(){i("form").each(function(e,n){i(n).unbind("submit"),void 0!==i(n).attr("data-ajax-form")?o.initAjax(n,a):i(n).is("[data-form-no-loading]")||o.initCommon(n,a)})}),r.init(a)},defaultFormCallback:function(e,n){return o.defaultCallback(e,n,a)},post:function(e,n,t){i.ajax({type:"post",url:e,dataType:"json",timeout:6e5,data:n,success:function(e){t&&t(e)},error:function(){t&&t({code:-999,msg:"请求出现错误 T_T"})}})},postSuccess:function(e,n,t,i){t=t||l.defaultFormCallback,i=i||l.defaultFormCallback,l.post(e,n,function(e){l.defaultFormCallback(e,{success:function(e){t(e)},error:function(e){i(e)}})})}};e.exports=l},297:function(r,l,s){!function(a){var o;!function(p){"use strict";function n(e){var n=this;n.index=++h.index,n.config=A.extend({},n.config,u.config,e),document.body?n.creat():setTimeout(function(){n.creat()},30)}var A,c,e,t=p.layui&&layui.define,u={getPath:(e=document.currentScript?document.currentScript.src:function(){for(var e,n=document.scripts,t=n.length-1,i=t;0'+(o?i.title[0]:i.title)+"":"";return i.zIndex=a,n([i.shade?'
':"",'
'+(e&&2!=i.type?"":o)+'
'+(0==i.type&&-1!==i.icon?'':"")+((1!=i.type||!e)&&i.content||"")+'
'+(r=r?'':"",i.closeBtn&&(r+=''),r)+""+(i.btn?function(){var e="";"string"==typeof i.btn&&(i.btn=[i.btn]);for(var n=0,t=i.btn.length;n'+i.btn[n]+"";return'
'+e+"
"}():"")+(i.resize?'':"")+"
"],o,A('
')),this},n.pt.creat=function(){var e,i=this,a=i.config,o=i.index,r="object"==typeof(s=a.content),l=A("body");if(!a.id||!A("#"+a.id)[0]){switch("string"==typeof a.area&&(a.area="auto"===a.area?["",""]:[a.area,""]),a.shift&&(a.anim=a.shift),6==h.ie&&(a.fixed=!1),a.type){case 0:a.btn="btn"in a?a.btn:u.btn[0],h.closeAll("dialog");break;case 2:var s=a.content=r?a.content:[a.content||"http://layer.layui.com","auto"];a.content='';break;case 3:delete a.title,delete a.closeBtn,-1===a.icon&&a.icon,h.closeAll("loading");break;case 4:r||(a.content=[a.content,"body"]),a.follow=a.content[1],a.content=a.content[0]+'',delete a.title,a.tips="object"==typeof a.tips?a.tips:[a.tips,!0],a.tipsMore||h.closeAll("tips")}i.vessel(r,function(e,n,t){l.append(e[0]),r?2==a.type||4==a.type?A("body").append(e[1]):s.parents("."+d[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),A("#"+d[0]+o).find("."+d[5]).before(n)):l.append(e[1]),A(".layui-layer-move")[0]||l.append(u.moveElem=t),i.layero=A("#"+d[0]+o),a.scrollbar||d.html.css("overflow","hidden").attr("layer-full",o)}).auto(o),A("#layui-layer-shade"+i.index).css({"background-color":a.shade[1]||"#000",opacity:a.shade[0]||a.shade}),2==a.type&&6==h.ie&&i.layero.find("iframe").attr("src",s[0]),4==a.type?i.tips():i.offset(),a.fixed&&c.on("resize",function(){i.offset(),(/^\d+%$/.test(a.area[0])||/^\d+%$/.test(a.area[1]))&&i.auto(o),4==a.type&&i.tips()}),a.time<=0||setTimeout(function(){h.close(i.index)},a.time),i.move().callback(),d.anim[a.anim]&&(e="layer-anim "+d.anim[a.anim],i.layero.addClass(e).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){A(this).removeClass(e)})),a.isOutAnim&&i.layero.data("isOutAnim",!0)}},n.pt.auto=function(e){var n=this.config,t=A("#"+d[0]+e);""===n.area[0]&&0n.maxWidth&&t.width(n.maxWidth));var i=[t.innerWidth(),t.innerHeight()],a=t.find(d[1]).outerHeight()||0,o=t.find("."+d[6]).outerHeight()||0,e=function(e){(e=t.find(e)).height(i[1]-a-o-2*(0|parseFloat(e.css("padding-top"))))};return 2===n.type?e("iframe"):""===n.area[1]?0n.maxHeight?(i[1]=n.maxHeight,e("."+d[5])):n.fixed&&i[1]>=c.height()&&(i[1]=c.height(),e("."+d[5])):e("."+d[5]),this},n.pt.offset=function(){var e=this,n=e.config,t=e.layero,i=[t.outerWidth(),t.outerHeight()],a="object"==typeof n.offset;e.offsetTop=(c.height()-i[1])/2,e.offsetLeft=(c.width()-i[0])/2,a?(e.offsetTop=n.offset[0],e.offsetLeft=n.offset[1]||e.offsetLeft):"auto"!==n.offset&&("t"===n.offset?e.offsetTop=0:"r"===n.offset?e.offsetLeft=c.width()-i[0]:"b"===n.offset?e.offsetTop=c.height()-i[1]:"l"===n.offset?e.offsetLeft=0:"lt"===n.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===n.offset?(e.offsetTop=c.height()-i[1],e.offsetLeft=0):"rt"===n.offset?(e.offsetTop=0,e.offsetLeft=c.width()-i[0]):"rb"===n.offset?(e.offsetTop=c.height()-i[1],e.offsetLeft=c.width()-i[0]):e.offsetTop=n.offset),n.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?c.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?c.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=c.scrollTop(),e.offsetLeft+=c.scrollLeft()),t.attr("minLeft")&&(e.offsetTop=c.height()-(t.find(d[1]).outerHeight()||0),e.offsetLeft=t.css("left")),t.css({top:e.offsetTop,left:e.offsetLeft})},n.pt.tips=function(){var e=this.config,n=this.layero,t=[n.outerWidth(),n.outerHeight()],i=A(e.follow),a={width:(i=!i[0]?A("body"):i).outerWidth(),height:i.outerHeight(),top:i.offset().top,left:i.offset().left},o=n.find(".layui-layer-TipsG"),i=e.tips[0];e.tips[1]||o.remove(),a.autoLeft=function(){0"+(t.value||"")+"":'',o=t.success;return delete t.success,h.open(A.extend({type:1,btn:["确定","取消"],content:n,skin:"layui-layer-prompt"+y("prompt"),maxWidth:c.width(),success:function(e){(a=e.find(".layui-layer-input")).focus(),"function"==typeof o&&o(e)},resize:!1,yes:function(e){var n=a.val();""===n?a.focus():n.length>(t.maxlength||500)?h.tips("最多输入"+(t.maxlength||500)+"个字数",a,{tips:1}):i&&i(n,e,a)}},t))},h.tab=function(i){var a=(i=i||{}).tab||{},o="layui-this",r=i.success;return delete i.success,h.open(A.extend({type:1,skin:"layui-layer-tab"+y("tab"),resize:!1,title:function(){var e=a.length,n=1,t="";if(0'+a[0].title+"";n"+a[n].title+"";return t}(),content:'
    '+function(){var e=a.length,n=1,t="";if(0'+(a[0].content||"no content")+"";n'+(a[n].content||"no content")+"";return t}()+"
",success:function(e){var n=e.find(".layui-layer-title").children(),t=e.find(".layui-layer-tabmain").children();n.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var n=A(this),e=n.index();n.addClass(o).siblings().removeClass(o),t.eq(e).show().siblings().hide(),"function"==typeof i.change&&i.change(e)}),"function"==typeof r&&r(e)}},i))},h.photos=function(t,e,i){var n,a,o={};if((t=t||{}).photos){var r=t.photos.constructor===Object,l=r?t.photos:{},s=l.data||[],c=l.start||0;o.imgIndex=1+(0|c),t.img=t.img||"img";var u=t.success;if(delete t.success,r){if(0===s.length)return h.msg("没有图片")}else{var d=A(t.photos),f=function(){s=[],d.find(t.img).each(function(e){var n=A(this);n.attr("layer-index",e),s.push({alt:n.attr("alt"),pid:n.attr("layer-pid"),src:n.attr("layer-src")||n.attr("src"),thumb:n.attr("src")})})};if(f(),0===s.length)return;if(e||d.on("click",t.img,function(){var e=A(this).attr("layer-index");h.photos(A.extend(t,{photos:{start:e,data:s,tab:t.tab},full:t.full}),!0),f()}),!e)return}o.imgprev=function(e){o.imgIndex--,o.imgIndex<1&&(o.imgIndex=s.length),o.tabimg(e)},o.imgnext=function(e,n){o.imgIndex++,o.imgIndex>s.length&&(o.imgIndex=1,n)||o.tabimg(e)},o.keyup=function(e){var n;o.end||(n=e.keyCode,e.preventDefault(),37===n?o.imgprev(!0):39===n?o.imgnext(!0):27===n&&h.close(o.index))},o.tabimg=function(e){if(!(s.length<=1))return l.start=o.imgIndex-1,h.close(o.index),h.photos(t,!0,e)},o.event=function(){o.bigimg.hover(function(){o.imgsee.show()},function(){o.imgsee.hide()}),o.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),o.imgprev()}),o.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),o.imgnext()}),A(document).on("keyup",o.keyup)},o.loadi=h.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),e=s[c].src,n=function(e){var n;h.close(o.loadi),o.index=h.open(A.extend({type:1,id:"layui-layer-photos",area:(n=[e.width,e.height],e=[A(p).width()-100,A(p).height()-100],!t.full&&(n[0]>e[0]||n[1]>e[1])&&((e=[n[0]/e[0],n[1]/e[1]])[1]'+(s[c].alt||
'+(1':"")+'
'+(s[c].alt||"")+""+o.imgIndex+"/"+s.length+"
",success:function(e,n){o.bigimg=e.find(".layui-layer-phimg"),o.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),o.event(e),t.tab&&t.tab(s[c],e),"function"==typeof u&&u(e)},end:function(){o.end=!0,A(document).off("keyup",o.keyup)}},t))},(a=new Image).src=e,a.complete?n(a):(a.onload=function(){a.onload=null,n(a)},a.onerror=function(e){a.onerror=null,h.close(o.loadi),h.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1',' ',""].join("");Dialog.dialogContent(i,opt)},img.src=imgUrl,!1})},initSmartImage:function(){$(document).ready(function(){setTimeout(function(){$("[data-smart-image]").each(function(e,n){$(n).attr("src",$(n).attr("data-smart-image"))})},0)})},initTip:function(t){t=t||null,$(document).on("click","[data-tip-error]",function(){return t?t.tipError($(this).attr("data-tip-error")):alert($(this).attr("data-tip-error")),!1}),$(document).on("click","[data-tip-success]",function(){return t?t.tipError($(this).attr("data-tip-success")):alert($(this).attr("data-tip-success")),!1}),$(document).on("mouseenter","[data-tip-popover]",function(e){var n=$(this).attr("data-tip-popover");t?t.tipPopoverShow(this,n):$(this).attr("title",n)}).on("mouseleave","[data-tip-popover]",function(e){t&&t.tipPopoverHide(this)})},init:function(e){inited||(inited=!0,Convenient.initAll(e),Convenient.initSmartImage(),Convenient.initTip(e))}};module.exports=Convenient},301:function(e,n,t){!function(s){let c=t(262),u=t(259);e.exports=function(e,n){let i=s(e.lister||null),t=s(e.search||null),a=this,o={page:1,pageSize:10,field:[],order:[],search:[]},r=null;n&&"param"in n&&(o=s.extend(o,n.param));let l=s.extend({server:"/path/to/server",editQuickServer:"/path/to/edit/quick",hashUrl:!0,showLoading:!0,customLoading:function(e){},render:function(e){}},n);this.getData=function(){return r},this.init=function(){let e=window.location.hash;0===e.indexOf("#")&&(e=e.substring(1));try{e=decodeURIComponent(e);var n,t=JSON.parse(e);for(n in t)n in o&&(o[n]=t[n])}catch(e){}i&&i.on("click","[data-refresh-button]",function(){return a.load(!0),!1})},this.initSearch=function(){t.on("click","[data-search-button]",function(){return o.page=1,a.prepareSearch(),a.load(!0),!1}),t.on("click","[data-reset-search-button]",function(){return a.resetSearch(),a.resetOrder(),a.load(!0),!1}),t.on("click","[data-expand-search-button]",function(){return t.find(".field-more-expand").toggleClass("field-more-expand__active"),!1}),t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("init")&&s(n).data("init")(o.search)})},this.initTable=function(){},this.prepareSearch=function(){o.search=[],t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("get")&&o.search.push(s(n).data("get")())})},this.resetSearch=function(){o.search=[],t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("reset")&&o.search.push(s(n).data("reset")())})},this.resetOrder=function(){o.order=[]},this.setPageSize=function(e){o.pageSize=e},this.setPage=function(e){o.page=e},this.setParam=function(e,n){e in o&&(o[e]=n)},this.getParam=function(){return o},this.setOption=function(e,n){l[e]=n},this.refresh=function(){a.load()},this.load=function(){l.showLoading&&u.loadingOn(),l.customLoading(!0),r=null,s.post(l.server,o).done(function(e){l.hashUrl&&window.location.replace("#"+JSON.stringify(o)),l.showLoading&&u.loadingOff(),l.customLoading(!1),c.defaultCallback(e,{success:function(e){l.render(e.data)}})}).fail(function(e){try{l.showLoading&&u.loadingOff(),l.customLoading(!1),c.defaultCallback(e)}catch(e){}})},this.init(),this.initSearch(),this.initTable(),this.prepareSearch(),this.load()}}.call(this,t(6))},302:function(i,e,a){!function(n){function e(e){null==t&&alert("Dialog must defined"),this.opt=n.extend({limitMax:100,limitMin:1,dialogWidth:"940px",dialogHeight:"90%",server:"/path/to/link/choose/dialog",callback:function(e){alert("Select : "+JSON.stringify(e))}},e),n(window).width()<800&&(this.opt.dialogWidth="90%"),this.dialog=t,this.runtime={dialog:null}}var t=a(259);e.prototype.show=function(){var n=this;return window.__selectorDialogOption=n.opt,window.__dialogSelectIds=[],window.__selectorDialogItems=[],this.runtime.dialog=this.dialog.dialog(this.opt.server,{width:this.opt.dialogWidth,height:this.opt.dialogHeight,closeCallback:function(){var e=window.__selectorDialogItems;e.length&&(e.length>n.opt.limitMax?n.dialog.tipError("Select limit max "+n.opt.limitMax+" item(s)"):e.length>>24)|4278255360&(t[l]<<24|t[l]>>>8);t[e>>>5]|=128<>>9<<4)]=e;for(var s=y._ff,c=y._gg,u=y._hh,d=y._ii,l=0;l>>0,a=a+p>>>0,o=o+A>>>0,r=r+h>>>0}return g.endian([i,a,o,r])})._ff=function(e,n,t,i,a,o,r){r=e+(n&t|~n&i)+(a>>>0)+r;return(r<>>32-o)+n},y._gg=function(e,n,t,i,a,o,r){r=e+(n&i|t&~i)+(a>>>0)+r;return(r<>>32-o)+n},y._hh=function(e,n,t,i,a,o,r){r=e+(n^t^i)+(a>>>0)+r;return(r<>>32-o)+n},y._ii=function(e,n,t,i,a,o,r){r=e+(t^(n|~i))+(a>>>0)+r;return(r<>>32-o)+n},y._blocksize=16,y._digestsize=16,e.exports=function(e,n){if(null==e)throw new Error("Illegal argument "+e);e=g.wordsToBytes(y(e,n));return n&&n.asBytes?e:n&&n.asString?x.bytesToString(e):g.bytesToHex(e)}},125:function(e,n){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(e,n){return e<>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var n=0;n>>5]|=e[t]<<24-i%32;return n},wordsToBytes:function(e){for(var n=[],t=0;t<32*e.length;t+=8)n.push(e[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(e){for(var n=[],t=0;t>>4).toString(16)),n.push((15&e[t]).toString(16));return n.join("")},hexToBytes:function(e){for(var n=[],t=0;t>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,i=0;t>>6-2*i);return n}};e.exports=t},126:function(e,n){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||"function"==typeof(n=e).readFloatLE&&"function"==typeof n.slice&&t(n.slice(0,0))||!!e._isBuffer);var n}},127:function(n,t,i){var a;!function(){"use strict";var p={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function A(e){return function(e,n){var t,i,a,o,r,l,s,c,u=1,d=e.length,f="";for(i=0;i>>0).toString(8);break;case"s":t=String(t),t=o.precision?t.substring(0,o.precision):t;break;case"t":t=String(!!t),t=o.precision?t.substring(0,o.precision):t;break;case"T":t=Object.prototype.toString.call(t).slice(8,-1).toLowerCase(),t=o.precision?t.substring(0,o.precision):t;break;case"u":t=parseInt(t,10)>>>0;break;case"v":t=t.valueOf(),t=o.precision?t.substring(0,o.precision):t;break;case"x":t=(parseInt(t,10)>>>0).toString(16);break;case"X":t=(parseInt(t,10)>>>0).toString(16).toUpperCase()}p.json.test(o.type)?f+=t:(!p.number.test(o.type)||s&&!o.sign?c="":(c=s?"+":"-",t=t.toString().replace(p.sign,"")),r=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",l=o.width-(c+t).length,l=o.width&&0
'+e+"
",shade:[.3,"#000"],closeBtn:!1,title:!1,area:["auto","auto"]});return u("#layui-layer"+e).attr("type","loading"),e}return a.load(2)},loadingOff:function(){a.closeAll("loading")},tipSuccess:function(e,n){let t=2e3;e&&10','
',t.label,"
",'
','
确定
',""].join(""),{openCallback:function(){u("#dialog-input-box").find(".ok").on("click",function(){a=!0,d.dialogClose(o)}),u("#dialog-input-box").find("input").on("change",function(){i=u(this).val()})},closeCallback:function(){a&&e&&e(i)}})},preview:function(o,e){e=e||{};let r=u.extend({title:null,width:"auto",height:"auto"},e),l=u(window).width(),s=u(window).height();d&&d.loadingOn();let c=new Image;return c.onerror=function(){d.loadingOff(),d.tipError("Image load error")},c.onload=function(){d.loadingOff();let e=l-40,n=s-40,t=c.width,i=c.height;t>e&&(i=parseInt(i*e/t),t=e),i>n&&(t=parseInt(t*n/i),i=n);var a=['
',' ',"
"].join("");d.dialogContent(a,r)},c.src=o,!1}};e.exports=d},261:function(e,n,t){!function(r){const a=t(124);var i={specialchars:function(e){var n=[];if(!e)return"";if(0==e.length)return"";for(var t=0;t":n.push(">");break;case"&":n.push("&");break;case" ":n.push(" ");break;case'"':n.push(""");break;default:n.push(e.substr(t,1))}return n.join("")},text2html:function(e){return"

"+(e=i.specialchars(e)).replace(/\n/g,"

")+"

"},text2paragraph:function(e){return"

"+e.replace(/\n/g,"

")+"

"},urlencode:function(e){return e=(e+"").toString(),encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")},randomString:function(e){e=e||16;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=n.length,i="",a=0;a{n&&n({isNew:!0})},document.getElementsByTagName("head")[0].appendChild(i))},loadStylesheet:function(e,n){let t="s_"+a(e),i=document.getElementById(t);i?n&&n({isNew:!1}):(i=document.createElement("link"),i.id=t,i.rel="stylesheet",i.type="text/css",i.href=e,i.onload=()=>{n&&n({isNew:!0})},document.getElementsByTagName("head")[0].appendChild(i))},md5:function(e){return a(e)},iframeMessage:{queue:[],serve:{},win:{recv:null,send:null},mount:function(e,n){MS.util.iframeMessage.win.recv!==e&&e.addEventListener("message",function(e){if(e.data&&e.data.group&&e.data.id){for(var n,t=0;t{let t;if(n[a]===i)return r=n,r;if(n[o]&&(t=u.filterAncestors(n[o],i,a,o))){let e={};return e[o]=t,r=Object.assign({},n,e),r}}),r},listAncestors:function(e,n,t,i){t=t||"id",i=i||"_child";t=u.filterAncestors(e,n,t,i);if(null===t)return[];let a=t,o=[];do{let e=Object.assign({},a);delete e[i],o.push(e),a=a[i]}while(a);return o},findChildrenIdsIncludeSelf:function(e,n,t,i){return[n].concat(u.findChildren(e,n,t,i).map(e=>e[t]))},findChildrenIds:function(e,n,t,i){return u.findChildren(e,n,t,i).map(e=>e[t])},findChildren:function(e,n,t,i){let a=[];for(var o of e)o[i]===n&&(a.push(o),a=a.concat(u.findChildren(e,o[t],t,i)));return a},findAncestors:function(e,n,t,i){let a=[];for(var o of e)if(o[t]===n){a.push(o),0!==o[i]&&(a=a.concat(u.findAncestors(e,o[i],t,i)));break}return a.reverse()},sort:function(e,n,t,i,a){return n=n||"",t=t||"id",i=i||"pid",a=a||"sort",e.forEach(e=>{e[t]||(e[t]=""),e[i]||(e[i]="")}),e=e.sort((e,n)=>e[a]-n[a]),u._sort(e,n,t,i,a)},_sort:function(n,t,i,a,o,r,l){r=r||1,l=l||{};let s=[];return n.filter(e=>e[a]===t).forEach(e=>{if(e[i]in l)throw"duplicate sort tree : "+JSON.stringify(e)+" "+JSON.stringify(l);l[e[i]]=!0,s.push(Object.assign(e,{level:r})),u._sort(n,e[i],i,a,o,r+1,l).forEach(e=>{s.push(Object.assign(e))})}),s},tree:function(e,n,t,i,a,o){return n=n||"",t=t||"id",i=i||"pid",a=a||"sort",o=o||"_child",e.map(e=>{e[t]||(e[t]=""),e[i]||(e[i]="")}),e=e.sort((e,n)=>e[a]-n[a]),u._tree(e,n,t,i,a,o)},_tree:function(t,n,i,a,o,r,l,s){l=l||1,s=s||{};let c=[];return t.filter(e=>e[a]===n).forEach(e=>{if(e[i]in s)throw"duplicate sort tree : "+JSON.stringify(e)+" "+JSON.stringify(s);s[e[i]]=!0;let n={level:l};n[r]=u._tree(t,e[i],i,a,o,r,l+1,s),n[r].length||delete n[r],c.push(Object.assign(e,n))}),c},nodes:function(e,n,t,i,a){return n=n||"id",t=t||"pid",i=i||"sort",a=a||"_child",u._nodes(JSON.parse(JSON.stringify(e)),0,n,t,i,a)},_nodes:function(e,t,i,a,o,r,l){l=l||1;let s=[];return e.forEach(e=>{let n=e;n[a]=t,n.level=l,r in n&&"object"==typeof n[r]?(e=n[r],delete n[r],s.push(n),u._nodes(e,n[i],i,a,o,r,l+1).forEach(e=>{s.push(e)})):(delete n[r],s.push(n))}),s},resortAndDiff:function(e,n,t,i,a){t=t||"id",i=i||"pid",a=a||"sort";let o={};n.forEach(e=>o[e[t]]=e);let r=1;e.forEach(e=>e[a]=r++);let l=[];return e.forEach(e=>{var n;e[t]in o&&(n=o[e[t]])[i]===e[i]&&n[a]===e[a]||l.push(e)}),l}}},295:function(e,n,d){"use strict";d.r(n),function(a){var e=d(284);const n=d(6),t=d(296),i=d(259),o=d(301),r=d(261),l=d(302),s=d(127).sprintf;n.fn.isInViewport=function(){var e=a(this).offset().top,n=e+a(this).outerHeight(),t=a(window).scrollTop(),i=t+a(window).height();return t{u.ready.call(this,...arguments)},50)},dialog:i,util:r,api:{defaultCallback:t.defaultFormCallback,post:t.post,postSuccess:t.postSuccess},selectorDialog:l,header:c,tree:e.a,L:function(){var e=arguments[0];return u.trans&&e in u.trans&&(arguments[0]=u.trans[e]),s.call(null,...arguments)}};window.api=window.api||{},window.api.jquery=n,window.api.base=t,window.api.dialog=i,window.api.lister=o,window.api.selectorDialog=l,window.api.util=r,t.init(),window.MS=u}.call(this,d(6))},296:function(e,n,t){var i=t(6),a=t(259),o=t(262),r=t(300),l={init:function(){i(function(){i("form").each(function(e,n){i(n).unbind("submit"),void 0!==i(n).attr("data-ajax-form")?o.initAjax(n,a):i(n).is("[data-form-no-loading]")||o.initCommon(n,a)})}),r.init(a)},defaultFormCallback:function(e,n){return o.defaultCallback(e,n,a)},post:function(e,n,t){i.ajax({type:"post",url:e,dataType:"json",timeout:6e5,data:n,success:function(e){t&&t(e)},error:function(){t&&t({code:-999,msg:"请求出现错误 T_T"})}})},postSuccess:function(e,n,t,i){t=t||l.defaultFormCallback,i=i||l.defaultFormCallback,l.post(e,n,function(e){l.defaultFormCallback(e,{success:function(e){t(e)},error:function(e){i(e)}})})}};e.exports=l},297:function(r,l,s){!function(a){var o;!function(p){"use strict";function n(e){var n=this;n.index=++h.index,n.config=A.extend({},n.config,u.config,e),document.body?n.creat():setTimeout(function(){n.creat()},30)}var A,c,e,t=p.layui&&layui.define,u={getPath:(e=document.currentScript?document.currentScript.src:function(){for(var e,n=document.scripts,t=n.length-1,i=t;0'+(o?i.title[0]:i.title)+"":"";return i.zIndex=a,n([i.shade?'
':"",'
'+(e&&2!=i.type?"":o)+'
'+(0==i.type&&-1!==i.icon?'':"")+((1!=i.type||!e)&&i.content||"")+'
'+(r=r?'':"",i.closeBtn&&(r+=''),r)+""+(i.btn?function(){var e="";"string"==typeof i.btn&&(i.btn=[i.btn]);for(var n=0,t=i.btn.length;n'+i.btn[n]+"";return'
'+e+"
"}():"")+(i.resize?'':"")+"
"],o,A('
')),this},n.pt.creat=function(){var e,i=this,a=i.config,o=i.index,r="object"==typeof(s=a.content),l=A("body");if(!a.id||!A("#"+a.id)[0]){switch("string"==typeof a.area&&(a.area="auto"===a.area?["",""]:[a.area,""]),a.shift&&(a.anim=a.shift),6==h.ie&&(a.fixed=!1),a.type){case 0:a.btn="btn"in a?a.btn:u.btn[0],h.closeAll("dialog");break;case 2:var s=a.content=r?a.content:[a.content||"http://layer.layui.com","auto"];a.content='';break;case 3:delete a.title,delete a.closeBtn,-1===a.icon&&a.icon,h.closeAll("loading");break;case 4:r||(a.content=[a.content,"body"]),a.follow=a.content[1],a.content=a.content[0]+'',delete a.title,a.tips="object"==typeof a.tips?a.tips:[a.tips,!0],a.tipsMore||h.closeAll("tips")}i.vessel(r,function(e,n,t){l.append(e[0]),r?2==a.type||4==a.type?A("body").append(e[1]):s.parents("."+d[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),A("#"+d[0]+o).find("."+d[5]).before(n)):l.append(e[1]),A(".layui-layer-move")[0]||l.append(u.moveElem=t),i.layero=A("#"+d[0]+o),a.scrollbar||d.html.css("overflow","hidden").attr("layer-full",o)}).auto(o),A("#layui-layer-shade"+i.index).css({"background-color":a.shade[1]||"#000",opacity:a.shade[0]||a.shade}),2==a.type&&6==h.ie&&i.layero.find("iframe").attr("src",s[0]),4==a.type?i.tips():i.offset(),a.fixed&&c.on("resize",function(){i.offset(),(/^\d+%$/.test(a.area[0])||/^\d+%$/.test(a.area[1]))&&i.auto(o),4==a.type&&i.tips()}),a.time<=0||setTimeout(function(){h.close(i.index)},a.time),i.move().callback(),d.anim[a.anim]&&(e="layer-anim "+d.anim[a.anim],i.layero.addClass(e).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){A(this).removeClass(e)})),a.isOutAnim&&i.layero.data("isOutAnim",!0)}},n.pt.auto=function(e){var n=this.config,t=A("#"+d[0]+e);""===n.area[0]&&0n.maxWidth&&t.width(n.maxWidth));var i=[t.innerWidth(),t.innerHeight()],a=t.find(d[1]).outerHeight()||0,o=t.find("."+d[6]).outerHeight()||0,e=function(e){(e=t.find(e)).height(i[1]-a-o-2*(0|parseFloat(e.css("padding-top"))))};return 2===n.type?e("iframe"):""===n.area[1]?0n.maxHeight?(i[1]=n.maxHeight,e("."+d[5])):n.fixed&&i[1]>=c.height()&&(i[1]=c.height(),e("."+d[5])):e("."+d[5]),this},n.pt.offset=function(){var e=this,n=e.config,t=e.layero,i=[t.outerWidth(),t.outerHeight()],a="object"==typeof n.offset;e.offsetTop=(c.height()-i[1])/2,e.offsetLeft=(c.width()-i[0])/2,a?(e.offsetTop=n.offset[0],e.offsetLeft=n.offset[1]||e.offsetLeft):"auto"!==n.offset&&("t"===n.offset?e.offsetTop=0:"r"===n.offset?e.offsetLeft=c.width()-i[0]:"b"===n.offset?e.offsetTop=c.height()-i[1]:"l"===n.offset?e.offsetLeft=0:"lt"===n.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===n.offset?(e.offsetTop=c.height()-i[1],e.offsetLeft=0):"rt"===n.offset?(e.offsetTop=0,e.offsetLeft=c.width()-i[0]):"rb"===n.offset?(e.offsetTop=c.height()-i[1],e.offsetLeft=c.width()-i[0]):e.offsetTop=n.offset),n.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?c.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?c.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=c.scrollTop(),e.offsetLeft+=c.scrollLeft()),t.attr("minLeft")&&(e.offsetTop=c.height()-(t.find(d[1]).outerHeight()||0),e.offsetLeft=t.css("left")),t.css({top:e.offsetTop,left:e.offsetLeft})},n.pt.tips=function(){var e=this.config,n=this.layero,t=[n.outerWidth(),n.outerHeight()],i=A(e.follow),a={width:(i=!i[0]?A("body"):i).outerWidth(),height:i.outerHeight(),top:i.offset().top,left:i.offset().left},o=n.find(".layui-layer-TipsG"),i=e.tips[0];e.tips[1]||o.remove(),a.autoLeft=function(){0"+(t.value||"")+"":'',o=t.success;return delete t.success,h.open(A.extend({type:1,btn:["确定","取消"],content:n,skin:"layui-layer-prompt"+y("prompt"),maxWidth:c.width(),success:function(e){(a=e.find(".layui-layer-input")).focus(),"function"==typeof o&&o(e)},resize:!1,yes:function(e){var n=a.val();""===n?a.focus():n.length>(t.maxlength||500)?h.tips("最多输入"+(t.maxlength||500)+"个字数",a,{tips:1}):i&&i(n,e,a)}},t))},h.tab=function(i){var a=(i=i||{}).tab||{},o="layui-this",r=i.success;return delete i.success,h.open(A.extend({type:1,skin:"layui-layer-tab"+y("tab"),resize:!1,title:function(){var e=a.length,n=1,t="";if(0'+a[0].title+"";n"+a[n].title+"";return t}(),content:'
    '+function(){var e=a.length,n=1,t="";if(0'+(a[0].content||"no content")+"";n'+(a[n].content||"no content")+"";return t}()+"
",success:function(e){var n=e.find(".layui-layer-title").children(),t=e.find(".layui-layer-tabmain").children();n.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var n=A(this),e=n.index();n.addClass(o).siblings().removeClass(o),t.eq(e).show().siblings().hide(),"function"==typeof i.change&&i.change(e)}),"function"==typeof r&&r(e)}},i))},h.photos=function(t,e,i){var n,a,o={};if((t=t||{}).photos){var r=t.photos.constructor===Object,l=r?t.photos:{},s=l.data||[],c=l.start||0;o.imgIndex=1+(0|c),t.img=t.img||"img";var u=t.success;if(delete t.success,r){if(0===s.length)return h.msg("没有图片")}else{var d=A(t.photos),f=function(){s=[],d.find(t.img).each(function(e){var n=A(this);n.attr("layer-index",e),s.push({alt:n.attr("alt"),pid:n.attr("layer-pid"),src:n.attr("layer-src")||n.attr("src"),thumb:n.attr("src")})})};if(f(),0===s.length)return;if(e||d.on("click",t.img,function(){var e=A(this).attr("layer-index");h.photos(A.extend(t,{photos:{start:e,data:s,tab:t.tab},full:t.full}),!0),f()}),!e)return}o.imgprev=function(e){o.imgIndex--,o.imgIndex<1&&(o.imgIndex=s.length),o.tabimg(e)},o.imgnext=function(e,n){o.imgIndex++,o.imgIndex>s.length&&(o.imgIndex=1,n)||o.tabimg(e)},o.keyup=function(e){var n;o.end||(n=e.keyCode,e.preventDefault(),37===n?o.imgprev(!0):39===n?o.imgnext(!0):27===n&&h.close(o.index))},o.tabimg=function(e){if(!(s.length<=1))return l.start=o.imgIndex-1,h.close(o.index),h.photos(t,!0,e)},o.event=function(){o.bigimg.hover(function(){o.imgsee.show()},function(){o.imgsee.hide()}),o.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),o.imgprev()}),o.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),o.imgnext()}),A(document).on("keyup",o.keyup)},o.loadi=h.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),e=s[c].src,n=function(e){var n;h.close(o.loadi),o.index=h.open(A.extend({type:1,id:"layui-layer-photos",area:(n=[e.width,e.height],e=[A(p).width()-100,A(p).height()-100],!t.full&&(n[0]>e[0]||n[1]>e[1])&&((e=[n[0]/e[0],n[1]/e[1]])[1]'+(s[c].alt||
'+(1':"")+'
'+(s[c].alt||"")+""+o.imgIndex+"/"+s.length+"
",success:function(e,n){o.bigimg=e.find(".layui-layer-phimg"),o.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),o.event(e),t.tab&&t.tab(s[c],e),"function"==typeof u&&u(e)},end:function(){o.end=!0,A(document).off("keyup",o.keyup)}},t))},(a=new Image).src=e,a.complete?n(a):(a.onload=function(){a.onload=null,n(a)},a.onerror=function(e){a.onerror=null,h.close(o.loadi),h.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1',' ',""].join("");Dialog.dialogContent(i,opt)},img.src=imgUrl,!1})},initSmartImage:function(){$(document).ready(function(){setTimeout(function(){$("[data-smart-image]").each(function(e,n){$(n).attr("src",$(n).attr("data-smart-image"))})},0)})},initTip:function(t){t=t||null,$(document).on("click","[data-tip-error]",function(){return t?t.tipError($(this).attr("data-tip-error")):alert($(this).attr("data-tip-error")),!1}),$(document).on("click","[data-tip-success]",function(){return t?t.tipError($(this).attr("data-tip-success")):alert($(this).attr("data-tip-success")),!1}),$(document).on("mouseenter","[data-tip-popover]",function(e){var n=$(this).attr("data-tip-popover");t?t.tipPopoverShow(this,n):$(this).attr("title",n)}).on("mouseleave","[data-tip-popover]",function(e){t&&t.tipPopoverHide(this)})},init:function(e){inited||(inited=!0,Convenient.initAll(e),Convenient.initSmartImage(),Convenient.initTip(e))}};module.exports=Convenient},301:function(e,n,t){!function(s){let c=t(262),u=t(259);e.exports=function(e,n){let i=s(e.lister||null),t=s(e.search||null),a=this,o={page:1,pageSize:10,field:[],order:[],search:[]},r=null;n&&"param"in n&&(o=s.extend(o,n.param));let l=s.extend({server:"/path/to/server",editQuickServer:"/path/to/edit/quick",hashUrl:!0,showLoading:!0,customLoading:function(e){},render:function(e){}},n);this.getData=function(){return r},this.init=function(){let e=window.location.hash;0===e.indexOf("#")&&(e=e.substring(1));try{e=decodeURIComponent(e);var n,t=JSON.parse(e);for(n in t)n in o&&(o[n]=t[n])}catch(e){}i&&i.on("click","[data-refresh-button]",function(){return a.load(!0),!1})},this.initSearch=function(){t.on("click","[data-search-button]",function(){return o.page=1,a.prepareSearch(),a.load(!0),!1}),t.on("click","[data-reset-search-button]",function(){return a.resetSearch(),a.resetOrder(),a.load(!0),!1}),t.on("click","[data-expand-search-button]",function(){return t.find(".field-more-expand").toggleClass("field-more-expand__active"),!1}),t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("init")&&s(n).data("init")(o.search)})},this.initTable=function(){},this.prepareSearch=function(){o.search=[],t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("get")&&o.search.push(s(n).data("get")())})},this.resetSearch=function(){o.search=[],t.find("[data-grid-filter-field]").each(function(e,n){s(n).data("reset")&&o.search.push(s(n).data("reset")())})},this.resetOrder=function(){o.order=[]},this.setPageSize=function(e){o.pageSize=e},this.setPage=function(e){o.page=e},this.setParam=function(e,n){e in o&&(o[e]=n)},this.getParam=function(){return o},this.setOption=function(e,n){l[e]=n},this.refresh=function(){a.load()},this.load=function(){l.showLoading&&u.loadingOn(),l.customLoading(!0),r=null,s.post(l.server,o).done(function(e){l.hashUrl&&window.location.replace("#"+JSON.stringify(o)),l.showLoading&&u.loadingOff(),l.customLoading(!1),c.defaultCallback(e,{success:function(e){l.render(e.data)}})}).fail(function(e){try{l.showLoading&&u.loadingOff(),l.customLoading(!1),c.defaultCallback(e)}catch(e){}})},this.init(),this.initSearch(),this.initTable(),this.prepareSearch(),this.load()}}.call(this,t(6))},302:function(i,e,a){!function(n){function e(e){null==t&&alert("Dialog must defined"),this.opt=n.extend({limitMax:100,limitMin:1,dialogWidth:"940px",dialogHeight:"90%",server:"/path/to/link/choose/dialog",callback:function(e){alert("Select : "+JSON.stringify(e))}},e),n(window).width()<800&&(this.opt.dialogWidth="90%"),this.dialog=t,this.runtime={dialog:null}}var t=a(259);e.prototype.show=function(){var n=this;return window.__selectorDialogOption=n.opt,window.__dialogSelectIds=[],window.__selectorDialogItems=[],this.runtime.dialog=this.dialog.dialog(this.opt.server,{width:this.opt.dialogWidth,height:this.opt.dialogHeight,closeCallback:function(){var e=window.__selectorDialogItems;e.length&&(e.length>n.opt.limitMax?n.dialog.tipError("Select limit max "+n.opt.limitMax+" item(s)"):e.length - + - + @@ -38,4 +38,4 @@

话说天下大势,合久必分,分久必合。

话说天下大势,合久必分,分久必合。

- \ No newline at end of file + diff --git a/vendor/modstart/modstart/resources/asset/src/sui/bricks/component/search/search.less b/vendor/modstart/modstart/resources/asset/src/sui/bricks/component/search/search.less index 5fe13389..50fdff79 100644 --- a/vendor/modstart/modstart/resources/asset/src/sui/bricks/component/search/search.less +++ b/vendor/modstart/modstart/resources/asset/src/sui/bricks/component/search/search.less @@ -91,6 +91,17 @@ line-height: 2rem; padding: 0 0.5rem; + &.page{ + background-color: var(--color-content-bg); + height:2.5rem; + padding:0.25rem 0; + .center{ + .box{ + background-color: var(--color-body-bg); + } + } + } + .left, .center, .right { .item { display: inline-block; diff --git a/vendor/modstart/modstart/src/Admin/Auth/Admin.php b/vendor/modstart/modstart/src/Admin/Auth/Admin.php index 67f4cd7b..70dd7afd 100644 --- a/vendor/modstart/modstart/src/Admin/Auth/Admin.php +++ b/vendor/modstart/modstart/src/Admin/Auth/Admin.php @@ -146,7 +146,7 @@ public static function addInfoLog($adminUserId, $summary, $content = []) } $adminLog = ModelUtil::insert('admin_log', ['adminUserId' => $adminUserId, 'type' => AdminLogType::INFO, 'summary' => $summary]); if (!empty($content)) { - ModelUtil::insert('admin_log_data', ['id' => $adminLog['id'], 'content' => json_encode($content)]); + ModelUtil::insert('admin_log_data', ['id' => $adminLog['id'], 'content' => json_encode($content, JSON_UNESCAPED_UNICODE)]); } } diff --git a/vendor/modstart/modstart/src/Core/Input/Request.php b/vendor/modstart/modstart/src/Core/Input/Request.php index d1d43bb2..fea00bb7 100644 --- a/vendor/modstart/modstart/src/Core/Input/Request.php +++ b/vendor/modstart/modstart/src/Core/Input/Request.php @@ -283,6 +283,15 @@ public static function headers() public static function ip() { + $keys = [ + 'HTTP_X_REAL_IP', + 'HTTP_X_FORWARDED_FOR', + ]; + foreach ($keys as $key) { + if ($v = self::server($key)) { + return $v; + } + } return self::instance()->ip(); } @@ -290,4 +299,9 @@ public static function server($name) { return self::instance()->server($name); } + + public static function servers() + { + return self::instance()->server->all(); + } } diff --git a/vendor/modstart/modstart/src/Core/Util/MetaUtil.php b/vendor/modstart/modstart/src/Core/Util/MetaUtil.php new file mode 100644 index 00000000..42c06802 --- /dev/null +++ b/vendor/modstart/modstart/src/Core/Util/MetaUtil.php @@ -0,0 +1,42 @@ +value); switch (get_class($this)) { case Select::class: + case Type::class: return <<name()]; $record = ModelUtil::get($table, [$valueKey => $value]); if ($record) { - return $record[$labelKey]; + $value = $record[$labelKey]; } - return $value; + return AutoRenderedFieldValue::make($value); } }); return $this; diff --git a/vendor/modstart/modstart/src/Grid/Displayer/ItemOperate.php b/vendor/modstart/modstart/src/Grid/Displayer/ItemOperate.php index 2bba0cb1..59d0e7b6 100644 --- a/vendor/modstart/modstart/src/Grid/Displayer/ItemOperate.php +++ b/vendor/modstart/modstart/src/Grid/Displayer/ItemOperate.php @@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Facades\View; use ModStart\Field\AbstractField; use ModStart\Widget\TextAction; use ModStart\Widget\TextLink; @@ -119,7 +120,10 @@ public function render() $editText = L('Edit'); } if ($this->grid->editBlankPage()) { - $this->operates[] = TextLink::primary($editText, $this->grid->urlEdit() . '?_id=' . $this->item->{$this->grid->getRepositoryKeyName()}); + $this->operates[] = TextLink::primary($editText, + $this->grid->urlEdit() . '?_id=' . $this->item->{$this->grid->getRepositoryKeyName()}, + View::shared('_isTab') ? 'data-tab-open' : '' + ); } else { $this->operates[] = TextAction::primary($editText, 'data-edit'); } diff --git a/vendor/modstart/modstart/views/admin/frame.blade.php b/vendor/modstart/modstart/views/admin/frame.blade.php index 854c1ba6..99f226fe 100644 --- a/vendor/modstart/modstart/views/admin/frame.blade.php +++ b/vendor/modstart/modstart/views/admin/frame.blade.php @@ -149,6 +149,7 @@ class="title" data-keywords-filter> diff --git a/vendor/modstart/modstart/views/core/field/customField-render.blade.php b/vendor/modstart/modstart/views/core/field/customField-render.blade.php new file mode 100644 index 00000000..5b9707a7 --- /dev/null +++ b/vendor/modstart/modstart/views/core/field/customField-render.blade.php @@ -0,0 +1,19 @@ +
+
+ {{$field['title']}} +
+
+ @if($field['type']=='Text') + + @elseif($field['type']=='Radio') + @foreach($field['data']['option'] as $option) +
+ +
+ @endforeach + @endif +
+
diff --git a/vendor/modstart/modstart/views/core/grid/index.blade.php b/vendor/modstart/modstart/views/core/grid/index.blade.php index 0f823fdf..82c4e336 100644 --- a/vendor/modstart/modstart/views/core/grid/index.blade.php +++ b/vendor/modstart/modstart/views/core/grid/index.blade.php @@ -14,7 +14,7 @@