Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pickadate

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pickadate - npm Package Compare versions

Comparing version 3.6.2 to 3.6.3

2

lib/compressed/picker.date.js
/*!
* Date picker for pickadate.js v3.6.2
* Date picker for pickadate.js v3.6.3
* http://amsul.github.io/pickadate.js/date.htm
*/
!function(a){"function"==typeof define&&define.amd?define(["./picker","jquery"],a):"object"==typeof exports?module.exports=a(require("./picker.js"),require("jquery")):a(Picker,jQuery)}(function(a,b){function c(a,b){var c=this,d=a.$node[0],e=d.value,f=a.$node.data("value"),g=f||e,h=f?b.formatSubmit:b.format,i=function(){return d.currentStyle?"rtl"==d.currentStyle.direction:"rtl"==getComputedStyle(a.$root[0]).direction};c.settings=b,c.$node=a.$node,c.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"},c.item={},c.item.clear=null,c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return!0===a[0]?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now"),g?c.set("select",g,{format:h,defaultValue:!0}):c.set("select",null).set("highlight",c.item.now),c.key={40:7,38:-7,39:function(){return i()?-1:1},37:function(){return i()?1:-1},go:function(a){var b=c.item.highlight,d=new Date(b.year,b.month,b.date+a);c.set("highlight",d,{interval:a}),this.render()}},a.on("render",function(){a.$root.find("."+b.klass.selectMonth).on("change",function(){var c=this.value;c&&(a.set("highlight",[a.get("view").year,c,a.get("highlight").date]),a.$root.find("."+b.klass.selectMonth).trigger("focus"))}),a.$root.find("."+b.klass.selectYear).on("change",function(){var c=this.value;c&&(a.set("highlight",[c,a.get("view").month,a.get("highlight").date]),a.$root.find("."+b.klass.selectYear).trigger("focus"))})},1).on("open",function(){var d="";c.disabled(c.get("now"))&&(d=":not(."+b.klass.buttonToday+")"),a.$root.find("button"+d+", select").attr("disabled",!1)},1).on("close",function(){a.$root.find("button, select").attr("disabled",!0)},1)}var d=7,e=a._;c.prototype.set=function(a,b,c){var d=this,e=d.item;return null===b?("clear"==a&&(a="select"),e[a]=b,d):(e["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",e.select,c):"highlight"==a?d.set("view",e.highlight,c):a.match(/^(flip|min|max|disable|enable)$/)&&(e.select&&d.disabled(e.select)&&d.set("select",e.select,c),e.highlight&&d.disabled(e.highlight)&&d.set("highlight",e.highlight,c)),d)},c.prototype.get=function(a){return this.item[a]},c.prototype.create=function(a,c,d){var f,g=this;return c=void 0===c?a:c,c==-1/0||c==1/0?f=c:b.isPlainObject(c)&&e.isInteger(c.pick)?c=c.obj:b.isArray(c)?(c=new Date(c[0],c[1],c[2]),c=e.isDate(c)?c:g.create().obj):c=e.isInteger(c)||e.isDate(c)?g.normalize(new Date(c),d):g.now(a,c,d),{year:f||c.getFullYear(),month:f||c.getMonth(),date:f||c.getDate(),day:f||c.getDay(),obj:f||c,pick:f||c.getTime()}},c.prototype.createRange=function(a,c){var d=this,f=function(a){return!0===a||b.isArray(a)||e.isDate(a)?d.create(a):a};return e.isInteger(a)||(a=f(a)),e.isInteger(c)||(c=f(c)),e.isInteger(a)&&b.isPlainObject(c)?a=[c.year,c.month,c.date+a]:e.isInteger(c)&&b.isPlainObject(a)&&(c=[a.year,a.month,a.date+c]),{from:f(a),to:f(c)}},c.prototype.withinRange=function(a,b){return a=this.createRange(a.from,a.to),b.pick>=a.from.pick&&b.pick<=a.to.pick},c.prototype.overlapRanges=function(a,b){var c=this;return a=c.createRange(a.from,a.to),b=c.createRange(b.from,b.to),c.withinRange(a,b.from)||c.withinRange(a,b.to)||c.withinRange(b,a.from)||c.withinRange(b,a.to)},c.prototype.now=function(a,b,c){return b=new Date,c&&c.rel&&b.setDate(b.getDate()+c.rel),this.normalize(b,c)},c.prototype.navigate=function(a,c,d){var e,f,g,h,i=b.isArray(c),j=b.isPlainObject(c),k=this.item.view;if(i||j){for(j?(f=c.year,g=c.month,h=c.date):(f=+c[0],g=+c[1],h=+c[2]),d&&d.nav&&k&&k.month!==g&&(f=k.year,g=k.month),e=new Date(f,g+(d&&d.nav?d.nav:0),1),f=e.getFullYear(),g=e.getMonth();new Date(f,g,h).getMonth()!==g;)h-=1;c=[f,g,h]}return c},c.prototype.normalize=function(a){return a.setHours(0,0,0,0),a},c.prototype.measure=function(a,b){var c=this;return e.isInteger(b)?b=c.now(a,b,{rel:b}):b?"string"==typeof b&&(b=c.parse(a,b)):b="min"==a?-1/0:1/0,b},c.prototype.viewset=function(a,b){return this.create([b.year,b.month,1])},c.prototype.validate=function(a,c,d){var f,g,h,i,j=this,k=c,l=d&&d.interval?d.interval:1,m=-1===j.item.enable,n=j.item.min,o=j.item.max,p=m&&j.item.disable.filter(function(a){if(b.isArray(a)){var d=j.create(a).pick;d<c.pick?f=!0:d>c.pick&&(g=!0)}return e.isInteger(a)}).length;if((!d||!d.nav&&!d.defaultValue)&&(!m&&j.disabled(c)||m&&j.disabled(c)&&(p||f||g)||!m&&(c.pick<=n.pick||c.pick>=o.pick)))for(m&&!p&&(!g&&l>0||!f&&l<0)&&(l*=-1);j.disabled(c)&&(Math.abs(l)>1&&(c.month<k.month||c.month>k.month)&&(c=k,l=l>0?1:-1),c.pick<=n.pick?(h=!0,l=1,c=j.create([n.year,n.month,n.date+(c.pick===n.pick?0:-1)])):c.pick>=o.pick&&(i=!0,l=-1,c=j.create([o.year,o.month,o.date+(c.pick===o.pick?0:1)])),!h||!i);)c=j.create([c.year,c.month,c.date+l]);return c},c.prototype.disabled=function(a){var c=this,d=c.item.disable.filter(function(d){return e.isInteger(d)?a.day===(c.settings.firstDay?d:d-1)%7:b.isArray(d)||e.isDate(d)?a.pick===c.create(d).pick:b.isPlainObject(d)?c.withinRange(d,a):void 0});return d=d.length&&!d.filter(function(a){return b.isArray(a)&&"inverted"==a[3]||b.isPlainObject(a)&&a.inverted}).length,-1===c.item.enable?!d:d||a.pick<c.item.min.pick||a.pick>c.item.max.pick},c.prototype.parse=function(a,b,c){var d=this,f={};return b&&"string"==typeof b?(c&&c.format||(c=c||{},c.format=d.settings.format),d.formats.toArray(c.format).map(function(a){var c=d.formats[a],g=c?e.trigger(c,d,[b,f]):a.replace(/^!/,"").length;c&&(f[a]=b.substr(0,g)),b=b.substr(g)}),[f.yyyy||f.yy,+(f.mm||f.m)-1,f.dd||f.d]):b},c.prototype.formats=function(){function a(a,b,c){var d=a.match(/[^\x00-\x7F]+|\w+/)[0];return c.mm||c.m||(c.m=b.indexOf(d)+1),d.length}function b(a){return a.match(/\w+/)[0].length}return{d:function(a,b){return a?e.digits(a):b.date},dd:function(a,b){return a?2:e.lead(b.date)},ddd:function(a,c){return a?b(a):this.settings.weekdaysShort[c.day]},dddd:function(a,c){return a?b(a):this.settings.weekdaysFull[c.day]},m:function(a,b){return a?e.digits(a):b.month+1},mm:function(a,b){return a?2:e.lead(b.month+1)},mmm:function(b,c){var d=this.settings.monthsShort;return b?a(b,d,c):d[c.month]},mmmm:function(b,c){var d=this.settings.monthsFull;return b?a(b,d,c):d[c.month]},yy:function(a,b){return a?2:(""+b.year).slice(2)},yyyy:function(a,b){return a?4:b.year},toArray:function(a){return a.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(a,b){var c=this;return c.formats.toArray(a).map(function(a){return e.trigger(c.formats[a],c,[0,b])||a.replace(/^!/,"")}).join("")}}}(),c.prototype.isDateExact=function(a,c){var d=this;return e.isInteger(a)&&e.isInteger(c)||"boolean"==typeof a&&"boolean"==typeof c?a===c:(e.isDate(a)||b.isArray(a))&&(e.isDate(c)||b.isArray(c))?d.create(a).pick===d.create(c).pick:!(!b.isPlainObject(a)||!b.isPlainObject(c))&&d.isDateExact(a.from,c.from)&&d.isDateExact(a.to,c.to)},c.prototype.isDateOverlap=function(a,c){var d=this,f=d.settings.firstDay?1:0;return e.isInteger(a)&&(e.isDate(c)||b.isArray(c))?(a=a%7+f)===d.create(c).day+1:e.isInteger(c)&&(e.isDate(a)||b.isArray(a))?(c=c%7+f)===d.create(a).day+1:!(!b.isPlainObject(a)||!b.isPlainObject(c))&&d.overlapRanges(a,c)},c.prototype.flipEnable=function(a){var b=this.item;b.enable=a||(-1==b.enable?1:-1)},c.prototype.deactivate=function(a,c){var d=this,f=d.item.disable.slice(0);return"flip"==c?d.flipEnable():!1===c?(d.flipEnable(1),f=[]):!0===c?(d.flipEnable(-1),f=[]):c.map(function(a){for(var c,g=0;g<f.length;g+=1)if(d.isDateExact(a,f[g])){c=!0;break}c||(e.isInteger(a)||e.isDate(a)||b.isArray(a)||b.isPlainObject(a)&&a.from&&a.to)&&f.push(a)}),f},c.prototype.activate=function(a,c){var d=this,f=d.item.disable,g=f.length;return"flip"==c?d.flipEnable():!0===c?(d.flipEnable(1),f=[]):!1===c?(d.flipEnable(-1),f=[]):c.map(function(a){var c,h,i,j;for(i=0;i<g;i+=1){if(h=f[i],d.isDateExact(h,a)){c=f[i]=null,j=!0;break}if(d.isDateOverlap(h,a)){b.isPlainObject(a)?(a.inverted=!0,c=a):b.isArray(a)?(c=a,c[3]||c.push("inverted")):e.isDate(a)&&(c=[a.getFullYear(),a.getMonth(),a.getDate(),"inverted"]);break}}if(c)for(i=0;i<g;i+=1)if(d.isDateExact(f[i],a)){f[i]=null;break}if(j)for(i=0;i<g;i+=1)if(d.isDateOverlap(f[i],a)){f[i]=null;break}c&&f.push(c)}),f.filter(function(a){return null!=a})},c.prototype.nodes=function(a){var b=this,c=b.settings,f=b.item,g=f.now,h=f.select,i=f.highlight,j=f.view,k=f.disable,l=f.min,m=f.max,n=function(a,b){return c.firstDay&&(a.push(a.shift()),b.push(b.shift())),e.node("thead",e.node("tr",e.group({min:0,max:d-1,i:1,node:"th",item:function(d){return[a[d],c.klass.weekdays,'scope=col title="'+b[d]+'"']}})))}((c.showWeekdaysFull?c.weekdaysFull:c.weekdaysShort).slice(0),c.weekdaysFull.slice(0)),o=function(a){return e.node("div"," ",c.klass["nav"+(a?"Next":"Prev")]+(a&&j.year>=m.year&&j.month>=m.month||!a&&j.year<=l.year&&j.month<=l.month?" "+c.klass.navDisabled:""),"data-nav="+(a||-1)+" "+e.ariaAttr({role:"button",controls:b.$node[0].id+"_table"})+' title="'+(a?c.labelMonthNext:c.labelMonthPrev)+'"')},p=function(){var d=c.showMonthsShort?c.monthsShort:c.monthsFull;return c.selectMonths?e.node("select",e.group({min:0,max:11,i:1,node:"option",item:function(a){return[d[a],0,"value="+a+(j.month==a?" selected":"")+(j.year==l.year&&a<l.month||j.year==m.year&&a>m.month?" disabled":"")]}}),c.klass.selectMonth,(a?"":"disabled")+" "+e.ariaAttr({controls:b.$node[0].id+"_table"})+' title="'+c.labelMonthSelect+'"'):e.node("div",d[j.month],c.klass.month)},q=function(){var d=j.year,f=!0===c.selectYears?5:~~(c.selectYears/2);if(f){var g=l.year,h=m.year,i=d-f,k=d+f;if(g>i&&(k+=g-i,i=g),h<k){var n=i-g,o=k-h;i-=n>o?o:n,k=h}return e.node("select",e.group({min:i,max:k,i:1,node:"option",item:function(a){return[a,0,"value="+a+(d==a?" selected":"")]}}),c.klass.selectYear,(a?"":"disabled")+" "+e.ariaAttr({controls:b.$node[0].id+"_table"})+' title="'+c.labelYearSelect+'"')}return e.node("div",d,c.klass.year)};return e.node("div",(c.selectYears?q()+p():p()+q())+o()+o(1),c.klass.header)+e.node("table",n+e.node("tbody",e.group({min:0,max:5,i:1,node:"tr",item:function(a){var f=c.firstDay&&0===b.create([j.year,j.month,1]).day?-7:0;return[e.group({min:d*a-j.day+f+1,max:function(){return this.min+d-1},i:1,node:"td",item:function(a){a=b.create([j.year,j.month,a+(c.firstDay?1:0)]);var d=h&&h.pick==a.pick,f=i&&i.pick==a.pick,n=k&&b.disabled(a)||a.pick<l.pick||a.pick>m.pick,o=e.trigger(b.formats.toString,b,[c.format,a]);return[e.node("div",a.date,function(b){return b.push(j.month==a.month?c.klass.infocus:c.klass.outfocus),g.pick==a.pick&&b.push(c.klass.now),d&&b.push(c.klass.selected),f&&b.push(c.klass.highlighted),n&&b.push(c.klass.disabled),b.join(" ")}([c.klass.day]),"data-pick="+a.pick+" "+e.ariaAttr({role:"gridcell",label:o,selected:!(!d||b.$node.val()!==o)||null,activedescendant:!!f||null,disabled:!!n||null})),"",e.ariaAttr({role:"presentation"})]}})]}})),c.klass.table,'id="'+b.$node[0].id+'_table" '+e.ariaAttr({role:"grid",controls:b.$node[0].id,readonly:!0}))+e.node("div",e.node("button",c.today,c.klass.buttonToday,"type=button data-pick="+g.pick+(a&&!b.disabled(g)?"":" disabled")+" "+e.ariaAttr({controls:b.$node[0].id}))+e.node("button",c.clear,c.klass.buttonClear,"type=button data-clear=1"+(a?"":" disabled")+" "+e.ariaAttr({controls:b.$node[0].id}))+e.node("button",c.close,c.klass.buttonClose,"type=button data-close=true "+(a?"":" disabled")+" "+e.ariaAttr({controls:b.$node[0].id})),c.klass.footer)},c.defaults=function(a){return{labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",close:"Close",closeOnSelect:!0,closeOnClear:!0,updateInput:!0,format:"d mmmm, yyyy",klass:{table:a+"table",header:a+"header",navPrev:a+"nav--prev",navNext:a+"nav--next",navDisabled:a+"nav--disabled",month:a+"month",year:a+"year",selectMonth:a+"select--month",selectYear:a+"select--year",weekdays:a+"weekday",day:a+"day",disabled:a+"day--disabled",selected:a+"day--selected",highlighted:a+"day--highlighted",now:a+"day--today",infocus:a+"day--infocus",outfocus:a+"day--outfocus",footer:a+"footer",buttonClear:a+"button--clear",buttonToday:a+"button--today",buttonClose:a+"button--close"}}}(a.klasses().picker+"__"),a.extend("pickadate",c)});
/*!
* pickadate.js v3.6.2, 2019/03/19
* pickadate.js v3.6.3, 2019/04/03
* By Amsul, http://amsul.ca

@@ -7,2 +7,2 @@ * Hosted on http://amsul.github.io/pickadate.js

*/
!function(a){"function"==typeof define&&define.amd?define("picker",["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):this.Picker=a(jQuery)}(function(a){function b(h,i,k,m){function o(){return b._.node("div",b._.node("div",b._.node("div",b._.node("div",C.component.nodes(x.open),z.box),z.wrap),z.frame),z.holder,'tabindex="-1"')}function p(){A.data(i,C).addClass(z.input).val(A.data("value")?C.get("select",y.format):h.value).on("focus."+x.id+" click."+x.id,f(function(a){a.preventDefault(),C.open()},100)),y.editable||A.on("keydown."+x.id,v),g(h,{haspopup:!0,expanded:!1,readonly:!1,owns:h.id+"_root"})}function q(){g(C.$root[0],"hidden",!0)}function r(){C.$holder.on({keydown:v,"focus.toOpen":u,blur:function(){A.removeClass(z.target)},focusin:function(a){C.$root.removeClass(z.focused),a.stopPropagation()},"mousedown click":function(b){var c=e(b,h);c!=C.$holder[0]&&(b.stopPropagation(),"mousedown"!=b.type||a(c).is("input, select, textarea, button, option")||(b.preventDefault(),C.$holder.eq(0).focus()))}}).on("click","[data-pick], [data-nav], [data-clear], [data-close]",function(){var b=a(this),c=b.data(),d=b.hasClass(z.navDisabled)||b.hasClass(z.disabled),e=j();e=e&&(e.type||e.href?e:null),(d||e&&!a.contains(C.$root[0],e))&&C.$holder.eq(0).focus(),!d&&c.nav?C.set("highlight",C.component.item.highlight,{nav:c.nav}):!d&&"pick"in c?(C.set("select",c.pick),y.closeOnSelect&&C.close(!0)):c.clear?(C.clear(),y.closeOnClear&&C.close(!0)):c.close&&C.close(!0)})}function s(){var b;!0===y.hiddenName?(b=h.name,h.name=""):(b=["string"==typeof y.hiddenPrefix?y.hiddenPrefix:"","string"==typeof y.hiddenSuffix?y.hiddenSuffix:"_submit"],b=b[0]+h.name+b[1]),C._hidden=a('<input type=hidden name="'+b+'"'+(A.data("value")||h.value?' value="'+C.get("select",y.formatSubmit)+'"':"")+">")[0],A.on("change."+x.id,function(){C._hidden.value=h.value?C.get("select",y.formatSubmit):""})}function t(){w&&n?C.$holder.find("."+z.frame).one("transitionend",function(){C.$holder.eq(0).focus()}):setTimeout(function(){C.$holder.eq(0).focus()},0)}function u(a){a.stopPropagation(),A.addClass(z.target),C.$root.addClass(z.focused),C.open()}function v(a){var b=a.keyCode,c=/^(8|46)$/.test(b);if(27==b)return C.close(!0),!1;(32==b||c||!x.open&&C.component.key[b])&&(a.preventDefault(),a.stopPropagation(),c?C.clear().close():C.open())}if(!h)return b;var w=!1,x={id:h.id||"P"+Math.abs(~~(Math.random()*new Date))},y=k?a.extend(!0,{},k.defaults,m):m||{},z=a.extend({},b.klasses(),y.klass),A=a(h),B=function(){return this.start()},C=B.prototype={constructor:B,$node:A,start:function(){return x&&x.start?C:(x.methods={},x.start=!0,x.open=!1,x.type=h.type,h.autofocus=h==j(),h.readOnly=!y.editable,h.id=h.id||x.id,"text"!=h.type&&(h.type="text"),C.component=new k(C,y),C.$root=a('<div class="'+z.picker+'" id="'+h.id+'_root" />'),q(),C.$holder=a(o()).appendTo(C.$root),r(),y.formatSubmit&&s(),p(),y.containerHidden?a(y.containerHidden).append(C._hidden):A.after(C._hidden),y.container?a(y.container).append(C.$root):A.after(C.$root),C.on({start:C.component.onStart,render:C.component.onRender,stop:C.component.onStop,open:C.component.onOpen,close:C.component.onClose,set:C.component.onSet}).on({start:y.onStart,render:y.onRender,stop:y.onStop,open:y.onOpen,close:y.onClose,set:y.onSet}),w=c(C.$holder[0]),h.autofocus&&C.open(),C.trigger("start").trigger("render"))},render:function(b){return b?(C.$holder=a(o()),r(),C.$root.html(C.$holder)):C.$root.find("."+z.box).html(C.component.nodes(x.open)),C.trigger("render")},stop:function(){return x.start?(C.close(),C._hidden&&C._hidden.parentNode.removeChild(C._hidden),C.$root.remove(),A.removeClass(z.input).removeData(i),setTimeout(function(){A.off("."+x.id)},0),h.type=x.type,h.readOnly=!1,C.trigger("stop"),x.methods={},x.start=!1,C):C},open:function(c){return x.open?C:(A.addClass(z.active),g(h,"expanded",!0),setTimeout(function(){C.$root.addClass(z.opened),g(C.$root[0],"hidden",!1)},0),!1!==c&&(x.open=!0,w&&a("body").css("overflow","hidden").css("padding-right","+="+d()),t(),l.on("click."+x.id+" focusin."+x.id,function(a){var b=e(a,h);a.isSimulated||b==h||b==document||3==a.which||C.close(b===C.$holder[0])}).on("keydown."+x.id,function(c){var d=c.keyCode,f=C.component.key[d],g=e(c,h);27==d?C.close(!0):g!=C.$holder[0]||!f&&13!=d?a.contains(C.$root[0],g)&&13==d&&(c.preventDefault(),g.click()):(c.preventDefault(),f?b._.trigger(C.component.key.go,C,[b._.trigger(f)]):C.$root.find("."+z.highlighted).hasClass(z.disabled)||(C.set("select",C.component.item.highlight),y.closeOnSelect&&C.close(!0)))})),C.trigger("open"))},close:function(b){return b&&(y.editable?h.focus():(C.$holder.off("focus.toOpen").focus(),setTimeout(function(){C.$holder.on("focus.toOpen",u)},0))),A.removeClass(z.active),g(h,"expanded",!1),setTimeout(function(){C.$root.removeClass(z.opened+" "+z.focused),g(C.$root[0],"hidden",!0)},0),x.open?(x.open=!1,w&&a("body").css("overflow","").css("padding-right","-="+d()),l.off("."+x.id),C.trigger("close")):C},clear:function(a){return C.set("clear",null,a)},set:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(d=g&&a.isPlainObject(c)?c:d||{},b){g||(h[b]=c);for(e in h)f=h[e],e in C.component.item&&(void 0===f&&(f=null),C.component.set(e,f,d)),"select"!=e&&"clear"!=e||!y.updateInput||A.val("clear"==e?"":C.get(e,y.format)).trigger("change");C.render()}return d.muted?C:C.trigger("set",h)},get:function(a,c){if(a=a||"value",null!=x[a])return x[a];if("valueSubmit"==a){if(C._hidden)return C._hidden.value;a="value"}if("value"==a)return h.value;if(a in C.component.item){if("string"==typeof c){var d=C.component.get(a);return d?b._.trigger(C.component.formats.toString,C.component,[c,d]):""}return C.component.get(a)}},on:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(b){g||(h[b]=c);for(e in h)f=h[e],d&&(e="_"+e),x.methods[e]=x.methods[e]||[],x.methods[e].push(f)}return C},off:function(){var a,b,c=arguments;for(a=0,namesCount=c.length;a<namesCount;a+=1)(b=c[a])in x.methods&&delete x.methods[b];return C},trigger:function(a,c){var d=function(a){var d=x.methods[a];d&&d.map(function(a){b._.trigger(a,C,[c])})};return d("_"+a),d(a),C}};return new B}function c(a){var b,c="position";return a.currentStyle?b=a.currentStyle[c]:window.getComputedStyle&&(b=getComputedStyle(a)[c]),"fixed"==b}function d(){if(m.height()<=k.height())return 0;var b=a('<div style="visibility:hidden;width:100px" />').appendTo("body"),c=b[0].offsetWidth;b.css("overflow","scroll");var d=a('<div style="width:100%" />').appendTo(b),e=d[0].offsetWidth;return b.remove(),c-e}function e(a,b){var c=[];return a.path&&(c=a.path),a.originalEvent&&a.originalEvent.path&&(c=a.originalEvent.path),c&&c.length>0?b&&c.indexOf(b)>=0?b:c[0]:a.target}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}}function g(b,c,d){if(a.isPlainObject(c))for(var e in c)h(b,e,c[e]);else h(b,c,d)}function h(a,b,c){a.setAttribute(("role"==b?"":"aria-")+b,c)}function i(b,c){a.isPlainObject(b)||(b={attribute:c}),c="";for(var d in b){var e=("role"==d?"":"aria-")+d;c+=null==b[d]?"":e+'="'+b[d]+'"'}return c}function j(){try{return document.activeElement}catch(a){}}var k=a(window),l=a(document),m=a(document.documentElement),n=null!=document.documentElement.style.transition;return b.klasses=function(a){return a=a||"picker",{picker:a,opened:a+"--opened",focused:a+"--focused",input:a+"__input",active:a+"__input--active",target:a+"__input--target",holder:a+"__holder",frame:a+"__frame",wrap:a+"__wrap",box:a+"__box"}},b._={group:function(a){for(var c,d="",e=b._.trigger(a.min,a);e<=b._.trigger(a.max,a,[e]);e+=a.i)c=b._.trigger(a.item,a,[e]),d+=b._.node(a.node,c[0],c[1],c[2]);return d},node:function(b,c,d,e){return c?(c=a.isArray(c)?c.join(""):c,d=d?' class="'+d+'"':"",e=e?" "+e:"","<"+b+d+e+">"+c+"</"+b+">"):""},lead:function(a){return(a<10?"0":"")+a},trigger:function(a,b,c){return"function"==typeof a?a.apply(b,c||[]):a},digits:function(a){return/\d/.test(a[1])?2:1},isDate:function(a){return{}.toString.call(a).indexOf("Date")>-1&&this.isInteger(a.getDate())},isInteger:function(a){return{}.toString.call(a).indexOf("Number")>-1&&a%1==0},ariaAttr:i},b.extend=function(c,d){a.fn[c]=function(e,f){var g=this.data(c);return"picker"==e?g:g&&"string"==typeof e?b._.trigger(g[e],g,[f]):this.each(function(){a(this).data(c)||new b(this,c,d,e)})},a.fn[c].defaults=d.defaults},b});
!function(a){"function"==typeof define&&define.amd?define("picker",["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):this.Picker=a(jQuery)}(function(a){function b(h,i,k,m){function o(){return b._.node("div",b._.node("div",b._.node("div",b._.node("div",C.component.nodes(x.open),z.box),z.wrap),z.frame),z.holder,'tabindex="-1"')}function p(){A.data(i,C).addClass(z.input).val(A.data("value")?C.get("select",y.format):h.value).on("focus."+x.id+" click."+x.id,f(function(a){a.preventDefault(),C.open()},100)).on("mousedown",function(){x.handlingOpen=!0;var b=function(){setTimeout(function(){a(document).off("mouseup",b),x.handlingOpen=!1},0)};a(document).on("mouseup",b)}),y.editable||A.on("keydown."+x.id,v),g(h,{haspopup:!0,expanded:!1,readonly:!1,owns:h.id+"_root"})}function q(){g(C.$root[0],"hidden",!0)}function r(){C.$holder.on({keydown:v,"focus.toOpen":u,blur:function(){A.removeClass(z.target)},focusin:function(a){C.$root.removeClass(z.focused),a.stopPropagation()},"mousedown click":function(b){var c=e(b,h);c!=C.$holder[0]&&(b.stopPropagation(),"mousedown"!=b.type||a(c).is("input, select, textarea, button, option")||(b.preventDefault(),C.$holder.eq(0).focus()))}}).on("click","[data-pick], [data-nav], [data-clear], [data-close]",function(){var b=a(this),c=b.data(),d=b.hasClass(z.navDisabled)||b.hasClass(z.disabled),e=j();e=e&&(e.type||e.href?e:null),(d||e&&!a.contains(C.$root[0],e))&&C.$holder.eq(0).focus(),!d&&c.nav?C.set("highlight",C.component.item.highlight,{nav:c.nav}):!d&&"pick"in c?(C.set("select",c.pick),y.closeOnSelect&&C.close(!0)):c.clear?(C.clear(),y.closeOnClear&&C.close(!0)):c.close&&C.close(!0)})}function s(){var b;!0===y.hiddenName?(b=h.name,h.name=""):(b=["string"==typeof y.hiddenPrefix?y.hiddenPrefix:"","string"==typeof y.hiddenSuffix?y.hiddenSuffix:"_submit"],b=b[0]+h.name+b[1]),C._hidden=a('<input type=hidden name="'+b+'"'+(A.data("value")||h.value?' value="'+C.get("select",y.formatSubmit)+'"':"")+">")[0],A.on("change."+x.id,function(){C._hidden.value=h.value?C.get("select",y.formatSubmit):""})}function t(){w&&n?C.$holder.find("."+z.frame).one("transitionend",function(){C.$holder.eq(0).focus()}):setTimeout(function(){C.$holder.eq(0).focus()},0)}function u(a){a.stopPropagation(),A.addClass(z.target),C.$root.addClass(z.focused),C.open()}function v(a){var b=a.keyCode,c=/^(8|46)$/.test(b);if(27==b)return C.close(!0),!1;(32==b||c||!x.open&&C.component.key[b])&&(a.preventDefault(),a.stopPropagation(),c?C.clear().close():C.open())}if(!h)return b;var w=!1,x={id:h.id||"P"+Math.abs(~~(Math.random()*new Date)),handlingOpen:!1},y=k?a.extend(!0,{},k.defaults,m):m||{},z=a.extend({},b.klasses(),y.klass),A=a(h),B=function(){return this.start()},C=B.prototype={constructor:B,$node:A,start:function(){return x&&x.start?C:(x.methods={},x.start=!0,x.open=!1,x.type=h.type,h.autofocus=h==j(),h.readOnly=!y.editable,h.id=h.id||x.id,"text"!=h.type&&(h.type="text"),C.component=new k(C,y),C.$root=a('<div class="'+z.picker+'" id="'+h.id+'_root" />'),q(),C.$holder=a(o()).appendTo(C.$root),r(),y.formatSubmit&&s(),p(),y.containerHidden?a(y.containerHidden).append(C._hidden):A.after(C._hidden),y.container?a(y.container).append(C.$root):A.after(C.$root),C.on({start:C.component.onStart,render:C.component.onRender,stop:C.component.onStop,open:C.component.onOpen,close:C.component.onClose,set:C.component.onSet}).on({start:y.onStart,render:y.onRender,stop:y.onStop,open:y.onOpen,close:y.onClose,set:y.onSet}),w=c(C.$holder[0]),h.autofocus&&C.open(),C.trigger("start").trigger("render"))},render:function(b){return b?(C.$holder=a(o()),r(),C.$root.html(C.$holder)):C.$root.find("."+z.box).html(C.component.nodes(x.open)),C.trigger("render")},stop:function(){return x.start?(C.close(),C._hidden&&C._hidden.parentNode.removeChild(C._hidden),C.$root.remove(),A.removeClass(z.input).removeData(i),setTimeout(function(){A.off("."+x.id)},0),h.type=x.type,h.readOnly=!1,C.trigger("stop"),x.methods={},x.start=!1,C):C},open:function(c){return x.open?C:(A.addClass(z.active),g(h,"expanded",!0),setTimeout(function(){C.$root.addClass(z.opened),g(C.$root[0],"hidden",!1)},0),!1!==c&&(x.open=!0,w&&a("body").css("overflow","hidden").css("padding-right","+="+d()),t(),l.on("click."+x.id+" focusin."+x.id,function(a){if(!x.handlingOpen){var b=e(a,h);a.isSimulated||b==h||b==document||3==a.which||C.close(b===C.$holder[0])}}).on("keydown."+x.id,function(c){var d=c.keyCode,f=C.component.key[d],g=e(c,h);27==d?C.close(!0):g!=C.$holder[0]||!f&&13!=d?a.contains(C.$root[0],g)&&13==d&&(c.preventDefault(),g.click()):(c.preventDefault(),f?b._.trigger(C.component.key.go,C,[b._.trigger(f)]):C.$root.find("."+z.highlighted).hasClass(z.disabled)||(C.set("select",C.component.item.highlight),y.closeOnSelect&&C.close(!0)))})),C.trigger("open"))},close:function(b){return b&&(y.editable?h.focus():(C.$holder.off("focus.toOpen").focus(),setTimeout(function(){C.$holder.on("focus.toOpen",u)},0))),A.removeClass(z.active),g(h,"expanded",!1),setTimeout(function(){C.$root.removeClass(z.opened+" "+z.focused),g(C.$root[0],"hidden",!0)},0),x.open?(x.open=!1,w&&a("body").css("overflow","").css("padding-right","-="+d()),l.off("."+x.id),C.trigger("close")):C},clear:function(a){return C.set("clear",null,a)},set:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(d=g&&a.isPlainObject(c)?c:d||{},b){g||(h[b]=c);for(e in h)f=h[e],e in C.component.item&&(void 0===f&&(f=null),C.component.set(e,f,d)),"select"!=e&&"clear"!=e||!y.updateInput||A.val("clear"==e?"":C.get(e,y.format)).trigger("change");C.render()}return d.muted?C:C.trigger("set",h)},get:function(a,c){if(a=a||"value",null!=x[a])return x[a];if("valueSubmit"==a){if(C._hidden)return C._hidden.value;a="value"}if("value"==a)return h.value;if(a in C.component.item){if("string"==typeof c){var d=C.component.get(a);return d?b._.trigger(C.component.formats.toString,C.component,[c,d]):""}return C.component.get(a)}},on:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(b){g||(h[b]=c);for(e in h)f=h[e],d&&(e="_"+e),x.methods[e]=x.methods[e]||[],x.methods[e].push(f)}return C},off:function(){var a,b,c=arguments;for(a=0,namesCount=c.length;a<namesCount;a+=1)(b=c[a])in x.methods&&delete x.methods[b];return C},trigger:function(a,c){var d=function(a){var d=x.methods[a];d&&d.map(function(a){b._.trigger(a,C,[c])})};return d("_"+a),d(a),C}};return new B}function c(a){var b,c="position";return a.currentStyle?b=a.currentStyle[c]:window.getComputedStyle&&(b=getComputedStyle(a)[c]),"fixed"==b}function d(){if(m.height()<=k.height())return 0;var b=a('<div style="visibility:hidden;width:100px" />').appendTo("body"),c=b[0].offsetWidth;b.css("overflow","scroll");var d=a('<div style="width:100%" />').appendTo(b),e=d[0].offsetWidth;return b.remove(),c-e}function e(a,b){var c=[];return a.path&&(c=a.path),a.originalEvent&&a.originalEvent.path&&(c=a.originalEvent.path),c&&c.length>0?b&&c.indexOf(b)>=0?b:c[0]:a.target}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}}function g(b,c,d){if(a.isPlainObject(c))for(var e in c)h(b,e,c[e]);else h(b,c,d)}function h(a,b,c){a.setAttribute(("role"==b?"":"aria-")+b,c)}function i(b,c){a.isPlainObject(b)||(b={attribute:c}),c="";for(var d in b){var e=("role"==d?"":"aria-")+d;c+=null==b[d]?"":e+'="'+b[d]+'"'}return c}function j(){try{return document.activeElement}catch(a){}}var k=a(window),l=a(document),m=a(document.documentElement),n=null!=document.documentElement.style.transition;return b.klasses=function(a){return a=a||"picker",{picker:a,opened:a+"--opened",focused:a+"--focused",input:a+"__input",active:a+"__input--active",target:a+"__input--target",holder:a+"__holder",frame:a+"__frame",wrap:a+"__wrap",box:a+"__box"}},b._={group:function(a){for(var c,d="",e=b._.trigger(a.min,a);e<=b._.trigger(a.max,a,[e]);e+=a.i)c=b._.trigger(a.item,a,[e]),d+=b._.node(a.node,c[0],c[1],c[2]);return d},node:function(b,c,d,e){return c?(c=a.isArray(c)?c.join(""):c,d=d?' class="'+d+'"':"",e=e?" "+e:"","<"+b+d+e+">"+c+"</"+b+">"):""},lead:function(a){return(a<10?"0":"")+a},trigger:function(a,b,c){return"function"==typeof a?a.apply(b,c||[]):a},digits:function(a){return/\d/.test(a[1])?2:1},isDate:function(a){return{}.toString.call(a).indexOf("Date")>-1&&this.isInteger(a.getDate())},isInteger:function(a){return{}.toString.call(a).indexOf("Number")>-1&&a%1==0},ariaAttr:i},b.extend=function(c,d){a.fn[c]=function(e,f){var g=this.data(c);return"picker"==e?g:g&&"string"==typeof e?b._.trigger(g[e],g,[f]):this.each(function(){a(this).data(c)||new b(this,c,d,e)})},a.fn[c].defaults=d.defaults},b});
/*!
* Time picker for pickadate.js v3.6.2
* Time picker for pickadate.js v3.6.3
* http://amsul.github.io/pickadate.js/time.htm
*/
!function(a){"function"==typeof define&&define.amd?define(["./picker","jquery"],a):"object"==typeof exports?module.exports=a(require("./picker.js"),require("jquery")):a(Picker,jQuery)}(function(a,b){function c(a,b){var c=this,d=a.$node[0].value,e=a.$node.data("value"),f=e||d,g=e?b.formatSubmit:b.format;c.settings=b,c.$node=a.$node,c.queue={interval:"i",min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse create validate",view:"parse create validate",disable:"deactivate",enable:"activate"},c.item={},c.item.clear=null,c.item.interval=b.interval||30,c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return!0===a[0]?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now"),f?c.set("select",f,{format:g}):c.set("select",null).set("highlight",c.item.now),c.key={40:1,38:-1,39:1,37:-1,go:function(a){c.set("highlight",c.item.highlight.pick+a*c.item.interval,{interval:a*c.item.interval}),this.render()}},a.on("render",function(){var c=a.$root.children(),d=c.find("."+b.klass.viewset),e=function(a){return["webkit","moz","ms","o",""].map(function(b){return(b?"-"+b+"-":"")+a})},f=function(a,b){e("transform").map(function(c){a.css(c,b)}),e("transition").map(function(c){a.css(c,b)})};d.length&&(f(c,"none"),c[0].scrollTop=~~d.position().top-2*d[0].clientHeight,f(c,""))},1).on("open",function(){a.$root.find("button").attr("disabled",!1)},1).on("close",function(){a.$root.find("button").attr("disabled",!0)},1)}var d=24,e=60,f=12,g=d*e,h=a._;c.prototype.set=function(a,b,c){var d=this,e=d.item;return null===b?("clear"==a&&(a="select"),e[a]=b,d):(e["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",e.select,c):"highlight"==a?d.set("view",e.highlight,c):"interval"==a?d.set("min",e.min,c).set("max",e.max,c):a.match(/^(flip|min|max|disable|enable)$/)&&(e.select&&d.disabled(e.select)&&d.set("select",b,c),e.highlight&&d.disabled(e.highlight)&&d.set("highlight",b,c),"min"==a&&d.set("max",e.max,c)),d)},c.prototype.get=function(a){return this.item[a]},c.prototype.create=function(a,c,f){var i=this;return c=void 0===c?a:c,h.isDate(c)&&(c=[c.getHours(),c.getMinutes()]),b.isPlainObject(c)&&h.isInteger(c.pick)?c=c.pick:b.isArray(c)?c=+c[0]*e+ +c[1]:h.isInteger(c)||(c=i.now(a,c,f)),"max"==a&&c<i.item.min.pick&&(c+=g),"min"!=a&&"max"!=a&&(c-i.item.min.pick)%i.item.interval!=0&&(c+=i.item.interval),c=i.normalize(a,c,f),{hour:~~(d+c/e)%d,mins:(e+c%e)%e,time:(g+c)%g,pick:c%g}},c.prototype.createRange=function(a,c){var d=this,e=function(a){return!0===a||b.isArray(a)||h.isDate(a)?d.create(a):a};return h.isInteger(a)||(a=e(a)),h.isInteger(c)||(c=e(c)),h.isInteger(a)&&b.isPlainObject(c)?a=[c.hour,c.mins+a*d.settings.interval]:h.isInteger(c)&&b.isPlainObject(a)&&(c=[a.hour,a.mins+c*d.settings.interval]),{from:e(a),to:e(c)}},c.prototype.withinRange=function(a,b){return a=this.createRange(a.from,a.to),b.pick>=a.from.pick&&b.pick<=a.to.pick},c.prototype.overlapRanges=function(a,b){var c=this;return a=c.createRange(a.from,a.to),b=c.createRange(b.from,b.to),c.withinRange(a,b.from)||c.withinRange(a,b.to)||c.withinRange(b,a.from)||c.withinRange(b,a.to)},c.prototype.now=function(a,b){var c,d=this.item.interval,f=new Date,g=f.getHours()*e+f.getMinutes(),i=h.isInteger(b);return g-=g%d,c=b<0&&d*b+g<=-d,g+="min"==a&&c?0:d,i&&(g+=d*(c&&"max"!=a?b+1:b)),g},c.prototype.normalize=function(a,b){var c=this.item.interval,d=this.item.min&&this.item.min.pick||0;return b-="min"==a?0:(b-d)%c},c.prototype.measure=function(a,c,f){var g=this;return c||(c="min"==a?[0,0]:[d-1,e-1]),"string"==typeof c?c=g.parse(a,c):!0===c||h.isInteger(c)?c=g.now(a,c,f):b.isPlainObject(c)&&h.isInteger(c.pick)&&(c=g.normalize(a,c.pick,f)),c},c.prototype.validate=function(a,b,c){var d=this,e=c&&c.interval?c.interval:d.item.interval;return d.disabled(b)&&(b=d.shift(b,e)),b=d.scope(b),d.disabled(b)&&(b=d.shift(b,-1*e)),b},c.prototype.disabled=function(a){var c=this,d=c.item.disable.filter(function(d){return h.isInteger(d)?a.hour==d:b.isArray(d)||h.isDate(d)?a.pick==c.create(d).pick:b.isPlainObject(d)?c.withinRange(d,a):void 0});return d=d.length&&!d.filter(function(a){return b.isArray(a)&&"inverted"==a[2]||b.isPlainObject(a)&&a.inverted}).length,-1===c.item.enable?!d:d||a.pick<c.item.min.pick||a.pick>c.item.max.pick},c.prototype.shift=function(a,b){var c=this,d=c.item.min.pick,e=c.item.max.pick;for(b=b||c.item.interval;c.disabled(a)&&(a=c.create(a.pick+=b),!(a.pick<=d||a.pick>=e)););return a},c.prototype.scope=function(a){var b=this.item.min.pick,c=this.item.max.pick;return this.create(a.pick>c?c:a.pick<b?b:a)},c.prototype.parse=function(a,b,c){var d,f,g,i,j,k=this,l={};if(!b||"string"!=typeof b)return b;c&&c.format||(c=c||{},c.format=k.settings.format),k.formats.toArray(c.format).map(function(a){var c,d=k.formats[a],e=d?h.trigger(d,k,[b,l]):a.replace(/^!/,"").length;d&&(c=b.substr(0,e),l[a]=c.match(/^\d+$/)?+c:c),b=b.substr(e)});for(i in l)j=l[i],h.isInteger(j)?i.match(/^(h|hh)$/i)?(d=j,"h"!=i&&"hh"!=i||(d%=12)):"i"==i&&(f=j):i.match(/^a$/i)&&j.match(/^p/i)&&("h"in l||"hh"in l)&&(g=!0);return(g?d+12:d)*e+f},c.prototype.formats={h:function(a,b){return a?h.digits(a):b.hour%f||f},hh:function(a,b){return a?2:h.lead(b.hour%f||f)},H:function(a,b){return a?h.digits(a):""+b.hour%24},HH:function(a,b){return a?h.digits(a):h.lead(b.hour%24)},i:function(a,b){return a?2:h.lead(b.mins)},a:function(a,b){return a?4:g/2>b.time%g?"a.m.":"p.m."},A:function(a,b){return a?2:g/2>b.time%g?"AM":"PM"},toArray:function(a){return a.split(/(h{1,2}|H{1,2}|i|a|A|!.)/g)},toString:function(a,b){var c=this;return c.formats.toArray(a).map(function(a){return h.trigger(c.formats[a],c,[0,b])||a.replace(/^!/,"")}).join("")}},c.prototype.isTimeExact=function(a,c){var d=this;return h.isInteger(a)&&h.isInteger(c)||"boolean"==typeof a&&"boolean"==typeof c?a===c:(h.isDate(a)||b.isArray(a))&&(h.isDate(c)||b.isArray(c))?d.create(a).pick===d.create(c).pick:!(!b.isPlainObject(a)||!b.isPlainObject(c))&&(d.isTimeExact(a.from,c.from)&&d.isTimeExact(a.to,c.to))},c.prototype.isTimeOverlap=function(a,c){var d=this;return h.isInteger(a)&&(h.isDate(c)||b.isArray(c))?a===d.create(c).hour:h.isInteger(c)&&(h.isDate(a)||b.isArray(a))?c===d.create(a).hour:!(!b.isPlainObject(a)||!b.isPlainObject(c))&&d.overlapRanges(a,c)},c.prototype.flipEnable=function(a){var b=this.item;b.enable=a||(-1==b.enable?1:-1)},c.prototype.deactivate=function(a,c){var d=this,e=d.item.disable.slice(0);return"flip"==c?d.flipEnable():!1===c?(d.flipEnable(1),e=[]):!0===c?(d.flipEnable(-1),e=[]):c.map(function(a){for(var c,f=0;f<e.length;f+=1)if(d.isTimeExact(a,e[f])){c=!0;break}c||(h.isInteger(a)||h.isDate(a)||b.isArray(a)||b.isPlainObject(a)&&a.from&&a.to)&&e.push(a)}),e},c.prototype.activate=function(a,c){var d=this,e=d.item.disable,f=e.length;return"flip"==c?d.flipEnable():!0===c?(d.flipEnable(1),e=[]):!1===c?(d.flipEnable(-1),e=[]):c.map(function(a){var c,g,i,j;for(i=0;i<f;i+=1){if(g=e[i],d.isTimeExact(g,a)){c=e[i]=null,j=!0;break}if(d.isTimeOverlap(g,a)){b.isPlainObject(a)?(a.inverted=!0,c=a):b.isArray(a)?(c=a,c[2]||c.push("inverted")):h.isDate(a)&&(c=[a.getFullYear(),a.getMonth(),a.getDate(),"inverted"]);break}}if(c)for(i=0;i<f;i+=1)if(d.isTimeExact(e[i],a)){e[i]=null;break}if(j)for(i=0;i<f;i+=1)if(d.isTimeOverlap(e[i],a)){e[i]=null;break}c&&e.push(c)}),e.filter(function(a){return null!=a})},c.prototype.i=function(a,b){return h.isInteger(b)&&b>0?b:this.item.interval},c.prototype.nodes=function(a){var b=this,c=b.settings,d=b.item.select,e=b.item.highlight,f=b.item.view,g=b.item.disable;return h.node("ul",h.group({min:b.item.min.pick,max:b.item.max.pick,i:b.item.interval,node:"li",item:function(a){a=b.create(a);var i=a.pick,j=d&&d.pick==i,k=e&&e.pick==i,l=g&&b.disabled(a),m=h.trigger(b.formats.toString,b,[c.format,a]);return[h.trigger(b.formats.toString,b,[h.trigger(c.formatLabel,b,[a])||c.format,a]),function(a){return j&&a.push(c.klass.selected),k&&a.push(c.klass.highlighted),f&&f.pick==i&&a.push(c.klass.viewset),l&&a.push(c.klass.disabled),a.join(" ")}([c.klass.listItem]),"data-pick="+a.pick+" "+h.ariaAttr({role:"option",label:m,selected:!(!j||b.$node.val()!==m)||null,activedescendant:!!k||null,disabled:!!l||null})]}})+h.node("li",h.node("button",c.clear,c.klass.buttonClear,"type=button data-clear=1"+(a?"":" disabled")+" "+h.ariaAttr({controls:b.$node[0].id})),"",h.ariaAttr({role:"presentation"})),c.klass.list,h.ariaAttr({role:"listbox",controls:b.$node[0].id}))},c.defaults=function(a){return{clear:"Clear",format:"h:i A",interval:30,closeOnSelect:!0,closeOnClear:!0,updateInput:!0,klass:{picker:a+" "+a+"--time",holder:a+"__holder",list:a+"__list",listItem:a+"__list-item",disabled:a+"__list-item--disabled",selected:a+"__list-item--selected",highlighted:a+"__list-item--highlighted",viewset:a+"__list-item--viewset",now:a+"__list-item--now",buttonClear:a+"__button--clear"}}}(a.klasses().picker),a.extend("pickatime",c)});
/*!
* Date picker for pickadate.js v3.6.2
* Date picker for pickadate.js v3.6.3
* http://amsul.github.io/pickadate.js/date.htm

@@ -4,0 +4,0 @@ */

/*!
* pickadate.js v3.6.2, 2019/03/19
* pickadate.js v3.6.3, 2019/04/03
* By Amsul, http://amsul.ca

@@ -44,3 +44,4 @@ * Hosted on http://amsul.github.io/pickadate.js

STATE = {
id: ELEMENT.id || 'P' + Math.abs( ~~(Math.random() * new Date()) )
id: ELEMENT.id || 'P' + Math.abs( ~~(Math.random() * new Date()) ),
handlingOpen: false,
},

@@ -268,2 +269,13 @@

$document.on( 'click.' + STATE.id + ' focusin.' + STATE.id, function( event ) {
// If the picker is currently midway through processing
// the opening sequence of events then don't handle clicks
// on any part of the DOM. This is caused by a bug in Chrome 73
// where a click event is being generated with the incorrect
// path in it.
// In short, if someone does a click that finishes after the
// new element is created then the path contains only the
// parent element and not the input element itself.
if (STATE.handlingOpen) {
return;
}

@@ -638,2 +650,19 @@ var target = getRealEventTarget( event, ELEMENT )

// Mousedown handler to capture when the user starts interacting
// with the picker. This is used in working around a bug in Chrome 73.
.on('mousedown', function() {
STATE.handlingOpen = true;
var handler = function() {
// By default mouseup events are fired before a click event.
// By using a timeout we can force the mouseup to be handled
// after the corresponding click event is handled.
setTimeout(function() {
$(document).off('mouseup', handler);
STATE.handlingOpen = false;
}, 0);
};
$(document).on('mouseup', handler);
});
// Only bind keydown events if the element isn’t editable.

@@ -640,0 +669,0 @@ if ( !SETTINGS.editable ) {

/*!
* Time picker for pickadate.js v3.6.2
* Time picker for pickadate.js v3.6.3
* http://amsul.github.io/pickadate.js/time.htm

@@ -4,0 +4,0 @@ */

{
"name": "pickadate",
"version": "3.6.2",
"version": "3.6.3",
"title": "pickadate.js",

@@ -5,0 +5,0 @@ "description": "The mobile-friendly, responsive, and lightweight jQuery date & time input picker.",

@@ -460,7 +460,40 @@

asyncTest( 'Open with a slower click', function() {
// This test ensures that behaviour in chrome as described in PR 1145
// https://github.com/amsul/pickadate.js/pull/1145
// is handled correctly
var picker = this.picker
// The sequence of events fired by chrome are:
// - focus on the input
// - mousedown on the input
// - mouseup on the input
// - click on the common ancestor (in this case $DOM)
picker.$node.focus()
setTimeout(function () {
ok(picker.get('open') === true, 'Opened due to focus change')
picker.$node.trigger({
type: 'mousedown'
})
setTimeout(function () {
ok(picker.get('open') === true, 'Still open after mousedown')
// The mouseup and the click happen one after the other with no pause
picker.$node.trigger({
type: 'mouseup'
})
$DOM.trigger({
type: 'click'
})
setTimeout(function () {
ok(picker.get('open') === true, 'Still open after final click event')
QUnit.start();
}, 200)
}, 200)
}, 200)
})
module( 'Base keyboard events', {

@@ -467,0 +500,0 @@ setup: function() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc