(function(i){typeof define=="function"&&define.amd?define(["jquery"],i):i(jQuery)})(function(i){function at(){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},i.extend(this._defaults,this.regional[""]),this.regional.en=i.extend(!0,{},this.regional[""]),this.regional["en-US"]=i.extend(!0,{},this.regional.en),this.dpDiv=rt(i("
"))}function rt(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){i(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&i(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&i(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,ht)}function ht(){i.datepicker._isDisabledDatepicker(U.inline?U.dpDiv.parent()[0]:U.input[0])||(i(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),i(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&i(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&i(this).addClass("ui-datepicker-next-hover"))}function X(t,e){for(var s in i.extend(t,e),e)e[s]==null&&(t[s]=e[s]);return t}function K(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}i.ui=i.ui||{},i.ui.version="1.12.1";var pt=0,lt=Array.prototype.slice;i.cleanData=function(t){return function(e){var s,n,o;for(o=0;(n=e[o])!=null;o++)try{(s=i._data(n,"events"))&&s.remove&&i(n).triggerHandler("remove")}catch{}t(e)}}(i.cleanData),i.widget=function(t,e,s){var n,o,a,r={},h=t.split(".")[0],l=h+"-"+(t=t.split(".")[1]);return s||(s=e,e=i.Widget),i.isArray(s)&&(s=i.extend.apply(null,[{}].concat(s))),i.expr[":"][l.toLowerCase()]=function(u){return!!i.data(u,l)},i[h]=i[h]||{},n=i[h][t],o=i[h][t]=function(u,p){return this._createWidget?void(arguments.length&&this._createWidget(u,p)):new o(u,p)},i.extend(o,n,{version:s.version,_proto:i.extend({},s),_childConstructors:[]}),(a=new e).options=i.widget.extend({},a.options),i.each(s,function(u,p){return i.isFunction(p)?void(r[u]=function(){function d(){return e.prototype[u].apply(this,arguments)}function f(m){return e.prototype[u].apply(this,m)}return function(){var m,c=this._super,g=this._superApply;return this._super=d,this._superApply=f,m=p.apply(this,arguments),this._super=c,this._superApply=g,m}}()):void(r[u]=p)}),o.prototype=i.widget.extend(a,{widgetEventPrefix:n&&a.widgetEventPrefix||t},r,{constructor:o,namespace:h,widgetName:t,widgetFullName:l}),n?(i.each(n._childConstructors,function(u,p){var d=p.prototype;i.widget(d.namespace+"."+d.widgetName,o,p._proto)}),delete n._childConstructors):e._childConstructors.push(o),i.widget.bridge(t,o),o},i.widget.extend=function(t){for(var e,s,n=lt.call(arguments,1),o=0,a=n.length;a>o;o++)for(e in n[o])s=n[o][e],n[o].hasOwnProperty(e)&&s!==void 0&&(t[e]=i.isPlainObject(s)?i.isPlainObject(t[e])?i.widget.extend({},t[e],s):i.widget.extend({},s):s);return t},i.widget.bridge=function(t,e){var s=e.prototype.widgetFullName||t;i.fn[t]=function(n){var o=typeof n=="string",a=lt.call(arguments,1),r=this;return o?this.length||n!=="instance"?this.each(function(){var h,l=i.data(this,s);return n==="instance"?(r=l,!1):l?i.isFunction(l[n])&&n.charAt(0)!=="_"?(h=l[n].apply(l,a))!==l&&h!==void 0?(r=h&&h.jquery?r.pushStack(h.get()):h,!1):void 0:i.error("no such method '"+n+"' for "+t+" widget instance"):i.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=i.widget.extend.apply(null,[n].concat(a))),this.each(function(){var h=i.data(this,s);h?(h.option(n||{}),h._init&&h._init()):i.data(this,s,new e(n,this))})),r}},i.Widget=function(){},i.Widget._childConstructors=[],i.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=i(e||this.defaultElement||this)[0],this.element=i(e),this.uuid=pt++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=i(),this.hoverable=i(),this.focusable=i(),this.classesElementLookup={},e!==this&&(i.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(s){s.target===e&&this.destroy()}}),this.document=i(e.style?e.ownerDocument:e.document||e),this.window=i(this.document[0].defaultView||this.document[0].parentWindow)),this.options=i.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:i.noop,_create:i.noop,_init:i.noop,destroy:function(){var t=this;this._destroy(),i.each(this.classesElementLookup,function(e,s){t._removeClass(s,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:i.noop,widget:function(){return this.element},option:function(t,e){var s,n,o,a=t;if(arguments.length===0)return i.widget.extend({},this.options);if(typeof t=="string")if(a={},t=(s=t.split(".")).shift(),s.length){for(n=a[t]=i.widget.extend({},this.options[t]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(t=s.pop(),arguments.length===1)return n[t]===void 0?null:n[t];n[t]=e}else{if(arguments.length===1)return this.options[t]===void 0?null:this.options[t];a[t]=e}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return t==="classes"&&this._setOptionClasses(e),this.options[t]=e,t==="disabled"&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,s,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(s=i(n.get()),this._removeClass(n,e),s.addClass(this._classes({element:s,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){function e(o,a){var r,h;for(h=0;o.length>h;h++)r=n.classesElementLookup[o[h]]||i(),r=t.add?i(i.unique(r.get().concat(t.element.get()))):i(r.not(t.element).get()),n.classesElementLookup[o[h]]=r,s.push(o[h]),a&&t.classes[o[h]]&&s.push(t.classes[o[h]])}var s=[],n=this;return t=i.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&e(t.keys.match(/\S+/g)||[],!0),t.extra&&e(t.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(t){var e=this;i.each(e.classesElementLookup,function(s,n){i.inArray(t.target,n)!==-1&&(e.classesElementLookup[s]=i(n.not(t.target).get()))})},_removeClass:function(t,e,s){return this._toggleClass(t,e,s,!1)},_addClass:function(t,e,s){return this._toggleClass(t,e,s,!0)},_toggleClass:function(t,e,s,n){n=typeof n=="boolean"?n:s;var o=typeof t=="string"||t===null,a={extra:o?e:s,keys:o?t:e,element:o?this.element:t,add:n};return a.element.toggleClass(this._classes(a),n),this},_on:function(t,e,s){var n,o=this;typeof t!="boolean"&&(s=e,e=t,t=!1),s?(e=n=i(e),this.bindings=this.bindings.add(e)):(s=e,e=this.element,n=this.widget()),i.each(s,function(a,r){function h(){return t||o.options.disabled!==!0&&!i(this).hasClass("ui-state-disabled")?(typeof r=="string"?o[r]:r).apply(o,arguments):void 0}typeof r!="string"&&(h.guid=r.guid=r.guid||h.guid||i.guid++);var l=a.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+o.eventNamespace,p=l[2];p?n.on(u,p,h):e.on(u,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e).off(e),this.bindings=i(this.bindings.not(t).get()),this.focusable=i(this.focusable.not(t).get()),this.hoverable=i(this.hoverable.not(t).get())},_delay:function(t,e){var s=this;return setTimeout(function(){return(typeof t=="string"?s[t]:t).apply(s,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(e){this._addClass(i(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(i(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(e){this._addClass(i(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(i(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,s){var n,o,a=this.options[t];if(s=s||{},(e=i.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,s),!(i.isFunction(a)&&a.apply(this.element[0],[e].concat(s))===!1||e.isDefaultPrevented())}},i.each({show:"fadeIn",hide:"fadeOut"},function(t,e){i.Widget.prototype["_"+t]=function(s,n,o){typeof n=="string"&&(n={effect:n});var a,r=n?n===!0||typeof n=="number"?e:n.effect||e:t;typeof(n=n||{})=="number"&&(n={duration:n}),a=!i.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&i.effects&&i.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(h){i(this)[t](),o&&o.call(s[0]),h()})}}),i.widget,function(){function t(d,f,m){return[parseFloat(d[0])*(u.test(d[0])?f/100:1),parseFloat(d[1])*(u.test(d[1])?m/100:1)]}function e(d,f){return parseInt(i.css(d,f),10)||0}var s,n=Math.max,o=Math.abs,a=/left|center|right/,r=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,u=/%$/,p=i.fn.position;i.position={scrollbarWidth:function(){if(s!==void 0)return s;var d,f,m=i("
"),c=m.children()[0];return i("body").append(m),d=c.offsetWidth,m.css("overflow","scroll"),d===(f=c.offsetWidth)&&(f=m[0].clientWidth),m.remove(),s=d-f},getScrollInfo:function(d){var f=d.isWindow||d.isDocument?"":d.element.css("overflow-x"),m=d.isWindow||d.isDocument?"":d.element.css("overflow-y"),c=f==="scroll"||f==="auto"&&d.widthj?"left":N>0?"right":"center",vertical:0>E?"top":W>0?"bottom":"middle"};T>m&&m>o(N+j)&&(B.horizontal="center"),P>c&&c>o(W+E)&&(B.vertical="middle"),B.important=n(o(N),o(j))>n(o(W),o(E))?"horizontal":"vertical",d.using.call(this,M,B)}),I.offset(i.extend(H,{using:D}))})},i.ui.position={fit:{left:function(d,f){var m,c=f.within,g=c.isWindow?c.scrollLeft:c.offset.left,_=c.width,v=d.left-f.collisionPosition.marginLeft,b=g-v,y=v+f.collisionWidth-_-g;f.collisionWidth>_?b>0&&0>=y?(m=d.left+b+f.collisionWidth-_-g,d.left+=b-m):d.left=y>0&&0>=b?g:b>y?g+_-f.collisionWidth:g:b>0?d.left+=b:y>0?d.left-=y:d.left=n(d.left-v,d.left)},top:function(d,f){var m,c=f.within,g=c.isWindow?c.scrollTop:c.offset.top,_=f.within.height,v=d.top-f.collisionPosition.marginTop,b=g-v,y=v+f.collisionHeight-_-g;f.collisionHeight>_?b>0&&0>=y?(m=d.top+b+f.collisionHeight-_-g,d.top+=b-m):d.top=y>0&&0>=b?g:b>y?g+_-f.collisionHeight:g:b>0?d.top+=b:y>0?d.top-=y:d.top=n(d.top-v,d.top)}},flip:{left:function(d,f){var m,c,g=f.within,_=g.offset.left+g.scrollLeft,v=g.width,b=g.isWindow?g.scrollLeft:g.offset.left,y=d.left-f.collisionPosition.marginLeft,C=y-b,x=y+f.collisionWidth-v-b,k=f.my[0]==="left"?-f.elemWidth:f.my[0]==="right"?f.elemWidth:0,w=f.at[0]==="left"?f.targetWidth:f.at[0]==="right"?-f.targetWidth:0,D=-2*f.offset[0];0>C?(0>(m=d.left+k+w+D+f.collisionWidth-v-_)||o(C)>m)&&(d.left+=k+w+D):x>0&&((c=d.left-f.collisionPosition.marginLeft+k+w+D-b)>0||x>o(c))&&(d.left+=k+w+D)},top:function(d,f){var m,c,g=f.within,_=g.offset.top+g.scrollTop,v=g.height,b=g.isWindow?g.scrollTop:g.offset.top,y=d.top-f.collisionPosition.marginTop,C=y-b,x=y+f.collisionHeight-v-b,k=f.my[1]==="top"?-f.elemHeight:f.my[1]==="bottom"?f.elemHeight:0,w=f.at[1]==="top"?f.targetHeight:f.at[1]==="bottom"?-f.targetHeight:0,D=-2*f.offset[1];0>C?(0>(c=d.top+k+w+D+f.collisionHeight-v-_)||o(C)>c)&&(d.top+=k+w+D):x>0&&((m=d.top-f.collisionPosition.marginTop+k+w+D-b)>0||x>o(m))&&(d.top+=k+w+D)}},flipfit:{left:function(){i.ui.position.flip.left.apply(this,arguments),i.ui.position.fit.left.apply(this,arguments)},top:function(){i.ui.position.flip.top.apply(this,arguments),i.ui.position.fit.top.apply(this,arguments)}}}}(),i.ui.position,i.extend(i.expr[":"],{data:i.expr.createPseudo?i.expr.createPseudo(function(t){return function(e){return!!i.data(e,t)}}):function(t,e,s){return!!i.data(t,s[3])}}),i.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),i.ui.focusable=function(t,e){var s,n,o,a,r,h=t.nodeName.toLowerCase();return h==="area"?(n=(s=t.parentNode).name,!(!t.href||!n||s.nodeName.toLowerCase()!=="map")&&(o=i("img[usemap='#"+n+"']")).length>0&&o.is(":visible")):(/^(input|select|textarea|button|object)$/.test(h)?(a=!t.disabled)&&(r=i(t).closest("fieldset")[0])&&(a=!r.disabled):a=h==="a"&&t.href||e,a&&i(t).is(":visible")&&function(l){for(var u=l.css("visibility");u==="inherit";)u=(l=l.parent()).css("visibility");return u!=="hidden"}(i(t)))},i.extend(i.expr[":"],{focusable:function(t){return i.ui.focusable(t,i.attr(t,"tabindex")!=null)}}),i.ui.focusable,i.fn.form=function(){return typeof this[0].form=="string"?this.closest("form"):i(this[0].form)},i.ui.formResetMixin={_formResetHandler:function(){var t=i(this);setTimeout(function(){var e=t.data("ui-form-reset-instances");i.each(e,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(i.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},i.fn.jquery.substring(0,3)==="1.7"&&(i.each(["Width","Height"],function(t,e){function s(r,h,l,u){return i.each(n,function(){h-=parseFloat(i.css(r,"padding"+this))||0,l&&(h-=parseFloat(i.css(r,"border"+this+"Width"))||0),u&&(h-=parseFloat(i.css(r,"margin"+this))||0)}),h}var n=e==="Width"?["Left","Right"]:["Top","Bottom"],o=e.toLowerCase(),a={innerWidth:i.fn.innerWidth,innerHeight:i.fn.innerHeight,outerWidth:i.fn.outerWidth,outerHeight:i.fn.outerHeight};i.fn["inner"+e]=function(r){return r===void 0?a["inner"+e].call(this):this.each(function(){i(this).css(o,s(this,r)+"px")})},i.fn["outer"+e]=function(r,h){return typeof r!="number"?a["outer"+e].call(this,r):this.each(function(){i(this).css(o,s(this,r,!0,h)+"px")})}}),i.fn.addBack=function(t){return this.add(t==null?this.prevObject:this.prevObject.filter(t))}),i.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},i.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),i.fn.labels=function(){var t,e,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),(s=this.attr("id"))&&(o=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+i.ui.escapeSelector(s)+"']",n=n.add(o.find(e).addBack(e))),this.pushStack(n))},i.fn.scrollParent=function(t){var e=this.css("position"),s=e==="absolute",n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var a=i(this);return(!s||a.css("position")!=="static")&&n.test(a.css("overflow")+a.css("overflow-y")+a.css("overflow-x"))}).eq(0);return e!=="fixed"&&o.length?o:i(this[0].ownerDocument||document)},i.extend(i.expr[":"],{tabbable:function(t){var e=i.attr(t,"tabindex"),s=e!=null;return(!s||e>=0)&&i.ui.focusable(t,s)}}),i.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&i(this).removeAttr("id")})}}),i.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var G=!1;i(document).on("mouseup",function(){G=!1}),i.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){return i.data(e.target,t.widgetName+".preventClickEvent")===!0?(i.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!G){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,s=t.which===1,n=!(typeof this.options.cancel!="string"||!t.target.nodeName)&&i(t.target).closest(this.options.cancel).length;return!(s&&!n&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(i.data(t.target,this.widgetName+".preventClickEvent")===!0&&i.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(o){return e._mouseMove(o)},this._mouseUpDelegate=function(o){return e._mouseUp(o)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),G=!0,!0))}},_mouseMove:function(t){if(this._mouseMoved){if(i.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which){if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)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){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&i.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,G=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),i.ui.plugin={add:function(t,e,s){var n,o=i.ui[t].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,s[n]])},call:function(t,e,s,n){var o,a=t.plugins[e];if(a&&(n||t.element[0].parentNode&&t.element[0].parentNode.nodeType!==11))for(o=0;a.length>o;o++)t.options[a[o][0]]&&a[o][1].apply(t.element,s)}},i.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch{e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},i.ui.safeBlur=function(t){t&&t.nodeName.toLowerCase()!=="body"&&i(t).trigger("blur")},i.widget("ui.draggable",i.ui.mouse,{version:"1.12.1",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(){this.options.helper==="original"&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),t==="handle"&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||i(t.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(e.iframeFix===!0?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var e=i(this);return i("
").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=i.ui.safeActiveElement(this.document[0]);i(t.target).closest(e).length||i.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),i.ui.ddmanager&&(i.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 i(this).css("position")==="fixed"}).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,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),i.ui.ddmanager&&!e.dropBehaviour&&i.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),i.ui.ddmanager&&i.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){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:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp(new i.Event("mouseup",t)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",i.ui.ddmanager&&i.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,s=!1;return i.ui.ddmanager&&!this.options.dropBehaviour&&(s=i.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),this.options.revert==="invalid"&&!s||this.options.revert==="valid"&&s||this.options.revert===!0||i.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?i(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){e._trigger("stop",t)!==!1&&e._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),i.ui.ddmanager&&i.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),i.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new i.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!i(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,s=i.isFunction(e.helper),n=s?i(e.helper.apply(this.element[0],[t])):e.helper==="clone"?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo(e.appendTo==="parent"?this.element[0].parentNode:e.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){typeof t=="string"&&(t=t.split(" ")),i.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(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return this.cssPosition==="absolute"&&this.scrollParent[0]!==e&&i.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(this.cssPosition!=="relative")return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?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,e,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?n.containment==="window"?void(this.containment=[i(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,i(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,i(window).scrollLeft()+i(window).width()-this.helperProportions.width-this.margins.left,i(window).scrollTop()+(i(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):n.containment==="document"?void(this.containment=[0,0,i(o).width()-this.helperProportions.width-this.margins.left,(i(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):n.containment.constructor===Array?void(this.containment=n.containment):(n.containment==="parent"&&(n.containment=this.helper[0].parentNode),void((s=(e=i(n.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var s=t==="absolute"?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*s+this.offset.parent.top*s-(this.cssPosition==="fixed"?-this.offset.scroll.top:n?0:this.offset.scroll.top)*s,left:e.left+this.offset.relative.left*s+this.offset.parent.left*s-(this.cssPosition==="fixed"?-this.offset.scroll.left:n?0:this.offset.scroll.left)*s}},_generatePosition:function(t,e){var s,n,o,a,r=this.options,h=this._isRootNode(this.scrollParent[0]),l=t.pageX,u=t.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),s=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):s=this.containment,t.pageX-this.offset.click.lefts[2]&&(l=s[2]+this.offset.click.left),t.pageY-this.offset.click.top>s[3]&&(u=s[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,u=s?o-this.offset.click.top>=s[1]||o-this.offset.click.top>s[3]?o:o-this.offset.click.top>=s[1]?o-r.grid[1]:o+r.grid[1]:o,a=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,l=s?a-this.offset.click.left>=s[0]||a-this.offset.click.left>s[2]?a:a-this.offset.click.left>=s[0]?a-r.grid[0]:a+r.grid[0]:a),r.axis==="y"&&(l=this.originalPageX),r.axis==="x"&&(u=this.originalPageY)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,s){return s=s||this._uiHash(),i.ui.plugin.call(this,t,[e,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),i.Widget.prototype._trigger.call(this,t,e,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),i.ui.plugin.add("draggable","connectToSortable",{start:function(t,e,s){var n=i.extend({},e,{item:s.element});s.sortables=[],i(s.options.connectToSortable).each(function(){var o=i(this).sortable("instance");o&&!o.options.disabled&&(s.sortables.push(o),o.refreshPositions(),o._trigger("activate",t,n))})},stop:function(t,e,s){var n=i.extend({},e,{item:s.element});s.cancelHelperRemoval=!1,i.each(s.sortables,function(){var o=this;o.isOver?(o.isOver=0,s.cancelHelperRemoval=!0,o.cancelHelperRemoval=!1,o._storedCSS={position:o.placeholder.css("position"),top:o.placeholder.css("top"),left:o.placeholder.css("left")},o._mouseStop(t),o.options.helper=o.options._helper):(o.cancelHelperRemoval=!0,o._trigger("deactivate",t,n))})},drag:function(t,e,s){i.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,i.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&i.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=e.helper.parent(),o.currentItem=e.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return e.helper[0]},t.target=o.currentItem[0],o._mouseCapture(t,!0),o._mouseStart(t,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",t),s.dropped=o.element,i.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(t),e.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",t,o._uiHash(o)),o._mouseStop(t,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),e.helper.appendTo(s._parent),s._refreshOffsets(t),e.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,i.each(s.sortables,function(){this.refreshPositions()}))})}}),i.ui.plugin.add("draggable","cursor",{start:function(t,e,s){var n=i("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(t,e,s){var n=s.options;n._cursor&&i("body").css("cursor",n._cursor)}}),i.ui.plugin.add("draggable","opacity",{start:function(t,e,s){var n=i(e.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(t,e,s){var n=s.options;n._opacity&&i(e.helper).css("opacity",n._opacity)}}),i.ui.plugin.add("draggable","scroll",{start:function(t,e,s){s.scrollParentNotHidden||(s.scrollParentNotHidden=s.helper.scrollParent(!1)),s.scrollParentNotHidden[0]!==s.document[0]&&s.scrollParentNotHidden[0].tagName!=="HTML"&&(s.overflowOffset=s.scrollParentNotHidden.offset())},drag:function(t,e,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&a.tagName!=="HTML"?(n.axis&&n.axis==="x"||(s.overflowOffset.top+a.offsetHeight-t.pageY=0;d--)l=(h=s.snapElements[d].left-s.margins.left)+s.snapElements[d].width,p=(u=s.snapElements[d].top-s.margins.top)+s.snapElements[d].height,h-c>_||g>l+c||u-c>b||v>p+c||!i.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,i.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):(m.snapMode!=="inner"&&(n=c>=Math.abs(u-b),o=c>=Math.abs(p-v),a=c>=Math.abs(h-_),r=c>=Math.abs(l-g),n&&(e.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),o&&(e.position.top=s._convertPositionTo("relative",{top:p,left:0}).top),a&&(e.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(e.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),f=n||o||a||r,m.snapMode!=="outer"&&(n=c>=Math.abs(u-v),o=c>=Math.abs(p-b),a=c>=Math.abs(h-g),r=c>=Math.abs(l-_),n&&(e.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),o&&(e.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top),a&&(e.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(e.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||f)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,i.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||f)}}),i.ui.plugin.add("draggable","stack",{start:function(t,e,s){var n,o=s.options,a=i.makeArray(i(o.stack)).sort(function(r,h){return(parseInt(i(r).css("zIndex"),10)||0)-(parseInt(i(h).css("zIndex"),10)||0)});a.length&&(n=parseInt(i(a[0]).css("zIndex"),10)||0,i(a).each(function(r){i(this).css("zIndex",n+r)}),this.css("zIndex",n+a.length))}}),i.ui.plugin.add("draggable","zIndex",{start:function(t,e,s){var n=i(e.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(t,e,s){var n=s.options;n._zIndex&&i(e.helper).css("zIndex",n._zIndex)}}),i.ui.draggable,i.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,s=e.accept;this.isover=!1,this.isout=!0,this.accept=i.isFunction(s)?s:function(n){return n.is(s)},this.proportions=function(){return arguments.length?void(t=arguments[0]):t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight})},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){i.ui.ddmanager.droppables[t]=i.ui.ddmanager.droppables[t]||[],i.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=i.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){if(t==="accept")this.accept=i.isFunction(e)?e:function(n){return n.is(e)};else if(t==="scope"){var s=i.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(e)}this._super(t,e)},_activate:function(t){var e=i.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=i.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=i.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=i.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(t,e){var s=e||i.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 o=i(this).droppable("instance");return o.options.greedy&&!o.options.disabled&&o.options.scope===s.options.scope&&o.accept.call(o.element[0],s.currentItem||s.element)&&J(s,i.extend(o,{offset:o.element.offset()}),o.options.tolerance,t)?(n=!0,!1):void 0}),!n&&!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(s)),this.element))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var J=i.ui.intersect=function(){function t(e,s,n){return e>=s&&s+n>e}return function(e,s,n,o){if(!s.offset)return!1;var a=(e.positionAbs||e.position.absolute).left+e.margins.left,r=(e.positionAbs||e.position.absolute).top+e.margins.top,h=a+e.helperProportions.width,l=r+e.helperProportions.height,u=s.offset.left,p=s.offset.top,d=u+s.proportions().width,f=p+s.proportions().height;switch(n){case"fit":return a>=u&&d>=h&&r>=p&&f>=l;case"intersect":return a+e.helperProportions.width/2>u&&d>h-e.helperProportions.width/2&&r+e.helperProportions.height/2>p&&f>l-e.helperProportions.height/2;case"pointer":return t(o.pageY,p,s.proportions().height)&&t(o.pageX,u,s.proportions().width);case"touch":return(r>=p&&f>=r||l>=p&&f>=l||p>r&&l>f)&&(a>=u&&d>=a||h>=u&&d>=h||u>a&&h>d);default:return!1}}}();i.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var s,n,o=i.ui.ddmanager.droppables[t.options.scope]||[],a=e?e.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||t&&!o[s].accept.call(o[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible=o[s].element.css("display")!=="none",o[s].visible&&(a==="mousedown"&&o[s]._activate.call(o[s],e),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(t,e){var s=!1;return i.each((i.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&J(t,this,this.options.tolerance,e)&&(s=this._drop.call(this,e)||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,e)))}),s},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||i.ui.ddmanager.prepareOffsets(t,e)})},drag:function(t,e){t.options.refreshPositions&&i.ui.ddmanager.prepareOffsets(t,e),i.each(i.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=J(t,this,this.options.tolerance,e),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,(o=this.element.parents(":data(ui-droppable)").filter(function(){return i(this).droppable("instance").options.scope===n})).length&&((s=i(o[0]).droppable("instance")).greedyChild=r==="isover")),s&&r==="isover"&&(s.isover=!1,s.isout=!0,s._out.call(s,e)),this[r]=!0,this[r==="isout"?"isover":"isout"]=!1,this[r==="isover"?"_over":"_out"].call(this,e),s&&r==="isout"&&(s.isout=!1,s.isover=!0,s._over.call(s,e)))}})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||i.ui.ddmanager.prepareOffsets(t,e)}},i.uiBackCompat!==!1&&i.widget("ui.droppable",i.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),i.ui.droppable,i.widget("ui.resizable",i.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},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(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if(i(t).css("overflow")==="hidden")return!1;var s=e&&e==="left"?"scrollLeft":"scrollTop",n=!1;return t[s]>0||(t[s]=1,n=t[s]>0,t[s]=0,n)},_create:function(){var t,e=this.options,s=this;this._addClass("ui-resizable"),i.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(i("
").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,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",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(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&i(this.element).on("mouseenter",function(){e.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){e.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,e=function(s){i(s).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(e(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),e(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,e,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(i(".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=i(),this.handles.constructor===String)for(this.handles==="all"&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},e=0;s.length>e;e++)n="ui-resizable-"+(t=i.trim(s[e])),o=i("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(o);this._renderAxis=function(h){var l,u,p,d;for(l in h=h||this.element,this.handles)this.handles[l].constructor===String?this.handles[l]=this.element.children(this.handles[l]).first().show():(this.handles[l].jquery||this.handles[l].nodeType)&&(this.handles[l]=i(this.handles[l]),this._on(this.handles[l],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(u=i(this.handles[l],this.element),d=/sw|ne|nw|se|n|s/.test(l)?u.outerHeight():u.outerWidth(),p=["padding",/ne|nw|n/.test(l)?"Top":/se|sw|s/.test(l)?"Bottom":/^e$/.test(l)?"Right":"Left"].join(""),h.css(p,d),this._proportionallyResize()),this._handles=this._handles.add(this.handles[l])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var e,s,n=!1;for(e in this.handles)((s=i(this.handles[e])[0])===t.target||i.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var e,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(e+=i(o.containment).scrollLeft()||0,s+=i(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:e,top:s},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof o.aspectRatio=="number"?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=i(".ui-resizable-"+this.axis).css("cursor"),i("body").css("cursor",n==="auto"?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,s,n=this.originalMousePosition,o=this.axis,a=t.pageX-n.left||0,r=t.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),!!h&&(e=h.apply(this,[t,a,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),i.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1)},_mouseStop:function(t){this.resizing=!1;var e,s,n,o,a,r,h,l=this.options,u=this;return this._helper&&(n=(s=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:u.sizeDiff.height,o=s?0:u.sizeDiff.width,a={width:u.helper.width()-o,height:u.helper.height()-n},r=parseFloat(u.element.css("left"))+(u.position.left-u.originalPosition.left)||null,h=parseFloat(u.element.css("top"))+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(i.extend(a,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),i("body").css("cursor","auto"),this._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 t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,s,n,o,a,r=this.options;a={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),n==="sw"&&(t.left=e.left+(s.width-t.width),t.top=null),n==="nw"&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,u=/sw|nw|w/.test(s),p=/nw|ne|n/.test(s);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&u&&(t.left=h-e.minWidth),n&&u&&(t.left=h-e.maxWidth),r&&p&&(t.top=l-e.minHeight),o&&p&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,s=[],n=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],o=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)s[e]=parseFloat(n[e])||0,s[e]+=parseFloat(o[e])||0;return{height:s[0]+s[2],width:s[1]+s[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,s=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:s.height()-this.outerDimensions.height||0,width:s.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||i("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var s=this.originalSize;return{left:this.originalPosition.left+e,width:s.width-e}},n:function(t,e,s){var n=this.originalSize;return{top:this.originalPosition.top+s,height:n.height-s}},s:function(t,e,s){return{height:this.originalSize.height+s}},se:function(t,e,s){return i.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,s]))},sw:function(t,e,s){return i.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,s]))},ne:function(t,e,s){return i.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,s]))},nw:function(t,e,s){return i.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,s]))}},_propagate:function(t,e){i.ui.plugin.call(this,t,[e,this.ui()]),t!=="resize"&&this._trigger(t,e,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}}}),i.ui.plugin.add("resizable","animate",{stop:function(t){var e=i(this).resizable("instance"),s=e.options,n=e._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&e._hasScroll(n[0],"left")?0:e.sizeDiff.height,r=o?0:e.sizeDiff.width,h={width:e.size.width-r,height:e.size.height-a},l=parseFloat(e.element.css("left"))+(e.position.left-e.originalPosition.left)||null,u=parseFloat(e.element.css("top"))+(e.position.top-e.originalPosition.top)||null;e.element.animate(i.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var p={width:parseFloat(e.element.css("width")),height:parseFloat(e.element.css("height")),top:parseFloat(e.element.css("top")),left:parseFloat(e.element.css("left"))};n&&n.length&&i(n[0]).css({width:p.width,height:p.height}),e._updateCache(p),e._propagate("resize",t)}})}}),i.ui.plugin.add("resizable","containment",{start:function(){var t,e,s,n,o,a,r,h=i(this).resizable("instance"),l=h.options,u=h.element,p=l.containment,d=p instanceof i?p.get(0):/parent/.test(p)?u.parent().get(0):p;d&&(h.containerElement=i(d),/document/.test(p)||p===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:i(document),left:0,top:0,width:i(document).width(),height:i(document).height()||document.body.parentNode.scrollHeight}):(t=i(d),e=[],i(["Top","Right","Left","Bottom"]).each(function(f,m){e[f]=h._num(t.css("padding"+m))}),h.containerOffset=t.offset(),h.containerPosition=t.position(),h.containerSize={height:t.innerHeight()-e[3],width:t.innerWidth()-e[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(t){var e,s,n,o,a=i(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,u=a._aspectRatio||t.shiftKey,p={top:0,left:0},d=a.containerElement,f=!0;d[0]!==document&&/static/.test(d.css("position"))&&(p=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-p.left),u&&(a.size.height=a.size.width/a.aspectRatio,f=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),u&&(a.size.width=a.size.height*a.aspectRatio,f=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),e=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-p.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-p.top:a.offset.top-h.top)),e+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-e,u&&(a.size.height=a.size.width/a.aspectRatio,f=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,u&&(a.size.width=a.size.height*a.aspectRatio,f=!1)),f||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var t=i(this).resizable("instance"),e=t.options,s=t.containerOffset,n=t.containerPosition,o=t.containerElement,a=i(t.helper),r=a.offset(),h=a.outerWidth()-t.sizeDiff.width,l=a.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(o.css("position"))&&i(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!e.animate&&/static/.test(o.css("position"))&&i(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),i.ui.plugin.add("resizable","alsoResize",{start:function(){var t=i(this).resizable("instance").options;i(t.alsoResize).each(function(){var e=i(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(t,e){var s=i(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};i(n.alsoResize).each(function(){var h=i(this),l=i(this).data("ui-resizable-alsoresize"),u={},p=h.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];i.each(p,function(d,f){var m=(l[f]||0)+(r[f]||0);m&&m>=0&&(u[f]=m||null)}),h.css(u)})},stop:function(){i(this).removeData("ui-resizable-alsoresize")}}),i.ui.plugin.add("resizable","ghost",{start:function(){var t=i(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),i.uiBackCompat!==!1&&typeof t.options.ghost=="string"&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=i(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=i(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),i.ui.plugin.add("resizable","grid",{resize:function(){var t,e=i(this).resizable("instance"),s=e.options,n=e.size,o=e.originalSize,a=e.originalPosition,r=e.axis,h=typeof s.grid=="number"?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,p=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/u)*u,f=o.width+p,m=o.height+d,c=s.maxWidth&&f>s.maxWidth,g=s.maxHeight&&m>s.maxHeight,_=s.minWidth&&s.minWidth>f,v=s.minHeight&&s.minHeight>m;s.grid=h,_&&(f+=l),v&&(m+=u),c&&(f-=l),g&&(m-=u),/^(se|s|e)$/.test(r)?(e.size.width=f,e.size.height=m):/^(ne)$/.test(r)?(e.size.width=f,e.size.height=m,e.position.top=a.top-d):/^(sw)$/.test(r)?(e.size.width=f,e.size.height=m,e.position.left=a.left-p):((0>=m-u||0>=f-l)&&(t=e._getPaddingPlusBorderDimensions(this)),m-u>0?(e.size.height=m,e.position.top=a.top-d):(m=u-t.height,e.size.height=m,e.position.top=a.top+o.height-m),f-l>0?(e.size.width=f,e.position.left=a.left-p):(f=l-t.width,e.size.width=f,e.position.left=a.left+o.width-f))}}),i.ui.resizable,i.widget("ui.selectable",i.ui.mouse,{version:"1.12.1",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=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t.elementPos=i(t.element[0]).offset(),t.selectees=i(t.options.filter,t.element[0]),t._addClass(t.selectees,"ui-selectee"),t.selectees.each(function(){var e=i(this),s=e.offset(),n={left:s.left-t.elementPos.left,top:s.top-t.elementPos.top};i.data(this,"selectable-item",{element:this,$element:e,left:n.left,top:n.top,right:n.left+e.outerWidth(),bottom:n.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=i("
"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(t){var e=this,s=this.options;this.opos=[t.pageX,t.pageY],this.elementPos=i(this.element[0]).offset(),this.options.disabled||(this.selectees=i(s.filter,this.element[0]),this._trigger("start",t),i(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 n=i.data(this,"selectable-item");n.startselected=!0,t.metaKey||t.ctrlKey||(e._removeClass(n.$element,"ui-selected"),n.selected=!1,e._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,e._trigger("unselecting",t,{unselecting:n.element}))}),i(t.target).parents().addBack().each(function(){var n,o=i.data(this,"selectable-item");return o?(n=!t.metaKey&&!t.ctrlKey||!o.$element.hasClass("ui-selected"),e._removeClass(o.$element,n?"ui-unselecting":"ui-selected")._addClass(o.$element,n?"ui-selecting":"ui-unselecting"),o.unselecting=!n,o.selecting=n,o.selected=n,n?e._trigger("selecting",t,{selecting:o.element}):e._trigger("unselecting",t,{unselecting:o.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var e,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=t.pageX,h=t.pageY;return o>r&&(e=r,r=o,o=e),a>h&&(e=h,h=a,a=e),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var l=i.data(this,"selectable-item"),u=!1,p={};l&&l.element!==s.element[0]&&(p.left=l.left+s.elementPos.left,p.right=l.right+s.elementPos.left,p.top=l.top+s.elementPos.top,p.bottom=l.bottom+s.elementPos.top,n.tolerance==="touch"?u=!(p.left>r||o>p.right||p.top>h||a>p.bottom):n.tolerance==="fit"&&(u=p.left>o&&r>p.right&&p.top>a&&h>p.bottom),u?(l.selected&&(s._removeClass(l.$element,"ui-selected"),l.selected=!1),l.unselecting&&(s._removeClass(l.$element,"ui-unselecting"),l.unselecting=!1),l.selecting||(s._addClass(l.$element,"ui-selecting"),l.selecting=!0,s._trigger("selecting",t,{selecting:l.element}))):(l.selecting&&((t.metaKey||t.ctrlKey)&&l.startselected?(s._removeClass(l.$element,"ui-selecting"),l.selecting=!1,s._addClass(l.$element,"ui-selected"),l.selected=!0):(s._removeClass(l.$element,"ui-selecting"),l.selecting=!1,l.startselected&&(s._addClass(l.$element,"ui-unselecting"),l.unselecting=!0),s._trigger("unselecting",t,{unselecting:l.element}))),l.selected&&(t.metaKey||t.ctrlKey||l.startselected||(s._removeClass(l.$element,"ui-selected"),l.selected=!1,s._addClass(l.$element,"ui-unselecting"),l.unselecting=!0,s._trigger("unselecting",t,{unselecting:l.element})))))}),!1}},_mouseStop:function(t){var e=this;return this.dragged=!1,i(".ui-unselecting",this.element[0]).each(function(){var s=i.data(this,"selectable-item");e._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,e._trigger("unselected",t,{unselected:s.element})}),i(".ui-selecting",this.element[0]).each(function(){var s=i.data(this,"selectable-item");e._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,e._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),i.widget("ui.sortable",i.ui.mouse,{version:"1.12.1",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(t,e,s){return t>=e&&e+s>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),t==="handle"&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),i.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var s=null,n=!1,o=this;return!this.reverting&&!this.options.disabled&&this.options.type!=="static"&&(this._refreshItems(t),i(t.target).parents().each(function(){return i.data(this,o.widgetName+"-item")===o?(s=i(this),!1):void 0}),i.data(t.target,o.widgetName+"-item")===o&&(s=i(t.target)),!!s&&!(this.options.handle&&!e&&(i(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(n=!0)}),!n))&&(this.currentItem=s,this._removeCurrentsFromItems(),!0))},_mouseStart:function(t,e,s){var n,o,a=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},i.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,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&a.cursor!=="auto"&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=i("").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&this.scrollParent[0].tagName!=="HTML"&&(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 i.ui.ddmanager&&(i.ui.ddmanager.current=this),i.ui.ddmanager&&!a.dropBehaviour&&i.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,s,n,o,a=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]&&this.scrollParent[0].tagName!=="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;e--)if(n=(s=this.items[e]).item[0],(o=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[o===1?"next":"prev"]()[0]!==n&&!i.contains(this.placeholder[0],n)&&(this.options.type!=="semi-dynamic"||!i.contains(this.element[0],n))){if(this.direction=o===1?"down":"up",this.options.tolerance!=="pointer"&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),i.ui.ddmanager&&i.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){if(t){if(i.ui.ddmanager&&!this.options.dropBehaviour&&i.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&o!=="x"||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&o!=="y"||(a.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,i(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,e);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new i.Event("mouseup",{target:null})),this.options.helper==="original"?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"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]),this.options.helper!=="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),i.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?i(this.domPosition.prev).after(this.currentItem):i(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var e=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i(e).each(function(){var n=(i(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&s.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e.each(function(){s.push(i(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,s=e+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,a=t.left,r=a+t.width,h=t.top,l=h+t.height,u=this.offset.click.top,p=this.offset.click.left,d=this.options.axis==="x"||n+u>h&&l>n+u,f=this.options.axis==="y"||e+p>a&&r>e+p,m=d&&f;return this.options.tolerance==="pointer"||this.options.forcePointerForContainers||this.options.tolerance!=="pointer"&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?m:e+this.helperProportions.width/2>a&&r>s-this.helperProportions.width/2&&n+this.helperProportions.height/2>h&&l>o-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,s,n=this.options.axis==="x"||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o=this.options.axis==="y"||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!!(n&&o)&&(e=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection(),this.floating?s==="right"||e==="down"?2:1:e&&(e==="down"?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?o==="right"&&s||o==="left"&&!s:n&&(n==="down"&&e||n==="up"&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return t!==0&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return t!==0&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){function e(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(n=(o=i(l[s],this.document[0])).length-1;n>=0;n--)(a=i.data(o[n],this.widgetFullName))&&a!==this&&!a.options.disabled&&h.push([i.isFunction(a.options.items)?a.options.items.call(a.element):i(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([i.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):i(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(e);return i(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=i.grep(this.items,function(e){for(var s=0;t.length>s;s++)if(t[s]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,s,n,o,a,r,h,l,u=this.items,p=[[i.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):i(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(e=d.length-1;e>=0;e--)for(s=(n=i(d[e],this.document[0])).length-1;s>=0;s--)(o=i.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&(p.push([i.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):i(o.options.items,o.element),o]),this.containers.push(o));for(e=p.length-1;e>=0;e--)for(a=p[e][1],s=0,l=(r=p[e][0]).length;l>s;s++)(h=i(r[s])).data(this.widgetName+"-item",a),u.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var e,s,n,o;for(this.floating=!!this.items.length&&(this.options.axis==="x"||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),e=this.items.length-1;e>=0;e--)(s=this.items[e]).instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?i(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;e>=0;e--)o=this.containers[e].element.offset(),this.containers[e].containerCache.left=o.left,this.containers[e].containerCache.top=o.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(t){var e,s=(t=t||this).options;s.placeholder&&s.placeholder.constructor!==String||(e=s.placeholder,s.placeholder={element:function(){var n=t.currentItem[0].nodeName.toLowerCase(),o=i("<"+n+">",t.document[0]);return t._addClass(o,"ui-sortable-placeholder",e||t.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),n==="tbody"?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),i("",t.document[0]).appendTo(o)):n==="tr"?t._createTrPlaceholder(t.currentItem,o):n==="img"&&o.attr("src",t.currentItem.attr("src")),e||o.css("visibility","hidden"),o},update:function(n,o){(!e||s.forcePlaceholderSize)&&(o.height()||o.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=i(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,e){var s=this;t.children().each(function(){i(" ",s.document[0]).attr("colspan",i(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){var e,s,n,o,a,r,h,l,u,p,d=null,f=null;for(e=this.containers.length-1;e>=0;e--)if(!i.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(d&&i.contains(this.containers[e].element[0],d.element[0]))continue;d=this.containers[e],f=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",t,this._uiHash(this)),this.containers[e].containerCache.over=0);if(d)if(this.containers.length===1)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(n=1e4,o=null,a=(u=d.floating||this._isFloating(this.currentItem))?"left":"top",r=u?"width":"height",p=u?"pageX":"pageY",s=this.items.length-1;s>=0;s--)i.contains(this.containers[f].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,t[p]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(t[p]-h)&&(n=Math.abs(t[p]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f])return void(this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[f].element,!0),this._trigger("change",t,this._uiHash()),this.containers[f]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1}},_createHelper:function(t){var e=this.options,s=i.isFunction(e.helper)?i(e.helper.apply(this.element[0],[t,this.currentItem])):e.helper==="clone"?this.currentItem.clone():this.currentItem;return s.parents("body").length||i(e.appendTo!=="parent"?e.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||e.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||e.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),i.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 this.cssPosition==="absolute"&&this.scrollParent[0]!==this.document[0]&&i.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&&this.offsetParent[0].tagName.toLowerCase()==="html"&&i.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(this.cssPosition==="relative"){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.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,e,s,n=this.options;n.containment==="parent"&&(n.containment=this.helper[0].parentNode),(n.containment==="document"||n.containment==="window")&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,n.containment==="document"?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,(n.containment==="document"?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=i(n.containment)[0],e=i(n.containment).offset(),s=i(t).css("overflow")!=="hidden",this.containment=[e.left+(parseInt(i(t).css("borderLeftWidth"),10)||0)+(parseInt(i(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(i(t).css("borderTopWidth"),10)||0)+(parseInt(i(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(i(t).css("borderLeftWidth"),10)||0)-(parseInt(i(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(i(t).css("borderTopWidth"),10)||0)-(parseInt(i(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e||(e=this.position);var s=t==="absolute"?1:-1,n=this.cssPosition!=="absolute"||this.scrollParent[0]!==this.document[0]&&i.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:e.top+this.offset.relative.top*s+this.offset.parent.top*s-(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:e.left+this.offset.relative.left*s+this.offset.parent.left*s-(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(t){var e,s,n=this.options,o=t.pageX,a=t.pageY,r=this.cssPosition!=="absolute"||this.scrollParent[0]!==this.document[0]&&i.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return this.cssPosition!=="relative"||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]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(e=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-n.grid[1]:e+n.grid[1]:e,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=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:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,s,n){s?s[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],this.direction==="down"?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!n)})},_clear:function(t,e){function s(a,r,h){return function(l){h._trigger(a,l,r._uiHash(r))}}this.reverting=!1;var n,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)(this._storedCSS[n]==="auto"||this._storedCSS[n]==="static")&&(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&o.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||o.push(function(a){this._trigger("update",a,this._uiHash())}),this!==this.currentContainer&&(e||(o.push(function(a){this._trigger("remove",a,this._uiHash())}),o.push((function(a){return function(r){a._trigger("receive",r,this._uiHash(this))}}).call(this,this.currentContainer)),o.push((function(a){return function(r){a._trigger("update",r,this._uiHash(this))}}).call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||o.push(s("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(o.push(s("out",this,this.containers[n])),this.containers[n].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",this._storedZIndex==="auto"?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(n=0;o.length>n;n++)o[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){i.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||i([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}}),i.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},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=i(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||t.active!==!1&&t.active!=null||(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():i()}},_createIcons:function(){var t,e,s=this.options.icons;s&&(t=i(""),this._addClass(t,"ui-accordion-header-icon","ui-icon "+s.header),t.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,s.header)._addClass(e,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),this.options.heightStyle!=="content"&&t.css("height","")},_setOption:function(t,e){return t==="active"?void this._activate(e):(t==="event"&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),t!=="collapsible"||e||this.options.active!==!1||this._activate(0),void(t==="icons"&&(this._destroyIcons(),e&&this._createIcons())))},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=i.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),o=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:o=this.headers[(n+1)%s];break;case e.LEFT:case e.UP:o=this.headers[(n-1+s)%s];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:o=this.headers[0];break;case e.END:o=this.headers[s-1]}o&&(i(t.target).attr("tabIndex",-1),i(o).attr("tabIndex",0),i(o).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===i.ui.keyCode.UP&&t.ctrlKey&&i(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=i()):t.active===!1?this._activate(0):this.active.length&&!i.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=i()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var t,e=this.options,s=e.heightStyle,n=this.element.parent();this.active=this._findActive(e.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var o=i(this),a=o.uniqueId().attr("id"),r=o.next(),h=r.uniqueId().attr("id");o.attr("aria-controls",h),r.attr("aria-labelledby",a)}).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(e.event),s==="fill"?(t=n.height(),this.element.siblings(":visible").each(function(){var o=i(this),a=o.css("position");a!=="absolute"&&a!=="fixed"&&(t-=o.outerHeight(!0))}),this.headers.each(function(){t-=i(this).outerHeight(!0)}),this.headers.next().each(function(){i(this).height(Math.max(0,t-i(this).innerHeight()+i(this).height()))}).css("overflow","auto")):s==="auto"&&(t=0,this.headers.next().each(function(){var o=i(this).is(":visible");o||i(this).show(),t=Math.max(t,i(this).css("height","").height()),o||i(this).hide()}).height(t))},_activate:function(t){var e=this._findActive(t)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:i.noop}))},_findActive:function(t){return typeof t=="number"?this.headers.eq(t):i()},_setupEvents:function(t){var e={keydown:"_keydown"};t&&i.each(t.split(" "),function(s,n){e[n]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,e),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e,s,n=this.options,o=this.active,a=i(t.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?i():a.next(),u={oldHeader:o,oldPanel:o.next(),newHeader:h?i():a,newPanel:l};t.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",t,u)===!1||(n.active=!h&&this.headers.index(a),this.active=r?i():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(e=o.children(".ui-accordion-header-icon"),this._removeClass(e,null,n.icons.activeHeader)._addClass(e,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=s,this.options.animate?this._animate(e,s,t):(s.hide(),e.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return parseInt(i(this).attr("tabIndex"),10)===0}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,s){var n,o,a,r=this,h=0,l=t.css("box-sizing"),u=t.length&&(!e.length||t.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(t){var e=i(t.target),s=i(i.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var e=i(t.target).closest(".ui-menu-item"),s=i(t.currentTarget);e[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var s=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,s)},blur:function(t){this._delay(function(){!i.contains(this.element[0],i.ui.safeActiveElement(this.document[0]))&&this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var e=i(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(t){var e,s,n,o,a=!0;switch(t.keyCode){case i.ui.keyCode.PAGE_UP:this.previousPage(t);break;case i.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case i.ui.keyCode.HOME:this._move("first","first",t);break;case i.ui.keyCode.END:this._move("last","last",t);break;case i.ui.keyCode.UP:this.previous(t);break;case i.ui.keyCode.DOWN:this.next(t);break;case i.ui.keyCode.LEFT:this.collapse(t);break;case i.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case i.ui.keyCode.ENTER:case i.ui.keyCode.SPACE:this._activate(t);break;case i.ui.keyCode.ESCAPE:this.collapse(t);break;default:a=!1,s=this.previousFilter||"",o=!1,n=t.keyCode>=96&&105>=t.keyCode?""+(t.keyCode-96):String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,e=this._filterMenuItems(n),(e=o&&e.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):e).length||(n=String.fromCharCode(t.keyCode),e=this._filterMenuItems(n)),e.length?(this.focus(t,e),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s,n,o=this,a=this.options.icons.submenu,r=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=r.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var h=i(this),l=h.prev(),u=i("").data("ui-menu-submenu-caret",!0);o._addClass(u,"ui-menu-icon","ui-icon "+a),l.attr("aria-haspopup","true").prepend(u),h.attr("aria-labelledby",l.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=r.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var h=i(this);o._isDivider(h)&&o._addClass(h,"ui-menu-divider","ui-widget-content")}),n=(s=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(s,"ui-menu-item")._addClass(n,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!i.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if(t==="icons"){var s=this.element.find(".ui-menu-icon");this._removeClass(s,null,this.options.icons.submenu)._addClass(s,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var s,n,o;this.blur(t,t&&t.type==="focus"),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),o=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(o,null,"ui-state-active"),t&&t.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay),(s=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(s),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,s,n,o,a,r;this._hasScroll()&&(e=parseFloat(i.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(i.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-e-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),t.attr("aria-hidden")==="true"&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=i.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(e)},collapseAll:function(t,e){clearTimeout(this.timer),this.timer=this._delay(function(){var s=e?this.element:i(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!i(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},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(t,e,s){var n;this.active&&(n=t==="first"||t==="last"?this.active[t==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(s,n)},nextPage:function(t){var e,s,n;return this.active?void(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return 0>(e=i(this)).offset().top-s-n}),this.focus(t,e)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(t)},previousPage:function(t){var e,s,n;return this.active?void(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return(e=i(this)).offset().top-s+n>0}),this.focus(t,e)):this.focus(t,this.activeMenu.find(this.options.items).first()))):void this.next(t)},_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,e,s,n=this.element[0].nodeName.toLowerCase(),o=n==="textarea",a=n==="input";this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly"))return t=!0,s=!0,void(e=!0);t=!1,s=!1,e=!1;var h=i.ui.keyCode;switch(r.keyCode){case h.PAGE_UP:t=!0,this._move("previousPage",r);break;case h.PAGE_DOWN:t=!0,this._move("nextPage",r);break;case h.UP:t=!0,this._keyEvent("previous",r);break;case h.DOWN:t=!0,this._keyEvent("next",r);break;case h.ENTER:this.menu.active&&(t=!0,r.preventDefault(),this.menu.select(r));break;case h.TAB:this.menu.active&&this.menu.select(r);break;case h.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(r),r.preventDefault());break;default:e=!0,this._searchTimeout(r)}},keypress:function(r){if(t)return t=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&r.preventDefault());if(!e){var h=i.ui.keyCode;switch(r.keyCode){case h.PAGE_UP:this._move("previousPage",r);break;case h.PAGE_DOWN:this._move("nextPage",r);break;case h.UP:this._keyEvent("previous",r);break;case h.DOWN:this._keyEvent("next",r)}}},input:function(r){return s?(s=!1,void r.preventDefault()):void this._searchTimeout(r)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(r){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(r),void this._change(r))}}),this._initSource(),this.menu=i("