https://chiview.chi.ac.uk/sipr/urd/sits.urd/plugins/javascript/tablesaw/tablesaw.min.js?v=111.010426
1/* 2 Tablesaw - v3.1.2 - 2019-03-19 3 https://github.com/filamentgroup/tablesaw 4 Copyright (c) 2019 Filament Group; Licensed MIT 5 6//NOTE: This file has been amended by Tribal for use within e:Vision*/ 7(function(a,y){"function"===typeof define&&define.amd?define(["jquery"],function(z){return a.Tablesaw=y(z,a)}):"object"===typeof exports?module.exports="document"in a?y(require("jquery"),a):y(require("jquery")(a),a):a.Tablesaw=y(jQuery,a)})("undefined"!==typeof window?window:this,function(a,y){var z=y.document,U=/complete|loaded/.test(z.readyState);z.addEventListener("DOMContentLoaded",function(){U=!0});var q={i18n:{modeStack:"Stack",modeSwipe:"Swipe",modeToggle:"Toggle",modeSwitchColumnsAbbreviated:"Cols", 8modeSwitchColumns:"Columns",columnToggleButton:"Columns",columnToggleError:"No eligible columns.",sort:"Sort",sortAscText:": activate to sort column ascending",sortDescText:": activate to sort column descending",swipePreviousColumn:"Previous column",swipeNextColumn:"Next column",swipePreviousColumnDisabled:"Previous column (disabled)",swipeNextColumnDisabled:"Next column (disabled)"},mustard:"head"in z&&(!y.blackberry||y.WebKitPoint)&&!y.operamini,$:a,_init:function(w){q.$(w||z).trigger("enhance.tablesaw")}, 9init:function(w){(U=U||/interactive|complete|loaded/.test(z.readyState))?q._init(w):"addEventListener"in z&&z.addEventListener("DOMContentLoaded",function(){q._init(w)})}};a(z).on("enhance.tablesaw",function(){"undefined"!==typeof TablesawConfig&&TablesawConfig.i18n&&(q.i18n=a.extend(q.i18n,TablesawConfig.i18n||{}));q.i18n.modes=[q.i18n.modeStack,q.i18n.modeSwipe,q.i18n.modeToggle]});q.mustard&&a(z.documentElement).addClass("tablesaw-enhanced");(function(){var w={create:"tablesawcreate",destroy:"tablesawdestroy", 10refresh:"tablesawrefresh",resize:"tablesawresize",resetDisplay:"tablesawresetdisplay"},g={};q.events=w;var c=function(b){if(!b)throw Error("Tablesaw requires an element.");this.table=b;this.$table=a(b);this.$thead=this.$table.children().filter("thead").eq(0);this.$tbody=this.$table.children().filter("tbody");this.mode=this.$table.attr("data-tablesaw-mode")||"stack";this.$toolbar=null;this.attributes={subrow:"data-tablesaw-subrow",ignorerow:"data-tablesaw-ignorerow"};this.init()};c.prototype.init= 11function(){if(!this.$thead.length)throw Error("tablesaw: a <thead> is required, but none was found.");if(!this.$thead.find("th").length)throw Error("tablesaw: no header cells found. Are you using <th> inside of <thead>?");this.$table.attr("id")||this.$table.attr("id","tablesaw-"+Math.round(1E4*Math.random()));this.createToolbar();this._initCells();this.$table.data("tablesaw",this);this.$table.trigger(w.create,[this])};c.prototype.getConfig=function(b){b=a.extend(g,b||{});return a.extend(b,"undefined"!== 12typeof TablesawConfig?TablesawConfig:{})};c.prototype._getPrimaryHeaderRow=function(){return this._getHeaderRows().eq(0)};c.prototype._getHeaderRows=function(){return this.$thead.children().filter("tr").filter(function(){return!a(this).is("[data-tablesaw-ignorerow]")})};c.prototype._getRowIndex=function(b){return b.prevAll().length};c.prototype._getHeaderRowIndeces=function(){var b=this,e=[];this._getHeaderRows().each(function(){e.push(b._getRowIndex(a(this)))});return e};c.prototype._getPrimaryHeaderCells= 13function(b){return(b||this._getPrimaryHeaderRow()).find("th")};c.prototype._$getCells=function(b){var e=this;return a(b).add(b.cells).filter(function(){var h=a(this),f=h.parent();h=h.is("[colspan]");return!f.is("["+e.attributes.subrow+"]")&&(!f.is("["+e.attributes.ignorerow+"]")||!h)})};c.prototype._getVisibleColspan=function(){var b=0;this._getPrimaryHeaderCells().each(function(){var e=a(this);"none"!==e.css("display")&&(b+=parseInt(e.attr("colspan"),10)||1)});return b};c.prototype.getColspanForCell= 14function(b){var e=this._getVisibleColspan(),h=0;b.closest("tr").data("tablesaw-rowspanned")&&h++;b.siblings().each(function(){var f=a(this),r=parseInt(f.attr("colspan"),10)||1;"none"!==f.css("display")&&(h+=r)});return e-h};c.prototype.isCellInColumn=function(b,e){return a(b).add(b.cells).filter(function(){return this===e}).length};c.prototype.updateColspanCells=function(b,e,h){var f=this,r=f._getPrimaryHeaderRow();
14this.$table.find("[rowspan][data-tablesaw-priority]").each(function(){var k=a(this); 15if("persist"===k.attr("data-tablesaw-priority")){var n=k.closest("tr");1<parseInt(k.attr("rowspan"),10)&&(n=n.next(),n.data("tablesaw-rowspanned",!0))}});this.$table.find("[colspan],[data-tablesaw-maxcolspan]").filter(function(){return a(this).closest("tr")[0]!==r[0]}).each(function(){var k=a(this);if(void 0===h||f.isCellInColumn(e,this)){var n=f.getColspanForCell(k);if(b&&void 0!==h)k[0===n?"addClass":"removeClass"](b);var A=parseInt(k.attr("data-tablesaw-maxcolspan"),10);A?n>A&&(n=A):k.attr("data-tablesaw-maxcolspan", 16k.attr("colspan"));k.attr("colspan",n)}})};c.prototype._findPrimaryHeadersForCell=function(b){var e=this._getPrimaryHeaderRow();e=this._getRowIndex(e);for(var h=[],f=0;f<this.headerMapping.length;f++)if(f!==e)for(var r=0;r<this.headerMapping[f].length;r++)this.headerMapping[f][r]===b&&h.push(this.headerMapping[e][r]);return h};c.prototype._findHeadersForCell=function(b){var e=this,h=[];this._getHeaderRows().each(function(){var f=a(this);f=e._getRowIndex(f);for(var r=0;r<e.headerMapping.length;r++)if(r!== 17f)for(var k=0;k<e.headerMapping[r].length;k++)e.headerMapping[r][k]===b&&h.push(e.headerMapping[f][k])});return h};c.prototype.getRows=function(){var b=this;return this.$table.find("tr").filter(function(){return a(this).closest("table").is(b.$table)})};c.prototype.getBodyRows=function(b){return(b?a(b):this.$tbody).children().filter("tr")};c.prototype.getHeaderCellIndex=function(b){for(var e=this.headerMapping[0],h=0;h<e.length;h++)if(e[h]===b)return h;return-1};c.prototype._initCells=function(){this.$table.find("[data-tablesaw-maxcolspan]").each(function(){var l= 18a(this);l.attr("colspan",l.attr("data-tablesaw-maxcolspan"))});var b=this.getRows(),e=[];b.each(function(l){e[l]=[]});b.each(function(l){var x=0;a(this).children().each(function(){for(var v=parseInt(this.getAttribute("data-tablesaw-maxcolspan")||this.getAttribute("colspan"),10),M=parseInt(this.getAttribute("rowspan"),10);e[l][x];)x++;e[l][x]=this;if(v)for(var N=0;N<v-1;N++)x++,e[l][x]=this;if(M)for(v=1;v<M;v++)e[l+v][x]=this;x++})});b=this._getHeaderRowIndeces();for(var h=0;h<e[0].length;h++)for(var f= 190,r=b.length;f<r;f++){var k=e[b[f]][h],n=b[f];k.cells||(k.cells=[]);for(;n<e.length;){var A=e[n][h];k!==A&&k.cells.push(A);n++}}this.headerMapping=e};c.prototype.refresh=function(){this._initCells();this.$table.trigger(w.refresh,[this])};c.prototype._getToolbarAnchor=function(){var b=this.$table.parent();return b.is(".tablesaw-overflow")?b:this.$table};c.prototype._getToolbar=function(b){b||=this._getToolbarAnchor();return b.prev().filter(".tablesaw-bar")};c.prototype.createToolbar=function(){var b= 20this._getToolbarAnchor(),e=this._getToolbar(b);e.length||(e=a("<div>").addClass("tablesaw-bar").insertBefore(b));this.$toolbar=e;this.mode&&this.$toolbar.addClass("tablesaw-mode-"+this.mode)};c.prototype.tribalGetVisible=function(){if("stack"===this.mode)return[];var b=[],e=this.mode;this._getPrimaryHeaderCells().each(function(h){var f=a(this);f.hasClass("tablesaw-cell-hidden")||!("swipe"===e&&!f.hasClass("tablesaw-cell-persist")||"swipe"!==e&&"persist"!==f.data("tablesaw-priority"))||"swipe"!==e&& 21"table-cell"!==f.css("display")||b.push(h)});return b};c.prototype.tribalSetVisible=function(b){if("stack"!==this.mode&&"object"===typeof b&&0!==b.length){if("swipe"===this.mode){var e=parseInt(b[0],10);if("number"!==typeof e||0>e)return;this._getPrimaryHeaderCells().each(function(r){if(r===e)return a(this).attr("data-tablesaw-default-col","true"),!1})}else{var h=-1,f=a("#"+this.$table.attr("id")+"-popup").find(".tablesaw-btn-group");this._getPrimaryHeaderCells().each(function(r){var k=a(this).attr("data-tablesaw-priority"); 22k&&"persist"!==k&&(h++,k=f.find("input").eq(h))&&(r=-1!==a.inArray(r,b)?!0:!1,k.data("cells").toggleClass("tablesaw-cell-hidden",!r).toggleClass("tablesaw-cell-visible",r))})}this.tribalReset()}};c.prototype.tribalReset=function(){"stack"!==this.mode&&this.$table.trigger(w.resetDisplay)};c.prototype.destroy=function(){this._getToolbar().each(function(){this.className=this.className.replace(/\btablesaw-mode\-\w*\b/gi,"")});var b=this.$table.attr("id");a(z).off("."+b);a(y).off("."+b);this.$table.trigger(w.destroy, 23[this]);this.$table.removeData("tablesaw")};a.fn.tablesaw=function(){return this.each(function(){a(this).data("tablesaw")||new c(this)})};var t=a(z);t.on("enhance.tablesaw",function(b){q.mustard&&(b=a(b.target),b.parent().length&&(b=b.parent()),b.find("table").filter("[data-tablesaw],[data-tablesaw-mode],[data-tablesaw-sortable]").tablesaw())});var d=!1,m;t.on("scroll.tablesaw",function(){d=!0;y.clearTimeout(m);m=y.setTimeout(function(){d=!1},300)});var p;a(y).on("resize",function(){d||(y.clearTimeout(p), 24p=y.setTimeout(function(){t.trigger(w.resize)},150))});q.Table=c})();(function(){var w=function(g,c){this.tablesaw=c;this.$table=a(g);this.labelless=this.$table.is("[data-tablesaw-no-labels]");this.hideempty=this.$table.is("[data-tablesaw-hide-empty]");this.$table.data("tablesaw-stack",this)};w.prototype.init=function(){this.$table.addClass("tablesaw tablesaw-stack");if(!this.labelless){var g=this;this.$table.find("th, td").filter(function(){return!a(this).closest("thead").length}).filter(function(){return!a(this).is("[data-tablesaw-no-labels]")&& 25!a(this).closest("tr").is("[data-tablesaw-no-labels]")&&(!g.hideempty||!!a(this).html())}).each(function(){var c=a(z.createElement("b")).addClass("tablesaw-cell-label"),t=a(this),d=t.attr("data-tablesaw-override-label"),m="string"===typeof d&&""!==d?!0:!1;a(g.tablesaw._findHeadersForCell(this)).each(function(b){if("object"===typeof this&&"function"===typeof this.cloneNode){var e=a(this.cloneNode(!0));m&&e.html(d);var h=e.find(".tablesaw-sortable-btn");e.find(".tablesaw-sortable-arrow").remove();0< 26b&&c.append(z.createTextNode(", "));for(b=h.length?h[0]:e[0];e=b.firstChild;)c[0].appendChild(e);if(m)return!1}});c.length&&!t.find(".tablesaw-cell-content").length&&t.wrapInner("<span class='tablesaw-cell-content'></span>");c.length&&a("input",c).each(function(){var b=a(this);b.is("input[type='hidden']")?b.remove():b.removeAttr("name")}
26);var p=t.find(".tablesaw-cell-label");p.length?p.replaceWith(c):(t.prepend(z.createTextNode(" ")),t.prepend(c))})}};w.prototype.destroy=function(){this.$table.removeClass("tablesaw tablesaw-stack"); 27this.$table.find(".tablesaw-cell-label").remove();this.$table.find(".tablesaw-cell-content").each(function(){a(this).replaceWith(a(this.childNodes))})};a(z).on(q.events.create,function(g,c){"stack"===c.mode&&(new w(c.table,c)).init()}).on(q.events.refresh,function(g,c){"stack"===c.mode&&a(c.table).data("tablesaw-stack").init()}).on(q.events.destroy,function(g,c){"stack"===c.mode&&a(c.table).data("tablesaw-stack").destroy()});q.Stack=w})();(function(){a.fn.tablesawbtn=function(w,g,c,t){return this.each(function(){if(w&& 28"string"===typeof w)return a.fn.tablesawbtn.prototype[w].call(this,g,c,t);if(a(this).data("tablesawbtnactive"))return a(this);a(this).data("tablesawbtnactive",!0);a.fn.tablesawbtn.prototype._create.call(this)})};a.extend(a.fn.tablesawbtn.prototype,{_create:function(){return a(this).each(function(){a(this).trigger("beforecreate.tablesawbtn").tablesawbtn("_init").trigger("create.tablesawbtn")})},_init:function(){var w=a(this),g=this.getElementsByTagName("select")[0];g&&a(this).addClass("btn-select tablesaw-btn-select").tablesawbtn("_select", 29g);return w},_select:function(w){var g=function(c,t){var d=a(t).find("option"),m=z.createElement("span"),p=!1;m.setAttribute("aria-hidden","true");m.innerHTML=" ";d.each(function(){this.selected&&(m.innerHTML=this.text)});t=c.childNodes;if(0<d.length){for(var b=0,e=t.length;b<e;b++)(d=t[b])&&"SPAN"===d.nodeName.toUpperCase()&&(c.replaceChild(m,d),p=!0);p||c.insertBefore(m,c.firstChild)}};g(this,w);a(this).on("change refresh",function(){g(this,w)})}})})();(function(){var w=function(g){this.$table= 30a(g);this.$table.length&&(this.tablesaw=this.$table.data("tablesaw"),this.attributes={btnTarget:"data-tablesaw-columntoggle-btn-target",set:"data-tablesaw-columntoggle-set"},this.classes={columnToggleTable:"tablesaw tablesaw-columntoggle",columnBtnContain:"tablesaw-columntoggle-btnwrap tablesaw-advance",columnBtn:"tablesaw-columntoggle-btn tablesaw-nav-btn down",hiddenCol:"tablesaw-cell-hidden",visibleCol:"tablesaw-cell-visible",popup:"tablesaw-columntoggle-popup",priorityPrefix:"tablesaw-priority-"}, 31this.set=[],this.$headers=this.tablesaw._getPrimaryHeaderCells(),this.$table.data("tablesaw-coltoggle",this))};w.prototype.initSet=function(){var g=this.$table.attr(this.attributes.set);if(g){var c=this.$table[0];this.set=a("table["+this.attributes.set+"='"+g+"']").filter(function(){return this!==c}).get()}};w.prototype.init=function(){function g(l){var x=l.checked;l=d.getHeaderFromCheckbox(l);var v=d.tablesaw._$getCells(l);v[x?"removeClass":"addClass"](d.classes.hiddenCol);v[x?"addClass":"removeClass"](d.classes.visibleCol); 32d.updateColspanCells(l,x);d.$table.trigger("tablesawcolumns");d.$table.trigger("tablesawcolchange")}function c(l){l&&a(l.target).closest("."+d.classes.popup).length||(a(z).off("click."+p),h.removeClass("up").addClass("down"),e.removeClass("visible"))}function t(){function l(v){27===v.which&&c(v)}e.addClass("visible");h.removeClass("down").addClass("up");var x=a(z);x.off("click."+p,c);x.off("keyup."+p,l);y.clearTimeout(n);n=y.setTimeout(function(){var v=a(z);v.on("click."+p,c);v.on("keyup."+p,l)}, 3315)}if(this.$table.length){var d=this,m=this.tablesaw.getConfig({getColumnToggleLabelTemplate:function(l){return"<label><input type='checkbox' checked>"+l+"</label>"}});this.$table.addClass(this.classes.columnToggleTable);var p=this.$table.attr("id");var b=p+"-popup";var e=a("<div class='"+this.classes.columnBtnContain+"'></div>");var h=a("<a href='#"+b+"' class='btn tablesaw-btn btn-micro "+this.classes.columnBtn+"' data-popup-link><span>"+q.i18n.columnToggleButton+"</span></a>");b=a("<div class='"+ 34this.classes.popup+"' id='"+b+"'></div>");var f=a("<div class='tablesaw-btn-group'></div>");this.$popup=b;var r=!1;this.$headers.each(function(){var l=a(this),x=l.attr("data-tablesaw-priority"),v=d.tablesaw._$getCells(this);x&&"persist"!==x&&(v.addClass(d.classes.priorityPrefix+x),a(m.getColumnToggleLabelTemplate(l.text())).appendTo(f).find('input[type="checkbox"]').data("tablesaw-header",this),r=!0)});r||f.append("<label>"+q.i18n.columnToggleError+"</label>");f.appendTo(b);f.find('input[type="checkbox"]').on("change", 35function(l){g(l.target);if(d.set.length){var x;a(d.$popup).find("input[type='checkbox']").each(function(v){if(this===l.target)return x=v,!1});a(d.set).each(function(){var v=a(this).data("tablesaw-coltoggle").$popup.find("input[type='checkbox']").get(x);v&&(v.checked=l.target.checked,g(v))})}});h.appendTo(e);var k=a(this.$table.attr(this.attributes.btnTarget));e.appendTo(k.length?k:this.tablesaw.$toolbar);var n;h.on("click.tablesaw",function(l){l.preventDefault();e.is(".visible")?c():t()});b.appendTo(e); 36this.$menu=f;b=this.$table.closest(".tablesaw-overflow");if(b.css("-webkit-overflow-scrolling")){var A;b.on("scroll",function(){var l=a(this);y.clearTimeout(A);A=y.setTimeout(function(){l.css("-webkit-overflow-scrolling","auto");y.setTimeout(function(){l.css("-webkit-overflow-scrolling","touch")},0)},100)})}this.$table.on(q.events.resetDisplay+".columntoggle",function(){d.refreshToggle()});a(y).on(q.events.resize+"."+p,function(){d.refreshToggle()});this.initSet();this.refreshToggle()}};w.prototype.getHeaderFromCheckbox= 37function(g){return a(g).data("tablesaw-header")};w.prototype.refreshToggle=function(){var g=this;this.$menu.find("input").each(function(){var c=g.getHeaderFromCheckbox(this);this.checked="table-cell"===g.tablesaw._$getCells(c).eq(0).css("display")});this.updateColspanCells()};w.prototype.updateColspanCells=function(g,c){this.tablesaw.updateColspanCells(this.classes.hiddenCol,g,c)};w.prototype.destroy=function(){var g=this;this.$table.removeClass(this.classes.columnToggleTable);this.$table.off(".columntoggle"); 38this.$table.find("th, td").each(function(){a(this).removeClass(g.classes.hiddenCol).removeClass(g.classes.visibleCol);this.className=this.className.replace(/\bui\-table\-priority\-\d\b/g,"")})};a(z).on(q.events.create,function(g,c){"columntoggle"===c.mode&&(new w(c.table)).init()});a(z).on(q.events.destroy,function(g,c){"columntoggle"===c.mode&&a(c.table).data("tablesaw-coltoggle").destroy()});a(z).on(q.events.refresh,function(g,c){"columntoggle"===c.mode&&a(c.table).data("tablesaw-coltoggle").refreshToggle()}); 39q.ColumnToggle=w})();(function(){function w(d){var m=[];a(d.childNodes).each(function(){var p=a(this);
39p.is("input, select")?"hidden"!==p.attr("type")&&m.push(p.val()):p.is(".tablesaw-cell-label")||m.push((p.text()||"").replace(/^\s+|\s+$/g,""))});return m.join("")}function g(d,m){d=a(d);var p=a.trim(d.text());switch(m){case "asc":d.attr({"aria-sort":"ascending","aria-label":""+p+" "+q.i18n.sortDescText});d.addClass(t.ascend);d.removeClass(t.descend);break;case "desc":d.attr({"aria-sort":"descending", 40"aria-label":""+p+" "+q.i18n.sortAscText});d.removeClass(t.ascend);d.addClass(t.descend);break;default:d.is("th["+c.sortCol+"]")&&(d.attr({"aria-label":""+p+" "+q.i18n.sortAscText}),d.removeAttr("aria-sort"),d.removeClass(t.ascend),d.removeClass(t.descend))}}var c={sortCol:"data-tablesaw-sortable-col",defaultCol:"data-tablesaw-sortable-default-col",defaultDesc:"data-tablesaw-sortable-default-desc",initSort:"data-tablesaw-sortable-init-sort",numericCol:"data-sortable-numeric",subRow:"data-tablesaw-subrow", 41ignoreRow:"data-tablesaw-ignorerow",overrideSort:"data-tablesaw-sortable-override-sort"},t={head:"tablesaw-sortable-head",ascend:"tablesaw-sortable-ascending",desce
41nd:"tablesaw-sortable-descending",tableToolbar:"tablesaw-bar-section",sortButton:"tablesaw-sortable-btn"};a.fn["tablesaw-sortable"]=function(d){var m=Array.prototype.slice.call(arguments,1);if(d&&"string"===typeof d)return m=a.fn["tablesaw-sortable"].prototype[d].apply(this[0],m),"undefined"!==typeof m?m:a(this);a(this).data("tablesaw-sortable-active")|| 42(a(this).data("tablesaw-sortable-active",!0),a.fn["tablesaw-sortable"].prototype._create.call(this,d));return a(this)};a.extend(a.fn["tablesaw-sortable"].prototype,{_create:function(d){return a(this).each(function(){if(a(this).data("tablesaw-sortable-init"))return!1;a(this).data("tablesaw-sortable-init",!0).trigger("beforecreate.tablesaw-sortable")["tablesaw-sortable"]("_init",d).trigger("create.tablesaw-sortable")})},_init:function(){function d(b){a.each(b,function(e,h){e=a(h);e.removeAttr(c.defaultCol); 43e.removeAttr(c.defaultDesc);e.removeClass(t.ascend);e.removeClass(t.descend);g(e,"")})}var m=a(this);m.data("tablesaw");m.addClass("tablesaw-sortable");var p=m.children().filter("thead").find("th["+c.sortCol+"]");(function(b){a.each(b,function(e,h){a(h).addClass(t.head)})})(p);(function(b,e){a.each(b,function(h,f){var r=a(f);r.attr({tabindex:0,"aria-controls":m.attr("id")});r.on("click.sortable",{col:f},function(k){r.blur();e(k)});r.on("keypress.sortable",{col:f},function(k){13===k.which&&(k.preventDefault(), 44e(k))})});a(b).closest("table").on(q.events.destroy+".sortable",function(){var h=a(this);h.find("thead th").each(function(){var f=a(this);f.off(".sortable");f.removeClass(t.head);f.removeClass(t.ascend);f.removeClass(t.descend);f.attr("tabindex",-1);f.removeAttr("aria-controls");f.removeAttr("aria-sort");f.removeAttr("aria-label")});h.off(".sortable").removeData("tablesaw-sortable-init tablesaw-sortable-active");h.removeAttr(c.initSort)})})(p,function(b){if(!a(b.target).is("a[href]")){b.stopPropagation(); 45var e=a(b.target).closest("["+c.sortCol+"]"),h=b.data.col;d(e.closest("thead").find("th").filter(function(){return this!==e[0]}));if(e.is("."+t.ascend))m["tablesaw-sortable"]("sortBy",h);else m["tablesaw-sortable"]("sortBy",h,!0);b.preventDefault()}});(function(b){var e,h=!0;a.each(b,function(f,r){f=a(r);if(f.is("["+c.defaultCol+"]")){var k=f.attr(c.defaultDesc);"string"===typeof k&&"false"!==k?(h=!1,g(f,"desc")):g(f,"asc");e=r}else g(f,"")});if(e&&m.is("["+c.initSort+"]"))m["tablesaw-sortable"]("sortBy", 46e,h)})(p)},sortRows:function(d,m,p,b,e){function h(f,r){var k=/[^\-\+\d\.]/g,n,A;return f?function(l,x){return l.ignored||x.ignored?0:r?(n=parseFloat(l.cell.replace(k,"")),A=parseFloat(x.cell.replace(k,"")),isNaN(n)||isNaN(A)?isNaN(n)&&isNaN(A)?0:isNaN(n)?-1:1:n-A):l.cell.toLowerCase()>x.cell.toLowerCase()?1:-1}:function(l,x){return l.ignored||x.ignored?0:r?(n=parseFloat(x.cell.replace(k,"")),A=parseFloat(l.cell.replace(k,"")),isNaN(n)||isNaN(A)?isNaN(n)&&isNaN(A)?0:isNaN(n)?-1:1:n-A):l.cell.toLowerCase()< 47x.cell.toLowerCase()?1:-1}}d=function(f,r){var k=[];a.each(f,function(n,A){n=A.parentNode;for(var l=a(n),x=[],v=l.next();v.is("["+c.subRow+"]");)x.push(v[0]),v=v.next();v=n.parentNode;l.is("["+c.subRow+"]")||v===r&&k.push({element:A,cell:w(A),row:n,subrows:x.length?x:null,ignored:l.is("["+c.ignoreRow+"]")})});return k}(b.cells,e);p=((m=a(b).data("tablesaw-sort"))&&"function"===typeof m?m(p):!1)||h(p,a(b).is("["+c.numericCol+"]")&&!a(b).is("["+c.numericCol+'="false"]'));return d=function(f){var r= 48[],k;var n=0;for(k=f.length;n<k;n++)r.push(f[n].row),f[n].subrows&&r.push(f[n].subrows);return r}(d.sort(p))},makeColDefault:function(d,m){var p=a(d);p.attr(c.defaultCol,"true");m?(p.attr(c.defaultDesc,"false"),g(d,"asc")):(p.attr(c.defaultDesc,"true"),g(d,"desc"))},sortBy:function(d,m){var p=a(this),b,e=p.data("tablesaw");e.$tbody.each(function(){var h=a(this),f=e.getBodyRows(this),r=e.headerMapping[0],k;var n=0;for(k=r.length;n<k;n++)if(r[n]===d){b=n;break}n=a(d);if(n.is("["+c.overrideSort+"]")&& 49(k=n.data("tablesaw-sort"),"function"===typeof k)){k(e.$table,n,b,!!m);return}f=p["tablesaw-sortable"]("sortRows",f,b,m,d,this);n=0;for(k=f.length;n<k;n++)h.append(f[n])});p["tablesaw-sortable"]("makeColDefault",d,m);p.trigger("tablesaw-sorted")}});a(z).on(q.events.create,function(d,m){if(m.$table.is("table[data-tablesaw-sortable]"))m.$table["tablesaw-sortable"]()})})();(function(){function w(t,d){function m(){d.css({width:"1px"});d.find("."+g.hiddenCol).removeClass(g.hiddenCol);R=[];S=[];K.each(function(){var u= 50this.offsetWidth;R.push(u);b(this)||S.push(u)});d.css({width:""})}function p(u){v._$getCells(u).removeClass(g.hiddenCol)}function b(u){return a(u).is('[data-tablesaw-priority="persist"]')}function e(){V&&(d.removeClass(g.persistWidths),a("#"+L+"-persist").remove())}function h(){var u="#"+L+".tablesaw-swipe ",B=[],H=d.width(),D=H,E=[];K.each(function(I){if(b(this)){var F=this.offsetWidth;D-=F;V&&F<.75*H&&(E.push(I+"-"+F),B.push(u+" ."+g.persistCol+":nth-child("+(I+1)+") { width: "+F+"px; }"))}});var J= 51E.join("_");if(B.length){d.addClass(g.persistWidths);
51var C=a("#"+L+"-persist");C.length&&C.data("tablesaw-hash")===J||(C.remove(),a("<style>"+B.join("\n")+"</style>").attr("id",L+"-persist").data("tablesaw-hash",J).appendTo(Y))}return D}function f(){var u=[],B;O.each(function(H){var D=a(this);D="none"===D.css("display")||D.is("."+g.hiddenCol);if(!D&&!B)B=!0,u[0]=H;else if(D&&B)return u[1]=H,!1});return u}function r(){var u=f();return[u[1]-1,u[0]-1]}function k(u){return-1<u[1]&&u[1]<O.length}function n(){var u= 52d.attr("data-tablesaw-swipe-media");return!u||"matchMedia"in y&&y.matchMedia(u).matches}function A(){if(n()){var u=Z?30:15,B=Math.round(d.parent().width()),H=[],D=0,E=[],J=0,C=[],I=K.length,F=-1;K.each(function(G){var P=a(this),W=P.is('[data-tablesaw-priority="persist"]'),aa=P.is("[data-tablesaw-default-col]");H.push(W);W?J+=R[G]:aa&&(F=G,P.removeAttr("data-tablesaw-default-col"));C.push(J)});for(var Q=0;Q<C.length;Q++)C[Q]=J-C[Q];K.each(function(G){var P=H[G];if(P||-1==F||G>=F)D+=R[G]+u;E.push(D); 53(P||G<F||D+C[G]>B)&&I--});var X=0===I;K.each(function(G){!H[G]&&(G<F||E[G]+C[G]>B)&&v._$getCells(this).addClass(g.hiddenCol)});K.each(function(G){H[G]?v._$getCells(this).addClass(g.persistCol):G>=F&&(E[G]+C[G]<=B||X)&&(X=!1,p(this),v.updateColspanCells(g.hiddenCol,this,!0))});e();d.trigger("tablesawcolumns")}}function l(u){var B=u?f():r();if(k(B)){isNaN(B[0])&&(B[0]=u?0:O.length-1);var H=h(),D=B[0];B=B[1];var E=O.get(D);var J=!1,C=!1;v._$getCells(E).addClass(g.hiddenCol);v.updateColspanCells(g.hiddenCol, 54E,!0);for(D+=u?1:-1;0<=D&&D<S.length;)H-=S[D],E=O.eq(D),E.is("."+g.hiddenCol)?0<H&&(E=E.get(0),C=J=!0,p(E),v.updateColspanCells(g.hiddenCol,E,!1)):C=!0,u?D++:D--;C?!J&&k(u?f():r())&&l(u):(E=O.get(B),p(E),v.updateColspanCells(g.hiddenCol,E,!1));d.trigger("tablesawcolumns");d.trigger("tablesawcolchange")}}function x(u,B){return(u.touches||u.originalEvent.touches)[0][B]}var v=d.data("tablesaw"),M=a("<div class='tablesaw-advance'></div>"),N=a("<a href='#' class='btn tablesaw-nav-btn tablesaw-btn btn-micro left' title='"+ 55q.i18n.swipePreviousColumn+"'></a>").appendTo(M),T=a("<a href='#' class='btn tablesaw-nav-btn tablesaw-btn btn-micro right' title='"+q.i18n.swipeNextColumn+"'></a>").appendTo(M),K=t._getPrimaryHeaderCells(),O=K.not('[data-tablesaw-priority="persist"]'),R=[],S=[],Y=a(z.head||"head"),L=d.attr("id"),V="N"!==d.attr("data-tablesaw-maintain-widths")?!0:!1,Z=V||"Y"!==d.attr("data-tablesaw-extra-padding")?!1:!0,ba="N"!==d.attr("data-tablesaw-swipe-blur")?!0:!1;if(!K.length)throw Error("tablesaw swipe: no header cells found."); 56d.addClass("tablesaw tablesaw-swipe");m();M.appendTo(v.$toolbar);L||(L="tableswipe-"+Math.round(1E4*Math.random()),d.attr("id",L));N.add(T).on("click",function(u){a(u.target).closest(T).length?l(!0):l(!1);u.preventDefault()});if(!d.is("["+c.disableTouchEvents+"]"))d.on("touchstart.swipetoggle",function(u){var B=x(u,"pageX"),H=x(u,"pageY"),D,E,J=y.pageYOffset;a(y).off(q.events.resize,A);a(this).on("touchmove.swipetoggle",function(C){D=x(C,"pageX");E=x(C,"pageY")}).on("touchend.swipetoggle",function(){var C= 57t.getConfig({swipeHorizontalThreshold:30,swipeVerticalThreshold:30}),I;var F=C.swipe?C.swipe.verticalThreshold:C.swipeVerticalThreshold;C=C.swipe?C.swipe.horizontalThreshold:C.swipeHorizontalThreshold;var Q=Math.abs(y.pageYOffset-J)>=F;Math.abs(E-H)>=F||Q||(D-B<-1*C&&(I=!0),D-B>C&&(I=!1));"boolean"===typeof I&&(ba&&z.activeElement&&d.has(z.activeElement)?(F=a(z.activeElement),F.blur(),I?l(!0):l(!1),F.is(":visible")&&F.focus()):I?l(!0):l(!1));y.setTimeout(function(){a(y).on(q.events.resize,A)},300); 58a(this).off("touchmove.swipetoggle touchend.swipetoggle")})});d.on("tablesawcolumns.swipetoggle",function(){var u=k(r()),B=k(f());N[u?"removeClass":"addClass"](g.hideBtn);T[B?"removeClass":"addClass"](g.hideBtn);N.attr("title",u?q.i18n.swipePreviousColumn:q.i18n.swipePreviousColumnDisabled);T.attr("title",B?q.i18n.swipeNextColumn:q.i18n.swipeNextColumnDisabled);v.$toolbar[u||B?"removeClass":"addClass"](g.allColumnsVisible)}).on("tablesawnext.swipetoggle",function(){l(!0)}).on("tablesawprev.swipetoggle", 59function(){l(!1)}).on(q.events.destroy+".swipetoggle",function(){var u=a(this);u.removeClass("tablesaw tablesaw-swipe");v.$toolbar.find(".tablesaw-advance").remove();a(y).off(q.events.resize,A);u.off(".swipetoggle")}).on(q.events.refresh,function(){e();m();A()}).on(q.events.resetDisplay,function(){A()});A();a(y).on(q.events.resize,A)}var g={hideBtn:"disabled",persistWidths:"tablesaw-fix-persist",hiddenCol:"tablesaw-cell-hidden",persistCol:"tablesaw-cell-persist",allColumnsVisible:"tablesaw-all-cols-visible"}, 60c={disableTouchEvents:"data-tablesaw-no-touch",ignorerow:"data-tablesaw-ignorerow",subrow:"data-tablesaw-subrow"};a(z).on(q.events.create,function(t,d){"swipe"===d.mode&&w(d,d.$table)})})();(function(){function w(c){function t(){if(g.show(c[0])){m.css("display","block");var b=p.find("li").removeClass("tablesaw-advance-dots-hide");c.find("thead th").each(function(e){"none"===a(this).css("display")&&b.eq(e).addClass("tablesaw-advance-dots-hide")})}else m.css("display","none")}var d=c.data("tablesaw"), 61m=a('<div class="tablesaw-advance minimap">'),p=a('<ul class="tablesaw-advance-dots">').appendTo(m);c.data("tablesaw")._getPrimaryHeaderCells().each(function(){p.append("<li><i></i></li>")});m.appendTo(d.$toolbar);t();a(y).on(q.events.resize,t);c.on("tablesawcolumns.minimap",function(){t()}).on(q.events.destroy+".minimap",function(){var b=a(this);d.$toolbar.find(".tablesaw-advance").remove();a(y).off(q.events.resize,t);b.off(".minimap")})}var g={attr:{init:"data-tablesaw-minimap"},show:function(c){c= 62c.getAttribute(g.attr.init);return""===c?!0:c&&"matchMedia"in y?y.matchMedia(c).matches:!1}};a(z).on(q.events.create,function(c,t){"swipe"!==t.mode&&"columntoggle"!==t.mode||!t.$table.is("[ "+g.attr.init+"]")||w(t.$table)});q.MiniMap=g})();return q});
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.