vendor: 9,674 bytes, line 1
1!function(t,e,a,n){var r="touchstart mousedown",i="touchmove mousemove",l="touchend mouseup";t(a).ready(function(){function e(t){for(var e={},a=t.match(/([^;:]+)/g)||[];a.length;)e[a.shift()]=a.shift().trim();return e}t("table").each(function(){"dnd"===t(this).data("table")&&t(this).tableDnD({onDragStyle:t(this).data("ondragstyle")&&e(t(this).data("ondragstyle"))||null,onDropStyle:t(this).data("ondropstyle")&&e(t(this).data("ondropstyle"))||null,onDragClass:void 0===t(this).data("ondragclass")?"tDnD_whileDrag":t(this).data("ondragclass"),onDrop:t(this).data("ondrop")&&new Function("table","row",t(this).data("ondrop")),onDragStart:t(this).data("ondragstart")&&new Function("table","row",t(this).data("ondragstart")),onDragStop:t(this).data("ondragstop")&&new Function("table","row",t(this).data("ondragstop")),scrollAmount:t(this).data("scrollamount")||5,sensitivity:t(this).data("sensitivity")||10,hierarchyLevel:t(this).data("hierarchylevel")||0,indentArtifact:t(this).data("indentartifact")||'<div class="indent"> </div>',autoWidthAdjust:t(this).data("autowidthadjust")||!0,autoCleanRelations:t(this).data("autocleanrelations")||!0,jsonPretifySeparator:t(this).data("jsonpretifyseparator")||"\t",serializeRegexp:t(this).data("serializeregexp")&&new RegExp(t(this).data("serializeregexp"))||/[^\-]*$/,serializeParamName:t(this).data("serializeparamname")||!1,dragHandle:t(this).data("draghandle")||null})})}),jQuery.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldX:0,oldY:0,build:function(e){return this.each(function(){this.tableDnDConfig=t.extend({onDragStyle:null,onDropStyle:null,onDragClass:"tDnD_whileDrag",onDrop:null,onDragStart:null,onDragStop:null,scrollAmount:5,sensitivity:10,hierarchyLevel:0,indentArtifact:'<div class="indent"> </div>',autoWidthAdjust:!0,autoCleanRelations:!0,jsonPretifySeparator:"\t",serializeRegexp:/[^\-]*$/,serializeParamName:!1,dragHandle:null},e||{}),t.tableDnD.makeDraggable(this),this.tableDnDConfig.hierarchyLevel&&t.tableDnD.makeIndented(this)}),this},makeIndented:function(e){var a,n,r=e.tableDnDConfig,i=e.rows,l=t(i).first().find("td:first")[0],o=0,s=0;if(t(e).hasClass("indtd"))return null;n=t(e).addClass("indtd").attr("style"),t(e).css({whiteSpace:"nowrap"});for(var d=0;d<i.length;d++)s<t(i[d]).find("td:first").text().length&&(s=t(i[d]).find("td:first").text().length,a=d);for(t(l).css({width:"auto"}),d=0;d<r.hierarchyLevel;d++)t(i[a]).find("td:first").prepend(r.indentArtifact);for(l&&t(l).css({width:l.offsetWidth}),n&&t(e).css(n),d=0;d<r.hierarchyLevel;d++)t(i[a]).find("td:first").children(":first").remove();return r.hierarchyLevel&&t(i).each(function(){(o=t(this).data("level")||0)<=r.hierarchyLevel&&t(this).data("level",o)||t(this).data("level",0);for(var e=0;e<t(this).data("level");e++)t(this).find("td:first").prepend(r.indentArtifact)}),this},makeDraggable:function(e){var a=e.tableDnDConfig;a.dragHandle&&t(a.dragHandle,e).each(function(){t(this).bind(r,function(n){return t.tableDnD.initialiseDrag(t(this).parents("tr")[0],e,this,n,a),!1})})||t(e.rows).each(function(){t(this).hasClass("nodrag")?t(this).css("cursor",""):t(this).bind(r,function(n){if("TD"===n.target.tagName)return t.tableDnD.initialiseDrag(this,e,this,n,a),!1}).css("cursor","move")})},currentOrder:function(){var e=this.currentTable.rows;return t.map(e,function(e){return(t(e).data("level")+e.id).replace(/\s/g,"")}).join("")},initialiseDrag:function(e,n,r,o,s){this.dragObject=e,this.currentTable=n,this.mouseOffset=this.getMouseOffset(r,o),this.originalOrder=this.currentOrder(),t(a).bind(i,this.mousemove).bind(l,this.mouseup),s.onDragStart&&s.onDragStart(n,r)},updateTables:function(){this.each(function(){this.tableDnDConfig&&t.tableDnD.makeDraggable(this)})},mouseCoords:function(t){return t.originalEvent.changedTouches?{x:t.originalEvent.changedTouches[0].clientX,y:t.originalEvent.changedTouches[0].clientY}:t.pageX||t.pageY?{x:t.pageX,y:t.pageY}:{x:t.clientX+a.body.scrollLeft-a.body.clientLeft,y:t.clientY+a.body.scrollTop-a.body.clientTop}},getMouseOffset:function(t,a){var n,r;return a=a||e.event,r=this.getPosition(t),{x:(n=this.mouseCoords(a)).x-r.x,y:n.y-r.y}},getPosition:function(t){var e=0,a=0;for(0===t.offsetHeight&&(t=t.firstChild);t.offsetParent;)e+=t.offsetLeft,a+=t.offsetTop,t=t.offsetParent;return{x:e+=t.offsetLeft,y:a+=t.offsetTop}},autoScroll:function(n){var r=this.currentTable.tableDnDConfig,i=e.pageYOffset,l=e.innerHeight?e.innerHeight:a.documentElement.clientHeight?a.documentElement.clientHeight:a.body.clientHeight;a.all&&(void 0!==a.compatMode&&"BackCompat"!==a.compatMode?i=a.documentElement.scrollTop:void 0!==a.body&&(i=a.body.scrollTop));var o=t(this.currentTable).parent();if("hidden"==o.css("overflow")||"auto"==o.css("overflow")){var s=o[0].getBoundingClientRect(),d=s.top,h=s.bottom;n.y-i<d&&o.scrollTop(o.scrollTop()-r.scrollAmount)||n.y-i>h&&o.scrollTop(o.scrollTop()+r.scrollAmount),o.trigger("scroll")}else n.y-i<r.scrollAmount&&e.scrollBy(0,-r.scrollAmount)||l-(n.y-i)<r.scrollAmount&&e.scrollBy(0,r.scrollAmount)},moveVerticle:function(t,e){0!==t.vertical&&e&&this.dragObject!==e&&this.dragObject.parentNode===e.parentNode&&(0>t.vertical&&this.dragObject.parentNode.insertBefore(this.dragObject,e.nextSibling)||0<t.vertical&&this.dragObject.parentNode.insertBefore(this.dragObject,e))},moveHorizontal:function(e,a){var n,r=this.currentTable.tableDnDConfig;if(!r.hierarchyLevel||0===e.horizontal||!a||this.dragObject!==a)return null;n=t(a).data("level"),0<e.horizontal&&n>0&&t(a).find("td:first").children(":first").remove()&&t(a).data("level",--n),0>e.horizontal&&n<r.hierarchyLevel&&t(a).prev().data("level")>=n&&t(a).children(":first").prepend(r.indentArtifact)&&t(a).data("level",++n)},mousemove:function(e){var a,n,r,i,l,o=t(t.tableDnD.dragObject),s=t.tableDnD.currentTable.tableDnDConfig;return e&&e.preventDefault(),!!t.tableDnD.dragObject&&("touchmove"===e.type&&event.preventDefault(),s.onDragClass&&o.addClass(s.onDragClass)||o.css(s.onDragStyle),i=(n=t.tableDnD.mouseCoords(e)).x-t.tableDnD.mouseOffset.x,l=n.y-t.tableDnD.mouseOffset.y,t.tableDnD.autoScroll(n),a=t.tableDnD.findDropTargetRow(o,l),r=t.tableDnD.findDragDirection(i,l),t.tableDnD.moveVerticle(r,a),t.tableDnD.moveHorizontal(r,a),!1)},findDragDirection:function(t,e){var a=this.currentTable.tableDnDConfig.sensitivity,n=this.oldX,r=this.oldY,i={horizontal:t>=n-a&&t<=n+a?0:t>n?-1:1,vertical:e>=r-a&&e<=r+a?0:e>r?-1:1};return 0!==i.horizontal&&(this.oldX=t),0!==i.vertical&&(this.oldY=e),i},findDropTargetRow:function(e,a){for(var n=0,r=this.currentTable.rows,i=this.currentTable.tableDnDConfig,l=0,o=null,s=0;s<r.length;s++)if(o=r[s],l=this.getPosition(o).y,n=parseInt(o.offsetHeight)/2,0===o.offsetHeight&&(l=this.getPosition(o.firstChild).y,n=parseInt(o.firstChild.offsetHeight)/2),a>l-n&&a<l+n)return e.is(o)||i.onAllowDrop&&!i.onAllowDrop(e,o)||t(o).hasClass("nodrop")?null:o;return null},processMouseup:function(){if(!this.currentTable||!this.dragObject)return null;var e=this.currentTable.tableDnDConfig,n=this.dragObject,r=0,o=0;t(a).unbind(i,this.mousemove).unbind(l,this.mouseup),e.hierarchyLevel&&e.autoCleanRelations&&t(this.currentTable.rows).first().find("td:first").children().each(function(){(o=t(this).parents("tr:first").data("level"))&&t(this).parents("tr:first").data("level",--o)&&t(this).remove()})&&e.hierarchyLevel>1&&t(this.currentTable.rows).each(function(){if((o=t(this).data("level"))>1)for(r=t(this).prev().data("level");o>r+1;)t(this).find("td:first").children(":first").remove(),t(this).data("level",--o)}),e.onDragClass&&t(n).removeClass(e.onDragClass)||t(n).css(e.onDropStyle),this.dragObject=null,e.onDrop&&this.originalOrder!==this.currentOrder()&&t(n).hide().fadeIn("fast")&&e.onDrop(this.currentTable,n),e.onDragStop&&e.onDragStop(this.currentTable,n),this.currentTable=null},mouseup:function(e){return e&&e.preventDefault(),t.tableDnD.processMouseup(),!1},jsonize:function(t){var e=this.currentTable;return t?JSON.stringify(this.tableData(e),null,e.tableDnDConfig.jsonPretifySeparator):JSON.stringify(this.tableData(e))},serialize:function(){return t.param(this.tableData(this.currentTable))},serializeTable:function(t){for(var e="",a=t.tableDnDConfig.serializeParamName||t.id,n=t.rows,r=0;r<n.length;r++){e.length>0&&(e+="&");var i=n[r].id;i&&t.tableDnDConfig&&t.tableDnDConfig.serializeRegexp&&(e+=a+"[]="+(i=i.match(t.tableDnDConfig.serializeRegexp)[0]))}return e},serializeTables:function(){var e=[];return t("table").each(function(){this.id&&e.push(t.param(t.tableDnD.tableData(this)))}),e.join("&")},tableData:function(e){var a,n,r,i,l=e.tableDnDConfig,o=[],s=0,d=0,h=null,u={};if(e||(e=this.currentTable),!e||!e.rows||!e.rows.length)return{error:{code:500,message:"Not a valid table."}};if(!e.id&&!l.serializeParamName)return{error:{code:500,message:"No serializable unique id provided."}};i=l.autoCleanRelations&&e.rows||t.makeArray(e.rows),a=function(t){return t&&l&&l.serializeRegexp?t.match(l.serializeRegexp)[0]:t},u[r=n=l.serializeParamName||e.id]=[],!l.autoCleanRelations&&t(i[0]).data("level")&&i.unshift({id:"undefined"});for(var c=0;c<i.length;c++)if(l.hierarchyLevel){if(0===(d=t(i[c]).data("level")||0))r=n,o=[];else if(d>s)o.push([r,s]),r=a(i[c-1].id);else if(d<s)for(var f=0;f<o.length;f++)o[f][1]===d&&(r=o[f][0]),o[f][1]>=s&&(o[f][1]=0);s=d,t.isArray(u[r])||(u[r]=[]),(h=a(i[c].id))&&u[r].push(h)}else(h=a(i[c].id))&&u[r].push(h);return u}},jQuery.fn.extend({tableDnD:t.tableDnD.build,tableDnDUpdate:t.tableDnD.updateTables,tableDnDSerialize:t.proxy(t.tableDnD.serialize,t.tableDnD),tableDnDSerializeAll:t.tableDnD.serializeTables,tableDnDData:t.proxy(t.tableDnD.tableData,t.tableDnD)})}(jQuery,window,window.document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.