(function(n){function t(t){function y(r){h=n.extend(!0,{},v,t);i=r;f.subscribe(i.onActiveCellChanged,o(d));f.subscribe(i.onKeyDown,o(g));f.subscribe(i.onClick,o(nt))}function p(){f.unsubscribeAll()}function o(n){return function(){e||(e=!0,n.apply(this,arguments),e=!1)}}function c(n){for(var i,r=[],t=0;t<n.length;t++)for(i=n[t].fromRow;i<=n[t].toRow;i++)r.push(i);return r}function s(n){for(var r=[],u=i.getColumns().length-1,t=0;t<n.length;t++)r.push(new Slick.Range(n[t],0,n[t],u));return r}function w(n,t){for(var r=[],i=n;i<=t;i++)r.push(i);for(i=t;i<n;i++)r.push(i);return r}function l(){return c(r)}function b(n){u(s(n))}function u(n){r=n;a.onSelectedRangesChanged.notify(r)}function k(){return r}function d(n,t){h.selectActiveRow&&t.row!=null&&u([new Slick.Range(t.row,0,t.row,i.getColumns().length-1)])}function g(n){var e=i.getActiveCell(),t,f,o,h;!e||!n.shiftKey||n.ctrlKey||n.altKey||n.metaKey||n.which!=38&&n.which!=40||(t=l(),t.sort(function(n,t){return n-t}),t.length||(t=[e.row]),f=t[0],o=t[t.length-1],h=n.which==40?e.row>f||f==o?++o:++f:e.row>f?--o:--f,h>=0&&h<i.getDataLength()&&(i.scrollRowIntoView(h),i.setActiveCell(h,e.cell),r=s(w(f,o)),u(r)),n.preventDefault(),n.stopPropagation())}function nt(t){var f=i.getCellFromEvent(t),e,l,o;if(!f||!i.canCellBeActive(f.row,f.cell)||!i.getOptions().multiSelect||!t.ctrlKey&&!t.shiftKey&&!t.metaKey)return!1;if(e=c(r),l=n.inArray(f.row,e),l===-1&&(t.ctrlKey||t.metaKey))e.push(f.row),i.setActiveCell(f.row,f.cell);else if(l!==-1&&(t.ctrlKey||t.metaKey))e=n.grep(e,function(n){return n!==f.row}),i.setActiveCell(f.row,f.cell);else if(e.length&&t.shiftKey){var h=e.pop(),a=Math.min(f.row,h),v=Math.max(f.row,h);for(e=[],o=a;o<=v;o++)o!==h&&e.push(o);e.push(h);i.setActiveCell(f.row,f.cell)}return r=s(e),u(r),t.stopImmediatePropagation(),!0}var i,r=[],a=this,f=new Slick.EventHandler,e,h,v={selectActiveRow:!0};n.extend(this,{getSelectedRows:l,setSelectedRows:b,getSelectedRanges:k,setSelectedRanges:u,init:y,destroy:p,onSelectedRangesChanged:new Slick.Event})}n.extend(!0,window,{Slick:{RowSelectionModel:t}})})(jQuery)
//# sourceMappingURL=slick.rowselectionmodel.min.js.map
