YUI.add("dd-ddm-base",function(r,e){var t=function(){t.superclass.constructor.apply(this,arguments)};t.NAME="ddm",t.ATTRS={dragCursor:{value:"move"},clickPixelThresh:{value:3},clickTimeThresh:{value:1e3},throttleTime:{value:-1},dragMode:{value:"point",setter:function(e){return this._setDragMode(e),e}}},r.extend(t,r.Base,{_createPG:function(){},_active:null,_setDragMode:function(e){switch(e=null===e?r.DD.DDM.get("dragMode"):e){case 1:case"intersect":return 1;case 2:case"strict":return 2;case 0:case"point":return 0}return 0},CSS_PREFIX:r.ClassNameManager.getClassName("dd"),_activateTargets:function(){},_drags:[],activeDrag:!1,_regDrag:function(e){return!this.getDrag(e.get("node"))&&(this._active||this._setupListeners(),this._drags.push(e),!0)},_unregDrag:function(t){var n=[];r.Array.each(this._drags,function(e){e!==t&&(n[n.length]=e)}),this._drags=n},_setupListeners:function(){this._createPG(),this._active=!0;var e=r.one(r.config.doc);e.on("mousemove",r.throttle(r.bind(this._docMove,this),this.get("throttleTime"))),e.on("mouseup",r.bind(this._end,this))},_start:function(){this.fire("ddm:start"),this._startDrag()},_startDrag:function(){},_endDrag:function(){},_dropMove:function(){},_end:function(){this.activeDrag&&(this._shimming=!1,this._endDrag(),this.fire("ddm:end"),this.activeDrag.end.call(this.activeDrag),this.activeDrag=null)},stopDrag:function(){return this.activeDrag&&this._end(),this},_shimming:!1,_docMove:function(e){this._shimming||this._move(e)},_move:function(e){this.activeDrag&&(this.activeDrag._move.call(this.activeDrag,e),this._dropMove())},cssSizestoObject:function(e){var t=e.split(" ");switch(t.length){case 1:t[1]=t[2]=t[3]=t[0];break;case 2:t[2]=t[0],t[3]=t[1];break;case 3:t[3]=t[1]}return{top:parseInt(t[0],10),right:parseInt(t[1],10),bottom:parseInt(t[2],10),left:parseInt(t[3],10)}},getDrag:function(e){var t=!1,n=r.one(e);return n instanceof r.Node&&r.Array.each(this._drags,function(e){n.compareTo(e.get("node"))&&(t=e)}),t},swapPosition:function(e,t){e=r.DD.DDM.getNode(e),t=r.DD.DDM.getNode(t);var n=e.getXY(),i=t.getXY();return e.setXY(i),t.setXY(n),e},getNode:function(e){return e=e instanceof r.Node?e:e&&e.get?r.Widget&&e instanceof r.Widget?e.get("boundingBox"):e.get("node"):r.one(e)},swapNode:function(e,t){e=r.DD.DDM.getNode(e);var n=(t=r.DD.DDM.getNode(t)).get("parentNode"),i=t.get("nextSibling");return i===e?n.insertBefore(e,t):t===e.get("nextSibling")?n.insertBefore(t,e):(e.get("parentNode").replaceChild(t,e),n.insertBefore(e,i)),e}}),r.namespace("DD"),r.DD.DDM=new t},"patched-v3.18.7",{requires:["node","base","yui-throttle","classnamemanager"]});