/*! jquery ui - v1.11.4 - 2016-06-24 * http://jqueryui.com * includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, selectable.js, sortable.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, menu.js, progressbar.js, selectmenu.js, slider.js, spinner.js, tabs.js, tooltip.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js * copyright jquery foundation and other contributors; licensed mit */ (function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jquery)})(function(e){function t(t,s){var n,a,o,r=t.nodename.tolowercase();return"area"===r?(n=t.parentnode,a=n.name,t.href&&a&&"map"===n.nodename.tolowercase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addback().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseint(e.css("zindex"),10),!isnan(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curinst=null,this._keyevent=!1,this._disabledinputs=[],this._datepickershowing=!1,this._indialog=!1,this._maindivid="ui-datepicker-div",this._inlineclass="ui-datepicker-inline",this._appendclass="ui-datepicker-append",this._triggerclass="ui-datepicker-trigger",this._dialogclass="ui-datepicker-dialog",this._disableclass="ui-datepicker-disabled",this._unselectableclass="ui-datepicker-unselectable",this._currentclass="ui-datepicker-current-day",this._dayoverclass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closetext:"done",prevtext:"prev",nexttext:"next",currenttext:"today",monthnames:["january","february","march","april","may","june","july","august","september","october","november","december"],monthnamesshort:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],daynames:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],daynamesshort:["sun","mon","tue","wed","thu","fri","sat"],daynamesmin:["su","mo","tu","we","th","fr","sa"],weekheader:"wk",dateformat:"mm/dd/yy",firstday:0,isrtl:!1,showmonthafteryear:!1,yearsuffix:""},this._defaults={showon:"focus",showanim:"fadein",showoptions:{},defaultdate:null,appendtext:"",buttontext:"...",buttonimage:"",buttonimageonly:!1,hideifnoprevnext:!1,navigationasdateformat:!1,gotocurrent:!1,changemonth:!1,changeyear:!1,yearrange:"c-10:c+10",showothermonths:!1,selectothermonths:!1,showweek:!1,calculateweek:this.iso8601week,shortyearcutoff:"+10",mindate:null,maxdate:null,duration:"fast",beforeshowday:null,beforeshow:null,onselect:null,onchangemonthyear:null,onclose:null,numberofmonths:1,showcurrentatpos:0,stepmonths:1,stepbigmonths:12,altfield:"",altformat:"",constraininput:!0,showbuttonpanel:!1,autosize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-us"]=e.extend(!0,{},this.regional.en),this.dpdiv=a(e("
"))}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.4",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 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+"'")}):(o.length&&(n=e.widget.extend.apply(null,[n].concat(o))),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.4",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,(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionposition.margintop+p+f+m-h,(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.draggable",e.ui.mouse,{version:"1.11.4",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,s._parent=i.helper.parent(),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(),i.helper.appendto(s._parent),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||_>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-_),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-_),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.droppable",{version:"1.11.4",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,e.widget("ui.resizable",e.ui.mouse,{version:"1.11.4",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=e(),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.handles[i].jquery||this.handles[i].nodetype)&&(this.handles[i]=e(this.handles[i]),this._on(this.handles[i],{mousedown:o._mousedown})),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()),this._handles=this._handles.add(this.handles[i])},this._renderaxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.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;e(i.alsoresize).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)})})},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};e(n.alsoresize).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),n={},a=t.parents(i.originalelement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var i=(s[t]||0)+(r[t]||0);i&&i>=0&&(n[t]=i||null)}),t.css(n)})},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,_=s.minheight&&s.minheight>f;s.grid=h,v&&(p+=l),_&&(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=l-t.width,i.size.width=p,i.position.left=o.left+a.width-p))}}),e.ui.resizable,e.widget("ui.selectable",e.ui.mouse,{version:"1.11.4",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.sortable",e.ui.mouse,{version:"1.11.4",widgeteventprefix:"sort",ready:!1,options:{appendto:"parent",axis:!1,connectwith:!1,containment:!1,cursor:"auto",cursorat:!1,droponempty:!0,forceplaceholdersize:!1,forcehelpersize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollsensitivity:20,scrollspeed:20,scope:"default",tolerance:"intersect",zindex:1e3,activate:null,beforestop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isoveraxis:function(e,t,i){return e>=t&&t+i>e},_isfloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containercache={},this.element.addclass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseinit(),this._sethandleclassname(),this.ready=!0},_setoption:function(e,t){this._super(e,t),"handle"===e&&this._sethandleclassname()},_sethandleclassname:function(){this.element.find(".ui-sortable-handle").removeclass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addclass("ui-sortable-handle")})},_destroy:function(){this.element.removeclass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeclass("ui-sortable-handle"),this._mousedestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removedata(this.widgetname+"-item");return this},_mousecapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshitems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetname+"-item")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetname+"-item")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addback().each(function(){this===t.target&&(n=!0)}),n)?(this.currentitem=s,this._removecurrentsfromitems(),!0):!1:!1)},_mousestart:function(t,i,s){var n,a,o=this.options;if(this.currentcontainer=this,this.refreshpositions(),this.helper=this._createhelper(t),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},e.extend(this.offset,{click:{left:t.pagex-this.offset.left,top:t.pagey-this.offset.top},parent:this._getparentoffset(),relative:this._getrelativeoffset()}),this.helper.css("position","absolute"),this.cssposition=this.helper.css("position"),this.originalposition=this._generateposition(t),this.originalpagex=t.pagex,this.originalpagey=t.pagey,o.cursorat&&this._adjustoffsetfromhelper(o.cursorat),this.domposition={prev:this.currentitem.prev()[0],parent:this.currentitem.parent()[0]},this.helper[0]!==this.currentitem[0]&&this.currentitem.hide(),this._createplaceholder(),o.containment&&this._setcontainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedcursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedstylesheet=e("").appendto(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedopacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zindex&&(this.helper.css("zindex")&&(this._storedzindex=this.helper.css("zindex")),this.helper.css("zindex",o.zindex)),this.scrollparent[0]!==this.document[0]&&"html"!==this.scrollparent[0].tagname&&(this.overflowoffset=this.scrollparent.offset()),this._trigger("start",t,this._uihash()),this._preservehelperproportions||this._cachehelperproportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uihash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropbehaviour&&e.ui.ddmanager.prepareoffsets(this,t),this.dragging=!0,this.helper.addclass("ui-sortable-helper"),this._mousedrag(t),!0},_mousedrag:function(t){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generateposition(t),this.positionabs=this._convertpositionto("absolute"),this.lastpositionabs||(this.lastpositionabs=this.positionabs),this.options.scroll&&(this.scrollparent[0]!==this.document[0]&&"html"!==this.scrollparent[0].tagname?(this.overflowoffset.top+this.scrollparent[0].offsetheight-t.pagey=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectswithpointer(s),a&&s.instance===this.currentcontainer&&n!==this.currentitem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!e.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectswithsides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uihash());break}return this._contactcontainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uihash()),this.lastpositionabs=this.positionabs,!1},_mousestop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropbehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetparent[0]===this.document[0].body?0:this.offsetparent[0].scrollleft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetparent[0]===this.document[0].body?0:this.offsetparent[0].scrolltop)),this.reverting=!0,e(this.helper).animate(o,parseint(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseup({target:null}),"original"===this.options.helper?this.currentitem.css(this._storedcss).removeclass("ui-sortable-helper"):this.currentitem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uihash(this)),this.containers[t].containercache.over&&(this.containers[t]._trigger("out",null,this._uihash(this)),this.containers[t].containercache.over=0)}return this.placeholder&&(this.placeholder[0].parentnode&&this.placeholder[0].parentnode.removechild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentnode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_nofinalsort:null}),this.domposition.prev?e(this.domposition.prev).after(this.currentitem):e(this.domposition.parent).prepend(this.currentitem)),this},serialize:function(t){var i=this._getitemsasjquery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toarray:function(t){var i=this._getitemsasjquery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectswith:function(e){var t=this.positionabs.left,i=t+this.helperproportions.width,s=this.positionabs.top,n=s+this.helperproportions.height,a=e.left,o=a+e.width,r=e.top,h=r+e.height,l=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||s+l>r&&h>s+l,c="y"===this.options.axis||t+u>a&&o>t+u,p=d&&c;return"pointer"===this.options.tolerance||this.options.forcepointerforcontainers||"pointer"!==this.options.tolerance&&this.helperproportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:t+this.helperproportions.width/2>a&&o>i-this.helperproportions.width/2&&s+this.helperproportions.height/2>r&&h>n-this.helperproportions.height/2},_intersectswithpointer:function(e){var t="x"===this.options.axis||this._isoveraxis(this.positionabs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isoveraxis(this.positionabs.left+this.offset.click.left,e.left,e.width),s=t&&i,n=this._getdragverticaldirection(),a=this._getdraghorizontaldirection();return s?this.floating?a&&"right"===a||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectswithsides:function(e){var t=this._isoveraxis(this.positionabs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isoveraxis(this.positionabs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getdragverticaldirection(),n=this._getdraghorizontaldirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getdragverticaldirection:function(){var e=this.positionabs.top-this.lastpositionabs.top;return 0!==e&&(e>0?"down":"up")},_getdraghorizontaldirection:function(){var e=this.positionabs.left-this.lastpositionabs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshitems(e),this._sethandleclassname(),this.refreshpositions(),this},_connectwith:function(){var e=this.options;return e.connectwith.constructor===string?[e.connectwith]:e.connectwith},_getitemsasjquery:function(t){function i(){r.push(this)}var s,n,a,o,r=[],h=[],l=this._connectwith();if(l&&t)for(s=l.length-1;s>=0;s--)for(a=e(l[s],this.document[0]),n=a.length-1;n>=0;n--)o=e.data(a[n],this.widgetfullname),o&&o!==this&&!o.options.disabled&&h.push([e.isfunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(h.push([e.isfunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentitem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(r)},_removecurrentsfromitems:function(){var t=this.currentitem.find(":data("+this.widgetname+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshitems:function(t){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,u=this.items,d=[[e.isfunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentitem}):e(this.options.items,this.element),this]],c=this._connectwith();if(c&&this.ready)for(i=c.length-1;i>=0;i--)for(n=e(c[i],this.document[0]),s=n.length-1;s>=0;s--)a=e.data(n[s],this.widgetfullname),a&&a!==this&&!a.options.disabled&&(d.push([e.isfunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentitem}):e(a.options.items,a.element),a]),this.containers.push(a));for(i=d.length-1;i>=0;i--)for(o=d[i][1],r=d[i][0],s=0,l=r.length;l>s;s++)h=e(r[s]),h.data(this.widgetname+"-item",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshpositions:function(t){this.floating=this.items.length?"x"===this.options.axis||this._isfloating(this.items[0].item):!1,this.offsetparent&&this.helper&&(this.offset.parent=this._getparentoffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentcontainer&&this.currentcontainer&&s.item[0]!==this.currentitem[0]||(n=this.options.toleranceelement?e(this.options.toleranceelement,s.item):s.item,t||(s.width=n.outerwidth(),s.height=n.outerheight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshcontainers)this.options.custom.refreshcontainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containercache.left=a.left,this.containers[i].containercache.top=a.top,this.containers[i].containercache.width=this.containers[i].element.outerwidth(),this.containers[i].containercache.height=this.containers[i].element.outerheight();return this},_createplaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==string||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentitem[0].nodename.tolowercase(),n=e("<"+s+">",t.document[0]).addclass(i||t.currentitem[0].classname+" ui-sortable-placeholder").removeclass("ui-sortable-helper");return"tbody"===s?t._createtrplaceholder(t.currentitem.find("tr").eq(0),e("",t.document[0]).appendto(n)):"tr"===s?t._createtrplaceholder(t.currentitem,n):"img"===s&&n.attr("src",t.currentitem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,n){(!i||s.forceplaceholdersize)&&(n.height()||n.height(t.currentitem.innerheight()-parseint(t.currentitem.css("paddingtop")||0,10)-parseint(t.currentitem.css("paddingbottom")||0,10)),n.width()||n.width(t.currentitem.innerwidth()-parseint(t.currentitem.css("paddingleft")||0,10)-parseint(t.currentitem.css("paddingright")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentitem)),t.currentitem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_createtrplaceholder:function(t,i){var s=this;t.children().each(function(){e(" ",s.document[0]).attr("colspan",e(this).attr("colspan")||1).appendto(i)})},_contactcontainers:function(t){var i,s,n,a,o,r,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentitem[0],this.containers[i].element[0]))if(this._intersectswith(this.containers[i].containercache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containercache.over&&(this.containers[i]._trigger("out",t,this._uihash(this)),this.containers[i].containercache.over=0);if(c)if(1===this.containers.length)this.containers[p].containercache.over||(this.containers[p]._trigger("over",t,this._uihash(this)),this.containers[p].containercache.over=1);else{for(n=1e4,a=null,u=c.floating||this._isfloating(this.currentitem),o=u?"left":"top",r=u?"width":"height",d=u?"clientx":"clienty",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentitem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[d]-h>this.items[s][r]/2&&(l=!0),n>math.abs(t[d]-h)&&(n=math.abs(t[d]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.droponempty)return;if(this.currentcontainer===this.containers[p])return this.currentcontainer.containercache.over||(this.containers[p]._trigger("over",t,this._uihash()),this.currentcontainer.containercache.over=1),void 0;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uihash()),this.containers[p]._trigger("change",t,this._uihash(this)),this.currentcontainer=this.containers[p],this.options.placeholder.update(this.currentcontainer,this.placeholder),this.containers[p]._trigger("over",t,this._uihash(this)),this.containers[p].containercache.over=1}},_createhelper:function(t){var i=this.options,s=e.isfunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentitem])):"clone"===i.helper?this.currentitem.clone():this.currentitem;return s.parents("body").length||e("parent"!==i.appendto?i.appendto:this.currentitem[0].parentnode)[0].appendchild(s[0]),s[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")}),(!s[0].style.width||i.forcehelpersize)&&s.width(this.currentitem.width()),(!s[0].style.height||i.forcehelpersize)&&s.height(this.currentitem.height()),s},_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)},_getparentoffset:function(){this.offsetparent=this.helper.offsetparent();var t=this.offsetparent.offset();return"absolute"===this.cssposition&&this.scrollparent[0]!==this.document[0]&&e.contains(this.scrollparent[0],this.offsetparent[0])&&(t.left+=this.scrollparent.scrollleft(),t.top+=this.scrollparent.scrolltop()),(this.offsetparent[0]===this.document[0].body||this.offsetparent[0].tagname&&"html"===this.offsetparent[0].tagname.tolowercase()&&e.ui.ie)&&(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){var e=this.currentitem.position();return{top:e.top-(parseint(this.helper.css("top"),10)||0)+this.scrollparent.scrolltop(),left:e.left-(parseint(this.helper.css("left"),10)||0)+this.scrollparent.scrollleft()}}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 t,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentnode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperproportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentnode.scrollheight)-this.helperproportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseint(e(t).css("borderleftwidth"),10)||0)+(parseint(e(t).css("paddingleft"),10)||0)-this.margins.left,i.top+(parseint(e(t).css("bordertopwidth"),10)||0)+(parseint(e(t).css("paddingtop"),10)||0)-this.margins.top,i.left+(s?math.max(t.scrollwidth,t.offsetwidth):t.offsetwidth)-(parseint(e(t).css("borderleftwidth"),10)||0)-(parseint(e(t).css("paddingright"),10)||0)-this.helperproportions.width-this.margins.left,i.top+(s?math.max(t.scrollheight,t.offsetheight):t.offsetheight)-(parseint(e(t).css("bordertopwidth"),10)||0)-(parseint(e(t).css("paddingbottom"),10)||0)-this.helperproportions.height-this.margins.top])},_convertpositionto:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssposition||this.scrollparent[0]!==this.document[0]&&e.contains(this.scrollparent[0],this.offsetparent[0])?this.scrollparent:this.offsetparent,a=/(html|body)/i.test(n[0].tagname);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssposition?-this.scrollparent.scrolltop():a?0:n.scrolltop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssposition?-this.scrollparent.scrollleft():a?0:n.scrollleft())*s}},_generateposition:function(t){var i,s,n=this.options,a=t.pagex,o=t.pagey,r="absolute"!==this.cssposition||this.scrollparent[0]!==this.document[0]&&e.contains(this.scrollparent[0],this.offsetparent[0])?this.scrollparent:this.offsetparent,h=/(html|body)/i.test(r[0].tagname);return"relative"!==this.cssposition||this.scrollparent[0]!==this.document[0]&&this.scrollparent[0]!==this.offsetparent[0]||(this.offset.relative=this._getrelativeoffset()),this.originalposition&&(this.containment&&(t.pagex-this.offset.click.leftthis.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pagey-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalpagey+math.round((o-this.originalpagey)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalpagex+math.round((a-this.originalpagex)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssposition?-this.scrollparent.scrolltop():h?0:r.scrolltop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssposition?-this.scrollparent.scrollleft():h?0:r.scrollleft())}},_rearrange:function(e,t,i,s){i?i[0].appendchild(this.placeholder[0]):t.item[0].parentnode.insertbefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextsibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshpositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uihash(t))}}this.reverting=!1;var s,n=[];if(!this._nofinalsort&&this.currentitem.parent().length&&this.placeholder.before(this.currentitem),this._nofinalsort=null,this.helper[0]===this.currentitem[0]){for(s in this._storedcss)("auto"===this._storedcss[s]||"static"===this._storedcss[s])&&(this._storedcss[s]="");this.currentitem.css(this._storedcss).removeclass("ui-sortable-helper")}else this.currentitem.show();for(this.fromoutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uihash(this.fromoutside))}),!this.fromoutside&&this.domposition.prev===this.currentitem.prev().not(".ui-sortable-helper")[0]&&this.domposition.parent===this.currentitem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uihash())}),this!==this.currentcontainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uihash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uihash(this))}}.call(this,this.currentcontainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uihash(this))}}.call(this,this.currentcontainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containercache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containercache.over=0);if(this.storedcursor&&(this.document.find("body").css("cursor",this.storedcursor),this.storedstylesheet.remove()),this._storedopacity&&this.helper.css("opacity",this._storedopacity),this._storedzindex&&this.helper.css("zindex","auto"===this._storedzindex?"":this._storedzindex),this.dragging=!1,t||this._trigger("beforestop",e,this._uihash()),this.placeholder[0].parentnode.removechild(this.placeholder[0]),this.cancelhelperremoval||(this.helper[0]!==this.currentitem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uihash())}return this.fromoutside=!1,!this.cancelhelperremoval},_trigger:function(){e.widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uihash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalposition:i.originalposition,offset:i.positionabs,item:i.currentitem,sender:t?t.element:null}}}),e.widget("ui.accordion",{version:"1.11.4",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","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabindex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseint(e(this).attr("tabindex"),10)}).attr("tabindex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabindex:0})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.css("box-sizing"),l=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("