/**
 * Minified by jsDelivr using Terser v5.37.0.
 * Original file: /npm/vue-react-dnd@1.1.0/dist/vue-react-dnd.umd.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("dnd-core"),require("disposables"),require("invariant")):"function"==typeof define&&define.amd?define(["exports","dnd-core","disposables","invariant"],r):r(e.VueReactDnd={},e.dndCore,e.disposables,e.invariant)}(this,(function(e,r,t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var o={name:"DragDropContextProvider",inject:{window:{default:window}},props:["backend","backendWindow"],provide:function(){return{dragDropManager:new r.DragDropManager(this.getBackend(),{window:this.getWindow()})}},methods:{getBackend:function(){var e=this.backend;return"object"==typeof e&&"function"==typeof e.default&&(e=e.default),e},getWindow:function(){return this.backendWindow?this.backendWindow:this.window?this.window:window}}},i=function(){var e=this,r=e.$createElement;return(e._self._c||r)("div",[e._t("default")],2)};i._withStripped=!0;var a,s,d,u,c,g=(a={render:i,staticRenderFns:[]},d=void 0,u=!1,(c=("function"==typeof(s=o)?s.options:s)||{}).__file="/media/usb0/dev/js/vue-react-dnd/src/DragDropContextProvider.vue",c.render||(c.render=a.render,c.staticRenderFns=a.staticRenderFns,c._compiled=!0,u&&(c.functional=!0)),c._scopeId=d,c);var p=function(e){this.internalMonitor=e.getMonitor()};p.prototype.receiveHandlerId=function(e){this.targetId=e},p.prototype.canDrop=function(){try{return this.internalMonitor.canDropOnTarget(this.targetId)}finally{}},p.prototype.isOver=function(e){return this.internalMonitor.isOverTarget(this.targetId,e)},p.prototype.getItemType=function(){return this.internalMonitor.getItemType()},p.prototype.getItem=function(){return this.internalMonitor.getItem()},p.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},p.prototype.didDrop=function(){return this.internalMonitor.didDrop()},p.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},p.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},p.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},p.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},p.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()};function l(e,r){return r===e||null!==r&&null!==e&&function(e,r){if(e===r)return!0;var t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,i=0;i<t.length;i+=1){if(!o.call(r,t[i])||e[t[i]]!==r[t[i]])return!1;if(e[t[i]]!==r[t[i]])return!1}return!0}(r,e)}function h(e){var r,t,n,o;function i(){o&&(o(),o=null),r&&t&&(o=e.connectDropTarget(r,t,n))}return{receiveHandlerId:function(e){e!==r&&(r=e,i())},hooks:{dropTarget:function(e,r){e===t&&l(r,n)||(t=e,n=r,i())}}}}function f(e,r){if(Array.isArray(e)&&Array.isArray(r)&&e.length===r.length){for(var t=!0,n=0;n<e.length;n++)t=t&&e[n]===r[n];return t}return e===r}var D={inject:["dragDropManager"],data:function(){var e,r,n,o,i=(e=this.dragDropManager,new p(e));return{dropTargetHandler:(r=this.$options.dropTarget.specs,n=this,(o=function(e){this.monitor=e}).prototype.receiveMonitor=function(e){this.monitor=e},o.prototype.canDrop=function(){return!r.canDrop||r.canDrop.bind(n)(this.monitor)},o.prototype.hover=function(){r.hover&&r.hover.bind(n)(this.monitor)},o.prototype.drop=function(){if(r.drop)return r.drop.bind(n)(this.monitor)},function(e){return new o(e)})(i),dropTargetHandlerMonitor:i,dropTargetHandlerConnector:h(this.dragDropManager.getBackend()),dropTargetDisposable:new t.SerialDisposable,isDropTargetCurrentlyMounted:!1,currentDropTargetType:null,dropTargetHandlerId:null}},mounted:function(){this.isDropTargetCurrentlyMounted=!0,this.dropTargetDisposable=new t.SerialDisposable,this.currentDropTargetType=null,this.receiveDropTargetProps(this.$props),this.handleDropTargetChange()},beforeUpdate:function(){this.receiveDropTargetProps(this.$props),this.handleDropTargetChange()},beforeDestroy:function(){this.disposeDropTarget(),this.isDropTargetCurrentlyMounted=!1},directives:{dropTarget:{inserted:function(e,r,t){t.context.dropTargetHandlerConnector.hooks.dropTarget(e)},componentUpdated:function(e,r,t){t.context.dropTargetHandlerConnector.hooks.dropTarget(e)}}},methods:{disposeDropTarget:function(){this.dropTargetDisposable.dispose(),this.dropTargetHandlerConnector.receiveHandlerId(null)},handleDropTargetChange:function(){this.$options&&this.$options.dropTarget&&this.$options.dropTarget.collect&&this.$options.dropTarget.collect.bind(this)(this.dropTargetHandlerConnector.hooks,this.dropTargetHandlerMonitor)},receiveDropTargetProps:function(){var e=this.$options.dropTarget.type.bind(this);this.receiveDropTargetType(e())},receiveDropTargetType:function(e){if(!f(e,this.currentDropTargetType)){this.currentDropTargetType=e;var r=function(e,r,t){var n=t.getRegistry(),o=n.addTarget(e,r);return{handlerId:o,unregister:function(){n.removeTarget(o)}}}(e,this.dropTargetHandler,this.dragDropManager),n=r.handlerId,o=r.unregister;this.dropTargetHandlerId=n,this.dropTargetHandlerMonitor.receiveHandlerId(n),this.dropTargetHandlerConnector.receiveHandlerId(n);var i=this.dragDropManager.getMonitor().subscribeToStateChange(this.handleDropTargetChange,{handlerIds:[n]});this.dropTargetDisposable.setDisposable(new t.CompositeDisposable(new t.Disposable(i),new t.Disposable(o)))}}}};var y=function(e){this.internalMonitor=e.getMonitor()};function v(e){var r,t,n,o,i,a,s;function d(){o&&(o(),o=null),r&&t&&(o=e.connectDragSource(r,t,n))}function u(){s&&(s(),s=null),r&&i&&(s=e.connectDragPreview(r,i,a))}return{receiveHandlerId:function(e){e!==r&&(r=e,d(),u())},hooks:{dragSource:function(e,r){e===t&&l(r,n)||(t=e,n=r,d())},dragPreview:function(e,r){e===i&&l(r,a)||(i=e,a=r,u())}}}}y.prototype.receiveHandlerId=function(e){this.sourceId=e},y.prototype.canDrag=function(){try{return this.internalMonitor.canDragSource(this.sourceId)}finally{}},y.prototype.isDragging=function(){try{return this.internalMonitor.isDraggingSource(this.sourceId)}finally{}},y.prototype.getItemType=function(){return this.internalMonitor.getItemType()},y.prototype.getItem=function(){return this.internalMonitor.getItem()},y.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},y.prototype.didDrop=function(){return this.internalMonitor.didDrop()},y.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},y.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},y.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},y.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},y.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()};var b={inject:["dragDropManager"],data:function(){var e,r,n,o,i=(e=this.dragDropManager,new y(e));return{dragSourceHandler:(r=this.$options.dragSource.specs,n=this,(o=function(e){this.monitor=e}).prototype.canDrag=function(){return!r.canDrag||r.canDrag.bind(n)(this.monitor)},o.prototype.isDragging=function(e,t){return r.isDragging?r.isDragging.bind(n)(this.monitor):t===e.getSourceId()},o.prototype.beginDrag=function(){return r.beginDrag.bind(n)(this.monitor,this.component)},o.prototype.endDrag=function(){r.endDrag&&r.endDrag.bind(n)(this.monitor)},function(e){return new o(e)})(i),dragSourceHandlerMonitor:i,dragSourceHandlerConnector:v(this.dragDropManager.getBackend()),dragSourceDisposable:new t.SerialDisposable,isDragSourceCurrentlyMounted:!1,currentDragSourceType:null,dragSourceHandlerId:null}},mounted:function(){this.isDragSourceCurrentlyMounted=!0,this.dragSourceDisposable=new t.SerialDisposable,this.currentDragSourceType=null,this.receiveDragSourceProps(),this.handleDragSourceChange()},beforeUpdate:function(){this.receiveDragSourceProps(),this.handleDragSourceChange()},beforeDestroy:function(){this.disposeDragSource(),this.isDragSourceCurrentlyMounted=!1},directives:{dragSource:{inserted:function(e,r,t){t.context.dragSourceHandlerConnector.hooks.dragSource(e)},componentUpdated:function(e,r,t){t.context.dragSourceHandlerConnector.hooks.dragSource(e)}},dragPreview:{inserted:function(e,r,t){t.context.dragSourceHandlerConnector.hooks.dragPreview(e)},componentUpdated:function(e,r,t){t.context.dragSourceHandlerConnector.hooks.dragPreview(e)}}},methods:{disposeDragSource:function(){this.dragSourceDisposable.dispose(),this.dragSourceHandlerConnector.receiveHandlerId(null)},handleDragSourceChange:function(){this.$options&&this.$options.dragSource&&this.$options.dragSource.collect&&this.$options.dragSource.collect.bind(this)(this.dragSourceHandlerConnector.hooks,this.dragSourceHandlerMonitor)},receiveDragSourceProps:function(){var e=this.$options.dragSource.type.bind(this);this.receiveDragSourceType(e())},receiveDragSourceType:function(e){if(!f(e,this.currentDragSourceType)){this.currentDragSourceType=e;var r=function(e,r,t){var n=t.getRegistry(),o=n.addSource(e,r);return{handlerId:o,unregister:function(){n.removeSource(o)}}}(e,this.dragSourceHandler,this.dragDropManager),n=r.handlerId,o=r.unregister;this.dragSourceHandlerId=n,this.dragSourceHandlerMonitor.receiveHandlerId(n),this.dragSourceHandlerConnector.receiveHandlerId(n);var i=this.dragDropManager.getMonitor().subscribeToStateChange(this.handleDragSourceChange,{handlerIds:[n]});this.dragSourceDisposable.setDisposable(new t.CompositeDisposable(new t.Disposable(i),new t.Disposable(o)))}}}};function S(e,t){void 0===t&&(t={});var n=e;return"object"==typeof n&&"function"==typeof n.default&&(n=n.default),{provide:{dragDropManager:new r.DragDropManager(n,t)}}}var C={inject:["dragDropManager"],data:function(){return{dragLayerUnsubscribeFromOffsetChange:null,dragLayerUnsubscribeFromStateChange:null,dragLayerIsCurrentlyMounted:!1}},mounted:function(){this.dragLayerIsCurrentlyMounted=!0;var e=this.dragDropManager.getMonitor();this.dragLayerUnsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.dragLayerHandleChange),this.dragLayerUnsubscribeFromStateChange=e.subscribeToStateChange(this.dragLayerHandleChange),this.dragLayerHandleChange()},beforeDestroy:function(){this.dragLayerIsCurrentlyMounted=!1,this.dragLayerUnsubscribeFromOffsetChange(),this.dragLayerUnsubscribeFromStateChange()},methods:{dragLayerHandleChange:function(){this.dragLayerIsCurrentlyMounted&&(this.$options&&this.$options.dragLayer&&this.$options.dragLayer.collect&&this.$options.dragLayer.collect.bind(this)(this.dragDropManager.getMonitor()))}}};function T(e){T.installed||(T.installed=!0,e.component("DragDropContextProvider",g))}var M={install:T},I=null;"undefined"!=typeof window?I=window.Vue:"undefined"!=typeof global&&(I=global.Vue),I&&I.use(M);var m={DragDropContextProvider:g,DropTarget:D,DragSource:b,DragDropContext:S,DragLayer:C};e.install=T,e.default=m,e.DragDropContextProvider=g,e.DropTarget=D,e.DragSource=b,e.DragDropContext=S,e.DragLayer=C,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=/sm/2fed3d9389b560f40fc7b0922bdbf9ad8f9b9e5778ba87380b6c536a8e3d05f8.map