UNPKG

layui

Version:

Classic modular Front-End UI library

1 lines 284 kB
/** 2.6.13 | MIT Licensed */;!function(f){"use strict";function r(){this.v="2.6.13"}function d(t,e){e=e||"log",f.console&&console[e]&&console[e]("layui error hint: "+t)}var t,h=f.document,m={modules:{},status:{},timeout:10,event:{}},e=f.LAYUI_GLOBAL||{},v=(t=h.currentScript?h.currentScript.src:function(){for(var t,e=h.scripts,o=e.length-1,r=o;0<r;r--)if("interactive"===e[r].readyState){t=e[r].src;break}return t||e[o].src}(),m.dir=e.dir||t.substring(0,t.lastIndexOf("/")+1)),g="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),b=m.builtin={lay:"lay",layer:"layer",laydate:"laydate",laypage:"laypage",laytpl:"laytpl",layedit:"layedit",form:"form",upload:"upload",dropdown:"dropdown",transfer:"transfer",tree:"tree",table:"table",element:"element",rate:"rate",colorpicker:"colorpicker",slider:"slider",carousel:"carousel",flow:"flow",util:"util",code:"code",jquery:"jquery",all:"all","layui.all":"layui.all"},s=(r.prototype.cache=m,r.prototype.define=function(t,r){return"function"==typeof t&&(r=t,t=[]),this.use(t,function(){function o(t,e){layui[t]=e,m.status[t]=!0}return"function"==typeof r&&r(function(t,e){o(t,e),m.callback[t]=function(){r(o)}}),this},null,"define"),this},r.prototype.use=function(o,t,e,r){var n=this,i=m.dir=m.dir||v,a=h.getElementsByTagName("head")[0],u=(o="string"==typeof o?[o]:"function"==typeof o?(t=o,["all"]):o,f.jQuery&&jQuery.fn.on&&(n.each(o,function(t,e){"jquery"===e&&o.splice(t,1)}),layui.jquery=layui.$=jQuery),o[0]),l=0;function s(t,e){var o="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;"load"!==t.type&&!o.test((t.currentTarget||t.srcElement).readyState)||(m.modules[u]=e,a.removeChild(p),function t(){return++l>1e3*m.timeout/4?d(u+" is not a valid module","error"):void(m.status[u]?c():setTimeout(t,4))}())}function c(){e.push(layui[u]),1<o.length?n.use(o.slice(1),t,e,r):"function"==typeof t&&(layui.jquery&&"function"==typeof layui.jquery&&"define"!==r?layui.jquery(function(){t.apply(layui,e)}):t.apply(layui,e))}if(e=e||[],m.host=m.host||(i.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===o.length||layui["layui.all"]&&b[u])return c(),n;var p,y=(y=(b[u]?i+"modules/":!/^\{\/\}/.test(n.modules[u])&&m.base||"")+(n.modules[u]||u)+".js").replace(/^\{\/\}/,"");return!m.modules[u]&&layui[u]&&(m.modules[u]=y),m.modules[u]?function t(){return++l>1e3*m.timeout/4?d(u+" is not a valid module","error"):void("string"==typeof m.modules[u]&&m.status[u]?c():setTimeout(t,4))}():((p=h.createElement("script")).async=!0,p.charset="utf-8",p.src=y+((i=!0===m.version?m.v||(new Date).getTime():m.version||"")?"?v="+i:""),a.appendChild(p),!p.attachEvent||p.attachEvent.toString&&p.attachEvent.toString().indexOf("[native code")<0||g?p.addEventListener("load",function(t){s(t,y)},!1):p.attachEvent("onreadystatechange",function(t){s(t,y)}),m.modules[u]=y),n},r.prototype.getStyle=function(t,e){t=t.currentStyle||f.getComputedStyle(t,null);return t[t.getPropertyValue?"getPropertyValue":"getAttribute"](e)},r.prototype.link=function(r,n,t){var i=this,e=h.getElementsByTagName("head")[0],o=h.createElement("link"),t=((t="string"==typeof n?n:t)||r).replace(/\.|\//g,""),a=o.id="layuicss-"+t,u="creating",l=0;return o.rel="stylesheet",o.href=r+(m.debug?"?v="+(new Date).getTime():""),o.media="all",h.getElementById(a)||e.appendChild(o),"function"!=typeof n||function t(e){var o=h.getElementById(a);return++l>1e3*m.timeout/100?d(r+" timeout"):void(1989===parseInt(i.getStyle(o,"width"))?(e===u&&o.removeAttribute("lay-status"),o.getAttribute("lay-status")===u?setTimeout(t,100):n()):(o.setAttribute("lay-status",u),setTimeout(function(){t(u)},100)))}(),i},r.prototype.addcss=function(t,e,o){return layui.link(m.dir+"css/"+t,e,o)},m.callback={},r.prototype.factory=function(t){if(layui[t])return"function"==typeof m.callback[t]?m.callback[t]:null},r.prototype.img=function(t,e,o){var r=new Image;if(r.src=t,r.complete)return e(r);r.onload=function(){r.onload=null,"function"==typeof e&&e(r)},r.onerror=function(t){r.onerror=null,"function"==typeof o&&o(t)}},r.prototype.config=function(t){for(var e in t=t||{})m[e]=t[e];return this},r.prototype.modules=function(){var t,e={};for(t in b)e[t]=b[t];return e}(),r.prototype.extend=function(t){for(var e in t=t||{})this[e]||this.modules[e]?d(e+" Module already exists","error"):this.modules[e]=t[e];return this},r.prototype.router=r.prototype.hash=function(t){var o={path:[],search:{},hash:((t=t||location.hash).match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(t)&&(t=t.replace(/^#\//,""),o.href="/"+t,t=t.replace(/([^#])(#.*$)/,"$1").split("/")||[],this.each(t,function(t,e){/^\w+=/.test(e)?(e=e.split("="),o.search[e[0]]=e[1]):o.path.push(e)})),o},r.prototype.url=function(t){var n,e,o=this;return{pathname:(t?((t.match(/\.[^.]+?\/.+/)||[])[0]||"").replace(/^[^\/]+/,"").replace(/\?.+/,""):location.pathname).replace(/^\//,"").split("/"),search:(n={},e=(t?((t.match(/\?.+/)||[])[0]||"").replace(/\#.+/,""):location.search).replace(/^\?+/,"").split("&"),o.each(e,function(t,e){var o=e.indexOf("="),r=o<0?e.substr(0,e.length):0!==o&&e.substr(0,o);r&&(n[r]=0<o?e.substr(o+1):null)}),n),hash:o.router(t?(t.match(/#.+/)||[])[0]||"/":location.hash)}},r.prototype.data=function(t,e,o){if(t=t||"layui",o=o||localStorage,f.JSON&&f.JSON.parse){if(null===e)return delete o[t];e="object"==typeof e?e:{key:e};try{var r=JSON.parse(o[t])}catch(t){r={}}return"value"in e&&(r[e.key]=e.value),e.remove&&delete r[e.key],o[t]=JSON.stringify(r),e.key?r[e.key]:r}},r.prototype.sessionData=function(t,e){return this.data(t,e,sessionStorage)},r.prototype.device=function(t){function e(t){var e=new RegExp(t+"/([^\\s\\_\\-]+)");return(t=(o.match(e)||[])[1])||!1}var o=navigator.userAgent.toLowerCase(),r={os:/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0,ie:!!(f.ActiveXObject||"ActiveXObject"in f)&&((o.match(/msie\s(\d+)/)||[])[1]||"11"),weixin:e("micromessenger")};return t&&!r[t]&&(r[t]=e(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r.mobile=!(!r.android&&!r.ios),r},r.prototype.hint=function(){return{error:d}},r.prototype._typeof=r.prototype.type=function(t){return null===t?String(t):"object"==typeof t||"function"==typeof t?(e=(e=Object.prototype.toString.call(t).match(/\s(.+)\]$/)||[])[1]||"Object",new RegExp("\\b(Function|Array|Date|RegExp|Object|Error|Symbol)\\b").test(e)?e.toLowerCase():"object"):typeof t;var e},r.prototype._isArray=r.prototype.isArray=function(t){var e,o=this.type(t);return!(!t||"object"!=typeof t||t===f)&&(e="length"in t&&t.length,"array"===o||0===e||"number"==typeof e&&0<e&&e-1 in t)},r.prototype.each=function(t,o){function e(t,e){return o.call(e[t],t,e[t])}if("function"!=typeof o)return this;if(this.isArray(t=t||[]))for(r=0;r<t.length&&!e(r,t);r++);else for(var r in t)if(e(r,t))break;return this},r.prototype.sort=function(t,n,e){var o=JSON.parse(JSON.stringify(t||[]));return"object"!==this.type(t)||n?"object"!=typeof t?[o]:(o.sort(function(t,e){var o=t[n],r=e[n];if(!isNaN(t)&&!isNaN(e))return t-e;if(!isNaN(t)&&isNaN(e)){if(!n||"object"!=typeof e)return-1;o=t}else if(isNaN(t)&&!isNaN(e)){if(!n||"object"!=typeof t)return 1;r=e}t=[!isNaN(o),!isNaN(r)];return t[0]&&t[1]?o&&!r&&0!==r?1:!o&&0!==o&&r?-1:o-r:t[0]||t[1]?t[0]||!t[1]?-1:!t[0]||t[1]?1:void 0:r<o?1:o<r?-1:0}),e&&o.reverse(),o):o},r.prototype.stope=function(e){e=e||f.event;try{e.stopPropagation()}catch(t){e.cancelBubble=!0}},"LAYUI-EVENT-REMOVE");r.prototype.onevent=function(t,e,o){return"string"!=typeof t||"function"!=typeof o?this:r.event(t,e,null,o)},r.prototype.event=r.event=function(t,e,o,r){function n(t,e){!1===(e&&e.call(i,o))&&null===a&&(a=!1)}var i=this,a=null,u=(e||"").match(/\((.*)\)$/)||[],t=(t+"."+e).replace(u[0],""),l=u[1]||"";return o===s?(delete(i.cache.event[t]||{})[l],i):r?(m.event[t]=m.event[t]||{},m.event[t][l]=[r],this):(layui.each(m.event[t],function(t,e){"{*}"===l?layui.each(e,n):(""===t&&layui.each(e,n),l&&t===l&&layui.each(e,n))}),a)},r.prototype.on=function(t,e,o){return this.onevent.call(this,e,t,o)},r.prototype.off=function(t,e){return this.event.call(this,e,t,s)},f.layui=new r}(window);layui.define(function(a){var i=layui.cache;layui.config({dir:i.dir.replace(/lay\/dest\/$/,"")}),a("layui.all",layui.v)});!function(l){"use strict";function h(t){return new i(t)}function i(t){for(var e=0,n="object"==typeof t?[t]:(this.selector=t,f.querySelectorAll(t||null));e<n.length;e++)this.push(n[e])}var t,f=l.document;(i.prototype=[]).constructor=i,h.extend=function(){function o(t,e){for(var n in t=t||("array"===layui.type(e)?[]:{}),e)t[n]=e[n]&&e[n].constructor===Object?o(t[n],e[n]):e[n];return t}var t,e=1,n=arguments;for(n[0]="object"==typeof n[0]?n[0]:{},t=n.length;e<t;e++)"object"==typeof n[e]&&o(n[0],n[e]);return n[0]},h.v="1.0.8",h.ie=(t=navigator.userAgent.toLowerCase(),!!(l.ActiveXObject||"ActiveXObject"in l)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")),h.layui=layui||{},h.getPath=layui.cache.dir,h.stope=layui.stope,h.each=function(){return layui.each.apply(layui,arguments),this},h.digit=function(t,e){if("string"!=typeof t&&"number"!=typeof t)return"";var n="";e=e||2;for(var o=(t=String(t)).length;o<e;o++)n+="0";return t<Math.pow(10,e)?n+t:t},h.elem=function(t,e){var n=f.createElement(t);return h.each(e||{},function(t,e){n.setAttribute(t,e)}),n},h.hasScrollbar=function(){return f.body.scrollHeight>(l.innerHeight||f.documentElement.clientHeight)},h.position=function(t,e,n){var o,i,r,c,u,a,s;e&&(n=n||{},t!==f&&t!==h("body")[0]||(n.clickType="right"),u="right"===n.clickType?{left:(u=n.e||l.event||{}).clientX,top:u.clientY,right:u.clientX,bottom:u.clientY}:t.getBoundingClientRect(),a=e.offsetWidth,s=e.offsetHeight,o=function(t){return f.body[t=t?"scrollLeft":"scrollTop"]|f.documentElement[t]},r=u.left,c=u.bottom,"center"===n.align?r-=(a-t.offsetWidth)/2:"right"===n.align&&(r=r-a+t.offsetWidth),(r=r+a+5>(i=function(t){return f.documentElement[t?"clientWidth":"clientHeight"]})("width")?i("width")-a-5:r)<5&&(r=5),c+s+5>i()&&(u.top>s+5?c=u.top-s-10:"right"===n.clickType&&(c=i()-s-10)<0&&(c=0)),(a=n.position)&&(e.style.position=a),e.style.left=r+("fixed"===a?0:o(1))+"px",e.style.top=c+("fixed"===a?0:o())+"px",h.hasScrollbar()||(s=e.getBoundingClientRect(),!n.SYSTEM_RELOAD&&s.bottom+5>i()&&(n.SYSTEM_RELOAD=!0,setTimeout(function(){h.position(t,e,n)},50))))},h.options=function(t,e){t=h(t),e=e||"lay-options";try{return new Function("return "+(t.attr(e)||"{}"))()}catch(t){return hint.error("parseerror\uff1a"+t,"error"),{}}},h.isTopElem=function(n){var t=[f,h("body")[0]],o=!1;return h.each(t,function(t,e){if(e===n)return o=!0}),o},i.addStr=function(n,t){return n=n.replace(/\s+/," "),t=t.replace(/\s+/," ").split(" "),h.each(t,function(t,e){new RegExp("\\b"+e+"\\b").test(n)||(n=n+" "+e)}),n.replace(/^\s|\s$/,"")},i.removeStr=function(n,t){return n=n.replace(/\s+/," "),t=t.replace(/\s+/," ").split(" "),h.each(t,function(t,e){e=new RegExp("\\b"+e+"\\b");e.test(n)&&(n=n.replace(e,""))}),n.replace(/\s+/," ").replace(/^\s|\s$/,"")},i.prototype.find=function(o){var i=this,r=0,c=[],u="object"==typeof o;return this.each(function(t,e){for(var n=u?e.contains(o):e.querySelectorAll(o||null);r<n.length;r++)c.push(n[r]);i.shift()}),u||(i.selector=(i.selector?i.selector+" ":"")+o),h.each(c,function(t,e){i.push(e)}),i},i.prototype.each=function(t){return h.each.call(this,this,t)},i.prototype.addClass=function(n,o){return this.each(function(t,e){e.className=i[o?"removeStr":"addStr"](e.className,n)})},i.prototype.removeClass=function(t){return this.addClass(t,!0)},i.prototype.hasClass=function(n){var o=!1;return this.each(function(t,e){new RegExp("\\b"+n+"\\b").test(e.className)&&(o=!0)}),o},i.prototype.css=function(e,o){function i(t){return isNaN(t)?t:t+"px"}var t=this;return"string"!=typeof e||void 0!==o?t.each(function(t,n){"object"==typeof e?h.each(e,function(t,e){n.style[t]=i(e)}):n.style[e]=i(o)}):0<t.length?t[0].style[e]:void 0},i.prototype.width=function(n){var o=this;return void 0!==n?o.each(function(t,e){o.css("width",n)}):0<o.length?o[0].offsetWidth:void 0},i.prototype.height=function(n){var o=this;return void 0!==n?o.each(function(t,e){o.css("height",n)}):0<o.length?o[0].offsetHeight:void 0},i.prototype.attr=function(n,o){var t=this;return void 0!==o?t.each(function(t,e){e.setAttribute(n,o)}):0<t.length?t[0].getAttribute(n):void 0},i.prototype.removeAttr=function(n){return this.each(function(t,e){e.removeAttribute(n)})},i.prototype.html=function(n){var t=this;return void 0!==n?this.each(function(t,e){e.innerHTML=n}):0<t.length?t[0].innerHTML:void 0},i.prototype.val=function(n){var t=this;return void 0!==n?this.each(function(t,e){e.value=n}):0<t.length?t[0].value:void 0},i.prototype.append=function(n){return this.each(function(t,e){"object"==typeof n?e.appendChild(n):e.innerHTML=e.innerHTML+n})},i.prototype.remove=function(n){return this.each(function(t,e){n?e.removeChild(n):e.parentNode.removeChild(e)})},i.prototype.on=function(n,o){return this.each(function(t,e){e.attachEvent?e.attachEvent("on"+n,function(t){t.target=t.srcElement,o.call(e,t)}):e.addEventListener(n,o,!1)})},i.prototype.off=function(n,o){return this.each(function(t,e){e.detachEvent?e.detachEvent("on"+n,o):e.removeEventListener(n,o,!1)})},l.lay=h,l.layui&&layui.define&&layui.define(function(t){t("lay",h)})}(window,window.document);layui.define(function(e){"use strict";function r(e){this.tpl=e}function n(e){return"string"!=typeof e?p.error("Template not found"):new r(e)}var o={open:"{{",close:"}}"},p={exp:function(e){return new RegExp(e,"g")},query:function(e,r,n){return a((r||"")+o.open+["#([\\s\\S])+?","([^{#}])*?"][e||0]+o.close+(n||""))},escape:function(e){return null==e?"":/[<"'>]|&(?=#[a-zA-Z0-9]+)/g.test(e+="")?e.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;"):e},error:function(e,r){var n="Laytpl Error: ";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e}},a=p.exp;r.pt=r.prototype,window.errors=0,r.pt.parse=function(e,r){var n=e,c=a("^"+o.open+"#",""),t=a(o.close+"$","");e='"use strict";var view = "'+(e=e.replace(/\s+|\r|\t|\n/g," ").replace(a(o.open+"#"),o.open+"# ").replace(a(o.close+"}"),"} "+o.close).replace(/\\/g,"\\\\").replace(a(o.open+"!(.+?)!"+o.close),function(e){return e=e.replace(a("^"+o.open+"!"),"").replace(a("!"+o.close),"").replace(a(o.open+"|"+o.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(p.query(),function(e){return'";'+(e=e.replace(c,"").replace(t,"")).replace(/\\(.)/g,"$1")+';view+="'}).replace(p.query(1),function(e){var r='"+laytpl.escape(';return e.replace(/\s/g,"")===o.open+o.close?"":(e=e.replace(a(o.open+"|"+o.close),""),/^=/.test(e)?e=e.replace(/^=/,""):/^-/.test(e)&&(e=e.replace(/^-/,""),r='"+('),r+e.replace(/\\(.)/g,"$1")+')+"')}))+'";return view;';try{return this.cache=e=new Function("d, laytpl",e),e(r,p)}catch(e){return delete this.cache,p.error(e,n)}},r.pt.render=function(e,r){var n=this;return e?(n=n.cache?n.cache(e,p):n.parse(n.tpl,e),r?void r(n):n):p.error("no data")};n.config=function(e){for(var r in e=e||{})o[r]=e[r]},n.v="1.2.0",e("laytpl",n)});layui.define(function(e){"use strict";function a(e){var a=this;a.config=e||{},a.config.index=++o.index,a.render(!0)}var r=document,s="getElementById",c="getElementsByTagName",u="layui-disabled",o=(a.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},a.prototype.view=function(){var t,i,n=this.config,r=n.groups="groups"in n?0|n.groups:5,s=(n.layout="object"==typeof n.layout?n.layout:["prev","page","next"],n.count=0|n.count,n.curr=0|n.curr||1,n.limits="object"==typeof n.limits?n.limits:[10,20,30,40,50],n.limit=0|n.limit||10,n.pages=Math.ceil(n.count/n.limit)||1,n.curr>n.pages&&(n.curr=n.pages),r<0?r=1:r>n.pages&&(r=n.pages),n.prev="prev"in n?n.prev:"&#x4E0A;&#x4E00;&#x9875;",n.next="next"in n?n.next:"&#x4E0B;&#x4E00;&#x9875;",n.pages>r?Math.ceil((n.curr+(1<r?1:0))/(0<r?r:1)):1),l={prev:n.prev?'<a href="javascript:;" class="layui-laypage-prev'+(1==n.curr?" "+u:"")+'" data-page="'+(n.curr-1)+'">'+n.prev+"</a>":"",page:function(){var e=[];if(n.count<1)return"";1<s&&!1!==n.first&&0!==r&&e.push('<a href="javascript:;" class="layui-laypage-first" data-page="1" title="&#x9996;&#x9875;">'+(n.first||1)+"</a>");var a=Math.floor((r-1)/2),t=1<s?n.curr-a:1,i=1<s?(a=n.curr+(r-a-1))>n.pages?n.pages:a:r;for(i-t<r-1&&(t=i-r+1),!1!==n.first&&2<t&&e.push('<span class="layui-laypage-spr">&#x2026;</span>');t<=i;t++)t===n.curr?e.push('<span class="layui-laypage-curr"><em class="layui-laypage-em" '+(/^#/.test(n.theme)?'style="background-color:'+n.theme+';"':"")+"></em><em>"+t+"</em></span>"):e.push('<a href="javascript:;" data-page="'+t+'">'+t+"</a>");return n.pages>r&&n.pages>i&&!1!==n.last&&(i+1<n.pages&&e.push('<span class="layui-laypage-spr">&#x2026;</span>'),0!==r&&e.push('<a href="javascript:;" class="layui-laypage-last" title="&#x5C3E;&#x9875;" data-page="'+n.pages+'">'+(n.last||n.pages)+"</a>")),e.join("")}(),next:n.next?'<a href="javascript:;" class="layui-laypage-next'+(n.curr==n.pages?" "+u:"")+'" data-page="'+(n.curr+1)+'">'+n.next+"</a>":"",count:'<span class="layui-laypage-count">\u5171 '+n.count+" \u6761</span>",limit:(t=['<span class="layui-laypage-limits"><select lay-ignore>'],layui.each(n.limits,function(e,a){t.push('<option value="'+a+'"'+(a===n.limit?"selected":"")+">"+a+" \u6761/\u9875</option>")}),t.join("")+"</select></span>"),refresh:['<a href="javascript:;" data-page="'+n.curr+'" class="layui-laypage-refresh">','<i class="layui-icon layui-icon-refresh"></i>',"</a>"].join(""),skip:['<span class="layui-laypage-skip">&#x5230;&#x7B2C;','<input type="text" min="1" value="'+n.curr+'" class="layui-input">','&#x9875;<button type="button" class="layui-laypage-btn">&#x786e;&#x5b9a;</button>',"</span>"].join("")};return['<div class="layui-box layui-laypage layui-laypage-'+(n.theme?/^#/.test(n.theme)?"molv":n.theme:"default")+'" id="layui-laypage-'+n.index+'">',(i=[],layui.each(n.layout,function(e,a){l[a]&&i.push(l[a])}),i.join("")),"</div>"].join("")},a.prototype.jump=function(e,a){if(e){var t=this,i=t.config,n=e.children,r=e[c]("button")[0],s=e[c]("input")[0],e=e[c]("select")[0],l=function(){var e=0|s.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return l();for(var u=0,p=n.length;u<p;u++)"a"===n[u].nodeName.toLowerCase()&&o.on(n[u],"click",function(){var e=0|this.getAttribute("data-page");e<1||e>i.pages||(i.curr=e,t.render())});e&&o.on(e,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),r&&o.on(r,"click",function(){l()})}},a.prototype.skip=function(t){var i,e;t&&(i=this,(e=t[c]("input")[0])&&o.on(e,"keyup",function(e){var a=this.value,e=e.keyCode;/^(37|38|39|40)$/.test(e)||(/\D/.test(a)&&(this.value=a.replace(/\D/,"")),13===e&&i.jump(t,!0))}))},a.prototype.render=function(e){var a=this,t=a.config,i=a.type(),n=a.view(),i=(2===i?t.elem&&(t.elem.innerHTML=n):3===i?t.elem.html(n):r[s](t.elem)&&(r[s](t.elem).innerHTML=n),t.jump&&t.jump(t,e),r[s]("layui-laypage-"+t.index));a.jump(i),t.hash&&!e&&(location.hash="!"+t.hash+"="+t.curr),a.skip(i)},{render:function(e){return new a(e).index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(a,e,t){return a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1),this}});e("laypage",o)});!function(i,r){"use strict";function l(){var t=this,e=t.config.id;return{hint:function(e){t.hint.call(t,e)},config:(l.that[e]=t).config}}function u(e){var t=this;t.index=++h.index,t.config=lay.extend({},t.config,h.config,e),(e=t.config).id="id"in e?e.id:t.index,h.ready(function(){t.init()})}var n=i.layui&&layui.define,o={getPath:i.lay&&lay.getPath?lay.getPath:"",link:function(e,t,a){h.path&&i.lay&&lay.layui&&lay.layui.link(h.path+e,t,a)}},e=i.LAYUI_GLOBAL||{},h={v:"5.3.1",config:{},index:i.laydate&&i.laydate.v?1e5:0,path:e.laydate_dir||o.getPath,set:function(e){var t=this;return t.config=lay.extend({},t.config,e),t},ready:function(e){var t="laydate",a=(n?"modules/laydate/":"theme/")+"default/laydate.css?v="+h.v;return n?layui.addcss(a,e,t):o.link(a,e,t),this}},a="laydate",w="layui-this",x="laydate-disabled",p=[100,2e5],f="layui-laydate-static",M="layui-laydate-list",s="layui-laydate-hint",E=".laydate-btns-confirm",C="laydate-time-text",I="laydate-btns-time",g="layui-laydate-preview",y="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s";l.formatArr=function(e){return(e||"").match(new RegExp(y+"|.","g"))||[]},u.isLeapYear=function(e){return e%4==0&&e%100!=0||e%400==0},u.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,isInitValue:!0,min:"1900-1-1",max:"2099-12-31",trigger:"click",show:!1,showBottom:!0,isPreview:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},u.prototype.lang=function(){var e={cn:{weeks:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],time:["\u65f6","\u5206","\u79d2"],timeTips:"\u9009\u62e9\u65f6\u95f4",startTime:"\u5f00\u59cb\u65f6\u95f4",endTime:"\u7ed3\u675f\u65f6\u95f4",dateTips:"\u8fd4\u56de\u65e5\u671f",month:["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"],tools:{confirm:"\u786e\u5b9a",clear:"\u6e05\u7a7a",now:"\u73b0\u5728"},timeout:"\u7ed3\u675f\u65f6\u95f4\u4e0d\u80fd\u65e9\u4e8e\u5f00\u59cb\u65f6\u95f4<br>\u8bf7\u91cd\u65b0\u9009\u62e9",invalidDate:"\u4e0d\u5728\u6709\u6548\u65e5\u671f\u6216\u65f6\u95f4\u8303\u56f4\u5185",formatError:["\u65e5\u671f\u683c\u5f0f\u4e0d\u5408\u6cd5<br>\u5fc5\u987b\u9075\u5faa\u4e0b\u8ff0\u683c\u5f0f\uff1a<br>","<br>\u5df2\u4e3a\u4f60\u91cd\u7f6e"],preview:"\u5f53\u524d\u9009\u4e2d\u7684\u7ed3\u679c"},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<br>Please re-select",invalidDate:"Invalid date",formatError:["The date format error<br>Must be followed\uff1a<br>","<br>It has been reset"],preview:"The selected result"}};return e[this.config.lang]||e.cn},u.prototype.init=function(){var r=this,o=r.config,e="static"===o.position,t={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};o.elem=lay(o.elem),o.eventElem=lay(o.eventElem),o.elem[0]&&(r.rangeStr=o.range?"string"==typeof o.range?o.range:"-":"","array"===layui.type(o.range)&&(r.rangeElem=[lay(o.range[0]),lay(o.range[1])]),t[o.type]||(i.console&&console.error&&console.error("laydate type error:'"+o.type+"' is not supported"),o.type="date"),o.format===t.date&&(o.format=t[o.type]||t.date),r.format=l.formatArr(o.format),r.EXP_IF="",r.EXP_SPLIT="",lay.each(r.format,function(e,t){e=new RegExp(y).test(t)?"\\d{"+(new RegExp(y).test(r.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;r.EXP_IF=r.EXP_IF+e,r.EXP_SPLIT=r.EXP_SPLIT+"("+e+")"}),r.EXP_IF_ONE=new RegExp("^"+r.EXP_IF+"$"),r.EXP_IF=new RegExp("^"+(o.range?r.EXP_IF+"\\s\\"+r.rangeStr+"\\s"+r.EXP_IF:r.EXP_IF)+"$"),r.EXP_SPLIT=new RegExp("^"+r.EXP_SPLIT+"$",""),r.isInput(o.elem[0])||"focus"===o.trigger&&(o.trigger="click"),o.elem.attr("lay-key")||(o.elem.attr("lay-key",r.index),o.eventElem.attr("lay-key",r.index)),o.mark=lay.extend({},o.calendar&&"cn"===o.lang?{"0-1-1":"\u5143\u65e6","0-2-14":"\u60c5\u4eba","0-3-8":"\u5987\u5973","0-3-12":"\u690d\u6811","0-4-1":"\u611a\u4eba","0-5-1":"\u52b3\u52a8","0-5-4":"\u9752\u5e74","0-6-1":"\u513f\u7ae5","0-9-10":"\u6559\u5e08","0-10-1":"\u56fd\u5e86","0-12-25":"\u5723\u8bde"}:{},o.mark),lay.each(["min","max"],function(e,t){var a,n,i=[],l=[];l="number"==typeof o[t]?(n=o[t],a=new Date,a=r.newDate({year:a.getFullYear(),month:a.getMonth(),date:a.getDate(),hours:"23",minutes:"59",seconds:"59"}).getTime(),i=[(n=new Date(n?n<864e5?a+864e5*n:n:a)).getFullYear(),n.getMonth()+1,n.getDate()],[n.getHours(),n.getMinutes(),n.getSeconds()]):(i=(o[t].match(/\d+-\d+-\d+/)||[""])[0].split("-"),(o[t].match(/\d+:\d+:\d+/)||[""])[0].split(":")),o[t]={year:0|i[0]||(new Date).getFullYear(),month:i[1]?(0|i[1])-1:(new Date).getMonth(),date:0|i[2]||(new Date).getDate(),hours:0|l[0],minutes:0|l[1],seconds:0|l[2]}}),r.elemID="layui-laydate"+o.elem.attr("lay-key"),(o.show||e)&&r.render(),e||r.events(),o.value&&o.isInitValue&&("date"===layui.type(o.value)?r.setValue(r.parse(0,r.systemDate(o.value))):r.setValue(o.value)))},u.prototype.render=function(){var n,e,t=this,o=t.config,s=t.lang(),i="static"===o.position,a=t.elem=lay.elem("div",{id:t.elemID,class:["layui-laydate",o.range?" layui-laydate-range":"",i?" "+f:"",o.theme&&"default"!==o.theme&&!/^#/.test(o.theme)?" laydate-theme-"+o.theme:""].join("")}),y=t.elemMain=[],d=t.elemHeader=[],m=t.elemCont=[],c=t.table=[],l=t.footer=lay.elem("div",{class:"layui-laydate-footer"});o.zIndex&&(a.style.zIndex=o.zIndex),lay.each(new Array(2),function(e){if(!o.range&&0<e)return!0;var a=lay.elem("div",{class:"layui-laydate-header"}),t=[((t=lay.elem("i",{class:"layui-icon laydate-icon laydate-prev-y"})).innerHTML="&#xe65a;",t),((t=lay.elem("i",{class:"layui-icon laydate-icon laydate-prev-m"})).innerHTML="&#xe603;",t),(t=lay.elem("div",{class:"laydate-set-ym"}),n=lay.elem("span"),l=lay.elem("span"),t.appendChild(n),t.appendChild(l),t),((n=lay.elem("i",{class:"layui-icon laydate-icon laydate-next-m"})).innerHTML="&#xe602;",n),((l=lay.elem("i",{class:"layui-icon laydate-icon laydate-next-y"})).innerHTML="&#xe65b;",l)],n=lay.elem("div",{class:"layui-laydate-content"}),i=lay.elem("table"),l=lay.elem("thead"),r=lay.elem("tr");lay.each(t,function(e,t){a.appendChild(t)}),l.appendChild(r),lay.each(new Array(6),function(a){var n=i.insertRow(0);lay.each(new Array(7),function(e){var t;0===a&&((t=lay.elem("th")).innerHTML=s.weeks[e],r.appendChild(t)),n.insertCell(e)})}),i.insertBefore(l,i.children[0]),n.appendChild(i),y[e]=lay.elem("div",{class:"layui-laydate-main laydate-main-list-"+e}),y[e].appendChild(a),y[e].appendChild(n),d.push(t),m.push(n),c.push(i)}),lay(l).html((e=[],n=[],"datetime"===o.type&&e.push('<span lay-type="datetime" class="'+I+'">'+s.timeTips+"</span>"),!o.range&&"datetime"===o.type||e.push('<span class="'+g+'" title="'+s.preview+'"></span>'),lay.each(o.btns,function(e,t){var a=s.tools[t]||"btn";o.range&&"now"===t||(i&&"clear"===t&&(a="cn"===o.lang?"\u91cd\u7f6e":"Reset"),n.push('<span lay-type="'+t+'" class="laydate-btns-'+t+'">'+a+"</span>"))}),e.push('<div class="laydate-footer-btns">'+n.join("")+"</div>"),e.join(""))),lay.each(y,function(e,t){a.appendChild(t)}),o.showBottom&&a.appendChild(l),/^#/.test(o.theme)&&(e=lay.elem("style"),l=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,t.elemID).replace(/{{theme}}/g,o.theme),"styleSheet"in e?(e.setAttribute("type","text/css"),e.styleSheet.cssText=l):e.innerHTML=l,lay(a).addClass("laydate-theme-molv"),a.appendChild(e)),t.remove(u.thisElemDate),h.thisId=o.id,i?o.elem.append(a):(r.body.appendChild(a),t.position()),t.checkDate().calendar(null,0,"init"),t.changeEvent(),u.thisElemDate=t.elemID,"function"==typeof o.ready&&o.ready(lay.extend({},o.dateTime,{month:o.dateTime.month+1})),t.preview()},u.prototype.remove=function(e){var t=this,a=(t.config,lay("#"+(e||t.elemID)));return a[0]&&(a.hasClass(f)||t.checkDate(function(){a.remove(),delete h.thisId})),t},u.prototype.position=function(){var e=this.config;return lay.position(this.bindElem||e.elem[0],this.elem,{position:e.position}),this},u.prototype.hint=function(e){var t=this,a=(t.config,lay.elem("div",{class:s}));t.elem&&(a.innerHTML=e||"",lay(t.elem).find("."+s).remove(),t.elem.appendChild(a),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){lay(t.elem).find("."+s).remove()},3e3))},u.prototype.getAsYM=function(e,t,a){return a?t--:t++,t<0&&(t=11,e--),11<t&&(t=0,e++),[e,t]},u.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},u.prototype.checkDate=function(e){function a(n,i,l){var r=["startTime","endTime"];i=(i.match(s.EXP_SPLIT)||[]).slice(1),l=l||0,y.range&&(s[r[l]]=s[r[l]]||{}),lay.each(s.format,function(e,t){var a=parseFloat(i[e]);i[e].length<t.length&&(o=!0),/yyyy|y/.test(t)?(a<p[0]&&(a=p[0],o=!0),n.year=a):/MM|M/.test(t)?(a<1&&(a=1,o=!0),n.month=a-1):/dd|d/.test(t)?(a<1&&(a=1,o=!0),n.date=a):/HH|H/.test(t)?(a<1&&(o=!(a=0)),n.hours=a,y.range&&(s[r[l]].hours=a)):/mm|m/.test(t)?(a<1&&(o=!(a=0)),n.minutes=a,y.range&&(s[r[l]].minutes=a)):/ss|s/.test(t)&&(a<1&&(o=!(a=0)),n.seconds=a,y.range&&(s[r[l]].seconds=a))}),d(n)}var t,o,s=this,y=(new Date,s.config),n=s.lang(),i=y.dateTime=y.dateTime||s.systemDate(),l=s.bindElem||y.elem[0],r=(s.isInput(l),function(){if(s.rangeElem){var e=[s.rangeElem[0].val(),s.rangeElem[1].val()];if(e[0]&&e[1])return e.join(" "+s.rangeStr+" ")}return s.isInput(l)?l.value:"static"===y.position?"":lay(l).attr("lay-date")}()),d=function(e){e.year>p[1]&&(e.year=p[1],o=!0),11<e.month&&(e.month=11,o=!0),23<e.hours&&(e.hours=0,o=!0),59<e.minutes&&(e.minutes=0,e.hours++,o=!0),59<e.seconds&&(e.seconds=0,e.minutes++,o=!0),t=h.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,o=!0)};if("limit"===e)return d(i),s;"string"==typeof(r=r||y.value)&&(r=r.replace(/\s+/g," ").replace(/^\s|\s$/g,""));function m(){var e,t,a;y.range&&(s.endDate=s.endDate||lay.extend({},y.dateTime,(e={},t=y.dateTime,a=s.getAsYM(t.year,t.month),"year"===y.type?e.year=t.year+1:"time"!==y.type&&(e.year=a[0],e.month=a[1]),"datetime"!==y.type&&"time"!==y.type||(e.hours=23,e.minutes=e.seconds=59),e)))}function c(e){return s.newDate(e).getTime()}var u;m(),"string"==typeof r&&r?s.EXP_IF.test(r)?y.range?(r=r.split(" "+s.rangeStr+" "),lay.each([y.dateTime,s.endDate],function(e,t){a(t,r[e],e)})):a(i,r):(s.hint(n.formatError[0]+(y.range?y.format+" "+s.rangeStr+" "+y.format:y.format)+n.formatError[1]),o=!0):r&&"date"===layui.type(r)?y.dateTime=s.systemDate(r):(y.dateTime=s.systemDate(),delete s.startTime,delete s.endDate,m(),delete s.endTime),s.rangeElem&&(n=[s.rangeElem[0].val(),s.rangeElem[1].val()],u=[y.dateTime,s.endDate],lay.each(n,function(e,t){s.EXP_IF_ONE.test(t)&&a(u[e],t,e)})),d(i),y.range&&d(s.endDate),o&&r&&s.setValue(!y.range||s.endDate?s.parse():"");return c(i)>c(y.max)?i=y.dateTime=lay.extend({},y.max):c(i)<c(y.min)&&(i=y.dateTime=lay.extend({},y.min)),y.range&&(c(s.endDate)<c(y.min)||c(s.endDate)>c(y.max))&&(s.endDate=lay.extend({},y.max)),e&&e(),s},u.prototype.mark=function(e,a){var n,t=this.config;return lay.each(t.mark,function(e,t){e=e.split("-");e[0]!=a[0]&&0!=e[0]||e[1]!=a[1]&&0!=e[1]||e[2]!=a[2]||(n=t||a[2])}),n&&e.html('<span class="laydate-day-mark">'+n+"</span>"),this},u.prototype.limit=function(e,t,a,i){var l=this,n=l.config,r={},a=n[41<a?"endDate":"dateTime"],a=lay.extend({},a,t||{});return lay.each({now:a,min:n.min,max:n.max},function(e,a){var n;r[e]=l.newDate(lay.extend({year:a.year,month:a.month,date:a.date},(n={},lay.each(i,function(e,t){n[t]=a[t]}),n))).getTime()}),t=r.now<r.min||r.now>r.max,e&&e[t?"addClass":"removeClass"](x),t},u.prototype.thisDateTime=function(e){var t=this.config;return e?this.endDate:t.dateTime},u.prototype.calendar=function(e,t,a){var i,l,r,o=this,n=o.config,t=t?1:0,s=e||o.thisDateTime(t),y=new Date,d=o.lang(),m="date"!==n.type&&"datetime"!==n.type,c=lay(o.table[t]).find("td"),t=lay(o.elemHeader[t][2]).find("span");return s.year<p[0]&&(s.year=p[0],o.hint(d.invalidDate)),s.year>p[1]&&(s.year=p[1],o.hint(d.invalidDate)),o.firstDate||(o.firstDate=lay.extend({},s)),y.setFullYear(s.year,s.month,1),i=y.getDay(),l=h.getEndDate(s.month||12,s.year),r=h.getEndDate(s.month+1,s.year),lay.each(c,function(e,t){var a=[s.year,s.month],n=0;(t=lay(t)).removeAttr("class"),e<i?(n=l-i+e,t.addClass("laydate-day-prev"),a=o.getAsYM(s.year,s.month,"sub")):i<=e&&e<r+i?(n=e-i)+1===s.date&&t.addClass(w):(n=e-r-i,t.addClass("laydate-day-next"),a=o.getAsYM(s.year,s.month)),a[1]++,a[2]=n+1,t.attr("lay-ymd",a.join("-")).html(a[2]),o.mark(t,a).limit(t,{year:a[0],month:a[1]-1,date:a[2]},e)}),lay(t[0]).attr("lay-ym",s.year+"-"+(s.month+1)),lay(t[1]).attr("lay-ym",s.year+"-"+(s.month+1)),"cn"===n.lang?(lay(t[0]).attr("lay-type","year").html(s.year+" \u5e74"),lay(t[1]).attr("lay-type","month").html(s.month+1+" \u6708")):(lay(t[0]).attr("lay-type","month").html(d.month[s.month]),lay(t[1]).attr("lay-type","year").html(s.year)),m&&(n.range?e&&(o.listYM=[[n.dateTime.year,n.dateTime.month+1],[o.endDate.year,o.endDate.month+1]],o.list(n.type,0).list(n.type,1),"time"===n.type?o.setBtnStatus("\u65f6\u95f4",lay.extend({},o.systemDate(),o.startTime),lay.extend({},o.systemDate(),o.endTime)):o.setBtnStatus(!0)):(o.listYM=[[s.year,s.month+1]],o.list(n.type,0))),n.range&&"init"===a&&!e&&o.calendar(o.endDate,1),n.range||o.limit(lay(o.footer).find(E),null,0,["hours","minutes","seconds"]),o.setBtnStatus(),o},u.prototype.list=function(t,n){var i,l,e,r,o=this,s=o.config,y=s.dateTime,d=o.lang(),a=s.range&&"date"!==s.type&&"datetime"!==s.type,m=lay.elem("ul",{class:M+" "+{year:"laydate-year-list",month:"laydate-month-list",time:"laydate-time-list"}[t]}),c=o.elemHeader[n],u=lay(c[2]).find("span"),h=o.elemCont[n||0],p=lay(h).find("."+M)[0],f="cn"===s.lang,g=f?"\u5e74":"",v=o.listYM[n]||{},T=["hours","minutes","seconds"],D=["startTime","endTime"][n];return v[0]<1&&(v[0]=1),"year"===t?(e=i=v[0]-7,i<1&&(e=i=1),lay.each(new Array(15),function(e){var t=lay.elem("li",{"lay-ym":i}),a={year:i,month:0,date:1};i==v[0]&&lay(t).addClass(w),t.innerHTML=i+g,m.appendChild(t),o.limit(lay(t),a,n),i++}),lay(u[f?0:1]).attr("lay-ym",i-8+"-"+v[1]).html(e+g+" - "+(i-1)+g)):"month"===t?(lay.each(new Array(12),function(e){var t=lay.elem("li",{"lay-ym":e}),a={year:v[0],month:e,date:1};e+1==v[1]&&lay(t).addClass(w),t.innerHTML=d.month[e]+(f?"\u6708":""),m.appendChild(t),o.limit(lay(t),a,n)}),lay(u[f?0:1]).attr("lay-ym",v[0]+"-"+v[1]).html(v[0]+g)):"time"===t&&(l=function(){lay(m).find("ol").each(function(a,e){lay(e).find("li").each(function(e,t){o.limit(lay(t),[{hours:e},{hours:o[D].hours,minutes:e},{hours:o[D].hours,minutes:o[D].minutes,seconds:e}][a],n,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][a])})}),s.range||o.limit(lay(o.footer).find(E),o[D],0,["hours","minutes","seconds"])},s.range?o[D]||(o[D]="startTime"===D?y:o.endDate):o[D]=y,lay.each([24,60,60],function(t,e){var a=lay.elem("li"),n=["<p>"+d.time[t]+"</p><ol>"];lay.each(new Array(e),function(e){n.push("<li"+(o[D][T[t]]===e?' class="'+w+'"':"")+">"+lay.digit(e,2)+"</li>")}),a.innerHTML=n.join("")+"</ol>",m.appendChild(a)}),l()),p&&h.removeChild(p),h.appendChild(m),"year"===t||"month"===t?(lay(o.elemMain[n]).addClass("laydate-ym-show"),lay(m).find("li").on("click",function(){var e=0|lay(this).attr("lay-ym");lay(this).hasClass(x)||(0===n?(y[t]=e,o.limit(lay(o.footer).find(E),null,0)):o.endDate[t]=e,"year"===s.type||"month"===s.type?(lay(m).find("."+w).removeClass(w),lay(this).addClass(w),"month"===s.type&&"year"===t&&(o.listYM[n][0]=e,a&&((n?o.endDate:y).year=e),o.list("month",n))):(o.checkDate("limit").calendar(null,n),o.closeList()),o.setBtnStatus(),s.range||("month"===s.type&&"month"===t||"year"===s.type&&"year"===t)&&o.setValue(o.parse()).remove().done(),o.done(null,"change"),lay(o.footer).find("."+I).removeClass(x))})):(e=lay.elem("span",{class:C}),r=function(){lay(m).find("ol").each(function(e){var a=this,t=lay(a).find("li");a.scrollTop=30*(o[D][T[e]]-2),a.scrollTop<=0&&t.each(function(e,t){if(!lay(this).hasClass(x))return a.scrollTop=30*(e-2),!0})})},u=lay(c[2]).find("."+C),r(),e.innerHTML=s.range?[d.startTime,d.endTime][n]:d.timeTips,lay(o.elemMain[n]).addClass("laydate-time-show"),u[0]&&u.remove(),c[2].appendChild(e),lay(m).find("ol").each(function(t){var a=this;lay(a).find("li").on("click",function(){var e=0|this.innerHTML;lay(this).hasClass(x)||(s.range?o[D][T[t]]=e:y[T[t]]=e,lay(a).find("."+w).removeClass(w),lay(this).addClass(w),l(),r(),!o.endDate&&"time"!==s.type||o.done(null,"change"),o.setBtnStatus())})})),o},u.prototype.listYM=[],u.prototype.closeList=function(){var a=this;a.config;lay.each(a.elemCont,function(e,t){lay(this).find("."+M).remove(),lay(a.elemMain[e]).removeClass("laydate-ym-show laydate-time-show")}),lay(a.elem).find("."+C).remove()},u.prototype.setBtnStatus=function(e,t,a){var n=this,i=n.config,l=n.lang(),r=lay(n.footer).find(E);i.range&&"time"!==i.type&&(t=t||i.dateTime,a=a||n.endDate,i=n.newDate(t).getTime()>n.newDate(a).getTime(),n.limit(null,t)||n.limit(null,a)?r.addClass(x):r[i?"addClass":"removeClass"](x),e&&i&&n.hint("string"==typeof e?l.timeout.replace(/\u65e5\u671f/g,e):l.timeout))},u.prototype.parse=function(e,t){var a=this,n=a.config,t=t||("end"==e?lay.extend({},a.endDate,a.endTime):n.range?lay.extend({},n.dateTime,a.startTime):n.dateTime),t=h.parse(t,a.format,1);return n.range&&void 0===e?t+" "+a.rangeStr+" "+a.parse("end"):t},u.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)},u.prototype.setValue=function(e){var t=this,a=t.config,n=t.bindElem||a.elem[0];return"static"===a.position||(e=e||"",t.isInput(n)?lay(n).val(e):(a=t.rangeElem)?("array"!==layui.type(e)&&(e=e.split(" "+t.rangeStr+" ")),a[0].val(e[0]||""),a[1].val(e[1]||"")):(0===lay(n).find("*").length&&lay(n).html(e),lay(n).attr("lay-date",e))),t},u.prototype.preview=function(){var e,t=this,a=t.config;a.isPreview&&(e=lay(t.elem).find("."+g),a=!a.range||t.endDate?t.parse():"",e.html(a).css({color:"#5FB878"}),setTimeout(function(){e.css({color:"#666"})},300))},u.prototype.done=function(e,t){var a=this,n=a.config,i=lay.extend({},lay.extend(n.dateTime,a.startTime)),l=lay.extend({},lay.extend(a.endDate,a.endTime));return lay.each([i,l],function(e,t){"month"in t&&lay.extend(t,{month:t.month+1})}),a.preview(),e=e||[a.parse(),i,l],"function"==typeof n[t||"done"]&&n[t||"done"].apply(n,e),a},u.prototype.choose=function(e,t){var a=this,n=a.config,i=a.thisDateTime(t),l=(lay(a.elem).find("td"),{year:0|(l=e.attr("lay-ymd").split("-"))[0],month:(0|l[1])-1,date:0|l[2]});e.hasClass(x)||(lay.extend(i,l),n.range?(lay.each(["startTime","endTime"],function(e,t){a[t]=a[t]||{hours:e?23:0,minutes:e?59:0,seconds:e?59:0}}),a.calendar(null,t).done(null,"change")):"static"===n.position?a.calendar().done().done(null,"change"):"date"===n.type?a.setValue(a.parse()).remove().done():"datetime"===n.type&&a.calendar().done(null,"change"))},u.prototype.tool=function(e,t){var a=this,n=a.config,i=a.lang(),l=n.dateTime,r="static"===n.position,o={datetime:function(){lay(e).hasClass(x)||(a.list("time",0),n.range&&a.list("time",1),lay(e).attr("lay-type","date").html(a.lang().dateTips))},date:function(){a.closeList(),lay(e).attr("lay-type","datetime").html(a.lang().timeTips)},clear:function(){r&&(lay.extend(l,a.firstDate),a.calendar()),n.range&&(delete n.dateTime,delete a.endDate,delete a.startTime,delete a.endTime),a.setValue("").remove(),a.done(["",{},{}])},now:function(){var e=new Date;lay.extend(l,a.systemDate(),{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}),a.setValue(a.parse()).remove(),r&&a.calendar(),a.done()},confirm:function(){if(n.range){if(lay(e).hasClass(x))return a.hint("time"===n.type?i.timeout.replace(/\u65e5\u671f/g,"\u65f6\u95f4"):i.timeout)}else if(lay(e).hasClass(x))return a.hint(i.invalidDate);a.setValue(a.parse()).remove(),a.done()}};o[t]&&o[t]()},u.prototype.change=function(n){function e(e){var t=lay(s).find(".laydate-year-list")[0],a=lay(s).find(".laydate-month-list")[0];return t&&(y[0]=e?y[0]-15:y[0]+15,i.list("year",n)),a&&(e?y[0]--:y[0]++,i.list("month",n)),(t||a)&&(lay.extend(r,{year:y[0]}),o&&(r.year=y[0]),l.range||i.done(null,"change"),l.range||i.limit(lay(i.footer).find(E),{year:y[0]})),i.setBtnStatus(),t||a}var i=this,l=i.config,r=i.thisDateTime(n),o=l.range&&("year"===l.type||"month"===l.type),s=i.elemCont[n||0],y=i.listYM[n];return{prevYear:function(){e("sub")||(r.year--,i.checkDate("limit").calendar(null,n),i.done(null,"change"))},prevMonth:function(){var e=i.getAsYM(r.year,r.month,"sub");lay.extend(r,{year:e[0],month:e[1]}),i.checkDate("limit").calendar(null,n),i.done(null,"change")},nextMonth:function(){var e=i.getAsYM(r.year,r.month);lay.extend(r,{year:e[0],month:e[1]}),i.checkDate("limit").calendar(null,n),i.done(null,"change")},nextYear:function(){e()||(r.year++,i.checkDate("limit").calendar(null,n),i.done(null,"change"))}}},u.prototype.changeEvent=function(){var i=this;i.config;lay(i.elem).on("click",function(e){lay.stope(e)}).on("mousedown",function(e){lay.stope(e)}),lay.each(i.elemHeader,function(n,e){lay(e[0]).on("click",function(e){i.change(n).prevYear()}),lay(e[1]).on("click",function(e){i.change(n).prevMonth()}),lay(e[2]).find("span").on("click",function(e){var t=lay(this),a=t.attr("lay-ym"),t=t.attr("lay-type");a&&(a=a.split("-"),i.listYM[n]=[0|a[0],0|a[1]],i.list(t,n),lay(i.footer).find("."+I).addClass(x))}),lay(e[3]).on("click",function(e){i.change(n).nextMonth()}),lay(e[4]).on("click",function(e){i.change(n).nextYear()})}),lay.each(i.table,function(e,t){lay(t).find("td").on("click",function(){i.choose(lay(this),e)})}),lay(i.footer).find("span").on("click",function(){var e=lay(this).attr("lay-type");i.tool(this,e)})},u.prototype.isInput=function(e){return/input|textarea/.test(e.tagName.toLocaleLowerCase())},u.prototype.events=function(){function e(e,t){e.on(n.trigger,function(){h.thisId!==n.id&&(t&&(a.bindElem=this),a.render())})}var a=this,n=a.config;n.elem[0]&&!n.elem[0].eventHandler&&(e(n.elem,"bind"),e(n.eventElem),n.elem[0].eventHandler=!0)},l.that={},l.getThis=function(e){var t=l.that[e];return!t&&n&&layui.hint().error(e?a+" instance with ID '"+e+"' not found":"ID argument required"),t},o.run=function(n){n(r).on("mousedown",function(e){var t,a;!h.thisId||(t=l.getThis(h.thisId))&&(a=t.config,e.target!==a.elem[0]&&e.target!==a.eventElem[0]&&e.target!==n(a.closeStop)[0]&&t.remove())}).on("keydown",function(e){var t;!h.thisId||(t=l.getThis(h.thisId))&&"static"!==t.config.position&&13===e.keyCode&&n("#"+t.elemID)[0]&&t.elemID===u.thisElemDate&&(e.preventDefault(),n(t.footer).find(E)[0].click())}),n(i).on("resize",function(){if(h.thisId){var e=l.getThis(h.thisId);if(e)return!(!e.elem||!n(".layui-laydate")[0])&&void e.position()}})},h.render=function(e){e=new u(e);return l.call(e)},h.parse=function(a,n,i){return a=a||{},n=((n="string"==typeof n?l.formatArr(n):n)||[]).concat(),lay.each(n,function(e,t){/yyyy|y/.test(t)?n[e]=lay.digit(a.year,t.length):/MM|M/.test(t)?n[e]=lay.digit(a.month+(i||0),t.length):/dd|d/.test(t)?n[e]=lay.digit(a.date,t.length):/HH|H/.test(t)?n[e]=lay.digit(a.hours,t.length):/mm|m/.test(t)?n[e]=lay.digit(a.minutes,t.length):/ss|s/.test(t)&&(n[e]=lay.digit(a.seconds,t.length))}),n.join("")},h.getEndDate=function(e,t){var a=new Date;return a.setFullYear(t||a.getFullYear(),e||a.getMonth()+1,1),new Date(a.getTime()-864e5).getDate()},n?(h.ready(),layui.define("lay",function(e){h.path=layui.cache.dir,o.run(lay),e(a,h)})):"function"==typeof define&&define.amd?define(function(){return o.run(lay),h}):(h.ready(),o.run(i.lay),i.laydate=h)}(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,M){function O(e,t){return t.toUpperCase()}var f=[],h=w.document,c=f.slice,R=f.concat,P=f.push,B=f.indexOf,W={},I=W.toString,g=W.hasOwnProperty,m={},e="1.12.4",T=function(e,t){return new T.fn.init(e,t)},$=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,z=/^-ms-/,X=/-([\da-z])/gi;function U(e){var t=!!e&&"length"in e&&e.length,n=T.type(e);return"function"!==n&&!T.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}T.fn=T.prototype={jquery:e,constructor:T,selector:"",length:0,toArray:function(){return c.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:c.call(this)},pushStack:function(e){e=T.merge(this.constructor(),e);return e.prevObject=this,e.context=this.context,e},each:function(e){return T.each(this,e)},map:function(n){return this.pushStack(T.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,e=+e+(e<0?t:0);return this.pushStack(0<=e&&e<t?[this[e]]:[])},end:function(){return this.prevObject||this.constructor()},push:P,sort:f.sort,splice:f.splice},T.extend=T.fn.extend=function(){var e,t,n,r,i,o=arguments[0]||{},a=1,s=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[a]||{},a++),"object"==typeof o||T.isFunction(o)||(o={}),a===s&&(o=this,a--);a<s;a++)if(null!=(r=arguments[a]))for(n in r)i=o[n],o!==(t=r[n])&&(l&&t&&(T.isPlainObject(t)||(e=T.isArray(t)))?(i=e?(e=!1,i&&T.isArray(i)?i:[]):i&&T.isPlainObject(i)?i:{},o[n]=T.extend(l,i,t)):void 0!==t&&(o[n]=t));return o},T.extend({expando:"jQuery"+(e+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===T.type(e)},isArray:Array.isArray||function(e){return"array"===T.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){var t=e&&e.toString();return!T.isArray(e)&&0<=t-parseFloat(t)+1},isEmptyObject:function(e){for(var t in e)return!1;return!0},isPlainObject:function(e){if(!e||"object"!==T.type(e)||e.nodeType||T.isWindow(e))return!1;try{if(e.constructor&&!g.call(e,"constructor")&&!g.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(!m.ownFirst)for(var t in e)return g.call(e,t);for(t in e);return void 0===t||g.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?W[I.call(e)]||"object":typeof e},globalEval:function(e){e&&T.trim(e)&&(w.execScript||function(e){w.eval.call(w,e)})(e)},camelCase:function(e){return e.replace(z,"ms-").replace(X,O)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(U(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace($,"")},makeArray:function(e,t){t=t||[];return null!=e&&(U(Object(e))?T.merge(t,"string"==typeof e?[e]:e):P.call(t,e)),t},inArray:function(e,t,n){var r;if(t){if(B)return B.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;)e[i++]=t[r++];if(n!=n)for(;void 0!==t[r];)e[i++]=t[r++];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!=a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(U(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return R.apply([],a)},guid:1,proxy:function(e,t){var n,r;if("string"==typeof t&&(r=e[t],t=e,e=r),T.isFunction(e))return n=c.call(arguments,2),(r=function(){return e.apply(t||this,n.concat(c.call(arguments)))}).guid=e.guid=e.guid||T.guid++,r},now:function(){return+new Date},support:m}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=f[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){W["[object "+t+"]"]=t.toLowerCase()});function r(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&T(e).is(n))break;r.push(e)}return r}function V(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}var e=function(M){function f(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function O(){T()}var e,h,b,o,R,g,P,B,w,l,u,T,C,t,E,m,r,i,y,N="sizzle"+ +new Date,v=M.document,k=0,W=0,I=ue(),$=ue(),x=ue(),z=function(e,t){return e===t&&(u=!0),0},X={}.hasOwnProperty,n=[],U=n.pop,V=n.push,S=n.push,Y=n.slice,A=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",a="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",G="\\["+a+"*("+s+")(?:"+a+"*([*^$|!~]?=)"+a+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+s+"))|)"+a+"*\\]",K=":("+s+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+G+")*)|.*)\\)|)",Q=new RegExp(a+"+","g"),D=new RegExp("^"+a+"+|((?:^|[^\\\\])(?:\\\\.)*)"+a+"+$","g"),Z=new RegExp("^"+a+"*,"+a+"*"),ee=new RegExp("^"+a+"*([>+~]|"+a+")"+a+"*"),te=new RegExp("="+a+"*([^\\]'\"]*?)"+a+"*\\]","g"),ne=new RegExp(K),re=new RegExp("^"+s+"$"),d={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),TAG:new RegExp("^("+s+"|[*])"),ATTR:new RegExp("^"+G),PSEUDO:new RegExp("^"+K),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+a+"*(even|odd|(([+-]|)(\\d*)n|)"+a+"*(?:([+-]|)"+a+"*(\\d+)|))"+a+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+a+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+a+"*((?:-\\d)?\\d*)"+a+"*\\)|)(?=[^-]|$)","i")},ie=/^(?:input|select|textarea|button)$/i,oe=/^h\d$/i,c=/^[^{]+\{\s*\[native \w/,ae=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,se=/[+~]/,le=/'|\\/g,p=new RegExp("\\\\([\\da-f]{1,6}"+a+"?|("+a+")|.)","ig");try{S.apply(n=Y.call(v.childNodes),v.childNodes),n[v.childNodes.length].nodeType}catch(e){S={apply:n.length?function(e,t){V.apply(e,Y.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function j(e,t,n,r){var i,o,a,s,l,u,c,f,d=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!