* Add feed widget * add feed render * Add CommentPage widget * New theme (#1390) * 调整忽略目录 * add theme * fix theme scss build Co-authored-by: fen <f3nb0x@gmail.com> * s/is_writeable/is_writable/g * New upgrade method * merge new fixes from master * add pgsql ssl mode support (ref #1600) (#1623) * Feat/code refactor (#1626) * remove all magic methods, add type for class properties * refactor codes * fix all * refactor code * fix type * fix all * fix request is method * fix all * fix router * fix get page * fix 1.3.0 upgrade * [feat] support high resolution avatar * fix types in i18n component * Implement Ctrl+S or Command+S for save draft (#1628) * Implement Ctrl+S or Command+S for save draft * rename * add Typecho.savePost * fix upload file size * add new uploader * replace new uploader * fix textarea change * fix preview * refactor post edit * fix issue * fix page edit --------- Co-authored-by: joyqi <joyqi@segmentfault.com> Co-authored-by: joyqi <magike.net@gmail.com> * fix #1632 * Add svg to image types * Feat/tree pages (#1646) * add tree trait * finish category tree trait * support select fields * fix select fields * refactor admin trait * fix draft status * Add new contents type "revision" * minor refactor * add more tree view abstracts * add tree trait to pages * get ready for tree view pages * improve page edit * fix revision * fix slug * add router params delegate * fix params delegate * fix * fix * fix all * fix all * fix tree * fix page link * fix feed * fix page * fix permalink * fix permalink input * fix offset query * Support IDN (#1629) * Support IDN * use js * Optimize code * Optimize code * fix URL script * remove unnecessary use --------- Co-authored-by: joyqi <joyqi@segmentfault.com> * fix input element * fix #1651, close #1653 * Use json instead of serialize (#1624) * Use json instead of serialize * Fix Upgrade code * add tree trait * finish category tree trait * support select fields * fix select fields * refactor admin trait * fix draft status * Add new contents type "revision" * minor refactor * add more tree view abstracts * add tree trait to pages * get ready for tree view pages * improve page edit * fix revision * fix slug * add router params delegate * fix params delegate * fix * fix * fix all * fix all * fix tree * fix page link * fix feed * fix page * fix permalink * fix permalink input * fix offset query * Fix typo * remove proxy methods * remove unnecessary useage --------- Co-authored-by: joyqi <joyqi@segmentfault.com> Co-authored-by: joyqi <magike.net@gmail.com> * Fix Prevent XSS vulnerability in default theme (#1654) * Fix Prevent XSS vulnerability in default theme * Update var/Typecho/Db/Adapter/Pdo.php * fix the getter --------- Co-authored-by: joyqi <joyqi@segmentfault.com> * add throwCallback to widget response * fix: cut down fields when selecting recent posts * fix typo errors * fix typo errors * fix http client cookie * add throw finish * fix theme lang * fix default theme * fix query * add open graph and twitter card support add canonical link * fix canonical link meta * fix theme classic-22 * remove unnecessary scss file when packaging * init plugin signal * improve: remove feather-icon js file * fix: typo * improve: post detail layout * fix tags saving * improve: nav search * fix: theme screenshot * fix: theme page layout * remove php 7.2/7.3 env --------- Co-authored-by: fen <f3nb0x@gmail.com> Co-authored-by: Lu Fei <52o@qq52o.cn>
1 line
70 KiB
JavaScript
1 line
70 KiB
JavaScript
!function(o,u){var e,t,i=0,a=/^ui-id-\d+$/;function s(e,t){var i,a,s,n=e.nodeName.toLowerCase();return"area"===n?(a=(i=e.parentNode).name,!(!e.href||!a||"map"!==i.nodeName.toLowerCase()||!(s=o("img[usemap=#"+a+"]")[0]))&&r(s)):(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n&&e.href||t)&&r(e)}function r(e){return o.expr.filters.visible(e)&&!o(e).parents().addBack().filter(function(){return"hidden"===o.css(this,"visibility")}).length}o.ui=o.ui||{},o.extend(o.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),o.fn.extend({focus:(e=o.fn.focus,function(t,i){return"number"==typeof t?this.each(function(){var e=this;setTimeout(function(){o(e).focus(),i&&i.call(e)},t)}):e.apply(this,arguments)}),scrollParent:function(){var e=(o.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(o.css(this,"position"))&&/(auto|scroll)/.test(o.css(this,"overflow")+o.css(this,"overflow-y")+o.css(this,"overflow-x"))}):this.parents().filter(function(){return/(auto|scroll)/.test(o.css(this,"overflow")+o.css(this,"overflow-y")+o.css(this,"overflow-x"))})).eq(0);return/fixed/.test(this.css("position"))||!e.length?o(document):e},zIndex:function(e){if(e!==u)return this.css("zIndex",e);if(this.length)for(var t,i=o(this[0]);i.length&&i[0]!==document;){if(("absolute"===(t=i.css("position"))||"relative"===t||"fixed"===t)&&(t=parseInt(i.css("zIndex"),10),!isNaN(t))&&0!==t)return t;i=i.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++i)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&o(this).removeAttr("id")})}}),o.extend(o.expr[":"],{data:o.expr.createPseudo?o.expr.createPseudo(function(t){return function(e){return!!o.data(e,t)}}):function(e,t,i){return!!o.data(e,i[3])},focusable:function(e){return s(e,!isNaN(o.attr(e,"tabindex")))},tabbable:function(e){var t=o.attr(e,"tabindex"),i=isNaN(t);return(i||0<=t)&&s(e,!i)}}),o("<a>").outerWidth(1).jquery||o.each(["Width","Height"],function(e,i){var s="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),n={innerWidth:o.fn.innerWidth,innerHeight:o.fn.innerHeight,outerWidth:o.fn.outerWidth,outerHeight:o.fn.outerHeight};function r(e,t,i,a){return o.each(s,function(){t-=parseFloat(o.css(e,"padding"+this))||0,i&&(t-=parseFloat(o.css(e,"border"+this+"Width"))||0),a&&(t-=parseFloat(o.css(e,"margin"+this))||0)}),t}o.fn["inner"+i]=function(e){return e===u?n["inner"+i].call(this):this.each(function(){o(this).css(a,r(this,e)+"px")})},o.fn["outer"+i]=function(e,t){return"number"!=typeof e?n["outer"+i].call(this,e):this.each(function(){o(this).css(a,r(this,e,!0,t)+"px")})}}),o.fn.addBack||(o.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),o("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(o.fn.removeData=(t=o.fn.removeData,function(e){return arguments.length?t.call(this,o.camelCase(e)):t.call(this)})),o.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),o.support.selectstart="onselectstart"in document.createElement("div"),o.fn.extend({disableSelection:function(){return this.bind((o.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),o.extend(o.ui,{plugin:{add:function(e,t,i){var a,s=o.ui[e].prototype;for(a in i)s.plugins[a]=s.plugins[a]||[],s.plugins[a].push([t,i[a]])},call:function(e,t,i){var a,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(a=0;a<s.length;a++)e.options[s[a][0]]&&s[a][1].apply(e.element,i)}},hasScroll:function(e,t){var i;return"hidden"!==o(e).css("overflow")&&(i=!1,0<e[t=t&&"left"===t?"scrollLeft":"scrollTop"]||(e[t]=1,i=0<e[t],e[t]=0,i))}})}(jQuery),function(l,o){var i=0,u=Array.prototype.slice,a=l.cleanData;l.cleanData=function(e){for(var t,i=0;null!=(t=e[i]);i++)try{l(t).triggerHandler("remove")}catch(e){}a(e)},l.widget=function(e,i,t){var a,s,n,r,o={},u=e.split(".")[0];e=e.split(".")[1],a=u+"-"+e,t||(t=i,i=l.Widget),l.expr[":"][a.toLowerCase()]=function(e){return!!l.data(e,a)},l[u]=l[u]||{},s=l[u][e],n=l[u][e]=function(e,t){if(!this._createWidget)return new n(e,t);arguments.length&&this._createWidget(e,t)},l.extend(n,s,{version:t.version,_proto:l.extend({},t),_childConstructors:[]}),(r=new i).options=l.widget.extend({},r.options),l.each(t,function(t,a){function s(){return i.prototype[t].apply(this,arguments)}function n(e){return i.prototype[t].apply(this,e)}l.isFunction(a)?o[t]=function(){var e,t=this._super,i=this._superApply;return this._super=s,this._superApply=n,e=a.apply(this,arguments),this._super=t,this._superApply=i,e}:o[t]=a}),n.prototype=l.widget.extend(r,{widgetEventPrefix:s?r.widgetEventPrefix:e},o,{constructor:n,namespace:u,widgetName:e,widgetFullName:a}),s?(l.each(s._childConstructors,function(e,t){var i=t.prototype;l.widget(i.namespace+"."+i.widgetName,n,t._proto)}),delete s._childConstructors):i._childConstructors.push(n),l.widget.bridge(e,n)},l.widget.extend=function(e){for(var t,i,a=u.call(arguments,1),s=0,n=a.length;s<n;s++)for(t in a[s])i=a[s][t],a[s].hasOwnProperty(t)&&i!==o&&(l.isPlainObject(i)?e[t]=l.isPlainObject(e[t])?l.widget.extend({},e[t],i):l.widget.extend({},i):e[t]=i);return e},l.widget.bridge=function(n,t){var r=t.prototype.widgetFullName||n;l.fn[n]=function(i){var e="string"==typeof i,a=u.call(arguments,1),s=this;return i=!e&&a.length?l.widget.extend.apply(null,[i].concat(a)):i,e?this.each(function(){var e,t=l.data(this,r);return t?l.isFunction(t[i])&&"_"!==i.charAt(0)?(e=t[i].apply(t,a))!==t&&e!==o?(s=e&&e.jquery?s.pushStack(e.get()):e,!1):void 0:l.error("no such method '"+i+"' for "+n+" widget instance"):l.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+i+"'")}):this.each(function(){var e=l.data(this,r);e?e.option(i||{})._init():l.data(this,r,new t(i,this))}),s}},l.Widget=function(){},l.Widget._childConstructors=[],l.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,t){t=l(t||this.defaultElement||this)[0],this.element=l(t),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=l.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=l(),this.hoverable=l(),this.focusable=l(),t!==this&&(l.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=l(t.style?t.ownerDocument:t.document||t),this.window=l(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:l.noop,_getCreateEventData:l.noop,_create:l.noop,_init:l.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(l.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:l.noop,widget:function(){return this.element},option:function(e,t){var i,a,s,n=e;if(0===arguments.length)return l.widget.extend({},this.options);if("string"==typeof e)if(n={},e=(i=e.split(".")).shift(),i.length){for(a=n[e]=l.widget.extend({},this.options[e]),s=0;s<i.length-1;s++)a[i[s]]=a[i[s]]||{},a=a[i[s]];if(e=i.pop(),t===o)return a[e]===o?null:a[e];a[e]=t}else{if(t===o)return this.options[e]===o?null:this.options[e];n[e]=t}return this._setOptions(n),this},_setOptions:function(e){for(var t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(s,n,e){var r,o=this;"boolean"!=typeof s&&(e=n,n=s,s=!1),e?(n=r=l(n),this.bindings=this.bindings.add(n)):(e=n,n=this.element,r=this.widget()),l.each(e,function(e,t){function i(){if(s||!0!==o.options.disabled&&!l(this).hasClass("ui-state-disabled"))return("string"==typeof t?o[t]:t).apply(o,arguments)}"string"!=typeof t&&(i.guid=t.guid=t.guid||i.guid||l.guid++);var e=e.match(/^(\w+)\s*(.*)$/),a=e[1]+o.eventNamespace,e=e[2];e?r.delegate(e,a,i):n.bind(a,i)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){var i=this;return setTimeout(function(){return("string"==typeof e?i[e]:e).apply(i,arguments)},t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){l(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){l(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){l(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){l(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,t,i){var a,s,n=this.options[e];if(i=i||{},(t=l.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],s=t.originalEvent)for(a in s)a in t||(t[a]=s[a]);return this.element.trigger(t,i),!(l.isFunction(n)&&!1===n.apply(this.element[0],[t].concat(i))||t.isDefaultPrevented())}},l.each({show:"fadeIn",hide:"fadeOut"},function(n,r){l.Widget.prototype["_"+n]=function(t,e,i){var a=(e="string"==typeof e?{effect:e}:e)?!0!==e&&"number"!=typeof e&&e.effect||r:n,s=!l.isEmptyObject(e="number"==typeof(e=e||{})?{duration:e}:e);e.complete=i,e.delay&&t.delay(e.delay),s&&l.effects&&l.effects.effect[a]?t[n](e):a!==n&&t[a]?t[a](e.duration,e.easing,i):t.queue(function(e){l(this)[n](),i&&i.call(t[0]),e()})}})}(jQuery),function(s){var n=!1;s(document).mouseup(function(){n=!1}),s.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(!0===s.data(e.target,t.widgetName+".preventClickEvent"))return s.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&s(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){var t,i,a;if(!n)return this._mouseStarted&&this._mouseUp(e),i=1===(this._mouseDownEvent=e).which,a=!("string"!=typeof(t=this).options.cancel||!e.target.nodeName)&&s(e.target).closest(this.options.cancel).length,i&&!a&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?e.preventDefault():(!0===s.data(e.target,this.widgetName+".preventClickEvent")&&s.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},s(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0)),!0},_mouseMove:function(e){return s.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return s(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&s.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(D,u){D.extend(D.ui,{datepicker:{version:"1.10.3"}});var s,o="datepicker";function e(){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:""},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,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},D.extend(this._defaults,this.regional[""]),this.dpDiv=i(D("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function i(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){D(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&D(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&D(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",function(){D.datepicker._isDisabledDatepicker((s.inline?e.parent():s.input)[0])||(D(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),D(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&D(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&D(this).addClass("ui-datepicker-next-hover"))})}function l(e,t){for(var i in D.extend(e,t),t)null==t[i]&&(e[i]=t[i])}D.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return l(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var i,a=e.nodeName.toLowerCase(),s="div"===a||"span"===a;e.id||(this.uuid+=1,e.id="dp"+this.uuid),(i=this._newInst(D(e),s)).settings=D.extend({},t||{}),"input"===a?this._connectDatepicker(e,i):s&&this._inlineDatepicker(e,i)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?i(D("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var i=D(e);t.append=D([]),t.trigger=D([]),i.hasClass(this.markerClassName)||(this._attachments(i,t),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(t),D.data(e,o,t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var i,a=this._get(t,"appendText"),s=this._get(t,"isRTL");t.append&&t.append.remove(),a&&(t.append=D("<span class='"+this._appendClass+"'>"+a+"</span>"),e[s?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(a=this._get(t,"showOn"))&&"both"!==a||e.focus(this._showDatepicker),"button"!==a&&"both"!==a||(a=this._get(t,"buttonText"),i=this._get(t,"buttonImage"),t.trigger=D(this._get(t,"buttonImageOnly")?D("<img/>").addClass(this._triggerClass).attr({src:i,alt:a,title:a}):D("<button type='button'></button>").addClass(this._triggerClass).html(i?D("<img/>").attr({src:i,alt:a,title:a}):a)),e[s?"before":"after"](t.trigger),t.trigger.click(function(){return D.datepicker._datepickerShowing&&D.datepicker._lastInput===e[0]?D.datepicker._hideDatepicker():(D.datepicker._datepickerShowing&&D.datepicker._lastInput!==e[0]&&D.datepicker._hideDatepicker(),D.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){var t,i,a,s,n,r;this._get(e,"autoSize")&&!e.inline&&(n=new Date(2009,11,20),(r=this._get(e,"dateFormat")).match(/[DM]/)&&(n.setMonth((t=function(e){for(s=a=i=0;s<e.length;s++)e[s].length>i&&(i=e[s].length,a=s);return a})(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length))},_inlineDatepicker:function(e,t){var i=D(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(t.dpDiv),D.data(e,o,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,i,a,s){var n,r=this._dialogInst;return r||(this.uuid+=1,n="dp"+this.uuid,this._dialogInput=D("<input type='text' id='"+n+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),D("body").append(this._dialogInput),(r=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},D.data(this._dialogInput[0],o,r)),l(r.settings,a||{}),t=t&&t.constructor===Date?this._formatDate(r,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(n=document.documentElement.clientWidth,a=document.documentElement.clientHeight,t=document.documentElement.scrollLeft||document.body.scrollLeft,s=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[n/2-100+t,a/2-150+s]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),r.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),D.blockUI&&D.blockUI(this.dpDiv),D.data(this._dialogInput[0],o,r),this},_destroyDatepicker:function(e){var t,i=D(e),a=D.data(e,o);i.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),D.removeData(e,o),"input"===t?(a.append.remove(),a.trigger.remove(),i.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||i.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var e,i=D(t),a=D.data(t,o);i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((a=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=D.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,i=D(t),a=D.data(t,o);i.hasClass(this.markerClassName)&&("input"===(e=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"!==e&&"span"!==e||((a=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=D.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(e)for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return D.data(e,o)}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,i){var a,s,n,r,o=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?D.extend({},D.datepicker._defaults):o?"all"===t?D.extend({},o.settings):this._get(o,t):null;a=t||{},"string"==typeof t&&((a={})[t]=i),o&&(this._curInst===o&&this._hideDatepicker(),s=this._getDateDatepicker(e,!0),n=this._getMinMaxDate(o,"min"),r=this._getMinMaxDate(o,"max"),l(o.settings,a),null!==n&&a.dateFormat!==u&&a.minDate===u&&(o.settings.minDate=this._formatDate(o,n)),null!==r&&a.dateFormat!==u&&a.maxDate===u&&(o.settings.maxDate=this._formatDate(o,r)),"disabled"in a&&(a.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(D(e),o),this._autoSize(o),this._setDate(o,s),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){e=this._getInst(e);e&&this._updateDatepicker(e)},_setDateDatepicker:function(e,t){e=this._getInst(e);e&&(this._setDate(e,t),this._updateDatepicker(e),this._updateAlternate(e))},_getDateDatepicker:function(e,t){e=this._getInst(e);return e&&!e.inline&&this._setDateFromField(e,t),e?this._getDate(e):null},_doKeyDown:function(e){var t,i,a=D.datepicker._getInst(e.target),s=!0,n=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,D.datepicker._datepickerShowing)switch(e.keyCode){case 9:D.datepicker._hideDatepicker(),s=!1;break;case 13:return(i=D("td."+D.datepicker._dayOverClass+":not(."+D.datepicker._currentClass+")",a.dpDiv))[0]&&D.datepicker._selectDay(e.target,a.selectedMonth,a.selectedYear,i[0]),(i=D.datepicker._get(a,"onSelect"))?(t=D.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[t,a])):D.datepicker._hideDatepicker(),!1;case 27:D.datepicker._hideDatepicker();break;case 33:D.datepicker._adjustDate(e.target,e.ctrlKey?-D.datepicker._get(a,"stepBigMonths"):-D.datepicker._get(a,"stepMonths"),"M");break;case 34:D.datepicker._adjustDate(e.target,e.ctrlKey?+D.datepicker._get(a,"stepBigMonths"):+D.datepicker._get(a,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&D.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&D.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&D.datepicker._adjustDate(e.target,n?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&D.datepicker._adjustDate(e.target,e.ctrlKey?-D.datepicker._get(a,"stepBigMonths"):-D.datepicker._get(a,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&D.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&D.datepicker._adjustDate(e.target,n?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&D.datepicker._adjustDate(e.target,e.ctrlKey?+D.datepicker._get(a,"stepBigMonths"):+D.datepicker._get(a,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&D.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?D.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,i=D.datepicker._getInst(e.target);if(D.datepicker._get(i,"constrainInput"))return i=D.datepicker._possibleChars(D.datepicker._get(i,"dateFormat")),t=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||t<" "||!i||-1<i.indexOf(t)},_doKeyUp:function(e){e=D.datepicker._getInst(e.target);if(e.input.val()!==e.lastVal)try{D.datepicker.parseDate(D.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,D.datepicker._getFormatConfig(e))&&(D.datepicker._setDateFromField(e),D.datepicker._updateAlternate(e),D.datepicker._updateDatepicker(e))}catch(e){}return!0},_showDatepicker:function(e){var t,i,a,s;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=D("input",e.parentNode)[0]),D.datepicker._isDisabledDatepicker(e)||D.datepicker._lastInput===e||(s=D.datepicker._getInst(e),D.datepicker._curInst&&D.datepicker._curInst!==s&&(D.datepicker._curInst.dpDiv.stop(!0,!0),s)&&D.datepicker._datepickerShowing&&D.datepicker._hideDatepicker(D.datepicker._curInst.input[0]),!1===(i=(i=D.datepicker._get(s,"beforeShow"))?i.apply(e,[e,s]):{}))||(l(s.settings,i),s.lastVal=null,D.datepicker._lastInput=e,D.datepicker._setDateFromField(s),D.datepicker._inDialog&&(e.value=""),D.datepicker._pos||(D.datepicker._pos=D.datepicker._findPos(e),D.datepicker._pos[1]+=e.offsetHeight),t=!1,D(e).parents().each(function(){return!(t|="fixed"===D(this).css("position"))}),i={left:D.datepicker._pos[0],top:D.datepicker._pos[1]},D.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),D.datepicker._updateDatepicker(s),i=D.datepicker._checkOffset(s,i,t),s.dpDiv.css({position:D.datepicker._inDialog&&D.blockUI?"static":t?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"}),s.inline)||(i=D.datepicker._get(s,"showAnim"),a=D.datepicker._get(s,"duration"),s.dpDiv.zIndex(D(e).zIndex()+1),D.datepicker._datepickerShowing=!0,D.effects&&D.effects.effect[i]?s.dpDiv.show(i,D.datepicker._get(s,"showOptions"),a):s.dpDiv[i||"show"](i?a:null),D.datepicker._shouldFocusInput(s)&&s.input.focus(),D.datepicker._curInst=s)},_updateDatepicker:function(e){this.maxRows=4,(s=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var t,i=this._getNumberOfMonths(e),a=i[1];e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<a&&e.dpDiv.addClass("ui-datepicker-multi-"+a).css("width",17*a+"em"),e.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===D.datepicker._curInst&&D.datepicker._datepickerShowing&&D.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),t=e.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(e,t,i){var a=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),n=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,o=document.documentElement.clientWidth+(i?0:D(document).scrollLeft()),u=document.documentElement.clientHeight+(i?0:D(document).scrollTop());return t.left-=this._get(e,"isRTL")?a-n:0,t.left-=i&&t.left===e.input.offset().left?D(document).scrollLeft():0,t.top-=i&&t.top===e.input.offset().top+r?D(document).scrollTop():0,t.left-=Math.min(t.left,t.left+a>o&&a<o?Math.abs(t.left+a-o):0),t.top-=Math.min(t.top,t.top+s>u&&s<u?Math.abs(s+r):0),t},_findPos:function(e){for(var t=this._getInst(e),i=this._get(t,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||D.expr.filters.hidden(e));)e=e[i?"previousSibling":"nextSibling"];return[(t=D(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,i,a=this._curInst;!a||e&&a!==D.data(e,o)||this._datepickerShowing&&(e=this._get(a,"showAnim"),i=this._get(a,"duration"),t=function(){D.datepicker._tidyDialog(a)},D.effects&&(D.effects.effect[e]||D.effects[e])?a.dpDiv.hide(e,D.datepicker._get(a,"showOptions"),i,t):a.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,t),e||t(),this._datepickerShowing=!1,(i=this._get(a,"onClose"))&&i.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),D.blockUI)&&(D.unblockUI(),D("body").append(this.dpDiv)),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){var t;D.datepicker._curInst&&(e=D(e.target),t=D.datepicker._getInst(e[0]),!(e[0].id===D.datepicker._mainDivId||0!==e.parents("#"+D.datepicker._mainDivId).length||e.hasClass(D.datepicker.markerClassName)||e.closest("."+D.datepicker._triggerClass).length||!D.datepicker._datepickerShowing||D.datepicker._inDialog&&D.blockUI)||e.hasClass(D.datepicker.markerClassName)&&D.datepicker._curInst!==t)&&D.datepicker._hideDatepicker()},_adjustDate:function(e,t,i){var e=D(e),a=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(a,t+("M"===i?this._get(a,"showCurrentAtPos"):0),i),this._updateDatepicker(a))},_gotoToday:function(e){var t,e=D(e),i=this._getInst(e[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(t=new Date,i.selectedDay=t.getDate(),i.drawMonth=i.selectedMonth=t.getMonth(),i.drawYear=i.selectedYear=t.getFullYear()),this._notifyChange(i),this._adjustDate(e)},_selectMonthYear:function(e,t,i){var e=D(e),a=this._getInst(e[0]);a["selected"+("M"===i?"Month":"Year")]=a["draw"+("M"===i?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(e)},_selectDay:function(e,t,i,a){var s=D(e);D(a).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((s=this._getInst(s[0])).selectedDay=s.currentDay=D("a",a).html(),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=i,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){e=D(e);this._selectDate(e,"")},_selectDate:function(e,t){var i,e=D(e),e=this._getInst(e[0]);t=null!=t?t:this._formatDate(e),e.input&&e.input.val(t),this._updateAlternate(e),(i=this._get(e,"onSelect"))?i.apply(e.input?e.input[0]:null,[t,e]):e.input&&e.input.trigger("change"),e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],"object"!=typeof e.input[0]&&e.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var t,i,a,s=this._get(e,"altField");s&&(t=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),a=this.formatDate(t,i,this._getFormatConfig(e)),D(s).each(function(){D(this).val(a)}))},noWeekends:function(e){e=e.getDay();return[0<e&&e<6,""]},iso8601Week:function(e){var t,e=new Date(e.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(t,s,e){if(null==t||null==s)throw"Invalid arguments";if(""===(s="object"==typeof s?s.toString():s+""))return null;function i(e){var t=y(e),t=new RegExp("^\\d{1,"+("@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2)+"}");if(e=s.substring(u).match(t))return u+=e[0].length,parseInt(e[0],10);throw"Missing number at position "+u}function a(e,t,i){var a=-1,e=D.map(y(e)?i:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(D.each(e,function(e,t){var i=t[1];if(s.substr(u,i.length).toLowerCase()===i.toLowerCase())return a=t[0],u+=i.length,!1}),-1!==a)return a+1;throw"Unknown name at position "+u}function n(){if(s.charAt(u)!==t.charAt(k))throw"Unexpected literal at position "+u;u++}for(var r,o,u=0,l=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),h=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,c=(e?e.dayNames:null)||this._defaults.dayNames,d=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,p=(e?e.monthNames:null)||this._defaults.monthNames,f=-1,g=-1,m=-1,_=-1,v=!1,y=function(e){e=k+1<t.length&&t.charAt(k+1)===e;return e&&k++,e},k=0;k<t.length;k++)if(v)"'"!==t.charAt(k)||y("'")?n():v=!1;else switch(t.charAt(k)){case"d":m=i("d");break;case"D":a("D",h,c);break;case"o":_=i("o");break;case"m":g=i("m");break;case"M":g=a("M",d,p);break;case"y":f=i("y");break;case"@":f=(o=new Date(i("@"))).getFullYear(),g=o.getMonth()+1,m=o.getDate();break;case"!":f=(o=new Date((i("!")-this._ticksTo1970)/1e4)).getFullYear(),g=o.getMonth()+1,m=o.getDate();break;case"'":y("'")?n():v=!0;break;default:n()}if(u<s.length&&(e=s.substr(u),!/^\s+/.test(e)))throw"Extra/unparsed characters found in date: "+e;if(-1===f?f=(new Date).getFullYear():f<100&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(f<=l?0:-100)),-1<_)for(g=1,m=_;;){if(m<=(r=this._getDaysInMonth(f,g-1)))break;g++,m-=r}if((o=this._daylightSavingAdjust(new Date(f,g-1,m))).getFullYear()!==f||o.getMonth()+1!==g||o.getDate()!==m)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:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";function a(e,t,i){var a=""+t;if(h(e))for(;a.length<i;)a="0"+a;return a}function s(e,t,i,a){return(h(e)?a:i)[t]}var n,r=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,u=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,l=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){e=n+1<t.length&&t.charAt(n+1)===e;return e&&n++,e},c="",d=!1;if(e)for(n=0;n<t.length;n++)if(d)"'"!==t.charAt(n)||h("'")?c+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":c+=a("d",e.getDate(),2);break;case"D":c+=s("D",e.getDay(),r,o);break;case"o":c+=a("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=a("m",e.getMonth()+1,2);break;case"M":c+=s("M",e.getMonth(),u,l);break;case"y":c+=h("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":c+=e.getTime();break;case"!":c+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?c+="'":d=!0;break;default:c+=t.charAt(n)}return c},_possibleChars:function(t){function e(e){return(e=s+1<t.length&&t.charAt(s+1)===e)&&s++,e}for(var i="",a=!1,s=0;s<t.length;s++)if(a)"'"!==t.charAt(s)||e("'")?i+=t.charAt(s):a=!1;else switch(t.charAt(s)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":e("'")?i+="'":a=!0;break;default:i+=t.charAt(s)}return i},_get:function(e,t){return(e.settings[t]!==u?e.settings:this._defaults)[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),a=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),n=s,r=this._getFormatConfig(e);try{n=this.parseDate(i,a,r)||s}catch(e){a=t?"":a}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=a?n.getDate():0,e.currentMonth=a?n.getMonth():0,e.currentYear=a?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(o,e,t){var i,a=null==e||""===e?t:"string"==typeof e?function(e){try{return D.datepicker.parseDate(D.datepicker._get(o,"dateFormat"),e,D.datepicker._getFormatConfig(o))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?D.datepicker._getDate(o):null)||new Date,i=t.getFullYear(),a=t.getMonth(),s=t.getDate(),n=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,r=n.exec(e);r;){switch(r[2]||"d"){case"d":case"D":s+=parseInt(r[1],10);break;case"w":case"W":s+=7*parseInt(r[1],10);break;case"m":case"M":a+=parseInt(r[1],10),s=Math.min(s,D.datepicker._getDaysInMonth(i,a));break;case"y":case"Y":i+=parseInt(r[1],10),s=Math.min(s,D.datepicker._getDaysInMonth(i,a))}r=n.exec(e)}return new Date(i,a,s)}(e):"number"==typeof e?isNaN(e)?t:(a=e,(i=new Date).setDate(i.getDate()+a),i):new Date(e.getTime());return(a=a&&"Invalid Date"===a.toString()?t:a)&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var a=!t,s=e.selectedMonth,n=e.selectedYear,t=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=t.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=t.getMonth(),e.drawYear=e.selectedYear=e.currentYear=t.getFullYear(),s===e.selectedMonth&&n===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(a?"":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(e){var t=this._get(e,"stepMonths"),i="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){D.datepicker._adjustDate(i,-t,"M")},next:function(){D.datepicker._adjustDate(i,+t,"M")},hide:function(){D.datepicker._hideDatepicker()},today:function(){D.datepicker._gotoToday(i)},selectDay:function(){return D.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return D.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return D.datepicker._selectMonthYear(i,this,"Y"),!1}};D(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,a,s,n,j,P,W,K,r,o,R,u,l,h,c,d,p,f,g,m,_,L,v,y,k,D,H,U,b,w,M,C=new Date,V=this._daylightSavingAdjust(new Date(C.getFullYear(),C.getMonth(),C.getDate())),x=this._get(e,"isRTL"),C=this._get(e,"showButtonPanel"),I=this._get(e,"hideIfNoPrevNext"),N=this._get(e,"navigationAsDateFormat"),S=this._getNumberOfMonths(e),A=this._get(e,"showCurrentAtPos"),F=this._get(e,"stepMonths"),z=1!==S[0]||1!==S[1],B=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),T=this._getMinMaxDate(e,"min"),O=this._getMinMaxDate(e,"max"),Y=e.drawMonth-A,E=e.drawYear;if(Y<0&&(Y+=12,E--),O)for(t=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth()-S[0]*S[1]+1,O.getDate())),t=T&&t<T?T:t;this._daylightSavingAdjust(new Date(E,Y,1))>t;)--Y<0&&(Y=11,E--);for(e.drawMonth=Y,e.drawYear=E,A=this._get(e,"prevText"),A=N?this.formatDate(A,this._daylightSavingAdjust(new Date(E,Y-F,1)),this._getFormatConfig(e)):A,i=this._canAdjustMonth(e,-1,E,Y)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+A+"'><span class='ui-icon ui-icon-circle-triangle-"+(x?"e":"w")+"'>"+A+"</span></a>":I?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+A+"'><span class='ui-icon ui-icon-circle-triangle-"+(x?"e":"w")+"'>"+A+"</span></a>",A=this._get(e,"nextText"),A=N?this.formatDate(A,this._daylightSavingAdjust(new Date(E,Y+F,1)),this._getFormatConfig(e)):A,a=this._canAdjustMonth(e,1,E,Y)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+A+"'><span class='ui-icon ui-icon-circle-triangle-"+(x?"w":"e")+"'>"+A+"</span></a>":I?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+A+"'><span class='ui-icon ui-icon-circle-triangle-"+(x?"w":"e")+"'>"+A+"</span></a>",F=this._get(e,"currentText"),I=this._get(e,"gotoCurrent")&&e.currentDay?B:V,F=N?this.formatDate(F,I,this._getFormatConfig(e)):F,A=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",N=C?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(x?A:"")+(this._isInRange(e,I)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+F+"</button>":"")+(x?"":A)+"</div>":"",s=parseInt(this._get(e,"firstDay"),10),s=isNaN(s)?0:s,n=this._get(e,"showWeek"),j=this._get(e,"dayNames"),P=this._get(e,"dayNamesMin"),W=this._get(e,"monthNames"),K=this._get(e,"monthNamesShort"),r=this._get(e,"beforeShowDay"),o=this._get(e,"showOtherMonths"),R=this._get(e,"selectOtherMonths"),u=this._getDefaultDate(e),l="",c=0;c<S[0];c++){for(d="",this.maxRows=4,p=0;p<S[1];p++){if(f=this._daylightSavingAdjust(new Date(E,Y,e.selectedDay)),g=" ui-corner-all",m="",z){if(m+="<div class='ui-datepicker-group",1<S[1])switch(p){case 0:m+=" ui-datepicker-group-first",g=" ui-corner-"+(x?"right":"left");break;case S[1]-1:m+=" ui-datepicker-group-last",g=" ui-corner-"+(x?"left":"right");break;default:m+=" ui-datepicker-group-middle",g=""}m+="'>"}for(m+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+g+"'>"+(/all|left/.test(g)&&0===c?x?a:i:"")+(/all|right/.test(g)&&0===c?x?i:a:"")+this._generateMonthYearHeader(e,Y,E,T,O,0<c||0<p,W,K)+"</div><table class='ui-datepicker-calendar'><thead><tr>",_=n?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",h=0;h<7;h++)_+="<th"+(5<=(h+s+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+j[L=(h+s)%7]+"'>"+P[L]+"</span></th>";for(m+=_+"</tr></thead><tbody>",y=this._getDaysInMonth(E,Y),E===e.selectedYear&&Y===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,y)),v=(this._getFirstDayOfMonth(E,Y)-s+7)%7,y=Math.ceil((v+y)/7),k=z&&this.maxRows>y?this.maxRows:y,this.maxRows=k,D=this._daylightSavingAdjust(new Date(E,Y,1-v)),H=0;H<k;H++){for(m+="<tr>",U=n?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(D)+"</td>":"",h=0;h<7;h++)b=r?r.apply(e.input?e.input[0]:null,[D]):[!0,""],M=(w=D.getMonth()!==Y)&&!R||!b[0]||T&&D<T||O&&O<D,U+="<td class='"+(5<=(h+s+6)%7?" ui-datepicker-week-end":"")+(w?" ui-datepicker-other-month":"")+(D.getTime()===f.getTime()&&Y===e.selectedMonth&&e._keyEvent||u.getTime()===D.getTime()&&u.getTime()===f.getTime()?" "+this._dayOverClass:"")+(M?" "+this._unselectableClass+" ui-state-disabled":"")+(w&&!o?"":" "+b[1]+(D.getTime()===B.getTime()?" "+this._currentClass:"")+(D.getTime()===V.getTime()?" ui-datepicker-today":""))+"'"+(w&&!o||!b[2]?"":" title='"+b[2].replace(/'/g,"'")+"'")+(M?"":" data-handler='selectDay' data-event='click' data-month='"+D.getMonth()+"' data-year='"+D.getFullYear()+"'")+">"+(w&&!o?" ":M?"<span class='ui-state-default'>"+D.getDate()+"</span>":"<a class='ui-state-default"+(D.getTime()===V.getTime()?" ui-state-highlight":"")+(D.getTime()===B.getTime()?" ui-state-active":"")+(w?" ui-priority-secondary":"")+"' href='#'>"+D.getDate()+"</a>")+"</td>",D.setDate(D.getDate()+1),D=this._daylightSavingAdjust(D);m+=U+"</tr>"}11<++Y&&(Y=0,E++),d+=m+="</tbody></table>"+(z?"</div>"+(0<S[0]&&p===S[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}l+=d}return l+=N,e._keyEvent=!1,l},_generateMonthYearHeader:function(e,t,i,a,s,n,r,o){var u,l,h,c,d,p,f,g=this._get(e,"changeMonth"),m=this._get(e,"changeYear"),_=this._get(e,"showMonthAfterYear"),v="<div class='ui-datepicker-title'>",y="";if(n||!g)y+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(u=a&&a.getFullYear()===i,l=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;h<12;h++)(!u||h>=a.getMonth())&&(!l||h<=s.getMonth())&&(y+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"</option>");y+="</select>"}if(_||(v+=y+(!n&&g&&m?"":" ")),!e.yearshtml)if(e.yearshtml="",n||!m)v+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(r=this._get(e,"yearRange").split(":"),c=(new Date).getFullYear(),p=(d=function(e){e=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?c+parseInt(e,10):parseInt(e,10);return isNaN(e)?c:e})(r[0]),f=Math.max(p,d(r[1]||"")),p=a?Math.max(p,a.getFullYear()):p,f=s?Math.min(f,s.getFullYear()):f,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=f;p++)e.yearshtml+="<option value='"+p+"'"+(p===i?" selected='selected'":"")+">"+p+"</option>";e.yearshtml+="</select>",v+=e.yearshtml,e.yearshtml=null}return v+=this._get(e,"yearSuffix"),_&&(v+=(!n&&g&&m?"":" ")+y),v+="</div>"},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),t=Math.min(e.selectedDay,this._getDaysInMonth(a,s))+("D"===i?t:0),a=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,s,t)));e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),e=this._getMinMaxDate(e,"max"),i=i&&t<i?i:t;return e&&e<i?e:i},_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){e=this._get(e,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var s=this._getNumberOfMonths(e),i=this._daylightSavingAdjust(new Date(i,a+(t<0?t:s[0]*s[1]),1));return t<0&&i.setDate(this._getDaysInMonth(i.getFullYear(),i.getMonth())),this._isInRange(e,i)},_isInRange:function(e,t){var i,a=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),n=null,r=null,e=this._get(e,"yearRange");return e&&(e=e.split(":"),i=(new Date).getFullYear(),n=parseInt(e[0],10),r=parseInt(e[1],10),e[0].match(/[+\-].*/)&&(n+=i),e[1].match(/[+\-].*/))&&(r+=i),(!a||t.getTime()>=a.getTime())&&(!s||t.getTime()<=s.getTime())&&(!n||t.getFullYear()>=n)&&(!r||t.getFullYear()<=r)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:"string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);a=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),a,this._getFormatConfig(e))}}),D.fn.datepicker=function(e){if(!this.length)return this;D.datepicker.initialized||(D(document).mousedown(D.datepicker._checkExternalClick),D.datepicker.initialized=!0),0===D("#"+D.datepicker._mainDivId).length&&D("body").append(D.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"==typeof e&&("isDisabled"===e||"getDate"===e||"widget"===e)||"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?D.datepicker["_"+e+"Datepicker"].apply(D.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?D.datepicker["_"+e+"Datepicker"].apply(D.datepicker,[this].concat(t)):D.datepicker._attachDatepicker(this,e)})},D.datepicker=new e,D.datepicker.initialized=!1,D.datepicker.uuid=(new Date).getTime(),D.datepicker.version="1.10.3"}(jQuery),function(h){h.widget("ui.slider",h.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t=this.options,i=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a=[],s=t.values&&t.values.length||1;for(i.length>s&&(i.slice(s).remove(),i=i.slice(0,s)),e=i.length;e<s;e++)a.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");this.handles=i.add(h(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){h(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,t="";e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:h.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=h("<div></div>").appendTo(this.element),t="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(t+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=h([])},_setupEvents:function(){var e=this.handles.add(this.range).filter("a");this._off(e),this._on(e,this._handleEvents),this._hoverable(e),this._focusable(e)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,a,s,n,t,r,o=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t),a=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(i-o.values(e));(t<a||a===t&&(e===o._lastChangedValue||o.values(e)===u.min))&&(a=t,s=h(this),n=e)}),!1!==this._start(e,n))&&(this._mouseSliding=!0,this._handleIndex=n,s.addClass("ui-state-active").focus(),t=s.offset(),r=!h(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=r?{left:0,top:0}:{left:e.pageX-t.left-s.width()/2,top:e.pageY-t.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,n,i),this._animateOff=!0)},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},t=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,t),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,e="horizontal"===this.orientation?(t=this.elementSize.width,e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),e=e/t;return(e=1<e?1:e)<0&&(e=0),"vertical"===this.orientation&&(e=1-e),t=this._valueMax()-this._valueMin(),e=this._valueMin()+e*t,this._trimAlignValue(e)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var a,s;this.options.values&&this.options.values.length?(a=this.values(t?0:1),(i=2===this.options.values.length&&!0===this.options.range&&(0===t&&a<i||1===t&&i<a)?a:i)!==this.values(t)&&((a=this.values())[t]=i,s=this._trigger("slide",e,{handle:this.handles[t],value:i,values:a}),this.values(t?0:1),!1!==s)&&this.values(t,i,!0)):i!==this.value()&&!1!==(s=this._trigger("slide",e,{handle:this.handles[t],value:i}))&&this.value(i)},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){var i;this._keySliding||this._mouseSliding||(i={handle:this.handles[t],value:this.value()},this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i))},value:function(e){if(!arguments.length)return this._value();this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0)},values:function(e,t){var i,a,s;if(1<arguments.length)this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),this._change(null,e);else{if(!arguments.length)return this._values();if(!h.isArray(e))return this.options.values&&this.options.values.length?this._values(e):this.value();for(i=this.options.values,a=e,s=0;s<i.length;s+=1)i[s]=this._trimAlignValue(a[s]),this._change(null,s);this._refreshValue()}},_setOption:function(e,t){var i,a=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),h.isArray(this.options.values)&&(a=this.options.values.length),h.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=0;i<a;i+=1)this._change(null,i);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return this._trimAlignValue(e)},_values:function(e){var t,i,a;if(arguments.length)return t=this.options.values[e],this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),a=0;a<i.length;a+=1)i[a]=this._trimAlignValue(i[a]);return i}return[]},_trimAlignValue:function(e){var t,i;return e<=this._valueMin()?this._valueMin():e>=this._valueMax()?this._valueMax():(t=0<this.options.step?this.options.step:1,i=e-(e=(e-this._valueMin())%t),2*Math.abs(e)>=t&&(i+=0<e?t:-t),parseFloat(i.toFixed(5)))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,e,a,s,n=this.options.range,r=this.options,o=this,u=!this._animateOff&&r.animate,l={};this.options.values&&this.options.values.length?this.handles.each(function(e){i=(o.values(e)-o._valueMin())/(o._valueMax()-o._valueMin())*100,l["horizontal"===o.orientation?"left":"bottom"]=i+"%",h(this).stop(1,1)[u?"animate":"css"](l,r.animate),!0===o.options.range&&("horizontal"===o.orientation?(0===e&&o.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},r.animate),1===e&&o.range[u?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:r.animate})):(0===e&&o.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},r.animate),1===e&&o.range[u?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:r.animate}))),t=i}):(e=this.value(),a=this._valueMin(),s=this._valueMax(),i=s!==a?(e-a)/(s-a)*100:0,l["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](l,r.animate),"min"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},r.animate),"max"===n&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},r.animate),"max"===n&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(e){var t,i,a,s=h(e.target).data("ui-slider-handle-index");switch(e.keyCode){case h.ui.keyCode.HOME:case h.ui.keyCode.END:case h.ui.keyCode.PAGE_UP:case h.ui.keyCode.PAGE_DOWN:case h.ui.keyCode.UP:case h.ui.keyCode.RIGHT:case h.ui.keyCode.DOWN:case h.ui.keyCode.LEFT:if(e.preventDefault(),this._keySliding||(this._keySliding=!0,h(e.target).addClass("ui-state-active"),!1!==this._start(e,s)))break;return}switch(a=this.options.step,t=i=this.options.values&&this.options.values.length?this.values(s):this.value(),e.keyCode){case h.ui.keyCode.HOME:i=this._valueMin();break;case h.ui.keyCode.END:i=this._valueMax();break;case h.ui.keyCode.PAGE_UP:i=this._trimAlignValue(t+(this._valueMax()-this._valueMin())/5);break;case h.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(t-(this._valueMax()-this._valueMin())/5);break;case h.ui.keyCode.UP:case h.ui.keyCode.RIGHT:if(t===this._valueMax())return;i=this._trimAlignValue(t+a);break;case h.ui.keyCode.DOWN:case h.ui.keyCode.LEFT:if(t===this._valueMin())return;i=this._trimAlignValue(t-a)}this._slide(e,s,i)},click:function(e){e.preventDefault()},keyup:function(e){var t=h(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,t),this._change(e,t),h(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(o){var h,c,u,d,e,p,f,g,r,t,m,n,s,l,_,v,i,a,y,k,D="ui-effects-";function b(e,t,i){var a=g[t.type]||{};return null==e?i||!t.def?null:t.def:(e=a.floor?~~e:parseFloat(e),isNaN(e)?t.def:a.mod?(e+a.mod)%a.mod:e<0?0:a.max<e?a.max:e)}function w(a){var s=p(),n=s._rgba=[];return a=a.toLowerCase(),m(e,function(e,t){var i=t.re.exec(a),i=i&&t.parse(i),t=t.space||"rgba";if(i)return i=s[t](i),s[f[t].cache]=i[f[t].cache],n=s._rgba=i._rgba,!1}),n.length?("0,0,0,0"===n.join()&&h.extend(n,u.transparent),s):u[a]}function M(e,t,i){return 6*(i=(i+1)%1)<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function C(e){var t,i,a=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,s={};if(a&&a.length&&a[0]&&a[a[0]])for(i=a.length;i--;)"string"==typeof a[t=a[i]]&&(s[o.camelCase(t)]=a[t]);else for(t in a)"string"==typeof a[t]&&(s[t]=a[t]);return s}function x(e,t,i,a){return e={effect:e=o.isPlainObject(e)?(t=e).effect:e},o.isFunction(t=null==t?{}:t)&&(a=t,i=null,t={}),"number"!=typeof t&&!o.fx.speeds[t]||(a=i,i=t,t={}),o.isFunction(i)&&(a=i,i=null),t&&o.extend(e,t),i=i||t.duration,e.duration=o.fx.off?0:"number"==typeof i?i:i in o.fx.speeds?o.fx.speeds[i]:o.fx.speeds._default,e.complete=a||t.complete,e}function I(e){return!e||"number"==typeof e||o.fx.speeds[e]||"string"==typeof e&&!o.effects.effect[e]||o.isFunction(e)||"object"==typeof e&&!e.effect}o.effects={effect:{}},h=jQuery,d=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],p=h.Color=function(e,t,i,a){return new h.Color.fn.parse(e,t,i,a)},f={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},g={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},r=p.support={},t=h("<p>")[0],m=h.each,t.style.cssText="background-color:rgba(1,1,1,.5)",r.rgba=-1<t.style.backgroundColor.indexOf("rgba"),m(f,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),(p.fn=h.extend(p.prototype,{parse:function(s,e,t,i){if(s===c)return this._rgba=[null,null,null,null],this;(s.jquery||s.nodeType)&&(s=h(s).css(e),e=c);var n=this,a=h.type(s),r=this._rgba=[];return e!==c&&(s=[s,e,t,i],a="array"),"string"===a?this.parse(w(s)||u._default):"array"===a?(m(f.rgba.props,function(e,t){r[t.idx]=b(s[t.idx],t)}),this):"object"===a?(s instanceof p?m(f,function(e,t){s[t.cache]&&(n[t.cache]=s[t.cache].slice())}):m(f,function(e,i){var a=i.cache;m(i.props,function(e,t){if(!n[a]&&i.to){if("alpha"===e||null==s[e])return;n[a]=i.to(n._rgba)}n[a][t.idx]=b(s[e],t,!0)}),n[a]&&h.inArray(null,n[a].slice(0,3))<0&&(n[a][3]=1,i.from)&&(n._rgba=i.from(n[a]))}),this):void 0},is:function(e){var s=p(e),n=!0,r=this;return m(f,function(e,t){var i,a=s[t.cache];return a&&(i=r[t.cache]||t.to&&t.to(r._rgba)||[],m(t.props,function(e,t){if(null!=a[t.idx])return n=a[t.idx]===i[t.idx]})),n}),n},_space:function(){var i=[],a=this;return m(f,function(e,t){a[t.cache]&&i.push(e)}),i.pop()},transition:function(e,r){var e=(l=p(e))._space(),t=f[e],i=0===this.alpha()?p("transparent"):this,o=i[t.cache]||t.to(i._rgba),u=o.slice(),l=l[t.cache];return m(t.props,function(e,t){var i=t.idx,a=o[i],s=l[i],n=g[t.type]||{};null!==s&&(null===a?u[i]=s:(n.mod&&(s-a>n.mod/2?a+=n.mod:a-s>n.mod/2&&(a-=n.mod)),u[i]=b((s-a)*r+a,t)))}),this[e](u)},blend:function(e){var t,i,a;return 1===this._rgba[3]?this:(t=this._rgba.slice(),i=t.pop(),a=p(e)._rgba,p(h.map(t,function(e,t){return(1-i)*a[t]+i*e})))},toRgbaString:function(){var e="rgba(",t=h.map(this._rgba,function(e,t){return null==e?2<t?1:0:e});return 1===t[3]&&(t.pop(),e="rgb("),e+t.join()+")"},toHslaString:function(){var e="hsla(",t=h.map(this.hsla(),function(e,t){return null==e&&(e=2<t?1:0),e=t&&t<3?Math.round(100*e)+"%":e});return 1===t[3]&&(t.pop(),e="hsl("),e+t.join()+")"},toHexString:function(e){var t=this._rgba.slice(),i=t.pop();return e&&t.push(~~(255*i)),"#"+h.map(t,function(e){return 1===(e=(e||0).toString(16)).length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}})).parse.prototype=p.fn,f.hsla.to=function(e){var t,i,a,s,n,r,o,u;return null==e[0]||null==e[1]||null==e[2]?[null,null,null,e[3]]:(t=e[0]/255,i=e[1]/255,a=e[2]/255,e=e[3],s=(u=Math.max(t,i,a))-(o=Math.min(t,i,a)),r=.5*(n=u+o),o=o===u?0:t===u?60*(i-a)/s+360:i===u?60*(a-t)/s+120:60*(t-i)/s+240,u=0==s?0:r<=.5?s/n:s/(2-n),[Math.round(o)%360,u,r,null==e?1:e])},f.hsla.from=function(e){var t,i,a;return null==e[0]||null==e[1]||null==e[2]?[null,null,null,e[3]]:(t=e[0]/360,a=e[1],i=e[2],e=e[3],a=2*i-(i=i<=.5?i*(1+a):i+a-i*a),[Math.round(255*M(a,i,t+1/3)),Math.round(255*M(a,i,t)),Math.round(255*M(a,i,t-1/3)),e])},m(f,function(o,e){var n=e.props,r=e.cache,u=e.to,l=e.from;p.fn[o]=function(e){var t,i,a,s;return u&&!this[r]&&(this[r]=u(this._rgba)),e===c?this[r].slice():(i=h.type(e),a="array"===i||"object"===i?e:arguments,s=this[r].slice(),m(n,function(e,t){e=a["object"===i?e:t.idx];null==e&&(e=s[t.idx]),s[t.idx]=b(e,t)}),l?((t=p(l(s)))[r]=s,t):p(s))},m(n,function(n,r){p.fn[n]||(p.fn[n]=function(e){var t=h.type(e),i="alpha"===n?this._hsla?"hsla":"rgba":o,a=this[i](),s=a[r.idx];return"undefined"===t?s:("function"===t&&(e=e.call(this,s),t=h.type(e)),null==e&&r.empty?this:("string"===t&&(t=d.exec(e))&&(e=s+parseFloat(t[2])*("+"===t[1]?1:-1)),a[r.idx]=e,this[i](a)))})})}),(p.hook=function(e){e=e.split(" ");m(e,function(e,n){h.cssHooks[n]={set:function(e,t){var i,a,s="";if("transparent"!==t&&("string"!==h.type(t)||(i=w(t)))){if(t=p(i||t),!r.rgba&&1!==t._rgba[3]){for(a="backgroundColor"===n?e.parentNode:e;(""===s||"transparent"===s)&&a&&a.style;)try{s=h.css(a,"backgroundColor"),a=a.parentNode}catch(e){}t=t.blend(s&&"transparent"!==s?s:"_default")}t=t.toRgbaString()}try{e.style[n]=t}catch(e){}}},h.fx.step[n]=function(e){e.colorInit||(e.start=p(e.elem,n),e.end=p(e.end),e.colorInit=!0),h.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}})})("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),h.cssHooks.borderColor={expand:function(i){var a={};return m(["Top","Right","Bottom","Left"],function(e,t){a["border"+t+"Color"]=i}),a}},u=h.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},_=["add","remove","toggle"],v={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},o.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,t){o.fx.step[t]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(jQuery.style(e.elem,t,e.end),e.setAttr=!0)}}),o.fn.addBack||(o.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),o.effects.animateClass=function(s,e,t,i){var n=o.speed(e,t,i);return this.queue(function(){var i=o(this),e=i.attr("class")||"",t=(t=n.children?i.find("*").addBack():i).map(function(){return{el:o(this),start:C(this)}}),a=function(){o.each(_,function(e,t){s[t]&&i[t+"Class"](s[t])})};a(),t=t.map(function(){return this.end=C(this.el[0]),this.diff=function(e,t){var i,a,s={};for(i in t)a=t[i],e[i]===a||v[i]||!o.fx.step[i]&&isNaN(parseFloat(a))||(s[i]=a);return s}(this.start,this.end),this}),i.attr("class",e),t=t.map(function(){var e=this,t=o.Deferred(),i=o.extend({},n,{queue:!1,complete:function(){t.resolve(e)}});return this.el.animate(this.diff,i),t.promise()}),o.when.apply(o,t.get()).done(function(){a(),o.each(arguments,function(){var t=this.el;o.each(this.diff,function(e){t.css(e,"")})}),n.complete.call(i[0])})})},o.fn.extend({addClass:(l=o.fn.addClass,function(e,t,i,a){return t?o.effects.animateClass.call(this,{add:e},t,i,a):l.apply(this,arguments)}),removeClass:(s=o.fn.removeClass,function(e,t,i,a){return 1<arguments.length?o.effects.animateClass.call(this,{remove:e},t,i,a):s.apply(this,arguments)}),toggleClass:(n=o.fn.toggleClass,function(e,t,i,a,s){return"boolean"==typeof t||void 0===t?i?o.effects.animateClass.call(this,t?{add:e}:{remove:e},i,a,s):n.apply(this,arguments):o.effects.animateClass.call(this,{toggle:e},t,i,a)}),switchClass:function(e,t,i,a,s){return o.effects.animateClass.call(this,{add:t,remove:e},i,a,s)}}),o.extend(o.effects,{version:"1.10.3",save:function(e,t){for(var i=0;i<t.length;i++)null!==t[i]&&e.data(D+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,a=0;a<t.length;a++)null!==t[a]&&(void 0===(i=e.data(D+t[a]))&&(i=""),e.css(t[a],i))},setMode:function(e,t){return t="toggle"===t?e.is(":hidden")?"show":"hide":t},getBaseline:function(e,t){var i,a;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":a=0;break;case"center":a=.5;break;case"right":a=1;break;default:a=e[1]/t.width}return{x:a,y:i}},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var a={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},e=o("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),t={width:i.width(),height:i.height()},s=document.activeElement;try{s.id}catch(e){s=document.body}return i.wrap(e),i[0]!==s&&!o.contains(i[0],s)||o(s).focus(),e=i.parent(),"static"===i.css("position")?(e.css({position:"relative"}),i.css({position:"relative"})):(o.extend(a,{position:i.css("position"),zIndex:i.css("z-index")}),o.each(["top","left","bottom","right"],function(e,t){a[t]=i.css(t),isNaN(parseInt(a[t],10))&&(a[t]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(t),e.css(a).show()},removeWrapper:function(e){var t=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),e[0]!==t&&!o.contains(e[0],t)||o(t).focus()),e},setTransition:function(a,e,s,n){return n=n||{},o.each(e,function(e,t){var i=a.cssUnit(t);0<i[0]&&(n[t]=i[0]*s+i[1])}),n}}),o.fn.extend({effect:function(){var n=x.apply(this,arguments),e=n.mode,t=n.queue,r=o.effects.effect[n.effect];return o.fx.off||!r?e?this[e](n.duration,n.complete):this.each(function(){n.complete&&n.complete.call(this)}):!1===t?this.each(i):this.queue(t||"fx",i);function i(e){var t=o(this),i=n.complete,a=n.mode;function s(){o.isFunction(i)&&i.call(t[0]),o.isFunction(e)&&e()}(t.is(":hidden")?"hide"===a:"show"===a)?(t[a](),s()):r.call(t[0],n,s)}},show:(y=o.fn.show,function(e){var t;return I(e)?y.apply(this,arguments):((t=x.apply(this,arguments)).mode="show",this.effect.call(this,t))}),hide:(a=o.fn.hide,function(e){var t;return I(e)?a.apply(this,arguments):((t=x.apply(this,arguments)).mode="hide",this.effect.call(this,t))}),toggle:(i=o.fn.toggle,function(e){var t;return I(e)||"boolean"==typeof e?i.apply(this,arguments):((t=x.apply(this,arguments)).mode="toggle",this.effect.call(this,t))}),cssUnit:function(e){var i=this.css(e),a=[];return o.each(["em","px","%","pt"],function(e,t){0<i.indexOf(t)&&(a=[parseFloat(i),t])}),a}}),k={},o.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,e){k[e]=function(e){return Math.pow(e,t+2)}}),o.extend(k,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),o.each(k,function(e,t){o.easing["easeIn"+e]=t,o.easing["easeOut"+e]=function(e){return 1-t(1-e)},o.easing["easeInOut"+e]=function(e){return e<.5?t(2*e)/2:1-t(-2*e+2)/2}})}(jQuery),function(r){r.effects.effect.highlight=function(e,t){var i=r(this),a=["backgroundImage","backgroundColor","opacity"],s=r.effects.setMode(i,e.mode||"show"),n={backgroundColor:i.css("backgroundColor")};"hide"===s&&(n.opacity=0),r.effects.save(i,a),i.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===s&&i.hide(),r.effects.restore(i,a),t()}})}}(jQuery); |