!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(t,n,r){var o;return o=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(n,"string"),(n="symbol"==e(o)?o:String(o))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}System.register(["./index-legacy-DF2p3puw.js","./utils-legacy-BSriGpNG.js"],(function(e,t){"use strict";var r,o,i,l,a,c,u,s,f,b,m,p,y,g,d,v,h,O;return{setters:[function(e){r=e.r,o=e.d,i=e.b,l=e.j,a=e.y,c=e.G,u=e.z,s=e.p,f=e.c,b=e.l,m=e.D,p=e.n,y=e.C,g=e.e},function(e){d=e.S,v=e.b,h=e.i,O=e.d}],execute:function(){var t=function(e,t,n){return"\n  <strong>".concat(t,"</strong> ").concat(e," ").concat("WIP"===e?"today":"in the last month").concat(n&&"same"!==n.trendDirection?"<br />This is a <strong>".concat(null==n?void 0:n.changePercentage.replace("-","")," ").concat("up"===n.trendDirection?"increase":"decrease","</strong> from the previous month"):"")},j=(e("E",(function(e){var n=e.data,a=e.toValue,c=e.colorBy,u=e.valueToLabel,s=e.renderer,f=e.combineValues,b=e.tooltipLabel,m=r.useMemo((function(){return f(n.slice(-4))}),[f,n]),p=r.useMemo((function(){return n.map(a)}),[n,a]),y=r.useMemo((function(){if(n.length<5)return null;var e,t,r=n.slice(-5).slice(0,4),l=f(r);return{value:l,color:null==c?void 0:c([l,m]),trendDirection:(e=m,t=l,e>t?"up":e<t?"down":"same"),changePercentage:o(m-l,l).map(i).getOr("0%")}}),[c,f,n,m]);return l.jsxs("span",{className:"grid","data-tooltip-id":"react-tooltip","data-tooltip-html":t(b,u(m),y),children:[l.jsxs("span",{className:"inline-flex items-end gap-x-0.5",children:[u(m),l.jsx(d,{data:p,lineColor:null==c?void 0:c(p),yAxisLabel:u,renderer:s})]}),y?l.jsxs("span",{className:"text-sm text-gray-600",style:{color:y.color},children:["up"===y.trendDirection?"▲":"same"===y.trendDirection?" ":"▼"," ",m-y.value==0?"-":u(Math.abs(m-y.value))," ",0===Number.parseInt(y.changePercentage,10)?null:l.jsxs("span",{className:"text-xs",children:["(",Number.parseInt(y.changePercentage,10)>0?"+":null,y.changePercentage,")"]})]}):null]})})),{toValue:b,combineValues:y,valueToLabel:p}),L=function(e){return h(e.filter(g))},w=a(u,c(0)),P=function(e){return O(e.filter(g).filter(w))},V=function(e){return o(y(e),e.length)},x=e("n",n({colorBy:L,tooltipLabel:"new work items"},j)),S=(e("b",n({colorBy:P,tooltipLabel:"new bugs"},j)),e("v",x),e("c",{colorBy:P,toValue:function(e){return V(e).getOr(void 0)},combineValues:function(e){return V(e.flat().filter(g).filter(w)).getOr(0)},valueToLabel:function(e){return 0===e?"-":s(e)},renderer:v,tooltipLabel:"cycle time"}));e("a",n(n({},S),{},{tooltipLabel:"change lead time"})),e("f",{colorBy:L,toValue:function(e){return o(e.wcTime,e.total).getOr(0)},combineValues:function(e){return(t=f("wcTime"),n=f("total"),function(e){var r=function(e,t){return function(n){return n.reduce((function(n,r){return n.numerator+=e(r),n.denominator+=t(r),n}),{numerator:0,denominator:0})}}(t,n)(e),i=r.numerator,l=r.denominator;return o(i,l)})(e).getOr(0);var t,n},valueToLabel:i,tooltipLabel:"flow efficiency"}),e("w",{colorBy:P,toValue:b,combineValues:function(e){return m(e)||0},valueToLabel:p,tooltipLabel:"WIP"}),e("t",{colorBy:L,combineValues:function(e){return m(e)||0},toValue:b,valueToLabel:p,tooltipLabel:"automated tests"}),e("d",{colorBy:L,combineValues:function(e){return m(e)||0},toValue:b,valueToLabel:function(e){return"".concat(e,"%")},tooltipLabel:"branch coverage"}),e("e",(function(e){return{colorBy:L,combineValues:function(e){return m(e)||0},toValue:b,valueToLabel:function(t){return o(t,e).map(i).getOr("-")},tooltipLabel:"repos with sonar"}})),e("g",n(n({colorBy:L},j),{},{tooltipLabel:"builds"}))}}}))}();
