YUI.add("resize-plugin",function(u,e){var t=function(e){e.node=u.Widget&&e.host instanceof u.Widget?e.host.get("boundingBox"):e.host,e.host instanceof u.Widget?e.widget=e.host:e.widget=!1,t.superclass.constructor.call(this,e)};t.NAME="resize-plugin",t.NS="resize",t.ATTRS={node:{value:undefined},widget:{value:undefined}},u.extend(t,u.Resize,{initializer:function(e){this.set("node",e.node),this.set("widget",e.widget),this.on("resize:resize",function(e){this._correctDimensions(e)})},_correctDimensions:function(e){var t=this.get("node"),i={old:t.getX(),cur:e.currentTarget.info.left},n={old:t.getY(),cur:e.currentTarget.info.top};this.get("widget")&&this._setWidgetProperties(e,i,n),this._isDifferent(i.old,i.cur)&&t.set("x",i.cur),this._isDifferent(n.old,n.cur)&&t.set("y",n.cur)},_setWidgetProperties:function(e,t,i){var n=this.get("widget"),s=n.get("height"),r=n.get("width"),o=e.currentTarget.info.offsetWidth-e.currentTarget.totalHSurrounding,e=e.currentTarget.info.offsetHeight-e.currentTarget.totalVSurrounding;this._isDifferent(s,e)&&n.set("height",e),this._isDifferent(r,o)&&n.set("width",o),n.hasImpl&&n.hasImpl(u.WidgetPosition)&&(this._isDifferent(n.get("x"),t.cur)&&n.set("x",t.cur),this._isDifferent(n.get("y"),i.cur)&&n.set("y",i.cur))},_isDifferent:function(e,t){return e!==t?t:!1}}),u.namespace("Plugin"),u.Plugin.Resize=t},"patched-v3.18.4",{requires:["resize-base","plugin"],optional:["resize-constrain"]});