").addclass("ui-dialog-buttonset").appendto(this.uidialogbuttonpane),this._createbuttons()},_createbuttons:function(){var t=this,i=this.options.buttons;return this.uidialogbuttonpane.remove(),this.uibuttonset.empty(),e.isemptyobject(i)||e.isarray(i)&&!i.length?(this.uidialog.removeclass("ui-dialog-buttons"),undefined):(e.each(i,function(i,a){var s,n;a=e.isfunction(a)?{click:a,text:i}:a,a=e.extend({type:"button"},a),s=a.click,a.click=function(){s.apply(t.element[0],arguments)},n={icons:a.icons,text:a.showtext},delete a.icons,delete a.showtext,e("
",a).button(n).appendto(t.uibuttonset)}),this.uidialog.addclass("ui-dialog-buttons"),this.uidialogbuttonpane.appendto(this.uidialog),undefined)},_makedraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,a=this.options;this.uidialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(a,s){e(this).addclass("ui-dialog-dragging"),i._blockframes(),i._trigger("dragstart",a,t(s))},drag:function(e,a){i._trigger("drag",e,t(a))},stop:function(s,n){a.position=[n.position.left-i.document.scrollleft(),n.position.top-i.document.scrolltop()],e(this).removeclass("ui-dialog-dragging"),i._unblockframes(),i._trigger("dragstop",s,t(n))}})},_makeresizable:function(){function t(e){return{originalposition:e.originalposition,originalsize:e.originalsize,position:e.position,size:e.size}}var i=this,a=this.options,s=a.resizable,n=this.uidialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uidialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoresize:this.element,maxwidth:a.maxwidth,maxheight:a.maxheight,minwidth:a.minwidth,minheight:this._minheight(),handles:r,start:function(a,s){e(this).addclass("ui-dialog-resizing"),i._blockframes(),i._trigger("resizestart",a,t(s))},resize:function(e,a){i._trigger("resize",e,t(a))},stop:function(s,n){a.height=e(this).height(),a.width=e(this).width(),e(this).removeclass("ui-dialog-resizing"),i._unblockframes(),i._trigger("resizestop",s,t(n))}}).css("position",n)},_minheight:function(){var e=this.options;return"auto"===e.height?e.minheight:math.min(e.minheight,e.height)},_position:function(){var e=this.uidialog.is(":visible");e||this.uidialog.show(),this.uidialog.position(this.options.position),e||this.uidialog.hide()},_setoptions:function(a){var s=this,n=!1,r={};e.each(a,function(e,a){s._setoption(e,a),e in t&&(n=!0),e in i&&(r[e]=a)}),n&&(this._size(),this._position()),this.uidialog.is(":data(ui-resizable)")&&this.uidialog.resizable("option",r)},_setoption:function(e,t){var i,a,s=this.uidialog;"dialogclass"===e&&s.removeclass(this.options.dialogclass).addclass(t),"disabled"!==e&&(this._super(e,t),"appendto"===e&&this.uidialog.appendto(this._appendto()),"buttons"===e&&this._createbuttons(),"closetext"===e&&this.uidialogtitlebarclose.button({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makedraggable()),"position"===e&&this._position(),"resizable"===e&&(a=s.is(":data(ui-resizable)"),a&&!t&&s.resizable("destroy"),a&&"string"==typeof t&&s.resizable("option","handles",t),a||t===!1||this._makeresizable()),"title"===e&&this._title(this.uidialogtitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,a=this.options;this.element.show().css({width:"auto",minheight:0,maxheight:"none",height:0}),a.minwidth>a.width&&(a.width=a.minwidth),e=this.uidialog.css({height:"auto",width:a.width}).outerheight(),t=math.max(0,a.minheight-e),i="number"==typeof a.maxheight?math.max(0,a.maxheight-e):"none","auto"===a.height?this.element.css({minheight:t,maxheight:i,height:"auto"}):this.element.height(math.max(0,a.height-e)),this.uidialog.is(":data(ui-resizable)")&&this.uidialog.resizable("option","minheight",this._minheight())},_blockframes:function(){this.iframeblocks=this.document.find("iframe").map(function(){var t=e(this);return e("
").css({position:"absolute",width:t.outerwidth(),height:t.outerheight()}).appendto(t.parent()).offset(t.offset())[0]})},_unblockframes:function(){this.iframeblocks&&(this.iframeblocks.remove(),delete this.iframeblocks)},_allowinteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createoverlay:function(){if(this.options.modal){var t=this,i=this.widgetfullname;e.ui.dialog.overlayinstances||this._delay(function(){e.ui.dialog.overlayinstances&&this.document.bind("focusin.dialog",function(a){t._allowinteraction(a)||(a.preventdefault(),e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focustabbable())})}),this.overlay=e("
").addclass("ui-widget-overlay ui-front").appendto(this._appendto()),this._on(this.overlay,{mousedown:"_keepfocus"}),e.ui.dialog.overlayinstances++}},_destroyoverlay:function(){this.options.modal&&this.overlay&&(e.ui.dialog.overlayinstances--,e.ui.dialog.overlayinstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayinstances=0,e.uibackcompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t,i=this.options.position,a=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(a=i.split?i.split(" "):[i[0],i[1]],1===a.length&&(a[1]=a[0]),e.each(["left","top"],function(e,t){+a[e]===a[e]&&(s[e]=a[e],a[e]=t)}),i={my:a[0]+(0>s[0]?s[0]:"+"+s[0])+" "+a[1]+(0>s[1]?s[1]:"+"+s[1]),at:a.join(" ")}),i=e.extend({},e.ui.dialog.prototype.options.position,i)):i=e.ui.dialog.prototype.options.position,t=this.uidialog.is(":visible"),t||this.uidialog.show(),this.uidialog.position(i),t||this.uidialog.hide()}})})(jquery);(function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",widgeteventprefix:"drag",options:{addclasses:!0,appendto:"parent",axis:!1,connecttosortable:!1,containment:!1,cursor:"auto",cursorat:!1,grid:!1,handle:!1,helper:"original",iframefix:!1,opacity:!1,refreshpositions:!1,revert:!1,revertduration:500,scope:"default",scroll:!0,scrollsensitivity:20,scrollspeed:20,snap:!1,snapmode:"both",snaptolerance:20,stack:!1,zindex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addclasses&&this.element.addclass("ui-draggable"),this.options.disabled&&this.element.addclass("ui-draggable-disabled"),this._mouseinit()},_destroy:function(){this.element.removeclass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mousedestroy()},_mousecapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._gethandle(e),this.handle?(t(i.iframefix===!0?"iframe":i.iframefix).each(function(){t("
").css({width:this.offsetwidth+"px",height:this.offsetheight+"px",position:"absolute",opacity:"0.001",zindex:1e3}).css(t(this).offset()).appendto("body")}),!0):!1)},_mousestart:function(e){var i=this.options;return this.helper=this._createhelper(e),this.helper.addclass("ui-draggable-dragging"),this._cachehelperproportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cachemargins(),this.cssposition=this.helper.css("position"),this.scrollparent=this.helper.scrollparent(),this.offsetparent=this.helper.offsetparent(),this.offsetparentcssposition=this.offsetparent.css("position"),this.offset=this.positionabs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pagex-this.offset.left,top:e.pagey-this.offset.top},parent:this._getparentoffset(),relative:this._getrelativeoffset()}),this.originalposition=this.position=this._generateposition(e),this.originalpagex=e.pagex,this.originalpagey=e.pagey,i.cursorat&&this._adjustoffsetfromhelper(i.cursorat),this._setcontainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cachehelperproportions(),t.ui.ddmanager&&!i.dropbehaviour&&t.ui.ddmanager.prepareoffsets(this,e),this._mousedrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragstart(this,e),!0)},_mousedrag:function(e,i){if("fixed"===this.offsetparentcssposition&&(this.offset.parent=this._getparentoffset()),this.position=this._generateposition(e),this.positionabs=this._convertpositionto("absolute"),!i){var s=this._uihash();if(this._trigger("drag",e,s)===!1)return this._mouseup({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mousestop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropbehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerdocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isfunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalposition,parseint(this.options.revertduration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseup:function(e){return t("div.ui-draggable-iframefix").each(function(){this.parentnode.removechild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragstop(this,e),t.ui.mouse.prototype._mouseup.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseup({}):this._clear(),this},_gethandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createhelper:function(e){var i=this.options,s=t.isfunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeattr("id"):this.element;return s.parents("body").length||s.appendto("parent"===i.appendto?this.element[0].parentnode:i.appendto),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustoffsetfromhelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isarray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperproportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperproportions.height-e.bottom+this.margins.top)},_getparentoffset:function(){var e=this.offsetparent.offset();return"absolute"===this.cssposition&&this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])&&(e.left+=this.scrollparent.scrollleft(),e.top+=this.scrollparent.scrolltop()),(this.offsetparent[0]===document.body||this.offsetparent[0].tagname&&"html"===this.offsetparent[0].tagname.tolowercase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseint(this.offsetparent.css("bordertopwidth"),10)||0),left:e.left+(parseint(this.offsetparent.css("borderleftwidth"),10)||0)}},_getrelativeoffset:function(){if("relative"===this.cssposition){var t=this.element.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.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 e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollleft()-this.offset.relative.left-this.offset.parent.left,t(window).scrolltop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollleft()+t(window).width()-this.helperproportions.width-this.margins.left,t(window).scrolltop()+(t(window).height()||document.body.parentnode.scrollheight)-this.helperproportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperproportions.width-this.margins.left,(t(document).height()||document.body.parentnode.scrollheight)-this.helperproportions.height-this.margins.top],undefined):n.containment.constructor===array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentnode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseint(i.css("borderleftwidth"),10)||0)+(parseint(i.css("paddingleft"),10)||0),(parseint(i.css("bordertopwidth"),10)||0)+(parseint(i.css("paddingtop"),10)||0),(e?math.max(s.scrollwidth,s.offsetwidth):s.offsetwidth)-(parseint(i.css("borderrightwidth"),10)||0)-(parseint(i.css("paddingright"),10)||0)-this.helperproportions.width-this.margins.left-this.margins.right,(e?math.max(s.scrollheight,s.offsetheight):s.offsetheight)-(parseint(i.css("borderbottomwidth"),10)||0)-(parseint(i.css("paddingbottom"),10)||0)-this.helperproportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertpositionto:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssposition||this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])?this.scrollparent:this.offsetparent;return this.offset.scroll||(this.offset.scroll={top:n.scrolltop(),left:n.scrollleft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssposition?-this.scrollparent.scrolltop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssposition?-this.scrollparent.scrollleft():this.offset.scroll.left)*s}},_generateposition:function(e){var i,s,n,a,o=this.options,r="absolute"!==this.cssposition||this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])?this.scrollparent:this.offsetparent,l=e.pagex,h=e.pagey;return this.offset.scroll||(this.offset.scroll={top:r.scrolltop(),left:r.scrollleft()}),this.originalposition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pagex-this.offset.click.left
i[2]&&(l=i[2]+this.offset.click.left),e.pagey-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalpagey+math.round((h-this.originalpagey)/o.grid[1])*o.grid[1]:this.originalpagey,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalpagex+math.round((l-this.originalpagex)/o.grid[0])*o.grid[0]:this.originalpagex,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssposition?-this.scrollparent.scrolltop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssposition?-this.scrollparent.scrollleft():this.offset.scroll.left)}},_clear:function(){this.helper.removeclass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelhelperremoval||this.helper.remove(),this.helper=null,this.cancelhelperremoval=!1},_trigger:function(e,i,s){return s=s||this._uihash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionabs=this._convertpositionto("absolute")),t.widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uihash:function(){return{helper:this.helper,position:this.position,originalposition:this.originalposition,offset:this.positionabs}}}),t.ui.plugin.add("draggable","connecttosortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connecttosortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldrevert:i.options.revert}),i.refreshpositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isover?(this.instance.isover=0,s.cancelhelperremoval=!0,this.instance.cancelhelperremoval=!1,this.shouldrevert&&(this.instance.options.revert=this.shouldrevert),this.instance._mousestop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentitem.css({top:"auto",left:"auto"})):(this.instance.cancelhelperremoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var a=!1,o=this;this.instance.positionabs=s.positionabs,this.instance.helperproportions=s.helperproportions,this.instance.offset.click=s.offset.click,this.instance._intersectswith(this.instance.containercache)&&(a=!0,t.each(s.sortables,function(){return this.instance.positionabs=s.positionabs,this.instance.helperproportions=s.helperproportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectswith(this.instance.containercache)&&t.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isover||(this.instance.isover=1,this.instance.currentitem=t(n).clone().removeattr("id").appendto(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentitem[0],this.instance._mousecapture(e,!0),this.instance._mousestart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("tosortable",e),s.dropped=this.instance.element,s.currentitem=s.element,this.instance.fromoutside=s),this.instance.currentitem&&this.instance._mousedrag(e)):this.instance.isover&&(this.instance.isover=0,this.instance.cancelhelperremoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uihash(this.instance)),this.instance._mousestop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentitem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromsortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollparent[0]!==document&&"html"!==e.scrollparent[0].tagname&&(e.overflowoffset=e.scrollparent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollparent[0]!==document&&"html"!==i.scrollparent[0].tagname?(s.axis&&"x"===s.axis||(i.overflowoffset.top+i.scrollparent[0].offsetheight-e.pagey=0;u--)r=p.snapelements[u].left,l=r+p.snapelements[u].width,h=p.snapelements[u].top,c=h+p.snapelements[u].height,r-f>_||m>l+f||h-f>b||v>c+f||!t.contains(p.snapelements[u].item.ownerdocument,p.snapelements[u].item)?(p.snapelements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uihash(),{snapitem:p.snapelements[u].item})),p.snapelements[u].snapping=!1):("inner"!==g.snapmode&&(s=f>=math.abs(h-b),n=f>=math.abs(c-v),a=f>=math.abs(r-_),o=f>=math.abs(l-m),s&&(i.position.top=p._convertpositionto("relative",{top:h-p.helperproportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertpositionto("relative",{top:c,left:0}).top-p.margins.top),a&&(i.position.left=p._convertpositionto("relative",{top:0,left:r-p.helperproportions.width}).left-p.margins.left),o&&(i.position.left=p._convertpositionto("relative",{top:0,left:l}).left-p.margins.left)),d=s||n||a||o,"outer"!==g.snapmode&&(s=f>=math.abs(h-v),n=f>=math.abs(c-b),a=f>=math.abs(r-m),o=f>=math.abs(l-_),s&&(i.position.top=p._convertpositionto("relative",{top:h,left:0}).top-p.margins.top),n&&(i.position.top=p._convertpositionto("relative",{top:c-p.helperproportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertpositionto("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertpositionto("relative",{top:0,left:l-p.helperproportions.width}).left-p.margins.left)),!p.snapelements[u].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uihash(),{snapitem:p.snapelements[u].item})),p.snapelements[u].snapping=s||n||a||o||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makearray(t(i.stack)).sort(function(e,i){return(parseint(t(e).css("zindex"),10)||0)-(parseint(t(i).css("zindex"),10)||0)});s.length&&(e=parseint(t(s[0]).css("zindex"),10)||0,t(s).each(function(i){t(this).css("zindex",e+i)}),this.css("zindex",e+s.length))}}),t.ui.plugin.add("draggable","zindex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zindex")&&(n._zindex=s.css("zindex")),s.css("zindex",n.zindex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zindex&&t(i.helper).css("zindex",s._zindex)}})})(jquery);(function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.4",widgeteventprefix:"drop",options:{accept:"*",activeclass:!1,addclasses:!0,greedy:!1,hoverclass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isfunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],undefined):e?e:e={width:this.element[0].offsetwidth,height:this.element[0].offsetheight}},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addclasses&&this.element.addclass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeclass("ui-droppable ui-droppable-disabled")},_setoption:function(e,i){"accept"===e&&(this.accept=t.isfunction(i)?i:function(t){return t.is(i)}),t.widget.prototype._setoption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeclass&&this.element.addclass(this.options.activeclass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeclass&&this.element.removeclass(this.options.activeclass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentitem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentitem||i.element)&&(this.options.hoverclass&&this.element.addclass(this.options.hoverclass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentitem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentitem||i.element)&&(this.options.hoverclass&&this.element.removeclass(this.options.hoverclass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.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 e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentitem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentitem||s.element)?(this.options.activeclass&&this.element.removeclass(this.options.activeclass),this.options.hoverclass&&this.element.removeclass(this.options.hoverclass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentitem||t.element,helper:t.helper,position:t.position,offset:t.positionabs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,a,o=(t.positionabs||t.position.absolute).left,r=(t.positionabs||t.position.absolute).top,l=o+t.helperproportions.width,h=r+t.helperproportions.height,c=i.offset.left,u=i.offset.top,d=c+i.proportions().width,p=u+i.proportions().height;switch(s){case"fit":return o>=c&&d>=l&&r>=u&&p>=h;case"intersect":return o+t.helperproportions.width/2>c&&d>l-t.helperproportions.width/2&&r+t.helperproportions.height/2>u&&p>h-t.helperproportions.height/2;case"pointer":return n=(t.positionabs||t.position.absolute).left+(t.clickoffset||t.offset.click).left,a=(t.positionabs||t.position.absolute).top+(t.clickoffset||t.offset.click).top,e(a,u,i.proportions().height)&&e(n,c,i.proportions().width);case"touch":return(r>=u&&p>=r||h>=u&&p>=h||u>r&&h>p)&&(o>=c&&d>=o||l>=c&&d>=l||c>o&&l>d);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareoffsets:function(e,i){var s,n,a=t.ui.ddmanager.droppables[e.options.scope]||[],o=i?i.type:null,r=(e.currentitem||e.element).find(":data(ui-droppable)").addback();t:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||e&&!a[s].accept.call(a[s].element[0],e.currentitem||e.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue t}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetwidth,height:a[s].element[0].offsetheight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentitem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragstart:function(e,i){e.element.parentsuntil("body").bind("scroll.droppable",function(){e.options.refreshpositions||t.ui.ddmanager.prepareoffsets(e,i)})},drag:function(e,i){e.options.refreshpositions&&t.ui.ddmanager.prepareoffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedychild&&this.visible){var s,n,a,o=t.ui.intersect(e,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),a.length&&(s=t.data(a[0],"ui-droppable"),s.greedychild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragstop:function(e,i){e.element.parentsuntil("body").unbind("scroll.droppable"),e.options.refreshpositions||t.ui.ddmanager.prepareoffsets(e,i)}}})(jquery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parsefloat(t),isnan(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.tolowercase(),f(l,function(t,a){var o,r=a.re.exec(i),l=r&&a.parse(r),h=a.space||"rgba";return l?(o=s[h](l),s[c[h].cache]=o[c[h].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundcolor borderbottomcolor borderleftcolor borderrightcolor bordertopcolor color columnrulecolor outlinecolor textdecorationcolor textemphasiscolor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseint(t[1],16),parseint(t[2],16),parseint(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseint(t[1]+t[1],16),parseint(t[2]+t[2],16),parseint(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.color=function(e,i,s,n){return new t.color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("")[0],f=t.each;p.style.csstext="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundcolor.indexof("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,o,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodetype)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,l],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inarray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),a=c[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],h=s[a],c=u[n.type]||{};null!==h&&(null===o?l[a]=h:(c.mod&&(h-o>c.mod/2?o+=c.mod:o-h>c.mod/2&&(o-=c.mod)),l[a]=i((h-o)*e+o,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},torgbastring:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},tohslastring:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},tohexstring:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).tostring(16),1===t.length?"0"+t:t}).join("")},tostring:function(){return 0===this._rgba[3]?"transparent":this.torgbastring()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=math.max(s,n,a),l=math.min(s,n,a),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-a)/h+360:n===r?60*(a-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[math.round(255*n(r,o,e+1/3)),math.round(255*n(r,o,e)),math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[o]&&(this[o]=l(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[o]=d,n):h(d)},f(a,function(e,i){h.fn[e]||(h.fn[e]=function(n){var a,o=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parsefloat(a[2])*("+"===a[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.csshooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=h(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundcolor"===i?e.parentnode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundcolor"),o=o.parentnode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.torgbastring()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorinit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorinit=!0),t.csshooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(o),t.csshooks.bordercolor={expand:function(t){var e={};return f(["top","right","bottom","left"],function(i,s){e["border"+s+"color"]=t}),e}},a=t.color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jquery),function(){function i(e){var i,s,n=e.ownerdocument.defaultview?e.ownerdocument.defaultview.getcomputedstyle(e,null):e.currentstyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelcase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isnan(parsefloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderbottom:1,bordercolor:1,borderleft:1,borderright:1,bordertop:1,borderwidth:1,margin:1,padding:1};t.each(["borderleftstyle","borderrightstyle","borderbottomstyle","bordertopstyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setattr||1===t.pos&&!t.setattr)&&(jquery.style(t.elem,i,t.end),t.setattr=!0)}}),t.fn.addback||(t.fn.addback=function(t){return this.add(null==t?this.prevobject:this.prevobject.filter(t))}),t.effects.animateclass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",h=l.children?o.find("*").addback():o;h=h.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"class"](e[i])})},a(),h=h.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),h=h.map(function(){var e=this,i=t.deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({addclass:function(e){return function(i,s,n,a){return s?t.effects.animateclass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addclass),removeclass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateclass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeclass),toggleclass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateclass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateclass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleclass),switchclass:function(e,i,s,n,a){return t.effects.animateclass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isplainobject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isfunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isfunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isfunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.4",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setmode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getbaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createwrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerwidth(!0),height:e.outerheight(!0),"float":e.css("float")},s=t("
").addclass("ui-effects-wrapper").css({fontsize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeelement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zindex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isnan(parseint(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removewrapper:function(e){var i=document.activeelement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replacewith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},settransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssunit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isfunction(a)&&a.call(n[0]),t.isfunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssunit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexof(e)>0&&(s=[parsefloat(i),e])}),s}})}(),function(){var e={};t.each(["quad","cubic","quart","quint","expo"],function(t,i){e[i]=function(e){return math.pow(e,t+2)}}),t.extend(e,{sine:function(t){return 1-math.cos(t*math.pi/2)},circ:function(t){return 1-math.sqrt(1-t*t)},elastic:function(t){return 0===t||1===t?t:-math.pow(2,8*(t-1))*math.sin((80*(t-1)-7.5)*math.pi/15)},back:function(t){return t*t*(3*t-2)},bounce:function(t){for(var e,i=4;((e=math.pow(2,--i))-1)/11>t;);return 1/math.pow(4,3-i)-7.5625*math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easein"+e]=i,t.easing["easeout"+e]=function(t){return 1-i(1-t)},t.easing["easeinout"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jquery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setmode(l,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),a=t.effects.createwrapper(l).css({overflow:"hidden"}),o=a[p](),r=parsefloat(a.css(f))||0,m[p]=v?o:0,g||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:o+r),v&&(a.css(p,0),g||a.css(f,r+o)),a.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removewrapper(l),n()}})}})(jquery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setmode(o,e.mode||"effect"),h="hide"===l,c="show"===l,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||h?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createwrapper(o),d||(d=o["top"===v?"outerheight":"outerwidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,g,m)),h&&(d/=math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m).animate(a,g,m),d=h?2*d:d/2;h&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removewrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jquery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setmode(o,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createwrapper(o).css({overflow:"hidden"}),n="img"===o[0].tagname?s:o,a=n[d](),h&&(n.css(d,0),n.css(p,a/2)),f[d]=h?a:0,f[p]=h?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||o.hide(),t.effects.restore(o,r),t.effects.removewrapper(o),i()}})}})(jquery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setmode(n,e.mode||"hide"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createwrapper(n),s=e.distance||n["top"===h?"outerheight":"outerwidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),u[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removewrapper(n),i()}})}})(jquery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var a,o,r,l,h,c,u=e.pieces?math.round(math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setmode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=math.ceil(p.outerwidth()/d),_=math.ceil(p.outerheight()/u),b=[];for(a=0;u>a;a++)for(l=m.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=m.left+o*v,h=o-(d-1)/2,p.clone().appendto("body").wrap("").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addclass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}})(jquery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setmode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jquery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setmode(a,e.mode||"hide"),l="show"===r,h="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizfirst,p=l!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(a,o),a.show(),s=t.effects.createwrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseint(u[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){h&&a.hide(),t.effects.restore(a,o),t.effects.removewrapper(a),i()})}})(jquery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundimage","backgroundcolor","opacity"],a=t.effects.setmode(s,e.mode||"show"),o={backgroundcolor:s.css("backgroundcolor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundimage:"none",backgroundcolor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jquery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setmode(n,e.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(e.times||5)+(l?1:0),c=e.duration/h,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;h>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()}})(jquery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setmode(s,e.mode||"hide"),a="hide"===n,o=parseint(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerheight:s.outerheight(),outerwidth:s.outerwidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerheight:l.outerheight*r,outerwidth:l.outerwidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setmode(s,e.mode||"effect"),o=parseint(e.percent,10)||(0===parseint(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerheight:s.outerheight(),outerwidth:s.outerwidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerheight:0,outerwidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerheight:h.outerheight*c.y,outerwidth:h.outerwidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontsize"],u=["bordertopwidth","borderbottomwidth","paddingtop","paddingbottom"],d=["borderleftwidth","borderrightwidth","paddingleft","paddingright"],p=t.effects.setmode(o,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerheight:0,outerwidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerheight:o.outerheight(),outerwidth:o.outerwidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===g||"both"===g)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.settransition(o,u,a.from.y,o.from),o.to=t.effects.settransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.settransition(o,d,a.from.x,o.from),o.to=t.effects.settransition(o,d,a.to.x,o.to))),("content"===g||"both"===g)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.settransition(o,c,a.from.y,o.from),o.to=t.effects.settransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createwrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getbaseline(m,s),o.from.top=(s.outerheight-o.outerheight())*n.y,o.from.left=(s.outerwidth-o.outerwidth())*n.x,o.to.top=(s.outerheight-o.to.outerheight)*n.y,o.to.left=(s.outerwidth-o.to.outerwidth)*n.x),o.css(o.from),("content"===g||"both"===g)&&(u=u.concat(["margintop","marginbottom"]).concat(c),d=d.concat(["marginleft","marginright"]),h=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerheight:i.outerheight(),outerwidth:i.outerwidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerheight:s.outerheight*a.from.y,outerwidth:s.outerwidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerheight:s.height*a.to.y,outerwidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.settransition(i,u,a.from.y,i.from),i.to=t.effects.settransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.settransition(i,d,a.from.x,i.from),i.to=t.effects.settransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseint(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removewrapper(o),i()}})}})(jquery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setmode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,u=math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createwrapper(n),f[d]=(p?"-=":"+=")+l,g[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,n.animate(f,u,e.easing),s=1;h>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removewrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jquery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setmode(n,e.mode||"show"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===h?"outerheight":"outerwidth"](!0),t.effects.createwrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isnan(s)?"-"+s:-s:s),u[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removewrapper(n),i()}})}})(jquery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrolltop():0,l=a?o.scrollleft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerheight(),width:n.innerwidth()},u=s.offset(),d=t("").appendto(document.body).addclass(e.classname).css({top:u.top-r,left:u.left-l,height:s.innerheight(),width:s.innerwidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jquery);(function(t){t.widget("ui.menu",{version:"1.10.4",defaultelement:"",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},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().addclass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleclass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabindex:0}).bind("click"+this.eventnamespace,t.proxy(function(t){this.options.disabled&&t.preventdefault()},this)),this.options.disabled&&this.element.addclass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventdefault()},"click .ui-state-disabled > a":function(t){t.preventdefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mousehandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.ispropagationstopped()||(this.mousehandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeelement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&cleartimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currenttarget);i.siblings().children(".ui-state-active").removeclass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseall","mouseleave .ui-menu":"collapseall",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeelement)||this.collapseall(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseall(e),this.mousehandled=!1}})},_destroy:function(){this.element.removeattr("aria-activedescendant").find(".ui-menu").addback().removeclass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeattr("role").removeattr("tabindex").removeattr("aria-labelledby").removeattr("aria-expanded").removeattr("aria-hidden").removeattr("aria-disabled").removeuniqueid().show(),this.element.find(".ui-menu-item").removeclass("ui-menu-item").removeattr("role").removeattr("aria-disabled").children("a").removeuniqueid().removeclass("ui-corner-all ui-state-hover").removeattr("tabindex").removeattr("role").removeattr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeclass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!0;switch(e.keycode){case t.ui.keycode.page_up:this.previouspage(e);break;case t.ui.keycode.page_down:this.nextpage(e);break;case t.ui.keycode.home:this._move("first","first",e);break;case t.ui.keycode.end:this._move("last","last",e);break;case t.ui.keycode.up:this.previous(e);break;case t.ui.keycode.down:this.next(e);break;case t.ui.keycode.left:this.collapse(e);break;case t.ui.keycode.right:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keycode.enter:case t.ui.keycode.space:this._activate(e);break;case t.ui.keycode.escape:this.collapse(e);break;default:l=!1,n=this.previousfilter||"",a=string.fromcharcode(e.keycode),o=!1,cleartimeout(this.filtertimer),a===n?o=!0:a=n+a,r=regexp("^"+i(a),"i"),s=this.activemenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextall(".ui-menu-item"):s,s.length||(a=string.fromcharcode(e.keycode),r=regexp("^"+i(a),"i"),s=this.activemenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousfilter=a,this.filtertimer=this._delay(function(){delete this.previousfilter},1e3)):delete this.previousfilter):delete this.previousfilter}l&&e.preventdefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleclass("ui-menu-icons",!!this.element.find(".ui-icon").length),s.filter(":not(.ui-menu)").addclass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("").addclass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addclass("ui-menu-item").attr("role","presentation").children("a").uniqueid().addclass("ui-corner-all").attr({tabindex:-1,role:this._itemrole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addclass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemrole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setoption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeclass(this.options.icons.submenu).addclass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollintoview(e),this.active=e.first(),s=this.active.children("a").addclass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addclass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startopening(i),this.activemenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollintoview:function(e){var i,s,n,a,o,r;this._hasscroll()&&(i=parsefloat(t.css(this.activemenu[0],"bordertopwidth"))||0,s=parsefloat(t.css(this.activemenu[0],"paddingtop"))||0,n=e.offset().top-this.activemenu.offset().top-i-s,a=this.activemenu.scrolltop(),o=this.activemenu.height(),r=e.height(),0>n?this.activemenu.scrolltop(a+n):n+r>o&&this.activemenu.scrolltop(a+n-o+r))},blur:function(t,e){e||cleartimeout(this.timer),this.active&&(this.active.children("a").removeclass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startopening:function(t){cleartimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);cleartimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeattr("aria-hidden").attr("aria-expanded","true").position(i)},collapseall:function(e,i){cleartimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),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").end().find("a.ui-state-active").removeclass("ui-state-active")},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 ").children(".ui-menu-item").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,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevall":"nextall"](".ui-menu-item").eq(-1):this.active[t+"all"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activemenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextpage:function(e){var i,s,n;return this.active?(this.islastitem()||(this._hasscroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextall(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activemenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previouspage:function(e){var i,s,n;return this.active?(this.isfirstitem()||(this._hasscroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevall(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activemenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasscroll:function(){return this.element.outerheight()
").appendto(this.element),this._refreshvalue()},_destroy:function(){this.element.removeclass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeattr("role").removeattr("aria-valuemin").removeattr("aria-valuemax").removeattr("aria-valuenow"),this.valuediv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedvalue(t),this._refreshvalue(),e)},_constrainedvalue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:math.min(this.options.max,math.max(this.min,t))},_setoptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedvalue(e),this._refreshvalue()},_setoption:function(t,e){"max"===t&&(e=math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshvalue:function(){var e=this.options.value,i=this._percentage();this.valuediv.toggle(this.indeterminate||e>this.min).toggleclass("ui-corner-right",e===this.options.max).width(i.tofixed(0)+"%"),this.element.toggleclass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeattr("aria-valuenow"),this.overlaydiv||(this.overlaydiv=t("
").appendto(this.valuediv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlaydiv&&(this.overlaydiv.remove(),this.overlaydiv=null)),this.oldvalue!==e&&(this.oldvalue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jquery);(function(t){function e(t){return parseint(t,10)||0}function i(t){return!isnan(parseint(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.4",widgeteventprefix:"resize",options:{alsoresize:!1,animate:!1,animateduration:"slow",animateeasing:"swing",aspectratio:!1,autohide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxheight:null,maxwidth:null,minheight:10,minwidth:10,zindex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,a,o=this,r=this.options;if(this.element.addclass("ui-resizable"),t.extend(this,{_aspectratio:!!r.aspectratio,aspectratio:r.aspectratio,originalelement:this.element,_proportionallyresizeelements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodename.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("
").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.data("ui-resizable")),this.elementiswrapper=!0,this.element.css({marginleft:this.originalelement.css("marginleft"),margintop:this.originalelement.css("margintop"),marginright:this.originalelement.css("marginright"),marginbottom:this.originalelement.css("marginbottom")}),this.originalelement.css({marginleft:0,margintop:0,marginright:0,marginbottom:0}),this.originalresizestyle=this.originalelement.css("resize"),this.originalelement.css("resize","none"),this._proportionallyresizeelements.push(this.originalelement.css({position:"static",zoom:1,display:"block"})),this.originalelement.css({margin:this.originalelement.css("margin")}),this._proportionallyresize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===string)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),a="ui-resizable-"+s,n=t("
"),n.css({zindex:r.zindex}),"se"===s&&n.addclass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderaxis=function(e){var i,s,n,a;e=e||this.element;for(i in this.handles)this.handles[i].constructor===string&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementiswrapper&&this.originalelement[0].nodename.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerheight():s.outerwidth(),n=["padding",/ne|nw|n/.test(i)?"top":/se|sw|s/.test(i)?"bottom":/^e$/.test(i)?"right":"left"].join(""),e.css(n,a),this._proportionallyresize()),t(this.handles[i]).length},this._renderaxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableselection(),this._handles.mouseover(function(){o.resizing||(this.classname&&(n=this.classname.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autohide&&(this._handles.hide(),t(this.element).addclass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeclass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(t(this).addclass("ui-resizable-autohide"),o._handles.hide())})),this._mouseinit()},_destroy:function(){this._mousedestroy();var e,i=function(e){t(e).removeclass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removedata("resizable").removedata("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementiswrapper&&(i(this.element),e=this.element,this.originalelement.css({position:e.css("position"),width:e.outerwidth(),height:e.outerheight(),top:e.css("top"),left:e.css("left")}).insertafter(e),e.remove()),this.originalelement.css("resize",this.originalresizestyle),i(this.originalelement),this},_mousecapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mousestart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderproxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),o.containment&&(s+=t(o.containment).scrollleft()||0,n+=t(o.containment).scrolltop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalsize=this._helper?{width:h.outerwidth(),height:h.outerheight()}:{width:h.width(),height:h.height()},this.originalposition={left:s,top:n},this.sizediff={width:h.outerwidth()-h.width(),height:h.outerheight()-h.height()},this.originalmouseposition={left:i.pagex,top:i.pagey},this.aspectratio="number"==typeof o.aspectratio?o.aspectratio:this.originalsize.width/this.originalsize.height||1,a=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addclass("ui-resizable-resizing"),this._propagate("start",i),!0},_mousedrag:function(e){var i,s=this.helper,n={},a=this.originalmouseposition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pagex-a.left||0,d=e.pagey-a.top||0,p=this._change[o];return p?(i=p.apply(this,[e,u,d]),this._updatevirtualboundaries(e.shiftkey),(this._aspectratio||e.shiftkey)&&(i=this._updateratio(i,e)),i=this._respectsize(i,e),this._updatecache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyresizeelements.length&&this._proportionallyresize(),t.isemptyobject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mousestop:function(e){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyresizeelements,s=i.length&&/textarea/i.test(i[0].nodename),n=s&&t.ui.hasscroll(i[0],"left")?0:c.sizediff.height,a=s?0:c.sizediff.width,o={width:c.helper.width()-a,height:c.helper.height()-n},r=parseint(c.element.css("left"),10)+(c.position.left-c.originalposition.left)||null,h=parseint(c.element.css("top"),10)+(c.position.top-c.originalposition.top)||null,l.animate||this.element.css(t.extend(o,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyresize()),t("body").css("cursor","auto"),this.element.removeclass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatevirtualboundaries:function(t){var e,s,n,a,o,r=this.options;o={minwidth:i(r.minwidth)?r.minwidth:0,maxwidth:i(r.maxwidth)?r.maxwidth:1/0,minheight:i(r.minheight)?r.minheight:0,maxheight:i(r.maxheight)?r.maxheight:1/0},(this._aspectratio||t)&&(e=o.minheight*this.aspectratio,n=o.minwidth/this.aspectratio,s=o.maxheight*this.aspectratio,a=o.maxwidth/this.aspectratio,e>o.minwidth&&(o.minwidth=e),n>o.minheight&&(o.minheight=n),o.maxwidth>s&&(o.maxwidth=s),o.maxheight>a&&(o.maxheight=a)),this._vboundaries=o},_updatecache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateratio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectratio:i(t.width)&&(t.height=t.width/this.aspectratio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(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=i(t.width)&&e.maxwidth&&e.maxwidth
t.width,r=i(t.height)&&e.minheight&&e.minheight>t.height,h=this.originalposition.left+this.originalsize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return o&&(t.width=e.minwidth),r&&(t.height=e.minheight),n&&(t.width=e.maxwidth),a&&(t.height=e.maxheight),o&&c&&(t.left=h-e.minwidth),n&&c&&(t.left=h-e.maxwidth),r&&u&&(t.top=l-e.minheight),a&&u&&(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},_proportionallyresize:function(){if(this._proportionallyresizeelements.length){var t,e,i,s,n,a=this.helper||this.element;for(t=0;this._proportionallyresizeelements.length>t;t++){if(n=this._proportionallyresizeelements[t],!this.borderdif)for(this.borderdif=[],i=[n.css("bordertopwidth"),n.css("borderrightwidth"),n.css("borderbottomwidth"),n.css("borderleftwidth")],s=[n.css("paddingtop"),n.css("paddingright"),n.css("paddingbottom"),n.css("paddingleft")],e=0;i.length>e;e++)this.borderdif[e]=(parseint(i[e],10)||0)+(parseint(s[e],10)||0);n.css({height:a.height()-this.borderdif[0]-this.borderdif[2]||0,width:a.width()-this.borderdif[1]-this.borderdif[3]||0})}}},_renderproxy:function(){var e=this.element,i=this.options;this.elementoffset=e.offset(),this._helper?(this.helper=this.helper||t(""),this.helper.addclass(this._helper).css({width:this.element.outerwidth()-1,height:this.element.outerheight()-1,position:"absolute",left:this.elementoffset.left+"px",top:this.elementoffset.top+"px",zindex:++i.zindex}),this.helper.appendto("body").disableselection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalsize.width+e}},w:function(t,e){var i=this.originalsize,s=this.originalposition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalsize,n=this.originalposition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalsize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalelement:this.originalelement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalsize:this.originalsize,originalposition:this.originalposition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyresizeelements,a=n.length&&/textarea/i.test(n[0].nodename),o=a&&t.ui.hasscroll(n[0],"left")?0:i.sizediff.height,r=a?0:i.sizediff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseint(i.element.css("left"),10)+(i.position.left-i.originalposition.left)||null,c=parseint(i.element.css("top"),10)+(i.position.top-i.originalposition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateduration,easing:s.animateeasing,step:function(){var s={width:parseint(i.element.css("width"),10),height:parseint(i.element.css("height"),10),top:parseint(i.element.css("top"),10),left:parseint(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updatecache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerelement=t(p),/document/.test(d)||d===document?(l.containeroffset={left:0,top:0},l.containerposition={left:0,top:0},l.parentdata={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentnode.scrollheight}):(i=t(p),s=[],t(["top","right","left","bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containeroffset=i.offset(),l.containerposition=i.position(),l.containersize={height:i.innerheight()-s[3],width:i.innerwidth()-s[1]},n=l.containeroffset,a=l.containersize.height,o=l.containersize.width,r=t.ui.hasscroll(p,"left")?p.scrollwidth:o,h=t.ui.hasscroll(p)?p.scrollheight:a,l.parentdata={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,a,o=t(this).data("ui-resizable"),r=o.options,h=o.containeroffset,l=o.position,c=o._aspectratio||e.shiftkey,u={top:0,left:0},d=o.containerelement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-u.left),c&&(o.size.height=o.size.width/o.aspectratio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),c&&(o.size.width=o.size.height*o.aspectratio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentdata.left+o.position.left,o.offset.top=o.parentdata.top+o.position.top,i=math.abs((o._helper?o.offset.left-u.left:o.offset.left-u.left)+o.sizediff.width),s=math.abs((o._helper?o.offset.top-u.top:o.offset.top-h.top)+o.sizediff.height),n=o.containerelement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerelement.css("position")),n&&a&&(i-=math.abs(o.parentdata.left)),i+o.size.width>=o.parentdata.width&&(o.size.width=o.parentdata.width-i,c&&(o.size.height=o.size.width/o.aspectratio)),s+o.size.height>=o.parentdata.height&&(o.size.height=o.parentdata.height-s,c&&(o.size.width=o.size.height*o.aspectratio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containeroffset,n=e.containerposition,a=e.containerelement,o=t(e.helper),r=o.offset(),h=o.outerwidth()-e.sizediff.width,l=o.outerheight()-e.sizediff.height;e._helper&&!i.animate&&/relative/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoresize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseint(e.width(),10),height:parseint(e.height(),10),left:parseint(e.css("left"),10),top:parseint(e.css("top"),10)})})};"object"!=typeof i.alsoresize||i.alsoresize.parentnode?s(i.alsoresize):i.alsoresize.length?(i.alsoresize=i.alsoresize[0],s(i.alsoresize)):t.each(i.alsoresize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,a=s.originalsize,o=s.originalposition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:e.parents(i.originalelement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(a[e]=i||null)}),e.css(a)})};"object"!=typeof n.alsoresize||n.alsoresize.nodetype?h(n.alsoresize):t.each(n.alsoresize,function(t,e){h(t,e)})},stop:function(){t(this).removedata("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalelement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addclass("ui-resizable-ghost").addclass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendto(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removechild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalsize,a=e.originalposition,o=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=math.round((s.width-n.width)/h)*h,u=math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxwidth&&d>i.maxwidth,g=i.maxheight&&p>i.maxheight,m=i.minwidth&&i.minwidth>d,v=i.minheight&&i.minheight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(o)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.top=a.top-u):/^(sw)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.left=a.left-c):(p-l>0?(e.size.height=p,e.position.top=a.top-u):(e.size.height=l,e.position.top=a.top+n.height-l),d-h>0?(e.size.width=d,e.position.left=a.left-c):(e.size.width=h,e.position.left=a.left+n.width-h))}})})(jquery);(function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.4",options:{appendto:"body",autorefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addclass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addclass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerwidth(),bottom:i.top+e.outerheight(),startselected:!1,selected:e.hasclass("ui-selected"),selecting:e.hasclass("ui-selecting"),unselecting:e.hasclass("ui-unselecting")})})},this.refresh(),this.selectees=e.addclass("ui-selectee"),this._mouseinit(),this.helper=t("")},_destroy:function(){this.selectees.removeclass("ui-selectee").removedata("selectable-item"),this.element.removeclass("ui-selectable ui-selectable-disabled"),this._mousedestroy()},_mousestart:function(e){var i=this,s=this.options;this.opos=[e.pagex,e.pagey],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendto).append(this.helper),this.helper.css({left:e.pagex,top:e.pagey,width:0,height:0}),s.autorefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metakey||e.ctrlkey||(s.$element.removeclass("ui-selected"),s.selected=!1,s.$element.addclass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addback().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metakey&&!e.ctrlkey||!n.$element.hasclass("ui-selected"),n.$element.removeclass(s?"ui-unselecting":"ui-selected").addclass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mousedrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=e.pagex,l=e.pagey;return a>r&&(i=r,r=a,a=i),o>l&&(i=l,l=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:l-o}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?h=!(i.left>r||a>i.right||i.top>l||o>i.bottom):"fit"===n.tolerance&&(h=i.left>a&&r>i.right&&i.top>o&&l>i.bottom),h?(i.selected&&(i.$element.removeclass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeclass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addclass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metakey||e.ctrlkey)&&i.startselected?(i.$element.removeclass("ui-selecting"),i.selecting=!1,i.$element.addclass("ui-selected"),i.selected=!0):(i.$element.removeclass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addclass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metakey||e.ctrlkey||i.startselected||(i.$element.removeclass("ui-selected"),i.selected=!1,i.$element.addclass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mousestop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeclass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeclass("ui-selecting").addclass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})})(jquery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgeteventprefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keysliding=!1,this._mousesliding=!1,this._animateoff=!0,this._handleindex=null,this._detectorientation(),this._mouseinit(),this.element.addclass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setoption("disabled",this.options.disabled),this._animateoff=!1},_refresh:function(){this._createrange(),this._createhandles(),this._setupevents(),this._refreshvalue()},_createhandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addclass("ui-state-default ui-corner-all"),a="",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendto(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createrange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isarray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valuemin(),this._valuemin()]),this.range&&this.range.length?this.range.removeclass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("").appendto(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addclass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupevents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleevents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeclass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mousedestroy()},_mousecapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementsize={width:this.element.outerwidth(),height:this.element.outerheight()},this.elementoffset=this.element.offset(),i={x:e.pagex,y:e.pagey},s=this._normvaluefrommouse(i),n=this._valuemax()-this._valuemin()+1,this.handles.each(function(e){var i=math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastchangedvalue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mousesliding=!0,this._handleindex=o,a.addclass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().addback().is(".ui-slider-handle"),this._clickoffset=h?{left:0,top:0}:{left:e.pagex-l.left-a.width()/2,top:e.pagey-l.top-a.height()/2-(parseint(a.css("bordertopwidth"),10)||0)-(parseint(a.css("borderbottomwidth"),10)||0)+(parseint(a.css("margintop"),10)||0)},this.handles.hasclass("ui-state-hover")||this._slide(e,o,s),this._animateoff=!0,!0))},_mousestart:function(){return!0},_mousedrag:function(t){var e={x:t.pagex,y:t.pagey},i=this._normvaluefrommouse(e);return this._slide(t,this._handleindex,i),!1},_mousestop:function(t){return this.handles.removeclass("ui-state-active"),this._mousesliding=!1,this._stop(t,this._handleindex),this._change(t,this._handleindex),this._handleindex=null,this._clickoffset=null,this._animateoff=!1,!1},_detectorientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normvaluefrommouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementsize.width,i=t.x-this.elementoffset.left-(this._clickoffset?this._clickoffset.left:0)):(e=this.elementsize.height,i=t.y-this.elementoffset.top-(this._clickoffset?this._clickoffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valuemax()-this._valuemin(),a=this._valuemin()+s*n,this._trimalignvalue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keysliding&&!this._mousesliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastchangedvalue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimalignvalue(t),this._refreshvalue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimalignvalue(i),this._refreshvalue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isarray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimalignvalue(n[a]),this._change(null,a);this._refreshvalue()},_setoption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isarray(this.options.values)&&(n=this.options.values.length),t.widget.prototype._setoption.apply(this,arguments),e){case"orientation":this._detectorientation(),this.element.removeclass("ui-slider-horizontal ui-slider-vertical").addclass("ui-slider-"+this.orientation),this._refreshvalue();break;case"value":this._animateoff=!0,this._refreshvalue(),this._change(null,0),this._animateoff=!1;break;case"values":for(this._animateoff=!0,this._refreshvalue(),s=0;n>s;s+=1)this._change(null,s);this._animateoff=!1;break;case"min":case"max":this._animateoff=!0,this._refreshvalue(),this._animateoff=!1;break;case"range":this._animateoff=!0,this._refresh(),this._animateoff=!1}},_value:function(){var t=this.options.value;return t=this._trimalignvalue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimalignvalue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimalignvalue(i[s]);return i}return[]},_trimalignvalue:function(t){if(this._valuemin()>=t)return this._valuemin();if(t>=this._valuemax())return this._valuemax();var e=this.options.step>0?this.options.step:1,i=(t-this._valuemin())%e,s=t-i;return 2*math.abs(i)>=e&&(s+=i>0?e:-e),parsefloat(s.tofixed(5))},_valuemin:function(){return this.options.min},_valuemax:function(){return this.options.max},_refreshvalue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateoff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valuemin())/(l._valuemax()-l._valuemin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valuemin(),a=this._valuemax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleevents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keycode){case t.ui.keycode.home:case t.ui.keycode.end:case t.ui.keycode.page_up:case t.ui.keycode.page_down:case t.ui.keycode.up:case t.ui.keycode.right:case t.ui.keycode.down:case t.ui.keycode.left:if(i.preventdefault(),!this._keysliding&&(this._keysliding=!0,t(i.target).addclass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keycode){case t.ui.keycode.home:a=this._valuemin();break;case t.ui.keycode.end:a=this._valuemax();break;case t.ui.keycode.page_up:a=this._trimalignvalue(n+(this._valuemax()-this._valuemin())/e);break;case t.ui.keycode.page_down:a=this._trimalignvalue(n-(this._valuemax()-this._valuemin())/e);break;case t.ui.keycode.up:case t.ui.keycode.right:if(n===this._valuemax())return;a=this._trimalignvalue(n+o);break;case t.ui.keycode.down:case t.ui.keycode.left:if(n===this._valuemin())return;a=this._trimalignvalue(n-o)}this._slide(i,r,a)},click:function(t){t.preventdefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keysliding&&(this._keysliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeclass("ui-state-active"))}}})})(jquery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.4",widgeteventprefix:"sort",ready:!1,options:{appendto:"parent",axis:!1,connectwith:!1,containment:!1,cursor:"auto",cursorat:!1,droponempty:!0,forceplaceholdersize:!1,forcehelpersize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollsensitivity:20,scrollspeed:20,scope:"default",tolerance:"intersect",zindex:1e3,activate:null,beforestop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containercache={},this.element.addclass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseinit(),this.ready=!0},_destroy:function(){this.element.removeclass("ui-sortable ui-sortable-disabled"),this._mousedestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removedata(this.widgetname+"-item");return this},_setoption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleclass("ui-sortable-disabled",!!i)):t.widget.prototype._setoption.apply(this,arguments)},_mousecapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshitems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetname+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetname+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addback().each(function(){this===e.target&&(n=!0)}),n)?(this.currentitem=s,this._removecurrentsfromitems(),!0):!1:!1)},_mousestart:function(e,i,s){var n,o,a=this.options;if(this.currentcontainer=this,this.refreshpositions(),this.helper=this._createhelper(e),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},t.extend(this.offset,{click:{left:e.pagex-this.offset.left,top:e.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(e),this.originalpagex=e.pagex,this.originalpagey=e.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&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedcursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedstylesheet=t("").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]!==document&&"html"!==this.scrollparent[0].tagname&&(this.overflowoffset=this.scrollparent.offset()),this._trigger("start",e,this._uihash()),this._preservehelperproportions||this._cachehelperproportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uihash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropbehaviour&&t.ui.ddmanager.prepareoffsets(this,e),this.dragging=!0,this.helper.addclass("ui-sortable-helper"),this._mousedrag(e),!0},_mousedrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generateposition(e),this.positionabs=this._convertpositionto("absolute"),this.lastpositionabs||(this.lastpositionabs=this.positionabs),this.options.scroll&&(this.scrollparent[0]!==document&&"html"!==this.scrollparent[0].tagname?(this.overflowoffset.top+this.scrollparent[0].offsetheight-e.pagey=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectswithpointer(s),o&&s.instance===this.currentcontainer&&n!==this.currentitem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectswithsides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uihash());break}return this._contactcontainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uihash()),this.lastpositionabs=this.positionabs,!1},_mousestop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropbehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetparent[0]===document.body?0:this.offsetparent[0].scrollleft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetparent[0]===document.body?0:this.offsetparent[0].scrolltop)),this.reverting=!0,t(this.helper).animate(a,parseint(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseup({target:null}),"original"===this.options.helper?this.currentitem.css(this._storedcss).removeclass("ui-sortable-helper"):this.currentitem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uihash(this)),this.containers[e].containercache.over&&(this.containers[e]._trigger("out",null,this._uihash(this)),this.containers[e].containercache.over=0)}return this.placeholder&&(this.placeholder[0].parentnode&&this.placeholder[0].parentnode.removechild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentnode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_nofinalsort:null}),this.domposition.prev?t(this.domposition.prev).after(this.currentitem):t(this.domposition.parent).prepend(this.currentitem)),this},serialize:function(e){var i=this._getitemsasjquery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toarray:function(e){var i=this._getitemsasjquery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectswith:function(t){var e=this.positionabs.left,i=e+this.helperproportions.width,s=this.positionabs.top,n=s+this.helperproportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcepointerforcontainers||"pointer"!==this.options.tolerance&&this.helperproportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperproportions.width/2>o&&a>i-this.helperproportions.width/2&&s+this.helperproportions.height/2>r&&h>n-this.helperproportions.height/2},_intersectswithpointer:function(t){var i="x"===this.options.axis||e(this.positionabs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionabs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getdragverticaldirection(),a=this._getdraghorizontaldirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectswithsides:function(t){var i=e(this.positionabs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionabs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getdragverticaldirection(),o=this._getdraghorizontaldirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getdragverticaldirection:function(){var t=this.positionabs.top-this.lastpositionabs.top;return 0!==t&&(t>0?"down":"up")},_getdraghorizontaldirection:function(){var t=this.positionabs.left-this.lastpositionabs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshitems(t),this.refreshpositions(),this},_connectwith:function(){var t=this.options;return t.connectwith.constructor===string?[t.connectwith]:t.connectwith},_getitemsasjquery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectwith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetfullname),a&&a!==this&&!a.options.disabled&&h.push([t.isfunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isfunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentitem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removecurrentsfromitems:function(){var e=this.currentitem.find(":data("+this.widgetname+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshitems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isfunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentitem}):t(this.options.items,this.element),this]],d=this._connectwith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetfullname),o&&o!==this&&!o.options.disabled&&(u.push([t.isfunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentitem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetname+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshpositions:function(e){this.offsetparent&&this.helper&&(this.offset.parent=this._getparentoffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentcontainer&&this.currentcontainer&&s.item[0]!==this.currentitem[0]||(n=this.options.toleranceelement?t(this.options.toleranceelement,s.item):s.item,e||(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(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containercache.left=o.left,this.containers[i].containercache.top=o.top,this.containers[i].containercache.width=this.containers[i].element.outerwidth(),this.containers[i].containercache.height=this.containers[i].element.outerheight();return this},_createplaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==string||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentitem[0].nodename.tolowercase(),n=t("<"+s+">",e.document[0]).addclass(i||e.currentitem[0].classname+" ui-sortable-placeholder").removeclass("ui-sortable-helper");return"tr"===s?e.currentitem.children().each(function(){t(" | ",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendto(n)}):"img"===s&&n.attr("src",e.currentitem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forceplaceholdersize)&&(n.height()||n.height(e.currentitem.innerheight()-parseint(e.currentitem.css("paddingtop")||0,10)-parseint(e.currentitem.css("paddingbottom")||0,10)),n.width()||n.width(e.currentitem.innerwidth()-parseint(e.currentitem.css("paddingleft")||0,10)-parseint(e.currentitem.css("paddingright")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentitem)),e.currentitem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactcontainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentitem[0],this.containers[n].element[0]))if(this._intersectswith(this.containers[n].containercache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containercache.over&&(this.containers[n]._trigger("out",s,this._uihash(this)),this.containers[n].containercache.over=0);if(f)if(1===this.containers.length)this.containers[g].containercache.over||(this.containers[g]._trigger("over",s,this._uihash(this)),this.containers[g].containercache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentitem),h=p?"left":"top",l=p?"width":"height",c=this.positionabs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentitem[0]&&(!p||e(this.positionabs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,math.abs(u-c)>math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>math.abs(u-c)&&(a=math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.droponempty)return;if(this.currentcontainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uihash()),this.containers[g]._trigger("change",s,this._uihash(this)),this.currentcontainer=this.containers[g],this.options.placeholder.update(this.currentcontainer,this.placeholder),this.containers[g]._trigger("over",s,this._uihash(this)),this.containers[g].containercache.over=1}},_createhelper:function(e){var i=this.options,s=t.isfunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentitem])):"clone"===i.helper?this.currentitem.clone():this.currentitem;return s.parents("body").length||t("parent"!==i.appendto?i.appendto:this.currentitem[0].parentnode)[0].appendchild(s[0]),s[0]===this.currentitem[0]&&(this._storedcss={width:this.currentitem[0].style.width,height:this.currentitem[0].style.height,position:this.currentitem.css("position"),top:this.currentitem.css("top"),left:this.currentitem.css("left")}),(!s[0].style.width||i.forcehelpersize)&&s.width(this.currentitem.width()),(!s[0].style.height||i.forcehelpersize)&&s.height(this.currentitem.height()),s},_adjustoffsetfromhelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isarray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperproportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperproportions.height-e.bottom+this.margins.top)},_getparentoffset:function(){this.offsetparent=this.helper.offsetparent();var e=this.offsetparent.offset();return"absolute"===this.cssposition&&this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])&&(e.left+=this.scrollparent.scrollleft(),e.top+=this.scrollparent.scrolltop()),(this.offsetparent[0]===document.body||this.offsetparent[0].tagname&&"html"===this.offsetparent[0].tagname.tolowercase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseint(this.offsetparent.css("bordertopwidth"),10)||0),left:e.left+(parseint(this.offsetparent.css("borderleftwidth"),10)||0)}},_getrelativeoffset:function(){if("relative"===this.cssposition){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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentnode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperproportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentnode.scrollheight)-this.helperproportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseint(t(e).css("borderleftwidth"),10)||0)+(parseint(t(e).css("paddingleft"),10)||0)-this.margins.left,i.top+(parseint(t(e).css("bordertopwidth"),10)||0)+(parseint(t(e).css("paddingtop"),10)||0)-this.margins.top,i.left+(s?math.max(e.scrollwidth,e.offsetwidth):e.offsetwidth)-(parseint(t(e).css("borderleftwidth"),10)||0)-(parseint(t(e).css("paddingright"),10)||0)-this.helperproportions.width-this.margins.left,i.top+(s?math.max(e.scrollheight,e.offsetheight):e.offsetheight)-(parseint(t(e).css("bordertopwidth"),10)||0)-(parseint(t(e).css("paddingbottom"),10)||0)-this.helperproportions.height-this.margins.top])},_convertpositionto:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssposition||this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])?this.scrollparent:this.offsetparent,o=/(html|body)/i.test(n[0].tagname);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssposition?-this.scrollparent.scrolltop():o?0:n.scrolltop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssposition?-this.scrollparent.scrollleft():o?0:n.scrollleft())*s}},_generateposition:function(e){var i,s,n=this.options,o=e.pagex,a=e.pagey,r="absolute"!==this.cssposition||this.scrollparent[0]!==document&&t.contains(this.scrollparent[0],this.offsetparent[0])?this.scrollparent:this.offsetparent,h=/(html|body)/i.test(r[0].tagname);return"relative"!==this.cssposition||this.scrollparent[0]!==document&&this.scrollparent[0]!==this.offsetparent[0]||(this.offset.relative=this._getrelativeoffset()),this.originalposition&&(this.containment&&(e.pagex-this.offset.click.leftthis.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pagey-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalpagey+math.round((a-this.originalpagey)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalpagex+math.round((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+("fixed"===this.cssposition?-this.scrollparent.scrolltop():h?0:r.scrolltop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssposition?-this.scrollparent.scrollleft():h?0:r.scrollleft())}},_rearrange:function(t,e,i,s){i?i[0].appendchild(this.placeholder[0]):e.item[0].parentnode.insertbefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextsibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshpositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uihash(e))}}this.reverting=!1;var s,n=[];if(!this._nofinalsort&&this.currentitem.parent().length&&this.placeholder.before(this.currentitem),this._nofinalsort=null,this.helper[0]===this.currentitem[0]){for(s in this._storedcss)("auto"===this._storedcss[s]||"static"===this._storedcss[s])&&(this._storedcss[s]="");this.currentitem.css(this._storedcss).removeclass("ui-sortable-helper")}else this.currentitem.show();for(this.fromoutside&&!e&&n.push(function(t){this._trigger("receive",t,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||n.push(function(t){this._trigger("update",t,this._uihash())}),this!==this.currentcontainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uihash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uihash(this))}}.call(this,this.currentcontainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uihash(this))}}.call(this,this.currentcontainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containercache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containercache.over=0);if(this.storedcursor&&(this.document.find("body").css("cursor",this.storedcursor),this.storedstylesheet.remove()),this._storedopacity&&this.helper.css("opacity",this._storedopacity),this._storedzindex&&this.helper.css("zindex","auto"===this._storedzindex?"":this._storedzindex),this.dragging=!1,this.cancelhelperremoval){if(!e){for(this._trigger("beforestop",t,this._uihash()),s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uihash())}return this.fromoutside=!1,!1}if(e||this._trigger("beforestop",t,this._uihash()),this.placeholder[0].parentnode.removechild(this.placeholder[0]),this.helper[0]!==this.currentitem[0]&&this.helper.remove(),this.helper=null,!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uihash())}return this.fromoutside=!1,!0},_trigger:function(){t.widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uihash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalposition:i.originalposition,offset:i.positionabs,item:i.currentitem,sender:e?e.element:null}}})})(jquery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.4",defaultelement:"",widgeteventprefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberformat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setoption("max",this.options.max),this._setoption("min",this.options.min),this._setoption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeattr("autocomplete")}})},_getcreateoptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventdefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelblur?(delete this.cancelblur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),cleartimeout(this.mousewheeltimer),this.mousewheeltimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventdefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeelement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeelement?this.previous:this.element.val(),e.preventdefault(),i.call(this),this.cancelblur=!0,this._delay(function(){delete this.cancelblur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currenttarget).hasclass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currenttarget).hasclass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currenttarget).hasclass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uispinner=this.element.addclass("ui-spinner-input").attr("autocomplete","off").wrap(this._uispinnerhtml()).parent().append(this._buttonhtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabindex",-1).button().removeclass("ui-corner-all"),this.buttons.height()>math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keycode;switch(e.keycode){case s.up:return this._repeat(null,1,e),!0;case s.down:return this._repeat(null,-1,e),!0;case s.page_up:return this._repeat(null,i.page,e),!0;case s.page_down:return this._repeat(null,-i.page,e),!0}return!1},_uispinnerhtml:function(){return""},_buttonhtml:function(){return"▲"+""+""+"▼"+""},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,cleartimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustvalue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isfunction(i)?i(e):math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionof(this.options.step);return null!==this.options.min&&(t=math.max(t,this._precisionof(this.options.min))),t},_precisionof:function(t){var e=""+t,i=e.indexof(".");return-1===i?0:e.length-i-1},_adjustvalue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=math.round(i/s.step)*s.step,t=e+i,t=parsefloat(t.tofixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(cleartimeout(this.timer),cleartimeout(this.mousewheeltimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setoption:function(t,e){if("culture"===t||"numberformat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeclass(this.options.icons.up).addclass(e.up),this.buttons.last().find(".ui-icon").removeclass(this.options.icons.down).addclass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setoptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.globalize&&this.options.numberformat?globalize.parsefloat(t,10,this.options.culture):+t),""===t||isnan(t)?null:t},_format:function(t){return""===t?"":window.globalize&&this.options.numberformat?globalize.format(t,this.options.numberformat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustvalue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeclass("ui-spinner-input").prop("disabled",!1).removeattr("autocomplete").removeattr("role").removeattr("aria-valuemin").removeattr("aria-valuemax").removeattr("aria-valuenow"),this.uispinner.replacewith(this.element)},stepup:e(function(t){this._stepup(t)}),_stepup:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepdown:e(function(t){this._stepdown(t)}),_stepdown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageup:e(function(t){this._stepup((t||1)*this.options.page)}),pagedown:e(function(t){this._stepdown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uispinner}})})(jquery);(function(t,e){function i(){return++n}function s(t){return t=t.clonenode(!1),t.hash.length>1&&decodeuricomponent(t.href.replace(a,""))===decodeuricomponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightstyle:"content",hide:null,show:null,activate:null,beforeactivate:null,beforeload:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addclass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleclass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventnamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventdefault()}).delegate(".ui-tabs-anchor","focus"+this.eventnamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processtabs(),i.active=this._initialactive(),t.isarray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findactive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialactive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getcreateeventdata:function(){return{tab:this.active,panel:this.active.length?this._getpanelfortab(this.active):t()}},_tabkeydown:function(i){var s=t(this.document[0].activeelement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlepagenav(i)){switch(i.keycode){case t.ui.keycode.right:case t.ui.keycode.down:n++;break;case t.ui.keycode.up:case t.ui.keycode.left:a=!1,n--;break;case t.ui.keycode.end:n=this.anchors.length-1;break;case t.ui.keycode.home:n=0;break;case t.ui.keycode.space:return i.preventdefault(),cleartimeout(this.activating),this._activate(n),e;case t.ui.keycode.enter:return i.preventdefault(),cleartimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventdefault(),cleartimeout(this.activating),n=this._focusnexttab(n,a),i.ctrlkey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelkeydown:function(e){this._handlepagenav(e)||e.ctrlkey&&e.keycode===t.ui.keycode.up&&(e.preventdefault(),this.active.focus())},_handlepagenav:function(i){return i.altkey&&i.keycode===t.ui.keycode.page_up?(this._activate(this._focusnexttab(this.options.active-1,!1)),!0):i.altkey&&i.keycode===t.ui.keycode.page_down?(this._activate(this._focusnexttab(this.options.active+1,!0)),!0):e},_findnexttab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inarray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusnexttab:function(t,e){return t=this._findnexttab(t,e),this.tabs.eq(t).focus(),t},_setoption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupdisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleclass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupevents(i),"heightstyle"===t&&this._setupheightstyle(i),e)},_tabid:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeselector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processtabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findnexttab(math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupdisabled(this.options.disabled),this._setupevents(this.options.event),this._setupheightstyle(this.options.heightstyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabindex:-1}),this.panels.not(this._getpanelfortab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addclass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabindex:0}),this._getpanelfortab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabindex",0)},_processtabs:function(){var e=this;this.tablist=this._getlist().addclass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addclass("ui-state-default ui-corner-top").attr({role:"tab",tabindex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addclass("ui-tabs-anchor").attr({role:"presentation",tabindex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueid().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeselector(a))):(r=e._tabid(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createpanel(r),o.insertafter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addclass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getlist:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createpanel:function(e){return t("").attr("id",e).addclass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupdisabled:function(e){t.isarray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inarray(s,e)?t(i).addclass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeclass("ui-state-disabled").removeattr("aria-disabled");this.options.disabled=e},_setupevents:function(e){var i={click:function(t){t.preventdefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventhandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabkeydown"}),this._on(this.panels,{keydown:"_panelkeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupheightstyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerheight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerheight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerheight(!0)}),this.panels.each(function(){t(this).height(math.max(0,i-t(this).innerheight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=math.max(i,t(this).height("").height())}).height(i))},_eventhandler:function(e){var i=this.options,s=this.active,n=t(e.currenttarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getpanelfortab(a),l=s.length?this._getpanelfortab(s):t(),c={oldtab:s,oldpanel:l,newtab:r?t():a,newpanel:h};e.preventdefault(),a.hasclass("ui-state-disabled")||a.hasclass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeactivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jquery ui tabs: mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newtab.closest("li").addclass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newpanel,r=i.oldpanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldtab.closest("li").removeclass("ui-tabs-active ui-state-active"),n()}):(i.oldtab.closest("li").removeclass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldtab.attr("aria-selected","false"),o.length&&r.length?i.oldtab.attr("tabindex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabindex")}).attr("tabindex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newtab.attr({"aria-selected":"true",tabindex:0})},_activate:function(e){var i,s=this._findactive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventhandler({target:i,currenttarget:i,preventdefault:t.noop}))},_findactive:function(e){return e===!1?t():this.tabs.eq(e)},_getindex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeclass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeclass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeattr("role"),this.anchors.removeclass("ui-tabs-anchor").removeattr("role").removeattr("tabindex").removeuniqueid(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeclass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeattr("tabindex").removeattr("aria-live").removeattr("aria-busy").removeattr("aria-selected").removeattr("aria-labelledby").removeattr("aria-hidden").removeattr("aria-expanded").removeattr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removedata("ui-tabs-aria-controls"):e.removeattr("aria-controls")}),this.panels.show(),"content"!==this.options.heightstyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getindex(i),s=t.isarray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupdisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getindex(i),-1!==t.inarray(i,s))return;s=t.isarray(s)?t.merge([i],s).sort():[i]}this._setupdisabled(s)}},load:function(e,i){e=this._getindex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getpanelfortab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxsettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statustext&&(a.addclass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){settimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){settimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeclass("ui-tabs-loading"),r.removeattr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxsettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforesend:function(e,a){return n._trigger("beforeload",i,t.extend({jqxhr:e,ajaxsettings:a},s))}}},_getpanelfortab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeselector("#"+i))}})})(jquery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inarray(i,s);-1!==n&&s.splice(n,1),e.removedata("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeattr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var e=t(this).attr("title")||"";return t("
").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipclass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setoption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updatecontent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.event("blur");n.target=n.currenttarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addback().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addback().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.event("blur"),e.target=e.currenttarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueid(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updatecontent(s,e))},_updatecontent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeattr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedshow=setinterval(function(){a.is(":visible")&&(o(l.of),clearinterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keycode===t.ui.keycode.escape){var i=t.event(e);i.currenttarget=s[0],this.close(i,!0)}},remove:function(){this._removetooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currenttarget:this.element),o=this._find(n);this.closing||(clearinterval(this.delayedshow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removetooltip(t(this))}),n.removedata("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("").attr({id:i,role:"tooltip"}).addclass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipclass||""));return t("
").addclass("ui-tooltip-content").appendto(n),n.appendto(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removetooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.event("blur");n.target=n.currenttarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removedata("ui-tooltip-title"))})}})})(jquery);