1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9109],{29109:function(e,s,l){l.d(s,{T:function(){return J}});var t=l(85893),n=l(9008),i=l.n(n),a=l(41664),c=l.n(a),r=l(67294),o=l(34526),d=l(11842),h=l(53719),x=l(91932),m=l(18083),u=l(44156),v=l(5096),p=l(75702),j=l(21528),f=l(31373),b=l.n(f),g=l(1864),w=l.n(g),N=l(29171),k=(l(39713),l(50788)),y=l(34023),A=l(64975),C=l(62442),_=l(33483);const B=e=>{let{avatarPath:s,accountName:l}=e;const{isOpen:n,setIsOpen:i}=(0,d.w)(),[a,c]=(0,r.useState)("");return(0,r.useEffect)((()=>{(async()=>{try{const e=(0,C.W)(l||"",s);if(!w().extname(e).toLowerCase().startsWith(".heic"))return void c(e);const t=await fetch(e),n=await t.blob(),i=await(0,j.U)({blob:n,type:"image/jpeg",quality:1}),a=URL.createObjectURL(i);c(a)}catch(e){c((0,C.W)(l||"",null))}})()}),[l,s]),(0,t.jsx)(N.Z,{onVisibleChange:e=>{i(e)},placement:"bottomRight",visible:n,trigger:"click",overlay:(0,t.jsx)(_.D,{}),children:(0,t.jsx)("div",{children:(0,t.jsx)(y.z,{size:"large",color:"white",variant:"outlined",className:"font-semibold focus:shadow-none h-11",children:(0,t.jsxs)("div",{className:"flex flex-row items-center gap-[8px]",children:[s?(0,t.jsx)("div",{className:"bg-contain rounded-full overflow-hidden relative w-[30px] h-[30px] ml-[-12px]",style:{backgroundImage:"url(".concat(a,")")}}):(0,t.jsx)(A.q,{className:"w-[30px] h-[30px] ml-[-12px] rounded-full text-white bg-mostlyGreen"}),(0,t.jsx)("span",{children:b()(l||"Account",{length:15})}),n?(0,t.jsx)(k.rWj,{size:"20px"}):(0,t.jsx)(k.Ix0,{size:"20px"})]})})})})};var D=l(82241),T=l(66413),E=l(27518),$=l(33562),F=l(55430),L=l(54159),O=l(72048),z=l(40956),I=l(33570),H=l(23927),P=l(4372),R=l(73953),W=l(73706),U=l(55346),G=l(61163),Z=l(53870);const q=e=>[{label:"Dashboard",href:(0,E.Yh)(),icon:(0,t.jsx)(U.P31,{className:"mr-2"})},{label:"Projects",href:E.vW,icon:(0,t.jsx)(G.GUT,{className:"mr-2"})},{label:"Tools",icon:(0,t.jsx)(U.AFA,{className:"mr-2"}),children:[{label:"Carbon calculator",href:E.d$,icon:null},{label:"Funding calculator",href:E.Hb,icon:null}]},...e?[{label:"Marketing toolkit",href:E.O5,icon:(0,t.jsx)(Z.A3Z,{className:"mr-2"})}]:[],{label:"Take action",icon:(0,t.jsx)(Z.X$e,{className:"mr-2"}),children:[{label:"Fund native trees",href:(0,E.r3)(),icon:null},{label:"Gifting",href:E.fD,icon:null}]}],V=e=>{let{isBusiness:s}=e;const l=()=>{s||(0,O.L)("non_business_fund_button",{})};return(0,t.jsx)("ul",{className:"text-white",children:q(s).map((e=>(0,t.jsx)("li",{children:e.children?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"px-6 py-4 pt-4 pb-2 font-semibold flex items-center",children:[e.icon,(0,t.jsx)("span",{children:e.label})]}),(0,t.jsx)("ul",{className:"ml-16 list-disc!",children:e.children.map((e=>(0,t.jsx)("li",{className:"mr-8 my-1",children:(0,t.jsxs)(u.h$,{color:"white",activeColor:"forestDeep",className:"flex items-center px-2 py-2.5 hover:bg-limeBright/70 hover:text-forestDeep! cursor-pointer transition-all duration-300 ease-in-out rounded-md",href:e.href,highlightActive:!0,activeClassName:"bg-limeBright",onClick:"Fund native trees"===e.label?l:void 0,children:[e.icon,(0,t.jsx)("span",{children:e.label})]})},e.label)))})]}):(0,t.jsxs)(u.h$,{color:"white",activeColor:"forestDeep",className:"flex items-center py-4 px-6 hover:bg-limeBright/70 hover:text-forestDeep! cursor-pointer transition-all duration-300 ease-in-out",href:e.href,highlightActive:!0,activeClassName:"bg-limeBright",children:[e.icon,(0,t.jsx)("span",{children:e.label})]})},e.label)))})},J=e=>{let{children:s,showHero:l,title:n,isIntercomEnabled:a=!1,metaTitle:j,metaDescription:f=W.cz,showBreadcrumbs:b=!0}=e;var g,w,N,k,y,A;const{boot:C,shutdown:_}=(0,F.V)();(0,r.useEffect)((()=>(a&&C(),()=>{_()})),[C,a,_]);const{user:U}=(0,h.a)(),G=(0,$.Z)("(max-width: 1024px)"),{isOpen:Z,setIsOpen:q}=(0,d.w)();return(0,r.useEffect)((()=>{G||q(!1)}),[G,q]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i(),{children:[(0,t.jsx)("title",{children:"".concat(n," | Trees That Count")}),(0,t.jsx)("meta",{property:"og:title",content:"".concat(j," | Trees That Count")}),(0,t.jsx)("meta",{property:"og:description",content:f}),(0,t.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})]},"dashboardHead"),(0,t.jsx)("main",{className:"w-full min-h-[80vh] relative bg-linen",children:(0,t.jsx)(p.a,{children:(0,t.jsx)("div",{className:"mx-auto text-shark",children:(0,t.jsxs)("div",{className:"flex",children:[!G&&(0,t.jsxs)("div",{className:"bg-forestDeep w-2/12 min-w-67.5 flex flex-col min-h-[calc(100vh-10px)]",children:[(0,t.jsx)("div",{className:"pt-8 pl-4 pb-12 bg-forestDeepDarker",children:(0,t.jsx)(u.h$,{href:E.$x,className:"text-white hover:text-white relative h-15 w-37.5 block",children:(0,t.jsx)(v.J,{})})}),(0,t.jsxs)("div",{className:"flex items-start px-6 pb-4",children:[(0,t.jsx)(o.t9Q,{className:"mr-2 mt
1-1 shrink-0 text-white"}),(0,t.jsx)(u.h$,{color:"none",className:"font-normal! text-white underline hover:no-underline",href:"/",children:"Return to the website"})]}),(0,t.jsx)(V,{isBusiness:!!(null===U||void 0===U||null===(g=U.Account)||void 0===g?void 0:g.BusinessType)})]}),(0,t.jsxs)("div",{className:"".concat(G?"w-full":"w-10/12"),children:[(0,t.jsx)("div",{className:"relative w-full",children:(0,t.jsx)("div",{className:"w-full relative ".concat(l?"min-h-60 ":"min-h-35"),children:(0,t.jsx)(m.E,{alt:"Banner for ".concat(null===U||void 0===U||null===(w=U.Account)||void 0===w?void 0:w.Name),src:"/img/dashboardBackground.webp",fill:!0,className:"object-cover object-[0%_0%] ".concat(l?"lg:object-[0%_50%]":"lg:object-[0%_30%]")},"dashboardImage")})}),(0,t.jsxs)("div",{className:"flex items-start lg:items-center justify-end gap-3 absolute top-5 right-5 ".concat(G&&"left-0 right-0! pr-3 [&>div:first-child]:mx-0"),children:[G&&(0,t.jsx)(P.x,{navigationContext:L.kH.Funder,showReturnLink:!0}),Z?(0,t.jsx)("div",{role:"presentation",onClick:()=>q(!1),onKeyDown:e=>"Escape"===e.key&&q(!1),className:"menu-overlay z-10",children:(0,t.jsx)(H.$,{links:(0,R.r6)(!!(null===U||void 0===U||null===(N=U.Account)||void 0===N?void 0:N.BusinessType)),navigationContext:L.kH.Funder})}):null,!G&&(0,t.jsx)(B,{accountName:null===U||void 0===U||null===(k=U.Account)||void 0===k?void 0:k.Name,avatarPath:(null===U||void 0===U||null===(y=U.Account)||void 0===y?void 0:y.Avatar)&&"assets/img/default-profile.png"!==(null===U||void 0===U||null===(A=U.Account)||void 0===A?void 0:A.Avatar)?U.Account.Avatar:void 0}),(0,t.jsx)(c(),{href:(0,E.r3)(),onClick:()=>{var e;(0,O.L)((null===U||void 0===U||null===(e=U.Account)||void 0===e?void 0:e.BusinessType)?"business_donate_button":"non_business_donate_button",{})},className:"".concat(x.EP," ").concat(x.se.lavender," ").concat(x.BL.lavender," shrink-0 px-5! lg:px-8!"),children:"Donate"})]}),(0,t.jsxs)("div",{className:"".concat(l?"-mt-45 lg:-mt-67.5":"mt-7.5 xl:mt-10"," relative mx-10 xl:mx-20"),children:[b&&(0,t.jsx)(z.O,{className:"w-full! -ml-2! px-0! max-w-full!"}),(0,t.jsx)("div",{className:"".concat(!l&&"my-4"),children:s})]})]})]})})})}),(0,t.jsx)(I.$,{}),(0,t.jsx)(T.u,{}),(0,t.jsx)(D.B,{})]})}}}]); 2//# sourceMappingURL=9109-244e528d0686879a.js.map
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.