Separate script and lib build logic -- we only want to babelify/sourcemap our own stuff.

This commit is contained in:
Dannon Baker
2017-05-02 15:57:42 -04:00
parent 9ecb4e8761
commit bbe3980b8f
36 changed files with 63 additions and 88 deletions
+11 -3
View File
@@ -7,8 +7,10 @@ var uglify = require('gulp-uglify');
var paths = {
scripts: ['galaxy/scripts/**/*.js',
'!galaxy/scripts/apps/**/*.js'
]
'!galaxy/scripts/apps/**/*.js',
'!galaxy/scripts/libs/**/*.js'
],
libs: ['galaxy/scripts/libs/**/*.js']
};
gulp.task('scripts', function() {
@@ -20,6 +22,12 @@ gulp.task('scripts', function() {
.pipe(gulp.dest('../static/scripts/'));
});
gulp.task('libs', function() {
return gulp.src(paths.libs)
.pipe(uglify())
.pipe(gulp.dest('../static/scripts/libs/'));
});
gulp.task('clean', function(){
//Wipe out all scripts that aren't handled by webpack
return del(['../static/scripts/**/*.js',
@@ -31,4 +39,4 @@ gulp.task('watch', function(){
gulp.watch(paths.scripts, ['scripts']);
});
gulp.task('default', ['clean', 'scripts']);
gulp.task('default', ['clean', 'scripts', 'libs']);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -1,2 +1 @@
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=t(require("jquery")):t(e.jQuery)}(void 0,function(e){var t=e.ajaxSettings;t.responseFields.native="responseNative",t.converters["* native"]=!0;var r={},o=0,n={0:200,1223:204},s={},i=jQuery.ajaxSettings.xhr();window.ActiveXObject&&e(window).on("unload",function(){for(var e in s)s[e]()}),r.cors=!!i&&"withCredentials"in i,r.ajax=i=!!i,e.ajaxTransport("native",function(e){var t;if(r.cors||i&&!e.crossDomain)return{send:function(r,i){var a,u=e.xhr(),f=++o,d={};if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)u[a]=e.xhrFields[a];e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)u.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(delete s[f],t=u.onload=u.onerror=null,"abort"===e?u.abort():"error"===e?i(u.status,u.statusText):(u.response&&(d.native=u.response),i(n[u.status]||u.status,u.statusText,d,u.getAllResponseHeaders())))}},u.onload=t(),u.onerror=t("error"),t=s[f]=t("abort");try{u.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),e.getNative=function(t,r){return e.ajax({dataType:"native",url:t,xhrFields:{responseType:"arraybuffer"},success:r})}});
//# sourceMappingURL=../../../maps/libs/bbi/jquery-ajax-native.js.map
!function(e,r){"function"==typeof define&&define.amd?define(["jquery"],r):"object"==typeof exports?module.exports=r(require("jquery")):r(e.jQuery)}(this,function(e){var r=e.ajaxSettings;r.responseFields.native="responseNative",r.converters["* native"]=!0;var t={},n=0,o={0:200,1223:204},s={},a=jQuery.ajaxSettings.xhr();window.ActiveXObject&&e(window).on("unload",function(){for(var e in s)s[e]()}),t.cors=!!a&&"withCredentials"in a,t.ajax=a=!!a,e.ajaxTransport("native",function(e){var r;if(t.cors||a&&!e.crossDomain)return{send:function(t,a){var i,u=e.xhr(),d=++n,c={};if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)u[i]=e.xhrFields[i];e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),e.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest");for(i in t)u.setRequestHeader(i,t[i]);r=function(e){return function(){r&&(delete s[d],r=u.onload=u.onerror=null,"abort"===e?u.abort():"error"===e?a(u.status,u.statusText):(u.response&&(c.native=u.response),a(o[u.status]||u.status,u.statusText,c,u.getAllResponseHeaders())))}},u.onload=r(),u.onerror=r("error"),r=s[d]=r("abort");try{u.send(e.hasContent&&e.data||null)}catch(e){if(r)throw e}},abort:function(){r&&r()}}}),e.getNative=function(r,t){return e.ajax({dataType:"native",url:r,xhrFields:{responseType:"arraybuffer"},success:t})}});
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -1,2 +1 @@
"use strict";define([],function(){function n(n,t){if("number"!=typeof n||"number"!=typeof t)throw"Bad range "+n+","+t;this._min=n,this._max=t}function t(n){var t=n.sort(a),r=[],i=t.shift();t.forEach(function(n){n._min<=i._max?n._max>i._max&&(i._max=n._max):(r.push(i),i=n)}),r.push(i),this._ranges=r}function r(n,r){return n instanceof t||(n instanceof Array||(n=[n]),n=new t(n)),r&&n.insertRange(r),n}function i(r,i){for(var e=r.ranges(),o=i.ranges(),a=e.length,s=o.length,u=0,m=0,h=[];u<a&&m<s;){var r=e[u],i=o[m],_=Math.max(r.min(),i.min()),g=Math.min(r.max(),i.max());g>=_&&h.push(new n(_,g)),r.max()>i.max()?++m:++u}return 0==h.length?null:1==h.length?h[0]:new t(h)}function e(n){for(var t=0,r=n.ranges(),i=0;i<r.length;++i){var e=r[i];t+=e.max()-e.min()+1}return t}function o(n,t){return n.min()<t.min()?-1:n.min()>t.min()?1:n.max()<t.max()?-1:t.max()>n.max()?1:0}function a(n,t){return n._min<t._min?-1:n._min>t._min?1:n._max<t._max?-1:t._max>n._max?1:0}return n.prototype.min=function(){return this._min},n.prototype.max=function(){return this._max},n.prototype.contains=function(n){return n>=this._min&&n<=this._max},n.prototype.isContiguous=function(){return!0},n.prototype.ranges=function(){return[this]},n.prototype._pushRanges=function(n){n.push(this)},n.prototype.toString=function(){return"["+this._min+"-"+this._max+"]"},t.prototype.min=function(){return this._ranges[0].min()},t.prototype.max=function(){return this._ranges[this._ranges.length-1].max()},t.prototype.lower_bound=function(n){var t=this.ranges();if(n>this.max())return t.length;if(n<this.min())return 0;for(var r=0,i=t.length-1;r<=i;){var e=Math.floor((r+i)/2);if(n>t[e]._max)r=e+1;else{if(!(n<t[e]._min))return e;i=e-1}}return r},t.prototype.contains=function(n){var t=this.lower_bound(n);return!!(t<this._ranges.length&&this._ranges[t].contains(n))},t.prototype.insertRange=function(n){var t=this.lower_bound(n._min);if(t===this._ranges.length)return void this._ranges.push(n);var r=this.ranges();if(n._max<r[t]._min)return void this._ranges.splice(t,0,n);r[t]._min<n._min&&(n._min=r[t]._min);for(var i=t+1;i<r.length&&r[i]._min<=n._max;)i++;i--,r[i]._max>n._max&&(n._max=r[i]._max),this._ranges.splice(t,i-t+1,n)},t.prototype.isContiguous=function(){return this._ranges.length>1},t.prototype.ranges=function(){return this._ranges},t.prototype._pushRanges=function(n){for(var t=0;t<this._ranges.length;++t)n.push(this._ranges[t])},t.prototype.toString=function(){for(var n="",t=0;t<this._ranges.length;++t)t>0&&(n+=","),n+=this._ranges[t].toString();return n},{Range:n,union:r,intersection:i,coverage:e,rangeOver:o,_rangeOrder:a}});
//# sourceMappingURL=../../../maps/libs/bbi/spans.js.map
define([],function(){"use strict";function n(n,t){if("number"!=typeof n||"number"!=typeof t)throw"Bad range "+n+","+t;this._min=n,this._max=t}function t(n){var t=n.sort(a),r=[],i=t.shift();t.forEach(function(n){n._min<=i._max?n._max>i._max&&(i._max=n._max):(r.push(i),i=n)}),r.push(i),this._ranges=r}function r(n,r){return n instanceof t||(n instanceof Array||(n=[n]),n=new t(n)),r&&n.insertRange(r),n}function i(r,i){for(var e=r.ranges(),o=i.ranges(),a=e.length,s=o.length,u=0,m=0,h=[];u<a&&m<s;){var r=e[u],i=o[m],_=Math.max(r.min(),i.min()),g=Math.min(r.max(),i.max());g>=_&&h.push(new n(_,g)),r.max()>i.max()?++m:++u}return 0==h.length?null:1==h.length?h[0]:new t(h)}function e(n){for(var t=0,r=n.ranges(),i=0;i<r.length;++i){var e=r[i];t+=e.max()-e.min()+1}return t}function o(n,t){return n.min()<t.min()?-1:n.min()>t.min()?1:n.max()<t.max()?-1:t.max()>n.max()?1:0}function a(n,t){return n._min<t._min?-1:n._min>t._min?1:n._max<t._max?-1:t._max>n._max?1:0}return n.prototype.min=function(){return this._min},n.prototype.max=function(){return this._max},n.prototype.contains=function(n){return n>=this._min&&n<=this._max},n.prototype.isContiguous=function(){return!0},n.prototype.ranges=function(){return[this]},n.prototype._pushRanges=function(n){n.push(this)},n.prototype.toString=function(){return"["+this._min+"-"+this._max+"]"},t.prototype.min=function(){return this._ranges[0].min()},t.prototype.max=function(){return this._ranges[this._ranges.length-1].max()},t.prototype.lower_bound=function(n){var t=this.ranges();if(n>this.max())return t.length;if(n<this.min())return 0;for(var r=0,i=t.length-1;r<=i;){var e=Math.floor((r+i)/2);if(n>t[e]._max)r=e+1;else{if(!(n<t[e]._min))return e;i=e-1}}return r},t.prototype.contains=function(n){var t=this.lower_bound(n);return!!(t<this._ranges.length&&this._ranges[t].contains(n))},t.prototype.insertRange=function(n){var t=this.lower_bound(n._min);if(t===this._ranges.length)return void this._ranges.push(n);var r=this.ranges();if(n._max<r[t]._min)return void this._ranges.splice(t,0,n);r[t]._min<n._min&&(n._min=r[t]._min);for(var i=t+1;i<r.length&&r[i]._min<=n._max;)i++;i--,r[i]._max>n._max&&(n._max=r[i]._max),this._ranges.splice(t,i-t+1,n)},t.prototype.isContiguous=function(){return this._ranges.length>1},t.prototype.ranges=function(){return this._ranges},t.prototype._pushRanges=function(n){for(var t=0;t<this._ranges.length;++t)n.push(this._ranges[t])},t.prototype.toString=function(){for(var n="",t=0;t<this._ranges.length;++t)t>0&&(n+=","),n+=this._ranges[t].toString();return n},{Range:n,union:r,intersection:i,coverage:e,rangeOver:o,_rangeOrder:a}});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -2
View File
File diff suppressed because one or more lines are too long
+5 -6
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -1,2 +1 @@
"use strict";!function(n){n.fn.extend({complexify:function(t,e){function r(n,t){for(var e=n.length-1;e>=0;e--)if(t[0]<=n.charCodeAt(e)&&n.charCodeAt(e)<=t[1])return t[1]-t[0]+1;return 0}function a(e){if("strict"===t.banMode){for(var r=0;r<t.bannedPasswords.length;r++)if(-1!==e.toLowerCase().indexOf(t.bannedPasswords[r].toLowerCase()))return!0;return!1}return n.inArray(e,t.bannedPasswords)>-1}function i(){var i=n(this).val(),h=0,u=!1;if(a(i))h=1;else for(var f=c.length-1;f>=0;f--)h+=r(i,c[f]);h=Math.log(Math.pow(h,i.length))*(1/t.strengthScaleFactor),u=h>s&&i.length>=t.minimumChars,h=h/o*100,h=h>100?100:h,e.call(this,u,h)}var s=49,o=120,c=[[32,32],[48,57],[65,90],[97,122],[33,47],[58,64],[91,96],[123,126],[128,255],[256,383],[384,591],[592,687],[688,767],[768,879],[880,1023],[1024,1279],[1328,1423],[1424,1535],[1536,1791],[1792,1871],[1920,1983],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3456,3583],[3584,3711],[3712,3839],[3840,4095],[4096,4255],[4256,4351],[4352,4607],[4608,4991],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[7680,7935],[7936,8191],[8192,8303],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703],[8704,8959],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[10240,10495],[11904,12031],[12032,12255],[12272,12287],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[55296,56191],[56192,56319],[56320,57343],[57344,63743],[63744,64255],[64256,64335],[64336,65023],[65056,65071],[65072,65103],[65104,65135],[65136,65278],[65279,65279],[65280,65519],[65520,65533]],h={minimumChars:8,strengthScaleFactor:1,bannedPasswords:window.COMPLEXIFY_BANLIST||[],banMode:"strict"};return n.isFunction(t)&&!e&&(e=t,t={}),t=n.extend(h,t),this.each(function(){n(this).val()&&i.apply(this)}),this.each(function(){n(this).bind("keyup focus input propertychange mouseup",i)})}})}(jQuery);
//# sourceMappingURL=../../maps/libs/jquery.complexify.js.map
!function(n){n.fn.extend({complexify:function(t,e){function r(n,t){for(var e=n.length-1;e>=0;e--)if(t[0]<=n.charCodeAt(e)&&n.charCodeAt(e)<=t[1])return t[1]-t[0]+1;return 0}function a(e){if("strict"===t.banMode){for(var r=0;r<t.bannedPasswords.length;r++)if(-1!==e.toLowerCase().indexOf(t.bannedPasswords[r].toLowerCase()))return!0;return!1}return n.inArray(e,t.bannedPasswords)>-1}function i(){var i=n(this).val(),c=0,u=!1;if(a(i))c=1;else for(var f=h.length-1;f>=0;f--)c+=r(i,h[f]);c=Math.log(Math.pow(c,i.length))*(1/t.strengthScaleFactor),u=c>o&&i.length>=t.minimumChars,c=c/s*100,c=c>100?100:c,e.call(this,u,c)}var o=49,s=120,h=[[32,32],[48,57],[65,90],[97,122],[33,47],[58,64],[91,96],[123,126],[128,255],[256,383],[384,591],[592,687],[688,767],[768,879],[880,1023],[1024,1279],[1328,1423],[1424,1535],[1536,1791],[1792,1871],[1920,1983],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3456,3583],[3584,3711],[3712,3839],[3840,4095],[4096,4255],[4256,4351],[4352,4607],[4608,4991],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[7680,7935],[7936,8191],[8192,8303],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703],[8704,8959],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[10240,10495],[11904,12031],[12032,12255],[12272,12287],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[55296,56191],[56192,56319],[56320,57343],[57344,63743],[63744,64255],[64256,64335],[64336,65023],[65056,65071],[65072,65103],[65104,65135],[65136,65278],[65279,65279],[65280,65519],[65520,65533]],c={minimumChars:8,strengthScaleFactor:1,bannedPasswords:window.COMPLEXIFY_BANLIST||[],banMode:"strict"};return n.isFunction(t)&&!e&&(e=t,t={}),t=n.extend(c,t),this.each(function(){n(this).val()&&i.apply(this)}),this.each(function(){n(this).bind("keyup focus input propertychange mouseup",i)})}})}(jQuery);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -1,2 +1 @@
"use strict";jQuery.cookie=function(e,i,o){if(void 0===i){var r=null;if(document.cookie&&""!=document.cookie)for(var t=document.cookie.split(";"),n=0;n<t.length;n++){var s=jQuery.trim(t[n]);if(s.substring(0,e.length+1)==e+"="){r=decodeURIComponent(s.substring(e.length+1));break}}return r}o=o||{},null===i&&(i="",o=$.extend({},o),o.expires=-1);var u="";if(o.expires&&("number"==typeof o.expires||o.expires.toUTCString)){var p;"number"==typeof o.expires?(p=new Date,p.setTime(p.getTime()+24*o.expires*60*60*1e3)):p=o.expires,u="; expires="+p.toUTCString()}var c=o.path?"; path="+o.path:"",a=o.domain?"; domain="+o.domain:"",m=o.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(i),u,c,a,m].join("")};
//# sourceMappingURL=../../../maps/libs/jquery/jquery.cookie.js.map
jQuery.cookie=function(e,i,o){if(void 0===i){var n=null;if(document.cookie&&""!=document.cookie)for(var r=document.cookie.split(";"),t=0;t<r.length;t++){var p=jQuery.trim(r[t]);if(p.substring(0,e.length+1)==e+"="){n=decodeURIComponent(p.substring(e.length+1));break}}return n}o=o||{},null===i&&(i="",o=$.extend({},o),o.expires=-1);var s="";if(o.expires&&("number"==typeof o.expires||o.expires.toUTCString)){var u;"number"==typeof o.expires?(u=new Date,u.setTime(u.getTime()+24*o.expires*60*60*1e3)):u=o.expires,s="; expires="+u.toUTCString()}var a=o.path?"; path="+o.path:"",c=o.domain?"; domain="+o.domain:"",m=o.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(i),s,a,c,m].join("")};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1 @@
"use strict";!function(t){t.fn.drop=function(e,a,i){var n="string"==typeof e?e:"",o=t.isFunction(e)?e:t.isFunction(a)?a:null;return 0!==n.indexOf("drop")&&(n="drop"+n),i=(e==o?a:i)||{},o?this.bind(n,i,o):this.trigger(n)},t.drop=function(e){e=e||{},i.multi=!0===e.multi?1/0:!1===e.multi?1:isNaN(e.multi)?i.multi:e.multi,i.delay=e.delay||i.delay,i.tolerance=t.isFunction(e.tolerance)?e.tolerance:null===e.tolerance?null:i.tolerance,i.mode=e.mode||i.mode||"intersect"};var e=t.event,a=e.special,i=t.event.special.drop={multi:1,delay:20,mode:"overlap",targets:[],datakey:"dropdata",noBubble:!0,add:function(e){t.data(this,i.datakey).related+=1},remove:function(){t.data(this,i.datakey).related-=1},setup:function(){if(!t.data(this,i.datakey)){var e={related:0,active:[],anyactive:0,winner:0,location:{}};t.data(this,i.datakey,e),i.targets.push(this)}},teardown:function(){if(!(t.data(this,i.datakey)||{}).related){t.removeData(this,i.datakey);var e=this;i.targets=t.grep(i.targets,function(t){return t!==e})}},handler:function(e,n){var o;if(n)switch(e.type){case"mousedown":case"touchstart":o=t(i.targets),"string"==typeof n.drop&&(o=o.filter(n.drop)),o.each(function(){var e=t.data(this,i.datakey);e.active=[],e.anyactive=0,e.winner=0}),n.droppable=o,a.drag.hijack(e,"dropinit",n);break;case"mousemove":case"touchmove":i.event=e,i.timer||i.tolerate(n);break;case"mouseup":case"touchend":i.timer=clearTimeout(i.timer),n.propagates&&(a.drag.hijack(e,"drop",n),a.drag.hijack(e,"dropend",n))}},locate:function(e,a){var n=t.data(e,i.datakey),o=t(e),r=o.offset()||{},d=o.outerHeight(),l=o.outerWidth(),c={elem:e,width:l,height:d,top:r.top,left:r.left,right:r.left+l,bottom:r.top+d};return n&&(n.location=c,n.index=a,n.elem=e),c},contains:function(t,e){return(e[0]||e.left)>=t.left&&(e[0]||e.right)<=t.right&&(e[1]||e.top)>=t.top&&(e[1]||e.bottom)<=t.bottom},modes:{intersect:function(t,e,a){return this.contains(a,[t.pageX,t.pageY])?1e9:this.modes.overlap.apply(this,arguments)},overlap:function(t,e,a){return Math.max(0,Math.min(a.bottom,e.bottom)-Math.max(a.top,e.top))*Math.max(0,Math.min(a.right,e.right)-Math.max(a.left,e.left))},fit:function(t,e,a){return this.contains(a,e)?1:0},middle:function(t,e,a){return this.contains(a,[e.left+.5*e.width,e.top+.5*e.height])?1:0}},sort:function(t,e){return e.winner-t.winner||t.index-e.index},tolerate:function(e){var n,o,r,d,l,c,s,u,p=0,h=e.interactions.length,m=[i.event.pageX,i.event.pageY],f=i.tolerance||i.modes[i.mode];do{if(u=e.interactions[p]){if(!u)return;u.drop=[],l=[],c=u.droppable.length,f&&(r=i.locate(u.proxy)),n=0;do{if(s=u.droppable[n]){if(d=t.data(s,i.datakey),!(o=d.location))continue;d.winner=f?f.call(i,i.event,r,o):i.contains(o,m)?1:0,l.push(d)}}while(++n<c);l.sort(i.sort),n=0;do{(d=l[n])&&(d.winner&&u.drop.length<i.multi?(d.active[p]||d.anyactive||(!1!==a.drag.hijack(i.event,"dropstart",e,p,d.elem)[0]?(d.active[p]=1,d.anyactive+=1):d.winner=0),d.winner&&u.drop.push(d.elem)):d.active[p]&&1==d.anyactive&&(a.drag.hijack(i.event,"dropend",e,p,d.elem),d.active[p]=0,d.anyactive-=1))}while(++n<c)}}while(++p<h);i.last&&m[0]==i.last.pageX&&m[1]==i.last.pageY?delete i.timer:i.timer=setTimeout(function(){i.tolerate(e)},i.delay),i.last=i.event}};a.dropinit=a.dropstart=a.dropend=i}(jQuery);
//# sourceMappingURL=../../../maps/libs/jquery/jquery.event.drop.js.map
!function(t){t.fn.drop=function(e,a,i){var n="string"==typeof e?e:"",o=t.isFunction(e)?e:t.isFunction(a)?a:null;return 0!==n.indexOf("drop")&&(n="drop"+n),i=(e==o?a:i)||{},o?this.bind(n,i,o):this.trigger(n)},t.drop=function(e){e=e||{},i.multi=!0===e.multi?1/0:!1===e.multi?1:isNaN(e.multi)?i.multi:e.multi,i.delay=e.delay||i.delay,i.tolerance=t.isFunction(e.tolerance)?e.tolerance:null===e.tolerance?null:i.tolerance,i.mode=e.mode||i.mode||"intersect"};var e=t.event,a=e.special,i=t.event.special.drop={multi:1,delay:20,mode:"overlap",targets:[],datakey:"dropdata",noBubble:!0,add:function(e){t.data(this,i.datakey).related+=1},remove:function(){t.data(this,i.datakey).related-=1},setup:function(){if(!t.data(this,i.datakey)){var e={related:0,active:[],anyactive:0,winner:0,location:{}};t.data(this,i.datakey,e),i.targets.push(this)}},teardown:function(){if(!(t.data(this,i.datakey)||{}).related){t.removeData(this,i.datakey);var e=this;i.targets=t.grep(i.targets,function(t){return t!==e})}},handler:function(e,n){var o;if(n)switch(e.type){case"mousedown":case"touchstart":o=t(i.targets),"string"==typeof n.drop&&(o=o.filter(n.drop)),o.each(function(){var e=t.data(this,i.datakey);e.active=[],e.anyactive=0,e.winner=0}),n.droppable=o,a.drag.hijack(e,"dropinit",n);break;case"mousemove":case"touchmove":i.event=e,i.timer||i.tolerate(n);break;case"mouseup":case"touchend":i.timer=clearTimeout(i.timer),n.propagates&&(a.drag.hijack(e,"drop",n),a.drag.hijack(e,"dropend",n))}},locate:function(e,a){var n=t.data(e,i.datakey),o=t(e),r=o.offset()||{},d=o.outerHeight(),l=o.outerWidth(),c={elem:e,width:l,height:d,top:r.top,left:r.left,right:r.left+l,bottom:r.top+d};return n&&(n.location=c,n.index=a,n.elem=e),c},contains:function(t,e){return(e[0]||e.left)>=t.left&&(e[0]||e.right)<=t.right&&(e[1]||e.top)>=t.top&&(e[1]||e.bottom)<=t.bottom},modes:{intersect:function(t,e,a){return this.contains(a,[t.pageX,t.pageY])?1e9:this.modes.overlap.apply(this,arguments)},overlap:function(t,e,a){return Math.max(0,Math.min(a.bottom,e.bottom)-Math.max(a.top,e.top))*Math.max(0,Math.min(a.right,e.right)-Math.max(a.left,e.left))},fit:function(t,e,a){return this.contains(a,e)?1:0},middle:function(t,e,a){return this.contains(a,[e.left+.5*e.width,e.top+.5*e.height])?1:0}},sort:function(t,e){return e.winner-t.winner||t.index-e.index},tolerate:function(e){var n,o,r,d,l,c,s,u,p=0,h=e.interactions.length,m=[i.event.pageX,i.event.pageY],f=i.tolerance||i.modes[i.mode];do{if(u=e.interactions[p]){if(!u)return;u.drop=[],l=[],c=u.droppable.length,f&&(r=i.locate(u.proxy)),n=0;do{if(s=u.droppable[n]){if(d=t.data(s,i.datakey),!(o=d.location))continue;d.winner=f?f.call(i,i.event,r,o):i.contains(o,m)?1:0,l.push(d)}}while(++n<c);l.sort(i.sort),n=0;do{(d=l[n])&&(d.winner&&u.drop.length<i.multi?(d.active[p]||d.anyactive||(!1!==a.drag.hijack(i.event,"dropstart",e,p,d.elem)[0]?(d.active[p]=1,d.anyactive+=1):d.winner=0),d.winner&&u.drop.push(d.elem)):d.active[p]&&1==d.anyactive&&(a.drag.hijack(i.event,"dropend",e,p,d.elem),d.active[p]=0,d.anyactive-=1))}while(++n<c)}}while(++p<h);i.last&&m[0]==i.last.pageX&&m[1]==i.last.pageY?delete i.timer:i.timer=setTimeout(function(){i.tolerate(e)},i.delay),i.last=i.event}};a.dropinit=a.dropstart=a.dropend=i}(jQuery);
@@ -1,2 +1 @@
"use strict";!function(e){function t(o){function s(){t(v)}var v=o.data||o;switch(o.type){case"mouseenter":v.dist2=0,v.event=o,o.type="hoverstart",!1!==e.event.dispatch.call(this,o)&&(v.elem=this,e.event.add(this,"mousemove",t,v),v.timer=setTimeout(s,v.delay));break;case"mousemove":v.dist2+=Math.pow(o.pageX-v.event.pageX,2)+Math.pow(o.pageY-v.event.pageY,2),v.event=o;break;case"mouseleave":clearTimeout(v.timer),v.hovered?(o.type="hoverend",e.event.dispatch.call(this,o),v.hovered--):e.event.remove(v.elem,"mousemove",t);break;default:v.dist2<=Math.pow(v.speed*(v.delay/1e3),2)?(e.event.remove(v.elem,"mousemove",t),v.event.type="hover",!1!==e.event.dispatch.call(v.elem,v.event)&&v.hovered++):v.timer=setTimeout(s,v.delay),v.dist2=0}}e.fn._hover=e.fn.hover,e.fn.hover=function(e,t,o){return o&&this.bind("hoverstart",e),t&&this.bind("hoverend",o||t),e?this.bind("hover",o?t:e):this.trigger("hover")};var o=e.event.special.hover={delay:100,speed:100,setup:function(s){s=e.extend({speed:o.speed,delay:o.delay,hovered:0},s||{}),e.event.add(this,"mouseenter mouseleave",t,s)},teardown:function(){e.event.remove(this,"mouseenter mouseleave",t)}}}(jQuery);
//# sourceMappingURL=../../../maps/libs/jquery/jquery.event.hover.js.map
!function(e){function t(o){function v(){t(n)}var n=o.data||o;switch(o.type){case"mouseenter":n.dist2=0,n.event=o,o.type="hoverstart",!1!==e.event.dispatch.call(this,o)&&(n.elem=this,e.event.add(this,"mousemove",t,n),n.timer=setTimeout(v,n.delay));break;case"mousemove":n.dist2+=Math.pow(o.pageX-n.event.pageX,2)+Math.pow(o.pageY-n.event.pageY,2),n.event=o;break;case"mouseleave":clearTimeout(n.timer),n.hovered?(o.type="hoverend",e.event.dispatch.call(this,o),n.hovered--):e.event.remove(n.elem,"mousemove",t);break;default:n.dist2<=Math.pow(n.speed*(n.delay/1e3),2)?(e.event.remove(n.elem,"mousemove",t),n.event.type="hover",!1!==e.event.dispatch.call(n.elem,n.event)&&n.hovered++):n.timer=setTimeout(v,n.delay),n.dist2=0}}e.fn._hover=e.fn.hover,e.fn.hover=function(e,t,o){return o&&this.bind("hoverstart",e),t&&this.bind("hoverend",o||t),e?this.bind("hover",o?t:e):this.trigger("hover")};var o=e.event.special.hover={delay:100,speed:100,setup:function(v){v=e.extend({speed:o.speed,delay:o.delay,hovered:0},v||{}),e.event.add(this,"mouseenter mouseleave",t,v)},teardown:function(){e.event.remove(this,"mouseenter mouseleave",t)}}}(jQuery);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1 @@
"use strict";!function(e){!function(e){function t(t){var o,s=t||window.event,i=[].slice.call(arguments,1),h=0,a=0,u=0,r=0,d=0;return t=e.event.fix(s),t.type="mousewheel",s.wheelDelta&&(h=s.wheelDelta),s.detail&&(h=-1*s.detail),s.deltaY&&(u=-1*s.deltaY,h=u),s.deltaX&&(a=s.deltaX,h=-1*a),void 0!==s.wheelDeltaY&&(u=s.wheelDeltaY),void 0!==s.wheelDeltaX&&(a=-1*s.wheelDeltaX),r=Math.abs(h),(!l||r<l)&&(l=r),d=Math.max(Math.abs(u),Math.abs(a)),(!n||d<n)&&(n=d),o=h>0?"floor":"ceil",h=Math[o](h/l),a=Math[o](a/n),u=Math[o](u/n),i.unshift(t,h,a,u),(e.event.dispatch||e.event.handle).apply(this,i)}var l,n,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var i=o.length;i;)e.event.fixHooks[o[--i]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=s.length;e;)this.addEventListener(s[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=s.length;e;)this.removeEventListener(s[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery)}();
//# sourceMappingURL=../../../maps/libs/jquery/jquery.mousewheel.js.map
!function(e){!function(e){function t(t){var o,h=t||window.event,i=[].slice.call(arguments,1),s=0,a=0,u=0,r=0,d=0;return t=e.event.fix(h),t.type="mousewheel",h.wheelDelta&&(s=h.wheelDelta),h.detail&&(s=-1*h.detail),h.deltaY&&(u=-1*h.deltaY,s=u),h.deltaX&&(a=h.deltaX,s=-1*a),void 0!==h.wheelDeltaY&&(u=h.wheelDeltaY),void 0!==h.wheelDeltaX&&(a=-1*h.wheelDeltaX),r=Math.abs(s),(!l||r<l)&&(l=r),d=Math.max(Math.abs(u),Math.abs(a)),(!n||d<n)&&(n=d),o=s>0?"floor":"ceil",s=Math[o](s/l),a=Math[o](a/n),u=Math[o](u/n),i.unshift(t,s,a,u),(e.event.dispatch||e.event.handle).apply(this,i)}var l,n,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var i=o.length;i;)e.event.fixHooks[o[--i]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=h.length;e;)this.addEventListener(h[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=h.length;e;)this.removeEventListener(h[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery)}();
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -1,2 +1 @@
"use strict";!function(e){e([],function(){var e=jQuery;return function(){function n(e,n,t){return c({type:m.error,iconClass:l().iconClasses.error,message:e,optionsOverride:t,title:n})}function t(e,n,t){return c({type:m.info,iconClass:l().iconClasses.info,message:e,optionsOverride:t,title:n})}function o(e){g=e}function i(e,n,t){return c({type:m.success,iconClass:l().iconClasses.success,message:e,optionsOverride:t,title:n})}function s(e,n,t){return c({type:m.warning,iconClass:l().iconClasses.warning,message:e,optionsOverride:t,title:n})}function a(n){var t=l();if(f||u(t),n&&0===e(":focus",n).length)return void n[t.hideMethod]({duration:t.hideDuration,easing:t.hideEasing,complete:function(){p(n)}});f.children().length&&f[t.hideMethod]({duration:t.hideDuration,easing:t.hideEasing,complete:function(){f.remove()}})}function r(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:"<button>&times;</button>",newestOnTop:!0}}function d(e){g&&g(e)}function c(n){function t(n){if(!e(":focus",c).length||n)return c[s.hideMethod]({duration:s.hideDuration,easing:s.hideEasing,complete:function(){p(c),s.onHidden&&s.onHidden(),w.state="hidden",w.endTime=new Date,d(w)}})}function o(){(s.timeOut>0||s.extendedTimeOut>0)&&(r=setTimeout(t,s.extendedTimeOut))}function i(){clearTimeout(r),c.stop(!0,!0)[s.showMethod]({duration:s.showDuration,easing:s.showEasing})}var s=l(),a=n.iconClass||s.iconClass;void 0!==n.optionsOverride&&(s=e.extend(s,n.optionsOverride),a=n.optionsOverride.iconClass||a),h++,f=u(s);var r=null,c=e("<div/>"),g=e("<div/>"),m=e("<div/>"),C=e(s.closeHtml),w={toastId:h,state:"visible",startTime:new Date,options:s,map:n};return n.iconClass&&c.addClass(s.toastClass).addClass(a),n.title&&(g.append(n.title).addClass(s.titleClass),c.append(g)),n.message&&(m.append(n.message).addClass(s.messageClass),c.append(m)),s.closeButton&&(C.addClass("toast-close-button"),c.prepend(C)),c.hide(),s.newestOnTop?f.prepend(c):f.append(c),c[s.showMethod]({duration:s.showDuration,easing:s.showEasing,complete:s.onShown}),s.timeOut>0&&(r=setTimeout(t,s.timeOut)),c.hover(i,o),!s.onclick&&s.tapToDismiss&&c.click(t),s.closeButton&&C&&C.click(function(e){e.stopPropagation(),t(!0)}),s.onclick&&c.click(function(){s.onclick(),t()}),d(w),s.debug&&console&&console.log(w),c}function u(n){return n||(n=l()),f=e("#"+n.containerId),f.length?f:(f=e("<div/>").attr("id",n.containerId).addClass(n.positionClass),f.appendTo(e(n.target)),f)}function l(){return e.extend({},r(),C.options)}function p(e){f||(f=u()),e.is(":visible")||(e.remove(),e=null,0===f.children().length&&f.remove())}var f,g,h=0,m={error:"error",info:"info",success:"success",warning:"warning"},C={clear:a,error:n,getContainer:u,info:t,options:{},subscribe:o,success:i,version:"2.0.1",warning:s};return C}()})}("function"==typeof define&&define.amd?define:function(e,n){"undefined"!=typeof module&&module.exports?module.exports=n(require(e[0])):window.toastr=n(window.jQuery)});
//# sourceMappingURL=../../maps/libs/toastr.js.map
!function(e){e([],function(){var e=jQuery;return function(){function n(e,n,t){return c({type:m.error,iconClass:l().iconClasses.error,message:e,optionsOverride:t,title:n})}function t(e,n,t){return c({type:m.info,iconClass:l().iconClasses.info,message:e,optionsOverride:t,title:n})}function o(e){g=e}function i(e,n,t){return c({type:m.success,iconClass:l().iconClasses.success,message:e,optionsOverride:t,title:n})}function s(e,n,t){return c({type:m.warning,iconClass:l().iconClasses.warning,message:e,optionsOverride:t,title:n})}function a(n){var t=l();if(f||u(t),n&&0===e(":focus",n).length)return void n[t.hideMethod]({duration:t.hideDuration,easing:t.hideEasing,complete:function(){p(n)}});f.children().length&&f[t.hideMethod]({duration:t.hideDuration,easing:t.hideEasing,complete:function(){f.remove()}})}function r(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:"<button>&times;</button>",newestOnTop:!0}}function d(e){g&&g(e)}function c(n){function t(n){if(!e(":focus",c).length||n)return c[s.hideMethod]({duration:s.hideDuration,easing:s.hideEasing,complete:function(){p(c),s.onHidden&&s.onHidden(),w.state="hidden",w.endTime=new Date,d(w)}})}function o(){(s.timeOut>0||s.extendedTimeOut>0)&&(r=setTimeout(t,s.extendedTimeOut))}function i(){clearTimeout(r),c.stop(!0,!0)[s.showMethod]({duration:s.showDuration,easing:s.showEasing})}var s=l(),a=n.iconClass||s.iconClass;void 0!==n.optionsOverride&&(s=e.extend(s,n.optionsOverride),a=n.optionsOverride.iconClass||a),h++,f=u(s);var r=null,c=e("<div/>"),g=e("<div/>"),m=e("<div/>"),C=e(s.closeHtml),w={toastId:h,state:"visible",startTime:new Date,options:s,map:n};return n.iconClass&&c.addClass(s.toastClass).addClass(a),n.title&&(g.append(n.title).addClass(s.titleClass),c.append(g)),n.message&&(m.append(n.message).addClass(s.messageClass),c.append(m)),s.closeButton&&(C.addClass("toast-close-button"),c.prepend(C)),c.hide(),s.newestOnTop?f.prepend(c):f.append(c),c[s.showMethod]({duration:s.showDuration,easing:s.showEasing,complete:s.onShown}),s.timeOut>0&&(r=setTimeout(t,s.timeOut)),c.hover(i,o),!s.onclick&&s.tapToDismiss&&c.click(t),s.closeButton&&C&&C.click(function(e){e.stopPropagation(),t(!0)}),s.onclick&&c.click(function(){s.onclick(),t()}),d(w),s.debug&&console&&console.log(w),c}function u(n){return n||(n=l()),f=e("#"+n.containerId),f.length?f:(f=e("<div/>").attr("id",n.containerId).addClass(n.positionClass),f.appendTo(e(n.target)),f)}function l(){return e.extend({},r(),C.options)}function p(e){f||(f=u()),e.is(":visible")||(e.remove(),e=null,0===f.children().length&&f.remove())}var f,g,h=0,m={error:"error",info:"info",success:"success",warning:"warning"},C={clear:a,error:n,getContainer:u,info:t,options:{},subscribe:o,success:i,version:"2.0.1",warning:s};return C}()})}("function"==typeof define&&define.amd?define:function(e,n){"undefined"!=typeof module&&module.exports?module.exports=n(require(e[0])):window.toastr=n(window.jQuery)});
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
"use strict";define([],function(){function t(t,i,e){this.app=t,this.cv=i,this.cc=this.cv.find("#canvas-container"),this.overview=e,this.oc=e.find("#overview-canvas"),this.ov=e.find("#overview-viewport"),this.init_drag()}function i(t){this.panel=t}return $.extend(t.prototype,{init_drag:function(){var t=this,e=function(i,e){i=Math.min(i,t.cv.width()/2),i=Math.max(i,-t.cc.width()+t.cv.width()/2),e=Math.min(e,t.cv.height()/2),e=Math.max(e,-t.cc.height()+t.cv.height()/2),t.cc.css({left:i,top:e}),t.cv.css({"background-position-x":i,"background-position-y":e}),t.update_viewport_overlay()};this.cc.each(function(){this.scroll_panel=new i(this)});var o,h;this.cv.bind("dragstart",function(){var i=$(this).offset(),e=t.cc.position();h=e.top-i.top,o=e.left-i.left}).bind("drag",function(t,i){e(i.offsetX+o,i.offsetY+h)}).bind("dragend",function(){t.app.workflow.fit_canvas_to_nodes(),t.draw_overview()}),this.overview.click(function(i){if(t.overview.hasClass("blockaclick"))t.overview.removeClass("blockaclick");else{var o=t.cc.width(),h=t.cc.height(),s=t.oc.width(),c=t.oc.height(),n=i.pageX-t.oc.offset().left-t.ov.width()/2,a=i.pageY-t.oc.offset().top-t.ov.height()/2;e(-(n/s)*o,-(a/c)*h),t.app.workflow.fit_canvas_to_nodes(),t.draw_overview()}}),this.ov.bind("drag",function(i,o){var h=t.cc.width(),s=t.cc.height(),c=t.oc.width(),n=t.oc.height(),a=o.offsetX-t.overview.offset().left,f=o.offsetY-t.overview.offset().top;e(-(a/c)*h,-(f/n)*s)}).bind("dragend",function(){t.overview.addClass("blockaclick"),t.app.workflow.fit_canvas_to_nodes(),t.draw_overview()}),$("#overview-border").bind("drag",function(i,e){var o=$(this).offsetParent(),h=o.offset(),s=Math.max(o.width()-(e.offsetX-h.left),o.height()-(e.offsetY-h.top));$(this).css({width:s,height:s}),t.draw_overview()}),$("#overview-border div").bind("drag",function(){})},update_viewport_overlay:function(){var t=this.cc,i=this.cv,e=this.oc,o=this.ov,h=t.width(),s=t.height(),c=e.width(),n=e.height(),a=t.position();o.css({left:-(a.left/h)*c,top:-(a.top/s)*n,width:i.width()/h*c-2,height:i.height()/s*n-2})},draw_overview:function(){var t,i,e,o,h=$("#overview-canvas"),s=h.parent().parent().width(),c=h.get(0).getContext("2d"),n=$("#canvas-container").width(),a=$("#canvas-container").height(),f=this.cv.width(),r=this.cv.height();n<f&&a<r?(e=n/f*s,o=(s-e)/2,t=a/r*s,i=(s-t)/2):n<a?(i=0,t=s,e=Math.ceil(t*n/a),o=(s-e)/2):(e=s,o=0,t=Math.ceil(e*a/n),i=(s-t)/2),h.parent().css({left:o,top:i,width:e,height:t}),h.attr("width",e),h.attr("height",t),$.each(this.app.workflow.nodes,function(i,o){c.fillStyle="#D2C099",c.strokeStyle="#D8B365",c.lineWidth=1;var h=$(o.element),s=h.position(),f=s.left/n*e,r=s.top/a*t,v=h.width()/n*e,d=h.height()/a*t;o.errors?(c.fillStyle="#FFCCCC",c.strokeStyle="#AA6666"):void 0!==o.workflow_outputs&&o.workflow_outputs.length>0&&(c.fillStyle="#E8A92D",c.strokeStyle="#E8A92D"),c.fillRect(f,r,v,d),c.strokeRect(f,r,v,d)}),this.update_viewport_overlay()}}),$.extend(i.prototype,{test:function(t,i){clearTimeout(this.timeout);var e=t.pageX,o=t.pageY,h=$(this.panel),s=h.position(),c=h.width(),n=h.height(),a=h.parent(),f=a.width(),r=a.height(),v=a.offset(),d=v.left,l=v.top,w=d+a.width(),p=l+a.height(),g=-(c-f/2),u=-(n-r/2),_=f/2,k=r/2,m=!1;if(e-5<d){if(s.left<_){var b=Math.min(23,_-s.left);h.css("left",s.left+b),m=!0}}else if(e+5>w){if(s.left>g){var b=Math.min(23,s.left-g);h.css("left",s.left-b),m=!0}}else if(o-5<l){if(s.top<k){var b=Math.min(23,k-s.top);h.css("top",s.top+b),m=!0}}else if(o+5>p&&s.top>u){var b=Math.min(23,s.top-g);h.css("top",s.top-b+"px"),m=!0}if(m){i();var h=this;this.timeout=setTimeout(function(){h.test(t,i)},50)}},stop:function(t,i){clearTimeout(this.timeout)}}),t});
"use strict";define([],function(){function t(t,i,e){this.app=t,this.cv=i,this.cc=this.cv.find("#canvas-container"),this.overview=e,this.oc=e.find("#overview-canvas"),this.ov=e.find("#overview-viewport"),this.init_drag()}function i(t){this.panel=t}return $.extend(t.prototype,{init_drag:function(){var t=this,e=function(i,e){i=Math.min(i,t.cv.width()/2),i=Math.max(i,-t.cc.width()+t.cv.width()/2),e=Math.min(e,t.cv.height()/2),e=Math.max(e,-t.cc.height()+t.cv.height()/2),t.cc.css({left:i,top:e}),t.cv.css({"background-position-x":i,"background-position-y":e}),t.update_viewport_overlay()};this.cc.each(function(){this.scroll_panel=new i(this)});var o,h;this.cv.bind("dragstart",function(){var i=$(this).offset(),e=t.cc.position();h=e.top-i.top,o=e.left-i.left}).bind("drag",function(t,i){e(i.offsetX+o,i.offsetY+h)}).bind("dragend",function(){t.app.workflow.fit_canvas_to_nodes(),t.draw_overview()}),this.overview.click(function(i){if(t.overview.hasClass("blockaclick"))t.overview.removeClass("blockaclick");else{var o=t.cc.width(),h=t.cc.height(),s=t.oc.width(),c=t.oc.height(),n=i.pageX-t.oc.offset().left-t.ov.width()/2,a=i.pageY-t.oc.offset().top-t.ov.height()/2;e(-n/s*o,-a/c*h),t.app.workflow.fit_canvas_to_nodes(),t.draw_overview()}}),this.ov.bind("drag",function(i,o){var h=t.cc.width(),s=t.cc.height(),c=t.oc.width(),n=t.oc.height(),a=o.offsetX-t.overview.offset().left,f=o.offsetY-t.overview.offset().top;e(-a/c*h,-f/n*s)}).bind("dragend",function(){t.overview.addClass("blockaclick"),t.app.workflow.fit_canvas_to_nodes(),t.draw_overview()}),$("#overview-border").bind("drag",function(i,e){var o=$(this).offsetParent(),h=o.offset(),s=Math.max(o.width()-(e.offsetX-h.left),o.height()-(e.offsetY-h.top));$(this).css({width:s,height:s}),t.draw_overview()}),$("#overview-border div").bind("drag",function(){})},update_viewport_overlay:function(){var t=this.cc,i=this.cv,e=this.oc,o=this.ov,h=t.width(),s=t.height(),c=e.width(),n=e.height(),a=t.position();o.css({left:-a.left/h*c,top:-a.top/s*n,width:i.width()/h*c-2,height:i.height()/s*n-2})},draw_overview:function(){var t,i,e,o,h=$("#overview-canvas"),s=h.parent().parent().width(),c=h.get(0).getContext("2d"),n=$("#canvas-container").width(),a=$("#canvas-container").height(),f=this.cv.width(),r=this.cv.height();n<f&&a<r?(e=n/f*s,o=(s-e)/2,t=a/r*s,i=(s-t)/2):n<a?(i=0,t=s,e=Math.ceil(t*n/a),o=(s-e)/2):(e=s,o=0,t=Math.ceil(e*a/n),i=(s-t)/2),h.parent().css({left:o,top:i,width:e,height:t}),h.attr("width",e),h.attr("height",t),$.each(this.app.workflow.nodes,function(i,o){c.fillStyle="#D2C099",c.strokeStyle="#D8B365",c.lineWidth=1;var h=$(o.element),s=h.position(),f=s.left/n*e,r=s.top/a*t,v=h.width()/n*e,d=h.height()/a*t;o.errors?(c.fillStyle="#FFCCCC",c.strokeStyle="#AA6666"):void 0!==o.workflow_outputs&&o.workflow_outputs.length>0&&(c.fillStyle="#E8A92D",c.strokeStyle="#E8A92D"),c.fillRect(f,r,v,d),c.strokeRect(f,r,v,d)}),this.update_viewport_overlay()}}),$.extend(i.prototype,{test:function(t,i){clearTimeout(this.timeout);var e=t.pageX,o=t.pageY,h=$(this.panel),s=h.position(),c=h.width(),n=h.height(),a=h.parent(),f=a.width(),r=a.height(),v=a.offset(),d=v.left,l=v.top,w=d+a.width(),p=l+a.height(),g=-(c-f/2),u=-(n-r/2),_=f/2,k=r/2,m=!1;if(e-5<d){if(s.left<_){var b=Math.min(23,_-s.left);h.css("left",s.left+b),m=!0}}else if(e+5>w){if(s.left>g){var b=Math.min(23,s.left-g);h.css("left",s.left-b),m=!0}}else if(o-5<l){if(s.top<k){var b=Math.min(23,k-s.top);h.css("top",s.top+b),m=!0}}else if(o+5>p&&s.top>u){var b=Math.min(23,s.top-g);h.css("top",s.top-b+"px"),m=!0}if(m){i();var h=this;this.timeout=setTimeout(function(){h.test(t,i)},50)}},stop:function(t,i){clearTimeout(this.timeout)}}),t});
//# sourceMappingURL=../../../maps/mvc/workflow/workflow-canvas.js.map