!function(p){"use strict";function i(){this.v="2.9.0-rc.1"}function h(e,t){t=t||"log",p.console&&console[t]&&console[t]("layui error hint: "+e)}var e,y=p.document,m={modules:{},status:{},timeout:10,event:{}},t=p.LAYUI_GLOBAL||{},g=(e=y.currentScript?y.currentScript.src:function(){for(var e,t=y.scripts,n=t.length-1,i=n;01e3*m.timeout/4?h(c+" is not a valid module","error"):void(m.status[c]?f():setTimeout(e,4))}())}function f(){t.push(layui[c]),11e3*m.timeout/4?h(c+" is not a valid module","error"):void("string"==typeof m.modules[c]&&m.status[c]?f():setTimeout(e,4))}():((a=y.createElement("script")).async=!0,a.charset="utf-8",a.src=o+((r=!0===m.version?m.v||(new Date).getTime():m.version||"")?"?v="+r:""),s.appendChild(a),!a.attachEvent||a.attachEvent.toString&&a.attachEvent.toString().indexOf("[native code")<0||v?a.addEventListener("load",function(e){u(e,o)},!1):a.attachEvent("onreadystatechange",function(e){u(e,o)}),m.modules[c]=o)),l},i.prototype.disuse=function(e){var n=this;return e=n.isArray(e)?e:[e],n.each(e,function(e,t){m.status[t],delete n[t],delete x[t],delete n.modules[t],delete m.status[t],delete m.modules[t]}),n},i.prototype.getStyle=function(e,t){return(e=e.currentStyle||p.getComputedStyle(e,null))[e.getPropertyValue?"getPropertyValue":"getAttribute"](t)},i.prototype.link=function(i,a,e){var o=this,t=y.getElementsByTagName("head")[0],n=y.createElement("link"),l="layuicss-"+((e="string"==typeof a?a:e)||i).replace(/\.|\//g,""),r="creating",s=0;return n.href=i+(m.debug?"?v="+(new Date).getTime():""),n.rel="stylesheet",n.id=l,n.media="all",y.getElementById(l)||t.appendChild(n),"function"==typeof a&&function e(t){var n=y.getElementById(l);return++s>1e3*m.timeout/100?h(i+" timeout"):void(1989===parseInt(o.getStyle(n,"width"))?(t===r&&n.removeAttribute("lay-status"),n.getAttribute("lay-status")===r?setTimeout(e,100):a()):(n.setAttribute("lay-status",r),setTimeout(function(){e(r)},100)))}(),o},i.prototype.addcss=function(e,t,n){return layui.link(m.dir+"css/"+e,t,n)},m.callback={},i.prototype.factory=function(e){if(layui[e])return"function"==typeof m.callback[e]?m.callback[e]:null},i.prototype.img=function(e,t,n){var i=new Image;if(i.src=e,i.complete)return t(i);i.onload=function(){i.onload=null,"function"==typeof t&&t(i)},i.onerror=function(e){i.onerror=null,"function"==typeof n&&n(e)}},i.prototype.config=function(e){for(var t in e=e||{})m[t]=e[t];return this},i.prototype.modules=function(){var e,t={};for(e in x)t[e]=x[e];return t}(),i.prototype.extend=function(e){for(var t in e=e||{})this[t]||this.modules[t]?h(t+" Module already exists","error"):this.modules[t]=e[t];return this},i.prototype.router=i.prototype.hash=function(e){var n={path:[],search:{},hash:((e=e||location.hash).match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)&&(e=e.replace(/^#\//,""),n.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],this.each(e,function(e,t){/^\w+=/.test(t)?(t=t.split("="),n.search[t[0]]=t[1]):n.path.push(t)})),n},i.prototype.url=function(e){var a,t;return{pathname:(e?((e.match(/\.[^.]+?\/.+/)||[])[0]||"").replace(/^[^\/]+/,"").replace(/\?.+/,""):location.pathname).replace(/^\//,"").split("/"),search:(a={},t=(e?((e.match(/\?.+/)||[])[0]||"").replace(/\#.+/,""):location.search).replace(/^\?+/,"").split("&"),this.each(t,function(e,t){var n=t.indexOf("="),i=n<0?t.substr(0,t.length):0!==n&&t.substr(0,n);i&&(a[i]=0(u.innerHeight||p.documentElement.clientHeight)},f.getStyleRules=function(e,n){if(e)return e=(e=e.sheet||e.styleSheet||{}).cssRules||e.rules,"function"==typeof n&&layui.each(e,function(e,t){if(n(t,e))return!0}),e},f.style=function(e){e=e||{};var t=f.elem("style"),n=e.text||"",i=e.target;if(n)return"styleSheet"in t?(t.setAttribute("type","text/css"),t.styleSheet.cssText=n):t.innerHTML=n,t.id="LAY-STYLE-"+(e.id||(n=f.style.index||0,f.style.index++,"DF-"+n)),i&&((e=f(i).find("#"+t.id))[0]&&e.remove(),f(i).append(t)),t},f.position=function(e,t,n){var i,a,o,l,r,s,c,d;t&&(n=n||{},e!==p&&e!==f("body")[0]||(n.clickType="right"),i="right"===n.clickType?{left:(i=n.e||u.event||{}).clientX,top:i.clientY,right:i.clientX,bottom:i.clientY}:e.getBoundingClientRect(),c=t.offsetWidth,d=t.offsetHeight,a=function(e){return p.body[e=e?"scrollLeft":"scrollTop"]|p.documentElement[e]},o=function(e){return p.documentElement[e?"clientWidth":"clientHeight"]},l="margin"in n?n.margin:5,r=i.left,s=i.bottom,"center"===n.align?r-=(c-e.offsetWidth)/2:"right"===n.align&&(r=r-c+e.offsetWidth),(r=r+c+l>o("width")?o("width")-c-l:r)o()&&(i.top>d+l&&i.top<=o()?s=i.top-d-2*l:n.allowBottomOut||(s=o()-d-2*l)<0&&(s=0)),(c=n.position)&&(t.style.position=c),t.style.left=r+("fixed"===c?0:a(1))+"px",t.style.top=s+("fixed"===c?0:a())+"px",f.hasScrollbar()||(d=t.getBoundingClientRect(),!n.SYSTEM_RELOAD&&d.bottom+l>o()&&(n.SYSTEM_RELOAD=!0,setTimeout(function(){f.position(e,t,n)},50))))},f.options=function(t,n){if(n="object"==typeof n?n:{attr:n},t===p)return{};var t=f(t),i=n.attr||"lay-options",t=t.attr(i);try{return new Function("return "+(t||"{}"))()}catch(e){return layui.hint().error(n.errorText||[i+'="'+t+'"',"\n parseerror: "+e].join("\n"),"error"),{}}},f.isTopElem=function(n){var e=[p,f("body")[0]],i=!1;return f.each(e,function(e,t){if(t===n)return i=!0}),i},f.clipboard={writeText:function(t){var n=String(t.text);function e(){var e=p.createElement("textarea");e.value=n,e.style.position="fixed",e.style.opacity="0",e.style.top="0px",e.style.left="0px",p.body.appendChild(e),e.select();try{p.execCommand("copy"),"function"==typeof t.done&&t.done()}catch(e){"function"==typeof t.error&&t.error(e)}finally{e.remove?e.remove():p.body.removeChild(e)}}navigator&&"clipboard"in navigator?navigator.clipboard.writeText(n).then(t.done,function(){e()}):e()}},a.addStr=function(n,e){return n=n.replace(/\s+/," "),e=e.replace(/\s+/," ").split(" "),f.each(e,function(e,t){new RegExp("\\b"+t+"\\b").test(n)||(n=n+" "+t)}),n.replace(/^\s|\s$/,"")},a.removeStr=function(n,e){return n=n.replace(/\s+/," "),e=e.replace(/\s+/," ").split(" "),f.each(e,function(e,t){(t=new RegExp("\\b"+t+"\\b")).test(n)&&(n=n.replace(t,""))}),n.replace(/\s+/," ").replace(/^\s|\s$/,"")},a.fn.find=function(n){var i=[],a="object"==typeof n;return this.each(function(e,t){t=a&&t.contains(n)?n:t.querySelectorAll(n||null),f.each(t,function(e,t){i.push(t)})}),f(i)},a.fn.each=function(e){return f.each.call(this,this,e)},a.fn.addClass=function(n,i){return this.each(function(e,t){t.className=a[i?"removeStr":"addStr"](t.className,n)})},a.fn.removeClass=function(e){return this.addClass(e,!0)},a.fn.hasClass=function(n){var i=!1;return this.each(function(e,t){new RegExp("\\b"+n+"\\b").test(t.className)&&(i=!0)}),i},a.fn.css=function(t,i){function a(e){return isNaN(e)?e:e+"px"}return"string"!=typeof t||void 0!==i?this.each(function(e,n){"object"==typeof t?f.each(t,function(e,t){n.style[e]=a(t)}):n.style[t]=a(i)}):0]|&(?=#[a-zA-Z0-9]+)/g.test(e+="")?e.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):e}},t=(n.prototype.tagExp=function(e,t,n){var i=this.config;return r((t||"")+i.open+["#([\\s\\S])+?","([^{#}])*?"][e||0]+i.close+(n||""))},n.prototype.parse=function(e,t){var n=this,i=n.config,a=e,o=r("^"+i.open+"#"),l=r(i.close+"$");if("string"!=typeof e)return e;e='"use strict";var view = "'+e.replace(/\s+|\r|\t|\n/g," ").replace(r(i.open+"#"),i.open+"# ").replace(r(i.close+"}"),"} "+i.close).replace(/\\/g,"\\\\").replace(r(i.open+"!(.+?)!"+i.close),function(e){return e.replace(r("^"+i.open+"!"),"").replace(r("!"+i.close),"").replace(r(i.open+"|"+i.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(n.tagExp(),function(e){return'";'+(e=e.replace(o,"").replace(l,"")).replace(/\\(.)/g,"$1")+';view+="'}).replace(n.tagExp(1),function(e){var t='"+laytpl.escape(';return e.replace(/\s/g,"")===i.open+i.close?"":(e=e.replace(r(i.open+"|"+i.close),""),/^=/.test(e)?e=e.replace(/^=/,""):/^-/.test(e)&&(e=e.replace(/^-/,""),t='"+('),t+e.replace(/\\(.)/g,"$1")+')+"')})+'";return view;';try{return n.cache=e=new Function("d, laytpl",e),e(t,s)}catch(e){return delete n.cache,t=e,n=a,a="Laytpl Error: ","object"==typeof console&&console.error(a+t+"\n"+(n||"")),a+t}},n.prototype.render=function(e,t){e=e||{};e=this.cache?this.cache(e,s):this.parse(this.template,e);return"function"==typeof t&&t(e),e},function(e,t){return new n(e,t)});t.config=function(e){for(var t in e=e||{})i[t]=e[t]},t.v="2.0.0",e("laytpl",t)}),layui.define(function(e){"use strict";function t(e){this.config=e||{},this.config.index=++u.index,this.render(!0)}var o=document,l="getElementById",d="getElementsByTagName",s="layui-disabled",u=(t.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},t.prototype.view=function(){var e,i,n,a=this.config,o=a.groups="groups"in a?Number(a.groups)||0:5,l=(a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=Number(a.count)||0,a.curr=Number(a.curr)||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=Number(a.limit)||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages?a.curr=a.pages:a.curr<1&&(a.curr=1),o<0?o=1:o>a.pages&&(o=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页",a.pages>o?Math.ceil((a.curr+(1'+a.prev+"":"",page:function(){var e=[];if(a.count<1)return"";1'+(a.first||1)+"");var t=Math.floor((o-1)/2),n=1a.pages?a.pages:t:o;for(i-n…');n<=i;n++)n===a.curr?e.push('"+n+""):e.push(''+n+"");return a.pages>o&&a.pages>i&&!1!==a.last&&(i+1…'),0!==o)&&e.push(''+(a.last||a.pages)+""),e.join("")}(),next:a.next?''+a.next+"":"",count:'共 '+a.count+" 条",limit:(i=['"),refresh:['','',""].join(""),skip:[''+(e="object"==typeof a.skipText?a.skipText:["到第","页","确定"])[0],'',e[1]+'",""].join("")};return['
',(n=[],layui.each(a.layout,function(e,t){r[t]&&n.push(r[t])}),n.join("")),"
"].join("")},t.prototype.jump=function(e,t){if(e){var n=this,i=n.config,a=e.children,o=e[d]("button")[0],l=e[d]("input")[0],e=e[d]("select")[0],r=function(){var e=Number(l.value.replace(/\s|\D/g,""));e&&(i.curr=e,n.render())};if(t)return r();for(var s=0,c=a.length;si.pages||(i.curr=e,n.render())});e&&u.on(e,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,n.render()}),o&&u.on(o,"click",function(){r()})}},t.prototype.skip=function(n){var i,e;n&&(i=this,e=n[d]("input")[0])&&u.on(e,"keyup",function(e){var t=this.value,e=e.keyCode;/^(37|38|39|40)$/.test(e)||(/\D/.test(t)&&(this.value=t.replace(/\D/,"")),13===e&&i.jump(n,!0))})},t.prototype.render=function(e){var t=this,n=t.config,i=t.type(),a=t.view(),i=(2===i?n.elem&&(n.elem.innerHTML=a):3===i?n.elem.html(a):o[l](n.elem)&&(o[l](n.elem).innerHTML=a),n.jump&&n.jump(n,e),o[l]("layui-laypage-"+n.index));t.jump(i),n.hash&&!e&&(location.hash="!"+n.hash+"="+n.curr),t.skip(i)},{render:function(e){return new t(e).index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(t,e,n){return t.attachEvent?t.attachEvent("on"+e,function(e){e.target=e.srcElement,n.call(t,e)}):t.addEventListener(e,n,!1),this}});e("laypage",u)}),function(a,v){"use strict";function x(e){var t,n=this,i=(n.index=++b.index,n.config=lay.extend({},n.config,b.config,e),lay(e.elem||n.config.elem));return 1请重新选择",invalidDate:"不在有效日期或时间范围内",formatError:["日期格式不合法
必须遵循下述格式:
","
已为你重置"],preview:"当前选中的结果"},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"},timeout:"End time cannot be less than start Time
Please re-select",invalidDate:"Invalid date",formatError:["The date format error
Must be followed:
","
It has been reset"],preview:"The selected result"}};return e[this.config.lang]||e.cn},x.prototype.reload=function(e){this.config=lay.extend({},this.config,e),this.init()},x.prototype.init=function(){var l=this,r=l.config,e="static"===r.position,t={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};r.elem=lay(r.elem),r.eventElem=lay(r.eventElem),r.elem[0]&&("array"!==layui.type(r.theme)&&(r.theme=[r.theme]),r.fullPanel&&("datetime"!==r.type||r.range)&&delete r.fullPanel,l.rangeStr=r.range?"string"==typeof r.range?r.range:"-":"",l.rangeLinked=!(!r.range||!r.rangeLinked||"date"!==r.type&&"datetime"!==r.type),l.autoCalendarModel=function(){var e=l.rangeLinked;return l.rangeLinked=r.range&&("date"===r.type||"datetime"===r.type)&&(!l.startDate||!l.endDate||l.startDate&&l.endDate&&l.startDate.year===l.endDate.year&&l.startDate.month===l.endDate.month),lay(l.elem)[l.rangeLinked?"addClass":"removeClass"]("layui-laydate-linkage"),l.rangeLinked!=e},l.autoCalendarModel.auto=l.rangeLinked&&"auto"===r.rangeLinked,"array"===layui.type(r.range)&&(l.rangeElem=[lay(r.range[0]),lay(r.range[1])]),t[r.type]||(a.console&&console.error&&console.error("laydate type error:'"+r.type+"' is not supported"),r.type="date"),r.format===t.date&&(r.format=t[r.type]||t.date),l.format=c.formatArr(r.format),r.weekStart&&!/^[0-6]$/.test(r.weekStart)&&(t=l.lang(),r.weekStart=t.weeks.indexOf(r.weekStart),-1===r.weekStart)&&(r.weekStart=0),l.EXP_IF="",l.EXP_SPLIT="",lay.each(l.format,function(e,t){e=new RegExp(f).test(t)?"\\d{"+(new RegExp(f).test(l.format[0===e?e+1:e-1]||"")?/^yyyy|y$/.test(t)?4:t.length:/^yyyy$/.test(t)?"1,4":/^y$/.test(t)?"1,308":"1,2")+"}":"\\"+t,l.EXP_IF=l.EXP_IF+e,l.EXP_SPLIT=l.EXP_SPLIT+"("+e+")"}),l.EXP_IF_ONE=new RegExp("^"+l.EXP_IF+"$"),l.EXP_IF=new RegExp("^"+(r.range?l.EXP_IF+"\\s\\"+l.rangeStr+"\\s"+l.EXP_IF:l.EXP_IF)+"$"),l.EXP_SPLIT=new RegExp("^"+l.EXP_SPLIT+"$",""),l.isInput(r.elem[0])||"focus"===r.trigger&&(r.trigger="click"),r.elem.attr("lay-key",l.index),r.eventElem.attr("lay-key",l.index),r.elem.attr(s,r.id),r.mark=lay.extend({},r.calendar&&"cn"===r.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-10-1":"国庆","0-12-25":"圣诞"}:{},r.mark),lay.each(["min","max"],function(e,t){var n=[],i=[];if("number"==typeof r[t])var a=r[t],o=new Date,o=l.newDate({year:o.getFullYear(),month:o.getMonth(),date:o.getDate(),hours:e?23:0,minutes:e?59:0,seconds:e?59:0}).getTime(),n=[(e=new Date(a?a<864e5?o+864e5*a:a:o)).getFullYear(),e.getMonth()+1,e.getDate()],i=[e.getHours(),e.getMinutes(),e.getSeconds()];else if("string"==typeof r[t])n=(r[t].match(/\d+-\d+-\d+/)||[""])[0].split("-"),i=(r[t].match(/\d+:\d+:\d+/)||[""])[0].split(":");else if("object"==typeof r[t])return r[t];r[t]={year:0|n[0]||(new Date).getFullYear(),month:n[1]?(0|n[1])-1:(new Date).getMonth(),date:0|n[2]||(new Date).getDate(),hours:0|i[0],minutes:0|i[1],seconds:0|i[2]}}),l.elemID="layui-laydate"+r.elem.attr("lay-key"),(r.show||e)&&l.render(),e||l.events(),r.value)&&r.isInitValue&&("date"===layui.type(r.value)?l.setValue(l.parse(0,l.systemDate(r.value))):l.setValue(r.value))},x.prototype.render=function(){var n,i,a,o,l=this,r=l.config,s=l.lang(),c="static"===r.position,d=l.elem=lay.elem("div",{id:l.elemID,class:["layui-laydate",r.range?" layui-laydate-range":"",l.rangeLinked?" layui-laydate-linkage":"",c?" "+C:"",r.fullPanel?" laydate-theme-fullpanel":"",(n="",lay.each(r.theme,function(e,t){"default"===t||/^#/.test(t)||(n+=" laydate-theme-"+t)}),n)].join("")}),u=l.elemMain=[],f=l.elemHeader=[],p=l.elemCont=[],h=l.table=[],e=l.footer=lay.elem("div",{class:"layui-laydate-footer"}),t=l.shortcut=lay.elem("ul",{class:"layui-laydate-shortcut"}),y=(r.zIndex&&(d.style.zIndex=r.zIndex),lay.each(new Array(2),function(e){if(!r.range&&0'+s.timeTips+""),(r.range||"datetime"!==r.type||r.fullPanel)&&y.push(''),lay.each(r.btns,function(e,t){var n=s.tools[t]||"btn";r.range&&"now"===t||(c&&"clear"===t&&(n="cn"===r.lang?"重置":"Reset"),i.push(''+n+""))}),y.push('"),y.join(""))),r.shortcuts&&(d.appendChild(t),lay(t).html((a=[],lay.each(r.shortcuts,function(e,t){a.push('
  • '+t.text+"
  • ")}),a.join(""))).find("li").on("click",function(e){var t=("function"==typeof(t=r.shortcuts[this.dataset.index]||{}).value?t.value():t.value)||[],i=(layui.isArray(t)||(t=[t]),r.type);(t=(lay.each(t,function(e,t){var n=[r.dateTime,l.endDate][e];"time"===i&&"date"!==layui.type(t)?l.EXP_IF.test(t)&&(t=(t.match(l.EXP_SPLIT)||[]).slice(1),lay.extend(n,{hours:0|t[0],minutes:0|t[2],seconds:0|t[4]})):lay.extend(n,l.systemDate("date"===layui.type(t)?t:new Date(t))),"time"!==i&&"datetime"!==i||(l[["startTime","endTime"][e]]={hours:n.hours,minutes:n.minutes,seconds:n.seconds}),0===e?l.startDate=lay.extend({},n):l.endState=!0,"year"===i||"month"===i||"time"===i?l.listYM[e]=[n.year,n.month+1]:e&&l.autoCalendarModel.auto&&l.autoCalendarModel()}),l.checkDate("limit").calendar(null,null,"init"),lay(l.footer).find("."+N).removeClass(k)))&&"date"===t.attr("lay-type")&&t[0].click(),l.done(null,"change"),lay(this).addClass(w),"static"!==r.position&&l.setValue(l.parse()).done().remove()})),lay.each(u,function(e,t){d.appendChild(t)}),r.showBottom&&d.appendChild(e),lay.elem("style")),m=[],g=!0,t=(lay.each(r.theme,function(e,t){g&&/^#/.test(t)?(g=!(o=!0),m.push(["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}",-1!==r.theme.indexOf("circle")?"":"#{{id}} .layui-this{background-color:{{theme}} !important;}","#{{id}} .laydate-day-now{color:{{theme}} !important;}","#{{id}} .laydate-day-now:after{border-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,l.elemID).replace(/{{theme}}/g,t))):!g&&/^#/.test(t)&&m.push(["#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}","#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,l.elemID).replace(/{{theme}}/g,t))}),r.shortcuts&&r.range&&m.push("#{{id}}.layui-laydate-range{width: 628px;}".replace(/{{id}}/g,l.elemID)),m.length&&(m=m.join(""),"styleSheet"in y?(y.setAttribute("type","text/css"),y.styleSheet.cssText=m):y.innerHTML=m,o&&lay(d).addClass("laydate-theme-molv"),d.appendChild(y)),l.remove(x.thisElemDate),b.thisId=r.id,c?r.elem.append(d):(v.body.appendChild(d),l.position()),r.shade?'
    ':"");d.insertAdjacentHTML("beforebegin",t),l.checkDate().calendar(null,0,"init"),l.changeEvent(),x.thisElemDate=l.elemID,l.renderAdditional(),"function"==typeof r.ready&&r.ready(lay.extend({},r.dateTime,{month:r.dateTime.month+1})),l.preview()},x.prototype.remove=function(e){var t=this,n=t.config,i=lay("#"+(e||t.elemID));return i[0]&&(i.hasClass(C)||t.checkDate(function(){i.remove(),delete t.startDate,delete t.endDate,delete t.endState,delete t.startTime,delete t.endTime,delete b.thisId,"function"==typeof n.close&&n.close(t)}),lay("."+A).remove()),t},x.prototype.position=function(){var e=this.config;return lay.position(e.elem[0],this.elem,{position:e.position}),this},x.prototype.hint=function(e){var t=this,n=(t.config,lay.elem("div",{class:l}));t.elem&&(n.innerHTML=(e="object"==typeof e?e||{}:{content:e}).content||"",lay(t.elem).find("."+l).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){lay(t.elem).find("."+l).remove()},"ms"in e?e.ms:3e3))},x.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),11h[1]&&(e.year=h[1],r=!0),11i)&&(e.date=i,r=!0)}function n(i,a,o){var l=["startTime","endTime"];a=(a.match(s.EXP_SPLIT)||[]).slice(1),o=o||0,c.range&&(s[l[o]]=s[l[o]]||{}),lay.each(s.format,function(e,t){var n=parseFloat(a[e]);a[e].lengths.getDateTime(c.max)?(u=c.dateTime=lay.extend({},c.max),l=!0):s.getDateTime(u)s.getDateTime(c.max))&&(s.endDate=lay.extend({},c.max),l=!0),s.startTime={hours:c.dateTime.hours,minutes:c.dateTime.minutes,seconds:c.dateTime.seconds},s.endTime={hours:s.endDate.hours,minutes:s.endDate.minutes,seconds:s.endDate.seconds},"month"===c.type)&&(c.dateTime.date=1,s.endDate.date=1),l&&p&&(s.setValue(s.parse()),s.hint("value "+d.invalidDate+d.formatError[1])),s.startDate=s.startDate||p&&lay.extend({},c.dateTime),s.autoCalendarModel.auto&&s.autoCalendarModel(),s.endState=!c.range||!s.rangeLinked||!(!s.startDate||!s.endDate),e&&e()),s},x.prototype.mark=function(e,n){var i,t=this.config;return lay.each(t.mark,function(e,t){(e=e.split("-"))[0]!=n[0]&&0!=e[0]||e[1]!=n[1]&&0!=e[1]||e[2]!=n[2]||(i=t||n[2])}),i&&e.find("div").html(''+i+""),this},x.prototype.holidays=function(i,a){var e=this.config,o=["","work"];return"array"===layui.type(e.holidays)&&lay.each(e.holidays,function(n,e){lay.each(e,function(e,t){t===i.attr("lay-ymd")&&i.find("div").html('"+a[2]+"")})}),this},x.prototype.limit=function(t){t=t||{};var a=this,e=a.config,o={},n=t.index>(t.time?0:41)?a.endDate:e.dateTime;return lay.each({now:lay.extend({},n,t.date||{}),min:e.min,max:e.max},function(e,n){var i;o[e]=a.newDate(lay.extend({year:n.year,month:"year"===t.type?0:n.month,date:"year"===t.type||"month"===t.type?1:n.date},(i={},lay.each(t.time,function(e,t){i[t]=n[t]}),i))).getTime()}),n=o.nowh[1]&&(s.year=h[1],r.hint(d.invalidDate)),r.firstDate||(r.firstDate=lay.extend({},s)),c.setFullYear(s.year,s.month,1),a=(c.getDay()+(7-i.weekStart))%7,o=b.getEndDate(s.month||12,s.year),l=b.getEndDate(s.month+1,s.year),lay.each(f,function(e,t){var n,i=[s.year,s.month];(t=lay(t)).removeAttr("class"),e"+i[2]+""),r.mark(t,i).holidays(t,i).limit({elem:t,date:{year:i[0],month:i[1]-1,date:i[2]},index:e})}),lay(p[0]).attr("lay-ym",s.year+"-"+(s.month+1)),lay(p[1]).attr("lay-ym",s.year+"-"+(s.month+1)),"cn"===i.lang?(lay(p[0]).attr("lay-type","year").html(s.year+" 年"),lay(p[1]).attr("lay-type","month").html(s.month+1+" 月")):(lay(p[0]).attr("lay-type","month").html(d.month[s.month]),lay(p[1]).attr("lay-type","year").html(s.year)),u&&(i.range?!e&&"init"===n||(r.listYM=[[(r.startDate||i.dateTime).year,(r.startDate||i.dateTime).month+1],[r.endDate.year,r.endDate.month+1]],r.list(i.type,0).list(i.type,1),"time"===i.type?r.setBtnStatus("时间",lay.extend({},r.systemDate(),r.startTime),lay.extend({},r.systemDate(),r.endTime)):r.setBtnStatus(!0)):(r.listYM=[[s.year,s.month+1]],r.list(i.type,0))),i.range&&"init"===n&&(r.rangeLinked?(c=r.getAsYM(s.year,s.month,t?"sub":null),r.calendar(lay.extend({},s,{year:c[0],month:c[1]}),1-t)):r.calendar(null,1-t)),i.range||(f=["hours","minutes","seconds"],r.limit({elem:lay(r.footer).find(".laydate-btns-now"),date:r.systemDate(/^(datetime|time)$/.test(i.type)?new Date:null),index:0,time:f}),r.limit({elem:lay(r.footer).find(E),index:0,time:f})),r.setBtnStatus(),lay(r.shortcut).find("li."+w).removeClass(w),i.range&&!u&&"init"!==n&&r.stampRange(),r},x.prototype.list=function(i,a){var o,l,e,r,s=this,c=s.config,d=s.rangeLinked?c.dateTime:[c.dateTime,s.endDate][a],u=s.lang(),t=c.range&&"date"!==c.type&&"datetime"!==c.type,f=lay.elem("ul",{class:T+" "+{year:"laydate-year-list",month:"laydate-month-list",time:"laydate-time-list"}[i]}),n=s.elemHeader[a],p=lay(n[2]).find("span"),h=s.elemCont[a||0],y=lay(h).find("."+T)[0],m="cn"===c.lang,g=m?"年":"",v=s.listYM[a]||{},x=["hours","minutes","seconds"],b=["startTime","endTime"][a];return v[0]<1&&(v[0]=1),"year"===i?(e=o=v[0]-7,o<1&&(e=o=1),lay.each(new Array(15),function(e){var t=lay.elem("li",{"lay-ym":o}),n={year:o,month:0,date:1};o==v[0]&&lay(t).addClass(w),t.innerHTML=o+g,f.appendChild(t),s.limit({elem:lay(t),date:n,index:a,type:i}),o++}),lay(p[m?0:1]).attr("lay-ym",o-8+"-"+v[1]).html(e+g+" - "+(o-1)+g)):"month"===i?(lay.each(new Array(12),function(e){var t=lay.elem("li",{"lay-ym":e}),n={year:v[0],month:e,date:1};e+1==v[1]&&lay(t).addClass(w),t.innerHTML=u.month[e]+(m?"月":""),f.appendChild(t),s.limit({elem:lay(t),date:n,index:a,type:i})}),lay(p[m?0:1]).attr("lay-ym",v[0]+"-"+v[1]).html(v[0]+g)):"time"===i&&(l=function(){lay(f).find("ol").each(function(n,e){lay(e).find("li").each(function(e,t){s.limit({elem:lay(t),date:[{hours:e},{hours:s[b].hours,minutes:e},{hours:s[b].hours,minutes:s[b].minutes,seconds:e}][n],index:a,time:[["hours"],["hours","minutes"],["hours","minutes","seconds"]][n]})})}),c.range||s.limit({elem:lay(s.footer).find(E),date:s[b],index:0,time:["hours","minutes","seconds"]})},c.range?s[b]||(s[b]="startTime"===b?d:s.endDate):s[b]=d,lay.each([24,60,60],function(t,e){var n=lay.elem("li"),i=["

    "+u.time[t]+"

      "];lay.each(new Array(e),function(e){i.push(""+lay.digit(e,2)+"")}),n.innerHTML=i.join("")+"
    ",f.appendChild(n)}),l()),y&&h.removeChild(y),h.appendChild(f),"year"===i||"month"===i?(lay(s.elemMain[a]).addClass("laydate-ym-show"),lay(f).find("li").on("click",function(){var e=0|lay(this).attr("lay-ym");lay(this).hasClass(k)||(s.rangeLinked?lay.extend(d,{year:"year"===i?e:v[0],month:"year"===i?v[1]-1:e}):d[i]=e,"year"===c.type||"month"===c.type?(lay(f).find("."+w).removeClass(w),lay(this).addClass(w),"month"===c.type&&"year"===i&&(s.listYM[a][0]=e,t&&((a?s.endDate:d).year=e),s.list("month",a))):(s.checkDate("limit").calendar(d,a,"init"),s.closeList()),s.setBtnStatus(),!c.range&&c.autoConfirm&&("month"===c.type&&"month"===i||"year"===c.type&&"year"===i)&&s.setValue(s.parse()).done().remove(),s.autoCalendarModel.auto&&!s.rangeLinked?s.choose(lay(h).find("td.layui-this"),a):s.endState&&s.done(null,"change"),lay(s.footer).find("."+N).removeClass(k))})):(e=lay.elem("span",{class:D}),r=function(){lay(f).find("ol").each(function(e){var n=this,t=lay(n).find("li");n.scrollTop=30*(s[b][x[e]]-2),n.scrollTop<=0&&t.each(function(e,t){if(!lay(this).hasClass(k))return n.scrollTop=30*(e-2),!0})})},p=lay(n[2]).find("."+D),r(),e.innerHTML=c.range?[u.startTime,u.endTime][a]:u.timeTips,lay(s.elemMain[a]).addClass("laydate-time-show"),p[0]&&p.remove(),n[2].appendChild(e),lay(f).find("ol").each(function(t){var n=this;lay(n).find("li").on("click",function(){var e=0|this.innerHTML;lay(this).hasClass(k)||(c.range?s[b][x[t]]=e:d[x[t]]=e,lay(n).find("."+w).removeClass(w),lay(this).addClass(w),l(),r(),(s.endDate||"time"===c.type||"datetime"===c.type&&c.fullPanel)&&s.done(null,"change"),s.setBtnStatus())})})),s},x.prototype.listYM=[],x.prototype.closeList=function(){var n=this;n.config,lay.each(n.elemCont,function(e,t){lay(this).find("."+T).remove(),lay(n.elemMain[e]).removeClass("laydate-ym-show laydate-time-show")}),lay(n.elem).find("."+D).remove()},x.prototype.setBtnStatus=function(e,t,n){var i=this,a=i.config,o=i.lang(),l=lay(i.footer).find(E);a.range&&"time"!==a.type&&(t=t||(i.rangeLinked?i.startDate:a.dateTime),n=n||i.endDate,a=!i.endState||i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit({date:t})||i.limit({date:n})?l.addClass(k):l[a?"addClass":"removeClass"](k),e)&&a&&i.hint("string"==typeof e?o.timeout.replace(/\u65e5\u671f/g,e):o.timeout)},x.prototype.parse=function(e,t){var n=this,i=n.config,a=n.rangeLinked?n.startDate:i.dateTime,t=t||("end"==e?lay.extend({},n.endDate,n.endTime):i.range?lay.extend({},a||i.dateTime,n.startTime):i.dateTime),a=b.parse(t,n.format,1);return i.range&&void 0===e?a+" "+n.rangeStr+" "+n.parse("end"):a},x.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},x.prototype.getDateTime=function(e){return this.newDate(e).getTime()},x.prototype.setValue=function(e){var t=this,n=t.config,i=n.elem[0];return"static"!==n.position&&(e=e||"",t.isInput(i)?lay(i).val(e):(n=t.rangeElem)?("array"!==layui.type(e)&&(e=e.split(" "+t.rangeStr+" ")),n[0].val(e[0]||""),n[1].val(e[1]||"")):(0===lay(i).find("*").length&&lay(i).html(e),lay(i).attr("lay-date",e))),t},x.prototype.preview=function(){var e,t=this,n=t.config;n.isPreview&&(e=lay(t.elem).find("."+S),n=!n.range||(t.rangeLinked?t.endState:t.endDate)?t.parse():"",e.html(n),e.html())&&(e.css({color:"var(--color-primary,#16baaa)"}),setTimeout(function(){e.css({color:"#777"})},300))},x.prototype.renderAdditional=function(){this.config.fullPanel&&this.list("time",0)},x.prototype.stampRange=function(){var i,a=this,o=a.config,l=a.rangeLinked?a.startDate:o.dateTime,e=lay(a.elem).find("td");o.range&&!a.endState&&lay(a.footer).find(E).addClass(k),l=l&&a.newDate({year:l.year,month:l.month,date:l.date}).getTime(),i=a.endState&&a.endDate&&a.newDate({year:a.endDate.year,month:a.endDate.month,date:a.endDate.date}).getTime(),lay.each(e,function(e,t){var n=lay(t).attr("lay-ymd").split("-"),n=a.newDate({year:n[0],month:n[1]-1,date:n[2]}).getTime();o.rangeLinked&&!a.startDate&&n===a.newDate(a.systemDate()).getTime()&&lay(t).addClass(lay(t).hasClass(d)||lay(t).hasClass(u)?"":"laydate-day-now"),lay(t).removeClass(r+" "+w),n!==l&&n!==i||(a.rangeLinked||!a.rangeLinked&&(e<42?n===l:n===i))&&lay(t).addClass(lay(t).hasClass(d)||lay(t).hasClass(u)?r:w),li.getDateTime(a.max)&&(i[t]={hours:a.max.hours,minutes:a.max.minutes,seconds:a.max.seconds},lay.extend(o,i[t])))}),n||(i.startDate=lay.extend({},o)),i.endState&&!i.limit({date:i.thisDateTime(1-n)})&&(((l=i.endState&&i.autoCalendarModel.auto?i.autoCalendarModel():l)||i.rangeLinked&&i.endState)&&i.newDate(i.startDate)>i.newDate(i.endDate)&&(e=i.startDate.year===i.endDate.year&&i.startDate.month===i.endDate.month&&i.startDate.date===i.endDate.date,r=i.startDate,i.startDate=lay.extend({},i.endDate,e?{}:i.startTime),a.dateTime=lay.extend({},i.startDate),i.endDate=lay.extend({},r,e?{}:i.endTime),e)&&(r=i.startTime,i.startTime=i.endTime,i.endTime=r),l)&&(a.dateTime=lay.extend({},i.startDate)),i.rangeLinked?(e=lay.extend({},o),!t||n||l||(r=i.getAsYM(o.year,o.month,"sub"),lay.extend(a.dateTime,{year:r[0],month:r[1]})),i.calendar(e,t,l?"init":null)):i.calendar(null,n,l?"init":null),i.endState&&i.done(null,"change")):"static"===a.position?i.calendar().done().done(null,"change"):"date"===a.type?a.autoConfirm?i.setValue(i.parse()).done().remove():i.calendar().done(null,"change"):"datetime"===a.type&&i.calendar().done(null,"change"))},x.prototype.tool=function(t,e){var n=this,i=n.config,a=n.lang(),o=i.dateTime,l="static"===i.position,r={datetime:function(){lay(t).hasClass(k)||(n.list("time",0),i.range&&n.list("time",1),lay(t).attr("lay-type","date").html(n.lang().dateTips))},date:function(){n.closeList(),lay(t).attr("lay-type","datetime").html(n.lang().timeTips)},clear:function(){l&&(lay.extend(o,n.firstDate),n.calendar()),i.range&&(delete i.dateTime,delete n.endDate,delete n.startTime,delete n.endTime),n.setValue(""),n.done(null,"onClear").done(["",{},{}]).remove()},now:function(){var e=new Date;if(lay(t).hasClass(k))return n.hint(a.tools.now+", "+a.invalidDate);lay.extend(o,n.systemDate(),{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}),n.setValue(n.parse()),l&&n.calendar(),n.done(null,"onNow").done().remove()},confirm:function(){if(i.range){if(lay(t).hasClass(k))return n.hint("time"===i.type?a.timeout.replace(/\u65e5\u671f/g,"时间"):a.timeout)}else if(lay(t).hasClass(k))return n.hint(a.invalidDate);n.setValue(n.parse()),n.done(null,"onConfirm").done().remove()}};r[e]&&r[e]()},x.prototype.change=function(i){function e(e){var t=lay(s).find(".laydate-year-list")[0],n=lay(s).find(".laydate-month-list")[0];return t&&(c[0]=e?c[0]-15:c[0]+15,a.list("year",i)),n&&(e?c[0]--:c[0]++,a.list("month",i)),(t||n)&&(lay.extend(l,{year:c[0]}),r&&(l.year=c[0]),o.range||a.done(null,"change"),o.range||a.limit({elem:lay(a.footer).find(E),date:{year:c[0]}})),a.setBtnStatus(),t||n}var a=this,o=a.config,l=a.thisDateTime(i),r=o.range&&("year"===o.type||"month"===o.type),s=a.elemCont[i||0],c=a.listYM[i];return{prevYear:function(){e("sub")||(a.rangeLinked?(o.dateTime.year--,a.checkDate("limit").calendar(null,null,"init")):(l.year--,a.checkDate("limit").calendar(null,i),a.autoCalendarModel.auto?a.choose(lay(s).find("td.layui-this"),i):a.done(null,"change")))},prevMonth:function(){a.rangeLinked&&(l=o.dateTime);var e=a.getAsYM(l.year,l.month,"sub");lay.extend(l,{year:e[0],month:e[1]}),a.checkDate("limit").calendar(null,null,"init"),a.rangeLinked||(a.autoCalendarModel.auto?a.choose(lay(s).find("td.layui-this"),i):a.done(null,"change"))},nextMonth:function(){a.rangeLinked&&(l=o.dateTime);var e=a.getAsYM(l.year,l.month);lay.extend(l,{year:e[0],month:e[1]}),a.checkDate("limit").calendar(null,null,"init"),a.rangeLinked||(a.autoCalendarModel.auto?a.choose(lay(s).find("td.layui-this"),i):a.done(null,"change"))},nextYear:function(){e()||(a.rangeLinked?(o.dateTime.year++,a.checkDate("limit").calendar(null,0,"init")):(l.year++,a.checkDate("limit").calendar(null,i),a.autoCalendarModel.auto?a.choose(lay(s).find("td.layui-this"),i):a.done(null,"change")))}}},x.prototype.changeEvent=function(){var a=this;a.config,lay(a.elem).on("click",function(e){lay.stope(e)}).on("mousedown",function(e){lay.stope(e)}),lay.each(a.elemHeader,function(i,e){lay(e[0]).on("click",function(e){a.change(i).prevYear()}),lay(e[1]).on("click",function(e){a.change(i).prevMonth()}),lay(e[2]).find("span").on("click",function(e){var t=(n=lay(this)).attr("lay-ym"),n=n.attr("lay-type");t&&(t=t.split("-"),a.listYM[i]=[0|t[0],0|t[1]],a.list(n,i),lay(a.footer).find("."+N).addClass(k))}),lay(e[3]).on("click",function(e){a.change(i).nextMonth()}),lay(e[4]).on("click",function(e){a.change(i).nextYear()})}),lay.each(a.table,function(e,t){lay(t).find("td").on("click",function(){a.choose(lay(this),e)})}),lay(a.footer).find("span").on("click",function(){var e=lay(this).attr("lay-type");a.tool(this,e)})},x.prototype.isInput=function(e){return/input|textarea/.test(e.tagName.toLocaleLowerCase())||/INPUT|TEXTAREA/.test(e.tagName)},x.prototype.events=function(){var e,t=this,n=t.config;n.elem[0]&&!n.elem[0].eventHandler&&(n.elem.on(n.trigger,e=function(){b.thisId!==n.id&&t.render()}),n.elem[0].eventHandler=!0,n.eventElem.on(n.trigger,e),t.unbind=function(){t.remove(),n.elem.off(n.trigger,e),n.elem.removeAttr("lay-key"),n.elem.removeAttr(s),n.elem[0].eventHandler=!1,n.eventElem.off(n.trigger,e),n.eventElem.removeAttr("lay-key"),delete c.that[n.id]})},c.that={},c.getThis=function(e){var t=c.that[e];return!t&&i&&layui.hint().error(e?n+" instance with ID '"+e+"' not found":"ID argument required"),t},o.run=function(i){i(v).on("mousedown",function(e){var t,n;b.thisId&&(t=c.getThis(b.thisId))&&(n=t.config,e.target===n.elem[0]||e.target===n.eventElem[0]||e.target===i(n.closeStop)[0]||n.elem[0]&&n.elem[0].contains(e.target)||t.remove())}).on("keydown",function(e){var t;b.thisId&&(t=c.getThis(b.thisId))&&"static"!==t.config.position&&13===e.keyCode&&i("#"+t.elemID)[0]&&t.elemID===x.thisElemDate&&(e.preventDefault(),i(t.footer).find(E)[0].click())}),i(a).on("resize",function(){if(b.thisId){var e=c.getThis(b.thisId);if(e)return!(!e.elem||!i(".layui-laydate")[0])&&void e.position()}})},b.render=function(e){return e=new x(e),c.call(e)},b.reload=function(e,t){if(e=c.getThis(e))return e.reload(t)},b.getInst=function(e){if(e=c.getThis(e))return e.inst},b.hint=function(e,t){if(e=c.getThis(e))return e.hint(t)},b.unbind=function(e){if(e=c.getThis(e))return e.unbind()},b.close=function(e){if(e=c.getThis(e||b.thisId))return e.remove()},b.parse=function(n,i,a){return n=n||{},i=((i="string"==typeof i?c.formatArr(i):i)||[]).concat(),lay.each(i,function(e,t){/yyyy|y/.test(t)?i[e]=lay.digit(n.year,t.length):/MM|M/.test(t)?i[e]=lay.digit(n.month+(a||0),t.length):/dd|d/.test(t)?i[e]=lay.digit(n.date,t.length):/HH|H/.test(t)?i[e]=lay.digit(n.hours,t.length):/mm|m/.test(t)?i[e]=lay.digit(n.minutes,t.length):/ss|s/.test(t)&&(i[e]=lay.digit(n.seconds,t.length))}),i.join("")},b.getEndDate=function(e,t){var n=new Date;return n.setFullYear(t||n.getFullYear(),e||n.getMonth()+1,1),new Date(n.getTime()-864e5).getDate()},i?(b.ready(),layui.define("lay",function(e){b.path=layui.cache.dir,o.run(lay),e(n,b)})):"function"==typeof define&&define.amd?define(function(){return o.run(lay),b}):(b.ready(),o.run(a.lay),a.laydate=b)}(window,window.document),function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e):function(e){if(e.document)return t(e);throw new Error("jQuery requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(w,e){function t(e,t){return t.toUpperCase()}var u=[],h=w.document,d=u.slice,y=u.concat,r=u.push,a=u.indexOf,n={},i=n.toString,m=n.hasOwnProperty,g={},o="1.12.4",k=function(e,t){return new k.fn.init(e,t)},l=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,s=/^-ms-/,c=/-([\da-z])/gi;function f(e){var t=!!e&&"length"in e&&e.length,n=k.type(e);return"function"!==n&&!k.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&0>10|55296,1023&i|56320)}function t(){k()}var e,h,b,o,i,y,f,m,w,s,c,k,C,a,T,g,l,r,v,E="sizzle"+ +new Date,x=n.document,D=0,d=0,p=ae(),N=ae(),S=ae(),A=function(e,t){return e===t&&(c=!0),0},L={}.hasOwnProperty,I=[],j=I.pop,M=I.push,_=I.push,H=I.slice,F=function(e,t){for(var n=0,i=e.length;n+~]|"+P+")"+P+"*"),V=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),X=new RegExp(B),U=new RegExp("^"+R+"$"),G={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=/'|\\/g,ne=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig");try{_.apply(I=H.call(x.childNodes),x.childNodes),I[x.childNodes.length].nodeType}catch(e){_={apply:I.length?function(e,t){M.apply(e,H.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function ie(e,t,n,i){var a,o,l,r,s,c,d,u,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!i&&((t?t.ownerDocument||t:x)!==C&&k(t),t=t||C,T)){if(11!==p&&(c=Z.exec(e)))if(a=c[1]){if(9===p){if(!(l=t.getElementById(a)))return n;if(l.id===a)return n.push(l),n}else if(f&&(l=f.getElementById(a))&&v(t,l)&&l.id===a)return n.push(l),n}else{if(c[2])return _.apply(n,t.getElementsByTagName(e)),n;if((a=c[3])&&h.getElementsByClassName&&t.getElementsByClassName)return _.apply(n,t.getElementsByClassName(a)),n}if(h.qsa&&!S[e+" "]&&(!g||!g.test(e))){if(1!==p)f=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((r=t.getAttribute("id"))?r=r.replace(te,"\\$&"):t.setAttribute("id",r=E),o=(d=y(e)).length,s=U.test(r)?"#"+r:"[id='"+r+"']";o--;)d[o]=s+" "+fe(d[o]);u=d.join(","),f=ee.test(e)&&de(t.parentNode)||t}if(u)try{return _.apply(n,f.querySelectorAll(u)),n}catch(e){}finally{r===E&&t.removeAttribute("id")}}}return m(e.replace(z,"$1"),t,n,i)}function ae(){var n=[];function i(e,t){return n.push(e+" ")>b.cacheLength&&delete i[n.shift()],i[e+" "]=t}return i}function oe(e){return e[E]=!0,e}function le(e){var t=C.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function re(e,t){for(var n=e.split("|"),i=n.length;i--;)b.attrHandle[n[i]]=t}function se(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ce(l){return oe(function(o){return o=+o,oe(function(e,t){for(var n,i=l([],e.length,o),a=i.length;a--;)e[n=i[a]]&&(e[n]=!(t[n]=e[n]))})})}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in h=ie.support={},i=ie.isXML=function(e){return!!(e=e&&(e.ownerDocument||e).documentElement)&&"HTML"!==e.nodeName},k=ie.setDocument=function(e){return(e=e?e.ownerDocument||e:x)!==C&&9===e.nodeType&&e.documentElement&&(a=(C=e).documentElement,T=!i(C),(e=C.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",t,!1):e.attachEvent&&e.attachEvent("onunload",t)),h.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),h.getElementsByTagName=le(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),h.getElementsByClassName=Q.test(C.getElementsByClassName),h.getById=le(function(e){return a.appendChild(e).id=E,!C.getElementsByName||!C.getElementsByName(E).length}),h.getById?(b.find.ID=function(e,t){if(void 0!==t.getElementById&&T)return(e=t.getElementById(e))?[e]:[]},b.filter.ID=function(e){var t=e.replace(ne,u);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(ne,u);return function(e){return(e=void 0!==e.getAttributeNode&&e.getAttributeNode("id"))&&e.value===t}}),b.find.TAG=h.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):h.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],a=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[a++];)1===n.nodeType&&i.push(n);return i},b.find.CLASS=h.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&T)return t.getElementsByClassName(e)},l=[],g=[],(h.qsa=Q.test(C.querySelectorAll))&&(le(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+E+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||g.push(".#.+[+~]")}),le(function(e){var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+P+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(h.matchesSelector=Q.test(r=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&le(function(e){h.disconnectedMatch=r.call(e,"div"),r.call(e,"[s!='']:x"),l.push("!=",B)}),g=g.length&&new RegExp(g.join("|")),l=l.length&&new RegExp(l.join("|")),e=Q.test(a.compareDocumentPosition),v=e||Q.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e;return e===(t=t&&t.parentNode)||!(!t||1!==t.nodeType||!(n.contains?n.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=e?function(e,t){var n;return e===t?(c=!0,0):!e.compareDocumentPosition-!t.compareDocumentPosition||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!h.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===x&&v(x,e)?-1:t===C||t.ownerDocument===x&&v(x,t)?1:s?F(s,e)-F(s,t):0:4&n?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,i=0,a=e.parentNode,o=t.parentNode,l=[e],r=[t];if(!a||!o)return e===C?-1:t===C?1:a?-1:o?1:s?F(s,e)-F(s,t):0;if(a===o)return se(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)r.unshift(n);for(;l[i]===r[i];)i++;return i?se(l[i],r[i]):l[i]===x?-1:r[i]===x?1:0}),C},ie.matches=function(e,t){return ie(e,null,null,t)},ie.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&k(e),t=t.replace(V,"='$1']"),h.matchesSelector&&T&&!S[t+" "]&&(!l||!l.test(t))&&(!g||!g.test(t)))try{var n=r.call(e,t);if(n||h.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ne,u),e[3]=(e[3]||e[4]||e[5]||"").replace(ne,u),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ie.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ie.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=(t=y(n,!0))&&n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ne,u).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(e){return null==(e=ie.attr(e,t))?"!="===n:!n||(e+="","="===n?e===i:"!="===n?e!==i:"^="===n?i&&0===e.indexOf(i):"*="===n?i&&-1(?:<\/\1>|)$/,C=/^.[^:#\[\.,]*$/;function T(e,n,i){if(k.isFunction(n))return k.grep(e,function(e,t){return!!n.call(e,t,e)!==i});if(n.nodeType)return k.grep(e,function(e){return e===n!==i});if("string"==typeof n){if(C.test(n))return k.filter(n,e,i);n=k.filter(n,e)}return k.grep(e,function(e){return-1)[^>]*|#([\w-]*))$/,N=((k.fn.init=function(e,t,n){if(e){if(n=n||E,"string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):k.isFunction(e)?void 0!==n.ready?n.ready(e):e(k):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),k.makeArray(e,this));if(!(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:D.exec(e))||!i[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(i[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:h,!0)),b.test(i[1])&&k.isPlainObject(t))for(var i in t)k.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i])}else{if((n=h.getElementById(i[2]))&&n.parentNode){if(n.id!==i[2])return E.find(e);this.length=1,this[0]=n}this.context=h,this.selector=e}}return this}).prototype=k.fn,E=k(h),/^(?:parents|prev(?:Until|All))/),S={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t,n=k(e,this),i=n.length;return this.filter(function(){for(t=0;t
    a",g.leadingWhitespace=3===gt.firstChild.nodeType,g.tbody=!gt.getElementsByTagName("tbody").length,g.htmlSerialize=!!gt.getElementsByTagName("link").length,g.html5Clone="<:nav>"!==h.createElement("nav").cloneNode(!0).outerHTML,Ft.type="checkbox",Ft.checked=!0,mt.appendChild(Ft),g.appendChecked=Ft.checked,gt.innerHTML="",g.noCloneChecked=!!gt.cloneNode(!0).lastChild.defaultValue,mt.appendChild(gt),(Ft=h.createElement("input")).setAttribute("type","radio"),Ft.setAttribute("checked","checked"),Ft.setAttribute("name","t"),gt.appendChild(Ft),g.checkClone=gt.cloneNode(!0).cloneNode(!0).lastChild.checked,g.noCloneEvent=!!gt.addEventListener,gt[k.expando]=1,g.attributes=!gt.getAttribute(k.expando);var ee={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:g.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]};function te(e,t){var n,i,a=0,o=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[a]);a++)!t||k.nodeName(i,t)?o.push(i):k.merge(o,te(i,t));return void 0===t||t&&k.nodeName(e,t)?k.merge([e],o):o}function ne(e,t){for(var n,i=0;null!=(n=e[i]);i++)k._data(n,"globalEval",!t||k._data(t[i],"globalEval"))}ee.optgroup=ee.option,ee.tbody=ee.tfoot=ee.colgroup=ee.caption=ee.thead,ee.th=ee.td;var ie=/<|&#?\w+;/,ae=/"!==u[1]||ae.test(l)?0:s:s.firstChild)&&l.childNodes.length;o--;)k.nodeName(d=l.childNodes[o],"tbody")&&!d.childNodes.length&&l.removeChild(d);for(k.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=p.lastChild}else h.push(t.createTextNode(l));for(s&&p.removeChild(s),g.appendChecked||k.grep(te(h,"input"),oe),y=0;l=h[y++];)if(i&&-1]","i"),we=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ke=/\s*$/g,De=Z(h).appendChild(h.createElement("div"));function Ne(e,t){return k.nodeName(e,"table")&&k.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Se(e){return e.type=(null!==k.find.attr(e,"type"))+"/"+e.type,e}function Ae(e){var t=Te.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Le(e,t){if(1===t.nodeType&&k.hasData(e)){var n,i,a,e=k._data(e),o=k._data(t,e),l=e.events;if(l)for(n in delete o.handle,o.events={},l)for(i=0,a=l[n].length;i")},clone:function(e,t,n){var i,a,o,l,r,s=k.contains(e.ownerDocument,e);if(g.html5Clone||k.isXMLDoc(e)||!be.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(De.innerHTML=e.outerHTML,De.removeChild(o=De.firstChild)),!(g.noCloneEvent&&g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(i=te(o),r=te(e),l=0;null!=(a=r[l]);++l)if(i[l]){d=p=void 0;var c,d,u,f=a,p=i[l];if(1===p.nodeType){if(c=p.nodeName.toLowerCase(),!g.noCloneEvent&&p[k.expando]){for(d in(u=k._data(p)).events)k.removeEvent(p,d,u.handle);p.removeAttribute(k.expando)}"script"===c&&p.text!==f.text?(Se(p).text=f.text,Ae(p)):"object"===c?(p.parentNode&&(p.outerHTML=f.outerHTML),g.html5Clone&&f.innerHTML&&!k.trim(p.innerHTML)&&(p.innerHTML=f.innerHTML)):"input"===c&&U.test(f.type)?(p.defaultChecked=p.checked=f.checked,p.value!==f.value&&(p.value=f.value)):"option"===c?p.defaultSelected=p.selected=f.defaultSelected:"input"!==c&&"textarea"!==c||(p.defaultValue=f.defaultValue)}}if(t)if(n)for(r=r||te(e),i=i||te(o),l=0;null!=(a=r[l]);l++)Le(a,i[l]);else Le(e,o);return 0<(i=te(o,"script")).length&&ne(i,!s&&te(e,"script")),i=r=a=null,o},cleanData:function(e,t){for(var n,i,a,o,l=0,r=k.expando,s=k.cache,c=g.attributes,d=k.event.special;null!=(n=e[l]);l++)if((t||H(n))&&(o=(a=n[r])&&s[a])){if(o.events)for(i in o.events)d[i]?k.event.remove(n,i):k.removeEvent(n,i,o.handle);s[a]&&(delete s[a],c||void 0===n.removeAttribute?n[r]=void 0:n.removeAttribute(r),u.push(a))}}}),k.fn.extend({domManip:Ie,detach:function(e){return je(this,e,!0)},remove:function(e){return je(this,e)},text:function(e){return X(this,function(e){return void 0===e?k.text(this):this.empty().append((this[0]&&this[0].ownerDocument||h).createTextNode(e))},null,e,arguments.length)},append:function(){return Ie(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ne(this,e).appendChild(e)})},prepend:function(){return Ie(this,arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=Ne(this,e)).insertBefore(e,t.firstChild)})},before:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&k.cleanData(te(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&k.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return X(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(xe,""):void 0;if("string"==typeof e&&!ke.test(e)&&(g.htmlSerialize||!be.test(e))&&(g.leadingWhitespace||!J.test(e))&&!ee[(G.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n")).appendTo(t.documentElement))[0].contentWindow||Me[0].contentDocument).document).write(),t.close(),n=He(e,t),Me.detach()),_e[e]=n),n}function Oe(e,t,n,i){var a,o={};for(a in t)o[a]=e.style[a],e.style[a]=t[a];for(a in i=n.apply(e,i||[]),t)e.style[a]=o[a];return i}var Pe,Re,qe,Be,We,ze,$e,Ye,Ve=/^margin/,Xe=new RegExp("^("+o+")(?!px)[a-z%]+$","i"),Ue=h.documentElement;function Ge(){var e,t=h.documentElement;t.appendChild($e),Ye.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",Pe=qe=ze=!1,Re=We=!0,w.getComputedStyle&&(e=w.getComputedStyle(Ye),Pe="1%"!==(e||{}).top,ze="2px"===(e||{}).marginLeft,qe="4px"===(e||{width:"4px"}).width,Ye.style.marginRight="50%",Re="4px"===(e||{marginRight:"4px"}).marginRight,(e=Ye.appendChild(h.createElement("div"))).style.cssText=Ye.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",Ye.style.width="1px",We=!parseFloat((w.getComputedStyle(e)||{}).marginRight),Ye.removeChild(e)),Ye.style.display="none",(Be=0===Ye.getClientRects().length)&&(Ye.style.display="",Ye.innerHTML="
    t
    ",Ye.childNodes[0].style.borderCollapse="separate",(e=Ye.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",Be=0===e[0].offsetHeight)&&(e[0].style.display="",e[1].style.display="none",Be=0===e[0].offsetHeight),t.removeChild($e)}$e=h.createElement("div"),(Ye=h.createElement("div")).style&&(Ye.style.cssText="float:left;opacity:.5",g.opacity="0.5"===Ye.style.opacity,g.cssFloat=!!Ye.style.cssFloat,Ye.style.backgroundClip="content-box",Ye.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===Ye.style.backgroundClip,($e=h.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",Ye.innerHTML="",$e.appendChild(Ye),g.boxSizing=""===Ye.style.boxSizing||""===Ye.style.MozBoxSizing||""===Ye.style.WebkitBoxSizing,k.extend(g,{reliableHiddenOffsets:function(){return null==Pe&&Ge(),Be},boxSizingReliable:function(){return null==Pe&&Ge(),qe},pixelMarginRight:function(){return null==Pe&&Ge(),Re},pixelPosition:function(){return null==Pe&&Ge(),Pe},reliableMarginRight:function(){return null==Pe&&Ge(),We},reliableMarginLeft:function(){return null==Pe&&Ge(),ze}}));var Ke,Je,Qe=/^(top|right|bottom|left)$/;function Ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}w.getComputedStyle?(Ke=function(e){var t=e.ownerDocument.defaultView;return(t=t&&t.opener?t:w).getComputedStyle(e)},Je=function(e,t,n){var i,a,o=e.style;return""!==(a=(n=n||Ke(e))?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==a||k.contains(e.ownerDocument,e)||(a=k.style(e,t)),n&&!g.pixelMarginRight()&&Xe.test(a)&&Ve.test(t)&&(e=o.width,t=o.minWidth,i=o.maxWidth,o.minWidth=o.maxWidth=o.width=a,a=n.width,o.width=e,o.minWidth=t,o.maxWidth=i),void 0===a?a:a+""}):Ue.currentStyle&&(Ke=function(e){return e.currentStyle},Je=function(e,t,n){var i,a,o,l=e.style;return null==(n=(n=n||Ke(e))?n[t]:void 0)&&l&&l[t]&&(n=l[t]),Xe.test(n)&&!Qe.test(t)&&(i=l.left,(o=(a=e.runtimeStyle)&&a.left)&&(a.left=e.currentStyle.left),l.left="fontSize"===t?"1em":n,n=l.pixelLeft+"px",l.left=i,o)&&(a.left=o),void 0===n?n:n+""||"auto"});var et=/alpha\([^)]*\)/i,tt=/opacity\s*=\s*([^)]*)/i,nt=/^(none|table(?!-c[ea]).+)/,it=new RegExp("^("+o+")(.*)$","i"),at={position:"absolute",visibility:"hidden",display:"block"},ot={letterSpacing:"0",fontWeight:"400"},lt=["Webkit","O","Moz","ms"],rt=h.createElement("div").style;function st(e){if(e in rt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=lt.length;n--;)if((e=lt[n]+t)in rt)return e}function ct(e,t){for(var n,i,a,o=[],l=0,r=e.length;l
    a",sn=Ft.getElementsByTagName("a")[0],mt.setAttribute("type","checkbox"),Ft.appendChild(mt),(sn=Ft.getElementsByTagName("a")[0]).style.cssText="top:1px",g.getSetAttribute="t"!==Ft.className,g.style=/top/.test(sn.getAttribute("style")),g.hrefNormalized="/a"===sn.getAttribute("href"),g.checkOn=!!mt.value,g.optSelected=o.selected,g.enctype=!!h.createElement("form").enctype,gt.disabled=!0,g.optDisabled=!o.disabled,(mt=h.createElement("input")).setAttribute("value",""),g.input=""===mt.getAttribute("value"),mt.value="t",mt.setAttribute("type","radio"),g.radioValue="t"===mt.value;var Tt=/\r/g,Et=/[\x20\t\r\n\f]+/g;k.fn.extend({val:function(t){var n,e,i,a=this[0];return arguments.length?(i=k.isFunction(t),this.each(function(e){1!==this.nodeType||(null==(e=i?t.call(this,e,k(this).val()):t)?e="":"number"==typeof e?e+="":k.isArray(e)&&(e=k.map(e,function(e){return null==e?"":e+""})),(n=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&void 0!==n.set(this,e,"value"))||(this.value=e)})):a?(n=k.valHooks[a.type]||k.valHooks[a.nodeName.toLowerCase()])&&"get"in n&&void 0!==(e=n.get(a,"value"))?e:"string"==typeof(e=a.value)?e.replace(Tt,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:k.trim(k.text(e)).replace(Et," ")}},select:{get:function(e){for(var t,n=e.options,i=e.selectedIndex,a="select-one"===e.type||i<0,o=a?null:[],l=a?i+1:n.length,r=i<0?l:a?i:0;r").append(k.parseHTML(e)).find(i):e)}).always(n&&function(e,t){l.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this)},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.filters.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var i,a,o,l,r=k.css(e,"position"),s=k(e),c={};"static"===r&&(e.style.position="relative"),o=s.offset(),i=k.css(e,"top"),l=k.css(e,"left"),r=("absolute"===r||"fixed"===r)&&-1'+(l?a.title[0]:a.title)+"":"";return a.zIndex=o,t([a.shade?'
    ':"",'
    '+(e&&2!=a.type?"":l)+"'+(i=["layui-icon-tips","layui-icon-success","layui-icon-error","layui-icon-question","layui-icon-lock","layui-icon-face-cry","layui-icon-face-smile"],o="layui-anim layui-anim-rotate layui-anim-loop",0==a.type&&-1!==a.icon?'':3==a.type?(n=["layui-icon-loading","layui-icon-loading-1"],2==a.icon?'
    ':''):"")+((1!=a.type||!e)&&a.content||"")+'
    '+(i=[],r&&(i.push(''),i.push('')),a.closeBtn&&i.push(''),i.join(""))+"
    "+(a.btn?function(){var e="";"string"==typeof a.btn&&(a.btn=[a.btn]);for(var t,n=0,i=a.btn.length;n'+a.btn[n]+"";return'
    '+e+"
    "}():"")+(a.resize?'':"")+""],l,y('
    ')),this},t.pt.creat=function(){var e,t,n,i,a,o=this,l=o.config,r=o.index,s="object"==typeof(d=l.content),c=y("body");if(l.id&&y("."+g[0]).find("#"+l.id)[0])t=(e=y("#"+l.id).closest("."+g[0])).attr("times"),n=e.data("config"),i=y("#"+g.SHADE+t),"min"===(e.data("maxminStatus")||{})?m.restore(t):n.hideOnClose&&(i.show(),e.show());else{switch(l.removeFocus&&document.activeElement.blur(),"string"==typeof l.area&&(l.area="auto"===l.area?["",""]:[l.area,""]),l.shift&&(l.anim=l.shift),6==m.ie&&(l.fixed=!1),l.type){case 0:l.btn="btn"in l?l.btn:f.btn[0],m.closeAll("dialog");break;case 2:var d=l.content=s?l.content:[l.content||"","auto"];l.content='';break;case 3:delete l.title,delete l.closeBtn,-1===l.icon&&l.icon,m.closeAll("loading");break;case 4:s||(l.content=[l.content,"body"]),l.follow=l.content[1],l.content=l.content[0]+'',delete l.title,l.tips="object"==typeof l.tips?l.tips:[l.tips,!0],l.tipsMore||m.closeAll("tips")}o.vessel(s,function(e,t,n){c.append(e[0]),s?2==l.type||4==l.type?y("body").append(e[1]):d.parents("."+g[0])[0]||(d.data("display",d.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),y("#"+g[0]+r).find("."+g[5]).before(t)):c.append(e[1]),y("#"+g.MOVE)[0]||c.append(f.moveElem=n),o.layero=y("#"+g[0]+r),o.shadeo=y("#"+g.SHADE+r),l.scrollbar||f.setScrollbar(r)}).auto(r),o.shadeo.css({"background-color":l.shade[1]||"#000",opacity:l.shade[0]||l.shade}),2==l.type&&6==m.ie&&o.layero.find("iframe").attr("src",d[0]),4==l.type?o.tips():(o.offset(),parseInt(f.getStyle(document.getElementById(g.MOVE),"z-index"))||(o.layero.css("visibility","hidden"),m.ready(function(){o.offset(),o.layero.css("visibility","visible")}))),!l.fixed||f.events.resize[o.index]||(f.events.resize[o.index]=function(){o.resize()},u.on("resize",f.events.resize[o.index])),l.time<=0||setTimeout(function(){m.close(o.index)},l.time),o.move().callback(),g.anim[l.anim]&&(a="layer-anim "+g.anim[l.anim],o.layero.addClass(a).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){y(this).removeClass(a)})),o.layero.data("config",l)}},t.pt.resize=function(){var e=this,t=e.config;e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(e.index),4==t.type&&e.tips()},t.pt.auto=function(e){var t=this.config,n=y("#"+g[0]+e),i=(""===t.area[0]&&0t.maxWidth)&&n.width(t.maxWidth),[n.innerWidth(),n.innerHeight()]),a=n.find(g[1]).outerHeight()||0,o=n.find("."+g[6]).outerHeight()||0,e=function(e){(e=n.find(e)).height(i[1]-a-o-2*(0|parseFloat(e.css("padding-top"))))};return 2===t.type?e("iframe"):""===t.area[1]?0t.maxHeight?(i[1]=t.maxHeight,e("."+g[5])):t.fixed&&i[1]>=u.height()&&(i[1]=u.height(),e("."+g[5])):e("."+g[5]),this},t.pt.offset=function(){var e=this,t=e.config,n=e.layero,i=[n.outerWidth(),n.outerHeight()],a="object"==typeof t.offset;e.offsetTop=(u.height()-i[1])/2,e.offsetLeft=(u.width()-i[0])/2,a?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=u.width()-i[0]:"b"===t.offset?e.offsetTop=u.height()-i[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=u.height()-i[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=u.width()-i[0]):"rb"===t.offset?(e.offsetTop=u.height()-i[1],e.offsetLeft=u.width()-i[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?u.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?u.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=u.scrollTop(),e.offsetLeft+=u.scrollLeft()),"min"===n.data("maxminStatus")&&(e.offsetTop=u.height()-(n.find(g[1]).outerHeight()||0),e.offsetLeft=n.css("left")),n.css({top:e.offsetTop,left:e.offsetLeft})},t.pt.tips=function(){var e=this.config,t=this.layero,n=[t.outerWidth(),t.outerHeight()],i={width:(o=(o=y(e.follow))[0]?o:y("body")).outerWidth(),height:o.outerHeight(),top:o.offset().top,left:o.offset().left},a=t.find(".layui-layer-TipsG"),o=e.tips[0];e.tips[1]||a.remove(),i.autoLeft=function(){0u.width()&&(o=u.width()-180-(f.minStackArr.edgeIndex=f.minStackArr.edgeIndex||0,f.minStackArr.edgeIndex+=3))<0&&(o=0),t.minStack&&(r.left=o,r.top=u.height()-i,a||f.minStackIndex++,s.attr("minLeft",o)),s.attr("position",l),m.style(e,r,!0),n.hide(),"page"===s.attr("type")&&s.find(g[4]).hide(),f.restScrollbar(e),c.hide())},m.restore=function(e){var t=y("#"+g[0]+e),n=y("#"+g.SHADE+e),i=t.attr("area").split(","),a=t.attr("type"),o=t.data("config")||{};t.removeData("maxminStatus"),m.style(e,{width:i[0],height:i[1],top:parseFloat(i[2]),left:parseFloat(i[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===a&&t.find(g[4]).show(),o.scrollbar?f.restScrollbar(e):f.setScrollbar(e),n.show()},m.full=function(t){var n=y("#"+g[0]+t),e=n.data("maxminStatus");"max"!==e&&("min"===e&&m.restore(t),n.data("maxminStatus","max"),f.record(n),g.html.attr("layer-full")||f.setScrollbar(t),setTimeout(function(){var e="fixed"===n.css("position");m.style(t,{top:e?0:u.scrollTop(),left:e?0:u.scrollLeft(),width:"100%",height:"100%"},!0),n.find(".layui-layer-min").hide()},100))},m.title=function(e,t){y("#"+g[0]+(t||m.index)).find(g[1]).html(e)},m.close=function(a,o){var l,e,r=(t=y("."+g[0]).children("#"+a).closest("."+g[0]))[0]?(a=t.attr("times"),t):y("#"+g[0]+a),s=r.attr("type"),t=r.data("config")||{},c=t.id&&t.hideOnClose;r[0]&&(l={slideDown:"layer-anim-slide-down-out",slideLeft:"layer-anim-slide-left-out",slideUp:"layer-anim-slide-up-out",slideRight:"layer-anim-slide-right-out"}[t.anim]||"layer-anim-close",e=function(){var e="layui-layer-wrap";if(c)return r.removeClass("layer-anim "+l),r.hide();if(s===f.type[1]&&"object"===r.attr("conType")){r.children(":not(."+g[5]+")").remove();for(var t=r.find("."+e),n=0;n<2;n++)t.unwrap();t.css("display",t.data("display")).removeClass(e)}else{if(s===f.type[2])try{var i=y("#"+g[4]+a)[0];i.contentWindow.document.write(""),i.contentWindow.close(),r.find("."+g[5])[0].removeChild(i)}catch(e){}r[0].innerHTML="",r.remove()}"function"==typeof f.end[a]&&f.end[a](),delete f.end[a],"function"==typeof o&&o(),f.events.resize[a]&&(u.off("resize",f.events.resize[a]),delete f.events.resize[a])},y("#"+g.SHADE+a)[c?"hide":"remove"](),t.isOutAnim&&r.addClass("layer-anim "+l),6==m.ie&&f.reselect(),f.restScrollbar(a),"string"==typeof r.attr("minLeft")&&(f.minStackIndex--,f.minStackArr.push(r.attr("minLeft"))),m.ie&&m.ie<10||!t.isOutAnim?e():setTimeout(function(){e()},200))},m.closeAll=function(n,i){"function"==typeof n&&(i=n,n=null);var a=y("."+g[0]);y.each(a,function(e){var t=y(this);(n?t.attr("type")===n:1)&&m.close(t.attr("times"),e===a.length-1?i:null)}),0===a.length&&"function"==typeof i&&i()},m.closeLast=function(e){m.close(y(".layui-layer-"+(e=e||"page")+":last").attr("times"))},m.cache||{});m.prompt=function(n,i){var e="",t="";"function"==typeof(n=n||{})&&(i=n),n.area&&(e='style="width: '+(o=n.area)[0]+"; height: "+o[1]+';"',delete n.area),n.placeholder&&(t=' placeholder="'+n.placeholder+'"');var a,o=2==n.formType?'":'",l=n.success;return delete n.success,m.open(y.extend({type:1,btn:["确定","取消"],content:o,skin:"layui-layer-prompt"+h("prompt"),maxWidth:u.width(),success:function(e){(a=e.find(".layui-layer-input")).val(n.value||"").focus(),"function"==typeof l&&l(e)},resize:!1,yes:function(e){var t=a.val();t.length>(n.maxlength||500)?m.tips("最多输入"+(n.maxlength||500)+"个字数",a,{tips:1}):i&&i(t,e,a)}},n))},m.tab=function(i){var a=(i=i||{}).tab||{},o="layui-this",l=i.success;return delete i.success,m.open(y.extend({type:1,skin:"layui-layer-tab"+h("tab"),resize:!1,title:function(){var e=a.length,t=1,n="";if(0'+a[0].title+"";t"+a[t].title+"";return n}(),content:'
      '+function(){var e=a.length,t=1,n="";if(0'+(a[0].content||"no content")+"";t'+(a[t].content||"no content")+"";return n}()+"
    ",success:function(e){var t=e.find(".layui-layer-title").children(),n=e.find(".layui-layer-tabmain").children();t.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var t=(e=y(this)).index();e.addClass(o).siblings().removeClass(o),n.eq(t).show().siblings().hide(),"function"==typeof i.change&&i.change(t)}),"function"==typeof l&&l(e)}},i))},m.photos=function(i,e,a){var o={};if((i=y.extend(!0,{toolbar:!0,footer:!0},i)).photos){var t=(d=!("string"==typeof i.photos||i.photos instanceof y))?i.photos:{},l=t.data||[],r=t.start||0,s=i.success;if(o.imgIndex=1+(0|r),i.img=i.img||"img",delete i.success,d){if(0===l.length)return m.msg("没有图片")}else{var n=y(i.photos),c=function(){l=[],n.find(i.img).each(function(e){var t=y(this);t.attr("layer-index",e),l.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("lay-src")||t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(c(),0===l.length)return;if(e||n.on("click",i.img,function(){c();var e=y(this).attr("layer-index");m.photos(y.extend(i,{photos:{start:e,data:l,tab:i.tab},full:i.full}),!0)}),!e)return}o.imgprev=function(e){o.imgIndex--,o.imgIndex<1&&(o.imgIndex=l.length),o.tabimg(e)},o.imgnext=function(e,t){o.imgIndex++,o.imgIndex>l.length&&(o.imgIndex=1,t)||o.tabimg(e)},o.keyup=function(e){var t;o.end||(t=e.keyCode,e.preventDefault(),37===t?o.imgprev(!0):39===t?o.imgnext(!0):27===t&&m.close(o.index))},o.tabimg=function(e){if(!(l.length<=1))return t.start=o.imgIndex-1,m.close(o.index),m.photos(i,!0,e)},o.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},o.image={},o.getTransform=function(e){var t=[],n=e.rotate,i=e.scaleX,e=e.scale;return o.isNumber(n)&&0!==n&&t.push("rotate("+n+"deg)"),o.isNumber(i)&&1!==i&&t.push("scaleX("+i+")"),o.isNumber(e)&&t.push("scale("+e+")"),t.length?t.join(" "):"none"},o.event=function(e,n,i){o.main.find(".layui-layer-photos-prev").on("click",function(e){e.preventDefault(),o.imgprev(!0)}),o.main.find(".layui-layer-photos-next").on("click",function(e){e.preventDefault(),o.imgnext(!0)}),y(document).on("keyup",o.keyup),e.off("click").on("click","*[toolbar-event]",function(){var e=y(this);switch(e.attr("toolbar-event")){case"rotate":o.image.rotate=((o.image.rotate||0)+Number(e.attr("data-option")))%360,o.imgElem.css({transform:o.getTransform(o.image)});break;case"scalex":o.image.scaleX=-1===o.image.scaleX?1:-1,o.imgElem.css({transform:o.getTransform(o.image)});break;case"zoom":var t=Number(e.attr("data-option"));o.image.scale=(o.image.scale||1)+t,t<0&&o.image.scale<0-t&&(o.image.scale=0-t),o.imgElem.css({transform:o.getTransform(o.image)});break;case"reset":o.image.scaleX=1,o.image.scale=1,o.image.rotate=0,o.imgElem.css({transform:"none"});break;case"close":m.close(n)}i.offset(),i.auto(n)}),o.main.on("mousewheel DOMMouseScroll",function(e){var t=e.originalEvent.wheelDelta||-e.originalEvent.detail,n=o.main.find('[toolbar-event="zoom"]');(0'+n+''+(t=['
    '],1','','',"
    "].join("")),i.toolbar&&t.push(['
    ','','','','','','',"
    "].join("")),i.footer&&t.push(['"].join("")),t.push(""),t.join(""))+"",success:function(e,t,n){o.main=e.find(".layer-layer-photos-main"),o.footer=e.find(".layui-layer-photos-footer"),o.imgElem=o.main.children("img"),o.event(e,t,n),i.tab&&i.tab(l[r],e),"function"==typeof s&&s(e)},end:function(){o.end=!0,y(document).off("keyup",o.keyup)}},i))},f=new Image;f.src=d,f.complete?u(f):(f.onload=function(){f.onload=null,u(f)},f.onerror=function(e){f.onerror=null,m.close(o.loadi),m.msg("当前图片地址异常
    是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1").addClass(o));layui.each(i.bars,function(e,t){var n=d('
  • ');n.addClass(t.icon).attr({"lay-type":t.type,style:t.style||(i.bgcolor?"background-color: "+i.bgcolor:"")}).html(t.content),n.on("click",function(){var e=d(this).attr("lay-type");"top"===e&&("body"===i.target?d("html,body"):s).animate({scrollTop:0},i.duration),"function"==typeof i.click&&i.click.call(this,e)}),"object"===layui.type(i.on)&&layui.each(i.on,function(e,t){n.on(e,function(){var e=d(this).attr("lay-type");"function"==typeof t&&t.call(this,e)})}),"top"===t.type&&(n.addClass("layui-fixbar-top"),a=n),c.append(n)}),r.find("."+o).remove(),"object"==typeof i.css&&c.css(i.css),r.append(c),a&&(e=function e(){return s.scrollTop()>=i.margin?t||(a.show(),t=1):t&&(a.hide(),t=0),e}()),s.on("scroll",function(){e&&(clearTimeout(n),n=setTimeout(function(){e()},100))})},countdown:function(a){a=d.extend(!0,{date:new Date,now:new Date},a);var o=arguments,l=(1]|&(?=#[a-zA-Z0-9]+)/g.test(e+="")?e.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):e},unescape:function(e){return null!=e||(e=""),(e+="").replace(/\&/g,"&").replace(/\/g,">").replace(/\'/g,"'").replace(/\"/g,'"')},openWin:function(e){var t=(e=e||{}).window||window.open(e.url||"",e.target,e.specs);e.url||(t.document.open("text/html","replace"),t.document.write(e.content||""),t.document.close())},toVisibleArea:function(e){var t,n,i,a,o,l,r,s;(e=d.extend({margin:160,duration:200,type:"y"},e)).scrollElem[0]&&e.thisElem[0]&&(t=e.scrollElem,r=e.thisElem,i=(o="y"===e.type)?"top":"left",a=t[n=o?"scrollTop":"scrollLeft"](),o=t[o?"height":"width"](),l=t.offset()[i],s={},(r=r.offset()[i]-l)>o-e.margin||r."+v;t.prototype.config={trigger:"click",content:"",className:"",style:"",show:!1,isAllowSpread:!0,isSpreadItem:!0,data:[],delay:300,shade:0,accordion:!1},t.prototype.reload=function(e,t){this.config=u.extend({},this.config,e),this.init(!0,t)},t.prototype.init=function(e,t){var n,i=this,a=i.config,o=u(a.elem);return 1');return 0No data
  • '),e}var o=this,s=o.config,c=s.customName,i=u("body"),d=function(r,e){return layui.each(e,function(e,t){var n,i=t[c.children]&&0",(n="href"in t?''+o+"":o,i?'
    '+n+("parent"===l?'':"group"===l&&s.isAllowSpread?'':"")+"
    ":'
    '+n+"
    "),""].join(""))).data("item",t),i&&(a=u('
    '),n=u("
      "),"parent"===l?(a.append(d(n,t[c.children])),o.append(a)):o.append(d(n,t[c.children]))),r.append(o))}),r},a=['
      ',"
      "].join("");!(e=!("contextmenu"!==s.trigger&&!lay.isTopElem(s.elem[0]))||e)&&s.elem.data(h+"_opened")||(o.elemView=u("."+g+'[lay-id="'+s.id+'"]'),"reloadData"===t&&o.elemView.length?o.elemView.html(s.content||n()):(o.elemView=u(a),o.elemView.append(s.content||n()),s.className&&o.elemView.addClass(s.className),s.style&&o.elemView.attr("style",s.style),y.thisId=s.id,o.remove(),i.append(o.elemView),s.elem.data(h+"_opened",!0),e=s.shade?'
      ':"",o.elemView.before(e),"mouseenter"===s.trigger&&o.elemView.on("mouseenter",function(){clearTimeout(m.timer)}).on("mouseleave",function(){o.delayRemove()})),o.position(),(m.prevElem=o.elemView).data("prevElem",s.elem),o.elemView.find(".layui-menu").on(l,function(e){layui.stope(e)}),o.elemView.find(".layui-menu li").on("click",function(e){var t=u(this),n=t.data("item")||{},i=n[c.children]&&0i.width()&&(n.addClass(C),(t=n[0].getBoundingClientRect()).left<0)&&n.removeClass(C),t.bottom>i.height())&&n.eq(0).css("margin-top",-(t.bottom-i.height()+5))}).on("mouseleave",a,function(e){var t=u(this).children("."+k);t.removeClass(C),t.css("margin-top",0)}),y.close=function(e){return(e=m.getThis(e))?(e.remove(),m.call(e)):this},y.reload=function(e,t,n){return(e=m.getThis(e))?(e.reload(t,n),m.call(e)):this},y.reloadData=function(){var n=u.extend([],arguments),i=(n[2]="reloadData",new RegExp("^("+["data","templet","content"].join("|")+")$"));return layui.each(n[1],function(e,t){i.test(e)||delete n[1][e]}),y.reload.apply(null,n)},y.render=function(e){return e=new t(e),m.call(e)},e(r,y)}),layui.define(["jquery","lay"],function(e){"use strict";function t(e){this.index=++f.index,this.config=v.extend({},this.config,f.config,e),this.render()}var v=layui.$,u=layui.lay,f={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){return this.config=v.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,n,e,t)}},n="slider",p="layui-disabled",x="layui-slider-bar",b="layui-slider-wrap",w="layui-slider-wrap-btn",k="layui-slider-tips",C="layui-slider-input-txt",T="layui-slider-hover";t.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"var(--color-primary,#16baaa)"},t.prototype.render=function(){var i=this,a=i.config;if(1<(e=v(a.elem)).length)return layui.each(e,function(){f.render(v.extend({},a,{elem:this}))}),i;v.extend(a,u.options(e[0])),a.step<1&&(a.step=1),a.maxa.max&&(a.value=a.max),n=Math.floor((a.value-a.min)/(a.max-a.min)*100)+"%");var o,e=a.disabled?"#c2c2c2":a.theme,t='
      '+(a.tips?'
      ':"")+'
      '+(a.range?'
      ':"")+"
      ",n=v(a.elem),l=n.next(".layui-slider");if(l[0]&&l.remove(),i.elemTemp=v(t),a.range?(i.elemTemp.find("."+b).eq(0).data("value",a.value[0]),i.elemTemp.find("."+b).eq(1).data("value",a.value[1])):i.elemTemp.find("."+b).data("value",a.value),n.html(i.elemTemp),"vertical"===a.type&&i.elemTemp.height(a.height+"px"),a.showstep){for(var r=(a.max-a.min)/a.step,s="",c=1;c<1+r;c++){var d=100*c/r;d<100&&(s+='
      ')}i.elemTemp.append(s)}a.input&&!a.range&&(e=v('
      '),n.css("position","relative"),n.append(e),n.find("."+C).children("input").val(a.value),"vertical"===a.type?e.css({left:0,top:-48}):i.elemTemp.css("margin-right",e.outerWidth()+15)),a.disabled?(i.elemTemp.addClass(p),i.elemTemp.find("."+w).addClass(p)):i.slide(),i.elemTemp.find("."+w).on("mouseover",function(){var e="vertical"===a.type?a.height:i.elemTemp[0].offsetWidth,t=i.elemTemp.find("."+b),n=("vertical"===a.type?e-v(this).parent()[0].offsetTop-t.height():v(this).parent()[0].offsetLeft)/e*100,t=v(this).parent().data("value"),e=a.setTips?a.setTips(t):t;i.elemTemp.find("."+k).html(e),clearTimeout(o),o=setTimeout(function(){"vertical"===a.type?i.elemTemp.find("."+k).css({bottom:n+"%","margin-bottom":"20px",display:"inline-block"}):i.elemTemp.find("."+k).css({left:n+"%",display:"inline-block"})},300)}).on("mouseout",function(){clearTimeout(o),i.elemTemp.find("."+k).css("display","none")})},t.prototype.slide=function(e,t,n){function r(){return"vertical"===d.type?d.height:u[0].offsetWidth}function s(e,t,n){e=(e=100<(e=100i[1]&&i.reverse(),c.value=d.range?i:o,d.change&&d.change(c.value),"done"===n&&d.done&&d.done(c.value)}var c=this,d=c.config,u=c.elemTemp,f=u.find("."+b),p=u.next(".layui-slider-input"),h=p.children("."+C).children("input").val(),y=100/((d.max-d.min)/Math.ceil(d.step)),m=function(e){var t=e/r()*100/y,n=Math.round(t)*y;return e==r()?Math.ceil(t)*y:n},g=v(['
      r()?r():t)/r()*100/y;s(t,o),l.addClass(T),u.find("."+k).show(),e.preventDefault()},t=function(){l.removeClass(T),u.find("."+k).hide()},n=function(){t(),g.remove(),d.done&&d.done(c.value)},v("#LAY-slider-moving")[0]||v("body").append(g),g.on("mousemove",e),g.on("mouseup",n).on("mouseleave",n)})}),u.on("click",function(e){var t=v("."+w),n=v(this);!t.is(event.target)&&0===t.has(event.target).length&&t.length&&(n=(t=(t=(t="vertical"===d.type?r()-e.clientY+n.offset().top-v(window).scrollTop():e.clientX-n.offset().left-v(window).scrollLeft())<0?0:t)>r()?r():t)/r()*100/y,t=d.range?"vertical"===d.type?Math.abs(t-parseInt(v(f[0]).css("bottom")))>Math.abs(t-parseInt(v(f[1]).css("bottom")))?1:0:Math.abs(t-f[0].offsetLeft)>Math.abs(t-f[1].offsetLeft)?1:0:0,s(n,t,"done"),e.preventDefault())}),p.children(".layui-slider-input-btn").children("i").each(function(t){v(this).on("click",function(){h=p.children("."+C).children("input").val();var e=((h=1==t?h-d.stepd.max?d.max:Number(h)+d.step)-d.min)/(d.max-d.min)*100/y;s(e,0,"done")})});function i(){var e=this.value,e=(e=(e=(e=isNaN(e)?0:e)d.max?d.max:e,((this.value=e)-d.min)/(d.max-d.min)*100/y);s(e,0,"done")}p.children("."+C).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),i.call(this))}).on("change",i)},t.prototype.events=function(){this.config},f.render=function(e){return e=new t(e),function(){var n=this,i=n.config;return{setValue:function(e,t){return e=(e=e>i.max?i.max:e)',"",'','',"","","
      "].join("")),i=t.elem=C(t.elem);t.size&&n.addClass("layui-colorpicker-"+t.size),i.addClass("layui-inline").html(e.elemColorBox=n),t.id="id"in t?t.id:i.attr("id")||e.index,e.color=e.elemColorBox.find("."+D)[0].style.background,e.events()},o.prototype.renderPicker=function(){var n,e=this,t=e.config,i=e.elemColorBox[0],a=e.elemPicker=C(['
      ','
      ','
      ','
      ','
      ','
      ',"
      ",'
      ','
      ',"
      ","
      ",'
      ','
      ','
      ',"
      ","
      ",t.predefine?(n=['
      '],layui.each(t.colors,function(e,t){n.push(['
      ','
      ',"
      "].join(""))}),n.push("
      "),n.join("")):"",'
      ','
      ','',"
      ",'
      ','','',"","
      "].join(""));e.elemColorBox.find("."+D)[0],C(c)[0]&&C(c).data("index")==e.index?e.removePicker(o.thisElemInd):(e.removePicker(o.thisElemInd),C("body").append(a)),l.thisId=t.id,o.thisElemInd=e.index,o.thisColor=i.style.background,e.position(),e.pickerEvents()},o.prototype.removePicker=function(e){var t=this.config;return(e=C("#layui-colorpicker"+(e||this.index)))[0]&&(e.remove(),delete l.thisId,"function"==typeof t.close)&&t.close(this.color),this},o.prototype.position=function(){var e=this,t=e.config;return a.position(e.bindElem||e.elemColorBox[0],e.elemPicker[0],{position:t.position,align:"center"}),e},o.prototype.val=function(){var e,t=this,n=(t.config,t.elemColorBox.find("."+D)),i=t.elemPicker.find("."+M),a=n[0].style.backgroundColor;a?(e=x(k(a)),n=n.attr("lay-type"),t.select(e.h,e.s,e.b),"torgb"===n?i.find("input").val(a):"rgba"===n?(n=k(a),3===(a.match(/[0-9]{1,3}/g)||[]).length?(i.find("input").val("rgba("+n.r+", "+n.g+", "+n.b+", 1)"),t.elemPicker.find("."+I).css("left",280)):(i.find("input").val(a),a=280*a.slice(a.lastIndexOf(",")+1,a.length-1),t.elemPicker.find("."+I).css("left",a)),t.elemPicker.find("."+L)[0].style.background="linear-gradient(to right, rgba("+n.r+", "+n.g+", "+n.b+", 0), rgb("+n.r+", "+n.g+", "+n.b+"))"):i.find("input").val("#"+w(e))):(t.select(0,100,100),i.find("input").val(""),t.elemPicker.find("."+L)[0].style.background="",t.elemPicker.find("."+I).css("left",280))},o.prototype.side=function(){function c(e,t,n,i){o.select(e,t,n);var a=b({h:e,s:t,b:n}),e=w({h:e,s:t,b:n}),t=o.elemPicker.find("."+M).find("input");v.addClass(T).removeClass(E),r[0].style.background="rgb("+a.r+", "+a.g+", "+a.b+")","torgb"===s?t.val("rgb("+a.r+", "+a.g+", "+a.b+")"):"rgba"===s?(p.css("left",280*i),t.val("rgba("+a.r+", "+a.g+", "+a.b+", "+i+")"),r[0].style.background="rgba("+a.r+", "+a.g+", "+a.b+", "+i+")",f[0].style.background="linear-gradient(to right, rgba("+a.r+", "+a.g+", "+a.b+", 0), rgb("+a.r+", "+a.g+", "+a.b+"))"):t.val("#"+e),l.change&&l.change(C.trim(o.elemPicker.find("."+M).find("input").val()))}function t(e){C("#LAY-colorpicker-moving")[0]||C("body").append(a),a.on("mousemove",e),a.on("mouseup",function(){a.remove()}).on("mouseleave",function(){a.remove()})}var o=this,l=o.config,r=o.elemColorBox.find("."+D),s=r.attr("lay-type"),d=o.elemPicker.find(".layui-colorpicker-side"),e=o.elemPicker.find("."+S),u=o.elemPicker.find("."+A),i=o.elemPicker.find("."+j),f=o.elemPicker.find("."+L),p=o.elemPicker.find("."+I),h=e[0].offsetTop/180*360,y=100-(i[0].offsetTop+3)/180*100,m=(i[0].offsetLeft+3)/260*100,g=Math.round(p[0].offsetLeft/280*100)/100,v=o.elemColorBox.find("."+N),n=o.elemPicker.find(".layui-colorpicker-pre").children("div"),a=C(['
      '].join(""));e.on("mousedown",function(e){var i=this.offsetTop,a=e.clientY;t(function(e){var t=i+(e.clientY-a),n=(t=(n=d[0].offsetHeight)<(t=t<0?0:t)?n:t)/180*360;c(h=n,m,y,g),e.preventDefault()}),e.preventDefault()}),d.on("click",function(e){var t=((t=(t=e.clientY-C(this).offset().top+_.scrollTop())<0?0:t)>this.offsetHeight?this.offsetHeight:t)/180*360;c(h=t,m,y,g),e.preventDefault()}),i.on("mousedown",function(e){var o=this.offsetTop,l=this.offsetLeft,r=e.clientY,s=e.clientX;layui.stope(e),t(function(e){var t=o+(e.clientY-r),n=l+(e.clientX-s),i=u[0].offsetHeight-3,a=((n=(a=u[0].offsetWidth-3)<(n=n<-3?-3:n)?a:n)+3)/260*100,n=100-((t=i<(t=t<-3?-3:t)?i:t)+3)/180*100;c(h,m=a,y=n,g),e.preventDefault()}),e.preventDefault()}),u.on("mousedown",function(e){var t=e.clientY-C(this).offset().top-3+_.scrollTop(),n=e.clientX-C(this).offset().left-3+_.scrollLeft(),n=((t=t<-3?-3:t)>this.offsetHeight-3&&(t=this.offsetHeight-3),(((n=n<-3?-3:n)>this.offsetWidth-3?this.offsetWidth-3:n)+3)/260*100);c(h,m=n,y=t=100-(t+3)/180*100,g),layui.stope(e),e.preventDefault(),i.trigger(e,"mousedown")}),p.on("mousedown",function(e){var i=this.offsetLeft,a=e.clientX;t(function(e){var t=i+(e.clientX-a),n=((n=f[0].offsetWidth)<(t=t<0?0:t)&&(t=n),Math.round(t/280*100)/100);c(h,m,y,g=n),e.preventDefault()}),e.preventDefault()}),f.on("click",function(e){var t=((t=(t=e.clientX-C(this).offset().left)<0?0:t)>this.offsetWidth&&(t=this.offsetWidth),Math.round(t/280*100)/100);c(h,m,y,g=t),e.preventDefault()}),n.each(function(){C(this).on("click",function(){C(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e=this.style.backgroundColor,t=x(k(e)),n=e.slice(e.lastIndexOf(",")+1,e.length-1);h=t.h,m=t.s,y=t.b,3===(e.match(/[0-9]{1,3}/g)||[]).length&&(n=1),g=n,c(t.h,t.s,t.b,n)})})},o.prototype.select=function(e,t,n,i){this.config;var a=w({h:e,s:100,b:100}),e=(w({h:e,s:t,b:n}),e/360*180),n=180-n/100*180-3,t=t/100*260-3;this.elemPicker.find("."+S).css("top",e),this.elemPicker.find("."+A)[0].style.background="#"+a,this.elemPicker.find("."+j).css({top:n,left:t})},o.prototype.pickerEvents=function(){var r=this,s=r.config,c=r.elemColorBox.find("."+D),d=r.elemPicker.find("."+M+" input"),n={clear:function(e){c[0].style.background="",r.elemColorBox.find("."+N).removeClass(T).addClass(E),r.color="",s.done&&s.done(""),r.removePicker()},confirm:function(e,t){var n,i,a,o,l=C.trim(d.val());-1>16,g:(65280&a)>>8,b:255&a},i=x(o),c[0].style.background=n="#"+w(i),r.elemColorBox.find("."+N).removeClass(E).addClass(T)),"change"===t?(r.select(i.h,i.s,i.b,t),s.change&&s.change(n)):(r.color=l,s.done&&s.done(l),r.removePicker())}};r.elemPicker.on("click","*[colorpicker-events]",function(){var e=C(this),t=e.attr("colorpicker-events");n[t]&&n[t].call(this,e)}),d.on("keyup",function(e){var t=C(this);n.confirm.call(this,t,13===e.keyCode?null:"change")})},o.prototype.events=function(){var e=this;e.config,e.elemColorBox.on("click",function(){e.renderPicker(),C(c)[0]&&(e.val(),e.side())})},d.on(t,function(e){var t,n,i;l.thisId&&(t=r.getThis(l.thisId))&&(n=t.config,i=t.elemColorBox.find("."+D),C(e.target).hasClass(s)||C(e.target).parents("."+s)[0]||C(e.target).hasClass(c.replace(/\./g,""))||C(e.target).parents(c)[0]||t.elemPicker&&(t.color?(e=x(k(t.color)),t.select(e.h,e.s,e.b)):t.elemColorBox.find("."+N).removeClass(T).addClass(E),i[0].style.background=t.color||"","function"==typeof n.cancel&&n.cancel(t.color),t.removePicker()))}),_.on("resize",function(){if(l.thisId){var e=r.getThis(l.thisId);if(e)return!(!e.elemPicker||!C(c)[0])&&void e.position()}}),r.that={},r.getThis=function(e){var t=r.that[e];return t||n.error(e?i+" instance with ID '"+e+"' not found":"ID argument required"),t},l.render=function(e){return e=new o(e),r.call(e)},e(i,l)}),layui.define("jquery",function(e){"use strict";function t(){this.config={}}var d=layui.$,u=(layui.hint(),layui.device()),s="element",c="layui-this",f="layui-show",r=".layui-tab-title",p=(t.prototype.set=function(e){return d.extend(!0,this.config,e),this},t.prototype.on=function(e,t){return layui.onevent.call(this,s,e,t)},t.prototype.tabAdd=function(e,t){var n,i=(o=d(".layui-tab[lay-filter="+e+"]")).children(r),a=i.children(".layui-tab-bar"),o=o.children(".layui-tab-content"),l=""+(t.title||"unnaming")+"";return a[0]?a.before(l):i.append(l),o.append('
      '+(t.content||"")+"
      "),t.change&&this.tabChange(e,t.id),i.data("LAY_TAB_CHANGE",t.change),b.tabAuto(t.change?"change":null),this},t.prototype.tabDelete=function(e,t){return e=d(".layui-tab[lay-filter="+e+"]").children(r).find('>li[lay-id="'+t+'"]'),b.tabDelete(null,e),this},t.prototype.tabChange=function(e,t){return e=d(".layui-tab[lay-filter="+e+"]").children(r).find('>li[lay-id="'+t+'"]'),b.tabClick.call(e[0],{liElem:e}),this},t.prototype.tab=function(n){n=n||{},i.on("click",n.headerElem,function(e){var t=d(this).index();b.tabClick.call(this,{index:t,options:n})})},t.prototype.progress=function(e,t){var n=(e=d("."+(n="layui-progress")+"[lay-filter="+e+"]").find("."+n+"-bar")).find("."+n+"-text");return e.css("width",function(){return/^.+\/.+$/.test(t)?100*new Function("return "+t)()+"%":t}).attr("lay-percent",t),n.text(t),this},".layui-nav"),h="layui-nav-item",y="layui-nav-bar",m="layui-nav-tree",g="layui-nav-child",v="layui-nav-more",x="layui-anim layui-anim-upbit",b={tabClick:function(e){var t=(e=e||{}).options||{},n=e.liElem||d(this),i=t.headerElem?n.parent():n.parents(".layui-tab").eq(0),t=t.bodyElem?d(t.bodyElem):i.children(".layui-tab-content").children(".layui-tab-item"),a="javascript:;"!==(a=n.find("a")).attr("href")&&"_blank"===a.attr("target"),o="string"==typeof n.attr("lay-unselect"),l=i.attr("lay-filter"),e="index"in e?e.index:n.parent().children("li").index(n);a||o||(n.addClass(c).siblings().removeClass(c),t.eq(e).addClass(f).siblings().removeClass(f)),layui.event.call(this,s,"tab("+l+")",{elem:i,index:e})},tabDelete:function(e,t){var n=(t=t||d(this).parent()).parent().children("li").index(t),i=t.closest(".layui-tab"),a=i.children(".layui-tab-content").children(".layui-tab-item"),o=i.attr("lay-filter");t.hasClass(c)&&(t.next()[0]&&t.next().is("li")?b.tabClick.call(t.next()[0],{index:n+1}):t.prev()[0]&&t.prev().is("li")&&b.tabClick.call(t.prev()[0],null,n-1)),t.remove(),a.eq(n).remove(),setTimeout(function(){b.tabAuto()},50),layui.event.call(this,s,"tabDelete("+o+")",{elem:i,index:n})},tabAuto:function(a){var o="layui-tab-more",l="layui-tab-bar",r="layui-tab-close",s=this;d(".layui-tab").each(function(){var e,t=d(this),n=t.children(".layui-tab-title"),i=(t.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),i=d('');s===window&&u.ie,t.attr("lay-allowclose")&&n.find("li").each(function(){var e,t=d(this);t.find("."+r)[0]||((e=d('')).on("click",b.tabDelete),t.append(e))}),"string"!=typeof t.attr("lay-unauto")&&(n.prop("scrollWidth")>n.outerWidth()+1||n.find("li").length&&n.height()>(e=n.find("li").eq(0).height())+e/2?("change"===a&&n.data("LAY_TAB_CHANGE")&&n.addClass(o),n.find("."+l)[0]||(n.append(i),t.attr("overflow",""),i.on("click",function(e){var t=n.hasClass(o);n[t?"removeClass":"addClass"](o)}))):(n.find("."+l).remove(),t.removeAttr("overflow")))})},hideTabMore:function(e){var t=d(".layui-tab-title");!0!==e&&"tabmore"===d(e.target).attr("lay-stope")||(t.removeClass("layui-tab-more"),t.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var e=d(this),t=e.closest(p),n=t.attr("lay-filter"),i=e.parent(),a=e.siblings("."+g),o="string"==typeof i.attr("lay-unselect");if("javascript:;"!==e.attr("href")&&"_blank"===e.attr("target")||o||a[0]||(t.find("."+c).removeClass(c),i.addClass(c)),t.hasClass(m)){var o=h+"ed",l=!i.hasClass(o),r=function(){d(this).css({display:""}),t.children("."+y).css({opacity:0})};if(a.is(":animated"))return;a.removeClass(x),a[0]&&(l?(a.slideDown(200,r),i.addClass(o)):(i.removeClass(o),a.show().slideUp(200,r)),"string"!=typeof t.attr("lay-accordion")&&"all"!==t.attr("lay-shrink")||((l=i.siblings("."+o)).removeClass(o),l.children("."+g).show().stop().slideUp(200,r)))}layui.event.call(this,s,"nav("+n+")",e)},collapse:function(){var e=d(this),t=e.find(".layui-colla-icon"),n=e.siblings(".layui-colla-content"),i=e.parents(".layui-collapse").eq(0),a=i.attr("lay-filter"),o="none"===n.css("display");"string"==typeof i.attr("lay-accordion")&&((i=i.children(".layui-colla-item").children("."+f)).siblings(".layui-colla-title").children(".layui-colla-icon").html(""),i.removeClass(f)),n[o?"addClass":"removeClass"](f),t.html(o?"":""),layui.event.call(this,s,"collapse("+a+")",{title:e,content:n,show:o})}},n=(t.prototype.render=t.prototype.init=function(e,t){var n=t?'[lay-filter="'+t+'"]':"";return(t={tab:function(){b.tabAuto.call({})},nav:function(){var l={},r={},s={},c="layui-nav-title";d(p+n).each(function(e){var t=d(this),n=d(''),i=t.find("."+h);t.find("."+y)[0]||(t.append(n),(t.hasClass(m)?i.find("dd,>."+c):i).on("mouseenter",function(){!function(e,t,n){var i,a=d(this),o=a.find("."+g);t.hasClass(m)?o[0]||(i=a.children("."+c),e.css({top:a.offset().top-t.offset().top,height:(i[0]?i:a).outerHeight(),opacity:1})):(o.addClass(x),o.hasClass("layui-nav-child-c")&&o.css({left:-(o.outerWidth()-a.width())/2}),o[0]?e.css({left:e.position().left+e.width()/2,width:0,opacity:0}):e.css({left:a.position().left+parseFloat(a.css("marginLeft")),top:a.position().top+a.height()-e.height()}),l[n]=setTimeout(function(){e.css({width:o[0]?0:a.width(),opacity:o[0]?0:1})},u.ie&&u.ie<10?0:200),clearTimeout(s[n]),"block"===o.css("display")&&clearTimeout(r[n]),r[n]=setTimeout(function(){o.addClass(f),a.find("."+v).addClass(v+"d")},300))}.call(this,n,t,e)}).on("mouseleave",function(){t.hasClass(m)?n.css({height:0,opacity:0}):(clearTimeout(r[e]),r[e]=setTimeout(function(){t.find("."+g).removeClass(f),t.find("."+v).removeClass(v+"d")},300))}),t.on("mouseleave",function(){clearTimeout(l[e]),s[e]=setTimeout(function(){t.hasClass(m)||n.css({width:0,left:n.position().left+n.width()/2,opacity:0})},200)})),i.find("a").each(function(){var e=d(this);e.parent(),e.siblings("."+g)[0]&&!e.children("."+v)[0]&&e.append(''),e.off("click",b.clickThis).on("click",b.clickThis)})})},breadcrumb:function(){d(".layui-breadcrumb"+n).each(function(){var e=d(this),t="lay-separator",n=e.attr(t)||"/",i=e.find("a");i.next("span["+t+"]")[0]||(i.each(function(e){e!==i.length-1&&d(this).after(""+n+"")}),e.css("visibility","visible"))})},progress:function(){var i="layui-progress";d("."+i+n).each(function(){var e=d(this),t=e.find(".layui-progress-bar"),n=t.attr("lay-percent");t.css("width",function(){return/^.+\/.+$/.test(n)?100*new Function("return "+n)()+"%":n}),e.attr("lay-showpercent")&&setTimeout(function(){t.html(''+n+"")},350)})},collapse:function(){d(".layui-collapse"+n).each(function(){d(this).find(".layui-colla-item").each(function(){var e=(t=d(this)).find(".layui-colla-title"),t="none"===t.find(".layui-colla-content").css("display");e.find(".layui-colla-icon").remove(),e.append(''+(t?"":"")+""),e.off("click",b.collapse).on("click",b.collapse)})})}})[e]?t[e]():layui.each(t,function(e,t){t()})},new t),i=d(document);d(function(){n.render()}),i.on("click",".layui-tab-title li",b.tabClick),d(window).on("resize",b.tabAuto),e(s,n)}),layui.define(["lay","layer"],function(e){"use strict";function v(e){this.index=++o.index,this.config=x.extend({},this.config,o.config,e),this.render()}var x=layui.$,a=layui.lay,t=layui.layer,b=layui.device(),n="upload",r="layui_upload_index",o={config:{},index:layui[n]?layui[n].index+1e4:0,set:function(e){return this.config=x.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,n,e,t)}},l=function(){var t=this,e=t.config.id;return{upload:function(e){t.upload.call(t,e)},reload:function(e){t.reload.call(t,e)},config:(l.that[e]=t).config}},s="layui-upload-file",c="layui-upload-form",w="layui-upload-iframe",k="layui-upload-choose",C="UPLOADING";v.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",force:"",field:"file",acceptMime:"",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1,text:{"cross-domain":"Cross-domain requests are not supported","data-format-error":"Please return JSON data format","check-error":"",error:"","limit-number":null,"limit-size":null}},v.prototype.reload=function(e){this.config=x.extend({},this.config,e),this.render(!0)},v.prototype.render=function(e){var t=this,n=t.config,i=x(n.elem);return 1"].join("")),i=t.elem.next();(i.hasClass(s)||i.hasClass(c))&&i.remove(),b.ie&&b.ie<10&&t.elem.wrap('
      '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),b.ie&&b.ie<10&&e.initIE()},v.prototype.initIE=function(){var n,e=this.config,t=x(''),i=x(['
      ',"
      "].join(""));x("#"+w)[0]||x("body").append(t),e.elem.next().hasClass(c)||(this.elemFile.wrap(i),e.elem.next("."+c).append((n=[],layui.each(e.data,function(e,t){t="function"==typeof t?t():t,n.push('')}),n.join(""))))},v.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},v.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},v.prototype.preview=function(i){window.FileReader&&layui.each(this.chooseFiles,function(e,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){i&&i(e,t,this.result)}})},v.prototype.upload=function(e,t){function i(){return e||s.files||s.chooseFiles||r.files}var n,a,o,l,s=this,c=s.config,d=c.text||{},r=s.elemFile[0],u=function(){function a(){c.multiple&&o+l===s.fileLength&&"function"==typeof c.allDone&&c.allDone({total:s.fileLength,successful:o,failed:l})}function n(n){function t(e){n.unified?layui.each(r,function(e,t){delete t[C]}):delete e[C]}var i=new FormData;if(layui.each(c.data,function(e,t){t="function"==typeof t?t():t,i.append(e,t)}),n.unified)layui.each(r,function(e,t){t[C]||(t[C]=!0,i.append(c.field,t))});else{if(n.file[C])return;i.append(c.field,n.file),n.file[C]=!0}var e={url:c.url,type:"post",data:i,dataType:c.dataType||"json",contentType:!1,processData:!1,headers:c.headers||{},success:function(e){c.unified?o+=s.fileLength:o++,f(n.index,e),a(n.index),t(n.file)},error:function(e){c.unified?l+=s.fileLength:l++,s.msg(d.error||["Upload failed, please try again.","status: "+(e.status||"")+" - "+(e.statusText||"error")].join("
      ")),p(n.index),a(n.index),t(n.file)}};"function"==typeof c.progress&&(e.xhr=function(){var e=x.ajaxSettings.xhr();return e.upload.addEventListener("progress",function(e){var t;e.lengthComputable&&(t=Math.floor(e.loaded/e.total*100),c.progress(t,(c.item||c.elem)[0],e,n.index))}),e}),x.ajax(e)}var o=0,l=0,r=i();c.unified?n({unified:!0,index:0}):layui.each(r,function(e,t){n({index:e,file:t})})},f=function(e,t){if(s.elemFile.next("."+k).remove(),r.value="","json"===c.force&&"object"!=typeof t)try{t=JSON.parse(t)}catch(e){return t={},s.msg(d["data-format-error"])}"function"==typeof c.done&&c.done(t,e||0,function(e){s.upload(e)})},p=function(e){c.auto&&(r.value=""),"function"==typeof c.error&&c.error(e||0,function(e){s.upload(e)})},h=c.exts,y=(a=[],layui.each(e||s.chooseFiles,function(e,t){a.push(t.name)}),a),m={preview:function(e){s.preview(e)},upload:function(e,t){var n={};n[e]=t,s.upload(n)},pushFile:function(){return s.files=s.files||{},layui.each(s.chooseFiles,function(e,t){s.files[e]=t}),s.files},resetFile:function(e,t,n){t=new File([t],n),s.files=s.files||{},s.files[e]=t}},g={file:"文件",images:"图片",video:"视频",audio:"音频"}[c.accept]||"文件";if(0!==(y=0===y.length?r.value.match(/[^\/\\]+\..+/g)||[]:y).length){switch(c.accept){case"file":layui.each(y,function(e,t){if(h&&!RegExp(".\\.("+h+")$","i").test(escape(t)))return n=!0});break;case"video":layui.each(y,function(e,t){if(!RegExp(".\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(t)))return n=!0});break;case"audio":layui.each(y,function(e,t){if(!RegExp(".\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(t)))return n=!0});break;default:layui.each(y,function(e,t){if(!RegExp(".\\.("+(h||"jpg|png|gif|bmp|jpeg|svg")+")$","i").test(escape(t)))return n=!0})}return n?(s.msg(d["check-error"]||"选择的"+g+"中包含不支持的格式"),r.value=""):"choose"!==t&&!c.auto||(c.choose&&c.choose(m),"choose"!==t)?(s.fileLength=(o=0,g=i(),layui.each(g,function(){o++}),o),c.number&&s.fileLength>c.number?s.msg("function"==typeof d["limit-number"]?d["limit-number"](c,s.fileLength):"同时最多只能上传: "+c.number+" 个文件
      您当前已经选择了: "+s.fileLength+" 个文件"):01024*c.size&&(t=1<=(t=c.size/1024)?t.toFixed(2)+"MB":c.size+"KB",r.value="",l=t)}),l)?s.msg("function"==typeof d["limit-size"]?d["limit-size"](c,l):"文件大小不能超过 "+l):void(c.before&&!1===c.before(m)||(!b.ie||9'+e+"")}var o=this,l=o.config;l.elem.off("upload.start").on("upload.start",function(){var e=x(this);o.config.item=e,o.elemFile[0].click()}),b.ie&&b.ie<10||l.elem.off("upload.over").on("upload.over",function(){x(this).attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){x(this).removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(e,t){var n=x(this),t=t.originalEvent.dataTransfer.files||[];n.removeAttr("lay-over"),i(t),l.auto?o.upload():a(t)}),o.elemFile.on("change",function(){var e=this.files||[];0!==e.length&&(i(e),l.auto?o.upload():a(e))}),l.bindAction.off("upload.action").on("upload.action",function(){o.upload()}),l.elem.data(r)||(l.elem.on("click",function(){o.isFile()||x(this).trigger("upload.start")}),l.drag&&l.elem.on("dragover",function(e){e.preventDefault(),x(this).trigger("upload.over")}).on("dragleave",function(e){x(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),x(this).trigger("upload.drop",e)}),l.bindAction.on("click",function(){x(this).trigger("upload.action")}),l.elem.data(r,l.id))},l.that={},l.getThis=function(e){var t=l.that[e];return t||hint.error(e?n+" instance with ID '"+e+"' not found":"ID argument required"),t},o.render=function(e){return e=new v(e),l.call(e)},e(n,o)}),layui.define(["lay","layer","util"],function(e){"use strict";var k=layui.$,p=layui.layer,c=layui.util,o=layui.hint(),C=(layui.device(),"form"),s=".layui-form",T="layui-this",E="layui-hide",D="layui-disabled",t=((n=function(){this.config={verify:{required:function(e){if(!/[\S]+/.test(e))return"必填项不能为空"},phone:function(e){if(e&&!/^1\d{10}$/.test(e))return"手机号格式不正确"},email:function(e){if(e&&!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e))return"邮箱格式不正确"},url:function(e){if(e&&!/^(#|(http(s?)):\/\/|\/\/)[^\s]+\.[^\s]+$/.test(e))return"链接格式不正确"},number:function(e){if(e&&isNaN(e))return"只能填写数字"},date:function(e){if(e&&!/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/.test(e))return"日期格式不正确"},identity:function(e){if(e&&!/(^\d{15}$)|(^\d{17}(x|X|\d)$)/.test(e))return"身份证号格式不正确"}},autocomplete:null}}).prototype.set=function(e){return k.extend(!0,this.config,e),this},n.prototype.verify=function(e){return k.extend(!0,this.config.verify,e),this},n.prototype.getFormElem=function(e){return k(s+(e?'[lay-filter="'+e+'"]':""))},n.prototype.on=function(e,t){return layui.onevent.call(this,C,e,t)},n.prototype.val=function(e,n){return this.getFormElem(e).each(function(e,t){var i=k(this);layui.each(n,function(e,t){var n;(e=i.find('[name="'+e+'"]'))[0]&&("checkbox"===(n=e[0].type)?e[0].checked=t:"radio"===n?e.each(function(){this.checked=this.value==t}):e.val(t))})}),l.render(null,e),this.getValue(e)},n.prototype.getValue=function(e,t){t=t||this.getFormElem(e);var i={},a={},e=t.find("input,select,textarea");return layui.each(e,function(e,t){var n;k(this),t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name&&(/^.*\[\]$/.test(t.name)&&(n=t.name.match(/^(.*)\[\]$/g)[0],i[n]=0|i[n],n=t.name.replace(/^(.*)\[\]$/,"$1["+i[n]+++"]")),/^(checkbox|radio)$/.test(t.type)&&!t.checked||(a[n||t.name]=t.value))}),a},n.prototype.render=function(e,t){var n=this.config,i=k(s+(t?'[lay-filter="'+t+'"]':"")),a={input:function(e){var e=e||i.find("input,textarea"),t=(n.autocomplete&&e.attr("autocomplete",n.autocomplete),function(e,t){var n=e.val(),i=Number(n),a=Number(e.attr("step"))||1,o=Number(e.attr("min")),l=Number(e.attr("max")),r=Number(e.attr("lay-precision")),s="click"!==t&&""===n,c="init"===t;isNaN(i)||("click"===t&&(i=k(this).index()?i-a:i+a),t=function(e){return((e.toString().match(/\.(\d+$)/)||[])[1]||"").length},r=0<=r?r:Math.max(t(a),t(n)),s||(c||l<=(i=i<=o?o:i)&&(i=l),r&&(i=i.toFixed(r)),e.val(i)),e[(i'),e=layui.isArray(n.value)?n.value:[n.value],e=k((i=[],layui.each(e,function(e,t){i.push('')}),i.join(""))),a=(t.append(e),n.split&&t.addClass("layui-input-split"),n.className&&t.addClass(n.className),r.next("."+u)),o=(a[0]&&a.remove(),r.parent().hasClass(c)||r.wrap('
      '),r.next("."+d));o[0]?((a=o.find("."+u))[0]&&a.remove(),o.prepend(t),r.css("padding-right",function(){return(r.closest(".layui-input-group")[0]?0:o.outerWidth())+t.outerWidth()})):(t.addClass(d),r.after(t)),"auto"===n.show&&l(t,r.val()),"function"==typeof n.init&&n.init.call(this,r,n),r.on("input propertychange",function(){var e=this.value;"auto"===n.show&&l(t,e)}),r.on("blur",function(){"function"==typeof n.blur&&n.blur.call(this,r,n)}),e.on("click",function(){var e=r.attr("lay-filter");k(this).hasClass(D)||("function"==typeof n.click&&n.click.call(this,r,n),layui.event.call(this,C,"input-affix("+e+")",{elem:r[0],affix:s,options:n}))})}var r=k(this),s=r.attr("lay-affix"),c="layui-input-wrap",d="layui-input-suffix",u="layui-input-affix",e=r.is("[disabled]")||r.is("[readonly]"),f={eye:{value:"eye-invisible",click:function(e,t){var n="LAY_FORM_INPUT_AFFIX_SHOW",i=e.data(n);e.attr("type",i?"password":"text").data(n,!i),a({value:i?"eye-invisible":"eye"})}},clear:{value:"clear",click:function(e){e.val("").focus(),l(k(this).parent(),null)},show:"auto",disabled:e},number:{value:["up","down"],split:!0,className:"layui-input-number",disabled:r.is("[disabled]"),init:function(e){t.call(this,e,"init")},click:function(e){t.call(this,e,"click")},blur:function(e){t.call(this,e,"blur")}}};a()})},select:function(e){function m(e,t){k(e.target).parent().hasClass(x)&&!t||(k("."+v).removeClass(v+"ed "+v+"up"),g&&w&&g.val(w)),g=null}var g,v="layui-form-select",x="layui-select-title",b="layui-select-none",w="",e=e||i.find("select");e.each(function(e,t){var n=k(this),i=n.next("."+v),a=this.disabled,o=t.value,l=k(t.options[t.selectedIndex]),t=t.options[0];if("string"==typeof n.attr("lay-ignore"))return n.show();var r,s="string"==typeof n.attr("lay-search"),t=t&&!t.value&&t.innerHTML||"请选择",l=k(['
      ','
      ','','
      ','
      ',(t=n.find("*"),r=[],layui.each(t,function(e,t){var n=t.tagName.toLowerCase();0!==e||t.value||"optgroup"===n?r.push("optgroup"===n?"
      "+t.label+"
      ":'
      '+k.trim(t.innerHTML)+"
      "):r.push('
      '+k.trim(t.innerHTML||"请选择")+"
      ")}),0===r.length&&r.push('
      没有选项
      '),r.join("")+"
      "),"
      "].join(""));i[0]&&i.remove(),n.after(l),function(i,e,t){var r,l,n,a,s,o,c,d=k(this),u=i.find("."+x),f=u.find("input"),p=i.find("dl"),h=p.children("dd"),y=p.children("dt");this.selectedIndex;e||(l=d.attr("lay-search"),n=function(){var e=i.offset().top+i.outerHeight()+5-N.scrollTop(),t=p.outerHeight();c=d[0].selectedIndex,i.addClass(v+"ed"),h.removeClass(E),y.removeClass(E),r=null,h.removeClass(T),0<=c&&h.eq(c).addClass(T),e+t>N.height()&&t<=e&&i.addClass(v+"up"),s()},a=function(e){i.removeClass(v+"ed "+v+"up"),f.blur(),r=null,e||o(f.val(),function(e){var t=d[0].selectedIndex;e&&(w=k(d[0].options[t]).html(),0===t&&w===f.attr("placeholder")&&(w=""),f.val(w||""))})},s=function(){var e,t,n=p.children("dd."+T);n[0]&&(e=n.position().top,t=p.height(),n=n.height(),t无匹配项

      '):p.find("."+b).remove()},"keyup"),""===t&&(d.val(""),p.find("."+T).removeClass(T),(d[0].options[0]||{}).value||p.children("dd:eq(0)").addClass(T),p.find("."+b).remove()),s()}).on("blur",function(e){var t=d[0].selectedIndex;g=f,w=k(d[0].options[t]).text(),0===t&&w===f.attr("placeholder")&&(w=""),setTimeout(function(){o(f.val(),function(e){w||f.val("")},"blur")},200)}),h.on("click",function(){var e=k(this),t=e.attr("lay-value"),n=d.attr("lay-filter");return e.hasClass(D)||(e.hasClass("layui-select-tips")?f.val(""):(f.val(e.text()),e.addClass(T)),e.siblings().removeClass(T),d.val(t).removeClass("layui-form-danger"),layui.event.call(this,C,"select("+n+")",{elem:d[0],value:t,othis:i}),a(!0)),!1}),i.find("dl>dt").on("click",function(e){return!1}),k(document).off("click",m).on("click",m))}.call(this,l,a,s)})},checkbox:function(e){var s={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],switch:["layui-form-switch","layui-form-onswitch","switch"],SUBTRA:"layui-icon-indeterminate"};(e=e||i.find("input[type=checkbox]")).each(function(e,t){var n=k(this),i=n.attr("lay-skin")||"primary",a=c.escape(k.trim(t.title||(t.title=n.attr("lay-text")||""))),o=this.disabled,l=s[i]||s.checkbox,r=n.next("."+l[0]);if(r[0]&&r.remove(),n.next("[lay-checkbox]")[0]&&(a=n.next().html()||""),a="switch"===i?a.split("|"):[a],"string"==typeof n.attr("lay-ignore"))return n.show();o=k(['
      ",(r={checkbox:[a[0]?"
      "+a[0]+"
      ":"primary"===i?"":"
      ",''].join(""),switch:"
      "+((t.checked?a[0]:a[1])||"")+"
      "})[i]||r.checkbox,"
      "].join("")),n.after(o),function(i,a){var o=k(this);i.on("click",function(){var e=k(this),t=o.attr("lay-filter"),e=e.next("*[lay-checkbox]")[0]?e.next().html():o.attr("title")||"",n=o.attr("lay-skin")||"primary",e="switch"===n?e.split("|"):[e];o[0].disabled||(o[0].indeterminate&&(o[0].indeterminate=!1,i.find("."+s.SUBTRA).removeClass(s.SUBTRA).addClass("layui-icon-ok")),o[0].checked?(o[0].checked=!1,i.removeClass(a[1]),"switch"===n&&i.children("div").html(e[1])):(o[0].checked=!0,i.addClass(a[1]),"switch"===n&&i.children("div").html(e[0])),layui.event.call(o[0],C,a[2]+"("+t+")",{elem:o[0],value:o[0].value,othis:i}))})}.call(this,o,l)})},radio:function(e){var l="layui-form-radio",r=["layui-icon-radio","layui-icon-circle"];(e=e||i.find("input[type=radio]")).each(function(e,t){var n=k(this),i=n.next("."+l),a=this.disabled;if("string"==typeof n.attr("lay-ignore"))return n.show();i[0]&&i.remove(),a=k(['
      ','',"
      "+(i=c.escape(t.title||""),i=n.next("[lay-radio]")[0]?n.next().html():i)+"
      ","
      "].join("")),n.after(a),function(i){var a=k(this),o="layui-anim-scaleSpring";i.on("click",function(){var e=a[0].name,t=a.parents(s),n=a.attr("lay-filter"),e=t.find("input[name="+e.replace(/(\.|#|\[|\])/g,"\\$1")+"]");a[0].disabled||(layui.each(e,function(){var e=k(this).next("."+l);this.checked=!1,e.removeClass(l+"ed"),e.children(".layui-icon").removeClass(o+" "+r[0]).addClass(r[1])}),a[0].checked=!0,i.addClass(l+"ed"),i.children(".layui-icon").addClass(o+" "+r[0]),layui.event.call(a[0],C,"radio("+n+")",{elem:a[0],value:a[0].value,othis:i}))})}.call(this,a)})}},t=function(){layui.each(a,function(e,t){t()})};return"object"===layui.type(e)?k(e).is(s)?(i=k(e),t()):e.each(function(e,t){var n=k(t);n.closest(s).length&&("SELECT"===t.tagName?a.select(n):"INPUT"===t.tagName&&("checkbox"===(t=t.type)||"radio"===t?a[t](n):a.input(n)))}):e?a[e]?a[e]():o.error('不支持的 "'+e+'" 表单渲染'):t(),this},n.prototype.validate=function(e){var d,u=this.config.verify,f="layui-form-danger";return!(e=k(e))[0]||(void 0!==e.attr("lay-verify")||!1!==this.validate(e.find("*[lay-verify]")))&&(layui.each(e,function(e,l){var r=k(this),t=(r.attr("lay-verify")||"").split("|"),s=r.attr("lay-vertype"),c=k.trim(r.val());if(r.removeClass(f),layui.each(t,function(e,t){var n="",i=u[t];if(i){var a="function"==typeof i?n=i(c,l):!i[0].test(c),o="select"===l.tagName.toLowerCase()||/^(checkbox|radio)$/.test(l.type),n=n||i[1];if("required"===t&&(n=r.attr("lay-reqtext")||n),a)return"tips"===s?p.tips(n,"string"!=typeof r.attr("lay-ignore")&&o?r.next():r,{tips:1}):"alert"===s?p.alert(n,{title:"提示",shadeClose:!0}):/\b(string|number)\b/.test(typeof n)&&p.msg(n,{icon:5,shift:6}),setTimeout(function(){(o?r.next().find("input"):l).focus()},7),r.addClass(f),d=!0}}),d)return d}),!d)},n.prototype.submit=function(e,t){var n,i=k(this),e="string"==typeof e?e:i.attr("lay-filter"),a=this.getFormElem?this.getFormElem(e):i.parents(s).eq(0),o=a.find("*[lay-verify]");return!!l.validate(o)&&(n=l.getValue(null,a),o={elem:this.getFormElem?window.event&&window.event.target:this,form:(this.getFormElem?a:i.parents("form"))[0],field:n},"function"==typeof t&&t(o),layui.event.call(this,C,"submit("+e+")",o))}),l=new n,n=k(document),N=k(window);k(function(){l.render()}),n.on("reset",s,function(){var e=k(this).attr("lay-filter");setTimeout(function(){l.render(null,e)},50)}),n.on("submit",s,t).on("click","*[lay-submit]",t),e(C,l)}),layui.define(["lay","laytpl","laypage","form","util"],function(e){"use strict";function h(){var n=this,e=n.config,i=e.id||e.index;return{config:e,loading:function(e){n.loading(!e)},reload:function(e,t){n.reload.call(n,e,t)},reloadData:function(e,t){C.reloadData(i,e,t)},setColsWidth:function(){n.setColsWidth.call(n)},resize:function(){n.resize.call(n)}}}function y(e){var t=h.that[e];return t||p.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null}function a(e){var t=h.config[e];return t||p.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null}function m(e){var t=this.config||{},n=(e=e||{}).item3,i=e.content;return"numbers"===n.type&&(i=e.tplData[C.config.numbersName]),("escape"in n?n:t).escape&&(i=b.escape(i)),(t=e.text&&n.exportTemplet||n.templet||n.toolbar)&&(i="function"==typeof t?t.call(n,e.tplData,e.obj):g(w(t).html()||String(i)).render(w.extend({LAY_COL:n},e.tplData))),e.text?w("
      "+i+"
      ").text():i}function t(e){return['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',(e=e||{}).fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':"","{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
      ','
      ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{-item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
      ","
      "].join("")}function n(e){this.index=++C.index,this.config=w.extend({},this.config,C.config,e),this.render()}var w=layui.$,s=layui.lay,g=layui.laytpl,f=layui.laypage,v=layui.layer,x=layui.form,b=layui.util,p=layui.hint(),k=layui.device(),C={config:{checkName:"LAY_CHECKED",indexName:"LAY_INDEX",numbersName:"LAY_NUM",disabledName:"LAY_DISABLED"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){return this.config=w.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,T,e,t)}},T="table",o=".layui-table",E="layui-hide",D="layui-hide-v",N="layui-none",S="layui-table-view",l=".layui-table-header",A=".layui-table-body",c=".layui-table-fixed-r",L=".layui-table-pageview",I=".layui-table-sort",j="layui-table-checked",M="layui-table-edit",_="layui-table-hover",H="laytable-cell-group",F="layui-table-col-special",O="layui-table-tool-panel",P="layui-table-expanded",R="LAY_TABLE_MOVE_DICT",i=['',"","
      "].join(""),r=[,"{{# if(d.data.toolbar){ }}",'
      ','
      ','
      ',"
      ","{{# } }}",'
      ',"{{# if(d.data.loading){ }}",'
      ','',"
      ","{{# } }}","{{# var left, right; }}",'
      ',t(),"
      ",'
      ',i,"
      ","{{# if(left){ }}",'
      ','
      ',t({fixed:!0}),"
      ",'
      ',i,"
      ","
      ","{{# }; }}","{{# if(right){ }}",'
      ','
      ',t({fixed:"right"}),'
      ',"
      ",'
      ',i,"
      ","
      ","{{# }; }}","
      ","{{# if(d.data.totalRow){ }}",'
      ','','',"
      ","
      ","{{# } }}",'
      ','
      ',"
      "].join(""),d=w(window),q=w(document),u=(n.prototype.config={limit:10,loading:!0,escape:!0,cellMinWidth:60,cellMaxWidth:Number.MAX_VALUE,editTrigger:"click",defaultToolbar:["filter","exports","print"],defaultContextmenu:!0,autoScrollTop:!0,autoColumnWidth:!1,autoSort:!0,text:{none:"无数据"},cols:[]},String.prototype.contentWidth=function(e,t,n){n=n||!1;var t=t||e.css("font"),i=w("
      "),n=(n?i.text(this):i.html(this),i.css({position:"absolute",float:"left","white-space":"nowrap",visibility:"hidden",font:t}).appendTo(e),i.width());return i.remove(),n},n.prototype.render=function(e){var t=this,n=t.config,i=(n.elem=w(n.elem),n.where=n.where||{},n.id="id"in n?n.id:n.elem.attr("id")||t.index);if(h.that[i]=t,(h.config[i]=n).request=w.extend({pageName:"page",limitName:"limit"},n.request),n.response=w.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",totalRowName:"totalRow",countName:"count"},n.response),null!==n.page&&"object"==typeof n.page&&(n.limit=n.page.limit||n.limit,n.limits=n.page.limits||n.limits,t.page=n.page.curr=n.page.curr||1,delete n.page.elem,delete n.page.jump),!n.elem[0])return t;if(n.elem.attr("lay-filter")||n.elem.attr("lay-filter",n.id),"reloadData"===e)return t.pullData(t.page,{type:"reloadData"});n.index=t.index,t.key=n.id||n.index,t.setInit(),n.height&&/^full-.+$/.test(n.height)?(t.fullHeightGap=parseFloat(n.height.split("-")[1])||0,n.height=d.height()-t.fullHeightGap):n.height&&/^#\w+\S*-.+$/.test(n.height)&&(i=n.height.split("-"),t.parentHeightGap=parseFloat(i.pop())||0,t.parentDiv=i.join("-"),n.height=w(t.parentDiv).height()-t.parentHeightGap);var i=(e=n.elem).next("."+S),a=t.elem=w("
      "),o=(a.addClass((o=[S,S+"-"+t.index,"layui-form","layui-border-box"],n.className&&o.push(n.className),o.join(" "))).attr({"lay-filter":"LAY-TABLE-FORM-DF-"+t.index,"lay-id":n.id,style:(o=[],n.width&&o.push("width:"+n.width+"px;"),o.join(""))}).html(g(r,{open:"{{",close:"}}"}).render({data:n,index:t.index})),t.renderStyle(),t.layBody?t.layBody.scrollLeft():0);i[0]&&i.remove(),e.after(a),t.layTool=a.find(".layui-table-tool"),t.layBox=a.find(".layui-table-box"),t.layHeader=a.find(l),t.layMain=a.find(".layui-table-main"),t.layBody=a.find(A),t.layFixed=a.find(".layui-table-fixed"),t.layFixLeft=a.find(".layui-table-fixed-l"),t.layFixRight=a.find(c),t.layTotal=a.find(".layui-table-total"),t.layPage=a.find(".layui-table-page"),t.renderToolbar(),t.renderPagebar(),t.fullSize(),t.pullData(t.page),t.events(),t.layBody[0].scrollLeft=o},n.prototype.initOpts=function(e){this.config,e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||{checkbox:50,radio:50,space:30,numbers:60}[e.type])},n.prototype.setInit=function(e){var i,n,r=this,s=r.config;if(s.clientWidth=s.width||(i=function(e){var t,n=(e=e||s.elem.parent()).width();try{t="none"===e.css("display")}catch(e){}return!e[0]||n&&!t?n:i(e.parent())})(),"width"===e)return s.clientWidth;s.height=s.maxHeight||s.height,s.css&&-1===s.css.indexOf(S)&&(n=s.css.split("}"),layui.each(n,function(e,t){t&&(n[e]="."+S+"-"+r.index+" "+t)}),s.css=n.join("}"));var c=function(n,e,i,a){var o,l;a?(a.key=[s.index,n,i].join("-"),a.colspan=a.colspan||0,a.rowspan=a.rowspan||0,r.initOpts(a),(o=n+(parseInt(a.rowspan)||1)) td:hover > .layui-table-cell{overflow: auto;}"].concat(k.ie?[".layui-table-edit{height: "+i+";}","td[data-edit]:hover:after{height: "+i+";}"]:[]),function(e,t){t&&l.push(n+" "+t)})),a.css&&l.push(a.css),s.style({target:this.elem[0],text:l.join(""),id:"DF-table-"+o})},n.prototype.renderToolbar=function(){var e=this.config,t=['
      ','
      ','
      '].join(""),n=this.layTool.find(".layui-table-tool-temp"),i=("default"===e.toolbar?n.html(t):"string"==typeof e.toolbar&&(t=w(e.toolbar).html()||"")&&n.html(g(t).render(e)),{filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}}),a=[];"object"==typeof e.defaultToolbar&&layui.each(e.defaultToolbar,function(e,t){(t="string"==typeof t?i[t]:t)&&a.push('
      ')}),this.layTool.find(".layui-table-tool-self").html(a.join(""))},n.prototype.renderPagebar=function(){var e,t=this.config,n=this.layPagebar=w('
      ');t.pagebar&&((e=w(t.pagebar).html()||"")&&n.append(g(e).render(t)),this.layPage.append(n))},n.prototype.setParentCol=function(e,t){var n=this.config,i=this.layHeader.find('th[data-key="'+t+'"]'),a=parseInt(i.attr("colspan"))||0;i[0]&&(t=t.split("-"),t=n.cols[t[1]][t[2]],e?a--:a++,i.attr("colspan",a),i[a?"removeClass":"addClass"](E),t.colspan2=a,t.hide=a<1,n=i.data("parentkey"))&&this.setParentCol(e,n)},n.prototype.setColsPatch=function(){var n=this,e=n.config;layui.each(e.cols,function(e,t){layui.each(t,function(e,t){t.hide&&n.setParentCol(t.hide,t.parentKey)})})},n.prototype.setGroupWidth=function(i){var e,a=this;a.config.cols.length<=1||((e=a.layHeader.find((i?"th[data-key="+i.data("parentkey")+"]>":"")+"."+H)).css("width",0),layui.each(e.get().reverse(),function(){var e=w(this),t=e.parent().data("key"),n=0;a.layHeader.eq(0).find("th[data-parentkey="+t+"]").width(function(e,t){w(this).hasClass(E)||0 tr:first-child > th:last-child")).data("field")&&e.prev()[0]?t(e.prev()):e})()).data("key"),d.cssRules(g,function(e){var t=e.style.width||n.outerWidth();e.style.width=parseFloat(t)+v+"px",0table").width("auto"),u.autoColumnWidth&&(r=w("body"),g=d.elem.children(".layui-table-box").children(".layui-table-header").children("table").children("thead").children("tr").children("th"),e=d.elem.children(".layui-table-box").children(".layui-table-fixed").children(".layui-table-header").children("table").children("thead").children("tr").children("th"),s=d.elem.children(".layui-table-box").children(".layui-table-body").children("table").children("tbody").children("tr"),c=d.elem.children(".layui-table-total").find("tr"),g.add(e).on("dblclick",function(e){var t=w(this),e=e.clientX-t.offset().left,n=t.attr("data-key").split("-"),n=d.config.cols[n[1]][n[2]];b(t,0 table > tbody > tr"),e.each(function(e,t){w(t).find("table > tbody > tr").each(function(e,t){e=l.find("td:first").get(e).getBoundingClientRect().height,w(t).find("td:first").css({height:e+"px"})})}),d.loading(!0)},n.prototype.resize=function(){this.layMain&&(this.fullSize(),this.setColsWidth(),this.scrollPatch())},n.prototype.reload=function(e,t,n){var i=this;e=e||{},delete i.haveInit,layui.each(e,function(e,t){"array"===layui.type(t)&&delete i.config[e]}),i.config=w.extend(t,{},i.config,e),"reloadData"!==n&&(layui.each(i.config.cols,function(e,t){layui.each(t,function(e,t){delete t.colspan2})}),delete i.config.HAS_SET_COLS_PATCH),i.render(n)},n.prototype.errorView=function(e){var t=this,n=t.layMain.find("."+N),e=w('
      '+(e||"Error")+"
      ");n[0]&&(t.layNone.remove(),n.remove()),t.layFixed.addClass(E),t.layMain.find("tbody").html(""),t.layMain.append(t.layNone=e),t.layTotal.addClass(D),t.layPage.find(L).addClass(D),C.cache[t.key]=[],t.syncCheckAll(),t.renderForm(),t.setColsWidth()},n.prototype.page=1,n.prototype.pullData=function(n,t){function i(){"object"==typeof r.initSort&&l.sort({field:r.initSort.field,type:r.initSort.type,reloadType:t.type})}function a(e,t){l.setColsWidth(),"function"==typeof r.done&&r.done(e,n,e[c.countName],t)}var e,o,l=this,r=l.config,s=(r.HAS_SET_COLS_PATCH||l.setColsPatch(),r.HAS_SET_COLS_PATCH=!0,r.request),c=r.response;t=t||{},"function"==typeof r.before&&r.before(r),l.startTime=(new Date).getTime(),t.renderData?((e={})[c.dataName]=C.cache[l.key],e[c.countName]=r.url?"object"===layui.type(r.page)?r.page.count:e[c.dataName].length:r.data.length,"object"==typeof r.totalRow&&(e[c.totalRowName]=w.extend({},l.totalRow)),l.renderData({res:e,curr:n,count:e[c.countName],type:t.type,sort:!0}),a(e,"renderData")):r.url?(o={},r.page&&(o[s.pageName]=n,o[s.limitName]=r.limit),s=w.extend(o,r.where),r.contentType&&0==r.contentType.indexOf("application/json")&&(s=JSON.stringify(s)),l.loading(),w.ajax({type:r.method||"get",url:r.url,contentType:r.contentType,data:s,dataType:r.dataType||"json",jsonpCallback:r.jsonpCallback,headers:r.headers||{},complete:"function"==typeof r.complete?r.complete:void 0,success:function(e){(e="function"==typeof r.parseData&&r.parseData(e)||e)[c.statusName]!=c.statusCode?l.errorView(e[c.msgName]||'返回的数据不符合规范,正确的成功状态码应为:"'+c.statusName+'": '+c.statusCode):(l.totalRow=e[c.totalRowName],l.renderData({res:e,curr:n,count:e[c.countName],type:t.type}),i(),r.time=(new Date).getTime()-l.startTime+" ms"),a(e)},error:function(e,t){l.errorView("请求异常,错误提示:"+t),"function"==typeof r.error&&r.error(e,t)}})):"array"===layui.type(r.data)&&(e={},o=n*r.limit-r.limit,s=r.data.concat(),e[c.dataName]=r.page?s.splice(o,r.limit):s,e[c.countName]=r.data.length,"object"==typeof r.totalRow&&(e[c.totalRowName]=w.extend({},r.totalRow)),l.totalRow=e[c.totalRowName],l.renderData({res:e,curr:n,count:e[c.countName],type:t.type}),i(),a(e))},n.prototype.eachCols=function(e){return C.eachCols(null,e,this.config.cols),this},n.prototype.col=function(e){try{return e=e.split("-"),this.config.cols[e[1]][e[2]]||{}}catch(e){return p.error(e),{}}},n.prototype.getTrHtml=function(t,n,a,e){var d=this,u=d.config,o=e&&e.trs||[],f=e&&e.trs_fixed||[],p=e&&e.trs_fixed_r||[];return a=a||1,layui.each(t,function(e,l){var i=[],r=[],s=[],c=e+u.limit*(a-1)+1;if("object"!=typeof l){t[e]=l={LAY_KEY:l};try{C.cache[d.key][e]=l}catch(e){}}"array"===layui.type(l)&&0===l.length||(l[C.config.numbersName]=c,n||(l[C.config.indexName]=e),d.eachCols(function(e,a){var t,e=a.field||e,n=a.key,o=l[e];null!=o||(o=""),a.colGroup||(e=['','
      "+function(){var e,t=w.extend(!0,{LAY_COL:a},l),n=C.config.checkName,i=C.config.disabledName;switch(a.type){case"checkbox":return'';case"radio":return'';case"numbers":return c}return a.toolbar?g(w(a.toolbar).html()||"").render(t):m.call(d,{item3:a,content:o,tplData:t})}(),"
      "].join(""),i.push(e),a.fixed&&"right"!==a.fixed&&r.push(e),"right"===a.fixed&&s.push(e))}),e=['data-index="'+e+'"'],l[C.config.checkName]&&e.push('class="'+j+'"'),e=e.join(" "),o.push(""+i.join("")+""),f.push(""+r.join("")+""),p.push(""+s.join("")+""))}),{trs:o,trs_fixed:f,trs_fixed_r:p}},C.getTrHtml=function(e,t){return(e=y(e)).getTrHtml(t,null,e.page)},n.prototype.renderData=function(e){function t(){if(!r&&n.sortKey)return n.sort({field:n.sortKey.field,type:n.sortKey.sort,pull:!0,reloadType:e.type});n.getTrHtml(s,r,o,{trs:c,trs_fixed:d,trs_fixed_r:u}),!i.autoScrollTop||"fixed"===i.scrollPos&&"reloadData"===e.type||n.layBody.scrollTop(0),"reset"===i.scrollPos&&n.layBody.scrollLeft(0),n.layMain.find("."+N).remove(),n.layMain.find("tbody").html(c.join("")),n.layFixLeft.find("tbody").html(d.join("")),n.layFixRight.find("tbody").html(u.join("")),n.syncCheckAll(),n.renderForm(),n.fullSize(),n.haveInit?n.scrollPatch():setTimeout(function(){n.scrollPatch()},50),n.haveInit=!0,v.close(n.tipsIndex)}var n=this,i=n.config,a=e.res,o=e.curr,l=n.count=e.count,r=e.sort,s=a[i.response.dataName]||[],a=a[i.response.totalRowName],c=[],d=[],u=[];return C.cache[n.key]=s,n.layTotal[0==s.length?"addClass":"removeClass"](D),n.layPage[i.page||i.pagebar?"removeClass":"addClass"](E),n.layPage.find(L)[!i.page||0==l||0===s.length&&1==o?"addClass":"removeClass"](D),0===s.length?n.errorView(i.text.none):(n.layFixLeft.removeClass(E),r?t():(t(),n.renderTotal(s,a),n.layTotal&&n.layTotal.removeClass(E),void(i.page&&(i.page=w.extend({elem:"layui-table-page"+i.index,count:l,limit:i.limit,limits:i.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(n.page=e.curr,i.limit=e.limit,n.pullData(e.curr))}},i.page),i.page.count=l,f.render(i.page)))))},C.renderData=function(e){(e=y(e))&&e.pullData(e.page,{renderData:!0,type:"reloadData"})},n.prototype.renderTotal=function(e,l){var r,s=this,c=s.config,d={};c.totalRow&&(layui.each(e,function(e,i){"array"===layui.type(i)&&0===i.length||s.eachCols(function(e,t){var e=t.field||e,n=i[e];t.totalRow&&(d[e]=(d[e]||0)+(parseFloat(n)||0))})}),s.dataTotal=[],r=[],s.eachCols(function(e,t){var n,e=t.field||e,i=l&&l[t.field],a="totalRowDecimals"in t?t.totalRowDecimals:2,a=d[e]?parseFloat(d[e]||0).toFixed(a):"",a=(n=t.totalRowText||"",(o={LAY_COL:t})[e]=a,o=t.totalRow&&m.call(s,{item3:t,content:a,tplData:o})||n,i||o),o=(t.field&&s.dataTotal.push({field:t.field,total:w("
      "+a+"
      ").text()}),['','
      "+("string"==typeof(n=t.totalRow||c.totalRow)?g(n).render(w.extend({TOTAL_NUMS:i||d[e],TOTAL_ROW:l||{},LAY_COL:t},t)):a),"
      "].join(""));r.push(o)}),e=s.layTotal.find(".layui-table-patch"),s.layTotal.find("tbody").html(""+r.join("")+(e.length?e.get(0).outerHTML:"")+""))},n.prototype.getColElem=function(e,t){return e.eq(0).find(".laytable-cell-"+t+":eq(0)")},n.prototype.renderForm=function(e){this.config;var t=this.elem.attr("lay-filter");x.render(e,t)},n.prototype.syncCheckAll=function(){var n,i=this.config,e=this.layHeader.find('input[name="layTableCheckbox"]'),t=C.checkStatus(this.key);e[0]&&(n=t.isAll,this.eachCols(function(e,t){"checkbox"===t.type&&(t[i.checkName]=n)}),e.prop({checked:t.isAll,indeterminate:!t.isAll&&t.data.length}),x.render(e))},n.prototype.setRowActive=function(e,t,n){if(this.config,e=this.layBody.find('tr[data-index="'+e+'"]'),t=t||"layui-table-click",n)return e.removeClass(t);e.addClass(t),e.siblings("tr").removeClass(t)},n.prototype.setRowChecked=function(n){function i(e){return"radio"===n.type||(t?n.checked:!e)}var a=this.config,o=this.layBody.find("tr"+("all"===n.index?"":'[data-index="'+n.index+'"]')),e=(n=w.extend({type:"checkbox"},n),C.cache[this.key]),t="checked"in n,l=(e=(layui.each(e,function(e,t){"array"===layui.type(t)||t[a.disabledName]||(Number(n.index)===e||"all"===n.index?(e=t[a.checkName]=i(t[a.checkName]),o[e?"addClass":"removeClass"](j),"radio"===n.type&&o.siblings().removeClass(j)):"radio"===n.type&&delete t[a.checkName])}),o.find('input[lay-type="'+({radio:"layTableRadio",checkbox:"layTableCheckbox"}[n.type]||"checkbox")+'"]:not(:disabled)'))).last(),r=l.closest(c);("radio"===n.type&&r.hasClass(E)?e.first():e).prop("checked",i(l.prop("checked"))),this.syncCheckAll(),this.renderForm(n.type)},n.prototype.sort=function(a){var e,t=this,n={},i=t.config,o=i.elem.attr("lay-filter"),l=C.cache[t.key];"string"==typeof(a=a||{}).field&&(r=a.field,t.layHeader.find("th").each(function(e,t){var n=w(this),i=n.data("field");if(i===a.field)return a.field=n,r=i,!1}));try{var r=r||a.field.data("field"),s=a.field.data("key");if(t.sortKey&&!a.pull&&r===t.sortKey.field&&a.type===t.sortKey.sort)return;var c=t.layHeader.find("th .laytable-cell-"+s).find(I);t.layHeader.find("th").find(I).removeAttr("lay-sort"),c.attr("lay-sort",a.type||null),t.layFixed.find("th")}catch(e){p.error("Table modules: sort field '"+r+"' not matched")}t.sortKey={field:r,sort:a.type},i.autoSort&&("asc"===a.type?e=layui.sort(l,r,null,!0):"desc"===a.type?e=layui.sort(l,r,!0,!0):(e=layui.sort(l,C.config.indexName,null,!0),delete t.sortKey,delete i.initSort)),n[i.response.dataName]=e||l,t.renderData({res:n,curr:t.page,count:t.count,sort:!0,type:a.reloadType}),a.fromEvent&&(i.initSort={field:r,type:a.type},layui.event.call(a.field,T,"sort("+o+")",w.extend({config:i},i.initSort)))},n.prototype.loading=function(e){this.config.loading&&(e?(this.layInit&&this.layInit.remove(),delete this.layInit,this.layBox.find(".layui-table-init").remove()):(this.layInit=w(['
      ','',"
      "].join("")),this.layBox.append(this.layInit)))},n.prototype.cssRules=function(t,n){var e=this.elem.children("style")[0];s.getStyleRules(e,function(e){if(e.selectorText===".laytable-cell-"+t)return n(e),!0})},n.prototype.fullSize=function(){var e,n,i=this,t=i.config,a=t.height;i.fullHeightGap?(a=d.height()-i.fullHeightGap)<135&&(a=135):i.parentDiv&&i.parentHeightGap&&(a=w(i.parentDiv).height()-i.parentHeightGap)<135&&(a=135),1
      ')).find("div").css({width:n}),e.find("tr").append(t)):e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal),o=e.layMain.height()-i,e.layFixed.find(A).css("height",t.height()>=o?o:"auto").scrollTop(e.layMain.scrollTop()),e.layFixRight[C.cache[e.key]&&C.cache[e.key].length&&0':''))[0].value=e.data("content")||i[n]||a.text(),e.find("."+M)[0]||e.append(o),o.focus(),t)&&layui.stope(t))}function t(e,t){var n=w(this),i=(l=n.parent()).data("key"),a=d.col(i),o=l.parent().data("index"),l=l.children(f),r="layui-table-cell-c",s=w('');"tips"===(t=t||a.expandedMode||u.cellExpandedMode)?d.tipsIndex=v.tips(['
      ',l.html(),"
      ",''].join(""),l[0],{tips:[3,""],time:-1,anim:-1,maxWidth:k.ios||k.android?300:d.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){v.close(t)})}}):(d.elem.find("."+r).trigger("click"),d.cssRules(i,function(e){var t=e.style.width,n=a.expandedWidth||u.cellExpandedWidth;n');n.html(t),u.height&&n.css("max-height",u.height-(d.layTool.outerHeight()||50)),i.find("."+O)[0]||i.append(n),d.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,t)}var n,i=w(this),a=i.attr("lay-event"),o=C.cache[u.id];switch(layui.stope(e),q.trigger("table.tool.panel.remove"),v.close(d.tipsIndex),a){case"LAYTABLE_COLS":t({list:(n=[],d.eachCols(function(e,t){t.field&&"normal"==t.type&&n.push('
    • "+(t.fieldTitle||t.title||t.field)+"
    • ").text())+'" lay-filter="LAY_TABLE_TOOL_COLS">')}),n.join("")),done:function(){x.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var e=w(e.elem),t=this.checked,n=e.data("key"),i=d.col(n),a=i.hide,e=e.data("parentkey");i.key&&(i.hide=!t,d.elem.find('*[data-key="'+n+'"]')[t?"removeClass":"addClass"](E),a!=i.hide&&d.setParentCol(!t,e),d.resize(),layui.event.call(this,T,"colToggled("+c+")",{col:i,config:u}))})}});break;case"LAYTABLE_EXPORT":if(!o.length)return v.tips("当前表格无数据",this,{tips:3});k.ie?v.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):t({list:['
    • 导出 csv 格式文件
    • ','
    • 导出 xls 格式文件
    • '].join(""),done:function(e,t){t.on("click",function(){var e=w(this).data("type");C.exportFile.call(d,u.id,null,e)})}});break;case"LAYTABLE_PRINT":if(!o.length)return v.tips("当前表格无数据",this,{tips:3});var l=window.open("about:blank","_blank"),r=[""].join(""),s=w(d.layHeader.html());s.append(d.layMain.find("table").html()),s.append(d.layTotal.find("table").html()),s.find("th.layui-table-patch").remove(),s.find("thead>tr>th."+F).filter(function(e,t){return!w(t).children("."+H).length}).remove(),s.find("tbody>tr>td."+F).remove(),l.document.write(r+s.prop("outerHTML")),l.document.close(),layui.device("edg").edg?(l.onafterprint=l.close,l.print()):(l.print(),l.close())}layui.event.call(this,T,"toolbar("+c+")",w.extend({event:a,config:u},{}))}),d.layHeader.on("click","*[lay-event]",function(e){var t=(n=w(this)).attr("lay-event"),n=n.closest("th").data("key"),n=d.col(n);layui.event.call(this,T,"colTool("+c+")",w.extend({event:t,config:u,col:n},{}))}),d.layPagebar.on("click","*[lay-event]",function(e){var t=w(this).attr("lay-event");layui.event.call(this,T,"pagebar("+c+")",w.extend({event:t,config:u},{}))}),e.on("mousemove",function(e){var t=w(this),n=t.offset().left,e=e.clientX-n;t.data("unresize")||h.eventMoveElem||(r.allowResize=t.width()-e<=10,l.css("cursor",r.allowResize?"col-resize":""))}).on("mouseleave",function(){w(this),h.eventMoveElem||l.css("cursor","")}).on("mousedown",function(e){var t,n=w(this);r.allowResize&&(t=n.data("key"),e.preventDefault(),r.offset=[e.clientX,e.clientY],d.cssRules(t,function(e){var t=e.style.width||n.outerWidth();r.rule=e,r.ruleWidth=parseFloat(t),r.minWidth=n.data("minwidth")||u.cellMinWidth,r.maxWidth=n.data("maxwidth")||u.cellMaxWidth}),n.data(R,r),h.eventMoveElem=n)}),h.docEvent||q.on("mousemove",function(e){var t,n;h.eventMoveElem&&(t=h.eventMoveElem.data(R)||{},h.eventMoveElem.data("resizing",1),e.preventDefault(),t.rule)&&(e=t.ruleWidth+e.clientX-t.offset[0],n=h.eventMoveElem.closest("."+S).attr("lay-id"),n=y(n))&&((e=et.maxWidth&&(e=t.maxWidth),t.rule.style.width=e+"px",n.setGroupWidth(h.eventMoveElem),v.close(d.tipsIndex))}).on("mouseup",function(e){var t,n,i,a,o;h.eventMoveElem&&(i=(t=h.eventMoveElem).closest("."+S).attr("lay-id"),n=y(i))&&(i=t.data("key"),a=n.col(i),o=n.config.elem.attr("lay-filter"),r={},l.css("cursor",""),n.scrollPatch(),t.removeData(R),delete h.eventMoveElem,n.cssRules(i,function(e){a.width=parseFloat(e.style.width),layui.event.call(t[0],T,"colResized("+o+")",{col:a,config:n.config})}))}),h.docEvent=!0,e.on("click",function(e){var t=w(this),n=t.find(I),i=n.attr("lay-sort");if(!n[0]||1===t.data("resizing"))return t.removeData("resizing");d.sort({field:t,type:"asc"===i?"desc":"desc"===i?null:"asc",fromEvent:!0})}).find(I+" .layui-edge ").on("click",function(e){var t=(n=w(this)).index(),n=n.parents("th").eq(0).data("field");layui.stope(e),0===t?d.sort({field:n,type:"asc",fromEvent:!0}):d.sort({field:n,type:"desc",fromEvent:!0})}),d.commonMember=function(e){var t=w(this).parents("tr").eq(0).data("index"),s=d.layBody.find('tr[data-index="'+t+'"]'),c=(c=C.cache[d.key]||[])[t]||{},n={tr:s,config:u,data:C.clearCacheKey(c),dataCache:c,index:t,del:function(){C.cache[d.key][t]=[],s.remove(),d.scrollPatch()},update:function(e,r){e=e||{},layui.each(e,function(i,a){var o=s.children('td[data-field="'+i+'"]'),l=o.children(f);c[i]=n.data[i]=a,d.eachCols(function(e,t){var n;t.field==i?(l.html(m.call(d,{item3:t,content:a,tplData:w.extend({LAY_COL:t},c)})),o.data("content",a)):r&&(t.templet||t.toolbar)&&(e=s.children('td[data-field="'+(t.field||e)+'"]'),n=c[t.field],e.children(f).html(m.call(d,{item3:t,content:n,tplData:w.extend({LAY_COL:t},c)})),e.data("content",n))})}),d.renderForm()},setRowChecked:function(e){d.setRowChecked(w.extend({index:t},e))}};return w.extend(n,e)}),n=(d.elem.on("click",'input[name="layTableCheckbox"]+',function(e){var t=(n=w(this)).closest("td"),n=n.prev(),i=(d.layBody.find('input[name="layTableCheckbox"]'),n.parents("tr").eq(0).data("index")),a=n[0].checked,o="layTableAllChoose"===n.attr("lay-filter");n[0].disabled||(o?d.setRowChecked({index:"all",checked:a}):(d.setRowChecked({index:i,checked:a}),layui.stope(e)),layui.event.call(n[0],T,"checkbox("+c+")",s.call(n[0],{checked:a,type:o?"all":"one",getCol:function(){return d.col(t.data("key"))}})))}),d.elem.on("click",'input[lay-type="layTableRadio"]+',function(e){var t=w(this),n=t.closest("td"),i=(t=t.prev())[0].checked,a=t.parents("tr").eq(0).data("index");if(layui.stope(e),t[0].disabled)return!1;d.setRowChecked({type:"radio",index:a}),layui.event.call(t[0],T,"radio("+c+")",s.call(t[0],{checked:i,getCol:function(){return d.col(n.data("key"))}}))}),d.layBody.on("mouseenter","tr[data-index]",function(){var e=w(this),t=e.index();e.data("off")||d.layBody.find("tr[data-index]:eq("+t+")").addClass(_)}).on("mouseleave","tr[data-index]",function(){var e=w(this),t=e.index();e.data("off")||d.layBody.find("tr[data-index]:eq("+t+")").removeClass(_)}).on("click","tr[data-index]",function(e){var t=[".layui-form-checkbox",".layui-form-switch",".layui-form-radio","[lay-unrow]"].join(",");w(e.target).is(t)||w(e.target).closest(t)[0]||n.call(this,"row")}).on("dblclick","tr[data-index]",function(){n.call(this,"rowDouble")}).on("contextmenu","tr[data-index]",function(e){u.defaultContextmenu||e.preventDefault(),n.call(this,"rowContextmenu")}),function(e){var t=w(this);t.data("off")||layui.event.call(this,T,e+"("+c+")",s.call(t.children("td")[0]))}),i=(d.layBody.on("change","."+M,function(){var e=(i=w(this)).parent(),t=this.value,n=i.parent().data("field"),i=i.closest("tr[data-index]").data("index"),i=C.cache[d.key][i],a=s.call(e[0],{value:t,field:n,oldValue:i[n],td:e,reedit:function(){setTimeout(function(){o(a.td);var e={};e[n]=a.oldValue,a.update(e)})},getCol:function(){return d.col(e.data("key"))}});(i={})[n]=t,a.update(i),layui.event.call(e[0],T,"edit("+c+")",a)}).on("blur","."+M,function(){w(this).remove()}),d.layBody.on(u.editTrigger,"td",function(e){o(this,e)}).on("mouseenter","td",function(){a.call(this)}).on("mouseleave","td",function(){a.call(this,"hide")}),d.layTotal.on("mouseenter","td",function(){a.call(this)}).on("mouseleave","td",function(){a.call(this,"hide")}),"layui-table-grid-down"),a=function(e){var t=w(this),n=t.children(f);t.data("off")||t.parent().hasClass(P)||(e?t.find(".layui-table-grid-down").remove():!(n.prop("scrollWidth")>n.outerWidth()||0
      '))},p=(d.layBody.on("click","."+i,function(e){t.call(this,e)}),d.layTotal.on("click","."+i,function(e){t.call(this,e,"tips")}),function(e){var t=w(this),n=t.closest("td"),i=t.parents("tr").eq(0).data("index");d.setRowActive(i),layui.event.call(this,T,(e||"tool")+"("+c+")",s.call(this,{event:t.attr("lay-event"),getCol:function(){return d.col(n.data("key"))}}))});d.layBody.on("click","*[lay-event]",function(e){p.call(this),layui.stope(e)}).on("dblclick","*[lay-event]",function(e){p.call(this,"toolDouble"),layui.stope(e)}),d.layMain.on("scroll",function(){var e=(t=w(this)).scrollLeft(),t=t.scrollTop();d.layHeader.scrollLeft(e),d.layTotal.scrollLeft(e),d.layFixed.find(A).scrollTop(t),v.close(d.tipsIndex)}),d.layFixed.find(A).on("mousewheel DOMMouseScroll",function(e){var t=e.originalEvent.wheelDelta||-e.originalEvent.detail,n=d.layMain.scrollTop();e.preventDefault(),d.layMain.scrollTop(n+(0tr").each(function(i){o.cols[i]=[],w(this).children().each(function(e){var t=(n=w(this)).attr("lay-data"),t=s.options(this,{attr:t?"lay-data":null,errorText:r+(t||n.attr("lay-options"))}),n=w.extend({title:n.text(),colspan:parseInt(n.attr("colspan"))||1,rowspan:parseInt(n.attr("rowspan"))||1},t);o.cols[i].push(n)})}),e.find("tbody>tr")),t=C.render(o);!n.length||l.data||t.config.url||(a=0,C.eachCols(t.config.id,function(e,i){n.each(function(e){o.data[e]=o.data[e]||{};var t=w(this),n=i.field;o.data[e][n]=t.children("td").eq(a).html()}),a++}),t.reloadData({data:o.data}))}),this},h.that={},h.config={},function(n,i,e,a){var o,l;a.colGroup&&(o=0,n++,a.CHILD_COLS=[],l=e+(parseInt(a.rowspan)||1),layui.each(i[l],function(e,t){t.parentKey?t.parentKey===a.key&&(t.PARENT_COL_INDEX=n,a.CHILD_COLS.push(t),u(n,i,l,t)):t.PARENT_COL_INDEX||1<=o&&o==(a.colspan||1)||(t.PARENT_COL_INDEX=n,a.CHILD_COLS.push(t),o+=parseInt(1td').filter('[data-field="'+e+'"]')}}})).replace(/"/g,'""'),o.push(n='"'+n+'"')))}),r.push(o.join(","))}),c&&layui.each(c.dataTotal,function(e,t){s[t.field]||i.push('"'+(t.total||"")+'"')}),l.join(",")+"\r\n"+r.join("\r\n")+"\r\n"+i.join(","))),u.download=(n.title||o.title||"table_"+(o.index||""))+"."+a,document.body.appendChild(u),u.click(),document.body.removeChild(u)},C.getOptions=a,C.hideCol=function(e,a){var o=y(e);o&&("boolean"===layui.type(a)?o.eachCols(function(e,t){var n=t.key,i=o.col(n),t=t.parentKey;i.hide!=a&&(i=i.hide=a,o.elem.find('*[data-key="'+n+'"]')[i?"addClass":"removeClass"](E),o.setParentCol(i,t))}):(a=layui.isArray(a)?a:[a],layui.each(a,function(e,a){o.eachCols(function(e,t){var n,i;a.field===t.field&&(n=t.key,i=o.col(n),t=t.parentKey,"hide"in a)&&i.hide!=a.hide&&(i=i.hide=!!a.hide,o.elem.find('*[data-key="'+n+'"]')[i?"addClass":"removeClass"](E),o.setParentCol(i,t))})})),w("."+O).remove(),o.resize())},C.reload=function(e,t,n,i){if(a(e))return(e=y(e)).reload(t,n,i),h.call(e)},C.reloadData=function(){var n=w.extend([],arguments),i=(n[3]="reloadData",new RegExp("^("+["elem","id","cols","width","height","maxHeight","toolbar","defaultToolbar","className","css","pagebar"].join("|")+")$"));return layui.each(n[1],function(e,t){i.test(e)&&delete n[1][e]}),C.reload.apply(null,n)},C.render=function(e){return e=new n(e),h.call(e)},C.clearCacheKey=function(e){return delete(e=w.extend({},e))[C.config.checkName],delete e[C.config.indexName],delete e[C.config.numbersName],delete e[C.config.disabledName],e},w(function(){C.init()}),e(T,C)}),layui.define(["table"],function(e){"use strict";function a(){var n=this,e=n.config,i=e.id||e.index;return{config:e,reload:function(e,t){n.reload.call(n,e,t)},reloadData:function(e,t){H.reloadData(i,e,t)}}}function j(e){var t=a.that[e];return t||p.error(e?"The treeTable instance with ID '"+e+"' not found":"ID argument required"),t||null}function t(e){this.index=++H.index,this.config=M.extend(!0,{},this.config,H.config,e),this.init(),this.render()}function o(o,n,e){var l=j(o),r=("reloadData"!==e&&(l.status={expand:{}}),M.extend(!0,{},l.getOptions(),n)),i=r.tree,s=i.customName.children,a=i.customName.id,c=(delete n.hasNumberCol,delete n.hasChecboxCol,delete n.hasRadioCol,_.eachCols(null,function(e,t){"numbers"===t.type?n.hasNumberCol=!0:"checkbox"===t.type?n.hasChecboxCol=!0:"radio"===t.type&&(n.hasRadioCol=!0)},r.cols),n.parseData),d=n.done;r.url?e&&(!c||c.mod)||(n.parseData=function(){var e=(t=arguments)[0],t=("function"===layui.type(c)&&(e=c.apply(this,t)||t[0]),this.response.dataName);return i.data.isSimpleData&&!i.async.enable&&(e[t]=l.flatToTree(e[t])),h(e[t],function(e){e[B]=B in e?e[B]:void 0!==e[a]&&l.status.expand[e[a]]},s),this.autoSort&&this.initSort&&this.initSort.type&&layui.sort(e[t],this.initSort.field,"desc"===this.initSort.type,!0),l.initData(e[t]),e},n.parseData.mod=!0):(n.data=n.data||[],i.data.isSimpleData&&(n.data=l.flatToTree(n.data)),l.initData(n.data)),e&&(!d||d.mod)||(n.done=function(){var e,t=arguments,n=t[3],i=(n||delete l.isExpandAll,this.elem.next()),a=(l.updateStatus(null,{LAY_HAS_EXPANDED:!1}),f(o,s),i.find('[name="layTableCheckbox"][lay-filter="layTableAllChoose"]'));if(a.length&&(e=H.checkStatus(o),a.prop({checked:e.isAll&&e.data.length,indeterminate:!e.isAll&&e.data.length})),!n&&r.autoSort&&r.initSort&&r.initSort.type&&H.sort(o),l.renderTreeTable(i),"function"===layui.type(d))return d.apply(this,t)},n.done.mod=!0)}var M=layui.$,y=layui.form,_=layui.table,p=layui.hint(),H={config:{},on:_.on,eachCols:_.eachCols,index:_.index,set:function(e){return this.config=M.extend({},this.config,e),this},resize:_.resize,getOptions:_.getOptions,hideCol:_.hideCol,renderData:_.renderData},F="layui-hide",O=".layui-table-main",P=".layui-table-fixed-l",R=".layui-table-fixed-r",l="layui-table-checked",m="layui-table-tree",q="LAY_DATA_INDEX",g="LAY_DATA_INDEX_HISTORY",u="LAY_PARENT_INDEX",v="LAY_CHECKBOX_HALF",B="LAY_EXPAND",W="LAY_HAS_EXPANDED",z="LAY_ASYNC_STATUS",i=["all","parent","children","none"],f=function(i,a,e){var o=_.cache[i];layui.each(e||o,function(e,t){var n=t[q];-1!==n.indexOf("-")&&(o[n]=t),t[a]&&f(i,a,t[a])})};t.prototype.init=function(){var e=this.config,t=e.tree.data.cascade,n=(t=(-1===i.indexOf(t)&&(e.tree.data.cascade="all"),_.render(M.extend({},e,{data:[],url:"",done:null})))).config.id;(a.that[n]=this).tableIns=t,o(n,e)},t.prototype.config={tree:{customName:{children:"children",isParent:"isParent",name:"name",id:"id",pid:"parentId",icon:"icon"},view:{indent:14,flexIconClose:'',flexIconOpen:'',showIcon:!0,icon:"",iconClose:'',iconOpen:'',iconLeaf:'',showFlexIconIfNotParent:!1,dblClickExpand:!0,expandAllDefault:!1},data:{isSimpleData:!1,rootPid:null,cascade:"all"},async:{enable:!1,url:"",type:null,contentType:null,headers:null,where:null,autoParam:[]},callback:{beforeExpand:null,onExpand:null}}},t.prototype.getOptions=function(){return this.tableIns?_.getOptions(this.tableIns.config.id):this.config},t.prototype.flatToTree=function(e){var n,i,a,t,o,l,r,s=(d=this.getOptions()).tree,c=s.customName,d=d.id;return d=e=e||_.cache[d],n=c.id,i=c.pid,a=c.children,t=s.data.rootPid,n=n||"id",i=i||"parentId",a=a||"children",r={},layui.each(d,function(e,t){o=n+t[n],r[o]=M.extend({},t),r[o][a]=[]}),layui.each(r,function(e,t){(l=n+t[i])&&r[l]&&r[l][a].push(t)}),Object.keys(r).map(function(e){return r[e]}).filter(function(e){return t?e[i]===t:!e[i]})},t.prototype.treeToFlat=function(e,i,a){var o=this,l=o.getOptions().tree.customName,r=l.children,s=l.pid,c=[];return layui.each(e,function(e,t){var e=(a?a+"-":"")+e,n=M.extend({},t);n[s]=t[s]||i,c.push(n),c=c.concat(o.treeToFlat(t[r],t[l.id],e))}),c},t.prototype.getTreeNode=function(e){var t,n,i=this;return e?(n=(t=i.getOptions()).tree,t.id,n.customName,{data:e,dataIndex:e[q],getParentNode:function(){return i.getNodeByIndex(e[u])}}):p.error("找不到节点数据")},t.prototype.getNodeByIndex=function(t){var n,e,i=this,a=i.getNodeDataByIndex(t);return a?((e=i.getOptions()).tree.customName.parent,n=e.id,(e={data:a,dataIndex:a[q],getParentNode:function(){return i.getNodeByIndex(a[u])},update:function(e){return H.updateNode(n,t,e)},remove:function(){return H.removeNode(n,t)},expand:function(e){return H.expandNode(n,M.extend({},e,{index:t}))},setChecked:function(e){return H.setRowChecked(n,M.extend({},e,{index:t}))}}).dataIndex=t,e):p.error("找不到节点数据")},t.prototype.getNodeById=function(n){var i=(e=this.getOptions()).tree.customName.id,a="",e=H.getData(e.id,!0);if(layui.each(e,function(e,t){if(t[i]===n)return a=t[q],!0}),a)return this.getNodeByIndex(a)},t.prototype.getNodeDataByIndex=function(e,t,n){var i=(a=this.getOptions()).tree,a=a.id,o=(a=_.cache[a])[e];if("delete"!==n&&o)return M.extend(o,n),t?M.extend({},o):o;for(var l=a,r=String(e).split("-"),s=0,c=i.customName.children;s'),b=function(e){p[z]="success",p[u.children]=e,c.initData(p[u.children],p[q]),Y(t,!0,!h&&i,a,o)},k=g.format,"function"===layui.type(k)?k(p,s,b):(w=M.extend({},g.where||s.where),k=g.autoParam,layui.each(k,function(e,t){t=t.split("="),w[t[0].trim()]=p[(t[1]||t[0]).trim()]}),(k=g.contentType||s.contentType)&&0==k.indexOf("application/json")&&(w=JSON.stringify(w)),S=g.method||s.method,C=g.dataType||s.dataType,T=g.jsonpCallback||s.jsonpCallback,E=g.headers||s.headers,D=g.parseData||s.parseData,N=g.response||s.response,M.ajax({type:S||"get",url:I,contentType:k,data:w,dataType:C||"json",jsonpCallback:T,headers:E||{},success:function(e){(e="function"==typeof D&&D.call(s,e)||e)[N.statusName]!=N.statusCode?(p[z]="error",v.html('')):b(e[N.dataName])},error:function(e,t){p[z]="error","function"==typeof s.error&&s.error(e,t)}})),m;p[W]=!0,x.length&&(!s.initSort||s.url&&!s.autoSort||((g=s.initSort).type?layui.sort(x,g.field,"desc"===g.type,!0):layui.sort(x,_.config.indexName,null,!0)),c.initData(p[u.children],p[q]),S=_.getTrHtml(r,x,null,null,e),A={trs:M(S.trs.join("")),trs_fixed:M(S.trs_fixed.join("")),trs_fixed_r:M(S.trs_fixed_r.join(""))},L=(e.split("-").length-1||0)+1,layui.each(x,function(e,t){A.trs.eq(e).attr({"data-index":t[q],"lay-data-index":t[q],"data-level":L}),A.trs_fixed.eq(e).attr({"data-index":t[q],"lay-data-index":t[q],"data-level":L}),A.trs_fixed_r.eq(e).attr({"data-index":t[q],"lay-data-index":t[q],"data-level":L})}),l.find(O).find('tbody tr[lay-data-index="'+e+'"]').after(A.trs),l.find(P).find('tbody tr[lay-data-index="'+e+'"]').after(A.trs_fixed),l.find(R).find('tbody tr[lay-data-index="'+e+'"]').after(A.trs_fixed_r),c.renderTreeTable(A.trs,L),i)&&!h&&layui.each(x,function(e,t){Y({dataIndex:t[q],trElem:l.find('tr[lay-data-index="'+t[q]+'"]').first(),tableViewElem:l,tableId:r,options:s},n,i,a,o)})}else c.isExpandAll=!1,(i&&!h?(layui.each(x,function(e,t){Y({dataIndex:t[q],trElem:l.find('tr[lay-data-index="'+t[q]+'"]').first(),tableViewElem:l,tableId:r,options:s},n,i,a,o)}),l.find(x.map(function(e,t,n){return'tr[lay-data-index="'+e[q]+'"]'}).join(","))):(I=c.treeToFlat(x,p[u.id],e),l.find(I.map(function(e,t,n){return'tr[lay-data-index="'+e[q]+'"]'}).join(",")))).addClass(F);$("resize-"+r,function(){H.resize(r)},0)(),o&&"loading"!==p[z]&&(k=d.callback.onExpand,"function"===layui.type(k))&&k(r,p,y)}return m},x=(H.expandNode=function(e,t){var n,i,a;if(e=j(e))return n=(t=t||{}).index,i=t.expandFlag,a=t.inherit,t=t.callbackFlag,e=e.getOptions().elem.next(),Y({trElem:e.find('tr[lay-data-index="'+n+'"]').first()},i,a,null,t)},H.expandAll=function(n,e){if("boolean"!==layui.type(e))return p.error("expandAll 的展开状态参数只接收true/false");var t=j(n);if(t){t.isExpandAll=e;var i=(u=t.getOptions()).tree,a=u.elem.next(),o=i.customName.isParent,l=i.customName.id,r=i.view.showFlexIconIfNotParent;if(e){if(e=H.getData(n,!0),i.async.enable){var s=!0;if(layui.each(e,function(e,t){if(t[o]&&!t[z])return!(s=!1)}),!s)return void layui.each(H.getData(n),function(e,t){H.expandNode(n,{index:t[q],expandFlag:!0,inherit:!0})})}var c=!0;if(layui.each(e,function(e,t){if(t[o]&&!t[W])return!(c=!1)}),c)t.updateStatus(null,function(e){(e[o]||r)&&(e[B]=!0,void 0!==e[l])&&(t.status.expand[e[l]]=!0)}),a.find('tbody tr[data-level!="0"]').removeClass(F),a.find(".layui-table-tree-flexIcon").html(i.view.flexIconOpen),i.view.showIcon&&a.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconOpen);else{if(t.updateStatus(null,function(e){(e[o]||r)&&(e[B]=!0,e[W]=!0,void 0!==e[l])&&(t.status.expand[e[l]]=!0)}),u.initSort&&u.initSort.type&&u.autoSort)return H.sort(n);var d,u=_.getTrHtml(n,e),f={trs:M(u.trs.join("")),trs_fixed:M(u.trs_fixed.join("")),trs_fixed_r:M(u.trs_fixed_r.join(""))};layui.each(e,function(e,t){var n=t[q].split("-").length-1;d={"data-index":t[q],"lay-data-index":t[q],"data-level":n},f.trs.eq(e).attr(d),f.trs_fixed.eq(e).attr(d),f.trs_fixed_r.eq(e).attr(d)}),layui.each(["main","fixed-l","fixed-r"],function(e,t){a.find(".layui-table-"+t+" tbody").html(f[["trs","trs_fixed","trs_fixed_r"][e]])}),t.renderTreeTable(a,0,!1)}}else t.updateStatus(null,function(e){(e[o]||r)&&(e[B]=!1,void 0!==e[l])&&(t.status.expand[e[l]]=!1)}),a.find('.layui-table-box tbody tr[data-level!="0"]').addClass(F),a.find(".layui-table-tree-flexIcon").html(i.view.flexIconClose),i.view.showIcon&&a.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconClose);H.resize(n)}},t.prototype.renderTreeTable=function(e,t,n){var i=this,a=i.getOptions(),o=a.elem.next(),l=(o.hasClass(m)||o.addClass(m),a.id),r=a.tree||{},s=(r.data,r.view||{}),c=r.customName||{},d=c.isParent,u=(o.attr("lay-filter"),i),f=((t=t||0)||(o.find(".layui-table-body tr:not([data-level])").attr("data-level",t),layui.each(_.cache[l],function(e,t){o.find('.layui-table-main tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t[q]),o.find('.layui-table-fixed-l tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t[q]),o.find('.layui-table-fixed-r tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t[q])})),null),p=c.name,h=s.indent||14;if(layui.each(e.find('td[data-field="'+p+'"]'),function(e,t){var n,i,a=(t=M(t)).closest("tr");(t=t.children(".layui-table-cell")).hasClass("layui-table-tree-item")||(i=a.attr("lay-data-index"))&&(a=o.find('tr[lay-data-index="'+i+'"]'),(n=u.getNodeDataByIndex(i))[B]&&n[d]&&((f=f||{})[i]=!0),n[v]&&a.find('input[type="checkbox"][name="layTableCheckbox"]').prop("indeterminate",!0),i=t.html(),(t=a.find('td[data-field="'+p+'"]>div.layui-table-cell')).addClass("layui-table-tree-item"),t.html(['
      ',n[B]?s.flexIconOpen:s.flexIconClose,"
      ",s.showIcon?'
      '+(n[c.icon]||s.icon||(n[d]?n[B]?s.iconOpen:s.iconClose:s.iconLeaf)||"")+"
      ":"",i].join("")).find(".layui-table-tree-flexIcon").on("click",function(e){layui.stope(e),Y({trElem:a},null,null,null,!0)}))}),!t&&r.view.expandAllDefault&&void 0===i.isExpandAll)return H.expandAll(l,!0);!1!==n&&f?layui.each(f,function(e,t){(e=o.find('tr[lay-data-index="'+e+'"]')).find(".layui-table-tree-flexIcon").html(s.flexIconOpen),Y({trElem:e.first()},!0)}):$("renderTreeTable-"+l,function(){a.hasNumberCol&&x(i),y.render(M('.layui-table-tree[lay-id="'+l+'"]'))},0)()},function(n){var e=n.getOptions(),t=e.elem.next(),i=0,a=t.find(".layui-table-main tbody tr"),o=t.find(".layui-table-fixed-l tbody tr"),l=t.find(".layui-table-fixed-r tbody tr");layui.each(n.treeToFlat(_.cache[e.id]),function(e,t){t.LAY_HIDE||(n.getNodeDataByIndex(t[q]).LAY_NUM=++i,a.eq(e).find(".laytable-cell-numbers").html(i),o.eq(e).find(".laytable-cell-numbers").html(i),l.eq(e).find(".laytable-cell-numbers").html(i))})}),h=(t.prototype.render=function(e){this.tableIns=_["reloadData"===e?"reloadData":"reload"](this.tableIns.config.id,M.extend(!0,{},this.config)),this.config=this.tableIns.config},t.prototype.reload=function(e,t,n){var i=this;e=e||{},delete i.haveInit,layui.each(e,function(e,t){"array"===layui.type(t)&&delete i.config[e]}),o(i.getOptions().id,e,n||!0),i.config=M.extend(t,{},i.config,e),i.render(n)},H.reloadData=function(){var e=M.extend(!0,[],arguments);return e[3]="reloadData",H.reload.apply(null,e)},function(e,n,i,a){var o=[];return layui.each(e,function(e,t){"function"===layui.type(n)?n(t):M.extend(t,n),o.push(M.extend({},t)),a||(o=o.concat(h(t[i],n,i,a)))}),o}),s=(t.prototype.updateStatus=function(e,t,n){var i=this.getOptions(),a=i.tree;return e=e||_.cache[i.id],h(e,t,a.customName.children,n)},t.prototype.getTableData=function(){var e=this.getOptions();return _.cache[e.id]},H.updateStatus=function(e,t,n){var i=(e=j(e)).getOptions();return n=n||(i.url?_.cache[i.id]:i.data),e.updateStatus(n,t)},H.sort=function(e){var t=j(e);t&&t.getOptions().autoSort&&(t.initData(),H.renderData(e))},function(i){var t=i.config.id,a=j(t),n=i.data=H.getNodeDataByIndex(t,i.index),o=n[q],l=(i.dataIndex=o,i.update);i.update=function(){var e=arguments,t=(M.extend(a.getNodeDataByIndex(o),e[0]),l.apply(this,e)),n=i.config.tree.customName.name;return n in e[0]&&i.tr.find('td[data-field="'+n+'"]').children("div.layui-table-cell").removeClass("layui-table-tree-item"),a.renderTreeTable(i.tr,i.tr.attr("data-level"),!1),t},i.del=function(){H.removeNode(t,n)},i.setRowChecked=function(e){H.setRowChecked(t,{index:n,checked:e})}}),d=(H.updateNode=function(e,n,t){var i,a,o,l,r,s=j(e);s&&((l=s.getOptions()).tree,l=(i=l.elem.next()).find('tr[lay-data-index="'+n+'"]'),a=l.attr("data-index"),o=l.attr("data-level"),t)&&(l=s.getNodeDataByIndex(n,!1,t),r=_.getTrHtml(e,[l]),layui.each(["main","fixed-l","fixed-r"],function(e,t){i.find(".layui-table-"+t+' tbody tr[lay-data-index="'+n+'"]').replaceWith(M(r[["trs","trs_fixed","trs_fixed_r"][e]].join("")).attr({"data-index":a,"lay-data-index":n,"data-level":o}))}),s.renderTreeTable(i.find('tr[lay-data-index="'+n+'"]'),o))},H.removeNode=function(e,t){var n,i,a,o,l,r=j(e);r&&(l=(n=r.getOptions()).tree,i=n.elem.next(),a=[],t=r.getNodeDataByIndex("string"===layui.type(t)?t:t[q],!1,"delete"),o=r.getNodeDataByIndex(t[u]),r.updateCheckStatus(o),o=r.treeToFlat([t],t[l.customName.pid],t[u]),layui.each(o,function(e,t){a.push('tr[lay-data-index="'+t[q]+'"]')}),i.find(a.join(",")).remove(),l=r.initData(),layui.each(r.treeToFlat(l),function(e,t){t[g]&&t[g]!==t[q]&&i.find('tr[lay-data-index="'+t[g]+'"]').attr({"data-index":t[q],"lay-data-index":t[q]})}),layui.each(_.cache[e],function(e,t){i.find('tr[data-level="0"][lay-data-index="'+t[q]+'"]').attr("data-index",e)}),n.hasNumberCol&&x(r),H.resize(e))},H.addNodes=function(e,t){var n=j(e);if(n){var i=(m=n.getOptions()).tree,a=m.elem.next(),o=_.config.checkName,l=(t=t||{}).parentIndex,r=t.index,s=t.data,t=t.focus,c=(l="number"===layui.type(l)?l.toString():l)?n.getNodeDataByIndex(l):null,r="number"===layui.type(r)?r:-1,s=M.extend(!0,[],layui.isArray(s)?s:[s]);if(layui.each(s,function(e,t){o in t||!c||(t[o]=c[o])}),n.getTableData(),c){var d=i.customName.isParent,u=i.customName.children;c[d]=!0;var f=(f=c[u])?(p=f.splice(-1===r?f.length:r),c[u]=f.concat(s,p)):c[u]=s,u=(n.updateStatus(f,function(e){(e[d]||i.view.showFlexIconIfNotParent)&&(e[W]=!1)}),n.treeToFlat(f));a.find(u.map(function(e){return'tr[lay-data-index="'+e[q]+'"]'}).join(",")).remove(),n.initData(),c[W]=!1,c[z]="local",Y({trElem:a.find('tr[lay-data-index="'+l+'"]')},!0)}else{var p=_.cache[e].splice(-1===r?_.cache[e].length:r);if(_.cache[e]=_.cache[e].concat(s,p),m.url||(m.page?(f=m.page,m.data.splice.apply(m.data,[f.limit*(f.curr-1),f.limit].concat(_.cache[e]))):m.data=_.cache[e]),n.initData(),a.find(".layui-none").length)return _.renderData(e),s;var h,u=_.getTrHtml(e,s),y={trs:M(u.trs.join("")),trs_fixed:M(u.trs_fixed.join("")),trs_fixed_r:M(u.trs_fixed_r.join(""))},l=(layui.each(s,function(e,t){h={"data-index":t[q],"lay-data-index":t[q],"data-level":"0"},y.trs.eq(e).attr(h),y.trs_fixed.eq(e).attr(h),y.trs_fixed_r.eq(e).attr(h)}),parseInt(s[0][q])-1),f=a.find(O),m=a.find(P),u=a.find(R);-1==l?(f.find('tr[data-level="0"][data-index="0"]').before(y.trs),m.find('tr[data-level="0"][data-index="0"]').before(y.trs_fixed),u.find('tr[data-level="0"][data-index="0"]').before(y.trs_fixed_r)):-1===r?(f.find("tbody").append(y.trs),m.find("tbody").append(y.trs_fixed),u.find("tbody").append(y.trs_fixed_r)):(l=p[0][g],f.find('tr[data-level="0"][data-index="'+l+'"]').before(y.trs),m.find('tr[data-level="0"][data-index="'+l+'"]').before(y.trs_fixed),u.find('tr[data-level="0"][data-index="'+l+'"]').before(y.trs_fixed_r)),layui.each(_.cache[e],function(e,t){a.find('tr[data-level="0"][lay-data-index="'+t[q]+'"]').attr("data-index",e)}),n.renderTreeTable(a.find(s.map(function(e,t,n){return'tr[lay-data-index="'+e[q]+'"]'}).join(",")))}return n.updateCheckStatus(c),H.resize(e),t&&a.find(O).find('tr[lay-data-index="'+s[0][q]+'"]').get(0).scrollIntoViewIfNeeded(),s}},H.checkStatus=function(e,i){var a,t,n,o=j(e);if(o)return o=o.getOptions().tree,a=_.config.checkName,t=H.getData(e,!0).filter(function(e,t,n){return e[a]||i&&e[v]}),n=!0,layui.each("all"===o.data.cascade?_.cache[e]:H.getData(e,!0),function(e,t){if(!t[a])return!(n=!1)}),{data:t,isAll:n}},H.on("sort",function(e){var t=(e=e.config).elem.next(),e=e.id;t.hasClass(m)&&H.sort(e)}),H.on("row",function(e){e.config.elem.next().hasClass(m)&&s(e)}),H.on("rowDouble",function(e){var t=e.config,n=t.elem.next();t.id,n.hasClass(m)&&(s(e),(t.tree||{}).view.dblClickExpand)&&Y({trElem:e.tr.first()},null,null,null,!0)}),H.on("rowContextmenu",function(e){var t=e.config,n=t.elem.next();t.id,n.hasClass(m)&&s(e)}),H.on("tool",function(e){var t=e.config,n=t.elem.next();t.id,n.hasClass(m)&&s(e)}),H.on("edit",function(e){var t=e.config,n=t.elem.next();t.id,n.hasClass(m)&&(s(e),e.field===t.tree.customName.name)&&((n={})[e.field]=e.value,e.update(n))}),H.on("radio",function(e){var t=(n=e.config).elem.next(),n=n.id;t.hasClass(m)&&(t=j(n),s(e),d.call(t,e.tr,e.checked))}),t.prototype.setRowCheckedClass=function(e,t){var n=this.getOptions(),i=(e.data("index"),n.elem.next());e[t?"addClass":"removeClass"](l),e.each(function(){var e=M(this).data("index");i.find('.layui-table-fixed-r tbody tr[data-index="'+e+'"]')[t?"addClass":"removeClass"](l)})},t.prototype.updateCheckStatus=function(e,t){var n,i,a,o,l,r,s,c=this,d=c.getOptions();return!!d.hasChecboxCol&&(n=d.tree,i=d.id,a=d.elem.next(),o=_.config.checkName,"all"!==(l=n.data.cascade)&&"parent"!==l||!e||(l=c.updateParentCheckStatus(e,"boolean"===layui.type(t)?t:null),layui.each(l,function(e,t){var n=a.find('tr[lay-data-index="'+t[q]+'"] input[name="layTableCheckbox"]:not(:disabled)'),i=t[o];c.setRowCheckedClass(n.closest("tr"),i),y.render(n.prop({checked:i,indeterminate:t[v]}))})),s=!(r=!0),e=(e="all"===n.data.cascade?_.cache[i]:H.getData(i,!0)).filter(function(e){return!e[d.disabledName]}),layui.each(e,function(e,t){if((t[o]||t[v])&&(s=!0),t[o]||(r=!1),s&&!r)return!0}),s=s&&!r,y.render(a.find('input[name="layTableCheckbox"][lay-filter="layTableAllChoose"]').prop({checked:r,indeterminate:s})),r)},t.prototype.updateParentCheckStatus=function(n,i){var a,e=(t=this.getOptions()).tree,t=t.id,o=_.config.checkName,e=e.customName.children,l=[];return!(n[v]=!1)===i?n[e].length?layui.each(n[e],function(e,t){if(!t[o])return i=!1,n[v]=!0}):i=!1:!1===i?layui.each(n[e],function(e,t){if(t[o]||t[v])return n[v]=!0}):(i=!1,a=0,layui.each(n[e],function(e,t){t[o]&&a++}),i=n[e].length?n[e].length===a:n[o],n[v]=!i&&0')),i=(e.tree(n),t.elem=p(t.elem));if(i[0]){if(e.key=t.id||e.index,e.elem=n,e.elemNone=p('
      '+t.text.none+"
      "),i.html(e.elem),0==e.elem.find(".layui-tree-set").length)return e.elem.append(e.elemNone);t.showCheckbox&&e.renderForm("checkbox"),e.elem.find(".layui-tree-set").each(function(){var e=p(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(E),e.next()[0]||e.parents(".layui-tree-set").eq(0).next()[0]||e.addClass(E)}),e.events()}},t.prototype.renderForm=function(e){n.render(e,"LAY-tree-"+this.index)},t.prototype.tree=function(r,e){var s=this,c=s.config,d=c.customName,e=e||c.data;layui.each(e,function(e,t){var n,i,a=t[d.children]&&0"),l=p(['
      ','
      ','
      ',c.showLine?a?'':'':'',c.showCheckbox?'':"",c.isJump&&t.href?''+(t[d.title]||t.label||c.text.defaultNodeName)+"":''+(t[d.title]||t.label||c.text.defaultNodeName)+"","
      ",c.edit?(n={add:'',update:'',del:''},i=['
      '],!0===c.edit&&(c.edit=["update","del"]),"object"==typeof c.edit?(layui.each(c.edit,function(e,t){i.push(n[t]||"")}),i.join("")+"
      "):void 0):"","
      "].join(""));a&&(l.append(o),s.tree(o,t[d.children])),r.append(l),l.prev("."+m)[0]&&l.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),a||l.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),s.spread(l,t),c.showCheckbox&&(t.checked&&s.checkids.push(t[d.id]),s.checkClick(l,t)),c.edit&&s.operate(l,t)})},t.prototype.spread=function(i,a){var o=this,l=o.config,e=(r=i.children("."+b)).children("."+w),t=e.find('input[same="layuiTreeCheck"]'),n=r.find("."+g),r=r.find("."+k),s=l.onlyIconControl?n:e,c="";s.on("click",function(e){var t=i.children("."+C),n=(s.children(".layui-icon")[0]?s:s.find(".layui-tree-icon")).children(".layui-icon");t[0]?i.hasClass(T)?(i.removeClass(T),t.slideUp(200),n.removeClass(x).addClass(v),o.updateFieldValue(a,"spread",!1)):(i.addClass(T),t.slideDown(200),n.addClass(x).removeClass(v),o.updateFieldValue(a,"spread",!0),l.accordion&&((t=i.siblings("."+m)).removeClass(T),t.children("."+C).slideUp(200),t.find(".layui-tree-icon").children(".layui-icon").removeClass(x).addClass(v))):c="normal"}),r.on("click",function(){p(this).hasClass(u)||(c=i.hasClass(T)?l.onlyIconControl?"open":"close":l.onlyIconControl?"close":"open",t[0]&&o.updateFieldValue(a,"checked",t.prop("checked")),l.click&&l.click({elem:i,state:c,data:a}))})},t.prototype.updateFieldValue=function(e,t,n){t in e&&(e[t]=n)},t.prototype.setCheckbox=function(e,t,n){var a,i=this,o=i.config,l=o.customName,r=n.prop("checked");n.prop("disabled")||(o.independentEnable||"object"!=typeof t[l.children]&&!e.find("."+C)[0]||e.find("."+C).find('input[same="layuiTreeCheck"]').each(function(e){this.disabled||((e=t[l.children][e])&&i.updateFieldValue(e,"checked",r),i.updateFieldValue(this,"checked",r))}),(a=function(e){var t,n,i;o.independentEnable||e.parents("."+m)[0]&&(n=(e=e.parent("."+C)).parent(),i=e.prev().find('input[same="layuiTreeCheck"]'),r?i.prop("checked",r):(e.find('input[same="layuiTreeCheck"]').each(function(){this.checked&&(t=!0)}),t||i.prop("checked",!1)),a(n))})(e),i.renderForm("checkbox"))},t.prototype.checkClick=function(n,i){var a=this,o=a.config;n.children("."+b).children("."+w).on("click",'input[same="layuiTreeCheck"]+',function(e){layui.stope(e);var t=(e=p(this).prev()).prop("checked");e.prop("disabled")||(a.setCheckbox(n,i,e),a.updateFieldValue(i,"checked",t),o.oncheck&&o.oncheck({elem:n,checked:t,data:i}))})},t.prototype.operate=function(s,o){var c=this,d=c.config,u=d.customName,e=s.children("."+b),f=e.children("."+w);e.children(".layui-tree-btnGroup").on("click",".layui-icon",function(e){layui.stope(e);var t,n,i,a,e=p(this).data("type"),l=s.children("."+C),r={data:o,type:e,elem:s};"add"==e?(l[0]||(d.showLine?(f.find("."+g).addClass("layui-tree-icon"),f.find("."+g).children(".layui-icon").addClass(v).removeClass("layui-icon-file")):f.find(".layui-tree-iconArrow").removeClass(y),s.append('
      ')),i=d.operate&&d.operate(r),(a={})[u.title]=d.text.defaultNodeName,a[u.id]=i,c.tree(s.children("."+C),[a]),d.showLine&&(l[0]?(l.hasClass(N)||l.addClass(N),s.find("."+C).each(function(){p(this).children("."+m).last().addClass(E)}),(l.children("."+m).last().prev().hasClass(E)?l.children("."+m).last().prev():l.children("."+m).last()).removeClass(E),!s.parent("."+C)[0]&&s.next()[0]&&l.children("."+m).last().removeClass(E)):(i=s.siblings("."+m),n=1,a=s.parent("."+C),layui.each(i,function(e,t){p(t).children("."+C)[0]||(n=0)}),(1==n?(i.children("."+C).addClass(D),i.children("."+C).children("."+m).removeClass(E),s.children("."+C).addClass(D),a.removeClass(N),a.children("."+m).last().children("."+C).children("."+m).last()):s.children("."+C).children("."+m)).addClass(E))),d.showCheckbox&&(f.find('input[same="layuiTreeCheck"]')[0].checked&&(s.children("."+C).children("."+m).last().find('input[same="layuiTreeCheck"]')[0].checked=!0),c.renderForm("checkbox"))):"update"==e?(i=f.children("."+k).html(),f.children("."+k).html(""),f.append(''),f.children(".layui-tree-editInput").val(i).focus(),t=function(e){var t=e.val().trim()||d.text.defaultNodeName;e.remove(),f.children("."+k).html(t),r.data[u.title]=t,d.operate&&d.operate(r)},f.children(".layui-tree-editInput").blur(function(){t(p(this))}),f.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),t(p(this)))})):h.confirm('确认删除该节点 "'+(o[u.title]||"")+'" 吗?',function(e){var o,n,t;d.operate&&d.operate(r),r.status="remove",h.close(e),s.prev("."+m)[0]||s.next("."+m)[0]||s.parent("."+C)[0]?(s.siblings("."+m).children("."+b)[0]?(d.showCheckbox&&(o=function(e){var t,n,i,a;e.parents("."+m)[0]&&(t=e.siblings("."+m).children("."+b),n=(e=e.parent("."+C).prev()).find('input[same="layuiTreeCheck"]')[0],i=1,(a=0)==n.checked)&&(t.each(function(e,t){0!=(t=p(t).find('input[same="layuiTreeCheck"]')[0]).checked||t.disabled||(i=0),t.disabled||(a=1)}),1==i)&&1==a&&(n.checked=!0,c.renderForm("checkbox"),o(e.parent("."+m)))})(s),d.showLine&&(e=s.siblings("."+m),n=1,t=s.parent("."+C),layui.each(e,function(e,t){p(t).children("."+C)[0]||(n=0)}),1==n?(l[0]||(t.removeClass(N),e.children("."+C).addClass(D),e.children("."+C).children("."+m).removeClass(E)),(s.next()[0]?t.children("."+m).last():s.prev()).children("."+C).children("."+m).last().addClass(E),s.next()[0]||s.parents("."+m)[1]||s.parents("."+m).eq(0).next()[0]||s.prev("."+m).addClass(E)):!s.next()[0]&&s.hasClass(E)&&s.prev().addClass(E))):(e=s.parent("."+C).prev(),d.showLine?(e.find("."+g).removeClass("layui-tree-icon"),e.find("."+g).children(".layui-icon").removeClass(x).addClass("layui-icon-file"),(t=e.parents("."+C).eq(0)).addClass(N),t.children("."+m).each(function(){p(this).children("."+C).children("."+m).last().addClass(E)})):e.find(".layui-tree-iconArrow").addClass(y),s.parents("."+m).eq(0).removeClass(T),s.parent("."+C).remove()),s.remove()):(s.remove(),c.elem.append(c.elemNone))})})},t.prototype.events=function(){var t=this,a=t.config;t.elem.find(".layui-tree-checkedFirst"),t.setChecked(t.checkids),t.elem.find(".layui-tree-search").on("keyup",function(){var n=(e=p(this)).val(),e=e.nextAll(),i=[];e.find("."+k).each(function(){var t,e=p(this).parents("."+b);-1!=p(this).html().indexOf(n)&&(i.push(p(this).parent()),(t=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+C)[0]&&t(e.parent("."+C).parent("."+m))})(e.parent("."+m)))}),e.find("."+b).each(function(){var e=p(this).parent("."+m);e.hasClass("layui-tree-searchShow")||e.addClass(y)}),0==e.find(".layui-tree-searchShow").length&&t.elem.append(t.elemNone),a.onsearch&&a.onsearch({elem:i})}),t.elem.find(".layui-tree-search").on("keydown",function(){p(this).nextAll().find("."+b).each(function(){p(this).parent("."+m).removeClass("layui-tree-searchShow "+y)}),p(".layui-tree-emptyText")[0]&&p(".layui-tree-emptyText").remove()})},t.prototype.getChecked=function(){var l,a,o=this,e=o.config,r=e.customName,s=[],t=[];return o.elem.find(".layui-form-checked").each(function(){s.push(p(this).prev()[0].value)}),e.independentEnable?(l=function(e,o){layui.each(e,function(e,t){for(var n,i=!1,a=0;a','
      ','","
      ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
        ',""].join("")}function n(e){this.index=++l.index,this.config=c.extend({},this.config,l.config,e),this.render()}var c=layui.$,a=layui.laytpl,i=layui.form,o="transfer",l={config:{},index:layui[o]?layui[o].index+1e4:0,set:function(e){return this.config=c.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,o,e,t)}},r=function(){var t=this,e=t.config,n=e.id||t.index;return r.that[n]=t,{config:r.config[n]=e,reload:function(e){t.reload.call(t,e)},getData:function(){return t.getData.call(t)}}},d="layui-hide",u="layui-btn-disabled",s="layui-none",f="layui-transfer-box",p="layui-transfer-header",h="layui-transfer-search",y="layui-transfer-data",m=['
        ',t({index:0,checkAllName:"layTransferLeftCheckAll"}),'
        ','",'","
        ",t({index:1,checkAllName:"layTransferRightCheckAll"}),"
        "].join("");n.prototype.config={title:["列表一","列表二"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"无数据",searchNone:"无匹配数据"}},n.prototype.reload=function(e){this.config=c.extend({},this.config,e),this.render()},n.prototype.render=function(){var e=this,t=e.config,n=e.elem=c(a(m,{open:"{{",close:"}}"}).render({data:t,index:e.index})),i=t.elem=c(t.elem);i[0]&&(t.data=t.data||[],t.value=t.value||[],t.id="id"in t?t.id:elem.attr("id")||e.index,e.key=t.id,i.html(e.elem),e.layBox=e.elem.find("."+f),e.layHeader=e.elem.find("."+p),e.laySearch=e.elem.find("."+h),e.layData=n.find("."+y),e.layBtn=n.find(".layui-transfer-active .layui-btn"),e.layBox.css({width:t.width,height:t.height}),e.layData.css({height:(i=t.height-e.layHeader.outerHeight(),t.showSearch&&(i-=e.laySearch.outerHeight()),i-2)}),e.renderData(),e.events())},n.prototype.renderData=function(){var e=this.config,o=[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}];this.parseData(function(n){var i=n.selected?1:0,a=["
      • ",'',"
      • "].join("");i?layui.each(e.value,function(e,t){t==n.value&&n.selected&&(o[i].views[e]=a)}):o[i].views.push(a),delete n.selected}),this.layData.eq(0).html(o[0].views.join("")),this.layData.eq(1).html(o[1].views.join("")),this.renderCheckBtn()},n.prototype.renderForm=function(e){i.render(e,"LAY-transfer-"+this.index)},n.prototype.renderCheckBtn=function(l){var r=this,s=r.config;l=l||{},r.layBox.each(function(e){var t=(n=c(this)).find("."+y),n=n.find("."+p).find('input[type="checkbox"]'),i=t.find('input[type="checkbox"]'),a=0,o=!1;i.each(function(){var e=c(this).data("hide");(this.checked||this.disabled||e)&&a++,this.checked&&!e&&(o=!0)}),n.prop("checked",o&&a===i.length),r.layBtn.eq(e)[o?"removeClass":"addClass"](u),l.stopNone||(i=t.children("li:not(."+d+")").length,r.noneView(t,i?"":s.text.none))}),r.renderForm("checkbox")},n.prototype.noneView=function(e,t){var n=c('

        '+(t||"")+"

        ");e.find("."+s)[0]&&e.find("."+s).remove(),t.replace(/\s/g,"")&&e.append(n)},n.prototype.setValue=function(){var e=this.config,t=[];return this.layBox.eq(1).find("."+y+' input[type="checkbox"]').each(function(){c(this).data("hide")||t.push(this.value)}),e.value=t,this},n.prototype.parseData=function(t){var i=this.config,a=[];return layui.each(i.data,function(e,n){n=("function"==typeof i.parseData?i.parseData(n):n)||n,a.push(n=c.extend({},n)),layui.each(i.value,function(e,t){t==n.value&&(n.selected=!0)}),t&&t(n)}),i.data=a,this},n.prototype.getData=function(e){var t=this.config,i=[];return this.setValue(),layui.each(e||t.value,function(e,n){layui.each(t.data,function(e,t){delete t.selected,n==t.value&&i.push(t)})}),i},n.prototype.transfer=function(e,t){var n,i=this,a=i.config,o=i.layBox.eq(e),l=[];""!==(t=(t?((n=t.find('input[type="checkbox"]'))[0].checked=!1,o.siblings("."+f).find("."+y).append(t.clone()),t.remove(),l.push(n[0].value),i.setValue()):o.each(function(e){c(this).find("."+y).children("li").each(function(){var e=c(this),t=e.find('input[type="checkbox"]'),n=t.data("hide");t[0].checked&&!n&&(t[0].checked=!1,o.siblings("."+f).find("."+y).append(e.clone()),e.remove(),l.push(t[0].value)),i.setValue()})}),i.renderCheckBtn(),o.siblings("."+f).find("."+h+" input"))).val()&&t.trigger("keyup"),a.onchange&&a.onchange(i.getData(l),e)},n.prototype.events=function(){var a=this,o=a.config;a.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var e=c(this).prev(),t=e[0].checked,n=e.parents("."+f).eq(0).find("."+y);e[0].disabled||("all"===e.attr("lay-type")&&n.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=t)}),setTimeout(function(){a.renderCheckBtn({stopNone:!0})},0))}),a.elem.on("dblclick","."+y+">li",function(e){var t=c(this),n=t.children('input[type="checkbox"]'),i=t.parent().parent();n[0].disabled||a.transfer(i.data("index"),t)}),a.layBtn.on("click",function(){var e=c(this),t=e.data("index");e.hasClass(u)||a.transfer(t)}),a.laySearch.find("input").on("keyup",function(){var i=this.value,e=c(this).parents("."+h).eq(0).siblings("."+y),t=((t=e.children("li")).each(function(){var e=c(this),t=e.find('input[type="checkbox"]'),n=t[0].title;e[(n=("cs"!==o.showSearch&&(n=n.toLowerCase(),i=i.toLowerCase()),-1!==n.indexOf(i)))?"removeClass":"addClass"](d),t.data("hide",!n)}),a.renderCheckBtn(),t.length===e.children("li."+d).length);a.noneView(e,t?o.text.searchNone:"")})},r.that={},r.config={},l.reload=function(e,t){return(e=r.that[e]).reload(t),r.call(e)},l.getData=function(e){return r.that[e].getData()},l.render=function(e){return e=new n(e),r.call(e)},e(o,l)}),layui.define(["jquery","lay"],function(e){"use strict";function t(e){this.config=a.extend({},this.config,o.config,e),this.render()}var a=layui.$,i=layui.lay,o=(layui.hint(),layui.device(),{config:{},set:function(e){return this.config=a.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,r,e,t)}}),r="carousel",s="layui-this",c="layui-carousel-left",d="layui-carousel-right",u="layui-carousel-prev",f="layui-carousel-next",l="layui-carousel-arrow",p="layui-carousel-ind";t.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},t.prototype.render=function(){var e=this,t=e.config,n=a(t.elem);if(1*[carousel-item]>*"),t.index<0&&(t.index=0),t.index>=e.elemItem.length&&(t.index=e.elemItem.length-1),t.interval<800&&(t.interval=800),t.full?t.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):t.elem.css({width:t.width,height:t.height}),t.elem.attr("lay-anim",t.anim),e.elemItem.eq(t.index).addClass(s),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},t.prototype.reload=function(e){clearInterval(this.timer),this.config=a.extend({},this.config,e),this.render()},t.prototype.prevIndex=function(){var e=this.config.index-1;return e<0?this.elemItem.length-1:e},t.prototype.nextIndex=function(){var e=this.config.index+1;return e>=this.elemItem.length?0:e},t.prototype.addIndex=function(e){var t=this.config;t.index=t.index+(e=e||1),t.index>=this.elemItem.length&&(t.index=0)},t.prototype.subIndex=function(e){var t=this.config;t.index=t.index-(e=e||1),t.index<0&&(t.index=this.elemItem.length-1)},t.prototype.autoplay=function(){var e=this,t=e.config;t.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},t.interval))},t.prototype.arrow=function(){var t=this,e=t.config,n=a(['",'"].join(""));e.elem.attr("lay-arrow",e.arrow),e.elem.find("."+l)[0]&&e.elem.find("."+l).remove(),e.elem.append(n),n.on("click",function(){var e=a(this).attr("lay-type");t.slide(e)})},t.prototype.goto=function(e){var t=this.config;e>t.index?this.slide("add",e-t.index):e
          ',(t=[],layui.each(e.elemItem,function(e){t.push("")}),t.join("")),"
        "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+p)[0]&&n.elem.find("."+p).remove(),n.elem.append(i),"updown"===n.anim&&i.css("margin-top",-i.height()/2),i.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){e.goto(a(this).index())})},t.prototype.slide=function(e,t){var n=this,i=n.elemItem,a=n.config,o=a.index,l=a.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(t),i.eq(a.index).addClass(u),setTimeout(function(){i.eq(o).addClass(d),i.eq(a.index).addClass(d)},50)):(n.addIndex(t),i.eq(a.index).addClass(f),setTimeout(function(){i.eq(o).addClass(c),i.eq(a.index).addClass(c)},50)),setTimeout(function(){i.removeClass(s+" "+u+" "+f+" "+c+" "+d),i.eq(a.index).addClass(s),n.haveSlide=!1},350),n.elemInd.find("li").eq(a.index).addClass(s).siblings().removeClass(s),n.haveSlide=!0,e={index:a.index,prevIndex:o,item:i.eq(a.index)},"function"==typeof a.change&&a.change(e),layui.event.call(this,r,"change("+l+")",e))},t.prototype.events=function(){var e=this,t=e.config;t.elem.data("haveEvents")||(t.elem.on("mouseenter",function(){"always"!==e.config.autoplay&&clearInterval(e.timer)}).on("mouseleave",function(){"always"!==e.config.autoplay&&e.autoplay()}),t.elem.data("haveEvents",!0))},o.render=function(e){return new t(e)},e(r,o)}),layui.define(["jquery","lay"],function(e){"use strict";function t(e){this.index=++c.index,this.config=r.extend({},this.config,c.config,e),this.render()}var r=layui.jquery,s=layui.lay,c={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){return this.config=r.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,n,e,t)}},n="rate",d="layui-icon-rate",u="layui-icon-rate-solid",l="layui-icon-rate-half",f="layui-icon-rate-solid layui-icon-rate-half",p="layui-icon-rate layui-icon-rate-half";t.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},t.prototype.render=function(){var e=this.config,t=r(e.elem);if(1e.length&&(e.value=e.length),parseInt(e.value)===e.value||e.half||(e.value=Math.ceil(e.value)-e.value<.5?Math.ceil(e.value):Math.floor(e.value)),'
          "),a=1;a<=e.length;a++){var o='
        • ";e.half&&parseInt(e.value)!==e.value&&a==Math.ceil(e.value)?i=i+'
        • ":i+=o}i+="
        "+(e.text?''+e.value+"星":"")+"";var l=(t=e.elem).next(".layui-rate");l[0]&&l.remove(),this.elemTemp=r(i),e.span=this.elemTemp.next("span"),e.setText&&e.setText(e.value),t.html(this.elemTemp),t.addClass("layui-inline"),e.readonly||this.action()},t.prototype.setvalue=function(e){this.config.value=e,this.render()},t.prototype.action=function(){var i=this.config,a=this.elemTemp,o=a.find("i").width();a.children("li").each(function(e){var t=e+1,n=r(this);n.on("click",function(e){i.value=t,i.half&&e.pageX-r(this).offset().left<=o/2&&(i.value=i.value-.5),i.text&&a.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),n.on("mousemove",function(e){a.find("i").each(function(){r(this).addClass(d).removeClass(f)}),a.find("i:lt("+t+")").each(function(){r(this).addClass(u).removeClass(p)}),i.half&&e.pageX-r(this).offset().left<=o/2&&n.children("i").addClass(l).removeClass(u)}),n.on("mouseleave",function(){a.find("i").each(function(){r(this).addClass(d).removeClass(f)}),a.find("i:lt("+Math.floor(i.value)+")").each(function(){r(this).addClass(u).removeClass(p)}),i.half&&parseInt(i.value)!==i.value&&a.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(l).removeClass("layui-icon-rate-solid layui-icon-rate")})})},t.prototype.events=function(){},c.render=function(e){return e=new t(e),function(){var t=this;return{setvalue:function(e){t.setvalue.call(t,e)},config:t.config}}.call(e)},e(n,c)}),layui.define("jquery",function(e){"use strict";function t(e){}var y=layui.$;t.prototype.load=function(e){var i,a,n,o,t,l,r,s,c,d,u,f,p=0,h=y((e=e||{}).elem);if(h[0])return t=y(e.scrollElem||document),l=e.mb||50,r=!("isAuto"in e)||e.isAuto,s=e.end||"没有更多了",c=e.scrollElem&&e.scrollElem!==document,d=y('"),h.find(".layui-flow-more")[0]||h.append(d),u=function(e,t){e=y(e),d.before(e),(t=0==t||null)?d.html(s):d.find("a").html("加载更多"),a=t,i=null,n&&n()},(f=function(){i=!0,d.find("a").html(''),"function"==typeof e.done&&e.done(++p,u)})(),d.find("a").on("click",function(){y(this),a||i||f()}),e.isLazyimg&&(n=this.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem})),r&&t.on("scroll",function(){var t=y(this),n=t.scrollTop();o&&clearTimeout(o),!a&&h.width()&&(o=setTimeout(function(){var e=(c?t:y(window)).height();(c?t.prop("scrollHeight"):document.documentElement.scrollHeight)-n-e<=l&&(i||f())},100))}),this},t.prototype.lazyimg=function(e){function s(t,e){var n,i=u.scrollTop(),e=i+e,a=p?t.offset().top-u.offset().top+i:t.offset().top;i<=a&&a<=e&&t.attr("lay-src")&&(n=t.attr("lay-src"),layui.img(n,function(){var e=c.lazyimg.elem.eq(d);t.attr("src",n).removeAttr("lay-src"),e[0]&&o(e),d++},function(){c.lazyimg.elem.eq(d),t.removeAttr("lay-src")}))}var t,c=this,d=0,u=y((e=e||{}).scrollElem||document),f=e.elem||"img",p=e.scrollElem&&e.scrollElem!==document,o=function(e,t){var n=(p?t||u:y(window)).height(),i=u.scrollTop(),a=i+n;if(c.lazyimg.elem=y(f),e)s(e,n);else for(var o=0;o"),preview:"Preview"},wordWrap:!0,lang:"text",highlighter:!1,langMarker:!1},F=layui.code?layui.code.index+1e4:0;e("code",function(i,e){var a,o,t,n,l,r,s,c,d,u,f,p,h,y,m,g,v,x,b,w,k,C,T,E,D={config:i=A.extend(!0,{},H,i),reload:function(e){layui.code(this.updateOptions(e))},updateOptions:function(e){return delete(e=e||{}).elem,A.extend(!0,i,e)},reloadCode:function(e){layui.code(this.updateOptions(e),"reloadCode")}},N=A(i.elem);return 1',i.ln?['
        ',L.digit(t+1)+".","
        "].join(""):"",'
        ',e||" ","
        ",""].join("")})}},n=i.code,l=function(e){return"function"==typeof i.codeParse?i.codeParse(e,i):e},"reloadCode"===e?a.children(".layui-code-wrap").html(N(l(n)).html):(r=layui.code.index=++F,a.attr("lay-code-index",r),(w=_.CDDE_DATA_CLASS in a.data())&&a.attr("class",a.data(_.CDDE_DATA_CLASS)||""),w||a.data(_.CDDE_DATA_CLASS,a.attr("class")),s={copy:{className:"file-b",title:["复制代码"],event:function(e){var t=L.unescape(l(i.code));lay.clipboard.writeText({text:t,done:function(){M.msg("已复制",{icon:1})},error:function(){M.msg("复制失败",{icon:2})}}),"function"==typeof i.onCopy&&i.onCopy(t)}}},C=a.parent("."+_.ELEM_PREVIEW),T=C.children("."+_.ELEM_TAB),E=C.children("."+_.ELEM_ITEM+"-preview"),T.remove(),E.remove(),C[0]&&a.unwrap(),i.preview&&(w="LAY-CODE-DF-"+r,y=i.layout||["code","preview"],c="iframe"===i.preview,h=A('
        '),k=A('
        '),d=A('
        '),b=A('
        '),u=A('
        '),i.id&&h.attr("id",i.id),h.addClass(i.className),k.attr("lay-filter",w),layui.each(y,function(e,t){var n=A('
      • ');0===e&&n.addClass("layui-this"),n.html(i.text[t]),d.append(n)}),A.extend(s,{full:{className:"screen-full",title:["最大化显示","还原显示"],event:function(e){var t=(e=e.elem).closest("."+_.ELEM_PREVIEW),n="layui-icon-"+this.className,i="layui-icon-screen-restore",a=this.title,o=A("html,body"),l="layui-scrollbar-hide";e.hasClass(n)?(t.addClass(_.ELEM_FULL),e.removeClass(n).addClass(i),e.attr("title",a[1]),o.addClass(l)):(t.removeClass(_.ELEM_FULL),e.removeClass(i).addClass(n),e.attr("title",a[0]),o.removeClass(l))}},window:{className:"release",title:["在新窗口预览"],event:function(e){L.openWin({content:l(i.code)})}}}),i.copy&&("array"===layui.type(i.tools)?-1===i.tools.indexOf("copy")&&i.tools.unshift("copy"):i.tools=["copy"]),u.on("click",">i",function(){var e=(t=A(this)).data("type"),t={elem:t,type:e,options:i,rawCode:i.code,finalCode:L.unescape(l(i.code))};s[e]&&"function"==typeof s[e].event&&s[e].event(t),"function"==typeof i.toolsEvent&&i.toolsEvent(t)}),i.addTools&&i.tools&&(i.tools=[].concat(i.tools,i.addTools)),layui.each(i.tools,function(e,t){var n="object"==typeof t,i=n?t:s[t]||{className:t,title:[t]},a=i.className||i.type,o=i.title||[""];(n=n?i.type||a:t)&&(s[n]||((t={})[n]=i,A.extend(s,t)),u.append(''))}),a.addClass(_.ELEM_ITEM).wrap(h),k.append(d),i.tools&&k.append(u),a.before(k),c&&b.html(''),f=function(e){var t=e.children("iframe")[0];c&&t?t.srcdoc=l(i.code):e.html(i.code),setTimeout(function(){"function"==typeof i.done&&i.done({container:e,options:i,render:function(){j.render(e.find(".layui-form")),I.render()}})},3)},"preview"===y[0]?(b.addClass(_.ELEM_SHOW),a.before(b),f(b)):a.addClass(_.ELEM_SHOW).after(b),i.previewStyle=[i.style,i.previewStyle].join(""),b.attr("style",i.previewStyle),I.on("tab("+w+")",function(e){var t=A(this),n=A(e.elem).closest("."+_.ELEM_PREVIEW).find("."+_.ELEM_ITEM),e=n.eq(e.index);n.removeClass(_.ELEM_SHOW),e.addClass(_.ELEM_SHOW),"preview"===t.attr("lay-id")&&f(e),x()})),p=A(''),a.addClass((h=["layui-code-view layui-border-box"],i.wordWrap||h.push("layui-code-nowrap"),h.join(" "))),(k=i.theme||i.skin)&&(a.removeClass("layui-code-theme-dark layui-code-theme-light"),a.addClass("layui-code-theme-"+k)),i.highlighter&&a.addClass([i.highlighter,"language-"+i.lang,"layui-code-hl"].join(" ")),y=N(i.encode?L.escape(l(n)):n),m=y.lines,a.html(p.html(y.html)),i.ln&&a.append('
        '),i.height&&p.css("max-height",i.height),i.codeStyle=[i.style,i.codeStyle].join(""),i.codeStyle&&p.attr("style",function(e,t){return(t||"")+i.codeStyle}),g=[{selector:">.layui-code-wrap>.layui-code-line{}",setValue:function(e,t){e.style["padding-left"]=t+"px"}},{selector:">.layui-code-wrap>.layui-code-line>.layui-code-line-number{}",setValue:function(e,t){e.style.width=t+"px"}},{selector:">.layui-code-ln-side{}",setValue:function(e,t){e.style.width=t+"px"}}],v=lay.style({target:a[0],id:"DF-code-"+r,text:A.map(A.map(g,function(e){return e.selector}),function(e,t){return['.layui-code-view[lay-code-index="'+r+'"]',e].join(" ")}).join("")}),x=function e(){var t,n;return i.ln&&(t=Math.floor(m.length/100),n=p.children("."+_.ELEM_LINE).last().children("."+_.ELEM_LINE_NUM).outerWidth(),a.addClass(_.ELEM_LN_MODE),t)&&_.LINE_RAW_WIDTH
      • ')).html(i.title||i.text.code),a.prepend(b)),w=A('
        '),i.copy&&!i.preview&&((k=A(['','',""].join(""))).on("click",function(){s.copy.event()}),w.append(k)),i.langMarker&&w.append(''+i.lang+""),i.about&&w.append(i.about),a.append(w),i.preview||setTimeout(function(){"function"==typeof i.done&&i.done({})},3),i.elem.length===1+r&&"function"==typeof i.allDone&&i.allDone())),D})}),layui["layui.all"]||layui.addcss("modules/code.css?v=6","skincodecss");