From 98db6123e42da7dc1e122cce54d5e9ed651e8725 Mon Sep 17 00:00:00 2001 From: habiba Date: Thu, 17 Sep 2015 16:36:59 -0400 Subject: [PATCH 01/10] Updated the jquery and svg libraries in client/lib folder --- client/lib/.DS_Store | Bin 0 -> 6148 bytes client/lib/jquery-ui.min.js | 8269 ++++++++++++++++++++++++++++++- client/lib/jquery.ba-bbq.min.js | 19 +- client/lib/jquery.min.js | 8 +- client/lib/jquery.svg.min.js | 17 +- client/lib/jquery.svgdom.min.js | 7 +- client/lib/sprintf.js | 280 +- client/lib/webfont.js | 2 +- 8 files changed, 8358 insertions(+), 244 deletions(-) create mode 100644 client/lib/.DS_Store diff --git a/client/lib/.DS_Store b/client/lib/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",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")}).delegate(i,"mouseover",o)}function o(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.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 r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}function h(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.2",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}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.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)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var l=0,u=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,n=u.call(arguments,1),a=0,o=n.length;o>a;a++)for(i in n[a])s=n[a][i],n[a].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var a="string"==typeof n,o=u.call(arguments,1),r=this;return n=!a&&o.length?e.widget.extend.apply(null,[n].concat(o)):n,a?this.each(function(){var i,a=e.data(this,s);return"instance"===n?(r=a,!1):a?e.isFunction(a[n])&&"_"!==n.charAt(0)?(i=a[n].apply(a,o),i!==a&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+n+"'")}):this.each(function(){var t=e.data(this,s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))}),r}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.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:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(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",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(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){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var d=!1;e(document).mouseup(function(){d=!1}),e.widget("ui.mouse",{version:"1.11.2",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(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),d=!1,!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}}),function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("
"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.widthi?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};d>m&&m>r(t+i)&&(h.horizontal="center"),c>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-o-h,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>r(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-o-h,c="top"===t.my[1],p=c?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,e.top+p+f+m>u&&(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,e.top+p+f+m>d&&(i>0||d>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.accordion",{version:"1.11.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),s=t.next(),n=s.uniqueId().attr("id");t.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?e():n,newPanel:r};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.length&&(!t.length||e.index()",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i) -}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,s,n,a,o=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,s=this.previousFilter||"",n=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,i=this._filterMenuItems(n),i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(t.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(t,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("
    ").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e("
    ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("
    ").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete;var c,p="ui-button ui-widget ui-state-default ui-corner-all",f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",m=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},g=function(t){var i=t.name,s=t.form,n=e([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?e(s).find("[name='"+i+"'][type=radio]"):e("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),n};e.widget("ui.button",{version:"1.11.2",defaultElement:"").addClass(this._triggerClass).html(a?e("").attr({src:a,alt:n,title:n}):n)),t[r?"before":"after"](i.trigger),i.trigger.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])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,s,n,a=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(i=0,s=0,n=0;e.length>n;n++)e[n].length>i&&(i=e[n].length,s=n);return s},a.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var s=e(t);s.hasClass(this.markerClassName)||(s.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,s,n,a){var o,h,l,u,d,c=this._dialogInst;return c||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e(""),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),c=this._dialogInst=this._newInst(this._dialogInput,!1),c.settings={},e.data(this._dialogInput[0],"datepicker",c)),r(c.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,l/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=s,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",c),this},_destroyDatepicker:function(t){var i,s=e(t),n=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.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,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(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)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.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;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,s){var n,a,o,h,l=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),r(l.settings,n),null!==o&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,o)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_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,s,n,a=e.datepicker._getInst(t.target),o=!0,r=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),o=!1;break;case 13:return n=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv),n[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,n[0]),i=e.datepicker._get(a,"onSelect"),i?(s=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,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),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?1:-1,"D"),o=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"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?-1:1,"D"),o=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"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,s,n=e.datepicker._getInst(t.target);return e.datepicker._get(n,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0 -},_doKeyUp:function(t){var i,s=e.datepicker._getInst(t.target);if(s.input.val()!==s.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,e.datepicker._getFormatConfig(s)),i&&(e.datepicker._setDateFromField(s),e.datepicker._updateAlternate(s),e.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,o,h,l,u;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])),n=e.datepicker._get(i,"beforeShow"),a=n?n.apply(t,[t,i]):{},a!==!1&&(r(i.settings,a),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),o=!1,e(t).parents().each(function(){return o|="fixed"===e(this).css("position"),!o}),h={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),h=e.datepicker._checkOffset(i,h,o),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,v=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,s=this._getNumberOfMonths(t),n=s[1],a=17,r=t.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),t.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,s){var n=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?n-o:0,i.left-=s&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=s&&i.top===t.input.offset().top+r?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+r):0),i},_findPos:function(t){for(var i,s=this._getInst(t),n=this._get(s,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[n?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,s,n,a,o=this._curInst;!o||t&&o!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),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).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),s=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!==s)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,s){var n=e(t),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(t){var i,s=e(t),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(t,i,s){var n=e(t),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(t,i,s,n){var a,o=e(t);e(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||(a=this._getInst(o[0]),a.selectedDay=a.currentDay=e("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,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 s,n=e(t),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.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.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,s,n,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t)),e(a).each(function(){e(this).val(n)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},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,s){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,a,o,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,c=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},x=function(e){var t=_(e),s="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,n="y"===e?s:1,a=RegExp("^\\d{"+n+","+s+"}"),o=i.substring(h).match(a);if(!o)throw"Missing number at position "+h;return h+=o[0].length,parseInt(o[0],10)},w=function(t,s,n){var a=-1,o=e.map(_(t)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,t){var s=t[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(a=t[0],h+=s.length,!1):void 0}),-1!==a)return a+1;throw"Unknown name at position "+h},k=function(){if(i.charAt(h)!==t.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;t.length>n;n++)if(b)"'"!==t.charAt(n)||_("'")?k():b=!1;else switch(t.charAt(n)){case"d":v=x("d");break;case"D":w("D",d,c);break;case"o":y=x("o");break;case"m":g=x("m");break;case"M":g=w("M",p,f);break;case"y":m=x("y");break;case"@":r=new Date(x("@")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((x("!")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(i.length>h&&(o=i.substr(h),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),y>-1)for(g=1,v=y;;){if(a=this._getDaysInMonth(m,g-1),a>=v)break;g++,v-=a}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw"Invalid date";return r},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:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(t){var i=e.length>s+1&&e.charAt(s+1)===t;return i&&s++,i},l=function(e,t,i){var s=""+t;if(h(e))for(;i>s.length;)s="0"+s;return s},u=function(e,t,i,s){return h(e)?s[t]:i[t]},d="",c=!1;if(t)for(s=0;e.length>s;s++)if(c)"'"!==e.charAt(s)||h("'")?d+=e.charAt(s):c=!1;else switch(e.charAt(s)){case"d":d+=l("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),n,a);break;case"o":d+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=l("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),o,r);break;case"y":d+=h("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":h("'")?d+="'":c=!0;break;default:d+=e.charAt(s)}return d},_possibleChars:function(e){var t,i="",s=!1,n=function(i){var s=e.length>t+1&&e.charAt(t+1)===i;return s&&t++,s};for(t=0;e.length>t;t++)if(s)"'"!==e.charAt(t)||n("'")?i+=e.charAt(t):s=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!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"),s=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),a=n,o=this._getFormatConfig(e);try{a=this.parseDate(i,s,o)||n}catch(r){s=t?"":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?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,s){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},a=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,a=n.getFullYear(),o=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.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":o+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o));break;case"y":case"Y":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o))}l=h.exec(i)}return new Date(a,o,r)},o=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return o=o&&"Invalid Date"==""+o?s:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,n=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),n===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),s="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(s,-i,"M")},next:function(){e.datepicker._adjustDate(s,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(s)},selectDay:function(){return e.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(s,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,s,n,a,o,r,h,l,u,d,c,p,f,m,g,v,y,b,_,x,w,k,T,D,S,M,C,N,A,P,I,z,H,F,E,O,j,W,L=new Date,R=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(e,"isRTL"),B=this._get(e,"showButtonPanel"),J=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),K=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),U=this._get(e,"stepMonths"),Q=1!==K[0]||1!==K[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),$=this._getMinMaxDate(e,"max"),Z=e.drawMonth-V,et=e.drawYear;if(0>Z&&(Z+=12,et--),$)for(t=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-K[0]*K[1]+1,$.getDate())),t=X&&X>t?X:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-U,1)),this._getFormatConfig(e)):i,s=this._canAdjustMonth(e,-1,et,Z)?""+i+"":J?"":""+i+"",n=this._get(e,"nextText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(et,Z+U,1)),this._getFormatConfig(e)):n,a=this._canAdjustMonth(e,1,et,Z)?""+n+"":J?"":""+n+"",o=this._get(e,"currentText"),r=this._get(e,"gotoCurrent")&&e.currentDay?G:R,o=q?this.formatDate(o,r,this._getFormatConfig(e)):o,h=e.inline?"":"",l=B?"
    "+(Y?h:"")+(this._isInRange(e,r)?"":"")+(Y?"":h)+"
    ":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),c=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;K[0]>w;w++){for(k="",this.maxRows=4,T=0;K[1]>T;T++){if(D=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=" ui-corner-all",M="",Q){if(M+="
    "}for(M+="
    "+(/all|left/.test(S)&&0===w?Y?a:s:"")+(/all|right/.test(S)&&0===w?Y?s:a:"")+this._generateMonthYearHeader(e,Z,et,X,$,w>0||T>0,f,m)+"
    "+"",C=d?"":"",x=0;7>x;x++)N=(x+u)%7,C+="";for(M+=C+"",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),P=(this._getFirstDayOfMonth(et,Z)-u+7)%7,I=Math.ceil((P+A)/7),z=Q?this.maxRows>I?this.maxRows:I:I,this.maxRows=z,H=this._daylightSavingAdjust(new Date(et,Z,1-P)),F=0;z>F;F++){for(M+="",E=d?"":"",x=0;7>x;x++)O=g?g.apply(e.input?e.input[0]:null,[H]):[!0,""],j=H.getMonth()!==Z,W=j&&!y||!O[0]||X&&X>H||$&&H>$,E+="",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);M+=E+""}Z++,Z>11&&(Z=0,et++),M+="
    "+this._get(e,"weekHeader")+"=5?" class='ui-datepicker-week-end'":"")+">"+""+p[N]+"
    "+this._get(e,"calculateWeek")(H)+""+(j&&!v?" ":W?""+H.getDate()+"":""+H.getDate()+"")+"
    "+(Q?"
    "+(K[0]>0&&T===K[1]-1?"
    ":""):""),k+=M}_+=k}return _+=l,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,s,n,a,o,r){var h,l,u,d,c,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="
    ",_="";if(a||!g)_+=""+o[t]+"";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,_+=""}if(y||(b+=_+(!a&&g&&v?"":" ")),!e.yearshtml)if(e.yearshtml="",a||!v)b+=""+i+"";else{for(d=this._get(e,"yearRange").split(":"),c=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?c+parseInt(e,10):parseInt(e,10);return isNaN(t)?c:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,e.yearshtml+="",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!a&&g&&v?"":" ")+_),b+="
    "},_adjustInstDate:function(e,t,i){var s=e.drawYear+("Y"===i?t:0),n=e.drawMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(s,n))+("D"===i?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,n,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return s&&n>s?s:n},_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,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,s){var n=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(0>t?t:n[0]*n[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,s,n=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),o=null,r=null,h=this._get(e,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),o=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(o+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||t.getTime()>=n.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!r||r>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,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,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.2",e.datepicker,e.widget("ui.draggable",e.ui.mouse,{version:"1.11.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("
    ").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(s){}},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper),n=s?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0) -},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.lefti[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(h=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,s){var n=e.extend({},i,{item:s.element});s.sortables=[],e(s.options.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,n))})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,e.each(s.sortables,function(){var e=this;e.isOver?(e.isOver=0,s.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,n))})},drag:function(t,i,s){e.each(s.sortables,function(){var n=!1,a=this;a.positionAbs=s.positionAbs,a.helperProportions=s.helperProportions,a.offset.click=s.offset.click,a._intersectsWith(a.containerCache)&&(n=!0,e.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==a&&this._intersectsWith(this.containerCache)&&e.contains(a.element[0],this.element[0])&&(n=!1),n})),n?(a.isOver||(a.isOver=1,a.currentItem=i.helper.appendTo(a.element).data("ui-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return i.helper[0]},t.target=a.currentItem[0],a._mouseCapture(t,!0),a._mouseStart(t,!0,!0),a.offset.click.top=s.offset.click.top,a.offset.click.left=s.offset.click.left,a.offset.parent.left-=s.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=s.offset.parent.top-a.offset.parent.top,s._trigger("toSortable",t),s.dropped=a.element,e.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,a.fromOutside=s),a.currentItem&&(a._mouseDrag(t),i.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",t,a._uiHash(a)),a._mouseStop(t,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),s._refreshOffsets(t),i.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,e.each(s.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e("body").css("cursor",n._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+o.offsetHeight-t.pageY=0;c--)h=s.snapElements[c].left-s.margins.left,l=h+s.snapElements[c].width,u=s.snapElements[c].top-s.margins.top,d=u+s.snapElements[c].height,h-m>v||g>l+m||u-m>b||y>d+m||!e.contains(s.snapElements[c].item.ownerDocument,s.snapElements[c].item)?(s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(d-y),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||a||o||r,"outer"!==f.snapMode&&(n=m>=Math.abs(u-y),a=m>=Math.abs(d-b),o=m>=Math.abs(h-g),r=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d-s.helperProportions.height,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[c].snapping&&(n||a||o||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=n||a||o||r||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var n,a=s.options,o=e.makeArray(e(a.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});o.length&&(n=parseInt(e(o[0]).css("zIndex"),10)||0,e(o).each(function(t){e(this).css("zIndex",n+t)}),this.css("zIndex",n+o.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("zIndex")&&(a._zIndex=n.css("zIndex")),n.css("zIndex",a.zIndex)},stop:function(t,i,s){var n=s.options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}}),e.ui.draggable,e.widget("ui.resizable",e.ui.mouse,{version:"1.11.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return t[s]>0?!0:(t[s]=1,n=t[s]>0,t[s]=0,n)},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("
    ").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("
    "),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=this.element.children(this.handles[i]).first().show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var i,s,n,a=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),a.containment&&(i+=e(a.containment).scrollLeft()||0,s+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===n?this.axis+"-resize":n),o.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,s,n=this.originalMousePosition,a=this.axis,o=t.pageX-n.left||0,r=t.pageY-n.top||0,h=this._change[a];return this._updatePrevProperties(),h?(i=h.apply(this,[t,o,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,s,n,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,n=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),s>a.minHeight&&(a.minHeight=s),a.maxWidth>i&&(a.maxWidth=i),a.maxHeight>n&&(a.maxHeight=n)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,s=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,s=this._isNumber(e.width)&&t.maxWidth&&t.maxWidthe.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,r=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(e.width=t.minWidth),o&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),n&&(e.height=t.maxHeight),a&&l&&(e.left=r-t.minWidth),s&&l&&(e.left=r-t.maxWidth),o&&u&&(e.top=h-t.minHeight),n&&u&&(e.top=h-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],s=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],n=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)i[t]=parseInt(s[t],10)||0,i[t]+=parseInt(n[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("
    "),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,s,n,a,o,r,h=e(this).resizable("instance"),l=h.options,u=h.element,d=l.containment,c=d instanceof e?d.get(0):/parent/.test(d)?u.parent().get(0):d;c&&(h.containerElement=e(c),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(c),i=[],e(["Top","Right","Left","Bottom"]).each(function(e,s){i[e]=h._num(t.css("padding"+s))}),h.containerOffset=t.offset(),h.containerPosition=t.position(),h.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,a=h.containerSize.width,o=h._hasScroll(c,"left")?c.scrollWidth:a,r=h._hasScroll(c)?c.scrollHeight:n,h.parentData={element:c,left:s.left,top:s.top,width:o,height:r}))},resize:function(t){var i,s,n,a,o=e(this).resizable("instance"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,d={top:0,left:0},c=o.containerElement,p=!0;c[0]!==document&&/static/.test(c.css("position"))&&(d=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-d.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?h.top:0),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),i=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-d.left:o.offset.left-h.left)),s=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-d.top:o.offset.top-h.top)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).resizable("instance"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),s=i.options,n=i.size,a=i.originalSize,o=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,d=Math.round((n.width-a.width)/l)*l,c=Math.round((n.height-a.height)/u)*u,p=a.width+d,f=a.height+c,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,y=s.minHeight&&s.minHeight>f;s.grid=h,v&&(p+=l),y&&(f+=u),m&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=o.top-c):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=o.left-d):((0>=f-u||0>=p-l)&&(t=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=o.top-c):(f=u-t.height,i.size.height=f,i.position.top=o.top+a.height-f),p-l>0?(i.size.width=p,i.position.left=o.left-d):(p=u-t.height,i.size.width=p,i.position.left=o.left+a.width-p))}}),e.ui.resizable,e.widget("ui.dialog",{version:"1.11.2",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,s=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(n){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),a=Math.max.apply(null,n);return a>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",a+1),s=!0),s&&!i&&this._trigger("focus",t),s},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("
    ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0; -if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==s[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){n.focus()}),t.preventDefault()):(this._delay(function(){s.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("
    ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html(" "),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("
    ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("
    ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(e.each(i,function(i,s){var n,a;s=e.isFunction(s)?{click:s,text:i}:s,s=e.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(t.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,e("",s).button(a).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,t(n))},drag:function(e,s){i._trigger("drag",e,t(s))},stop:function(n,a){var o=a.offset.left-i.document.scrollLeft(),r=a.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" "+"top"+(r>=0?"+":"")+r,of:i.window},e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,t(a))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,t(n))},resize:function(e,s){i._trigger("resize",e,t(s))},stop:function(n,a){var o=i.uiDialog.offset(),r=o.left-i.document.scrollLeft(),h=o.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,t(a))}}).css("position",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(s=!0),e in i.resizableRelatedOptions&&(n[e]=t)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,t){var i,s,n=this.uiDialog;"dialogClass"===e&&n.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=n.is(":data(ui-draggable)"),i&&!t&&n.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(s=n.is(":data(ui-resizable)"),s&&!t&&n.resizable("destroy"),s&&"string"==typeof t&&n.resizable("option","handles",t),s||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),e=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),t=Math.max(0,s.minHeight-e),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-e):"none","auto"===s.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("
    ").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("
    ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),e.widget("ui.droppable",{version:"1.11.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,n){if(!i.offset)return!1;var a=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,r=a+t.helperProportions.width,h=o+t.helperProportions.height,l=i.offset.left,u=i.offset.top,d=l+i.proportions().width,c=u+i.proportions().height;switch(s){case"fit":return a>=l&&d>=r&&o>=u&&c>=h;case"intersect":return a+t.helperProportions.width/2>l&&d>r-t.helperProportions.width/2&&o+t.helperProportions.height/2>u&&c>h-t.helperProportions.height/2;case"pointer":return e(n.pageY,u,i.proportions().height)&&e(n.pageX,l,i.proportions().width);case"touch":return(o>=u&&c>=o||h>=u&&c>=h||u>o&&h>c)&&(a>=l&&d>=a||r>=l&&d>=r||l>a&&r>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance,i),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===n}),a.length&&(s=e(a[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable;var y="ui-effects-",b=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[u[l].cache]=o[u[l].cache],n=s._rgba=o._rgba,!1):t}),n.length?("0,0,0,0"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{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]]}}],l=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},u={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"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=l.support={},p=e("

    ")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",c.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(n,o,r,h){if(n===t)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=e(n).css(o),o=t);var d=this,c=e.type(n),p=this._rgba=[];return o!==t&&(n=[n,o,r,h],c="array"),"string"===c?this.parse(s(n)||a._default):"array"===c?(f(u.rgba.props,function(e,t){p[t.idx]=i(n[t.idx],t)}),this):"object"===c?(n instanceof l?f(u,function(e,t){n[t.cache]&&(d[t.cache]=n[t.cache].slice())}):f(u,function(t,s){var a=s.cache;f(s.props,function(e,t){if(!d[a]&&s.to){if("alpha"===e||null==n[e])return;d[a]=s.to(d._rgba)}d[a][t.idx]=i(n[e],t,!0)}),d[a]&&0>e.inArray(null,d[a].slice(0,3))&&(d[a][3]=1,s.from&&(d._rgba=s.from(d[a])))}),this):t},is:function(e){var i=l(e),s=!0,n=this;return f(u,function(e,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(e,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:t})),s}),s},_space:function(){var e=[],t=this;return f(u,function(i,s){t[s.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var s=l(e),n=s._space(),a=u[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(e,n){var a=n.idx,o=r[a],l=s[a],u=d[n.type]||{};null!==l&&(null===o?h[a]=l:(u.mod&&(l-o>u.mod/2?o+=u.mod:o-l>u.mod/2&&(o-=u.mod)),h[a]=i((l-o)*t+o,n)))}),this[n](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(t)._rgba;return l(e.map(i,function(e,t){return(1-s)*n[t]+s*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,s=e[0]/255,n=e[1]/255,a=e[2]/255,o=e[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,u=r+h,d=.5*u;return t=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=d?l/u:l/(2-u),[Math.round(t)%360,i,d,null==o?1:o]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],s=e[2],a=e[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,t+1/3)),Math.round(255*n(r,o,t)),Math.round(255*n(r,o,t-1/3)),a]},f(u,function(s,n){var a=n.props,o=n.cache,h=n.to,u=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===t)return this[o].slice();var n,r=e.type(s),d="array"===r||"object"===r?s:arguments,c=this[o].slice();return f(a,function(e,t){var s=d["object"===r?e:t.idx];null==s&&(s=c[t.idx]),c[t.idx]=i(s,t)}),u?(n=l(u(c)),n[o]=c,n):l(c)},f(a,function(t,i){l.fn[t]||(l.fn[t]=function(n){var a,o=e.type(n),h="alpha"===t?this._hsla?"hsla":"rgba":s,l=this[h](),u=l[i.idx];return"undefined"===o?u:("function"===o&&(n=n.call(this,u),o=e.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=u+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,n){var a,o,r="";if("transparent"!==n&&("string"!==e.type(n)||(a=s(n)))){if(n=l(a||n),!c.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{t.style[i]=n}catch(h){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook(o),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,s){t["border"+s+"Color"]=e}),t}},a=e.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"}}(b),function(){function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[e.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function i(t,i){var s,a,o={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.step[s]||!isNaN(parseFloat(a)))&&(o[s]=a));return o}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(n,a,o,r){var h=e.speed(a,o,r);return this.queue(function(){var a,o=e(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var i=e(this);return{el:i,start:t(this)}}),a=function(){e.each(s,function(e,t){n[t]&&o[t+"Class"](n[t])})},a(),l=l.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var t=this,i=e.Deferred(),s=e.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,s),i.promise()}),e.when.apply(e,l.get()).done(function(){a(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),h.complete.call(o[0])})})},e.fn.extend({addClass:function(t){return function(i,s,n,a){return s?e.effects.animateClass.call(this,{add:i},s,n,a):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,s,n,a){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},s,n,a):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,s,n,a,o){return"boolean"==typeof s||void 0===s?n?e.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},s,n,a)}}(e.fn.toggleClass),switchClass:function(t,i,s,n,a){return e.effects.animateClass.call(this,{add:i,remove:t},s,n,a)}})}(),function(){function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(n=s,s=i,i={}),e.isFunction(s)&&(n=s,s=null),i&&e.extend(t,i),s=s||i.duration,t.duration=e.fx.off?0:"number"==typeof s?s:s in e.fx.speeds?e.fx.speeds[s]:e.fx.speeds._default,t.complete=n||i.complete,t}function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.11.2",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},restore:function(e,t){var i,s;for(s=0;t.length>s;s++)null!==t[s]&&(i=e.data(y+t[s]),void 0===i&&(i=""),e.css(t[s],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,s;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":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=e[1]/t.width}return{x:s,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},s=e("

    ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:t.width(),height:t.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return t.wrap(s),(t[0]===a||e.contains(t[0],a))&&e(a).focus(),s=t.parent(),"static"===t.css("position")?(s.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,s){i[s]=t.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(n),s.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,s,n){return n=n||{},e.each(i,function(e,i){var a=t.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)&&t()}var n=e(this),a=s.complete,r=s.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),i()):o.call(n[0],s,i)}var s=t.apply(this,arguments),n=s.mode,a=s.queue,o=e.effects.effect[s.effect];return e.fx.off||!o?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):a===!1?this.each(i):this.queue(a||"fx",i)},show:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(s){if(i(s)||"boolean"==typeof s)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),s=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(s=[parseFloat(i),t])}),s}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{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;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}(),e.effects,e.effects.effect.blind=function(t,i){var s,n,a,o=e(this),r=/up|down|vertical/,h=/up|left|vertical|horizontal/,l=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(o,t.mode||"hide"),d=t.direction||"up",c=r.test(d),p=c?"height":"width",f=c?"top":"left",m=h.test(d),g={},v="show"===u;o.parent().is(".ui-effects-wrapper")?e.effects.save(o.parent(),l):e.effects.save(o,l),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n=s[p](),a=parseFloat(s.css(f))||0,g[p]=v?n:0,m||(o.css(c?"bottom":"right",0).css(c?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:n+a),v&&(s.css(p,0),m||s.css(f,a+n)),s.animate(g,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===u&&o.hide(),e.effects.restore(o,l),e.effects.removeWrapper(o),i()}})},e.effects.effect.bounce=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"effect"),l="hide"===h,u="show"===h,d=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(u||l?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=o.queue(),_=b.length;for((u||l)&&r.push("opacity"),e.effects.save(o,r),o.show(),e.effects.createWrapper(o),c||(c=o["top"===v?"outerHeight":"outerWidth"]()/3),u&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,y?2*-c:2*c).animate(a,m,g)),l&&(c/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g).animate(a,m,g),c=l?2*c:c/2;l&&(n={opacity:0},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),o.dequeue()},e.effects.effect.clip=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"hide"),l="show"===h,u=t.direction||"vertical",d="vertical"===u,c=d?"height":"width",p=d?"top":"left",f={};e.effects.save(o,r),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[c](),l&&(n.css(c,0),n.css(p,a/2)),f[c]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){l||o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})},e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(n,t.mode||"hide"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h?"pos":"neg",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===u?-s:s),d[l]=(r?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*c&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),m||p.hide(),i()}var a,o,r,h,l,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(h=g.top+a*y,u=a-(d-1)/2,o=0;c>o;o++)r=g.left+o*v,l=o-(c-1)/2,p.clone().appendTo("body").wrap("
    ").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:r+(m?l*v:0),top:h+(m?u*y:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:u*y),opacity:m?1:0},t.duration||500,t.easing,s)},e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),h="show"===r,l="hide"===r,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=h!==c,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(u=parseInt(d[1],10)/100*n[l?0:1]),h&&s.css(c?{height:0,width:u}:{height:u,width:0}),g[f[0]]=h?n[0]:u,v[f[1]]=h?n[1]:0,s.animate(g,m,t.easing).animate(v,m,t.easing,function(){l&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})},e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})},e.effects.effect.size=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=o.css("position"),y=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===t.mode&&"show"===p?(o.from=t.to||b,o.to=t.from||s):(o.from=t.from||("show"===p?b:s),o.to=t.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(y=y.concat(d),o.from=e.effects.setTransition(o,d,a.from.y,o.from),o.to=e.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,a.from.x,o.from),o.to=e.effects.setTransition(o,c,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(y=y.concat(u).concat(l),o.from=e.effects.setTransition(o,u,a.from.y,o.from),o.to=e.effects.setTransition(o,u,a.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=e.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),c=c.concat(["marginLeft","marginRight"]),l=r.concat(d).concat(c),o.find("*[width]").each(function(){var i=e(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()}; -f&&e.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=e.effects.setTransition(i,d,a.from.y,i.from),i.to=e.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=e.effects.setTransition(i,c,a.from.x,i.from),i.to=e.effects.setTransition(i,c,a.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),e.effects.restore(o,y),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,i){var s=parseInt(i,10),n=e?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),e.effects.removeWrapper(o),i()}})},e.effects.effect.scale=function(t,i){var s=e(this),n=e.extend(!0,{},t),a=e.effects.setMode(s,t.mode||"effect"),o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===a?0:100),r=t.direction||"both",h=t.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=t.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*u.y,width:l.width*u.x,outerHeight:l.outerHeight*u.y,outerWidth:l.outerWidth*u.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},e.effects.effect.puff=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"hide"),a="hide"===n,o=parseInt(t.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(t)},e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(t.times||5)+(h?1:0),u=t.duration/l,d=0,c=n.queue(),p=c.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),d=1),s=1;l>s;s++)n.animate({opacity:d},u,t.easing),d=1-d;n.animate({opacity:d},u,t.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&c.splice.apply(c,[1,0].concat(c.splice(p,l+1))),n.dequeue()},e.effects.effect.shake=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(n,t.mode||"effect"),r=t.direction||"left",h=t.distance||20,l=t.times||3,u=2*l+1,d=Math.round(t.duration/u),c="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),y=v.length;for(e.effects.save(n,a),n.show(),e.effects.createWrapper(n),f[c]=(p?"-=":"+=")+h,m[c]=(p?"+=":"-=")+2*h,g[c]=(p?"-=":"+=")+2*h,n.animate(f,d,t.easing),s=1;l>s;s++)n.animate(m,d,t.easing).animate(g,d,t.easing);n.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,u+1))),n.dequeue()},e.effects.effect.slide=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","width","height"],o=e.effects.setMode(n,t.mode||"show"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h,d={};e.effects.save(n,a),n.show(),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,u?isNaN(s)?"-"+s:-s:s),d[l]=(r?u?"+=":"-=":u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a="fixed"===n.css("position"),o=e("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),u={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),c=e("
    ").appendTo(document.body).addClass(t.className).css({top:d.top-r,left:d.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){c.remove(),i()})},e.widget("ui.progressbar",{version:"1.11.2",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("
    ").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),this._refreshValue(),void 0)},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("
    ").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectable",e.ui.mouse,{version:"1.11.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("
    ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.selectmenu",{version:"1.11.2",defaultElement:"",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,s){var n=i.attr(s);void 0!==n&&n.length&&(t[s]=n)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,s=e.ui.keyCode;switch(t.keyCode){case s.UP:return this._repeat(null,1,t),!0;case s.DOWN:return this._repeat(null,-1,t),!0;case s.PAGE_UP:return this._repeat(null,i.page,t),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,s=this.options;return t=null!==s.min?s.min:0,i=e-t,i=Math.round(i/s.step)*s.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==s.max&&e>s.max?s.max:null!==s.min&&s.min>e?s.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:h(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:h(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:h(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:h(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:h(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(h(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,""),s=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr("aria-controls")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function s(){return t>n&&(t=0),0>t&&(t=n),t}for(var n=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0] -}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,o,r=e(s).uniqueId().attr("id"),h=e(s).closest("li"),l=h.attr("aria-controls");t._isLocal(s)?(n=s.hash,o=n.substring(1),a=t.element.find(t._sanitizeSelector(n))):(o=h.attr("aria-controls")||e({}).uniqueId()[0].id,n="#"+o,a=t.element.find(n),a.length||(a=t._createPanel(o),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr("aria-live","polite")),a.length&&(t.panels=t.panels.add(a)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":o,"aria-labelledby":r}),a.attr("aria-labelledby",r)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("
    ").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s=this.element.parent();"fill"===t?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),s=t.css("position");"absolute"!==s&&"fixed"!==s&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?e():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:r?e():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?e():a,this.xhr&&this.xhr.abort(),l.length||h.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,u))},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var s=this,n=this.tabs.eq(t),a=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),r={tab:n,panel:o};this._isLocal(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){o.html(e),s._trigger("load",i,r)},1)}).complete(function(e,t){setTimeout(function(){"abort"===t&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,a){return n._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:a},s))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.widget("ui.tooltip",{version:"1.11.2",options:{content:function(){var t=e(this).attr("title")||"";return e("").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var s=(t.attr("aria-describedby")||"").split(/\s+/);s.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(s.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),s=(t.attr("aria-describedby")||"").split(/\s+/),n=e.inArray(i,s);-1!==n&&s.splice(n,1),t.removeData("ui-tooltip-id"),s=e.trim(s.join(" ")),s?t.attr("aria-describedby",s):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("
    ").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var s=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){s._updateContent(t.element)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur");n.target=n.currentTarget=s.element[0],t.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,s=e(t?t.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&s.parents().each(function(){var t,s=e(this);s.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,t))},_updateContent:function(e,t){var i,s=this.options.content,n=this,a=t?t.type:null;return"string"==typeof s?this._open(t,e,s):(i=s.call(e[0],function(i){e.data("ui-tooltip-open")&&n._delay(function(){t&&(t.type=a),this._open(t,e,i)})}),i&&this._open(t,e,i),void 0)},_open:function(t,i,s){function n(e){u.of=e,o.is(":hidden")||o.position(u)}var a,o,r,h,l,u=e.extend({},this.options.position);if(s){if(a=this._find(i))return a.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),a=this._tooltip(i),o=a.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),s.clone?(l=s.clone(),l.removeAttr("id").find("[id]").removeAttr("id")):l=s,e("
    ").html(l).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:n}),n(t)):o.position(e.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){o.is(":visible")&&(n(u.of),clearInterval(h))},e.fx.interval)),this._trigger("open",t,{tooltip:o}),r={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var s=e.Event(t);s.currentTarget=i[0],this.close(s,!0)}}},i[0]!==this.element[0]&&(r.remove=function(){this._removeTooltip(o)}),t&&"mouseover"!==t.type||(r.mouseleave="close"),t&&"focusin"!==t.type||(r.focusout="close"),this._on(!0,i,r)}},close:function(t){var i,s=this,n=e(t?t.currentTarget:this.element),a=this._find(n);a&&(i=a.tooltip,a.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),a.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(e(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete s.parents[t]}),a.closing=!0,this._trigger("close",t,{tooltip:i}),a.hiding||(a.closing=!1)))},_tooltip:function(t){var i=e("
    ").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return e("
    ").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur"),a=s.element;n.target=n.currentTarget=a[0],t.close(n,!0),e("#"+i).remove(),a.data("ui-tooltip-title")&&(a.attr("title")||a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}); \ No newline at end of file +/*! + * jQuery UI 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c, j) { + function k(a, b) { + var d = a.nodeName.toLowerCase(); + if ("area" === d) { + b = a.parentNode; + d = b.name; + if (!a.href || !d || b.nodeName.toLowerCase() !== "map") return false; + a = c("img[usemap=#" + d + "]")[0]; + return !!a && l(a) + } + return (/input|select|textarea|button|object/.test(d) ? !a.disabled : "a" == d ? a.href || b : b) && l(a) + } + + function l(a) { + return !c(a).parents().andSelf().filter(function() { + return c.curCSS(this, "visibility") === "hidden" || c.expr.filters.hidden(this) + }).length + } + c.ui = c.ui || {}; + if (!c.ui.version) { + c.extend(c.ui, { + version: "1.8.16", + keyCode: { + ALT: 18, + BACKSPACE: 8, + CAPS_LOCK: 20, + COMMA: 188, + COMMAND: 91, + COMMAND_LEFT: 91, + COMMAND_RIGHT: 93, + CONTROL: 17, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + INSERT: 45, + LEFT: 37, + MENU: 93, + 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, + SHIFT: 16, + SPACE: 32, + TAB: 9, + UP: 38, + WINDOWS: 91 + } + }); + c.fn.extend({ + propAttr: c.fn.prop || c.fn.attr, + _focus: c.fn.focus, + focus: function(a, b) { + return typeof a === "number" ? this.each(function() { + var d = + this; + setTimeout(function() { + c(d).focus(); + b && b.call(d) + }, a) + }) : this._focus.apply(this, arguments) + }, + scrollParent: function() { + var a; + a = c.browser.msie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? this.parents().filter(function() { + return /(relative|absolute|fixed)/.test(c.curCSS(this, "position", 1)) && /(auto|scroll)/.test(c.curCSS(this, "overflow", 1) + c.curCSS(this, "overflow-y", 1) + c.curCSS(this, "overflow-x", 1)) + }).eq(0) : this.parents().filter(function() { + return /(auto|scroll)/.test(c.curCSS(this, + "overflow", 1) + c.curCSS(this, "overflow-y", 1) + c.curCSS(this, "overflow-x", 1)) + }).eq(0); + return /fixed/.test(this.css("position")) || !a.length ? c(document) : a + }, + zIndex: function(a) { + if (a !== j) return this.css("zIndex", a); + if (this.length) { + a = c(this[0]); + for (var b; a.length && a[0] !== document;) { + b = a.css("position"); + if (b === "absolute" || b === "relative" || b === "fixed") { + b = parseInt(a.css("zIndex"), 10); + if (!isNaN(b) && b !== 0) return b + } + a = a.parent() + } + } + return 0 + }, + disableSelection: function() { + return this.bind((c.support.selectstart ? "selectstart" : + "mousedown") + ".ui-disableSelection", function(a) { + a.preventDefault() + }) + }, + enableSelection: function() { + return this.unbind(".ui-disableSelection") + } + }); + c.each(["Width", "Height"], function(a, b) { + function d(f, g, m, n) { + c.each(e, function() { + g -= parseFloat(c.curCSS(f, "padding" + this, true)) || 0; + if (m) g -= parseFloat(c.curCSS(f, "border" + this + "Width", true)) || 0; + if (n) g -= parseFloat(c.curCSS(f, "margin" + this, true)) || 0 + }); + return g + } + var e = b === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], + h = b.toLowerCase(), + i = { + innerWidth: c.fn.innerWidth, + innerHeight: c.fn.innerHeight, + outerWidth: c.fn.outerWidth, + outerHeight: c.fn.outerHeight + }; + c.fn["inner" + b] = function(f) { + if (f === j) return i["inner" + b].call(this); + return this.each(function() { + c(this).css(h, d(this, f) + "px") + }) + }; + c.fn["outer" + b] = function(f, g) { + if (typeof f !== "number") return i["outer" + b].call(this, f); + return this.each(function() { + c(this).css(h, d(this, f, true, g) + "px") + }) + } + }); + c.extend(c.expr[":"], { + data: function(a, b, d) { + return !!c.data(a, d[3]) + }, + focusable: function(a) { + return k(a, !isNaN(c.attr(a, "tabindex"))) + }, + tabbable: function(a) { + var b = c.attr(a, + "tabindex"), + d = isNaN(b); + return (d || b >= 0) && k(a, !d) + } + }); + c(function() { + var a = document.body, + b = a.appendChild(b = document.createElement("div")); + c.extend(b.style, { + minHeight: "100px", + height: "auto", + padding: 0, + borderWidth: 0 + }); + c.support.minHeight = b.offsetHeight === 100; + c.support.selectstart = "onselectstart" in b; + a.removeChild(b).style.display = "none" + }); + c.extend(c.ui, { + plugin: { + add: function(a, b, d) { + a = c.ui[a].prototype; + for (var e in d) { + a.plugins[e] = a.plugins[e] || []; + a.plugins[e].push([b, d[e]]) + } + }, + call: function(a, b, d) { + if ((b = a.plugins[b]) && + a.element[0].parentNode) + for (var e = 0; e < b.length; e++) a.options[b[e][0]] && b[e][1].apply(a.element, d) + } + }, + contains: function(a, b) { + return document.compareDocumentPosition ? a.compareDocumentPosition(b) & 16 : a !== b && a.contains(b) + }, + hasScroll: function(a, b) { + if (c(a).css("overflow") === "hidden") return false; + b = b && b === "left" ? "scrollLeft" : "scrollTop"; + var d = false; + if (a[b] > 0) return true; + a[b] = 1; + d = a[b] > 0; + a[b] = 0; + return d + }, + isOverAxis: function(a, b, d) { + return a > b && a < b + d + }, + isOver: function(a, b, d, e, h, i) { + return c.ui.isOverAxis(a, d, h) && + c.ui.isOverAxis(b, e, i) + } + }) + } +})(jQuery);; +/*! + * jQuery UI Widget 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b, j) { + if (b.cleanData) { + var k = b.cleanData; + b.cleanData = function(a) { + for (var c = 0, d; + (d = a[c]) != null; c++) try { + b(d).triggerHandler("remove") + } catch (e) {} + k(a) + } + } else { + var l = b.fn.remove; + b.fn.remove = function(a, c) { + return this.each(function() { + if (!c) + if (!a || b.filter(a, [this]).length) b("*", this).add([this]).each(function() { + try { + b(this).triggerHandler("remove") + } catch (d) {} + }); + return l.call(b(this), a, c) + }) + } + } + b.widget = function(a, c, d) { + var e = a.split(".")[0], + f; + a = a.split(".")[1]; + f = e + "-" + a; + if (!d) { + d = c; + c = b.Widget + } + b.expr[":"][f] = + function(h) { + return !!b.data(h, a) + }; + b[e] = b[e] || {}; + b[e][a] = function(h, g) { + arguments.length && this._createWidget(h, g) + }; + c = new c; + c.options = b.extend(true, {}, c.options); + b[e][a].prototype = b.extend(true, c, { + namespace: e, + widgetName: a, + widgetEventPrefix: b[e][a].prototype.widgetEventPrefix || a, + widgetBaseClass: f + }, d); + b.widget.bridge(a, b[e][a]) + }; + b.widget.bridge = function(a, c) { + b.fn[a] = function(d) { + var e = typeof d === "string", + f = Array.prototype.slice.call(arguments, 1), + h = this; + d = !e && f.length ? b.extend.apply(null, [true, d].concat(f)) : + d; + if (e && d.charAt(0) === "_") return h; + e ? this.each(function() { + var g = b.data(this, a), + i = g && b.isFunction(g[d]) ? g[d].apply(g, f) : g; + if (i !== g && i !== j) { + h = i; + return false + } + }) : this.each(function() { + var g = b.data(this, a); + g ? g.option(d || {})._init() : b.data(this, a, new c(d, this)) + }); + return h + } + }; + b.Widget = function(a, c) { + arguments.length && this._createWidget(a, c) + }; + b.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + options: { + disabled: false + }, + _createWidget: function(a, c) { + b.data(c, this.widgetName, this); + this.element = b(c); + this.options = + b.extend(true, {}, this.options, this._getCreateOptions(), a); + var d = this; + this.element.bind("remove." + this.widgetName, function() { + d.destroy() + }); + this._create(); + this._trigger("create"); + this._init() + }, + _getCreateOptions: function() { + return b.metadata && b.metadata.get(this.element[0])[this.widgetName] + }, + _create: function() {}, + _init: function() {}, + destroy: function() { + this.element.unbind("." + this.widgetName).removeData(this.widgetName); + this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + + "-disabled ui-state-disabled") + }, + widget: function() { + return this.element + }, + option: function(a, c) { + var d = a; + if (arguments.length === 0) return b.extend({}, this.options); + if (typeof a === "string") { + if (c === j) return this.options[a]; + d = {}; + d[a] = c + } + this._setOptions(d); + return this + }, + _setOptions: function(a) { + var c = this; + b.each(a, function(d, e) { + c._setOption(d, e) + }); + return this + }, + _setOption: function(a, c) { + this.options[a] = c; + if (a === "disabled") this.widget()[c ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled ui-state-disabled").attr("aria-disabled", + c); + return this + }, + enable: function() { + return this._setOption("disabled", false) + }, + disable: function() { + return this._setOption("disabled", true) + }, + _trigger: function(a, c, d) { + var e = this.options[a]; + c = b.Event(c); + c.type = (a === this.widgetEventPrefix ? a : this.widgetEventPrefix + a).toLowerCase(); + d = d || {}; + if (c.originalEvent) { + a = b.event.props.length; + for (var f; a;) { + f = b.event.props[--a]; + c[f] = c.originalEvent[f] + } + } + this.element.trigger(c, d); + return !(b.isFunction(e) && e.call(this.element[0], c, d) === false || c.isDefaultPrevented()) + } + } +})(jQuery);; +/*! + * jQuery UI Mouse 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b) { + var d = false; + b(document).mouseup(function() { + d = false + }); + b.widget("ui.mouse", { + options: { + cancel: ":input,option", + distance: 1, + delay: 0 + }, + _mouseInit: function() { + var a = this; + this.element.bind("mousedown." + this.widgetName, function(c) { + return a._mouseDown(c) + }).bind("click." + this.widgetName, function(c) { + if (true === b.data(c.target, a.widgetName + ".preventClickEvent")) { + b.removeData(c.target, a.widgetName + ".preventClickEvent"); + c.stopImmediatePropagation(); + return false + } + }); + this.started = false + }, + _mouseDestroy: function() { + this.element.unbind("." + + this.widgetName) + }, + _mouseDown: function(a) { + if (!d) { + this._mouseStarted && this._mouseUp(a); + this._mouseDownEvent = a; + var c = this, + f = a.which == 1, + g = typeof this.options.cancel == "string" && a.target.nodeName ? b(a.target).closest(this.options.cancel).length : false; + if (!f || g || !this._mouseCapture(a)) return true; + this.mouseDelayMet = !this.options.delay; + if (!this.mouseDelayMet) this._mouseDelayTimer = setTimeout(function() { + c.mouseDelayMet = true + }, this.options.delay); + if (this._mouseDistanceMet(a) && this._mouseDelayMet(a)) { + this._mouseStarted = + this._mouseStart(a) !== false; + if (!this._mouseStarted) { + a.preventDefault(); + return true + } + } + true === b.data(a.target, this.widgetName + ".preventClickEvent") && b.removeData(a.target, this.widgetName + ".preventClickEvent"); + this._mouseMoveDelegate = function(e) { + return c._mouseMove(e) + }; + this._mouseUpDelegate = function(e) { + return c._mouseUp(e) + }; + b(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate); + a.preventDefault(); + return d = true + } + }, + _mouseMove: function(a) { + if (b.browser.msie && + !(document.documentMode >= 9) && !a.button) return this._mouseUp(a); + if (this._mouseStarted) { + this._mouseDrag(a); + return a.preventDefault() + } + if (this._mouseDistanceMet(a) && this._mouseDelayMet(a))(this._mouseStarted = this._mouseStart(this._mouseDownEvent, a) !== false) ? this._mouseDrag(a) : this._mouseUp(a); + return !this._mouseStarted + }, + _mouseUp: function(a) { + b(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate); + if (this._mouseStarted) { + this._mouseStarted = + false; + a.target == this._mouseDownEvent.target && b.data(a.target, this.widgetName + ".preventClickEvent", true); + this._mouseStop(a) + } + return false + }, + _mouseDistanceMet: function(a) { + return Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance + }, + _mouseDelayMet: function() { + return this.mouseDelayMet + }, + _mouseStart: function() {}, + _mouseDrag: function() {}, + _mouseStop: function() {}, + _mouseCapture: function() { + return true + } + }) +})(jQuery);; +/* + * jQuery UI Position 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Position + */ +(function(c) { + c.ui = c.ui || {}; + var n = /left|center|right/, + o = /top|center|bottom/, + t = c.fn.position, + u = c.fn.offset; + c.fn.position = function(b) { + if (!b || !b.of) return t.apply(this, arguments); + b = c.extend({}, b); + var a = c(b.of), + d = a[0], + g = (b.collision || "flip").split(" "), + e = b.offset ? b.offset.split(" ") : [0, 0], + h, k, j; + if (d.nodeType === 9) { + h = a.width(); + k = a.height(); + j = { + top: 0, + left: 0 + } + } else if (d.setTimeout) { + h = a.width(); + k = a.height(); + j = { + top: a.scrollTop(), + left: a.scrollLeft() + } + } else if (d.preventDefault) { + b.at = "left top"; + h = k = 0; + j = { + top: b.of.pageY, + left: b.of.pageX + } + } else { + h = a.outerWidth(); + k = a.outerHeight(); + j = a.offset() + } + c.each(["my", "at"], function() { + var f = (b[this] || "").split(" "); + if (f.length === 1) f = n.test(f[0]) ? f.concat(["center"]) : o.test(f[0]) ? ["center"].concat(f) : ["center", "center"]; + f[0] = n.test(f[0]) ? f[0] : "center"; + f[1] = o.test(f[1]) ? f[1] : "center"; + b[this] = f + }); + if (g.length === 1) g[1] = g[0]; + e[0] = parseInt(e[0], 10) || 0; + if (e.length === 1) e[1] = e[0]; + e[1] = parseInt(e[1], 10) || 0; + if (b.at[0] === "right") j.left += h; + else if (b.at[0] === "center") j.left += h / 2; + if (b.at[1] === "bottom") j.top += + k; + else if (b.at[1] === "center") j.top += k / 2; + j.left += e[0]; + j.top += e[1]; + return this.each(function() { + var f = c(this), + l = f.outerWidth(), + m = f.outerHeight(), + p = parseInt(c.curCSS(this, "marginLeft", true)) || 0, + q = parseInt(c.curCSS(this, "marginTop", true)) || 0, + v = l + p + (parseInt(c.curCSS(this, "marginRight", true)) || 0), + w = m + q + (parseInt(c.curCSS(this, "marginBottom", true)) || 0), + i = c.extend({}, j), + r; + if (b.my[0] === "right") i.left -= l; + else if (b.my[0] === "center") i.left -= l / 2; + if (b.my[1] === "bottom") i.top -= m; + else if (b.my[1] === "center") i.top -= + m / 2; + i.left = Math.round(i.left); + i.top = Math.round(i.top); + r = { + left: i.left - p, + top: i.top - q + }; + c.each(["left", "top"], function(s, x) { + c.ui.position[g[s]] && c.ui.position[g[s]][x](i, { + targetWidth: h, + targetHeight: k, + elemWidth: l, + elemHeight: m, + collisionPosition: r, + collisionWidth: v, + collisionHeight: w, + offset: e, + my: b.my, + at: b.at + }) + }); + c.fn.bgiframe && f.bgiframe(); + f.offset(c.extend(i, { + using: b.using + })) + }) + }; + c.ui.position = { + fit: { + left: function(b, a) { + var d = c(window); + d = a.collisionPosition.left + a.collisionWidth - d.width() - d.scrollLeft(); + b.left = + d > 0 ? b.left - d : Math.max(b.left - a.collisionPosition.left, b.left) + }, + top: function(b, a) { + var d = c(window); + d = a.collisionPosition.top + a.collisionHeight - d.height() - d.scrollTop(); + b.top = d > 0 ? b.top - d : Math.max(b.top - a.collisionPosition.top, b.top) + } + }, + flip: { + left: function(b, a) { + if (a.at[0] !== "center") { + var d = c(window); + d = a.collisionPosition.left + a.collisionWidth - d.width() - d.scrollLeft(); + var g = a.my[0] === "left" ? -a.elemWidth : a.my[0] === "right" ? a.elemWidth : 0, + e = a.at[0] === "left" ? a.targetWidth : -a.targetWidth, + h = -2 * a.offset[0]; + b.left += + a.collisionPosition.left < 0 ? g + e + h : d > 0 ? g + e + h : 0 + } + }, + top: function(b, a) { + if (a.at[1] !== "center") { + var d = c(window); + d = a.collisionPosition.top + a.collisionHeight - d.height() - d.scrollTop(); + var g = a.my[1] === "top" ? -a.elemHeight : a.my[1] === "bottom" ? a.elemHeight : 0, + e = a.at[1] === "top" ? a.targetHeight : -a.targetHeight, + h = -2 * a.offset[1]; + b.top += a.collisionPosition.top < 0 ? g + e + h : d > 0 ? g + e + h : 0 + } + } + } + }; + if (!c.offset.setOffset) { + c.offset.setOffset = function(b, a) { + if (/static/.test(c.curCSS(b, "position"))) b.style.position = "relative"; + var d = c(b), + g = d.offset(), + e = parseInt(c.curCSS(b, "top", true), 10) || 0, + h = parseInt(c.curCSS(b, "left", true), 10) || 0; + g = { + top: a.top - g.top + e, + left: a.left - g.left + h + }; + "using" in a ? a.using.call(b, g) : d.css(g) + }; + c.fn.offset = function(b) { + var a = this[0]; + if (!a || !a.ownerDocument) return null; + if (b) return this.each(function() { + c.offset.setOffset(this, b) + }); + return u.call(this) + } + } +})(jQuery);; +/* + * jQuery UI Draggable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d) { + d.widget("ui.draggable", d.ui.mouse, { + widgetEventPrefix: "drag", + options: { + addClasses: true, + appendTo: "parent", + axis: false, + connectToSortable: false, + containment: false, + cursor: "auto", + cursorAt: false, + grid: false, + handle: false, + helper: "original", + iframeFix: false, + opacity: false, + refreshPositions: false, + revert: false, + revertDuration: 500, + scope: "default", + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: false, + snapMode: "both", + snapTolerance: 20, + stack: false, + zIndex: false + }, + _create: function() { + if (this.options.helper == + "original" && !/^(?:r|a|f)/.test(this.element.css("position"))) this.element[0].style.position = "relative"; + this.options.addClasses && this.element.addClass("ui-draggable"); + this.options.disabled && this.element.addClass("ui-draggable-disabled"); + this._mouseInit() + }, + destroy: function() { + if (this.element.data("draggable")) { + this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"); + this._mouseDestroy(); + return this + } + }, + _mouseCapture: function(a) { + var b = + this.options; + if (this.helper || b.disabled || d(a.target).is(".ui-resizable-handle")) return false; + this.handle = this._getHandle(a); + if (!this.handle) return false; + if (b.iframeFix) d(b.iframeFix === true ? "iframe" : b.iframeFix).each(function() { + d('
    ').css({ + width: this.offsetWidth + "px", + height: this.offsetHeight + "px", + position: "absolute", + opacity: "0.001", + zIndex: 1E3 + }).css(d(this).offset()).appendTo("body") + }); + return true + }, + _mouseStart: function(a) { + var b = this.options; + this.helper = this._createHelper(a); + this._cacheHelperProportions(); + if (d.ui.ddmanager) d.ui.ddmanager.current = this; + this._cacheMargins(); + this.cssPosition = this.helper.css("position"); + this.scrollParent = this.helper.scrollParent(); + this.offset = this.positionAbs = this.element.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + d.extend(this.offset, { + click: { + left: a.pageX - this.offset.left, + top: a.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() + }); + this.originalPosition = this.position = this._generatePosition(a); + this.originalPageX = a.pageX; + this.originalPageY = a.pageY; + b.cursorAt && this._adjustOffsetFromHelper(b.cursorAt); + b.containment && this._setContainment(); + if (this._trigger("start", a) === false) { + this._clear(); + return false + } + this._cacheHelperProportions(); + d.ui.ddmanager && !b.dropBehaviour && d.ui.ddmanager.prepareOffsets(this, a); + this.helper.addClass("ui-draggable-dragging"); + this._mouseDrag(a, true); + d.ui.ddmanager && d.ui.ddmanager.dragStart(this, a); + return true + }, + _mouseDrag: function(a, b) { + this.position = this._generatePosition(a); + this.positionAbs = this._convertPositionTo("absolute"); + if (!b) { + b = this._uiHash(); + if (this._trigger("drag", a, b) === false) { + this._mouseUp({}); + return false + } + this.position = b.position + } + if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px"; + if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px"; + d.ui.ddmanager && d.ui.ddmanager.drag(this, a); + return false + }, + _mouseStop: function(a) { + var b = + false; + if (d.ui.ddmanager && !this.options.dropBehaviour) b = d.ui.ddmanager.drop(this, a); + if (this.dropped) { + b = this.dropped; + this.dropped = false + } + if ((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original") return false; + if (this.options.revert == "invalid" && !b || this.options.revert == "valid" && b || this.options.revert === true || d.isFunction(this.options.revert) && this.options.revert.call(this.element, b)) { + var c = this; + d(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, + 10), function() { + c._trigger("stop", a) !== false && c._clear() + }) + } else this._trigger("stop", a) !== false && this._clear(); + return false + }, + _mouseUp: function(a) { + this.options.iframeFix === true && d("div.ui-draggable-iframeFix").each(function() { + this.parentNode.removeChild(this) + }); + d.ui.ddmanager && d.ui.ddmanager.dragStop(this, a); + return d.ui.mouse.prototype._mouseUp.call(this, a) + }, + cancel: function() { + this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(); + return this + }, + _getHandle: function(a) { + var b = !this.options.handle || + !d(this.options.handle, this.element).length ? true : false; + d(this.options.handle, this.element).find("*").andSelf().each(function() { + if (this == a.target) b = true + }); + return b + }, + _createHelper: function(a) { + var b = this.options; + a = d.isFunction(b.helper) ? d(b.helper.apply(this.element[0], [a])) : b.helper == "clone" ? this.element.clone().removeAttr("id") : this.element; + a.parents("body").length || a.appendTo(b.appendTo == "parent" ? this.element[0].parentNode : b.appendTo); + a[0] != this.element[0] && !/(fixed|absolute)/.test(a.css("position")) && + a.css("position", "absolute"); + return a + }, + _adjustOffsetFromHelper: function(a) { + if (typeof a == "string") a = a.split(" "); + if (d.isArray(a)) a = { + left: +a[0], + top: +a[1] || 0 + }; + if ("left" in a) this.offset.click.left = a.left + this.margins.left; + if ("right" in a) this.offset.click.left = this.helperProportions.width - a.right + this.margins.left; + if ("top" in a) this.offset.click.top = a.top + this.margins.top; + if ("bottom" in a) this.offset.click.top = this.helperProportions.height - a.bottom + this.margins.top + }, + _getParentOffset: function() { + this.offsetParent = + this.helper.offsetParent(); + var a = this.offsetParent.offset(); + if (this.cssPosition == "absolute" && this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) { + a.left += this.scrollParent.scrollLeft(); + a.top += this.scrollParent.scrollTop() + } + if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && d.browser.msie) a = { + top: 0, + left: 0 + }; + return { + top: a.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), + left: a.left + (parseInt(this.offsetParent.css("borderLeftWidth"), + 10) || 0) + } + }, + _getRelativeOffset: function() { + if (this.cssPosition == "relative") { + var a = this.element.position(); + return { + top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), + left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() + } + } else return { + top: 0, + left: 0 + } + }, + _cacheMargins: function() { + this.margins = { + left: parseInt(this.element.css("marginLeft"), 10) || 0, + top: parseInt(this.element.css("marginTop"), 10) || 0, + right: parseInt(this.element.css("marginRight"), 10) || 0, + bottom: parseInt(this.element.css("marginBottom"), + 10) || 0 + } + }, + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + } + }, + _setContainment: function() { + var a = this.options; + if (a.containment == "parent") a.containment = this.helper[0].parentNode; + if (a.containment == "document" || a.containment == "window") this.containment = [a.containment == "document" ? 0 : d(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, a.containment == "document" ? 0 : d(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (a.containment == "document" ? 0 : d(window).scrollLeft()) + d(a.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (a.containment == "document" ? 0 : d(window).scrollTop()) + (d(a.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; + if (!/^(document|window|parent)$/.test(a.containment) && a.containment.constructor != Array) { + a = d(a.containment); + var b = a[0]; + if (b) { + a.offset(); + var c = d(b).css("overflow") != + "hidden"; + this.containment = [(parseInt(d(b).css("borderLeftWidth"), 10) || 0) + (parseInt(d(b).css("paddingLeft"), 10) || 0), (parseInt(d(b).css("borderTopWidth"), 10) || 0) + (parseInt(d(b).css("paddingTop"), 10) || 0), (c ? Math.max(b.scrollWidth, b.offsetWidth) : b.offsetWidth) - (parseInt(d(b).css("borderLeftWidth"), 10) || 0) - (parseInt(d(b).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (c ? Math.max(b.scrollHeight, b.offsetHeight) : b.offsetHeight) - (parseInt(d(b).css("borderTopWidth"), + 10) || 0) - (parseInt(d(b).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom]; + this.relative_container = a + } + } else if (a.containment.constructor == Array) this.containment = a.containment + }, + _convertPositionTo: function(a, b) { + if (!b) b = this.position; + a = a == "absolute" ? 1 : -1; + var c = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, + f = /(html|body)/i.test(c[0].tagName); + return { + top: b.top + + this.offset.relative.top * a + this.offset.parent.top * a - (d.browser.safari && d.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : f ? 0 : c.scrollTop()) * a), + left: b.left + this.offset.relative.left * a + this.offset.parent.left * a - (d.browser.safari && d.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : f ? 0 : c.scrollLeft()) * a) + } + }, + _generatePosition: function(a) { + var b = this.options, + c = this.cssPosition == "absolute" && + !(this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, + f = /(html|body)/i.test(c[0].tagName), + e = a.pageX, + h = a.pageY; + if (this.originalPosition) { + var g; + if (this.containment) { + if (this.relative_container) { + g = this.relative_container.offset(); + g = [this.containment[0] + g.left, this.containment[1] + g.top, this.containment[2] + g.left, this.containment[3] + g.top] + } else g = this.containment; + if (a.pageX - this.offset.click.left < g[0]) e = g[0] + this.offset.click.left; + if (a.pageY - this.offset.click.top < g[1]) h = g[1] + this.offset.click.top; + if (a.pageX - this.offset.click.left > g[2]) e = g[2] + this.offset.click.left; + if (a.pageY - this.offset.click.top > g[3]) h = g[3] + this.offset.click.top + } + if (b.grid) { + h = b.grid[1] ? this.originalPageY + Math.round((h - this.originalPageY) / b.grid[1]) * b.grid[1] : this.originalPageY; + h = g ? !(h - this.offset.click.top < g[1] || h - this.offset.click.top > g[3]) ? h : !(h - this.offset.click.top < g[1]) ? h - b.grid[1] : h + b.grid[1] : h; + e = b.grid[0] ? this.originalPageX + Math.round((e - this.originalPageX) / + b.grid[0]) * b.grid[0] : this.originalPageX; + e = g ? !(e - this.offset.click.left < g[0] || e - this.offset.click.left > g[2]) ? e : !(e - this.offset.click.left < g[0]) ? e - b.grid[0] : e + b.grid[0] : e + } + } + return { + top: h - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (d.browser.safari && d.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : f ? 0 : c.scrollTop()), + left: e - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (d.browser.safari && d.browser.version < + 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : f ? 0 : c.scrollLeft()) + } + }, + _clear: function() { + this.helper.removeClass("ui-draggable-dragging"); + this.helper[0] != this.element[0] && !this.cancelHelperRemoval && this.helper.remove(); + this.helper = null; + this.cancelHelperRemoval = false + }, + _trigger: function(a, b, c) { + c = c || this._uiHash(); + d.ui.plugin.call(this, a, [b, c]); + if (a == "drag") this.positionAbs = this._convertPositionTo("absolute"); + return d.Widget.prototype._trigger.call(this, a, b, + c) + }, + plugins: {}, + _uiHash: function() { + return { + helper: this.helper, + position: this.position, + originalPosition: this.originalPosition, + offset: this.positionAbs + } + } + }); + d.extend(d.ui.draggable, { + version: "1.8.16" + }); + d.ui.plugin.add("draggable", "connectToSortable", { + start: function(a, b) { + var c = d(this).data("draggable"), + f = c.options, + e = d.extend({}, b, { + item: c.element + }); + c.sortables = []; + d(f.connectToSortable).each(function() { + var h = d.data(this, "sortable"); + if (h && !h.options.disabled) { + c.sortables.push({ + instance: h, + shouldRevert: h.options.revert + }); + h.refreshPositions(); + h._trigger("activate", a, e) + } + }) + }, + stop: function(a, b) { + var c = d(this).data("draggable"), + f = d.extend({}, b, { + item: c.element + }); + d.each(c.sortables, function() { + if (this.instance.isOver) { + this.instance.isOver = 0; + c.cancelHelperRemoval = true; + this.instance.cancelHelperRemoval = false; + if (this.shouldRevert) this.instance.options.revert = true; + this.instance._mouseStop(a); + this.instance.options.helper = this.instance.options._helper; + c.options.helper == "original" && this.instance.currentItem.css({ + top: "auto", + left: "auto" + }) + } else { + this.instance.cancelHelperRemoval = + false; + this.instance._trigger("deactivate", a, f) + } + }) + }, + drag: function(a, b) { + var c = d(this).data("draggable"), + f = this; + d.each(c.sortables, function() { + this.instance.positionAbs = c.positionAbs; + this.instance.helperProportions = c.helperProportions; + this.instance.offset.click = c.offset.click; + if (this.instance._intersectsWith(this.instance.containerCache)) { + if (!this.instance.isOver) { + this.instance.isOver = 1; + this.instance.currentItem = d(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", true); + this.instance.options._helper = this.instance.options.helper; + this.instance.options.helper = function() { + return b.helper[0] + }; + a.target = this.instance.currentItem[0]; + this.instance._mouseCapture(a, true); + this.instance._mouseStart(a, true, true); + this.instance.offset.click.top = c.offset.click.top; + this.instance.offset.click.left = c.offset.click.left; + this.instance.offset.parent.left -= c.offset.parent.left - this.instance.offset.parent.left; + this.instance.offset.parent.top -= c.offset.parent.top - this.instance.offset.parent.top; + c._trigger("toSortable", a); + c.dropped = this.instance.element; + c.currentItem = c.element; + this.instance.fromOutside = c + } + this.instance.currentItem && this.instance._mouseDrag(a) + } else if (this.instance.isOver) { + this.instance.isOver = 0; + this.instance.cancelHelperRemoval = true; + this.instance.options.revert = false; + this.instance._trigger("out", a, this.instance._uiHash(this.instance)); + this.instance._mouseStop(a, true); + this.instance.options.helper = this.instance.options._helper; + this.instance.currentItem.remove(); + this.instance.placeholder && + this.instance.placeholder.remove(); + c._trigger("fromSortable", a); + c.dropped = false + } + }) + } + }); + d.ui.plugin.add("draggable", "cursor", { + start: function() { + var a = d("body"), + b = d(this).data("draggable").options; + if (a.css("cursor")) b._cursor = a.css("cursor"); + a.css("cursor", b.cursor) + }, + stop: function() { + var a = d(this).data("draggable").options; + a._cursor && d("body").css("cursor", a._cursor) + } + }); + d.ui.plugin.add("draggable", "opacity", { + start: function(a, b) { + a = d(b.helper); + b = d(this).data("draggable").options; + if (a.css("opacity")) b._opacity = + a.css("opacity"); + a.css("opacity", b.opacity) + }, + stop: function(a, b) { + a = d(this).data("draggable").options; + a._opacity && d(b.helper).css("opacity", a._opacity) + } + }); + d.ui.plugin.add("draggable", "scroll", { + start: function() { + var a = d(this).data("draggable"); + if (a.scrollParent[0] != document && a.scrollParent[0].tagName != "HTML") a.overflowOffset = a.scrollParent.offset() + }, + drag: function(a) { + var b = d(this).data("draggable"), + c = b.options, + f = false; + if (b.scrollParent[0] != document && b.scrollParent[0].tagName != "HTML") { + if (!c.axis || c.axis != + "x") + if (b.overflowOffset.top + b.scrollParent[0].offsetHeight - a.pageY < c.scrollSensitivity) b.scrollParent[0].scrollTop = f = b.scrollParent[0].scrollTop + c.scrollSpeed; + else if (a.pageY - b.overflowOffset.top < c.scrollSensitivity) b.scrollParent[0].scrollTop = f = b.scrollParent[0].scrollTop - c.scrollSpeed; + if (!c.axis || c.axis != "y") + if (b.overflowOffset.left + b.scrollParent[0].offsetWidth - a.pageX < c.scrollSensitivity) b.scrollParent[0].scrollLeft = f = b.scrollParent[0].scrollLeft + c.scrollSpeed; + else if (a.pageX - b.overflowOffset.left < + c.scrollSensitivity) b.scrollParent[0].scrollLeft = f = b.scrollParent[0].scrollLeft - c.scrollSpeed + } else { + if (!c.axis || c.axis != "x") + if (a.pageY - d(document).scrollTop() < c.scrollSensitivity) f = d(document).scrollTop(d(document).scrollTop() - c.scrollSpeed); + else if (d(window).height() - (a.pageY - d(document).scrollTop()) < c.scrollSensitivity) f = d(document).scrollTop(d(document).scrollTop() + c.scrollSpeed); + if (!c.axis || c.axis != "y") + if (a.pageX - d(document).scrollLeft() < c.scrollSensitivity) f = d(document).scrollLeft(d(document).scrollLeft() - + c.scrollSpeed); + else if (d(window).width() - (a.pageX - d(document).scrollLeft()) < c.scrollSensitivity) f = d(document).scrollLeft(d(document).scrollLeft() + c.scrollSpeed) + } + f !== false && d.ui.ddmanager && !c.dropBehaviour && d.ui.ddmanager.prepareOffsets(b, a) + } + }); + d.ui.plugin.add("draggable", "snap", { + start: function() { + var a = d(this).data("draggable"), + b = a.options; + a.snapElements = []; + d(b.snap.constructor != String ? b.snap.items || ":data(draggable)" : b.snap).each(function() { + var c = d(this), + f = c.offset(); + this != a.element[0] && a.snapElements.push({ + item: this, + width: c.outerWidth(), + height: c.outerHeight(), + top: f.top, + left: f.left + }) + }) + }, + drag: function(a, b) { + for (var c = d(this).data("draggable"), f = c.options, e = f.snapTolerance, h = b.offset.left, g = h + c.helperProportions.width, n = b.offset.top, o = n + c.helperProportions.height, i = c.snapElements.length - 1; i >= 0; i--) { + var j = c.snapElements[i].left, + l = j + c.snapElements[i].width, + k = c.snapElements[i].top, + m = k + c.snapElements[i].height; + if (j - e < h && h < l + e && k - e < n && n < m + e || j - e < h && h < l + e && k - e < o && o < m + e || j - e < g && g < l + e && k - e < n && n < m + e || j - e < g && g < l + e && k - e < o && + o < m + e) { + if (f.snapMode != "inner") { + var p = Math.abs(k - o) <= e, + q = Math.abs(m - n) <= e, + r = Math.abs(j - g) <= e, + s = Math.abs(l - h) <= e; + if (p) b.position.top = c._convertPositionTo("relative", { + top: k - c.helperProportions.height, + left: 0 + }).top - c.margins.top; + if (q) b.position.top = c._convertPositionTo("relative", { + top: m, + left: 0 + }).top - c.margins.top; + if (r) b.position.left = c._convertPositionTo("relative", { + top: 0, + left: j - c.helperProportions.width + }).left - c.margins.left; + if (s) b.position.left = c._convertPositionTo("relative", { + top: 0, + left: l + }).left - c.margins.left + } + var t = + p || q || r || s; + if (f.snapMode != "outer") { + p = Math.abs(k - n) <= e; + q = Math.abs(m - o) <= e; + r = Math.abs(j - h) <= e; + s = Math.abs(l - g) <= e; + if (p) b.position.top = c._convertPositionTo("relative", { + top: k, + left: 0 + }).top - c.margins.top; + if (q) b.position.top = c._convertPositionTo("relative", { + top: m - c.helperProportions.height, + left: 0 + }).top - c.margins.top; + if (r) b.position.left = c._convertPositionTo("relative", { + top: 0, + left: j + }).left - c.margins.left; + if (s) b.position.left = c._convertPositionTo("relative", { + top: 0, + left: l - c.helperProportions.width + }).left - c.margins.left + } + if (!c.snapElements[i].snapping && + (p || q || r || s || t)) c.options.snap.snap && c.options.snap.snap.call(c.element, a, d.extend(c._uiHash(), { + snapItem: c.snapElements[i].item + })); + c.snapElements[i].snapping = p || q || r || s || t + } else { + c.snapElements[i].snapping && c.options.snap.release && c.options.snap.release.call(c.element, a, d.extend(c._uiHash(), { + snapItem: c.snapElements[i].item + })); + c.snapElements[i].snapping = false + } + } + } + }); + d.ui.plugin.add("draggable", "stack", { + start: function() { + var a = d(this).data("draggable").options; + a = d.makeArray(d(a.stack)).sort(function(c, f) { + return (parseInt(d(c).css("zIndex"), + 10) || 0) - (parseInt(d(f).css("zIndex"), 10) || 0) + }); + if (a.length) { + var b = parseInt(a[0].style.zIndex) || 0; + d(a).each(function(c) { + this.style.zIndex = b + c + }); + this[0].style.zIndex = b + a.length + } + } + }); + d.ui.plugin.add("draggable", "zIndex", { + start: function(a, b) { + a = d(b.helper); + b = d(this).data("draggable").options; + if (a.css("zIndex")) b._zIndex = a.css("zIndex"); + a.css("zIndex", b.zIndex) + }, + stop: function(a, b) { + a = d(this).data("draggable").options; + a._zIndex && d(b.helper).css("zIndex", a._zIndex) + } + }) +})(jQuery);; +/* + * jQuery UI Droppable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Droppables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.mouse.js + * jquery.ui.draggable.js + */ +(function(d) { + d.widget("ui.droppable", { + widgetEventPrefix: "drop", + options: { + accept: "*", + activeClass: false, + addClasses: true, + greedy: false, + hoverClass: false, + scope: "default", + tolerance: "intersect" + }, + _create: function() { + var a = this.options, + b = a.accept; + this.isover = 0; + this.isout = 1; + this.accept = d.isFunction(b) ? b : function(c) { + return c.is(b) + }; + this.proportions = { + width: this.element[0].offsetWidth, + height: this.element[0].offsetHeight + }; + d.ui.ddmanager.droppables[a.scope] = d.ui.ddmanager.droppables[a.scope] || []; + d.ui.ddmanager.droppables[a.scope].push(this); + a.addClasses && this.element.addClass("ui-droppable") + }, + destroy: function() { + for (var a = d.ui.ddmanager.droppables[this.options.scope], b = 0; b < a.length; b++) a[b] == this && a.splice(b, 1); + this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"); + return this + }, + _setOption: function(a, b) { + if (a == "accept") this.accept = d.isFunction(b) ? b : function(c) { + return c.is(b) + }; + d.Widget.prototype._setOption.apply(this, arguments) + }, + _activate: function(a) { + var b = d.ui.ddmanager.current; + this.options.activeClass && + this.element.addClass(this.options.activeClass); + b && this._trigger("activate", a, this.ui(b)) + }, + _deactivate: function(a) { + var b = d.ui.ddmanager.current; + this.options.activeClass && this.element.removeClass(this.options.activeClass); + b && this._trigger("deactivate", a, this.ui(b)) + }, + _over: function(a) { + var b = d.ui.ddmanager.current; + if (!(!b || (b.currentItem || b.element)[0] == this.element[0])) + if (this.accept.call(this.element[0], b.currentItem || b.element)) { + this.options.hoverClass && this.element.addClass(this.options.hoverClass); + this._trigger("over", a, this.ui(b)) + } + }, + _out: function(a) { + var b = d.ui.ddmanager.current; + if (!(!b || (b.currentItem || b.element)[0] == this.element[0])) + if (this.accept.call(this.element[0], b.currentItem || b.element)) { + this.options.hoverClass && this.element.removeClass(this.options.hoverClass); + this._trigger("out", a, this.ui(b)) + } + }, + _drop: function(a, b) { + var c = b || d.ui.ddmanager.current; + if (!c || (c.currentItem || c.element)[0] == this.element[0]) return false; + var e = false; + this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() { + var g = + d.data(this, "droppable"); + if (g.options.greedy && !g.options.disabled && g.options.scope == c.options.scope && g.accept.call(g.element[0], c.currentItem || c.element) && d.ui.intersect(c, d.extend(g, { + offset: g.element.offset() + }), g.options.tolerance)) { + e = true; + return false + } + }); + if (e) return false; + if (this.accept.call(this.element[0], c.currentItem || c.element)) { + this.options.activeClass && this.element.removeClass(this.options.activeClass); + this.options.hoverClass && this.element.removeClass(this.options.hoverClass); + this._trigger("drop", + a, this.ui(c)); + return this.element + } + return false + }, + ui: function(a) { + return { + draggable: a.currentItem || a.element, + helper: a.helper, + position: a.position, + offset: a.positionAbs + } + } + }); + d.extend(d.ui.droppable, { + version: "1.8.16" + }); + d.ui.intersect = function(a, b, c) { + if (!b.offset) return false; + var e = (a.positionAbs || a.position.absolute).left, + g = e + a.helperProportions.width, + f = (a.positionAbs || a.position.absolute).top, + h = f + a.helperProportions.height, + i = b.offset.left, + k = i + b.proportions.width, + j = b.offset.top, + l = j + b.proportions.height; + switch (c) { + case "fit": + return i <= e && g <= k && j <= f && h <= l; + case "intersect": + return i < e + a.helperProportions.width / 2 && g - a.helperProportions.width / 2 < k && j < f + a.helperProportions.height / 2 && h - a.helperProportions.height / 2 < l; + case "pointer": + return d.ui.isOver((a.positionAbs || a.position.absolute).top + (a.clickOffset || a.offset.click).top, (a.positionAbs || a.position.absolute).left + (a.clickOffset || a.offset.click).left, j, i, b.proportions.height, b.proportions.width); + case "touch": + return (f >= j && f <= l || h >= j && h <= l || f < j && h > l) && (e >= + i && e <= k || g >= i && g <= k || e < i && g > k); + default: + return false + } + }; + d.ui.ddmanager = { + current: null, + droppables: { + "default": [] + }, + prepareOffsets: function(a, b) { + var c = d.ui.ddmanager.droppables[a.options.scope] || [], + e = b ? b.type : null, + g = (a.currentItem || a.element).find(":data(droppable)").andSelf(), + f = 0; + a: for (; f < c.length; f++) + if (!(c[f].options.disabled || a && !c[f].accept.call(c[f].element[0], a.currentItem || a.element))) { + for (var h = 0; h < g.length; h++) + if (g[h] == c[f].element[0]) { + c[f].proportions.height = 0; + continue a + } + c[f].visible = c[f].element.css("display") != + "none"; + if (c[f].visible) { + e == "mousedown" && c[f]._activate.call(c[f], b); + c[f].offset = c[f].element.offset(); + c[f].proportions = { + width: c[f].element[0].offsetWidth, + height: c[f].element[0].offsetHeight + } + } + } + }, + drop: function(a, b) { + var c = false; + d.each(d.ui.ddmanager.droppables[a.options.scope] || [], function() { + if (this.options) { + if (!this.options.disabled && this.visible && d.ui.intersect(a, this, this.options.tolerance)) c = c || this._drop.call(this, b); + if (!this.options.disabled && this.visible && this.accept.call(this.element[0], a.currentItem || + a.element)) { + this.isout = 1; + this.isover = 0; + this._deactivate.call(this, b) + } + } + }); + return c + }, + dragStart: function(a, b) { + a.element.parents(":not(body,html)").bind("scroll.droppable", function() { + a.options.refreshPositions || d.ui.ddmanager.prepareOffsets(a, b) + }) + }, + drag: function(a, b) { + a.options.refreshPositions && d.ui.ddmanager.prepareOffsets(a, b); + d.each(d.ui.ddmanager.droppables[a.options.scope] || [], function() { + if (!(this.options.disabled || this.greedyChild || !this.visible)) { + var c = d.ui.intersect(a, this, this.options.tolerance); + if (c = !c && this.isover == 1 ? "isout" : c && this.isover == 0 ? "isover" : null) { + var e; + if (this.options.greedy) { + var g = this.element.parents(":data(droppable):eq(0)"); + if (g.length) { + e = d.data(g[0], "droppable"); + e.greedyChild = c == "isover" ? 1 : 0 + } + } + if (e && c == "isover") { + e.isover = 0; + e.isout = 1; + e._out.call(e, b) + } + this[c] = 1; + this[c == "isout" ? "isover" : "isout"] = 0; + this[c == "isover" ? "_over" : "_out"].call(this, b); + if (e && c == "isout") { + e.isout = 0; + e.isover = 1; + e._over.call(e, b) + } + } + } + }) + }, + dragStop: function(a, b) { + a.element.parents(":not(body,html)").unbind("scroll.droppable"); + a.options.refreshPositions || d.ui.ddmanager.prepareOffsets(a, b) + } + } +})(jQuery);; +/* + * jQuery UI Resizable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(e) { + e.widget("ui.resizable", e.ui.mouse, { + widgetEventPrefix: "resize", + options: { + alsoResize: false, + animate: false, + animateDuration: "slow", + animateEasing: "swing", + aspectRatio: false, + autoHide: false, + containment: false, + ghost: false, + grid: false, + handles: "e,s,se", + helper: false, + maxHeight: null, + maxWidth: null, + minHeight: 10, + minWidth: 10, + zIndex: 1E3 + }, + _create: function() { + var b = this, + a = this.options; + this.element.addClass("ui-resizable"); + e.extend(this, { + _aspectRatio: !!a.aspectRatio, + aspectRatio: a.aspectRatio, + originalElement: this.element, + _proportionallyResizeElements: [], + _helper: a.helper || a.ghost || a.animate ? a.helper || "ui-resizable-helper" : null + }); + if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { + /relative/.test(this.element.css("position")) && e.browser.opera && this.element.css({ + position: "relative", + top: "auto", + left: "auto" + }); + this.element.wrap(e('
    ').css({ + position: this.element.css("position"), + width: this.element.outerWidth(), + height: this.element.outerHeight(), + top: this.element.css("top"), + left: this.element.css("left") + })); + this.element = this.element.parent().data("resizable", this.element.data("resizable")); + this.elementIsWrapper = true; + this.element.css({ + marginLeft: this.originalElement.css("marginLeft"), + marginTop: this.originalElement.css("marginTop"), + marginRight: this.originalElement.css("marginRight"), + marginBottom: this.originalElement.css("marginBottom") + }); + this.originalElement.css({ + marginLeft: 0, + marginTop: 0, + marginRight: 0, + marginBottom: 0 + }); + this.originalResizeStyle = + this.originalElement.css("resize"); + this.originalElement.css("resize", "none"); + this._proportionallyResizeElements.push(this.originalElement.css({ + position: "static", + zoom: 1, + display: "block" + })); + this.originalElement.css({ + margin: this.originalElement.css("margin") + }); + this._proportionallyResize() + } + this.handles = a.handles || (!e(".ui-resizable-handle", this.element).length ? "e,s,se" : { + n: ".ui-resizable-n", + e: ".ui-resizable-e", + s: ".ui-resizable-s", + w: ".ui-resizable-w", + se: ".ui-resizable-se", + sw: ".ui-resizable-sw", + ne: ".ui-resizable-ne", + nw: ".ui-resizable-nw" + }); + if (this.handles.constructor == String) { + if (this.handles == "all") this.handles = "n,e,s,w,se,sw,ne,nw"; + var c = this.handles.split(","); + this.handles = {}; + for (var d = 0; d < c.length; d++) { + var f = e.trim(c[d]), + g = e('
    '); + /sw|se|ne|nw/.test(f) && g.css({ + zIndex: ++a.zIndex + }); + "se" == f && g.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); + this.handles[f] = ".ui-resizable-" + f; + this.element.append(g) + } + } + this._renderAxis = function(h) { + h = h || this.element; + for (var i in this.handles) { + if (this.handles[i].constructor == + String) this.handles[i] = e(this.handles[i], this.element).show(); + if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { + var j = e(this.handles[i], this.element), + l = 0; + l = /sw|ne|nw|se|n|s/.test(i) ? j.outerHeight() : j.outerWidth(); + j = ["padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" : /^e$/.test(i) ? "Right" : "Left"].join(""); + h.css(j, l); + this._proportionallyResize() + } + e(this.handles[i]) + } + }; + this._renderAxis(this.element); + this._handles = e(".ui-resizable-handle", this.element).disableSelection(); + this._handles.mouseover(function() { + if (!b.resizing) { + if (this.className) var h = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); + b.axis = h && h[1] ? h[1] : "se" + } + }); + if (a.autoHide) { + this._handles.hide(); + e(this.element).addClass("ui-resizable-autohide").hover(function() { + if (!a.disabled) { + e(this).removeClass("ui-resizable-autohide"); + b._handles.show() + } + }, function() { + if (!a.disabled) + if (!b.resizing) { + e(this).addClass("ui-resizable-autohide"); + b._handles.hide() + } + }) + } + this._mouseInit() + }, + destroy: function() { + this._mouseDestroy(); + var b = function(c) { + e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove() + }; + if (this.elementIsWrapper) { + b(this.element); + var a = this.element; + a.after(this.originalElement.css({ + position: a.css("position"), + width: a.outerWidth(), + height: a.outerHeight(), + top: a.css("top"), + left: a.css("left") + })).remove() + } + this.originalElement.css("resize", this.originalResizeStyle); + b(this.originalElement); + return this + }, + _mouseCapture: function(b) { + var a = + false; + for (var c in this.handles) + if (e(this.handles[c])[0] == b.target) a = true; + return !this.options.disabled && a + }, + _mouseStart: function(b) { + var a = this.options, + c = this.element.position(), + d = this.element; + this.resizing = true; + this.documentScroll = { + top: e(document).scrollTop(), + left: e(document).scrollLeft() + }; + if (d.is(".ui-draggable") || /absolute/.test(d.css("position"))) d.css({ + position: "absolute", + top: c.top, + left: c.left + }); + e.browser.opera && /relative/.test(d.css("position")) && d.css({ + position: "relative", + top: "auto", + left: "auto" + }); + this._renderProxy(); + c = m(this.helper.css("left")); + var f = m(this.helper.css("top")); + if (a.containment) { + c += e(a.containment).scrollLeft() || 0; + f += e(a.containment).scrollTop() || 0 + } + this.offset = this.helper.offset(); + this.position = { + left: c, + top: f + }; + this.size = this._helper ? { + width: d.outerWidth(), + height: d.outerHeight() + } : { + width: d.width(), + height: d.height() + }; + this.originalSize = this._helper ? { + width: d.outerWidth(), + height: d.outerHeight() + } : { + width: d.width(), + height: d.height() + }; + this.originalPosition = { + left: c, + top: f + }; + this.sizeDiff = { + width: d.outerWidth() - d.width(), + height: d.outerHeight() - d.height() + }; + this.originalMousePosition = { + left: b.pageX, + top: b.pageY + }; + this.aspectRatio = typeof a.aspectRatio == "number" ? a.aspectRatio : this.originalSize.width / this.originalSize.height || 1; + a = e(".ui-resizable-" + this.axis).css("cursor"); + e("body").css("cursor", a == "auto" ? this.axis + "-resize" : a); + d.addClass("ui-resizable-resizing"); + this._propagate("start", b); + return true + }, + _mouseDrag: function(b) { + var a = this.helper, + c = this.originalMousePosition, + d = this._change[this.axis]; + if (!d) return false; + c = d.apply(this, [b, b.pageX - c.left || 0, b.pageY - c.top || 0]); + this._updateVirtualBoundaries(b.shiftKey); + if (this._aspectRatio || b.shiftKey) c = this._updateRatio(c, b); + c = this._respectSize(c, b); + this._propagate("resize", b); + a.css({ + top: this.position.top + "px", + left: this.position.left + "px", + width: this.size.width + "px", + height: this.size.height + "px" + }); + !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(); + this._updateCache(c); + this._trigger("resize", b, this.ui()); + return false + }, + _mouseStop: function(b) { + this.resizing = false; + var a = this.options, + c = this; + if (this._helper) { + var d = this._proportionallyResizeElements, + f = d.length && /textarea/i.test(d[0].nodeName); + d = f && e.ui.hasScroll(d[0], "left") ? 0 : c.sizeDiff.height; + f = f ? 0 : c.sizeDiff.width; + f = { + width: c.helper.width() - f, + height: c.helper.height() - d + }; + d = parseInt(c.element.css("left"), 10) + (c.position.left - c.originalPosition.left) || null; + var g = parseInt(c.element.css("top"), 10) + (c.position.top - c.originalPosition.top) || null; + a.animate || this.element.css(e.extend(f, { + top: g, + left: d + })); + c.helper.height(c.size.height); + c.helper.width(c.size.width); + this._helper && !a.animate && this._proportionallyResize() + } + e("body").css("cursor", "auto"); + this.element.removeClass("ui-resizable-resizing"); + this._propagate("stop", b); + this._helper && this.helper.remove(); + return false + }, + _updateVirtualBoundaries: function(b) { + var a = this.options, + c, d, f; + a = { + minWidth: k(a.minWidth) ? a.minWidth : 0, + maxWidth: k(a.maxWidth) ? a.maxWidth : Infinity, + minHeight: k(a.minHeight) ? a.minHeight : 0, + maxHeight: k(a.maxHeight) ? a.maxHeight : Infinity + }; + if (this._aspectRatio || b) { + b = a.minHeight * this.aspectRatio; + d = a.minWidth / this.aspectRatio; + c = a.maxHeight * this.aspectRatio; + f = a.maxWidth / this.aspectRatio; + if (b > a.minWidth) a.minWidth = b; + if (d > a.minHeight) a.minHeight = d; + if (c < a.maxWidth) a.maxWidth = c; + if (f < a.maxHeight) a.maxHeight = f + } + this._vBoundaries = a + }, + _updateCache: function(b) { + this.offset = this.helper.offset(); + if (k(b.left)) this.position.left = b.left; + if (k(b.top)) this.position.top = b.top; + if (k(b.height)) this.size.height = b.height; + if (k(b.width)) this.size.width = + b.width + }, + _updateRatio: function(b) { + var a = this.position, + c = this.size, + d = this.axis; + if (k(b.height)) b.width = b.height * this.aspectRatio; + else if (k(b.width)) b.height = b.width / this.aspectRatio; + if (d == "sw") { + b.left = a.left + (c.width - b.width); + b.top = null + } + if (d == "nw") { + b.top = a.top + (c.height - b.height); + b.left = a.left + (c.width - b.width) + } + return b + }, + _respectSize: function(b) { + var a = this._vBoundaries, + c = this.axis, + d = k(b.width) && a.maxWidth && a.maxWidth < b.width, + f = k(b.height) && a.maxHeight && a.maxHeight < b.height, + g = k(b.width) && a.minWidth && + a.minWidth > b.width, + h = k(b.height) && a.minHeight && a.minHeight > b.height; + if (g) b.width = a.minWidth; + if (h) b.height = a.minHeight; + if (d) b.width = a.maxWidth; + if (f) b.height = a.maxHeight; + var i = this.originalPosition.left + this.originalSize.width, + j = this.position.top + this.size.height, + l = /sw|nw|w/.test(c); + c = /nw|ne|n/.test(c); + if (g && l) b.left = i - a.minWidth; + if (d && l) b.left = i - a.maxWidth; + if (h && c) b.top = j - a.minHeight; + if (f && c) b.top = j - a.maxHeight; + if ((a = !b.width && !b.height) && !b.left && b.top) b.top = null; + else if (a && !b.top && b.left) b.left = + null; + return b + }, + _proportionallyResize: function() { + if (this._proportionallyResizeElements.length) + for (var b = this.helper || this.element, a = 0; a < this._proportionallyResizeElements.length; a++) { + var c = this._proportionallyResizeElements[a]; + if (!this.borderDif) { + var d = [c.css("borderTopWidth"), c.css("borderRightWidth"), c.css("borderBottomWidth"), c.css("borderLeftWidth")], + f = [c.css("paddingTop"), c.css("paddingRight"), c.css("paddingBottom"), c.css("paddingLeft")]; + this.borderDif = e.map(d, function(g, h) { + g = parseInt(g, 10) || + 0; + h = parseInt(f[h], 10) || 0; + return g + h + }) + } + e.browser.msie && (e(b).is(":hidden") || e(b).parents(":hidden").length) || c.css({ + height: b.height() - this.borderDif[0] - this.borderDif[2] || 0, + width: b.width() - this.borderDif[1] - this.borderDif[3] || 0 + }) + } + }, + _renderProxy: function() { + var b = this.options; + this.elementOffset = this.element.offset(); + if (this._helper) { + this.helper = this.helper || e('
    '); + var a = e.browser.msie && e.browser.version < 7, + c = a ? 1 : 0; + a = a ? 2 : -1; + this.helper.addClass(this._helper).css({ + width: this.element.outerWidth() + + a, + height: this.element.outerHeight() + a, + position: "absolute", + left: this.elementOffset.left - c + "px", + top: this.elementOffset.top - c + "px", + zIndex: ++b.zIndex + }); + this.helper.appendTo("body").disableSelection() + } else this.helper = this.element + }, + _change: { + e: function(b, a) { + return { + width: this.originalSize.width + a + } + }, + w: function(b, a) { + return { + left: this.originalPosition.left + a, + width: this.originalSize.width - a + } + }, + n: function(b, a, c) { + return { + top: this.originalPosition.top + c, + height: this.originalSize.height - c + } + }, + s: function(b, a, c) { + return { + height: this.originalSize.height + + c + } + }, + se: function(b, a, c) { + return e.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [b, a, c])) + }, + sw: function(b, a, c) { + return e.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [b, a, c])) + }, + ne: function(b, a, c) { + return e.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [b, a, c])) + }, + nw: function(b, a, c) { + return e.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [b, a, c])) + } + }, + _propagate: function(b, a) { + e.ui.plugin.call(this, b, [a, this.ui()]); + b != "resize" && this._trigger(b, a, this.ui()) + }, + plugins: {}, + ui: function() { + return { + originalElement: this.originalElement, + element: this.element, + helper: this.helper, + position: this.position, + size: this.size, + originalSize: this.originalSize, + originalPosition: this.originalPosition + } + } + }); + e.extend(e.ui.resizable, { + version: "1.8.16" + }); + e.ui.plugin.add("resizable", "alsoResize", { + start: function() { + var b = e(this).data("resizable").options, + a = function(c) { + e(c).each(function() { + var d = e(this); + d.data("resizable-alsoresize", { + width: parseInt(d.width(), + 10), + height: parseInt(d.height(), 10), + left: parseInt(d.css("left"), 10), + top: parseInt(d.css("top"), 10), + position: d.css("position") + }) + }) + }; + if (typeof b.alsoResize == "object" && !b.alsoResize.parentNode) + if (b.alsoResize.length) { + b.alsoResize = b.alsoResize[0]; + a(b.alsoResize) + } else e.each(b.alsoResize, function(c) { + a(c) + }); + else a(b.alsoResize) + }, + resize: function(b, a) { + var c = e(this).data("resizable"); + b = c.options; + var d = c.originalSize, + f = c.originalPosition, + g = { + height: c.size.height - d.height || 0, + width: c.size.width - d.width || 0, + top: c.position.top - + f.top || 0, + left: c.position.left - f.left || 0 + }, + h = function(i, j) { + e(i).each(function() { + var l = e(this), + q = e(this).data("resizable-alsoresize"), + p = {}, + r = j && j.length ? j : l.parents(a.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; + e.each(r, function(n, o) { + if ((n = (q[o] || 0) + (g[o] || 0)) && n >= 0) p[o] = n || null + }); + if (e.browser.opera && /relative/.test(l.css("position"))) { + c._revertToRelativePosition = true; + l.css({ + position: "absolute", + top: "auto", + left: "auto" + }) + } + l.css(p) + }) + }; + typeof b.alsoResize == "object" && !b.alsoResize.nodeType ? + e.each(b.alsoResize, function(i, j) { + h(i, j) + }) : h(b.alsoResize) + }, + stop: function() { + var b = e(this).data("resizable"), + a = b.options, + c = function(d) { + e(d).each(function() { + var f = e(this); + f.css({ + position: f.data("resizable-alsoresize").position + }) + }) + }; + if (b._revertToRelativePosition) { + b._revertToRelativePosition = false; + typeof a.alsoResize == "object" && !a.alsoResize.nodeType ? e.each(a.alsoResize, function(d) { + c(d) + }) : c(a.alsoResize) + } + e(this).removeData("resizable-alsoresize") + } + }); + e.ui.plugin.add("resizable", "animate", { + stop: function(b) { + var a = + e(this).data("resizable"), + c = a.options, + d = a._proportionallyResizeElements, + f = d.length && /textarea/i.test(d[0].nodeName), + g = f && e.ui.hasScroll(d[0], "left") ? 0 : a.sizeDiff.height; + f = { + width: a.size.width - (f ? 0 : a.sizeDiff.width), + height: a.size.height - g + }; + g = parseInt(a.element.css("left"), 10) + (a.position.left - a.originalPosition.left) || null; + var h = parseInt(a.element.css("top"), 10) + (a.position.top - a.originalPosition.top) || null; + a.element.animate(e.extend(f, h && g ? { + top: h, + left: g + } : {}), { + duration: c.animateDuration, + easing: c.animateEasing, + step: function() { + var i = { + width: parseInt(a.element.css("width"), 10), + height: parseInt(a.element.css("height"), 10), + top: parseInt(a.element.css("top"), 10), + left: parseInt(a.element.css("left"), 10) + }; + d && d.length && e(d[0]).css({ + width: i.width, + height: i.height + }); + a._updateCache(i); + a._propagate("resize", b) + } + }) + } + }); + e.ui.plugin.add("resizable", "containment", { + start: function() { + var b = e(this).data("resizable"), + a = b.element, + c = b.options.containment; + if (a = c instanceof e ? c.get(0) : /parent/.test(c) ? a.parent().get(0) : c) { + b.containerElement = + e(a); + if (/document/.test(c) || c == document) { + b.containerOffset = { + left: 0, + top: 0 + }; + b.containerPosition = { + left: 0, + top: 0 + }; + b.parentData = { + element: e(document), + left: 0, + top: 0, + width: e(document).width(), + height: e(document).height() || document.body.parentNode.scrollHeight + } + } else { + var d = e(a), + f = []; + e(["Top", "Right", "Left", "Bottom"]).each(function(i, j) { + f[i] = m(d.css("padding" + j)) + }); + b.containerOffset = d.offset(); + b.containerPosition = d.position(); + b.containerSize = { + height: d.innerHeight() - f[3], + width: d.innerWidth() - f[1] + }; + c = b.containerOffset; + var g = b.containerSize.height, + h = b.containerSize.width; + h = e.ui.hasScroll(a, "left") ? a.scrollWidth : h; + g = e.ui.hasScroll(a) ? a.scrollHeight : g; + b.parentData = { + element: a, + left: c.left, + top: c.top, + width: h, + height: g + } + } + } + }, + resize: function(b) { + var a = e(this).data("resizable"), + c = a.options, + d = a.containerOffset, + f = a.position; + b = a._aspectRatio || b.shiftKey; + var g = { + top: 0, + left: 0 + }, + h = a.containerElement; + if (h[0] != document && /static/.test(h.css("position"))) g = d; + if (f.left < (a._helper ? d.left : 0)) { + a.size.width += a._helper ? a.position.left - d.left : + a.position.left - g.left; + if (b) a.size.height = a.size.width / c.aspectRatio; + a.position.left = c.helper ? d.left : 0 + } + if (f.top < (a._helper ? d.top : 0)) { + a.size.height += a._helper ? a.position.top - d.top : a.position.top; + if (b) a.size.width = a.size.height * c.aspectRatio; + a.position.top = a._helper ? d.top : 0 + } + a.offset.left = a.parentData.left + a.position.left; + a.offset.top = a.parentData.top + a.position.top; + c = Math.abs((a._helper ? a.offset.left - g.left : a.offset.left - g.left) + a.sizeDiff.width); + d = Math.abs((a._helper ? a.offset.top - g.top : a.offset.top - + d.top) + a.sizeDiff.height); + f = a.containerElement.get(0) == a.element.parent().get(0); + g = /relative|absolute/.test(a.containerElement.css("position")); + if (f && g) c -= a.parentData.left; + if (c + a.size.width >= a.parentData.width) { + a.size.width = a.parentData.width - c; + if (b) a.size.height = a.size.width / a.aspectRatio + } + if (d + a.size.height >= a.parentData.height) { + a.size.height = a.parentData.height - d; + if (b) a.size.width = a.size.height * a.aspectRatio + } + }, + stop: function() { + var b = e(this).data("resizable"), + a = b.options, + c = b.containerOffset, + d = b.containerPosition, + f = b.containerElement, + g = e(b.helper), + h = g.offset(), + i = g.outerWidth() - b.sizeDiff.width; + g = g.outerHeight() - b.sizeDiff.height; + b._helper && !a.animate && /relative/.test(f.css("position")) && e(this).css({ + left: h.left - d.left - c.left, + width: i, + height: g + }); + b._helper && !a.animate && /static/.test(f.css("position")) && e(this).css({ + left: h.left - d.left - c.left, + width: i, + height: g + }) + } + }); + e.ui.plugin.add("resizable", "ghost", { + start: function() { + var b = e(this).data("resizable"), + a = b.options, + c = b.size; + b.ghost = b.originalElement.clone(); + b.ghost.css({ + opacity: 0.25, + display: "block", + position: "relative", + height: c.height, + width: c.width, + margin: 0, + left: 0, + top: 0 + }).addClass("ui-resizable-ghost").addClass(typeof a.ghost == "string" ? a.ghost : ""); + b.ghost.appendTo(b.helper) + }, + resize: function() { + var b = e(this).data("resizable"); + b.ghost && b.ghost.css({ + position: "relative", + height: b.size.height, + width: b.size.width + }) + }, + stop: function() { + var b = e(this).data("resizable"); + b.ghost && b.helper && b.helper.get(0).removeChild(b.ghost.get(0)) + } + }); + e.ui.plugin.add("resizable", "grid", { + resize: function() { + var b = + e(this).data("resizable"), + a = b.options, + c = b.size, + d = b.originalSize, + f = b.originalPosition, + g = b.axis; + a.grid = typeof a.grid == "number" ? [a.grid, a.grid] : a.grid; + var h = Math.round((c.width - d.width) / (a.grid[0] || 1)) * (a.grid[0] || 1); + a = Math.round((c.height - d.height) / (a.grid[1] || 1)) * (a.grid[1] || 1); + if (/^(se|s|e)$/.test(g)) { + b.size.width = d.width + h; + b.size.height = d.height + a + } else if (/^(ne)$/.test(g)) { + b.size.width = d.width + h; + b.size.height = d.height + a; + b.position.top = f.top - a + } else { + if (/^(sw)$/.test(g)) { + b.size.width = d.width + h; + b.size.height = + d.height + a + } else { + b.size.width = d.width + h; + b.size.height = d.height + a; + b.position.top = f.top - a + } + b.position.left = f.left - h + } + } + }); + var m = function(b) { + return parseInt(b, 10) || 0 + }, + k = function(b) { + return !isNaN(parseInt(b, 10)) + } +})(jQuery);; +/* + * jQuery UI Selectable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(e) { + e.widget("ui.selectable", e.ui.mouse, { + options: { + appendTo: "body", + autoRefresh: true, + distance: 0, + filter: "*", + tolerance: "touch" + }, + _create: function() { + var c = this; + this.element.addClass("ui-selectable"); + this.dragged = false; + var f; + this.refresh = function() { + f = e(c.options.filter, c.element[0]); + f.each(function() { + var d = e(this), + b = d.offset(); + e.data(this, "selectable-item", { + element: this, + $element: d, + left: b.left, + top: b.top, + right: b.left + d.outerWidth(), + bottom: b.top + d.outerHeight(), + startselected: false, + selected: d.hasClass("ui-selected"), + selecting: d.hasClass("ui-selecting"), + unselecting: d.hasClass("ui-unselecting") + }) + }) + }; + this.refresh(); + this.selectees = f.addClass("ui-selectee"); + this._mouseInit(); + this.helper = e("
    ") + }, + destroy: function() { + this.selectees.removeClass("ui-selectee").removeData("selectable-item"); + this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"); + this._mouseDestroy(); + return this + }, + _mouseStart: function(c) { + var f = this; + this.opos = [c.pageX, + c.pageY + ]; + if (!this.options.disabled) { + var d = this.options; + this.selectees = e(d.filter, this.element[0]); + this._trigger("start", c); + e(d.appendTo).append(this.helper); + this.helper.css({ + left: c.clientX, + top: c.clientY, + width: 0, + height: 0 + }); + d.autoRefresh && this.refresh(); + this.selectees.filter(".ui-selected").each(function() { + var b = e.data(this, "selectable-item"); + b.startselected = true; + if (!c.metaKey) { + b.$element.removeClass("ui-selected"); + b.selected = false; + b.$element.addClass("ui-unselecting"); + b.unselecting = true; + f._trigger("unselecting", + c, { + unselecting: b.element + }) + } + }); + e(c.target).parents().andSelf().each(function() { + var b = e.data(this, "selectable-item"); + if (b) { + var g = !c.metaKey || !b.$element.hasClass("ui-selected"); + b.$element.removeClass(g ? "ui-unselecting" : "ui-selected").addClass(g ? "ui-selecting" : "ui-unselecting"); + b.unselecting = !g; + b.selecting = g; + (b.selected = g) ? f._trigger("selecting", c, { + selecting: b.element + }): f._trigger("unselecting", c, { + unselecting: b.element + }); + return false + } + }) + } + }, + _mouseDrag: function(c) { + var f = this; + this.dragged = true; + if (!this.options.disabled) { + var d = + this.options, + b = this.opos[0], + g = this.opos[1], + h = c.pageX, + i = c.pageY; + if (b > h) { + var j = h; + h = b; + b = j + } + if (g > i) { + j = i; + i = g; + g = j + } + this.helper.css({ + left: b, + top: g, + width: h - b, + height: i - g + }); + this.selectees.each(function() { + var a = e.data(this, "selectable-item"); + if (!(!a || a.element == f.element[0])) { + var k = false; + if (d.tolerance == "touch") k = !(a.left > h || a.right < b || a.top > i || a.bottom < g); + else if (d.tolerance == "fit") k = a.left > b && a.right < h && a.top > g && a.bottom < i; + if (k) { + if (a.selected) { + a.$element.removeClass("ui-selected"); + a.selected = false + } + if (a.unselecting) { + a.$element.removeClass("ui-unselecting"); + a.unselecting = false + } + if (!a.selecting) { + a.$element.addClass("ui-selecting"); + a.selecting = true; + f._trigger("selecting", c, { + selecting: a.element + }) + } + } else { + if (a.selecting) + if (c.metaKey && a.startselected) { + a.$element.removeClass("ui-selecting"); + a.selecting = false; + a.$element.addClass("ui-selected"); + a.selected = true + } else { + a.$element.removeClass("ui-selecting"); + a.selecting = false; + if (a.startselected) { + a.$element.addClass("ui-unselecting"); + a.unselecting = true + } + f._trigger("unselecting", c, { + unselecting: a.element + }) + } + if (a.selected) + if (!c.metaKey && + !a.startselected) { + a.$element.removeClass("ui-selected"); + a.selected = false; + a.$element.addClass("ui-unselecting"); + a.unselecting = true; + f._trigger("unselecting", c, { + unselecting: a.element + }) + } + } + } + }); + return false + } + }, + _mouseStop: function(c) { + var f = this; + this.dragged = false; + e(".ui-unselecting", this.element[0]).each(function() { + var d = e.data(this, "selectable-item"); + d.$element.removeClass("ui-unselecting"); + d.unselecting = false; + d.startselected = false; + f._trigger("unselected", c, { + unselected: d.element + }) + }); + e(".ui-selecting", this.element[0]).each(function() { + var d = + e.data(this, "selectable-item"); + d.$element.removeClass("ui-selecting").addClass("ui-selected"); + d.selecting = false; + d.selected = true; + d.startselected = true; + f._trigger("selected", c, { + selected: d.element + }) + }); + this._trigger("stop", c); + this.helper.remove(); + return false + } + }); + e.extend(e.ui.selectable, { + version: "1.8.16" + }) +})(jQuery);; +/* + * jQuery UI Sortable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Sortables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d) { + d.widget("ui.sortable", d.ui.mouse, { + widgetEventPrefix: "sort", + options: { + appendTo: "parent", + axis: false, + connectWith: false, + containment: false, + cursor: "auto", + cursorAt: false, + dropOnEmpty: true, + forcePlaceholderSize: false, + forceHelperSize: false, + grid: false, + handle: false, + helper: "original", + items: "> *", + opacity: false, + placeholder: false, + revert: false, + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1E3 + }, + _create: function() { + var a = this.options; + this.containerCache = {}; + this.element.addClass("ui-sortable"); + this.refresh(); + this.floating = this.items.length ? a.axis === "x" || /left|right/.test(this.items[0].item.css("float")) || /inline|table-cell/.test(this.items[0].item.css("display")) : false; + this.offset = this.element.offset(); + this._mouseInit() + }, + destroy: function() { + this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable"); + this._mouseDestroy(); + for (var a = this.items.length - 1; a >= 0; a--) this.items[a].item.removeData("sortable-item"); + return this + }, + _setOption: function(a, b) { + if (a === + "disabled") { + this.options[a] = b; + this.widget()[b ? "addClass" : "removeClass"]("ui-sortable-disabled") + } else d.Widget.prototype._setOption.apply(this, arguments) + }, + _mouseCapture: function(a, b) { + if (this.reverting) return false; + if (this.options.disabled || this.options.type == "static") return false; + this._refreshItems(a); + var c = null, + e = this; + d(a.target).parents().each(function() { + if (d.data(this, "sortable-item") == e) { + c = d(this); + return false + } + }); + if (d.data(a.target, "sortable-item") == e) c = d(a.target); + if (!c) return false; + if (this.options.handle && + !b) { + var f = false; + d(this.options.handle, c).find("*").andSelf().each(function() { + if (this == a.target) f = true + }); + if (!f) return false + } + this.currentItem = c; + this._removeCurrentsFromItems(); + return true + }, + _mouseStart: function(a, b, c) { + b = this.options; + var e = this; + this.currentContainer = this; + this.refreshPositions(); + this.helper = this._createHelper(a); + this._cacheHelperProportions(); + this._cacheMargins(); + this.scrollParent = this.helper.scrollParent(); + this.offset = this.currentItem.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + d.extend(this.offset, { + click: { + left: a.pageX - this.offset.left, + top: a.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() + }); + this.originalPosition = this._generatePosition(a); + this.originalPageX = a.pageX; + this.originalPageY = a.pageY; + b.cursorAt && this._adjustOffsetFromHelper(b.cursorAt); + this.domPosition = { + prev: this.currentItem.prev()[0], + parent: this.currentItem.parent()[0] + }; + this.helper[0] != this.currentItem[0] && this.currentItem.hide(); + this._createPlaceholder(); + b.containment && this._setContainment(); + if (b.cursor) { + if (d("body").css("cursor")) this._storedCursor = d("body").css("cursor"); + d("body").css("cursor", b.cursor) + } + if (b.opacity) { + if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity"); + this.helper.css("opacity", b.opacity) + } + if (b.zIndex) { + if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex"); + this.helper.css("zIndex", b.zIndex) + } + if (this.scrollParent[0] != + document && this.scrollParent[0].tagName != "HTML") this.overflowOffset = this.scrollParent.offset(); + this._trigger("start", a, this._uiHash()); + this._preserveHelperProportions || this._cacheHelperProportions(); + if (!c) + for (c = this.containers.length - 1; c >= 0; c--) this.containers[c]._trigger("activate", a, e._uiHash(this)); + if (d.ui.ddmanager) d.ui.ddmanager.current = this; + d.ui.ddmanager && !b.dropBehaviour && d.ui.ddmanager.prepareOffsets(this, a); + this.dragging = true; + this.helper.addClass("ui-sortable-helper"); + this._mouseDrag(a); + return true + }, + _mouseDrag: function(a) { + this.position = this._generatePosition(a); + this.positionAbs = this._convertPositionTo("absolute"); + if (!this.lastPositionAbs) this.lastPositionAbs = this.positionAbs; + if (this.options.scroll) { + var b = this.options, + c = false; + if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") { + if (this.overflowOffset.top + this.scrollParent[0].offsetHeight - a.pageY < b.scrollSensitivity) this.scrollParent[0].scrollTop = c = this.scrollParent[0].scrollTop + b.scrollSpeed; + else if (a.pageY - this.overflowOffset.top < + b.scrollSensitivity) this.scrollParent[0].scrollTop = c = this.scrollParent[0].scrollTop - b.scrollSpeed; + if (this.overflowOffset.left + this.scrollParent[0].offsetWidth - a.pageX < b.scrollSensitivity) this.scrollParent[0].scrollLeft = c = this.scrollParent[0].scrollLeft + b.scrollSpeed; + else if (a.pageX - this.overflowOffset.left < b.scrollSensitivity) this.scrollParent[0].scrollLeft = c = this.scrollParent[0].scrollLeft - b.scrollSpeed + } else { + if (a.pageY - d(document).scrollTop() < b.scrollSensitivity) c = d(document).scrollTop(d(document).scrollTop() - + b.scrollSpeed); + else if (d(window).height() - (a.pageY - d(document).scrollTop()) < b.scrollSensitivity) c = d(document).scrollTop(d(document).scrollTop() + b.scrollSpeed); + if (a.pageX - d(document).scrollLeft() < b.scrollSensitivity) c = d(document).scrollLeft(d(document).scrollLeft() - b.scrollSpeed); + else if (d(window).width() - (a.pageX - d(document).scrollLeft()) < b.scrollSensitivity) c = d(document).scrollLeft(d(document).scrollLeft() + b.scrollSpeed) + } + c !== false && d.ui.ddmanager && !b.dropBehaviour && d.ui.ddmanager.prepareOffsets(this, + a) + } + this.positionAbs = this._convertPositionTo("absolute"); + if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px"; + if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px"; + for (b = this.items.length - 1; b >= 0; b--) { + c = this.items[b]; + var e = c.item[0], + f = this._intersectsWithPointer(c); + if (f) + if (e != this.currentItem[0] && this.placeholder[f == 1 ? "next" : "prev"]()[0] != e && !d.ui.contains(this.placeholder[0], e) && (this.options.type == "semi-dynamic" ? !d.ui.contains(this.element[0], + e) : true)) { + this.direction = f == 1 ? "down" : "up"; + if (this.options.tolerance == "pointer" || this._intersectsWithSides(c)) this._rearrange(a, c); + else break; + this._trigger("change", a, this._uiHash()); + break + } + } + this._contactContainers(a); + d.ui.ddmanager && d.ui.ddmanager.drag(this, a); + this._trigger("sort", a, this._uiHash()); + this.lastPositionAbs = this.positionAbs; + return false + }, + _mouseStop: function(a, b) { + if (a) { + d.ui.ddmanager && !this.options.dropBehaviour && d.ui.ddmanager.drop(this, a); + if (this.options.revert) { + var c = this; + b = c.placeholder.offset(); + c.reverting = true; + d(this.helper).animate({ + left: b.left - this.offset.parent.left - c.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), + top: b.top - this.offset.parent.top - c.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) + }, parseInt(this.options.revert, 10) || 500, function() { + c._clear(a) + }) + } else this._clear(a, b); + return false + } + }, + cancel: function() { + var a = this; + if (this.dragging) { + this._mouseUp({ + target: null + }); + this.options.helper == "original" ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : + this.currentItem.show(); + for (var b = this.containers.length - 1; b >= 0; b--) { + this.containers[b]._trigger("deactivate", null, a._uiHash(this)); + if (this.containers[b].containerCache.over) { + this.containers[b]._trigger("out", null, a._uiHash(this)); + this.containers[b].containerCache.over = 0 + } + } + } + if (this.placeholder) { + this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + this.options.helper != "original" && this.helper && this.helper[0].parentNode && this.helper.remove(); + d.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null + }); + this.domPosition.prev ? d(this.domPosition.prev).after(this.currentItem) : d(this.domPosition.parent).prepend(this.currentItem) + } + return this + }, + serialize: function(a) { + var b = this._getItemsAsjQuery(a && a.connected), + c = []; + a = a || {}; + d(b).each(function() { + var e = (d(a.item || this).attr(a.attribute || "id") || "").match(a.expression || /(.+)[-=_](.+)/); + if (e) c.push((a.key || e[1] + "[]") + "=" + (a.key && a.expression ? e[1] : e[2])) + }); + !c.length && a.key && c.push(a.key + "="); + return c.join("&") + }, + toArray: function(a) { + var b = this._getItemsAsjQuery(a && a.connected), + c = []; + a = a || {}; + b.each(function() { + c.push(d(a.item || this).attr(a.attribute || "id") || "") + }); + return c + }, + _intersectsWith: function(a) { + var b = this.positionAbs.left, + c = b + this.helperProportions.width, + e = this.positionAbs.top, + f = e + this.helperProportions.height, + g = a.left, + h = g + a.width, + i = a.top, + k = i + a.height, + j = this.offset.click.top, + l = this.offset.click.left; + j = e + j > i && e + j < k && b + l > g && b + l < h; + return this.options.tolerance == "pointer" || this.options.forcePointerForContainers || + this.options.tolerance != "pointer" && this.helperProportions[this.floating ? "width" : "height"] > a[this.floating ? "width" : "height"] ? j : g < b + this.helperProportions.width / 2 && c - this.helperProportions.width / 2 < h && i < e + this.helperProportions.height / 2 && f - this.helperProportions.height / 2 < k + }, + _intersectsWithPointer: function(a) { + var b = d.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, a.top, a.height); + a = d.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, a.left, a.width); + b = b && a; + a = this._getDragVerticalDirection(); + var c = this._getDragHorizontalDirection(); + if (!b) return false; + return this.floating ? c && c == "right" || a == "down" ? 2 : 1 : a && (a == "down" ? 2 : 1) + }, + _intersectsWithSides: function(a) { + var b = d.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, a.top + a.height / 2, a.height); + a = d.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, a.left + a.width / 2, a.width); + var c = this._getDragVerticalDirection(), + e = this._getDragHorizontalDirection(); + return this.floating && e ? e == "right" && a || e == "left" && !a : c && (c == "down" && b || c == "up" && !b) + }, + _getDragVerticalDirection: function() { + var a = this.positionAbs.top - this.lastPositionAbs.top; + return a != 0 && (a > 0 ? "down" : "up") + }, + _getDragHorizontalDirection: function() { + var a = this.positionAbs.left - this.lastPositionAbs.left; + return a != 0 && (a > 0 ? "right" : "left") + }, + refresh: function(a) { + this._refreshItems(a); + this.refreshPositions(); + return this + }, + _connectWith: function() { + var a = this.options; + return a.connectWith.constructor == String ? [a.connectWith] : a.connectWith + }, + _getItemsAsjQuery: function(a) { + var b = [], + c = [], + e = this._connectWith(); + if (e && a) + for (a = e.length - 1; a >= 0; a--) + for (var f = d(e[a]), g = f.length - 1; g >= 0; g--) { + var h = d.data(f[g], "sortable"); + if (h && h != this && !h.options.disabled) c.push([d.isFunction(h.options.items) ? h.options.items.call(h.element) : d(h.options.items, h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), h]) + } + c.push([d.isFunction(this.options.items) ? this.options.items.call(this.element, null, { + options: this.options, + item: this.currentItem + }) : d(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), + this + ]); + for (a = c.length - 1; a >= 0; a--) c[a][0].each(function() { + b.push(this) + }); + return d(b) + }, + _removeCurrentsFromItems: function() { + for (var a = this.currentItem.find(":data(sortable-item)"), b = 0; b < this.items.length; b++) + for (var c = 0; c < a.length; c++) a[c] == this.items[b].item[0] && this.items.splice(b, 1) + }, + _refreshItems: function(a) { + this.items = []; + this.containers = [this]; + var b = this.items, + c = [ + [d.isFunction(this.options.items) ? this.options.items.call(this.element[0], a, { + item: this.currentItem + }) : d(this.options.items, this.element), + this + ] + ], + e = this._connectWith(); + if (e) + for (var f = e.length - 1; f >= 0; f--) + for (var g = d(e[f]), h = g.length - 1; h >= 0; h--) { + var i = d.data(g[h], "sortable"); + if (i && i != this && !i.options.disabled) { + c.push([d.isFunction(i.options.items) ? i.options.items.call(i.element[0], a, { + item: this.currentItem + }) : d(i.options.items, i.element), i]); + this.containers.push(i) + } + } + for (f = c.length - 1; f >= 0; f--) { + a = c[f][1]; + e = c[f][0]; + h = 0; + for (g = e.length; h < g; h++) { + i = d(e[h]); + i.data("sortable-item", a); + b.push({ + item: i, + instance: a, + width: 0, + height: 0, + left: 0, + top: 0 + }) + } + } + }, + refreshPositions: function(a) { + if (this.offsetParent && + this.helper) this.offset.parent = this._getParentOffset(); + for (var b = this.items.length - 1; b >= 0; b--) { + var c = this.items[b]; + if (!(c.instance != this.currentContainer && this.currentContainer && c.item[0] != this.currentItem[0])) { + var e = this.options.toleranceElement ? d(this.options.toleranceElement, c.item) : c.item; + if (!a) { + c.width = e.outerWidth(); + c.height = e.outerHeight() + } + e = e.offset(); + c.left = e.left; + c.top = e.top + } + } + if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this); + else + for (b = + this.containers.length - 1; b >= 0; b--) { + e = this.containers[b].element.offset(); + this.containers[b].containerCache.left = e.left; + this.containers[b].containerCache.top = e.top; + this.containers[b].containerCache.width = this.containers[b].element.outerWidth(); + this.containers[b].containerCache.height = this.containers[b].element.outerHeight() + } + return this + }, + _createPlaceholder: function(a) { + var b = a || this, + c = b.options; + if (!c.placeholder || c.placeholder.constructor == String) { + var e = c.placeholder; + c.placeholder = { + element: function() { + var f = + d(document.createElement(b.currentItem[0].nodeName)).addClass(e || b.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; + if (!e) f.style.visibility = "hidden"; + return f + }, + update: function(f, g) { + if (!(e && !c.forcePlaceholderSize)) { + g.height() || g.height(b.currentItem.innerHeight() - parseInt(b.currentItem.css("paddingTop") || 0, 10) - parseInt(b.currentItem.css("paddingBottom") || 0, 10)); + g.width() || g.width(b.currentItem.innerWidth() - parseInt(b.currentItem.css("paddingLeft") || 0, 10) - parseInt(b.currentItem.css("paddingRight") || + 0, 10)) + } + } + } + } + b.placeholder = d(c.placeholder.element.call(b.element, b.currentItem)); + b.currentItem.after(b.placeholder); + c.placeholder.update(b, b.placeholder) + }, + _contactContainers: function(a) { + for (var b = null, c = null, e = this.containers.length - 1; e >= 0; e--) + if (!d.ui.contains(this.currentItem[0], this.containers[e].element[0])) + if (this._intersectsWith(this.containers[e].containerCache)) { + if (!(b && d.ui.contains(this.containers[e].element[0], b.element[0]))) { + b = this.containers[e]; + c = e + } + } else if (this.containers[e].containerCache.over) { + this.containers[e]._trigger("out", + a, this._uiHash(this)); + this.containers[e].containerCache.over = 0 + } + if (b) + if (this.containers.length === 1) { + this.containers[c]._trigger("over", a, this._uiHash(this)); + this.containers[c].containerCache.over = 1 + } else if (this.currentContainer != this.containers[c]) { + b = 1E4; + e = null; + for (var f = this.positionAbs[this.containers[c].floating ? "left" : "top"], g = this.items.length - 1; g >= 0; g--) + if (d.ui.contains(this.containers[c].element[0], this.items[g].item[0])) { + var h = this.items[g][this.containers[c].floating ? "left" : "top"]; + if (Math.abs(h - + f) < b) { + b = Math.abs(h - f); + e = this.items[g] + } + } + if (e || this.options.dropOnEmpty) { + this.currentContainer = this.containers[c]; + e ? this._rearrange(a, e, null, true) : this._rearrange(a, null, this.containers[c].element, true); + this._trigger("change", a, this._uiHash()); + this.containers[c]._trigger("change", a, this._uiHash(this)); + this.options.placeholder.update(this.currentContainer, this.placeholder); + this.containers[c]._trigger("over", a, this._uiHash(this)); + this.containers[c].containerCache.over = 1 + } + } + }, + _createHelper: function(a) { + var b = + this.options; + a = d.isFunction(b.helper) ? d(b.helper.apply(this.element[0], [a, this.currentItem])) : b.helper == "clone" ? this.currentItem.clone() : this.currentItem; + a.parents("body").length || d(b.appendTo != "parent" ? b.appendTo : this.currentItem[0].parentNode)[0].appendChild(a[0]); + if (a[0] == this.currentItem[0]) this._storedCSS = { + width: this.currentItem[0].style.width, + height: this.currentItem[0].style.height, + position: this.currentItem.css("position"), + top: this.currentItem.css("top"), + left: this.currentItem.css("left") + }; + if (a[0].style.width == + "" || b.forceHelperSize) a.width(this.currentItem.width()); + if (a[0].style.height == "" || b.forceHelperSize) a.height(this.currentItem.height()); + return a + }, + _adjustOffsetFromHelper: function(a) { + if (typeof a == "string") a = a.split(" "); + if (d.isArray(a)) a = { + left: +a[0], + top: +a[1] || 0 + }; + if ("left" in a) this.offset.click.left = a.left + this.margins.left; + if ("right" in a) this.offset.click.left = this.helperProportions.width - a.right + this.margins.left; + if ("top" in a) this.offset.click.top = a.top + this.margins.top; + if ("bottom" in a) this.offset.click.top = + this.helperProportions.height - a.bottom + this.margins.top + }, + _getParentOffset: function() { + this.offsetParent = this.helper.offsetParent(); + var a = this.offsetParent.offset(); + if (this.cssPosition == "absolute" && this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) { + a.left += this.scrollParent.scrollLeft(); + a.top += this.scrollParent.scrollTop() + } + if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && d.browser.msie) a = { + top: 0, + left: 0 + }; + return { + top: a.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), + left: a.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) + } + }, + _getRelativeOffset: function() { + if (this.cssPosition == "relative") { + var a = this.currentItem.position(); + return { + top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), + left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() + } + } else return { + top: 0, + left: 0 + } + }, + _cacheMargins: function() { + this.margins = { + left: parseInt(this.currentItem.css("marginLeft"), + 10) || 0, + top: parseInt(this.currentItem.css("marginTop"), 10) || 0 + } + }, + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + } + }, + _setContainment: function() { + var a = this.options; + if (a.containment == "parent") a.containment = this.helper[0].parentNode; + if (a.containment == "document" || a.containment == "window") this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, d(a.containment == "document" ? + document : window).width() - this.helperProportions.width - this.margins.left, (d(a.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; + if (!/^(document|window|parent)$/.test(a.containment)) { + var b = d(a.containment)[0]; + a = d(a.containment).offset(); + var c = d(b).css("overflow") != "hidden"; + this.containment = [a.left + (parseInt(d(b).css("borderLeftWidth"), 10) || 0) + (parseInt(d(b).css("paddingLeft"), 10) || 0) - this.margins.left, a.top + (parseInt(d(b).css("borderTopWidth"), + 10) || 0) + (parseInt(d(b).css("paddingTop"), 10) || 0) - this.margins.top, a.left + (c ? Math.max(b.scrollWidth, b.offsetWidth) : b.offsetWidth) - (parseInt(d(b).css("borderLeftWidth"), 10) || 0) - (parseInt(d(b).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, a.top + (c ? Math.max(b.scrollHeight, b.offsetHeight) : b.offsetHeight) - (parseInt(d(b).css("borderTopWidth"), 10) || 0) - (parseInt(d(b).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top] + } + }, + _convertPositionTo: function(a, b) { + if (!b) b = + this.position; + a = a == "absolute" ? 1 : -1; + var c = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, + e = /(html|body)/i.test(c[0].tagName); + return { + top: b.top + this.offset.relative.top * a + this.offset.parent.top * a - (d.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : c.scrollTop()) * a), + left: b.left + this.offset.relative.left * a + this.offset.parent.left * a - (d.browser.safari && + this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : c.scrollLeft()) * a) + } + }, + _generatePosition: function(a) { + var b = this.options, + c = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, + e = /(html|body)/i.test(c[0].tagName); + if (this.cssPosition == "relative" && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) this.offset.relative = this._getRelativeOffset(); + var f = a.pageX, + g = a.pageY; + if (this.originalPosition) { + if (this.containment) { + if (a.pageX - this.offset.click.left < this.containment[0]) f = this.containment[0] + this.offset.click.left; + if (a.pageY - this.offset.click.top < this.containment[1]) g = this.containment[1] + this.offset.click.top; + if (a.pageX - this.offset.click.left > this.containment[2]) f = this.containment[2] + this.offset.click.left; + if (a.pageY - this.offset.click.top > this.containment[3]) g = this.containment[3] + this.offset.click.top + } + if (b.grid) { + g = this.originalPageY + Math.round((g - + this.originalPageY) / b.grid[1]) * b.grid[1]; + g = this.containment ? !(g - this.offset.click.top < this.containment[1] || g - this.offset.click.top > this.containment[3]) ? g : !(g - this.offset.click.top < this.containment[1]) ? g - b.grid[1] : g + b.grid[1] : g; + f = this.originalPageX + Math.round((f - this.originalPageX) / b.grid[0]) * b.grid[0]; + f = this.containment ? !(f - this.offset.click.left < this.containment[0] || f - this.offset.click.left > this.containment[2]) ? f : !(f - this.offset.click.left < this.containment[0]) ? f - b.grid[0] : f + b.grid[0] : f + } + } + return { + top: g - + this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (d.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : c.scrollTop()), + left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (d.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : c.scrollLeft()) + } + }, + _rearrange: function(a, b, c, e) { + c ? c[0].appendChild(this.placeholder[0]) : b.item[0].parentNode.insertBefore(this.placeholder[0], + this.direction == "down" ? b.item[0] : b.item[0].nextSibling); + this.counter = this.counter ? ++this.counter : 1; + var f = this, + g = this.counter; + window.setTimeout(function() { + g == f.counter && f.refreshPositions(!e) + }, 0) + }, + _clear: function(a, b) { + this.reverting = false; + var c = []; + !this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem); + this._noFinalSort = null; + if (this.helper[0] == this.currentItem[0]) { + for (var e in this._storedCSS) + if (this._storedCSS[e] == "auto" || this._storedCSS[e] == "static") this._storedCSS[e] = + ""; + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") + } else this.currentItem.show(); + this.fromOutside && !b && c.push(function(f) { + this._trigger("receive", f, this._uiHash(this.fromOutside)) + }); + if ((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !b) c.push(function(f) { + this._trigger("update", f, this._uiHash()) + }); + if (!d.ui.contains(this.element[0], this.currentItem[0])) { + b || c.push(function(f) { + this._trigger("remove", + f, this._uiHash()) + }); + for (e = this.containers.length - 1; e >= 0; e--) + if (d.ui.contains(this.containers[e].element[0], this.currentItem[0]) && !b) { + c.push(function(f) { + return function(g) { + f._trigger("receive", g, this._uiHash(this)) + } + }.call(this, this.containers[e])); + c.push(function(f) { + return function(g) { + f._trigger("update", g, this._uiHash(this)) + } + }.call(this, this.containers[e])) + } + } + for (e = this.containers.length - 1; e >= 0; e--) { + b || c.push(function(f) { + return function(g) { + f._trigger("deactivate", g, this._uiHash(this)) + } + }.call(this, + this.containers[e])); + if (this.containers[e].containerCache.over) { + c.push(function(f) { + return function(g) { + f._trigger("out", g, this._uiHash(this)) + } + }.call(this, this.containers[e])); + this.containers[e].containerCache.over = 0 + } + } + this._storedCursor && d("body").css("cursor", this._storedCursor); + this._storedOpacity && this.helper.css("opacity", this._storedOpacity); + if (this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == "auto" ? "" : this._storedZIndex); + this.dragging = false; + if (this.cancelHelperRemoval) { + if (!b) { + this._trigger("beforeStop", + a, this._uiHash()); + for (e = 0; e < c.length; e++) c[e].call(this, a); + this._trigger("stop", a, this._uiHash()) + } + return false + } + b || this._trigger("beforeStop", a, this._uiHash()); + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + this.helper[0] != this.currentItem[0] && this.helper.remove(); + this.helper = null; + if (!b) { + for (e = 0; e < c.length; e++) c[e].call(this, a); + this._trigger("stop", a, this._uiHash()) + } + this.fromOutside = false; + return true + }, + _trigger: function() { + d.Widget.prototype._trigger.apply(this, arguments) === false && this.cancel() + }, + _uiHash: function(a) { + var b = a || this; + return { + helper: b.helper, + placeholder: b.placeholder || d([]), + position: b.position, + originalPosition: b.originalPosition, + offset: b.positionAbs, + item: b.currentItem, + sender: a ? a.element : null + } + } + }); + d.extend(d.ui.sortable, { + version: "1.8.16" + }) +})(jQuery);; +/* + * jQuery UI Accordion 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(c) { + c.widget("ui.accordion", { + options: { + active: 0, + animated: "slide", + autoHeight: true, + clearStyle: false, + collapsible: false, + event: "click", + fillSpace: false, + header: "> li > :first-child,> :not(li):even", + icons: { + header: "ui-icon-triangle-1-e", + headerSelected: "ui-icon-triangle-1-s" + }, + navigation: false, + navigationFilter: function() { + return this.href.toLowerCase() === location.href.toLowerCase() + } + }, + _create: function() { + var a = this, + b = a.options; + a.running = 0; + a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"); + a.headers = a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion", function() { + b.disabled || c(this).addClass("ui-state-hover") + }).bind("mouseleave.accordion", function() { + b.disabled || c(this).removeClass("ui-state-hover") + }).bind("focus.accordion", function() { + b.disabled || c(this).addClass("ui-state-focus") + }).bind("blur.accordion", function() { + b.disabled || c(this).removeClass("ui-state-focus") + }); + a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); + if (b.navigation) { + var d = a.element.find("a").filter(b.navigationFilter).eq(0); + if (d.length) { + var h = d.closest(".ui-accordion-header"); + a.active = h.length ? h : d.closest(".ui-accordion-content").prev() + } + } + a.active = a._findActive(a.active || b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"); + a.active.next().addClass("ui-accordion-content-active"); + a._createIcons(); + a.resize(); + a.element.attr("role", "tablist"); + a.headers.attr("role", "tab").bind("keydown.accordion", + function(f) { + return a._keydown(f) + }).next().attr("role", "tabpanel"); + a.headers.not(a.active || "").attr({ + "aria-expanded": "false", + "aria-selected": "false", + tabIndex: -1 + }).next().hide(); + a.active.length ? a.active.attr({ + "aria-expanded": "true", + "aria-selected": "true", + tabIndex: 0 + }) : a.headers.eq(0).attr("tabIndex", 0); + c.browser.safari || a.headers.find("a").attr("tabIndex", -1); + b.event && a.headers.bind(b.event.split(" ").join(".accordion ") + ".accordion", function(f) { + a._clickHandler.call(a, f, this); + f.preventDefault() + }) + }, + _createIcons: function() { + var a = + this.options; + if (a.icons) { + c("").addClass("ui-icon " + a.icons.header).prependTo(this.headers); + this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected); + this.element.addClass("ui-accordion-icons") + } + }, + _destroyIcons: function() { + this.headers.children(".ui-icon").remove(); + this.element.removeClass("ui-accordion-icons") + }, + destroy: function() { + var a = this.options; + this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"); + this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"); + this.headers.find("a").removeAttr("tabIndex"); + this._destroyIcons(); + var b = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled"); + if (a.autoHeight || a.fillHeight) b.css("height", ""); + return c.Widget.prototype.destroy.call(this) + }, + _setOption: function(a, b) { + c.Widget.prototype._setOption.apply(this, arguments); + a == "active" && this.activate(b); + if (a == "icons") { + this._destroyIcons(); + b && this._createIcons() + } + if (a == "disabled") this.headers.add(this.headers.next())[b ? "addClass" : "removeClass"]("ui-accordion-disabled ui-state-disabled") + }, + _keydown: function(a) { + if (!(this.options.disabled || a.altKey || a.ctrlKey)) { + var b = c.ui.keyCode, + d = this.headers.length, + h = this.headers.index(a.target), + f = false; + switch (a.keyCode) { + case b.RIGHT: + case b.DOWN: + f = this.headers[(h + 1) % d]; + break; + case b.LEFT: + case b.UP: + f = this.headers[(h - 1 + d) % d]; + break; + case b.SPACE: + case b.ENTER: + this._clickHandler({ + target: a.target + }, a.target); + a.preventDefault() + } + if (f) { + c(a.target).attr("tabIndex", -1); + c(f).attr("tabIndex", 0); + f.focus(); + return false + } + return true + } + }, + resize: function() { + var a = this.options, + b; + if (a.fillSpace) { + if (c.browser.msie) { + var d = this.element.parent().css("overflow"); + this.element.parent().css("overflow", "hidden") + } + b = this.element.parent().height(); + c.browser.msie && this.element.parent().css("overflow", d); + this.headers.each(function() { + b -= c(this).outerHeight(true) + }); + this.headers.next().each(function() { + c(this).height(Math.max(0, b - c(this).innerHeight() + + c(this).height())) + }).css("overflow", "auto") + } else if (a.autoHeight) { + b = 0; + this.headers.next().each(function() { + b = Math.max(b, c(this).height("").height()) + }).height(b) + } + return this + }, + activate: function(a) { + this.options.active = a; + a = this._findActive(a)[0]; + this._clickHandler({ + target: a + }, a); + return this + }, + _findActive: function(a) { + return a ? typeof a === "number" ? this.headers.filter(":eq(" + a + ")") : this.headers.not(this.headers.not(a)) : a === false ? c([]) : this.headers.filter(":eq(0)") + }, + _clickHandler: function(a, b) { + var d = this.options; + if (!d.disabled) + if (a.target) { + a = c(a.currentTarget || b); + b = a[0] === this.active[0]; + d.active = d.collapsible && b ? false : this.headers.index(a); + if (!(this.running || !d.collapsible && b)) { + var h = this.active; + j = a.next(); + g = this.active.next(); + e = { + options: d, + newHeader: b && d.collapsible ? c([]) : a, + oldHeader: this.active, + newContent: b && d.collapsible ? c([]) : j, + oldContent: g + }; + var f = this.headers.index(this.active[0]) > this.headers.index(a[0]); + this.active = b ? c([]) : a; + this._toggle(j, g, e, b, f); + h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); + if (!b) { + a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected); + a.next().addClass("ui-accordion-content-active") + } + } + } else if (d.collapsible) { + this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); + this.active.next().addClass("ui-accordion-content-active"); + var g = this.active.next(), + e = { + options: d, + newHeader: c([]), + oldHeader: d.active, + newContent: c([]), + oldContent: g + }, + j = this.active = c([]); + this._toggle(j, g, e) + } + }, + _toggle: function(a, b, d, h, f) { + var g = this, + e = g.options; + g.toShow = a; + g.toHide = b; + g.data = d; + var j = function() { + if (g) return g._completed.apply(g, arguments) + }; + g._trigger("changestart", null, g.data); + g.running = b.size() === 0 ? a.size() : b.size(); + if (e.animated) { + d = {}; + d = e.collapsible && h ? { + toShow: c([]), + toHide: b, + complete: j, + down: f, + autoHeight: e.autoHeight || e.fillSpace + } : { + toShow: a, + toHide: b, + complete: j, + down: f, + autoHeight: e.autoHeight || + e.fillSpace + }; + if (!e.proxied) e.proxied = e.animated; + if (!e.proxiedDuration) e.proxiedDuration = e.duration; + e.animated = c.isFunction(e.proxied) ? e.proxied(d) : e.proxied; + e.duration = c.isFunction(e.proxiedDuration) ? e.proxiedDuration(d) : e.proxiedDuration; + h = c.ui.accordion.animations; + var i = e.duration, + k = e.animated; + if (k && !h[k] && !c.easing[k]) k = "slide"; + h[k] || (h[k] = function(l) { + this.slide(l, { + easing: k, + duration: i || 700 + }) + }); + h[k](d) + } else { + if (e.collapsible && h) a.toggle(); + else { + b.hide(); + a.show() + } + j(true) + } + b.prev().attr({ + "aria-expanded": "false", + "aria-selected": "false", + tabIndex: -1 + }).blur(); + a.prev().attr({ + "aria-expanded": "true", + "aria-selected": "true", + tabIndex: 0 + }).focus() + }, + _completed: function(a) { + this.running = a ? 0 : --this.running; + if (!this.running) { + this.options.clearStyle && this.toShow.add(this.toHide).css({ + height: "", + overflow: "" + }); + this.toHide.removeClass("ui-accordion-content-active"); + if (this.toHide.length) this.toHide.parent()[0].className = this.toHide.parent()[0].className; + this._trigger("change", null, this.data) + } + } + }); + c.extend(c.ui.accordion, { + version: "1.8.16", + animations: { + slide: function(a, b) { + a = c.extend({ + easing: "swing", + duration: 300 + }, a, b); + if (a.toHide.size()) + if (a.toShow.size()) { + var d = a.toShow.css("overflow"), + h = 0, + f = {}, + g = {}, + e; + b = a.toShow; + e = b[0].style.width; + b.width(parseInt(b.parent().width(), 10) - parseInt(b.css("paddingLeft"), 10) - parseInt(b.css("paddingRight"), 10) - (parseInt(b.css("borderLeftWidth"), 10) || 0) - (parseInt(b.css("borderRightWidth"), 10) || 0)); + c.each(["height", "paddingTop", "paddingBottom"], function(j, i) { + g[i] = "hide"; + j = ("" + c.css(a.toShow[0], i)).match(/^([\d+-.]+)(.*)$/); + f[i] = { + value: j[1], + unit: j[2] || "px" + } + }); + a.toShow.css({ + height: 0, + overflow: "hidden" + }).show(); + a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g, { + step: function(j, i) { + if (i.prop == "height") h = i.end - i.start === 0 ? 0 : (i.now - i.start) / (i.end - i.start); + a.toShow[0].style[i.prop] = h * f[i.prop].value + f[i.prop].unit + }, + duration: a.duration, + easing: a.easing, + complete: function() { + a.autoHeight || a.toShow.css("height", ""); + a.toShow.css({ + width: e, + overflow: d + }); + a.complete() + } + }) + } else a.toHide.animate({ + height: "hide", + paddingTop: "hide", + paddingBottom: "hide" + }, a); + else a.toShow.animate({ + height: "show", + paddingTop: "show", + paddingBottom: "show" + }, a) + }, + bounceslide: function(a) { + this.slide(a, { + easing: a.down ? "easeOutBounce" : "swing", + duration: a.down ? 1E3 : 200 + }) + } + } + }) +})(jQuery);; +/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.position.js + */ +(function(d) { + var e = 0; + d.widget("ui.autocomplete", { + options: { + appendTo: "body", + autoFocus: false, + delay: 300, + minLength: 1, + position: { + my: "left top", + at: "left bottom", + collision: "none" + }, + source: null + }, + pending: 0, + _create: function() { + var a = this, + b = this.element[0].ownerDocument, + g; + this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off").attr({ + role: "textbox", + "aria-autocomplete": "list", + "aria-haspopup": "true" + }).bind("keydown.autocomplete", function(c) { + if (!(a.options.disabled || a.element.propAttr("readOnly"))) { + g = + false; + var f = d.ui.keyCode; + switch (c.keyCode) { + case f.PAGE_UP: + a._move("previousPage", c); + break; + case f.PAGE_DOWN: + a._move("nextPage", c); + break; + case f.UP: + a._move("previous", c); + c.preventDefault(); + break; + case f.DOWN: + a._move("next", c); + c.preventDefault(); + break; + case f.ENTER: + case f.NUMPAD_ENTER: + if (a.menu.active) { + g = true; + c.preventDefault() + } + case f.TAB: + if (!a.menu.active) return; + a.menu.select(c); + break; + case f.ESCAPE: + a.element.val(a.term); + a.close(c); + break; + default: + clearTimeout(a.searching); + a.searching = setTimeout(function() { + if (a.term != + a.element.val()) { + a.selectedItem = null; + a.search(null, c) + } + }, a.options.delay); + break + } + } + }).bind("keypress.autocomplete", function(c) { + if (g) { + g = false; + c.preventDefault() + } + }).bind("focus.autocomplete", function() { + if (!a.options.disabled) { + a.selectedItem = null; + a.previous = a.element.val() + } + }).bind("blur.autocomplete", function(c) { + if (!a.options.disabled) { + clearTimeout(a.searching); + a.closing = setTimeout(function() { + a.close(c); + a._change(c) + }, 150) + } + }); + this._initSource(); + this.response = function() { + return a._response.apply(a, arguments) + }; + this.menu = d("
      ").addClass("ui-autocomplete").appendTo(d(this.options.appendTo || "body", b)[0]).mousedown(function(c) { + var f = a.menu.element[0]; + d(c.target).closest(".ui-menu-item").length || setTimeout(function() { + d(document).one("mousedown", function(h) { + h.target !== a.element[0] && h.target !== f && !d.ui.contains(f, h.target) && a.close() + }) + }, 1); + setTimeout(function() { + clearTimeout(a.closing) + }, 13) + }).menu({ + focus: function(c, f) { + f = f.item.data("item.autocomplete"); + false !== a._trigger("focus", c, { + item: f + }) && /^key/.test(c.originalEvent.type) && + a.element.val(f.value) + }, + selected: function(c, f) { + var h = f.item.data("item.autocomplete"), + i = a.previous; + if (a.element[0] !== b.activeElement) { + a.element.focus(); + a.previous = i; + setTimeout(function() { + a.previous = i; + a.selectedItem = h + }, 1) + } + false !== a._trigger("select", c, { + item: h + }) && a.element.val(h.value); + a.term = a.element.val(); + a.close(c); + a.selectedItem = h + }, + blur: function() { + a.menu.element.is(":visible") && a.element.val() !== a.term && a.element.val(a.term) + } + }).zIndex(this.element.zIndex() + 1).css({ + top: 0, + left: 0 + }).hide().data("menu"); + d.fn.bgiframe && this.menu.element.bgiframe() + }, + destroy: function() { + this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"); + this.menu.element.remove(); + d.Widget.prototype.destroy.call(this) + }, + _setOption: function(a, b) { + d.Widget.prototype._setOption.apply(this, arguments); + a === "source" && this._initSource(); + if (a === "appendTo") this.menu.element.appendTo(d(b || "body", this.element[0].ownerDocument)[0]); + a === "disabled" && + b && this.xhr && this.xhr.abort() + }, + _initSource: function() { + var a = this, + b, g; + if (d.isArray(this.options.source)) { + b = this.options.source; + this.source = function(c, f) { + f(d.ui.autocomplete.filter(b, c.term)) + } + } else if (typeof this.options.source === "string") { + g = this.options.source; + this.source = function(c, f) { + a.xhr && a.xhr.abort(); + a.xhr = d.ajax({ + url: g, + data: c, + dataType: "json", + autocompleteRequest: ++e, + success: function(h) { + this.autocompleteRequest === e && f(h) + }, + error: function() { + this.autocompleteRequest === e && f([]) + } + }) + } + } else this.source = + this.options.source + }, + search: function(a, b) { + a = a != null ? a : this.element.val(); + this.term = this.element.val(); + if (a.length < this.options.minLength) return this.close(b); + clearTimeout(this.closing); + if (this._trigger("search", b) !== false) return this._search(a) + }, + _search: function(a) { + this.pending++; + this.element.addClass("ui-autocomplete-loading"); + this.source({ + term: a + }, this.response) + }, + _response: function(a) { + if (!this.options.disabled && a && a.length) { + a = this._normalize(a); + this._suggest(a); + this._trigger("open") + } else this.close(); + this.pending--; + this.pending || this.element.removeClass("ui-autocomplete-loading") + }, + close: function(a) { + clearTimeout(this.closing); + if (this.menu.element.is(":visible")) { + this.menu.element.hide(); + this.menu.deactivate(); + this._trigger("close", a) + } + }, + _change: function(a) { + this.previous !== this.element.val() && this._trigger("change", a, { + item: this.selectedItem + }) + }, + _normalize: function(a) { + if (a.length && a[0].label && a[0].value) return a; + return d.map(a, function(b) { + if (typeof b === "string") return { + label: b, + value: b + }; + return d.extend({ + label: b.label || + b.value, + value: b.value || b.label + }, b) + }) + }, + _suggest: function(a) { + var b = this.menu.element.empty().zIndex(this.element.zIndex() + 1); + this._renderMenu(b, a); + this.menu.deactivate(); + this.menu.refresh(); + b.show(); + this._resizeMenu(); + b.position(d.extend({ + of: this.element + }, this.options.position)); + this.options.autoFocus && this.menu.next(new d.Event("mouseover")) + }, + _resizeMenu: function() { + var a = this.menu.element; + a.outerWidth(Math.max(a.width("").outerWidth(), this.element.outerWidth())) + }, + _renderMenu: function(a, b) { + var g = this; + d.each(b, function(c, f) { + g._renderItem(a, f) + }) + }, + _renderItem: function(a, b) { + return d("
    • ").data("item.autocomplete", b).append(d("
      ").text(b.label)).appendTo(a) + }, + _move: function(a, b) { + if (this.menu.element.is(":visible")) + if (this.menu.first() && /^previous/.test(a) || this.menu.last() && /^next/.test(a)) { + this.element.val(this.term); + this.menu.deactivate() + } else this.menu[a](b); + else this.search(null, b) + }, + widget: function() { + return this.menu.element + } + }); + d.extend(d.ui.autocomplete, { + escapeRegex: function(a) { + return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, + "\\$&") + }, + filter: function(a, b) { + var g = new RegExp(d.ui.autocomplete.escapeRegex(b), "i"); + return d.grep(a, function(c) { + return g.test(c.label || c.value || c) + }) + } + }) +})(jQuery); +(function(d) { + d.widget("ui.menu", { + _create: function() { + var e = this; + this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({ + role: "listbox", + "aria-activedescendant": "ui-active-menuitem" + }).click(function(a) { + if (d(a.target).closest(".ui-menu-item a").length) { + a.preventDefault(); + e.select(a) + } + }); + this.refresh() + }, + refresh: function() { + var e = this; + this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "menuitem").children("a").addClass("ui-corner-all").attr("tabindex", -1).mouseenter(function(a) { + e.activate(a, d(this).parent()) + }).mouseleave(function() { + e.deactivate() + }) + }, + activate: function(e, a) { + this.deactivate(); + if (this.hasScroll()) { + var b = a.offset().top - this.element.offset().top, + g = this.element.scrollTop(), + c = this.element.height(); + if (b < 0) this.element.scrollTop(g + b); + else b >= c && this.element.scrollTop(g + b - c + a.height()) + } + this.active = a.eq(0).children("a").addClass("ui-state-hover").attr("id", "ui-active-menuitem").end(); + this._trigger("focus", e, { + item: a + }) + }, + deactivate: function() { + if (this.active) { + this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); + this._trigger("blur"); + this.active = null + } + }, + next: function(e) { + this.move("next", ".ui-menu-item:first", e) + }, + previous: function(e) { + this.move("prev", ".ui-menu-item:last", e) + }, + first: function() { + return this.active && !this.active.prevAll(".ui-menu-item").length + }, + last: function() { + return this.active && !this.active.nextAll(".ui-menu-item").length + }, + move: function(e, a, b) { + if (this.active) { + e = this.active[e + "All"](".ui-menu-item").eq(0); + e.length ? this.activate(b, e) : this.activate(b, this.element.children(a)) + } else this.activate(b, + this.element.children(a)) + }, + nextPage: function(e) { + if (this.hasScroll()) + if (!this.active || this.last()) this.activate(e, this.element.children(".ui-menu-item:first")); + else { + var a = this.active.offset().top, + b = this.element.height(), + g = this.element.children(".ui-menu-item").filter(function() { + var c = d(this).offset().top - a - b + d(this).height(); + return c < 10 && c > -10 + }); + g.length || (g = this.element.children(".ui-menu-item:last")); + this.activate(e, g) + } else this.activate(e, this.element.children(".ui-menu-item").filter(!this.active || + this.last() ? ":first" : ":last")) + }, + previousPage: function(e) { + if (this.hasScroll()) + if (!this.active || this.first()) this.activate(e, this.element.children(".ui-menu-item:last")); + else { + var a = this.active.offset().top, + b = this.element.height(); + result = this.element.children(".ui-menu-item").filter(function() { + var g = d(this).offset().top - a + b - d(this).height(); + return g < 10 && g > -10 + }); + result.length || (result = this.element.children(".ui-menu-item:first")); + this.activate(e, result) + } else this.activate(e, this.element.children(".ui-menu-item").filter(!this.active || + this.first() ? ":last" : ":first")) + }, + hasScroll: function() { + return this.element.height() < this.element[d.fn.prop ? "prop" : "attr"]("scrollHeight") + }, + select: function(e) { + this._trigger("selected", e, { + item: this.active + }) + } + }) +})(jQuery);; +/* + * jQuery UI Button 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(b) { + var h, i, j, g, l = function() { + var a = b(this).find(":ui-button"); + setTimeout(function() { + a.button("refresh") + }, 1) + }, + k = function(a) { + var c = a.name, + e = a.form, + f = b([]); + if (c) f = e ? b(e).find("[name='" + c + "']") : b("[name='" + c + "']", a.ownerDocument).filter(function() { + return !this.form + }); + return f + }; + b.widget("ui.button", { + options: { + disabled: null, + text: true, + label: null, + icons: { + primary: null, + secondary: null + } + }, + _create: function() { + this.element.closest("form").unbind("reset.button").bind("reset.button", l); + if (typeof this.options.disabled !== + "boolean") this.options.disabled = this.element.propAttr("disabled"); + this._determineButtonType(); + this.hasTitle = !!this.buttonElement.attr("title"); + var a = this, + c = this.options, + e = this.type === "checkbox" || this.type === "radio", + f = "ui-state-hover" + (!e ? " ui-state-active" : ""); + if (c.label === null) c.label = this.buttonElement.html(); + if (this.element.is(":disabled")) c.disabled = true; + this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role", "button").bind("mouseenter.button", function() { + if (!c.disabled) { + b(this).addClass("ui-state-hover"); + this === h && b(this).addClass("ui-state-active") + } + }).bind("mouseleave.button", function() { + c.disabled || b(this).removeClass(f) + }).bind("click.button", function(d) { + if (c.disabled) { + d.preventDefault(); + d.stopImmediatePropagation() + } + }); + this.element.bind("focus.button", function() { + a.buttonElement.addClass("ui-state-focus") + }).bind("blur.button", function() { + a.buttonElement.removeClass("ui-state-focus") + }); + if (e) { + this.element.bind("change.button", function() { + g || a.refresh() + }); + this.buttonElement.bind("mousedown.button", function(d) { + if (!c.disabled) { + g = + false; + i = d.pageX; + j = d.pageY + } + }).bind("mouseup.button", function(d) { + if (!c.disabled) + if (i !== d.pageX || j !== d.pageY) g = true + }) + } + if (this.type === "checkbox") this.buttonElement.bind("click.button", function() { + if (c.disabled || g) return false; + b(this).toggleClass("ui-state-active"); + a.buttonElement.attr("aria-pressed", a.element[0].checked) + }); + else if (this.type === "radio") this.buttonElement.bind("click.button", function() { + if (c.disabled || g) return false; + b(this).addClass("ui-state-active"); + a.buttonElement.attr("aria-pressed", "true"); + var d = a.element[0]; + k(d).not(d).map(function() { + return b(this).button("widget")[0] + }).removeClass("ui-state-active").attr("aria-pressed", "false") + }); + else { + this.buttonElement.bind("mousedown.button", function() { + if (c.disabled) return false; + b(this).addClass("ui-state-active"); + h = this; + b(document).one("mouseup", function() { + h = null + }) + }).bind("mouseup.button", function() { + if (c.disabled) return false; + b(this).removeClass("ui-state-active") + }).bind("keydown.button", function(d) { + if (c.disabled) return false; + if (d.keyCode == b.ui.keyCode.SPACE || + d.keyCode == b.ui.keyCode.ENTER) b(this).addClass("ui-state-active") + }).bind("keyup.button", function() { + b(this).removeClass("ui-state-active") + }); + this.buttonElement.is("a") && this.buttonElement.keyup(function(d) { + d.keyCode === b.ui.keyCode.SPACE && b(this).click() + }) + } + this._setOption("disabled", c.disabled); + this._resetButton() + }, + _determineButtonType: function() { + this.type = this.element.is(":checkbox") ? "checkbox" : this.element.is(":radio") ? "radio" : this.element.is("input") ? "input" : "button"; + if (this.type === "checkbox" || this.type === + "radio") { + var a = this.element.parents().filter(":last"), + c = "label[for='" + this.element.attr("id") + "']"; + this.buttonElement = a.find(c); + if (!this.buttonElement.length) { + a = a.length ? a.siblings() : this.element.siblings(); + this.buttonElement = a.filter(c); + if (!this.buttonElement.length) this.buttonElement = a.find(c) + } + this.element.addClass("ui-helper-hidden-accessible"); + (a = this.element.is(":checked")) && this.buttonElement.addClass("ui-state-active"); + this.buttonElement.attr("aria-pressed", a) + } else this.buttonElement = this.element + }, + widget: function() { + return this.buttonElement + }, + destroy: function() { + this.element.removeClass("ui-helper-hidden-accessible"); + this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()); + this.hasTitle || this.buttonElement.removeAttr("title"); + b.Widget.prototype.destroy.call(this) + }, + _setOption: function(a, c) { + b.Widget.prototype._setOption.apply(this, arguments); + if (a === "disabled") c ? this.element.propAttr("disabled", true) : this.element.propAttr("disabled", false); + else this._resetButton() + }, + refresh: function() { + var a = this.element.is(":disabled"); + a !== this.options.disabled && this._setOption("disabled", a); + if (this.type === "radio") k(this.element[0]).each(function() { + b(this).is(":checked") ? b(this).button("widget").addClass("ui-state-active").attr("aria-pressed", + "true") : b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false") + }); + else if (this.type === "checkbox") this.element.is(":checked") ? this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true") : this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false") + }, + _resetButton: function() { + if (this.type === "input") this.options.label && this.element.val(this.options.label); + else { + var a = this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"), + c = b("").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(), + e = this.options.icons, + f = e.primary && e.secondary, + d = []; + if (e.primary || e.secondary) { + if (this.options.text) d.push("ui-button-text-icon" + (f ? "s" : e.primary ? "-primary" : "-secondary")); + e.primary && a.prepend(""); + e.secondary && a.append(""); + if (!this.options.text) { + d.push(f ? "ui-button-icons-only" : + "ui-button-icon-only"); + this.hasTitle || a.attr("title", c) + } + } else d.push("ui-button-text-only"); + a.addClass(d.join(" ")) + } + } + }); + b.widget("ui.buttonset", { + options: { + items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" + }, + _create: function() { + this.element.addClass("ui-buttonset") + }, + _init: function() { + this.refresh() + }, + _setOption: function(a, c) { + a === "disabled" && this.buttons.button("option", a, c); + b.Widget.prototype._setOption.apply(this, arguments) + }, + refresh: function() { + var a = this.element.css("direction") === + "ltr"; + this.buttons = this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function() { + return b(this).button("widget")[0] + }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a ? "ui-corner-left" : "ui-corner-right").end().filter(":last").addClass(a ? "ui-corner-right" : "ui-corner-left").end().end() + }, + destroy: function() { + this.element.removeClass("ui-buttonset"); + this.buttons.map(function() { + return b(this).button("widget")[0] + }).removeClass("ui-corner-left ui-corner-right").end().button("destroy"); + b.Widget.prototype.destroy.call(this) + } + }) +})(jQuery);; +/* + * jQuery UI Dialog 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.button.js + * jquery.ui.draggable.js + * jquery.ui.mouse.js + * jquery.ui.position.js + * jquery.ui.resizable.js + */ +(function(c, l) { + var m = { + buttons: true, + height: true, + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true, + width: true + }, + n = { + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true + }, + o = c.attrFn || { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true, + click: true + }; + c.widget("ui.dialog", { + options: { + autoOpen: true, + buttons: {}, + closeOnEscape: true, + closeText: "close", + dialogClass: "", + draggable: true, + hide: null, + height: "auto", + maxHeight: false, + maxWidth: false, + minHeight: 150, + minWidth: 150, + modal: false, + position: { + my: "center", + at: "center", + collision: "fit", + using: function(a) { + var b = c(this).css(a).offset().top; + b < 0 && c(this).css("top", a.top - b) + } + }, + resizable: true, + show: null, + stack: true, + title: "", + width: 300, + zIndex: 1E3 + }, + _create: function() { + this.originalTitle = this.element.attr("title"); + if (typeof this.originalTitle !== "string") this.originalTitle = ""; + this.options.title = this.options.title || this.originalTitle; + var a = this, + b = a.options, + d = b.title || " ", + e = c.ui.dialog.getTitleId(a.element), + g = (a.uiDialog = c("
      ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all " + + b.dialogClass).css({ + zIndex: b.zIndex + }).attr("tabIndex", -1).css("outline", 0).keydown(function(i) { + if (b.closeOnEscape && !i.isDefaultPrevented() && i.keyCode && i.keyCode === c.ui.keyCode.ESCAPE) { + a.close(i); + i.preventDefault() + } + }).attr({ + role: "dialog", + "aria-labelledby": e + }).mousedown(function(i) { + a.moveToTop(false, i) + }); + a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g); + var f = (a.uiDialogTitlebar = c("
      ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g), + h = c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", "button").hover(function() { + h.addClass("ui-state-hover") + }, function() { + h.removeClass("ui-state-hover") + }).focus(function() { + h.addClass("ui-state-focus") + }).blur(function() { + h.removeClass("ui-state-focus") + }).click(function(i) { + a.close(i); + return false + }).appendTo(f); + (a.uiDialogTitlebarCloseText = c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h); + c("").addClass("ui-dialog-title").attr("id", + e).html(d).prependTo(f); + if (c.isFunction(b.beforeclose) && !c.isFunction(b.beforeClose)) b.beforeClose = b.beforeclose; + f.find("*").add(f).disableSelection(); + b.draggable && c.fn.draggable && a._makeDraggable(); + b.resizable && c.fn.resizable && a._makeResizable(); + a._createButtons(b.buttons); + a._isOpen = false; + c.fn.bgiframe && g.bgiframe() + }, + _init: function() { + this.options.autoOpen && this.open() + }, + destroy: function() { + var a = this; + a.overlay && a.overlay.destroy(); + a.uiDialog.hide(); + a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); + a.uiDialog.remove(); + a.originalTitle && a.element.attr("title", a.originalTitle); + return a + }, + widget: function() { + return this.uiDialog + }, + close: function(a) { + var b = this, + d, e; + if (false !== b._trigger("beforeClose", a)) { + b.overlay && b.overlay.destroy(); + b.uiDialog.unbind("keypress.ui-dialog"); + b._isOpen = false; + if (b.options.hide) b.uiDialog.hide(b.options.hide, function() { + b._trigger("close", a) + }); + else { + b.uiDialog.hide(); + b._trigger("close", a) + } + c.ui.dialog.overlay.resize(); + if (b.options.modal) { + d = 0; + c(".ui-dialog").each(function() { + if (this !== + b.uiDialog[0]) { + e = c(this).css("z-index"); + isNaN(e) || (d = Math.max(d, e)) + } + }); + c.ui.dialog.maxZ = d + } + return b + } + }, + isOpen: function() { + return this._isOpen + }, + moveToTop: function(a, b) { + var d = this, + e = d.options; + if (e.modal && !a || !e.stack && !e.modal) return d._trigger("focus", b); + if (e.zIndex > c.ui.dialog.maxZ) c.ui.dialog.maxZ = e.zIndex; + if (d.overlay) { + c.ui.dialog.maxZ += 1; + d.overlay.$el.css("z-index", c.ui.dialog.overlay.maxZ = c.ui.dialog.maxZ) + } + a = { + scrollTop: d.element.scrollTop(), + scrollLeft: d.element.scrollLeft() + }; + c.ui.dialog.maxZ += 1; + d.uiDialog.css("z-index", c.ui.dialog.maxZ); + d.element.attr(a); + d._trigger("focus", b); + return d + }, + open: function() { + if (!this._isOpen) { + var a = this, + b = a.options, + d = a.uiDialog; + a.overlay = b.modal ? new c.ui.dialog.overlay(a) : null; + a._size(); + a._position(b.position); + d.show(b.show); + a.moveToTop(true); + b.modal && d.bind("keypress.ui-dialog", function(e) { + if (e.keyCode === c.ui.keyCode.TAB) { + var g = c(":tabbable", this), + f = g.filter(":first"); + g = g.filter(":last"); + if (e.target === g[0] && !e.shiftKey) { + f.focus(1); + return false + } else if (e.target === + f[0] && e.shiftKey) { + g.focus(1); + return false + } + } + }); + c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(); + a._isOpen = true; + a._trigger("open"); + return a + } + }, + _createButtons: function(a) { + var b = this, + d = false, + e = c("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"), + g = c("
      ").addClass("ui-dialog-buttonset").appendTo(e); + b.uiDialog.find(".ui-dialog-buttonpane").remove(); + typeof a === "object" && a !== null && c.each(a, + function() { + return !(d = true) + }); + if (d) { + c.each(a, function(f, h) { + h = c.isFunction(h) ? { + click: h, + text: f + } : h; + var i = c('').click(function() { + h.click.apply(b.element[0], arguments) + }).appendTo(g); + c.each(h, function(j, k) { + if (j !== "click") j in o ? i[j](k) : i.attr(j, k) + }); + c.fn.button && i.button() + }); + e.appendTo(b.uiDialog) + } + }, + _makeDraggable: function() { + function a(f) { + return { + position: f.position, + offset: f.offset + } + } + var b = this, + d = b.options, + e = c(document), + g; + b.uiDialog.draggable({ + cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", + handle: ".ui-dialog-titlebar", + containment: "document", + start: function(f, h) { + g = d.height === "auto" ? "auto" : c(this).height(); + c(this).height(c(this).height()).addClass("ui-dialog-dragging"); + b._trigger("dragStart", f, a(h)) + }, + drag: function(f, h) { + b._trigger("drag", f, a(h)) + }, + stop: function(f, h) { + d.position = [h.position.left - e.scrollLeft(), h.position.top - e.scrollTop()]; + c(this).removeClass("ui-dialog-dragging").height(g); + b._trigger("dragStop", f, a(h)); + c.ui.dialog.overlay.resize() + } + }) + }, + _makeResizable: function(a) { + function b(f) { + return { + originalPosition: f.originalPosition, + originalSize: f.originalSize, + position: f.position, + size: f.size + } + } + a = a === l ? this.options.resizable : a; + var d = this, + e = d.options, + g = d.uiDialog.css("position"); + a = typeof a === "string" ? a : "n,e,s,w,se,sw,ne,nw"; + d.uiDialog.resizable({ + cancel: ".ui-dialog-content", + containment: "document", + alsoResize: d.element, + maxWidth: e.maxWidth, + maxHeight: e.maxHeight, + minWidth: e.minWidth, + minHeight: d._minHeight(), + handles: a, + start: function(f, h) { + c(this).addClass("ui-dialog-resizing"); + d._trigger("resizeStart", f, b(h)) + }, + resize: function(f, h) { + d._trigger("resize", + f, b(h)) + }, + stop: function(f, h) { + c(this).removeClass("ui-dialog-resizing"); + e.height = c(this).height(); + e.width = c(this).width(); + d._trigger("resizeStop", f, b(h)); + c.ui.dialog.overlay.resize() + } + }).css("position", g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se") + }, + _minHeight: function() { + var a = this.options; + return a.height === "auto" ? a.minHeight : Math.min(a.minHeight, a.height) + }, + _position: function(a) { + var b = [], + d = [0, 0], + e; + if (a) { + if (typeof a === "string" || typeof a === "object" && "0" in a) { + b = a.split ? a.split(" ") : [a[0], a[1]]; + if (b.length === 1) b[1] = b[0]; + c.each(["left", "top"], function(g, f) { + if (+b[g] === b[g]) { + d[g] = b[g]; + b[g] = f + } + }); + a = { + my: b.join(" "), + at: b.join(" "), + offset: d.join(" ") + } + } + a = c.extend({}, c.ui.dialog.prototype.options.position, a) + } else a = c.ui.dialog.prototype.options.position; + (e = this.uiDialog.is(":visible")) || this.uiDialog.show(); + this.uiDialog.css({ + top: 0, + left: 0 + }).position(c.extend({ + of: window + }, a)); + e || this.uiDialog.hide() + }, + _setOptions: function(a) { + var b = this, + d = {}, + e = false; + c.each(a, function(g, f) { + b._setOption(g, f); + if (g in m) e = true; + if (g in n) d[g] = f + }); + e && this._size(); + this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", d) + }, + _setOption: function(a, b) { + var d = this, + e = d.uiDialog; + switch (a) { + case "beforeclose": + a = "beforeClose"; + break; + case "buttons": + d._createButtons(b); + break; + case "closeText": + d.uiDialogTitlebarCloseText.text("" + b); + break; + case "dialogClass": + e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all " + b); + break; + case "disabled": + b ? e.addClass("ui-dialog-disabled") : + e.removeClass("ui-dialog-disabled"); + break; + case "draggable": + var g = e.is(":data(draggable)"); + g && !b && e.draggable("destroy"); + !g && b && d._makeDraggable(); + break; + case "position": + d._position(b); + break; + case "resizable": + (g = e.is(":data(resizable)")) && !b && e.resizable("destroy"); + g && typeof b === "string" && e.resizable("option", "handles", b); + !g && b !== false && d._makeResizable(b); + break; + case "title": + c(".ui-dialog-title", d.uiDialogTitlebar).html("" + (b || " ")); + break + } + c.Widget.prototype._setOption.apply(d, arguments) + }, + _size: function() { + var a = + this.options, + b, d, e = this.uiDialog.is(":visible"); + this.element.show().css({ + width: "auto", + minHeight: 0, + height: 0 + }); + if (a.minWidth > a.width) a.width = a.minWidth; + b = this.uiDialog.css({ + height: "auto", + width: a.width + }).height(); + d = Math.max(0, a.minHeight - b); + if (a.height === "auto") + if (c.support.minHeight) this.element.css({ + minHeight: d, + height: "auto" + }); + else { + this.uiDialog.show(); + a = this.element.css("height", "auto").height(); + e || this.uiDialog.hide(); + this.element.height(Math.max(a, d)) + } else this.element.height(Math.max(a.height - + b, 0)); + this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight()) + } + }); + c.extend(c.ui.dialog, { + version: "1.8.16", + uuid: 0, + maxZ: 0, + getTitleId: function(a) { + a = a.attr("id"); + if (!a) { + this.uuid += 1; + a = this.uuid + } + return "ui-dialog-title-" + a + }, + overlay: function(a) { + this.$el = c.ui.dialog.overlay.create(a) + } + }); + c.extend(c.ui.dialog.overlay, { + instances: [], + oldInstances: [], + maxZ: 0, + events: c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","), function(a) { + return a + ".dialog-overlay" + }).join(" "), + create: function(a) { + if (this.instances.length === 0) { + setTimeout(function() { + c.ui.dialog.overlay.instances.length && c(document).bind(c.ui.dialog.overlay.events, function(d) { + if (c(d.target).zIndex() < c.ui.dialog.overlay.maxZ) return false + }) + }, 1); + c(document).bind("keydown.dialog-overlay", function(d) { + if (a.options.closeOnEscape && !d.isDefaultPrevented() && d.keyCode && d.keyCode === c.ui.keyCode.ESCAPE) { + a.close(d); + d.preventDefault() + } + }); + c(window).bind("resize.dialog-overlay", c.ui.dialog.overlay.resize) + } + var b = (this.oldInstances.pop() || + c("
      ").addClass("ui-widget-overlay")).appendTo(document.body).css({ + width: this.width(), + height: this.height() + }); + c.fn.bgiframe && b.bgiframe(); + this.instances.push(b); + return b + }, + destroy: function(a) { + var b = c.inArray(a, this.instances); + b != -1 && this.oldInstances.push(this.instances.splice(b, 1)[0]); + this.instances.length === 0 && c([document, window]).unbind(".dialog-overlay"); + a.remove(); + var d = 0; + c.each(this.instances, function() { + d = Math.max(d, this.css("z-index")) + }); + this.maxZ = d + }, + height: function() { + var a, b; + if (c.browser.msie && + c.browser.version < 7) { + a = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight); + b = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight); + return a < b ? c(window).height() + "px" : a + "px" + } else return c(document).height() + "px" + }, + width: function() { + var a, b; + if (c.browser.msie) { + a = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth); + b = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); + return a < b ? c(window).width() + "px" : a + "px" + } else return c(document).width() + + "px" + }, + resize: function() { + var a = c([]); + c.each(c.ui.dialog.overlay.instances, function() { + a = a.add(this) + }); + a.css({ + width: 0, + height: 0 + }).css({ + width: c.ui.dialog.overlay.width(), + height: c.ui.dialog.overlay.height() + }) + } + }); + c.extend(c.ui.dialog.overlay.prototype, { + destroy: function() { + c.ui.dialog.overlay.destroy(this.$el) + } + }) +})(jQuery);; +/* + * jQuery UI Slider 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d) { + d.widget("ui.slider", d.ui.mouse, { + widgetEventPrefix: "slide", + options: { + animate: false, + distance: 0, + max: 100, + min: 0, + orientation: "horizontal", + range: false, + step: 1, + value: 0, + values: null + }, + _create: function() { + var a = this, + b = this.options, + c = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"), + f = b.values && b.values.length || 1, + e = []; + this._mouseSliding = this._keySliding = false; + this._animateOff = true; + this._handleIndex = null; + this._detectOrientation(); + this._mouseInit(); + this.element.addClass("ui-slider ui-slider-" + + this.orientation + " ui-widget ui-widget-content ui-corner-all" + (b.disabled ? " ui-slider-disabled ui-disabled" : "")); + this.range = d([]); + if (b.range) { + if (b.range === true) { + if (!b.values) b.values = [this._valueMin(), this._valueMin()]; + if (b.values.length && b.values.length !== 2) b.values = [b.values[0], b.values[0]] + } + this.range = d("
      ").appendTo(this.element).addClass("ui-slider-range ui-widget-header" + (b.range === "min" || b.range === "max" ? " ui-slider-range-" + b.range : "")) + } + for (var j = c.length; j < f; j += 1) e.push(""); + this.handles = c.add(d(e.join("")).appendTo(a.element)); + this.handle = this.handles.eq(0); + this.handles.add(this.range).filter("a").click(function(g) { + g.preventDefault() + }).hover(function() { + b.disabled || d(this).addClass("ui-state-hover") + }, function() { + d(this).removeClass("ui-state-hover") + }).focus(function() { + if (b.disabled) d(this).blur(); + else { + d(".ui-slider .ui-state-focus").removeClass("ui-state-focus"); + d(this).addClass("ui-state-focus") + } + }).blur(function() { + d(this).removeClass("ui-state-focus") + }); + this.handles.each(function(g) { + d(this).data("index.ui-slider-handle", + g) + }); + this.handles.keydown(function(g) { + var k = true, + l = d(this).data("index.ui-slider-handle"), + i, h, m; + if (!a.options.disabled) { + switch (g.keyCode) { + case d.ui.keyCode.HOME: + case d.ui.keyCode.END: + case d.ui.keyCode.PAGE_UP: + case d.ui.keyCode.PAGE_DOWN: + case d.ui.keyCode.UP: + case d.ui.keyCode.RIGHT: + case d.ui.keyCode.DOWN: + case d.ui.keyCode.LEFT: + k = false; + if (!a._keySliding) { + a._keySliding = true; + d(this).addClass("ui-state-active"); + i = a._start(g, l); + if (i === false) return + } + break + } + m = a.options.step; + i = a.options.values && a.options.values.length ? + (h = a.values(l)) : (h = a.value()); + switch (g.keyCode) { + case d.ui.keyCode.HOME: + h = a._valueMin(); + break; + case d.ui.keyCode.END: + h = a._valueMax(); + break; + case d.ui.keyCode.PAGE_UP: + h = a._trimAlignValue(i + (a._valueMax() - a._valueMin()) / 5); + break; + case d.ui.keyCode.PAGE_DOWN: + h = a._trimAlignValue(i - (a._valueMax() - a._valueMin()) / 5); + break; + case d.ui.keyCode.UP: + case d.ui.keyCode.RIGHT: + if (i === a._valueMax()) return; + h = a._trimAlignValue(i + m); + break; + case d.ui.keyCode.DOWN: + case d.ui.keyCode.LEFT: + if (i === a._valueMin()) return; + h = a._trimAlignValue(i - + m); + break + } + a._slide(g, l, h); + return k + } + }).keyup(function(g) { + var k = d(this).data("index.ui-slider-handle"); + if (a._keySliding) { + a._keySliding = false; + a._stop(g, k); + a._change(g, k); + d(this).removeClass("ui-state-active") + } + }); + this._refreshValue(); + this._animateOff = false + }, + destroy: function() { + this.handles.remove(); + this.range.remove(); + this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"); + this._mouseDestroy(); + return this + }, + _mouseCapture: function(a) { + var b = this.options, + c, f, e, j, g; + if (b.disabled) return false; + this.elementSize = { + width: this.element.outerWidth(), + height: this.element.outerHeight() + }; + this.elementOffset = this.element.offset(); + c = this._normValueFromMouse({ + x: a.pageX, + y: a.pageY + }); + f = this._valueMax() - this._valueMin() + 1; + j = this; + this.handles.each(function(k) { + var l = Math.abs(c - j.values(k)); + if (f > l) { + f = l; + e = d(this); + g = k + } + }); + if (b.range === true && this.values(1) === b.min) { + g += 1; + e = d(this.handles[g]) + } + if (this._start(a, g) === false) return false; + this._mouseSliding = true; + j._handleIndex = g; + e.addClass("ui-state-active").focus(); + b = e.offset(); + this._clickOffset = !d(a.target).parents().andSelf().is(".ui-slider-handle") ? { + left: 0, + top: 0 + } : { + left: a.pageX - b.left - e.width() / 2, + top: a.pageY - b.top - e.height() / 2 - (parseInt(e.css("borderTopWidth"), 10) || 0) - (parseInt(e.css("borderBottomWidth"), 10) || 0) + (parseInt(e.css("marginTop"), 10) || 0) + }; + this.handles.hasClass("ui-state-hover") || this._slide(a, g, c); + return this._animateOff = true + }, + _mouseStart: function() { + return true + }, + _mouseDrag: function(a) { + var b = + this._normValueFromMouse({ + x: a.pageX, + y: a.pageY + }); + this._slide(a, this._handleIndex, b); + return false + }, + _mouseStop: function(a) { + this.handles.removeClass("ui-state-active"); + this._mouseSliding = false; + this._stop(a, this._handleIndex); + this._change(a, this._handleIndex); + this._clickOffset = this._handleIndex = null; + return this._animateOff = false + }, + _detectOrientation: function() { + this.orientation = this.options.orientation === "vertical" ? "vertical" : "horizontal" + }, + _normValueFromMouse: function(a) { + var b; + if (this.orientation === "horizontal") { + b = + this.elementSize.width; + a = a.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0) + } else { + b = this.elementSize.height; + a = a.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0) + } + b = a / b; + if (b > 1) b = 1; + if (b < 0) b = 0; + if (this.orientation === "vertical") b = 1 - b; + a = this._valueMax() - this._valueMin(); + return this._trimAlignValue(this._valueMin() + b * a) + }, + _start: function(a, b) { + var c = { + handle: this.handles[b], + value: this.value() + }; + if (this.options.values && this.options.values.length) { + c.value = this.values(b); + c.values = this.values() + } + return this._trigger("start", a, c) + }, + _slide: function(a, b, c) { + var f; + if (this.options.values && this.options.values.length) { + f = this.values(b ? 0 : 1); + if (this.options.values.length === 2 && this.options.range === true && (b === 0 && c > f || b === 1 && c < f)) c = f; + if (c !== this.values(b)) { + f = this.values(); + f[b] = c; + a = this._trigger("slide", a, { + handle: this.handles[b], + value: c, + values: f + }); + this.values(b ? 0 : 1); + a !== false && this.values(b, c, true) + } + } else if (c !== this.value()) { + a = this._trigger("slide", a, { + handle: this.handles[b], + value: c + }); + a !== false && this.value(c) + } + }, + _stop: function(a, b) { + var c = { + handle: this.handles[b], + value: this.value() + }; + if (this.options.values && this.options.values.length) { + c.value = this.values(b); + c.values = this.values() + } + this._trigger("stop", a, c) + }, + _change: function(a, b) { + if (!this._keySliding && !this._mouseSliding) { + var c = { + handle: this.handles[b], + value: this.value() + }; + if (this.options.values && this.options.values.length) { + c.value = this.values(b); + c.values = this.values() + } + this._trigger("change", a, c) + } + }, + value: function(a) { + if (arguments.length) { + this.options.value = + this._trimAlignValue(a); + this._refreshValue(); + this._change(null, 0) + } else return this._value() + }, + values: function(a, b) { + var c, f, e; + if (arguments.length > 1) { + this.options.values[a] = this._trimAlignValue(b); + this._refreshValue(); + this._change(null, a) + } else if (arguments.length) + if (d.isArray(arguments[0])) { + c = this.options.values; + f = arguments[0]; + for (e = 0; e < c.length; e += 1) { + c[e] = this._trimAlignValue(f[e]); + this._change(null, e) + } + this._refreshValue() + } else return this.options.values && this.options.values.length ? this._values(a) : + this.value(); + else return this._values() + }, + _setOption: function(a, b) { + var c, f = 0; + if (d.isArray(this.options.values)) f = this.options.values.length; + d.Widget.prototype._setOption.apply(this, arguments); + switch (a) { + case "disabled": + if (b) { + this.handles.filter(".ui-state-focus").blur(); + this.handles.removeClass("ui-state-hover"); + this.handles.propAttr("disabled", true); + this.element.addClass("ui-disabled") + } else { + this.handles.propAttr("disabled", false); + this.element.removeClass("ui-disabled") + } + break; + 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 = true; + this._refreshValue(); + this._change(null, 0); + this._animateOff = false; + break; + case "values": + this._animateOff = true; + this._refreshValue(); + for (c = 0; c < f; c += 1) this._change(null, c); + this._animateOff = false; + break + } + }, + _value: function() { + var a = this.options.value; + return a = this._trimAlignValue(a) + }, + _values: function(a) { + var b, c; + if (arguments.length) { + b = this.options.values[a]; + return b = this._trimAlignValue(b) + } else { + b = this.options.values.slice(); + for (c = 0; c < b.length; c += 1) b[c] = this._trimAlignValue(b[c]); + return b + } + }, + _trimAlignValue: function(a) { + if (a <= this._valueMin()) return this._valueMin(); + if (a >= this._valueMax()) return this._valueMax(); + var b = this.options.step > 0 ? this.options.step : 1, + c = (a - this._valueMin()) % b; + a = a - c; + if (Math.abs(c) * 2 >= b) a += c > 0 ? b : -b; + return parseFloat(a.toFixed(5)) + }, + _valueMin: function() { + return this.options.min + }, + _valueMax: function() { + return this.options.max + }, + _refreshValue: function() { + var a = + this.options.range, + b = this.options, + c = this, + f = !this._animateOff ? b.animate : false, + e, j = {}, + g, k, l, i; + if (this.options.values && this.options.values.length) this.handles.each(function(h) { + e = (c.values(h) - c._valueMin()) / (c._valueMax() - c._valueMin()) * 100; + j[c.orientation === "horizontal" ? "left" : "bottom"] = e + "%"; + d(this).stop(1, 1)[f ? "animate" : "css"](j, b.animate); + if (c.options.range === true) + if (c.orientation === "horizontal") { + if (h === 0) c.range.stop(1, 1)[f ? "animate" : "css"]({ + left: e + "%" + }, b.animate); + if (h === 1) c.range[f ? "animate" : "css"]({ + width: e - + g + "%" + }, { + queue: false, + duration: b.animate + }) + } else { + if (h === 0) c.range.stop(1, 1)[f ? "animate" : "css"]({ + bottom: e + "%" + }, b.animate); + if (h === 1) c.range[f ? "animate" : "css"]({ + height: e - g + "%" + }, { + queue: false, + duration: b.animate + }) + } + g = e + }); + else { + k = this.value(); + l = this._valueMin(); + i = this._valueMax(); + e = i !== l ? (k - l) / (i - l) * 100 : 0; + j[c.orientation === "horizontal" ? "left" : "bottom"] = e + "%"; + this.handle.stop(1, 1)[f ? "animate" : "css"](j, b.animate); + if (a === "min" && this.orientation === "horizontal") this.range.stop(1, 1)[f ? "animate" : "css"]({ + width: e + "%" + }, + b.animate); + if (a === "max" && this.orientation === "horizontal") this.range[f ? "animate" : "css"]({ + width: 100 - e + "%" + }, { + queue: false, + duration: b.animate + }); + if (a === "min" && this.orientation === "vertical") this.range.stop(1, 1)[f ? "animate" : "css"]({ + height: e + "%" + }, b.animate); + if (a === "max" && this.orientation === "vertical") this.range[f ? "animate" : "css"]({ + height: 100 - e + "%" + }, { + queue: false, + duration: b.animate + }) + } + } + }); + d.extend(d.ui.slider, { + version: "1.8.16" + }) +})(jQuery);; +/* + * jQuery UI Tabs 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(d, p) { + function u() { + return ++v + } + + function w() { + return ++x + } + var v = 0, + x = 0; + d.widget("ui.tabs", { + options: { + add: null, + ajaxOptions: null, + cache: false, + cookie: null, + collapsible: false, + disable: null, + disabled: [], + enable: null, + event: "click", + fx: null, + idPrefix: "ui-tabs-", + load: null, + panelTemplate: "
      ", + remove: null, + select: null, + show: null, + spinner: "Loading…", + tabTemplate: "
    • #{label}
    • " + }, + _create: function() { + this._tabify(true) + }, + _setOption: function(b, e) { + if (b == "selected") this.options.collapsible && + e == this.options.selected || this.select(e); + else { + this.options[b] = e; + this._tabify() + } + }, + _tabId: function(b) { + return b.title && b.title.replace(/\s/g, "_").replace(/[^\w\u00c0-\uFFFF-]/g, "") || this.options.idPrefix + u() + }, + _sanitizeSelector: function(b) { + return b.replace(/:/g, "\\:") + }, + _cookie: function() { + var b = this.cookie || (this.cookie = this.options.cookie.name || "ui-tabs-" + w()); + return d.cookie.apply(null, [b].concat(d.makeArray(arguments))) + }, + _ui: function(b, e) { + return { + tab: b, + panel: e, + index: this.anchors.index(b) + } + }, + _cleanup: function() { + this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function() { + var b = + d(this); + b.html(b.data("label.tabs")).removeData("label.tabs") + }) + }, + _tabify: function(b) { + function e(g, f) { + g.css("display", ""); + !d.support.opacity && f.opacity && g[0].style.removeAttribute("filter") + } + var a = this, + c = this.options, + h = /^#.+/; + this.list = this.element.find("ol,ul").eq(0); + this.lis = d(" > li:has(a[href])", this.list); + this.anchors = this.lis.map(function() { + return d("a", this)[0] + }); + this.panels = d([]); + this.anchors.each(function(g, f) { + var i = d(f).attr("href"), + l = i.split("#")[0], + q; + if (l && (l === location.toString().split("#")[0] || + (q = d("base")[0]) && l === q.href)) { + i = f.hash; + f.href = i + } + if (h.test(i)) a.panels = a.panels.add(a.element.find(a._sanitizeSelector(i))); + else if (i && i !== "#") { + d.data(f, "href.tabs", i); + d.data(f, "load.tabs", i.replace(/#.*$/, "")); + i = a._tabId(f); + f.href = "#" + i; + f = a.element.find("#" + i); + if (!f.length) { + f = d(c.panelTemplate).attr("id", i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g - 1] || a.list); + f.data("destroy.tabs", true) + } + a.panels = a.panels.add(f) + } else c.disabled.push(g) + }); + if (b) { + this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); + this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"); + this.lis.addClass("ui-state-default ui-corner-top"); + this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"); + if (c.selected === p) { + location.hash && this.anchors.each(function(g, f) { + if (f.hash == location.hash) { + c.selected = g; + return false + } + }); + if (typeof c.selected !== "number" && c.cookie) c.selected = parseInt(a._cookie(), 10); + if (typeof c.selected !== "number" && this.lis.filter(".ui-tabs-selected").length) c.selected = + this.lis.index(this.lis.filter(".ui-tabs-selected")); + c.selected = c.selected || (this.lis.length ? 0 : -1) + } else if (c.selected === null) c.selected = -1; + c.selected = c.selected >= 0 && this.anchors[c.selected] || c.selected < 0 ? c.selected : 0; + c.disabled = d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"), function(g) { + return a.lis.index(g) + }))).sort(); + d.inArray(c.selected, c.disabled) != -1 && c.disabled.splice(d.inArray(c.selected, c.disabled), 1); + this.panels.addClass("ui-tabs-hide"); + this.lis.removeClass("ui-tabs-selected ui-state-active"); + if (c.selected >= 0 && this.anchors.length) { + a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide"); + this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active"); + a.element.queue("tabs", function() { + a._trigger("show", null, a._ui(a.anchors[c.selected], a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0])) + }); + this.load(c.selected) + } + d(window).bind("unload", function() { + a.lis.add(a.anchors).unbind(".tabs"); + a.lis = a.anchors = a.panels = null + }) + } else c.selected = this.lis.index(this.lis.filter(".ui-tabs-selected")); + this.element[c.collapsible ? "addClass" : "removeClass"]("ui-tabs-collapsible"); + c.cookie && this._cookie(c.selected, c.cookie); + b = 0; + for (var j; j = this.lis[b]; b++) d(j)[d.inArray(b, c.disabled) != -1 && !d(j).hasClass("ui-tabs-selected") ? "addClass" : "removeClass"]("ui-state-disabled"); + c.cache === false && this.anchors.removeData("cache.tabs"); + this.lis.add(this.anchors).unbind(".tabs"); + if (c.event !== "mouseover") { + var k = function(g, f) { + f.is(":not(.ui-state-disabled)") && f.addClass("ui-state-" + g) + }, + n = function(g, f) { + f.removeClass("ui-state-" + + g) + }; + this.lis.bind("mouseover.tabs", function() { + k("hover", d(this)) + }); + this.lis.bind("mouseout.tabs", function() { + n("hover", d(this)) + }); + this.anchors.bind("focus.tabs", function() { + k("focus", d(this).closest("li")) + }); + this.anchors.bind("blur.tabs", function() { + n("focus", d(this).closest("li")) + }) + } + var m, o; + if (c.fx) + if (d.isArray(c.fx)) { + m = c.fx[0]; + o = c.fx[1] + } else m = o = c.fx; + var r = o ? function(g, f) { + d(g).closest("li").addClass("ui-tabs-selected ui-state-active"); + f.hide().removeClass("ui-tabs-hide").animate(o, o.duration || "normal", + function() { + e(f, o); + a._trigger("show", null, a._ui(g, f[0])) + }) + } : function(g, f) { + d(g).closest("li").addClass("ui-tabs-selected ui-state-active"); + f.removeClass("ui-tabs-hide"); + a._trigger("show", null, a._ui(g, f[0])) + }, + s = m ? function(g, f) { + f.animate(m, m.duration || "normal", function() { + a.lis.removeClass("ui-tabs-selected ui-state-active"); + f.addClass("ui-tabs-hide"); + e(f, m); + a.element.dequeue("tabs") + }) + } : function(g, f) { + a.lis.removeClass("ui-tabs-selected ui-state-active"); + f.addClass("ui-tabs-hide"); + a.element.dequeue("tabs") + }; + this.anchors.bind(c.event + ".tabs", function() { + var g = this, + f = d(g).closest("li"), + i = a.panels.filter(":not(.ui-tabs-hide)"), + l = a.element.find(a._sanitizeSelector(g.hash)); + if (f.hasClass("ui-tabs-selected") && !c.collapsible || f.hasClass("ui-state-disabled") || f.hasClass("ui-state-processing") || a.panels.filter(":animated").length || a._trigger("select", null, a._ui(this, l[0])) === false) { + this.blur(); + return false + } + c.selected = a.anchors.index(this); + a.abort(); + if (c.collapsible) + if (f.hasClass("ui-tabs-selected")) { + c.selected = -1; + c.cookie && a._cookie(c.selected, c.cookie); + a.element.queue("tabs", function() { + s(g, i) + }).dequeue("tabs"); + this.blur(); + return false + } else if (!i.length) { + c.cookie && a._cookie(c.selected, c.cookie); + a.element.queue("tabs", function() { + r(g, l) + }); + a.load(a.anchors.index(this)); + this.blur(); + return false + } + c.cookie && a._cookie(c.selected, c.cookie); + if (l.length) { + i.length && a.element.queue("tabs", function() { + s(g, i) + }); + a.element.queue("tabs", function() { + r(g, l) + }); + a.load(a.anchors.index(this)) + } else throw "jQuery UI Tabs: Mismatching fragment identifier."; + d.browser.msie && this.blur() + }); + this.anchors.bind("click.tabs", function() { + return false + }) + }, + _getIndex: function(b) { + if (typeof b == "string") b = this.anchors.index(this.anchors.filter("[href$=" + b + "]")); + return b + }, + destroy: function() { + var b = this.options; + this.abort(); + this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"); + this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"); + this.anchors.each(function() { + var e = + d.data(this, "href.tabs"); + if (e) this.href = e; + var a = d(this).unbind(".tabs"); + d.each(["href", "load", "cache"], function(c, h) { + a.removeData(h + ".tabs") + }) + }); + this.lis.unbind(".tabs").add(this.panels).each(function() { + d.data(this, "destroy.tabs") ? d(this).remove() : d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide") + }); + b.cookie && this._cookie(null, b.cookie); + return this + }, + add: function(b, + e, a) { + if (a === p) a = this.anchors.length; + var c = this, + h = this.options; + e = d(h.tabTemplate.replace(/#\{href\}/g, b).replace(/#\{label\}/g, e)); + b = !b.indexOf("#") ? b.replace("#", "") : this._tabId(d("a", e)[0]); + e.addClass("ui-state-default ui-corner-top").data("destroy.tabs", true); + var j = c.element.find("#" + b); + j.length || (j = d(h.panelTemplate).attr("id", b).data("destroy.tabs", true)); + j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"); + if (a >= this.lis.length) { + e.appendTo(this.list); + j.appendTo(this.list[0].parentNode) + } else { + e.insertBefore(this.lis[a]); + j.insertBefore(this.panels[a]) + } + h.disabled = d.map(h.disabled, function(k) { + return k >= a ? ++k : k + }); + this._tabify(); + if (this.anchors.length == 1) { + h.selected = 0; + e.addClass("ui-tabs-selected ui-state-active"); + j.removeClass("ui-tabs-hide"); + this.element.queue("tabs", function() { + c._trigger("show", null, c._ui(c.anchors[0], c.panels[0])) + }); + this.load(0) + } + this._trigger("add", null, this._ui(this.anchors[a], this.panels[a])); + return this + }, + remove: function(b) { + b = this._getIndex(b); + var e = this.options, + a = this.lis.eq(b).remove(), + c = this.panels.eq(b).remove(); + if (a.hasClass("ui-tabs-selected") && this.anchors.length > 1) this.select(b + (b + 1 < this.anchors.length ? 1 : -1)); + e.disabled = d.map(d.grep(e.disabled, function(h) { + return h != b + }), function(h) { + return h >= b ? --h : h + }); + this._tabify(); + this._trigger("remove", null, this._ui(a.find("a")[0], c[0])); + return this + }, + enable: function(b) { + b = this._getIndex(b); + var e = this.options; + if (d.inArray(b, e.disabled) != -1) { + this.lis.eq(b).removeClass("ui-state-disabled"); + e.disabled = d.grep(e.disabled, function(a) { + return a != b + }); + this._trigger("enable", null, + this._ui(this.anchors[b], this.panels[b])); + return this + } + }, + disable: function(b) { + b = this._getIndex(b); + var e = this.options; + if (b != e.selected) { + this.lis.eq(b).addClass("ui-state-disabled"); + e.disabled.push(b); + e.disabled.sort(); + this._trigger("disable", null, this._ui(this.anchors[b], this.panels[b])) + } + return this + }, + select: function(b) { + b = this._getIndex(b); + if (b == -1) + if (this.options.collapsible && this.options.selected != -1) b = this.options.selected; + else return this; + this.anchors.eq(b).trigger(this.options.event + ".tabs"); + return this + }, + load: function(b) { + b = this._getIndex(b); + var e = this, + a = this.options, + c = this.anchors.eq(b)[0], + h = d.data(c, "load.tabs"); + this.abort(); + if (!h || this.element.queue("tabs").length !== 0 && d.data(c, "cache.tabs")) this.element.dequeue("tabs"); + else { + this.lis.eq(b).addClass("ui-state-processing"); + if (a.spinner) { + var j = d("span", c); + j.data("label.tabs", j.html()).html(a.spinner) + } + this.xhr = d.ajax(d.extend({}, a.ajaxOptions, { + url: h, + success: function(k, n) { + e.element.find(e._sanitizeSelector(c.hash)).html(k); + e._cleanup(); + a.cache && d.data(c, + "cache.tabs", true); + e._trigger("load", null, e._ui(e.anchors[b], e.panels[b])); + try { + a.ajaxOptions.success(k, n) + } catch (m) {} + }, + error: function(k, n) { + e._cleanup(); + e._trigger("load", null, e._ui(e.anchors[b], e.panels[b])); + try { + a.ajaxOptions.error(k, n, b, c) + } catch (m) {} + } + })); + e.element.dequeue("tabs"); + return this + } + }, + abort: function() { + this.element.queue([]); + this.panels.stop(false, true); + this.element.queue("tabs", this.element.queue("tabs").splice(-2, 2)); + if (this.xhr) { + this.xhr.abort(); + delete this.xhr + } + this._cleanup(); + return this + }, + url: function(b, e) { + this.anchors.eq(b).removeData("cache.tabs").data("load.tabs", e); + return this + }, + length: function() { + return this.anchors.length + } + }); + d.extend(d.ui.tabs, { + version: "1.8.16" + }); + d.extend(d.ui.tabs.prototype, { + rotation: null, + rotate: function(b, e) { + var a = this, + c = this.options, + h = a._rotate || (a._rotate = function(j) { + clearTimeout(a.rotation); + a.rotation = setTimeout(function() { + var k = c.selected; + a.select(++k < a.anchors.length ? k : 0) + }, b); + j && j.stopPropagation() + }); + e = a._unrotate || (a._unrotate = !e ? function(j) { + j.clientX && + a.rotate(null) + } : function() { + t = c.selected; + h() + }); + if (b) { + this.element.bind("tabsshow", h); + this.anchors.bind(c.event + ".tabs", e); + h() + } else { + clearTimeout(a.rotation); + this.element.unbind("tabsshow", h); + this.anchors.unbind(c.event + ".tabs", e); + delete this._rotate; + delete this._unrotate + } + return this + } + }) +})(jQuery);; +/* + * jQuery UI Datepicker 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker + * + * Depends: + * jquery.ui.core.js + */ +(function(d, C) { + function M() { + this.debug = false; + this._curInst = null; + this._keyEvent = false; + this._disabledInputs = []; + this._inDialog = this._datepickerShowing = false; + 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: false, + showMonthAfterYear: false, + yearSuffix: "" + }; + this._defaults = { + showOn: "focus", + showAnim: "fadeIn", + showOptions: {}, + defaultDate: null, + appendText: "", + buttonText: "...", + buttonImage: "", + buttonImageOnly: false, + hideIfNoPrevNext: false, + navigationAsDateFormat: false, + gotoCurrent: false, + changeMonth: false, + changeYear: false, + yearRange: "c-10:c+10", + showOtherMonths: false, + selectOtherMonths: false, + showWeek: false, + 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: true, + showButtonPanel: false, + autoSize: false, + disabled: false + }; + d.extend(this._defaults, this.regional[""]); + this.dpDiv = N(d('
      ')) + } + + function N(a) { + return a.bind("mouseout", + function(b) { + b = d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"); + b.length && b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover") + }).bind("mouseover", function(b) { + b = d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"); + if (!(d.datepicker._isDisabledDatepicker(J.inline ? a.parent()[0] : J.input[0]) || !b.length)) { + b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); + b.addClass("ui-state-hover"); + b.hasClass("ui-datepicker-prev") && b.addClass("ui-datepicker-prev-hover"); + b.hasClass("ui-datepicker-next") && b.addClass("ui-datepicker-next-hover") + } + }) + } + + function H(a, b) { + d.extend(a, b); + for (var c in b) + if (b[c] == null || b[c] == C) a[c] = b[c]; + return a + } + d.extend(d.ui, { + datepicker: { + version: "1.8.16" + } + }); + var B = (new Date).getTime(), + J; + d.extend(M.prototype, { + markerClassName: "hasDatepicker", + maxRows: 4, + log: function() { + this.debug && console.log.apply("", arguments) + }, + _widgetDatepicker: function() { + return this.dpDiv + }, + setDefaults: function(a) { + H(this._defaults, a || {}); + return this + }, + _attachDatepicker: function(a, b) { + var c = null; + for (var e in this._defaults) { + var f = a.getAttribute("date:" + e); + if (f) { + c = c || {}; + try { + c[e] = eval(f) + } catch (h) { + c[e] = f + } + } + } + e = a.nodeName.toLowerCase(); + f = e == "div" || e == "span"; + if (!a.id) { + this.uuid += 1; + a.id = "dp" + this.uuid + } + var i = this._newInst(d(a), f); + i.settings = d.extend({}, b || {}, c || {}); + if (e == "input") this._connectDatepicker(a, i); + else f && this._inlineDatepicker(a, i) + }, + _newInst: function(a, b) { + return { + id: a[0].id.replace(/([^A-Za-z0-9_-])/g, + "\\\\$1"), + input: a, + selectedDay: 0, + selectedMonth: 0, + selectedYear: 0, + drawMonth: 0, + drawYear: 0, + inline: b, + dpDiv: !b ? this.dpDiv : N(d('
      ')) + } + }, + _connectDatepicker: function(a, b) { + var c = d(a); + b.append = d([]); + b.trigger = d([]); + if (!c.hasClass(this.markerClassName)) { + this._attachments(c, b); + c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", + function(e, f, h) { + b.settings[f] = h + }).bind("getData.datepicker", function(e, f) { + return this._get(b, f) + }); + this._autoSize(b); + d.data(a, "datepicker", b); + b.settings.disabled && this._disableDatepicker(a) + } + }, + _attachments: function(a, b) { + var c = this._get(b, "appendText"), + e = this._get(b, "isRTL"); + b.append && b.append.remove(); + if (c) { + b.append = d('' + c + ""); + a[e ? "before" : "after"](b.append) + } + a.unbind("focus", this._showDatepicker); + b.trigger && b.trigger.remove(); + c = this._get(b, "showOn"); + if (c == + "focus" || c == "both") a.focus(this._showDatepicker); + if (c == "button" || c == "both") { + c = this._get(b, "buttonText"); + var f = this._get(b, "buttonImage"); + b.trigger = d(this._get(b, "buttonImageOnly") ? d("").addClass(this._triggerClass).attr({ + src: f, + alt: c, + title: c + }) : d('').addClass(this._triggerClass).html(f == "" ? c : d("").attr({ + src: f, + alt: c, + title: c + }))); + a[e ? "before" : "after"](b.trigger); + b.trigger.click(function() { + d.datepicker._datepickerShowing && d.datepicker._lastInput == a[0] ? d.datepicker._hideDatepicker() : + d.datepicker._showDatepicker(a[0]); + return false + }) + } + }, + _autoSize: function(a) { + if (this._get(a, "autoSize") && !a.inline) { + var b = new Date(2009, 11, 20), + c = this._get(a, "dateFormat"); + if (c.match(/[DM]/)) { + var e = function(f) { + for (var h = 0, i = 0, g = 0; g < f.length; g++) + if (f[g].length > h) { + h = f[g].length; + i = g + } + return i + }; + b.setMonth(e(this._get(a, c.match(/MM/) ? "monthNames" : "monthNamesShort"))); + b.setDate(e(this._get(a, c.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - b.getDay()) + } + a.input.attr("size", this._formatDate(a, b).length) + } + }, + _inlineDatepicker: function(a, + b) { + var c = d(a); + if (!c.hasClass(this.markerClassName)) { + c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker", function(e, f, h) { + b.settings[f] = h + }).bind("getData.datepicker", function(e, f) { + return this._get(b, f) + }); + d.data(a, "datepicker", b); + this._setDate(b, this._getDefaultDate(b), true); + this._updateDatepicker(b); + this._updateAlternate(b); + b.settings.disabled && this._disableDatepicker(a); + b.dpDiv.css("display", "block") + } + }, + _dialogDatepicker: function(a, b, c, e, f) { + a = this._dialogInst; + if (!a) { + this.uuid += + 1; + this._dialogInput = d(''); + this._dialogInput.keydown(this._doKeyDown); + d("body").append(this._dialogInput); + a = this._dialogInst = this._newInst(this._dialogInput, false); + a.settings = {}; + d.data(this._dialogInput[0], "datepicker", a) + } + H(a.settings, e || {}); + b = b && b.constructor == Date ? this._formatDate(a, b) : b; + this._dialogInput.val(b); + this._pos = f ? f.length ? f : [f.pageX, f.pageY] : null; + if (!this._pos) this._pos = [document.documentElement.clientWidth / + 2 - 100 + (document.documentElement.scrollLeft || document.body.scrollLeft), document.documentElement.clientHeight / 2 - 150 + (document.documentElement.scrollTop || document.body.scrollTop) + ]; + this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"); + a.settings.onSelect = c; + this._inDialog = true; + this.dpDiv.addClass(this._dialogClass); + this._showDatepicker(this._dialogInput[0]); + d.blockUI && d.blockUI(this.dpDiv); + d.data(this._dialogInput[0], "datepicker", a); + return this + }, + _destroyDatepicker: function(a) { + var b = + d(a), + c = d.data(a, "datepicker"); + if (b.hasClass(this.markerClassName)) { + var e = a.nodeName.toLowerCase(); + d.removeData(a, "datepicker"); + if (e == "input") { + c.append.remove(); + c.trigger.remove(); + b.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp) + } else if (e == "div" || e == "span") b.removeClass(this.markerClassName).empty() + } + }, + _enableDatepicker: function(a) { + var b = d(a), + c = d.data(a, "datepicker"); + if (b.hasClass(this.markerClassName)) { + var e = + a.nodeName.toLowerCase(); + if (e == "input") { + a.disabled = false; + c.trigger.filter("button").each(function() { + this.disabled = false + }).end().filter("img").css({ + opacity: "1.0", + cursor: "" + }) + } else if (e == "div" || e == "span") { + b = b.children("." + this._inlineClass); + b.children().removeClass("ui-state-disabled"); + b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled") + } + this._disabledInputs = d.map(this._disabledInputs, function(f) { + return f == a ? null : f + }) + } + }, + _disableDatepicker: function(a) { + var b = d(a), + c = d.data(a, + "datepicker"); + if (b.hasClass(this.markerClassName)) { + var e = a.nodeName.toLowerCase(); + if (e == "input") { + a.disabled = true; + c.trigger.filter("button").each(function() { + this.disabled = true + }).end().filter("img").css({ + opacity: "0.5", + cursor: "default" + }) + } else if (e == "div" || e == "span") { + b = b.children("." + this._inlineClass); + b.children().addClass("ui-state-disabled"); + b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled", "disabled") + } + this._disabledInputs = d.map(this._disabledInputs, function(f) { + return f == + a ? null : f + }); + this._disabledInputs[this._disabledInputs.length] = a + } + }, + _isDisabledDatepicker: function(a) { + if (!a) return false; + for (var b = 0; b < this._disabledInputs.length; b++) + if (this._disabledInputs[b] == a) return true; + return false + }, + _getInst: function(a) { + try { + return d.data(a, "datepicker") + } catch (b) { + throw "Missing instance data for this datepicker"; + } + }, + _optionDatepicker: function(a, b, c) { + var e = this._getInst(a); + if (arguments.length == 2 && typeof b == "string") return b == "defaults" ? d.extend({}, d.datepicker._defaults) : e ? b == "all" ? + d.extend({}, e.settings) : this._get(e, b) : null; + var f = b || {}; + if (typeof b == "string") { + f = {}; + f[b] = c + } + if (e) { + this._curInst == e && this._hideDatepicker(); + var h = this._getDateDatepicker(a, true), + i = this._getMinMaxDate(e, "min"), + g = this._getMinMaxDate(e, "max"); + H(e.settings, f); + if (i !== null && f.dateFormat !== C && f.minDate === C) e.settings.minDate = this._formatDate(e, i); + if (g !== null && f.dateFormat !== C && f.maxDate === C) e.settings.maxDate = this._formatDate(e, g); + this._attachments(d(a), e); + this._autoSize(e); + this._setDate(e, h); + this._updateAlternate(e); + this._updateDatepicker(e) + } + }, + _changeDatepicker: function(a, b, c) { + this._optionDatepicker(a, b, c) + }, + _refreshDatepicker: function(a) { + (a = this._getInst(a)) && this._updateDatepicker(a) + }, + _setDateDatepicker: function(a, b) { + if (a = this._getInst(a)) { + this._setDate(a, b); + this._updateDatepicker(a); + this._updateAlternate(a) + } + }, + _getDateDatepicker: function(a, b) { + (a = this._getInst(a)) && !a.inline && this._setDateFromField(a, b); + return a ? this._getDate(a) : null + }, + _doKeyDown: function(a) { + var b = d.datepicker._getInst(a.target), + c = true, + e = b.dpDiv.is(".ui-datepicker-rtl"); + b._keyEvent = true; + if (d.datepicker._datepickerShowing) switch (a.keyCode) { + case 9: + d.datepicker._hideDatepicker(); + c = false; + break; + case 13: + c = d("td." + d.datepicker._dayOverClass + ":not(." + d.datepicker._currentClass + ")", b.dpDiv); + c[0] && d.datepicker._selectDay(a.target, b.selectedMonth, b.selectedYear, c[0]); + if (a = d.datepicker._get(b, "onSelect")) { + c = d.datepicker._formatDate(b); + a.apply(b.input ? b.input[0] : null, [c, b]) + } else d.datepicker._hideDatepicker(); + return false; + case 27: + d.datepicker._hideDatepicker(); + break; + case 33: + d.datepicker._adjustDate(a.target, + a.ctrlKey ? -d.datepicker._get(b, "stepBigMonths") : -d.datepicker._get(b, "stepMonths"), "M"); + break; + case 34: + d.datepicker._adjustDate(a.target, a.ctrlKey ? +d.datepicker._get(b, "stepBigMonths") : +d.datepicker._get(b, "stepMonths"), "M"); + break; + case 35: + if (a.ctrlKey || a.metaKey) d.datepicker._clearDate(a.target); + c = a.ctrlKey || a.metaKey; + break; + case 36: + if (a.ctrlKey || a.metaKey) d.datepicker._gotoToday(a.target); + c = a.ctrlKey || a.metaKey; + break; + case 37: + if (a.ctrlKey || a.metaKey) d.datepicker._adjustDate(a.target, e ? +1 : -1, "D"); + c = + a.ctrlKey || a.metaKey; + if (a.originalEvent.altKey) d.datepicker._adjustDate(a.target, a.ctrlKey ? -d.datepicker._get(b, "stepBigMonths") : -d.datepicker._get(b, "stepMonths"), "M"); + break; + case 38: + if (a.ctrlKey || a.metaKey) d.datepicker._adjustDate(a.target, -7, "D"); + c = a.ctrlKey || a.metaKey; + break; + case 39: + if (a.ctrlKey || a.metaKey) d.datepicker._adjustDate(a.target, e ? -1 : +1, "D"); + c = a.ctrlKey || a.metaKey; + if (a.originalEvent.altKey) d.datepicker._adjustDate(a.target, a.ctrlKey ? +d.datepicker._get(b, "stepBigMonths") : +d.datepicker._get(b, + "stepMonths"), "M"); + break; + case 40: + if (a.ctrlKey || a.metaKey) d.datepicker._adjustDate(a.target, +7, "D"); + c = a.ctrlKey || a.metaKey; + break; + default: + c = false + } else if (a.keyCode == 36 && a.ctrlKey) d.datepicker._showDatepicker(this); + else c = false; + if (c) { + a.preventDefault(); + a.stopPropagation() + } + }, + _doKeyPress: function(a) { + var b = d.datepicker._getInst(a.target); + if (d.datepicker._get(b, "constrainInput")) { + b = d.datepicker._possibleChars(d.datepicker._get(b, "dateFormat")); + var c = String.fromCharCode(a.charCode == C ? a.keyCode : a.charCode); + return a.ctrlKey || a.metaKey || c < " " || !b || b.indexOf(c) > -1 + } + }, + _doKeyUp: function(a) { + a = d.datepicker._getInst(a.target); + if (a.input.val() != a.lastVal) try { + if (d.datepicker.parseDate(d.datepicker._get(a, "dateFormat"), a.input ? a.input.val() : null, d.datepicker._getFormatConfig(a))) { + d.datepicker._setDateFromField(a); + d.datepicker._updateAlternate(a); + d.datepicker._updateDatepicker(a) + } + } catch (b) { + d.datepicker.log(b) + } + return true + }, + _showDatepicker: function(a) { + a = a.target || a; + if (a.nodeName.toLowerCase() != "input") a = d("input", + a.parentNode)[0]; + if (!(d.datepicker._isDisabledDatepicker(a) || d.datepicker._lastInput == a)) { + var b = d.datepicker._getInst(a); + if (d.datepicker._curInst && d.datepicker._curInst != b) { + d.datepicker._datepickerShowing && d.datepicker._triggerOnClose(d.datepicker._curInst); + d.datepicker._curInst.dpDiv.stop(true, true) + } + var c = d.datepicker._get(b, "beforeShow"); + c = c ? c.apply(a, [a, b]) : {}; + if (c !== false) { + H(b.settings, c); + b.lastVal = null; + d.datepicker._lastInput = a; + d.datepicker._setDateFromField(b); + if (d.datepicker._inDialog) a.value = + ""; + if (!d.datepicker._pos) { + d.datepicker._pos = d.datepicker._findPos(a); + d.datepicker._pos[1] += a.offsetHeight + } + var e = false; + d(a).parents().each(function() { + e |= d(this).css("position") == "fixed"; + return !e + }); + if (e && d.browser.opera) { + d.datepicker._pos[0] -= document.documentElement.scrollLeft; + d.datepicker._pos[1] -= document.documentElement.scrollTop + } + c = { + left: d.datepicker._pos[0], + top: d.datepicker._pos[1] + }; + d.datepicker._pos = null; + b.dpDiv.empty(); + b.dpDiv.css({ + position: "absolute", + display: "block", + top: "-1000px" + }); + d.datepicker._updateDatepicker(b); + c = d.datepicker._checkOffset(b, c, e); + b.dpDiv.css({ + position: d.datepicker._inDialog && d.blockUI ? "static" : e ? "fixed" : "absolute", + display: "none", + left: c.left + "px", + top: c.top + "px" + }); + if (!b.inline) { + c = d.datepicker._get(b, "showAnim"); + var f = d.datepicker._get(b, "duration"), + h = function() { + var i = b.dpDiv.find("iframe.ui-datepicker-cover"); + if (i.length) { + var g = d.datepicker._getBorders(b.dpDiv); + i.css({ + left: -g[0], + top: -g[1], + width: b.dpDiv.outerWidth(), + height: b.dpDiv.outerHeight() + }) + } + }; + b.dpDiv.zIndex(d(a).zIndex() + 1); + d.datepicker._datepickerShowing = + true; + d.effects && d.effects[c] ? b.dpDiv.show(c, d.datepicker._get(b, "showOptions"), f, h) : b.dpDiv[c || "show"](c ? f : null, h); + if (!c || !f) h(); + b.input.is(":visible") && !b.input.is(":disabled") && b.input.focus(); + d.datepicker._curInst = b + } + } + } + }, + _updateDatepicker: function(a) { + this.maxRows = 4; + var b = d.datepicker._getBorders(a.dpDiv); + J = a; + a.dpDiv.empty().append(this._generateHTML(a)); + var c = a.dpDiv.find("iframe.ui-datepicker-cover"); + c.length && c.css({ + left: -b[0], + top: -b[1], + width: a.dpDiv.outerWidth(), + height: a.dpDiv.outerHeight() + }); + a.dpDiv.find("." + this._dayOverClass + " a").mouseover(); + b = this._getNumberOfMonths(a); + c = b[1]; + a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); + c > 1 && a.dpDiv.addClass("ui-datepicker-multi-" + c).css("width", 17 * c + "em"); + a.dpDiv[(b[0] != 1 || b[1] != 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi"); + a.dpDiv[(this._get(a, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"); + a == d.datepicker._curInst && d.datepicker._datepickerShowing && a.input && a.input.is(":visible") && + !a.input.is(":disabled") && a.input[0] != document.activeElement && a.input.focus(); + if (a.yearshtml) { + var e = a.yearshtml; + setTimeout(function() { + e === a.yearshtml && a.yearshtml && a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml); + e = a.yearshtml = null + }, 0) + } + }, + _getBorders: function(a) { + var b = function(c) { + return { + thin: 1, + medium: 2, + thick: 3 + }[c] || c + }; + return [parseFloat(b(a.css("border-left-width"))), parseFloat(b(a.css("border-top-width")))] + }, + _checkOffset: function(a, b, c) { + var e = a.dpDiv.outerWidth(), + f = a.dpDiv.outerHeight(), + h = a.input ? a.input.outerWidth() : 0, + i = a.input ? a.input.outerHeight() : 0, + g = document.documentElement.clientWidth + d(document).scrollLeft(), + j = document.documentElement.clientHeight + d(document).scrollTop(); + b.left -= this._get(a, "isRTL") ? e - h : 0; + b.left -= c && b.left == a.input.offset().left ? d(document).scrollLeft() : 0; + b.top -= c && b.top == a.input.offset().top + i ? d(document).scrollTop() : 0; + b.left -= Math.min(b.left, b.left + e > g && g > e ? Math.abs(b.left + e - g) : 0); + b.top -= Math.min(b.top, b.top + f > j && j > f ? Math.abs(f + i) : 0); + return b + }, + _findPos: function(a) { + for (var b = + this._get(this._getInst(a), "isRTL"); a && (a.type == "hidden" || a.nodeType != 1 || d.expr.filters.hidden(a));) a = a[b ? "previousSibling" : "nextSibling"]; + a = d(a).offset(); + return [a.left, a.top] + }, + _triggerOnClose: function(a) { + var b = this._get(a, "onClose"); + if (b) b.apply(a.input ? a.input[0] : null, [a.input ? a.input.val() : "", a]) + }, + _hideDatepicker: function(a) { + var b = this._curInst; + if (!(!b || a && b != d.data(a, "datepicker"))) + if (this._datepickerShowing) { + a = this._get(b, "showAnim"); + var c = this._get(b, "duration"), + e = function() { + d.datepicker._tidyDialog(b); + this._curInst = null + }; + d.effects && d.effects[a] ? b.dpDiv.hide(a, d.datepicker._get(b, "showOptions"), c, e) : b.dpDiv[a == "slideDown" ? "slideUp" : a == "fadeIn" ? "fadeOut" : "hide"](a ? c : null, e); + a || e(); + d.datepicker._triggerOnClose(b); + this._datepickerShowing = false; + this._lastInput = null; + if (this._inDialog) { + this._dialogInput.css({ + position: "absolute", + left: "0", + top: "-100px" + }); + if (d.blockUI) { + d.unblockUI(); + d("body").append(this.dpDiv) + } + } + this._inDialog = false + } + }, + _tidyDialog: function(a) { + a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar") + }, + _checkExternalClick: function(a) { + if (d.datepicker._curInst) { + a = d(a.target); + a[0].id != d.datepicker._mainDivId && a.parents("#" + d.datepicker._mainDivId).length == 0 && !a.hasClass(d.datepicker.markerClassName) && !a.hasClass(d.datepicker._triggerClass) && d.datepicker._datepickerShowing && !(d.datepicker._inDialog && d.blockUI) && d.datepicker._hideDatepicker() + } + }, + _adjustDate: function(a, b, c) { + a = d(a); + var e = this._getInst(a[0]); + if (!this._isDisabledDatepicker(a[0])) { + this._adjustInstDate(e, b + (c == "M" ? this._get(e, "showCurrentAtPos") : + 0), c); + this._updateDatepicker(e) + } + }, + _gotoToday: function(a) { + a = d(a); + var b = this._getInst(a[0]); + if (this._get(b, "gotoCurrent") && b.currentDay) { + b.selectedDay = b.currentDay; + b.drawMonth = b.selectedMonth = b.currentMonth; + b.drawYear = b.selectedYear = b.currentYear + } else { + var c = new Date; + b.selectedDay = c.getDate(); + b.drawMonth = b.selectedMonth = c.getMonth(); + b.drawYear = b.selectedYear = c.getFullYear() + } + this._notifyChange(b); + this._adjustDate(a) + }, + _selectMonthYear: function(a, b, c) { + a = d(a); + var e = this._getInst(a[0]); + e["selected" + (c == "M" ? + "Month" : "Year")] = e["draw" + (c == "M" ? "Month" : "Year")] = parseInt(b.options[b.selectedIndex].value, 10); + this._notifyChange(e); + this._adjustDate(a) + }, + _selectDay: function(a, b, c, e) { + var f = d(a); + if (!(d(e).hasClass(this._unselectableClass) || this._isDisabledDatepicker(f[0]))) { + f = this._getInst(f[0]); + f.selectedDay = f.currentDay = d("a", e).html(); + f.selectedMonth = f.currentMonth = b; + f.selectedYear = f.currentYear = c; + this._selectDate(a, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear)) + } + }, + _clearDate: function(a) { + a = d(a); + this._getInst(a[0]); + this._selectDate(a, "") + }, + _selectDate: function(a, b) { + a = this._getInst(d(a)[0]); + b = b != null ? b : this._formatDate(a); + a.input && a.input.val(b); + this._updateAlternate(a); + var c = this._get(a, "onSelect"); + if (c) c.apply(a.input ? a.input[0] : null, [b, a]); + else a.input && a.input.trigger("change"); + if (a.inline) this._updateDatepicker(a); + else { + this._hideDatepicker(); + this._lastInput = a.input[0]; + typeof a.input[0] != "object" && a.input.focus(); + this._lastInput = null + } + }, + _updateAlternate: function(a) { + var b = this._get(a, "altField"); + if (b) { + var c = this._get(a, "altFormat") || this._get(a, "dateFormat"), + e = this._getDate(a), + f = this.formatDate(c, e, this._getFormatConfig(a)); + d(b).each(function() { + d(this).val(f) + }) + } + }, + noWeekends: function(a) { + a = a.getDay(); + return [a > 0 && a < 6, ""] + }, + iso8601Week: function(a) { + a = new Date(a.getTime()); + a.setDate(a.getDate() + 4 - (a.getDay() || 7)); + var b = a.getTime(); + a.setMonth(0); + a.setDate(1); + return Math.floor(Math.round((b - a) / 864E5) / 7) + 1 + }, + parseDate: function(a, b, c) { + if (a == null || b == null) throw "Invalid arguments"; + b = typeof b == "object" ? + b.toString() : b + ""; + if (b == "") return null; + var e = (c ? c.shortYearCutoff : null) || this._defaults.shortYearCutoff; + e = typeof e != "string" ? e : (new Date).getFullYear() % 100 + parseInt(e, 10); + for (var f = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort, h = (c ? c.dayNames : null) || this._defaults.dayNames, i = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort, g = (c ? c.monthNames : null) || this._defaults.monthNames, j = c = -1, l = -1, u = -1, k = false, o = function(p) { + (p = A + 1 < a.length && a.charAt(A + 1) == p) && A++; + return p + }, m = function(p) { + var D = + o(p); + p = new RegExp("^\\d{1," + (p == "@" ? 14 : p == "!" ? 20 : p == "y" && D ? 4 : p == "o" ? 3 : 2) + "}"); + p = b.substring(q).match(p); + if (!p) throw "Missing number at position " + q; + q += p[0].length; + return parseInt(p[0], 10) + }, n = function(p, D, K) { + p = d.map(o(p) ? K : D, function(w, x) { + return [ + [x, w] + ] + }).sort(function(w, x) { + return -(w[1].length - x[1].length) + }); + var E = -1; + d.each(p, function(w, x) { + w = x[1]; + if (b.substr(q, w.length).toLowerCase() == w.toLowerCase()) { + E = x[0]; + q += w.length; + return false + } + }); + if (E != -1) return E + 1; + else throw "Unknown name at position " + q; + }, s = + function() { + if (b.charAt(q) != a.charAt(A)) throw "Unexpected literal at position " + q; + q++ + }, q = 0, A = 0; A < a.length; A++) + if (k) + if (a.charAt(A) == "'" && !o("'")) k = false; + else s(); + else switch (a.charAt(A)) { + case "d": + l = m("d"); + break; + case "D": + n("D", f, h); + break; + case "o": + u = m("o"); + break; + case "m": + j = m("m"); + break; + case "M": + j = n("M", i, g); + break; + case "y": + c = m("y"); + break; + case "@": + var v = new Date(m("@")); + c = v.getFullYear(); + j = v.getMonth() + 1; + l = v.getDate(); + break; + case "!": + v = new Date((m("!") - this._ticksTo1970) / 1E4); + c = v.getFullYear(); + j = v.getMonth() + + 1; + l = v.getDate(); + break; + case "'": + if (o("'")) s(); + else k = true; + break; + default: + s() + } + if (q < b.length) throw "Extra/unparsed characters found in date: " + b.substring(q); + if (c == -1) c = (new Date).getFullYear(); + else if (c < 100) c += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (c <= e ? 0 : -100); + if (u > -1) { + j = 1; + l = u; + do { + e = this._getDaysInMonth(c, j - 1); + if (l <= e) break; + j++; + l -= e + } while (1) + } + v = this._daylightSavingAdjust(new Date(c, j - 1, l)); + if (v.getFullYear() != c || v.getMonth() + 1 != j || v.getDate() != l) throw "Invalid date"; + return v + }, + 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)) * 24 * 60 * 60 * 1E7, + formatDate: function(a, b, c) { + if (!b) return ""; + var e = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort, + f = (c ? c.dayNames : null) || this._defaults.dayNames, + h = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort; + c = (c ? c.monthNames : + null) || this._defaults.monthNames; + var i = function(o) { + (o = k + 1 < a.length && a.charAt(k + 1) == o) && k++; + return o + }, + g = function(o, m, n) { + m = "" + m; + if (i(o)) + for (; m.length < n;) m = "0" + m; + return m + }, + j = function(o, m, n, s) { + return i(o) ? s[m] : n[m] + }, + l = "", + u = false; + if (b) + for (var k = 0; k < a.length; k++) + if (u) + if (a.charAt(k) == "'" && !i("'")) u = false; + else l += a.charAt(k); + else switch (a.charAt(k)) { + case "d": + l += g("d", b.getDate(), 2); + break; + case "D": + l += j("D", b.getDay(), e, f); + break; + case "o": + l += g("o", Math.round(((new Date(b.getFullYear(), b.getMonth(), b.getDate())).getTime() - + (new Date(b.getFullYear(), 0, 0)).getTime()) / 864E5), 3); + break; + case "m": + l += g("m", b.getMonth() + 1, 2); + break; + case "M": + l += j("M", b.getMonth(), h, c); + break; + case "y": + l += i("y") ? b.getFullYear() : (b.getYear() % 100 < 10 ? "0" : "") + b.getYear() % 100; + break; + case "@": + l += b.getTime(); + break; + case "!": + l += b.getTime() * 1E4 + this._ticksTo1970; + break; + case "'": + if (i("'")) l += "'"; + else u = true; + break; + default: + l += a.charAt(k) + } + return l + }, + _possibleChars: function(a) { + for (var b = "", c = false, e = function(h) { + (h = f + 1 < a.length && a.charAt(f + 1) == h) && f++; + return h + }, f = + 0; f < a.length; f++) + if (c) + if (a.charAt(f) == "'" && !e("'")) c = false; + else b += a.charAt(f); + else switch (a.charAt(f)) { + case "d": + case "m": + case "y": + case "@": + b += "0123456789"; + break; + case "D": + case "M": + return null; + case "'": + if (e("'")) b += "'"; + else c = true; + break; + default: + b += a.charAt(f) + } + return b + }, + _get: function(a, b) { + return a.settings[b] !== C ? a.settings[b] : this._defaults[b] + }, + _setDateFromField: function(a, b) { + if (a.input.val() != a.lastVal) { + var c = this._get(a, "dateFormat"), + e = a.lastVal = a.input ? a.input.val() : null, + f, h; + f = h = this._getDefaultDate(a); + var i = this._getFormatConfig(a); + try { + f = this.parseDate(c, e, i) || h + } catch (g) { + this.log(g); + e = b ? "" : e + } + a.selectedDay = f.getDate(); + a.drawMonth = a.selectedMonth = f.getMonth(); + a.drawYear = a.selectedYear = f.getFullYear(); + a.currentDay = e ? f.getDate() : 0; + a.currentMonth = e ? f.getMonth() : 0; + a.currentYear = e ? f.getFullYear() : 0; + this._adjustInstDate(a) + } + }, + _getDefaultDate: function(a) { + return this._restrictMinMax(a, this._determineDate(a, this._get(a, "defaultDate"), new Date)) + }, + _determineDate: function(a, b, c) { + var e = function(h) { + var i = new Date; + i.setDate(i.getDate() + h); + return i + }, + f = function(h) { + try { + return d.datepicker.parseDate(d.datepicker._get(a, "dateFormat"), h, d.datepicker._getFormatConfig(a)) + } catch (i) {} + var g = (h.toLowerCase().match(/^c/) ? d.datepicker._getDate(a) : null) || new Date, + j = g.getFullYear(), + l = g.getMonth(); + g = g.getDate(); + for (var u = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, k = u.exec(h); k;) { + switch (k[2] || "d") { + case "d": + case "D": + g += parseInt(k[1], 10); + break; + case "w": + case "W": + g += parseInt(k[1], 10) * 7; + break; + case "m": + case "M": + l += parseInt(k[1], 10); + g = + Math.min(g, d.datepicker._getDaysInMonth(j, l)); + break; + case "y": + case "Y": + j += parseInt(k[1], 10); + g = Math.min(g, d.datepicker._getDaysInMonth(j, l)); + break + } + k = u.exec(h) + } + return new Date(j, l, g) + }; + if (b = (b = b == null || b === "" ? c : typeof b == "string" ? f(b) : typeof b == "number" ? isNaN(b) ? c : e(b) : new Date(b.getTime())) && b.toString() == "Invalid Date" ? c : b) { + b.setHours(0); + b.setMinutes(0); + b.setSeconds(0); + b.setMilliseconds(0) + } + return this._daylightSavingAdjust(b) + }, + _daylightSavingAdjust: function(a) { + if (!a) return null; + a.setHours(a.getHours() > + 12 ? a.getHours() + 2 : 0); + return a + }, + _setDate: function(a, b, c) { + var e = !b, + f = a.selectedMonth, + h = a.selectedYear; + b = this._restrictMinMax(a, this._determineDate(a, b, new Date)); + a.selectedDay = a.currentDay = b.getDate(); + a.drawMonth = a.selectedMonth = a.currentMonth = b.getMonth(); + a.drawYear = a.selectedYear = a.currentYear = b.getFullYear(); + if ((f != a.selectedMonth || h != a.selectedYear) && !c) this._notifyChange(a); + this._adjustInstDate(a); + if (a.input) a.input.val(e ? "" : this._formatDate(a)) + }, + _getDate: function(a) { + return !a.currentYear || a.input && + a.input.val() == "" ? null : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay)) + }, + _generateHTML: function(a) { + var b = new Date; + b = this._daylightSavingAdjust(new Date(b.getFullYear(), b.getMonth(), b.getDate())); + var c = this._get(a, "isRTL"), + e = this._get(a, "showButtonPanel"), + f = this._get(a, "hideIfNoPrevNext"), + h = this._get(a, "navigationAsDateFormat"), + i = this._getNumberOfMonths(a), + g = this._get(a, "showCurrentAtPos"), + j = this._get(a, "stepMonths"), + l = i[0] != 1 || i[1] != 1, + u = this._daylightSavingAdjust(!a.currentDay ? + new Date(9999, 9, 9) : new Date(a.currentYear, a.currentMonth, a.currentDay)), + k = this._getMinMaxDate(a, "min"), + o = this._getMinMaxDate(a, "max"); + g = a.drawMonth - g; + var m = a.drawYear; + if (g < 0) { + g += 12; + m-- + } + if (o) { + var n = this._daylightSavingAdjust(new Date(o.getFullYear(), o.getMonth() - i[0] * i[1] + 1, o.getDate())); + for (n = k && n < k ? k : n; this._daylightSavingAdjust(new Date(m, g, 1)) > n;) { + g--; + if (g < 0) { + g = 11; + m-- + } + } + } + a.drawMonth = g; + a.drawYear = m; + n = this._get(a, "prevText"); + n = !h ? n : this.formatDate(n, this._daylightSavingAdjust(new Date(m, g - j, 1)), this._getFormatConfig(a)); + n = this._canAdjustMonth(a, -1, m, g) ? '' + n + "" : f ? "" : '' + n + ""; + var s = this._get(a, "nextText"); + s = !h ? s : this.formatDate(s, this._daylightSavingAdjust(new Date(m, + g + j, 1)), this._getFormatConfig(a)); + f = this._canAdjustMonth(a, +1, m, g) ? '' + s + "" : f ? "" : '' + s + ""; + j = this._get(a, "currentText"); + s = this._get(a, "gotoCurrent") && + a.currentDay ? u : b; + j = !h ? j : this.formatDate(j, s, this._getFormatConfig(a)); + h = !a.inline ? '" : ""; + e = e ? '
      ' + (c ? h : "") + (this._isInRange(a, s) ? '" : "") + (c ? "" : h) + "
      " : ""; + h = parseInt(this._get(a, "firstDay"), 10); + h = isNaN(h) ? 0 : h; + j = this._get(a, "showWeek"); + s = this._get(a, "dayNames"); + this._get(a, "dayNamesShort"); + var q = this._get(a, "dayNamesMin"), + A = this._get(a, "monthNames"), + v = this._get(a, "monthNamesShort"), + p = this._get(a, "beforeShowDay"), + D = this._get(a, "showOtherMonths"), + K = this._get(a, "selectOtherMonths"); + this._get(a, "calculateWeek"); + for (var E = this._getDefaultDate(a), w = "", x = 0; x < i[0]; x++) { + var O = + ""; + this.maxRows = 4; + for (var G = 0; G < i[1]; G++) { + var P = this._daylightSavingAdjust(new Date(m, g, a.selectedDay)), + t = " ui-corner-all", + y = ""; + if (l) { + y += '
      ' + (/all|left/.test(t) && + x == 0 ? c ? f : n : "") + (/all|right/.test(t) && x == 0 ? c ? n : f : "") + this._generateMonthYearHeader(a, g, m, k, o, x > 0 || G > 0, A, v) + '
      '; + var z = j ? '" : ""; + for (t = 0; t < 7; t++) { + var r = (t + h) % 7; + z += "= 5 ? ' class="ui-datepicker-week-end"' : "") + '>' + q[r] + "" + } + y += z + ""; + z = this._getDaysInMonth(m, g); + if (m == a.selectedYear && g == a.selectedMonth) a.selectedDay = Math.min(a.selectedDay, + z); + t = (this._getFirstDayOfMonth(m, g) - h + 7) % 7; + z = Math.ceil((t + z) / 7); + this.maxRows = z = l ? this.maxRows > z ? this.maxRows : z : z; + r = this._daylightSavingAdjust(new Date(m, g, 1 - t)); + for (var Q = 0; Q < z; Q++) { + y += ""; + var R = !j ? "" : '"; + for (t = 0; t < 7; t++) { + var I = p ? p.apply(a.input ? a.input[0] : null, [r]) : [true, ""], + F = r.getMonth() != g, + L = F && !K || !I[0] || k && r < k || o && r > o; + R += '"; + r.setDate(r.getDate() + 1); + r = this._daylightSavingAdjust(r) + } + y += R + "" + } + g++; + if (g > 11) { + g = 0; + m++ + } + y += "
      ' + this._get(a, "weekHeader") + "
      ' + this._get(a, "calculateWeek")(r) + "" + (F && !D ? " " : L ? '' + + r.getDate() + "" : '' + r.getDate() + "") + "
      " + (l ? "
      " + (i[0] > 0 && G == i[1] - 1 ? '
      ' : "") : ""); + O += y + } + w += O + } + w += e + (d.browser.msie && parseInt(d.browser.version, 10) < 7 && !a.inline ? '' : + ""); + a._keyEvent = false; + return w + }, + _generateMonthYearHeader: function(a, b, c, e, f, h, i, g) { + var j = this._get(a, "changeMonth"), + l = this._get(a, "changeYear"), + u = this._get(a, "showMonthAfterYear"), + k = '
      ', + o = ""; + if (h || !j) o += '' + i[b] + ""; + else { + i = e && e.getFullYear() == c; + var m = f && f.getFullYear() == c; + o += '" + } + u || (k += o + (h || !(j && l) ? " " : "")); + if (!a.yearshtml) { + a.yearshtml = ""; + if (h || !l) k += '' + c + ""; + else { + g = this._get(a, "yearRange").split(":"); + var s = (new Date).getFullYear(); + i = function(q) { + q = q.match(/c[+-].*/) ? c + parseInt(q.substring(1), 10) : q.match(/[+-].*/) ? s + parseInt(q, 10) : parseInt(q, 10); + return isNaN(q) ? s : q + }; + b = i(g[0]); + g = Math.max(b, i(g[1] || "")); + b = e ? Math.max(b, + e.getFullYear()) : b; + g = f ? Math.min(g, f.getFullYear()) : g; + for (a.yearshtml += '"; + k += a.yearshtml; + a.yearshtml = null + } + } + k += this._get(a, "yearSuffix"); + if (u) k += (h || !(j && l) ? " " : "") + o; + k += "
      "; + return k + }, + _adjustInstDate: function(a, b, c) { + var e = a.drawYear + (c == "Y" ? b : 0), + f = a.drawMonth + + (c == "M" ? b : 0); + b = Math.min(a.selectedDay, this._getDaysInMonth(e, f)) + (c == "D" ? b : 0); + e = this._restrictMinMax(a, this._daylightSavingAdjust(new Date(e, f, b))); + a.selectedDay = e.getDate(); + a.drawMonth = a.selectedMonth = e.getMonth(); + a.drawYear = a.selectedYear = e.getFullYear(); + if (c == "M" || c == "Y") this._notifyChange(a) + }, + _restrictMinMax: function(a, b) { + var c = this._getMinMaxDate(a, "min"); + a = this._getMinMaxDate(a, "max"); + b = c && b < c ? c : b; + return b = a && b > a ? a : b + }, + _notifyChange: function(a) { + var b = this._get(a, "onChangeMonthYear"); + if (b) b.apply(a.input ? + a.input[0] : null, [a.selectedYear, a.selectedMonth + 1, a]) + }, + _getNumberOfMonths: function(a) { + a = this._get(a, "numberOfMonths"); + return a == null ? [1, 1] : typeof a == "number" ? [1, a] : a + }, + _getMinMaxDate: function(a, b) { + return this._determineDate(a, this._get(a, b + "Date"), null) + }, + _getDaysInMonth: function(a, b) { + return 32 - this._daylightSavingAdjust(new Date(a, b, 32)).getDate() + }, + _getFirstDayOfMonth: function(a, b) { + return (new Date(a, b, 1)).getDay() + }, + _canAdjustMonth: function(a, b, c, e) { + var f = this._getNumberOfMonths(a); + c = this._daylightSavingAdjust(new Date(c, + e + (b < 0 ? b : f[0] * f[1]), 1)); + b < 0 && c.setDate(this._getDaysInMonth(c.getFullYear(), c.getMonth())); + return this._isInRange(a, c) + }, + _isInRange: function(a, b) { + var c = this._getMinMaxDate(a, "min"); + a = this._getMinMaxDate(a, "max"); + return (!c || b.getTime() >= c.getTime()) && (!a || b.getTime() <= a.getTime()) + }, + _getFormatConfig: function(a) { + var b = this._get(a, "shortYearCutoff"); + b = typeof b != "string" ? b : (new Date).getFullYear() % 100 + parseInt(b, 10); + return { + shortYearCutoff: b, + dayNamesShort: this._get(a, "dayNamesShort"), + dayNames: this._get(a, + "dayNames"), + monthNamesShort: this._get(a, "monthNamesShort"), + monthNames: this._get(a, "monthNames") + } + }, + _formatDate: function(a, b, c, e) { + if (!b) { + a.currentDay = a.selectedDay; + a.currentMonth = a.selectedMonth; + a.currentYear = a.selectedYear + } + b = b ? typeof b == "object" ? b : this._daylightSavingAdjust(new Date(e, c, b)) : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay)); + return this.formatDate(this._get(a, "dateFormat"), b, this._getFormatConfig(a)) + } + }); + d.fn.datepicker = function(a) { + if (!this.length) return this; + if (!d.datepicker.initialized) { + d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv); + d.datepicker.initialized = true + } + var b = Array.prototype.slice.call(arguments, 1); + if (typeof a == "string" && (a == "isDisabled" || a == "getDate" || a == "widget")) return d.datepicker["_" + a + "Datepicker"].apply(d.datepicker, [this[0]].concat(b)); + if (a == "option" && arguments.length == 2 && typeof arguments[1] == "string") return d.datepicker["_" + a + "Datepicker"].apply(d.datepicker, [this[0]].concat(b)); + return this.each(function() { + typeof a == + "string" ? d.datepicker["_" + a + "Datepicker"].apply(d.datepicker, [this].concat(b)) : d.datepicker._attachDatepicker(this, a) + }) + }; + d.datepicker = new M; + d.datepicker.initialized = false; + d.datepicker.uuid = (new Date).getTime(); + d.datepicker.version = "1.8.16"; + window["DP_jQuery_" + B] = d +})(jQuery);; +/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(b, d) { + b.widget("ui.progressbar", { + options: { + value: 0, + max: 100 + }, + min: 0, + _create: function() { + this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({ + role: "progressbar", + "aria-valuemin": this.min, + "aria-valuemax": this.options.max, + "aria-valuenow": this._value() + }); + this.valueDiv = b("
      ").appendTo(this.element); + this.oldValue = this._value(); + this._refreshValue() + }, + destroy: function() { + this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); + this.valueDiv.remove(); + b.Widget.prototype.destroy.apply(this, arguments) + }, + value: function(a) { + if (a === d) return this._value(); + this._setOption("value", a); + return this + }, + _setOption: function(a, c) { + if (a === "value") { + this.options.value = c; + this._refreshValue(); + this._value() === this.options.max && this._trigger("complete") + } + b.Widget.prototype._setOption.apply(this, arguments) + }, + _value: function() { + var a = this.options.value; + if (typeof a !== "number") a = 0; + return Math.min(this.options.max, Math.max(this.min, a)) + }, + _percentage: function() { + return 100 * + this._value() / this.options.max + }, + _refreshValue: function() { + var a = this.value(), + c = this._percentage(); + if (this.oldValue !== a) { + this.oldValue = a; + this._trigger("change") + } + this.valueDiv.toggle(a > this.min).toggleClass("ui-corner-right", a === this.options.max).width(c.toFixed(0) + "%"); + this.element.attr("aria-valuenow", a) + } + }); + b.extend(b.ui.progressbar, { + version: "1.8.16" + }) +})(jQuery);; +/* + * jQuery UI Effects 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects || function(f, j) { + function m(c) { + var a; + if (c && c.constructor == Array && c.length == 3) return c; + if (a = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c)) return [parseInt(a[1], 10), parseInt(a[2], 10), parseInt(a[3], 10)]; + if (a = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c)) return [parseFloat(a[1]) * 2.55, parseFloat(a[2]) * 2.55, parseFloat(a[3]) * 2.55]; + if (a = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c)) return [parseInt(a[1], + 16), parseInt(a[2], 16), parseInt(a[3], 16)]; + if (a = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c)) return [parseInt(a[1] + a[1], 16), parseInt(a[2] + a[2], 16), parseInt(a[3] + a[3], 16)]; + if (/rgba\(0, 0, 0, 0\)/.exec(c)) return n.transparent; + return n[f.trim(c).toLowerCase()] + } + + function s(c, a) { + var b; + do { + b = f.curCSS(c, a); + if (b != "" && b != "transparent" || f.nodeName(c, "body")) break; + a = "backgroundColor" + } while (c = c.parentNode); + return m(b) + } + + function o() { + var c = document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle, + a = {}, + b, d; + if (c && c.length && c[0] && c[c[0]]) + for (var e = c.length; e--;) { + b = c[e]; + if (typeof c[b] == "string") { + d = b.replace(/\-(\w)/g, function(g, h) { + return h.toUpperCase() + }); + a[d] = c[b] + } + } else + for (b in c) + if (typeof c[b] === "string") a[b] = c[b]; + return a + } + + function p(c) { + var a, b; + for (a in c) { + b = c[a]; + if (b == null || f.isFunction(b) || a in t || /scrollbar/.test(a) || !/color/i.test(a) && isNaN(parseFloat(b))) delete c[a] + } + return c + } + + function u(c, a) { + var b = { + _: 0 + }, + d; + for (d in a) + if (c[d] != a[d]) b[d] = a[d]; + return b + } + + function k(c, a, b, d) { + if (typeof c == "object") { + d = + a; + b = null; + a = c; + c = a.effect + } + if (f.isFunction(a)) { + d = a; + b = null; + a = {} + } + if (typeof a == "number" || f.fx.speeds[a]) { + d = b; + b = a; + a = {} + } + if (f.isFunction(b)) { + d = b; + b = null + } + a = a || {}; + b = b || a.duration; + b = f.fx.off ? 0 : typeof b == "number" ? b : b in f.fx.speeds ? f.fx.speeds[b] : f.fx.speeds._default; + d = d || a.complete; + return [c, a, b, d] + } + + function l(c) { + if (!c || typeof c === "number" || f.fx.speeds[c]) return true; + if (typeof c === "string" && !f.effects[c]) return true; + return false + } + f.effects = {}; + f.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", + "borderTopColor", "borderColor", "color", "outlineColor" + ], function(c, a) { + f.fx.step[a] = function(b) { + if (!b.colorInit) { + b.start = s(b.elem, a); + b.end = m(b.end); + b.colorInit = true + } + b.elem.style[a] = "rgb(" + Math.max(Math.min(parseInt(b.pos * (b.end[0] - b.start[0]) + b.start[0], 10), 255), 0) + "," + Math.max(Math.min(parseInt(b.pos * (b.end[1] - b.start[1]) + b.start[1], 10), 255), 0) + "," + Math.max(Math.min(parseInt(b.pos * (b.end[2] - b.start[2]) + b.start[2], 10), 255), 0) + ")" + } + }); + var n = { + aqua: [0, 255, 255], + azure: [240, 255, 255], + beige: [245, 245, 220], + black: [0, + 0, 0 + ], + blue: [0, 0, 255], + brown: [165, 42, 42], + cyan: [0, 255, 255], + darkblue: [0, 0, 139], + darkcyan: [0, 139, 139], + darkgrey: [169, 169, 169], + darkgreen: [0, 100, 0], + darkkhaki: [189, 183, 107], + darkmagenta: [139, 0, 139], + darkolivegreen: [85, 107, 47], + darkorange: [255, 140, 0], + darkorchid: [153, 50, 204], + darkred: [139, 0, 0], + darksalmon: [233, 150, 122], + darkviolet: [148, 0, 211], + fuchsia: [255, 0, 255], + gold: [255, 215, 0], + green: [0, 128, 0], + indigo: [75, 0, 130], + khaki: [240, 230, 140], + lightblue: [173, 216, 230], + lightcyan: [224, 255, 255], + lightgreen: [144, 238, 144], + lightgrey: [211, + 211, 211 + ], + lightpink: [255, 182, 193], + lightyellow: [255, 255, 224], + lime: [0, 255, 0], + magenta: [255, 0, 255], + maroon: [128, 0, 0], + navy: [0, 0, 128], + olive: [128, 128, 0], + orange: [255, 165, 0], + pink: [255, 192, 203], + purple: [128, 0, 128], + violet: [128, 0, 128], + red: [255, 0, 0], + silver: [192, 192, 192], + white: [255, 255, 255], + yellow: [255, 255, 0], + transparent: [255, 255, 255] + }, + q = ["add", "remove", "toggle"], + t = { + border: 1, + borderBottom: 1, + borderColor: 1, + borderLeft: 1, + borderRight: 1, + borderTop: 1, + borderWidth: 1, + margin: 1, + padding: 1 + }; + f.effects.animateClass = function(c, a, b, + d) { + if (f.isFunction(b)) { + d = b; + b = null + } + return this.queue(function() { + var e = f(this), + g = e.attr("style") || " ", + h = p(o.call(this)), + r, v = e.attr("class"); + f.each(q, function(w, i) { + c[i] && e[i + "Class"](c[i]) + }); + r = p(o.call(this)); + e.attr("class", v); + e.animate(u(h, r), { + queue: false, + duration: a, + easing: b, + complete: function() { + f.each(q, function(w, i) { + c[i] && e[i + "Class"](c[i]) + }); + if (typeof e.attr("style") == "object") { + e.attr("style").cssText = ""; + e.attr("style").cssText = g + } else e.attr("style", g); + d && d.apply(this, arguments); + f.dequeue(this) + } + }) + }) + }; + f.fn.extend({ + _addClass: f.fn.addClass, + addClass: function(c, a, b, d) { + return a ? f.effects.animateClass.apply(this, [{ + add: c + }, a, b, d]) : this._addClass(c) + }, + _removeClass: f.fn.removeClass, + removeClass: function(c, a, b, d) { + return a ? f.effects.animateClass.apply(this, [{ + remove: c + }, a, b, d]) : this._removeClass(c) + }, + _toggleClass: f.fn.toggleClass, + toggleClass: function(c, a, b, d, e) { + return typeof a == "boolean" || a === j ? b ? f.effects.animateClass.apply(this, [a ? { + add: c + } : { + remove: c + }, b, d, e]) : this._toggleClass(c, a) : f.effects.animateClass.apply(this, [{ + toggle: c + }, a, b, d]) + }, + switchClass: function(c, a, b, d, e) { + return f.effects.animateClass.apply(this, [{ + add: a, + remove: c + }, b, d, e]) + } + }); + f.extend(f.effects, { + version: "1.8.16", + save: function(c, a) { + for (var b = 0; b < a.length; b++) a[b] !== null && c.data("ec.storage." + a[b], c[0].style[a[b]]) + }, + restore: function(c, a) { + for (var b = 0; b < a.length; b++) a[b] !== null && c.css(a[b], c.data("ec.storage." + a[b])) + }, + setMode: function(c, a) { + if (a == "toggle") a = c.is(":hidden") ? "show" : "hide"; + return a + }, + getBaseline: function(c, a) { + var b; + switch (c[0]) { + case "top": + b = + 0; + break; + case "middle": + b = 0.5; + break; + case "bottom": + b = 1; + break; + default: + b = c[0] / a.height + } + switch (c[1]) { + case "left": + c = 0; + break; + case "center": + c = 0.5; + break; + case "right": + c = 1; + break; + default: + c = c[1] / a.width + } + return { + x: c, + y: b + } + }, + createWrapper: function(c) { + if (c.parent().is(".ui-effects-wrapper")) return c.parent(); + var a = { + width: c.outerWidth(true), + height: c.outerHeight(true), + "float": c.css("float") + }, + b = f("
      ").addClass("ui-effects-wrapper").css({ + fontSize: "100%", + background: "transparent", + border: "none", + margin: 0, + padding: 0 + }), + d = document.activeElement; + c.wrap(b); + if (c[0] === d || f.contains(c[0], d)) f(d).focus(); + b = c.parent(); + if (c.css("position") == "static") { + b.css({ + position: "relative" + }); + c.css({ + position: "relative" + }) + } else { + f.extend(a, { + position: c.css("position"), + zIndex: c.css("z-index") + }); + f.each(["top", "left", "bottom", "right"], function(e, g) { + a[g] = c.css(g); + if (isNaN(parseInt(a[g], 10))) a[g] = "auto" + }); + c.css({ + position: "relative", + top: 0, + left: 0, + right: "auto", + bottom: "auto" + }) + } + return b.css(a).show() + }, + removeWrapper: function(c) { + var a, b = document.activeElement; + if (c.parent().is(".ui-effects-wrapper")) { + a = c.parent().replaceWith(c); + if (c[0] === b || f.contains(c[0], b)) f(b).focus(); + return a + } + return c + }, + setTransition: function(c, a, b, d) { + d = d || {}; + f.each(a, function(e, g) { + unit = c.cssUnit(g); + if (unit[0] > 0) d[g] = unit[0] * b + unit[1] + }); + return d + } + }); + f.fn.extend({ + effect: function(c) { + var a = k.apply(this, arguments), + b = { + options: a[1], + duration: a[2], + callback: a[3] + }; + a = b.options.mode; + var d = f.effects[c]; + if (f.fx.off || !d) return a ? this[a](b.duration, b.callback) : this.each(function() { + b.callback && b.callback.call(this) + }); + return d.call(this, b) + }, + _show: f.fn.show, + show: function(c) { + if (l(c)) return this._show.apply(this, arguments); + else { + var a = k.apply(this, arguments); + a[1].mode = "show"; + return this.effect.apply(this, a) + } + }, + _hide: f.fn.hide, + hide: function(c) { + if (l(c)) return this._hide.apply(this, arguments); + else { + var a = k.apply(this, arguments); + a[1].mode = "hide"; + return this.effect.apply(this, a) + } + }, + __toggle: f.fn.toggle, + toggle: function(c) { + if (l(c) || typeof c === "boolean" || f.isFunction(c)) return this.__toggle.apply(this, arguments); + else { + var a = k.apply(this, + arguments); + a[1].mode = "toggle"; + return this.effect.apply(this, a) + } + }, + cssUnit: function(c) { + var a = this.css(c), + b = []; + f.each(["em", "px", "%", "pt"], function(d, e) { + if (a.indexOf(e) > 0) b = [parseFloat(a), e] + }); + return b + } + }); + f.easing.jswing = f.easing.swing; + f.extend(f.easing, { + def: "easeOutQuad", + swing: function(c, a, b, d, e) { + return f.easing[f.easing.def](c, a, b, d, e) + }, + easeInQuad: function(c, a, b, d, e) { + return d * (a /= e) * a + b + }, + easeOutQuad: function(c, a, b, d, e) { + return -d * (a /= e) * (a - 2) + b + }, + easeInOutQuad: function(c, a, b, d, e) { + if ((a /= e / 2) < 1) return d / + 2 * a * a + b; + return -d / 2 * (--a * (a - 2) - 1) + b + }, + easeInCubic: function(c, a, b, d, e) { + return d * (a /= e) * a * a + b + }, + easeOutCubic: function(c, a, b, d, e) { + return d * ((a = a / e - 1) * a * a + 1) + b + }, + easeInOutCubic: function(c, a, b, d, e) { + if ((a /= e / 2) < 1) return d / 2 * a * a * a + b; + return d / 2 * ((a -= 2) * a * a + 2) + b + }, + easeInQuart: function(c, a, b, d, e) { + return d * (a /= e) * a * a * a + b + }, + easeOutQuart: function(c, a, b, d, e) { + return -d * ((a = a / e - 1) * a * a * a - 1) + b + }, + easeInOutQuart: function(c, a, b, d, e) { + if ((a /= e / 2) < 1) return d / 2 * a * a * a * a + b; + return -d / 2 * ((a -= 2) * a * a * a - 2) + b + }, + easeInQuint: function(c, a, b, + d, e) { + return d * (a /= e) * a * a * a * a + b + }, + easeOutQuint: function(c, a, b, d, e) { + return d * ((a = a / e - 1) * a * a * a * a + 1) + b + }, + easeInOutQuint: function(c, a, b, d, e) { + if ((a /= e / 2) < 1) return d / 2 * a * a * a * a * a + b; + return d / 2 * ((a -= 2) * a * a * a * a + 2) + b + }, + easeInSine: function(c, a, b, d, e) { + return -d * Math.cos(a / e * (Math.PI / 2)) + d + b + }, + easeOutSine: function(c, a, b, d, e) { + return d * Math.sin(a / e * (Math.PI / 2)) + b + }, + easeInOutSine: function(c, a, b, d, e) { + return -d / 2 * (Math.cos(Math.PI * a / e) - 1) + b + }, + easeInExpo: function(c, a, b, d, e) { + return a == 0 ? b : d * Math.pow(2, 10 * (a / e - 1)) + b + }, + easeOutExpo: function(c, + a, b, d, e) { + return a == e ? b + d : d * (-Math.pow(2, -10 * a / e) + 1) + b + }, + easeInOutExpo: function(c, a, b, d, e) { + if (a == 0) return b; + if (a == e) return b + d; + if ((a /= e / 2) < 1) return d / 2 * Math.pow(2, 10 * (a - 1)) + b; + return d / 2 * (-Math.pow(2, -10 * --a) + 2) + b + }, + easeInCirc: function(c, a, b, d, e) { + return -d * (Math.sqrt(1 - (a /= e) * a) - 1) + b + }, + easeOutCirc: function(c, a, b, d, e) { + return d * Math.sqrt(1 - (a = a / e - 1) * a) + b + }, + easeInOutCirc: function(c, a, b, d, e) { + if ((a /= e / 2) < 1) return -d / 2 * (Math.sqrt(1 - a * a) - 1) + b; + return d / 2 * (Math.sqrt(1 - (a -= 2) * a) + 1) + b + }, + easeInElastic: function(c, a, b, + d, e) { + c = 1.70158; + var g = 0, + h = d; + if (a == 0) return b; + if ((a /= e) == 1) return b + d; + g || (g = e * 0.3); + if (h < Math.abs(d)) { + h = d; + c = g / 4 + } else c = g / (2 * Math.PI) * Math.asin(d / h); + return -(h * Math.pow(2, 10 * (a -= 1)) * Math.sin((a * e - c) * 2 * Math.PI / g)) + b + }, + easeOutElastic: function(c, a, b, d, e) { + c = 1.70158; + var g = 0, + h = d; + if (a == 0) return b; + if ((a /= e) == 1) return b + d; + g || (g = e * 0.3); + if (h < Math.abs(d)) { + h = d; + c = g / 4 + } else c = g / (2 * Math.PI) * Math.asin(d / h); + return h * Math.pow(2, -10 * a) * Math.sin((a * e - c) * 2 * Math.PI / g) + d + b + }, + easeInOutElastic: function(c, a, b, d, e) { + c = 1.70158; + var g = + 0, + h = d; + if (a == 0) return b; + if ((a /= e / 2) == 2) return b + d; + g || (g = e * 0.3 * 1.5); + if (h < Math.abs(d)) { + h = d; + c = g / 4 + } else c = g / (2 * Math.PI) * Math.asin(d / h); + if (a < 1) return -0.5 * h * Math.pow(2, 10 * (a -= 1)) * Math.sin((a * e - c) * 2 * Math.PI / g) + b; + return h * Math.pow(2, -10 * (a -= 1)) * Math.sin((a * e - c) * 2 * Math.PI / g) * 0.5 + d + b + }, + easeInBack: function(c, a, b, d, e, g) { + if (g == j) g = 1.70158; + return d * (a /= e) * a * ((g + 1) * a - g) + b + }, + easeOutBack: function(c, a, b, d, e, g) { + if (g == j) g = 1.70158; + return d * ((a = a / e - 1) * a * ((g + 1) * a + g) + 1) + b + }, + easeInOutBack: function(c, a, b, d, e, g) { + if (g == j) g = 1.70158; + if ((a /= e / 2) < 1) return d / 2 * a * a * (((g *= 1.525) + 1) * a - g) + b; + return d / 2 * ((a -= 2) * a * (((g *= 1.525) + 1) * a + g) + 2) + b + }, + easeInBounce: function(c, a, b, d, e) { + return d - f.easing.easeOutBounce(c, e - a, 0, d, e) + b + }, + easeOutBounce: function(c, a, b, d, e) { + return (a /= e) < 1 / 2.75 ? d * 7.5625 * a * a + b : a < 2 / 2.75 ? d * (7.5625 * (a -= 1.5 / 2.75) * a + 0.75) + b : a < 2.5 / 2.75 ? d * (7.5625 * (a -= 2.25 / 2.75) * a + 0.9375) + b : d * (7.5625 * (a -= 2.625 / 2.75) * a + 0.984375) + b + }, + easeInOutBounce: function(c, a, b, d, e) { + if (a < e / 2) return f.easing.easeInBounce(c, a * 2, 0, d, e) * 0.5 + b; + return f.easing.easeOutBounce(c, + a * 2 - e, 0, d, e) * 0.5 + d * 0.5 + b + } + }) +}(jQuery);; +/* + * jQuery UI Effects Blind 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Blind + * + * Depends: + * jquery.effects.core.js + */ +(function(b) { + b.effects.blind = function(c) { + return this.queue(function() { + var a = b(this), + g = ["position", "top", "bottom", "left", "right"], + f = b.effects.setMode(a, c.options.mode || "hide"), + d = c.options.direction || "vertical"; + b.effects.save(a, g); + a.show(); + var e = b.effects.createWrapper(a).css({ + overflow: "hidden" + }), + h = d == "vertical" ? "height" : "width"; + d = d == "vertical" ? e.height() : e.width(); + f == "show" && e.css(h, 0); + var i = {}; + i[h] = f == "show" ? d : 0; + e.animate(i, c.duration, c.options.easing, function() { + f == "hide" && a.hide(); + b.effects.restore(a, + g); + b.effects.removeWrapper(a); + c.callback && c.callback.apply(a[0], arguments); + a.dequeue() + }) + }) + } +})(jQuery);; +/* + * jQuery UI Effects Bounce 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Bounce + * + * Depends: + * jquery.effects.core.js + */ +(function(e) { + e.effects.bounce = function(b) { + return this.queue(function() { + var a = e(this), + l = ["position", "top", "bottom", "left", "right"], + h = e.effects.setMode(a, b.options.mode || "effect"), + d = b.options.direction || "up", + c = b.options.distance || 20, + m = b.options.times || 5, + i = b.duration || 250; + /show|hide/.test(h) && l.push("opacity"); + e.effects.save(a, l); + a.show(); + e.effects.createWrapper(a); + var f = d == "up" || d == "down" ? "top" : "left"; + d = d == "up" || d == "left" ? "pos" : "neg"; + c = b.options.distance || (f == "top" ? a.outerHeight({ + margin: true + }) / 3 : a.outerWidth({ + margin: true + }) / + 3); + if (h == "show") a.css("opacity", 0).css(f, d == "pos" ? -c : c); + if (h == "hide") c /= m * 2; + h != "hide" && m--; + if (h == "show") { + var g = { + opacity: 1 + }; + g[f] = (d == "pos" ? "+=" : "-=") + c; + a.animate(g, i / 2, b.options.easing); + c /= 2; + m-- + } + for (g = 0; g < m; g++) { + var j = {}, + k = {}; + j[f] = (d == "pos" ? "-=" : "+=") + c; + k[f] = (d == "pos" ? "+=" : "-=") + c; + a.animate(j, i / 2, b.options.easing).animate(k, i / 2, b.options.easing); + c = h == "hide" ? c * 2 : c / 2 + } + if (h == "hide") { + g = { + opacity: 0 + }; + g[f] = (d == "pos" ? "-=" : "+=") + c; + a.animate(g, i / 2, b.options.easing, function() { + a.hide(); + e.effects.restore(a, l); + e.effects.removeWrapper(a); + b.callback && b.callback.apply(this, arguments) + }) + } else { + j = {}; + k = {}; + j[f] = (d == "pos" ? "-=" : "+=") + c; + k[f] = (d == "pos" ? "+=" : "-=") + c; + a.animate(j, i / 2, b.options.easing).animate(k, i / 2, b.options.easing, function() { + e.effects.restore(a, l); + e.effects.removeWrapper(a); + b.callback && b.callback.apply(this, arguments) + }) + } + a.queue("fx", function() { + a.dequeue() + }); + a.dequeue() + }) + } +})(jQuery);; +/* + * jQuery UI Effects Clip 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Clip + * + * Depends: + * jquery.effects.core.js + */ +(function(b) { + b.effects.clip = function(e) { + return this.queue(function() { + var a = b(this), + i = ["position", "top", "bottom", "left", "right", "height", "width"], + f = b.effects.setMode(a, e.options.mode || "hide"), + c = e.options.direction || "vertical"; + b.effects.save(a, i); + a.show(); + var d = b.effects.createWrapper(a).css({ + overflow: "hidden" + }); + d = a[0].tagName == "IMG" ? d : a; + var g = { + size: c == "vertical" ? "height" : "width", + position: c == "vertical" ? "top" : "left" + }; + c = c == "vertical" ? d.height() : d.width(); + if (f == "show") { + d.css(g.size, 0); + d.css(g.position, + c / 2) + } + var h = {}; + h[g.size] = f == "show" ? c : 0; + h[g.position] = f == "show" ? 0 : c / 2; + d.animate(h, { + queue: false, + duration: e.duration, + easing: e.options.easing, + complete: function() { + f == "hide" && a.hide(); + b.effects.restore(a, i); + b.effects.removeWrapper(a); + e.callback && e.callback.apply(a[0], arguments); + a.dequeue() + } + }) + }) + } +})(jQuery);; +/* + * jQuery UI Effects Drop 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Drop + * + * Depends: + * jquery.effects.core.js + */ +(function(c) { + c.effects.drop = function(d) { + return this.queue(function() { + var a = c(this), + h = ["position", "top", "bottom", "left", "right", "opacity"], + e = c.effects.setMode(a, d.options.mode || "hide"), + b = d.options.direction || "left"; + c.effects.save(a, h); + a.show(); + c.effects.createWrapper(a); + var f = b == "up" || b == "down" ? "top" : "left"; + b = b == "up" || b == "left" ? "pos" : "neg"; + var g = d.options.distance || (f == "top" ? a.outerHeight({ + margin: true + }) / 2 : a.outerWidth({ + margin: true + }) / 2); + if (e == "show") a.css("opacity", 0).css(f, b == "pos" ? -g : g); + var i = { + opacity: e == + "show" ? 1 : 0 + }; + i[f] = (e == "show" ? b == "pos" ? "+=" : "-=" : b == "pos" ? "-=" : "+=") + g; + a.animate(i, { + queue: false, + duration: d.duration, + easing: d.options.easing, + complete: function() { + e == "hide" && a.hide(); + c.effects.restore(a, h); + c.effects.removeWrapper(a); + d.callback && d.callback.apply(this, arguments); + a.dequeue() + } + }) + }) + } +})(jQuery);; +/* + * jQuery UI Effects Explode 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Explode + * + * Depends: + * jquery.effects.core.js + */ +(function(j) { + j.effects.explode = function(a) { + return this.queue(function() { + var c = a.options.pieces ? Math.round(Math.sqrt(a.options.pieces)) : 3, + d = a.options.pieces ? Math.round(Math.sqrt(a.options.pieces)) : 3; + a.options.mode = a.options.mode == "toggle" ? j(this).is(":visible") ? "hide" : "show" : a.options.mode; + var b = j(this).show().css("visibility", "hidden"), + g = b.offset(); + g.top -= parseInt(b.css("marginTop"), 10) || 0; + g.left -= parseInt(b.css("marginLeft"), 10) || 0; + for (var h = b.outerWidth(true), i = b.outerHeight(true), e = 0; e < c; e++) + for (var f = + 0; f < d; f++) b.clone().appendTo("body").wrap("
      ").css({ + position: "absolute", + visibility: "visible", + left: -f * (h / d), + top: -e * (i / c) + }).parent().addClass("ui-effects-explode").css({ + position: "absolute", + overflow: "hidden", + width: h / d, + height: i / c, + left: g.left + f * (h / d) + (a.options.mode == "show" ? (f - Math.floor(d / 2)) * (h / d) : 0), + top: g.top + e * (i / c) + (a.options.mode == "show" ? (e - Math.floor(c / 2)) * (i / c) : 0), + opacity: a.options.mode == "show" ? 0 : 1 + }).animate({ + left: g.left + f * (h / d) + (a.options.mode == "show" ? 0 : (f - Math.floor(d / 2)) * (h / d)), + top: g.top + + e * (i / c) + (a.options.mode == "show" ? 0 : (e - Math.floor(c / 2)) * (i / c)), + opacity: a.options.mode == "show" ? 1 : 0 + }, a.duration || 500); + setTimeout(function() { + a.options.mode == "show" ? b.css({ + visibility: "visible" + }) : b.css({ + visibility: "visible" + }).hide(); + a.callback && a.callback.apply(b[0]); + b.dequeue(); + j("div.ui-effects-explode").remove() + }, a.duration || 500) + }) + } +})(jQuery);; +/* + * jQuery UI Effects Fade 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fade + * + * Depends: + * jquery.effects.core.js + */ +(function(b) { + b.effects.fade = function(a) { + return this.queue(function() { + var c = b(this), + d = b.effects.setMode(c, a.options.mode || "hide"); + c.animate({ + opacity: d + }, { + queue: false, + duration: a.duration, + easing: a.options.easing, + complete: function() { + a.callback && a.callback.apply(this, arguments); + c.dequeue() + } + }) + }) + } +})(jQuery);; +/* + * jQuery UI Effects Fold 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * jquery.effects.core.js + */ +(function(c) { + c.effects.fold = function(a) { + return this.queue(function() { + var b = c(this), + j = ["position", "top", "bottom", "left", "right"], + d = c.effects.setMode(b, a.options.mode || "hide"), + g = a.options.size || 15, + h = !!a.options.horizFirst, + k = a.duration ? a.duration / 2 : c.fx.speeds._default / 2; + c.effects.save(b, j); + b.show(); + var e = c.effects.createWrapper(b).css({ + overflow: "hidden" + }), + f = d == "show" != h, + l = f ? ["width", "height"] : ["height", "width"]; + f = f ? [e.width(), e.height()] : [e.height(), e.width()]; + var i = /([0-9]+)%/.exec(g); + if (i) g = parseInt(i[1], + 10) / 100 * f[d == "hide" ? 0 : 1]; + if (d == "show") e.css(h ? { + height: 0, + width: g + } : { + height: g, + width: 0 + }); + h = {}; + i = {}; + h[l[0]] = d == "show" ? f[0] : g; + i[l[1]] = d == "show" ? f[1] : 0; + e.animate(h, k, a.options.easing).animate(i, k, a.options.easing, function() { + d == "hide" && b.hide(); + c.effects.restore(b, j); + c.effects.removeWrapper(b); + a.callback && a.callback.apply(b[0], arguments); + b.dequeue() + }) + }) + } +})(jQuery);; +/* + * jQuery UI Effects Highlight 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * jquery.effects.core.js + */ +(function(b) { + b.effects.highlight = function(c) { + return this.queue(function() { + var a = b(this), + e = ["backgroundImage", "backgroundColor", "opacity"], + d = b.effects.setMode(a, c.options.mode || "show"), + f = { + backgroundColor: a.css("backgroundColor") + }; + if (d == "hide") f.opacity = 0; + b.effects.save(a, e); + a.show().css({ + backgroundImage: "none", + backgroundColor: c.options.color || "#ffff99" + }).animate(f, { + queue: false, + duration: c.duration, + easing: c.options.easing, + complete: function() { + d == "hide" && a.hide(); + b.effects.restore(a, e); + d == "show" && !b.support.opacity && + this.style.removeAttribute("filter"); + c.callback && c.callback.apply(this, arguments); + a.dequeue() + } + }) + }) + } +})(jQuery);; +/* + * jQuery UI Effects Pulsate 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * jquery.effects.core.js + */ +(function(d) { + d.effects.pulsate = function(a) { + return this.queue(function() { + var b = d(this), + c = d.effects.setMode(b, a.options.mode || "show"); + times = (a.options.times || 5) * 2 - 1; + duration = a.duration ? a.duration / 2 : d.fx.speeds._default / 2; + isVisible = b.is(":visible"); + animateTo = 0; + if (!isVisible) { + b.css("opacity", 0).show(); + animateTo = 1 + } + if (c == "hide" && isVisible || c == "show" && !isVisible) times--; + for (c = 0; c < times; c++) { + b.animate({ + opacity: animateTo + }, duration, a.options.easing); + animateTo = (animateTo + 1) % 2 + } + b.animate({ + opacity: animateTo + }, duration, + a.options.easing, + function() { + animateTo == 0 && b.hide(); + a.callback && a.callback.apply(this, arguments) + }); + b.queue("fx", function() { + b.dequeue() + }).dequeue() + }) + } +})(jQuery);; +/* + * jQuery UI Effects Scale 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Scale + * + * Depends: + * jquery.effects.core.js + */ +(function(c) { + c.effects.puff = function(b) { + return this.queue(function() { + var a = c(this), + e = c.effects.setMode(a, b.options.mode || "hide"), + g = parseInt(b.options.percent, 10) || 150, + h = g / 100, + i = { + height: a.height(), + width: a.width() + }; + c.extend(b.options, { + fade: true, + mode: e, + percent: e == "hide" ? g : 100, + from: e == "hide" ? i : { + height: i.height * h, + width: i.width * h + } + }); + a.effect("scale", b.options, b.duration, b.callback); + a.dequeue() + }) + }; + c.effects.scale = function(b) { + return this.queue(function() { + var a = c(this), + e = c.extend(true, {}, b.options), + g = c.effects.setMode(a, + b.options.mode || "effect"), + h = parseInt(b.options.percent, 10) || (parseInt(b.options.percent, 10) == 0 ? 0 : g == "hide" ? 0 : 100), + i = b.options.direction || "both", + f = b.options.origin; + if (g != "effect") { + e.origin = f || ["middle", "center"]; + e.restore = true + } + f = { + height: a.height(), + width: a.width() + }; + a.from = b.options.from || (g == "show" ? { + height: 0, + width: 0 + } : f); + h = { + y: i != "horizontal" ? h / 100 : 1, + x: i != "vertical" ? h / 100 : 1 + }; + a.to = { + height: f.height * h.y, + width: f.width * h.x + }; + if (b.options.fade) { + if (g == "show") { + a.from.opacity = 0; + a.to.opacity = 1 + } + if (g == "hide") { + a.from.opacity = + 1; + a.to.opacity = 0 + } + } + e.from = a.from; + e.to = a.to; + e.mode = g; + a.effect("size", e, b.duration, b.callback); + a.dequeue() + }) + }; + c.effects.size = function(b) { + return this.queue(function() { + var a = c(this), + e = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"], + g = ["position", "top", "bottom", "left", "right", "overflow", "opacity"], + h = ["width", "height", "overflow"], + i = ["fontSize"], + f = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], + k = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], + p = c.effects.setMode(a, b.options.mode || "effect"), + n = b.options.restore || false, + m = b.options.scale || "both", + l = b.options.origin, + j = { + height: a.height(), + width: a.width() + }; + a.from = b.options.from || j; + a.to = b.options.to || j; + if (l) { + l = c.effects.getBaseline(l, j); + a.from.top = (j.height - a.from.height) * l.y; + a.from.left = (j.width - a.from.width) * l.x; + a.to.top = (j.height - a.to.height) * l.y; + a.to.left = (j.width - a.to.width) * l.x + } + var d = { + from: { + y: a.from.height / j.height, + x: a.from.width / j.width + }, + to: { + y: a.to.height / j.height, + x: a.to.width / j.width + } + }; + if (m == "box" || m == "both") { + if (d.from.y != d.to.y) { + e = e.concat(f); + a.from = c.effects.setTransition(a, f, d.from.y, a.from); + a.to = c.effects.setTransition(a, f, d.to.y, a.to) + } + if (d.from.x != d.to.x) { + e = e.concat(k); + a.from = c.effects.setTransition(a, k, d.from.x, a.from); + a.to = c.effects.setTransition(a, k, d.to.x, a.to) + } + } + if (m == "content" || m == "both") + if (d.from.y != d.to.y) { + e = e.concat(i); + a.from = c.effects.setTransition(a, i, d.from.y, a.from); + a.to = c.effects.setTransition(a, i, d.to.y, a.to) + } + c.effects.save(a, n ? e : g); + a.show(); + c.effects.createWrapper(a); + a.css("overflow", "hidden").css(a.from); + if (m == "content" || m == "both") { + f = f.concat(["marginTop", "marginBottom"]).concat(i); + k = k.concat(["marginLeft", "marginRight"]); + h = e.concat(f).concat(k); + a.find("*[width]").each(function() { + child = c(this); + n && c.effects.save(child, h); + var o = { + height: child.height(), + width: child.width() + }; + child.from = { + height: o.height * d.from.y, + width: o.width * d.from.x + }; + child.to = { + height: o.height * d.to.y, + width: o.width * d.to.x + }; + if (d.from.y != d.to.y) { + child.from = c.effects.setTransition(child, f, d.from.y, child.from); + child.to = c.effects.setTransition(child, f, d.to.y, child.to) + } + if (d.from.x != d.to.x) { + child.from = c.effects.setTransition(child, k, d.from.x, child.from); + child.to = c.effects.setTransition(child, k, d.to.x, child.to) + } + child.css(child.from); + child.animate(child.to, b.duration, b.options.easing, function() { + n && c.effects.restore(child, h) + }) + }) + } + a.animate(a.to, { + queue: false, + duration: b.duration, + easing: b.options.easing, + complete: function() { + a.to.opacity === 0 && a.css("opacity", a.from.opacity); + p == "hide" && a.hide(); + c.effects.restore(a, + n ? e : g); + c.effects.removeWrapper(a); + b.callback && b.callback.apply(this, arguments); + a.dequeue() + } + }) + }) + } +})(jQuery);; +/* + * jQuery UI Effects Shake 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Shake + * + * Depends: + * jquery.effects.core.js + */ +(function(d) { + d.effects.shake = function(a) { + return this.queue(function() { + var b = d(this), + j = ["position", "top", "bottom", "left", "right"]; + d.effects.setMode(b, a.options.mode || "effect"); + var c = a.options.direction || "left", + e = a.options.distance || 20, + l = a.options.times || 3, + f = a.duration || a.options.duration || 140; + d.effects.save(b, j); + b.show(); + d.effects.createWrapper(b); + var g = c == "up" || c == "down" ? "top" : "left", + h = c == "up" || c == "left" ? "pos" : "neg"; + c = {}; + var i = {}, + k = {}; + c[g] = (h == "pos" ? "-=" : "+=") + e; + i[g] = (h == "pos" ? "+=" : "-=") + e * 2; + k[g] = + (h == "pos" ? "-=" : "+=") + e * 2; + b.animate(c, f, a.options.easing); + for (e = 1; e < l; e++) b.animate(i, f, a.options.easing).animate(k, f, a.options.easing); + b.animate(i, f, a.options.easing).animate(c, f / 2, a.options.easing, function() { + d.effects.restore(b, j); + d.effects.removeWrapper(b); + a.callback && a.callback.apply(this, arguments) + }); + b.queue("fx", function() { + b.dequeue() + }); + b.dequeue() + }) + } +})(jQuery);; +/* + * jQuery UI Effects Slide 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Slide + * + * Depends: + * jquery.effects.core.js + */ +(function(c) { + c.effects.slide = function(d) { + return this.queue(function() { + var a = c(this), + h = ["position", "top", "bottom", "left", "right"], + f = c.effects.setMode(a, d.options.mode || "show"), + b = d.options.direction || "left"; + c.effects.save(a, h); + a.show(); + c.effects.createWrapper(a).css({ + overflow: "hidden" + }); + var g = b == "up" || b == "down" ? "top" : "left"; + b = b == "up" || b == "left" ? "pos" : "neg"; + var e = d.options.distance || (g == "top" ? a.outerHeight({ + margin: true + }) : a.outerWidth({ + margin: true + })); + if (f == "show") a.css(g, b == "pos" ? isNaN(e) ? "-" + e : -e : e); + var i = {}; + i[g] = (f == "show" ? b == "pos" ? "+=" : "-=" : b == "pos" ? "-=" : "+=") + e; + a.animate(i, { + queue: false, + duration: d.duration, + easing: d.options.easing, + complete: function() { + f == "hide" && a.hide(); + c.effects.restore(a, h); + c.effects.removeWrapper(a); + d.callback && d.callback.apply(this, arguments); + a.dequeue() + } + }) + }) + } +})(jQuery);; +/* + * jQuery UI Effects Transfer 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Transfer + * + * Depends: + * jquery.effects.core.js + */ +(function(e) { + e.effects.transfer = function(a) { + return this.queue(function() { + var b = e(this), + c = e(a.options.to), + d = c.offset(); + c = { + top: d.top, + left: d.left, + height: c.innerHeight(), + width: c.innerWidth() + }; + d = b.offset(); + var f = e('
      ').appendTo(document.body).addClass(a.options.className).css({ + top: d.top, + left: d.left, + height: b.innerHeight(), + width: b.innerWidth(), + position: "absolute" + }).animate(c, a.duration, a.options.easing, function() { + f.remove(); + a.callback && a.callback.apply(b[0], arguments); + b.dequeue() + }) + }) + } +})(jQuery);; \ No newline at end of file diff --git a/client/lib/jquery.ba-bbq.min.js b/client/lib/jquery.ba-bbq.min.js index feaed5fef..bcbf24834 100644 --- a/client/lib/jquery.ba-bbq.min.js +++ b/client/lib/jquery.ba-bbq.min.js @@ -1 +1,18 @@ -(function($,window){"$:nomunge";var undefined,aps=Array.prototype.slice,decode=decodeURIComponent,jq_param=$.param,jq_param_sorted,jq_param_fragment,jq_deparam,jq_deparam_fragment,jq_bbq=$.bbq=$.bbq||{},jq_bbq_pushState,jq_bbq_getState,jq_elemUrlAttr,special=$.event.special,str_hashchange="hashchange",str_querystring="querystring",str_fragment="fragment",str_elemUrlAttr="elemUrlAttr",str_href="href",str_src="src",re_params_querystring=/^.*\?|#.*$/g,re_params_fragment,re_fragment,re_no_escape,ajax_crawlable,fragment_prefix,elemUrlAttr_cache={};function is_string(arg){return typeof arg==="string"}function curry(func){var args=aps.call(arguments,1);return function(){return func.apply(this,args.concat(aps.call(arguments)))}}function get_fragment(url){return url.replace(re_fragment,"$2")}function get_querystring(url){return url.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function jq_param_sub(is_fragment,get_func,url,params,merge_mode){var result,qs,matches,url_params,hash;if(params!==undefined){matches=url.match(is_fragment?re_fragment:/^([^#?]*)\??([^#]*)(#?.*)/);hash=matches[3]||"";if(merge_mode===2&&is_string(params)){qs=params.replace(is_fragment?re_params_fragment:re_params_querystring,"")}else{url_params=jq_deparam(matches[2]);params=is_string(params)?jq_deparam[is_fragment?str_fragment:str_querystring](params):params;qs=merge_mode===2?params:merge_mode===1?$.extend({},params,url_params):$.extend({},url_params,params);qs=jq_param_sorted(qs);if(is_fragment){qs=qs.replace(re_no_escape,decode)}}result=matches[1]+(is_fragment?fragment_prefix:qs||!matches[1]?"?":"")+qs+hash}else{result=get_func(url!==undefined?url:location.href)}return result}jq_param[str_querystring]=curry(jq_param_sub,0,get_querystring);jq_param[str_fragment]=jq_param_fragment=curry(jq_param_sub,1,get_fragment);jq_param.sorted=jq_param_sorted=function(a,traditional){var arr=[],obj={};$.each(jq_param(a,traditional).split("&"),function(i,v){var key=v.replace(/(?:%5B|=).*$/,""),key_obj=obj[key];if(!key_obj){key_obj=obj[key]=[];arr.push(key)}key_obj.push(v)});return $.map(arr.sort(),function(v){return obj[v]}).join("&")};jq_param_fragment.noEscape=function(chars){chars=chars||"";var arr=$.map(chars.split(""),encodeURIComponent);re_no_escape=new RegExp(arr.join("|"),"g")};jq_param_fragment.noEscape(",/");jq_param_fragment.ajaxCrawlable=function(state){if(state!==undefined){if(state){re_params_fragment=/^.*(?:#!|#)/;re_fragment=/^([^#]*)(?:#!|#)?(.*)$/;fragment_prefix="#!"}else{re_params_fragment=/^.*#/;re_fragment=/^([^#]*)#?(.*)$/;fragment_prefix="#"}ajax_crawlable=!!state}return ajax_crawlable};jq_param_fragment.ajaxCrawlable(0);$.deparam=jq_deparam=function(params,coerce){var obj={},coerce_types={"true":!0,"false":!1,"null":null};$.each(params.replace(/\+/g," ").split("&"),function(j,v){var param=v.split("="),key=decode(param[0]),val,cur=obj,i=0,keys=key.split("]["),keys_last=keys.length-1;if(/\[/.test(keys[0])&&/\]$/.test(keys[keys_last])){keys[keys_last]=keys[keys_last].replace(/\]$/,"");keys=keys.shift().split("[").concat(keys);keys_last=keys.length-1}else{keys_last=0}if(param.length===2){val=decode(param[1]);if(coerce){val=val&&!isNaN(val)?+val:val==="undefined"?undefined:coerce_types[val]!==undefined?coerce_types[val]:val}if(keys_last){for(;i<=keys_last;i++){key=keys[i]===""?cur.length:keys[i];cur=cur[key]=i7);function get_fragment(url){url=url||location.href;return"#"+url.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[str_hashchange]=function(fn){return fn?this.bind(str_hashchange,fn):this.trigger(str_hashchange)};$.fn[str_hashchange].delay=50;special[str_hashchange]=$.extend(special[str_hashchange],{setup:function(){if(supports_onhashchange){return false}$(fake_onhashchange.start)},teardown:function(){if(supports_onhashchange){return false}$(fake_onhashchange.stop)}});fake_onhashchange=function(){var self={},timeout_id,last_hash=get_fragment(),fn_retval=function(val){return val},history_set=fn_retval,history_get=fn_retval;self.start=function(){timeout_id||poll()};self.stop=function(){timeout_id&&clearTimeout(timeout_id);timeout_id=undefined};function poll(){var hash=get_fragment(),history_hash=history_get(last_hash);if(hash!==last_hash){history_set(last_hash=hash,history_hash);$(window).trigger(str_hashchange)}else if(history_hash!==last_hash){location.href=location.href.replace(/#.*/,"")+history_hash}timeout_id=setTimeout(poll,$.fn[str_hashchange].delay)}return self}()})(jQuery,this); \ No newline at end of file +/* + * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010 + * http://benalman.com/projects/jquery-bbq-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this); \ No newline at end of file diff --git a/client/lib/jquery.min.js b/client/lib/jquery.min.js index e5ace116b..a37425c24 100644 --- a/client/lib/jquery.min.js +++ b/client/lib/jquery.min.js @@ -1,4 +1,4 @@ -/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
      ",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b) -},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("