Repository: sosy-lab/benchexec (language: python)

Issue:
Refactor filter parsing in JS code
In the HTML tables, filter state is stored (like other state) in URLs and thus serialized in string form. It seems that deserialization and parsing occurs more often than necessary and with duplicated code, which is highly error-prone. For example, the code `.split("_")` for separating a filter id into pieces occurs already four times (in `ReactTable.js`, `utils.js`, `FilterBox.js`, and `filters.js`), and #730 is adding more cases.

This should be refactored such that there is no code duplication and ideally each string is used only once and converted into a proper object-oriented representation, and the latter is used by the rest of the code.


Discussion / hints:
Hi! Is this issue open for contribution? I would love to take a stab at the same. 
Yes, AFAIK nobody is working on this.

Note that for a refactoring like this it is crucial that it does not change the behavior of the application. It would be good to first look at the existing tests to see whether they cover everything, and if not, then adding more tests that can then serve as regression tests during the refactoring.
Okay sir, thank you! Will explore all the relevant files and functions tonight, and post my progress here.

Fix patch:
diff --git a/benchexec/tablegenerator/react-table/build/main.min.js b/benchexec/tablegenerator/react-table/build/main.min.js
index bcfcf4ea4..5ccfcb122 100644
--- a/benchexec/tablegenerator/react-table/build/main.min.js
+++ b/benchexec/tablegenerator/react-table/build/main.min.js
@@ -1,1 +1,1 @@
-!function(){var e={7415:function(e,t,n){"use strict";var i=n(7313),r=n(1168),s=n(5671),l=n(3144),a=n(136),o=n(1129),c=n(1413),u=n(3433),d=n(9439),h=n(8303),g=n(3830),p=n(7762),f=n(4942),m=n(5110),v=n(8567),b=n(5987),I=n(4506),C=n(2229),x=n.n(C),y=n(1969),Z=n(1875),j=n(6417),A=["ids"],F=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var r;return(0,s.Z)(this,n),(r=t.call(this,e)).childRef=i.createRef(),r}return(0,l.Z)(n,[{key:"render",value:function(){var e=this;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{ref:this.childRef,children:this.props.children}),(0,j.jsx)("button",{title:"Copy to clipboard",style:{margin:"1ex"},onClick:function(){x()(e.childRef.current.innerText,{format:"text/plain"})},children:(0,j.jsx)(y.G,{icon:Z.kZ_})})]})}}]),n}(i.Component),W="##########",N=function(e){return"count"===e.type||"measure"===e.type},B=function(e){return void 0===e||null===e},G=function(e,t){return B(e)||B(e.raw)?t:e.raw},Y=function(e,t){var n=G(e,"").toLowerCase(),i=G(t,"").toLowerCase();return""===n?1:""===i?-1:n>i?1:n<i?-1:0},w=function(e){return 0===e||200===e},S=function(e,t){var n,i=[],r=(0,p.Z)(t);try{for(r.s();!(n=r.n()).done;){var s=n.value;s!==e&&i.push(s)}}catch(l){r.e(l)}finally{r.f()}return i},k=function(e,t,n){var i=e.max_width;return t&&(i=Math.max(i,t)),n&&(i=Math.min(i,n)),i||(i=10),8*i+20},V=function(e,t,n){var i=function(e,t){var n,i=t,r=(0,p.Z)(e);try{for(r.s();!(n=r.n()).done;)if(i=i[n.value],B(i))return}catch(s){r.e(s)}finally{r.f()}return i}(e,n);return void 0===i?t:i},R=function(e){return e.unit?(0,j.jsxs)(j.Fragment,{children:[e.display_title,(0,j.jsx)("br",{}),"(".concat(e.unit,")")]}):e.display_title},H=function(e){var t=e.tool,n=e.date,i=e.niceName;return"".concat(t," ").concat(n," ").concat(i)},T=["#19CDD7","#DDB27C","#88572C","#FF991F","#F15C17","#223F9A","#DA70BF","#125C77","#4DC19C","#776E57","#12939A","#17B8BE","#F6D18A","#B7885E","#FFCB99","#F89570","#829AE3","#E79FD5","#1E96BE","#89DAC1","#B3AD9E"],X=function(e){var t=(e||decodeURI(document.location.href)).split("?"),n=t.length>1?t.slice(1).join("?"):void 0;if(void 0===n||0===n.length)return{};var i,r=n.split("&").map((function(e){return e.split("=")})),s={},l=(0,p.Z)(r);try{for(l.s();!(i=l.n()).done;){var a=(0,I.Z)(i.value),o=a[0],c=a.slice(1);s[o]=c.join("=")}}catch(u){l.e(u)}finally{l.f()}return s},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{returnString:!1,baseUrl:null,keepOthers:!1,paramName:null,history:null},n={},i=e;if(t.keepOthers){n=X();var r=Object.entries(e).filter((function(e){var t=(0,d.Z)(e,2),n=(t[0],t[1]);return void 0===n||null===n}));r.forEach((function(e){var t=(0,d.Z)(e,1)[0];delete n[t],delete i[t]}))}var s=(0,c.Z)((0,c.Z)({},n),e),l={returnString:!1,baseUrl:null},a=(0,c.Z)((0,c.Z)({},l),t),o=a.returnString,u=a.baseUrl,h=a.history,g=(u||document.location.href).split("?")[0],p=Object.keys(s).map((function(e){return"".concat(e,"=").concat(s[e])})),f="?".concat(p.join("&")),m=encodeURI("".concat(g).concat(f));if(o)return m;h?h.push(f):document.location.href=m},L=function(e){for(var t=[],n=0,i=Object.entries(e);n<i.length;n++){var r=(0,d.Z)(i[n],2),s=r[0],l=r[1];t.push("".concat(s,"(").concat(l.map(escape).join(","),")"))}return t.join(",")},O=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i={};if(e.length>Math.floor(t.length/2)){var r,s=[],l=(0,p.Z)(t);try{for(l.s();!(r=l.n()).done;){var a=r.value;e.includes(a)||s.push(n?a.trim():a)}}catch(o){l.e(o)}finally{l.f()}i.notIn=s}else i.in=e.map((function(e){return n?e.trim():e}));return L(i)};function U(e,t,n,i,r){var s=[],l=e.statusValues,a=e.categoryValues,o=t[n][i],c=r[n][i],u=!!l,d=u&&l.length!==o.length,h=!!a,g=h&&a.length!==c.length;if(u){if(d){var p=O(l,o);s.push("status(".concat(p,")"))}h||s.push("category(empty())")}if(h&&(u||s.push("status(empty())"),g)){var f=O(a,c,!0);s.push("category(".concat(f,")"))}return s.join(",")}var D,E=function(e){var t,n={},i=0,r="",s=(0,p.Z)(e);try{for(s.s();!(t=s.n()).done;){var l=t.value;if("("!==l){if(")"!==l)0!==i||","!==l?r+=l:r="";else if(r+=l,0===--i){var a=r.indexOf("("),o=r.substr(0,a),c=r.substr(a+1,r.length-1-(a+1));n[o]=c}}else r+=l,i++}}catch(u){s.e(u)}finally{s.f()}return n},P=function(e,t,n,i,r){return"values"===e?[{values:t.split(",").map(unescape)}]:"value"===e?[{value:unescape(t)}]:"status"===e||"category"===e?function(e,t,n,i,r){for(var s=E(t),l=[],a=0,o=Object.entries(s);a<o.length;a++){var c=(0,d.Z)(o[a],2),h=c[0],g=c[1];if("in"===h){var f=g.split(",").map(unescape);"category"===e&&(f=f.map((function(e){return"".concat(e," ")}))),l.push.apply(l,(0,u.Z)(f.map((function(e){return{value:e}}))))}if("notIn"===h){var m=g.split(",").map(unescape),v=[];if("category"===e){m=m.map((function(e){return"".concat(e," ")}));var b,I=(0,p.Z)(i[r]);try{for(I.s();!(b=I.n()).done;){var C=b.value;m.includes(C)||v.push({value:C})}}catch(j){I.e(j)}finally{I.f()}}else{var x,y=(0,p.Z)(n[r]);try{for(y.s();!(x=y.n()).done;){var Z=x.value;m.includes(Z)||v.push({value:Z})}}catch(j){y.e(j)}finally{y.f()}}l.push.apply(l,v)}}return l}(e,t,n,i,r):void 0},M=function(e){var t=e.categoryValues,n=e.statusValues;return function(e){for(var i=E(e),r=[],s=0,l=Object.entries(i);s<l.length;s++){var a=(0,d.Z)(l[s],2),o=a[0],h=a[1];if("id"!==o)if("id_any"!==o)for(var g=o,f=E(h),m={},v=0,b=Object.entries(f);v<b.length;v++){for(var I=(0,d.Z)(b[v],2),C=I[0],x=I[1],y=C.split("*"),Z=(0,d.Z)(y,2),j=Z[0],A=Z[1],F="".concat(g,"_").concat(unescape(A),"_").concat(j),W=m[F]||[],N=E(x),B=0,G=Object.entries(N);B<G.length;B++){var Y=(0,d.Z)(G[B],2),w=Y[0],S=Y[1];W.push.apply(W,(0,u.Z)(P(w,S,n[g],t[g],j)))}for(var k=!1,V=!1,R=0,H=Object.keys(N);R<H.length;R++){var T=H[R];"status"===T?k=!0:"category"===T&&(V=!0)}(k&&!V||!k&&V)&&(k?W.push.apply(W,(0,u.Z)(t[g][j].map((function(e){return{value:e}})))):W.push.apply(W,(0,u.Z)(n[g][j].map((function(e){return{value:e}})))));var X,K=(0,p.Z)(W);try{for(K.s();!(X=K.n()).done;){var L=X.value;r.push((0,c.Z)({id:F},L))}}catch(U){K.e(U)}finally{K.f()}}else r.push((0,c.Z)({id:"id"},E(h)));else{var O=E(h);r.push((0,c.Z)({id:"id"},P("values",O.values)[0]))}}return r}},J=function(e,t){var n=function(e){var t=e.statusValues,n=e.categoryValues;return function(e){var i,r={},s=[],l=(0,p.Z)(e);try{for(l.s();!(i=l.n()).done;){var a=i.value,o=a.id,c=a.value,u=a.values,h=a.isTableTabFilter;if("id"!==o){var g=o.split("_"),f=(0,d.Z)(g,3),m=f[0],v=f[1],I=f[2],C=r[m]||{},x=C[I]||{name:escape(v)};if(t[m][I]||n[m][I])if(c.endsWith(" ")){var y=x.categoryValues||[];y.push(c),x.categoryValues=y}else{var Z=x.statusValues||[];Z.push(c),x.statusValues=Z}else x.value=c;C[I]=x,r[m]=C}else u&&u.length>0?r.ids={values:u.map((function(e){return e||""}))}:h&&s.push({id:o,value:c})}}catch(L){l.e(L)}finally{l.f()}var j=r.ids,F=(0,b.Z)(r,A),W=[];j&&W.push("id(values(".concat(j.values.map(escape).join(","),"))")),s&&s.forEach((function(e){W.push("id_any(value(".concat(e.value,"))"))}));for(var N=0,B=Object.entries(F);N<B.length;N++){for(var G=(0,d.Z)(B[N],2),Y=G[0],w=G[1],S=[],k=0,V=Object.entries(w);k<V.length;k++){var R=(0,d.Z)(V[k],2),H=R[0],T=R[1],X="".concat(H,"*").concat(T.name,"*"),K=void 0;""!==(K=T.statusValues||T.categoryValues?U(T,t,Y,H,n):"value(".concat(escape(T.value),")"))&&S.push("".concat(X,"(").concat(K,")"))}S.length>0&&W.push("".concat(Y,"(").concat(S.join(","),")"))}return W.join(",")}}({statusValues:e,categoryValues:t});return function(e,t){var i=X();if(!e)return K(i,t);var r=n(e);return r?K((0,c.Z)((0,c.Z)({},i),{},{filter:r}),t):(delete i.filter,K((0,c.Z)({},i),t))}},z=function(e){K((0,c.Z)((0,c.Z)({},X()),e))},_="&#x2008;",Q="&#x2007;",q=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unknown";(0,s.Z)(this,e),this._defaultOptions={whitespaceFormat:!1,html:!1,leadingZero:!0,additionalFormatting:function(e){return e}},this.significantDigits=t,this.maxPositiveDecimalPosition=-1,this.maxNegativeDecimalPosition=-1,this.name=n}return(0,l.Z)(e,[{key:"addDataItem",value:function(e){var t=this.format(e).split(/\.|,/),n=(0,d.Z)(t,2),i=n[0],r=n[1];this.maxPositiveDecimalPosition=Math.max(this.maxPositiveDecimalPosition,i&&"0"!==i?i.length:0),this.maxNegativeDecimalPosition=Math.max(this.maxNegativeDecimalPosition,r?r.length:0)}},{key:"format",value:function(e){var t=e.toString(),n="",i="",r=0,s=0,l=!1,a=!1;if("NaN"===t)return"NaN";if(t.endsWith("Infinity"))return t.replace("Infinity","Inf");if(t.includes("e")){var o=t.split("-"),c=(0,d.Z)(o,2),u=c[0],h=c[1],g=0;u.includes(".")&&(g=1),t=Number(e).toFixed(Number(h)+g)}for(var p=t.replace(/,/,".").indexOf(".");s<this.significantDigits-1&&t.length>r;){var f=t[r];if("."===f||","===f)n+=".",a=!0;else{if(!l){if("0"===f){r+=1,a&&(n+=f);continue}l=!0}n+=f,s+=1}r+=1}if(i=t.substring(r),""===n&&""===i&&(n=t),"."===n[0]&&(n="0".concat(n)),""!==i){var m="."===i[0];if(i=i.replace(/\./,""),i="".concat(i[0],".").concat(i.substr(1)),i=Math.round(Number(i)),(i=isNaN(i)?"":i.toString()).length>1&&"."!==i[0]){var v=i[0];i=i[1];for(var b=n.length,I=n.split("."),C=(0,d.Z)(I,2)[1],x=C&&C.length-1||0,y=C?"0.":"",Z=x;Z>0;)y+="0",Z-=1;for(n=function(e,t){var n=e,i=t;if("string"===typeof e&&(n=Number(e)),"string"===typeof t&&(i=Number(t)),Number.isInteger(n)||Number.isInteger(i))return n+i;var r=e.toString(),s=r.length,l=r.indexOf("."),a=t.toString(),o=a.length,c=a.indexOf("."),u=Math.max(s-l,o-c)-1;return Number((n+i).toFixed(u))}(n,y+=v).toFixed(x+1).substr(0,b);n.length<b;)n+="0"}var j=p;for(m&&(i=".".concat(i)),-1===p&&(j=t.length);n.length+i.length<j;)i+="0"}return"".concat(n).concat(i)}},{key:"build",value:function(){var e=this;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,c.Z)((0,c.Z)({},e._defaultOptions),n),r=i.whitespaceFormat,s=i.html,l=i.leadingZero,a=i.additionalFormatting,o={significantDigits:e.significantDigits,maxDecimalInputLength:e.maxNegativeDecimalPosition};if(B(e.significantDigits))return a(t.toString(),o);var u=e.format(t);if("NaN"===(u=a(u,o)))return u;if(r){var h=s?_:" ",g=u.split(/\.|,/),p=(0,d.Z)(g,2),f=p[0],m=p[1];"0"!==f||l||(f=m?"":"0"),f=f||"";for(var v=(m=m||"")?".":h;m.length<e.maxNegativeDecimalPosition;)m+=" ";return s&&(f=f.replace(/ /g,Q),m=m.replace(/ /g,Q)),"".concat(f).concat(m?v:"").concat(m)}return!l&&u.startsWith("0.")?u.substr(1):u}}}]),e}(),$=function(e){var t=X(),n=[];t.hidden&&(n=t.hidden.split(",").filter((function(t){return Number.isInteger(parseInt(t))&&e.some((function(e){return e.toolIdx===parseInt(t)}))})).map((function(e){return parseInt(e)})));var i={};return Object.keys(t).filter((function(e){return/hidden[0-9]+/.test(e)})).forEach((function(n){var r=parseInt(n.replace("hidden","")),s=e.find((function(e){return e.toolIdx===r}));Number.isInteger(r)&&s&&(i[r]=t[n].split(",").filter((function(e){return Number.isInteger(parseInt(e))&&s.columns.some((function(t){return t.colIdx===parseInt(e)}))})).map((function(e){return parseInt(e)})))})),n.forEach((function(t){i[t]=e.find((function(e){return e.toolIdx===t})).columns.map((function(e){return e.colIdx}))})),e.forEach((function(e){i[e.toolIdx]||(i[e.toolIdx]=[])})),i},ee=function(e,t){var n,i=e.find((function(e){return n=e.columns.find((function(n){return"status"!==n.type&&!t[e.toolIdx].includes(n.colIdx)}))}));return n||(i=e.find((function(e){return n=e.columns.find((function(n){return"status"===n.type&&!t[e.toolIdx].includes(n.colIdx)}))}))),i&&n?[i.toolIdx,n.colIdx]:[void 0,void 0]},te=function(e,t){var n,i={},r=(0,p.Z)(e);try{for(r.s();!(n=r.n()).done;){i[n.value]=!0}}catch(o){r.e(o)}finally{r.f()}var s,l=(0,p.Z)(t);try{for(l.s();!(s=l.n()).done;){var a=s.value;if(B(i[a]))return!1}}catch(o){l.e(o)}finally{l.f()}return!0},ne=function(e){var t=e.toString().split(/,|\./),n=(0,d.Z)(t,2)[1];if(B(n)||0===n.length)return 1;for(var i=".",r=0;r<n.length-1;r+=1)i+="0";return i+="1"},ie=function(e){var t=[];return(e=e.filter((function(e,t){return t%2===0&&0!==t}))).forEach((function(e){return t.push(e.columns.filter((function(e){return e.hidden})).map((function(e){return e.id})))})),t.flat()},re=["handler"],se=["column","title","children"],le=["runSet"],ae=["cell","href","toggleLinkOverlay","force"],oe=function(e){var t=e.handler,n=(0,b.Z)(e,re);return(0,j.jsx)("span",(0,c.Z)((0,c.Z)({onClick:t,title:"",className:"selectColumns"},n),{},{children:"Click here to select columns"}))},ce=function(e){var t=e.column,n=e.title,i=void 0===n?"Click here to sort. Hold shift to multi-sort":n,r=e.children,s=(0,b.Z)(e,se);return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({title:i},s),{},{children:r||R(t)}))},ue=function(e){var t=e.runSet,n=(0,b.Z)(e,le);return(0,j.jsx)("span",(0,c.Z)((0,c.Z)({className:"header__tool-infos"},n),{},{title:H(t),children:H(t)}))},de=function(e){var t=e.cell,n=e.href,i=void 0===n?t.value.href:n,r=e.toggleLinkOverlay,s=e.force,l=void 0!==s&&s,a=(0,b.Z)(e,ae),o=t.value.html,u=o?void 0:t.value.raw;return l||u||o?i?(0,j.jsx)("a",(0,c.Z)((0,c.Z)({href:i,onClick:function(e){return r(e,i)},dangerouslySetInnerHTML:o?{__html:o}:void 0},a),{},{children:u})):(0,j.jsx)("div",(0,c.Z)((0,c.Z)({dangerouslySetInnerHTML:o?{__html:o}:void 0},a),{},{children:u})):null},he=function(e){return Object.freeze({Header:"",accessor:"separator"+e,className:"separator",columns:[{accessor:"separator"+e,className:"separator",width:2,minWidth:2}]})},ge=function(e,t,n){return[he(t),{Header:(0,j.jsx)(ue,{runSet:e}),columns:e.columns.map((function(e,i){return n(t,e,i)})),id:"runset-column"}]},pe=n(1330),fe=n.n(pe),me=["distincts","categories","statuses"],ve="empty_row",be=function(e){return function(t){var n=(0,u.Z)(t);if(e.diff&&(n=n.filter((function(t){var n,i=(0,p.Z)(e.diff);try{for(i.s();!(n=i.n()).done;){var r,s=n.value.col,l={},a=(0,p.Z)(t.results);try{for(a.s();!(r=a.n()).done;){var o=r.value.values[s].raw;l[o]||(l[o]=!0)}}catch(c){a.e(c)}finally{a.f()}if(1===Object.keys(l).length)return!1}}catch(c){i.e(c)}finally{i.f()}return!0}))),!B(e.id)){var i=e.id,r=i.value,s=i.values;n=r?n.filter((function(e){return e.id.some((function(e){return e===r||e.includes(r)}))})):n.filter((function(e){var t=e.id;return s.every((function(e,n){var i=t[n];return!(!B(e)&&""!==e)||!B(i)&&""!==i&&(i===e||i.includes(e))}))}))}var l=n.filter((function(t){for(var n in function(e,t){return Object.keys(t).filter((function(t){return!e.includes(t)})).reduce((function(e,n){return e[n]=t[n],e}),{})}(["diff","id"],e))for(var i in e[n]){var r,s=!1,l=!1,a=!1,o=(0,p.Z)(e[n][i]);try{for(o.s();!(r=o.n()).done;){var c=r.value,u=c.value,d=c.min,h=c.max,g=c.category,f=c.status;if(B(d)||B(h))if(B(g))if(B(f)){var m=t.results[n].values[i].raw;if(B(m)){s=!1;continue}s=s||u===m||m.includes(u)}else{var v="empty"===t.results[n].category&&f===ve;a=t.results[n].values[i].raw===f||a||v,s=l&&a}else s=(l=t.results[n].category===g||l)&&a;else{var b=t.results[n].values[i].raw;if(B(b)){s=!1;continue}var I=Number(b);s=s||I>=d&&I<=h}if(s)break}}catch(C){o.e(C)}finally{o.f()}if(!s)return!1}return!0}));return l}},Ie=(D={},(0,f.Z)(D,"empty","Empty rows"),(0,f.Z)(D,"aborted","\u2014"),D),Ce=[50,100,250,500,1e3,2500],xe=function(){var e=X();return e.sort?e.sort.split(";").map((function(e){var t=e.split(",");return{id:t[0],desc:"desc"===t[1]}})):[]},ye=function(e){var t=(0,i.useState)(!0),n=(0,d.Z)(t,2),r=n[0],s=n[1],l=(0,i.useState)(ye()),a=(0,d.Z)(l,2),o=a[0],h=a[1],f=(0,i.useState)({}),b=(0,d.Z)(f,2),I=b[0],C=b[1],x=(0,i.useState)(!1),y=(0,d.Z)(x,2),Z=y[0],A=y[1],F=(0,g.k6)(),w=function(t){"id"===t.id&&(t.isTableTabFilter=!0);var n=[].concat((0,u.Z)(e.filters.filter((function(e){return e.id!==t.id}))),[t]);n=n.filter((function(e){return""!==e.value})),e.addTypeToFilter(n);var i=[];if("status"===t.type){var r=t.id.split("_"),s=(0,d.Z)(r,3),l=s[0],a=s[1],o=s[2],c=t.value;if("all"===c.trim())i=function(t){var n,i=t.tool,r=t.name,s=t.column,l=[],a=(0,p.Z)(e.statusValues[i][s]);try{for(a.s();!(n=a.n()).done;){var o=n.value;l.push({id:"".concat(i,"_").concat(r,"_").concat(s),value:o})}}catch(g){a.e(g)}finally{a.f()}var c,u=(0,p.Z)(e.categoryValues[i][s]);try{for(u.s();!(c=u.n()).done;){var d=c.value,h="".concat(d," ");l.push({id:"".concat(i,"_").concat(r,"_").concat(s),value:h})}}catch(g){u.e(g)}finally{u.f()}return l}({tool:l,name:a,column:o}),n=n.filter((function(e){var n=e.id,i=e.value;return!(n===t.id&&"all"===i.trim())}));else i=function(t){var n,i=t.tool,r=t.name,s=t.column,l=t.isCategory,a=l?e.statusValues:e.categoryValues,o=[],c=(0,p.Z)(a[i][s]);try{for(c.s();!(n=c.n()).done;){var u=n.value;o.push({id:"".concat(i,"_").concat(r,"_").concat(s),value:"".concat(u).concat(l?"":" ")})}}catch(d){c.e(d)}finally{c.f()}return o}({tool:l,name:a,column:o,isCategory:" "===c[c.length-1]})}e.addTypeToFilter(i),e.filterPlotData([].concat((0,u.Z)(n),(0,u.Z)(i)),!0)};function S(e){var t=e.column,n=t.id,r=(t.filter,e.currFilters),s=n+"_filter",l=r.find((function(e){return e.id===n})),a=l?l.value:"",o=(0,i.useState)(""),c=(0,d.Z)(o,2),u=c[0],h=c[1],g=(0,i.useState)(a),p=(0,d.Z)(g,2),f=p[0],m=p[1],v="id"===n&&Z?"To edit, please clear task filter in the sidebar":"text";return(0,j.jsx)("input",{id:s,className:"filter-field",placeholder:v,defaultValue:f,onChange:function(e){var t=e.target.value;m(t),clearTimeout(u),h(setTimeout((function(){w({id:n,value:t}),document.getElementById(s).focus()}),500))},disabled:"id"===n&&Z,type:"search"})}function R(t){var n=t.column,i=n.id,r=(n.filter,t.runSetIdx),s=t.columnIdx,l=e.categoryValues[r][s],a=function(e){var t=e.categoryFilters,n=e.statusFilters,i=e.categoryFilterValues,r=e.statusFilterValues,s=[];return te(t,i)||(s=t),te(n,r)||(s=[].concat((0,u.Z)(s),(0,u.Z)(n))),s}({categoryFilters:V([r,"categories"],[],o),statusFilters:V([r,s],[],o),categoryFilterValues:l.map((function(e){return"".concat(e," ")})),statusFilterValues:e.statusValues[r][s]}),c=0===a.length,d=a.length>1||a[0]===W,h=a&&a[0],g=(c?"all ":d&&"multiple")||h;return(0,j.jsxs)("select",{className:"filter-field",onChange:function(e){return w({id:i,value:e.target.value})},value:g,children:[d&&(0,j.jsx)("option",{value:"multiple",disabled:!0,children:a.map((function(e){return e.trim()})).filter((function(e){return"all"!==e&&e!==W})).join(", ")||"No filters selected"}),(0,j.jsx)("option",{value:"all ",children:"Show all"}),l.filter((function(e){return e in Ie})).map((function(e){return(0,j.jsx)("option",{value:e+" ",children:Ie[e]},e)})),(0,j.jsx)("optgroup",{label:"Category",children:l.filter((function(e){return!(e in Ie)})).sort().map((function(e){return(0,j.jsx)("option",{value:e+" ",className:e,children:e},e)}))}),(0,j.jsx)("optgroup",{label:"Status",children:e.statusValues[r][s].filter((function(e){return e!==ve})).sort().map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))})]})}function H(e){var t=e.column,n=t.id,r=(t.filter,e.currFilters),s=n+"_filter",l=r.find((function(e){return e.id===n})),a=l?l.value:"",o=(0,i.useState)(""),c=(0,d.Z)(o,2),u=c[0],h=c[1],g=(0,i.useState)(a),p=(0,d.Z)(g,2),f=p[0],m=p[1];return(0,j.jsx)("input",{id:s,className:"filter-field",placeholder:"Min:Max",defaultValue:f,onChange:function(e){var t=e.target.value;m(t),clearTimeout(u),h(setTimeout((function(){w({id:n,value:t}),document.getElementById(s).focus()}),500))},type:"search",pattern:"([+-]?[0-9]*(\\.[0-9]*)?)(:[+-]?[0-9]*(\\.[0-9]*)?)?"})}var T=(0,i.useCallback)((function(t){return(0,j.jsx)(S,(0,c.Z)((0,c.Z)({disableTaskText:Z},t),{},{currFilters:e.filters}))}),[Z,e.filters]),L=(0,i.useCallback)((function(t){return(0,j.jsx)(H,(0,c.Z)((0,c.Z)({},t),{},{currFilters:e.filters}))}),[e.filters]),O=(0,i.useMemo)((function(){var t=function(t,n,i){if("status"===n.type)return function(t,n,i){var r="".concat(t,"_").concat(n.display_title,"_").concat(i),s=I[r];return{id:r,Header:(0,j.jsx)(ce,{column:n}),className:"reg-column",hidden:e.hiddenCols[t].includes(n.colIdx),minWidth:50,width:s||k(n,10),accessor:function(e){return e.results[t].values[i]},Cell:function(n){var i,r=n.row.original.results[t].category,s=n.row.original.results[t].href;return"aborted"===r?(s=void 0,i="Result missing because run was aborted or not executed"):"empty"===r?i="Result missing because task was not part of benchmark set":s&&(i="Click here to show output of tool"),(0,j.jsx)(de,{cell:n,href:s,className:r,toggleLinkOverlay:e.toggleLinkOverlay,title:i,force:!0})},sortType:function(e,t,n,i){return Y(e.values[n],t.values[n])},filter:function(e){return e},Filter:function(e){return(0,j.jsx)(R,(0,c.Z)((0,c.Z)({},e),{},{runSetIdx:t,columnIdx:i}))}}}(t,n,i);var r="".concat(t,"_").concat(n.display_title,"_").concat(i),s=I[r],l=N(n)?L:T;return{id:r,Header:(0,j.jsx)(ce,{column:n}),className:"reg-column",hidden:e.hiddenCols[t].includes(n.colIdx),minWidth:50,width:s||k(n),accessor:function(e){return e.results[t].values[i]},Cell:function(t){return(0,j.jsx)(de,{cell:t,toggleLinkOverlay:e.toggleLinkOverlay})},filter:function(e){return e},Filter:l,sortType:function(e,t,i,r){return N(n)?(s=e.values[i],l=t.values[i],G(s,1/0)-G(l,1/0)):Y(e.values[i],t.values[i]);var s,l}}},n=e.tools.map((function(e,n){return ge(e,n,t)})).flat();return[{Header:function(){return(0,j.jsx)("div",{className:"fixed-task-header",children:(0,j.jsx)("form",{children:(0,j.jsxs)("label",{title:"Fix the first column",children:["Fixed task:",(0,j.jsx)("input",{name:"fixed",type:"checkbox",checked:r,onChange:function(e){var t=e.target;return s(t.checked)}})]})})})},className:"fixed-task",id:"task-id-column",sticky:r?"left":"",columns:[(0,c.Z)((0,c.Z)({width:.3*window.innerWidth,minWidth:230},I.id&&{width:I.id}),{},{Header:(0,j.jsx)(ce,{children:(0,j.jsx)(oe,{handler:e.selectColumn})}),accessor:"id",Cell:function(t){var n=t.row.original.id.map((function(e){return(0,j.jsx)("span",{className:"row_id",children:e},e)})),i=t.row.original.href;return i?(0,j.jsx)("a",{className:"row__name--cellLink",href:i,title:"Click here to show source code",onClick:function(t){return e.toggleLinkOverlay(t,i)},children:n},i):(0,j.jsx)("span",{title:"This task has no associated file",children:n})},Filter:T,sortType:function(e,t,n,i){var r=Array.isArray(e.values[n])?e.values[n].join():e.values[n],s=Array.isArray(t.values[n])?t.values[n].join():t.values[n];return r>s?1:r<s?-1:0}})]}].concat(n)}),[I,r,e,T,L]),U=(0,i.useMemo)((function(){return e.tableData}),[e.tableData]),D=(0,i.useMemo)((function(){return{Filter:(0,j.jsx)(j.Fragment,{})}}),[]),E=(0,m.useTable)({columns:O,data:U,defaultColumn:D,initialState:{sortBy:xe(),pageIndex:parseInt(X().page)-1||0,hiddenColumns:ie(O),pageSize:parseInt(X().pageSize)||250}},m.useFilters,m.useFlexLayout,m.useResizeColumns,m.useSortBy,m.usePagination,v.useSticky),P=E.getTableProps,M=E.getTableBodyProps,J=E.headerGroups,z=(E.rows,E.prepareRow),_=E.page,Q=E.canPreviousPage,q=E.canNextPage,$=E.pageOptions,ee=E.pageCount,ne=E.gotoPage,re=E.nextPage,se=E.previousPage,le=E.setPageSize,ae=E.setSortBy,ue=E.state,he=ue.pageIndex,pe=ue.pageSize,me=ue.sortBy,be=ue.columnResizing;function ye(){var t,n={},i=(0,p.Z)(e.filters);try{for(i.s();!(t=i.n()).done;){var r=t.value,s=r.value,l=r.values,a=r.id;"id"===a&&A(!B(l));var o=a.split("_"),c=(0,d.Z)(o,3),u=c[0],h=c[2],g=n[u]||{};if("string"===typeof s&&" "===s[s.length-1]){var f=g.categories||[];f.push(s),g.categories=f}else{var m=g[h]||[];m.push(s),g[h]=m}n[u]=g}}catch(v){i.e(v)}finally{i.f()}return n}(0,i.useEffect)((function(){var e=me.map((function(e){return e.id+","+(e.desc?"desc":"asc")})).join(";"),t=e.length?e:void 0;X().sort!==t&&K({sort:t},{keepOthers:!0})}),[me]),(0,i.useEffect)((function(){var e=250!==pe?pe:void 0;X().pageSize!==e&&K({pageSize:e},{keepOthers:!0})}),[pe]),(0,i.useEffect)((function(){var e=he&&0!==he?Number(he)+1:void 0;X().page!==e&&K({page:e},{keepOthers:!0})}),[he]),(0,i.useEffect)((function(){var e=be.columnWidths;!be.isResizingColumn&&Object.keys(e).length>0&&C((0,c.Z)((0,c.Z)({},I),e))}),[be,I]),(0,i.useEffect)((function(){var e=ye();fe()(e,o)||h(e),he>=ee&&ne(ee-1)}),[e.filters,o,ne,he,ee]),(0,i.useEffect)((function(){return F.listen((function(e){le(X().pageSize||250),ae(xe()),ne(X().page-1||0)}))}),[F,ne,le,ae]);var Ze=function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({className:"tr headergroup"},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return(0,j.jsxs)("div",(0,c.Z)((0,c.Z)({},e.getHeaderProps({className:"th header ".concat(e.headers?"outer ":"").concat(e.className)})),{},{children:[(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.canSort&&(!e.className||!e.className.includes("separator"))&&e.getSortByToggleProps({className:"header-sort-container clickable ".concat(e.isSorted?e.isSortedDesc?"sorted-desc ":"sorted-asc ":"")})),{},{children:e.render("Header")})),(!e.className||!e.className.includes("separator"))&&(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getResizerProps()),{},{className:"resizer ".concat(e.isResizing?"isResizing":"")}))]}))}))}))};return(0,j.jsx)("div",{className:"main-table",children:(0,j.jsxs)("div",{className:"table sticky",children:[(0,j.jsx)("div",{className:"table-content",children:(0,j.jsxs)("div",(0,c.Z)((0,c.Z)({className:"table-container"},P()),{},{children:[function(e){var t=e[0],n=e.filter((function(e){return e.headers.some((function(e){return e.canFilter}))}));return(0,j.jsxs)("div",{className:"table-header",children:[Ze(t),(0,j.jsxs)("div",{className:"shadow-container",children:[e.slice(1).map(Ze),n.map((function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({className:"tr headergroup filter"},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getHeaderProps({className:"th header filter ".concat(e.headers?"outer ":"").concat(e.className)})),{},{children:e.canFilter?e.render("Filter"):null}))}))}))}))]})]})}(J),(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},M()),{},{className:"table-body body",children:_.map((function(e){return z(e),(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getRowProps()),{},{className:"tr",children:e.cells.map((function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getCellProps({className:"td "+(e.column.className||"")})),{},{children:e.render("Cell")}))}))}))}))}))]}))}),(0,j.jsxs)("div",{className:"pagination",children:[(0,j.jsxs)("div",{id:"pagination-previous",className:"pagination-container",children:[(0,j.jsx)("div",{onClick:function(){return se()},className:"pagination-element button".concat(Q?"":" disabled"),children:"Previous"})," "]}),(0,j.jsxs)("div",{id:"pagination-center",className:"pagination-container",children:[(0,j.jsxs)("div",{id:"goto-page-element",className:"pagination-element",children:["Page",(0,j.jsx)("input",{"aria-label":"jump to page",type:"number",value:Number(he)+1,onChange:function(e){return ne(Number(e.target.value)-1)}}),"of ",$.length]}),(0,j.jsx)("div",{id:"set-page-element",className:"pagination-element",children:(0,j.jsx)("select",{value:pe,onChange:function(e){return le(Number(e.target.value))},children:Ce.map((function(e){return(0,j.jsxs)("option",{value:e,children:[e," rows"]},e)}))})})]}),(0,j.jsxs)("div",{id:"pagination-next",className:"pagination-container",children:[(0,j.jsx)("div",{onClick:function(){return re()},className:"pagination-element button".concat(q?"":" disabled"),children:"Next"})," "]})]})]})})},Ze=n(4165),je=n(5861);n(9e3);var Ae=[],Fe={},We=1,Ne=[{template:"data:text/plain;base64,Ly8gVGhpcyBmaWxlIGlzIHBhcnQgb2YgQmVuY2hFeGVjLCBhIGZyYW1ld29yayBmb3IgcmVsaWFibGUgYmVuY2htYXJraW5nOgovLyBodHRwczovL2dpdGh1Yi5jb20vc29zeS1sYWIvYmVuY2hleGVjCi8vCi8vIFNQRFgtRmlsZUNvcHlyaWdodFRleHQ6IDIwMTktMjAyMCBEaXJrIEJleWVyIDxodHRwczovL3d3dy5zb3N5LWxhYi5vcmc+Ci8vCi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wCgovLyBDT1BZIE9GIHV0aWxzLmpzLCBhcyBpbXBvcnRzIHdpbGwgbm90IHdvcmsgaGVyZQovKioKICogRnVuY3Rpb24gdG8gc2FmZWx5IGFkZCB0d28gbnVtYmVycyBpbiBhIHdheSB0aGF0IHNob3VsZCBtaXRpZ2F0ZSBlcnJvcnMKICogY2F1c2VkIGJ5IGluYWNjdXJhdGUgZmxvYXRpbmcgcG9p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stats"}].map((function(e){for(var t=e.template,n=e.poolSize,i=e.name,r=[],s=function(e){var n=new Worker(t),i={worker:n,busy:!1};n.onmessage=function(e){return function(e,t){var n=e.data,i=n.transaction,r=n.result,s=Fe[i];t.busy=!1,s(r),delete Fe[i]}(e,i)},r.push(i)},l=0;l<n;l+=1)s();return{name:i,pool:r}})).reduce((function(e,t){var n=t.name,i=t.pool;return(0,c.Z)((0,c.Z)({},e),{},(0,f.Z)({},n,i))}),{}),Be=function e(){var t=Ae.shift();if(t){var n=function(e){var t=Ne[e].filter((function(e){return!e.busy}))[0];return t?t.busy?null:(t.busy=!0,t):null}(t.name);if(!n)return Ae.unshift(t),void setImmediate(e);var i=We;We+=1;var r={data:t.data,transaction:i};Fe[i]=t.callback,n.worker.postMessage(r),setImmediate(e)}},Ge=function(){var e=(0,je.Z)((0,Ze.Z)().mark((function e(t){var n,i;return(0,Ze.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.name,i=t.data,e.abrupt("return",new Promise((function(e){Ae.push({name:n,data:i,callback:e}),setImmediate(Be)})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ye=["columnType"],we=["meta"],Se={total:{title:"all results"},correct:{indent:1,title:"correct results",description:"(property holds + result is true) OR (property does not hold + result is false)"},correct_true:{indent:2,title:"correct true",description:"property holds + result is true"},correct_false:{indent:2,title:"correct false",description:"property does not hold + result is false"},correct_unconfirmed:{indent:1,title:"correct-unconfirmed results",description:"(property holds + result is true) OR (property does not hold + result is false), but unconfirmed"},correct_unconfirmed_true:{indent:2,title:"correct-unconfirmed true",description:"property holds + result is true, but unconfirmed"},correct_unconfirmed_false:{indent:2,title:"correct-unconfirmed false",description:"property does not hold + result is false, but unconfirmed"},wrong:{indent:1,title:"incorrect results",description:"(property holds + result is false) OR (property does not hold + result is true)"},wrong_true:{indent:2,title:"incorrect true",description:"property does not hold + result is true"},wrong_false:{indent:2,title:"incorrect false",description:"property holds + result is false"}},ke=function(e){return e.filter((function(e){return Se[e.id]}))},Ve=function(){var e=(0,je.Z)((0,Ze.Z)().mark((function e(t){var n,i,r,s,l,a,o;return(0,Ze.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.tools,i=t.tableData,r=t.stats,s=Re(n),e.next=4,De({tools:n,tableData:i,formatter:s});case 4:return l=e.sent,a=r.map((function(e){return e.id})).filter((function(e){return Se[e]})),o=Te(l,s,a),l=o.map((function(e,t){var i,r=[],s=n[t].columns,l=0,a=s[l],o=(0,p.Z)(e);try{for(o.s();!(i=o.n()).done;){for(var c=i.value,u=c.title;l<s.length&&u!==a.title;)r.push({}),a=s[++l];if(l>=s.length)break;r.push(c),a=s[++l]}}catch(d){o.e(d)}finally{o.f()}return r})),e.abrupt("return",ke(r).map((function(e){var t=e.content.map((function(t,n){return l[n].map((function(t){return t[e.id]}))}));return(0,c.Z)((0,c.Z)({},e),{},{content:t})})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Re=function(e){return e.map((function(e,t){return e.columns.map((function(e,n){var i=e.number_of_significant_digits;return new q(i,"".concat(t,"-").concat(n))}))}))},He=function(e,t,n){return function(n,i){var r=i.significantDigits,s=Number(n),l=n.split("."),a=(0,d.Z)(l,2),o=a[0],c=a[1];if(["sum","avg","stdev"].includes(e)){var u,h;if(B(r)&&"sum"!==e)return s.toFixed(2);var g=o.replace(/^0+/,""),p=c||"";""===g&&(p=p.replace(/^0+/,""));var f=t-(null!==(u=null===c||void 0===c?void 0:c.length)&&void 0!==u?u:0),m=r-(g.length+p.length),v=m>0,b=(null!==(h=null===c||void 0===c?void 0:c.length)&&void 0!==h?h:0)+m;if(f>0&&v&&"stdev"!==e)return f>m?s.toFixed(b):s.toFixed(t);if("avg"===e&&!v&&f<0&&"0"===n[n.length-1])return s.toFixed(t);if("stdev"===e&&v)return s.toFixed(b)}return n}},Te=function(e,t,n){var i=e.map((function(e,i){return e.map((function(e,r){var s,l={columnType:e.columnType},a=(0,p.Z)(n);try{for(a.s();!(s=a.n()).done;){var o,c=s.value,u=e[c];u&&(l[c]=u,null!==(o=null===u||void 0===u?void 0:u.sum)&&void 0!==o&&o&&t[i][r].addDataItem(u.sum))}}catch(d){a.e(d)}finally{a.f()}return l}))}));for(var r in t)for(var s in t[r])t[r][s]=t[r][s].build();return i.map((function(e,n){return e.map((function(e,i){e.columnType;var r=(0,b.Z)(e,Ye),s={};if(void 0!==r.total){for(var l=0,a=Object.entries(r);l<a.length;l++){for(var o=(0,d.Z)(a[l],2),c=o[0],u=o[1],h={},g=null===u||void 0===u?void 0:u.meta,p=0,f=Object.entries(u);p<f.length;p++){var m,v=(0,d.Z)(f[p],2),I=v[0],C=v[1];if(!we.includes(I)){var x=null!==(m=null===g||void 0===g?void 0:g.maxDecimals)&&void 0!==m?m:0;if("title"!==I){if(!B(C)&&(!isNaN(C)||"NaN"===C)&&t[n][i])try{h[I]="sum"===I?t[n][i](C,{leadingZero:!1,whitespaceFormat:!0,html:!0,additionalFormatting:He(I,x)}):t[n][i](C,{leadingZero:!0,whitespaceFormat:!1,html:!1,additionalFormatting:He(I,x)})}catch(y){console.error({key:I,value:C,formatter:t[n][i],e:y})}}else s.title=C}}s[c]=h}return s}})).filter((function(e){return!B(e)}))}))},Xe="false",Ke="false",Le="other",Oe=function(e,t,n,i,r){return e.map((function(e){var r,s=n(t,e),l=i(t,e);return{categoryType:s.replace(/-/g,"_"),resultType:B(r=l)?Le:"true"===r?"true":r===Xe||r.startsWith("".concat(Xe,"("))&&r.endsWith(")")?Ke:Le,row:e.results[t].values}}))},Ue=function(e){return function(t,n){var i,r=[],s=(0,p.Z)(t);try{for(s.s();!(i=s.n()).done;){var l=i.value,a=l.row,o=l.categoryType,c=l.resultType;for(var u in a){var d=a[u].raw,h=r[u]||[],g=e[n].columns[u],f=g.type,m=g.title;h.push({categoryType:o,resultType:c,column:d,columnType:f,columnTitle:m}),r[u]=h}}}catch(v){s.e(v)}finally{s.f()}return r}},De=function(){var e=(0,je.Z)((0,Ze.Z)().mark((function e(t){var n,i,r,s,l,a,o,c,u,d,h,g,p,f,m,v,b;return(0,Ze.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o in n=t.tools,i=t.tableData,t.formatter,r=function(e,t){return t.results[e].category},s=function(e,t){return t.results[e].values[0].raw},l=[],a=[],n)a.push(Oe(i,o,r,s));for(d in c=Ue(n),u=a.map(c))u[d]=u[d].filter((function(e){return!B(e)}));for(h in u){for(f in g=u[h],p=[],g)m=g[f],p.push(Ge({name:"stats",data:m}));l[h]=p}return v=l.map((function(e){return Promise.all(e)})),e.next=13,Promise.all(v);case 13:return b=e.sent,e.abrupt("return",b);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ee=.15*window.innerWidth,Pe=function(e){return Object.keys(e).filter((function(t){return e[t]&&"sum"!==t})).map((function(t){return"".concat(t,": ").concat(e[t])})).join(", ")||void 0},Me=function(e){var t=e.selectColumn,n=e.tools,r=e.switchToQuantile,s=e.hiddenCols,l=e.tableData,a=e.onStatsReady,o=e.stats,u=e.filtered,h=void 0!==u&&u,g=(0,i.useState)(h?[]:o),p=(0,d.Z)(g,2),f=p[0],b=p[1],I=(0,i.useState)(!0),C=(0,d.Z)(I,2),x=C[0],y=C[1];(0,i.useEffect)((function(){var e=function(){var e=(0,je.Z)((0,Ze.Z)().mark((function e(){var t;return(0,Ze.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!h){e.next=7;break}return e.next=3,Ve({tools:n,tableData:l,stats:o});case 3:t=e.sent,b(t),e.next=8;break;case 7:b(o);case 8:a&&a();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[n,l,a,false,o,h]);var Z=function(e){return(0,j.jsx)("div",{className:"table-header",children:e.map((function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({className:"tr headergroup"},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return(0,j.jsxs)("div",(0,c.Z)((0,c.Z)({},e.getHeaderProps({className:"th header ".concat(e.headers?"outer ":"").concat(e.className||"")})),{},{children:[e.render("Header"),(!e.className||!e.className.includes("separator"))&&(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getResizerProps()),{},{className:"resizer ".concat(e.isResizing?"isResizing":"")}))]}))}))}))}))})},A=function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},w()),{},{className:"table-body body",children:e.map((function(e){return R(e),(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getRowProps()),{},{className:"tr",children:e.cells.map((function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getCellProps({className:"td "+(e.column.className||"")})),{},{children:e.render("Cell")}))}))}))}))}))},F=(0,i.useMemo)((function(){var e=n.map((function(e,t){return ge(e,t,function(e){var t=e.switchToQuantile,n=e.hiddenCols;return function(e,i,r){return{id:"".concat(e,"_").concat(i.display_title,"_").concat(r),Header:(0,j.jsx)(ce,{column:i,className:"header-data clickable",title:"Show Quantile Plot of this column",onClick:function(e){return t(i)}}),hidden:n[e].includes(i.colIdx)||!(N(i)||"status"===i.type),width:k(i,null,"status"===i.type?6:null),minWidth:30,accessor:function(t){return t.content[e][r]},Cell:function(e){var t,n=null===(t=e.value)||void 0===t?void 0:t.sum;return"status"===i.type&&(n=void 0===e.value?0:null===e.value?null:Number.isInteger(Number(e.value.sum))?Number(e.value.sum):e.value.sum),B(n)?(0,j.jsx)("div",{className:"cell",children:"-"}):(0,j.jsx)("div",{dangerouslySetInnerHTML:{__html:n},className:"cell",title:"status"!==i.type?Pe(e.value):void 0})}}}}({switchToQuantile:r,hiddenCols:s}))})).flat();return[{Header:function(){return(0,j.jsx)("form",{children:(0,j.jsxs)("label",{title:"Fix the first column",children:["Fixed row title:",(0,j.jsx)("input",{id:"fixed-row-title",name:"fixed",type:"checkbox",checked:x,onChange:function(e){var t=e.target;return y(t.checked)}})]})})},id:"row-title",sticky:x?"left":"",width:Ee,minWidth:100,columns:[{id:"summary",width:Ee,minWidth:100,Header:(0,j.jsx)(oe,{handler:t}),Cell:function(e){return(0,j.jsx)("div",{dangerouslySetInnerHTML:{__html:(e.row.original.title||"&nbsp;".repeat(4*Se[e.row.original.id].indent)+Se[e.row.original.id].title)+(h?" of selected rows":"")},title:e.row.original.description||Se[e.row.original.id].description,className:"row-title"})}}]}].concat(e)}),[h,x,r,s,t,n]),W=(0,i.useMemo)((function(){return f}),[f]),G=(0,m.useTable)({columns:F,data:W,initialState:{hiddenColumns:ie(F)}},m.useFilters,m.useResizeColumns,m.useFlexLayout,v.useSticky),Y=G.getTableProps,w=G.getTableBodyProps,S=G.headerGroups,V=G.rows,R=G.prepareRow;return(0,j.jsxs)("div",{id:"statistics",children:[(0,j.jsx)("h2",{children:"Statistics"}),function(e,t){return h&&0===f.length?(0,j.jsx)("p",{id:"statistics-placeholder",children:"Please wait while the statistics are being calculated."}):(0,j.jsx)("div",{id:"statistics-table",children:(0,j.jsx)("div",{className:"table sticky",children:(0,j.jsx)("div",{className:"table-content",children:(0,j.jsxs)("div",(0,c.Z)((0,c.Z)({className:"table-container"},Y()),{},{children:[Z(e),A(t)]}))})})})}(S,V)]})},Je=["displayName","tool","limit","host","os","system","date","runset","branch","options","property"],ze=function(e){var t=function(e){return e.split(/[\s]+-/).map((function(e,t){return(0,j.jsx)("li",{children:(0,j.jsx)("code",{children:0===t?e:"-".concat(e)})},e)}))},n=function(e,t){return e?(0,j.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t}):t},i=function(e){var t=e.tool,i=e.version,r=e.project_url,s=e.version_url;return(0,j.jsxs)(j.Fragment,{children:[n(r,t)," ",n(s,i)]})};return(0,j.jsxs)("div",{id:"summary",children:[(0,j.jsxs)("div",{id:"benchmark_setup",children:[(0,j.jsx)("h2",{children:"Benchmark Setup"}),(0,j.jsx)("table",{children:(0,j.jsx)("tbody",{children:Je.map((function(t){return e.tableHeader[t]})).filter((function(e){return null!==e})).map((function(e){return(0,j.jsxs)("tr",{className:e.id,children:[(0,j.jsx)("th",{children:e.name},"td-"+e.id),e.content.map((function(n,r){return function(e,n,r,s){var l="options"===e,a="tool"===e;return(0,j.jsx)("td",{colSpan:r,className:"header__tool-row".concat(l&&" options"),children:l?(0,j.jsx)("ul",{children:t(n)}):a?i(n):n},n+s)}(e.id,n[0],n[1],r)}))]},"tr-"+e.id)}))})})]}),(0,j.jsx)(Me,{selectColumn:e.selectColumn,tools:e.tools,switchToQuantile:e.switchToQuantile,hiddenCols:e.hiddenCols,tableData:e.tableData,onStatsReady:e.onStatsReady,stats:e.stats,filtered:e.filtered}),(0,j.jsxs)("p",{children:["Generated by"," ",(0,j.jsxs)("a",{className:"link",href:"https://github.com/sosy-lab/benchexec",target:"_blank",rel:"noopener noreferrer",children:[" ","BenchExec ",e.version]})]})]})},_e=n(4463),Qe=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(){var e;(0,s.Z)(this,n);for(var i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];return(e=t.call.apply(t,[this].concat(r))).knownLicenses=["BSD-3-Clause","CC-BY-4.0","ISC","MIT","Zlib"],e.linkifyLicense=function(e){return(0,j.jsx)("a",{href:"https://spdx.org/licenses/"+e,target:"_blank",rel:"noopener noreferrer",children:e},e)},e.linkifyLicenses=function(t){return t.split(/([A-Za-z0-9.-]+)/).map((function(t){return e.knownLicenses.includes(t)?e.linkifyLicense(t):t}))},e.render=function(){return(0,j.jsxs)("div",{children:[(0,j.jsx)("h4",{children:(0,j.jsxs)("a",{href:"https://www.npmjs.com/package/"+e.props.name+"/v/"+e.props.version,target:"_blank",rel:"noopener noreferrer",children:[e.props.name," ",e.props.version]})}),e.props.repository&&(0,j.jsxs)(j.Fragment,{children:["Source:"," ",(0,j.jsx)("a",{href:e.props.repository,target:"_blank",rel:"noopener noreferrer",children:e.props.repository}),(0,j.jsx)("br",{})]}),e.props.copyright&&(0,j.jsxs)(j.Fragment,{children:[e.props.copyright,(0,j.jsx)("br",{})]}),"License: ",(0,j.jsx)(j.Fragment,{children:e.linkifyLicenses(e.props.licenses)}),void 0!==e.props.licenseId&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("br",{}),(0,j.jsxs)("details",{children:[(0,j.jsx)("summary",{children:"Full text of license"}),(0,j.jsx)("pre",{children:_e.licenses[e.props.licenseId]})]})]})]})},e}return(0,l.Z)(n)}(i.Component),qe=function(e){return(0,j.jsxs)("div",{className:"info",children:[(0,j.jsx)("div",{className:"info-header",children:(0,j.jsx)("h1",{children:"Info and Help"})}),(0,j.jsx)("h3",{children:"Summary"}),(0,j.jsxs)("ul",{children:[(0,j.jsx)("li",{children:"Shows environment information and a summary of the results."}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Select columns:"})," ",(0,j.jsx)("br",{})," The columns to show can be selected by clicking on ",(0,j.jsx)("em",{children:"Click here to select columns"})," or"," ",(0,j.jsx)("span",{className:"link",onClick:e.selectColumn,children:"here"}),"."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Quantile plot:"})," ",(0,j.jsx)("br",{}),"A quantile plot for a column can be shown by clicking on the respective column header (e.g.,"," ",(0,j.jsx)("em",{children:"cputime"}),")."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Fixed row title:"})," ",(0,j.jsx)("br",{}),"Deselect to let the left-most column scroll together with the rest of the table."]})]}),(0,j.jsx)("h3",{children:"Table"}),(0,j.jsxs)("ul",{children:[(0,j.jsx)("li",{children:"Shows the detailed results."}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Fixed task:"})," ",(0,j.jsx)("br",{}),"Deselect to let the left-most column with the task name scroll together with the rest of the table."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Select columns:"})," ",(0,j.jsx)("br",{})," The columns to show can be selected by clicking on ",(0,j.jsx)("em",{children:"Click here to select columns"})," or"," ",(0,j.jsx)("span",{className:"link",onClick:e.selectColumn,children:"here"}),"."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Filter rows:"})," ",(0,j.jsx)("br",{}),"Filters can be applied to every column in the row below the column header. Numeric columns accept a range filter like ",(0,j.jsx)("em",{children:"min:max"}),", where both ",(0,j.jsx)("em",{children:"min"})," and ",(0,j.jsx)("em",{children:"max"})," are numeric values that can also be omitted for half-open ranges. For text columns (like the task name) any row matches that contains the entered filter value. Several filters can be combined and will be applied together. All filters can be deleted at once with the ",(0,j.jsx)("em",{children:"Reset Filters"})," button in the top right corner."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Sort rows:"})," ",(0,j.jsx)("br",{})," Rows can be sorted by clicking on the column header. Clicking again will toggle the sort order (ascending vs. descending). Hold ",(0,j.jsx)("kbd",{children:"Shift"})," while clicking for adding a column to the sort order."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Tool output:"})," ",(0,j.jsx)("br",{}),"Clicking on a cell in the status column will show the tool output of this run."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Task definition:"})," ",(0,j.jsx)("br",{})," Clicking on the task name will show the content of the respective file."]})]}),(0,j.jsx)("h3",{children:" Quantile Plot and Scatter Plot"}),(0,j.jsxs)("ul",{children:[(0,j.jsx)("li",{children:"Shows plots of the results that are currently visible in the table."}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Correct results only:"})," ",(0,j.jsx)("br",{}),"In addition to the currently applied filter, the plots by default show only correct results. Click ",(0,j.jsx)("em",{children:"Switch to All Results"})," to toggle this behavior."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Select columns:"}),(0,j.jsx)("br",{}),"The drop-down fields above the plots allow to choose which columns are shown in the plot."]})]}),(0,j.jsx)("h3",{children:"About"}),(0,j.jsxs)("p",{children:["This table was generated by"," ",(0,j.jsxs)("a",{className:"link",href:"https://github.com/sosy-lab/benchexec",target:"_blank",rel:"noopener noreferrer",children:["BenchExec ",e.version]}),". For feedback, questions, and bug reports please use our"," ",(0,j.jsx)("a",{className:"link",href:"https://github.com/sosy-lab/benchexec/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22HTML+table%22",target:"_blank",rel:"noopener noreferrer",children:"issue tracker"}),"."]}),(0,j.jsxs)("p",{children:["License:"," ",(0,j.jsx)("a",{className:"link",href:"https://www.apache.org/licenses/LICENSE-2.0",target:"_blank",rel:"noopener noreferrer",children:"Apache 2.0 License"})]}),(0,j.jsxs)("details",{children:[(0,j.jsx)("summary",{children:"This application includes third-party dependencies under different licenses. Click here to view them."}),_e.dependencies.map((function(e){return(0,j.jsx)(Qe,(0,c.Z)({},e),e.name+e.version)}))]})]})},$e=n(9284),et=n.n($e),tt=n(935),nt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;(0,s.Z)(this,n),(i=t.call(this,e)).renderTools=function(){return i.props.tools.map((function(e){var t=e.toolIdx,n=i.state.hiddenCols[t].length!==e.columns.length,r=H(e);return(0,j.jsxs)("tr",{id:r,children:[(0,j.jsx)("td",{id:r,className:n?"checked":"",children:(0,j.jsxs)("label",{children:[r,(0,j.jsx)("input",{name:r+"--"+t,type:"checkbox",checked:n,onChange:function(e){return i.toggleToolHidden(t,e)}})]})}),i.renderToolColumns(t)]},"tr"+r+t)}))},i.renderToolColumns=function(e){var t=i.props.tools.find((function(t){return t.toolIdx===e}));return i.state.selectableCols.map((function(n){if(t.columns.some((function(e){return e.display_title===n}))){var r=!t.columns.filter((function(e){return e.display_title===n})).map((function(e){return e.colIdx})).some((function(t){return i.state.hiddenCols[e].includes(t)}));return(0,j.jsx)("td",{id:"td"+e+n,className:r?"checked":"",children:(0,j.jsxs)("label",{children:[n,(0,j.jsx)("input",{id:e+"--"+n,name:e+"--"+n,type:"checkbox",checked:r,onChange:function(t){return i.toggleToolColHidden(e,n,t)}})]})},n)}return(0,j.jsx)("td",{},n)}))},i.renderColumnHeaders=function(){return i.state.selectableCols.map((function(e){var t=Object.values(i.state.hiddenCols).some((function(t,n){var r=i.props.tools.find((function(e){return e.toolIdx===n}));return!r.columns.filter((function(t){return t.display_title===e})).map((function(e){return e.colIdx})).some((function(e){return t.includes(e)}))&&r.columns.some((function(t){return t.display_title===e}))}));return(0,j.jsx)("th",{id:"td-all-"+e,className:t?"checked":"",children:(0,j.jsxs)("label",{children:[e,(0,j.jsx)("input",{name:e,type:"checkbox",checked:t,onChange:function(t){return i.toggleWholeColHidden(e,t)}})]})},"key"+e)}))},i.toggleAllColsHidden=function(){var e={};i.props.tools.forEach((function(t){return e[t.toolIdx]=[]})),i.state.isButtonOnDeselect&&i.props.tools.forEach((function(t){e[t.toolIdx]=t.columns.map((function(e){return e.colIdx}))})),i.setState((function(t){return{isButtonOnDeselect:!t.isButtonOnDeselect,hiddenCols:e}}))},i.toggleToolHidden=function(e,t){var n=t.target,r=("checkbox"===n.type?n.checked:n.value)?[]:i.props.tools.find((function(t){return t.toolIdx===e})).columns.map((function(e){return e.colIdx}));i.setHiddenColsForTool(e,r)},i.toggleToolColHidden=function(e,t,n){var r=n.target,s="checkbox"===r.type?r.checked:r.value,l=i.props.tools.find((function(t){return t.toolIdx===e})).columns.filter((function(e){return e.display_title===t})).map((function(e){return e.colIdx}));s?i.removeFromHiddenCols(e,l):i.addToHiddenCols(e,l)},i.toggleWholeColHidden=function(e,t){var n=t.target,r="checkbox"===n.type?n.checked:n.value;i.props.tools.forEach((function(t){var n=t.columns.filter((function(t){return t.display_title===e}));if(n.length>0){var s=n.map((function(e){return e.colIdx}));r?i.removeFromHiddenCols(t.toolIdx,s):i.addToHiddenCols(t.toolIdx,s)}}))},i.addToHiddenCols=function(e,t){var n=(0,u.Z)(new Set(i.state.hiddenCols[e].concat(t)));i.setHiddenColsForTool(e,n)},i.removeFromHiddenCols=function(e,t){var n=i.state.hiddenCols[e].filter((function(e){return!t.includes(e)}));i.setHiddenColsForTool(e,n)},i.handlePopState=function(){window.history.back()};var r=e.tools.map((function(e){return e.columns})).flat().filter((function(e,t,n){return t===n.findIndex((function(t){return t.display_title===e.display_title}))})).map((function(e){return e.display_title}));return i.state={isButtonOnDeselect:!0,hiddenCols:i.props.hiddenCols,selectableCols:r},i}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){window.history.pushState({},"",""),window.addEventListener("popstate",this.props.close,!1)}},{key:"componentWillUnmount",value:function(){var e=this;window.removeEventListener("popstate",this.props.close,!1);var t={},n=[];Object.entries(this.state.hiddenCols).forEach((function(i){var r=(0,d.Z)(i,2),s=r[0],l=r[1],a=e.props.tools.find((function(e){return e.toolIdx===parseInt(s)})).columns;l.length===a.length?n.push(s):l.length>0?t["hidden"+s]=l.toString():t["hidden"+s]=null})),n.length>0?t.hidden=n.toString():t.hidden=null,K(t,{keepOthers:!0,history:this.props.history})}},{key:"setHiddenColsForTool",value:function(e,t){this.setState((function(n){return{hiddenCols:(0,c.Z)((0,c.Z)({},n.hiddenCols),{},(0,f.Z)({},e,t))}}))}},{key:"render",value:function(){var e=this;et().setAppElement(document.getElementById("root"));var t=this.props.tools.every((function(t){return t.columns.length===e.state.hiddenCols[t.toolIdx].length}));return(0,j.jsxs)(et(),{ariaHideApp:!1,className:"overlay",isOpen:!0,onRequestClose:function(){return e.handlePopState()},children:[(0,j.jsx)("div",{className:"link-overlay-header-container",children:(0,j.jsx)(y.G,{icon:tt.YIN,onClick:function(){return e.handlePopState()},className:"closing"})}),(0,j.jsx)("h1",{children:"Select the columns to display"}),(0,j.jsx)("table",{className:"selectRows",children:(0,j.jsxs)("tbody",{children:[(0,j.jsxs)("tr",{className:"selectColumn_all",children:[(0,j.jsx)("th",{}),this.renderColumnHeaders()]}),this.renderTools()]})}),(0,j.jsxs)("div",{className:"overlay__buttons",children:[(0,j.jsx)("button",{className:"btn",onClick:this.toggleAllColsHidden,children:this.state.isButtonOnDeselect?"Deselect all":"Select all"}),(0,j.jsx)("button",{className:"btn btn-apply",onClick:function(){return e.handlePopState()},disabled:t,children:"Apply and close"}),(0,j.jsx)("input",{})]})]})}}]),n}(i.Component),it=(n(8350),n(9468)),rt=function(e,t,n,i,r,s){return(0,j.jsxs)("div",{className:"setting".concat(s?" disabled":""),title:r,children:[(0,j.jsxs)("span",{className:"setting-label".concat(r?" with-tooltip":""),children:[e,":"]}),(0,j.jsxs)("select",{className:"setting-select",name:"setting-"+e,value:s?"disabled":t,onChange:n,disabled:s,children:[Object.values(i).map((function(t){return(0,j.jsx)("option",{value:t,name:t+" "+e,children:t},t)})),s?(0,j.jsx)("option",{value:"disabled",name:"disabled",children:"\u2e3a"}):""]})]})},st=function(e,t,n,i,r){return(0,j.jsxs)("div",{className:"setting",title:r,children:[(0,j.jsxs)("span",{className:"setting-label".concat(r?" with-tooltip":""),children:[e,":"]}),(0,j.jsx)("select",{id:"setting-"+e,className:"setting-select",name:"setting-"+e,value:t,onChange:n,children:Object.entries(i).map((function(t){var n=(0,d.Z)(t,2),i=n[0],r=n[1];return(0,j.jsx)("optgroup",{label:i,children:r.map((function(t){return(0,j.jsx)("option",{value:t.value,name:t.name+" "+e,children:t.name},t.value)}))},i)}))})]})};function lt(e,t,n){var i=[1e8,1e7,1e6,1e5,1e4].find((function(e){return t>e})),r=i?i/1e3:1;return Array(Math.ceil(t/r)).fill().map((function(e,t){return t*r})).filter((function(t){return t>=e})).map((function(e){var t=n(e);return[Number.parseFloat(t[0].toPrecision(4)),Number.parseFloat(t[1].toPrecision(4))]}))}var at=n(4391),ot=n.n(at),ct=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;return(0,s.Z)(this,n),(i=t.call(this,e)).refreshUrlState=function(){i.setState(i.setup())},i.checkForNumericalSelections=function(){return"ordinal"!==i.handleType(i.state.toolY,i.state.columnY)&&"ordinal"!==i.handleType(i.state.toolX,i.state.columnX)},i.renderData=function(){var e=[];i.hasInvalidLog=!1,i.state.areAllColsHidden||i.props.table.forEach((function(t){var n=t.results[i.state.toolX],r=t.results[i.state.toolY],s=n.values[i.state.columnX].raw,l=r.values[i.state.columnY].raw,a=void 0!==s&&null!==s&&void 0!==l&&null!==l,o=i.state.results===i.resultsOptions.correct;a&&(!o||o&&"correct"===n.category&&"correct"===r.category)&&(i.state.scaling===i.scalingOptions.logarithmic&&(s<=0||l<=0)?i.hasInvalidLog=!0:e.push({x:s,y:l,info:i.props.getRowName(t)}))})),i.setMinMaxValues(e),i.lineCount=e.length,i.dataArray=e;var t=i.state.regression!==i.regressionOptions.none,n=i.checkForNumericalSelections();if(t)if(0!==i.lineCount&&n){var r=e.map((function(e){return[parseFloat(e.x),parseFloat(e.y)]})),s=ot().linear(r),l=function(e,t,n,i,r){var s=function(e){return e[0]},l=function(e){return e[1]},a=function(e,t){return e+t};i=Math.floor(i),r=Math.ceil(r);var o=Math.sqrt(e.map((function(e,n){return[l(e),l(t[n])]})).map((function(e){return Math.pow(e[1]-e[0],2)})).reduce(a)/e.length),c=e.map((function(e){return s(e)})).reduce(a)/e.length,u=Math.sqrt(e.map((function(e){return Math.pow(s(e)-c,2)})).reduce(a)/e.length),d=lt(i,r,n),h=0===o||0===u?d.map((function(e){return 0})):d.map((function(t){return Number.parseFloat((1.96*o*Math.sqrt(1/e.length+Math.pow(s(t)-c,2)/((e.length-1)*Math.pow(u,2)))).toPrecision(4))}));return{upperBorderData:d.map((function(e,t){return[s(e),l(e)+h[t]]})),lowerBorderData:d.map((function(e,t){return[s(e),l(e)-h[t]]}))}}(r,s.points,s.predict,i.minX,i.maxX),a=[[i.minX,s.predict(i.minX)[1]],[i.maxX,s.predict(i.maxX)[1]]];s.points=Array.from(new Set(s.points.map(JSON.stringify)),JSON.parse).concat(a);var o=i.props.tools[i.state.toolX].columns[i.state.columnX].unit,c=i.props.tools[i.state.toolY].columns[i.state.columnY].unit,u="Estimation technique: ordinary least squares (OLS)\n                          Predictor variable (X-Axis) in ".concat(o,": ").concat(i.state.nameX,"\n                          Response variable (Y-Axis) in ").concat(c,": ").concat(i.state.nameY,"\n                          Regression coefficient: ").concat(s.equation[0],"\n                          Intercept: ").concat(s.equation[1],"\n                          Equation: ").concat(s.string,"\n                          Coefficient of Determination: ").concat(s.r2).replace(/^ +/gm,"");i.regressionData={regression:s,text:u,upperConfidenceBorderData:l.upperBorderData,lowerConfidenceBorderData:l.lowerBorderData}}else z({regression:i.regressionOptions.none})},i.setMinMaxValues=function(e){var t=e.map((function(e){return e.x})),n=e.map((function(e){return e.y}));i.maxX=i.findMaxValue(t),i.maxY=i.findMaxValue(n),i.minX=i.findMinValue(t),i.minY=i.findMinValue(n)},i.findMaxValue=function(e){var t=Math.max.apply(Math,(0,u.Z)(e));return t<3?3:t},i.findMinValue=function(e){var t=Math.min.apply(Math,(0,u.Z)(e));return t>2?1:t},i.renderRegressionLine=function(e){var t=i.prepareRegressionLineData(e);return(0,j.jsx)(it.LU,{className:"regression-line",data:t,style:{stroke:"green"},onValueMouseOver:function(e,t){return i.setState({value:e})},onValueMouseOut:function(e,t){return i.setState({value:null})},opacity:"0"},"reg-line-"+e)},i.renderConfidenceIntervalLine=function(e,t){var n=i.prepareLineData(e);return(0,j.jsx)(it.eh,{className:"regression-line",data:n,style:{stroke:"gray"}},"conf-line-".concat(t,"-").concat(e))},i.prepareRegressionLineData=function(e){return e.sort((function(e,t){return e[0]-t[0]})).map((function(e,t){var n=Math.round(100*i.regressionData.lowerConfidenceBorderData[t][1])/100,r=Math.round(100*i.regressionData.upperConfidenceBorderData[t][1])/100;return{x:e[0],y:e[1],"95% Confidence Interval":"[".concat(n,",").concat(r,"]")}})).sort((function(e,t){return e.x-t.x}))},i.prepareLineData=function(e){return e.map((function(e){return{x:e[0],y:e[1]}})).sort((function(e,t){return e.x-t.x}))},i.handleType=function(e,t){var n=i.props.tools[e].columns[t].type;return"text"===n||"status"===n?"ordinal":i.state.scaling===i.scalingOptions.logarithmic?"log":"linear"},i.extractAxisInfoByName=function(e,t){var n,r=e.split("-"),s=(0,d.Z)(r,2),l=s[0],a=s[1];return n={},(0,f.Z)(n,"data".concat(t),e),(0,f.Z)(n,"tool".concat(t),l),(0,f.Z)(n,"column".concat(t),a),(0,f.Z)(n,"name".concat(t),i.props.tools[l].columns.find((function(e){return e.colIdx===parseInt(a)})).display_title+" ("+H(i.props.tools[l])+")"),n},i.setAxis=function(e,t){var n;i.array=[];var r=e.target.value.split("-"),s=(0,d.Z)(r,2),l=s[0],a=s[1];a=a.replace("___","-"),z((n={},(0,f.Z)(n,"tool".concat(t),l),(0,f.Z)(n,"column".concat(t),a),n))},i.swapAxes=function(){i.array=[],z({toolX:i.state.toolY,toolY:i.state.toolX,columnX:i.state.columnY,columnY:i.state.columnX})},i.scalingOptions={linear:"Linear",logarithmic:"Logarithmic"},i.resultsOptions={all:"All",correct:"Correct only"},i.regressionOptions={none:"None",linear:"Linear"},i.lineOptgroupOptions={"f(x) = cx and f(x) = x/c":[{name:"c = 1.1",value:1.1},{name:"c = 1.2",value:1.2},{name:"c = 1.5",value:1.5},{name:"c = 2",value:2},{name:"c = 3",value:3},{name:"c = 4",value:4},{name:"c = 5",value:5},{name:"c = 6",value:6},{name:"c = 7",value:7},{name:"c = 8",value:8},{name:"c = 9",value:9},{name:"c = 10",value:10},{name:"c = 100",value:100},{name:"c = 1000",value:1e3},{name:"c = 10000",value:1e4},{name:"c = 100000",value:1e5},{name:"c = 1000000",value:1e6}]},i.defaultValues={scaling:i.scalingOptions.logarithmic,results:i.resultsOptions.correct,regression:i.regressionOptions.none,line:Object.values(i.lineOptgroupOptions)[0][11].value},i.state=i.setup(),i.maxX="",i.minX="",i.lineCount=1,i}return(0,l.Z)(n,[{key:"setup",value:function(){var e,t,n,i=H(this.props.tools[0])+" "+this.props.columns[0][1],r=(0,c.Z)((0,c.Z)({},this.defaultValues),X()),s=r.results,l=r.scaling,a=r.toolX,o=r.toolY,u=r.columnX,h=r.columnY,g=r.line,p=r.regression;if(B(a)||B(u)){var f=ee(this.props.tools,this.props.hiddenCols),m=(0,d.Z)(f,2),v=m[0],b=m[1];n=void 0===v,a=v,e="".concat(v,"-").concat(b)}else n=!1,e="".concat(a,"-").concat(u);if(B(o)||B(h)){var I=ee(this.props.tools,this.props.hiddenCols),C=(0,d.Z)(I,2),x=C[0],y=C[1];n=void 0===x,o=x,t="".concat(x,"-").concat(y)}else n=!1,t="".concat(o,"-").concat(h);var Z={dataX:e,dataY:t,results:s,scaling:l,regression:p,toolX:0,toolY:0,line:g,columnX:1,columnY:1,nameX:i,nameY:i,value:!1,areAllColsHidden:n};return e&&!n&&(Z=(0,c.Z)((0,c.Z)({},Z),this.extractAxisInfoByName(e,"X"))),t&&!n&&(Z=(0,c.Z)((0,c.Z)({},Z),this.extractAxisInfoByName(t,"Y"))),Z}},{key:"componentDidMount",value:function(){window.addEventListener("popstate",this.refreshUrlState)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("popstate",this.refreshUrlState)}},{key:"renderAllSettings",value:function(){var e=this,t=this.props.tools.reduce((function(t,n,i){return Object.assign(t,(0,f.Z)({},H(n),n.columns.filter((function(t){return!e.props.hiddenCols[i].includes(t.colIdx)})).map((function(e,t){return{name:e.display_title,value:i+"-"+e.colIdx}}))))}),{});return(0,j.jsx)("div",{className:"settings-container",children:(0,j.jsxs)("div",{className:"settings-border-container",children:[(0,j.jsxs)("div",{className:"settings-subcontainer flexible-width",children:[st("X-Axis",this.state.dataX,(function(t){return e.setAxis(t,"X")}),t),(0,j.jsx)("span",{className:"setting icon",children:(0,j.jsx)(y.G,{icon:tt.Ssp,onClick:function(){return e.swapAxes()}})}),st("Y-Axis",this.state.dataY,(function(t){return e.setAxis(t,"Y")}),t)]}),(0,j.jsxs)("div",{className:"settings-subcontainer",children:[rt("Scaling",this.state.scaling,(function(e){return z({scaling:e.target.value})}),this.scalingOptions),rt("Results",this.state.results,(function(e){return z({results:e.target.value})}),this.resultsOptions,"In addition to which results are selected here, any filters will still be applied."),(0,j.jsx)("div",{className:"settings-subcontainer",children:st("Aux. Lines",this.state.line,(function(e){return z({line:e.target.value})}),this.lineOptgroupOptions,"Adds the two auxiliary lines f(x) = cx and f(x) = x/c to the plot, with c being the chosen factor in the dropdown.")})]}),(0,j.jsx)("div",{className:"settings-subcontainer",children:rt("Regression",this.state.regression,(function(t){e.checkForNumericalSelections()?z({regression:t.target.value}):alert("Regressions are only available for numerical selections.")}),this.regressionOptions,this.state.regression!==this.regressionOptions.none&&this.regressionData?this.regressionData.text:void 0)})]})})}},{key:"renderRegressionAndConfidenceIntervals",value:function(){var e=lt(Math.floor(this.minX),Math.ceil(this.maxX),this.regressionData.regression.predict);return[this.renderConfidenceIntervalLine(this.regressionData.upperConfidenceBorderData,"upper"),this.renderConfidenceIntervalLine(this.regressionData.lowerConfidenceBorderData,"lower"),this.renderRegressionLine(e)]}},{key:"render",value:function(){var e=this;this.renderData();var t=this.state.scaling===this.scalingOptions.linear,n=this.props.isFlexible?it.wu:it.dp,i=this.props.isFlexible?{height:window.innerHeight-200}:{height:1e3,width:1500},r=this.maxX>this.maxY?this.maxX:this.maxY;return(0,j.jsxs)("div",{className:"scatterPlot",children:[!this.state.areAllColsHidden&&this.renderAllSettings(),(0,j.jsxs)(n,(0,c.Z)((0,c.Z)({className:"scatterPlot__plot",margin:{left:90},yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX),xDomain:"ordinal"!==this.handleType(this.state.toolX,this.state.columnX)?[this.minX,this.maxX]:null,yDomain:"ordinal"!==this.handleType(this.state.toolY,this.state.columnY)?[this.minY,this.maxY]:null},i),{},{children:[(0,j.jsx)(it.pW,{yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(it.xL,{yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(it.Ci,{className:"middle-line",axisStart:{x:t?0:1,y:t?0:1},axisEnd:{x:r,y:r},axisDomain:[0,1e10],style:{ticks:{stroke:"#009440",opacity:0},text:{stroke:"none",fill:"#009440",fontWeight:600,opacity:0}}}),(0,j.jsx)(it.Ci,{axisStart:{x:t?0:this.state.line,y:t?0:1},axisEnd:{x:this.maxX,y:this.maxX/this.state.line},axisDomain:[0,1e10],style:{ticks:{stroke:"#ADDDE1",opacity:0},text:{stroke:"none",fill:"#6b6b76",fontWeight:600,opacity:0}}}),(0,j.jsx)(it.Ci,{axisStart:{x:t?0:1,y:t?0:this.state.line},axisEnd:{x:this.maxX,y:this.maxX*this.state.line},axisDomain:[0,1e10],style:{ticks:{stroke:"#ADDDE1",opacity:0},text:{stroke:"none",fill:"#6b6b76",fontWeight:600,opacity:0}}}),(0,j.jsx)(it.Kc,{title:this.state.nameX,tickFormat:function(e){return e},yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(it.B2,{title:this.state.nameY,tickFormat:function(e){return e},yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(it.e9,{data:this.dataArray,onValueMouseOver:function(t,n){return e.setState({value:t})},onValueMouseOut:function(t,n){return e.setState({value:null})}}),this.state.regression!==this.regressionOptions.none&&this.checkForNumericalSelections()&&this.regressionData&&0!==this.lineCount&&this.renderRegressionAndConfidenceIntervals(),this.state.value?(0,j.jsx)(it.kW,{value:this.state.value}):null]})),this.state.areAllColsHidden?(0,j.jsx)("div",{className:"plot__noresults",children:"No columns to show!"}):0===this.lineCount&&(0,j.jsxs)("div",{className:"plot__noresults",children:["No"," ",this.state.results===this.resultsOptions.correct&&"correct"," ","results",this.props.table.length>0&&" with valid data points",this.hasInvalidLog&&" (negative values are not shown in logarithmic plot)"]})]})}}]),n}(i.Component),ut=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;return(0,s.Z)(this,n),(i=t.call(this,e)).isColRelevantForTool=function(e,t){return i.isColVisible(t,e)&&"text"!==e.type&&"status"!==e.type},i.isToolRelevantForCol=function(e,t){var n=e.columns.find((function(e){return e.display_title===t}));return i.isToolVisible(e)&&n&&i.isColVisible(e.toolIdx,n.colIdx)},i.isColVisibleInAnyTool=function(e){return i.props.tools.some((function(t){return t.columns.some((function(n){return n.colIdx===e.colIdx&&i.isColVisible(t.toolIdx,n.colIdx)}))}))},i.isInVisibleRunsetSupportingScore=function(e){return i.props.tools.filter((function(e){return i.isToolVisible(e)})).some((function(t){return t.scoreBased&&t.columns.some((function(t){return t.display_title===e}))}))},i.isToolVisible=function(e){return e.columns.length!==i.props.hiddenCols[e.toolIdx].length},i.isColVisible=function(e,t){return!i.props.hiddenCols[e].includes(t)},i.updateDimensions=function(){i.setState({height:window.innerHeight})},i.refreshUrlState=function(){i.setState(i.setPlotData())},i.renderLegend=function(){if(i.state.isValue)return i.props.tools.filter((function(e){return i.isToolRelevantForCol(e,i.state.selection)})).map(H).map((function(e){return{title:e,disabled:i.state.isInvisible.some((function(t){return t===e})),strokeWidth:4}}));var e=i.props.tools[i.state.selection.split("-")[1]];return i.state.areAllColsHidden?[]:e.columns.filter((function(t){return i.isColRelevantForTool(t.colIdx,e.toolIdx)})).map((function(e){return{title:e.display_title,disabled:i.state.isInvisible.some((function(t){return t===e.display_title})),strokeWidth:4}}))},i.renderAll=function(){var e=i.state.selection;if(i.state.isValue){var t=i.state.plot===i.plotOptions.scoreBased?i.props.tools.filter((function(e){return e.scoreBased})):i.props.tools;t.forEach((function(t){return i.renderData(e,t.toolIdx,e+t.toolIdx)}))}else if(!i.state.areAllColsHidden){var n=i.state.selection.split("-")[1],r=i.props.tools[n];r.columns.filter((function(e){return i.isColRelevantForTool(e.colIdx,r.toolIdx)&&i.isColVisible(r.toolIdx,e.colIdx)})).forEach((function(e){return i.renderData(e.display_title,n,e.display_title)}))}},i.renderData=function(e,t,n){var r=i.state.plot===i.plotOptions.scoreBased,s="ordinal"===i.handleType(),l=i.props.tools[t].columns.findIndex((function(t){return t.display_title===e})),a=[],o=0;(!i.state.isValue||l>=0&&i.isColVisible(t,l))&&(a=i.props.table.map((function(e){var n=e.results[t],a=null;return"correct"===n.category||!i.state.isResultSelectionDisabled&&i.state.results!==i.resultsOptions.correct?(a=n.values[l].raw||null,s||null===a||(a=isFinite(+a)?+a:null)):r&&n.score&&"correct"!==n.category&&(o+=n.score),{value:a,rowName:i.props.getRowName(e),score:n.score}})),i.state.plot!==i.plotOptions.direct&&(a=a.filter((function(e){return null!==e.value})),a=i.sortArray(a,e))),i.hasInvalidLog=!1;var c=[],u=r?o:0;a.forEach((function(n){var s=n.value,l=n.rowName,a=n.score,o=i.state.scaling===i.scalingOptions.logarithmic&&s<=0;u+=r?a:1,null===s||o||c.push({x:u,y:s,task:l,series:i.state.isValue?H(i.props.tools[t]):e}),o&&(i.hasInvalidLog=!0)})),i[n]=c},i.sortArray=function(e,t){var n=i.possibleValues.find((function(e){return e.display_title===t}));return i.state.isValue&&["text","status"].includes(n.type)?e.sort((function(e,t){return e.value>t.value?1:t.value>e.value?-1:0})):e.sort((function(e,t){return+e.value-+t.value}))},i.renderColumns=function(){return i.possibleValues.map((function(e){var t=i.state.plot===i.plotOptions.scoreBased&&!i.isInVisibleRunsetSupportingScore(e.display_title);return(0,j.jsx)("option",{value:e.display_title,name:e.display_title,disabled:t,className:t?"disabled":"",children:e.display_title},e.display_title)}))},i.renderLines=function(){i.lineCount=0;var e=function(){return T[(i.lineCount-1)%T.length]};if(i.state.isValue)return i.props.tools.map((function(t,n){if(!i.isToolRelevantForCol(t,i.state.selection)||i.state.plot===i.plotOptions.scoreBased&&!t.scoreBased)return null;var r=i.state.selection,s=i[r+n],l=H(t);return i.lineCount++,(0,j.jsx)(it.LU,{data:s,color:e(),opacity:i.handleLineState(l),onValueMouseOver:function(e,t){return i.setState({value:e})},onValueMouseOut:function(e,t){return i.setState({value:null})}},l)})).filter((function(e){return!!e}));if(!i.state.areAllColsHidden){var t=i.state.selection.split("-")[1],n=i.props.tools[t];return n.columns.filter((function(e){return i.isColRelevantForTool(e.colIdx,n.toolIdx)})).map((function(t){var n=i[t.display_title];return i.lineCount++,(0,j.jsx)(it.LU,{data:n,color:e(),opacity:i.handleLineState(t.display_title),onValueMouseOver:function(e,t){return i.setState({value:e})},onValueMouseOut:function(e,t){return i.setState({value:null})}},t.display_title)}))}},i.handleLineState=function(e){return i.state.isInvisible.indexOf(e)<0?1:0},i.toggleShow=function(e){var t=e.target;i.setState((0,f.Z)({},t.name,t.checked))},i.handleType=function(){var e=i.state.selection,t=i.possibleValues.findIndex((function(t){return t.display_title===e})),n=i.state.isValue&&t>=0?i.possibleValues[t].type:null;return!i.state.isValue||"text"!==n&&"status"!==n?i.state.scaling===i.scalingOptions.linear?"linear":"log":"ordinal"},i.plotOptions={quantile:"Quantile Plot",direct:"Direct Plot"},i.scalingOptions={linear:"Linear",logarithmic:"Logarithmic"},i.resultsOptions={all:"All",correct:"Correct only"},i.defaultValues={plot:i.plotOptions.quantile,scaling:i.scalingOptions.logarithmic,results:i.resultsOptions.correct},i.checkForScoreBasedPlot(),i.possibleValues=[],i.lineCount=1,i.state=i.setPlotData(),i}return(0,l.Z)(n,[{key:"setPlotData",value:function(){var e=this,t=X(),n=(0,c.Z)((0,c.Z)({},this.defaultValues),t),i=n.selection,r=n.plot,s=n.scaling,l=n.results,a=i,o=this.props.tools.map((function(e){return e.toolIdx})).join(""),u=new RegExp("runset-["+o+"]"),d=void 0===i||!u.test(i);if(i=d?this.getColumnSelection(i):this.getRunsetSelection(i),r===this.plotOptions.scoreBased&&(d&&!this.isInVisibleRunsetSupportingScore(i)||!d)){this.setPossibleValues();var h=this.possibleValues.find((function(t){return"status"!==t.type&&e.isInVisibleRunsetSupportingScore(t.display_title)}));h||(h=this.possibleValues.find((function(t){return e.isInVisibleRunsetSupportingScore(t.display_title)}))),i=h?h.display_title:i,d=!0}return a&&i&&a!==i&&z({selection:i}),{selection:i,plot:r,scaling:s,results:l,isValue:d,isInvisible:[],areAllColsHidden:void 0===i,isResultSelectionDisabled:r===this.plotOptions.scoreBased}}},{key:"getColumnSelection",value:function(e){var t=e?this.props.tools.map((function(e){return e.columns})).flat().find((function(t){return t.display_title===e})):this.props.preSelection;if(!t||!this.isColVisibleInAnyTool(t)){var n=ee(this.props.tools,this.props.hiddenCols),i=(0,d.Z)(n,2),r=i[0],s=i[1];t=void 0!==r?this.props.tools.find((function(e){return e.toolIdx===r})).columns.find((function(e){return e.colIdx===s})):void 0}return t&&t.display_title}},{key:"getRunsetSelection",value:function(e){var t=this,n=parseInt(e.split("-")[1]);return this.props.tools.find((function(e){return e.toolIdx===n})).columns.some((function(e){return t.isColVisible(n,e.colIdx)}))||(n=ee(this.props.tools,this.props.hiddenCols)[0]),void 0!==n?"runset-"+n:void 0}},{key:"checkForScoreBasedPlot",value:function(){var e=this;this.props.tools.some((function(t){return t.scoreBased&&e.isToolVisible(t)}))&&(this.plotOptions=(0,c.Z)({scoreBased:"Score-based Quantile Plot"},this.plotOptions),this.props.tools.every((function(t){return t.scoreBased&&e.isToolVisible(t)}))&&(this.defaultValues.plot=this.plotOptions.scoreBased))}},{key:"componentDidMount",value:function(){window.addEventListener("resize",this.updateDimensions),window.addEventListener("popstate",this.refreshUrlState)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions),window.removeEventListener("popstate",this.refreshUrlState)}},{key:"setPossibleValues",value:function(){var e=this;this.props.tools.forEach((function(t){t.columns.forEach((function(n){e.isColVisible(t.toolIdx,n.colIdx)&&!e.possibleValues.some((function(e){return e.display_title===n.display_title}))&&e.possibleValues.push(n)}))}))}},{key:"renderAllSettings",value:function(){var e=this,t=this.state.plot===this.plotOptions.scoreBased?"Score-based Quantile Plots always show correct results offset by the score of wrong results. Any defined filters will still be applied.":"In addition to which results are selected here, any defined filters will still be applied.";return(0,j.jsxs)("div",{className:"settings-legend-container",children:[(0,j.jsx)("div",{className:"settings-container",children:(0,j.jsxs)("div",{className:"settings-border-container",children:[(0,j.jsxs)("div",{className:"settings-subcontainer flexible-width",children:[(0,j.jsxs)("div",{className:"setting flexible-width",children:[(0,j.jsx)("span",{className:"setting-label",children:"Selection:"}),(0,j.jsxs)("select",{className:"setting-select",name:"setting-Selection",value:this.state.selection,onChange:function(e){return z({selection:e.target.value})},children:[(0,j.jsx)("optgroup",{label:"Runsets",children:this.props.tools.map((function(t,n){var i=e.state.plot===e.plotOptions.scoreBased;return e.isToolVisible(t)?(0,j.jsx)("option",{value:"runset-"+n,name:"Runset "+n,disabled:i,className:i?"disabled":"",children:H(t)},"runset-"+n):null}))}),(0,j.jsx)("optgroup",{label:"Columns",children:this.renderColumns()})]})]}),rt("Plot",this.state.plot,(function(e){return z({plot:e.target.value})}),this.plotOptions)]}),(0,j.jsxs)("div",{className:"settings-subcontainer",children:[rt("Scaling",this.state.scaling,(function(e){return z({scaling:e.target.value})}),this.scalingOptions),rt("Results",this.state.results,(function(e){return z({results:e.target.value})}),this.resultsOptions,t,this.state.isResultSelectionDisabled)]})]})}),(0,j.jsx)("div",{children:(0,j.jsx)(it.Ri,{colors:T,items:this.renderLegend(),onItemClick:function(t,n){var i;if(i=t.title.toString(),!(e.state.isInvisible.indexOf(i)<0))return e.setState({isInvisible:e.state.isInvisible.filter((function(e){return e!==i}))});e.setState({isInvisible:e.state.isInvisible.concat([i])})}})})]})}},{key:"render",value:function(){this.setPossibleValues(),this.renderAll();var e=this.props.isFlexible?it.wu:it.dp,t=this.props.isFlexible?{height:window.innerHeight-200}:{height:1e3,width:1500};return(0,j.jsxs)("div",{className:"quantilePlot",children:[!this.state.areAllColsHidden&&this.renderAllSettings(),(0,j.jsxs)(e,(0,c.Z)((0,c.Z)({margin:{left:90},yType:this.handleType()},t),{},{children:[(0,j.jsx)(it.pW,{}),(0,j.jsx)(it.xL,{}),(0,j.jsx)(it.Kc,{tickFormat:function(e){return e}}),(0,j.jsx)(it.B2,{tickFormat:function(e){return e}}),this.state.value?(0,j.jsx)(it.kW,{value:this.state.value}):null,this.renderLines()]})),this.state.areAllColsHidden?(0,j.jsx)("div",{className:"plot__noresults",children:"No columns to show!"}):0===this.lineCount&&(0,j.jsx)("div",{className:"plot__noresults",children:this.hasInvalidLog?"All results have undefined values":"No correct results"})]})}}]),n}(i.Component),dt=n(8282),ht=(n(8995),(0,dt.u7)(dt.ZP.Range)),gt=500,pt=setTimeout((function(){}),gt),ft=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;(0,s.Z)(this,n),i=t.call(this,e);var r=e.filter||{values:[]},l=r.values,a=r.min,o=r.max,c=r.type,u=r.number_of_significant_digits,d=0,h=0;if("measure"===c||"number"===c){var g=new q(u).build();d=g(a),h=g(o);var p=l&&l[0];if(p&&p.includes(":")){var f=i.handleMinMaxValue(p,u);d=f.min,h=f.max}}return i.state={title:e.availableFilters&&e.availableFilters.length?e.availableFilters[0].title:"",values:[],idx:V(["availableFilters",0,"idx"],0,e),active:!0,selectedDistincts:[],sliderMin:d,sliderMax:h,numericMin:null,numericMax:null},i}return(0,l.Z)(n,[{key:"sendFilterUpdate",value:function(e){var t=this.props.filter,n=t.type,i=t.categories;i&&i.includes("empty ")&&!e.includes(ve)&&(e=e.concat(ve)),0===e.length&&"status"===n?this.props.onFilterUpdate({values:[W],title:this.state.title||this.props.title}):this.props.onFilterUpdate({values:e,title:this.state.title||this.props.title})}},{key:"componentDidUpdate",value:function(e,t){if(this.props.filter&&(!e.filter||e.filter.values!==this.props.filter.values)){var n=this.props.filter,i=n.values,r=n.number_of_significant_digits,s=(0,d.Z)(i,1)[0];if(s&&s.includes(":")){var l=this.handleMinMaxValue(s,r),a=l.min,o=l.max;this.setState({sliderMin:a,sliderMax:o,numericMin:a,numericMax:o})}}}},{key:"handleMinMaxValue",value:function(e,t){var n=new q(t).build(),i=this.props.filter||{min:0,max:1/0},r=i.min,s=i.max,l=e.split(":"),a=(0,d.Z)(l,2),o=a[0],c=a[1];return{min:""!==o.trim()?o:n(r),max:""!==c.trim()?c:n(s)}}},{key:"handleNumberChange",value:function(e,t){var n,i,r={};if(r.sliderMin=Number(null!==(n=this.state.numericMin)&&void 0!==n?n:this.state.sliderMin),r.sliderMax=Number(null!==(i=this.state.numericMax)&&void 0!==i?i:this.state.sliderMax),r.sliderMin>r.sliderMax){var s=r.sliderMax;r.sliderMax=r.sliderMin,r.sliderMin=s}var l=r.sliderMin<=Number(e)?"":r.sliderMin,a=r.sliderMax>=Number(t)?"":r.sliderMax;r.values=["".concat(l,":").concat(a)],this.setState(r),this.sendFilterUpdate(r.values)}},{key:"render",value:function(){var e=this,t=this.props,n=t.filter,r=t.editable,s=t.availableFilters,l=i.createRef();return(0,j.jsxs)("div",{className:"filter-card",children:[function(t,i){return(0,j.jsx)("div",{className:"filter-card--header",children:i?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{style:{marginLeft:"12px"},children:"Add filter for: "}),(0,j.jsxs)("select",{className:"filter-selection",defaultValue:"-1",ref:l,onChange:function(t){var n=t.target.value;-1!==n&&(e.setState({idx:-1,active:!0}),l.current.value="-1",e.props.addFilter(n))},children:[(0,j.jsx)("option",{value:"-1",disabled:!0,children:"Column"}),s.map((function(e){var t=e.idx,n=e.display_title;return(0,j.jsx)("option",{value:t,children:n},t)}))]})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h4",{className:"title",children:"".concat(n.display_title," ").concat(n.unit?"("+n.unit+")":"")}),(0,j.jsx)(y.G,{className:"delete-button",icon:tt.$aW,onClick:function(){e.props.removeFilter()}})]})})}(this.props.name,r),function(t){if(!t)return null;var n,r=t.title,s=t.type,l=t.number_of_significant_digits,a=t.categories,o=t.statuses,c=t.values,h=void 0===c?[]:c,g=t.min,p=t.max,f=i.createRef();if("status"===s)n=(0,j.jsxs)(j.Fragment,{children:[e.props.filter.categories&&e.props.filter.categories.includes("empty ")&&(0,j.jsxs)("div",{className:"filter-card--body--empty-rows",children:["Empty rows"," ",(0,j.jsx)("input",{type:"checkbox",name:"empty-rows",ref:f,checked:h.includes("empty "),onChange:function(t){var n="empty ";if(t.target.checked){var i=[].concat((0,u.Z)(h),[n]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(n,h);e.setState({values:r}),e.sendFilterUpdate(r)}}})]}),"Category",(0,j.jsx)("ul",{className:"filter-card--body--list",children:a.filter((function(e){return"empty "!==e})).sort().map((function(t){var n=i.createRef();return(0,j.jsxs)("li",{children:[(0,j.jsx)("input",{type:"checkbox",name:"cat-".concat(t),checked:h.includes(t),ref:n,onChange:function(n){if(n.target.checked){var i=[].concat((0,u.Z)(h),[t]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(t,h);e.setState({values:r}),e.sendFilterUpdate(r)}}}),(0,j.jsx)("label",{htmlFor:"cat-".concat(t),onClick:function(){return n.current.click()},className:t,children:t})]},t)}))}),"Status",(0,j.jsx)("ul",{className:"filter-card--body--list",children:o.sort().map((function(t){var n=i.createRef();return(0,j.jsxs)("li",{children:[(0,j.jsx)("input",{type:"checkbox",name:"stat-".concat(t),ref:n,checked:h.includes(t),onChange:function(n){if(n.target.checked){var i=[].concat((0,u.Z)(h),[t]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(t,h);e.setState({values:r}),e.sendFilterUpdate(r)}}}),(0,j.jsx)("label",{htmlFor:"stat-".concat(t),onClick:function(){return n.current.click()},children:t})]},t)}))})]});else if("text"===s){var m=(0,d.Z)(h,1)[0];n=(0,j.jsx)("input",{type:"text",name:"text-".concat(r),placeholder:"Search for value",value:m,onChange:function(t){var n=t.target.value;clearTimeout(pt),e.setState({values:[n]}),pt=setTimeout((function(){e.sendFilterUpdate([n])}),gt)}})}else{var v=new q(l).build();g=v(g),p=v(p);var b=ne(g),I=ne(p),C=b.length>I.length?b:I;n=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:"filter-card--range-container",children:[(0,j.jsx)("b",{children:g}),(0,j.jsx)("b",{children:p})]}),(0,j.jsx)(ht,{min:Number(g),max:Number(p),step:C,defaultValue:[Number(g),Number(p)],value:[Number(e.state.sliderMin),Number(e.state.sliderMax)],onChange:function(t){var n=(0,d.Z)(t,2),i=n[0],r=n[1];e.setState({sliderMin:v(i),sliderMax:v(r)})},onAfterChange:function(t){var n=(0,d.Z)(t,2),i=n[0],r=n[1],s=v(i),l=v(r),a=s===g?"":s,o=l===p?"":l;e.setState({sliderMin:s,sliderMax:l,numericMin:i,numericMax:r,values:["".concat(a,":").concat(o)]}),e.sendFilterUpdate(["".concat(a,":").concat(o)])}}),(0,j.jsxs)("div",{className:"filter-card--range-input-fields",children:[(0,j.jsx)("label",{className:"range-input-fields--min",htmlFor:"inp-".concat(r,"-min"),children:"minimum"}),(0,j.jsx)("label",{className:"range-input-fields--max",htmlFor:"inp-".concat(r,"-max"),children:"maximum"}),(0,j.jsx)("input",{type:"number",name:"inp-".concat(r,"-min"),value:null!==e.state.numericMin?e.state.numericMin:e.state.sliderMin,lang:"en-US",step:C,onChange:function(t){var n=t.target.value;e.numericMinTimeout&&clearTimeout(e.numericMinTimeout),e.setState({numericMin:n}),e.numericMinTimeout=setTimeout((function(){return e.handleNumberChange(g,p)}),gt)}}),(0,j.jsx)("input",{type:"number",name:"inp-".concat(r,"-max"),step:C,lang:"en-US",value:null!==e.state.numericMax?e.state.numericMax:e.state.sliderMax,onChange:function(t){var n=t.target.value;e.numericMaxTimeout&&clearTimeout(e.numericMaxTimeout),e.setState({numericMax:n}),e.numericMaxTimeout=setTimeout((function(){return e.handleNumberChange(g,p)}),gt)}})]})]})}return(0,j.jsx)("div",{className:"filter-card--body",children:n})}(this.props.filter)]})}}]),n}(i.PureComponent),mt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;(0,s.Z)(this,n),i=t.call(this,e);var r=e.filters,l=e.toolName,a=e.currentFilters;for(var o in a)r[o]=(0,c.Z)((0,c.Z)((0,c.Z)({},r[o]),a[o]),{},{touched:r[o].touched+1,filtering:!0});return i.props.resetFilterHook((function(){return i.resetAllFilters()})),i.state={filters:r,toolName:l,addingFilter:!1,numCards:0},i}return(0,l.Z)(n,[{key:"getActiveFilters",value:function(){return this.state.filters.filter((function(e){return e.filtering})).sort((function(e,t){return e.numCards-t.numCards}))}},{key:"setFilter",value:function(e,t){var n=e.title,i=e.values,r=e.filtering,s=void 0===r||r,l=this.state.filters;l[t].values=i,l[t].filtering=s,l[t].touched+=1,this.setState({filters:(0,u.Z)(l)}),this.props.updateFilters({title:n,values:i},t)}},{key:"addFilter",value:function(e){var t=this.state,n=t.filters,i=t.numCards,r={filtering:!0,numCards:i,touched:0};"status"===n[e].type&&(r.values=[].concat((0,u.Z)(n[e].categories),(0,u.Z)(n[e].statuses))),n[e]=(0,c.Z)((0,c.Z)({},n[e]),r),this.setState({filters:n,addingFilter:!1,numCards:i+1})}},{key:"resetAllFilters",value:function(){var e=this.state.filters.filter((function(e){return e.filtering})),t=this.state.filters.map((function(e){return(0,c.Z)((0,c.Z)({},e),{},{filtering:!1,values:[]})}));this.setState({filters:(0,u.Z)(t)});var n,i=(0,p.Z)(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;r.values&&this.props.updateFilters({title:r.display_title,values:[]},r.idx)}}catch(s){i.e(s)}finally{i.f()}}},{key:"removeFilter",value:function(e,t){var n=this.state.filters;n[e].filtering=!1,n[e].values=[],this.setState({filters:(0,u.Z)(n)}),this.props.updateFilters({title:t,values:[]},e)}},{key:"componentDidUpdate",value:function(e){var t=e.currentFilters,n=this.props.currentFilters;if(!fe()(t,n)){var i=this.state.filters;for(var r in n)i[r]=(0,c.Z)((0,c.Z)((0,c.Z)({},i[r]),n[r]),{},{touched:i[r].touched+1,filtering:!0});i=i.map((function(e,t){var i=!(!n[t]&&0!==e.touched);return(0,c.Z)((0,c.Z)({},e),{},{filtering:i,values:i?e.values:[]})})),this.setState({filters:(0,u.Z)(i)})}}},{key:"render",value:function(){var e=this,t=this.getActiveFilters(),n=this.props.hiddenCols||[],i=this.state.filters.filter((function(e,t){return!e.filtering&&!n.includes(t)}));return(0,j.jsxs)("div",{className:"filterBox--container",children:[(0,j.jsx)("h4",{className:"section-header",children:this.state.toolName}),t.length>0&&t.map((function(t,n){return(0,j.jsx)(ft,{onFilterUpdate:function(n){return e.setFilter(n,t.idx)},title:t.display_title,removeFilter:function(){return e.removeFilter(t.idx,t.display_title)},filter:t},"".concat(e.props.toolName,"-").concat(t.display_title,"-").concat(t.numCards))})),i.length&&(0,j.jsx)(ft,{availableFilters:i,editable:"true",style:{marginBottom:20},addFilter:function(t){return e.addFilter(t)},onFilterUpdate:function(t){return e.setFilter(t)}})||void 0,(0,j.jsx)("br",{})]})}}]),n}(i.PureComponent),vt=setTimeout((function(){}),500),bt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;return(0,s.Z)(this,n),(i=t.call(this,e)).state={values:i.extractFilters()},e.resetFilterHook((function(){return i.resetIdFilters()})),i}return(0,l.Z)(n,[{key:"resetIdFilters",value:function(){this.setState({values:{}}),this.sendFilterUpdate({})}},{key:"sendFilterUpdate",value:function(e){this.props.updateFilters(e)}},{key:"extractFilters",value:function(){for(var e=0,t={},n=0,i=Object.keys(this.props.ids);n<i.length;n++){t[i[n]]=V(["filters",e++],"",this.props)}return t}},{key:"componentDidUpdate",value:function(e){if(!fe()(this.props.filters,e.filters)){var t=this.extractFilters();this.setState({values:t})}}},{key:"render",value:function(){var e=this,t=this.props.ids||{};return(0,j.jsx)("div",{className:"filterBox--container",children:(0,j.jsxs)("div",{className:"filter-card",children:[(0,j.jsx)("div",{className:"filter-card--header",children:(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("h4",{className:"title",children:"Task filter"})})}),function(){var n=Object.entries(t).map((function(t){var n=(0,d.Z)(t,2),i=n[0],r=n[1],s=e.state.values[i]||"",l="text-task-".concat(i);return(0,j.jsxs)("div",{className:"task-id-filters",children:[(0,j.jsx)("label",{htmlFor:l,children:i}),(0,j.jsx)("br",{}),(0,j.jsx)("input",{type:"text",name:l,placeholder:r,value:s,onChange:function(t){var n=t.target.value;clearTimeout(vt);var r={values:(0,c.Z)((0,c.Z)({},e.state.values),{},(0,f.Z)({},i,n))};vt=setTimeout((function(){e.sendFilterUpdate((0,c.Z)((0,c.Z)({},e.state.values),{},(0,f.Z)({},i,n)))}),500),e.setState(r)}})]},l)}));return(0,j.jsx)("div",{className:"filter-card--body",children:n})}()]})})}}]),n}(i.PureComponent),It=n(6123),Ct=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;(0,s.Z)(this,n),i=t.call(this,e);var r=e.filtered;return i.listeners=[],i.resetFilterHook=function(e){return i.listeners.push(e)},i.state={filters:i.createFiltersFromReactTableStructure(r),idFilters:i.retrieveIdFilters(r)},i}return(0,l.Z)(n,[{key:"componentDidUpdate",value:function(e){fe()(e.filtered,this.props.filtered)||this.setState({filters:this.createFiltersFromReactTableStructure(this.props.filtered),idFilters:this.retrieveIdFilters(this.props.filtered)})}},{key:"resetAllFilters",value:function(){this.resetAllContainers(),this.resetIdFilters()}},{key:"resetIdFilters",value:function(){this.setState({idFilters:null}),this.sendFilters({filter:this.state.filters,idFilter:null})}},{key:"resetAllContainers",value:function(){this.listeners.forEach((function(e){return e()}))}},{key:"retrieveIdFilters",value:function(e){var t=e.find((function(e){return"id"===e.id}));return t?t.values:[]}},{key:"createFiltersFromReactTableStructure",value:function(e){if(!e||!e.length)return[];var t,n=[],i=(0,p.Z)(e.flat());try{for(i.s();!(t=i.n()).done;){var r=t.value,s=r.id,l=r.value;if("id"!==s){var a=s.split("_"),o=(0,d.Z)(a,3),c=o[0],u=o[1],h=o[2],g=n[c]||[];g[h]?g[h].values.push(l):g[h]={title:u,values:[l]},n[c]=g}}}catch(f){i.e(f)}finally{i.f()}return n}},{key:"flattenFilterStructure",value:function(){return Object.values(Object.values(this.state.filters))}},{key:"sendFilters",value:function(e){var t=e.filter,n=e.idFilter,i=(0,u.Z)(t.map((function(e,t){return null===e||void 0===e?null:e.map((function(e,n){return e.values.map((function(i){return{id:"".concat(t,"_").concat(e.title,"_").concat(n),value:i}}))}))})).flat(3).filter((function(e){return null!==e&&void 0!==e})));n&&n.length>0&&i.push({id:"id",values:n}),this.props.addTypeToFilter(i),this.props.setFilter(i,!0)}},{key:"updateFilters",value:function(e,t,n){var i=(0,u.Z)(this.state.filters),r=this.state.idFilters;i[e]=i[e]||[],i[e][t]=n,this.setState({filters:i}),this.sendFilters({filter:i,idFilter:r})}},{key:"updateIdFilters",value:function(e){var t=Object.keys(this.props.ids).map((function(t){return e[t]})),n=t.some((function(e){return""!==e&&!B(e)}))?t:void 0;this.setState({idFilters:n}),this.sendFilters({filter:this.state.filters,idFilter:n})}},{key:"render",value:function(){var e=this,t=this.props.hiddenCols||[];return(0,j.jsxs)("div",{className:It("filterBox",{"filterBox--hidden":!this.props.visible}),children:[(0,j.jsxs)("div",{className:"filterBox--header",children:[(0,j.jsx)(y.G,{icon:tt.YIN,className:"filterBox--header--icon",onClick:this.props.hide}),this.props.headerComponent,(0,j.jsx)(y.G,{icon:tt.$aW,className:"filterBox--header--reset-icon",onClick:function(){return e.resetAllFilters()}})]}),(0,j.jsxs)("div",{className:"filter-card--container",children:[(0,j.jsx)(bt,{ids:this.props.ids,updateFilters:function(t){return e.updateIdFilters(t)},resetFilterHook:this.resetFilterHook,filters:this.state.idFilters}),this.props.filterable.map((function(n,i){return(0,j.jsx)(mt,{resetFilterHook:e.resetFilterHook,updateFilters:function(t,n){return e.updateFilters(i,n,t)},currentFilters:e.state.filters[i]||[],toolName:n.name,filters:n.columns,hiddenCols:t[i]},"filtercontainer-".concat(i))}))]})]})}}]),n}(i.PureComponent),xt=n(6123),yt=n.n(xt),Zt=n(9737),jt=n.n(Zt),At=n(7177),Ft=n.n(At),Wt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;return(0,s.Z)(this,n),(i=t.call(this,e)).prepareTextForRendering=function(){if(""!==i.props.yamlText){var e=Ft().parseDocument(i.props.yamlText,{prettyErrors:!0}),t=e.get("input_files");t&&(Array.isArray(t.items)?t.items.forEach((function(e){e.value=i.encloseFileInTags(e.value)})):e.set("input_files",i.encloseFileInTags(t)));var n=e.get("properties");n&&Array.isArray(n.items)&&n.items.forEach((function(e){Array.isArray(e.items)&&e.items.forEach((function(e){"property_file"===e.key.value&&(e.value.value=i.encloseFileInTags(e.value.value))}))})),i.setState({content:e})}},i.encloseFileInTags=function(e){return i.state.splitterTag+i.state.fileTag+e+i.state.fileTag+i.state.splitterTag},i.loadFileInViewer=function(e,t){e.preventDefault(),i.props.loadNewFile(t)},i.state={splitterTag:"<splitter#9d81y23>",fileTag:"<file#092nt43>",content:i.props.yamlText},i}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){this.prepareTextForRendering()}},{key:"componentDidUpdate",value:function(e){e.yamlText!==this.props.yamlText&&this.prepareTextForRendering()}},{key:"render",value:function(){var e=this;if(this.state.content.errors&&this.state.content.errors.length>0)return(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("div",{className:"link-overlay-text",children:["Errors parsing YAML file:",(0,j.jsx)("ul",{children:this.state.content.errors.map((function(e,t){return(0,j.jsx)("li",{children:(0,j.jsx)("pre",{children:e.message})},t)}))}),(0,j.jsx)("pre",{children:this.props.yamlText}),";"]})});Ft().scalarOptions.str.fold={lineWidth:0};var t=this.state.content.toString().split(this.state.splitterTag).map((function(t){return t.match("^".concat(e.state.fileTag,"(?:.)+").concat(e.state.fileTag,"$"))?(t=t.replace(new RegExp(e.state.fileTag,"g"),""),(0,j.jsx)("a",{onClick:function(n){return e.loadFileInViewer(n,t)},className:"link-overlay-file-link",href:e.props.createHref(t),children:t},t)):t}));return(0,j.jsx)("pre",{className:"link-overlay-text",children:t})}}]),n}(i.Component),Nt=n(1842);Nt.jQ({useWebWorkers:!1});var Bt={},Gt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;(0,s.Z)(this,n),(i=t.call(this,e)).loadNewFile=function(e){var t=i.createFileUrl(e);i.setState({isYAML:i.isYAMLFile(e),isSecondLevel:!0,content:"loading file: ".concat(t)}),i.loadFile(t)},i.loadOriginalFile=function(){i.setState({isYAML:i.isYAMLFile(i.props.link),isSecondLevel:!1,content:"loading file: ".concat(i.props.link),error:void 0}),i.loadFile(i.props.link)},i.loadOriginalFileIfEnter=function(e){"Enter"===e.key&&i.loadOriginalFile()},i.createFileUrl=function(e){return jt().join(i.props.link,"../"+e)},i.loadFile=i.loadFileXMLHttpRequest,i.loadFileFromZip=function(e){var t=decodeURIComponent(e),n=t.lastIndexOf("/")>t.lastIndexOf("\\")?"/":"\\",r=t.lastIndexOf(n),s=t.substring(0,r)+".zip",l=t.split(n),a="".concat(l[l.length-2],"/").concat(l[l.length-1]);s in Bt?i.loadFileFromZipEntries(Bt[s],a,s):i.readZipArchive(s,a)},i.readZipArchive=function(e,t){new Nt.Mr(new Nt.R(e)).getEntries().then((function(n){i.handleZipEntries(n,t,e)}),(function(n){i.readZipArchiveNoHttpRange(e,t)}))},i.readZipArchiveNoHttpRange=function(e,t){new Nt.Mr(new Nt.pE(e)).getEntries().then((function(n){i.handleZipEntries(n,t,e)}),(function(n){i.readZipArchiveManually(e,t)}))},i.readZipArchiveManually=function(e,t){try{var n=new XMLHttpRequest;n.responseType="arraybuffer",n.addEventListener("load",(function(){var r=new Uint8Array(n.response);new Nt.Mr(new Nt.I8(r)).getEntries().then((function(n){return i.handleZipEntries(n,t,e)}),i.setError)}),!1),n.addEventListener("error",i.setError,!1),n.open("GET",e),n.send()}catch(r){i.setError('HTTP request for the file "'.concat(t,'" failed'),r)}},i.handleZipEntries=function(e,t,n){Bt[n]=e,i.loadFileFromZipEntries(e,t,n)},i.loadFileFromZipEntries=function(e,t,n){var r=e.find((function(e){return e.filename===t}));r?r.getData(new Nt.Ek).then((function(e){i.setState({content:e})})):i.setError('Could not find the file "'.concat(t,'" in "').concat(n,'"'))},i.setError=function(e,t){var n=t&&"string"===typeof t?t:e;i.setState({error:"".concat(n)})},i.handlePopState=function(){window.history.back(),window.addEventListener("click",i.props.close,!1)},i.renderHelpMessageForLocalLogs=function(){if("file:"!==window.location.protocol)return null;var e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("p",{children:["If you are using ",(0,j.jsx)("strong",{children:"Chrome"})," or a Chrome-based browser, try launching it with the command-line option"," ",(0,j.jsx)("strong",{children:(0,j.jsx)("code",{children:"--allow-file-access-from-files"})}),"."]}),(0,j.jsxs)("p",{children:["If you are using ",(0,j.jsx)("strong",{children:"Firefox"}),", please open the extended settings by entering ",(0,j.jsx)("code",{children:"about:config"})," in the URL bar, search for"," ",(0,j.jsx)("strong",{children:(0,j.jsx)("code",{children:"security.fileuri.strict_origin_policy"})})," ","and set this option to ",(0,j.jsx)("code",{children:"false"})," by double-clicking on it and restart your browser (",(0,j.jsx)("a",{href:"https://kb.mozillazine.org/Security.fileuri.strict_origin_policy",children:"more details"}),")."]}),(0,j.jsx)("p",{children:(0,j.jsx)("strong",{children:"Note that these settings will allow local web pages to access all of your files, so make sure to not open any untrusted local HTML documents."})})]}),t=new URL(i.state.currentFile,document.baseURI),n=function(e,t){var n=e.pathname.split("/"),i=t.pathname.split("/"),r=n.findIndex((function(e,t){return e!==i[t]}));return[n.slice(0,r).join("/"),n.slice(r).join("/")]}(window.location,t),r=(0,d.Z)(n,2),s=r[0],l=r[1];if(":"===window.location.pathname[2]){if(!s)return(0,j.jsxs)(j.Fragment,{children:[e,(0,j.jsx)("p",{children:"Alternatively, you can start a local web server serving the directories with the tables and result files, but for doing so you first need to make sure that table and result files are on the same partition."})]});"/"===s[0]&&(s=s.substring(1))}var a="127.0.0.1",o=8e3,c="http://".concat(a,":").concat(o,"/").concat(l).concat(window.location.hash);return(0,j.jsxs)(j.Fragment,{children:[e,(0,j.jsxs)("p",{children:["Alternatively, you can start a local web server serving the directories with the tables and result files.",(0,j.jsx)("br",{}),"To do so, execute the following command and then open"," ",(0,j.jsx)("a",{href:c,children:"this link"})," (adjust the port number ",o," if it is already used on your system):",(0,j.jsx)("br",{}),(0,j.jsx)(F,{children:(0,j.jsxs)("code",{children:["python3 -m http.server -b ",a," ",o," -d ",s||"/"]})})]})]})};var r=!!e.link&&i.isYAMLFile(e.link);return i.state={isYAML:r,content:"loading file: ".concat(e.link),currentFile:e.link,isSecondLevel:!1},i}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){this.loadFile(this.props.link),window.history.pushState({},"",""),window.addEventListener("popstate",this.props.close,!1)}},{key:"componentDidUpdate",value:function(){var e=document.getElementById("modal-container");e&&e.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("popstate",this.props.close,!1),window.removeEventListener("click",this.props.close,!1)}},{key:"isYAMLFile",value:function(e){return e.endsWith(".yml")}},{key:"loadFileFetch",value:function(){var e=(0,je.Z)((0,Ze.Z)().mark((function e(t){var n,i;return(0,Ze.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=19;break}return this.setState({currentFile:t}),e.prev=2,e.next=5,fetch(t);case 5:if(n=e.sent,!w(n.status)){e.next=13;break}return e.next=9,n.text();case 9:i=e.sent,this.setState({content:i}),e.next=14;break;case 13:throw Error("Received response status ".concat(n.status));case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),this.loadFileFromZip(t);case 19:case"end":return e.stop()}}),e,this,[[2,16]])})));return function(t){return e.apply(this,arguments)}}()},{key:"loadFileXMLHttpRequest",value:function(e){var t=this;if(e)try{this.setState({currentFile:e});var n=new XMLHttpRequest;n.addEventListener("load",(function(){if(w(n.status)){var i=n.responseText;t.setState({content:i})}else t.loadFileFromZip(e)})),n.addEventListener("error",(function(){return t.loadFileFromZip(e)})),n.open("GET",e),n.send()}catch(i){this.loadFileFromZip(e)}}},{key:"render",value:function(){var e=this;return et().setAppElement(document.getElementById("root")),(0,j.jsxs)(et(),{id:"modal-container",ariaHideApp:!1,className:yt()("overlay",{"second-level":this.state.isSecondLevel}),isOpen:!0,onRequestClose:function(){return e.handlePopState()},children:[(0,j.jsxs)("div",{className:"link-overlay-header-container",children:[(0,j.jsx)(y.G,{icon:tt.YIN,onClick:function(){return e.handlePopState()},className:"closing"}),this.state.isSecondLevel?(0,j.jsxs)("span",{className:"link-overlay-back-button",tabIndex:"0",role:"button",onClick:this.loadOriginalFile,onKeyDown:this.loadOriginalFileIfEnter,children:[(0,j.jsx)(y.G,{className:"link-overlay-back-icon",icon:tt.acZ}),"Back to task definition"]}):""]}),this.state.error?(0,j.jsxs)("div",{className:"link-overlay-text",children:[(0,j.jsxs)("p",{style:{marginTop:"0"},children:["Error while loading content (",this.state.error,")."]}),(0,j.jsxs)("p",{children:["This could be a problem of the"," ",(0,j.jsx)("a",{href:"https://en.wikipedia.org/wiki/Same-origin_policy",children:"same-origin policy"})," ","of your browser."]}),this.renderHelpMessageForLocalLogs(),(0,j.jsxs)("p",{children:["You can also try to download the file:"," ",(0,j.jsx)("a",{href:this.state.currentFile,children:this.state.currentFile})]})]}):this.state.isYAML?(0,j.jsx)(Wt,{yamlText:this.state.content,createHref:this.createFileUrl,loadNewFile:this.loadNewFile}):(0,j.jsx)("pre",{className:"link-overlay-text",children:this.state.content})]})}}]),n}(i.Component),Yt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(){var e;(0,s.Z)(this,n);for(var i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];return(e=t.call.apply(t,[this].concat(r))).render=function(){return(0,j.jsxs)("button",{className:e.props.className||"reset",onClick:e.props.onClick,disabled:B(e.props.enabled)?!e.props.isFiltered:!e.props.enabled,children:[(0,j.jsxs)("span",{children:["Showing ",(0,j.jsx)("span",{className:"highlight",children:e.props.filteredCount})," of"," "]}),(e.props.className||"").includes("tooltip")&&(0,j.jsx)("span",{className:"tooltiptext tooltip-bottom",children:"Open filter menu"}),e.props.totalCount," tasks",!(e.props.className||"").includes("header")&&(0,j.jsx)(y.G,{icon:tt.G_j,className:"filter-icon"})]})},e}return(0,l.Z)(n)}(i.Component);n(9e3);var wt=[{key:"summary",title:"Summary",path:"/"},{key:"table",title:"Table",path:"/table"},{key:"quantile",title:"Quantile Plot",path:"/quantile"},{key:"scatter",title:"Scatter Plot",path:"/scatter"},{key:"info",title:"Info",path:"/info",icon:(0,j.jsx)(y.G,{icon:tt.Fuz})}],St=function(){return(wt.find((function(e){return e.path===document.location.hash.split("?")[0].substr(1)}))||{key:"summary"}).key},kt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var r;(0,s.Z)(this,n),(r=t.call(this,e)).addTypeToFilter=function(e){return e.filter((function(e){return"id"!==e.id})).forEach((function(e){var t=e.id.split("_"),n=(0,d.Z)(t,3),i=n[0],s=n[2],l=r.state.tools[i].columns[s].type;e.type=l}))},r.getFiltersFromUrl=function(){var e=r.filterUrlRetriever()||[];return r.addTypeToFilter(e),fe()(r.lastFiltered,e)?null:e},r.updateFiltersFromUrl=function(){var e=r.getFiltersFromUrl();e&&(r.filteredData=r.runFilter(e),r.setState({tableData:r.filteredData,filtered:e}),r.lastFiltered=e)},r.updateState=function(){return r.setState({active:St(),hiddenCols:$(r.state.tools)})},r.toggleSelectColumns=function(e){e.stopPropagation(),r.setState((function(e){return{showSelectColumns:!e.showSelectColumns}}))},r.toggleLinkOverlay=function(e,t){e.preventDefault(),r.setState((function(e){return{showLinkOverlay:!e.showLinkOverlay,link:t}}))},r.setFilter=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.filteredData=t?e:e.map((function(e){return e._original}))},r.filterPlotData=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r.lastImmediate&&clearImmediate(r.lastImmediate),r.lastImmediate=setImmediate((function(){r.filterUrlSetter(e,{history:r.routerRef.current.history}),r.lastFiltered=e.filter((function(e){return e.values&&e.values.length>0||e.value}))})),t&&r.setFilter(r.runFilter(e),!0),r.setState({tableData:r.filteredData,filtered:e})},r.resetFilters=function(){r.setState({tableData:r.originalTable,filtered:[]})},r.findAllValuesOfColumn=function(e,t){return r.originalTools.map((function(n,i){return n.columns.map((function(s,l){if(e(n,s)){var a=r.originalTable.map((function(e){return t(e.results[i],e.results[i].values[l])})).filter(Boolean);return(0,u.Z)(new Set(a)).sort()}}))}))},r.getRowName=function(e){return e.id.filter((function(e){return e})).join(" | ")},r.getRelevantUrlParams=function(){return(document.location.href.split("?")[1]||"").split("&").filter((function(e){return e.startsWith("hidden")||e.startsWith("filter")})).join("&")},r.switchToQuantile=function(e){r.setState({quantilePreSelection:e});var t=r.getRelevantUrlParams();document.location.hash="#/quantile"+(t?"?"+t:"")};var l,a=function(e){var t=e.head,n=e.tools,i=e.rows,r=e.stats,s=e.props,l=e.initial;return{tableHeader:t,taskIdNames:t.task_id_names,tools:n.map((function(e,t){return(0,c.Z)((0,c.Z)({},e),{},{toolIdx:t,columns:e.columns.map((function(e,t){return(0,c.Z)((0,c.Z)({},e),{},{colIdx:t})})),scoreBased:i.every((function(e){return void 0!==e.results[t].score}))})})),columns:n.map((function(e){return e.columns.map((function(e){return e.title}))})),tableData:i,stats:r,properties:s,initial:l}}(e.data),o=a.tableHeader,h=a.taskIdNames,g=a.tools,f=a.columns,m=a.tableData,v=a.stats,I=a.initial;I&&!document.location.href.includes("#")&&(l=I,document.location.href=encodeURI("".concat(document.location.href,"#").concat(l)));var C=function(e){var t=e.tools,n=e.rows;return t.map((function(e,t){var i,r=e.tool,s=e.date,l=e.niceName,a="".concat(r," ").concat(s," ").concat(l),o=e.columns.map((function(e,t){if(e)return"status"===e.type?(i=t,(0,c.Z)((0,c.Z)({},e),{},{categories:{},statuses:{},idx:t})):"text"===e.type?(0,c.Z)((0,c.Z)({},e),{},{distincts:{},idx:t}):(0,c.Z)((0,c.Z)({},e),{},{min:1/0,max:-1/0,idx:t})}));B(i)||(o[i]=(0,c.Z)((0,c.Z)({},o[i]),{},{categories:{},statuses:{}}));var u,d=(0,p.Z)(n);try{for(d.s();!(u=d.n()).done;){var h=u.value.results[t];for(var g in B(i)||(o[i].categories["".concat(h.category," ")]=!0),h.values){var f=h.values[g].raw,m=o[g];m&&!B(f)&&("status"===m.type?m.statuses[f]=!0:"text"===m.type?m.distincts[f]=!0:(m.min=Math.min(m.min,Number(f)),m.max=Math.max(m.max,Number(f))))}}}catch(v){d.e(v)}finally{d.f()}return{name:a,columns:o.map((function(e){var t=e.distincts,n=e.categories,i=e.statuses,r=(0,b.Z)(e,me);return t?(0,c.Z)((0,c.Z)({},r),{},{distincts:Object.keys(t)}):n?(0,c.Z)((0,c.Z)({},r),{},{categories:Object.keys(n),statuses:Object.keys(i)}):r}))}}))}(r.props.data);r.originalTable=m,r.originalTools=g,r.taskIdNames=h,r.columns=f,r.stats=v,r.tableHeader=o,r.filteredData=[],r.routerRef=i.createRef(),r.state={tools:g,tableData:m,filterable:C,showSelectColumns:!1,showLinkOverlay:!1,filtered:[],filterBoxVisible:!1,active:St(),quantilePreSelection:g[0].columns[1],hiddenCols:$(g)},r.statusValues=r.findAllValuesOfColumn((function(e,t){return"status"===t.type}),(function(e,t){return G(t)})),r.originalTools.forEach((function(e,t){return e.columns.filter((function(e){return"status"===e.type})).forEach((function(e,n){r.originalTable.some((function(e){return"empty"===e.results[t].category}))&&r.statusValues[t][n].push(ve)}))})),r.categoryValues=r.findAllValuesOfColumn((function(e,t){return"status"===t.type}),(function(e,t){return e.category}));var x=r.categoryValues.map((function(e){return e&&e.map((function(e){return e&&e.map((function(e){return"".concat(e," ")}))}))}));r.filterUrlSetter=J(r.statusValues,x),r.filterUrlRetriever=function(e,t){var n=M({categoryValues:t,statusValues:e});return function(e){var t=X(e);return t.filter?n(t.filter):null}}(r.statusValues,x);var y=r.getFiltersFromUrl();return y&&(r.filteredData=r.runFilter(y),r.lastFiltered=y,r.state=(0,c.Z)((0,c.Z)({},r.state),{},{tableData:r.filteredData,filtered:y})),r}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){var e=this;this.removeHistoryListener=this.routerRef.current.history.listen((function(t,n){e.updateState(),"POP"===n&&e.updateFiltersFromUrl()}))}},{key:"componentWillUnmount",value:function(){this.removeHistoryListener()}},{key:"runFilter",value:function(e){var t=e.reduce((function(e,t){var n=t.id,i=t.value,r=t.type,s=t.values;if(B(i)&&B(s)||"string"===typeof i&&"all"===i.trim())return e;if("id"===n)return e.id={value:i,values:s},e;var l,a=n.split("_"),o=(0,d.Z)(a,3),c=o[0],u=o[2];if("diff"===i)return e.diff||(e.diff=[]),e.diff.push({col:u}),e;if(e[c]||(e[c]={}),N({type:r})&&i.includes(":")){var h=i.split(":"),g=(0,d.Z)(h,2),p=g[0],f=g[1];l={min:p=""===p?-1/0:Number(p),max:f=""===f?1/0:Number(f)}}else l=" "===i[i.length-1]?{category:i.substr(0,i.length-1)}:"status"===r?{status:i}:{value:i};return e[c][u]||(e[c][u]=[]),e[c][u].push(l),e}),{});return be(t)(this.originalTable)}},{key:"render",value:function(){var e,t,n=this,i=function(e){var t=e.className,i=e.isReset,r=void 0!==i&&i,s=e.onClick,l=e.enabled;return(0,j.jsx)(Yt,{className:t,showFilterText:r,onClick:s,enabled:l,isFiltered:!!n.state.filtered.length,resetFilters:n.resetFilters,filteredCount:n.state.tableData.length,totalCount:n.originalTable.length})},r=this.getRelevantUrlParams();return(0,j.jsx)(h.UT,{ref:this.routerRef,children:(0,j.jsxs)("div",{className:"overview",children:[(0,j.jsxs)("div",{className:"overview-container",children:[(0,j.jsx)(Ct,{headerComponent:i({className:"filterBox--header--reset",isReset:!0,enabled:!1}),tableHeader:this.tableHeader,tools:this.state.tools,selectColumn:this.toggleSelectColumns,filterable:this.state.filterable,setFilter:this.filterPlotData,resetFilters:this.resetFilters,filtered:this.state.filtered,visible:this.state.filterBoxVisible,hiddenCols:this.state.hiddenCols,hide:function(){n.setState({filterBoxVisible:!1})},ids:(e=this.originalTable,t=this.taskIdNames,V(["0","id"],[],e).reduce((function(e,n,i){return(0,c.Z)((0,c.Z)({},e),{},(0,f.Z)({},t[i],n))}),{})),addTypeToFilter:this.addTypeToFilter}),(0,j.jsxs)("div",{className:"menu",children:[wt.map((function(e){var t=e.key,i=e.title,s=e.path,l=e.icon;return(0,j.jsxs)(h.rU,{className:yt()("menu-item",{selected:n.state.active===t}),to:s+(r?"?"+r:""),onClick:function(){return n.setState((function(){return{active:t}}))},children:[i," ",l||""]},s)})),i({className:"reset tooltip",enabled:!0,onClick:function(){n.setState({filterBoxVisible:!0})}})]}),(0,j.jsx)("div",{className:"route-container",children:(0,j.jsxs)(g.rs,{children:[(0,j.jsx)(g.AW,{exact:!0,path:"/",children:(0,j.jsx)(ze,{tools:this.state.tools,tableHeader:this.tableHeader,version:this.props.data.version,selectColumn:this.toggleSelectColumns,stats:this.stats,onStatsReady:this.props.onStatsReady,switchToQuantile:this.switchToQuantile,tableData:this.state.tableData,hiddenCols:this.state.hiddenCols,filtered:this.state.filtered.length>0})}),(0,j.jsx)(g.AW,{path:"/table",children:(0,j.jsx)(ye,{tableData:this.state.tableData,tools:this.state.tools,selectColumn:this.toggleSelectColumns,filterPlotData:this.filterPlotData,filters:this.state.filtered,toggleLinkOverlay:this.toggleLinkOverlay,statusValues:this.statusValues,categoryValues:this.categoryValues,hiddenCols:this.state.hiddenCols,addTypeToFilter:this.addTypeToFilter})}),(0,j.jsx)(g.AW,{path:"/quantile",children:(0,j.jsx)(ut,{table:this.state.tableData,tools:this.state.tools,preSelection:this.state.quantilePreSelection,getRowName:this.getRowName,hiddenCols:this.state.hiddenCols,isFlexible:this.props.renderPlotsFlexible})}),(0,j.jsx)(g.AW,{path:"/scatter",children:(0,j.jsx)(ct,{table:this.state.tableData,columns:this.columns,tools:this.state.tools,getRowName:this.getRowName,hiddenCols:this.state.hiddenCols,isFlexible:this.props.renderPlotsFlexible})}),(0,j.jsx)(g.AW,{path:"/info",children:(0,j.jsx)(qe,{version:this.props.data.version,selectColumn:this.toggleSelectColumns})})]})})]}),(0,j.jsxs)("div",{children:[this.state.showSelectColumns&&(0,j.jsx)(nt,{close:this.toggleSelectColumns,currColumns:this.columns,tableHeader:this.tableHeader,tools:this.state.tools,hiddenCols:this.state.hiddenCols,history:this.routerRef.current.history}),this.state.showLinkOverlay&&(0,j.jsx)(Gt,{close:this.toggleLinkOverlay,link:this.state.link,toggleLinkOverlay:this.toggleLinkOverlay})]})]})})}}]),n}(i.Component);var Vt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(){return(0,s.Z)(this,n),t.apply(this,arguments)}return(0,l.Z)(n,[{key:"render",value:function(){return(0,j.jsx)("div",{className:"App",children:(0,j.jsx)("main",{children:(0,j.jsx)(kt,{data:window.data,renderPlotsFlexible:!0,onStatsReady:this.props.onStatsReady})})})}}]),n}(i.Component),Rt=Vt;r.render((0,j.jsx)(Rt,{}),document.getElementById("root")),document.getElementById("msg-container").remove()},4654:function(){}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=e,function(){var e=[];n.O=function(t,i,r,s){if(!i){var l=1/0;for(u=0;u<e.length;u++){i=e[u][0],r=e[u][1],s=e[u][2];for(var a=!0,o=0;o<i.length;o++)(!1&s||l>=s)&&Object.keys(n.O).every((function(e){return n.O[e](i[o])}))?i.splice(o--,1):(a=!1,s<l&&(l=s));if(a){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}s=s||0;for(var u=e.length;u>0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[i,r,s]}}(),n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e={179:0};n.O.j=function(t){return 0===e[t]};var t=function(t,i){var r,s,l=i[0],a=i[1],o=i[2],c=0;if(l.some((function(t){return 0!==e[t]}))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(o)var u=o(n)}for(t&&t(i);c<l.length;c++)s=l[c],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return n.O(u)},i=self.webpackChunkbenchexec_react_table=self.webpackChunkbenchexec_react_table||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))}();var i=n.O(void 0,[216],(function(){return n(7415)}));i=n.O(i)}();
\ No newline at end of file
+!function(){var e={7415:function(e,t,n){"use strict";var i=n(7313),r=n(1168),s=n(5671),l=n(3144),a=n(136),o=n(1129),c=n(1413),u=n(3433),d=n(9439),h=n(8303),g=n(3830),p=n(7762),f=n(4942),m=n(5110),v=n(8567),b=n(5987),I=n(4506),C=n(2229),x=n.n(C),y=n(1969),Z=n(1875),j=n(6417),A=["ids"],F=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var r;return(0,s.Z)(this,n),(r=t.call(this,e)).childRef=i.createRef(),r}return(0,l.Z)(n,[{key:"render",value:function(){var e=this;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{ref:this.childRef,children:this.props.children}),(0,j.jsx)("button",{title:"Copy to clipboard",style:{margin:"1ex"},onClick:function(){x()(e.childRef.current.innerText,{format:"text/plain"})},children:(0,j.jsx)(y.G,{icon:Z.kZ_})})]})}}]),n}(i.Component),W="##########",N=function(e){return"count"===e.type||"measure"===e.type},B=function(e){return void 0===e||null===e},G=function(e,t){return B(e)||B(e.raw)?t:e.raw},Y=function(e,t){var n=G(e,"").toLowerCase(),i=G(t,"").toLowerCase();return""===n?1:""===i?-1:n>i?1:n<i?-1:0},w=function(e){return 0===e||200===e},S=function(e,t){var n,i=[],r=(0,p.Z)(t);try{for(r.s();!(n=r.n()).done;){var s=n.value;s!==e&&i.push(s)}}catch(l){r.e(l)}finally{r.f()}return i},k=function(e,t,n){var i=e.max_width;return t&&(i=Math.max(i,t)),n&&(i=Math.min(i,n)),i||(i=10),8*i+20},V=function(e,t,n){var i=function(e,t){var n,i=t,r=(0,p.Z)(e);try{for(r.s();!(n=r.n()).done;)if(i=i[n.value],B(i))return}catch(s){r.e(s)}finally{r.f()}return i}(e,n);return void 0===i?t:i},R=function(e){return e.unit?(0,j.jsxs)(j.Fragment,{children:[e.display_title,(0,j.jsx)("br",{}),"(".concat(e.unit,")")]}):e.display_title},H=function(e){var t=e.tool,n=e.date,i=e.niceName;return"".concat(t," ").concat(n," ").concat(i)},T=["#19CDD7","#DDB27C","#88572C","#FF991F","#F15C17","#223F9A","#DA70BF","#125C77","#4DC19C","#776E57","#12939A","#17B8BE","#F6D18A","#B7885E","#FFCB99","#F89570","#829AE3","#E79FD5","#1E96BE","#89DAC1","#B3AD9E"],X=function(e){var t=(e||decodeURI(document.location.href)).split("?"),n=t.length>1?t.slice(1).join("?"):void 0;if(void 0===n||0===n.length)return{};var i,r=n.split("&").map((function(e){return e.split("=")})),s={},l=(0,p.Z)(r);try{for(l.s();!(i=l.n()).done;){var a=(0,I.Z)(i.value),o=a[0],c=a.slice(1);s[o]=c.join("=")}}catch(u){l.e(u)}finally{l.f()}return s},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{returnString:!1,baseUrl:null,keepOthers:!1,paramName:null,history:null},n={},i=e;if(t.keepOthers){n=X();var r=Object.entries(e).filter((function(e){var t=(0,d.Z)(e,2),n=(t[0],t[1]);return void 0===n||null===n}));r.forEach((function(e){var t=(0,d.Z)(e,1)[0];delete n[t],delete i[t]}))}var s=(0,c.Z)((0,c.Z)({},n),e),l={returnString:!1,baseUrl:null},a=(0,c.Z)((0,c.Z)({},l),t),o=a.returnString,u=a.baseUrl,h=a.history,g=(u||document.location.href).split("?")[0],p=Object.keys(s).map((function(e){return"".concat(e,"=").concat(s[e])})),f="?".concat(p.join("&")),m=encodeURI("".concat(g).concat(f));if(o)return m;h?h.push(f):document.location.href=m},L=function(e){for(var t=[],n=0,i=Object.entries(e);n<i.length;n++){var r=(0,d.Z)(i[n],2),s=r[0],l=r[1];t.push("".concat(s,"(").concat(l.map(escape).join(","),")"))}return t.join(",")},O=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i={};if(e.length>Math.floor(t.length/2)){var r,s=[],l=(0,p.Z)(t);try{for(l.s();!(r=l.n()).done;){var a=r.value;e.includes(a)||s.push(n?a.trim():a)}}catch(o){l.e(o)}finally{l.f()}i.notIn=s}else i.in=e.map((function(e){return n?e.trim():e}));return L(i)};function U(e,t,n,i,r){var s=[],l=e.statusValues,a=e.categoryValues,o=t[n][i],c=r[n][i],u=!!l,d=u&&l.length!==o.length,h=!!a,g=h&&a.length!==c.length;if(u){if(d){var p=O(l,o);s.push("status(".concat(p,")"))}h||s.push("category(empty())")}if(h&&(u||s.push("status(empty())"),g)){var f=O(a,c,!0);s.push("category(".concat(f,")"))}return s.join(",")}var D,E=function(e){var t=e.split("_");if(3!==t.length)throw new Error("Invalid filter ID");return{tool:t[0],name:t[1],column:t[2]}},P=function(e){var t,n={},i=0,r="",s=(0,p.Z)(e);try{for(s.s();!(t=s.n()).done;){var l=t.value;if("("!==l){if(")"!==l)0!==i||","!==l?r+=l:r="";else if(r+=l,0===--i){var a=r.indexOf("("),o=r.substr(0,a),c=r.substr(a+1,r.length-1-(a+1));n[o]=c}}else r+=l,i++}}catch(u){s.e(u)}finally{s.f()}return n},M=function(e,t,n,i,r){return"values"===e?[{values:t.split(",").map(unescape)}]:"value"===e?[{value:unescape(t)}]:"status"===e||"category"===e?function(e,t,n,i,r){for(var s=P(t),l=[],a=0,o=Object.entries(s);a<o.length;a++){var c=(0,d.Z)(o[a],2),h=c[0],g=c[1];if("in"===h){var f=g.split(",").map(unescape);"category"===e&&(f=f.map((function(e){return"".concat(e," ")}))),l.push.apply(l,(0,u.Z)(f.map((function(e){return{value:e}}))))}if("notIn"===h){var m=g.split(",").map(unescape),v=[];if("category"===e){m=m.map((function(e){return"".concat(e," ")}));var b,I=(0,p.Z)(i[r]);try{for(I.s();!(b=I.n()).done;){var C=b.value;m.includes(C)||v.push({value:C})}}catch(j){I.e(j)}finally{I.f()}}else{var x,y=(0,p.Z)(n[r]);try{for(y.s();!(x=y.n()).done;){var Z=x.value;m.includes(Z)||v.push({value:Z})}}catch(j){y.e(j)}finally{y.f()}}l.push.apply(l,v)}}return l}(e,t,n,i,r):void 0},J=function(e){var t=e.categoryValues,n=e.statusValues;return function(e){for(var i=P(e),r=[],s=0,l=Object.entries(i);s<l.length;s++){var a=(0,d.Z)(l[s],2),o=a[0],h=a[1];if("id"!==o)if("id_any"!==o)for(var g=o,f=P(h),m={},v=0,b=Object.entries(f);v<b.length;v++){for(var I=(0,d.Z)(b[v],2),C=I[0],x=I[1],y=C.split("*"),Z=(0,d.Z)(y,2),j=Z[0],A=Z[1],F="".concat(g,"_").concat(unescape(A),"_").concat(j),W=m[F]||[],N=P(x),B=0,G=Object.entries(N);B<G.length;B++){var Y=(0,d.Z)(G[B],2),w=Y[0],S=Y[1];W.push.apply(W,(0,u.Z)(M(w,S,n[g],t[g],j)))}for(var k=!1,V=!1,R=0,H=Object.keys(N);R<H.length;R++){var T=H[R];"status"===T?k=!0:"category"===T&&(V=!0)}(k&&!V||!k&&V)&&(k?W.push.apply(W,(0,u.Z)(t[g][j].map((function(e){return{value:e}})))):W.push.apply(W,(0,u.Z)(n[g][j].map((function(e){return{value:e}})))));var X,K=(0,p.Z)(W);try{for(K.s();!(X=K.n()).done;){var L=X.value;r.push((0,c.Z)({id:F},L))}}catch(U){K.e(U)}finally{K.f()}}else r.push((0,c.Z)({id:"id"},P(h)));else{var O=P(h);r.push((0,c.Z)({id:"id"},M("values",O.values)[0]))}}return r}},z=function(e,t){var n=function(e){var t=e.statusValues,n=e.categoryValues;return function(e){var i,r={},s=[],l=(0,p.Z)(e);try{for(l.s();!(i=l.n()).done;){var a=i.value,o=a.id,c=a.value,u=a.values,h=a.isTableTabFilter;if("id"!==o){var g=E(o),f=g.tool,m=g.name,v=g.column,I=r[f]||{},C=I[v]||{name:escape(m)};if(t[f][v]||n[f][v])if(c.endsWith(" ")){var x=C.categoryValues||[];x.push(c),C.categoryValues=x}else{var y=C.statusValues||[];y.push(c),C.statusValues=y}else C.value=c;I[v]=C,r[f]=I}else u&&u.length>0?r.ids={values:u.map((function(e){return e||""}))}:h&&s.push({id:o,value:c})}}catch(K){l.e(K)}finally{l.f()}var Z=r.ids,j=(0,b.Z)(r,A),F=[];Z&&F.push("id(values(".concat(Z.values.map(escape).join(","),"))")),s&&s.forEach((function(e){F.push("id_any(value(".concat(e.value,"))"))}));for(var W=0,N=Object.entries(j);W<N.length;W++){for(var B=(0,d.Z)(N[W],2),G=B[0],Y=B[1],w=[],S=0,k=Object.entries(Y);S<k.length;S++){var V=(0,d.Z)(k[S],2),R=V[0],H=V[1],T="".concat(R,"*").concat(H.name,"*"),X=void 0;""!==(X=H.statusValues||H.categoryValues?U(H,t,G,R,n):"value(".concat(escape(H.value),")"))&&w.push("".concat(T,"(").concat(X,")"))}w.length>0&&F.push("".concat(G,"(").concat(w.join(","),")"))}return F.join(",")}}({statusValues:e,categoryValues:t});return function(e,t){var i=X();if(!e)return K(i,t);var r=n(e);return r?K((0,c.Z)((0,c.Z)({},i),{},{filter:r}),t):(delete i.filter,K((0,c.Z)({},i),t))}},_=function(e){K((0,c.Z)((0,c.Z)({},X()),e))},Q="&#x2008;",q="&#x2007;",$=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unknown";(0,s.Z)(this,e),this._defaultOptions={whitespaceFormat:!1,html:!1,leadingZero:!0,additionalFormatting:function(e){return e}},this.significantDigits=t,this.maxPositiveDecimalPosition=-1,this.maxNegativeDecimalPosition=-1,this.name=n}return(0,l.Z)(e,[{key:"addDataItem",value:function(e){var t=this.format(e).split(/\.|,/),n=(0,d.Z)(t,2),i=n[0],r=n[1];this.maxPositiveDecimalPosition=Math.max(this.maxPositiveDecimalPosition,i&&"0"!==i?i.length:0),this.maxNegativeDecimalPosition=Math.max(this.maxNegativeDecimalPosition,r?r.length:0)}},{key:"format",value:function(e){var t=e.toString(),n="",i="",r=0,s=0,l=!1,a=!1;if("NaN"===t)return"NaN";if(t.endsWith("Infinity"))return t.replace("Infinity","Inf");if(t.includes("e")){var o=t.split("-"),c=(0,d.Z)(o,2),u=c[0],h=c[1],g=0;u.includes(".")&&(g=1),t=Number(e).toFixed(Number(h)+g)}for(var p=t.replace(/,/,".").indexOf(".");s<this.significantDigits-1&&t.length>r;){var f=t[r];if("."===f||","===f)n+=".",a=!0;else{if(!l){if("0"===f){r+=1,a&&(n+=f);continue}l=!0}n+=f,s+=1}r+=1}if(i=t.substring(r),""===n&&""===i&&(n=t),"."===n[0]&&(n="0".concat(n)),""!==i){var m="."===i[0];if(i=i.replace(/\./,""),i="".concat(i[0],".").concat(i.substr(1)),i=Math.round(Number(i)),(i=isNaN(i)?"":i.toString()).length>1&&"."!==i[0]){var v=i[0];i=i[1];for(var b=n.length,I=n.split("."),C=(0,d.Z)(I,2)[1],x=C&&C.length-1||0,y=C?"0.":"",Z=x;Z>0;)y+="0",Z-=1;for(n=function(e,t){var n=e,i=t;if("string"===typeof e&&(n=Number(e)),"string"===typeof t&&(i=Number(t)),Number.isInteger(n)||Number.isInteger(i))return n+i;var r=e.toString(),s=r.length,l=r.indexOf("."),a=t.toString(),o=a.length,c=a.indexOf("."),u=Math.max(s-l,o-c)-1;return Number((n+i).toFixed(u))}(n,y+=v).toFixed(x+1).substr(0,b);n.length<b;)n+="0"}var j=p;for(m&&(i=".".concat(i)),-1===p&&(j=t.length);n.length+i.length<j;)i+="0"}return"".concat(n).concat(i)}},{key:"build",value:function(){var e=this;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,c.Z)((0,c.Z)({},e._defaultOptions),n),r=i.whitespaceFormat,s=i.html,l=i.leadingZero,a=i.additionalFormatting,o={significantDigits:e.significantDigits,maxDecimalInputLength:e.maxNegativeDecimalPosition};if(B(e.significantDigits))return a(t.toString(),o);var u=e.format(t);if("NaN"===(u=a(u,o)))return u;if(r){var h=s?Q:" ",g=u.split(/\.|,/),p=(0,d.Z)(g,2),f=p[0],m=p[1];"0"!==f||l||(f=m?"":"0"),f=f||"";for(var v=(m=m||"")?".":h;m.length<e.maxNegativeDecimalPosition;)m+=" ";return s&&(f=f.replace(/ /g,q),m=m.replace(/ /g,q)),"".concat(f).concat(m?v:"").concat(m)}return!l&&u.startsWith("0.")?u.substr(1):u}}}]),e}(),ee=function(e){var t=X(),n=[];t.hidden&&(n=t.hidden.split(",").filter((function(t){return Number.isInteger(parseInt(t))&&e.some((function(e){return e.toolIdx===parseInt(t)}))})).map((function(e){return parseInt(e)})));var i={};return Object.keys(t).filter((function(e){return/hidden[0-9]+/.test(e)})).forEach((function(n){var r=parseInt(n.replace("hidden","")),s=e.find((function(e){return e.toolIdx===r}));Number.isInteger(r)&&s&&(i[r]=t[n].split(",").filter((function(e){return Number.isInteger(parseInt(e))&&s.columns.some((function(t){return t.colIdx===parseInt(e)}))})).map((function(e){return parseInt(e)})))})),n.forEach((function(t){i[t]=e.find((function(e){return e.toolIdx===t})).columns.map((function(e){return e.colIdx}))})),e.forEach((function(e){i[e.toolIdx]||(i[e.toolIdx]=[])})),i},te=function(e,t){var n,i=e.find((function(e){return n=e.columns.find((function(n){return"status"!==n.type&&!t[e.toolIdx].includes(n.colIdx)}))}));return n||(i=e.find((function(e){return n=e.columns.find((function(n){return"status"===n.type&&!t[e.toolIdx].includes(n.colIdx)}))}))),i&&n?[i.toolIdx,n.colIdx]:[void 0,void 0]},ne=function(e,t){var n,i={},r=(0,p.Z)(e);try{for(r.s();!(n=r.n()).done;){i[n.value]=!0}}catch(o){r.e(o)}finally{r.f()}var s,l=(0,p.Z)(t);try{for(l.s();!(s=l.n()).done;){var a=s.value;if(B(i[a]))return!1}}catch(o){l.e(o)}finally{l.f()}return!0},ie=function(e){var t=e.toString().split(/,|\./),n=(0,d.Z)(t,2)[1];if(B(n)||0===n.length)return 1;for(var i=".",r=0;r<n.length-1;r+=1)i+="0";return i+="1"},re=function(e){var t=[];return(e=e.filter((function(e,t){return t%2===0&&0!==t}))).forEach((function(e){return t.push(e.columns.filter((function(e){return e.hidden})).map((function(e){return e.id})))})),t.flat()},se=["handler"],le=["column","title","children"],ae=["runSet"],oe=["cell","href","toggleLinkOverlay","force"],ce=function(e){var t=e.handler,n=(0,b.Z)(e,se);return(0,j.jsx)("span",(0,c.Z)((0,c.Z)({onClick:t,title:"",className:"selectColumns"},n),{},{children:"Click here to select columns"}))},ue=function(e){var t=e.column,n=e.title,i=void 0===n?"Click here to sort. Hold shift to multi-sort":n,r=e.children,s=(0,b.Z)(e,le);return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({title:i},s),{},{children:r||R(t)}))},de=function(e){var t=e.runSet,n=(0,b.Z)(e,ae);return(0,j.jsx)("span",(0,c.Z)((0,c.Z)({className:"header__tool-infos"},n),{},{title:H(t),children:H(t)}))},he=function(e){var t=e.cell,n=e.href,i=void 0===n?t.value.href:n,r=e.toggleLinkOverlay,s=e.force,l=void 0!==s&&s,a=(0,b.Z)(e,oe),o=t.value.html,u=o?void 0:t.value.raw;return l||u||o?i?(0,j.jsx)("a",(0,c.Z)((0,c.Z)({href:i,onClick:function(e){return r(e,i)},dangerouslySetInnerHTML:o?{__html:o}:void 0},a),{},{children:u})):(0,j.jsx)("div",(0,c.Z)((0,c.Z)({dangerouslySetInnerHTML:o?{__html:o}:void 0},a),{},{children:u})):null},ge=function(e){return Object.freeze({Header:"",accessor:"separator"+e,className:"separator",columns:[{accessor:"separator"+e,className:"separator",width:2,minWidth:2}]})},pe=function(e,t,n){return[ge(t),{Header:(0,j.jsx)(de,{runSet:e}),columns:e.columns.map((function(e,i){return n(t,e,i)})),id:"runset-column"}]},fe=n(1330),me=n.n(fe),ve=["distincts","categories","statuses"],be="empty_row",Ie=function(e){return function(t){var n=(0,u.Z)(t);if(e.diff&&(n=n.filter((function(t){var n,i=(0,p.Z)(e.diff);try{for(i.s();!(n=i.n()).done;){var r,s=n.value.col,l={},a=(0,p.Z)(t.results);try{for(a.s();!(r=a.n()).done;){var o=r.value.values[s].raw;l[o]||(l[o]=!0)}}catch(c){a.e(c)}finally{a.f()}if(1===Object.keys(l).length)return!1}}catch(c){i.e(c)}finally{i.f()}return!0}))),!B(e.id)){var i=e.id,r=i.value,s=i.values;n=r?n.filter((function(e){return e.id.some((function(e){return e===r||e.includes(r)}))})):n.filter((function(e){var t=e.id;return s.every((function(e,n){var i=t[n];return!(!B(e)&&""!==e)||!B(i)&&""!==i&&(i===e||i.includes(e))}))}))}var l=n.filter((function(t){for(var n in function(e,t){return Object.keys(t).filter((function(t){return!e.includes(t)})).reduce((function(e,n){return e[n]=t[n],e}),{})}(["diff","id"],e))for(var i in e[n]){var r,s=!1,l=!1,a=!1,o=(0,p.Z)(e[n][i]);try{for(o.s();!(r=o.n()).done;){var c=r.value,u=c.value,d=c.min,h=c.max,g=c.category,f=c.status;if(B(d)||B(h))if(B(g))if(B(f)){var m=t.results[n].values[i].raw;if(B(m)){s=!1;continue}s=s||u===m||m.includes(u)}else{var v="empty"===t.results[n].category&&f===be;a=t.results[n].values[i].raw===f||a||v,s=l&&a}else s=(l=t.results[n].category===g||l)&&a;else{var b=t.results[n].values[i].raw;if(B(b)){s=!1;continue}var I=Number(b);s=s||I>=d&&I<=h}if(s)break}}catch(C){o.e(C)}finally{o.f()}if(!s)return!1}return!0}));return l}},Ce=(D={},(0,f.Z)(D,"empty","Empty rows"),(0,f.Z)(D,"aborted","\u2014"),D),xe=[50,100,250,500,1e3,2500],ye=function(){var e=X();return e.sort?e.sort.split(";").map((function(e){var t=e.split(",");return{id:t[0],desc:"desc"===t[1]}})):[]},Ze=function(e){var t=(0,i.useState)(!0),n=(0,d.Z)(t,2),r=n[0],s=n[1],l=(0,i.useState)(Ze()),a=(0,d.Z)(l,2),o=a[0],h=a[1],f=(0,i.useState)({}),b=(0,d.Z)(f,2),I=b[0],C=b[1],x=(0,i.useState)(!1),y=(0,d.Z)(x,2),Z=y[0],A=y[1],F=(0,g.k6)(),w=function(t){"id"===t.id&&(t.isTableTabFilter=!0);var n=[].concat((0,u.Z)(e.filters.filter((function(e){return e.id!==t.id}))),[t]);n=n.filter((function(e){return""!==e.value})),e.addTypeToFilter(n);var i=[];if("status"===t.type){var r=E(t.id),s=r.tool,l=r.name,a=r.column,o=t.value;if("all"===o.trim())i=function(t){var n,i=t.tool,r=t.name,s=t.column,l=[],a=(0,p.Z)(e.statusValues[i][s]);try{for(a.s();!(n=a.n()).done;){var o=n.value;l.push({id:"".concat(i,"_").concat(r,"_").concat(s),value:o})}}catch(g){a.e(g)}finally{a.f()}var c,u=(0,p.Z)(e.categoryValues[i][s]);try{for(u.s();!(c=u.n()).done;){var d=c.value,h="".concat(d," ");l.push({id:"".concat(i,"_").concat(r,"_").concat(s),value:h})}}catch(g){u.e(g)}finally{u.f()}return l}({tool:s,name:l,column:a}),n=n.filter((function(e){var n=e.id,i=e.value;return!(n===t.id&&"all"===i.trim())}));else i=function(t){var n,i=t.tool,r=t.name,s=t.column,l=t.isCategory,a=l?e.statusValues:e.categoryValues,o=[],c=(0,p.Z)(a[i][s]);try{for(c.s();!(n=c.n()).done;){var u=n.value;o.push({id:"".concat(i,"_").concat(r,"_").concat(s),value:"".concat(u).concat(l?"":" ")})}}catch(d){c.e(d)}finally{c.f()}return o}({tool:s,name:l,column:a,isCategory:" "===o[o.length-1]})}e.addTypeToFilter(i),e.filterPlotData([].concat((0,u.Z)(n),(0,u.Z)(i)),!0)};function S(e){var t=e.column,n=t.id,r=(t.filter,e.currFilters),s=n+"_filter",l=r.find((function(e){return e.id===n})),a=l?l.value:"",o=(0,i.useState)(""),c=(0,d.Z)(o,2),u=c[0],h=c[1],g=(0,i.useState)(a),p=(0,d.Z)(g,2),f=p[0],m=p[1],v="id"===n&&Z?"To edit, please clear task filter in the sidebar":"text";return(0,j.jsx)("input",{id:s,className:"filter-field",placeholder:v,defaultValue:f,onChange:function(e){var t=e.target.value;m(t),clearTimeout(u),h(setTimeout((function(){w({id:n,value:t}),document.getElementById(s).focus()}),500))},disabled:"id"===n&&Z,type:"search"})}function R(t){var n=t.column,i=n.id,r=(n.filter,t.runSetIdx),s=t.columnIdx,l=e.categoryValues[r][s],a=function(e){var t=e.categoryFilters,n=e.statusFilters,i=e.categoryFilterValues,r=e.statusFilterValues,s=[];return ne(t,i)||(s=t),ne(n,r)||(s=[].concat((0,u.Z)(s),(0,u.Z)(n))),s}({categoryFilters:V([r,"categories"],[],o),statusFilters:V([r,s],[],o),categoryFilterValues:l.map((function(e){return"".concat(e," ")})),statusFilterValues:e.statusValues[r][s]}),c=0===a.length,d=a.length>1||a[0]===W,h=a&&a[0],g=(c?"all ":d&&"multiple")||h;return(0,j.jsxs)("select",{className:"filter-field",onChange:function(e){return w({id:i,value:e.target.value})},value:g,children:[d&&(0,j.jsx)("option",{value:"multiple",disabled:!0,children:a.map((function(e){return e.trim()})).filter((function(e){return"all"!==e&&e!==W})).join(", ")||"No filters selected"}),(0,j.jsx)("option",{value:"all ",children:"Show all"}),l.filter((function(e){return e in Ce})).map((function(e){return(0,j.jsx)("option",{value:e+" ",children:Ce[e]},e)})),(0,j.jsx)("optgroup",{label:"Category",children:l.filter((function(e){return!(e in Ce)})).sort().map((function(e){return(0,j.jsx)("option",{value:e+" ",className:e,children:e},e)}))}),(0,j.jsx)("optgroup",{label:"Status",children:e.statusValues[r][s].filter((function(e){return e!==be})).sort().map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))})]})}function H(e){var t=e.column,n=t.id,r=(t.filter,e.currFilters),s=n+"_filter",l=r.find((function(e){return e.id===n})),a=l?l.value:"",o=(0,i.useState)(""),c=(0,d.Z)(o,2),u=c[0],h=c[1],g=(0,i.useState)(a),p=(0,d.Z)(g,2),f=p[0],m=p[1];return(0,j.jsx)("input",{id:s,className:"filter-field",placeholder:"Min:Max",defaultValue:f,onChange:function(e){var t=e.target.value;m(t),clearTimeout(u),h(setTimeout((function(){w({id:n,value:t}),document.getElementById(s).focus()}),500))},type:"search",pattern:"([+-]?[0-9]*(\\.[0-9]*)?)(:[+-]?[0-9]*(\\.[0-9]*)?)?"})}var T=(0,i.useCallback)((function(t){return(0,j.jsx)(S,(0,c.Z)((0,c.Z)({disableTaskText:Z},t),{},{currFilters:e.filters}))}),[Z,e.filters]),L=(0,i.useCallback)((function(t){return(0,j.jsx)(H,(0,c.Z)((0,c.Z)({},t),{},{currFilters:e.filters}))}),[e.filters]),O=(0,i.useMemo)((function(){var t=function(t,n,i){if("status"===n.type)return function(t,n,i){var r="".concat(t,"_").concat(n.display_title,"_").concat(i),s=I[r];return{id:r,Header:(0,j.jsx)(ue,{column:n}),className:"reg-column",hidden:e.hiddenCols[t].includes(n.colIdx),minWidth:50,width:s||k(n,10),accessor:function(e){return e.results[t].values[i]},Cell:function(n){var i,r=n.row.original.results[t].category,s=n.row.original.results[t].href;return"aborted"===r?(s=void 0,i="Result missing because run was aborted or not executed"):"empty"===r?i="Result missing because task was not part of benchmark set":s&&(i="Click here to show output of tool"),(0,j.jsx)(he,{cell:n,href:s,className:r,toggleLinkOverlay:e.toggleLinkOverlay,title:i,force:!0})},sortType:function(e,t,n,i){return Y(e.values[n],t.values[n])},filter:function(e){return e},Filter:function(e){return(0,j.jsx)(R,(0,c.Z)((0,c.Z)({},e),{},{runSetIdx:t,columnIdx:i}))}}}(t,n,i);var r="".concat(t,"_").concat(n.display_title,"_").concat(i),s=I[r],l=N(n)?L:T;return{id:r,Header:(0,j.jsx)(ue,{column:n}),className:"reg-column",hidden:e.hiddenCols[t].includes(n.colIdx),minWidth:50,width:s||k(n),accessor:function(e){return e.results[t].values[i]},Cell:function(t){return(0,j.jsx)(he,{cell:t,toggleLinkOverlay:e.toggleLinkOverlay})},filter:function(e){return e},Filter:l,sortType:function(e,t,i,r){return N(n)?(s=e.values[i],l=t.values[i],G(s,1/0)-G(l,1/0)):Y(e.values[i],t.values[i]);var s,l}}},n=e.tools.map((function(e,n){return pe(e,n,t)})).flat();return[{Header:function(){return(0,j.jsx)("div",{className:"fixed-task-header",children:(0,j.jsx)("form",{children:(0,j.jsxs)("label",{title:"Fix the first column",children:["Fixed task:",(0,j.jsx)("input",{name:"fixed",type:"checkbox",checked:r,onChange:function(e){var t=e.target;return s(t.checked)}})]})})})},className:"fixed-task",id:"task-id-column",sticky:r?"left":"",columns:[(0,c.Z)((0,c.Z)({width:.3*window.innerWidth,minWidth:230},I.id&&{width:I.id}),{},{Header:(0,j.jsx)(ue,{children:(0,j.jsx)(ce,{handler:e.selectColumn})}),accessor:"id",Cell:function(t){var n=t.row.original.id.map((function(e){return(0,j.jsx)("span",{className:"row_id",children:e},e)})),i=t.row.original.href;return i?(0,j.jsx)("a",{className:"row__name--cellLink",href:i,title:"Click here to show source code",onClick:function(t){return e.toggleLinkOverlay(t,i)},children:n},i):(0,j.jsx)("span",{title:"This task has no associated file",children:n})},Filter:T,sortType:function(e,t,n,i){var r=Array.isArray(e.values[n])?e.values[n].join():e.values[n],s=Array.isArray(t.values[n])?t.values[n].join():t.values[n];return r>s?1:r<s?-1:0}})]}].concat(n)}),[I,r,e,T,L]),U=(0,i.useMemo)((function(){return e.tableData}),[e.tableData]),D=(0,i.useMemo)((function(){return{Filter:(0,j.jsx)(j.Fragment,{})}}),[]),P=(0,m.useTable)({columns:O,data:U,defaultColumn:D,initialState:{sortBy:ye(),pageIndex:parseInt(X().page)-1||0,hiddenColumns:re(O),pageSize:parseInt(X().pageSize)||250}},m.useFilters,m.useFlexLayout,m.useResizeColumns,m.useSortBy,m.usePagination,v.useSticky),M=P.getTableProps,J=P.getTableBodyProps,z=P.headerGroups,_=(P.rows,P.prepareRow),Q=P.page,q=P.canPreviousPage,$=P.canNextPage,ee=P.pageOptions,te=P.pageCount,ie=P.gotoPage,se=P.nextPage,le=P.previousPage,ae=P.setPageSize,oe=P.setSortBy,de=P.state,ge=de.pageIndex,fe=de.pageSize,ve=de.sortBy,Ie=de.columnResizing;function Ze(){var t,n={},i=(0,p.Z)(e.filters);try{for(i.s();!(t=i.n()).done;){var r=t.value,s=r.value,l=r.values,a=r.id;"id"===a&&A(!B(l));var o=E(a),c=o.tool,u=o.column,d=n[c]||{};if("string"===typeof s&&" "===s[s.length-1]){var h=d.categories||[];h.push(s),d.categories=h}else{var g=d[u]||[];g.push(s),d[u]=g}n[c]=d}}catch(f){i.e(f)}finally{i.f()}return n}(0,i.useEffect)((function(){var e=ve.map((function(e){return e.id+","+(e.desc?"desc":"asc")})).join(";"),t=e.length?e:void 0;X().sort!==t&&K({sort:t},{keepOthers:!0})}),[ve]),(0,i.useEffect)((function(){var e=250!==fe?fe:void 0;X().pageSize!==e&&K({pageSize:e},{keepOthers:!0})}),[fe]),(0,i.useEffect)((function(){var e=ge&&0!==ge?Number(ge)+1:void 0;X().page!==e&&K({page:e},{keepOthers:!0})}),[ge]),(0,i.useEffect)((function(){var e=Ie.columnWidths;!Ie.isResizingColumn&&Object.keys(e).length>0&&C((0,c.Z)((0,c.Z)({},I),e))}),[Ie,I]),(0,i.useEffect)((function(){var e=Ze();me()(e,o)||h(e),ge>=te&&ie(te-1)}),[e.filters,o,ie,ge,te]),(0,i.useEffect)((function(){return F.listen((function(e){ae(X().pageSize||250),oe(ye()),ie(X().page-1||0)}))}),[F,ie,ae,oe]);var je=function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({className:"tr headergroup"},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return(0,j.jsxs)("div",(0,c.Z)((0,c.Z)({},e.getHeaderProps({className:"th header ".concat(e.headers?"outer ":"").concat(e.className)})),{},{children:[(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.canSort&&(!e.className||!e.className.includes("separator"))&&e.getSortByToggleProps({className:"header-sort-container clickable ".concat(e.isSorted?e.isSortedDesc?"sorted-desc ":"sorted-asc ":"")})),{},{children:e.render("Header")})),(!e.className||!e.className.includes("separator"))&&(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getResizerProps()),{},{className:"resizer ".concat(e.isResizing?"isResizing":"")}))]}))}))}))};return(0,j.jsx)("div",{className:"main-table",children:(0,j.jsxs)("div",{className:"table sticky",children:[(0,j.jsx)("div",{className:"table-content",children:(0,j.jsxs)("div",(0,c.Z)((0,c.Z)({className:"table-container"},M()),{},{children:[function(e){var t=e[0],n=e.filter((function(e){return e.headers.some((function(e){return e.canFilter}))}));return(0,j.jsxs)("div",{className:"table-header",children:[je(t),(0,j.jsxs)("div",{className:"shadow-container",children:[e.slice(1).map(je),n.map((function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({className:"tr headergroup filter"},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getHeaderProps({className:"th header filter ".concat(e.headers?"outer ":"").concat(e.className)})),{},{children:e.canFilter?e.render("Filter"):null}))}))}))}))]})]})}(z),(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},J()),{},{className:"table-body body",children:Q.map((function(e){return _(e),(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getRowProps()),{},{className:"tr",children:e.cells.map((function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getCellProps({className:"td "+(e.column.className||"")})),{},{children:e.render("Cell")}))}))}))}))}))]}))}),(0,j.jsxs)("div",{className:"pagination",children:[(0,j.jsxs)("div",{id:"pagination-previous",className:"pagination-container",children:[(0,j.jsx)("div",{onClick:function(){return le()},className:"pagination-element button".concat(q?"":" disabled"),children:"Previous"})," "]}),(0,j.jsxs)("div",{id:"pagination-center",className:"pagination-container",children:[(0,j.jsxs)("div",{id:"goto-page-element",className:"pagination-element",children:["Page",(0,j.jsx)("input",{"aria-label":"jump to page",type:"number",value:Number(ge)+1,onChange:function(e){return ie(Number(e.target.value)-1)}}),"of ",ee.length]}),(0,j.jsx)("div",{id:"set-page-element",className:"pagination-element",children:(0,j.jsx)("select",{value:fe,onChange:function(e){return ae(Number(e.target.value))},children:xe.map((function(e){return(0,j.jsxs)("option",{value:e,children:[e," rows"]},e)}))})})]}),(0,j.jsxs)("div",{id:"pagination-next",className:"pagination-container",children:[(0,j.jsx)("div",{onClick:function(){return se()},className:"pagination-element button".concat($?"":" disabled"),children:"Next"})," "]})]})]})})},je=n(4165),Ae=n(5861);n(9e3);var Fe=[],We={},Ne=1,Be=[{template:"data:text/plain;base64,Ly8gVGhpcyBmaWxlIGlzIHBhcnQgb2YgQmVuY2hFeGVjLCBhIGZyYW1ld29yayBmb3IgcmVsaWFibGUgYmVuY2htYXJraW5nOgovLyBodHRwczovL2dpdGh1Yi5jb20vc29zeS1sYWIvYmVuY2hleGVjCi8vCi8vIFNQRFgtRmlsZUNvcHlyaWdodFRleHQ6IDIwMTktMjAyMCBEaXJrIEJleWVyIDxodHRwczovL3d3dy5zb3N5LWxhYi5vcmc+Ci8vCi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wCgovLyBDT1BZIE9GIHV0aWxzLmpzLCBhcyBpbXBvcnRzIHdpbGwgbm90IHdvcmsgaGVyZQovKioKICogRnVuY3Rpb24gdG8gc2FmZWx5IGFkZCB0d28gbnVtYmVycyBpbiBhIHdheSB0aGF0IHNob3VsZCBtaXRpZ2F0ZSBlcnJvcnMKICogY2F1c2VkIGJ5IGluYWNjdXJhdGUgZmxvYXRpbmcgcG9pbnQgb3BlcmF0aW9ucyBpbiBqYXZhc2NyaXB0CiAqIEBwYXJhbSB7TnVtYmVyfFN0cmluZ30gYSAtIFRoZSBiYXNlIG51bWJlcgogKiBAcGFyYW0ge051bWJlcnxTdHJpbmd9IGIgLSBUaGUgbnVtYmVyIHRvIGFkZAogKgogKiBAcmV0dXJucyB7TnVtYmVyfSBUaGUgcmVzdWx0IG9mIHRoZSBhZGRpdGlvbgogKi8KY29uc3Qgc2FmZUFkZCA9IChhLCBiKSA9PiB7CiAgbGV0IGFOdW0gPSBhOwogIGxldCBiTnVtID0gYjsKCiAgaWYgKHR5cGVvZiBhID09PSAic3RyaW5nIikgewogICAgYU51bSA9IE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IHRvdGFsSGFzTmVnSW5mLAogICAgdG90YWxIYXNQb3NJbmYsCiAgICB0b3RhbC52YXJpYW5jZSwKICAgIGNvcHkubGVuZ3RoLAogICk7CgogIGZvciAoY29uc3QgW2J1Y2tldCwgdmFsdWVzXSBvZiBPYmplY3QuZW50cmllcyhidWNrZXRzKSkgewogICAgaWYgKHNob3VsZFNraXBCdWNrZXQoYnVja2V0TmFOSW5mbywgYnVja2V0KSkgewogICAgICBmb3IgKGNvbnN0IFtrZXksIHZhbF0gb2YgT2JqZWN0LmVudHJpZXModmFsdWVzKSkgewogICAgICAgIHZhbHVlc1trZXldID0gdmFsLnRvU3RyaW5nKCk7CiAgICAgIH0KICAgICAgYnVja2V0c1tidWNrZXRdID0gdmFsdWVzOwogICAgICBjb250aW51ZTsKICAgIH0KICAgIGNvbnN0IHZhbHVlc0hhdmVOZWdJbmYgPSBOdW1iZXIodmFsdWVzLm1pbikgPT09IC1JbmZpbml0eTsKICAgIGNvbnN0IHZhbHVlc0hhdmVQb3NJbmYgPSBOdW1iZXIodG90YWwubWF4KSA9PT0gSW5maW5pdHk7CiAgICB2YWx1ZXMuc3RkZXYgPSBjYWxjdWxhdGVTdGRldigKICAgICAgdmFsdWVzSGF2ZU5lZ0luZiwKICAgICAgdmFsdWVzSGF2ZVBvc0luZiwKICAgICAgdmFsdWVzLnZhcmlhbmNlLAogICAgICB2YWx1ZXMuaXRlbXMubGVuZ3RoLAogICAgKTsKCiAgICBmb3IgKGNvbnN0IFtrZXksIHZhbF0gb2YgT2JqZWN0LmVudHJpZXModmFsdWVzKSkgewogICAgICBpZiAoa2V5ID09PSAibWV0YSIpIHsKICAgICAgICBjb250aW51ZTsKICAgICAgfQogICAgICB2YWx1ZXNba2V5XSA9IHZhbC50b1N0cmluZygpOwogICAgfQogICAgLy8gY2xlYXJpbmcgbWVtb3J5CiAgICBkZWxldGUgdmFsdWVzLml0ZW1zOwogICAgZGVsZXRlIHZhbHVlcy52YXJpYW5jZTsKICAgIGJ1Y2tldHNbYnVja2V0XSA9IHZhbHVlczsKICB9CgogIGZvciAoY29uc3QgW2tleSwgdmFsdWVdIG9mIE9iamVjdC5lbnRyaWVzKHRvdGFsKSkgewogICAgaWYgKGtleSA9PT0gIm1ldGEiKSB7CiAgICAgIGNvbnRpbnVlOwogICAgfQogICAgdG90YWxba2V5XSA9IHZhbHVlLnRvU3RyaW5nKCk7CiAgfQoKICBkZWxldGUgdG90YWwuaXRlbXM7CiAgZGVsZXRlIHRvdGFsLnZhcmlhbmNlOwoKICBjb25zdCByZXN1bHQgPSB7IGNvbHVtblR5cGUsIHRvdGFsLCAuLi5idWNrZXRzIH07CiAgcG9zdFJlc3VsdChyZXN1bHQsIHRyYW5zYWN0aW9uKTsKfTsKCmNvbnN0IHBvc3RSZXN1bHQgPSAocmVzdWx0LCB0cmFuc2FjdGlvbikgPT4gewogIC8vIGhhbmRsaW5nIGluIHRlc3RzCiAgaWYgKHRoaXMubW9ja2VkUG9zdE1lc3NhZ2UpIHsKICAgIHRoaXMubW9ja2VkUG9zdE1lc3NhZ2UoeyByZXN1bHQsIHRyYW5zYWN0aW9uIH0pOwogICAgcmV0dXJuOwogIH0KICBwb3N0TWVzc2FnZSh7IHJlc3VsdCwgdHJhbnNhY3Rpb24gfSk7Cn07Cg==",poolSize:8,name:"stats"}].map((function(e){for(var t=e.template,n=e.poolSize,i=e.name,r=[],s=function(e){var n=new Worker(t),i={worker:n,busy:!1};n.onmessage=function(e){return function(e,t){var n=e.data,i=n.transaction,r=n.result,s=We[i];t.busy=!1,s(r),delete We[i]}(e,i)},r.push(i)},l=0;l<n;l+=1)s();return{name:i,pool:r}})).reduce((function(e,t){var n=t.name,i=t.pool;return(0,c.Z)((0,c.Z)({},e),{},(0,f.Z)({},n,i))}),{}),Ge=function e(){var t=Fe.shift();if(t){var n=function(e){var t=Be[e].filter((function(e){return!e.busy}))[0];return t?t.busy?null:(t.busy=!0,t):null}(t.name);if(!n)return Fe.unshift(t),void setImmediate(e);var i=Ne;Ne+=1;var r={data:t.data,transaction:i};We[i]=t.callback,n.worker.postMessage(r),setImmediate(e)}},Ye=function(){var e=(0,Ae.Z)((0,je.Z)().mark((function e(t){var n,i;return(0,je.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.name,i=t.data,e.abrupt("return",new Promise((function(e){Fe.push({name:n,data:i,callback:e}),setImmediate(Ge)})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),we=["columnType"],Se=["meta"],ke={total:{title:"all results"},correct:{indent:1,title:"correct results",description:"(property holds + result is true) OR (property does not hold + result is false)"},correct_true:{indent:2,title:"correct true",description:"property holds + result is true"},correct_false:{indent:2,title:"correct false",description:"property does not hold + result is false"},correct_unconfirmed:{indent:1,title:"correct-unconfirmed results",description:"(property holds + result is true) OR (property does not hold + result is false), but unconfirmed"},correct_unconfirmed_true:{indent:2,title:"correct-unconfirmed true",description:"property holds + result is true, but unconfirmed"},correct_unconfirmed_false:{indent:2,title:"correct-unconfirmed false",description:"property does not hold + result is false, but unconfirmed"},wrong:{indent:1,title:"incorrect results",description:"(property holds + result is false) OR (property does not hold + result is true)"},wrong_true:{indent:2,title:"incorrect true",description:"property does not hold + result is true"},wrong_false:{indent:2,title:"incorrect false",description:"property holds + result is false"}},Ve=function(e){return e.filter((function(e){return ke[e.id]}))},Re=function(){var e=(0,Ae.Z)((0,je.Z)().mark((function e(t){var n,i,r,s,l,a,o;return(0,je.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.tools,i=t.tableData,r=t.stats,s=He(n),e.next=4,Ee({tools:n,tableData:i,formatter:s});case 4:return l=e.sent,a=r.map((function(e){return e.id})).filter((function(e){return ke[e]})),o=Xe(l,s,a),l=o.map((function(e,t){var i,r=[],s=n[t].columns,l=0,a=s[l],o=(0,p.Z)(e);try{for(o.s();!(i=o.n()).done;){for(var c=i.value,u=c.title;l<s.length&&u!==a.title;)r.push({}),a=s[++l];if(l>=s.length)break;r.push(c),a=s[++l]}}catch(d){o.e(d)}finally{o.f()}return r})),e.abrupt("return",Ve(r).map((function(e){var t=e.content.map((function(t,n){return l[n].map((function(t){return t[e.id]}))}));return(0,c.Z)((0,c.Z)({},e),{},{content:t})})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),He=function(e){return e.map((function(e,t){return e.columns.map((function(e,n){var i=e.number_of_significant_digits;return new $(i,"".concat(t,"-").concat(n))}))}))},Te=function(e,t,n){return function(n,i){var r=i.significantDigits,s=Number(n),l=n.split("."),a=(0,d.Z)(l,2),o=a[0],c=a[1];if(["sum","avg","stdev"].includes(e)){var u,h;if(B(r)&&"sum"!==e)return s.toFixed(2);var g=o.replace(/^0+/,""),p=c||"";""===g&&(p=p.replace(/^0+/,""));var f=t-(null!==(u=null===c||void 0===c?void 0:c.length)&&void 0!==u?u:0),m=r-(g.length+p.length),v=m>0,b=(null!==(h=null===c||void 0===c?void 0:c.length)&&void 0!==h?h:0)+m;if(f>0&&v&&"stdev"!==e)return f>m?s.toFixed(b):s.toFixed(t);if("avg"===e&&!v&&f<0&&"0"===n[n.length-1])return s.toFixed(t);if("stdev"===e&&v)return s.toFixed(b)}return n}},Xe=function(e,t,n){var i=e.map((function(e,i){return e.map((function(e,r){var s,l={columnType:e.columnType},a=(0,p.Z)(n);try{for(a.s();!(s=a.n()).done;){var o,c=s.value,u=e[c];u&&(l[c]=u,null!==(o=null===u||void 0===u?void 0:u.sum)&&void 0!==o&&o&&t[i][r].addDataItem(u.sum))}}catch(d){a.e(d)}finally{a.f()}return l}))}));for(var r in t)for(var s in t[r])t[r][s]=t[r][s].build();return i.map((function(e,n){return e.map((function(e,i){e.columnType;var r=(0,b.Z)(e,we),s={};if(void 0!==r.total){for(var l=0,a=Object.entries(r);l<a.length;l++){for(var o=(0,d.Z)(a[l],2),c=o[0],u=o[1],h={},g=null===u||void 0===u?void 0:u.meta,p=0,f=Object.entries(u);p<f.length;p++){var m,v=(0,d.Z)(f[p],2),I=v[0],C=v[1];if(!Se.includes(I)){var x=null!==(m=null===g||void 0===g?void 0:g.maxDecimals)&&void 0!==m?m:0;if("title"!==I){if(!B(C)&&(!isNaN(C)||"NaN"===C)&&t[n][i])try{h[I]="sum"===I?t[n][i](C,{leadingZero:!1,whitespaceFormat:!0,html:!0,additionalFormatting:Te(I,x)}):t[n][i](C,{leadingZero:!0,whitespaceFormat:!1,html:!1,additionalFormatting:Te(I,x)})}catch(y){console.error({key:I,value:C,formatter:t[n][i],e:y})}}else s.title=C}}s[c]=h}return s}})).filter((function(e){return!B(e)}))}))},Ke="false",Le="false",Oe="other",Ue=function(e,t,n,i,r){return e.map((function(e){var r,s=n(t,e),l=i(t,e);return{categoryType:s.replace(/-/g,"_"),resultType:B(r=l)?Oe:"true"===r?"true":r===Ke||r.startsWith("".concat(Ke,"("))&&r.endsWith(")")?Le:Oe,row:e.results[t].values}}))},De=function(e){return function(t,n){var i,r=[],s=(0,p.Z)(t);try{for(s.s();!(i=s.n()).done;){var l=i.value,a=l.row,o=l.categoryType,c=l.resultType;for(var u in a){var d=a[u].raw,h=r[u]||[],g=e[n].columns[u],f=g.type,m=g.title;h.push({categoryType:o,resultType:c,column:d,columnType:f,columnTitle:m}),r[u]=h}}}catch(v){s.e(v)}finally{s.f()}return r}},Ee=function(){var e=(0,Ae.Z)((0,je.Z)().mark((function e(t){var n,i,r,s,l,a,o,c,u,d,h,g,p,f,m,v,b;return(0,je.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o in n=t.tools,i=t.tableData,t.formatter,r=function(e,t){return t.results[e].category},s=function(e,t){return t.results[e].values[0].raw},l=[],a=[],n)a.push(Ue(i,o,r,s));for(d in c=De(n),u=a.map(c))u[d]=u[d].filter((function(e){return!B(e)}));for(h in u){for(f in g=u[h],p=[],g)m=g[f],p.push(Ye({name:"stats",data:m}));l[h]=p}return v=l.map((function(e){return Promise.all(e)})),e.next=13,Promise.all(v);case 13:return b=e.sent,e.abrupt("return",b);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Pe=.15*window.innerWidth,Me=function(e){return Object.keys(e).filter((function(t){return e[t]&&"sum"!==t})).map((function(t){return"".concat(t,": ").concat(e[t])})).join(", ")||void 0},Je=function(e){var t=e.selectColumn,n=e.tools,r=e.switchToQuantile,s=e.hiddenCols,l=e.tableData,a=e.onStatsReady,o=e.stats,u=e.filtered,h=void 0!==u&&u,g=(0,i.useState)(h?[]:o),p=(0,d.Z)(g,2),f=p[0],b=p[1],I=(0,i.useState)(!0),C=(0,d.Z)(I,2),x=C[0],y=C[1];(0,i.useEffect)((function(){var e=function(){var e=(0,Ae.Z)((0,je.Z)().mark((function e(){var t;return(0,je.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!h){e.next=7;break}return e.next=3,Re({tools:n,tableData:l,stats:o});case 3:t=e.sent,b(t),e.next=8;break;case 7:b(o);case 8:a&&a();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[n,l,a,false,o,h]);var Z=function(e){return(0,j.jsx)("div",{className:"table-header",children:e.map((function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({className:"tr headergroup"},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return(0,j.jsxs)("div",(0,c.Z)((0,c.Z)({},e.getHeaderProps({className:"th header ".concat(e.headers?"outer ":"").concat(e.className||"")})),{},{children:[e.render("Header"),(!e.className||!e.className.includes("separator"))&&(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getResizerProps()),{},{className:"resizer ".concat(e.isResizing?"isResizing":"")}))]}))}))}))}))})},A=function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},w()),{},{className:"table-body body",children:e.map((function(e){return R(e),(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getRowProps()),{},{className:"tr",children:e.cells.map((function(e){return(0,j.jsx)("div",(0,c.Z)((0,c.Z)({},e.getCellProps({className:"td "+(e.column.className||"")})),{},{children:e.render("Cell")}))}))}))}))}))},F=(0,i.useMemo)((function(){var e=n.map((function(e,t){return pe(e,t,function(e){var t=e.switchToQuantile,n=e.hiddenCols;return function(e,i,r){return{id:"".concat(e,"_").concat(i.display_title,"_").concat(r),Header:(0,j.jsx)(ue,{column:i,className:"header-data clickable",title:"Show Quantile Plot of this column",onClick:function(e){return t(i)}}),hidden:n[e].includes(i.colIdx)||!(N(i)||"status"===i.type),width:k(i,null,"status"===i.type?6:null),minWidth:30,accessor:function(t){return t.content[e][r]},Cell:function(e){var t,n=null===(t=e.value)||void 0===t?void 0:t.sum;return"status"===i.type&&(n=void 0===e.value?0:null===e.value?null:Number.isInteger(Number(e.value.sum))?Number(e.value.sum):e.value.sum),B(n)?(0,j.jsx)("div",{className:"cell",children:"-"}):(0,j.jsx)("div",{dangerouslySetInnerHTML:{__html:n},className:"cell",title:"status"!==i.type?Me(e.value):void 0})}}}}({switchToQuantile:r,hiddenCols:s}))})).flat();return[{Header:function(){return(0,j.jsx)("form",{children:(0,j.jsxs)("label",{title:"Fix the first column",children:["Fixed row title:",(0,j.jsx)("input",{id:"fixed-row-title",name:"fixed",type:"checkbox",checked:x,onChange:function(e){var t=e.target;return y(t.checked)}})]})})},id:"row-title",sticky:x?"left":"",width:Pe,minWidth:100,columns:[{id:"summary",width:Pe,minWidth:100,Header:(0,j.jsx)(ce,{handler:t}),Cell:function(e){return(0,j.jsx)("div",{dangerouslySetInnerHTML:{__html:(e.row.original.title||"&nbsp;".repeat(4*ke[e.row.original.id].indent)+ke[e.row.original.id].title)+(h?" of selected rows":"")},title:e.row.original.description||ke[e.row.original.id].description,className:"row-title"})}}]}].concat(e)}),[h,x,r,s,t,n]),W=(0,i.useMemo)((function(){return f}),[f]),G=(0,m.useTable)({columns:F,data:W,initialState:{hiddenColumns:re(F)}},m.useFilters,m.useResizeColumns,m.useFlexLayout,v.useSticky),Y=G.getTableProps,w=G.getTableBodyProps,S=G.headerGroups,V=G.rows,R=G.prepareRow;return(0,j.jsxs)("div",{id:"statistics",children:[(0,j.jsx)("h2",{children:"Statistics"}),function(e,t){return h&&0===f.length?(0,j.jsx)("p",{id:"statistics-placeholder",children:"Please wait while the statistics are being calculated."}):(0,j.jsx)("div",{id:"statistics-table",children:(0,j.jsx)("div",{className:"table sticky",children:(0,j.jsx)("div",{className:"table-content",children:(0,j.jsxs)("div",(0,c.Z)((0,c.Z)({className:"table-container"},Y()),{},{children:[Z(e),A(t)]}))})})})}(S,V)]})},ze=["displayName","tool","limit","host","os","system","date","runset","branch","options","property"],_e=function(e){var t=function(e){return e.split(/[\s]+-/).map((function(e,t){return(0,j.jsx)("li",{children:(0,j.jsx)("code",{children:0===t?e:"-".concat(e)})},e)}))},n=function(e,t){return e?(0,j.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t}):t},i=function(e){var t=e.tool,i=e.version,r=e.project_url,s=e.version_url;return(0,j.jsxs)(j.Fragment,{children:[n(r,t)," ",n(s,i)]})};return(0,j.jsxs)("div",{id:"summary",children:[(0,j.jsxs)("div",{id:"benchmark_setup",children:[(0,j.jsx)("h2",{children:"Benchmark Setup"}),(0,j.jsx)("table",{children:(0,j.jsx)("tbody",{children:ze.map((function(t){return e.tableHeader[t]})).filter((function(e){return null!==e})).map((function(e){return(0,j.jsxs)("tr",{className:e.id,children:[(0,j.jsx)("th",{children:e.name},"td-"+e.id),e.content.map((function(n,r){return function(e,n,r,s){var l="options"===e,a="tool"===e;return(0,j.jsx)("td",{colSpan:r,className:"header__tool-row".concat(l&&" options"),children:l?(0,j.jsx)("ul",{children:t(n)}):a?i(n):n},n+s)}(e.id,n[0],n[1],r)}))]},"tr-"+e.id)}))})})]}),(0,j.jsx)(Je,{selectColumn:e.selectColumn,tools:e.tools,switchToQuantile:e.switchToQuantile,hiddenCols:e.hiddenCols,tableData:e.tableData,onStatsReady:e.onStatsReady,stats:e.stats,filtered:e.filtered}),(0,j.jsxs)("p",{children:["Generated by"," ",(0,j.jsxs)("a",{className:"link",href:"https://github.com/sosy-lab/benchexec",target:"_blank",rel:"noopener noreferrer",children:[" ","BenchExec ",e.version]})]})]})},Qe=n(4463),qe=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(){var e;(0,s.Z)(this,n);for(var i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];return(e=t.call.apply(t,[this].concat(r))).knownLicenses=["BSD-3-Clause","CC-BY-4.0","ISC","MIT","Zlib"],e.linkifyLicense=function(e){return(0,j.jsx)("a",{href:"https://spdx.org/licenses/"+e,target:"_blank",rel:"noopener noreferrer",children:e},e)},e.linkifyLicenses=function(t){return t.split(/([A-Za-z0-9.-]+)/).map((function(t){return e.knownLicenses.includes(t)?e.linkifyLicense(t):t}))},e.render=function(){return(0,j.jsxs)("div",{children:[(0,j.jsx)("h4",{children:(0,j.jsxs)("a",{href:"https://www.npmjs.com/package/"+e.props.name+"/v/"+e.props.version,target:"_blank",rel:"noopener noreferrer",children:[e.props.name," ",e.props.version]})}),e.props.repository&&(0,j.jsxs)(j.Fragment,{children:["Source:"," ",(0,j.jsx)("a",{href:e.props.repository,target:"_blank",rel:"noopener noreferrer",children:e.props.repository}),(0,j.jsx)("br",{})]}),e.props.copyright&&(0,j.jsxs)(j.Fragment,{children:[e.props.copyright,(0,j.jsx)("br",{})]}),"License: ",(0,j.jsx)(j.Fragment,{children:e.linkifyLicenses(e.props.licenses)}),void 0!==e.props.licenseId&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("br",{}),(0,j.jsxs)("details",{children:[(0,j.jsx)("summary",{children:"Full text of license"}),(0,j.jsx)("pre",{children:Qe.licenses[e.props.licenseId]})]})]})]})},e}return(0,l.Z)(n)}(i.Component),$e=function(e){return(0,j.jsxs)("div",{className:"info",children:[(0,j.jsx)("div",{className:"info-header",children:(0,j.jsx)("h1",{children:"Info and Help"})}),(0,j.jsx)("h3",{children:"Summary"}),(0,j.jsxs)("ul",{children:[(0,j.jsx)("li",{children:"Shows environment information and a summary of the results."}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Select columns:"})," ",(0,j.jsx)("br",{})," The columns to show can be selected by clicking on ",(0,j.jsx)("em",{children:"Click here to select columns"})," or"," ",(0,j.jsx)("span",{className:"link",onClick:e.selectColumn,children:"here"}),"."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Quantile plot:"})," ",(0,j.jsx)("br",{}),"A quantile plot for a column can be shown by clicking on the respective column header (e.g.,"," ",(0,j.jsx)("em",{children:"cputime"}),")."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Fixed row title:"})," ",(0,j.jsx)("br",{}),"Deselect to let the left-most column scroll together with the rest of the table."]})]}),(0,j.jsx)("h3",{children:"Table"}),(0,j.jsxs)("ul",{children:[(0,j.jsx)("li",{children:"Shows the detailed results."}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Fixed task:"})," ",(0,j.jsx)("br",{}),"Deselect to let the left-most column with the task name scroll together with the rest of the table."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Select columns:"})," ",(0,j.jsx)("br",{})," The columns to show can be selected by clicking on ",(0,j.jsx)("em",{children:"Click here to select columns"})," or"," ",(0,j.jsx)("span",{className:"link",onClick:e.selectColumn,children:"here"}),"."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Filter rows:"})," ",(0,j.jsx)("br",{}),"Filters can be applied to every column in the row below the column header. Numeric columns accept a range filter like ",(0,j.jsx)("em",{children:"min:max"}),", where both ",(0,j.jsx)("em",{children:"min"})," and ",(0,j.jsx)("em",{children:"max"})," are numeric values that can also be omitted for half-open ranges. For text columns (like the task name) any row matches that contains the entered filter value. Several filters can be combined and will be applied together. All filters can be deleted at once with the ",(0,j.jsx)("em",{children:"Reset Filters"})," button in the top right corner."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Sort rows:"})," ",(0,j.jsx)("br",{})," Rows can be sorted by clicking on the column header. Clicking again will toggle the sort order (ascending vs. descending). Hold ",(0,j.jsx)("kbd",{children:"Shift"})," while clicking for adding a column to the sort order."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Tool output:"})," ",(0,j.jsx)("br",{}),"Clicking on a cell in the status column will show the tool output of this run."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Task definition:"})," ",(0,j.jsx)("br",{})," Clicking on the task name will show the content of the respective file."]})]}),(0,j.jsx)("h3",{children:" Quantile Plot and Scatter Plot"}),(0,j.jsxs)("ul",{children:[(0,j.jsx)("li",{children:"Shows plots of the results that are currently visible in the table."}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Correct results only:"})," ",(0,j.jsx)("br",{}),"In addition to the currently applied filter, the plots by default show only correct results. Click ",(0,j.jsx)("em",{children:"Switch to All Results"})," to toggle this behavior."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Select columns:"}),(0,j.jsx)("br",{}),"The drop-down fields above the plots allow to choose which columns are shown in the plot."]})]}),(0,j.jsx)("h3",{children:"About"}),(0,j.jsxs)("p",{children:["This table was generated by"," ",(0,j.jsxs)("a",{className:"link",href:"https://github.com/sosy-lab/benchexec",target:"_blank",rel:"noopener noreferrer",children:["BenchExec ",e.version]}),". For feedback, questions, and bug reports please use our"," ",(0,j.jsx)("a",{className:"link",href:"https://github.com/sosy-lab/benchexec/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22HTML+table%22",target:"_blank",rel:"noopener noreferrer",children:"issue tracker"}),"."]}),(0,j.jsxs)("p",{children:["License:"," ",(0,j.jsx)("a",{className:"link",href:"https://www.apache.org/licenses/LICENSE-2.0",target:"_blank",rel:"noopener noreferrer",children:"Apache 2.0 License"})]}),(0,j.jsxs)("details",{children:[(0,j.jsx)("summary",{children:"This application includes third-party dependencies under different licenses. Click here to view them."}),Qe.dependencies.map((function(e){return(0,j.jsx)(qe,(0,c.Z)({},e),e.name+e.version)}))]})]})},et=n(9284),tt=n.n(et),nt=n(935),it=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;(0,s.Z)(this,n),(i=t.call(this,e)).renderTools=function(){return i.props.tools.map((function(e){var t=e.toolIdx,n=i.state.hiddenCols[t].length!==e.columns.length,r=H(e);return(0,j.jsxs)("tr",{id:r,children:[(0,j.jsx)("td",{id:r,className:n?"checked":"",children:(0,j.jsxs)("label",{children:[r,(0,j.jsx)("input",{name:r+"--"+t,type:"checkbox",checked:n,onChange:function(e){return i.toggleToolHidden(t,e)}})]})}),i.renderToolColumns(t)]},"tr"+r+t)}))},i.renderToolColumns=function(e){var t=i.props.tools.find((function(t){return t.toolIdx===e}));return i.state.selectableCols.map((function(n){if(t.columns.some((function(e){return e.display_title===n}))){var r=!t.columns.filter((function(e){return e.display_title===n})).map((function(e){return e.colIdx})).some((function(t){return i.state.hiddenCols[e].includes(t)}));return(0,j.jsx)("td",{id:"td"+e+n,className:r?"checked":"",children:(0,j.jsxs)("label",{children:[n,(0,j.jsx)("input",{id:e+"--"+n,name:e+"--"+n,type:"checkbox",checked:r,onChange:function(t){return i.toggleToolColHidden(e,n,t)}})]})},n)}return(0,j.jsx)("td",{},n)}))},i.renderColumnHeaders=function(){return i.state.selectableCols.map((function(e){var t=Object.values(i.state.hiddenCols).some((function(t,n){var r=i.props.tools.find((function(e){return e.toolIdx===n}));return!r.columns.filter((function(t){return t.display_title===e})).map((function(e){return e.colIdx})).some((function(e){return t.includes(e)}))&&r.columns.some((function(t){return t.display_title===e}))}));return(0,j.jsx)("th",{id:"td-all-"+e,className:t?"checked":"",children:(0,j.jsxs)("label",{children:[e,(0,j.jsx)("input",{name:e,type:"checkbox",checked:t,onChange:function(t){return i.toggleWholeColHidden(e,t)}})]})},"key"+e)}))},i.toggleAllColsHidden=function(){var e={};i.props.tools.forEach((function(t){return e[t.toolIdx]=[]})),i.state.isButtonOnDeselect&&i.props.tools.forEach((function(t){e[t.toolIdx]=t.columns.map((function(e){return e.colIdx}))})),i.setState((function(t){return{isButtonOnDeselect:!t.isButtonOnDeselect,hiddenCols:e}}))},i.toggleToolHidden=function(e,t){var n=t.target,r=("checkbox"===n.type?n.checked:n.value)?[]:i.props.tools.find((function(t){return t.toolIdx===e})).columns.map((function(e){return e.colIdx}));i.setHiddenColsForTool(e,r)},i.toggleToolColHidden=function(e,t,n){var r=n.target,s="checkbox"===r.type?r.checked:r.value,l=i.props.tools.find((function(t){return t.toolIdx===e})).columns.filter((function(e){return e.display_title===t})).map((function(e){return e.colIdx}));s?i.removeFromHiddenCols(e,l):i.addToHiddenCols(e,l)},i.toggleWholeColHidden=function(e,t){var n=t.target,r="checkbox"===n.type?n.checked:n.value;i.props.tools.forEach((function(t){var n=t.columns.filter((function(t){return t.display_title===e}));if(n.length>0){var s=n.map((function(e){return e.colIdx}));r?i.removeFromHiddenCols(t.toolIdx,s):i.addToHiddenCols(t.toolIdx,s)}}))},i.addToHiddenCols=function(e,t){var n=(0,u.Z)(new Set(i.state.hiddenCols[e].concat(t)));i.setHiddenColsForTool(e,n)},i.removeFromHiddenCols=function(e,t){var n=i.state.hiddenCols[e].filter((function(e){return!t.includes(e)}));i.setHiddenColsForTool(e,n)},i.handlePopState=function(){window.history.back()};var r=e.tools.map((function(e){return e.columns})).flat().filter((function(e,t,n){return t===n.findIndex((function(t){return t.display_title===e.display_title}))})).map((function(e){return e.display_title}));return i.state={isButtonOnDeselect:!0,hiddenCols:i.props.hiddenCols,selectableCols:r},i}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){window.history.pushState({},"",""),window.addEventListener("popstate",this.props.close,!1)}},{key:"componentWillUnmount",value:function(){var e=this;window.removeEventListener("popstate",this.props.close,!1);var t={},n=[];Object.entries(this.state.hiddenCols).forEach((function(i){var r=(0,d.Z)(i,2),s=r[0],l=r[1],a=e.props.tools.find((function(e){return e.toolIdx===parseInt(s)})).columns;l.length===a.length?n.push(s):l.length>0?t["hidden"+s]=l.toString():t["hidden"+s]=null})),n.length>0?t.hidden=n.toString():t.hidden=null,K(t,{keepOthers:!0,history:this.props.history})}},{key:"setHiddenColsForTool",value:function(e,t){this.setState((function(n){return{hiddenCols:(0,c.Z)((0,c.Z)({},n.hiddenCols),{},(0,f.Z)({},e,t))}}))}},{key:"render",value:function(){var e=this;tt().setAppElement(document.getElementById("root"));var t=this.props.tools.every((function(t){return t.columns.length===e.state.hiddenCols[t.toolIdx].length}));return(0,j.jsxs)(tt(),{ariaHideApp:!1,className:"overlay",isOpen:!0,onRequestClose:function(){return e.handlePopState()},children:[(0,j.jsx)("div",{className:"link-overlay-header-container",children:(0,j.jsx)(y.G,{icon:nt.YIN,onClick:function(){return e.handlePopState()},className:"closing"})}),(0,j.jsx)("h1",{children:"Select the columns to display"}),(0,j.jsx)("table",{className:"selectRows",children:(0,j.jsxs)("tbody",{children:[(0,j.jsxs)("tr",{className:"selectColumn_all",children:[(0,j.jsx)("th",{}),this.renderColumnHeaders()]}),this.renderTools()]})}),(0,j.jsxs)("div",{className:"overlay__buttons",children:[(0,j.jsx)("button",{className:"btn",onClick:this.toggleAllColsHidden,children:this.state.isButtonOnDeselect?"Deselect all":"Select all"}),(0,j.jsx)("button",{className:"btn btn-apply",onClick:function(){return e.handlePopState()},disabled:t,children:"Apply and close"}),(0,j.jsx)("input",{})]})]})}}]),n}(i.Component),rt=(n(8350),n(9468)),st=function(e,t,n,i,r,s){return(0,j.jsxs)("div",{className:"setting".concat(s?" disabled":""),title:r,children:[(0,j.jsxs)("span",{className:"setting-label".concat(r?" with-tooltip":""),children:[e,":"]}),(0,j.jsxs)("select",{className:"setting-select",name:"setting-"+e,value:s?"disabled":t,onChange:n,disabled:s,children:[Object.values(i).map((function(t){return(0,j.jsx)("option",{value:t,name:t+" "+e,children:t},t)})),s?(0,j.jsx)("option",{value:"disabled",name:"disabled",children:"\u2e3a"}):""]})]})},lt=function(e,t,n,i,r){return(0,j.jsxs)("div",{className:"setting",title:r,children:[(0,j.jsxs)("span",{className:"setting-label".concat(r?" with-tooltip":""),children:[e,":"]}),(0,j.jsx)("select",{id:"setting-"+e,className:"setting-select",name:"setting-"+e,value:t,onChange:n,children:Object.entries(i).map((function(t){var n=(0,d.Z)(t,2),i=n[0],r=n[1];return(0,j.jsx)("optgroup",{label:i,children:r.map((function(t){return(0,j.jsx)("option",{value:t.value,name:t.name+" "+e,children:t.name},t.value)}))},i)}))})]})};function at(e,t,n){var i=[1e8,1e7,1e6,1e5,1e4].find((function(e){return t>e})),r=i?i/1e3:1;return Array(Math.ceil(t/r)).fill().map((function(e,t){return t*r})).filter((function(t){return t>=e})).map((function(e){var t=n(e);return[Number.parseFloat(t[0].toPrecision(4)),Number.parseFloat(t[1].toPrecision(4))]}))}var ot=n(4391),ct=n.n(ot),ut=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;return(0,s.Z)(this,n),(i=t.call(this,e)).refreshUrlState=function(){i.setState(i.setup())},i.checkForNumericalSelections=function(){return"ordinal"!==i.handleType(i.state.toolY,i.state.columnY)&&"ordinal"!==i.handleType(i.state.toolX,i.state.columnX)},i.renderData=function(){var e=[];i.hasInvalidLog=!1,i.state.areAllColsHidden||i.props.table.forEach((function(t){var n=t.results[i.state.toolX],r=t.results[i.state.toolY],s=n.values[i.state.columnX].raw,l=r.values[i.state.columnY].raw,a=void 0!==s&&null!==s&&void 0!==l&&null!==l,o=i.state.results===i.resultsOptions.correct;a&&(!o||o&&"correct"===n.category&&"correct"===r.category)&&(i.state.scaling===i.scalingOptions.logarithmic&&(s<=0||l<=0)?i.hasInvalidLog=!0:e.push({x:s,y:l,info:i.props.getRowName(t)}))})),i.setMinMaxValues(e),i.lineCount=e.length,i.dataArray=e;var t=i.state.regression!==i.regressionOptions.none,n=i.checkForNumericalSelections();if(t)if(0!==i.lineCount&&n){var r=e.map((function(e){return[parseFloat(e.x),parseFloat(e.y)]})),s=ct().linear(r),l=function(e,t,n,i,r){var s=function(e){return e[0]},l=function(e){return e[1]},a=function(e,t){return e+t};i=Math.floor(i),r=Math.ceil(r);var o=Math.sqrt(e.map((function(e,n){return[l(e),l(t[n])]})).map((function(e){return Math.pow(e[1]-e[0],2)})).reduce(a)/e.length),c=e.map((function(e){return s(e)})).reduce(a)/e.length,u=Math.sqrt(e.map((function(e){return Math.pow(s(e)-c,2)})).reduce(a)/e.length),d=at(i,r,n),h=0===o||0===u?d.map((function(e){return 0})):d.map((function(t){return Number.parseFloat((1.96*o*Math.sqrt(1/e.length+Math.pow(s(t)-c,2)/((e.length-1)*Math.pow(u,2)))).toPrecision(4))}));return{upperBorderData:d.map((function(e,t){return[s(e),l(e)+h[t]]})),lowerBorderData:d.map((function(e,t){return[s(e),l(e)-h[t]]}))}}(r,s.points,s.predict,i.minX,i.maxX),a=[[i.minX,s.predict(i.minX)[1]],[i.maxX,s.predict(i.maxX)[1]]];s.points=Array.from(new Set(s.points.map(JSON.stringify)),JSON.parse).concat(a);var o=i.props.tools[i.state.toolX].columns[i.state.columnX].unit,c=i.props.tools[i.state.toolY].columns[i.state.columnY].unit,u="Estimation technique: ordinary least squares (OLS)\n                          Predictor variable (X-Axis) in ".concat(o,": ").concat(i.state.nameX,"\n                          Response variable (Y-Axis) in ").concat(c,": ").concat(i.state.nameY,"\n                          Regression coefficient: ").concat(s.equation[0],"\n                          Intercept: ").concat(s.equation[1],"\n                          Equation: ").concat(s.string,"\n                          Coefficient of Determination: ").concat(s.r2).replace(/^ +/gm,"");i.regressionData={regression:s,text:u,upperConfidenceBorderData:l.upperBorderData,lowerConfidenceBorderData:l.lowerBorderData}}else _({regression:i.regressionOptions.none})},i.setMinMaxValues=function(e){var t=e.map((function(e){return e.x})),n=e.map((function(e){return e.y}));i.maxX=i.findMaxValue(t),i.maxY=i.findMaxValue(n),i.minX=i.findMinValue(t),i.minY=i.findMinValue(n)},i.findMaxValue=function(e){var t=Math.max.apply(Math,(0,u.Z)(e));return t<3?3:t},i.findMinValue=function(e){var t=Math.min.apply(Math,(0,u.Z)(e));return t>2?1:t},i.renderRegressionLine=function(e){var t=i.prepareRegressionLineData(e);return(0,j.jsx)(rt.LU,{className:"regression-line",data:t,style:{stroke:"green"},onValueMouseOver:function(e,t){return i.setState({value:e})},onValueMouseOut:function(e,t){return i.setState({value:null})},opacity:"0"},"reg-line-"+e)},i.renderConfidenceIntervalLine=function(e,t){var n=i.prepareLineData(e);return(0,j.jsx)(rt.eh,{className:"regression-line",data:n,style:{stroke:"gray"}},"conf-line-".concat(t,"-").concat(e))},i.prepareRegressionLineData=function(e){return e.sort((function(e,t){return e[0]-t[0]})).map((function(e,t){var n=Math.round(100*i.regressionData.lowerConfidenceBorderData[t][1])/100,r=Math.round(100*i.regressionData.upperConfidenceBorderData[t][1])/100;return{x:e[0],y:e[1],"95% Confidence Interval":"[".concat(n,",").concat(r,"]")}})).sort((function(e,t){return e.x-t.x}))},i.prepareLineData=function(e){return e.map((function(e){return{x:e[0],y:e[1]}})).sort((function(e,t){return e.x-t.x}))},i.handleType=function(e,t){var n=i.props.tools[e].columns[t].type;return"text"===n||"status"===n?"ordinal":i.state.scaling===i.scalingOptions.logarithmic?"log":"linear"},i.extractAxisInfoByName=function(e,t){var n,r=e.split("-"),s=(0,d.Z)(r,2),l=s[0],a=s[1];return n={},(0,f.Z)(n,"data".concat(t),e),(0,f.Z)(n,"tool".concat(t),l),(0,f.Z)(n,"column".concat(t),a),(0,f.Z)(n,"name".concat(t),i.props.tools[l].columns.find((function(e){return e.colIdx===parseInt(a)})).display_title+" ("+H(i.props.tools[l])+")"),n},i.setAxis=function(e,t){var n;i.array=[];var r=e.target.value.split("-"),s=(0,d.Z)(r,2),l=s[0],a=s[1];a=a.replace("___","-"),_((n={},(0,f.Z)(n,"tool".concat(t),l),(0,f.Z)(n,"column".concat(t),a),n))},i.swapAxes=function(){i.array=[],_({toolX:i.state.toolY,toolY:i.state.toolX,columnX:i.state.columnY,columnY:i.state.columnX})},i.scalingOptions={linear:"Linear",logarithmic:"Logarithmic"},i.resultsOptions={all:"All",correct:"Correct only"},i.regressionOptions={none:"None",linear:"Linear"},i.lineOptgroupOptions={"f(x) = cx and f(x) = x/c":[{name:"c = 1.1",value:1.1},{name:"c = 1.2",value:1.2},{name:"c = 1.5",value:1.5},{name:"c = 2",value:2},{name:"c = 3",value:3},{name:"c = 4",value:4},{name:"c = 5",value:5},{name:"c = 6",value:6},{name:"c = 7",value:7},{name:"c = 8",value:8},{name:"c = 9",value:9},{name:"c = 10",value:10},{name:"c = 100",value:100},{name:"c = 1000",value:1e3},{name:"c = 10000",value:1e4},{name:"c = 100000",value:1e5},{name:"c = 1000000",value:1e6}]},i.defaultValues={scaling:i.scalingOptions.logarithmic,results:i.resultsOptions.correct,regression:i.regressionOptions.none,line:Object.values(i.lineOptgroupOptions)[0][11].value},i.state=i.setup(),i.maxX="",i.minX="",i.lineCount=1,i}return(0,l.Z)(n,[{key:"setup",value:function(){var e,t,n,i=H(this.props.tools[0])+" "+this.props.columns[0][1],r=(0,c.Z)((0,c.Z)({},this.defaultValues),X()),s=r.results,l=r.scaling,a=r.toolX,o=r.toolY,u=r.columnX,h=r.columnY,g=r.line,p=r.regression;if(B(a)||B(u)){var f=te(this.props.tools,this.props.hiddenCols),m=(0,d.Z)(f,2),v=m[0],b=m[1];n=void 0===v,a=v,e="".concat(v,"-").concat(b)}else n=!1,e="".concat(a,"-").concat(u);if(B(o)||B(h)){var I=te(this.props.tools,this.props.hiddenCols),C=(0,d.Z)(I,2),x=C[0],y=C[1];n=void 0===x,o=x,t="".concat(x,"-").concat(y)}else n=!1,t="".concat(o,"-").concat(h);var Z={dataX:e,dataY:t,results:s,scaling:l,regression:p,toolX:0,toolY:0,line:g,columnX:1,columnY:1,nameX:i,nameY:i,value:!1,areAllColsHidden:n};return e&&!n&&(Z=(0,c.Z)((0,c.Z)({},Z),this.extractAxisInfoByName(e,"X"))),t&&!n&&(Z=(0,c.Z)((0,c.Z)({},Z),this.extractAxisInfoByName(t,"Y"))),Z}},{key:"componentDidMount",value:function(){window.addEventListener("popstate",this.refreshUrlState)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("popstate",this.refreshUrlState)}},{key:"renderAllSettings",value:function(){var e=this,t=this.props.tools.reduce((function(t,n,i){return Object.assign(t,(0,f.Z)({},H(n),n.columns.filter((function(t){return!e.props.hiddenCols[i].includes(t.colIdx)})).map((function(e,t){return{name:e.display_title,value:i+"-"+e.colIdx}}))))}),{});return(0,j.jsx)("div",{className:"settings-container",children:(0,j.jsxs)("div",{className:"settings-border-container",children:[(0,j.jsxs)("div",{className:"settings-subcontainer flexible-width",children:[lt("X-Axis",this.state.dataX,(function(t){return e.setAxis(t,"X")}),t),(0,j.jsx)("span",{className:"setting icon",children:(0,j.jsx)(y.G,{icon:nt.Ssp,onClick:function(){return e.swapAxes()}})}),lt("Y-Axis",this.state.dataY,(function(t){return e.setAxis(t,"Y")}),t)]}),(0,j.jsxs)("div",{className:"settings-subcontainer",children:[st("Scaling",this.state.scaling,(function(e){return _({scaling:e.target.value})}),this.scalingOptions),st("Results",this.state.results,(function(e){return _({results:e.target.value})}),this.resultsOptions,"In addition to which results are selected here, any filters will still be applied."),(0,j.jsx)("div",{className:"settings-subcontainer",children:lt("Aux. Lines",this.state.line,(function(e){return _({line:e.target.value})}),this.lineOptgroupOptions,"Adds the two auxiliary lines f(x) = cx and f(x) = x/c to the plot, with c being the chosen factor in the dropdown.")})]}),(0,j.jsx)("div",{className:"settings-subcontainer",children:st("Regression",this.state.regression,(function(t){e.checkForNumericalSelections()?_({regression:t.target.value}):alert("Regressions are only available for numerical selections.")}),this.regressionOptions,this.state.regression!==this.regressionOptions.none&&this.regressionData?this.regressionData.text:void 0)})]})})}},{key:"renderRegressionAndConfidenceIntervals",value:function(){var e=at(Math.floor(this.minX),Math.ceil(this.maxX),this.regressionData.regression.predict);return[this.renderConfidenceIntervalLine(this.regressionData.upperConfidenceBorderData,"upper"),this.renderConfidenceIntervalLine(this.regressionData.lowerConfidenceBorderData,"lower"),this.renderRegressionLine(e)]}},{key:"render",value:function(){var e=this;this.renderData();var t=this.state.scaling===this.scalingOptions.linear,n=this.props.isFlexible?rt.wu:rt.dp,i=this.props.isFlexible?{height:window.innerHeight-200}:{height:1e3,width:1500},r=this.maxX>this.maxY?this.maxX:this.maxY;return(0,j.jsxs)("div",{className:"scatterPlot",children:[!this.state.areAllColsHidden&&this.renderAllSettings(),(0,j.jsxs)(n,(0,c.Z)((0,c.Z)({className:"scatterPlot__plot",margin:{left:90},yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX),xDomain:"ordinal"!==this.handleType(this.state.toolX,this.state.columnX)?[this.minX,this.maxX]:null,yDomain:"ordinal"!==this.handleType(this.state.toolY,this.state.columnY)?[this.minY,this.maxY]:null},i),{},{children:[(0,j.jsx)(rt.pW,{yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(rt.xL,{yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(rt.Ci,{className:"middle-line",axisStart:{x:t?0:1,y:t?0:1},axisEnd:{x:r,y:r},axisDomain:[0,1e10],style:{ticks:{stroke:"#009440",opacity:0},text:{stroke:"none",fill:"#009440",fontWeight:600,opacity:0}}}),(0,j.jsx)(rt.Ci,{axisStart:{x:t?0:this.state.line,y:t?0:1},axisEnd:{x:this.maxX,y:this.maxX/this.state.line},axisDomain:[0,1e10],style:{ticks:{stroke:"#ADDDE1",opacity:0},text:{stroke:"none",fill:"#6b6b76",fontWeight:600,opacity:0}}}),(0,j.jsx)(rt.Ci,{axisStart:{x:t?0:1,y:t?0:this.state.line},axisEnd:{x:this.maxX,y:this.maxX*this.state.line},axisDomain:[0,1e10],style:{ticks:{stroke:"#ADDDE1",opacity:0},text:{stroke:"none",fill:"#6b6b76",fontWeight:600,opacity:0}}}),(0,j.jsx)(rt.Kc,{title:this.state.nameX,tickFormat:function(e){return e},yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(rt.B2,{title:this.state.nameY,tickFormat:function(e){return e},yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(rt.e9,{data:this.dataArray,onValueMouseOver:function(t,n){return e.setState({value:t})},onValueMouseOut:function(t,n){return e.setState({value:null})}}),this.state.regression!==this.regressionOptions.none&&this.checkForNumericalSelections()&&this.regressionData&&0!==this.lineCount&&this.renderRegressionAndConfidenceIntervals(),this.state.value?(0,j.jsx)(rt.kW,{value:this.state.value}):null]})),this.state.areAllColsHidden?(0,j.jsx)("div",{className:"plot__noresults",children:"No columns to show!"}):0===this.lineCount&&(0,j.jsxs)("div",{className:"plot__noresults",children:["No"," ",this.state.results===this.resultsOptions.correct&&"correct"," ","results",this.props.table.length>0&&" with valid data points",this.hasInvalidLog&&" (negative values are not shown in logarithmic plot)"]})]})}}]),n}(i.Component),dt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;return(0,s.Z)(this,n),(i=t.call(this,e)).isColRelevantForTool=function(e,t){return i.isColVisible(t,e)&&"text"!==e.type&&"status"!==e.type},i.isToolRelevantForCol=function(e,t){var n=e.columns.find((function(e){return e.display_title===t}));return i.isToolVisible(e)&&n&&i.isColVisible(e.toolIdx,n.colIdx)},i.isColVisibleInAnyTool=function(e){return i.props.tools.some((function(t){return t.columns.some((function(n){return n.colIdx===e.colIdx&&i.isColVisible(t.toolIdx,n.colIdx)}))}))},i.isInVisibleRunsetSupportingScore=function(e){return i.props.tools.filter((function(e){return i.isToolVisible(e)})).some((function(t){return t.scoreBased&&t.columns.some((function(t){return t.display_title===e}))}))},i.isToolVisible=function(e){return e.columns.length!==i.props.hiddenCols[e.toolIdx].length},i.isColVisible=function(e,t){return!i.props.hiddenCols[e].includes(t)},i.updateDimensions=function(){i.setState({height:window.innerHeight})},i.refreshUrlState=function(){i.setState(i.setPlotData())},i.renderLegend=function(){if(i.state.isValue)return i.props.tools.filter((function(e){return i.isToolRelevantForCol(e,i.state.selection)})).map(H).map((function(e){return{title:e,disabled:i.state.isInvisible.some((function(t){return t===e})),strokeWidth:4}}));var e=i.props.tools[i.state.selection.split("-")[1]];return i.state.areAllColsHidden?[]:e.columns.filter((function(t){return i.isColRelevantForTool(t.colIdx,e.toolIdx)})).map((function(e){return{title:e.display_title,disabled:i.state.isInvisible.some((function(t){return t===e.display_title})),strokeWidth:4}}))},i.renderAll=function(){var e=i.state.selection;if(i.state.isValue){var t=i.state.plot===i.plotOptions.scoreBased?i.props.tools.filter((function(e){return e.scoreBased})):i.props.tools;t.forEach((function(t){return i.renderData(e,t.toolIdx,e+t.toolIdx)}))}else if(!i.state.areAllColsHidden){var n=i.state.selection.split("-")[1],r=i.props.tools[n];r.columns.filter((function(e){return i.isColRelevantForTool(e.colIdx,r.toolIdx)&&i.isColVisible(r.toolIdx,e.colIdx)})).forEach((function(e){return i.renderData(e.display_title,n,e.display_title)}))}},i.renderData=function(e,t,n){var r=i.state.plot===i.plotOptions.scoreBased,s="ordinal"===i.handleType(),l=i.props.tools[t].columns.findIndex((function(t){return t.display_title===e})),a=[],o=0;(!i.state.isValue||l>=0&&i.isColVisible(t,l))&&(a=i.props.table.map((function(e){var n=e.results[t],a=null;return"correct"===n.category||!i.state.isResultSelectionDisabled&&i.state.results!==i.resultsOptions.correct?(a=n.values[l].raw||null,s||null===a||(a=isFinite(+a)?+a:null)):r&&n.score&&"correct"!==n.category&&(o+=n.score),{value:a,rowName:i.props.getRowName(e),score:n.score}})),i.state.plot!==i.plotOptions.direct&&(a=a.filter((function(e){return null!==e.value})),a=i.sortArray(a,e))),i.hasInvalidLog=!1;var c=[],u=r?o:0;a.forEach((function(n){var s=n.value,l=n.rowName,a=n.score,o=i.state.scaling===i.scalingOptions.logarithmic&&s<=0;u+=r?a:1,null===s||o||c.push({x:u,y:s,task:l,series:i.state.isValue?H(i.props.tools[t]):e}),o&&(i.hasInvalidLog=!0)})),i[n]=c},i.sortArray=function(e,t){var n=i.possibleValues.find((function(e){return e.display_title===t}));return i.state.isValue&&["text","status"].includes(n.type)?e.sort((function(e,t){return e.value>t.value?1:t.value>e.value?-1:0})):e.sort((function(e,t){return+e.value-+t.value}))},i.renderColumns=function(){return i.possibleValues.map((function(e){var t=i.state.plot===i.plotOptions.scoreBased&&!i.isInVisibleRunsetSupportingScore(e.display_title);return(0,j.jsx)("option",{value:e.display_title,name:e.display_title,disabled:t,className:t?"disabled":"",children:e.display_title},e.display_title)}))},i.renderLines=function(){i.lineCount=0;var e=function(){return T[(i.lineCount-1)%T.length]};if(i.state.isValue)return i.props.tools.map((function(t,n){if(!i.isToolRelevantForCol(t,i.state.selection)||i.state.plot===i.plotOptions.scoreBased&&!t.scoreBased)return null;var r=i.state.selection,s=i[r+n],l=H(t);return i.lineCount++,(0,j.jsx)(rt.LU,{data:s,color:e(),opacity:i.handleLineState(l),onValueMouseOver:function(e,t){return i.setState({value:e})},onValueMouseOut:function(e,t){return i.setState({value:null})}},l)})).filter((function(e){return!!e}));if(!i.state.areAllColsHidden){var t=i.state.selection.split("-")[1],n=i.props.tools[t];return n.columns.filter((function(e){return i.isColRelevantForTool(e.colIdx,n.toolIdx)})).map((function(t){var n=i[t.display_title];return i.lineCount++,(0,j.jsx)(rt.LU,{data:n,color:e(),opacity:i.handleLineState(t.display_title),onValueMouseOver:function(e,t){return i.setState({value:e})},onValueMouseOut:function(e,t){return i.setState({value:null})}},t.display_title)}))}},i.handleLineState=function(e){return i.state.isInvisible.indexOf(e)<0?1:0},i.toggleShow=function(e){var t=e.target;i.setState((0,f.Z)({},t.name,t.checked))},i.handleType=function(){var e=i.state.selection,t=i.possibleValues.findIndex((function(t){return t.display_title===e})),n=i.state.isValue&&t>=0?i.possibleValues[t].type:null;return!i.state.isValue||"text"!==n&&"status"!==n?i.state.scaling===i.scalingOptions.linear?"linear":"log":"ordinal"},i.plotOptions={quantile:"Quantile Plot",direct:"Direct Plot"},i.scalingOptions={linear:"Linear",logarithmic:"Logarithmic"},i.resultsOptions={all:"All",correct:"Correct only"},i.defaultValues={plot:i.plotOptions.quantile,scaling:i.scalingOptions.logarithmic,results:i.resultsOptions.correct},i.checkForScoreBasedPlot(),i.possibleValues=[],i.lineCount=1,i.state=i.setPlotData(),i}return(0,l.Z)(n,[{key:"setPlotData",value:function(){var e=this,t=X(),n=(0,c.Z)((0,c.Z)({},this.defaultValues),t),i=n.selection,r=n.plot,s=n.scaling,l=n.results,a=i,o=this.props.tools.map((function(e){return e.toolIdx})).join(""),u=new RegExp("runset-["+o+"]"),d=void 0===i||!u.test(i);if(i=d?this.getColumnSelection(i):this.getRunsetSelection(i),r===this.plotOptions.scoreBased&&(d&&!this.isInVisibleRunsetSupportingScore(i)||!d)){this.setPossibleValues();var h=this.possibleValues.find((function(t){return"status"!==t.type&&e.isInVisibleRunsetSupportingScore(t.display_title)}));h||(h=this.possibleValues.find((function(t){return e.isInVisibleRunsetSupportingScore(t.display_title)}))),i=h?h.display_title:i,d=!0}return a&&i&&a!==i&&_({selection:i}),{selection:i,plot:r,scaling:s,results:l,isValue:d,isInvisible:[],areAllColsHidden:void 0===i,isResultSelectionDisabled:r===this.plotOptions.scoreBased}}},{key:"getColumnSelection",value:function(e){var t=e?this.props.tools.map((function(e){return e.columns})).flat().find((function(t){return t.display_title===e})):this.props.preSelection;if(!t||!this.isColVisibleInAnyTool(t)){var n=te(this.props.tools,this.props.hiddenCols),i=(0,d.Z)(n,2),r=i[0],s=i[1];t=void 0!==r?this.props.tools.find((function(e){return e.toolIdx===r})).columns.find((function(e){return e.colIdx===s})):void 0}return t&&t.display_title}},{key:"getRunsetSelection",value:function(e){var t=this,n=parseInt(e.split("-")[1]);return this.props.tools.find((function(e){return e.toolIdx===n})).columns.some((function(e){return t.isColVisible(n,e.colIdx)}))||(n=te(this.props.tools,this.props.hiddenCols)[0]),void 0!==n?"runset-"+n:void 0}},{key:"checkForScoreBasedPlot",value:function(){var e=this;this.props.tools.some((function(t){return t.scoreBased&&e.isToolVisible(t)}))&&(this.plotOptions=(0,c.Z)({scoreBased:"Score-based Quantile Plot"},this.plotOptions),this.props.tools.every((function(t){return t.scoreBased&&e.isToolVisible(t)}))&&(this.defaultValues.plot=this.plotOptions.scoreBased))}},{key:"componentDidMount",value:function(){window.addEventListener("resize",this.updateDimensions),window.addEventListener("popstate",this.refreshUrlState)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions),window.removeEventListener("popstate",this.refreshUrlState)}},{key:"setPossibleValues",value:function(){var e=this;this.props.tools.forEach((function(t){t.columns.forEach((function(n){e.isColVisible(t.toolIdx,n.colIdx)&&!e.possibleValues.some((function(e){return e.display_title===n.display_title}))&&e.possibleValues.push(n)}))}))}},{key:"renderAllSettings",value:function(){var e=this,t=this.state.plot===this.plotOptions.scoreBased?"Score-based Quantile Plots always show correct results offset by the score of wrong results. Any defined filters will still be applied.":"In addition to which results are selected here, any defined filters will still be applied.";return(0,j.jsxs)("div",{className:"settings-legend-container",children:[(0,j.jsx)("div",{className:"settings-container",children:(0,j.jsxs)("div",{className:"settings-border-container",children:[(0,j.jsxs)("div",{className:"settings-subcontainer flexible-width",children:[(0,j.jsxs)("div",{className:"setting flexible-width",children:[(0,j.jsx)("span",{className:"setting-label",children:"Selection:"}),(0,j.jsxs)("select",{className:"setting-select",name:"setting-Selection",value:this.state.selection,onChange:function(e){return _({selection:e.target.value})},children:[(0,j.jsx)("optgroup",{label:"Runsets",children:this.props.tools.map((function(t,n){var i=e.state.plot===e.plotOptions.scoreBased;return e.isToolVisible(t)?(0,j.jsx)("option",{value:"runset-"+n,name:"Runset "+n,disabled:i,className:i?"disabled":"",children:H(t)},"runset-"+n):null}))}),(0,j.jsx)("optgroup",{label:"Columns",children:this.renderColumns()})]})]}),st("Plot",this.state.plot,(function(e){return _({plot:e.target.value})}),this.plotOptions)]}),(0,j.jsxs)("div",{className:"settings-subcontainer",children:[st("Scaling",this.state.scaling,(function(e){return _({scaling:e.target.value})}),this.scalingOptions),st("Results",this.state.results,(function(e){return _({results:e.target.value})}),this.resultsOptions,t,this.state.isResultSelectionDisabled)]})]})}),(0,j.jsx)("div",{children:(0,j.jsx)(rt.Ri,{colors:T,items:this.renderLegend(),onItemClick:function(t,n){var i;if(i=t.title.toString(),!(e.state.isInvisible.indexOf(i)<0))return e.setState({isInvisible:e.state.isInvisible.filter((function(e){return e!==i}))});e.setState({isInvisible:e.state.isInvisible.concat([i])})}})})]})}},{key:"render",value:function(){this.setPossibleValues(),this.renderAll();var e=this.props.isFlexible?rt.wu:rt.dp,t=this.props.isFlexible?{height:window.innerHeight-200}:{height:1e3,width:1500};return(0,j.jsxs)("div",{className:"quantilePlot",children:[!this.state.areAllColsHidden&&this.renderAllSettings(),(0,j.jsxs)(e,(0,c.Z)((0,c.Z)({margin:{left:90},yType:this.handleType()},t),{},{children:[(0,j.jsx)(rt.pW,{}),(0,j.jsx)(rt.xL,{}),(0,j.jsx)(rt.Kc,{tickFormat:function(e){return e}}),(0,j.jsx)(rt.B2,{tickFormat:function(e){return e}}),this.state.value?(0,j.jsx)(rt.kW,{value:this.state.value}):null,this.renderLines()]})),this.state.areAllColsHidden?(0,j.jsx)("div",{className:"plot__noresults",children:"No columns to show!"}):0===this.lineCount&&(0,j.jsx)("div",{className:"plot__noresults",children:this.hasInvalidLog?"All results have undefined values":"No correct results"})]})}}]),n}(i.Component),ht=n(8282),gt=(n(8995),(0,ht.u7)(ht.ZP.Range)),pt=500,ft=setTimeout((function(){}),pt),mt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;(0,s.Z)(this,n),i=t.call(this,e);var r=e.filter||{values:[]},l=r.values,a=r.min,o=r.max,c=r.type,u=r.number_of_significant_digits,d=0,h=0;if("measure"===c||"number"===c){var g=new $(u).build();d=g(a),h=g(o);var p=l&&l[0];if(p&&p.includes(":")){var f=i.handleMinMaxValue(p,u);d=f.min,h=f.max}}return i.state={title:e.availableFilters&&e.availableFilters.length?e.availableFilters[0].title:"",values:[],idx:V(["availableFilters",0,"idx"],0,e),active:!0,selectedDistincts:[],sliderMin:d,sliderMax:h,numericMin:null,numericMax:null},i}return(0,l.Z)(n,[{key:"sendFilterUpdate",value:function(e){var t=this.props.filter,n=t.type,i=t.categories;i&&i.includes("empty ")&&!e.includes(be)&&(e=e.concat(be)),0===e.length&&"status"===n?this.props.onFilterUpdate({values:[W],title:this.state.title||this.props.title}):this.props.onFilterUpdate({values:e,title:this.state.title||this.props.title})}},{key:"componentDidUpdate",value:function(e,t){if(this.props.filter&&(!e.filter||e.filter.values!==this.props.filter.values)){var n=this.props.filter,i=n.values,r=n.number_of_significant_digits,s=(0,d.Z)(i,1)[0];if(s&&s.includes(":")){var l=this.handleMinMaxValue(s,r),a=l.min,o=l.max;this.setState({sliderMin:a,sliderMax:o,numericMin:a,numericMax:o})}}}},{key:"handleMinMaxValue",value:function(e,t){var n=new $(t).build(),i=this.props.filter||{min:0,max:1/0},r=i.min,s=i.max,l=e.split(":"),a=(0,d.Z)(l,2),o=a[0],c=a[1];return{min:""!==o.trim()?o:n(r),max:""!==c.trim()?c:n(s)}}},{key:"handleNumberChange",value:function(e,t){var n,i,r={};if(r.sliderMin=Number(null!==(n=this.state.numericMin)&&void 0!==n?n:this.state.sliderMin),r.sliderMax=Number(null!==(i=this.state.numericMax)&&void 0!==i?i:this.state.sliderMax),r.sliderMin>r.sliderMax){var s=r.sliderMax;r.sliderMax=r.sliderMin,r.sliderMin=s}var l=r.sliderMin<=Number(e)?"":r.sliderMin,a=r.sliderMax>=Number(t)?"":r.sliderMax;r.values=["".concat(l,":").concat(a)],this.setState(r),this.sendFilterUpdate(r.values)}},{key:"render",value:function(){var e=this,t=this.props,n=t.filter,r=t.editable,s=t.availableFilters,l=i.createRef();return(0,j.jsxs)("div",{className:"filter-card",children:[function(t,i){return(0,j.jsx)("div",{className:"filter-card--header",children:i?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{style:{marginLeft:"12px"},children:"Add filter for: "}),(0,j.jsxs)("select",{className:"filter-selection",defaultValue:"-1",ref:l,onChange:function(t){var n=t.target.value;-1!==n&&(e.setState({idx:-1,active:!0}),l.current.value="-1",e.props.addFilter(n))},children:[(0,j.jsx)("option",{value:"-1",disabled:!0,children:"Column"}),s.map((function(e){var t=e.idx,n=e.display_title;return(0,j.jsx)("option",{value:t,children:n},t)}))]})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h4",{className:"title",children:"".concat(n.display_title," ").concat(n.unit?"("+n.unit+")":"")}),(0,j.jsx)(y.G,{className:"delete-button",icon:nt.$aW,onClick:function(){e.props.removeFilter()}})]})})}(this.props.name,r),function(t){if(!t)return null;var n,r=t.title,s=t.type,l=t.number_of_significant_digits,a=t.categories,o=t.statuses,c=t.values,h=void 0===c?[]:c,g=t.min,p=t.max,f=i.createRef();if("status"===s)n=(0,j.jsxs)(j.Fragment,{children:[e.props.filter.categories&&e.props.filter.categories.includes("empty ")&&(0,j.jsxs)("div",{className:"filter-card--body--empty-rows",children:["Empty rows"," ",(0,j.jsx)("input",{type:"checkbox",name:"empty-rows",ref:f,checked:h.includes("empty "),onChange:function(t){var n="empty ";if(t.target.checked){var i=[].concat((0,u.Z)(h),[n]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(n,h);e.setState({values:r}),e.sendFilterUpdate(r)}}})]}),"Category",(0,j.jsx)("ul",{className:"filter-card--body--list",children:a.filter((function(e){return"empty "!==e})).sort().map((function(t){var n=i.createRef();return(0,j.jsxs)("li",{children:[(0,j.jsx)("input",{type:"checkbox",name:"cat-".concat(t),checked:h.includes(t),ref:n,onChange:function(n){if(n.target.checked){var i=[].concat((0,u.Z)(h),[t]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(t,h);e.setState({values:r}),e.sendFilterUpdate(r)}}}),(0,j.jsx)("label",{htmlFor:"cat-".concat(t),onClick:function(){return n.current.click()},className:t,children:t})]},t)}))}),"Status",(0,j.jsx)("ul",{className:"filter-card--body--list",children:o.sort().map((function(t){var n=i.createRef();return(0,j.jsxs)("li",{children:[(0,j.jsx)("input",{type:"checkbox",name:"stat-".concat(t),ref:n,checked:h.includes(t),onChange:function(n){if(n.target.checked){var i=[].concat((0,u.Z)(h),[t]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(t,h);e.setState({values:r}),e.sendFilterUpdate(r)}}}),(0,j.jsx)("label",{htmlFor:"stat-".concat(t),onClick:function(){return n.current.click()},children:t})]},t)}))})]});else if("text"===s){var m=(0,d.Z)(h,1)[0];n=(0,j.jsx)("input",{type:"text",name:"text-".concat(r),placeholder:"Search for value",value:m,onChange:function(t){var n=t.target.value;clearTimeout(ft),e.setState({values:[n]}),ft=setTimeout((function(){e.sendFilterUpdate([n])}),pt)}})}else{var v=new $(l).build();g=v(g),p=v(p);var b=ie(g),I=ie(p),C=b.length>I.length?b:I;n=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:"filter-card--range-container",children:[(0,j.jsx)("b",{children:g}),(0,j.jsx)("b",{children:p})]}),(0,j.jsx)(gt,{min:Number(g),max:Number(p),step:C,defaultValue:[Number(g),Number(p)],value:[Number(e.state.sliderMin),Number(e.state.sliderMax)],onChange:function(t){var n=(0,d.Z)(t,2),i=n[0],r=n[1];e.setState({sliderMin:v(i),sliderMax:v(r)})},onAfterChange:function(t){var n=(0,d.Z)(t,2),i=n[0],r=n[1],s=v(i),l=v(r),a=s===g?"":s,o=l===p?"":l;e.setState({sliderMin:s,sliderMax:l,numericMin:i,numericMax:r,values:["".concat(a,":").concat(o)]}),e.sendFilterUpdate(["".concat(a,":").concat(o)])}}),(0,j.jsxs)("div",{className:"filter-card--range-input-fields",children:[(0,j.jsx)("label",{className:"range-input-fields--min",htmlFor:"inp-".concat(r,"-min"),children:"minimum"}),(0,j.jsx)("label",{className:"range-input-fields--max",htmlFor:"inp-".concat(r,"-max"),children:"maximum"}),(0,j.jsx)("input",{type:"number",name:"inp-".concat(r,"-min"),value:null!==e.state.numericMin?e.state.numericMin:e.state.sliderMin,lang:"en-US",step:C,onChange:function(t){var n=t.target.value;e.numericMinTimeout&&clearTimeout(e.numericMinTimeout),e.setState({numericMin:n}),e.numericMinTimeout=setTimeout((function(){return e.handleNumberChange(g,p)}),pt)}}),(0,j.jsx)("input",{type:"number",name:"inp-".concat(r,"-max"),step:C,lang:"en-US",value:null!==e.state.numericMax?e.state.numericMax:e.state.sliderMax,onChange:function(t){var n=t.target.value;e.numericMaxTimeout&&clearTimeout(e.numericMaxTimeout),e.setState({numericMax:n}),e.numericMaxTimeout=setTimeout((function(){return e.handleNumberChange(g,p)}),pt)}})]})]})}return(0,j.jsx)("div",{className:"filter-card--body",children:n})}(this.props.filter)]})}}]),n}(i.PureComponent),vt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;(0,s.Z)(this,n),i=t.call(this,e);var r=e.filters,l=e.toolName,a=e.currentFilters;for(var o in a)r[o]=(0,c.Z)((0,c.Z)((0,c.Z)({},r[o]),a[o]),{},{touched:r[o].touched+1,filtering:!0});return i.props.resetFilterHook((function(){return i.resetAllFilters()})),i.state={filters:r,toolName:l,addingFilter:!1,numCards:0},i}return(0,l.Z)(n,[{key:"getActiveFilters",value:function(){return this.state.filters.filter((function(e){return e.filtering})).sort((function(e,t){return e.numCards-t.numCards}))}},{key:"setFilter",value:function(e,t){var n=e.title,i=e.values,r=e.filtering,s=void 0===r||r,l=this.state.filters;l[t].values=i,l[t].filtering=s,l[t].touched+=1,this.setState({filters:(0,u.Z)(l)}),this.props.updateFilters({title:n,values:i},t)}},{key:"addFilter",value:function(e){var t=this.state,n=t.filters,i=t.numCards,r={filtering:!0,numCards:i,touched:0};"status"===n[e].type&&(r.values=[].concat((0,u.Z)(n[e].categories),(0,u.Z)(n[e].statuses))),n[e]=(0,c.Z)((0,c.Z)({},n[e]),r),this.setState({filters:n,addingFilter:!1,numCards:i+1})}},{key:"resetAllFilters",value:function(){var e=this.state.filters.filter((function(e){return e.filtering})),t=this.state.filters.map((function(e){return(0,c.Z)((0,c.Z)({},e),{},{filtering:!1,values:[]})}));this.setState({filters:(0,u.Z)(t)});var n,i=(0,p.Z)(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;r.values&&this.props.updateFilters({title:r.display_title,values:[]},r.idx)}}catch(s){i.e(s)}finally{i.f()}}},{key:"removeFilter",value:function(e,t){var n=this.state.filters;n[e].filtering=!1,n[e].values=[],this.setState({filters:(0,u.Z)(n)}),this.props.updateFilters({title:t,values:[]},e)}},{key:"componentDidUpdate",value:function(e){var t=e.currentFilters,n=this.props.currentFilters;if(!me()(t,n)){var i=this.state.filters;for(var r in n)i[r]=(0,c.Z)((0,c.Z)((0,c.Z)({},i[r]),n[r]),{},{touched:i[r].touched+1,filtering:!0});i=i.map((function(e,t){var i=!(!n[t]&&0!==e.touched);return(0,c.Z)((0,c.Z)({},e),{},{filtering:i,values:i?e.values:[]})})),this.setState({filters:(0,u.Z)(i)})}}},{key:"render",value:function(){var e=this,t=this.getActiveFilters(),n=this.props.hiddenCols||[],i=this.state.filters.filter((function(e,t){return!e.filtering&&!n.includes(t)}));return(0,j.jsxs)("div",{className:"filterBox--container",children:[(0,j.jsx)("h4",{className:"section-header",children:this.state.toolName}),t.length>0&&t.map((function(t,n){return(0,j.jsx)(mt,{onFilterUpdate:function(n){return e.setFilter(n,t.idx)},title:t.display_title,removeFilter:function(){return e.removeFilter(t.idx,t.display_title)},filter:t},"".concat(e.props.toolName,"-").concat(t.display_title,"-").concat(t.numCards))})),i.length&&(0,j.jsx)(mt,{availableFilters:i,editable:"true",style:{marginBottom:20},addFilter:function(t){return e.addFilter(t)},onFilterUpdate:function(t){return e.setFilter(t)}})||void 0,(0,j.jsx)("br",{})]})}}]),n}(i.PureComponent),bt=setTimeout((function(){}),500),It=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;return(0,s.Z)(this,n),(i=t.call(this,e)).state={values:i.extractFilters()},e.resetFilterHook((function(){return i.resetIdFilters()})),i}return(0,l.Z)(n,[{key:"resetIdFilters",value:function(){this.setState({values:{}}),this.sendFilterUpdate({})}},{key:"sendFilterUpdate",value:function(e){this.props.updateFilters(e)}},{key:"extractFilters",value:function(){for(var e=0,t={},n=0,i=Object.keys(this.props.ids);n<i.length;n++){t[i[n]]=V(["filters",e++],"",this.props)}return t}},{key:"componentDidUpdate",value:function(e){if(!me()(this.props.filters,e.filters)){var t=this.extractFilters();this.setState({values:t})}}},{key:"render",value:function(){var e=this,t=this.props.ids||{};return(0,j.jsx)("div",{className:"filterBox--container",children:(0,j.jsxs)("div",{className:"filter-card",children:[(0,j.jsx)("div",{className:"filter-card--header",children:(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("h4",{className:"title",children:"Task filter"})})}),function(){var n=Object.entries(t).map((function(t){var n=(0,d.Z)(t,2),i=n[0],r=n[1],s=e.state.values[i]||"",l="text-task-".concat(i);return(0,j.jsxs)("div",{className:"task-id-filters",children:[(0,j.jsx)("label",{htmlFor:l,children:i}),(0,j.jsx)("br",{}),(0,j.jsx)("input",{type:"text",name:l,placeholder:r,value:s,onChange:function(t){var n=t.target.value;clearTimeout(bt);var r={values:(0,c.Z)((0,c.Z)({},e.state.values),{},(0,f.Z)({},i,n))};bt=setTimeout((function(){e.sendFilterUpdate((0,c.Z)((0,c.Z)({},e.state.values),{},(0,f.Z)({},i,n)))}),500),e.setState(r)}})]},l)}));return(0,j.jsx)("div",{className:"filter-card--body",children:n})}()]})})}}]),n}(i.PureComponent),Ct=n(6123),xt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;(0,s.Z)(this,n),i=t.call(this,e);var r=e.filtered;return i.listeners=[],i.resetFilterHook=function(e){return i.listeners.push(e)},i.state={filters:i.createFiltersFromReactTableStructure(r),idFilters:i.retrieveIdFilters(r)},i}return(0,l.Z)(n,[{key:"componentDidUpdate",value:function(e){me()(e.filtered,this.props.filtered)||this.setState({filters:this.createFiltersFromReactTableStructure(this.props.filtered),idFilters:this.retrieveIdFilters(this.props.filtered)})}},{key:"resetAllFilters",value:function(){this.resetAllContainers(),this.resetIdFilters()}},{key:"resetIdFilters",value:function(){this.setState({idFilters:null}),this.sendFilters({filter:this.state.filters,idFilter:null})}},{key:"resetAllContainers",value:function(){this.listeners.forEach((function(e){return e()}))}},{key:"retrieveIdFilters",value:function(e){var t=e.find((function(e){return"id"===e.id}));return t?t.values:[]}},{key:"createFiltersFromReactTableStructure",value:function(e){if(!e||!e.length)return[];var t,n=[],i=(0,p.Z)(e.flat());try{for(i.s();!(t=i.n()).done;){var r=t.value,s=r.id,l=r.value;if("id"!==s){var a=E(s),o=a.tool,c=a.name,u=a.column,d=n[o]||[];d[u]?d[u].values.push(l):d[u]={title:c,values:[l]},n[o]=d}}}catch(h){i.e(h)}finally{i.f()}return n}},{key:"flattenFilterStructure",value:function(){return Object.values(Object.values(this.state.filters))}},{key:"sendFilters",value:function(e){var t=e.filter,n=e.idFilter,i=(0,u.Z)(t.map((function(e,t){return null===e||void 0===e?null:e.map((function(e,n){return e.values.map((function(i){return{id:"".concat(t,"_").concat(e.title,"_").concat(n),value:i}}))}))})).flat(3).filter((function(e){return null!==e&&void 0!==e})));n&&n.length>0&&i.push({id:"id",values:n}),this.props.addTypeToFilter(i),this.props.setFilter(i,!0)}},{key:"updateFilters",value:function(e,t,n){var i=(0,u.Z)(this.state.filters),r=this.state.idFilters;i[e]=i[e]||[],i[e][t]=n,this.setState({filters:i}),this.sendFilters({filter:i,idFilter:r})}},{key:"updateIdFilters",value:function(e){var t=Object.keys(this.props.ids).map((function(t){return e[t]})),n=t.some((function(e){return""!==e&&!B(e)}))?t:void 0;this.setState({idFilters:n}),this.sendFilters({filter:this.state.filters,idFilter:n})}},{key:"render",value:function(){var e=this,t=this.props.hiddenCols||[];return(0,j.jsxs)("div",{className:Ct("filterBox",{"filterBox--hidden":!this.props.visible}),children:[(0,j.jsxs)("div",{className:"filterBox--header",children:[(0,j.jsx)(y.G,{icon:nt.YIN,className:"filterBox--header--icon",onClick:this.props.hide}),this.props.headerComponent,(0,j.jsx)(y.G,{icon:nt.$aW,className:"filterBox--header--reset-icon",onClick:function(){return e.resetAllFilters()}})]}),(0,j.jsxs)("div",{className:"filter-card--container",children:[(0,j.jsx)(It,{ids:this.props.ids,updateFilters:function(t){return e.updateIdFilters(t)},resetFilterHook:this.resetFilterHook,filters:this.state.idFilters}),this.props.filterable.map((function(n,i){return(0,j.jsx)(vt,{resetFilterHook:e.resetFilterHook,updateFilters:function(t,n){return e.updateFilters(i,n,t)},currentFilters:e.state.filters[i]||[],toolName:n.name,filters:n.columns,hiddenCols:t[i]},"filtercontainer-".concat(i))}))]})]})}}]),n}(i.PureComponent),yt=n(6123),Zt=n.n(yt),jt=n(9737),At=n.n(jt),Ft=n(7177),Wt=n.n(Ft),Nt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;return(0,s.Z)(this,n),(i=t.call(this,e)).prepareTextForRendering=function(){if(""!==i.props.yamlText){var e=Wt().parseDocument(i.props.yamlText,{prettyErrors:!0}),t=e.get("input_files");t&&(Array.isArray(t.items)?t.items.forEach((function(e){e.value=i.encloseFileInTags(e.value)})):e.set("input_files",i.encloseFileInTags(t)));var n=e.get("properties");n&&Array.isArray(n.items)&&n.items.forEach((function(e){Array.isArray(e.items)&&e.items.forEach((function(e){"property_file"===e.key.value&&(e.value.value=i.encloseFileInTags(e.value.value))}))})),i.setState({content:e})}},i.encloseFileInTags=function(e){return i.state.splitterTag+i.state.fileTag+e+i.state.fileTag+i.state.splitterTag},i.loadFileInViewer=function(e,t){e.preventDefault(),i.props.loadNewFile(t)},i.state={splitterTag:"<splitter#9d81y23>",fileTag:"<file#092nt43>",content:i.props.yamlText},i}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){this.prepareTextForRendering()}},{key:"componentDidUpdate",value:function(e){e.yamlText!==this.props.yamlText&&this.prepareTextForRendering()}},{key:"render",value:function(){var e=this;if(this.state.content.errors&&this.state.content.errors.length>0)return(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("div",{className:"link-overlay-text",children:["Errors parsing YAML file:",(0,j.jsx)("ul",{children:this.state.content.errors.map((function(e,t){return(0,j.jsx)("li",{children:(0,j.jsx)("pre",{children:e.message})},t)}))}),(0,j.jsx)("pre",{children:this.props.yamlText}),";"]})});Wt().scalarOptions.str.fold={lineWidth:0};var t=this.state.content.toString().split(this.state.splitterTag).map((function(t){return t.match("^".concat(e.state.fileTag,"(?:.)+").concat(e.state.fileTag,"$"))?(t=t.replace(new RegExp(e.state.fileTag,"g"),""),(0,j.jsx)("a",{onClick:function(n){return e.loadFileInViewer(n,t)},className:"link-overlay-file-link",href:e.props.createHref(t),children:t},t)):t}));return(0,j.jsx)("pre",{className:"link-overlay-text",children:t})}}]),n}(i.Component),Bt=n(1842);Bt.jQ({useWebWorkers:!1});var Gt={},Yt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var i;(0,s.Z)(this,n),(i=t.call(this,e)).loadNewFile=function(e){var t=i.createFileUrl(e);i.setState({isYAML:i.isYAMLFile(e),isSecondLevel:!0,content:"loading file: ".concat(t)}),i.loadFile(t)},i.loadOriginalFile=function(){i.setState({isYAML:i.isYAMLFile(i.props.link),isSecondLevel:!1,content:"loading file: ".concat(i.props.link),error:void 0}),i.loadFile(i.props.link)},i.loadOriginalFileIfEnter=function(e){"Enter"===e.key&&i.loadOriginalFile()},i.createFileUrl=function(e){return At().join(i.props.link,"../"+e)},i.loadFile=i.loadFileXMLHttpRequest,i.loadFileFromZip=function(e){var t=decodeURIComponent(e),n=t.lastIndexOf("/")>t.lastIndexOf("\\")?"/":"\\",r=t.lastIndexOf(n),s=t.substring(0,r)+".zip",l=t.split(n),a="".concat(l[l.length-2],"/").concat(l[l.length-1]);s in Gt?i.loadFileFromZipEntries(Gt[s],a,s):i.readZipArchive(s,a)},i.readZipArchive=function(e,t){new Bt.Mr(new Bt.R(e)).getEntries().then((function(n){i.handleZipEntries(n,t,e)}),(function(n){i.readZipArchiveNoHttpRange(e,t)}))},i.readZipArchiveNoHttpRange=function(e,t){new Bt.Mr(new Bt.pE(e)).getEntries().then((function(n){i.handleZipEntries(n,t,e)}),(function(n){i.readZipArchiveManually(e,t)}))},i.readZipArchiveManually=function(e,t){try{var n=new XMLHttpRequest;n.responseType="arraybuffer",n.addEventListener("load",(function(){var r=new Uint8Array(n.response);new Bt.Mr(new Bt.I8(r)).getEntries().then((function(n){return i.handleZipEntries(n,t,e)}),i.setError)}),!1),n.addEventListener("error",i.setError,!1),n.open("GET",e),n.send()}catch(r){i.setError('HTTP request for the file "'.concat(t,'" failed'),r)}},i.handleZipEntries=function(e,t,n){Gt[n]=e,i.loadFileFromZipEntries(e,t,n)},i.loadFileFromZipEntries=function(e,t,n){var r=e.find((function(e){return e.filename===t}));r?r.getData(new Bt.Ek).then((function(e){i.setState({content:e})})):i.setError('Could not find the file "'.concat(t,'" in "').concat(n,'"'))},i.setError=function(e,t){var n=t&&"string"===typeof t?t:e;i.setState({error:"".concat(n)})},i.handlePopState=function(){window.history.back(),window.addEventListener("click",i.props.close,!1)},i.renderHelpMessageForLocalLogs=function(){if("file:"!==window.location.protocol)return null;var e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("p",{children:["If you are using ",(0,j.jsx)("strong",{children:"Chrome"})," or a Chrome-based browser, try launching it with the command-line option"," ",(0,j.jsx)("strong",{children:(0,j.jsx)("code",{children:"--allow-file-access-from-files"})}),"."]}),(0,j.jsxs)("p",{children:["If you are using ",(0,j.jsx)("strong",{children:"Firefox"}),", please open the extended settings by entering ",(0,j.jsx)("code",{children:"about:config"})," in the URL bar, search for"," ",(0,j.jsx)("strong",{children:(0,j.jsx)("code",{children:"security.fileuri.strict_origin_policy"})})," ","and set this option to ",(0,j.jsx)("code",{children:"false"})," by double-clicking on it and restart your browser (",(0,j.jsx)("a",{href:"https://kb.mozillazine.org/Security.fileuri.strict_origin_policy",children:"more details"}),")."]}),(0,j.jsx)("p",{children:(0,j.jsx)("strong",{children:"Note that these settings will allow local web pages to access all of your files, so make sure to not open any untrusted local HTML documents."})})]}),t=new URL(i.state.currentFile,document.baseURI),n=function(e,t){var n=e.pathname.split("/"),i=t.pathname.split("/"),r=n.findIndex((function(e,t){return e!==i[t]}));return[n.slice(0,r).join("/"),n.slice(r).join("/")]}(window.location,t),r=(0,d.Z)(n,2),s=r[0],l=r[1];if(":"===window.location.pathname[2]){if(!s)return(0,j.jsxs)(j.Fragment,{children:[e,(0,j.jsx)("p",{children:"Alternatively, you can start a local web server serving the directories with the tables and result files, but for doing so you first need to make sure that table and result files are on the same partition."})]});"/"===s[0]&&(s=s.substring(1))}var a="127.0.0.1",o=8e3,c="http://".concat(a,":").concat(o,"/").concat(l).concat(window.location.hash);return(0,j.jsxs)(j.Fragment,{children:[e,(0,j.jsxs)("p",{children:["Alternatively, you can start a local web server serving the directories with the tables and result files.",(0,j.jsx)("br",{}),"To do so, execute the following command and then open"," ",(0,j.jsx)("a",{href:c,children:"this link"})," (adjust the port number ",o," if it is already used on your system):",(0,j.jsx)("br",{}),(0,j.jsx)(F,{children:(0,j.jsxs)("code",{children:["python3 -m http.server -b ",a," ",o," -d ",s||"/"]})})]})]})};var r=!!e.link&&i.isYAMLFile(e.link);return i.state={isYAML:r,content:"loading file: ".concat(e.link),currentFile:e.link,isSecondLevel:!1},i}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){this.loadFile(this.props.link),window.history.pushState({},"",""),window.addEventListener("popstate",this.props.close,!1)}},{key:"componentDidUpdate",value:function(){var e=document.getElementById("modal-container");e&&e.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("popstate",this.props.close,!1),window.removeEventListener("click",this.props.close,!1)}},{key:"isYAMLFile",value:function(e){return e.endsWith(".yml")}},{key:"loadFileFetch",value:function(){var e=(0,Ae.Z)((0,je.Z)().mark((function e(t){var n,i;return(0,je.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=19;break}return this.setState({currentFile:t}),e.prev=2,e.next=5,fetch(t);case 5:if(n=e.sent,!w(n.status)){e.next=13;break}return e.next=9,n.text();case 9:i=e.sent,this.setState({content:i}),e.next=14;break;case 13:throw Error("Received response status ".concat(n.status));case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),this.loadFileFromZip(t);case 19:case"end":return e.stop()}}),e,this,[[2,16]])})));return function(t){return e.apply(this,arguments)}}()},{key:"loadFileXMLHttpRequest",value:function(e){var t=this;if(e)try{this.setState({currentFile:e});var n=new XMLHttpRequest;n.addEventListener("load",(function(){if(w(n.status)){var i=n.responseText;t.setState({content:i})}else t.loadFileFromZip(e)})),n.addEventListener("error",(function(){return t.loadFileFromZip(e)})),n.open("GET",e),n.send()}catch(i){this.loadFileFromZip(e)}}},{key:"render",value:function(){var e=this;return tt().setAppElement(document.getElementById("root")),(0,j.jsxs)(tt(),{id:"modal-container",ariaHideApp:!1,className:Zt()("overlay",{"second-level":this.state.isSecondLevel}),isOpen:!0,onRequestClose:function(){return e.handlePopState()},children:[(0,j.jsxs)("div",{className:"link-overlay-header-container",children:[(0,j.jsx)(y.G,{icon:nt.YIN,onClick:function(){return e.handlePopState()},className:"closing"}),this.state.isSecondLevel?(0,j.jsxs)("span",{className:"link-overlay-back-button",tabIndex:"0",role:"button",onClick:this.loadOriginalFile,onKeyDown:this.loadOriginalFileIfEnter,children:[(0,j.jsx)(y.G,{className:"link-overlay-back-icon",icon:nt.acZ}),"Back to task definition"]}):""]}),this.state.error?(0,j.jsxs)("div",{className:"link-overlay-text",children:[(0,j.jsxs)("p",{style:{marginTop:"0"},children:["Error while loading content (",this.state.error,")."]}),(0,j.jsxs)("p",{children:["This could be a problem of the"," ",(0,j.jsx)("a",{href:"https://en.wikipedia.org/wiki/Same-origin_policy",children:"same-origin policy"})," ","of your browser."]}),this.renderHelpMessageForLocalLogs(),(0,j.jsxs)("p",{children:["You can also try to download the file:"," ",(0,j.jsx)("a",{href:this.state.currentFile,children:this.state.currentFile})]})]}):this.state.isYAML?(0,j.jsx)(Nt,{yamlText:this.state.content,createHref:this.createFileUrl,loadNewFile:this.loadNewFile}):(0,j.jsx)("pre",{className:"link-overlay-text",children:this.state.content})]})}}]),n}(i.Component),wt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(){var e;(0,s.Z)(this,n);for(var i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];return(e=t.call.apply(t,[this].concat(r))).render=function(){return(0,j.jsxs)("button",{className:e.props.className||"reset",onClick:e.props.onClick,disabled:B(e.props.enabled)?!e.props.isFiltered:!e.props.enabled,children:[(0,j.jsxs)("span",{children:["Showing ",(0,j.jsx)("span",{className:"highlight",children:e.props.filteredCount})," of"," "]}),(e.props.className||"").includes("tooltip")&&(0,j.jsx)("span",{className:"tooltiptext tooltip-bottom",children:"Open filter menu"}),e.props.totalCount," tasks",!(e.props.className||"").includes("header")&&(0,j.jsx)(y.G,{icon:nt.G_j,className:"filter-icon"})]})},e}return(0,l.Z)(n)}(i.Component);n(9e3);var St=[{key:"summary",title:"Summary",path:"/"},{key:"table",title:"Table",path:"/table"},{key:"quantile",title:"Quantile Plot",path:"/quantile"},{key:"scatter",title:"Scatter Plot",path:"/scatter"},{key:"info",title:"Info",path:"/info",icon:(0,j.jsx)(y.G,{icon:nt.Fuz})}],kt=function(){return(St.find((function(e){return e.path===document.location.hash.split("?")[0].substr(1)}))||{key:"summary"}).key},Vt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(e){var r;(0,s.Z)(this,n),(r=t.call(this,e)).addTypeToFilter=function(e){return e.filter((function(e){return"id"!==e.id})).forEach((function(e){var t=e.id.split("_"),n=(0,d.Z)(t,3),i=n[0],s=n[2],l=r.state.tools[i].columns[s].type;e.type=l}))},r.getFiltersFromUrl=function(){var e=r.filterUrlRetriever()||[];return r.addTypeToFilter(e),me()(r.lastFiltered,e)?null:e},r.updateFiltersFromUrl=function(){var e=r.getFiltersFromUrl();e&&(r.filteredData=r.runFilter(e),r.setState({tableData:r.filteredData,filtered:e}),r.lastFiltered=e)},r.updateState=function(){return r.setState({active:kt(),hiddenCols:ee(r.state.tools)})},r.toggleSelectColumns=function(e){e.stopPropagation(),r.setState((function(e){return{showSelectColumns:!e.showSelectColumns}}))},r.toggleLinkOverlay=function(e,t){e.preventDefault(),r.setState((function(e){return{showLinkOverlay:!e.showLinkOverlay,link:t}}))},r.setFilter=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.filteredData=t?e:e.map((function(e){return e._original}))},r.filterPlotData=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r.lastImmediate&&clearImmediate(r.lastImmediate),r.lastImmediate=setImmediate((function(){r.filterUrlSetter(e,{history:r.routerRef.current.history}),r.lastFiltered=e.filter((function(e){return e.values&&e.values.length>0||e.value}))})),t&&r.setFilter(r.runFilter(e),!0),r.setState({tableData:r.filteredData,filtered:e})},r.resetFilters=function(){r.setState({tableData:r.originalTable,filtered:[]})},r.findAllValuesOfColumn=function(e,t){return r.originalTools.map((function(n,i){return n.columns.map((function(s,l){if(e(n,s)){var a=r.originalTable.map((function(e){return t(e.results[i],e.results[i].values[l])})).filter(Boolean);return(0,u.Z)(new Set(a)).sort()}}))}))},r.getRowName=function(e){return e.id.filter((function(e){return e})).join(" | ")},r.getRelevantUrlParams=function(){return(document.location.href.split("?")[1]||"").split("&").filter((function(e){return e.startsWith("hidden")||e.startsWith("filter")})).join("&")},r.switchToQuantile=function(e){r.setState({quantilePreSelection:e});var t=r.getRelevantUrlParams();document.location.hash="#/quantile"+(t?"?"+t:"")};var l,a=function(e){var t=e.head,n=e.tools,i=e.rows,r=e.stats,s=e.props,l=e.initial;return{tableHeader:t,taskIdNames:t.task_id_names,tools:n.map((function(e,t){return(0,c.Z)((0,c.Z)({},e),{},{toolIdx:t,columns:e.columns.map((function(e,t){return(0,c.Z)((0,c.Z)({},e),{},{colIdx:t})})),scoreBased:i.every((function(e){return void 0!==e.results[t].score}))})})),columns:n.map((function(e){return e.columns.map((function(e){return e.title}))})),tableData:i,stats:r,properties:s,initial:l}}(e.data),o=a.tableHeader,h=a.taskIdNames,g=a.tools,f=a.columns,m=a.tableData,v=a.stats,I=a.initial;I&&!document.location.href.includes("#")&&(l=I,document.location.href=encodeURI("".concat(document.location.href,"#").concat(l)));var C=function(e){var t=e.tools,n=e.rows;return t.map((function(e,t){var i,r=e.tool,s=e.date,l=e.niceName,a="".concat(r," ").concat(s," ").concat(l),o=e.columns.map((function(e,t){if(e)return"status"===e.type?(i=t,(0,c.Z)((0,c.Z)({},e),{},{categories:{},statuses:{},idx:t})):"text"===e.type?(0,c.Z)((0,c.Z)({},e),{},{distincts:{},idx:t}):(0,c.Z)((0,c.Z)({},e),{},{min:1/0,max:-1/0,idx:t})}));B(i)||(o[i]=(0,c.Z)((0,c.Z)({},o[i]),{},{categories:{},statuses:{}}));var u,d=(0,p.Z)(n);try{for(d.s();!(u=d.n()).done;){var h=u.value.results[t];for(var g in B(i)||(o[i].categories["".concat(h.category," ")]=!0),h.values){var f=h.values[g].raw,m=o[g];m&&!B(f)&&("status"===m.type?m.statuses[f]=!0:"text"===m.type?m.distincts[f]=!0:(m.min=Math.min(m.min,Number(f)),m.max=Math.max(m.max,Number(f))))}}}catch(v){d.e(v)}finally{d.f()}return{name:a,columns:o.map((function(e){var t=e.distincts,n=e.categories,i=e.statuses,r=(0,b.Z)(e,ve);return t?(0,c.Z)((0,c.Z)({},r),{},{distincts:Object.keys(t)}):n?(0,c.Z)((0,c.Z)({},r),{},{categories:Object.keys(n),statuses:Object.keys(i)}):r}))}}))}(r.props.data);r.originalTable=m,r.originalTools=g,r.taskIdNames=h,r.columns=f,r.stats=v,r.tableHeader=o,r.filteredData=[],r.routerRef=i.createRef(),r.state={tools:g,tableData:m,filterable:C,showSelectColumns:!1,showLinkOverlay:!1,filtered:[],filterBoxVisible:!1,active:kt(),quantilePreSelection:g[0].columns[1],hiddenCols:ee(g)},r.statusValues=r.findAllValuesOfColumn((function(e,t){return"status"===t.type}),(function(e,t){return G(t)})),r.originalTools.forEach((function(e,t){return e.columns.filter((function(e){return"status"===e.type})).forEach((function(e,n){r.originalTable.some((function(e){return"empty"===e.results[t].category}))&&r.statusValues[t][n].push(be)}))})),r.categoryValues=r.findAllValuesOfColumn((function(e,t){return"status"===t.type}),(function(e,t){return e.category}));var x=r.categoryValues.map((function(e){return e&&e.map((function(e){return e&&e.map((function(e){return"".concat(e," ")}))}))}));r.filterUrlSetter=z(r.statusValues,x),r.filterUrlRetriever=function(e,t){var n=J({categoryValues:t,statusValues:e});return function(e){var t=X(e);return t.filter?n(t.filter):null}}(r.statusValues,x);var y=r.getFiltersFromUrl();return y&&(r.filteredData=r.runFilter(y),r.lastFiltered=y,r.state=(0,c.Z)((0,c.Z)({},r.state),{},{tableData:r.filteredData,filtered:y})),r}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){var e=this;this.removeHistoryListener=this.routerRef.current.history.listen((function(t,n){e.updateState(),"POP"===n&&e.updateFiltersFromUrl()}))}},{key:"componentWillUnmount",value:function(){this.removeHistoryListener()}},{key:"runFilter",value:function(e){var t=e.reduce((function(e,t){var n=t.id,i=t.value,r=t.type,s=t.values;if(B(i)&&B(s)||"string"===typeof i&&"all"===i.trim())return e;if("id"===n)return e.id={value:i,values:s},e;var l,a=E(n),o=a.tool,c=a.column;if("diff"===i)return e.diff||(e.diff=[]),e.diff.push({col:c}),e;if(e[o]||(e[o]={}),N({type:r})&&i.includes(":")){var u=i.split(":"),h=(0,d.Z)(u,2),g=h[0],p=h[1];l={min:g=""===g?-1/0:Number(g),max:p=""===p?1/0:Number(p)}}else l=" "===i[i.length-1]?{category:i.substr(0,i.length-1)}:"status"===r?{status:i}:{value:i};return e[o][c]||(e[o][c]=[]),e[o][c].push(l),e}),{});return Ie(t)(this.originalTable)}},{key:"render",value:function(){var e,t,n=this,i=function(e){var t=e.className,i=e.isReset,r=void 0!==i&&i,s=e.onClick,l=e.enabled;return(0,j.jsx)(wt,{className:t,showFilterText:r,onClick:s,enabled:l,isFiltered:!!n.state.filtered.length,resetFilters:n.resetFilters,filteredCount:n.state.tableData.length,totalCount:n.originalTable.length})},r=this.getRelevantUrlParams();return(0,j.jsx)(h.UT,{ref:this.routerRef,children:(0,j.jsxs)("div",{className:"overview",children:[(0,j.jsxs)("div",{className:"overview-container",children:[(0,j.jsx)(xt,{headerComponent:i({className:"filterBox--header--reset",isReset:!0,enabled:!1}),tableHeader:this.tableHeader,tools:this.state.tools,selectColumn:this.toggleSelectColumns,filterable:this.state.filterable,setFilter:this.filterPlotData,resetFilters:this.resetFilters,filtered:this.state.filtered,visible:this.state.filterBoxVisible,hiddenCols:this.state.hiddenCols,hide:function(){n.setState({filterBoxVisible:!1})},ids:(e=this.originalTable,t=this.taskIdNames,V(["0","id"],[],e).reduce((function(e,n,i){return(0,c.Z)((0,c.Z)({},e),{},(0,f.Z)({},t[i],n))}),{})),addTypeToFilter:this.addTypeToFilter}),(0,j.jsxs)("div",{className:"menu",children:[St.map((function(e){var t=e.key,i=e.title,s=e.path,l=e.icon;return(0,j.jsxs)(h.rU,{className:Zt()("menu-item",{selected:n.state.active===t}),to:s+(r?"?"+r:""),onClick:function(){return n.setState((function(){return{active:t}}))},children:[i," ",l||""]},s)})),i({className:"reset tooltip",enabled:!0,onClick:function(){n.setState({filterBoxVisible:!0})}})]}),(0,j.jsx)("div",{className:"route-container",children:(0,j.jsxs)(g.rs,{children:[(0,j.jsx)(g.AW,{exact:!0,path:"/",children:(0,j.jsx)(_e,{tools:this.state.tools,tableHeader:this.tableHeader,version:this.props.data.version,selectColumn:this.toggleSelectColumns,stats:this.stats,onStatsReady:this.props.onStatsReady,switchToQuantile:this.switchToQuantile,tableData:this.state.tableData,hiddenCols:this.state.hiddenCols,filtered:this.state.filtered.length>0})}),(0,j.jsx)(g.AW,{path:"/table",children:(0,j.jsx)(Ze,{tableData:this.state.tableData,tools:this.state.tools,selectColumn:this.toggleSelectColumns,filterPlotData:this.filterPlotData,filters:this.state.filtered,toggleLinkOverlay:this.toggleLinkOverlay,statusValues:this.statusValues,categoryValues:this.categoryValues,hiddenCols:this.state.hiddenCols,addTypeToFilter:this.addTypeToFilter})}),(0,j.jsx)(g.AW,{path:"/quantile",children:(0,j.jsx)(dt,{table:this.state.tableData,tools:this.state.tools,preSelection:this.state.quantilePreSelection,getRowName:this.getRowName,hiddenCols:this.state.hiddenCols,isFlexible:this.props.renderPlotsFlexible})}),(0,j.jsx)(g.AW,{path:"/scatter",children:(0,j.jsx)(ut,{table:this.state.tableData,columns:this.columns,tools:this.state.tools,getRowName:this.getRowName,hiddenCols:this.state.hiddenCols,isFlexible:this.props.renderPlotsFlexible})}),(0,j.jsx)(g.AW,{path:"/info",children:(0,j.jsx)($e,{version:this.props.data.version,selectColumn:this.toggleSelectColumns})})]})})]}),(0,j.jsxs)("div",{children:[this.state.showSelectColumns&&(0,j.jsx)(it,{close:this.toggleSelectColumns,currColumns:this.columns,tableHeader:this.tableHeader,tools:this.state.tools,hiddenCols:this.state.hiddenCols,history:this.routerRef.current.history}),this.state.showLinkOverlay&&(0,j.jsx)(Yt,{close:this.toggleLinkOverlay,link:this.state.link,toggleLinkOverlay:this.toggleLinkOverlay})]})]})})}}]),n}(i.Component);var Rt=function(e){(0,a.Z)(n,e);var t=(0,o.Z)(n);function n(){return(0,s.Z)(this,n),t.apply(this,arguments)}return(0,l.Z)(n,[{key:"render",value:function(){return(0,j.jsx)("div",{className:"App",children:(0,j.jsx)("main",{children:(0,j.jsx)(Vt,{data:window.data,renderPlotsFlexible:!0,onStatsReady:this.props.onStatsReady})})})}}]),n}(i.Component),Ht=Rt;r.render((0,j.jsx)(Ht,{}),document.getElementById("root")),document.getElementById("msg-container").remove()},4654:function(){}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=e,function(){var e=[];n.O=function(t,i,r,s){if(!i){var l=1/0;for(u=0;u<e.length;u++){i=e[u][0],r=e[u][1],s=e[u][2];for(var a=!0,o=0;o<i.length;o++)(!1&s||l>=s)&&Object.keys(n.O).every((function(e){return n.O[e](i[o])}))?i.splice(o--,1):(a=!1,s<l&&(l=s));if(a){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}s=s||0;for(var u=e.length;u>0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[i,r,s]}}(),n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e={179:0};n.O.j=function(t){return 0===e[t]};var t=function(t,i){var r,s,l=i[0],a=i[1],o=i[2],c=0;if(l.some((function(t){return 0!==e[t]}))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(o)var u=o(n)}for(t&&t(i);c<l.length;c++)s=l[c],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return n.O(u)},i=self.webpackChunkbenchexec_react_table=self.webpackChunkbenchexec_react_table||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))}();var i=n.O(void 0,[216],(function(){return n(7415)}));i=n.O(i)}();
\ No newline at end of file
diff --git a/benchexec/tablegenerator/react-table/src/components/FilterBox/FilterBox.js b/benchexec/tablegenerator/react-table/src/components/FilterBox/FilterBox.js
index 702059714..d4f629616 100644
--- a/benchexec/tablegenerator/react-table/src/components/FilterBox/FilterBox.js
+++ b/benchexec/tablegenerator/react-table/src/components/FilterBox/FilterBox.js
@@ -11,7 +11,7 @@ import TaskFilterCard from "./TaskFilterCard";
 import { faClose, faTrash } from "@fortawesome/free-solid-svg-icons";
 import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
 import equals from "deep-equal";
