(function(){"use strict";var e={8779:function(e,t,o){var n=o(9242),s=o(3396);function a(e,t){const o=(0,s.up)("router-view");return(0,s.wg)(),(0,s.j4)(o)}var i=o(89);const r={},l=(0,i.Z)(r,[["render",a]]);var c=l,d=o(678);const u={id:"main",style:{overflow:"hidden"}},h={class:"content-center-full"};function p(e,t,o,n,a,i){const r=(0,s.up)("PageHeader"),l=(0,s.up)("PeopleSearch"),c=(0,s.up)("OrgChart");return(0,s.wg)(),(0,s.iD)(s.HY,null,[(0,s.Wm)(r),(0,s._)("div",u,[(0,s._)("section",h,[(0,s._)("section",null,[(0,s.Wm)(l,{onOnPersonSelected:i.selectPerson,ref:"peopleSearchBox"},null,8,["onOnPersonSelected"]),(0,s.Wm)(c,{ref:"orgchart"},null,512)])])])],64)}var g=o(7139);const f=e=>((0,s.dD)("data-v-128aa3b5"),e=e(),(0,s.Cn)(),e),m=f((()=>(0,s._)("div",{class:"applogo"},null,-1))),w={key:0,id:"usermenu"},y={id:"userprofile-menu",class:"popout"},v={class:"popout-section"},k=f((()=>(0,s._)("br",null,null,-1))),_={class:"email"},x={class:"popout-section"},b=["title"],I=(0,s.Uk)();function C(e,t,o,n,a,i){return(0,s.wg)(),(0,s.iD)("header",null,[m,(0,s._)("div",null,[(0,s._)("a",{id:"userprofile",onClick:t[0]||(t[0]=e=>a.showMenu=!0)},(0,g.zw)(a.userInitials),1),a.showMenu?((0,s.wg)(),(0,s.iD)("div",w,[(0,s._)("div",{id:"userprofile-overlay",onClick:t[1]||(t[1]=e=>a.showMenu=!1)}),(0,s._)("div",y,[(0,s._)("div",v,[(0,s.Uk)((0,g.zw)(a.userName),1),k,(0,s._)("span",_,(0,g.zw)(a.email),1)]),(0,s._)("div",x,[a.isSignedIn?((0,s.wg)(),(0,s.iD)("button",{key:0,onClick:t[2]||(t[2]=e=>i.signOut()),style:{display:"inline"}},"Sign Out")):(0,s.kq)("",!0),a.isSignedIn?(0,s.kq)("",!0):((0,s.wg)(),(0,s.iD)("button",{key:1,onClick:t[3]||(t[3]=e=>i.signIn()),style:{display:"inline"}},"Sign In"))]),(0,s._)("div",{class:"app-version",title:a.appSemVer},[(0,s._)("span",null,"v"+(0,g.zw)(a.appVersion),1),I,(0,s._)("span",null,(0,g.zw)(a.appVersionHash),1)],8,b)])])):(0,s.kq)("",!0)])])}var R=o(8574),S=o.n(R),D=new(S().UserManager)({userStore:new(S().WebStorageStateStore),authority:"https://accounts.google.com",client_id:"285794114001-o39fs947cbn2srd86fk3r2fgruak0n2v.apps.googleusercontent.com",redirect_uri:window.location.origin+"/static/callback.html",response_type:"id_token token",scope:"openid profile email",post_logout_redirect_uri:window.location.origin+"/index.html",silent_redirect_uri:window.location.origin+"/static/silent-renew.html",accessTokenExpiringNotificationTime:10,automaticSilentRenew:!0,filterProtocolClaims:!0,loadUserInfo:!0});function B(){return new Promise(((e,t)=>{D.getUser().then((function(t){return null==t?(z(),e(!1)):e(!0)})).catch((function(e){return console.log(e),t(e)}))}))}function P(){return new Promise(((e,t)=>{D.getUser().then((function(t){return null==t?(z(),e(null)):e(t.id_token)})).catch((function(e){return console.log(e),t(e)}))}))}function O(){return new Promise(((e,t)=>{D.getUser().then((function(t){return null==t?(z(),e(null)):e(t)})).catch((function(e){return console.log(e),t(e)}))}))}function z(){"true"==window.localStorage.getItem("ss_auto_login")&&L(window.location.hash)}function L(e=null){window.localStorage.setItem("ss_auto_login",!0),D.signinRedirect({state:e}).catch((function(e){console.log(e)}))}function U(){window.localStorage.removeItem("ss_auto_login"),D.signoutRedirect().then((function(e){console.log("signed out",e)})).catch((function(e){console.log(e)}))}S().Log.logger=console,S().Log.level=S().Log.NONE,D.events.addUserLoaded((function(e){console.log("Acess_token: ",e.access_token)})),D.events.addAccessTokenExpiring((function(){console.log("AccessToken Expiring:",arguments)})),D.events.addAccessTokenExpired((function(){console.log("AccessToken Expired:",arguments),window.location.reload(),D.signoutRedirect().then((function(e){console.log("signed out",e)})).catch((function(e){console.log(e)}))})),D.events.addSilentRenewError((function(){console.error("Silent Renew Error:",arguments)})),D.events.addUserSignedOut((function(){console.log("UserSignedOut:",arguments),D.signoutRedirect().then((function(e){console.log("signed out",e)})).catch((function(e){console.log(e)}))}));var q={name:"AppHeader",components:{},data(){return{showMenu:!1,isSignedIn:!0,userInitials:"",userName:"",picture:null,email:"",appVersion:"1.3.1",appSemVer:"1.3.1+0.gcac3c2a",appVersionHash:"cac3c2a"}},async mounted(){let e=this;try{if(this.isSignedIn=await B(),this.isSignedIn){let t=await O();e.userInitials=t.profile.given_name.substring(0,1),e.userName=t.profile.name,e.email=t.profile.email}}catch(t){console.log(t)}},methods:{signOut(){U(),location.href="/"},signIn(){L()}}};const E=(0,i.Z)(q,[["render",C],["__scopeId","data-v-128aa3b5"]]);var N=E;const T=e=>((0,s.dD)("data-v-ae858c26"),e=e(),(0,s.Cn)(),e),A=T((()=>(0,s._)("link",{href:"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css",integrity:"sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm",crossorigin:"anonymous",rel:"stylesheet"},null,-1))),$={style:{position:"absolute",top:"140px",right:"1em"}},F={style:{display:"none","padding-right":"1em"}},H=T((()=>(0,s._)("br",null,null,-1))),W=T((()=>(0,s._)("br",null,null,-1))),M=["src"],j={style:{height:"55px",width:"80px","align-self":"flex-end",position:"absolute"}},K={style:{"margin-top":"1ex","font-size":"18px"}},Z={class:"greyed"},Q={class:"group"},V={class:"group"},Y={key:0,class:"greyed"},G={key:0},X=T((()=>(0,s._)("i",{class:"far fa-clipboard"},null,-1))),J=T((()=>(0,s._)("i",{class:"fas fa-check"},null,-1))),ee=[X,J],te={key:1,class:"greyed"},oe={key:0},ne=T((()=>(0,s._)("i",{class:"far fa-clipboard"},null,-1))),se=T((()=>(0,s._)("i",{class:"fas fa-check"},null,-1))),ae=[ne,se],ie={class:"group"},re={key:0,class:"greyed"},le=T((()=>(0,s._)("i",{class:"fas fa-map-marker-alt"},null,-1))),ce=["title"],de=T((()=>(0,s._)("i",{class:"far fa-clock"},null,-1))),ue={class:"group"},he={key:0,class:"greyed"},pe=["href"],ge={class:"greyed"},fe=["href"],me={key:1,id:"department-label"},we={style:{"margin-top":"1ex"}},ye={style:{"font-size":"small","margin-top":"1ex"}},ve={key:2,class:"loadingContainer"},ke=T((()=>(0,s._)("div",{class:"ball1"},null,-1))),_e=T((()=>(0,s._)("div",{class:"ball2"},null,-1))),xe=T((()=>(0,s._)("div",{class:"ball3"},null,-1))),be=T((()=>(0,s._)("div",{class:"ball4"},null,-1))),Ie=[ke,_e,xe,be];function Ce(e,t,o,a,i,r){const l=(0,s.up)("WoltLogo"),c=(0,s.up)("DoordashLogo");return(0,s.wg)(),(0,s.iD)(s.HY,null,[A,(0,s._)("div",$,[i.currentRoot&&i.currentRoot.parentId?((0,s.wg)(),(0,s.iD)("button",{key:0,onClick:t[0]||(t[0]=e=>{r.switchRoot(i.currentRoot.parentId)})},"Up")):(0,s.kq)("",!0),(0,s._)("div",F,[(0,s._)("button",{onClick:t[1]||(t[1]=e=>r.centerChart())},"center chart"),H,(0,s._)("button",{onClick:t[2]||(t[2]=e=>r.navigateToCurrentUser())},"goto myself"),W])]),i.personalInfoBox?((0,s.wg)(),(0,s.iD)("div",{key:0,class:"overlay",onClick:t[5]||(t[5]=(0,n.iM)((e=>i.personalInfoBox=null),["self"]))},[(0,s._)("div",{class:"personalInfoBox",onClick:e=>!1,style:(0,g.j5)({left:i.personalInfoBox.xPos+"px",top:i.personalInfoBox.yPos+"px"})},[(0,s._)("img",{class:"profileImg",src:i.personalInfoBox.imageUrl&&"_"!=i.personalInfoBox.imageUrl?i.personalInfoBox.imageUrl:"/static/noprofile.png"},null,8,M),(0,s._)("div",j,["dd"!=i.personalInfoBox.company?((0,s.wg)(),(0,s.j4)(l,{key:0})):(0,s.kq)("",!0),"dd"==i.personalInfoBox.company?((0,s.wg)(),(0,s.j4)(c,{key:1})):(0,s.kq)("",!0)]),(0,s._)("div",K,(0,g.zw)(i.personalInfoBox.name),1),(0,s._)("div",Z,(0,g.zw)(i.personalInfoBox.positionName),1),(0,s._)("div",Q,[(0,s._)("div",null,(0,g.zw)(i.personalInfoBox.email),1)]),(0,s._)("div",V,[i.personalInfoBox.supOrg?((0,s.wg)(),(0,s.iD)("div",Y,[(0,s.Uk)((0,g.zw)(i.personalInfoBox.supOrg)+" ",1),i.personalInfoBox.supOrgId?((0,s.wg)(),(0,s.iD)("span",G,"("+(0,g.zw)(i.personalInfoBox.supOrgId)+")",1)):(0,s.kq)("",!0),(0,s._)("button",{class:"clipboard",onClick:t[3]||(t[3]=e=>r.copyToClipboard(e,i.personalInfoBox.supOrg))},ee)])):(0,s.kq)("",!0),i.personalInfoBox.costCenterName?((0,s.wg)(),(0,s.iD)("div",te,[(0,s.Uk)((0,g.zw)(i.personalInfoBox.costCenterName)+" ",1),i.personalInfoBox.costCenterId?((0,s.wg)(),(0,s.iD)("span",oe,"("+(0,g.zw)(i.personalInfoBox.costCenterId)+")",1)):(0,s.kq)("",!0),(0,s._)("button",{class:"clipboard",onClick:t[4]||(t[4]=e=>r.copyToClipboard(e,i.personalInfoBox.costCenterName))},ae)])):(0,s.kq)("",!0)]),(0,s._)("div",ie,[i.personalInfoBox.office?((0,s.wg)(),(0,s.iD)("div",re,[le,(0,s.Uk)(" "+(0,g.zw)(i.personalInfoBox.office)+" ",1),(0,s._)("span",{class:(0,g.C_)(r.getFlag(i.personalInfoBox.country))},null,2)])):(0,s.kq)("",!0),i.personalInfoBox.timezone?((0,s.wg)(),(0,s.iD)("div",{key:1,class:"greyed",title:i.personalInfoBox.timezone},[de,(0,s.Uk)(" "+(0,g.zw)(r.getLocalTime(i.personalInfoBox.timezone)),1)],8,ce)):(0,s.kq)("",!0)]),(0,s._)("div",ue,[i.showWorkdayLink&&i.personalInfoBox.profileUrl?((0,s.wg)(),(0,s.iD)("div",he,[(0,s._)("a",{href:i.personalInfoBox.profileUrl,target:"_blank"},"Workday profile",8,pe)])):(0,s.kq)("",!0),(0,s._)("div",ge,[(0,s._)("a",{href:r.getSlackUrl(i.personalInfoBox.slackId),target:"_blank"},"Start chat in Slack",8,fe)])])],4)])):(0,s.kq)("",!0),i.currentRoot?((0,s.wg)(),(0,s.iD)("div",me,["dd"!=i.currentRoot.company?((0,s.wg)(),(0,s.j4)(l,{key:0})):(0,s.kq)("",!0),"dd"==i.currentRoot.company?((0,s.wg)(),(0,s.j4)(c,{key:1})):(0,s.kq)("",!0),(0,s._)("div",we,(0,g.zw)(i.currentRoot.supOrg),1),(0,s._)("div",ye,(0,g.zw)(i.currentRoot.supOrgId),1)])):(0,s.kq)("",!0),(0,s._)("div",{id:"chart-container",onClick:t[6]||(t[6]=(...e)=>r.chartClick&&r.chartClick(...e)),class:"chart-container"}),i.loading?((0,s.wg)(),(0,s.iD)("div",ve,Ie)):(0,s.kq)("",!0)],64)}const Re={class:"w-logo"};function Se(e,t,o,n,a,i){return(0,s.wg)(),(0,s.iD)("div",Re)}var De={name:"WoltLogo"};const Be=(0,i.Z)(De,[["render",Se],["__scopeId","data-v-748e4aca"]]);var Pe=Be;const Oe={class:"dd-logo"};function ze(e,t,o,n,a,i){return(0,s.wg)(),(0,s.iD)("div",Oe)}var Le={name:"DoordashLogo"};const Ue=(0,i.Z)(Le,[["render",ze],["__scopeId","data-v-2bdb1292"]]);var qe=Ue,Ee=o(8335);const Ne="",Te="tony@doordash.com",Ae={Finland:"fi fi-fi",Sweden:"fi fi-se",Estonia:"fi fi-ee",Lativa:"fi fi-lv",Lithuania:"fi fi-lt",Norway:"fi fi-no",Denmark:"fi fi-dk",Germany:"fi fi-de",Greece:"fi fi-gr",Poland:"fi fi-pl",Slovakia:"fi fi-sk",Czechia:"fi fi-cz",Slovenia:"fi fi-si",Hungary:"fi fi-hu",Croatia:"fi fi-hr",Serbia:"fi fi-rs",Azerbaijan:"fi fi-az",Georgia:"fi fi-ge",Kazakhstan:"fi fi-kz",Israel:"fi fi-il",Japan:"fi fi-jp",Canada:"fi fi-ca",Australia:"fi fi-au","United States of America":"fi fi-us"};let $e=null,Fe=window.d3,He=null;var We={name:"OrgChart",components:{WoltLogo:Pe,DoordashLogo:qe},data(){return{currentRoot:null,personalInfoBox:null,loading:!0,showWorkdayLink:!document.URL.includes("doordash.com")}},methods:{copyToClipboard(e,t){navigator.clipboard.writeText(t),e.target.parentNode.classList.add("copied"),setTimeout((()=>{e.target.parentNode.classList.remove("copied")}),1e3)},getLocalTime(e){return Ee.ou.now().setZone(e).toLocaleString(Ee.ou.TIME_24_SIMPLE)},getFlag(e){return Ae[e]},getSlackUrl(e){return"https://slack.com/app_redirect?channel="+e},async navigateToCurrentUser(){let e=await O(),t=this.findNode(e.profile.email);this.switchRoot(t.parentId)},findNode(e){return e.includes("@")?He.filter((t=>t.email==e))[0]:He.filter((t=>t.id==e))[0]},switchRoot(e){let t=this.findNode(e),o=He.filter((e=>e.hierarchy.startsWith(t.hierarchy)));if(t.parentId){let e=null==t.supOrg||""===t.supOrg.trim()?"Up":t.supOrg;o.push({imageUrl:"",id:t.parentId,parentId:null,name:e,up:!0})}o.forEach((e=>{e._expanded=e.id==t.id||e.parentId==t.id}));let n=$e.getChartState();n.data=o,this.currentRoot=t,$e.updateNodesState(),this.centerChart(),this.addHashToLocation(this.currentRoot.id)},addHashToLocation(e){const t=this.$route.path+"#"+encodeURIComponent(e);history.pushState({},null,t)},centerChart(){let e=document.getElementsByClassName("svg-chart-container")[0],t=e.getAttribute("width"),o=this.currentRoot.parentId?0:50,n=$e.getChartState().lastTransform;n.x=t/2,n.y=o,n.k=1,document.querySelectorAll(".svg-chart-container g.center-group")[0].setAttribute("transform",""),document.querySelectorAll(".svg-chart-container g.chart")[0].setAttribute("transform",`translate(${t/2},${o}) scale(1)`)},showDetails(e,t,o){this.personalInfoBox=Object.assign({},this.findNode(e)),this.personalInfoBox.xPos=t,this.personalInfoBox.yPos=o},chartClick(e){let t=this,o=e.target.closest(".open-details-event");if(o)return void t.showDetails(o.parentNode.getAttribute("data-id"),e.clientX,e.clientY);let n=e.target.closest(".slack-chat");if(n)return void window.open(t.getSlackUrl(n.getAttribute("data-slackid")),"_blank");let s=e.target.closest(".org-node")||e.target.closest("#up-node");if(s){let e=s.getAttribute("data-id");e!=t.currentRoot.id&&t.switchRoot(e)}}},async beforeMount(){let e=this,t=Ne+"/api/orgdata";const o=await P();let n=await Fe.csv(t,{headers:{Authorization:o}});He=n,window.allPeople=n;for(let s=0;s120)).nodeWidth((e=>200)).childrenMargin((e=>50)).compactMarginBetween((e=>30)).compactMarginPair((e=>50)).neightbourMargin(((e,t)=>30)).siblingsMargin((e=>30)).buttonContent((({node:e,state:t})=>e.data.up?"":`
\n ${e.children?'':''} \n ${e.data._directSubordinates}
`)).linkUpdate((function(e,t,o){Fe.select(this).attr("stroke",(e=>e.data._upToTheRootHighlighted?"#152785":"#E4E2E9")).attr("stroke-width",(e=>e.data._upToTheRootHighlighted?5:1)),e.data._upToTheRootHighlighted&&Fe.select(this).raise()})).nodeContent((function(t,o,n,s){if(1==t.data.up)return`\n
\n \n
${t.data.name}
\n
\n `;let a="";return"dd"==t.data.company&&(a="dd"),t.data.name.includes("[C]")&&(a="contractor"),`\n
\n \n
\n\n
${t.data.name}
\n
${t.data.positionName}
\n
${t.data.supOrg}
\n
\n \n ${t.data.office}\n ${e.getLocalTime(t.data.timezone)}\n
\n
\n `})),$e.render(),e.loading=!1,$e.fit({animate:!1,nodes:null,scale:!1}),this.switchRoot(this.$route.hash.replace("#","")||Te),setTimeout((function(){e.centerChart()}),100)}};const Me=(0,i.Z)(We,[["render",Ce],["__scopeId","data-v-ae858c26"]]);var je=Me;const Ke=e=>((0,s.dD)("data-v-4c3fb789"),e=e(),(0,s.Cn)(),e),Ze={id:"searchBox"},Qe={id:"outerSearch"},Ve=Ke((()=>(0,s._)("i",{class:"fa fa-search","aria-hidden":"true"},null,-1))),Ye={key:0,class:"searchResults"},Ge={class:"searchFilters"},Xe=Ke((()=>(0,s._)("option",{value:"any",selected:""},"Any country",-1))),Je=["value","selected"],et={class:"teamFilter"},tt=Ke((()=>(0,s._)("div",{class:"",style:{left:"50%",top:"-24.5px",width:"20px",position:"absolute",transform:"translate(-50%, 0)"}},[(0,s._)("svg",{viewBox:"0 0 32 16",style:{filter:"drop-shadow(rgba(0, 0, 0, 0.09) 0px 0px 2px)",fill:"rgb(255, 255, 255)"}},[(0,s._)("path",{d:"M 16,0 L32,16 H0 Z",style:{fill:"rgb(210, 210, 210)"}}),(0,s._)("path",{d:"M 16,1 L31,16 H1 Z"})])],-1))),ot=["onClick"],nt=["src"],st={class:"header"},at={class:"positionName",style:{"margin-top":"1ex",color:"#716E7B","font-size":"13px"}},it={key:0,class:"company"},rt={key:1,class:"company"},lt={key:2,class:"ctrlInfo"},ct={key:0,class:"searchEntry notFoundMessage"},dt={key:0},ut={key:1},ht={key:2};function pt(e,t,o,a,i,r){const l=(0,s.up)("WoltLogo"),c=(0,s.up)("DoordashLogo");return(0,s.wg)(),(0,s.iD)(s.HY,null,[(0,s._)("div",Ze,[(0,s._)("div",Qe,[Ve,(0,s.wy)((0,s._)("input",{id:"orgchartsearch",autocomplete:"off",name:"orgchartsearch",type:"text",ref:"searchBox",autofocus:"",onFocus:t[0]||(t[0]=e=>r.searchPeople()),"onUpdate:modelValue":t[1]||(t[1]=e=>i.searchQuery=e),onKeydown:t[2]||(t[2]=e=>r.handleKeyDown(e)),onKeyup:t[3]||(t[3]=e=>r.handleSearchKey(e)),placeholder:"Search people..."},null,544),[[n.nr,i.searchQuery]])]),i.showResults?((0,s.wg)(),(0,s.iD)("div",Ye,[(0,s._)("div",Ge,[(0,s._)("select",{class:"countryFilter",onChange:t[4]||(t[4]=e=>{i.country=e.currentTarget.value,r.searchPeople()})},[Xe,((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(i.allCountries,(e=>((0,s.wg)(),(0,s.iD)("option",{value:e,key:e,selected:e==i.country},(0,g.zw)(e),9,Je)))),128))],32),(0,s._)("div",et,[(0,s._)("button",{class:(0,g.C_)({active:"any"===this.teamFilter}),onClick:t[5]||(t[5]=e=>{this.teamFilter="any",r.searchPeople()})},"Any",2),(0,s._)("button",{class:(0,g.C_)({active:"dd"===this.teamFilter}),onClick:t[6]||(t[6]=e=>{this.teamFilter="dd",r.searchPeople()})},"DoorDash",2),(0,s._)("button",{class:(0,g.C_)({active:"w"===this.teamFilter}),onClick:t[7]||(t[7]=e=>{this.teamFilter="w",r.searchPeople()})},"Wolt",2)])]),tt,((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(i.searchResult,(e=>((0,s.wg)(),(0,s.iD)("div",{onClick:t=>r.onSelect(e),class:(0,g.C_)({searchEntry:!0,selected:e.searchSelected,ctrlPressed:this.ctrlPressed}),key:e.id},[(0,s._)("img",{src:e.imageUrl},null,8,nt),(0,s._)("div",st,(0,g.zw)(e.name),1),(0,s._)("div",at,(0,g.zw)(e.positionName)+" | "+(0,g.zw)(e.supOrg)+" | "+(0,g.zw)(e.office),1),"w"===e.company?((0,s.wg)(),(0,s.iD)("div",it,[(0,s.Wm)(l,{heigth:"1"})])):(0,s.kq)("",!0),"dd"===e.company?((0,s.wg)(),(0,s.iD)("div",rt,[(0,s.Wm)(c)])):(0,s.kq)("",!0),e.profileUrl?((0,s.wg)(),(0,s.iD)("div",lt,"Press Ctrl+Enter to open in Workday")):(0,s.kq)("",!0)],10,ot)))),128)),i.searchResult&&0===i.searchResult.length?((0,s.wg)(),(0,s.iD)("div",ct,[i.searchQuery?i.searchQuery.length<3?((0,s.wg)(),(0,s.iD)("span",ut,"Search query too short")):((0,s.wg)(),(0,s.iD)("span",ht,"Nothing found :(")):((0,s.wg)(),(0,s.iD)("span",dt,"Start typing to search"))])):(0,s.kq)("",!0)])):(0,s.kq)("",!0)]),i.showResults?((0,s.wg)(),(0,s.iD)("div",{key:0,id:"resultsOverlay",onClick:t[8]||(t[8]=e=>i.showResults=!1)})):(0,s.kq)("",!0)],64)}var gt={emits:["onPersonSelected","resetAndHideSearchBox"],components:{WoltLogo:Pe,DoordashLogo:qe},data(){return{searchResult:[],searchBoxFocused:!0,searchQuery:"",selectedResult:-1,ctrlPressed:!1,teamFilter:"any",country:"any",allCountries:[],showResults:!1}},beforeMount(){let e=setInterval((()=>{!this.allCountries.length&&window.allPeople&&(clearInterval(e),window.allPeople.forEach((e=>{e.country&&!this.allCountries.includes(e.country)&&this.allCountries.push(e.country)})))}),200)},methods:{resetAndHideSearchBox(){this.$refs.searchBox.value="",this.searchResult=null,this.searchBoxFocused=!1,this.searchQuery="",this.selectedResult=-1,this.ctrlPressed=!1,this.teamFilter="any",this.country="any"},onSelect(e){console.log("onSelect"),this.searchResult=null,this.country="any",this.teamFilter="any",this.showResults=!1,this.$emit("onPersonSelected",e)},handleKeyDown(e){e.target.composing=!1,"Control"===e.key&&(this.ctrlPressed=!0,this.$forceUpdate())},handleSearchKey(e){if(this.ctrlPressed=this.ctrlPressed&&"Control"!==e.key,"ArrowDown"===e.code)return this.searchResult&&this.searchResult.length>0&&(this.selectedResult=(this.selectedResult+1)%this.searchResult.length,this.searchResult.forEach(((e,t)=>{e.searchSelected=t==this.selectedResult}))),void(e.prevent=!0);if("ArrowUp"!==e.code){if("Escape"===e.code)return this.selectedResult=-1,this.showResults=!1,void(this.searchResult=null);if("Enter"!==e.code)"Control"!==e.key&&(this.searchQuery.length<2?this.searchResult=[]:(this.selectedResult=-1,this.searchPeople()));else if(this.selectedResult>=0){let t=this.searchResult[this.selectedResult];if(e.ctrlKey)return void window.open(t.profileUrl,"_blank");this.searchResult=null,this.showResults=!1,this.$emit("onPersonSelected",t)}}else this.searchResult&&this.searchResult.length>0&&(this.selectedResult=(this.selectedResult-1+this.searchResult.length)%this.searchResult.length,this.searchResult.forEach(((e,t)=>{e.searchSelected=t==this.selectedResult})))},searchPeople(){if(this.searchQuery.length<2)return void(this.searchResult=[]);let e=window.allPeople,t=null,o=this.searchQuery.toLowerCase();if(void 0!==e[0].managedOrgId&&/sup[0-9]+/gi.test(o))t=e.filter((e=>o==e.managedOrgId.toLowerCase()));else if(isNaN(o)){let n=o.replace(/\u0142/g,"l").replace(/[æÆ]/g,"ae").normalize("NFKD").replace(/\p{Diacritic}/gu,"").toLowerCase().split(" ");t=e.filter((e=>{let t=e.nameNoAccents.toLowerCase().split(" "),s=e.country.toLowerCase(),a=void 0!==e.managedOrg?e.managedOrg.toLowerCase():"",i=e.supOrg.toLowerCase();if(2==o.length)return o==i;if("any"!==this.teamFilter&&this.teamFilter!==e.company)return!1;if("any"!==this.country&&this.country!==e.country)return!1;if(o.includes(a)&&a)return!0;if(i.includes(o))return!0;if(e.email.toLowerCase().includes(o.toLowerCase()))return!0;for(let o of n)if(!t.some((e=>e.startsWith(o)))&&!s.startsWith(o))return!1;return!0}))}else{let n=o.trim();t=e.filter((e=>n==e.id))}this.searchResult=t.slice(0,10);for(let n=0;n0||"any"!==this.teamFilter||"any"!==this.country}}};const ft=(0,i.Z)(gt,[["render",pt],["__scopeId","data-v-4c3fb789"]]);var mt=ft,wt={name:"HomePage",components:{PageHeader:N,OrgChart:je,PeopleSearch:mt},data(){return{options:[]}},methods:{selectPerson(e){this.$refs.orgchart.switchRoot(e.id)}}};const yt=(0,i.Z)(wt,[["render",p],["__scopeId","data-v-354122f7"]]);var vt=yt;const kt={id:"login"},_t={id:"login-background"},xt={class:"center-block"},bt=(0,s._)("div",{class:"logo-container"},null,-1);function It(e,t,o,n,a,i){return(0,s.wg)(),(0,s.iD)("div",kt,[(0,s._)("div",_t,[(0,s._)("div",xt,[bt,(0,s._)("button",{id:"signin",type:"submit",autofocus:"",onClick:t[0]||(t[0]=e=>i.signIn())},"Sign in")])])])}var Ct={name:"LoginPage",methods:{signIn(){const e=new URLSearchParams(window.location.search),t=e.get("ref");L(t)}}};const Rt=(0,i.Z)(Ct,[["render",It]]);var St=Rt;const Dt=[{path:"/",name:"Home",component:vt,meta:{requiresAuth:!0}},{path:"/login",name:"Login",component:St,meta:{requiresAuth:!1}}];var Bt=(0,d.p7)({history:(0,d.PO)("/"),routes:Dt});(0,n.ri)(c).use(Bt).mount("#app"),Bt.beforeEach(((e,t,o)=>{const n=e.matched.some((e=>e.meta.requiresAuth));n?B().then((t=>{t?O().then((e=>{e.profile.email.includes("@wolt.com")||e.profile.email.includes("@external.wolt.com")||e.profile.email.includes("@doordash.com")||e.profile.email.includes("@ext.doordash.com")?o():o("/login")})):o({path:"/login",query:{ref:e.fullPath}})}),(e=>{console.log(e),o("/login")})):o()}))}},t={};function o(n){var s=t[n];if(void 0!==s)return s.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,o),a.exports}o.m=e,function(){var e=[];o.O=function(t,n,s,a){if(!n){var i=1/0;for(d=0;d=a)&&Object.keys(o.O).every((function(e){return o.O[e](n[l])}))?n.splice(l--,1):(r=!1,a0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[n,s,a]}}(),function(){o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,{a:t}),t}}(),function(){o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={143:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var s,a,i=n[0],r=n[1],l=n[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(s in r)o.o(r,s)&&(o.m[s]=r[s]);if(l)var d=l(o)}for(t&&t(n);c