From e8fca472504fa5fbdc47aa132c9a7da6a83fca1c Mon Sep 17 00:00:00 2001 From: EshaanAgg <96648934+EshaanAgg@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:16:12 +0530 Subject: [PATCH] update tests and build app --- .../react-table/build/main.min.js | 2 +- .../react-table/src/tests/utils.test.js | 22 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/benchexec/tablegenerator/react-table/build/main.min.js b/benchexec/tablegenerator/react-table/build/main.min.js index f3ce92314..dd5f80617 100644 --- a/benchexec/tablegenerator/react-table/build/main.min.js +++ b/benchexec/tablegenerator/react-table/build/main.min.js @@ -1 +1 @@ -!function(){var e={170:function(e,t,n){"use strict";var i=n(7313),r=n(1168),s=n(1413),l=n(3433),a=n(5671),o=n(3144),c=n(136),u=n(7277),d=n(2135),h=n(8467),f=n(7762),g=n(9439),p=n(4942),m=n(5110),v=n(8567),b=n(4925),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,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this,e)).childRef=i.createRef(),r}return(0,o.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),N="##########",W=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},w=function(e,t){var n=G(e,"").toLowerCase(),i=G(t,"").toLowerCase();return""===n?1:""===i?-1:n>i?1:n1?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,f.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[decodeURI(o)]="filter"===o?c.join("="):decodeURI(c.join("="))}}catch(u){l.e(u)}finally{l.f()}return s},K=function(e){return Object.keys(e).filter((function(t){return void 0!==e[t]&&null!==e[t]})).map((function(t){return"".concat(t,"=").concat(e[t])})).join("&")},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=X(e),i=(0,s.Z)((0,s.Z)({},n),t),r=K(i),l=e.split("?")[0];return{newUrl:r.length>0?"".concat(l,"?").concat(r):l,queryString:"?".concat(r)}},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=L(window.location.href,e),i=n.newUrl;if(window.history.pushState({},"",i),t&&t.length>0){var r,s=(0,f.Z)(t);try{for(s.s();!(r=s.n()).done;){var l=r.value;l()}}catch(a){s.e(a)}finally{s.f()}}window.location.href=i},U=function(e){for(var t=[],n=0,i=Object.entries(e);n2&&void 0!==arguments[2]&&arguments[2],i={};if(e.length>Math.floor(t.length/2)){var r,s=[],l=(0,f.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 U(i)};function E(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,f=h&&a.length!==c.length;if(u){if(d){var g=D(l,o);s.push("status(".concat(g,")"))}h||s.push("category(empty())")}if(h&&(u||s.push("status(empty())"),f)){var p=D(a,c,!0);s.push("category(".concat(p,")"))}return s.join(",")}function P(e){if("string"!==typeof e)throw new Error("Invalid value type");return e.replaceAll("(","%28").replaceAll(")","%29")}var M,J=function(e){if("string"!==typeof e)throw new Error("Invalid value type for converting to RegExp");return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"ui")},_=function(e){if("string"!==typeof e)throw new Error("Invalid filter ID");var t=e.split("_");if(2===t.length)throw new Error("Invalid filter ID");return{tool:t[0],name:t.length>2?t.slice(1,-1).join("_"):void 0,column:t.length>2?t.at(-1):void 0}},z=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={},r=0,s="",l=(0,f.Z)(e);try{for(l.s();!(t=l.n()).done;){var a=t.value;if("("!==a){if(")"!==a)0!==r||","!==a?s+=a:s="";else if(s+=a,0===--r){var o=s.indexOf("("),c=s.substr(0,o),u=s.substr(o+1,s.length-1-(o+1));i[c]=n?decodeURIComponent(u):u}}else s+=a,r++}}catch(d){l.e(d)}finally{l.f()}return i},Q=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=z(t),a=[],o=0,c=Object.entries(s);o0?r.ids={values:u.map((function(e){return e||""}))}:d&&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((function(e){return P(encodeURIComponent(e))})).join(","),"))")),s&&s.forEach((function(e){F.push("id_any(value(".concat(P(encodeURIComponent(e.value)),"))"))}));for(var N=0,W=Object.entries(j);N0&&F.push("".concat(G,"(").concat(Y.join(","),")"))}return F.join(",")}}({statusValues:e,categoryValues:t});return function(e,t){if(!e)return O({filter:void 0},t);var i=n(e);return O(i?{filter:i}:{filter:void 0},t)}},ee=" ",te=" ",ne=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unknown";(0,a.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,o.Z)(e,[{key:"addDataItem",value:function(e){var t=this.format(e).split(/\.|,/),n=(0,g.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,g.Z)(o,2),u=c[0],d=c[1],h=0;u.includes(".")&&(h=1),t=Number(e).toFixed(Number(d)+h)}for(var f=t.replace(/,/,".").indexOf(".");sr;){var p=t[r];if("."===p||","===p)n+=".",a=!0;else{if(!l){if("0"===p){r+=1,a&&(n+=p);continue}l=!0}n+=p,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,g.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.length1&&void 0!==arguments[1]?arguments[1]:{},i=(0,s.Z)((0,s.Z)({},e._defaultOptions),n),r=i.whitespaceFormat,l=i.html,a=i.leadingZero,o=i.additionalFormatting,c={significantDigits:e.significantDigits,maxDecimalInputLength:e.maxNegativeDecimalPosition};if(B(e.significantDigits))return o(t.toString(),c);var u=e.format(t);if("NaN"===(u=o(u,c)))return u;if(r){var d=l?ee:" ",h=u.split(/\.|,/),f=(0,g.Z)(h,2),p=f[0],m=f[1];"0"!==p||a||(p=m?"":"0"),p=p||"";for(var v=(m=m||"")?".":d;m.length=d&&I<=h}if(s)break}}catch(C){o.e(C)}finally{o.f()}if(!s)return!1}return!0}));return c}},Ze=(M={},(0,p.Z)(M,"empty","Empty rows"),(0,p.Z)(M,"aborted","\u2014"),M),je=[50,100,250,500,1e3,2500],Ae=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]}})):[]},Fe=function(e){var t=(0,i.useState)(!0),n=(0,g.Z)(t,2),r=n[0],a=n[1],o=(0,i.useState)(me()),c=(0,g.Z)(o,2),u=c[0],d=c[1],p=(0,i.useState)({}),b=(0,g.Z)(p,2),I=b[0],C=b[1],x=(0,i.useState)(!1),y=(0,g.Z)(x,2),Z=y[0],A=y[1],F=function(t){"id"===t.id&&(t.isTableTabFilter=!0);var n=[].concat((0,l.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),s=r.tool,a=r.name,o=r.column,c=t.value;if("all"===c.trim())i=function(t){var n,i=t.tool,r=t.name,s=t.column,l=[],a=(0,f.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,f.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: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,f.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:a,column:o,isCategory:" "===c[c.length-1]})}e.addTypeToFilter(i),e.filterPlotData([].concat((0,l.Z)(n),(0,l.Z)(i)),!0)};function Y(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,g.Z)(o,2),u=c[0],d=c[1],h=(0,i.useState)(a),f=(0,g.Z)(h,2),p=f[0],m=f[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:p,onChange:function(e){var t=e.target.value;m(t),clearTimeout(u),d(setTimeout((function(){F({id:n,value:t}),document.getElementById(s).focus()}),500))},disabled:"id"===n&&Z,type:"search"})}function S(t){var n=t.column,i=n.id,r=(n.filter,t.runSetIdx),s=t.columnIdx,a=e.categoryValues[r][s],o=function(e){var t=e.categoryFilters,n=e.statusFilters,i=e.categoryFilterValues,r=e.statusFilterValues,s=[];return se(t,i)||(s=t),se(n,r)||(s=[].concat((0,l.Z)(s),(0,l.Z)(n))),s}({categoryFilters:k([r,"categories"],[],u),statusFilters:k([r,s],[],u),categoryFilterValues:a.map((function(e){return"".concat(e," ")})),statusFilterValues:e.statusValues[r][s]}),c=0===o.length,d=o.length>1||o[0]===N,h=o&&o[0],f=(c?"all ":d&&"multiple")||h;return(0,j.jsxs)("select",{className:"filter-field",onChange:function(e){return F({id:i,value:e.target.value})},value:f,children:[d&&(0,j.jsx)("option",{value:"multiple",disabled:!0,children:o.map((function(e){return e.trim()})).filter((function(e){return"all"!==e&&e!==N})).join(", ")||"No filters selected"}),(0,j.jsx)("option",{value:"all ",children:"Show all"}),a.filter((function(e){return e in Ze})).map((function(e){return(0,j.jsx)("option",{value:e+" ",children:Ze[e]},e)})),(0,j.jsx)("optgroup",{label:"Category",children:a.filter((function(e){return!(e in Ze)})).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!==xe})).sort().map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))})]})}function R(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,g.Z)(o,2),u=c[0],d=c[1],h=(0,i.useState)(a),f=(0,g.Z)(h,2),p=f[0],m=f[1];return(0,j.jsx)("input",{id:s,className:"filter-field",placeholder:"Min:Max",defaultValue:p,onChange:function(e){var t=e.target.value;m(t),clearTimeout(u),d(setTimeout((function(){F({id:n,value:t}),document.getElementById(s).focus()}),500))},type:"search",pattern:"([+-]?[0-9]*(\\.[0-9]*)?)(:[+-]?[0-9]*(\\.[0-9]*)?)?"})}var H=(0,i.useCallback)((function(t){return(0,j.jsx)(Y,(0,s.Z)((0,s.Z)({disableTaskText:Z},t),{},{currFilters:e.filters}))}),[Z,e.filters]),T=(0,i.useCallback)((function(t){return(0,j.jsx)(R,(0,s.Z)((0,s.Z)({},t),{},{currFilters:e.filters}))}),[e.filters]),K=(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),l=I[r];return{id:r,Header:(0,j.jsx)(fe,{column:n}),className:"reg-column",hidden:e.hiddenCols[t].includes(n.colIdx),minWidth:50,width:l||V(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)(pe,{cell:n,href:s,className:r,toggleLinkOverlay:e.toggleLinkOverlay,title:i,force:!0})},sortType:function(e,t,n,i){return w(e.values[n],t.values[n])},filter:function(e){return e},Filter:function(e){return(0,j.jsx)(S,(0,s.Z)((0,s.Z)({},e),{},{runSetIdx:t,columnIdx:i}))}}}(t,n,i);var r="".concat(t,"_").concat(n.display_title,"_").concat(i),l=I[r],a=W(n)?T:H;return{id:r,Header:(0,j.jsx)(fe,{column:n}),className:"reg-column",hidden:e.hiddenCols[t].includes(n.colIdx),minWidth:50,width:l||V(n),accessor:function(e){return e.results[t].values[i]},Cell:function(t){return(0,j.jsx)(pe,{cell:t,toggleLinkOverlay:e.toggleLinkOverlay})},filter:function(e){return e},Filter:a,sortType:function(e,t,i,r){return W(n)?(s=e.values[i],l=t.values[i],G(s,1/0)-G(l,1/0)):w(e.values[i],t.values[i]);var s,l}}},n=e.tools.map((function(e,n){return ve(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 a(t.checked)}})]})})})},className:"fixed-task",id:"task-id-column",sticky:r?"left":"",columns:[(0,s.Z)((0,s.Z)({width:.3*window.innerWidth,minWidth:230},I.id&&{width:I.id}),{},{Header:(0,j.jsx)(fe,{children:(0,j.jsx)(he,{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:H,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:r0&&C((0,s.Z)((0,s.Z)({},I),e))}),[ge,I]),(0,i.useEffect)((function(){A(e.filters.some((function(e){var t=e.id,n=e.values;return"id"===t&&!B(n)})));var t=me();Ie()(t,u)||d(t),ce>=ee&&te(ee-1)}),[e.filters,u,te,ce,ee]);var be=(0,h.TH)();(0,i.useEffect)((function(e){re(X().pageSize||250),le(Ae()),te(X().page-1||0)}),[be,re,le,te,window.location.href]);var Ce=function(e){return(0,j.jsx)("div",(0,s.Z)((0,s.Z)({className:"tr headergroup"},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return(0,j.jsxs)("div",(0,s.Z)((0,s.Z)({},e.getHeaderProps({className:"th header ".concat(e.headers?"outer ":"").concat(e.className)})),{},{children:[(0,j.jsx)("div",(0,s.Z)((0,s.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,s.Z)((0,s.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,s.Z)((0,s.Z)({className:"table-container"},E()),{},{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:[Ce(t),(0,j.jsxs)("div",{className:"shadow-container",children:[e.slice(1).map(Ce),n.map((function(e){return(0,j.jsx)("div",(0,s.Z)((0,s.Z)({className:"tr headergroup filter"},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return(0,j.jsx)("div",(0,s.Z)((0,s.Z)({},e.getHeaderProps({className:"th header filter ".concat(e.headers?"outer ":"").concat(e.className)})),{},{children:e.canFilter?e.render("Filter"):null}))}))}))}))]})]})}(M),(0,j.jsx)("div",(0,s.Z)((0,s.Z)({},P()),{},{className:"table-body body",children:z.map((function(e){return J(e),(0,j.jsx)("div",(0,s.Z)((0,s.Z)({},e.getRowProps()),{},{className:"tr",children:e.cells.map((function(e){return(0,j.jsx)("div",(0,s.Z)((0,s.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 ie()},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(ce)+1,onChange:function(e){return te(Number(e.target.value)-1)}}),"of ",$.length]}),(0,j.jsx)("div",{id:"set-page-element",className:"pagination-element",children:(0,j.jsx)("select",{value:ue,onChange:function(e){return re(Number(e.target.value))},children:je.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 ne()},className:"pagination-element button".concat(q?"":" disabled"),children:"Next"})," "]})]})]})})},Ne=n(4165),We=n(5861);n(9e3);var Be=[],Ge={},we=1,Ye=[{template:"data:text/plain;base64,Ly8gVGhpcyBmaWxlIGlzIHBhcnQgb2YgQmVuY2hFeGVjLCBhIGZyYW1ld29yayBmb3IgcmVsaWFibGUgYmVuY2htYXJraW5nOgovLyBodHRwczovL2dpdGh1Yi5jb20vc29zeS1sYWIvYmVuY2hleGVjCi8vCi8vIFNQRFgtRmlsZUNvcHlyaWdodFRleHQ6IDIwMTktMjAyMCBEaXJrIEJleWVyIDxodHRwczovL3d3dy5zb3N5LWxhYi5vcmc+Ci8vCi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wCg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IGluIHRlc3RzCiAgaWYgKHRoaXMubW9ja2VkUG9zdE1lc3NhZ2UpIHsKICAgIHRoaXMubW9ja2VkUG9zdE1lc3NhZ2UoeyByZXN1bHQsIHRyYW5zYWN0aW9uIH0pOwogICAgcmV0dXJuOwogIH0KICBwb3N0TWVzc2FnZSh7IHJlc3VsdCwgdHJhbnNhY3Rpb24gfSk7Cn07Cg==",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=Ge[i];t.busy=!1,s(r),delete Ge[i]}(e,i)},r.push(i)},l=0;l=s.length)break;r.push(c),a=s[++l]}}catch(d){o.e(d)}finally{o.f()}return r})),e.abrupt("return",Te(r).map((function(e){var t=e.content.map((function(t,n){return a[n].map((function(t){return t[e.id]}))}));return(0,s.Z)((0,s.Z)({},e),{},{content:t})})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ke=function(e){return e.map((function(e,t){return e.columns.map((function(e,n){var i=e.number_of_significant_digits;return new ne(i,"".concat(t,"-").concat(n))}))}))},Le=function(e,t,n){return function(n,i){var r=i.significantDigits,s=Number(n),l=n.split("."),a=(0,g.Z)(l,2),o=a[0],c=a[1];if(["sum","avg","stdev"].includes(e)){var u,d;if(B(r)&&"sum"!==e)return s.toFixed(2);var h=o.replace(/^0+/,""),f=c||"";""===h&&(f=f.replace(/^0+/,""));var p=t-(null!==(u=null===c||void 0===c?void 0:c.length)&&void 0!==u?u:0),m=r-(h.length+f.length),v=m>0,b=(null!==(d=null===c||void 0===c?void 0:c.length)&&void 0!==d?d:0)+m;if(p>0&&v&&"stdev"!==e)return p>m?s.toFixed(b):s.toFixed(t);if("avg"===e&&!v&&p<0&&"0"===n[n.length-1])return s.toFixed(t);if("stdev"===e&&v)return s.toFixed(b)}return n}},Oe=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,f.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,ke),s={};if(void 0!==r.total){for(var l=0,a=Object.entries(r);l0){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,l.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,o.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,g.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,O(t),this.props.updateParentStateOnClose()}},{key:"setHiddenColsForTool",value:function(e,t){this.setState((function(n){return{hiddenCols:(0,s.Z)((0,s.Z)({},n.hiddenCols),{},(0,p.Z)({},e,t))}}))}},{key:"render",value:function(){var e=this;rt().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)(rt(),{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:st.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),at=(n(8350),n(9468)),ot=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"}):""]})]})},ct=function(e){return(0,j.jsx)("button",{className:"setting-button",onClick:function(){return e()},children:"Reset plot"})},ut=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,g.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 dt(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 ht=n(4391),ft=n.n(ht),gt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.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=ft().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=dt(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 O({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,l.Z)(e));return t<3?3:t},i.findMinValue=function(e){var t=Math.min.apply(Math,(0,l.Z)(e));return t>2?1:t},i.renderRegressionLine=function(e){var t=i.prepareRegressionLineData(e);return(0,j.jsx)(at.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)(at.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,g.Z)(r,2),l=s[0],a=s[1];return n={},(0,p.Z)(n,"data".concat(t),e),(0,p.Z)(n,"tool".concat(t),l),(0,p.Z)(n,"column".concat(t),a),(0,p.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,g.Z)(r,2),l=s[0],a=s[1];a=a.replace("___","-"),O((n={},(0,p.Z)(n,"tool".concat(t),l),(0,p.Z)(n,"column".concat(t),a),n))},i.swapAxes=function(){i.array=[],O({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,o.Z)(n,[{key:"setup",value:function(){var e,t,n,i=H(this.props.tools[0])+" "+this.props.columns[0][1],r=(0,s.Z)((0,s.Z)({},this.defaultValues),X()),l=r.results,a=r.scaling,o=r.toolX,c=r.toolY,u=r.columnX,d=r.columnY,h=r.line,f=r.regression;if(B(o)||B(u)){var p=re(this.props.tools,this.props.hiddenCols),m=(0,g.Z)(p,2),v=m[0],b=m[1];n=void 0===v,o=v,e="".concat(v,"-").concat(b)}else n=!1,e="".concat(o,"-").concat(u);if(B(c)||B(d)){var I=re(this.props.tools,this.props.hiddenCols),C=(0,g.Z)(I,2),x=C[0],y=C[1];n=void 0===x,c=x,t="".concat(x,"-").concat(y)}else n=!1,t="".concat(c,"-").concat(d);var Z={dataX:e,dataY:t,results:l,scaling:a,regression:f,toolX:0,toolY:0,line:h,columnX:1,columnY:1,nameX:i,nameY:i,value:!1,areAllColsHidden:n};return e&&!n&&(Z=(0,s.Z)((0,s.Z)({},Z),this.extractAxisInfoByName(e,"X"))),t&&!n&&(Z=(0,s.Z)((0,s.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,p.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:[ut("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:st.Ssp,onClick:function(){return e.swapAxes()}})}),ut("Y-Axis",this.state.dataY,(function(t){return e.setAxis(t,"Y")}),t)]}),(0,j.jsxs)("div",{className:"settings-subcontainer",children:[ot("Scaling",this.state.scaling,(function(e){return O({scaling:e.target.value})}),this.scalingOptions),ot("Results",this.state.results,(function(e){return O({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:ut("Aux. Lines",this.state.line,(function(e){return O({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.jsxs)("div",{className:"settings-subcontainer",children:[ot("Regression",this.state.regression,(function(t){e.checkForNumericalSelections()?O({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),ct((function(){return O({columnX:null,columnY:null,line:null,regression:null,results:null,scaling:null,toolX:null,toolY:null})}))]})]})})}},{key:"renderRegressionAndConfidenceIntervals",value:function(){var e=dt(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?at.wu:at.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,s.Z)((0,s.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)(at.pW,{yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(at.xL,{yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(at.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)(at.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)(at.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)(at.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)(at.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)(at.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)(at.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),pt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.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)(at.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)(at.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,p.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,o.Z)(n,[{key:"setPlotData",value:function(){var e=this,t=X(),n=(0,s.Z)((0,s.Z)({},this.defaultValues),t),i=n.selection,r=n.plot,l=n.scaling,a=n.results,o=i,c=this.props.tools.map((function(e){return e.toolIdx})).join(""),u=new RegExp("runset-["+c+"]"),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 o&&i&&o!==i&&O({selection:i}),{selection:i,plot:r,scaling:l,results:a,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=re(this.props.tools,this.props.hiddenCols),i=(0,g.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=re(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,s.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 O({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()})]})]}),ot("Plot",this.state.plot,(function(e){return O({plot:e.target.value})}),this.plotOptions)]}),(0,j.jsxs)("div",{className:"settings-subcontainer",children:[ot("Scaling",this.state.scaling,(function(e){return O({scaling:e.target.value})}),this.scalingOptions),ot("Results",this.state.results,(function(e){return O({results:e.target.value})}),this.resultsOptions,t,this.state.isResultSelectionDisabled),ct((function(){return O({selection:null,plot:null,scaling:null,results:null})}))]})]})}),(0,j.jsx)("div",{children:(0,j.jsx)(at.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?at.wu:at.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,s.Z)((0,s.Z)({margin:{left:90},yType:this.handleType()},t),{},{children:[(0,j.jsx)(at.pW,{}),(0,j.jsx)(at.xL,{}),(0,j.jsx)(at.Kc,{tickFormat:function(e){return e}}),(0,j.jsx)(at.B2,{tickFormat:function(e){return e}}),this.state.value?(0,j.jsx)(at.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),mt=n(3014),vt=(n(8995),(0,mt.u7)(mt.ZP.Range)),bt=500,It=setTimeout((function(){}),bt),Ct=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;(0,a.Z)(this,n),i=t.call(this,e);var r=e.filter||{values:[]},s=r.values,l=r.min,o=r.max,c=r.type,u=r.number_of_significant_digits,d=0,h=0;if("measure"===c||"number"===c){var f=new ne(u).build();d=f(l),h=f(o);var g=s&&s[0];if(g&&g.includes(":")){var p=i.handleMinMaxValue(g,u);d=p.min,h=p.max}}return i.state={title:e.availableFilters&&e.availableFilters.length?e.availableFilters[0].title:"",values:[],idx:k(["availableFilters",0,"idx"],0,e),active:!0,selectedDistincts:[],sliderMin:d,sliderMax:h,numericMin:null,numericMax:null},i}return(0,o.Z)(n,[{key:"sendFilterUpdate",value:function(e){var t=this.props.filter,n=t.type,i=t.categories;i&&i.includes("empty ")&&!e.includes(xe)&&(e=e.concat(xe)),0===e.length&&"status"===n?this.props.onFilterUpdate({values:[N],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,g.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 ne(t).build(),i=this.props.filter||{min:0,max:1/0},r=i.min,s=i.max,l=e.split(":"),a=(0,g.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,a=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:a,onChange:function(t){var n=t.target.value;-1!==n&&(e.setState({idx:-1,active:!0}),a.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:st.$aW,onClick:function(){e.props.removeFilter()}})]})})}(this.props.name,r),function(t){if(!t)return null;var n,r=t.title,s=t.type,a=t.number_of_significant_digits,o=t.categories,c=t.statuses,u=t.values,d=void 0===u?[]:u,h=t.min,f=t.max,p=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:p,checked:d.includes("empty "),onChange:function(t){var n="empty ";if(t.target.checked){var i=[].concat((0,l.Z)(d),[n]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(n,d);e.setState({values:r}),e.sendFilterUpdate(r)}}})]}),"Category",(0,j.jsx)("ul",{className:"filter-card--body--list",children:o.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:d.includes(t),ref:n,onChange:function(n){if(n.target.checked){var i=[].concat((0,l.Z)(d),[t]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(t,d);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:c.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:d.includes(t),onChange:function(n){if(n.target.checked){var i=[].concat((0,l.Z)(d),[t]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(t,d);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,g.Z)(d,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(It),e.setState({values:[n]}),It=setTimeout((function(){e.sendFilterUpdate([n])}),bt)}})}else{var v=new ne(a).build();h=v(h),f=v(f);var b=le(h),I=le(f),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:h}),(0,j.jsx)("b",{children:f})]}),(0,j.jsx)(vt,{min:Number(h),max:Number(f),step:C,defaultValue:[Number(h),Number(f)],value:[Number(e.state.sliderMin),Number(e.state.sliderMax)],onChange:function(t){var n=(0,g.Z)(t,2),i=n[0],r=n[1];e.setState({sliderMin:v(i),sliderMax:v(r)})},onAfterChange:function(t){var n=(0,g.Z)(t,2),i=n[0],r=n[1],s=v(i),l=v(r),a=s===h?"":s,o=l===f?"":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(h,f)}),bt)}}),(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(h,f)}),bt)}})]})]})}return(0,j.jsx)("div",{className:"filter-card--body",children:n})}(this.props.filter)]})}}]),n}(i.PureComponent),xt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;(0,a.Z)(this,n),i=t.call(this,e);var r=e.filters,l=e.toolName,o=e.currentFilters;for(var c in o)r[c]=(0,s.Z)((0,s.Z)((0,s.Z)({},r[c]),o[c]),{},{touched:r[c].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,o.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,a=this.state.filters;a[t].values=i,a[t].filtering=s,a[t].touched+=1,this.setState({filters:(0,l.Z)(a)}),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,l.Z)(n[e].categories),(0,l.Z)(n[e].statuses))),n[e]=(0,s.Z)((0,s.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,s.Z)((0,s.Z)({},e),{},{filtering:!1,values:[]})}));this.setState({filters:(0,l.Z)(t)});var n,i=(0,f.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(a){i.e(a)}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,l.Z)(n)}),this.props.updateFilters({title:t,values:[]},e)}},{key:"componentDidUpdate",value:function(e){var t=e.currentFilters,n=this.props.currentFilters;if(!Ie()(t,n)){var i=this.state.filters;for(var r in n)i[r]=(0,s.Z)((0,s.Z)((0,s.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,s.Z)((0,s.Z)({},e),{},{filtering:i,values:i?e.values:[]})})),this.setState({filters:(0,l.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)(Ct,{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)(Ct,{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),yt=setTimeout((function(){}),500),Zt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,e)).state={values:i.extractFilters()},e.resetFilterHook((function(){return i.resetIdFilters()})),i}return(0,o.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);n0&&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,l.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:jt("filterBox",{"filterBox--hidden":!this.props.visible}),children:[(0,j.jsxs)("div",{className:"filterBox--header",children:[(0,j.jsx)(y.G,{icon:st.YIN,className:"filterBox--header--icon",onClick:this.props.hide}),this.props.headerComponent,(0,j.jsx)(y.G,{icon:st.$aW,className:"filterBox--header--reset-icon",onClick:function(){return e.resetAllFilters()}})]}),(0,j.jsxs)("div",{className:"filter-card--container",children:[(0,j.jsx)(Zt,{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)(xt,{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),Ft=function(e){var t=(0,h.TH)();return(0,i.useMemo)((function(){e.updateState(),e.updateFiltersFromUrl()}),[t]),null},Nt=n(6123),Wt=n.n(Nt),Bt=n(9737),Gt=n.n(Bt),wt=n(7177),Yt=n.n(wt),St=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,e)).prepareTextForRendering=function(){if(""!==i.props.yamlText){var e=Yt().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:"",fileTag:"",content:i.props.yamlText},i}return(0,o.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}),";"]})});Yt().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),Vt=n(1842);Vt.jQ({useWebWorkers:!1});var kt={},Rt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;(0,a.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 Gt().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 kt?i.loadFileFromZipEntries(kt[s],a,s):i.readZipArchive(s,a)},i.readZipArchive=function(e,t){new Vt.Mr(new Vt.R(e)).getEntries().then((function(n){i.handleZipEntries(n,t,e)}),(function(n){i.readZipArchiveNoHttpRange(e,t)}))},i.readZipArchiveNoHttpRange=function(e,t){new Vt.Mr(new Vt.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 Vt.Mr(new Vt.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){kt[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 Vt.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,g.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,o.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,We.Z)((0,Ne.Z)().mark((function e(t){var n,i;return(0,Ne.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,!Y(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(Y(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 rt().setAppElement(document.getElementById("root")),(0,j.jsxs)(rt(),{id:"modal-container",ariaHideApp:!1,className:Wt()("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:st.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:st.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)(St,{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),Ht=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;(0,a.Z)(this,n);for(var i=arguments.length,r=new Array(i),s=0;s1&&void 0!==arguments[1]&&arguments[1];i.filteredData=t?e:e.map((function(e){return e._original}))},i.filterPlotData=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];i.lastImmediate&&clearImmediate(i.lastImmediate),i.lastImmediate=setImmediate((function(){i.filterUrlSetter(e,[i.updateFiltersFromUrl,i.updateState]),i.lastFiltered=e.filter((function(e){return e.values&&e.values.length>0||e.value}))})),t&&i.setFilter(i.runFilter(e),!0),i.setState({tableData:i.filteredData,filtered:e})},i.resetFilters=function(){i.setState({tableData:i.originalTable,filtered:[]})},i.findAllValuesOfColumn=function(e,t){return i.originalTools.map((function(n,r){return n.columns.map((function(s,a){if(e(n,s)){var o=i.originalTable.map((function(e){return t(e.results[r],e.results[r].values[a])})).filter(Boolean);return(0,l.Z)(new Set(o)).sort()}}))}))},i.getRowName=function(e){return e.id.filter((function(e){return e})).join(" | ")},i.getRelevantUrlParams=function(){return(document.location.href.split("?")[1]||"").split("&").filter((function(e){return e.startsWith("hidden")||e.startsWith("filter")})).join("&")},i.switchToQuantile=function(e){i.setState({quantilePreSelection:e});var t=i.getRelevantUrlParams();document.location.hash="#/quantile"+(t?"?"+t:"")};var r,o=function(e){var t=e.head,n=e.tools,i=e.rows,r=e.stats,l=e.props,a=e.initial;return{tableHeader:t,taskIdNames:t.task_id_names,tools:n.map((function(e,t){return(0,s.Z)((0,s.Z)({},e),{},{toolIdx:t,columns:e.columns.map((function(e,t){return(0,s.Z)((0,s.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:l,initial:a}}(e.data),c=o.tableHeader,u=o.taskIdNames,d=o.tools,h=o.columns,g=o.tableData,p=o.stats,m=o.initial;m&&!document.location.href.includes("#")&&(r=m,document.location.href=encodeURI("".concat(document.location.href,"#").concat(r)));var v=function(e){var t=e.tools,n=e.rows;return t.map((function(e,t){var i,r=e.tool,l=e.date,a=e.niceName,o="".concat(r," ").concat(l," ").concat(a),c=e.columns.map((function(e,t){if(e)return"status"===e.type?(i=t,(0,s.Z)((0,s.Z)({},e),{},{categories:{},statuses:{},idx:t})):"text"===e.type?(0,s.Z)((0,s.Z)({},e),{},{distincts:{},idx:t}):(0,s.Z)((0,s.Z)({},e),{},{min:1/0,max:-1/0,idx:t})}));B(i)||(c[i]=(0,s.Z)((0,s.Z)({},c[i]),{},{categories:{},statuses:{}}));var u,d=(0,f.Z)(n);try{for(d.s();!(u=d.n()).done;){var h=u.value.results[t];for(var g in B(i)||(c[i].categories["".concat(h.category," ")]=!0),h.values){var p=h.values[g].raw,m=c[g];m&&!B(p)&&("status"===m.type?m.statuses[p]=!0:"text"===m.type?m.distincts[p]=!0:(m.min=Math.min(m.min,Number(p)),m.max=Math.max(m.max,Number(p))))}}}catch(v){d.e(v)}finally{d.f()}return{name:o,columns:c.map((function(e){var t=e.distincts,n=e.categories,i=e.statuses,r=(0,b.Z)(e,Ce);return t?(0,s.Z)((0,s.Z)({},r),{},{distincts:Object.keys(t)}):n?(0,s.Z)((0,s.Z)({},r),{},{categories:Object.keys(n),statuses:Object.keys(i)}):r}))}}))}(i.props.data);i.originalTable=g,i.originalTools=d,i.taskIdNames=u,i.columns=h,i.stats=p,i.tableHeader=c,i.filteredData=[],i.state={tools:d,tableData:g,filterable:v,showSelectColumns:!1,showLinkOverlay:!1,filtered:[],filterBoxVisible:!1,active:Xt(),quantilePreSelection:d[0].columns[1],hiddenCols:ie(d),mounted:!1},i.statusValues=i.findAllValuesOfColumn((function(e,t){return"status"===t.type}),(function(e,t){return G(t)})),i.originalTools.forEach((function(e,t){return e.columns.filter((function(e){return"status"===e.type})).forEach((function(e,n){i.originalTable.some((function(e){return"empty"===e.results[t].category}))&&i.statusValues[t][n].push(xe)}))})),i.categoryValues=i.findAllValuesOfColumn((function(e,t){return"status"===t.type}),(function(e,t){return e.category}));var I=i.categoryValues.map((function(e){return e&&e.map((function(e){return e&&e.map((function(e){return"".concat(e," ")}))}))}));i.filterUrlSetter=$(i.statusValues,I),i.filterUrlRetriever=function(e,t){var n=q({categoryValues:t,statusValues:e});return function(e){var t=X(e);return t.filter?n(t.filter):null}}(i.statusValues,I);var C=i.getFiltersFromUrl();return C&&(i.filteredData=i.runFilter(C),i.lastFiltered=C,i.state=(0,s.Z)((0,s.Z)({},i.state),{},{tableData:i.filteredData,filtered:C})),i}return(0,o.Z)(n,[{key:"componentDidMount",value:function(){this.updateFiltersFromUrl(),this.setState({mounted:!0}),this.updateState()}},{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),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]={}),W({type:r})&&i.includes(":")){var u=i.split(":"),d=(0,g.Z)(u,2),h=d[0],f=d[1];l={min:h=""===h?-1/0:Number(h),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[o][c]||(e[o][c]=[]),e[o][c].push(l),e}),{});return ye(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)(Ht,{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)(d.UT,{children:(0,j.jsxs)("div",{className:"overview",children:[(0,j.jsxs)("div",{className:"overview-container",children:[(0,j.jsx)(At,{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,k(["0","id"],[],e).reduce((function(e,n,i){return(0,s.Z)((0,s.Z)({},e),{},(0,p.Z)({},t[i],n))}),{})),addTypeToFilter:this.addTypeToFilter}),(0,j.jsxs)("div",{className:"menu",children:[Tt.map((function(e){var t=e.key,i=e.title,s=e.path,l=e.icon;return(0,j.jsxs)(d.rU,{className:Wt()("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.jsxs)("div",{className:"route-container",children:[this.state.mounted&&(0,j.jsx)(Ft,{updateState:this.updateState,updateFiltersFromUrl:this.updateFiltersFromUrl}),(0,j.jsxs)(h.Z5,{children:[(0,j.jsx)(h.AW,{path:"/",element:(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)(h.AW,{path:"/table",element:(0,j.jsx)(Fe,{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)(h.AW,{path:"/quantile",element:(0,j.jsx)(pt,{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)(h.AW,{path:"/scatter",element:(0,j.jsx)(gt,{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)(h.AW,{path:"/info",element:(0,j.jsx)(nt,{version:this.props.data.version,selectColumn:this.toggleSelectColumns})})]})]})]}),(0,j.jsxs)("div",{children:[this.state.showSelectColumns&&(0,j.jsx)(lt,{close:this.toggleSelectColumns,currColumns:this.columns,tableHeader:this.tableHeader,tools:this.state.tools,hiddenCols:this.state.hiddenCols,updateParentStateOnClose:function(){n.updateState(),n.updateFiltersFromUrl()}}),this.state.showLinkOverlay&&(0,j.jsx)(Rt,{close:this.toggleLinkOverlay,link:this.state.link,toggleLinkOverlay:this.toggleLinkOverlay})]})]})})}}]),n}(i.Component);var Lt=function(e){return""===window.location.hash&&(window.location.hash="#/"),(0,j.jsx)("div",{className:"App",children:(0,j.jsx)("main",{children:(0,j.jsx)(Kt,{data:window.data,renderPlotsFlexible:!0,onStatsReady:e.onStatsReady})})})};r.render((0,j.jsx)(Lt,{}),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=s)&&Object.keys(n.O).every((function(e){return n.O[e](i[o])}))?i.splice(o--,1):(a=!1,s0&&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},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(i,r){if(1&r&&(i=this(i)),8&r)return i;if("object"===typeof i&&i){if(4&r&&i.__esModule)return i;if(16&r&&"function"===typeof i.then)return i}var s=Object.create(null);n.r(s);var l={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&i;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){l[e]=function(){return i[e]}}));return l.default=function(){return i},n.d(s,l),s}}(),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);ci?1:n1?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,f.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[decodeURI(o)]="filter"===o?c.join("="):decodeURI(c.join("="))}}catch(u){l.e(u)}finally{l.f()}return s},K=function(e){return Object.keys(e).filter((function(t){return void 0!==e[t]&&null!==e[t]})).map((function(t){return"".concat(t,"=").concat(e[t])})).join("&")},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=X(e),i=(0,s.Z)((0,s.Z)({},n),t),r=K(i),l=e.split("?")[0];return{newUrl:r.length>0?"".concat(l,"?").concat(r):l,queryString:"?".concat(r)}},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=L(window.location.href,e),i=n.newUrl;if(window.history.pushState({},"",i),t&&t.length>0){var r,s=(0,f.Z)(t);try{for(s.s();!(r=s.n()).done;){var l=r.value;l()}}catch(a){s.e(a)}finally{s.f()}}window.location.href=i},U=function(e){for(var t=[],n=0,i=Object.entries(e);n2&&void 0!==arguments[2]&&arguments[2],i={};if(e.length>Math.floor(t.length/2)){var r,s=[],l=(0,f.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 U(i)};function E(e,t,n,i,r){var s=[],l=e.statusValues,a=e.categoryValues,o=t[n][i],c=r[n][i],u=!!l,d=!!a;if(u){var h=D(l,o);s.push("status(".concat(h,")")),d||s.push("category(empty())")}if(d){u||s.push("status(empty())");var f=D(a,c,!0);s.push("category(".concat(f,")"))}return s.join(",")}function P(e){if("string"!==typeof e)throw new Error("Invalid value type");return e.replaceAll("(","%28").replaceAll(")","%29")}var M,J=function(e){if("string"!==typeof e)throw new Error("Invalid value type for converting to RegExp");return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"ui")},_=function(e){if("string"!==typeof e)throw new Error("Invalid filter ID");var t=e.split("_");if(2===t.length)throw new Error("Invalid filter ID");return{tool:t[0],name:t.length>2?t.slice(1,-1).join("_"):void 0,column:t.length>2?t.at(-1):void 0}},z=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={},r=0,s="",l=(0,f.Z)(e);try{for(l.s();!(t=l.n()).done;){var a=t.value;if("("!==a){if(")"!==a)0!==r||","!==a?s+=a:s="";else if(s+=a,0===--r){var o=s.indexOf("("),c=s.substr(0,o),u=s.substr(o+1,s.length-1-(o+1));i[c]=n?decodeURIComponent(u):u}}else s+=a,r++}}catch(d){l.e(d)}finally{l.f()}return i},Q=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=z(t),a=[],o=0,c=Object.entries(s);o0?r.ids={values:u.map((function(e){return e||""}))}:d&&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((function(e){return P(encodeURIComponent(e))})).join(","),"))")),s&&s.forEach((function(e){F.push("id_any(value(".concat(P(encodeURIComponent(e.value)),"))"))}));for(var N=0,W=Object.entries(j);N0&&F.push("".concat(G,"(").concat(Y.join(","),")"))}return F.join(",")}}({statusValues:e,categoryValues:t});return function(e,t){if(!e)return O({filter:void 0},t);var i=n(e);return O(i?{filter:i}:{filter:void 0},t)}},ee=" ",te=" ",ne=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unknown";(0,a.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,o.Z)(e,[{key:"addDataItem",value:function(e){var t=this.format(e).split(/\.|,/),n=(0,g.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,g.Z)(o,2),u=c[0],d=c[1],h=0;u.includes(".")&&(h=1),t=Number(e).toFixed(Number(d)+h)}for(var f=t.replace(/,/,".").indexOf(".");sr;){var p=t[r];if("."===p||","===p)n+=".",a=!0;else{if(!l){if("0"===p){r+=1,a&&(n+=p);continue}l=!0}n+=p,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,g.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.length1&&void 0!==arguments[1]?arguments[1]:{},i=(0,s.Z)((0,s.Z)({},e._defaultOptions),n),r=i.whitespaceFormat,l=i.html,a=i.leadingZero,o=i.additionalFormatting,c={significantDigits:e.significantDigits,maxDecimalInputLength:e.maxNegativeDecimalPosition};if(B(e.significantDigits))return o(t.toString(),c);var u=e.format(t);if("NaN"===(u=o(u,c)))return u;if(r){var d=l?ee:" ",h=u.split(/\.|,/),f=(0,g.Z)(h,2),p=f[0],m=f[1];"0"!==p||a||(p=m?"":"0"),p=p||"";for(var v=(m=m||"")?".":d;m.length=d&&I<=h}if(s)break}}catch(C){o.e(C)}finally{o.f()}if(!s)return!1}return!0}));return c}},Ze=(M={},(0,p.Z)(M,"empty","Empty rows"),(0,p.Z)(M,"aborted","\u2014"),M),je=[50,100,250,500,1e3,2500],Ae=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]}})):[]},Fe=function(e){var t=(0,i.useState)(!0),n=(0,g.Z)(t,2),r=n[0],a=n[1],o=(0,i.useState)(me()),c=(0,g.Z)(o,2),u=c[0],d=c[1],p=(0,i.useState)({}),b=(0,g.Z)(p,2),I=b[0],C=b[1],x=(0,i.useState)(!1),y=(0,g.Z)(x,2),Z=y[0],A=y[1],F=function(t){"id"===t.id&&(t.isTableTabFilter=!0);var n=[].concat((0,l.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),s=r.tool,a=r.name,o=r.column,c=t.value;if("all"===c.trim())i=function(t){var n,i=t.tool,r=t.name,s=t.column,l=[],a=(0,f.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,f.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: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,f.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:a,column:o,isCategory:" "===c[c.length-1]})}e.addTypeToFilter(i),e.filterPlotData([].concat((0,l.Z)(n),(0,l.Z)(i)),!0)};function Y(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,g.Z)(o,2),u=c[0],d=c[1],h=(0,i.useState)(a),f=(0,g.Z)(h,2),p=f[0],m=f[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:p,onChange:function(e){var t=e.target.value;m(t),clearTimeout(u),d(setTimeout((function(){F({id:n,value:t}),document.getElementById(s).focus()}),500))},disabled:"id"===n&&Z,type:"search"})}function S(t){var n=t.column,i=n.id,r=(n.filter,t.runSetIdx),s=t.columnIdx,a=e.categoryValues[r][s],o=function(e){var t=e.categoryFilters,n=e.statusFilters,i=e.categoryFilterValues,r=e.statusFilterValues,s=[];return se(t,i)||(s=t),se(n,r)||(s=[].concat((0,l.Z)(s),(0,l.Z)(n))),s}({categoryFilters:k([r,"categories"],[],u),statusFilters:k([r,s],[],u),categoryFilterValues:a.map((function(e){return"".concat(e," ")})),statusFilterValues:e.statusValues[r][s]}),c=0===o.length,d=o.length>1||o[0]===N,h=o&&o[0],f=(c?"all ":d&&"multiple")||h;return(0,j.jsxs)("select",{className:"filter-field",onChange:function(e){return F({id:i,value:e.target.value})},value:f,children:[d&&(0,j.jsx)("option",{value:"multiple",disabled:!0,children:o.map((function(e){return e.trim()})).filter((function(e){return"all"!==e&&e!==N})).join(", ")||"No filters selected"}),(0,j.jsx)("option",{value:"all ",children:"Show all"}),a.filter((function(e){return e in Ze})).map((function(e){return(0,j.jsx)("option",{value:e+" ",children:Ze[e]},e)})),(0,j.jsx)("optgroup",{label:"Category",children:a.filter((function(e){return!(e in Ze)})).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!==xe})).sort().map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))})]})}function R(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,g.Z)(o,2),u=c[0],d=c[1],h=(0,i.useState)(a),f=(0,g.Z)(h,2),p=f[0],m=f[1];return(0,j.jsx)("input",{id:s,className:"filter-field",placeholder:"Min:Max",defaultValue:p,onChange:function(e){var t=e.target.value;m(t),clearTimeout(u),d(setTimeout((function(){F({id:n,value:t}),document.getElementById(s).focus()}),500))},type:"search",pattern:"([+-]?[0-9]*(\\.[0-9]*)?)(:[+-]?[0-9]*(\\.[0-9]*)?)?"})}var H=(0,i.useCallback)((function(t){return(0,j.jsx)(Y,(0,s.Z)((0,s.Z)({disableTaskText:Z},t),{},{currFilters:e.filters}))}),[Z,e.filters]),T=(0,i.useCallback)((function(t){return(0,j.jsx)(R,(0,s.Z)((0,s.Z)({},t),{},{currFilters:e.filters}))}),[e.filters]),K=(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),l=I[r];return{id:r,Header:(0,j.jsx)(fe,{column:n}),className:"reg-column",hidden:e.hiddenCols[t].includes(n.colIdx),minWidth:50,width:l||V(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)(pe,{cell:n,href:s,className:r,toggleLinkOverlay:e.toggleLinkOverlay,title:i,force:!0})},sortType:function(e,t,n,i){return w(e.values[n],t.values[n])},filter:function(e){return e},Filter:function(e){return(0,j.jsx)(S,(0,s.Z)((0,s.Z)({},e),{},{runSetIdx:t,columnIdx:i}))}}}(t,n,i);var r="".concat(t,"_").concat(n.display_title,"_").concat(i),l=I[r],a=W(n)?T:H;return{id:r,Header:(0,j.jsx)(fe,{column:n}),className:"reg-column",hidden:e.hiddenCols[t].includes(n.colIdx),minWidth:50,width:l||V(n),accessor:function(e){return e.results[t].values[i]},Cell:function(t){return(0,j.jsx)(pe,{cell:t,toggleLinkOverlay:e.toggleLinkOverlay})},filter:function(e){return e},Filter:a,sortType:function(e,t,i,r){return W(n)?(s=e.values[i],l=t.values[i],G(s,1/0)-G(l,1/0)):w(e.values[i],t.values[i]);var s,l}}},n=e.tools.map((function(e,n){return ve(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 a(t.checked)}})]})})})},className:"fixed-task",id:"task-id-column",sticky:r?"left":"",columns:[(0,s.Z)((0,s.Z)({width:.3*window.innerWidth,minWidth:230},I.id&&{width:I.id}),{},{Header:(0,j.jsx)(fe,{children:(0,j.jsx)(he,{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:H,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:r0&&C((0,s.Z)((0,s.Z)({},I),e))}),[ge,I]),(0,i.useEffect)((function(){A(e.filters.some((function(e){var t=e.id,n=e.values;return"id"===t&&!B(n)})));var t=me();Ie()(t,u)||d(t),ce>=ee&&te(ee-1)}),[e.filters,u,te,ce,ee]);var be=(0,h.TH)();(0,i.useEffect)((function(e){re(X().pageSize||250),le(Ae()),te(X().page-1||0)}),[be,re,le,te,window.location.href]);var Ce=function(e){return(0,j.jsx)("div",(0,s.Z)((0,s.Z)({className:"tr headergroup"},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return(0,j.jsxs)("div",(0,s.Z)((0,s.Z)({},e.getHeaderProps({className:"th header ".concat(e.headers?"outer ":"").concat(e.className)})),{},{children:[(0,j.jsx)("div",(0,s.Z)((0,s.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,s.Z)((0,s.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,s.Z)((0,s.Z)({className:"table-container"},E()),{},{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:[Ce(t),(0,j.jsxs)("div",{className:"shadow-container",children:[e.slice(1).map(Ce),n.map((function(e){return(0,j.jsx)("div",(0,s.Z)((0,s.Z)({className:"tr headergroup filter"},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return(0,j.jsx)("div",(0,s.Z)((0,s.Z)({},e.getHeaderProps({className:"th header filter ".concat(e.headers?"outer ":"").concat(e.className)})),{},{children:e.canFilter?e.render("Filter"):null}))}))}))}))]})]})}(M),(0,j.jsx)("div",(0,s.Z)((0,s.Z)({},P()),{},{className:"table-body body",children:z.map((function(e){return J(e),(0,j.jsx)("div",(0,s.Z)((0,s.Z)({},e.getRowProps()),{},{className:"tr",children:e.cells.map((function(e){return(0,j.jsx)("div",(0,s.Z)((0,s.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 ie()},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(ce)+1,onChange:function(e){return te(Number(e.target.value)-1)}}),"of ",$.length]}),(0,j.jsx)("div",{id:"set-page-element",className:"pagination-element",children:(0,j.jsx)("select",{value:ue,onChange:function(e){return re(Number(e.target.value))},children:je.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 ne()},className:"pagination-element button".concat(q?"":" disabled"),children:"Next"})," "]})]})]})})},Ne=n(4165),We=n(5861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ldCwgdmFsdWVzXSBvZiBPYmplY3QuZW50cmllcyhidWNrZXRzKSkgewogICAgaWYgKHNob3VsZFNraXBCdWNrZXQoYnVja2V0TmFOSW5mbywgYnVja2V0KSkgewogICAgICBmb3IgKGNvbnN0IFtrZXksIHZhbF0gb2YgT2JqZWN0LmVudHJpZXModmFsdWVzKSkgewogICAgICAgIHZhbHVlc1trZXldID0gdmFsLnRvU3RyaW5nKCk7CiAgICAgIH0KICAgICAgYnVja2V0c1tidWNrZXRdID0gdmFsdWVzOwogICAgICBjb250aW51ZTsKICAgIH0KICAgIGNvbnN0IHZhbHVlc0hhdmVOZWdJbmYgPSBOdW1iZXIodmFsdWVzLm1pbikgPT09IC1JbmZpbml0eTsKICAgIGNvbnN0IHZhbHVlc0hhdmVQb3NJbmYgPSBOdW1iZXIodG90YWwubWF4KSA9PT0gSW5maW5pdHk7CiAgICB2YWx1ZXMuc3RkZXYgPSBjYWxjdWxhdGVTdGRldigKICAgICAgdmFsdWVzSGF2ZU5lZ0luZiwKICAgICAgdmFsdWVzSGF2ZVBvc0luZiwKICAgICAgdmFsdWVzLnZhcmlhbmNlLAogICAgICB2YWx1ZXMuaXRlbXMubGVuZ3RoLAogICAgKTsKCiAgICBmb3IgKGNvbnN0IFtrZXksIHZhbF0gb2YgT2JqZWN0LmVudHJpZXModmFsdWVzKSkgewogICAgICBpZiAoa2V5ID09PSAibWV0YSIpIHsKICAgICAgICBjb250aW51ZTsKICAgICAgfQogICAgICB2YWx1ZXNba2V5XSA9IHZhbC50b1N0cmluZygpOwogICAgfQogICAgLy8gY2xlYXJpbmcgbWVtb3J5CiAgICBkZWxldGUgdmFsdWVzLml0ZW1zOwogICAgZGVsZXRlIHZhbHVlcy52YXJpYW5jZTsKICAgIGJ1Y2tldHNbYnVja2V0XSA9IHZhbHVlczsKICB9CgogIGZvciAoY29uc3QgW2tleSwgdmFsdWVdIG9mIE9iamVjdC5lbnRyaWVzKHRvdGFsKSkgewogICAgaWYgKGtleSA9PT0gIm1ldGEiKSB7CiAgICAgIGNvbnRpbnVlOwogICAgfQogICAgdG90YWxba2V5XSA9IHZhbHVlLnRvU3RyaW5nKCk7CiAgfQoKICBkZWxldGUgdG90YWwuaXRlbXM7CiAgZGVsZXRlIHRvdGFsLnZhcmlhbmNlOwoKICBjb25zdCByZXN1bHQgPSB7IGNvbHVtblR5cGUsIHRvdGFsLCAuLi5idWNrZXRzIH07CiAgcG9zdFJlc3VsdChyZXN1bHQsIHRyYW5zYWN0aW9uKTsKfTsKCmNvbnN0IHBvc3RSZXN1bHQgPSAocmVzdWx0LCB0cmFuc2FjdGlvbikgPT4gewogIC8vIGhhbmRsaW5nIGluIHRlc3RzCiAgaWYgKHRoaXMubW9ja2VkUG9zdE1lc3NhZ2UpIHsKICAgIHRoaXMubW9ja2VkUG9zdE1lc3NhZ2UoeyByZXN1bHQsIHRyYW5zYWN0aW9uIH0pOwogICAgcmV0dXJuOwogIH0KICBwb3N0TWVzc2FnZSh7IHJlc3VsdCwgdHJhbnNhY3Rpb24gfSk7Cn07Cg==",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=Ge[i];t.busy=!1,s(r),delete Ge[i]}(e,i)},r.push(i)},l=0;l=s.length)break;r.push(c),a=s[++l]}}catch(d){o.e(d)}finally{o.f()}return r})),e.abrupt("return",Te(r).map((function(e){var t=e.content.map((function(t,n){return a[n].map((function(t){return t[e.id]}))}));return(0,s.Z)((0,s.Z)({},e),{},{content:t})})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ke=function(e){return e.map((function(e,t){return e.columns.map((function(e,n){var i=e.number_of_significant_digits;return new ne(i,"".concat(t,"-").concat(n))}))}))},Le=function(e,t,n){return function(n,i){var r=i.significantDigits,s=Number(n),l=n.split("."),a=(0,g.Z)(l,2),o=a[0],c=a[1];if(["sum","avg","stdev"].includes(e)){var u,d;if(B(r)&&"sum"!==e)return s.toFixed(2);var h=o.replace(/^0+/,""),f=c||"";""===h&&(f=f.replace(/^0+/,""));var p=t-(null!==(u=null===c||void 0===c?void 0:c.length)&&void 0!==u?u:0),m=r-(h.length+f.length),v=m>0,b=(null!==(d=null===c||void 0===c?void 0:c.length)&&void 0!==d?d:0)+m;if(p>0&&v&&"stdev"!==e)return p>m?s.toFixed(b):s.toFixed(t);if("avg"===e&&!v&&p<0&&"0"===n[n.length-1])return s.toFixed(t);if("stdev"===e&&v)return s.toFixed(b)}return n}},Oe=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,f.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,ke),s={};if(void 0!==r.total){for(var l=0,a=Object.entries(r);l0){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,l.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,o.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,g.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,O(t),this.props.updateParentStateOnClose()}},{key:"setHiddenColsForTool",value:function(e,t){this.setState((function(n){return{hiddenCols:(0,s.Z)((0,s.Z)({},n.hiddenCols),{},(0,p.Z)({},e,t))}}))}},{key:"render",value:function(){var e=this;rt().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)(rt(),{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:st.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),at=(n(8350),n(9468)),ot=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"}):""]})]})},ct=function(e){return(0,j.jsx)("button",{className:"setting-button",onClick:function(){return e()},children:"Reset plot"})},ut=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,g.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 dt(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 ht=n(4391),ft=n.n(ht),gt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.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=ft().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=dt(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 O({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,l.Z)(e));return t<3?3:t},i.findMinValue=function(e){var t=Math.min.apply(Math,(0,l.Z)(e));return t>2?1:t},i.renderRegressionLine=function(e){var t=i.prepareRegressionLineData(e);return(0,j.jsx)(at.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)(at.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,g.Z)(r,2),l=s[0],a=s[1];return n={},(0,p.Z)(n,"data".concat(t),e),(0,p.Z)(n,"tool".concat(t),l),(0,p.Z)(n,"column".concat(t),a),(0,p.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,g.Z)(r,2),l=s[0],a=s[1];a=a.replace("___","-"),O((n={},(0,p.Z)(n,"tool".concat(t),l),(0,p.Z)(n,"column".concat(t),a),n))},i.swapAxes=function(){i.array=[],O({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,o.Z)(n,[{key:"setup",value:function(){var e,t,n,i=H(this.props.tools[0])+" "+this.props.columns[0][1],r=(0,s.Z)((0,s.Z)({},this.defaultValues),X()),l=r.results,a=r.scaling,o=r.toolX,c=r.toolY,u=r.columnX,d=r.columnY,h=r.line,f=r.regression;if(B(o)||B(u)){var p=re(this.props.tools,this.props.hiddenCols),m=(0,g.Z)(p,2),v=m[0],b=m[1];n=void 0===v,o=v,e="".concat(v,"-").concat(b)}else n=!1,e="".concat(o,"-").concat(u);if(B(c)||B(d)){var I=re(this.props.tools,this.props.hiddenCols),C=(0,g.Z)(I,2),x=C[0],y=C[1];n=void 0===x,c=x,t="".concat(x,"-").concat(y)}else n=!1,t="".concat(c,"-").concat(d);var Z={dataX:e,dataY:t,results:l,scaling:a,regression:f,toolX:0,toolY:0,line:h,columnX:1,columnY:1,nameX:i,nameY:i,value:!1,areAllColsHidden:n};return e&&!n&&(Z=(0,s.Z)((0,s.Z)({},Z),this.extractAxisInfoByName(e,"X"))),t&&!n&&(Z=(0,s.Z)((0,s.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,p.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:[ut("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:st.Ssp,onClick:function(){return e.swapAxes()}})}),ut("Y-Axis",this.state.dataY,(function(t){return e.setAxis(t,"Y")}),t)]}),(0,j.jsxs)("div",{className:"settings-subcontainer",children:[ot("Scaling",this.state.scaling,(function(e){return O({scaling:e.target.value})}),this.scalingOptions),ot("Results",this.state.results,(function(e){return O({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:ut("Aux. Lines",this.state.line,(function(e){return O({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.jsxs)("div",{className:"settings-subcontainer",children:[ot("Regression",this.state.regression,(function(t){e.checkForNumericalSelections()?O({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),ct((function(){return O({columnX:null,columnY:null,line:null,regression:null,results:null,scaling:null,toolX:null,toolY:null})}))]})]})})}},{key:"renderRegressionAndConfidenceIntervals",value:function(){var e=dt(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?at.wu:at.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,s.Z)((0,s.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)(at.pW,{yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(at.xL,{yType:this.handleType(this.state.toolY,this.state.columnY),xType:this.handleType(this.state.toolX,this.state.columnX)}),(0,j.jsx)(at.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)(at.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)(at.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)(at.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)(at.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)(at.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)(at.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),pt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.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)(at.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)(at.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,p.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,o.Z)(n,[{key:"setPlotData",value:function(){var e=this,t=X(),n=(0,s.Z)((0,s.Z)({},this.defaultValues),t),i=n.selection,r=n.plot,l=n.scaling,a=n.results,o=i,c=this.props.tools.map((function(e){return e.toolIdx})).join(""),u=new RegExp("runset-["+c+"]"),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 o&&i&&o!==i&&O({selection:i}),{selection:i,plot:r,scaling:l,results:a,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=re(this.props.tools,this.props.hiddenCols),i=(0,g.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=re(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,s.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 O({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()})]})]}),ot("Plot",this.state.plot,(function(e){return O({plot:e.target.value})}),this.plotOptions)]}),(0,j.jsxs)("div",{className:"settings-subcontainer",children:[ot("Scaling",this.state.scaling,(function(e){return O({scaling:e.target.value})}),this.scalingOptions),ot("Results",this.state.results,(function(e){return O({results:e.target.value})}),this.resultsOptions,t,this.state.isResultSelectionDisabled),ct((function(){return O({selection:null,plot:null,scaling:null,results:null})}))]})]})}),(0,j.jsx)("div",{children:(0,j.jsx)(at.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?at.wu:at.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,s.Z)((0,s.Z)({margin:{left:90},yType:this.handleType()},t),{},{children:[(0,j.jsx)(at.pW,{}),(0,j.jsx)(at.xL,{}),(0,j.jsx)(at.Kc,{tickFormat:function(e){return e}}),(0,j.jsx)(at.B2,{tickFormat:function(e){return e}}),this.state.value?(0,j.jsx)(at.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),mt=n(3014),vt=(n(8995),(0,mt.u7)(mt.ZP.Range)),bt=500,It=setTimeout((function(){}),bt),Ct=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;(0,a.Z)(this,n),i=t.call(this,e);var r=e.filter||{values:[]},s=r.values,l=r.min,o=r.max,c=r.type,u=r.number_of_significant_digits,d=0,h=0;if("measure"===c||"number"===c){var f=new ne(u).build();d=f(l),h=f(o);var g=s&&s[0];if(g&&g.includes(":")){var p=i.handleMinMaxValue(g,u);d=p.min,h=p.max}}return i.state={title:e.availableFilters&&e.availableFilters.length?e.availableFilters[0].title:"",values:[],idx:k(["availableFilters",0,"idx"],0,e),active:!0,selectedDistincts:[],sliderMin:d,sliderMax:h,numericMin:null,numericMax:null},i}return(0,o.Z)(n,[{key:"sendFilterUpdate",value:function(e){var t=this.props.filter,n=t.type,i=t.categories;i&&i.includes("empty ")&&!e.includes(xe)&&(e=e.concat(xe)),0===e.length&&"status"===n?this.props.onFilterUpdate({values:[N],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,g.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 ne(t).build(),i=this.props.filter||{min:0,max:1/0},r=i.min,s=i.max,l=e.split(":"),a=(0,g.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,a=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:a,onChange:function(t){var n=t.target.value;-1!==n&&(e.setState({idx:-1,active:!0}),a.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:st.$aW,onClick:function(){e.props.removeFilter()}})]})})}(this.props.name,r),function(t){if(!t)return null;var n,r=t.title,s=t.type,a=t.number_of_significant_digits,o=t.categories,c=t.statuses,u=t.values,d=void 0===u?[]:u,h=t.min,f=t.max,p=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:p,checked:d.includes("empty "),onChange:function(t){var n="empty ";if(t.target.checked){var i=[].concat((0,l.Z)(d),[n]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(n,d);e.setState({values:r}),e.sendFilterUpdate(r)}}})]}),"Category",(0,j.jsx)("ul",{className:"filter-card--body--list",children:o.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:d.includes(t),ref:n,onChange:function(n){if(n.target.checked){var i=[].concat((0,l.Z)(d),[t]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(t,d);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:c.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:d.includes(t),onChange:function(n){if(n.target.checked){var i=[].concat((0,l.Z)(d),[t]);e.setState({values:i}),e.sendFilterUpdate(i)}else{var r=S(t,d);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,g.Z)(d,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(It),e.setState({values:[n]}),It=setTimeout((function(){e.sendFilterUpdate([n])}),bt)}})}else{var v=new ne(a).build();h=v(h),f=v(f);var b=le(h),I=le(f),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:h}),(0,j.jsx)("b",{children:f})]}),(0,j.jsx)(vt,{min:Number(h),max:Number(f),step:C,defaultValue:[Number(h),Number(f)],value:[Number(e.state.sliderMin),Number(e.state.sliderMax)],onChange:function(t){var n=(0,g.Z)(t,2),i=n[0],r=n[1];e.setState({sliderMin:v(i),sliderMax:v(r)})},onAfterChange:function(t){var n=(0,g.Z)(t,2),i=n[0],r=n[1],s=v(i),l=v(r),a=s===h?"":s,o=l===f?"":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(h,f)}),bt)}}),(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(h,f)}),bt)}})]})]})}return(0,j.jsx)("div",{className:"filter-card--body",children:n})}(this.props.filter)]})}}]),n}(i.PureComponent),xt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;(0,a.Z)(this,n),i=t.call(this,e);var r=e.filters,l=e.toolName,o=e.currentFilters;for(var c in o)r[c]=(0,s.Z)((0,s.Z)((0,s.Z)({},r[c]),o[c]),{},{touched:r[c].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,o.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,a=this.state.filters;a[t].values=i,a[t].filtering=s,a[t].touched+=1,this.setState({filters:(0,l.Z)(a)}),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,l.Z)(n[e].categories),(0,l.Z)(n[e].statuses))),n[e]=(0,s.Z)((0,s.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,s.Z)((0,s.Z)({},e),{},{filtering:!1,values:[]})}));this.setState({filters:(0,l.Z)(t)});var n,i=(0,f.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(a){i.e(a)}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,l.Z)(n)}),this.props.updateFilters({title:t,values:[]},e)}},{key:"componentDidUpdate",value:function(e,t){var n=e.currentFilters,i=this.props.currentFilters;if(!Ie()(n,i)){var r=this.state.filters;for(var a in i)r[a]=(0,s.Z)((0,s.Z)((0,s.Z)({},r[a]),i[a]),{},{touched:r[a].touched+1,filtering:!0});r=r.map((function(e,t){var n=!(!i[t]&&0!==e.touched);return(0,s.Z)((0,s.Z)({},e),{},{filtering:n,values:n?e.values:[]})})),this.setState({filters:(0,l.Z)(r)})}}},{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)(Ct,{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)(Ct,{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),yt=setTimeout((function(){}),500),Zt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.Z)(this,n),(i=t.call(this,e)).state={values:i.extractFilters()},e.resetFilterHook((function(){return i.resetIdFilters()})),i}return(0,o.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);n0&&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,l.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:jt("filterBox",{"filterBox--hidden":!this.props.visible}),children:[(0,j.jsxs)("div",{className:"filterBox--header",children:[(0,j.jsx)(y.G,{icon:st.YIN,className:"filterBox--header--icon",onClick:this.props.hide}),this.props.headerComponent,(0,j.jsx)(y.G,{icon:st.$aW,className:"filterBox--header--reset-icon",onClick:function(){return e.resetAllFilters()}})]}),(0,j.jsxs)("div",{className:"filter-card--container",children:[(0,j.jsx)(Zt,{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)(xt,{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),Ft=n(6123),Nt=n.n(Ft),Wt=n(9737),Bt=n.n(Wt),Gt=n(7177),wt=n.n(Gt),Yt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,a.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:"",fileTag:"",content:i.props.yamlText},i}return(0,o.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),St=n(1842);St.jQ({useWebWorkers:!1});var Vt={},kt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;(0,a.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 Bt().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 Vt?i.loadFileFromZipEntries(Vt[s],a,s):i.readZipArchive(s,a)},i.readZipArchive=function(e,t){new St.Mr(new St.R(e)).getEntries().then((function(n){i.handleZipEntries(n,t,e)}),(function(n){i.readZipArchiveNoHttpRange(e,t)}))},i.readZipArchiveNoHttpRange=function(e,t){new St.Mr(new St.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 St.Mr(new St.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){Vt[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 St.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,g.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,o.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,We.Z)((0,Ne.Z)().mark((function e(t){var n,i;return(0,Ne.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,!Y(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(Y(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 rt().setAppElement(document.getElementById("root")),(0,j.jsxs)(rt(),{id:"modal-container",ariaHideApp:!1,className:Nt()("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:st.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:st.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)(Yt,{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),Rt=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;(0,a.Z)(this,n);for(var i=arguments.length,r=new Array(i),s=0;s1&&void 0!==arguments[1]&&arguments[1];i.filteredData=t?e:e.map((function(e){return e._original}))},i.filterPlotData=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];i.lastImmediate&&clearImmediate(i.lastImmediate),i.lastImmediate=setImmediate((function(){i.filterUrlSetter(e,[i.updateFiltersFromUrl,i.updateState]),i.lastFiltered=e.filter((function(e){return e.values&&e.values.length>0||e.value}))})),t&&i.setFilter(i.runFilter(e),!0),i.setState({tableData:i.filteredData,filtered:e})},i.resetFilters=function(){i.setState({tableData:i.originalTable,filtered:[]})},i.findAllValuesOfColumn=function(e,t){return i.originalTools.map((function(n,r){return n.columns.map((function(s,a){if(e(n,s)){var o=i.originalTable.map((function(e){return t(e.results[r],e.results[r].values[a])})).filter(Boolean);return(0,l.Z)(new Set(o)).sort()}}))}))},i.getRowName=function(e){return e.id.filter((function(e){return e})).join(" | ")},i.getRelevantUrlParams=function(){return(document.location.href.split("?")[1]||"").split("&").filter((function(e){return e.startsWith("hidden")||e.startsWith("filter")})).join("&")},i.switchToQuantile=function(e){i.setState({quantilePreSelection:e});var t=i.getRelevantUrlParams();document.location.hash="#/quantile"+(t?"?"+t:"")};var r,o=function(e){var t=e.head,n=e.tools,i=e.rows,r=e.stats,l=e.props,a=e.initial;return{tableHeader:t,taskIdNames:t.task_id_names,tools:n.map((function(e,t){return(0,s.Z)((0,s.Z)({},e),{},{toolIdx:t,columns:e.columns.map((function(e,t){return(0,s.Z)((0,s.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:l,initial:a}}(e.data),c=o.tableHeader,u=o.taskIdNames,d=o.tools,h=o.columns,g=o.tableData,p=o.stats,m=o.initial;m&&!document.location.href.includes("#")&&(r=m,document.location.href=encodeURI("".concat(document.location.href,"#").concat(r)));var v=function(e){var t=e.tools,n=e.rows;return t.map((function(e,t){var i,r=e.tool,l=e.date,a=e.niceName,o="".concat(r," ").concat(l," ").concat(a),c=e.columns.map((function(e,t){if(e)return"status"===e.type?(i=t,(0,s.Z)((0,s.Z)({},e),{},{categories:{},statuses:{},idx:t})):"text"===e.type?(0,s.Z)((0,s.Z)({},e),{},{distincts:{},idx:t}):(0,s.Z)((0,s.Z)({},e),{},{min:1/0,max:-1/0,idx:t})}));B(i)||(c[i]=(0,s.Z)((0,s.Z)({},c[i]),{},{categories:{},statuses:{}}));var u,d=(0,f.Z)(n);try{for(d.s();!(u=d.n()).done;){var h=u.value.results[t];for(var g in B(i)||(c[i].categories["".concat(h.category," ")]=!0),h.values){var p=h.values[g].raw,m=c[g];m&&!B(p)&&("status"===m.type?m.statuses[p]=!0:"text"===m.type?m.distincts[p]=!0:(m.min=Math.min(m.min,Number(p)),m.max=Math.max(m.max,Number(p))))}}}catch(v){d.e(v)}finally{d.f()}return{name:o,columns:c.map((function(e){var t=e.distincts,n=e.categories,i=e.statuses,r=(0,b.Z)(e,Ce);return t?(0,s.Z)((0,s.Z)({},r),{},{distincts:Object.keys(t)}):n?(0,s.Z)((0,s.Z)({},r),{},{categories:Object.keys(n),statuses:Object.keys(i)}):r}))}}))}(i.props.data);i.originalTable=g,i.originalTools=d,i.taskIdNames=u,i.columns=h,i.stats=p,i.tableHeader=c,i.filteredData=[],i.state={tools:d,tableData:g,filterable:v,showSelectColumns:!1,showLinkOverlay:!1,filtered:[],filterBoxVisible:!1,active:Tt(),quantilePreSelection:d[0].columns[1],hiddenCols:ie(d)},i.statusValues=i.findAllValuesOfColumn((function(e,t){return"status"===t.type}),(function(e,t){return G(t)})),i.originalTools.forEach((function(e,t){return e.columns.filter((function(e){return"status"===e.type})).forEach((function(e,n){i.originalTable.some((function(e){return"empty"===e.results[t].category}))&&i.statusValues[t][n].push(xe)}))})),i.categoryValues=i.findAllValuesOfColumn((function(e,t){return"status"===t.type}),(function(e,t){return e.category}));var I=i.categoryValues.map((function(e){return e&&e.map((function(e){return e&&e.map((function(e){return"".concat(e," ")}))}))}));i.filterUrlSetter=$(i.statusValues,I),i.filterUrlRetriever=function(e,t){var n=q({categoryValues:t,statusValues:e});return function(e){var t=X(e);return t.filter?n(t.filter):null}}(i.statusValues,I);var C=i.getFiltersFromUrl();return C&&(i.filteredData=i.runFilter(C),i.lastFiltered=C,i.state=(0,s.Z)((0,s.Z)({},i.state),{},{tableData:i.filteredData,filtered:C})),i}return(0,o.Z)(n,[{key:"componentDidMount",value:function(){this.updateFiltersFromUrl(),this.setState({mounted:!0}),this.updateState()}},{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),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]={}),W({type:r})&&i.includes(":")){var u=i.split(":"),d=(0,g.Z)(u,2),h=d[0],f=d[1];l={min:h=""===h?-1/0:Number(h),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[o][c]||(e[o][c]=[]),e[o][c].push(l),e}),{});return ye(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)(Rt,{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)(d.UT,{children:(0,j.jsxs)("div",{className:"overview",children:[(0,j.jsxs)("div",{className:"overview-container",children:[(0,j.jsx)(At,{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,k(["0","id"],[],e).reduce((function(e,n,i){return(0,s.Z)((0,s.Z)({},e),{},(0,p.Z)({},t[i],n))}),{})),addTypeToFilter:this.addTypeToFilter}),(0,j.jsxs)("div",{className:"menu",children:[Ht.map((function(e){var t=e.key,i=e.title,s=e.path,l=e.icon;return(0,j.jsxs)(d.rU,{className:Nt()("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)(h.Z5,{children:[(0,j.jsx)(h.AW,{path:"/",element:(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)(h.AW,{path:"/table",element:(0,j.jsx)(Fe,{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)(h.AW,{path:"/quantile",element:(0,j.jsx)(pt,{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)(h.AW,{path:"/scatter",element:(0,j.jsx)(gt,{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)(h.AW,{path:"/info",element:(0,j.jsx)(nt,{version:this.props.data.version,selectColumn:this.toggleSelectColumns})})]})})]}),(0,j.jsxs)("div",{children:[this.state.showSelectColumns&&(0,j.jsx)(lt,{close:this.toggleSelectColumns,currColumns:this.columns,tableHeader:this.tableHeader,tools:this.state.tools,hiddenCols:this.state.hiddenCols,updateParentStateOnClose:function(){n.updateState(),n.updateFiltersFromUrl()}}),this.state.showLinkOverlay&&(0,j.jsx)(kt,{close:this.toggleLinkOverlay,link:this.state.link,toggleLinkOverlay:this.toggleLinkOverlay})]})]})})}}]),n}(i.Component);var Kt=function(e){return""===window.location.hash&&(window.location.hash="#/"),(0,j.jsx)("div",{className:"App",children:(0,j.jsx)("main",{children:(0,j.jsx)(Xt,{data:window.data,renderPlotsFlexible:!0,onStatsReady:e.onStatsReady})})})};r.render((0,j.jsx)(Kt,{}),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=s)&&Object.keys(n.O).every((function(e){return n.O[e](i[o])}))?i.splice(o--,1):(a=!1,s0&&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},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(i,r){if(1&r&&(i=this(i)),8&r)return i;if("object"===typeof i&&i){if(4&r&&i.__esModule)return i;if(16&r&&"function"===typeof i.then)return i}var s=Object.create(null);n.r(s);var l={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&i;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){l[e]=function(){return i[e]}}));return l.default=function(){return i},n.d(s,l),s}}(),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 { })), ); - const expected = "0(0*status*(status(notIn(true,false))))"; + const expected = + "0(0*status*(status(notIn(true,false)),category(notIn())))"; expect(serializer(filter)).toBe(expected); }); @@ -435,7 +436,7 @@ describe("serialization", () => { const encoded = escape("false(reach)"); - const expected = `0(0*status*(status(in(OOM,${encoded}))))`; + const expected = `0(0*status*(status(in(OOM,${encoded})),category(notIn())))`; expect(serializer(filter)).toBe(expected); }); @@ -471,8 +472,8 @@ describe("serialization", () => { const encoded = escape("false(reach)"); - const expected1 = `0(0*status*(status(in(OOM,${encoded}))))`; - const expected2 = `1(0*status*(status(notIn(true,false))))`; + const expected1 = `0(0*status*(status(in(OOM,${encoded})),category(notIn())))`; + const expected2 = `1(0*status*(status(notIn(true,false)),category(notIn())))`; expect(serializer(filter)).toBe(`${expected1},${expected2}`); }); @@ -495,7 +496,7 @@ describe("serialization", () => { })), ); - const expected = "0(0*status*(category(notIn(unknown))))"; + const expected = "0(0*status*(status(notIn()),category(notIn(unknown))))"; expect(serializer(filter)).toBe(expected); }); @@ -518,7 +519,7 @@ describe("serialization", () => { })), ); - const expected = `0(0*status*(category(in(missing,unknown))))`; + const expected = `0(0*status*(status(notIn()),category(in(missing,unknown))))`; expect(serializer(filter)).toBe(expected); }); @@ -553,8 +554,8 @@ describe("serialization", () => { })), ); - const expected1 = `0(0*status*(category(in(missing,unknown))))`; - const expected2 = `1(0*status*(category(notIn(unknown))))`; + const expected1 = `0(0*status*(status(notIn()),category(in(missing,unknown))))`; + const expected2 = `1(0*status*(status(notIn()),category(notIn(unknown))))`; expect(serializer(filter)).toBe(`${expected1},${expected2}`); }); @@ -613,7 +614,7 @@ describe("serialization", () => { expect(testSerializer(inp)).toBe(expected); }); - test("Should not produce a status filter if all fields are selected", () => { + test("Should produce an empty status filter if all fields are selected", () => { const testStatusValues = [[["true", "false"]]]; const testCategoryValues = [[["correct ", "wrong ", "missing "]]]; @@ -632,7 +633,8 @@ describe("serialization", () => { categoryValues: testCategoryValues, }); - const expected = "0(1*cputime*(value(1234)))"; + const expected = + "0(0*status*(status(notIn()),category(notIn())),1*cputime*(value(1234)))"; expect(testSerializer(inp)).toEqual(expected); });