-import { isNil } from "../../utils/utils";
+import { decodeFilter, isNil } from "../../utils/utils";
 const classNames = require("classnames");
 
 export default class FilterBox extends React.PureComponent {
@@ -70,12 +70,12 @@ export default class FilterBox extends React.PureComponent {
       if (id === "id") {
         continue;
       }
-      const [tool, title, col] = id.split("_");
+      const {tool, name: title, column } = decodeFilter(id);
       const toolArr = out[tool] || [];
-      if (!toolArr[col]) {
-        toolArr[col] = { title, values: [value] };
+      if (!toolArr[column]) {
+        toolArr[column] = { title, values: [value] };
       } else {
-        toolArr[col].values.push(value);
+        toolArr[column].values.push(value);
       }
       out[tool] = toolArr;
     }
diff --git a/benchexec/tablegenerator/react-table/src/components/ReactTable.js b/benchexec/tablegenerator/react-table/src/components/ReactTable.js
index 6caaa20a2..0f1f44ba9 100644
--- a/benchexec/tablegenerator/react-table/src/components/ReactTable.js
+++ b/benchexec/tablegenerator/react-table/src/components/ReactTable.js
@@ -34,6 +34,7 @@ import {
   setHashSearch,
   getHashSearch,
   getHiddenColIds,
+  decodeFilter,
 } from "../utils/utils";
 import deepEqual from "deep-equal";
 import { statusForEmptyRows } from "../utils/filters";
@@ -168,7 +169,7 @@ const Table = (props) => {
     let additionalFilters = [];
 
     if (newFilter.type === "status") {
-      const [tool, name, column] = newFilter.id.split("_");
+      const { tool, name, column } = decodeFilter(newFilter.id);
       const value = newFilter.value;
 
       if (value.trim() === "all") {
@@ -629,7 +630,7 @@ const Table = (props) => {
       if (id === "id") {
         setDisableTaskText(!isNil(values));
       }
-      const [runset, , column] = id.split("_");
+      const {tool: runset, column} = decodeFilter(id);
       const currentRunsetFilters = newFilteredColumnValues[runset] || {};
 
       const isCategory =
diff --git a/benchexec/tablegenerator/react-table/src/utils/filters.js b/benchexec/tablegenerator/react-table/src/utils/filters.js
index ec64fbfda..3668a3919 100644
--- a/benchexec/tablegenerator/react-table/src/utils/filters.js
+++ b/benchexec/tablegenerator/react-table/src/utils/filters.js
@@ -5,7 +5,7 @@
 //
 // SPDX-License-Identifier: Apache-2.0
 
-import { isNil, getRawOrDefault, omit, isNumericColumn } from "./utils";
+import { isNil, getRawOrDefault, omit, isNumericColumn, decodeFilter } from "./utils";
 /* Status that will be used to identify whether empty rows should be shown. Currently,
    filtering for either categories or statuses creates filters for the other one as well.
    Since empty rows don't have a status, they will be filtered out all the time.
@@ -158,7 +158,7 @@ const buildMatcher = (filters) => {
       acc.id = { value, values };
       return acc;
     }
-    const [tool, , columnIdx] = id.split("_");
+    const { tool, column: columnIdx } = decodeFilter(id);
     if (value === "diff") {
       // this branch is noop as of now
       if (!acc.diff) {
diff --git a/benchexec/tablegenerator/react-table/src/utils/utils.js b/benchexec/tablegenerator/react-table/src/utils/utils.js
index 6151435e4..8f2afd8ac 100644
--- a/benchexec/tablegenerator/react-table/src/utils/utils.js
+++ b/benchexec/tablegenerator/react-table/src/utils/utils.js
@@ -352,6 +352,22 @@ function makeStatusColumnFilter(
   return statusColumnFilter.join(",");
 }
 
+/** 
+  * Function to decode a filter ID string from the URL into its parts
+  * @param {String} filterID - The filter ID to be decoded
+  * @returns {Object} The decoded filter ID
+  * @throws {Error} If the filter ID is invalid
+  */
+export const decodeFilter = (filterID) => {
+  const splitedArray = filterID.split("_");
+  if (splitedArray.length !== 3) throw new Error("Invalid filter ID");
+  return {
+    tool: splitedArray[0],
+    name: splitedArray[1],
+    column: splitedArray[2]
+  };
+}
+
 const makeFilterSerializer =
   ({ statusValues: allStatusValues, categoryValues: allCategoryValues }) =>
   (filter) => {
@@ -368,7 +384,7 @@ const makeFilterSerializer =
         }
         continue;
       }
-      const [tool, name, column] = id.split("_");
+      const { tool, name, column } = decodeFilter(id);
       const toolBucket = groupedFilters[tool] || {};
       const columnBucket = toolBucket[column] || { name: escape(name) };
 


Test patch:
diff --git a/benchexec/tablegenerator/react-table/src/tests/utils.test.js b/benchexec/tablegenerator/react-table/src/tests/utils.test.js
index 925a39d7f..fda8fc585 100644
--- a/benchexec/tablegenerator/react-table/src/tests/utils.test.js
+++ b/benchexec/tablegenerator/react-table/src/tests/utils.test.js
@@ -16,6 +16,7 @@ import {
   makeFilterSerializer,
   makeFilterDeserializer,
   splitUrlPathForMatchingPrefix,
+  decodeFilter
 } from "../utils/utils";
 
 describe("isStatusOk", () => {
@@ -118,6 +119,26 @@ describe("hashRouting helpers", () => {
     });
   });
 });
+
+describe("decodeFilter", () => {
+  test("should decode filter correctly", () => {
+    const filter = "0_cputime_1";
+    const expected = { tool: 0, name: "cputime", column: 1 };
+    expect(decodeFilter(filter)).toEqual(expected);
+  });
+
+  test("should handle empty filters", () => {
+    const filter = "__";
+    const expected = { tool: "", name: "", column: "" };
+    expect(decodeFilter(filter)).toEqual(expected);
+  });
+
+  test("should throw errors if there are not exactly two '_' in the filter id", () => {
+    expect(() => decodeFilter("0_cputime")).toThrow();
+    expect(() => decodeFilter("0_cputime_1_2")).toThrow();
+  });
+})
+
 describe("serialization", () => {
   let serializer;
   const statusValues = [