text: (function(f){"function"===typeof $define?$define(["Nex.jqueryui.Core"],function(){f(jQuery)}):f(jQuery)})(function(f){f.widget("ui.resizable",f.ui.mouse,{version:"1.11.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseInt(a,10)||
  0},_isNumber:function(a){return!isNaN(parseInt(a,10))},_hasScroll:function(a,b){if("hidden"===f(a).css("overflow"))return!1;var d=b&&"left"===b?"scrollLeft":"scrollTop",e=!1;if(0<a[d])return!0;a[d]=1;e=0<a[d];a[d]=0;return e},_create:function(){var a,b,d,e,c,g=this,h=this.options;this.element.addClass("ui-resizable");f.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":
  null});this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(f("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),
  marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),
  this._proportionallyResize());this.handles=h.handles||(f(".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");if(this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),a=this.handles.split(","),this.handles={},b=0;b<a.length;b++)d=f.trim(a[b]),c="ui-resizable-"+d,e=f("<div class='ui-resizable-handle "+
  c+"'></div>"),e.css({zIndex:h.zIndex}),"se"===d&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[d]=".ui-resizable-"+d,this.element.append(e);this._renderAxis=function(a){var b,c,d;a=a||this.element;for(b in this.handles)this.handles[b].constructor===String&&(this.handles[b]=this.element.children(this.handles[b]).first().show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(c=f(this.handles[b],this.element),d=/sw|ne|nw|se|n|s/.test(b)?
  c.outerHeight():c.outerWidth(),c=["padding",/ne|nw|n/.test(b)?"Top":/se|sw|s/.test(b)?"Bottom":/^e$/.test(b)?"Right":"Left"].join(""),a.css(c,d),this._proportionallyResize()),f(this.handles[b])};this._renderAxis(this.element);this._handles=f(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")});h.autoHide&&(this._handles.hide(),f(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||
  (f(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(f(this).addClass("ui-resizable-autohide"),g._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy();var a,b=function(a){f(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};this.elementIsWrapper&&(b(this.element),a=this.element,
  this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")}).insertAfter(a),a.remove());this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(a){var b,d,e=!1;for(b in this.handles)if(d=f(this.handles[b])[0],d===a.target||f.contains(d,a.target))e=!0;return!this.options.disabled&&e},_mouseStart:function(a){var b,d,e=this.options,c=this.element;this.resizing=!0;
  this._renderProxy();b=this._num(this.helper.css("left"));d=this._num(this.helper.css("top"));e.containment&&(b+=f(e.containment).scrollLeft()||0,d+=f(e.containment).scrollTop()||0);this.offset=this.helper.offset();this.position={left:b,top:d};this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:c.width(),height:c.height()};this.originalSize=this._helper?{width:c.outerWidth(),height:c.outerHeight()}:{width:c.width(),height:c.height()};this.sizeDiff={width:c.outerWidth()-
  c.width(),height:c.outerHeight()-c.height()};this.originalPosition={left:b,top:d};this.originalMousePosition={left:a.pageX,top:a.pageY};this.aspectRatio="number"===typeof e.aspectRatio?e.aspectRatio:this.originalSize.width/this.originalSize.height||1;b=f(".ui-resizable-"+this.axis).css("cursor");f("body").css("cursor","auto"===b?this.axis+"-resize":b);c.addClass("ui-resizable-resizing");this._propagate("start",a);return!0},_mouseDrag:function(a){var b,d=this.originalMousePosition;b=a.pageX-d.left||
  0;var d=a.pageY-d.top||0,e=this._change[this.axis];this._updatePrevProperties();if(!e)return!1;b=e.apply(this,[a,b,d]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)b=this._updateRatio(b,a);b=this._respectSize(b,a);this._updateCache(b);this._propagate("resize",a);b=this._applyChanges();!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();f.isEmptyObject(b)||(this._updatePrevProperties(),this._trigger("resize",a,this.ui()),this._applyChanges());
  return!1},_mouseStop:function(a){this.resizing=!1;var b,d,e,c=this.options;this._helper&&(b=this._proportionallyResizeElements,b=(d=b.length&&/textarea/i.test(b[0].nodeName))&&this._hasScroll(b[0],"left")?0:this.sizeDiff.height,d=d?0:this.sizeDiff.width,d={width:this.helper.width()-d,height:this.helper.height()-b},b=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,e=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null,
  c.animate||this.element.css(f.extend(d,{top:e,left:b})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!c.animate&&this._proportionallyResize());f("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",a);this._helper&&this.helper.remove();return!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a=
  {};this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px");this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px");this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px");this.size.height!==this.prevSize.height&&(a.height=this.size.height+"px");this.helper.css(a);return a},_updateVirtualBoundaries:function(a){var b,d,e,c;c=this.options;c={minWidth:this._isNumber(c.minWidth)?c.minWidth:0,maxWidth:this._isNumber(c.maxWidth)?c.maxWidth:Infinity,minHeight:this._isNumber(c.minHeight)?
  c.minHeight:0,maxHeight:this._isNumber(c.maxHeight)?c.maxHeight:Infinity};if(this._aspectRatio||a)a=c.minHeight*this.aspectRatio,d=c.minWidth/this.aspectRatio,b=c.maxHeight*this.aspectRatio,e=c.maxWidth/this.aspectRatio,a>c.minWidth&&(c.minWidth=a),d>c.minHeight&&(c.minHeight=d),b<c.maxWidth&&(c.maxWidth=b),e<c.maxHeight&&(c.maxHeight=e);this._vBoundaries=c},_updateCache:function(a){this.offset=this.helper.offset();this._isNumber(a.left)&&(this.position.left=a.left);this._isNumber(a.top)&&(this.position.top=
  a.top);this._isNumber(a.height)&&(this.size.height=a.height);this._isNumber(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,d=this.size,e=this.axis;this._isNumber(a.height)?a.width=a.height*this.aspectRatio:this._isNumber(a.width)&&(a.height=a.width/this.aspectRatio);"sw"===e&&(a.left=b.left+(d.width-a.width),a.top=null);"nw"===e&&(a.top=b.top+(d.height-a.height),a.left=b.left+(d.width-a.width));return a},_respectSize:function(a){var b=this._vBoundaries,d=this.axis,
  e=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,c=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<a.height,f=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,h=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,k=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height,p=/sw|nw|w/.test(d),d=/nw|ne|n/.test(d);f&&(a.width=b.minWidth);h&&(a.height=b.minHeight);e&&(a.width=b.maxWidth);c&&(a.height=b.maxHeight);f&&p&&(a.left=k-b.minWidth);e&&
  p&&(a.left=k-b.maxWidth);h&&d&&(a.top=n-b.minHeight);c&&d&&(a.top=n-b.maxHeight);a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null;return a},_getPaddingPlusBorderDimensions:function(a){var b=0,d=[],e=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")];for(a=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];4>b;b++)d[b]=parseInt(e[b],10)||0,d[b]+=parseInt(a[b],10)||
  0;return{height:d[0]+d[2],width:d[1]+d[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,d=this.helper||this.element;b<this._proportionallyResizeElements.length;b++)a=this._proportionallyResizeElements[b],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(a)),a.css({height:d.height()-this.outerDimensions.height||0,width:d.width()-this.outerDimensions.width||0})},_renderProxy:function(){var a=this.options;this.elementOffset=
  this.element.offset();this._helper?(this.helper=this.helper||f("<div style='overflow:hidden;'></div>"),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:++a.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){return{left:this.originalPosition.left+
  b,width:this.originalSize.width-b}},n:function(a,b,d){return{top:this.originalPosition.top+d,height:this.originalSize.height-d}},s:function(a,b,d){return{height:this.originalSize.height+d}},se:function(a,b,d){return f.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[a,b,d]))},sw:function(a,b,d){return f.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[a,b,d]))},ne:function(a,b,d){return f.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,
  [a,b,d]))},nw:function(a,b,d){return f.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,b,d]))}},_propagate:function(a,b){f.ui.plugin.call(this,a,[b,this.ui()]);"resize"!==a&&this._trigger(a,b,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}}});f.ui.plugin.add("resizable","animate",{stop:function(a){var b=
  f(this).resizable("instance"),d=b.options,e=b._proportionallyResizeElements,c=e.length&&/textarea/i.test(e[0].nodeName),g=c&&b._hasScroll(e[0],"left")?0:b.sizeDiff.height,c={width:b.size.width-(c?0:b.sizeDiff.width),height:b.size.height-g},g=parseInt(b.element.css("left"),10)+(b.position.left-b.originalPosition.left)||null,h=parseInt(b.element.css("top"),10)+(b.position.top-b.originalPosition.top)||null;b.element.animate(f.extend(c,h&&g?{top:h,left:g}:{}),{duration:d.animateDuration,easing:d.animateEasing,
  step:function(){var c={width:parseInt(b.element.css("width"),10),height:parseInt(b.element.css("height"),10),top:parseInt(b.element.css("top"),10),left:parseInt(b.element.css("left"),10)};e&&e.length&&f(e[0]).css({width:c.width,height:c.height});b._updateCache(c);b._propagate("resize",a)}})}});f.ui.plugin.add("resizable","containment",{start:function(){var a,b,d,e,c,g=f(this).resizable("instance"),h=g.element;d=g.options.containment;if(h=d instanceof f?d.get(0):/parent/.test(d)?h.parent().get(0):
  d)g.containerElement=f(h),/document/.test(d)||d===document?(g.containerOffset={left:0,top:0},g.containerPosition={left:0,top:0},g.parentData={element:f(document),left:0,top:0,width:f(document).width(),height:f(document).height()||document.body.parentNode.scrollHeight}):(a=f(h),b=[],f(["Top","Right","Left","Bottom"]).each(function(c,d){b[c]=g._num(a.css("padding"+d))}),g.containerOffset=a.offset(),g.containerPosition=a.position(),g.containerSize={height:a.innerHeight()-b[3],width:a.innerWidth()-b[1]},
  d=g.containerOffset,e=g.containerSize.height,c=g.containerSize.width,c=g._hasScroll(h,"left")?h.scrollWidth:c,e=g._hasScroll(h)?h.scrollHeight:e,g.parentData={element:h,left:d.left,top:d.top,width:c,height:e})},resize:function(a){var b,d,e,c=f(this).resizable("instance");b=c.options;d=c.containerOffset;e=c.position;a=c._aspectRatio||a.shiftKey;var g={top:0,left:0},h=c.containerElement,k=!0;h[0]!==document&&/static/.test(h.css("position"))&&(g=d);e.left<(c._helper?d.left:0)&&(c.size.width+=c._helper?
  c.position.left-d.left:c.position.left-g.left,a&&(c.size.height=c.size.width/c.aspectRatio,k=!1),c.position.left=b.helper?d.left:0);e.top<(c._helper?d.top:0)&&(c.size.height+=c._helper?c.position.top-d.top:c.position.top,a&&(c.size.width=c.size.height*c.aspectRatio,k=!1),c.position.top=c._helper?d.top:0);b=c.containerElement.get(0)===c.element.parent().get(0);e=/relative|absolute/.test(c.containerElement.css("position"));b&&e?(c.offset.left=c.parentData.left+c.position.left,c.offset.top=c.parentData.top+
  c.position.top):(c.offset.left=c.element.offset().left,c.offset.top=c.element.offset().top);b=Math.abs(c.sizeDiff.width+(c._helper?c.offset.left-g.left:c.offset.left-d.left));d=Math.abs(c.sizeDiff.height+(c._helper?c.offset.top-g.top:c.offset.top-d.top));b+c.size.width>=c.parentData.width&&(c.size.width=c.parentData.width-b,a&&(c.size.height=c.size.width/c.aspectRatio,k=!1));d+c.size.height>=c.parentData.height&&(c.size.height=c.parentData.height-d,a&&(c.size.width=c.size.height*c.aspectRatio,k=!1));
  k||(c.position.left=c.prevPosition.left,c.position.top=c.prevPosition.top,c.size.width=c.prevSize.width,c.size.height=c.prevSize.height)},stop:function(){var a=f(this).resizable("instance"),b=a.options,d=a.containerOffset,e=a.containerPosition,c=a.containerElement,g=f(a.helper),h=g.offset(),k=g.outerWidth()-a.sizeDiff.width,g=g.outerHeight()-a.sizeDiff.height;a._helper&&!b.animate&&/relative/.test(c.css("position"))&&f(this).css({left:h.left-e.left-d.left,width:k,height:g});a._helper&&!b.animate&&
  /static/.test(c.css("position"))&&f(this).css({left:h.left-e.left-d.left,width:k,height:g})}});f.ui.plugin.add("resizable","alsoResize",{start:function(){var a=f(this).resizable("instance").options,b=function(a){f(a).each(function(){var a=f(this);a.data("ui-resizable-alsoresize",{width:parseInt(a.width(),10),height:parseInt(a.height(),10),left:parseInt(a.css("left"),10),top:parseInt(a.css("top"),10)})})};"object"!==typeof a.alsoResize||a.alsoResize.parentNode?b(a.alsoResize):a.alsoResize.length?(a.alsoResize=
  a.alsoResize[0],b(a.alsoResize)):f.each(a.alsoResize,function(a){b(a)})},resize:function(a,b){var d=f(this).resizable("instance"),e=d.options,c=d.originalSize,g=d.originalPosition,h={height:d.size.height-c.height||0,width:d.size.width-c.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},k=function(a,c){f(a).each(function(){var a=f(this),d=f(this).data("ui-resizable-alsoresize"),e={},g=c&&c.length?c:a.parents(b.originalElement[0]).length?["width","height"]:["width","height","top",
  "left"];f.each(g,function(a,b){var c=(d[b]||0)+(h[b]||0);c&&0<=c&&(e[b]=c||null)});a.css(e)})};"object"!==typeof e.alsoResize||e.alsoResize.nodeType?k(e.alsoResize):f.each(e.alsoResize,function(a,b){k(a,b)})},stop:function(){f(this).removeData("resizable-alsoresize")}});f.ui.plugin.add("resizable","ghost",{start:function(){var a=f(this).resizable("instance"),b=a.options,d=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:.25,display:"block",position:"relative",height:d.height,width:d.width,
  margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"===typeof b.ghost?b.ghost:"");a.ghost.appendTo(a.helper)},resize:function(){var a=f(this).resizable("instance");a.ghost&&a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})},stop:function(){var a=f(this).resizable("instance");a.ghost&&a.helper&&a.helper.get(0).removeChild(a.ghost.get(0))}});f.ui.plugin.add("resizable","grid",{resize:function(){var a,b=f(this).resizable("instance"),d=b.options,e=b.size,c=
  b.originalSize,g=b.originalPosition,h=b.axis,k="number"===typeof d.grid?[d.grid,d.grid]:d.grid,n=k[0]||1,p=k[1]||1,q=Math.round((e.width-c.width)/n)*n,e=Math.round((e.height-c.height)/p)*p,l=c.width+q,m=c.height+e,r=d.maxWidth&&d.maxWidth<l,s=d.maxHeight&&d.maxHeight<m,t=d.minWidth&&d.minWidth>l,u=d.minHeight&&d.minHeight>m;d.grid=k;t&&(l+=n);u&&(m+=p);r&&(l-=n);s&&(m-=p);if(/^(se|s|e)$/.test(h))b.size.width=l,b.size.height=m;else if(/^(ne)$/.test(h))b.size.width=l,b.size.height=m,b.position.top=
  g.top-e;else if(/^(sw)$/.test(h))b.size.width=l,b.size.height=m,b.position.left=g.left-q;else{if(0>=m-p||0>=l-n)a=b._getPaddingPlusBorderDimensions(this);0<m-p?(b.size.height=m,b.position.top=g.top-e):(m=p-a.height,b.size.height=m,b.position.top=g.top+c.height-m);0<l-n?(b.size.width=l,b.position.left=g.left-q):(l=n-a.width,b.size.width=l,b.position.left=g.left+c.width-l)}}})});