UNPKG

@atlassian/aui

Version:

Atlassian User Interface library

1 lines 449 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("backbone"),require("jquery"),require("underscore")):"function"==typeof define&&define.amd?define("@atlassian/aui",["backbone","jquery","underscore"],t):"object"==typeof exports?exports["@atlassian/aui"]=t(require("backbone"),require("jquery"),require("underscore")):e.AJS=t(e.Backbone,e.jQuery,e._)}(window,(e,t,i)=>(()=>{var n={101(e,t,i){let n;n=i(195),e.exports=(()=>{var e={930(e){"use strict";e.exports=n}},t={};let i=function i(n){var s=t[n];if(void 0!==s)return s.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,i),a.exports}(930),s=/^.*[\\\/]/,a=/\{0\}/gi;function r(e,t){let n=i(e).data("FancyFileInput");if(n)return n;t=i.extend({},r.defaults,t),this.el=e,this.$el=i(e),this.$label=this.createLabel(t.buttonText),this._addLabelText(),this.$clearButton=i("<button>",{text:this.$label.attr("data-ffi-clearButtonText")||t.clearButtonText,class:"ffi-clear",type:"button",tabindex:"-1"}),this.multipleFileTextPattern=this.$label.attr("data-ffi-multipleFileTextPattern")||t.multipleFileTextPattern,this._eventNamespace=".ffi",this.CLASSES={disabled:"is-disabled",focused:"is-focused",active:"is-active",valid:"is-valid",invalid:"is-invalid"},this[this.isDisabled()?"disable":"enable"]()}return r.defaults={buttonText:"Browse…",clearButtonText:"Clear",multipleFileTextPattern:"{0} files"},r.prototype._addLabelText=function(){let e=i('label[for="'+this.el.id+'"]');e.length&&this.$el.attr("aria-label",e.text())},r.prototype.createLabel=function(e){let t=this.$el.parent(".ffi[data-ffi-button-text]");return t.length||(t=this.$el.wrap(i("<label>",{class:"ffi","data-ffi-button-text":e})).parent()),t},r.prototype.isDisabled=function(){return this.$el.is(":disabled")},r.prototype.formatMultipleFileText=function(e){return this.multipleFileTextPattern.replace(a,e)},r.prototype.bindEvents=function(){this.$el.on("invalid"+this._eventNamespace,this.checkValidity.bind(this)).on("change"+this._eventNamespace,this.change.bind(this)).on("keydown"+this._eventNamespace,this.keydown.bind(this)).on("mousedown"+this._eventNamespace,this.mousedown.bind(this)).on("mouseup"+this._eventNamespace,this.mouseup.bind(this)).on("focus"+this._eventNamespace,this.focus.bind(this)).on("blur"+this._eventNamespace,this.blur.bind(this)),this.$clearButton.on("click"+this._eventNamespace,this.clear.bind(this))},r.prototype.unbindEvents=function(){this.$el.off(this._eventNamespace),this.$clearButton.off(this._eventNamespace)},r.prototype.fireEvent=function(e){this.$el.trigger(e+this._eventNamespace)},r.prototype.enable=function(){this.bindEvents(),this.$el.prop("disabled",!1),this.$label.removeClass(this.CLASSES.disabled)},r.prototype.disable=function(){this.unbindEvents(),this.$el.prop("disabled",!0),this.$label.addClass(this.CLASSES.disabled)},r.prototype.clear=function(){return this.$el.wrap("<form>").closest("form").get(0).reset(),this.$el.unwrap(),this.el.value="",this.change(),!1},r.prototype.focus=function(){this.$label.addClass(this.CLASSES.focused)},r.prototype.blur=function(){this.$label.removeClass(this.CLASSES.focused)},r.prototype.mousedown=function(){this.$label.addClass(this.CLASSES.active)},r.prototype.mouseup=function(){this.$label.removeClass(this.CLASSES.active)},r.prototype.keydown=function(e){let t=e.which;(8===t||46===t)&&(this.clear(),e.preventDefault())},r.prototype.checkValidity=function(){if(!this.el.required)return;let e=this.$el.is(":invalid");this.$label.toggleClass(this.CLASSES.invalid,e).toggleClass(this.CLASSES.valid,!e)},r.prototype.change=function(){let e,t="";this.checkValidity(),(e=this.el.multiple&&this.el.files.length>1?this.formatMultipleFileText(this.el.files.length):this.el.value).length?(t=e.replace(s,""),this.$clearButton.appendTo(this.$label)):this.$clearButton.detach(),this.$el.focus(),this.setFieldText(t),this.fireEvent("value-changed")},r.prototype.setFieldText=function(e){let t="data-ffi-value";e.length?(this.$label.attr(t,e),this.fireEvent("value-added")):(this.$label.removeAttr(t),this.fireEvent("value-cleared"))},i.fn.fancyFileInput=function(e){return this.each(function(){let t=new r(this,e);i(this).data("FancyFileInput",t)})},{}})()},793(){console.debug("AUI import for WRM I18n not loaded")},603(){jQuery.fn.moveTo=function(e){var t,i=jQuery.extend({transition:!1,scrollOffset:35},e),n=this,s=n.offset().top;if((jQuery(window).scrollTop()+jQuery(window).height()-this.outerHeight()<s||jQuery(window).scrollTop()+i.scrollOffset>s)&&jQuery(window).height()>i.scrollOffset){if(t=jQuery(window).scrollTop()+i.scrollOffset>s?s-(jQuery(window).height()-this.outerHeight())+i.scrollOffset:s-i.scrollOffset,!jQuery.fn.moveTo.animating&&i.transition)return jQuery(document).trigger("moveToStarted",this),jQuery.fn.moveTo.animating=!0,jQuery("html,body").animate({scrollTop:t},1e3,function(){jQuery(document).trigger("moveToFinished",n),delete jQuery.fn.moveTo.animating}),this;var a=jQuery("html, body");return a.is(":animated")&&(a.stop(),delete jQuery.fn.moveTo.animating),jQuery(document).trigger("moveToStarted"),jQuery(window).scrollTop(t),setTimeout(function(){jQuery(document).trigger("moveToFinished",n)},100),this}return jQuery(document).trigger("moveToFinished",this),this}},745(e,t,i){var n,s,a;!function(r){"use strict";s=[i(195),i(309)],void 0===(a="function"==typeof(n=r)?n.apply(t,s):n)||(e.exports=a)}(function(e){return e.extend(e.expr.pseudos,{data:e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}})})})},891(e,t,i){var n,s,a;!function(r){"use strict";s=[i(195),i(309)],void 0===(a="function"==typeof(n=r)?n.apply(t,s):n)||(e.exports=a)}(function(e){return e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})},786(e,t,i){var n,s,a;!function(r){"use strict";s=[i(195),i(309)],void 0===(a="function"==typeof(n=r)?n.apply(t,s):n)||(e.exports=a)}(function(e){return e.ui.plugin={add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i,n){var s,a=e.plugins[t];if(a&&(n||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(s=0;s<a.length;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}}})},41(e,t,i){var n,s,a;!function(r){"use strict";s=[i(195),i(309)],void 0===(a="function"==typeof(n=r)?n.apply(t,s):n)||(e.exports=a)}(function(e){return e.fn.scrollParent=function(t){var i=this.css("position"),n="absolute"===i,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return(!n||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)}})},309(e,t,i){var n,s,a;!function(r){"use strict";s=[i(195)],void 0===(a="function"==typeof(n=r)?n.apply(t,s):n)||(e.exports=a)}(function(e){return e.ui=e.ui||{},e.ui.version="1.14.1"})},229(e,t,i){var n,s,a;!function(r){"use strict";s=[i(195),i(309)],void 0===(a="function"==typeof(n=r)?n.apply(t,s):n)||(e.exports=a)}(function(e){"use strict";var t,i=0,n=Array.prototype.hasOwnProperty,s=Array.prototype.slice;return t=e.cleanData,e.cleanData=function(i){var n,s,a;for(a=0;null!=(s=i[a]);a++)(n=e._data(s,"events"))&&n.remove&&e(s).triggerHandler("remove");t(i)},e.widget=function(t,i,n){var s,a,r,o={},l=t.split(".")[0];if("__proto__"===(t=t.split(".")[1])||"constructor"===t)return e.error("Invalid widget name: "+t);var c=l+"-"+t;return n||(n=i,i=e.Widget),Array.isArray(n)&&(n=e.extend.apply(null,[{}].concat(n))),e.expr.pseudos[c.toLowerCase()]=function(t){return!!e.data(t,c)},e[l]=e[l]||{},s=e[l][t],a=e[l][t]=function(e,t){if(!this||!this._createWidget)return new a(e,t);arguments.length&&this._createWidget(e,t)},e.extend(a,s,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),(r=new i).options=e.widget.extend({},r.options),e.each(n,function(e,t){if("function"!=typeof t){o[e]=t;return}o[e]=function(){function n(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,a=this._superApply;return this._super=n,this._superApply=s,e=t.apply(this,arguments),this._super=i,this._superApply=a,e}}()}),a.prototype=e.widget.extend(r,{widgetEventPrefix:s&&r.widgetEventPrefix||t},o,{constructor:a,namespace:l,widgetName:t,widgetFullName:c}),s?(e.each(s._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,a,i._proto)}),delete s._childConstructors):i._childConstructors.push(a),e.widget.bridge(t,a),a},e.widget.extend=function(t){for(var i,a,r=s.call(arguments,1),o=0,l=r.length;o<l;o++)for(i in r[o])a=r[o][i],n.call(r[o],i)&&void 0!==a&&(e.isPlainObject(a)?t[i]=e.isPlainObject(t[i])?e.widget.extend({},t[i],a):e.widget.extend({},a):t[i]=a);return t},e.widget.bridge=function(t,i){var n=i.prototype.widgetFullName||t;e.fn[t]=function(a){var r="string"==typeof a,o=s.call(arguments,1),l=this;return r?this.length||"instance"!==a?this.each(function(){var i,s=e.data(this,n);return"instance"===a?(l=s,!1):s?"function"!=typeof s[a]||"_"===a.charAt(0)?e.error("no such method '"+a+"' for "+t+" widget instance"):(i=s[a].apply(s,o))!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0:e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+a+"'")}):l=void 0:(o.length&&(a=e.widget.extend.apply(null,[a].concat(o))),this.each(function(){var t=e.data(this,n);t?(t.option(a||{}),t._init&&t._init()):e.data(this,n,new i(a,this))})),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,i){t._removeClass(i,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var n,s,a,r=t;if(0==arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(r={},t=(n=t.split(".")).shift(),n.length){for(a=0,s=r[t]=e.widget.extend({},this.options[t]);a<n.length-1;a++)s[n[a]]=s[n[a]]||{},s=s[n[a]];if(t=n.pop(),1==arguments.length)return void 0===s[t]?null:s[t];s[t]=i}else{if(1==arguments.length)return void 0===this.options[t]?null:this.options[t];r[t]=i}return this._setOptions(r),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var i,n,s;for(i in t)s=this.classesElementLookup[i],t[i]!==this.options.classes[i]&&s&&s.length&&(n=e(s.get()),this._removeClass(s,i),n.addClass(this._classes({element:n,keys:i,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){var i=[],n=this;function s(s,a){var r,o;for(o=0;o<s.length;o++)r=n.classesElementLookup[s[o]]||e(),t.add?(!function(){var i=[];t.element.each(function(t,s){e.map(n.classesElementLookup,function(e){return e}).some(function(e){return e.is(s)})||i.push(s)}),n._on(e(i),{remove:"_untrackClassesElement"})}(),r=e(e.uniqueSort(r.get().concat(t.element.get())))):r=e(r.not(t.element).get()),n.classesElementLookup[s[o]]=r,i.push(s[o]),a&&t.classes[s[o]]&&i.push(t.classes[s[o]])}return(t=e.extend({element:this.element,classes:this.options.classes||{}},t)).keys&&s(t.keys.match(/\S+/g)||[],!0),t.extra&&s(t.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(t){var i=this;e.each(i.classesElementLookup,function(n,s){-1!==e.inArray(t.target,s)&&(i.classesElementLookup[n]=e(s.not(t.target).get()))}),this._off(e(t.target))},_removeClass:function(e,t,i){return this._toggleClass(e,t,i,!1)},_addClass:function(e,t,i){return this._toggleClass(e,t,i,!0)},_toggleClass:function(e,t,i,n){n="boolean"==typeof n?n:i;var s="string"==typeof e||null===e,a={extra:s?t:i,keys:s?e:t,element:s?this.element:e,add:n};return a.element.toggleClass(this._classes(a),n),this},_on:function(t,i,n){var s,a=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=s=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),e.each(n,function(n,r){function o(){if(!(!t&&(!0===a.options.disabled||e(this).hasClass("ui-state-disabled"))))return("string"==typeof r?a[r]:r).apply(a,arguments)}"string"!=typeof r&&(o.guid=r.guid=r.guid||o.guid||e.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?s.on(c,u,o):i.on(c,o)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){var i=this;return setTimeout(function(){return("string"==typeof e?i[e]:e).apply(i,arguments)},t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,i,n){var s,a,r=this.options[t];if(n=n||{},(i=e.Event(i)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(s in a)s in i||(i[s]=a[s]);return this.element.trigger(i,n),!("function"==typeof r&&!1===r.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,s,a){"string"==typeof s&&(s={effect:s});var r,o=s?!0===s||"number"==typeof s?i:s.effect||i:t;"number"==typeof(s=s||{})?s={duration:s}:!0===s&&(s={}),r=!e.isEmptyObject(s),s.complete=a,s.delay&&n.delay(s.delay),r&&e.effects&&e.effects.effect[o]?n[t](s):o!==t&&n[o]?n[o](s.duration,s.easing,a):n.queue(function(i){e(this)[t](),a&&a.call(n[0]),i()})}}),e.widget})},253(e,t,i){var n,s,a;!function(r){"use strict";s=[i(195),i(309),i(891)],void 0===(a="function"==typeof(n=r)?n.apply(t,s):n)||(e.exports=a)}(function(e){"use strict";var t;function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=n(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",i,function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,s)}function s(){e.datepicker._isDisabledDatepicker(t.inline?t.dpDiv.parent()[0]:t.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function a(t,i){for(var n in e.extend(t,i),i)null==i[n]&&(t[n]=i[n]);return t}return e.extend(e.ui,{datepicker:{version:"1.14.1"}}),e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return a(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var n,s,a;s="div"===(n=t.nodeName.toLowerCase())||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),(a=this._newInst(e(t),s)).settings=e.extend({},i||{}),"input"===n?this._connectDatepicker(t,a):s&&this._inlineDatepicker(t,a)},_newInst:function(t,i){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),!n.hasClass(this.markerClassName)&&(this._attachments(n,i),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var n,s,a,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span>").addClass(this._appendClass).text(r),t[o?"before":"after"](i.append)),t.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),("focus"===(n=this._get(i,"showOn"))||"both"===n)&&t.on("focus",this._showDatepicker),("button"===n||"both"===n)&&(s=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),this._get(i,"buttonImageOnly")?i.trigger=e("<img>").addClass(this._triggerClass).attr({src:a,alt:s,title:s}):(i.trigger=e("<button type='button'>").addClass(this._triggerClass),a?i.trigger.html(e("<img>").attr({src:a,alt:s,title:s})):i.trigger.text(s)),t[o?"before":"after"](i.trigger),i.trigger.on("click",function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():(e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]&&e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,s,a=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(s=0,i=0,n=0;s<e.length;s++)e[s].length>i&&(i=e[s].length,n=s);return n},a.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,n,s,r){var o,l,c,u,h,p=this._dialogInst;return p||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),e("body").append(this._dialogInput),(p=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},e.data(this._dialogInput[0],"datepicker",p)),a(p.settings,s||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+h]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",p),this},_destroyDatepicker:function(i){var n,s=e(i),a=e.data(i,"datepicker");s.hasClass(this.markerClassName)&&(n=i.nodeName.toLowerCase(),e.removeData(i,"datepicker"),"input"===n?(a.append.remove(),a.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===n||"span"===n)&&s.removeClass(this.markerClassName).empty(),e.datepicker._hideDatepicker(),t===a&&(t=null,this._curInst=null))},_enableDatepicker:function(t){var i,n,s=e(t),a=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&("input"===(i=t.nodeName.toLowerCase())?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&((n=s.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,s=e(t),a=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&("input"===(i=t.nodeName.toLowerCase())?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&((n=s.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,n){var s,r,o,l,c=this._getInst(t);if(2==arguments.length&&"string"==typeof i)return"defaults"===i?e.extend({},e.datepicker._defaults):c?"all"===i?e.extend({},c.settings):this._get(c,i):null;s=i||{},"string"==typeof i&&((s={})[i]=n),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),a(c.settings,s),null!==o&&void 0!==s.dateFormat&&void 0===s.minDate&&(c.settings.minDate=this._formatDate(c,o)),null!==l&&void 0!==s.dateFormat&&void 0===s.maxDate&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,n,s,a=e.datepicker._getInst(t.target),r=!0,o=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return(s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv))[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,s[0]),(i=e.datepicker._get(a,"onSelect"))?(n=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[n,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,n,s=e.datepicker._getInst(t.target);if(e.datepicker._get(s,"constrainInput"))return i=e.datepicker._possibleChars(e.datepicker._get(s,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||n<" "||!i||i.indexOf(n)>-1},_doKeyUp:function(t){var i=e.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{e.datepicker.parseDate(e.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,e.datepicker._getFormatConfig(i))&&(e.datepicker._setDateFromField(i),e.datepicker._updateAlternate(i),e.datepicker._updateDatepicker(i))}catch(e){}return!0},_showDatepicker:function(t){var i,n,s,r,o,l,c;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),e.datepicker._isDisabledDatepicker(t)||e.datepicker._lastInput===t||(i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),!1!==(s=(n=e.datepicker._get(i,"beforeShow"))?n.apply(t,[t,i]):{})&&(a(i.settings,s),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return!(r|="fixed"===e(this).css("position"))}),o={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),o=e.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",function(e){for(var t,i;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&!isNaN(i=parseInt(e.css("zIndex"),10))&&0!==i)return i;e=e.parent()}return 0}(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),c):i.dpDiv[l||"show"](l?c:null),e.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),e.datepicker._curInst=i)))},_updateDatepicker:function(i){this.maxRows=4,t=i,i.dpDiv.empty().append(this._generateHTML(i)),this._attachHandlers(i);var n,a=this._getNumberOfMonths(i),r=a[1],o=i.dpDiv.find("."+this._dayOverClass+" a"),l=e.datepicker._get(i,"onUpdateDatepicker");o.length>0&&s.apply(o.get(0)),i.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),r>1&&i.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",17*r+"em"),i.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),i.dpDiv[(this._get(i,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),i===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),i.yearshtml&&(n=i.yearshtml,setTimeout(function(){n===i.yearshtml&&i.yearshtml&&i.dpDiv.find("select.ui-datepicker-year").first().replaceWith(i.yearshtml),n=i.yearshtml=null},0)),l&&l.apply(i.input?i.input[0]:null,[i])},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")},_checkOffset:function(t,i,n){var s=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+a>c&&c>a?Math.abs(a+o):0),i},_findPos:function(t){for(var i,n=this._getInst(t),s=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.pseudos.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return[(i=e(t).offset()).left,i.top]},_hideDatepicker:function(t){var i,n,s,a,r=this._curInst;r&&(!t||r===e.data(t,"datepicker"))&&this._datepickerShowing&&(i=this._get(r,"showAnim"),n=this._get(r,"duration"),s=function(){e.datepicker._tidyDialog(r)},e.effects&&e.effects.effect[i]?r.dpDiv.hide(i,e.datepicker._get(r,"showOptions"),n,s):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,(a=this._get(r,"onClose"))&&a.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&!(e.datepicker._inDialog&&e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==n)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var s=e(t),a=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(a,i,n),this._updateDatepicker(a))},_gotoToday:function(t){var i,n=e(t),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(s.selectedDay=(i=new Date).getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var s=e(t),a=this._getInst(s[0]);a["selected"+("M"===n?"Month":"Year")]=a["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(s)},_selectDay:function(t,i,n,s){var a,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||((a=this._getInst(r[0])).selectedDay=a.currentDay=parseInt(e("a",s).attr("data-date")),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=n,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var n,s=e(t),a=this._getInst(s[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),(n=this._get(a,"onSelect"))?n.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var i,n,s,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),s=this.formatDate(i,n,this._getFormatConfig(t)),e(document).find(a).val(s))},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,n){if(null==t||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?i.toString():i+""))return null;var s,a,r,o,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:new Date().getFullYear()%100+parseInt(c,10),h=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,g=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,v=-1,b=-1,y=-1,w=!1,_=function(e){var i=s+1<t.length&&t.charAt(s+1)===e;return i&&s++,i},x=function(e){var t=_(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=RegExp("^\\d{"+("y"===e?n:1)+","+n+"}"),a=i.substring(l).match(s);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},C=function(t,n,s){var a=-1,r=e.map(_(t)?s:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(r,function(e,t){var n=t[1];if(i.substr(l,n.length).toLowerCase()===n.toLowerCase())return a=t[0],l+=n.length,!1}),-1!==a)return a+1;throw"Unknown name at position "+l},T=function(){if(i.charAt(l)!==t.charAt(s))throw"Unexpected literal at position "+l;l++};for(s=0;s<t.length;s++)if(w)"'"!==t.charAt(s)||_("'")?T():w=!1;else switch(t.charAt(s)){case"d":b=x("d");break;case"D":C("D",h,p);break;case"o":y=x("o");break;case"m":v=x("m");break;case"M":v=C("M",f,g);break;case"y":m=x("y");break;case"@":m=(o=new Date(x("@"))).getFullYear(),v=o.getMonth()+1,b=o.getDate();break;case"!":m=(o=new Date((x("!")-this._ticksTo1970)/1e4)).getFullYear(),v=o.getMonth()+1,b=o.getDate();break;case"'":_("'")?T():w=!0;break;default:T()}if(l<i.length&&(r=i.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=new Date().getFullYear():m<100&&(m+=new Date().getFullYear()-new Date().getFullYear()%100+(m<=u?0:-100)),y>-1)for(v=1,b=y;!(b<=(a=this._getDaysInMonth(m,v-1)));)v++,b-=a;if((o=this._daylightSavingAdjust(new Date(m,v-1,b))).getFullYear()!==m||o.getMonth()+1!==v||o.getDate()!==b)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*864e9,formatDate:function(e,t,i){if(!t)return"";var n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},c=function(e,t,i){var n=""+t;if(l(e))for(;n.length<i;)n="0"+n;return n},u=function(e,t,i,n){return l(e)?n[t]:i[t]},h="",p=!1;if(t)for(n=0;n<e.length;n++)if(p)"'"!==e.charAt(n)||l("'")?h+=e.charAt(n):p=!1;else switch(e.charAt(n)){case"d":h+=c("d",t.getDate(),2);break;case"D":h+=u("D",t.getDay(),s,a);break;case"o":h+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=c("m",t.getMonth()+1,2);break;case"M":h+=u("M",t.getMonth(),r,o);break;case"y":h+=l("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":h+=t.getTime();break;case"!":h+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":p=!0;break;default:h+=e.charAt(n)}return h},_possibleChars:function(e){var t,i="",n=!1,s=function(i){var n=t+1<e.length&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;t<e.length;t++)if(n)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),a=s,r=this._getFormatConfig(e);try{a=this.parseDate(i,n,r)||s}catch(e){n=t?"":n}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=n?a.getDate():0,e.currentMonth=n?a.getMonth():0,e.currentYear=n?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,n){var s,a=null==i||""===i?n:"string"==typeof i?function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(e){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,s=n.getFullYear(),a=n.getMonth(),r=n.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=o.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(s,a));break;case"y":case"Y":s+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(s,a))}l=o.exec(i)}return new Date(s,a,r)}(i):"number"==typeof i?isNaN(i)?n:((s=new Date).setDate(s.getDate()+i),s):new Date(i.getTime());return(a=a&&"Invalid Date"===a.toString()?n:a)&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,s=e.selectedMonth,a=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){e(this).on(this.getAttribute("data-event"),{prev:function(){e.datepicker._adjustDate(n,-i,"M")},next:function(){e.datepicker._adjustDate(n,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}}[this.getAttribute("data-handler")])})},_generateHTML:function(t){var i,n,s,a,r,o,l,c,u,h,p,f,g,m,v,b,y,w,_,x,C,T,k,E,A,D,S,I,M,N,O,L,P,R,$,j,z,H,F,U=new Date,B=this._daylightSavingAdjust(new Date(U.getFullYear(),U.getMonth(),U.getDate())),W=this._get(t,"isRTL"),V=this._get(t,"showButtonPanel"),Y=this._get(t,"hideIfNoPrevNext"),q=this._get(t,"navigationAsDateFormat"),K=this._getNumberOfMonths(t),Q=this._get(t,"showCurrentAtPos"),G=this._get(t,"stepMonths"),J=1!==K[0]||1!==K[1],Z=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(t,"min"),ee=this._getMinMaxDate(t,"max"),et=t.drawMonth-Q,ei=t.drawYear;if(et<0&&(et+=12,ei--),ee)for(i=this._daylightSavingAdjust(new Date(ee.getFullYear(),ee.getMonth()-K[0]*K[1]+1,ee.getDate())),i=X&&i<X?X:i;this._daylightSavingAdjust(new Date(ei,et,1))>i;)--et<0&&(et=11,ei--);for(t.drawMonth=et,t.drawYear=ei,n=this._get(t,"prevText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(ei,et-G,1)),this._getFormatConfig(t)):n,s=this._canAdjustMonth(t,-1,ei,et)?e("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:n}).append(e("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(W?"e":"w")).text(n))[0].outerHTML:Y?"":e("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:n}).append(e("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(W?"e":"w")).text(n))[0].outerHTML,a=this._get(t,"nextText"),a=q?this.formatDate(a,this._daylightSavingAdjust(new Date(ei,et+G,1)),this._getFormatConfig(t)):a,r=this._canAdjustMonth(t,1,ei,et)?e("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:a}).append(e("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(W?"w":"e")).text(a))[0].outerHTML:Y?"":e("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:a}).append(e("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(W?"w":"e")).text(a))[0].outerHTML,o=this._get(t,"currentText"),l=this._get(t,"gotoCurrent")&&t.currentDay?Z:B,o=q?this.formatDate(o,l,this._getFormatConfig(t)):o,c="",t.inline||(c=e("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),u="",V&&(u=e("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(W?c:"").append(this._isInRange(t,l)?e("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(o):"").append(W?"":c)[0].outerHTML),h=isNaN(h=parseInt(this._get(t,"firstDay"),10))?0:h,p=this._get(t,"showWeek"),f=this._get(t,"dayNames"),g=this._get(t,"dayNamesMin"),m=this._get(t,"monthNames"),v=this._get(t,"monthNamesShort"),b=this._get(t,"beforeShowDay"),y=this._get(t,"showOtherMonths"),w=this._get(t,"selectOtherMonths"),_=this._getDefaultDate(t),x="",T=0;T<K[0];T++){for(E=0,k="",this.maxRows=4;E<K[1];E++){if(A=this._daylightSavingAdjust(new Date(ei,et,t.selectedDay)),D=" ui-corner-all",S="",J){if(S+="<div class='ui-datepicker-group",K[1]>1)switch(E){case 0:S+=" ui-datepicker-group-first",D=" ui-corner-"+(W?"right":"left");break;case K[1]-1:S+=" ui-datepicker-group-last",D=" ui-corner-"+(W?"left":"right");break;default:S+=" ui-datepicker-group-middle",D=""}S+="'>"}for(S+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+D+"'>"+(/all|left/.test(D)&&0===T?W?r:s:"")+(/all|right/.test(D)&&0===T?W?s:r:"")+this._generateMonthYearHeader(t,et,ei,X,ee,T>0||E>0,m,v)+"</div><table class='ui-datepicker-calendar'><thead><tr>",I=p?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",C=0;C<7;C++)M=(C+h)%7,I+="<th scope='col'"+((C+h+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+f[M]+"'>"+g[M]+"</span></th>";for(S+=I+"</tr></thead><tbody>",N=this._getDaysInMonth(ei,et),ei===t.selectedYear&&et===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,N)),L=Math.ceil(((O=(this._getFirstDayOfMonth(ei,et)-h+7)%7)+N)/7),P=J&&this.maxRows>L?this.maxRows:L,this.maxRows=P,R=this._daylightSavingAdjust(new Date(ei,et,1-O)),$=0;$<P;$++){for(S+="<tr>",j=p?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(R)+"</td>":"",C=0;C<7;C++)z=b?b.apply(t.input?t.input[0]:null,[R]):[!0,""],F=(H=R.getMonth()!==et)&&!w||!z[0]||X&&R<X||ee&&R>ee,j+="<td class='"+((C+h+6)%7>=5?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(R.getTime()===A.getTime()&&et===t.selectedMonth&&t._keyEvent||_.getTime()===R.getTime()&&_.getTime()===A.getTime()?" "+this._dayOverClass:"")+(F?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!y?"":" "+z[1]+(R.getTime()===Z.getTime()?" "+this._currentClass:"")+(R.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+((!H||y)&&z[2]?" title='"+z[2].replace(/'/g,"&#39;")+"'":"")+(F?"":" data-handler='selectDay' data-event='click' data-month='"+R.getMonth()+"' data-year='"+R.getFullYear()+"'")+">"+(H&&!y?"&#xa0;":F?"<span class='ui-state-default'>"+R.getDate()+"</span>":"<a class='ui-state-default"+(R.getTime()===B.getTime()?" ui-state-highlight":"")+(R.getTime()===Z.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#' aria-current='"+(R.getTime()===Z.getTime()?"true":"false")+"' data-date='"+R.getDate()+"'>"+R.getDate()+"</a>")+"</td>",R.setDate(R.getDate()+1),R=this._daylightSavingAdjust(R);S+=j+"</tr>"}++et>11&&(et=0,ei++),S+="</tbody></table>"+(J?"</div>"+(K[0]>0&&E===K[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=S}x+=k}return x+=u,t._keyEvent=!1,x},_generateMonthYearHeader:function(e,t,i,n,s,a,r,o){var l,c,u,h,p,f,g,m,v=this._get(e,"changeMonth"),b=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),w=this._get(e,"selectMonthLabel"),_=this._get(e,"selectYearLabel"),x="<div class='ui-datepicker-title'>",C="";if(a||!v)C+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(l=n&&n.getFullYear()===i,c=s&&s.getFullYear()===i,C+="<select class='ui-datepicker-month' aria-label='"+w+"' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!l||u>=n.getMonth())&&(!c||u<=s.getMonth())&&(C+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+o[u]+"</option>");C+="</select>"}if(y||(x+=C+(a||!(v&&b)?"&#xa0;":"")),!e.yearshtml)if(e.yearshtml="",a||!b)x+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(e,"yearRange").split(":"),p=new Date().getFullYear(),m=Math.max(g=(f=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?p+parseInt(e,10):parseInt(e,10);return isNaN(t)?p:t})(h[0]),f(h[1]||"")),g=n?Math.max(g,n.getFullYear()):g,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' aria-label='"+_+"' data-handler='selectYear' data-event='change'>";g<=m;g++)e.yearshtml+="<option value='"+g+"'"+(g===i?" selected='selected'":"")+">"+g+"</option>";e.yearshtml+="</select>",x+=e.yearshtml,e.yearshtml=null}return x+=this._get(e,"yearSuffix"),y&&(x+=(a||!(v&&b)?"&#xa0;":"")+C),x+="</div>"},_adjustInstDate:function(e,t,i){var n=e.selectedYear+("Y"===i?t:0),s=e.selectedMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(n,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,s,a)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),s=i&&t<i?i:t;return n&&s>n?n:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,