").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks}},_blurActiveElement:function(e){var t=C.ui.safeActiveElement(this.document[0]),i=C(e.target);if(i.closest(t).length){return}C.ui.safeBlur(t)},_mouseStart:function(e){var t=this.options;this.helper=this._createHelper(e);this._addClass(this.helper,"ui-draggable-dragging");this._cacheHelperProportions();if(C.ui.ddmanager){C.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent(true);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=this.helper.parents().filter(function(){return C(this).css("position")==="fixed"}).length>0;this.positionAbs=this.element.offset();this._refreshOffsets(e);this.originalPosition=this.position=this._generatePosition(e,false);this.originalPageX=e.pageX;this.originalPageY=e.pageY;t.cursorAt&&this._adjustOffsetFromHelper(t.cursorAt);this._setContainment();if(this._trigger("start",e)===false){this._clear();return false}this._cacheHelperProportions();if(C.ui.ddmanager&&!t.dropBehaviour){C.ui.ddmanager.prepareOffsets(this,e)}this._mouseDrag(e,true);if(C.ui.ddmanager){C.ui.ddmanager.dragStart(this,e)}return true},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:false,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(e,t){if(this.hasFixedAncestor){this.offset.parent=this._getParentOffset()}this.position=this._generatePosition(e,true);this.positionAbs=this._convertPositionTo("absolute");if(!t){var i=this._uiHash();if(this._trigger("drag",e,i)===false){this._mouseUp(new C.Event("mouseup",e));return false}this.position=i.position}this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";if(C.ui.ddmanager){C.ui.ddmanager.drag(this,e)}return false},_mouseStop:function(e){var t=this,i=false;if(C.ui.ddmanager&&!this.options.dropBehaviour){i=C.ui.ddmanager.drop(this,e)}if(this.dropped){i=this.dropped;this.dropped=false}if(this.options.revert==="invalid"&&!i||this.options.revert==="valid"&&i||this.options.revert===true||C.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)){C(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(t._trigger("stop",e)!==false){t._clear()}})}else{if(this._trigger("stop",e)!==false){this._clear()}}return false},_mouseUp:function(e){this._unblockFrames();if(C.ui.ddmanager){C.ui.ddmanager.dragStop(this,e)}if(this.handleElement.is(e.target)){this.element.trigger("focus")}return C.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp(new C.Event("mouseup",{target:this.element[0]}))}else{this._clear()}return this},_getHandle:function(e){return this.options.handle?!!C(e.target).closest(this.element.find(this.options.handle)).length:true},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element;this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var t=this.options,i=C.isFunction(t.helper),n=i?C(t.helper.apply(this.element[0],[e])):t.helper==="clone"?this.element.clone().removeAttr("id"):this.element;if(!n.parents("body").length){n.appendTo(t.appendTo==="parent"?this.element[0].parentNode:t.appendTo)}if(i&&n[0]===this.element[0]){this._setPositionRelative()}if(n[0]!==this.element[0]&&!/(fixed|absolute)/.test(n.css("position"))){n.css("position","absolute")}return n},_setPositionRelative:function(){if(!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}},_adjustOffsetFromHelper:function(e){if(typeof e==="string"){e=e.split(" ")}if(C.isArray(e)){e={left:+e[0],top:+e[1]||0}}if("left"in e){this.offset.click.left=e.left+this.margins.left}if("right"in e){this.offset.click.left=this.helperProportions.width-e.right+this.margins.left}if("top"in e){this.offset.click.top=e.top+this.margins.top}if("bottom"in e){this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top}},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),t=this.document[0];if(this.cssPosition==="absolute"&&this.scrollParent[0]!==t&&C.contains(this.scrollParent[0],this.offsetParent[0])){e.left+=this.scrollParent.scrollLeft();e.top+=this.scrollParent.scrollTop()}if(this._isRootNode(this.offsetParent[0])){e={top:0,left:0}}return{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition!=="relative"){return{top:0,left:0}}var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(!t?this.scrollParent.scrollTop():0),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(!t?this.scrollParent.scrollLeft():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,t,i,n=this.options,o=this.document[0];this.relativeContainer=null;if(!n.containment){this.containment=null;return}if(n.containment==="window"){this.containment=[C(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,C(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,C(window).scrollLeft()+C(window).width()-this.helperProportions.width-this.margins.left,C(window).scrollTop()+(C(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(n.containment==="document"){this.containment=[0,0,C(o).width()-this.helperProportions.width-this.margins.left,(C(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(n.containment.constructor===Array){this.containment=n.containment;return}if(n.containment==="parent"){n.containment=this.helper[0].parentNode}t=C(n.containment);i=t[0];if(!i){return}e=/(scroll|auto)/.test(t.css("overflow"));this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(e?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relativeContainer=t},_convertPositionTo:function(e,t){if(!t){t=this.position}var i=e==="absolute"?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-(this.cssPosition==="fixed"?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-(this.cssPosition==="fixed"?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,n,o,s,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=e.pageX,c=e.pageY;if(!r||!this.offset.scroll){this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}}if(t){if(this.containment){if(this.relativeContainer){n=this.relativeContainer.offset();i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]}else{i=this.containment}if(e.pageX-this.offset.click.left
i[2]){l=i[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>i[3]){c=i[3]+this.offset.click.top}}if(a.grid){o=a.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY;c=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-a.grid[1]:o+a.grid[1]:o;s=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX;l=i?s-this.offset.click.left>=i[0]||s-this.offset.click.left>i[2]?s:s-this.offset.click.left>=i[0]?s-a.grid[0]:s+a.grid[0]:s}if(a.axis==="y"){l=this.originalPageX}if(a.axis==="x"){c=this.originalPageY}}return{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging");if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false;if(this.destroyOnClear){this.destroy()}},_trigger:function(e,t,i){i=i||this._uiHash();C.ui.plugin.call(this,e,[t,i,this],true);if(/^(drag|start|stop)/.test(e)){this.positionAbs=this._convertPositionTo("absolute");i.offset=this.positionAbs}return C.Widget.prototype._trigger.call(this,e,t,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});C.ui.plugin.add("draggable","connectToSortable",{start:function(t,e,i){var n=C.extend({},e,{item:i.element});i.sortables=[];C(i.options.connectToSortable).each(function(){var e=C(this).sortable("instance");if(e&&!e.options.disabled){i.sortables.push(e);e.refreshPositions();e._trigger("activate",t,n)}})},stop:function(t,e,i){var n=C.extend({},e,{item:i.element});i.cancelHelperRemoval=false;C.each(i.sortables,function(){var e=this;if(e.isOver){e.isOver=0;i.cancelHelperRemoval=true;e.cancelHelperRemoval=false;e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")};e._mouseStop(t);e.options.helper=e.options._helper}else{e.cancelHelperRemoval=true;e._trigger("deactivate",t,n)}})},drag:function(i,n,o){C.each(o.sortables,function(){var e=false,t=this;t.positionAbs=o.positionAbs;t.helperProportions=o.helperProportions;t.offset.click=o.offset.click;if(t._intersectsWith(t.containerCache)){e=true;C.each(o.sortables,function(){this.positionAbs=o.positionAbs;this.helperProportions=o.helperProportions;this.offset.click=o.offset.click;if(this!==t&&this._intersectsWith(this.containerCache)&&C.contains(t.element[0],this.element[0])){e=false}return e})}if(e){if(!t.isOver){t.isOver=1;o._parent=n.helper.parent();t.currentItem=n.helper.appendTo(t.element).data("ui-sortable-item",true);t.options._helper=t.options.helper;t.options.helper=function(){return n.helper[0]};i.target=t.currentItem[0];t._mouseCapture(i,true);t._mouseStart(i,true,true);t.offset.click.top=o.offset.click.top;t.offset.click.left=o.offset.click.left;t.offset.parent.left-=o.offset.parent.left-t.offset.parent.left;t.offset.parent.top-=o.offset.parent.top-t.offset.parent.top;o._trigger("toSortable",i);o.dropped=t.element;C.each(o.sortables,function(){this.refreshPositions()});o.currentItem=o.element;t.fromOutside=o}if(t.currentItem){t._mouseDrag(i);n.position=t.position}}else{if(t.isOver){t.isOver=0;t.cancelHelperRemoval=true;t.options._revert=t.options.revert;t.options.revert=false;t._trigger("out",i,t._uiHash(t));t._mouseStop(i,true);t.options.revert=t.options._revert;t.options.helper=t.options._helper;if(t.placeholder){t.placeholder.remove()}n.helper.appendTo(o._parent);o._refreshOffsets(i);n.position=o._generatePosition(i,true);o._trigger("fromSortable",i);o.dropped=false;C.each(o.sortables,function(){this.refreshPositions()})}}})}});C.ui.plugin.add("draggable","cursor",{start:function(e,t,i){var n=C("body"),o=i.options;if(n.css("cursor")){o._cursor=n.css("cursor")}n.css("cursor",o.cursor)},stop:function(e,t,i){var n=i.options;if(n._cursor){C("body").css("cursor",n._cursor)}}});C.ui.plugin.add("draggable","opacity",{start:function(e,t,i){var n=C(t.helper),o=i.options;if(n.css("opacity")){o._opacity=n.css("opacity")}n.css("opacity",o.opacity)},stop:function(e,t,i){var n=i.options;if(n._opacity){C(t.helper).css("opacity",n._opacity)}}});C.ui.plugin.add("draggable","scroll",{start:function(e,t,i){if(!i.scrollParentNotHidden){i.scrollParentNotHidden=i.helper.scrollParent(false)}if(i.scrollParentNotHidden[0]!==i.document[0]&&i.scrollParentNotHidden[0].tagName!=="HTML"){i.overflowOffset=i.scrollParentNotHidden.offset()}},drag:function(e,t,i){var n=i.options,o=false,s=i.scrollParentNotHidden[0],a=i.document[0];if(s!==a&&s.tagName!=="HTML"){if(!n.axis||n.axis!=="x"){if(i.overflowOffset.top+s.offsetHeight-e.pageY=0;u--){r=i.snapElements[u].left-i.margins.left;l=r+i.snapElements[u].width;c=i.snapElements[u].top-i.margins.top;d=c+i.snapElements[u].height;if(ml+p||_d+p||!C.contains(i.snapElements[u].item.ownerDocument,i.snapElements[u].item)){if(i.snapElements[u].snapping){i.options.snap.release&&i.options.snap.release.call(i.element,e,C.extend(i._uiHash(),{snapItem:i.snapElements[u].item}))}i.snapElements[u].snapping=false;continue}if(f.snapMode!=="inner"){n=Math.abs(c-_)<=p;o=Math.abs(d-v)<=p;s=Math.abs(r-m)<=p;a=Math.abs(l-g)<=p;if(n){t.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top}if(o){t.position.top=i._convertPositionTo("relative",{top:d,left:0}).top}if(s){t.position.left=i._convertPositionTo("relative",{top:0,left:r-i.helperProportions.width}).left}if(a){t.position.left=i._convertPositionTo("relative",{top:0,left:l}).left}}h=n||o||s||a;if(f.snapMode!=="outer"){n=Math.abs(c-v)<=p;o=Math.abs(d-_)<=p;s=Math.abs(r-g)<=p;a=Math.abs(l-m)<=p;if(n){t.position.top=i._convertPositionTo("relative",{top:c,left:0}).top}if(o){t.position.top=i._convertPositionTo("relative",{top:d-i.helperProportions.height,left:0}).top}if(s){t.position.left=i._convertPositionTo("relative",{top:0,left:r}).left}if(a){t.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left}}if(!i.snapElements[u].snapping&&(n||o||s||a||h)){i.options.snap.snap&&i.options.snap.snap.call(i.element,e,C.extend(i._uiHash(),{snapItem:i.snapElements[u].item}))}i.snapElements[u].snapping=n||o||s||a||h}}});C.ui.plugin.add("draggable","stack",{start:function(e,t,i){var n,o=i.options,s=C.makeArray(C(o.stack)).sort(function(e,t){return(parseInt(C(e).css("zIndex"),10)||0)-(parseInt(C(t).css("zIndex"),10)||0)});if(!s.length){return}n=parseInt(C(s[0]).css("zIndex"),10)||0;C(s).each(function(e){C(this).css("zIndex",n+e)});this.css("zIndex",n+s.length)}});C.ui.plugin.add("draggable","zIndex",{start:function(e,t,i){var n=C(t.helper),o=i.options;if(n.css("zIndex")){o._zIndex=n.css("zIndex")}n.css("zIndex",o.zIndex)},stop:function(e,t,i){var n=i.options;if(n._zIndex){C(t.helper).css("zIndex",n._zIndex)}}});var k=C.ui.draggable;C.widget("ui.resizable",C.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseFloat(e)||0},_isNumber:function(e){return!isNaN(parseFloat(e))},_hasScroll:function(e,t){if(C(e).css("overflow")==="hidden"){return false}var i=t&&t==="left"?"scrollLeft":"scrollTop",n=false;if(e[i]>0){return true}e[i]=1;n=e[i]>0;e[i]=0;return n},_create:function(){var e,t=this.options,i=this;this._addClass("ui-resizable");C.extend(this,{_aspectRatio:!!t.aspectRatio,aspectRatio:t.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:t.helper||t.ghost||t.animate?t.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)){this.element.wrap(C("").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance"));this.elementIsWrapper=true;e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")};this.element.css(e);this.originalElement.css("margin",0);this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css(e);this._proportionallyResize()}this._setupHandles();if(t.autoHide){C(this.element).on("mouseenter",function(){if(t.disabled){return}i._removeClass("ui-resizable-autohide");i._handles.show()}).on("mouseleave",function(){if(t.disabled){return}if(!i.resizing){i._addClass("ui-resizable-autohide");i._handles.hide()}})}this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,t=function(e){C(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(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);t(this.originalElement);return this},_setOption:function(e,t){this._super(e,t);switch(e){case"handles":this._removeHandles();this._setupHandles();break;default:break}},_setupHandles:function(){var e=this.options,t,i,n,o,s,a=this;this.handles=e.handles||(!C(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});this._handles=C();if(this.handles.constructor===String){if(this.handles==="all"){this.handles="n,e,s,w,se,sw,ne,nw"}n=this.handles.split(",");this.handles={};for(i=0;i");this._addClass(s,"ui-resizable-handle "+o);s.css({zIndex:e.zIndex});this.handles[t]=".ui-resizable-"+t;this.element.append(s)}}this._renderAxis=function(e){var t,i,n,o;e=e||this.element;for(t in this.handles){if(this.handles[t].constructor===String){this.handles[t]=this.element.children(this.handles[t]).first().show()}else if(this.handles[t].jquery||this.handles[t].nodeType){this.handles[t]=C(this.handles[t]);this._on(this.handles[t],{mousedown:a._mouseDown})}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)){i=C(this.handles[t],this.element);o=/sw|ne|nw|se|n|s/.test(t)?i.outerHeight():i.outerWidth();n=["padding",/ne|nw|n/.test(t)?"Top":/se|sw|s/.test(t)?"Bottom":/^e$/.test(t)?"Right":"Left"].join("");e.css(n,o);this._proportionallyResize()}this._handles=this._handles.add(this.handles[t])}};this._renderAxis(this.element);this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));this._handles.disableSelection();this._handles.on("mouseover",function(){if(!a.resizing){if(this.className){s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}a.axis=s&&s[1]?s[1]:"se"}});if(e.autoHide){this._handles.hide();this._addClass("ui-resizable-autohide")}},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var t,i,n=false;for(t in this.handles){i=C(this.handles[t])[0];if(i===e.target||C.contains(i,e.target)){n=true}}return!this.options.disabled&&n},_mouseStart:function(e){var t,i,n,o=this.options,s=this.element;this.resizing=true;this._renderProxy();t=this._num(this.helper.css("left"));i=this._num(this.helper.css("top"));if(o.containment){t+=C(o.containment).scrollLeft()||0;i+=C(o.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:t,top:i};this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width(),height:s.height()};this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()};this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()};this.originalPosition={left:t,top:i};this.originalMousePosition={left:e.pageX,top:e.pageY};this.aspectRatio=typeof o.aspectRatio==="number"?o.aspectRatio:this.originalSize.width/this.originalSize.height||1;n=C(".ui-resizable-"+this.axis).css("cursor");C("body").css("cursor",n==="auto"?this.axis+"-resize":n);this._addClass("ui-resizable-resizing");this._propagate("start",e);return true},_mouseDrag:function(e){var t,i,n=this.originalMousePosition,o=this.axis,s=e.pageX-n.left||0,a=e.pageY-n.top||0,r=this._change[o];this._updatePrevProperties();if(!r){return false}t=r.apply(this,[e,s,a]);this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){t=this._updateRatio(t,e)}t=this._respectSize(t,e);this._updateCache(t);this._propagate("resize",e);i=this._applyChanges();if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}if(!C.isEmptyObject(i)){this._updatePrevProperties();this._trigger("resize",e,this.ui());this._applyChanges()}return false},_mouseStop:function(e){this.resizing=false;var t,i,n,o,s,a,r,l=this.options,c=this;if(this._helper){t=this._proportionallyResizeElements;i=t.length&&/textarea/i.test(t[0].nodeName);n=i&&this._hasScroll(t[0],"left")?0:c.sizeDiff.height;o=i?0:c.sizeDiff.width;s={width:c.helper.width()-o,height:c.helper.height()-n};a=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null;r=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null;if(!l.animate){this.element.css(C.extend(s,{top:r,left:a}))}c.helper.height(c.size.height);c.helper.width(c.size.width);if(this._helper&&!l.animate){this._proportionallyResize()}}C("body").css("cursor","auto");this._removeClass("ui-resizable-resizing");this._propagate("stop",e);if(this._helper){this.helper.remove()}return false},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};if(this.position.top!==this.prevPosition.top){e.top=this.position.top+"px"}if(this.position.left!==this.prevPosition.left){e.left=this.position.left+"px"}if(this.size.width!==this.prevSize.width){e.width=this.size.width+"px"}if(this.size.height!==this.prevSize.height){e.height=this.size.height+"px"}this.helper.css(e);return e},_updateVirtualBoundaries:function(e){var t,i,n,o,s,a=this.options;s={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:Infinity,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:Infinity};if(this._aspectRatio||e){t=s.minHeight*this.aspectRatio;n=s.minWidth/this.aspectRatio;i=s.maxHeight*this.aspectRatio;o=s.maxWidth/this.aspectRatio;if(t>s.minWidth){s.minWidth=t}if(n>s.minHeight){s.minHeight=n}if(ie.width,a=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,c=/sw|nw|w/.test(i),d=/nw|ne|n/.test(i);if(s){e.width=t.minWidth}if(a){e.height=t.minHeight}if(n){e.width=t.maxWidth}if(o){e.height=t.maxHeight}if(s&&c){e.left=r-t.minWidth}if(n&&c){e.left=r-t.maxWidth}if(a&&d){e.top=l-t.minHeight}if(o&&d){e.top=l-t.maxHeight}if(!e.width&&!e.height&&!e.left&&e.top){e.top=null}else if(!e.width&&!e.height&&!e.top&&e.left){e.left=null}return e},_getPaddingPlusBorderDimensions:function(e){var t=0,i=[],n=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],o=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];for(;t<4;t++){i[t]=parseFloat(n[t])||0;i[t]+=parseFloat(o[t])||0}return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(!this._proportionallyResizeElements.length){return}var e,t=0,i=this.helper||this.element;for(;t ");this._addClass(this.helper,this._helper);this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++t.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,n=this.originalPosition;return{left:n.left+t,width:i.width-t}},n:function(e,t,i){var n=this.originalSize,o=this.originalPosition;return{top:o.top+i,height:n.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(e,t,i){return C.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,t,i]))},sw:function(e,t,i){return C.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,t,i]))},ne:function(e,t,i){return C.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,t,i]))},nw:function(e,t,i){return C.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,t,i]))}},_propagate:function(e,t){C.ui.plugin.call(this,e,[t,this.ui()]);e!=="resize"&&this._trigger(e,t,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}}});C.ui.plugin.add("resizable","animate",{stop:function(t){var i=C(this).resizable("instance"),e=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),s=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,r={width:i.size.width-a,height:i.size.height-s},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(C.extend(r,c&&l?{top:c,left:l}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var e={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};if(n&&n.length){C(n[0]).css({width:e.width,height:e.height})}i._updateCache(e);i._propagate("resize",t)}})}});C.ui.plugin.add("resizable","containment",{start:function(){var i,n,e,t,o,s,a,r=C(this).resizable("instance"),l=r.options,c=r.element,d=l.containment,u=d instanceof C?d.get(0):/parent/.test(d)?c.parent().get(0):d;if(!u){return}r.containerElement=C(u);if(/document/.test(d)||d===document){r.containerOffset={left:0,top:0};r.containerPosition={left:0,top:0};r.parentData={element:C(document),left:0,top:0,width:C(document).width(),height:C(document).height()||document.body.parentNode.scrollHeight}}else{i=C(u);n=[];C(["Top","Right","Left","Bottom"]).each(function(e,t){n[e]=r._num(i.css("padding"+t))});r.containerOffset=i.offset();r.containerPosition=i.position();r.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]};e=r.containerOffset;t=r.containerSize.height;o=r.containerSize.width;s=r._hasScroll(u,"left")?u.scrollWidth:o;a=r._hasScroll(u)?u.scrollHeight:t;r.parentData={element:u,left:e.left,top:e.top,width:s,height:a}}},resize:function(e){var t,i,n,o,s=C(this).resizable("instance"),a=s.options,r=s.containerOffset,l=s.position,c=s._aspectRatio||e.shiftKey,d={top:0,left:0},u=s.containerElement,h=true;if(u[0]!==document&&/static/.test(u.css("position"))){d=r}if(l.left<(s._helper?r.left:0)){s.size.width=s.size.width+(s._helper?s.position.left-r.left:s.position.left-d.left);if(c){s.size.height=s.size.width/s.aspectRatio;h=false}s.position.left=a.helper?r.left:0}if(l.top<(s._helper?r.top:0)){s.size.height=s.size.height+(s._helper?s.position.top-r.top:s.position.top);if(c){s.size.width=s.size.height*s.aspectRatio;h=false}s.position.top=s._helper?r.top:0}n=s.containerElement.get(0)===s.element.parent().get(0);o=/relative|absolute/.test(s.containerElement.css("position"));if(n&&o){s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top}else{s.offset.left=s.element.offset().left;s.offset.top=s.element.offset().top}t=Math.abs(s.sizeDiff.width+(s._helper?s.offset.left-d.left:s.offset.left-r.left));i=Math.abs(s.sizeDiff.height+(s._helper?s.offset.top-d.top:s.offset.top-r.top));if(t+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-t;if(c){s.size.height=s.size.width/s.aspectRatio;h=false}}if(i+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-i;if(c){s.size.width=s.size.height*s.aspectRatio;h=false}}if(!h){s.position.left=s.prevPosition.left;s.position.top=s.prevPosition.top;s.size.width=s.prevSize.width;s.size.height=s.prevSize.height}},stop:function(){var e=C(this).resizable("instance"),t=e.options,i=e.containerOffset,n=e.containerPosition,o=e.containerElement,s=C(e.helper),a=s.offset(),r=s.outerWidth()-e.sizeDiff.width,l=s.outerHeight()-e.sizeDiff.height;if(e._helper&&!t.animate&&/relative/.test(o.css("position"))){C(this).css({left:a.left-n.left-i.left,width:r,height:l})}if(e._helper&&!t.animate&&/static/.test(o.css("position"))){C(this).css({left:a.left-n.left-i.left,width:r,height:l})}}});C.ui.plugin.add("resizable","alsoResize",{start:function(){var e=C(this).resizable("instance"),t=e.options;C(t.alsoResize).each(function(){var e=C(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var t=C(this).resizable("instance"),n=t.options,o=t.originalSize,s=t.originalPosition,a={height:t.size.height-o.height||0,width:t.size.width-o.width||0,top:t.position.top-s.top||0,left:t.position.left-s.left||0};C(n.alsoResize).each(function(){var e=C(this),n=C(this).data("ui-resizable-alsoresize"),o={},t=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];C.each(t,function(e,t){var i=(n[t]||0)+(a[t]||0);if(i&&i>=0){o[t]=i||null}});e.css(o)})},stop:function(){C(this).removeData("ui-resizable-alsoresize")}});C.ui.plugin.add("resizable","ghost",{start:function(){var e=C(this).resizable("instance"),t=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:.25,display:"block",position:"relative",height:t.height,width:t.width,margin:0,left:0,top:0});e._addClass(e.ghost,"ui-resizable-ghost");if(C.uiBackCompat!==false&&typeof e.options.ghost==="string"){e.ghost.addClass(this.options.ghost)}e.ghost.appendTo(e.helper)},resize:function(){var e=C(this).resizable("instance");if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(){var e=C(this).resizable("instance");if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});C.ui.plugin.add("resizable","grid",{resize:function(){var e,t=C(this).resizable("instance"),i=t.options,n=t.size,o=t.originalSize,s=t.originalPosition,a=t.axis,r=typeof i.grid==="number"?[i.grid,i.grid]:i.grid,l=r[0]||1,c=r[1]||1,d=Math.round((n.width-o.width)/l)*l,u=Math.round((n.height-o.height)/c)*c,h=o.width+d,f=o.height+u,p=i.maxWidth&&i.maxWidth