Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/core/createDNDBackend",["module","exports","require","liferay!frontend-js-react-web$react-dnd-html5-backend"],(function(e,n,t){window;Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n){const t=new Set,r=new Map,c=e=>(n,o,c)=>{t.forEach((t=>{if(t.document.body&&t.document.body.contains(o)){const a=r.get(t);a.nodes.get(n)!==o&&(a.nodes.set(n,o),a.backend[e](n,o,c))}}))};return{connectDragPreview:c("connectDragPreview"),connectDragSource:c("connectDragSource"),connectDropTarget:c("connectDropTarget"),setup(){t.add(n),Array.from(n.document.querySelectorAll("iframe")).forEach((e=>{e.contentWindow&&t.add(e.contentWindow)})),t.forEach((n=>{if(!r.has(n)){const t=(0,o.HTML5Backend)(e,n);t.setup(),r.set(n,{backend:t,nodes:new Map})}}))},teardown(){t.forEach((e=>{const n=r.get(e);n&&(n.backend.teardown(),r.delete(e))})),t.clear()}}};var o=t("liferay!frontend-js-react-web$react-dnd-html5-backend")}));
//# sourceMappingURL=createDNDBackend.js.map