!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="69822f2f-ed6b-4813-b5d0-1c0afa668e06",t._sentryDebugIdIdentifier="sentry-dbid-69822f2f-ed6b-4813-b5d0-1c0afa668e06")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1832],{23307:(t,e,i)=>{i.r(e),i.d(e,{default:()=>y});var a=i(6029),n=i(21377),r=i(37071),s=i(21501),o=i(76356),l=i(93338),c=i(59411),d=i(27956),u=i(14632),m=i(55729),h=i(947),p=i(75751);let f=Object.assign({},d,c,u),g=f.scaleLinear().domain([0,3]).range([0,102]),v=(0,o.I4)("div",{base:{w:"100%",h:"[128px]",position:"relative",overflow:"hidden","& div.timeSpan":{h:"100%",pt:"2xs",bg:"surface.s2",roundedTop:"2xs",textAlign:"center",position:"absolute",top:"0"},"& div.avgPoints":{w:"100%",bg:"secondary.default",roundedTop:"2xs",position:"absolute",bottom:"0"},"& img":{height:"[20px]"}},variants:{isRtl:{true:{transform:"scale(-1, 1)"}}}});function y(t){let{managerCareerHistory:e,managerDetails:i}=t,c=(0,m.useRef)(null),d=(0,s.uc)(c,{},100)||0,u=(0,h.A)(),{textDirection:y}=(0,r.$c)(),[x,b]=(0,m.useState)(0),M=i.manager.performance,w=M?M.totalPoints/M.total:0,A=e.careerHistory.filter((t,e)=>t.endTimestamp||!t.endTimestamp&&0===e).reverse();return(0,m.useEffect)(()=>{d&&c.current&&b(function(t,e,i){let a=f.select(t),r=function(t,e,i){let a=Date.now()/1e3;(!t.endTimestamp||t.endTimestamp>a)&&(t.endTimestamp=a);let n=f.scaleTime().domain([e,t.endTimestamp]).range([0,i]);if(!(n(t.endTimestamp||0)-n(t.startTimestamp)>=20)){let a=f.scaleLinear().domain([0,i]).range([e,t.endTimestamp]),r=25-(i-n(t.endTimestamp)),s=a(i+r+1);n.domain([e,s]),t.endTimestamp=s}return n}(e[e.length-1],e[0].startTimestamp,i),s=t=>r(t.startTimestamp)+1,o=t=>r(t.endTimestamp||0)-r(t.startTimestamp)-1;a.selectAll("img").data(e).style("display",t=>o(t)>=20?"initial":"none");let c=a.selectAll("div.timeSpan").data(e).style("left",t=>"".concat(s(t),"px")).style("width",t=>"".concat(o(t),"px")).enter().append("div").attr("class","timeSpan").style("left",t=>"".concat(s(t),"px")).style("width",t=>"".concat(o(t),"px"));return c.append("img").attr("src",t=>t.team?n.cWY.image(Number(t.team.id)):"/static/images/placeholders/team.svg").style("display",t=>o(t)>=20?"initial":"none").attr("onerror","this.src='/static/images/placeholders/team.svg'"),c.append("div").attr("class","avgPoints").style("height",0).transition().delay((t,e)=>50*e).duration(500).style("height",t=>{let{performance:e}=t;return e?"".concat(g(e.totalPoints/e.total),"px"):0}),c.on("mouseover",(t,e)=>{e.team&&f.select("#js-manager-history-".concat(e.team.id,"-").concat(e.startTimestamp)).style("background",l.S.var("colors.surface.s2"))}).on("mouseout",(t,e)=>{e.team&&f.select("#js-manager-history-".concat(e.team.id,"-").concat(e.startTimestamp)).style("background",l.S.var("colors.surface.s1"))}),o(e[e.length-1])}(c.current,A,d))},[i.manager.id,d,c.current]),(0,a.jsx)(p.t,{tag:"ManagerHistoryGraph",children:(0,a.jsxs)(o.az,{pt:"sm",px:"lg",children:[(0,a.jsxs)(o.so,{align:"flex-end",children:[(0,a.jsxs)(o.so,{direction:"column",justify:"space-between",w:"[20px]",h:"[114px]",my:"[-6px]",children:[(0,a.jsx)(r.EY,{textStyle:"assistive.micro",color:"neutrals.nLv3",children:"3"}),(0,a.jsx)(r.EY,{textStyle:"assistive.micro",color:"neutrals.nLv3",children:"2"}),(0,a.jsx)(r.EY,{textStyle:"assistive.micro",color:"neutrals.nLv3",children:"1"}),(0,a.jsx)(r.EY,{textStyle:"assistive.micro",color:"[transparent]",children:"0"})]}),(0,a.jsx)(v,{ref:c,isRtl:"rtl"===y,children:w&&(0,a.jsx)(o.az,{w:"100%",borderTop:"1px dashed {colors.status.error.default}",zIndex:"button",position:"absolute",left:"0",style:{bottom:g(w)}})})]}),(0,a.jsxs)(o.so,{justify:"space-between",align:"center",h:"[26px]",pl:"[20px]",children:[(0,a.jsxs)(r.EY,{textStyle:"assistive.micro",color:"neutrals.nLv3",children:["'",u.formatDate(1e3*A[0].startTimestamp,{year:"2-digit"})]}),(0,a.jsxs)(r.EY,{textStyle:"assistive.micro",color:"neutrals.nLv3",style:{marginInlineEnd:"".concat(x>0?x-14:0,"px")},children:["'",u.formatDate(1e3*A[A.length-1].startTimestamp,{year:"2-digit"})]})]})]})})}},28446:(t,e,i)=>{i.d(e,{A:()=>function t(){var e=(0,n.Ay)();return e.copy=function(){return(0,n.C)(e,t())},r.C.apply(e,arguments),o(e)},C:()=>o});var a=i(68744),n=i(27599),r=i(58905),s=i(87965);function o(t){var e=t.domain;return t.ticks=function(t){var i=e();return(0,a.Ay)(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,i){var a=e();return(0,s.A)(a[0],a[a.length-1],null==t?10:t,i)},t.nice=function(i){null==i&&(i=10);var n,r,s=e(),o=0,l=s.length-1,c=s[o],d=s[l],u=10;for(d0;){if((r=(0,a.lq)(c,d,i))===n)return s[o]=c,s[l]=d,e(s);if(r>0)c=Math.floor(c/r)*r,d=Math.ceil(d/r)*r;else if(r<0)c=Math.ceil(c*r)/r,d=Math.floor(d*r)/r;else break;n=r}return t},t}},28715:(t,e,i)=>{i.d(e,{A:()=>n});var a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(t){var e;if(!(e=a.exec(t)))throw Error("invalid format: "+t);return new r({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function r(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}n.prototype=r.prototype,r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}},61116:(t,e,i)=>{i.d(e,{GP:()=>r,s:()=>s});var a,n,r,s,o=i(80969),l=i(28715),c=i(80708);function d(t,e){var i=(0,c.f)(t,e);if(!i)return t+"";var a=i[0],n=i[1];return n<0?"0."+Array(-n).join("0")+a:a.length>n+1?a.slice(0,n+1)+"."+a.slice(n+1):a+Array(n-a.length+2).join("0")}let u={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:c.A,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>d(100*t,e),r:d,s:function(t,e){var i=(0,c.f)(t,e);if(!i)return t+"";var n=i[0],r=i[1],s=r-(a=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=n.length;return s===o?n:s>o?n+Array(s-o+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+Array(1-s).join("0")+(0,c.f)(t,Math.max(0,e+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function m(t){return t}var h=Array.prototype.map,p=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];r=(n=function(t){var e,i,n,r=void 0===t.grouping||void 0===t.thousands?m:(e=h.call(t.grouping,Number),i=t.thousands+"",function(t,a){for(var n=t.length,r=[],s=0,o=e[0],l=0;n>0&&o>0&&(l+o+1>a&&(o=Math.max(1,a-l)),r.push(t.substring(n-=o,n+o)),!((l+=o+1)>a));)o=e[s=(s+1)%e.length];return r.reverse().join(i)}),s=void 0===t.currency?"":t.currency[0]+"",c=void 0===t.currency?"":t.currency[1]+"",d=void 0===t.decimal?".":t.decimal+"",f=void 0===t.numerals?m:(n=h.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return n[+t]})}),g=void 0===t.percent?"%":t.percent+"",v=void 0===t.minus?"−":t.minus+"",y=void 0===t.nan?"NaN":t.nan+"";function x(t){var e=(t=(0,l.A)(t)).fill,i=t.align,n=t.sign,o=t.symbol,m=t.zero,h=t.width,x=t.comma,b=t.precision,M=t.trim,w=t.type;"n"===w?(x=!0,w="g"):u[w]||(void 0===b&&(b=12),M=!0,w="g"),(m||"0"===e&&"="===i)&&(m=!0,e="0",i="=");var A="$"===o?s:"#"===o&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",j="$"===o?c:/[%p]/.test(w)?g:"",T=u[w],S=/[defgprs%]/.test(w);function k(t){var s,o,l,c=A,u=j;if("c"===w)u=T(t)+u,t="";else{var g=(t*=1)<0||1/t<0;if(t=isNaN(t)?y:T(Math.abs(t),b),M&&(t=function(t){t:for(var e,i=t.length,a=1,n=-1;a0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),g&&0==+t&&"+"!==n&&(g=!1),c=(g?"("===n?n:v:"-"===n||"("===n?"":n)+c,u=("s"===w?p[8+a/3]:"")+u+(g&&"("===n?")":""),S){for(s=-1,o=t.length;++s(l=t.charCodeAt(s))||l>57){u=(46===l?d+t.slice(s+1):t.slice(s))+u,t=t.slice(0,s);break}}}x&&!m&&(t=r(t,1/0));var k=c.length+t.length+u.length,E=k>1)+c+t+u+E.slice(k);break;default:t=E+c+t+u}return f(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),k.toString=function(){return t+""},k}return{format:x,formatPrefix:function(t,e){var i=x(((t=(0,l.A)(t)).type="f",t)),a=3*Math.max(-8,Math.min(8,Math.floor((0,o.A)(e)/3))),n=Math.pow(10,-a),r=p[8+a/3];return function(t){return i(n*t)+r}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,s=n.formatPrefix},80708:(t,e,i)=>{function a(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function n(t,e){if((i=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var i,a=t.slice(0,i);return[a.length>1?a[0]+a.slice(2):a,+t.slice(i+1)]}i.d(e,{A:()=>a,f:()=>n})},80969:(t,e,i)=>{i.d(e,{A:()=>n});var a=i(80708);function n(t){return(t=(0,a.f)(Math.abs(t)))?t[1]:NaN}},87965:(t,e,i)=>{i.d(e,{A:()=>o});var a=i(68744),n=i(28715),r=i(80969),s=i(61116);function o(t,e,i,o){var l,c,d,u=(0,a.sG)(t,e,i);switch((o=(0,n.A)(null==o?",f":o)).type){case"s":var m=Math.max(Math.abs(t),Math.abs(e));return null!=o.precision||isNaN(d=Math.max(0,3*Math.max(-8,Math.min(8,Math.floor((0,r.A)(m)/3)))-(0,r.A)(Math.abs(u))))||(o.precision=d),(0,s.s)(o,m);case"":case"e":case"g":case"p":case"r":null!=o.precision||isNaN((l=u,c=Math.abs(c=Math.max(Math.abs(t),Math.abs(e)))-(l=Math.abs(l)),d=Math.max(0,(0,r.A)(c)-(0,r.A)(l))+1))||(o.precision=d-("e"===o.type));break;case"f":case"%":null!=o.precision||isNaN(d=Math.max(0,-(0,r.A)(Math.abs(u))))||(o.precision=d-("%"===o.type)*2)}return(0,s.GP)(o)}}}]);