PageSourceSearch

https://www.herobi.io/static/js/625.ee3f456e.chunk.js

js herobi.io collected 2026-10-06 04:31:53 UTC 21,755 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkhero_bi=self.webpackChunkhero_bi||[]).push([[625],{13625:(e,t,n)=>{n.r(t),n.d(t,{default:()=>He});var i=n(9950),r=n(80806),a=n(46589),s=n(16673),o=n(39694),c=n(74745),l=n(82053),d=n(18216),h=n(73952),u=n(86255),p=n(25513),x=n(55858),m=n(23647),f=n(27781),g=n(30897),j=n(93047),y=n(41413),A=n(44414);const v=e=>{const{className:t,...n}=e,i=e.user;let r="",a={name:"",bio:""};return i&&(r="accountAdmin"===i.role?"Account Admin":"Account Viewer",a={name:"".concat(i.firstName," ").concat(i.lastName),bio:r}),(0,A.jsxs)("div",{...n,style:{display:"flex",flexDirection:"column",alignItems:"center",minHeight:"fit-content",marginTop:"true"===e.istopnotification?30:0},children:[(0,A.jsx)(y.A,{alt:"Person",sx:e=>({width:60,height:60,backgroundColor:e.palette.secondary.main,color:"black"}),component:j.N_,to:"/profile-page",src:i?i.avatarUrl:null,children:i&&"".concat(i.firstName[0]).concat(i.lastName[0])}),(0,A.jsx)(l.A,{style:{marginTop:8},variant:"h4",align:"center",children:(0,A.jsx)(j.N_,{to:"/profile-page",style:{color:"black"},children:a.name})}),(0,A.jsx)(l.A,{variant:"body2",children:a.bio})]})};var w=n(2803),b=n(59254),S=n(249),k=n(64446),D=n(53065),C=n(25333),T=n(3536),I=n(65429),R=n(74465),L=n(7999),E=n(57988),P=n(13246),z=n(18726),M=n(33738),N=n(53316),B=n(35256),W=n(35184);const O=(0,b.Ay)(d.A)((e=>{let{theme:t}=e;return{color:h.A[800],padding:"10px 8px",justifyContent:"flex-start",textTransform:"none",letterSpacing:0,width:"100%",fontWeight:t.typography.fontWeightMedium,"&.selected":{color:t.palette.primary.main,fontWeight:t.typography.fontWeightMedium}}})),_=(0,b.Ay)("div")((e=>{let{theme:t}=e;return{color:"inherit",width:24,height:24,display:"flex",alignItems:"center",marginRight:t.spacing(1)}})),H=(0,b.Ay)("div")((e=>{let{theme:t}=e;return{color:t.palette.icon,width:24,height:24,display:"flex",alignItems:"flex-end",marginLeft:"auto"}})),Y=(0,i.forwardRef)(((e,t)=>(0,A.jsx)("div",{ref:t,style:{flexGrow:1},children:(0,A.jsx)(j.k2,{...e})}))),U=e=>{const{pages:t}=e,[n,r]=i.useState(!0),[a,s]=i.useState(!0),[o,c]=i.useState(!0),[l,d]=i.useState(!0),[h,u]=i.useState(!1),[p,x]=(0,i.useState)("success"),[m,f]=(0,i.useState)(""),[j,y]=(0,i.useState)(null),[v,b]=(0,i.useState)(""),[U,G]=(0,i.useState)(!1),[F,J]=(0,i.useState)(""),[V,X]=(0,i.useState)({}),[$,q]=(0,i.useState)(!1),K=()=>{d(!l)},Q=(e,t)=>{u(!1)},Z=t.findIndex((e=>"Reports"===e.title)),ee=t.findIndex((e=>"My Reports"===e.title)),te=t.findIndex((e=>"Shared With Me"===e.title)),ne=t.findIndex((e=>"Management"===e.title)),ie=R.parse(window.location.search);return(0,A.jsxs)("div",{children:[(0,A.jsx)(S.A,{children:t.map(((t,d)=>{if(!t.subroute||d!==Z&&d!==ee&&d!==te){if(t.subroute&&d===ne){const e=t.subrouteData.map((e=>e.href));return(0,A.jsxs)(i.Fragment,{children:[(0,A.jsx)(k.Ay,{style:{display:"flex",paddingTop:0,paddingBottom:0},disableGutters:!0,onClick:K,children:(0,A.jsxs)(O,{className:(0,w.A)({selected:e.find((e=>window.location.pathname.includes(e)))}),children:[(0,A.jsx)(_,{children:t.icon}),t.title,(0,A.jsx)(H,{children:l?(0,A.jsx)(P.A,{}):(0,A.jsx)(z.A,{})})]})}),(0,A.jsx)(M.A,{in:l,timeout:"auto",unmountOnExit:!0,children:(0,A.jsx)(S.A,{component:"div",disablePadding:!0,children:t.subrouteData.map((e=>(0,A.jsx)(k.Ay,{style:{display:"flex",paddingTop:0,paddingBottom:0,paddingLeft:32},disableGutters:!0,children:(0,A.jsxs)(O,{className:(0,w.A)({selected:window.location.pathname===e.href}),component:Y,to:e.href,children:[(0,A.jsx)(_,{children:e.icon}),e.title,e.beta&&(0,A.jsx)(D.A,{title:"Beta feature",children:(0,A.jsx)("img",{style:{marginLeft:5},width:"40",src:"/images/betaicon.svg",alt:"Beta Icon"})})]})},e.title)))})})]},t.title)}return(0,A.jsx)(k.Ay,{style:{display:"flex",paddingTop:0,paddingBottom:0},disableGutters:!0,children:(0,A.jsxs)(O,{className:(0,w.A)({selected:window.location.pathname===t.href}),component:Y,to:t.href,children:[(0,A.jsx)(_,{children:t.icon}),t.title]})},t.title)}return(0,A.jsxs)(i.Fragment,{children:[(0,A.jsx)(k.Ay,{style:{display:"flex",paddingTop:0,paddingBottom:0},disableGutters:!0,onClick:()=>(e=>{e===Z?r(!n):e===ee?s(!a):c(!o)})(d),children:(0,A.jsxs)(O,{className:(0,w.A)({selected:d===Z?t.subrouteData.find((e=>e.href===window.location.pathname&&!ie.reportID)):t.subrouteData.find((e=>e.href.includes(ie.reportID)))}),children:[(0,A.jsx)(_,{children:t.icon}),t.title,(0,A.jsx)(H,{children:d===Z?n?(0,A.jsx)(P.A,{}):(0,A.jsx)(z.A,{}):d===ee?a?(0,A.jsx)(P.A,{}):(0,A.jsx)(z.A,{}):o?(0,A.jsx)(P.A,{}):(0,A.jsx)(z.A,{})})]})}),(0,A.jsx)(M.A,{in:d===Z?n:d===ee?a:o,timeout:"auto",unmountOnExit:!0,children:(0,A.jsx)(S.A,{component:"div",disablePadding:!0,children:t.subrouteData.map(((n,i)=>(0,A.jsx)(k.Ay,{style:{display:"flex",paddingTop:0,paddingBottom:0,paddingLeft:32},disableGutters:!0,children:(0,A.jsx)(D.A,{title:d===ee?(0,A.jsxs)("div",{children:[(0,A.jsx)(D.A,{title:"Edit saved report",children:(0,A.jsx)(C.A,{color:"primary",onClick:()=>{G(n.isShared),X(n.params),y(n.reportID),b(n.title),J(n.page),q(!0)},size:"large",children:(0,A.jsx)(L.A,{})})}),(0,A.jsx)(D.A,{title:"Delete saved report",children:(0,A.jsx)(C.A,{color:"primary",onClick:()=>{(0,g.y8)(n.reportID,e.updateuser)?(x("success"),f("The report was deleted"),ie.reportID===n.reportID&&e.history.push(t.href)):(x("error"),f("Problem deleting the report. We are looking into it")),u(!0)},size:"large",children:(0,A.jsx)(E.A,{})})})]}):"",placement:"right",arrow:!0,leaveDelay:100,children:(0,A.jsx)("div",{children:(0,A.jsx)("div",{children:(0,A.jsxs)(O,{className:(0,w.A)({selected:d===Z?n.href===window.location.pathname&&!ie.reportID:n.href.includes(ie.reportID)}),component:Y,to:n.href,children:[d===Z&&(0,A.jsx)(_,{children:n.icon}),n.title,n.isShared&&n.isOwner&&(0,A.jsx)(N.A,{fontSize:"small",style:{marginLeft:5}}),n.beta&&(0,A.jsx)(D.A,{title:"Beta feature",children:(0,A.jsx)("img",{style:{marginLeft:5},width:"40",src:"/images/betaicon.svg",alt:"Beta Icon"})}),n.locked&&(0,A.jsx)(B.A,{fontSize:"small",style:{marginLeft:10}})]})})})})},"".concat(n.title,"-").concat(i))))})})]},t.title)}))}),(0,A.jsx)(W.yP,{history:e.history,showbutton:!1,reportid:j,reportname:v,isowner:!0,isshared:U,setreportname:()=>{},page:"",params:V,dialogdisplayed:$,setdialogdisplayed:q}),(0,A.jsx)(T.A,{open:h,autoHideDuration:5e3,onClose:Q,children:(0,A.jsx)(I.A,{onClose:Q,severity:p,children:m})})]})};var G,F,J,V,X,$,q,K,Q=n(82600),Z=n(77536),ee=n(34879),te=n(95222),ne=n(50432),ie=n(74044),re=n(9360);function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ae.apply(this,arguments)}function se(e,t){let{title:n,titleId:r,...a}=e;return i.createElement("svg",ae({id:"Layer_1",style:{enableBackgroun
1d:"new 0 0 30 30"},viewBox:"0 0 30 30",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},a),n?i.createElement("title",{id:r},n):null,G||(G=i.createElement("circle",{cx:24,cy:6,r:2})),F||(F=i.createElement("circle",{cx:18,cy:13,r:2})),J||(J=i.createElement("circle",{cx:12,cy:9,r:2})),V||(V=i.createElement("circle",{cx:6,cy:12,r:2})),i.createElement("polyline",{points:"  6,12 12,9 18,13 24,6 ",style:{fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10}}),X||(X=i.createElement("circle",{cx:24,cy:20,r:2})),$||($=i.createElement("circle",{cx:18,cy:24,r:2})),q||(q=i.createElement("circle",{cx:12,cy:18,r:2})),K||(K=i.createElement("circle",{cx:6,cy:25,r:2})),i.createElement("polyline",{points:"  6,25 12,18 18,24 24,20 ",style:{fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10}}))}const oe=i.forwardRef(se);n.p;function ce(e){return(0,A.jsx)(re.A,{...e,viewBox:"0 0 50 50",children:(0,A.jsx)(oe,{})})}var le=n(53519),de=n(31451),he=n(81374),ue=n(78451),pe=n(17009),xe=n(37074),me=n(92098),fe=n(47822),ge=n(49916),je=n(25783),ye=n(80518),Ae=n(76515);n.p;n.p;const ve=e=>{const{open:t,variant:n,onClose:r,className:a,...g}=e,j=(0,s.W6)(),{user:y,updateUser:w}=(0,i.useContext)(Ae.Rs),{updateAccount:b}=(0,i.useContext)(Ae.Lu),[S,k]=(0,i.useState)([]),[D,C]=(0,i.useState)(null),[T,I]=(0,i.useState)(!1),[R,L]=(0,i.useState)([]),[E,P]=(0,i.useState)("");(0,i.useEffect)((()=>{const e=[{title:"Dashboard",href:"/dashboard",icon:(0,A.jsx)(u.A,{}),subroute:!1},{title:"Reports",href:"/revenue",icon:(0,A.jsx)(p.A,{}),subroute:!0,subrouteData:[{title:"Cost",icon:(0,A.jsx)(te.A,{}),href:"/cost"},{title:"Hours",icon:(0,A.jsx)(ne.A,{}),href:"/hours"},{title:"Headcount",icon:(0,A.jsx)(ie.A,{}),href:"/people"},{title:"Metrics",icon:(0,A.jsx)(je.A,{}),href:"/metrics",beta:!0},{title:"Year Over Year",icon:(0,A.jsx)(ce,{}),href:"/year-over-year"},{title:"Trend finder",icon:(0,A.jsx)(ye.A,{}),href:"/correlation",beta:!1},{title:"Team",icon:(0,A.jsx)(he.A,{}),href:"/team"},{title:"Clients",icon:(0,A.jsx)(ue.A,{}),href:"/clients"}]}];(0,Q.yn)().then((t=>{let n=!1;t&&(t.currencies&&k(t.currencies),n=t.planData.forecastAvailable,e[1].subrouteData.splice(0,0,{title:"Revenue",icon:(0,A.jsx)(Z.A,{}),href:t.invoiceRevenue?"/invoice-rev":"/revenue"}),e[1].subrouteData.splice(2,0,{title:"Profit",icon:(0,A.jsx)(ee.A,{}),href:t.invoiceRevenue?"/invoice-prof":"/profit-over-time"}),"Harvest"===t.timeTracking&&(e[1].subrouteData.splice(6,0,{title:"Open Invoices",icon:(0,A.jsx)(le.A,{}),href:"/open-ar"}),e[1].subrouteData.splice(7,0,{title:"Days Outstanding",icon:(0,A.jsx)(de.A,{}),href:"/historical-ar"})),e[1].subrouteData.push({title:"Projects",icon:(0,A.jsx)(xe.A,{}),href:"/projects",locked:t.planData&&2===t.planData.currentPlan}),I((0,Q.xI)(t)),P(1===t.planData.currentPlan?"Free Trial":2===t.planData.currentPlan?"Free Plan":""),(0,f.z1)().then((n=>{const i=n.user;if(i&&y){if(C(i),y.role.includes("Admin")&&(e.push({title:"Management",href:"/account-management",icon:(0,A.jsx)(x.A,{}),subroute:!0,subrouteData:[{title:"Account",icon:(0,A.jsx)(pe.A,{}),href:"/account-management"}]}),t.planData&&t.planData.currentPlan>10&&e[e.length-1].subrouteData.push({title:"Referrals",icon:(0,A.jsx)(ge.A,{}),href:"/referrals"})),y.savedReports.myReports.length>0){const t=e.findIndex((e=>"Reports"===e.title));e.splice(t,0,{title:"My Reports",icon:(0,A.jsx)(me.A,{}),href:"/".concat(y.savedReports.myReports[0].page),subroute:!0,subrouteData:y.savedReports.myReports.map((e=>({title:e.name,href:"/".concat(e.page,"?reportID=").concat(e._id),reportID:e._id,params:e.params,isShared:e.isShared,isOwner:!0,page:e.page})))})}if(y.savedReports.sharedReports.length>0){const t=e.findIndex((e=>"Reports"===e.title));e.splice(t,0,{title:"Shared With Me",icon:(0,A.jsx)(fe.A,{}),href:"/".concat(y.savedReports.sharedReports[0].page),subroute:!0,subrouteData:y.savedReports.sharedReports.map((e=>({title:e.name,href:"/".concat(e.page,"?reportID=").concat(e._id)})))})}L([...e])}})))}))}),[y]);return(0,A.jsx)(o.Ay,{anchor:"left",sx:{"& .MuiDrawer-paper":{width:240,marginTop:"64px",height:"calc(100% - 64px)"}},onClose:r,open:t,variant:n,children:(0,A.jsxs)("div",{...g,style:{display:"flex",flexDirection:"column",height:"100%",padding:16},children:[(0,A.jsx)(v,{istopnotification:T.toString(),user:D}),""!==E&&(0,A.jsx)(c.A,{sx:e=>({margin:e.spacing(2,0)})}),""!==E&&(0,A.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,A.jsx)(l.A,{variant:"h5",align:"center",children:E}),y.role.includes("Admin")&&(0,A.jsx)(d.A,{variant:"contained",size:"small",color:"secondary",style:{marginLeft:10},onClick:()=>{j.push("/account-management?planChange=1")},children:E.includes("Plan")?"upgrade":"Choose plan"})]}),(0,A.jsx)(c.A,{sx:e=>({margin:e.spacing(2,0)}),onClick:w}),(0,A.jsx)(U,{pages:R,currencies:S,updateuser:w,history:j}),(0,A.jsx)(c.A,{sx:e=>({margin:e.spacing(2,0)})}),(0,A.jsxs)(d.A,{sx:e=>({color:h.A[800],padding:"10px 8px",justifyContent:"flex-start",textTransform:"none",letterSpacing:0,width:"100%",fontWeight:e.typography.fontWeightMedium}),onClick:async()=>{await(0,f.ri)(),w(),b(),j.push("/login")},children:[(0,A.jsx)("div",{style:{width:24,height:24,display:"flex",alignItems:"center",marginRight:8},children:(0,A.jsx)(m.A,{})}),"Log out"]}),(0,A.jsx)(c.A,{sx:e=>({margin:e.spacing(2,0)})})]})})};var we=n(88060),be=n(83239),Se=n(60899),ke=n(81408),De=n(66699),Ce=n(97968),Te=n(48089),Ie=n(98329),Re=n(16491),Le=n(99624),Ee=n(73647),Pe=n(86580),ze=n(16243),Me=n(25045),Ne=n.n(Me),Be=n(31270),We=n(72215);const Oe=e=>{const{className:t,onSidebarOpen:n,...r}=e,a=R.parse(window.location.search),o=(0,s.W6)(),{updateUser:c}=(0,i.useContext)(Ae.Rs),{updateAccount:h}=(0,i.useContext)(Ae.Lu),[u,p]=(0,i.useState)(0),[x,g]=(0,i.useState)([]),[y,v]=(0,i.useState)(!1),[w,b]=(0,i.useState)(""),[S,k]=(0,i.useState)({currentSyncTask:"idle"}),[T,I]=(0,i.useState)(!1),[L,E]=(0,i.useState)(""),P=(0,i.useRef)(!1),[z,M]=(0,i.useState)(!1),[N,B]=(0,i.useState)(!1),[O,_]=(0,i.useState)(!1),[H,Y]=(0,i.useState)(!1),[U,G]=(0,i.useState)(!1),[F,J]=(0,i.useState)(""),[V,X]=(0,i.useState)(!1),[$,q]=(0,i.useState)(!1),[K,Z]=(0,i.useState)(!1),[ee,te]=(0,i.useState)(!1),[ne,ie]=(0,i.useState)(null),re=e=>{(0,Q.yn)().then((t=>{if(t){b(Ne()(t.lastSyncDate).fromNow()),k(t),G((0,Q.xI)(t)),J(((e,t)=>{if(1===e.planData.currentPlan&&Ne()().isAfter(Ne()(e.planData.expirationDate)))return(0,A.jsxs)(l.A,{variant:"h5",noWrap:!0,children:["Your trial has ended. ",t?"Please choose one of plans below":"Ask your heroBI admin to sign up for one the plans below"]});if(Ne()().isAfter(Ne()(e.planData.expirationDate)))return(0,A.jsxs)(l.A,{variant:"h5",noWrap:!0,children:["Your plan has expired ",t&&". Please choose one of plans below"]});if(2===e.planData.currentPlan)return(0,A.jsxs)(l.A,{variant:"h5",noWrap:!0,children:["Your free plan includes one year of data, with limited report options",t&&". ",t&&(0,A.jsx)(j.N_,{to:"/account-management?planChange=1",children:"Click here to upgrade"})]});if(1===e.planData.currentPlan){let n=7;return e.planData.expirationDate&&(n=Ne()(e.planData.expirationDate).diff(Ne()(),"days")+1),(0,A.jsxs)(l.A,{variant:"h5",noWrap:!0,children:["Your free trial will expire in ",n," ",1===n?"day":"days",t&&". ",t&&(0,A.jsx)(j.N_,{to:"/account-management?planChange=1",children:"Click here to choose a plan"})]})}return e.numOfActiveUsers>e.planData.usersLimit?(0,A.jsxs)(l.A,{variant:"h5",noWrap:!0,children:[e.numOfActiveUsers-e.planData.usersLimit===1?"Time entries by one blocked active user are not categorized":"Time entries by ".concat(e.numOfActiveUsers-e.planData.usersLimit," blocked active users are not categorized"),". ",t?(0,A.jsx)(j.N_,{to:"/account-management",children:"To fix it, upgrade your plan"}):"Fix it by upgrading your plan"]}):""})(t,e)),ie(t.lastReactivateDate);const n=t.userTags.length+t.clientTags.length+t.projectTags.length;if(Z(n>=t.planData.tagsLimit),"idle"!==t.currentSyncTask)P.current=!0,setTimeout((()=>{re(e)}),2e3);else if(P.current&&!window.location.pathname.includes("email-verification"))console.log("reloading page"),window.location.reload();else{if(P.current=!1,M(!1),t.initialSyncCompleted){B(!0);let n=!1;
1t.userTags.forEach((e=>{e.values.length>1&&(n=!0)})),t.seenOnboarding||n||window.location.pathname.includes("email-verification")?"1"===a.reactivate&&2===t.planData.currentPlan&&e&&te(!0):(console.log("open onboarding"),_(!0))}"fail"===t.lastSyncStatus?(I(!0),E(t.lastSyncErrorMessage)):(I(!1),E(""))}}}))},ae=()=>{te(!1)},se=()=>{(0,Be.y)("Sync","Sync now click"),P.current=!0,M(!0),fetch("".concat(ze.Ay.url,"/api/accounts/me/sync"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:(0,ze.gf)()}}),setTimeout((()=>{re(V)}),2e3)},oe=async()=>{try{const e=document.getElementById("favicon"),t=await fetch("".concat(ze.Ay.url,"/api/notifications/unread"),{method:"GET",headers:{"Content-Type":"application/json",Authorization:(0,ze.gf)()}});if(!t.ok)return;const n=(await t.json()).unread;p(n),n?"/favicon-n.ico"!==e.href&&(e.href="/favicon-n.ico"):"/favicon.ico"!==e.href&&(e.href="/favicon.ico"),setTimeout((()=>{oe()}),1e4)}catch(e){console.log("Error getting notifications",e)}};return(0,i.useEffect)((()=>{let e=!1;return(0,f.z1)().then((t=>{t.user&&t.user.role.includes("Admin")&&(X(!0),e=!0),re(e)})),oe(),()=>{}}),[]),(0,A.jsxs)(we.A,{...r,style:{boxShadow:"none"},children:[(0,A.jsx)(be.A,{children:(0,A.jsxs)(Se.Ay,{container:!0,alignItems:"center",justifyContent:"space-between",children:[(0,A.jsx)(Se.Ay,{item:!0,md:2,children:(0,A.jsx)(j.N_,{to:"/",children:(0,A.jsx)("img",{alt:"Logo",src:"/images/logos/logo.svg",height:"55"})})}),"idle"===S.currentSyncTask?(0,A.jsx)(Se.Ay,{item:!0,md:6,children:(0,A.jsxs)(Se.Ay,{container:!0,justifyContent:"center",alignItems:"center",spacing:2,children:[(0,A.jsx)(ke.A,{smDown:!0,children:(0,A.jsx)(Se.Ay,{item:!0,md:6,style:{textAlign:"right"},children:T?(0,A.jsx)(l.A,{children:"Sync error: ".concat(L)}):(0,A.jsx)(l.A,{children:""!==w&&"Last update: ".concat(w)})})}),(0,A.jsx)(ke.A,{mdDown:!0,children:(0,A.jsx)(Se.Ay,{item:!0,md:6,children:"Please reconnect to Harvest"!==L&&"Insufficient permissions"!==L&&"401"!==L||!V?(0,A.jsx)(d.A,{startIcon:(0,A.jsx)(Pe.A,{}),onClick:se,disabled:z||!N,children:"Sync now"}):(0,A.jsx)(d.A,{startIcon:(0,A.jsx)(Pe.A,{}),onClick:()=>{q(!0)},disabled:z||!N,children:"Connect to Harvest"})})})]})}):(0,A.jsx)(Se.Ay,{item:!0,md:4,children:(0,A.jsxs)(Se.Ay,{container:!0,direction:"row",justifyContent:"center",alignItems:"center",spacing:1,children:[(0,A.jsx)(Se.Ay,{item:!0,md:12,style:{textAlign:"center"},children:(0,A.jsx)(l.A,{children:null!==S.currentTaskTimeLeft?"".concat(S.currentSyncTask," (").concat(Ne().duration(parseInt(S.currentTaskTimeLeft)+1e3).humanize()," left)"):"".concat(S.currentSyncTask," (estimating time left...)")})}),(0,A.jsx)(Se.Ay,{item:!0,md:12,children:(0,A.jsx)(De.A,{variant:"determinate",value:parseInt(S.currentSyncPercentComplete)})})]})}),(0,A.jsxs)(Se.Ay,{item:!0,md:3,style:{textAlign:"end"},children:[(0,A.jsx)(D.A,{title:"Notifications",children:(0,A.jsx)(C.A,{color:"inherit",onClick:()=>{(async()=>{const e=await fetch("".concat(ze.Ay.url,"/api/notifications/me?sortBy=createdAt_desc"),{method:"GET",headers:{"Content-Type":"application/json",Authorization:(0,ze.gf)()}}),t=await e.json();g(t),v(!0)})()},size:"large",children:(0,A.jsx)(Ce.A,{badgeContent:u>5?"5+":u,color:"error",children:(0,A.jsx)(Ee.A,{})})})}),(0,A.jsxs)(ke.A,{lgDown:!0,children:[V&&(0,A.jsx)(D.A,{title:K?"Upgrade your plan to add more categories":"Client categorization wizard",children:(0,A.jsx)("span",{children:(0,A.jsx)(C.A,{disabled:K,style:{marginLeft:8},color:"inherit",onClick:()=>{Y(!0)},size:"large",children:(0,A.jsx)(ue.A,{})})})}),V&&(0,A.jsx)(D.A,{title:K?"Upgrade your plan to add more categories":"People categorization wizard",children:(0,A.jsx)("span",{children:(0,A.jsx)(C.A,{disabled:K,style:{marginLeft:8},color:"inherit",onClick:()=>{_(!0)},size:"large",children:(0,A.jsx)(he.A,{})})})}),(0,A.jsx)(D.A,{title:"Log out",children:(0,A.jsx)(C.A,{style:{marginLeft:8},color:"inherit",onClick:async()=>{await(0,f.ri)(),h(),c(),o.push("/login")},size:"large",children:(0,A.jsx)(m.A,{})})})]}),(0,A.jsx)(ke.A,{lgUp:!0,children:(0,A.jsx)(C.A,{color:"inherit",onClick:n,size:"large",children:(0,A.jsx)(Le.A,{})})})]}),(0,A.jsx)(Se.Ay,{item:!0,xs:12})]})}),U&&(0,A.jsx)(Te.A,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:30},children:F}),V&&(0,A.jsx)(W.M7,{isopen:H,setisopen:Y,type:"clients"}),V&&(0,A.jsx)(W.M7,{isopen:O,setisopen:_,type:"users",opennextwizard:()=>{Y(!0)}}),(0,A.jsx)(We.A,{displayed:$,close:()=>{q(!1)},reconnect:"true",title:"Reconnect your time-tracker"}),(0,A.jsx)(W.$0,{open:y,closenotifications:()=>{fetch("".concat(ze.Ay.url,"/api/notifications/read"),{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:(0,ze.gf)()}}),p(0);document.getElementById("favicon").href="/favicon.ico",v(!1)},notifications:x,history:o}),(0,A.jsx)(Ie.A,{open:ee,onClose:ae,children:(0,A.jsxs)(Re.A,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,outline:"none"},children:[(0,A.jsx)(l.A,{id:"reconnect-modal-title",variant:"h5",component:"h2",children:"Welcome Back!"}),(0,A.jsx)(l.A,{id:"reconnect-modal-description",sx:{mt:2},children:!ne||ne&&Ne()(ne).isBefore(Ne()().subtract(3,"months"))?"Click below to reactivate your fully-featured free trial and sync the latest data from Harvest":"Free trial was last activated on ".concat(Ne()(ne).format("MMMM Do YYYY"),". Need more time? Just let us know using the live chat")}),(0,A.jsx)(d.A,{variant:"contained",color:"primary",disabled:ne&&!Ne()(ne).isBefore(Ne()().subtract(3,"months")),onClick:async()=>{te(!1),analytics.track("Trial reactivated");try{const e=await fetch("".concat(ze.Ay.url,"/api/accounts/me/reactivate-trial"),{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:(0,ze.gf)()}}),t=await e.json();if(!e.ok)throw new Error(t.error||"Failed to reactivate trial");se()}catch(e){console.error("Error reactivating trial:",e.message)}},sx:{mt:2},children:"Reactivate!"}),(0,A.jsx)(d.A,{onClick:ae,sx:{mt:2},children:"Close"})]})})]})};var _e=n(86898);const He=e=>{const{children:t}=e,n=(0,r.A)(),s=(0,a.A)(n.breakpoints.up("lg"),{defaultMatches:!0}),[o,c]=(0,i.useState)(!1),l=!!s||o;return(0,A.jsxs)("div",{style:{paddingTop:64,height:"100%",...s&&{paddingLeft:240}},children:[(0,A.jsx)(Oe,{onSidebarOpen:()=>{c(!0)}}),(0,A.jsx)(ve,{onClose:()=>{c(!1)},open:l,variant:s?"persistent":"temporary"}),(0,A.jsxs)("main",{style:{height:"100%"},children:[t,(0,A.jsx)(_e.w,{})]})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.