(function(B,a){typeof exports=="object"&&typeof module<"u"?a(require("buildbot-plugin-support"),require("react"),require("mobx-react"),require("react-router-dom"),require("buildbot-data-js"),require("buildbot-ui")):typeof define=="function"&&define.amd?define(["buildbot-plugin-support","react","mobx-react","react-router-dom","buildbot-data-js","buildbot-ui"],a):(B=typeof globalThis<"u"?globalThis:B||self,a(B.BuildbotPluginSupport,B.React,B.mobxReact,B.ReactRouterDOM,B.BuildbotDataJs,B.BuildbotUi))})(this,function(B,a,Fe,oe,T,K){"use strict";function ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var de={exports:{}},X={};/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Te=a,Ee=Symbol.for("react.element"),Se=Symbol.for("react.fragment"),Oe=Object.prototype.hasOwnProperty,je=Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$e={key:!0,ref:!0,__self:!0,__source:!0};function ce(e,r,t){var s,l={},n=null,i=null;t!==void 0&&(n=""+t),r.key!==void 0&&(n=""+r.key),r.ref!==void 0&&(i=r.ref);for(s in r)Oe.call(r,s)&&!$e.hasOwnProperty(s)&&(l[s]=r[s]);if(e&&e.defaultProps)for(s in r=e.defaultProps,r)l[s]===void 0&&(l[s]=r[s]);return{$$typeof:Ee,type:e,key:n,ref:i,props:l,_owner:je.current}}X.Fragment=Se,X.jsx=ce,X.jsxs=ce,de.exports=X;var x=de.exports,me={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},fe=a.createContext&&a.createContext(me),G=function(){return G=Object.assign||function(e){for(var r,t=1,s=arguments.length;t<s;t++){r=arguments[t];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},G.apply(this,arguments)},Le=function(e,r){var t={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&r.indexOf(s)<0&&(t[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(e);l<s.length;l++)r.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(e,s[l])&&(t[s[l]]=e[s[l]]);return t};function pe(e){return e&&e.map(function(r,t){return a.createElement(r.tag,G({key:t},r.attr),pe(r.child))})}function ke(e){return function(r){return a.createElement(Ve,G({attr:G({},e.attr)},r),pe(e.child))}}function Ve(e){var r=function(t){var s=e.attr,l=e.size,n=e.title,i=Le(e,["attr","size","title"]),u=l||t.size||"1em",o;return t.className&&(o=t.className),e.className&&(o=(o?o+" ":"")+e.className),a.createElement("svg",G({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,s,i,{className:o,style:G(G({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),n&&a.createElement("title",null,n),e.children)};return fe!==void 0?a.createElement(fe.Consumer,null,function(t){return r(t)}):r(me)}function Be(e){return ke({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M488.6 250.2L392 214V105.5c0-15-9.3-28.4-23.4-33.7l-100-37.5c-8.1-3.1-17.1-3.1-25.3 0l-100 37.5c-14.1 5.3-23.4 18.7-23.4 33.7V214l-96.6 36.2C9.3 255.5 0 268.9 0 283.9V394c0 13.6 7.7 26.1 19.9 32.2l100 50c10.1 5.1 22.1 5.1 32.2 0l103.9-52 103.9 52c10.1 5.1 22.1 5.1 32.2 0l100-50c12.2-6.1 19.9-18.6 19.9-32.2V283.9c0-15-9.3-28.4-23.4-33.7zM358 214.8l-85 31.9v-68.2l85-37v73.3zM154 104.1l102-38.2 102 38.2v.6l-102 41.4-102-41.4v-.6zm84 291.1l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6zm240 112l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6z"}}]})(e)}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var s in t)({}).hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},P.apply(null,arguments)}function S(e,r){if(e==null)return{};var t={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(r.includes(s))continue;t[s]=e[s]}return t}var ve={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=l(n,s(u)))}return n}function s(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var u in n)r.call(n,u)&&n[u]&&(i=l(i,u));return i}function l(n,i){return i?n?n+" "+i:n+i:n}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ve);var qe=ve.exports;const O=ue(qe);var ee=a.createContext({});ee.Consumer,ee.Provider;function L(e,r){var t=a.useContext(ee);return e||t[r]||r}var he={exports:{}},Ae="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Me=Ae,ze=Me;function be(){}function xe(){}xe.resetWarningCache=be;var Ge=function(){function e(s,l,n,i,u,o){if(o!==ze){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}e.isRequired=e;function r(){return e}var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:xe,resetWarningCache:be};return t.PropTypes=t,t};he.exports=Ge();var We=he.exports;const te=ue(We);var Qe=/-(.)/g;function Ue(e){return e.replace(Qe,function(r,t){return t.toUpperCase()})}var De=["className","bsPrefix","as"],He=function(r){return r[0].toUpperCase()+Ue(r).slice(1)};function Ke(e,r){var t={},s=t.displayName,l=s===void 0?He(e):s,n=t.Component,i=t.defaultProps,u=a.forwardRef(function(o,m){var f=o.className,v=o.bsPrefix,d=o.as,p=d===void 0?n||"div":d,g=S(o,De),y=L(v,e);return a.createElement(p,P({ref:m,className:O(f,y)},g))});return u.defaultProps=i,u.displayName=l,u}var Xe=["bsPrefix","className","as"],Ye=["xl","lg","md","sm","xs"],ge=a.forwardRef(function(e,r){var t=e.bsPrefix,s=e.className,l=e.as,n=l===void 0?"div":l,i=S(e,Xe),u=L(t,"col"),o=[],m=[];return Ye.forEach(function(f){var v=i[f];delete i[f];var d,p,g;if(typeof v=="object"&&v!=null){var y=v.span;d=y===void 0?!0:y,p=v.offset,g=v.order}else d=v;var b=f!=="xs"?"-"+f:"";d&&o.push(d===!0?""+u+b:""+u+b+"-"+d),g!=null&&m.push("order"+b+"-"+g),p!=null&&m.push("offset"+b+"-"+p)}),o.length||o.push(u),a.createElement(n,P({},i,{ref:r,className:O.apply(void 0,[s].concat(o,m))}))});ge.displayName="Col";var ye={exports:{}},re={exports:{}};(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=t;function t(s){function l(i,u,o,m,f,v){var d=m||"<<anonymous>>",p=v||o;if(u[o]==null)return i?new Error("Required "+f+" `"+p+"` was not specified "+("in `"+d+"`.")):null;for(var g=arguments.length,y=Array(g>6?g-6:0),b=6;b<g;b++)y[b-6]=arguments[b];return s.apply(void 0,[u,o,d,f,p].concat(y))}var n=l.bind(null,!1);return n.isRequired=l.bind(null,!0),n}e.exports=r.default})(re,re.exports);var Ze=re.exports;(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var t=Ze,s=l(t);function l(i){return i&&i.__esModule?i:{default:i}}function n(){for(var i=arguments.length,u=Array(i),o=0;o<i;o++)u[o]=arguments[o];function m(){for(var f=arguments.length,v=Array(f),d=0;d<f;d++)v[d]=arguments[d];var p=null;return u.forEach(function(g){if(p==null){var y=g.apply(void 0,v);y!=null&&(p=y)}}),p}return(0,s.default)(m)}e.exports=r.default})(ye,ye.exports);var _e=["as","className","type","tooltip"],Je={type:te.string,tooltip:te.bool,as:te.elementType},U=a.forwardRef(function(e,r){var t=e.as,s=t===void 0?"div":t,l=e.className,n=e.type,i=n===void 0?"valid":n,u=e.tooltip,o=u===void 0?!1:u,m=S(e,_e);return a.createElement(s,P({},m,{ref:r,className:O(l,i+"-"+(o?"tooltip":"feedback"))}))});U.displayName="Feedback",U.propTypes=Je;var q=a.createContext({controlId:void 0}),Re=["id","bsPrefix","bsCustomPrefix","className","type","isValid","isInvalid","isStatic","as"],se=a.forwardRef(function(e,r){var t=e.id,s=e.bsPrefix,l=e.bsCustomPrefix,n=e.className,i=e.type,u=i===void 0?"checkbox":i,o=e.isValid,m=o===void 0?!1:o,f=e.isInvalid,v=f===void 0?!1:f,d=e.isStatic,p=e.as,g=p===void 0?"input":p,y=S(e,Re),b=a.useContext(q),I=b.controlId,w=b.custom,c=w?[l,"custom-control-input"]:[s,"form-check-input"],C=c[0],N=c[1];return s=L(C,N),a.createElement(g,P({},y,{ref:r,type:u,id:t||I,className:O(n,s,m&&"is-valid",v&&"is-invalid",d&&"position-static")}))});se.displayName="FormCheckInput";var et=["bsPrefix","bsCustomPrefix","className","htmlFor"],ne=a.forwardRef(function(e,r){var t=e.bsPrefix,s=e.bsCustomPrefix,l=e.className,n=e.htmlFor,i=S(e,et),u=a.useContext(q),o=u.controlId,m=u.custom,f=m?[s,"custom-control-label"]:[t,"form-check-label"],v=f[0],d=f[1];return t=L(v,d),a.createElement("label",P({},i,{ref:r,htmlFor:n||o,className:O(l,t)}))});ne.displayName="FormCheckLabel";var tt=["id","bsPrefix","bsCustomPrefix","inline","disabled","isValid","isInvalid","feedbackTooltip","feedback","className","style","title","type","label","children","custom","as"],W=a.forwardRef(function(e,r){var t=e.id,s=e.bsPrefix,l=e.bsCustomPrefix,n=e.inline,i=n===void 0?!1:n,u=e.disabled,o=u===void 0?!1:u,m=e.isValid,f=m===void 0?!1:m,v=e.isInvalid,d=v===void 0?!1:v,p=e.feedbackTooltip,g=p===void 0?!1:p,y=e.feedback,b=e.className,I=e.style,w=e.title,c=w===void 0?"":w,C=e.type,N=C===void 0?"checkbox":C,A=e.label,j=e.children,h=e.custom,F=e.as,k=F===void 0?"input":F,M=S(e,tt),$=N==="switch"?!0:h,V=$?[l,"custom-control"]:[s,"form-check"],Q=V[0],z=V[1];s=L(Q,z);var D=a.useContext(q),H=D.controlId,R=a.useMemo(function(){return{controlId:t||H,custom:$}},[H,$,t]),we=$||A!=null&&A!==!1&&!j,ht=a.createElement(se,P({},M,{type:N==="switch"?"checkbox":N,ref:r,isValid:f,isInvalid:d,isStatic:!we,disabled:o,as:k}));return a.createElement(q.Provider,{value:R},a.createElement("div",{style:I,className:O(b,s,$&&"custom-"+N,i&&s+"-inline")},j||a.createElement(a.Fragment,null,ht,we&&a.createElement(ne,{title:c},A),(f||d)&&a.createElement(U,{type:f?"valid":"invalid",tooltip:g},y))))});W.displayName="FormCheck",W.Input=se,W.Label=ne;var rt=["id","bsPrefix","bsCustomPrefix","className","isValid","isInvalid","lang","as"],ae=a.forwardRef(function(e,r){var t=e.id,s=e.bsPrefix,l=e.bsCustomPrefix,n=e.className,i=e.isValid,u=e.isInvalid,o=e.lang,m=e.as,f=m===void 0?"input":m,v=S(e,rt),d=a.useContext(q),p=d.controlId,g=d.custom,y="file",b=g?[l,"custom-file-input"]:[s,"form-control-file"],I=b[0],w=b[1];return s=L(I,w),a.createElement(f,P({},v,{ref:r,id:t||p,type:y,lang:o,className:O(n,s,i&&"is-valid",u&&"is-invalid")}))});ae.displayName="FormFileInput";var st=["bsPrefix","bsCustomPrefix","className","htmlFor"],Y=a.forwardRef(function(e,r){var t=e.bsPrefix,s=e.bsCustomPrefix,l=e.className,n=e.htmlFor,i=S(e,st),u=a.useContext(q),o=u.controlId,m=u.custom,f=m?[s,"custom-file-label"]:[t,"form-file-label"],v=f[0],d=f[1];return t=L(v,d),a.createElement("label",P({},i,{ref:r,htmlFor:n||o,className:O(l,t),"data-browse":i["data-browse"]}))});Y.displayName="FormFileLabel";var nt=["id","bsPrefix","bsCustomPrefix","disabled","isValid","isInvalid","feedbackTooltip","feedback","className","style","label","children","custom","lang","data-browse","as","inputAs"],Z=a.forwardRef(function(e,r){var t=e.id,s=e.bsPrefix,l=e.bsCustomPrefix,n=e.disabled,i=n===void 0?!1:n,u=e.isValid,o=u===void 0?!1:u,m=e.isInvalid,f=m===void 0?!1:m,v=e.feedbackTooltip,d=v===void 0?!1:v,p=e.feedback,g=e.className,y=e.style,b=e.label,I=e.children,w=e.custom,c=e.lang,C=e["data-browse"],N=e.as,A=N===void 0?"div":N,j=e.inputAs,h=j===void 0?"input":j,F=S(e,nt),k=w?[l,"custom"]:[s,"form-file"],M=k[0],$=k[1];s=L(M,$);var V="file",Q=a.useContext(q),z=Q.controlId,D=a.useMemo(function(){return{controlId:t||z,custom:w}},[z,w,t]),H=b!=null&&b!==!1&&!I,R=a.createElement(ae,P({},F,{ref:r,isValid:o,isInvalid:f,disabled:i,as:h,lang:c}));return a.createElement(q.Provider,{value:D},a.createElement(A,{style:y,className:O(g,s,w&&"custom-"+V)},I||a.createElement(a.Fragment,null,w?a.createElement(a.Fragment,null,R,H&&a.createElement(Y,{"data-browse":C},b)):a.createElement(a.Fragment,null,H&&a.createElement(Y,null,b),R),(o||f)&&a.createElement(U,{type:o?"valid":"invalid",tooltip:d},p))))});Z.displayName="FormFile",Z.Input=ae,Z.Label=Y;var at=["bsPrefix","bsCustomPrefix","type","size","htmlSize","id","className","isValid","isInvalid","plaintext","readOnly","custom","as"],Ce=a.forwardRef(function(e,r){var t=e.bsPrefix,s=e.bsCustomPrefix,l=e.type,n=e.size,i=e.htmlSize,u=e.id,o=e.className,m=e.isValid,f=m===void 0?!1:m,v=e.isInvalid,d=v===void 0?!1:v,p=e.plaintext,g=e.readOnly,y=e.custom,b=e.as,I=b===void 0?"input":b,w=S(e,at),c=a.useContext(q),C=c.controlId,N=y?[s,"custom"]:[t,"form-control"],A=N[0],j=N[1];t=L(A,j);var h;if(p){var F;h=(F={},F[t+"-plaintext"]=!0,F)}else if(l==="file"){var k;h=(k={},k[t+"-file"]=!0,k)}else if(l==="range"){var M;h=(M={},M[t+"-range"]=!0,M)}else if(I==="select"&&y){var $;h=($={},$[t+"-select"]=!0,$[t+"-select-"+n]=n,$)}else{var V;h=(V={},V[t]=!0,V[t+"-"+n]=n,V)}return a.createElement(I,P({},w,{type:l,size:i,ref:r,readOnly:g,id:u||C,className:O(o,h,f&&"is-valid",d&&"is-invalid")}))});Ce.displayName="FormControl";const it=Object.assign(Ce,{Feedback:U});var lt=["bsPrefix","className","children","controlId","as"],Ne=a.forwardRef(function(e,r){var t=e.bsPrefix,s=e.className,l=e.children,n=e.controlId,i=e.as,u=i===void 0?"div":i,o=S(e,lt);t=L(t,"form-group");var m=a.useMemo(function(){return{controlId:n}},[n]);return a.createElement(q.Provider,{value:m},a.createElement(u,P({},o,{ref:r,className:O(s,t)}),l))});Ne.displayName="FormGroup";var ot=["as","bsPrefix","column","srOnly","className","htmlFor"],ut={column:!1,srOnly:!1},ie=a.forwardRef(function(e,r){var t=e.as,s=t===void 0?"label":t,l=e.bsPrefix,n=e.column,i=e.srOnly,u=e.className,o=e.htmlFor,m=S(e,ot),f=a.useContext(q),v=f.controlId;l=L(l,"form-label");var d="col-form-label";typeof n=="string"&&(d=d+" "+d+"-"+n);var p=O(u,l,i&&"sr-only",n&&d);return o=o||v,n?a.createElement(ge,P({ref:r,as:"label",className:p,htmlFor:o},m)):a.createElement(s,P({ref:r,className:p,htmlFor:o},m))});ie.displayName="FormLabel",ie.defaultProps=ut;var dt=["bsPrefix","className","as","muted"],Pe=a.forwardRef(function(e,r){var t=e.bsPrefix,s=e.className,l=e.as,n=l===void 0?"small":l,i=e.muted,u=S(e,dt);return t=L(t,"form-text"),a.createElement(n,P({},u,{ref:r,className:O(s,t,i&&"text-muted")}))});Pe.displayName="FormText";var _=a.forwardRef(function(e,r){return a.createElement(W,P({},e,{ref:r,type:"switch"}))});_.displayName="Switch",_.Input=W.Input,_.Label=W.Label;var ct=["bsPrefix","inline","className","validated","as"],mt=Ke("form-row"),ft={inline:!1},E=a.forwardRef(function(e,r){var t=e.bsPrefix,s=e.inline,l=e.className,n=e.validated,i=e.as,u=i===void 0?"form":i,o=S(e,ct);return t=L(t,"form"),a.createElement(u,P({},o,{ref:r,className:O(l,n&&"was-validated",s&&t+"-inline")}))});E.displayName="Form",E.defaultProps=ft,E.Row=mt,E.Group=Ne,E.Control=it,E.Check=W,E.File=Z,E.Switch=_,E.Label=ie,E.Text=Pe;const Ie="(all)",J=new Map;J.set(Ie,T.UNKNOWN);for(const e of T.allResults)J.set(T.intToResultText[e],e);const le="(all)";function pt(e,r,t,s,l,n,i,u,o,m){const f=new Map,v=new Set;for(const c of r.array)c.branch===null&&(c.branch="master"),f.set(c.sourcestamp.ssid,{change:c,buildsets:new Map});const d=new Map;for(const c of e.array){if(c.sourcestamps.length===0)continue;const C=c.sourcestamps[c.sourcestamps.length-1],N=f.get(C.ssid);N!==void 0&&(N.buildsets.set(c.bsid,c),v.add(N.change.branch),!(n!==le&&N.change.branch!==n)&&d.set(N.change.changeid,N))}let p=[...d.values()];p.sort((c,C)=>c.change.changeid-C.change.changeid),p.length>o&&(p=p.slice(p.length-o)),u||(p=p.reverse());const g=[le,...v.keys()];g.sort((c,C)=>c.localeCompare(C));const y=new Map;for(const c of s.array){const C=y.get(c.buildsetid);C===void 0?y.set(c.buildsetid,[c]):C.push(c)}const b=new Map;for(const c of l.array){if(c.buildrequestid===null)continue;const C=b.get(c.buildrequestid);C===void 0?b.set(c.buildrequestid,[c]):C.push(c)}const I=new Map;for(const c of p)for(const C of c.buildsets.values()){const N=y.get(C.bsid);if(N!==void 0)for(const A of N){const j=(b.get(A.buildrequestid)??[]).filter(k=>i===T.UNKNOWN||k.results===i);if(j.length===0)continue;const h=t.getByIdOrNull(j[0].builderid.toString());if(h===null||!m(h.tags))continue;const F=I.get(h.builderid);F===void 0?I.set(h.builderid,{builder:h,buildsByChangeId:new Map([[c.change.changeid,j]])}):F.buildsByChangeId.set(c.change.changeid,j)}}const w=[...I.values()];return w.sort((c,C)=>c.builder.name.localeCompare(C.builder.name)),[g,p,w]}const vt=Fe.observer(()=>{const e=T.useDataAccessor([]),r=K.useTagFilterManager("tags"),t=B.buildbotGetSettings(),s=t.getIntegerSetting("Grid.revisionLimit"),l=t.getIntegerSetting("Grid.changeFetchLimit"),n=t.getIntegerSetting("Grid.buildFetchLimit"),i=t.getBooleanSetting("Grid.fullChanges"),u=t.getBooleanSetting("Grid.leftToRight"),[o,m]=a.useState(Ie),[f,v]=a.useState(le),d=J.get(o),p=T.useDataApiQuery(()=>T.Buildset.getAll(e,{query:{limit:n,order:"-bsid"}})),g=T.useDataApiQuery(()=>T.Change.getAll(e,{query:{limit:l,order:"-changeid"}})),y=T.useDataApiQuery(()=>T.Builder.getAll(e)),b=T.useDataApiQuery(()=>T.Buildrequest.getAll(e,{query:{limit:n,order:"-buildrequestid"}})),I=T.useDataApiQuery(()=>T.Build.getAll(e,{query:{limit:n,order:"-buildrequestid"}}));if(!(p.resolved&&g.resolved&&y.resolved&&b.resolved&&I.resolved))return x.jsx("div",{className:"bb-grid-container",children:x.jsx(K.LoadingIndicator,{})});if(g.array.length===0)return x.jsx("div",{className:"bb-grid-container",children:x.jsxs("p",{children:["No changes. Grid View needs a changesource to be setup, and ",x.jsx(oe.Link,{to:"/changes",children:" changes"})," to be in the system."]})});const[c,C,N]=pt(p,g,y,b,I,f,d,u,s,h=>r.shouldShowByTags(h)),A=C.slice().sort((h,F)=>F.change.changeid-h.change.changeid).map(h=>x.jsx("th",{className:"change",children:x.jsx(K.ChangeDetails,{change:h.change,compact:!i,showDetails:!1,setShowDetails:()=>{}})})),j=N.map(h=>{const F=h.builder,k=h.buildsByChangeId,M=C.map($=>{const V=$.change,Q=[...k.get(V.changeid)??[]];return Q.sort((z,D)=>z.buildid-D.buildid),x.jsx("td",{children:Q.map(z=>x.jsx(K.BuildLinkWithSummaryTooltip,{build:z},z.id))},V.changeid)});return x.jsxs("tr",{children:[x.jsx("th",{children:x.jsx(oe.Link,{to:`/builders/${F.builderid}`,children:F.name})}),x.jsx("td",{children:r.getElementsForTags(F.tags)}),M]},F.name)});return x.jsxs("div",{className:"container grid",children:[x.jsxs(E,{inline:!0,className:"mb-sm-2",children:[x.jsx(E.Label,{className:"mr-sm-2",children:"Branch"}),x.jsx(E.Control,{className:"mr-sm-2",as:"select",multiple:!1,value:f,onChange:h=>v(h.target.value),children:c.map(h=>x.jsx("option",{children:h}))}),x.jsx(E.Label,{className:"mr-sm-2",children:"Results"}),x.jsx(E.Control,{className:"mr-sm-2",as:"select",multiple:!1,value:o,onChange:h=>m(h.target.value),children:[...J.keys()].map(h=>x.jsx("option",{children:h}))})]}),x.jsxs("table",{className:"table table-condensed table-striped table-hover",children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("th",{children:"Builder"}),x.jsxs("th",{children:[r.getFiltersHelpElement(),r.getEnabledFiltersElements()]}),A]})}),x.jsx("tbody",{children:j})]})]})});B.buildbotSetupPlugin(e=>{e.registerMenuGroup({name:"grid",caption:"Grid View",icon:x.jsx(Be,{}),order:4,route:"/grid",parentName:null}),e.registerRoute({route:"/grid",group:"grid",element:()=>x.jsx(vt,{})}),e.registerSettingGroup({name:"Grid",caption:"Grid related settings",items:[{type:"boolean",name:"fullChanges",caption:"Show avatar and time ago in change details",defaultValue:!1},{type:"boolean",name:"leftToRight",caption:"Show most recent changes on the right",defaultValue:!1},{type:"integer",name:"revisionLimit",caption:"Maximum number of revisions to display",defaultValue:5},{type:"integer",name:"changeFetchLimit",caption:"Maximum number of changes to fetch",defaultValue:100},{type:"integer",name:"buildFetchLimit",caption:"Maximum number of builds to fetch",defaultValue:1e3}]})})});
