1
0
mirror of https://github.com/AlexKrunch/AnonIB-3D.git synced 2024-11-22 20:10:23 -05:00
AnonIB-3D/src_php/libs/dragdrop.min.js

1 line
5.4 KiB
JavaScript
Raw Normal View History

2019-08-17 04:21:07 -04:00
(function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.DragDrop=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;c<g.length;c++)a(g[c]);return a}return b}()({1:[function(a,b){b.exports=function(a,b){function c(a,e){return a.reduce(function(a,d){return Array.isArray(d)&&e<b?a.concat(c(d,e+1)):a.concat(d)},[])}return b="number"==typeof b?b:1/0,b?c(a,1):Array.isArray(a)?a.map(function(a){return a}):a}},{}],2:[function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function j(a,b){this.fun=a,this.array=b}function i(){}var k,l,m=b.exports={};(function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}})();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=Array(arguments.length-1);if(1<arguments.length)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new j(a,b)),1!==o.length||p||e(h)},j.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=i,m.addListener=i,m.once=i,m.off=i,m.removeListener=i,m.removeAllListeners=i,m.emit=i,m.prependListener=i,m.prependOnceListener=i,m.listeners=function(){return[]},m.binding=function(){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},{}],3:[function(a,b){(function(a){b.exports=function(b,c){function d(b){function d(){c&&c(b,f),c=null}i?a.nextTick(d):d()}function e(a,b,c){f[a]=c,(0==--g||b)&&d(b)}var f,g,h,i=!0;Array.isArray(b)?(f=[],g=b.length):(h=Object.keys(b),f={},g=h.length),g?h?h.forEach(function(a){b[a](function(b,c){e(a,b,c)})}):b.forEach(function(a,b){a(function(a,c){e(b,a,c)})}):d(null),i=!1}}).call(this,a("_process"))},{_process:2}],"/":[function(a,b){function c(a,b){function d(){h.readEntries(function(a){0<a.length?(g=g.concat(Array.from(a)),d()):e()})}function e(){f(g.map(function(a){return function(b){c(a,b)}}),function(c,d){c?b(c):(d.push({fullPath:a.fullPath,name:a.name,isFile:!1,isDirectory:!0}),b(null,d))})}var g=[];if(a.isFile)a.file(function(c){c.fullPath=a.fullPath,c.isFile=!0,c.isDirectory=!1,b(null,c)},function(a){b(a)});else if(a.isDirectory){var h=a.createReader();d()}}b.exports=function(a,b){function e(a){return b.onDragEnter&&b.onDragEnter(a),a.stopPropagation(),a.preventDefault(),!1}function g(c){if(c.stopPropagation(),c.preventDefault(),b.onDragOver&&b.onDragOver(c),c.dataTransfer.items){var d=Array.from(c.dataTransfer.items),e=d.filter(function(a){return"file"===a.kind}),f=d.filter(function(a){return"string"===a.kind});if(0===e.length&&!b.onDropText)return;if(0===f.length&&!b.onDrop)return;if(0===e.length&&0===f.length)return}return a.classList.add("drag"),clearTimeout(l),c.dataTransf