YUI.add("dd-ddm-drop",function(h,t){h.mix(h.DD.DDM,{_noShim:!1,_activeShims:[],_hasActiveShim:function(){return!!this._noShim||this._activeShims.length},_addActiveShim:function(t){this._activeShims.push(t)},_removeActiveShim:function(i){var e=[];h.Array.each(this._activeShims,function(t){t._yuid!==i._yuid&&e.push(t)}),this._activeShims=e},syncActiveShims:function(t){h.later(0,this,function(t){t=t?this.targets:this._lookup();h.Array.each(t,function(t){t.sizeShim.call(t)},this)},t)},mode:0,POINT:0,INTERSECT:1,STRICT:2,useHash:!0,activeDrop:null,validDrops:[],otherDrops:{},targets:[],_addValid:function(t){return this.validDrops.push(t),this},_removeValid:function(i){var e=[];return h.Array.each(this.validDrops,function(t){t!==i&&e.push(t)}),this.validDrops=e,this},isOverTarget:function(t){if(this.activeDrag&&t){var i,e=this.activeDrag.mouseXY,r=this.activeDrag.get("dragMode"),a=t.shim;if(e&&this.activeDrag){if(i=this.activeDrag.region,r===this.STRICT)return this.activeDrag.get("dragNode").inRegion(t.region,!0,i);if(t&&t.shim)return(r===this.INTERSECT&&this._noShim?(r=i||this.activeDrag.get("node"),t.get("node").intersect(r,t.region)):(a=this._noShim?t.get("node"):a).intersect({top:e[1],bottom:e[1],left:e[0],right:e[0]},t.region)).inRegion}}return!1},clearCache:function(){this.validDrops=[],this.otherDrops={},this._activeShims=[]},_activateTargets:function(){this._noShim=!0,this.clearCache(),h.Array.each(this.targets,function(t){t._activateShim([]),!0===t.get("noShim")&&(this._noShim=!1)},this),this._handleTargetOver()},getBestMatch:function(t,i){var e,r=null,a=0;return h.Object.each(t,function(t){var i=this.activeDrag.get("dragNode").intersect(t.get("node"));t.region.area=i.area,i.inRegion&&i.area>a&&(a=i.area,r=t)},this),i?(e=[],h.Object.each(t,function(t){t!==r&&e.push(t)},this),[r,e]):r},_deactivateTargets:function(){var t,i=[],e=this.activeDrag,r=this.activeDrop;e&&r&&this.otherDrops[r]?(e.get("dragMode")?(r=(t=this.getBestMatch(this.otherDrops,!0))[0],i=t[1]):delete(i=this.otherDrops)[r],e.get("node").removeClass(this.CSS_PREFIX+"-drag-over"),r&&(r.fire("drop:hit",{drag:e,drop:r,others:i}),e.fire("drag:drophit",{drag:e,drop:r,others:i}))):e&&e.get("dragging")&&(e.get("node").removeClass(this.CSS_PREFIX+"-drag-over"),e.fire("drag:dropmiss",{pageX:e.lastXY[0],pageY:e.lastXY[1]})),this.activeDrop=null,h.Array.each(this.targets,function(t){t._deactivateShim([])},this)},_dropMove:function(){this._hasActiveShim()?this._handleTargetOver():h.Object.each(this.otherDrops,function(t){t._handleOut.apply(t,[])})},_lookup:function(){var i;return!this.useHash||this._noShim?this.validDrops:(i=[],h.Array.each(this.validDrops,function(t){t.shim&&t.shim.inViewportRegion(!1,t.region)&&i.push(t)}),i)},_handleTargetOver:function(){var t=this._lookup();h.Array.each(t,function(t){t._handleTargetOver.call(t)},this)},_regTarget:function(t){this.targets.push(t)},_unregTarget:function(i){var e,r=[];h.Array.each(this.targets,function(t){t!==i&&r.push(t)},this),this.targets=r,e=[],h.Array.each(this.validDrops,function(t){t!==i&&e.push(t)}),this.validDrops=e},getDrop:function(t){var i=!1,e=h.one(t);return e instanceof h.Node&&h.Array.each(this.targets,function(t){e.compareTo(t.get("node"))&&(i=t)}),i}},!0)},"patched-v3.18.7",{requires:["dd-ddm"]});