<commit_before>/**
 @Name : jeDate v2.5 日期控件
 @Author: <NAME>
 @Date: 2016-4-3
 @QQ群：516754269
 @官网：http://www.jayui.com/jedate/ 或 https://github.com/singod/jeDate
 */
!function(a){var g,h,b={},c=document,d=["jedatebox"],e=/\w+|d+|[\u4E00-\u9FA5\uF900-\uFA2D]|[\uFF00-\uFFEF]/g,f=function(){function a(b){var c,d,e,f,g,h,i,j,k,l,m,n=function(a,b){for(var c=0;c<a.length&&b(c,a[c])!==!1;c++);},o=function(a){return document.getElementById(a)},p=function(a,b){var c=void 0!=b?b:document,d=[],e=c.getElementsByTagName("*");return n(e,function(b,c){new RegExp("(\\s|^)"+a+"(\\s|$)").test(c.className)&&d.push(c)}),d},q=function(a,b){var c,d,e,f,g=void 0!=b?b:document,h=[],i=/\./.test(a),j=/\=/.test(a),k=j?a.match(/\w+\[([\w\-_][^=]+)=([\'\[\]\w\-_]+)\]/):a.split("."),l=g.getElementsByTagName(i?k[0]:k[0].split("[")[0]);return i&&void 0!=k[1]||j?(c=i?k[1]:k,d=/MSIE (6|7)/i.test(navigator.userAgent)?"className":"class",e=i?d:c[1],f=i?c:c[2],n(l,function(a,b){new RegExp(f).test(b.getAttribute(e))&&h.push(b)})):n(l,function(a,b){h.push(b)}),h},r=this.elements=[];if("string"==typeof b)if(b=b.replace(/(^\s*)|(\s*$)/g,""),c=/\s+/g,d=/\>/.test(b)?b.replace(/([ \t\r\n\v\f])*>([ \t\r\n\v\f])*/g,">").replace(/\>/g," ").replace(c," "):b.replace(c," "),e=/^\#/,f=/^\./,/\,/.test(d))for(g=d.split(/,/g),h=g.length,i=0;h>i;++i)r=r.concat(a(g[i]));else/\s*/.test(d)?(j=d.split(" "),k=[],l=[],n(j,function(a,b){0==l.length&&l.push(document);var c=b.substring(1);k=[],e.test(b)?k.push(o(c)):f.test(b)?n(l,function(a,b){n(p(c,b),function(a,b){k.push(b)})}):n(l,function(a,c){n(q(b,c),function(a,b){k.push(b)})}),l=k}),r=k):(m=d.substring(1),e.test(d)?r.push(o(m)):r=f.test(d)?p(m):q(d));else"Object"==typeof d&&void 0!=d&&(r[0]=d);return r}var b=function(b){return new a(b)};return b}();b.each=function(a,b){for(var c=0,d=a.length;d>c&&b(c,a[c])!==!1;c++);},b.extend=function(a,b,c){void 0===c&&(c=!0);for(var d in b)!c&&d in a||(a[d]=b[d]);return a},b.trim=function(a){return a=a||"",a.replace(/^\s|\s$/g,"").replace(/\s+/g," ")},b.attr=function(a,b,c){return"string"==typeof b&&"undefined"==typeof c?a.getAttribute(b):(a.setAttribute(b,c),this)},b.stopmp=function(b){return b=b||a.event,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0,this},b.hasClass=function(a,b){return a=a||{},new RegExp("\\b"+b+"\\b").test(a.className)},b.addClass=function(a,c){return a=a||{},b.hasClass(a,c)||(a.className+=" "+c),a.className=b.trim(a.className),this},b.removeClass=function(a,c){return a=a||{},b.hasClass(a,c)&&(a.className=a.className.replace(new RegExp("(\\s|^)"+c+"(\\s|$)"),"")),this},b.isShow=function(a,b){a.style.display=1!=b?"none":"block"},b.html=function(a,b){return"undefined"!=typeof b||void 0!==b&&1===a.nodeType?(a.innerHTML=b,this):a.innerHTML},b.text=function(a,b){if(void 0===b||1!==a.nodeType){var c=document.all?a.innerText:a.textContent;return c}return document.all?a.innerText=b:a.textContent=b,this},b.val=function(a,b){return void 0===b||1!==a.nodeType?a.value:(a.value=b,this)},b.bind=function(c,d,e){function f(b){b.attachEvent?b.attachEvent("on"+d,function(){e.call(b,a.type)}):b.addEventListener(d,e,!1)}return c==document?f(document):b.each(c,function(a,b){f(b)})},b.docScroll=function(a){return a=a?"scrollLeft":"scrollTop",c.body[a]|c.documentElement[a]},b.winarea=function(a){return c.documentElement[a?"clientWidth":"clientHeight"]},b.isType=function(a,b){return b=b.replace(/\b(\w)|\s(\w)/g,function(a){return a.toUpperCase()}),Object.prototype.toString.call(a)==="[object "+b+"]"},b.digit=function(a){return 10>a?"0"+(0|a):a},b.parse=function(a,c,d){a=a.concat(c);var d=d,e="hh:mm:ss"==b.parseCheck(d,!1),f=2;return d.replace(/YYYY|MM|DD|hh|mm|ss/g,function(){var g=e?++f:a.index=0|++a.index;return b.digit(a[g])})},b.parseCheck=function(a,b){var c=[];return a.replace(/YYYY|MM|DD|hh|mm|ss/g,function(a){c.push(a)}),c.join(1==b?"-":":")},b.nowDate=function(a,c){var d=new Date(0|a?function(a){return 864e5>a?+new Date+864e5*a:a}(parseInt(a)):+new Date);return b.parse([d.getFullYear(),d.getMonth()+1,d.getDate()],[d.getHours(),d.getMinutes(),d.getSeconds()],c)},b.montharr=[1,2,3,4,5,6,7,8,9,10,11,12],b.weeks=["日","一","二","三","四","五","六"],b.isValHtml=function(a){return/textarea|input/.test(a.tagName.toLocaleLowerCase())},b.festival=function(a,b){var c="";switch(a){case"01.01":c="元旦";break;case"02.14":c="情人";break;case"03.08":c="妇女";break;case"05.01":c="劳动";break;case"06.01":c="儿童";break;case"08.01":c="建军";break;case"09.10":c="教师";break;case"10.01":c="国庆";break;case"12.24":c="平安";break;case"12.25":c="圣诞";break;default:c=b}return c},g={format:"YYYY-MM-DD hh:mm:ss",minDate:"1900-01-01 00:00:00",maxDate:"2099-12-31 23:59:59"},b.index=Math.floor(9e3*Math.random()),b.initDate=function(e){var i,k,l,m,h=a.event;try{i=h.target||h.srcElement||{}}catch(j){i={}}k=function(a,b,g){if(!f("#"+b)[0]){var h=c.createElement("div");h.className=d[0],h.id=b,h.style.cssText="z-index:"+(1==g?"":e.zIndex||999)+";position:"+(1==g?"relative":"absolute")+";display:block;",a.appendChild(h)}},l=function(a){var c=b.nowDate(null,e.format||g.format);""==(b.val(a)||b.text(a))?b.isValHtml(a)?b.val(a,c):b.text(a,c):b.isValHtml(a)?b.val(a):b.text(a)},m=f(e.dateCell),e.isDisplay?b.each(m,function(a,c){b.addClass(c,"jedate"+(b.index+a)),k(f(e.displayCell)[a],"jedate"+(b.index+a),!0),b.setHtml(e,c,"#jedate"+(b.index+a)),e.isinitVal&&l(c)}):(e.isinitVal&&b.each(m,function(a,b){l(b)}),h&&i.tagName?(b.stopmp(h),k(c.body,d[0],!1),b.setHtml(e,m[0],"#"+d[0])):b.bind(m,"click",function(a){b.stopmp(a),k(c.body,d[0],!1),b.setHtml(e,this,"#"+d[0])}))},b.setHtml=function(a,c,d){var x,y,h="",i=new Date,j=b.nowDate(null,a.format||g.format),k="YYYY-MM"==b.parseCheck(a.format||g.format,!0)?!0:!1,l="hh:mm:ss"==b.parseCheck(a.format||g.format,!1)?!0:!1,m=k?!1:!0,n=a.isTime,o=a.isinitVal?b.isValHtml(c)?b.val(c):b.text(c):""==(b.val(c)||b.text(c))?j:b.isValHtml(c)?b.val(c):b.text(c),p=""!=(b.val(c)||b.text(c))?o.match(/\d+/g):[i.getFullYear(),i.getMonth()+1,i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds()],q='<div class="jedatetop">'+(k?'<div class="jedateym" style="width:100%;"><i class="prev triangle ymprev"></i><span class="jedateyy"><em class="jedateyearmonth"></em></span><i class="next triangle ymnext"></i></div>':'<div class="jedateym" style="width:50%;"><i class="prev triangle yearprev"></i><span class="jedateyy" data-ym="24"><em class="jedateyear"></em><em class="pndrop"></em></span><i class="next triangle yearnext"></i></div><div class="jedateym" style="width:50%;"><i class="prev triangle monthprev"></i><span class="jedatemm" data-ym="12"><em class="jedatemonth"></em><em class="pndrop"></em></span><i class="next triangle monthnext"></i></div>')+"</div>",r=k?'<ul class="jedaym"></ul>':'<div class="jedatetopym" style="display: none;"><ul class="ymdropul"></ul><p><span class="jedateymchle">&#8592;</span><span class="jedateymchri">&#8594;</span><span class="jedateymchok">关闭</span></p></div>',s='<ol class="jedaol"></ol><ul class="jedaul"></ul>',t=k?'<div class="botflex jedatebtn"><span class="jedateok">确认</span><span class="jedatetodaymonth">本月</span><span class="jedateclear">清空</span></div>':'<div class="botflex jedatehmsshde"><ul class="jedatehms"><li><em></em><i>:</i></li><li><em></em><i>:</i></li><li><em></em></li></ul></div><div class="botflex jedatebtn"><span class="jedateok">确认</span><span class="jedatetodaymonth">今天</span><span class="jedateclear">清空</span></div>',u='<div class="jedatebot">'+t+"</div>",v='<div class="jedateprophms '+(l?"jedatepropfix":"jedateproppos")+'" prop="true"><div class="jedatepropcon"><div class="jedatehmstitle">时分秒选择<div class="jedatehmsclose">&times;</div></div><div class="jedateproptext">小时</div><div class="jedateproptext">分钟</div><div class="jedateproptext">秒数</div><div class="jedatehmscon jedateprophours"></div><div class="jedatehmscon jedatepropminutes"></div><div class="jedatehmscon jedatepropseconds"></div></div></div>',w=k?q+r+u:l?q+v+u:q+r+s+v+u;if(b.html(f(d)[0],w),b.each(f(d+" .jedatebot .jedateclear"),function(c,d){a.isClear?b.isShow(d,!1):""}),m?(x=function(a){var e=""!=b.val(c)||""!=b.text(c)?a?[p[0],p[1],p[2]]:[p[3],p[4],p[5]]:[i.getHours(),i.getMinutes(),i.getSeconds()];b.each(f(d+" .jedatebot .jedatehms em"),function(a,c){b.html(c,b.digit(e[a]))})},l?x(!0):n?x(!1):(b.isShow(f(d+" .jedatebot .jedatehmsshde")[0],!1),f(d+" .jedatebot .jedatebtn")[0].style.width="100%")):(k||b.isShow(f(d+" .jedatebot .jedatehmsshde")[0],!1),f(d+" .jedatebot .jedatebtn")[0].style.width="100%"),k)b.html(f(d+" .jedaym")[0],b.onlyYMStr(p[0],p[1])),b.text(f(d+" .jedateym .jedateyearmonth")[0],p[0]+"年"+b.digit(p[1])+"月"),b.onlyYMevents(a,c,d,p);else{for(y=0;y<b.weeks.length;y++)h+='<li class="weeks" data-week="'+b.weeks[y]+'">'+b.weeks[y]+"</li>";b.each(f(d+" .jedaol"),function(a,c){b.html(c,h)}),l?b.getDateStr(a,d,i.getFullYear(),i.getMonth()+1,i.getDate()):b.getDateStr(a,d,p[0],p[1],p[2]),b.chooseYM(a,c,d,p)}a.isDisplay||b.orien(f(d)[0],c),b.events(a,c,d,p)},b.onlyYMStr=function(a,c){var d="";return b.each(b.montharr,function(e,f){d+="<li "+(c==f?'class="action"':"")+' data-onym="'+a+"-"+b.digit(f)+'">'+a+"年"+b.digit(f)+"月</li>"}),d},b.onlyYMevents=function(a,c,d,e){var g=f(d+" .jedateym .ymprev"),h=f(d+" .jedateym .ymnext"),i=parseInt(e[0]),j=parseFloat(e[1]);b.each([g,h],function(h,k){b.bind(k,"click",function(h){b.stopmp(h);var l=k==g?i-=1:i+=1;b.html(f(d+" .jedaym")[0],b.onlyYMStr(l,j)),b.events(a,c,d,e)})})},b.orien=function(a,c,d){var e,g=c.getBoundingClientRect();leris=g.right+a.offsetWidth/1.5>=b.winarea(1)?g.right-a.offsetWidth:g.left+(d?0:b.docScroll(1)),e=g.bottom+a.offsetHeight/1.5<=b.winarea()?g.bottom-1:g.top>a.offsetHeight/1.5?g.top-a.offsetHeight+1:b.winarea()-a.offsetHeight,a.style.left=leris+"px",a.style.top=Math.max(e+(d?0:b.docScroll())+1,1)+"px"},b.getDateStr=function(a,c,d,h,i){function n(c,d,e){var f=a.marks,g=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1};return b.isType(f,"array")&&f.length>0&&g(f,c+"-"+d+"-"+e)?'<i class="marks"></i>':""}function _(a,b){var c=0==a%4&&0!=a%100||0==a%400?29:28;return[31,c,31,30,31,30,31,31,30,31,30,31][b-1]}function ab(a,b){return parseInt(new Date(a,b-1,0).getDate())}var k,o,p,r,s,t,u,w,x,y,z,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,U,V,W,X,Y,Z,$,j="";for(h=b.digit(h),k=new Date,k.getFullYear(),k.getMonth()+1,o=function(c,d){return a.festival?b.festival(c,d):d},p=function(a){var b=a.split(" ");return b[0].match(e)},_(d,h),r=new Date(d,parseInt(h)-1,1).getDay(),s=0!=r?r:r+7,t=ab(d,h),u=ab(d,parseInt(h)+1),w=1,x=p(a.minDate||g.minDate),y=p(a.maxDate||g.maxDate),z=u,new Date(d,h,i),B=new Date(d,h,1),C=new Date(d,h,u),D=new Date(x[0],x[1],x[2]),E=new Date(y[0],y[1],y[2]),F=D.getDate(),D>C?w=parseInt(u)+1:D>=B&&C>=D&&(w=F),E&&(G=E.getDate(),B>E?z=0:E>=B&&C>=E&&(z=G)),H=s-1;H>=0;H--)L=b.digit(t-H),1==h?(I=parseInt(d)-1,J=13):(I=d,J=h),M=parseInt(I.toString()+b.digit(parseInt(J)-1).toString()+L.toString()),N=parseInt(x[0].toString()+b.digit(x[1]).toString()+b.digit(x[2]).toString()),O=parseInt(y[0].toString()+b.digit(y[1]).toString()+b.digit(y[2]).toString()),K=M>=N&&O>=M?"prevdate":"disabled",j+="<li class='"+K+"' data-y='"+I+"' data-m='"+b.digit(parseInt(J)-1)+"' data-d='"+L+"'>"+o(b.digit(parseInt(J)-1)+"."+L,L)+n(I,parseInt(J)-1,L)+"</li>";for(P=1;w>P;P++)P=b.digit(P),j+='<li class="disabled" data-y="'+d+'" data-m="'+h+'" data-d="'+P+'">'+o(h+"."+P,P)+n(d,h,P)+"</li>";for(Q=w;z>=Q;Q++)Q=b.digit(Q),R=i==Q?"action":"",j+='<li class="'+R+'" data-y="'+d+'" data-m="'+h+'" data-d="'+Q+'">'+o(h+"."+Q,Q)+n(d,h,Q)+"</li>";for(S=z+1;u>=S;S++)S=b.digit(S),j+='<li class="disabled" data-y="'+d+'" data-m="'+h+'" data-d="'+S+'">'+o(h+"."+S,S)+n(d,h,S)+"</li>";for(U=42-s-_(d,h),V=1;U>=V;V++)V=b.digit(V),h>=12?(W=parseInt(d)+1,X=0):(W=d,X=h),Z=parseInt(W.toString()+b.digit(parseInt(X)+1).toString()+b.digit(V).toString()),$=parseInt(x[0].toString()+b.digit(x[1]).toString()+b.digit(x[2]).toString()),O=parseInt(y[0].toString()+b.digit(y[1]).toString()+b.digit(y[2]).toString()),Y=O>=Z&&Z>=$?"nextdate":Y="disabled",j+="<li class='"+Y+"' data-y='"+W+"' data-m='"+b.digit(parseInt(X)+1)+"' data-d='"+V+"'>"+o(b.digit(parseInt(X)+1)+"."+V,V)+n(W,parseInt(X)+1,V)+"</li>";b.each(f(c+" .jedateyear"),function(a,c){b.text(c,d+"年").attr(c,"data-year",d)}),b.each(f(c+" .jedatemonth"),function(a,c){b.text(c,h+"月").attr(c,"data-month",h)}),b.each(f(c+" .jedaul"),function(a,c){b.html(c,j)}),b.each(f(c+" .monthprev"),function(a,c){b.attr(c,"data-y",b.digit(parseInt(h)-1))}),b.each(f(c+" .monthnext"),function(a,c){b.attr(c,"data-y",b.digit(parseInt(h)+1))})},b.getStrhms=function(a,c,d){var d=[];return b.each([24,60,60],function(e,g){var k,h="",i="",j=b.text(f(c+" .jedatehms em")[e]);for(k=0;g>k;k++)k=b.digit(k),i=a.ishmsLimit?j>k?"disabled":k==j?"action":"":j==k?"action":"",h+='<p class="'+i+'">'+k+"</p>";d.push(h)}),d},b.dateClose=function(a,b){a.isDisplay||c.body.removeChild(f(b)[0])},b.events=function(a,e,h,i){var s,t,u,v,w,x,j=new Date,k=f(h+" .yearprev"),l=f(h+" .yearnext"),m=f(h+" .monthprev"),n=f(h+" .monthnext"),o=f(h+" .jedateyear"),p=f(h+" .jedatemonth"),q="YYYY-MM"==b.parseCheck(a.format||g.format,!0)?!0:!1,r="hh:mm:ss"==b.parseCheck(a.format||g.format,!1)?!0:!1;q?(x=a.isDisplay?f("body "+h.replace(/\#/g,"."))[0]:e,b.bind(f(h+" .jedaym li"),"click",function(c){b.stopmp(c);var d=b.attr(this,"data-onym").match(/\w+|d+/g),e=b.parse([d[0],d[1],1],[0,0,0],a.format||g.format);b.isValHtml(x)?b.val(x,e):b.text(x,e),b.dateClose(a,h),(b.isType(a.choosefun,"function")||null!=a.choosefun)&&a.choosefun(e),b.initDate(a)}),b.bind(f(h+" .jedatebot .jedatetodaymonth"),"click",function(){var c=[j.getFullYear(),j.getMonth()+1,j.getDate()],d=b.parse([c[0],c[1],0],[0,0,0],a.format||g.format);b.isValHtml(x)?b.val(x,d):b.text(x,d),b.dateClose(a,h),(b.isType(a.choosefun,"function")||null!=a.choosefun)&&a.choosefun(d),b.initDate(a)})):(!r&&b.each([k,l],function(c,d){b.bind(d,"click",function(c){var f,g,l;b.stopmp(c),f=parseInt(b.attr(o[0],"data-year")),g=parseInt(b.attr(p[0],"data-month")),d==k?f-=1:f+=1,l=j.toLocaleDateString()==f+"/"+g+"/"+j.getDate()?i[2]:1,b.getDateStr(a,h,f,g,l),b.chooseDays(a,e,h)})}),!r&&b.each([m,n],function(c,d){b.bind(d,"click",function(c){var f,g,k;b.stopmp(c),f=parseInt(b.attr(o[0],"data-year")),g=parseInt(b.attr(p[0],"data-month")),d==m?1==g?(f-=1,g=12):g-=1:12==g?(f+=1,g=1):g+=1,k=j.toLocaleDateString()==f+"/"+g+"/"+j.getDate()?i[2]:1,b.getDateStr(a,h,f,g,k),b.chooseDays(a,e,h)})}),s=b.getStrhms(a,h),t=function(a){b.each(a,function(a,c){""==b.html(c[0])&&b.html(c[0],s[a])}),r?(b.isShow(f(h+" .jedatehmsclose")[0],!1),b.isShow(f(h+" .jedatetodaymonth")[0],!1)):b.isShow(f(h+" .jedateprophms")[0],!0),b.each(["hours","minutes","seconds"],function(a,c){var g,d=f(h+" .jedateprop"+c),e=f(h+" .jedateprop"+c+" .action");d[0].scrollTop=e[0].offsetTop-157,g=f(h+" .jedateprop"+c+" p"),b.bind(g,"click",function(){var d,c=this;if(!b.hasClass(c,"disabled")){for(d=0;d<g.length;d++)b.removeClass(g[d],"action");b.addClass(c,"action"),b.html(f(h+" .jedatebot .jedatehms em")[a],b.digit(b.text(c)))}})})},u=f(h+" .jedateprophours"),v=f(h+" .jedatepropminutes"),w=f(h+" .jedatepropseconds"),r?t([u,v,w]):b.bind(f(h+" .jedatehms"),"click",function(){"block"!==f(h+" .jedateprophms")[0].style.display&&t([u,v,w]),b.bind(f(h+" .jedateprophms .jedatehmsclose"),"click",function(){b.isShow(f(h+" .jedateprophms")[0],!1)})}),b.bind(f(h+" .jedatebot .jedatetodaymonth"),"click",function(){var c=[j.getFullYear(),j.getMonth()+1,j.getDate(),j.getHours(),j.getMinutes(),j.getSeconds()],d=b.parse([c[0],c[1],c[2]],[c[3],c[4],c[5]],a.format||g.format),i=a.isDisplay?f("body "+h.replace(/\#/g,"."))[0]:e;b.getDateStr(a,h,c[0],c[1],c[2]),b.isValHtml(i)?b.val(i,d):b.text(i,d),b.dateClose(a,h),(b.isType(a.choosefun,"function")||null!=a.choosefun)&&a.choosefun(d),q||b.chooseDays(a,e,h)})),b.bind(f(h+" .jedatebot .jedateclear"),"click",function(){var c=a.isDisplay?f("body "+h.replace(/\#/g,"."))[0]:e,d=b.isValHtml(c)?b.val(c):b.text(c);b.isValHtml(c)?b.val(c,""):b.text(c,""),b.dateClose(a,h),""!=d&&(b.isType(a.clearfun,"function")||null!=a.clearfun)&&a.clearfun(d)}),b.bind(f(h+" .jedatebot .jedateok"),"click",function(c){var d,j,k,l,n,s,t,u,v,w,x,y;b.stopmp(c),d=a.isDisplay?f("body "+h.replace(/\#/g,"."))[0]:e,j=""!=(b.val(d)||b.text(d)),k=function(a){b.each(f(h+" .jedatehms em"),function(c,d){a.push(b.text(d))})},j?(l=q?f(h+" .jedaym li"):f(h+" .jedaul li"),b.nowDate(null,a.format||g.format),n=b.isValHtml(d)?b.val(d):b.text(d),s=n.match(/\w+|d+/g),q?(w=j?b.attr(f(h+" .jedaym .action")[0],"data-onym").match(/\w+|d+/g):"",v=j?b.parse([w[0],w[1],1],[0,0,0],a.format||g.format):""):(t=[],u=[parseInt(b.attr(o[0],"data-year")),parseInt(b.attr(p[0],"data-month")),s[2]],k(t),v=j?b.parse([u[0],u[1],u[2]],[t[0],t[1],t[2]],a.format||g.format):"",b.getDateStr(a,h,u[0],u[1],u[2])),r?b.isValHtml(d)?b.val(d,v):b.text(d,v):b.each(l,function(a,c){"action"==b.attr(c,"class")&&(b.isValHtml(d)?b.val(d,v):b.text(d,v))}),b.dateClose(a,h),""!=v&&(b.isType(a.okfun,"function")||null!=a.okfun)&&a.okfun(v),q||b.chooseDays(a,e,h)):r&&(x=[],y="",k(x),y=b.parse([i[0],i[1],i[2]],[x[0],x[1],x[2]],a.format||g.format),b.isValHtml(d)?b.val(d,y):b.text(d,y),b.dateClose(a,h))}),a.isDisplay||(b.bind(document,"mouseup",function(a){b.stopmp(a);var e=f("#"+d[0])[0];e&&"none"!==e.style.display&&c.body.removeChild(f(h)[0])}),b.bind(f("#"+d[0]),"mouseup",function(a){b.stopmp(a)})),q||!r&&b.chooseDays(a,e,h)},b.chooseYM=function(a,c,d,e){function p(a){var c="";return b.each(new Array(15),function(d){if(7===d){var e=b.attr(k[0],"data-year");c+="<li "+(e==a?'class="action"':"")+' data-y="'+a+'">'+a+"年</li>"}else c+='<li data-y="'+(a-7+d)+'">'+(a-7+d)+"年</li>"}),c}function q(a,c){var e="";12==c?(b.each(b.montharr,function(a,c){var d=b.attr(l[0],"data-month"),c=b.digit(c);e+="<li "+(d==c?'class="action"':"")+' data-m="'+c+'">'+c+"月</li>"}),b.each([m,n],function(a,c){b.isShow(c[0],!1)})):(e=p(a),b.each([m,n],function(a,c){b.isShow(c[0],!0)})),b.removeClass(h[0],12==c?"jedatesety":"jedatesetm").addClass(h[0],12==c?"jedatesetm":"jedatesety"),b.html(f(d+" .jedatetopym .ymdropul")[0],e),b.isShow(h[0],!0)}function r(g){b.bind(f(d+" .ymdropul li"),"click",function(){var i=b.attr(this,"data-y"),j=b.attr(l[0],"data-month");b.attr(g,"data-year",i),b.html(g,i),b.isShow(h[0],!1),b.getDateStr(a,d,i,j,e[2]),b.chooseDays(a,c,d)})}var s,h=f(d+" .jedatetopym"),i=f(d+" .jedateyy"),j=f(d+" .jedatemm"),k=f(d+" .jedateyy .jedateyear"),l=f(d+" .jedatemm .jedatemonth"),m=f(d+" .jedateymchri"),n=f(d+" .jedateymchle"),o="hh:mm:ss"==b.parseCheck(a.format||g.format,!1)?!0:!1;!o&&b.bind(i,"click",function(){var a=parseInt(b.attr(this,"data-ym")),c=parseInt(b.attr(k[0],"data-year"));q(c,a),r(k[0])}),!o&&b.bind(j,"click",function(){var g=parseInt(b.attr(this,"data-ym")),i=parseInt(b.attr(k[0],"data-year"));q(i,g),b.bind(f(d+" .ymdropul li"),"click",function(){var g=b.attr(k[0],"data-year"),i=b.attr(this,"data-m");b.attr(l[0],"data-month",i),b.html(l[0],i),b.isShow(h[0],!1),b.getDateStr(a,d,g,i,e[2]),b.chooseDays(a,c,d)})}),b.bind(f(d+" .jedateymchok"),"click",function(a){b.stopmp(a),b.isShow(h[0],!1)}),s=parseInt(b.attr(k[0],"data-year")),b.each([n,m],function(a,c){b.bind(c,"click",function(c){b.stopmp(c),0==a?s-=15:s+=15;var e=p(s);b.html(f(d+" .jedatetopym .ymdropul")[0],e),r(k[0])})})},b.chooseDays=function(a,c,d){b.bind(f(d+" .jedaul li"),"click",function(e){var k,l,m,n,h=this,i=[],j=a.isDisplay?f("body "+d.replace(/\#/g,"."))[0]:c;b.hasClass(h,"disabled")||(b.stopmp(e),b.each(f(d+" .jedatehms em"),function(a,c){i.push(b.text(c))}),k=parseInt(b.attr(h,"data-y")),l=parseFloat(b.attr(h,"data-m")),m=parseFloat(b.attr(h,"data-d")),n=b.parse([k,l,m],[i[0],i[1],i[2]],a.format||g.format),b.getDateStr(a,d,k,l,m),b.isValHtml(j)?b.val(j,n):b.text(j,n),b.dateClose(a,d),(b.isType(a.choosefun,"function")||null!=a.choosefun)&&a.choosefun(n),b.chooseDays(a,c,d))})},h=function(a){return new b.initDate(a||{})},b.getPath=function(){var a=document.scripts,b=a[a.length-1].src;return b.substring(0,b.lastIndexOf("/")+1)}(),b.creatlink=function(a){var c=document.createElement("link");c.type="text/css",c.rel="stylesheet",c.href=b.getPath+"skin/"+a+".css",c.id="jeDateSkin",f("head")[0].appendChild(c),c=null},b.creatlink("jedate"),h.version="2.5",h.skin=function(a){f("#jeDateSkin")[0].parentNode.removeChild(f("#jeDateSkin")[0]),b.creatlink(a)},h.now=function(a){function e(a){var b=new Date(1e3*a);return b.getFullYear()+"-"+d(b.getMonth()+1,2)+"-"+d(b.getDate(),2)+" "+d(b.getHours(),2)+":"+d(b.getMinutes(),2)+":"+d(b.getSeconds(),2)}var b=new Date(0|a?function(a){return 864e5>a?+new Date+864e5*a:a}(parseInt(a)):+new Date),c=new Date,d=function(a,b){var c="00"+a.toString();return c.substr(c.length-b)},f=b.getFullYear(),g=b.getMonth()+1,h=b.getDate(),i="string"==typeof a?e(a):f+"-"+d(g,2)+"-"+d(h,2)+" "+c.getHours()+":"+c.getMinutes()+":"+c.getSeconds();return i},"function"==typeof define?define(function(){return h}):"object"==typeof module&&"object"==typeof module.exports?module.exports=h:a.jeDate=h}(window);
<commit_msg>Update jedate.min.js<commit_after>/**
 @Name : jeDate v2.6 日期控件
 @Author: <NAME>
 @Date: 2016-5-12
 @QQ群：516754269
 @官网：http://www.jayui.com/jedate/ 或 https://github.com/singod/jeDate
 */
!function(a){var g,h,b={},c=document,d=["jedatebox"],e=/\w+|d+|[\u4E00-\u9FA5\uF900-\uFA2D]|[\uFF00-\uFFEF]/g,f=function(){function a(l,m){var n,o,p,q,r,s;if(m=m||document,!/^[\w\-_#]+$/.test(l)&&m.querySelectorAll)return b(m.querySelectorAll(l));if(-1<l.indexOf(",")){for(n=l.split(/,/g),o=[],p=0,q=n.length;q>p;++p)o=o.concat(a(n[p],m));return k(o)}if(n=l.match(e),o=n.pop(),q=(o.match(g)||i)[1],r=!q&&(o.match(f)||i)[1],p=!q&&(o.match(h)||i)[1],o=l.match(/\[(?:[\w\-_][^=]+)=(?:[\'\[\]\w\-_]+)\]/g),r&&!o&&!p&&m.getElementsByClassName)p=b(m.getElementsByClassName(r));else{if(p=!q&&b(m.getElementsByTagName(p||"*")),r&&(p=d(p,"className",RegExp("(^|\\s)"+r+"(\\s|$)"))),q)return(n=m.getElementById(q))?[n]:[];if(o)for(q=0;q<o.length;q++)r=(o[q].match(j)||i)[1],s=(o[q].match(j)||i)[2],s=s.replace(/\'/g,"").replace(/\-/g,"\\-").replace(/\[/g,"\\[").replace(/\]/g,"\\]"),p=d(p,r,RegExp("(^"+s+"$)"))}return n[0]&&p[0]?c(n,p):p}function b(a){try{return Array.prototype.slice.call(a)}catch(b){for(var c=[],d=0,e=a.length;e>d;++d)c[d]=a[d];return c}}function c(a,b,d){var o,p,q,j,k,l,m,n,e=a.pop();if(">"===e)return c(a,b,!0);for(j=[],k=-1,l=(e.match(g)||i)[1],m=!l&&(e.match(f)||i)[1],e=!l&&(e.match(h)||i)[1],n=-1,e=e&&e.toLowerCase();o=b[++n];){p=o.parentNode;do if(q=(q=(q=!e||"*"===e||e===p.nodeName.toLowerCase())&&(!l||p.id===l))&&(!m||RegExp("(^|\\s)"+m+"(\\s|$)").test(p.className)),d||q)break;while(p=p.parentNode);q&&(j[++k]=o)}return a[0]&&j[0]?c(a,j):j}function d(a,b,c){for(var e,d=-1,f=-1,g=[];e=a[++d];)c.test(e.getAttribute(b))&&(g[++f]=e);return g}var e=/(?:[\*\w\-\\.#]+)+(?:\[(?:[\w\-_][^=]+)=(?:[\'\[\]\w\-_]+)\])*|\*|>/gi,f=/^(?:[\w\-_]+)?\.([\w\-_]+)/,g=/^(?:[\w\-_]+)?#([\w\-_]+)/,h=/^([\w\*\-_]+)/,i=[null,null,null],j=/\[([\w\-_][^=]+)=([\'\[\]\w\-_]+)\]/,k=function(){var a=+new Date,b=function(){var b=1;return function(c){var d=c[a],e=b++;return d?!1:(c[a]=e,!0)}}();return function(c){for(var h,d=c.length,e=[],f=-1,g=0;d>g;++g)h=c[g],b(h)&&(e[++f]=h);return a+=1,e}}();return a}();b.each=function(a,b){for(var c=0,d=a.length;d>c&&b(c,a[c])!==!1;c++);},b.extend=function(a,b,c){void 0===c&&(c=!0);for(var d in b)!c&&d in a||(a[d]=b[d]);return a},b.trim=function(a){return a=a||"",a.replace(/^\s|\s$/g,"").replace(/\s+/g," ")},b.attr=function(a,b,c){return"string"==typeof b&&"undefined"==typeof c?a.getAttribute(b):(a.setAttribute(b,c),this)},b.stopmp=function(b){return b=b||a.event,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0,this},b.hasClass=function(a,b){return a=a||{},new RegExp("\\b"+b+"\\b").test(a.className)},b.addClass=function(a,c){return a=a||{},b.hasClass(a,c)||(a.className+=" "+c),a.className=b.trim(a.className),this},b.removeClass=function(a,c){return a=a||{},b.hasClass(a,c)&&(a.className=a.className.replace(new RegExp("(\\s|^)"+c+"(\\s|$)"),"")),this},b.isShow=function(a,b){a.style.display=1!=b?"none":"block"},b.html=function(a,b){return"undefined"!=typeof b||void 0!==b&&1===a.nodeType?(a.innerHTML=b,this):a.innerHTML},b.text=function(a,b){if(void 0===b||1!==a.nodeType){var c=document.all?a.innerText:a.textContent;return c}return document.all?a.innerText=b:a.textContent=b,this},b.val=function(a,b){return void 0===b||1!==a.nodeType?a.value:(a.value=b,this)},b.bind=function(c,d,e){function f(b){b.attachEvent?b.attachEvent("on"+d,function(){e.call(b,a.type)}):b.addEventListener(d,e,!1)}return c==document?f(document):b.each(c,function(a,b){f(b)})},b.docScroll=function(a){return a=a?"scrollLeft":"scrollTop",c.body[a]|c.documentElement[a]},b.winarea=function(a){return c.documentElement[a?"clientWidth":"clientHeight"]},b.isType=function(a,b){return b=b.replace(/\b(\w)|\s(\w)/g,function(a){return a.toUpperCase()}),Object.prototype.toString.call(a)==="[object "+b+"]"},b.digit=function(a){return 10>a?"0"+(0|a):a},b.parse=function(a,c,d){a=a.concat(c);var d=d,e="hh:mm:ss"==b.parseCheck(d,!1),f=2;return d.replace(/YYYY|MM|DD|hh|mm|ss/g,function(){var g=e?++f:a.index=0|++a.index;return b.digit(a[g])})},b.parseCheck=function(a,b){var c=[];return a.replace(/YYYY|MM|DD|hh|mm|ss/g,function(a){c.push(a)}),c.join(1==b?"-":":")},b.nowDate=function(a,c){var d=new Date(0|a?function(a){return 864e5>a?+new Date+864e5*a:a}(parseInt(a)):+new Date);return b.parse([d.getFullYear(),d.getMonth()+1,d.getDate()],[d.getHours(),d.getMinutes(),d.getSeconds()],c)},b.montharr=[1,2,3,4,5,6,7,8,9,10,11,12],b.weeks=["日","一","二","三","四","五","六"],b.isValHtml=function(a){return/textarea|input/.test(a.tagName.toLocaleLowerCase())},b.festival=function(a,b){var c="";switch(a){case"01.01":c="元旦";break;case"02.14":c="情人";break;case"03.08":c="妇女";break;case"05.01":c="劳动";break;case"06.01":c="儿童";break;case"08.01":c="建军";break;case"09.10":c="教师";break;case"10.01":c="国庆";break;case"12.24":c="平安";break;case"12.25":c="圣诞";break;default:c=b}return c},g={format:"YYYY-MM-DD hh:mm:ss",minDate:"1900-01-01 00:00:00",maxDate:"2099-12-31 23:59:59"},b.index=Math.floor(9e3*Math.random()),b.initDate=function(a){var h,j,k,l,e=b.event;try{h=e.target||e.srcElement||{}}catch(i){h={}}j=function(b,e,g){if(!f("#"+e)[0]){var h=c.createElement("div");h.className=d[0],h.id=e,h.style.cssText="z-index:"+(1==g?"":a.zIndex||999)+";position:"+(1==g?"relative":"absolute")+";display:block;",b.appendChild(h)}},k=function(c){var d=b.nowDate(null,a.format||g.format);""==(b.val(c)||b.text(c))?b.isValHtml(c)?b.val(c,d):b.text(c,d):b.isValHtml(c)?b.val(c):b.text(c)},l=f(a.dateCell),a.isDisplay?b.each(l,function(c,d){b.addClass(d,"jedate"+(b.index+c)),j(f(a.displayCell)[c],"jedate"+(b.index+c),!0),b.setHtml(a,d,"#jedate"+(b.index+c)),a.isinitVal&&k(d)}):(a.isinitVal&&b.each(l,function(a,b){k(b)}),e&&h.tagName?(b.stopmp(e),j(c.body,d[0],!1),b.setHtml(a,l[0],"#"+d[0])):b.bind(l,"click",function(e){b.stopmp(e),j(c.body,d[0],!1),b.setHtml(a,this,"#"+d[0])}))},b.setHtml=function(a,c,d){var x,y,h="",i=new Date,j=b.nowDate(null,a.format||g.format),k="YYYY-MM"==b.parseCheck(a.format||g.format,!0)?!0:!1,l="hh:mm:ss"==b.parseCheck(a.format||g.format,!1)?!0:!1,m=k?!1:!0,n=a.isTime,o=a.isinitVal?b.isValHtml(c)?b.val(c):b.text(c):""==(b.val(c)||b.text(c))?j:b.isValHtml(c)?b.val(c):b.text(c),p=""!=(b.val(c)||b.text(c))?o.match(/\d+/g):[i.getFullYear(),i.getMonth()+1,i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds()],q='<div class="jedatetop">'+(k?'<div class="jedateym" style="width:100%;"><i class="prev triangle ymprev"></i><span class="jedateyy"><em class="jedateyearmonth"></em></span><i class="next triangle ymnext"></i></div>':'<div class="jedateym" style="width:50%;"><i class="prev triangle yearprev"></i><span class="jedateyy" data-ym="24"><em class="jedateyear"></em><em class="pndrop"></em></span><i class="next triangle yearnext"></i></div><div class="jedateym" style="width:50%;"><i class="prev triangle monthprev"></i><span class="jedatemm" data-ym="12"><em class="jedatemonth"></em><em class="pndrop"></em></span><i class="next triangle monthnext"></i></div>')+"</div>",r=k?'<ul class="jedaym"></ul>':'<div class="jedatetopym" style="display: none;"><ul class="ymdropul"></ul><p><span class="jedateymchle">&#8592;</span><span class="jedateymchri">&#8594;</span><span class="jedateymchok">关闭</span></p></div>',s='<ol class="jedaol"></ol><ul class="jedaul"></ul>',t=k?'<div class="botflex jedatebtn"><span class="jedateok">确认</span><span class="jedatetodaymonth">本月</span><span class="jedateclear">清空</span></div>':'<div class="botflex jedatehmsshde"><ul class="jedatehms"><li><em></em><i>:</i></li><li><em></em><i>:</i></li><li><em></em></li></ul></div><div class="botflex jedatebtn"><span class="jedateok">确认</span><span class="jedatetodaymonth">今天</span><span class="jedateclear">清空</span></div>',u='<div class="jedatebot">'+t+"</div>",v='<div class="jedateprophms '+(l?"jedatepropfix":"jedateproppos")+'" prop="true"><div class="jedatepropcon"><div class="jedatehmstitle">时分秒选择<div class="jedatehmsclose">&times;</div></div><div class="jedateproptext">小时</div><div class="jedateproptext">分钟</div><div class="jedateproptext">秒数</div><div class="jedatehmscon jedateprophours"></div><div class="jedatehmscon jedatepropminutes"></div><div class="jedatehmscon jedatepropseconds"></div></div></div>',w=k?q+r+u:l?q+v+u:q+r+s+v+u;if(b.html(f(d)[0],w),b.each(f(d+" .jedatebot .jedateclear"),function(c,d){a.isClear?b.isShow(d,!1):""}),m?(x=function(a){var e=""!=b.val(c)||""!=b.text(c)?a?[p[0],p[1],p[2]]:[p[3],p[4],p[5]]:[i.getHours(),i.getMinutes(),i.getSeconds()];b.each(f(d+" .jedatebot .jedatehms em"),function(a,c){b.html(c,b.digit(e[a]))})},l?x(!0):n?x(!1):(b.isShow(f(d+" .jedatebot .jedatehmsshde")[0],!1),f(d+" .jedatebot .jedatebtn")[0].style.width="100%")):(k||b.isShow(f(d+" .jedatebot .jedatehmsshde")[0],!1),f(d+" .jedatebot .jedatebtn")[0].style.width="100%"),k)b.html(f(d+" .jedaym")[0],b.onlyYMStr(p[0],p[1])),b.text(f(d+" .jedateym .jedateyearmonth")[0],p[0]+"年"+b.digit(p[1])+"月"),b.onlyYMevents(a,c,d,p);else{for(y=0;y<b.weeks.length;y++)h+='<li class="weeks" data-week="'+b.weeks[y]+'">'+b.weeks[y]+"</li>";b.each(f(d+" .jedaol"),function(a,c){b.html(c,h)}),l?b.getDateStr(a,d,i.getFullYear(),i.getMonth()+1,i.getDate()):b.getDateStr(a,d,p[0],p[1],p[2]),b.chooseYM(a,c,d,p)}a.isDisplay||b.orien(f(d)[0],c),b.events(a,c,d,p)},b.onlyYMStr=function(a,c){var d="";return b.each(b.montharr,function(e,f){d+="<li "+(c==f?'class="action"':"")+' data-onym="'+a+"-"+b.digit(f)+'">'+a+"年"+b.digit(f)+"月</li>"}),d},b.onlyYMevents=function(a,c,d,e){var g=f(d+" .jedateym .ymprev"),h=f(d+" .jedateym .ymnext"),i=parseInt(e[0]),j=parseFloat(e[1]);b.each([g,h],function(h,k){b.bind(k,"click",function(h){b.stopmp(h);var l=k==g?i-=1:i+=1;b.html(f(d+" .jedaym")[0],b.onlyYMStr(l,j)),b.events(a,c,d,e)})})},b.orien=function(a,c,d){var e,g=c.getBoundingClientRect();leris=g.right+a.offsetWidth/1.5>=b.winarea(1)?g.right-a.offsetWidth:g.left+(d?0:b.docScroll(1)),e=g.bottom+a.offsetHeight/1.5<=b.winarea()?g.bottom-1:g.top>a.offsetHeight/1.5?g.top-a.offsetHeight+1:b.winarea()-a.offsetHeight,a.style.left=leris+"px",a.style.top=Math.max(e+(d?0:b.docScroll())+1,1)+"px"},b.getDateStr=function(a,c,d,h,i){function n(c,d,e){var f=a.marks,g=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1};return b.isType(f,"array")&&f.length>0&&g(f,c+"-"+d+"-"+e)?'<i class="marks"></i>':""}function _(a,b){var c=0==a%4&&0!=a%100||0==a%400?29:28;return[31,c,31,30,31,30,31,31,30,31,30,31][b-1]}function ab(a,b){return parseInt(new Date(a,b-1,0).getDate())}var k,o,p,r,s,t,u,w,x,y,z,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,U,V,W,X,Y,Z,$,j="";for(h=b.digit(h),k=new Date,k.getFullYear(),k.getMonth()+1,o=function(c,d){return a.festival?b.festival(c,d):d},p=function(a){var b=a.split(" ");return b[0].match(e)},_(d,h),r=new Date(d,parseInt(h)-1,1).getDay(),s=0!=r?r:r+7,t=ab(d,h),u=ab(d,parseInt(h)+1),w=1,x=p(a.minDate||g.minDate),y=p(a.maxDate||g.maxDate),z=u,new Date(d,h,i),B=new Date(d,h,1),C=new Date(d,h,u),D=new Date(x[0],x[1],x[2]),E=new Date(y[0],y[1],y[2]),F=D.getDate(),D>C?w=parseInt(u)+1:D>=B&&C>=D&&(w=F),E&&(G=E.getDate(),B>E?z=0:E>=B&&C>=E&&(z=G)),H=s-1;H>=0;H--)L=b.digit(t-H),1==h?(I=parseInt(d)-1,J=13):(I=d,J=h),M=parseInt(I.toString()+b.digit(parseInt(J)-1).toString()+L.toString()),N=parseInt(x[0].toString()+b.digit(x[1]).toString()+b.digit(x[2]).toString()),O=parseInt(y[0].toString()+b.digit(y[1]).toString()+b.digit(y[2]).toString()),K=M>=N&&O>=M?"prevdate":"disabled",j+="<li class='"+K+"' data-y='"+I+"' data-m='"+b.digit(parseInt(J)-1)+"' data-d='"+L+"'>"+o(b.digit(parseInt(J)-1)+"."+L,L)+n(I,parseInt(J)-1,L)+"</li>";for(P=1;w>P;P++)P=b.digit(P),j+='<li class="disabled" data-y="'+d+'" data-m="'+h+'" data-d="'+P+'">'+o(h+"."+P,P)+n(d,h,P)+"</li>";for(Q=w;z>=Q;Q++)Q=b.digit(Q),R=i==Q?"action":"",j+='<li class="'+R+'" data-y="'+d+'" data-m="'+h+'" data-d="'+Q+'">'+o(h+"."+Q,Q)+n(d,h,Q)+"</li>";for(S=z+1;u>=S;S++)S=b.digit(S),j+='<li class="disabled" data-y="'+d+'" data-m="'+h+'" data-d="'+S+'">'+o(h+"."+S,S)+n(d,h,S)+"</li>";for(U=42-s-_(d,h),V=1;U>=V;V++)V=b.digit(V),h>=12?(W=parseInt(d)+1,X=0):(W=d,X=h),Z=parseInt(W.toString()+b.digit(parseInt(X)+1).toString()+b.digit(V).toString()),$=parseInt(x[0].toString()+b.digit(x[1]).toString()+b.digit(x[2]).toString()),O=parseInt(y[0].toString()+b.digit(y[1]).toString()+b.digit(y[2]).toString()),Y=O>=Z&&Z>=$?"nextdate":Y="disabled",j+="<li class='"+Y+"' data-y='"+W+"' data-m='"+b.digit(parseInt(X)+1)+"' data-d='"+V+"'>"+o(b.digit(parseInt(X)+1)+"."+V,V)+n(W,parseInt(X)+1,V)+"</li>";b.each(f(c+" .jedateyear"),function(a,c){b.text(c,d+"年").attr(c,"data-year",d)}),b.each(f(c+" .jedatemonth"),function(a,c){b.text(c,h+"月").attr(c,"data-month",h)}),b.each(f(c+" .jedaul"),function(a,c){b.html(c,j)}),b.each(f(c+" .monthprev"),function(a,c){b.attr(c,"data-y",b.digit(parseInt(h)-1))}),b.each(f(c+" .monthnext"),function(a,c){b.attr(c,"data-y",b.digit(parseInt(h)+1))})},b.getStrhms=function(a,c,d){var d=[];return b.each([24,60,60],function(e,g){var k,h="",i="",j=b.text(f(c+" .jedatehms em")[e]);for(k=0;g>k;k++)k=b.digit(k),i=a.ishmsLimit?j>k?"disabled":k==j?"action":"":j==k?"action":"",h+='<p class="'+i+'">'+k+"</p>";d.push(h)}),d},b.dateClose=function(a,b){a.isDisplay||c.body.removeChild(f(b)[0])},b.events=function(a,e,h,i){var s,t,u,v,w,x,j=new Date,k=f(h+" .yearprev"),l=f(h+" .yearnext"),m=f(h+" .monthprev"),n=f(h+" .monthnext"),o=f(h+" .jedateyear"),p=f(h+" .jedatemonth"),q="YYYY-MM"==b.parseCheck(a.format||g.format,!0)?!0:!1,r="hh:mm:ss"==b.parseCheck(a.format||g.format,!1)?!0:!1;q?(x=a.isDisplay?f("body "+h.replace(/\#/g,"."))[0]:e,b.bind(f(h+" .jedaym li"),"click",function(c){b.stopmp(c);var d=b.attr(this,"data-onym").match(/\w+|d+/g),e=b.parse([d[0],d[1],1],[0,0,0],a.format||g.format);b.isValHtml(x)?b.val(x,e):b.text(x,e),b.dateClose(a,h),(b.isType(a.choosefun,"function")||null!=a.choosefun)&&a.choosefun(e),b.initDate(a)}),b.bind(f(h+" .jedatebot .jedatetodaymonth"),"click",function(){var c=[j.getFullYear(),j.getMonth()+1,j.getDate()],d=b.parse([c[0],c[1],0],[0,0,0],a.format||g.format);b.isValHtml(x)?b.val(x,d):b.text(x,d),b.dateClose(a,h),(b.isType(a.choosefun,"function")||null!=a.choosefun)&&a.choosefun(d),b.initDate(a)})):(!r&&b.each([k,l],function(c,d){b.bind(d,"click",function(c){var f,g,l;b.stopmp(c),f=parseInt(b.attr(o[0],"data-year")),g=parseInt(b.attr(p[0],"data-month")),d==k?f-=1:f+=1,l=j.toLocaleDateString()==f+"/"+g+"/"+j.getDate()?i[2]:1,b.getDateStr(a,h,f,g,l),b.chooseDays(a,e,h)})}),!r&&b.each([m,n],function(c,d){b.bind(d,"click",function(c){var f,g,k;b.stopmp(c),f=parseInt(b.attr(o[0],"data-year")),g=parseInt(b.attr(p[0],"data-month")),d==m?1==g?(f-=1,g=12):g-=1:12==g?(f+=1,g=1):g+=1,k=j.toLocaleDateString()==f+"/"+g+"/"+j.getDate()?i[2]:1,b.getDateStr(a,h,f,g,k),b.chooseDays(a,e,h)})}),s=b.getStrhms(a,h),t=function(a){b.each(a,function(a,c){""==b.html(c[0])&&b.html(c[0],s[a])}),r?(b.isShow(f(h+" .jedatehmsclose")[0],!1),b.isShow(f(h+" .jedatetodaymonth")[0],!1)):b.isShow(f(h+" .jedateprophms")[0],!0),b.each(["hours","minutes","seconds"],function(a,c){var g,d=f(h+" .jedateprop"+c),e=f(h+" .jedateprop"+c+" .action");d[0].scrollTop=e[0].offsetTop-157,g=f(h+" .jedateprop"+c+" p"),b.bind(g,"click",function(){var d,c=this;if(!b.hasClass(c,"disabled")){for(d=0;d<g.length;d++)b.removeClass(g[d],"action");b.addClass(c,"action"),b.html(f(h+" .jedatebot .jedatehms em")[a],b.digit(b.text(c)))}})})},u=f(h+" .jedateprophours"),v=f(h+" .jedatepropminutes"),w=f(h+" .jedatepropseconds"),r?t([u,v,w]):b.bind(f(h+" .jedatehms"),"click",function(){"block"!==f(h+" .jedateprophms")[0].style.display&&t([u,v,w]),b.bind(f(h+" .jedateprophms .jedatehmsclose"),"click",function(){b.isShow(f(h+" .jedateprophms")[0],!1)})}),b.bind(f(h+" .jedatebot .jedatetodaymonth"),"click",function(){var c=[j.getFullYear(),j.getMonth()+1,j.getDate(),j.getHours(),j.getMinutes(),j.getSeconds()],d=b.parse([c[0],c[1],c[2]],[c[3],c[4],c[5]],a.format||g.format),i=a.isDisplay?f("body "+h.replace(/\#/g,"."))[0]:e;b.getDateStr(a,h,c[0],c[1],c[2]),b.isValHtml(i)?b.val(i,d):b.text(i,d),b.dateClose(a,h),(b.isType(a.choosefun,"function")||null!=a.choosefun)&&a.choosefun(d),q||b.chooseDays(a,e,h)})),b.bind(f(h+" .jedatebot .jedateclear"),"click",function(){var c=a.isDisplay?f("body "+h.replace(/\#/g,"."))[0]:e,d=b.isValHtml(c)?b.val(c):b.text(c);b.isValHtml(c)?b.val(c,""):b.text(c,""),b.dateClose(a,h),""!=d&&(b.isType(a.clearfun,"function")||null!=a.clearfun)&&a.clearfun(d)}),b.bind(f(h+" .jedatebot .jedateok"),"click",function(c){var d,j,k,l,n,s,t,u,v,w,x,y;b.stopmp(c),d=a.isDisplay?f("body "+h.replace(/\#/g,"."))[0]:e,j=""!=(b.val(d)||b.text(d)),k=function(a){b.each(f(h+" .jedatehms em"),function(c,d){a.push(b.text(d))})},j?(l=q?f(h+" .jedaym li"):f(h+" .jedaul li"),b.nowDate(null,a.format||g.format),n=b.isValHtml(d)?b.val(d):b.text(d),s=n.match(/\w+|d+/g),q?(w=j?b.attr(f(h+" .jedaym .action")[0],"data-onym").match(/\w+|d+/g):"",v=j?b.parse([w[0],w[1],1],[0,0,0],a.format||g.format):""):(t=[],u=[parseInt(b.attr(o[0],"data-year")),parseInt(b.attr(p[0],"data-month")),s[2]],k(t),v=j?b.parse([u[0],u[1],u[2]],[t[0],t[1],t[2]],a.format||g.format):"",b.getDateStr(a,h,u[0],u[1],u[2])),r?b.isValHtml(d)?b.val(d,v):b.text(d,v):b.each(l,function(a,c){"action"==b.attr(c,"class")&&(b.isValHtml(d)?b.val(d,v):b.text(d,v))}),b.dateClose(a,h),""!=v&&(b.isType(a.okfun,"function")||null!=a.okfun)&&a.okfun(v),q||b.chooseDays(a,e,h)):r&&(x=[],y="",k(x),y=b.parse([i[0],i[1],i[2]],[x[0],x[1],x[2]],a.format||g.format),b.isValHtml(d)?b.val(d,y):b.text(d,y),b.dateClose(a,h))}),a.isDisplay||(b.bind(document,"mouseup",function(a){b.stopmp(a);var e=f("#"+d[0])[0];e&&"none"!==e.style.display&&c.body.removeChild(f(h)[0])}),b.bind(f("#"+d[0]),"mouseup",function(a){b.stopmp(a)})),q||!r&&b.chooseDays(a,e,h)},b.chooseYM=function(a,c,d,e){function p(a){var c="";return b.each(new Array(15),function(d){if(7===d){var e=b.attr(k[0],"data-year");c+="<li "+(e==a?'class="action"':"")+' data-y="'+a+'">'+a+"年</li>"}else c+='<li data-y="'+(a-7+d)+'">'+(a-7+d)+"年</li>"}),c}function q(a,c){var e="";12==c?(b.each(b.montharr,function(a,c){var d=b.attr(l[0],"data-month"),c=b.digit(c);e+="<li "+(d==c?'class="action"':"")+' data-m="'+c+'">'+c+"月</li>"}),b.each([m,n],function(a,c){b.isShow(c[0],!1)})):(e=p(a),b.each([m,n],function(a,c){b.isShow(c[0],!0)})),b.removeClass(h[0],12==c?"jedatesety":"jedatesetm").addClass(h[0],12==c?"jedatesetm":"jedatesety"),b.html(f(d+" .jedatetopym .ymdropul")[0],e),b.isShow(h[0],!0)}function r(g){b.bind(f(d+" .ymdropul li"),"click",function(){var i=b.attr(this,"data-y"),j=b.attr(l[0],"data-month");b.attr(g,"data-year",i),b.html(g,i),b.isShow(h[0],!1),b.getDateStr(a,d,i,j,e[2]),b.chooseDays(a,c,d)})}var s,h=f(d+" .jedatetopym"),i=f(d+" .jedateyy"),j=f(d+" .jedatemm"),k=f(d+" .jedateyy .jedateyear"),l=f(d+" .jedatemm .jedatemonth"),m=f(d+" .jedateymchri"),n=f(d+" .jedateymchle"),o="hh:mm:ss"==b.parseCheck(a.format||g.format,!1)?!0:!1;!o&&b.bind(i,"click",function(){var a=parseInt(b.attr(this,"data-ym")),c=parseInt(b.attr(k[0],"data-year"));q(c,a),r(k[0])}),!o&&b.bind(j,"click",function(){var g=parseInt(b.attr(this,"data-ym")),i=parseInt(b.attr(k[0],"data-year"));q(i,g),b.bind(f(d+" .ymdropul li"),"click",function(){var g=b.attr(k[0],"data-year"),i=b.attr(this,"data-m");b.attr(l[0],"data-month",i),b.html(l[0],i),b.isShow(h[0],!1),b.getDateStr(a,d,g,i,e[2]),b.chooseDays(a,c,d)})}),b.bind(f(d+" .jedateymchok"),"click",function(a){b.stopmp(a),b.isShow(h[0],!1)}),s=parseInt(b.attr(k[0],"data-year")),b.each([n,m],function(a,c){b.bind(c,"click",function(c){b.stopmp(c),0==a?s-=15:s+=15;var e=p(s);b.html(f(d+" .jedatetopym .ymdropul")[0],e),r(k[0])})})},b.chooseDays=function(a,c,d){b.bind(f(d+" .jedaul li"),"click",function(e){var k,l,m,n,h=this,i=[],j=a.isDisplay?f("body "+d.replace(/\#/g,"."))[0]:c;b.hasClass(h,"disabled")||(b.stopmp(e),b.each(f(d+" .jedatehms em"),function(a,c){i.push(b.text(c))}),k=parseInt(b.attr(h,"data-y")),l=parseFloat(b.attr(h,"data-m")),m=parseFloat(b.attr(h,"data-d")),n=b.parse([k,l,m],[i[0],i[1],i[2]],a.format||g.format),b.getDateStr(a,d,k,l,m),b.isValHtml(j)?b.val(j,n):b.text(j,n),b.dateClose(a,d),(b.isType(a.choosefun,"function")||null!=a.choosefun)&&a.choosefun(n),b.chooseDays(a,c,d))})},h=function(c){try{b.event=a.event?a.event:h.caller.arguments[0]}catch(d){}return new b.initDate(c||{})},b.getPath=function(){var a=document.scripts,b=a[a.length-1].src;return b.substring(0,b.lastIndexOf("/")+1)}(),b.creatlink=function(a){var c=document.createElement("link");c.type="text/css",c.rel="stylesheet",c.href=b.getPath+"skin/"+a+".css",c.id="jeDateSkin",f("head")[0].appendChild(c),c=null},b.creatlink("jedate"),h.version="2.6",h.skin=function(a){f("#jeDateSkin")[0].parentNode.removeChild(f("#jeDateSkin")[0]),b.creatlink(a)},h.now=function(a){function e(a){var b=new Date(1e3*a);return b.getFullYear()+"-"+d(b.getMonth()+1,2)+"-"+d(b.getDate(),2)+" "+d(b.getHours(),2)+":"+d(b.getMinutes(),2)+":"+d(b.getSeconds(),2)}var b=new Date(0|a?function(a){return 864e5>a?+new Date+864e5*a:a}(parseInt(a)):+new Date),c=new Date,d=function(a,b){var c="00"+a.toString();return c.substr(c.length-b)},f=b.getFullYear(),g=b.getMonth()+1,h=b.getDate(),i="string"==typeof a?e(a):f+"-"+d(g,2)+"-"+d(h,2)+" "+c.getHours()+":"+c.getMinutes()+":"+c.getSeconds();return i},"function"==typeof define?define(function(){return h}):"object"==typeof module&&"object"==typeof module.exports?module.exports=h:a.jeDate=h}(window);

{'fraction_non_alphanumeric': 0.36166964201822793, 'fraction_numerical': 0.02581508973033919, 'mean_word_length': 13.087690271343481, 'pattern_counts': {'":': 63, '<': 286, '<?xml version=': 0, '>': 337, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3701165', 'n_tokens_mistral': 21459, 'n_tokens_neox': 21307, 'n_words': 778}