1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9710],{96036:function(e){e.exports=function(){"use strict";return function(e,t,n){var s=t.prototype,l=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,s,a){var i=e.name?e:e.$locale(),r=l(i[t]),o=l(i[n]),c=r||o.map((function(e){return e.slice(0,s)}));if(!a)return c;var d=i.weekStart;return c.map((function(e,t){return c[(t+(d||0))%7]}))},i=function(){return n.Ls[n.locale()]},r=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},o=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):a(e,"months")},monthsShort:function(t){return t?t.format("MMM"):a(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):a(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):a(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):a(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return r(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};s.localeData=function(){return o.bind(this)()},n.localeData=function(){var e=i();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return r(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(i(),"months")},n.monthsShort=function(){return a(i(),"monthsShort","months",3)},n.weekdays=function(e){return a(i(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return a(i(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return a(i(),"weekdaysMin","weekdays",2,e)}}}()},6833:function(e){e.exports=function(){"use strict";return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,s=(n<t?n+7:n)-t;return this.$utils().u(e)?s:this.subtract(s,"day").add(e,"day")}}}()},36514:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/crowdfund/[uri]",function(){return n(76680)}])},50922:function(e,t,n){"use strict";n.d(t,{q:function(){return c}});var s=n(85893),l=n(21528),a=n(1864),i=n.n(a),r=n(67294),o=n(62442);const c=e=>{let{avatar:t=null,name:n,size:a="normal"}=e;const c=(0,r.useMemo)((()=>"small"===a?"w-[50px] h-[50px]":"large"===a?"w-[60px] h-[60px]":"h-14 w-14"),[a]),[d,u]=(0,r.useState)("");return(0,r.useEffect)((()=>{(async()=>{try{const e=(0,o.W)(n,t);if(!i().extname(e).toLowerCase().startsWith(".heic"))return void u(e);const s=await fetch(e),a=await s.blob(),r=await(0,l.U)({blob:a,type:"image/jpeg",quality:1}),c=URL.createObjectURL(r);u(c)}catch(e){u((0,o.W)(n,null))}})()}),[n,t]),(0,s.jsx)("div",{style:{backgroundImage:"url(".concat(d,")")},className:"bg-center bg-cover p-4 rounded-full font-bold text-white flex justify-center align-middle ".concat(c)})}},8624:function(e,t,n){"use strict";n.d(t,{AO:function(){return h},Cd:function(){return c},Dr:function(){return m},NF:function(){return p},NS:function(){return x},ZA:function(){return r},aC:function(){return i},aM:function(){return u},k8:function(){return o},nv:function(){return d}});var s=n(85893);const l={h1:{element:"h1",className:"font-bold leading-[60px] md:leading-[64px] text-[50px] md:text-[64px]"},h2:{element:"h2",className:""},h3:{element:"h3",className:""},h4:{element:"h4",className:""},h5:{element:"h5",className:""},h6:{element:"h6",className:""},body:{element:"p",className:""},intro:{element:"p",className:""},caption:{element:"span",className:""},text:{element:"span",className:""},quote:{element:"span",className:""},label:{element:"span",className:""}},a=e=>{let{children:t,className:n,level:a="body",color:i="shark"}=e;const r=l[a],o=r.element;return(0,s.jsx)(o,{className:"text-[".concat(i,"] ").concat(r.className," ").concat("m-0!"," ").concat(n),children:t})};const i=e=>{let{children:t,className:n=""}=e;return(0,s.jsx)(a,{level:"h3",className:"font-body font-semibold text-[20px] leading-[28px] md:text-[24px] md:leading-[34px] lg:text-[28px] lg:leading-[39px] ".concat(n),children:t})},r=e=>{let{children:t,className:n=""}=e;return(0,s.jsx)(a,{level:"h3",className:"font-sans font-bold text-[24px] leading-[34px] md:text-[44px] md:leading-[44px] lg:text-[50px] lg:leading-[45px] ".concat(n),children:t})},o=e=>{let{children:t,className:n=""}=e;return(0,s.jsx)(a,{level:"h4",className:"font-body font-bold text-[18px] leading-[25px] lg:text-[20px] lg:leading-[26px] ".concat(n),children:t})},c=e=>{let{children:t,className:n=""}=e;return(0,s.jsx)(a,{level:"h6",className:"font-body font-semibold text-[16px] leading-[16
1px] ".concat(n),children:t})},d=e=>{let{children:t,className:n=""}=e;return(0,s.jsx)(a,{level:"body",className:"font-body text-[14px] leading-[20px] md:text-[16px] md:leading-[24px] ".concat(n),children:t})},u=e=>{let{children:t,className:n=""}=e;return(0,s.jsx)(a,{level:"body",className:"font-body text-[14px] leading-[20px] ".concat(n),children:t})},m=e=>{let{children:t,className:n=""}=e;return(0,s.jsx)(a,{level:"text",className:"font-sans text-[16px] leading-[24px] ".concat(n),children:t})},x=e=>{let{children:t,className:n=""}=e;return(0,s.jsx)(a,{level:"text",className:"font-sans font-bold text-[14px] leading-[20px] md:text-[16px] md:leading-[24px] ".concat(n),children:t})},h=e=>{let{children:t,className:n=""}=e;return(0,s.jsx)(a,{level:"text",className:"font-body text-[14px] leading-[16px] font-semibold ".concat(n),children:t})},p=e=>{let{children:t,className:n=""}=e;return(0,s.jsx)(a,{level:"text",className:"font-displayAlt font-medium text-[24px] leading-[34px] md:text-[44px] md:leading-[44px] lg:text-[50px] lg:leading-[45px] ".concat(n),children:t})}},22130:function(e,t,n){"use strict";n.d(t,{d:function(){return c}});var s=n(85893),l=n(25675),a=n.n(l),i=n(67294),r=n(28051);const o="/img/default.png",c=e=>{let{fallbackSrc:t=o,source:n,width:l,sourceWidth:c,sourceHeight:d,fitMode:u,height:m,...x}=e;const[h,p]=(0,i.useState)();return(0,i.useEffect)((()=>{try{if(n){const e=(0,r.h)(n,c,d,u);p(e)}else p(t)}catch(e){p(t)}}),[n,t,c,d,u]),h?(0,s.jsx)(a(),{unoptimized:!0,width:l,height:m,src:h,...x,onError:()=>p(t)}):null}},7456:function(e,t,n){"use strict";n.d(t,{D:function(){return r}});var s=n(85893),l=n(8172),a=n(50788);const i={prev_page:"Previous page",next_page:"Next page"},r=e=>{let{count:t,page:n,pageSize:r,onChange:o,showQuickJumper:c=!1}=e;return t&&n&&r?(0,s.jsx)("div",{className:"my-6",children:(0,s.jsx)(l.Z,{current:n,jumpNextIcon:(0,s.jsx)("span",{"aria-hidden":!0,children:"\u2026"}),jumpPrevIcon:(0,s.jsx)("span",{"aria-hidden":!0,children:"\u2026"}),locale:i,nextIcon:(0,s.jsx)(a.FNi,{}),onChange:o,pageSize:r,prefixCls:"rc-pagination-rebrand",prevIcon:(0,s.jsx)(a.G1X,{}),total:t,showQuickJumper:c&&{goButton:"Go to page"}})}):null}},57332:function(e,t,n){"use strict";n.d(t,{x:function(){return l}});var s=n(85893);const l=e=>{let{children:t,isActive:n,id:l,className:a="",...i}=e;return(0,s.jsx)("div",{role:"tabpanel",hidden:!n,id:"tabpanel-".concat(l),"aria-labelledby":"tab-".concat(l),...i,children:n&&(0,s.jsx)("div",{className:"p-7 overflow-x-scroll ".concat(a),children:t})})}},11872:function(e,t,n){"use strict";n.d(t,{m:function(){return i}});var s=n(85893),l=n(67294);const a=e=>{let{isActive:t,label:n,onClick:a,value:i,disabled:r}=e;const{scrollIntoView:o,ref:c}=function(){const[e,t]=(0,l.useState)(!1),[n,s]=(0,l.useState)(null),[a,i]=(0,l.useState)(!1),r=(0,l.useCallback)((e=>{null!==e&&s(e)}),[]);(0,l.useEffect)((()=>{if(n&&!e){const e=new IntersectionObserver((e=>{let[n]=e;t((null===n||void 0===n?void 0:n.isIntersecting)||!1),i(!0)}));return e.observe(n),()=>{e.disconnect()}}}),[e,n]);const o=(0,l.useCallback)((()=>{if(!e&&n&&a){const e=n.closest(".no-scrollbar");
1if(e){const t=e.getBoundingClientRect(),s=n.getBoundingClientRect(),l=s.left+s.width/2-(t.left+t.width/2);e.scrollBy({left:l,behavior:"smooth"})}}}),[e,n,a]);return{isInViewport:e,scrollIntoView:o,ref:r}}();return(0,l.useEffect)((()=>{t&&o()}),[t,o]),(0,s.jsx)("button",{ref:c,disabled:r,className:"text-base font-bold inline-flex items-center justify-center box-border bg-transparent outline-current outline-none outline-0 m-0 cursor-pointer select-none align-middle appearance-none no-underline font-body uppercase max-w-[360px] min-w-[90px] relative min-h-[48px] shrink-0 py-3 px-4 overflow-hidden whitespace-normal text-center flex-direction-column ".concat(t?"text-forestDeep border-b-2 border-b-forestDeep pb-2.5":"text-forestDeep/80 border-0"," ").concat(r?"text-iron! pointer-events-none":""),onClick:()=>a(i),role:"tab","aria-selected":t,type:"button",children:n})},i=e=>{let{activeTab:t,ariaLabel:n,className:l="",onChange:i,tabs:r}=e;return(0,s.jsx)("div",{"aria-label":n,className:"w-full overflow-x-auto no-scrollbar min-h-[48px] ".concat(l),children:(0,s.jsx)("div",{className:"inline-block relative flex-auto whitespace-nowrap",children:(0,s.jsx)("div",{className:"flex",children:r.map((e=>(0,s.jsx)(a,{isActive:t===e.value,label:e.label,value:e.value,onClick:i,disabled:e.disabled,path:e.path},e.value)))})})})}},4037:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});var s=n(11163),l=n(67294);const a={offset:0,page:1},i=e=>{const{limit:t=10}=e||{},n=(0,s.useRouter)(),i=(0,l.useMemo)((()=>({limit:parseInt(n.query.limit,10),offset:parseInt(n.query.offset,10),page:parseInt(n.query.page,10)})),[n.query]);(0,l.useEffect)((()=>{if(!n.query.limit||!n.query.offset||!n.query.page){const e={...a,limit:t};Object.entries(e).forEach((e=>{let[t,s]=e;n.query[t]=s})),n.replace({pathname:n.pathname,query:n.query},void 0,{shallow:!0})}}),[n.query]);return{currentPage:i.page||a.page,limit:i.limit||t,offset:i.offset||a.offset,onPageClick:e=>{const t=e&&(null===i||void 0===i?void 0:i.limit)?(e-1)*i.limit:0;n.query.offset="".concat(t),n.query.page="".concat(e),n.push({pathname:n.pathname,query:n.query},void 0,{shallow:!0})},resetPagination:()=>{delete n.query.limit,delete n.query.offset,delete n.query.page,n.push({pathname:n.pathname,query:n.query},void 0,{shallow:!0})}}}},46369:function(e,t,n){"use strict";n.d(t,{a:function(){return h},Z:function(){return v}});var s,l=n(85893),a=n(11163),i=n(67294),r=n(55346),o=n(82950),c=n(34023),d=n(44156),u=n(27518),m=n(71165),x=n(23065);!function(e){e.Individual="Individual",e.Business="Business"}(s||(s={}));var h,p=e=>{let{image:t,heading:n,description:s,buttons:a}=e;const r=(0,i.useMemo)((()=>{switch(t){case"Business":return'bg-[url("/img/business.svg")] bg-size-[140%] bg-center';case"Individual":return'bg-[url("/img/individuals.svg")] bg-size-[100%] bg-position-[center_-60px]';default:return""}}),[t]);return(0,l.jsxs)("div",{className:"bg-white flex flex-1 flex-col",children:[(0,l.jsx)("div",{className:"bg-no-repeat h-40 ".concat(r)}),(0,l.jsxs)("div",{className:"p-5 md:p-10 pt-5!",children:[(0,l.jsx)(x.k8,{className:"font-bold! md:text-[28px]! text-[20px]!",children:n}),(0,l.jsx)(x.nv,{children:s}),(0,l.jsx)("div",{className:"flex flex-col md:flex-row space-y-5 md:space-y-0 md:space-x-5 mt-5",children:a})]})]})};!function(e){e.WhyNativeTrees="WhyNativeTrees",e.Share="Share"}(h||(h={}));var v=()=>{const e=(0,a.useRouter)(),{asPath:t}=e,n=(0,i.useMemo)((()=>"".concat(m.env.NEXT_PUBLIC_APP_DOMAIN).concat(t)),[t]),x="https://www.facebook.com/sharer/sharer.php/?u=".concat(n),h="https://www.linkedin.com/sharing/share-offsite/?url=".concat(n),v=e=>{window.open(e,"share-dialog","width=600,height=600")},f=()=>v(x),g=e=>{navigator.clipboard.writeText(e||n),(0,o.h4)({type:o.k$.info,message:"Link copied to clipboard"})},b={Share:{heading:"Share the love!",description:"We\u2019re building a tree planting movement and we\u2019d love your support \u2013 share this campaign to help spread the message!",image:s.Business,buttons:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(c.z,{className:"group min-w-[128px]",color:"light",variant:"outlined",onClick:f,children:["Share",(0,l.jsx)(r.Am9,{className:"mx-2 my-0 lg:my-2 w-[16px] h-[23px] group-hover:text-navyBlue"})]}),(0,l.jsxs)(c.z,{className:"group min-w-[128px]",color:"light",variant:"outlined",onClick:()=>g(),children:["Copy url",(0,l.jsx)(r.gjK,{className:"mx-2 my-0 lg:my-2 w-[16px] h-[23px] group-hover:text-alizarin"})]})]})},WhyNativeTrees:{heading:"Why native trees?",description:"From enhancing biodiversity to growing healthier communities \u2013 find out 20 reasons we love native trees.",image:s.Individual,buttons:(0,l.jsx)(d.ZP,{className:"group min-w-[128px]",color:"light",variant:"outlined",href:u.Ak,children:"Learn more"})}};
1return{renderSocialBlock:e=>{const t=b[e];return(0,l.jsx)(p,{heading:t.heading,description:t.description,image:t.image,buttons:t.buttons},"informationblock-".concat(t.image))},handleShareFacebook:f,handleShareLinkedIn:()=>v(h),handleCopyToClipboard:g}}},76680:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return se}});var s=n(85893),l=n(11163),a=n(67294),i=n(55346),r=n(50788);const o=e=>{let{children:t,isActive:n,id:l,onClick:i,label:o,disabled:c}=e;const d=(0,a.useRef)(null),u=(0,a.useMemo)((()=>n?"h-auto p-5":"h-0 p-0"),[n]);(0,a.useEffect)((()=>{var e;n&&(null===(e=d.current)||void 0===e||e.scrollIntoView({block:"nearest"}))}),[n]);return(0,s.jsxs)("div",{className:"w-full bg-white",children:[(0,s.jsxs)("button",{ref:d,className:"w-full text-base font-bold flex items-center justify-center box-border bg-transparent outline-current outline-none outline-0 m-0 cursor-pointer select-none align-middle appearance-none no-underline font-body uppercase min-w-[90px] relative min-h-[48px] shrink-0 py-3 px-4 overflow-hidden whitespace-normal text-center flex-direction-column ".concat(n?"text-primary border-b-2 border-b-primary pb-2.5":"text-shark border-0"," ").concat(c?"text-iron! pointer-events-none":""),disabled:c,type:"button",onClick:()=>{i&&i()},children:[o,n?(0,s.jsx)(r.Faw,{className:"w-5 h-5"}):(0,s.jsx)(r.Yc6,{className:"w-5 h-5"})]}),(0,s.jsx)("div",{className:"overflow-hidden ".concat(u),role:"region",id:"section-".concat(l),"aria-labelledby":"collapsable-".concat(l),children:t})]})},c=e=>{let{children:t,value:n,label:l}=e;return(0,s.jsx)("div",{id:"section-container-".concat(n),"aria-label":"section-".concat(l),children:t})},d=e=>{let{onChange:t,ariaLabel:n,activeSection:l,children:i,className:r}=e;const[c,d]=(0,a.useState)(!1);return(0,s.jsx)("div",{"aria-label":n,className:r,children:(0,s.jsx)("div",{className:"flex flex-col gap-[2px]",children:i.map((e=>{if(!e)return null;const{props:{label:n,value:a,children:i}}=e;return(0,s.jsx)(o,{label:n,id:a,onClick:()=>(e=>{t(e),d(e===l&&(e=>!e))})(a),isActive:!c&&l===a,children:i},"section-".concat(a))}))})})};var u=n(23065),m=n(63368),x=n(7515),h=n(50922),p=n(24276),v=n(7456),f=n(89827),g=n(4037),b=n(73967);const j=e=>{let{registryId:t}=e;var n,l,i;const[r,o]=(0,a.useState)({offset:0}),{data:c,loading:d}=(0,f.RKI)({variables:{...r,registryId:t}}),{currentPage:m,offset:x,onPageClick:j}=(0,g.h)();return(0,a.useEffect)((()=>{o({offset:x})}),[x]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(p.T,{isLoading:d,children:[(null===c||void 0===c?void 0:c.UserEventView.length)?null:(0,s.jsx)(u.nv,{className:"mt-10 text-center",children:"No messages yet"}),null===c||void 0===c||null===(n=c.UserEventView)||void 0===n?void 0:n.map((e=>{var t;const n=(0,b.p6)({date:e.CreatedOn,format:"DD/MM/YYYY [at] hh:mm a",isUtc:!0}),l=(null===(t=e.Name)||void 0===t?void 0:t.trim())||"Someone";return(0,s.jsxs)("div",{className:"flex space-x-4 align-middle py-2",children:[(0,s.jsx)(h.q,{avatar:e.Avatar,name:l}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(u.k8,{className:"text-[14px] md:text-base",children:[l," ",e.Description]}),(0,s.jsx)(u.nv,{className:"-mt-2 text-ashGrey text-[14px]!",children:n}),(0,s.jsx)(u.nv,{children:e.Comment})]})]},e.Id)}))]}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(v.D,{count:(null===c||void 0===c||null===(i=c.UserEventView_aggregate)||void 0===i||null===(l=i.aggregate)||void 0===l?void 0:l.count)||0,page:m,pageSize:10,onChange:j})})]})};var N=n(57332),y=n(11872),w=n(27518),k=n(33562),S=n(80037),C=n(28051),I=n(20097),E=n(46369),M=n(44156),A=n(22130);const T=e=>{let{description:t,isSponsorsEnabled:n=!1,sponsors:l,isLinkSectionEnabled:a,linkSectionTitle:i,links:r,onViewMessageClick:o}=e;return(0,s.jsxs)("div",{className:"mt-10",children:[(0,s.jsx)(u.aC,{className:"font-bold!",children:"About this campaign"}),(0,s.jsx)(u.nv,{className:"whitespace-pre-wrap",children:t}),a?(0,s.jsxs)("div",{className:"flex flex-col gap-[10px] mt-10 mb-5",children:[(0,s.jsx)(u.aC,{className:"font-bold! mb-0!",children:i}),r.map(((e,t)=>(0,s.jsx)(M.dL,{href:e.url,children:e.text},"link-".concat(t))))]}):null,n?(0,s.jsxs)("div",{className:"mt-10 mb-5",children:[(0,s.jsx)(u.aC,{className:"font-bold! mb-5",children:"With supp
1ort from"}),(0,s.jsx)("div",{className:"flex flex-row w-full gap-0 md:gap-5 flex-wrap",children:null===l||void 0===l?void 0:l.map(((e,t)=>(0,s.jsx)(M.dL,{href:e.sponsorLink.url,className:"relative",children:(0,s.jsx)(A.d,{title:e.sponsorLink.text,alt:e.sponsorLink.text,source:e.logo,height:96,width:200,objectFit:"contain"})},"sponsor-".concat(t))))})]}):null,(0,s.jsx)(u.Dr,{className:"text-[14px] md:text-[16px] text-primary cursor-pointer",onClick:o,children:"View messages from our donors to this campaign"})]})};var q=n(27484),D=n.n(q),F=n(92077),L=n.n(F),P=n(8624),_=n(18083),B=n(34559),G=n(71165);const O="".concat(G.env.NEXT_PUBLIC_ASSETS_DOMAIN,"/assets/img/logos/logo-og-meta-rebrand-v2.png"),V=e=>{let{name:t,image:n,trees:l,gifts:a,closesOn:i,uri:r}=e;return(0,s.jsxs)("div",{className:"flex flex-row h-72 md:h-[448px] relative",children:[(0,s.jsx)("div",{className:"flex-1 relative",children:(0,s.jsx)(_.E,{alt:"Crowdfund image - ".concat(t),src:n?"".concat(G.env.NEXT_PUBLIC_ASSETS_DOMAIN,"/").concat(n):O,fallbackSrc:"/img/default.png",className:"object-cover",fill:!0})}),(0,s.jsxs)("div",{className:"bg-white md:mx-0 top-[calc(100%-80px)] absolute md:static flex flex-col left-5 right-5 md:w-1/3 p-5 lg:p-10 justify-center",children:[(0,s.jsx)(P.NF,{className:"text-mostlyGreen text-[50px] md:text-[70px]! leading-[20px] mb-[5px]",children:L()(l).format("0,0")}),(0,s.jsx)(m.If,{className:"text-avatarBorderGrey text-[13px] md:text-[14px] font-semibold md:mb-5",children:"Trees donated"}),(0,s.jsx)(P.NF,{className:"text-mostlyGreen text-[35px] md:text-[50px]! leading-[20px]",children:L()(a).format("0,0")}),(0,s.jsx)(m.If,{className:"text-avatarBorderGrey text-[13px] md:text-[14px] font-semibold md:mb-5",children:"Donors"}),i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(P.NF,{className:"text-mostlyGreen text-[40px]! leading-[20px]",children:L()(D()(i).diff(D()(),"days")).format("0,0")}),(0,s.jsxs)(m.If,{className:"text-avatarBorderGrey text-[13px] md:text-[14px] font-semibold",children:["Days to go - Ends ",D()(i).format("DD MMM YYYY")]})]}):null,(0,s.jsx)(B.s,{className:"mt-5 md:mt-10",href:(0,w.az)({routeParams:{registryUri:r}}),children:"Donate Now"})]})]})};var U,R=n(33637),W=n(96036),z=n.n(W),$=n(6833),Q=n.n($);D().extend(Q()),D().extend(z()),function(e){e.Initial="Initial",e.Final="Final"}(U||(U={}));const Z=e=>{const[t,n]=e.split(":");return void 0===t||void 0===n?e:Number(t)>12?"".concat(Number(t)-12,":").concat(n,"pm"):"".concat(Number(t),":").concat(n,"am")},Y=e=>{let{statusValue:t,statusText:n,name:l,mainImage:i,avatar:r,title:o,heading:c,description:d,startDate:u,endDate:m,duration:x,region:h,regionAlt:p,location:v,urls:f=[],cta:g,status:b,finalStatusText:j,statusIconPath:N}=e;const y=(0,a.useMemo)((()=>{if(!u&&!m)return"";const e=D()(u),t=D()(m);return e.isSame(t)?"".concat(D().weekdays()[e.weekday()]," ").concat(e.date()," ").concat(D().months()[e.month()]," ").concat(t.year()):e.month()===t.month()?"".concat(D().weekdays()[e.weekday()]," ").concat(e.date()," to ").concat(t.date()," ").concat(D().months()[e.month()]," ").concat(t.year()):"".concat(D().weekdays()[e.weekday()]," ").concat(e.date()," ").concat(D().months()[e.month()]," to ").concat(t.date()," ").concat(D().months()[t.month()]," ").concat(t.year())}),[u,m]),w=i&&"string"!==typeof i?(0,C.h)(i):i;return(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row bg-white relative",children:[(0,s.jsxs)("div",{className:"flex relative flex-col lg:mr-5 lg:w-1/3",children:[(0,s.jsxs)("div",{className:"w-full flex-auto h-48 md:h-64 lg:h-[360px] relative",children:[(0,s.jsx)(_.E,{className:"object-center object-cover w-full",alt:l,src:w,fill:!0}),r&&(0,s.jsx)("div",{className:"rounded-[30px] absolute left-5 top-5 w-[48px] h-[48px] md:w-[60px] md:h-[60px] overflow-clip",children:(0,s.jsx)(A.d,{source:r,alt:"Avatar",fill:!0})})]}),(0,s.jsxs)("div",{className:"flex flex-row ".concat("Final"===b?"bg-secondary":"bg-mostlyGreen"," flex-1 p-5 md:p-10 pr-5 justify-between"),children:[(0,s.jsxs)("div",{className:"flex flex-col justify-center",children:[(0,s.jsx)(P.ZA,{className:"mb-0 md:mb-2 ".concat("Final"===b?"text-davyGrey":"text-white"),children:t}),(0,s.jsx)(P.aM,{className:"".concat("Final"===b?"text-davyGrey":"text-white"," font-bold"),children:n})]}),(0,s.jsx)("div",{className:"self-center text-white! w-14 h-14 md:w-20 md:h-20 relative",children:N?(0,s.jsx)(_.E,{alt:"statsIcon",src:N,fill:!0}):null})]})]}),(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row flex-1 py-10 lg:w-2/3",children:[(0,s.jsxs)("div",{className:"flex flex-col flex-1 px-5",children:[(0,s.jsx)(P.aC,{className:"mb-[10px] text-tomThumb",children:o}),(0,s.jsx)(P.NS,{className:"mb-5 text-mostlyGreen",children:c}),(0,s.jsx)("div",{className:"text-shark",children:(0,s.jsx)(P.nv,{className:"whitespace-pre-wrap",children:d})})]}),(0,s.jsxs)("div",{className:"flex flex-col flex-1 ml-0 md:pl-5 pl-5 pr-5 md:pr-10 mt-5 lg:mt-0",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[j?(0,s.jsx)("div",{className:"absolute top-0 right-0 lg:static bg-shark p-[10px] mb-5 lg:-mr-10",children:(0,s.jsx)(P.Cd,{className:"uppercase text-white",children:j})}
1):null,y&&(0,s.jsx)(P.NS,{className:"mb-[5px]",children:y}),x&&(0,s.jsx)(P.Dr,{className:"mb-5",children:"".concat(Z(x.start)," to ").concat(Z(x.end))}),(0,s.jsx)(P.NS,{className:"mb-2",children:h}),p&&(0,s.jsx)(P.Dr,{children:p}),v&&(0,s.jsx)(M.dL,{target:"_blank",href:v.url,className:"mb-8 mt-3 text-alizarin",children:v.text}),g?(0,s.jsx)(M.ZP,{className:"mb-1",href:g.url,isExternal:!0,children:g.text}):null]}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)(R.i,{className:"mb-3"}),(null===f||void 0===f?void 0:f.length)?(0,s.jsxs)("div",{className:"flex flex-1 flex-col space-y-[10px]",children:[(0,s.jsx)(P.AO,{children:"Find out more"}),f.map(((e,t)=>e&&"object"===typeof e&&"_type"in e?"internalLink"===e._type?(0,s.jsx)(M.h$,{href:e.path,children:e.pageName},"link-".concat(t)):(0,s.jsx)(M.dL,{target:"_blank",href:e.url,children:e.text},"link-".concat(t)):e))]}):null]})]})]})]})},H=e=>{let{events:t,heading:n}=e;return(0,s.jsxs)("div",{className:"mt-10",children:[n?(0,s.jsx)("div",{className:"mb-10",children:(0,s.jsx)(u.nv,{className:"text-shark",children:n})}):null,(0,s.jsx)("div",{children:null===t||void 0===t?void 0:t.map((e=>{const t=D()(e.endDate).isBefore(),n=t?"Native trees planted":"Native trees to be planted";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mb-10 mt-10",children:(0,s.jsx)(Y,{description:e.description,heading:e.heading,mainImage:e.mainImage,avatar:e.avatar,name:e.slug.current,region:e.region,regionAlt:e.regionAlt,title:e.title,duration:e.duration,endDate:e.endDate,startDate:e.startDate,statusValue:L()(e.goal).format("0,0"),statusText:n,location:e.locationUrl,cta:t?void 0:e.eventLink,urls:e.urls,status:t?U.Final:U.Initial,finalStatusText:e.completedText,statusIconPath:t?"/img/event-status-final.svg":"/img/event-status-initial.svg"})},e._id),(0,s.jsx)(R.i,{})]})}))})]})};var X=n(94563);const K=e=>{let{faq:t}=e;return(0,s.jsx)("div",{className:"flex flex-col gap-10 mt-10",children:null===t||void 0===t?void 0:t.map(((e,t)=>(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{className:"font-bold inline mr-2",children:"Q."}),(0,s.jsx)("dd",{className:"inline",children:(0,s.jsx)(u.nv,{className:"inline font-bold",children:e.question})})]}),(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{className:"font-bold inline mr-2",children:"A."}),(0,s.jsx)("dd",{className:"inline-block! align-top",children:(0,s.jsx)(X.V,{body:e.answer})})]})]},"faq-".concat(t))))})};D().extend(Q()),D().extend(z());const J=e=>{let{statusValue:t,statusText:n,mainImage:l,avatar:i,title:r,planter:o,description:c,location:d,urls:u=[],tags:m,statusIconPath:x}=e;const h=l&&"string"!==typeof l?(0,C.h)(l):l,p=(0,k.Z)("(max-width: 1024px)"),v=(0,a.useMemo)((()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(P.aC,{className:"mb-[10px] text-tomThumb",children:r}),(null===m||void 0===m?void 0:m.length)?(0,s.jsx)(P.NS,{className:"mb-[10px] text-mostlyGreen",children:null===m||void 0===m?void 0:m.join(", ")}):null,(0,s.jsxs)(P.NS,{className:"mb-[10px] text-shark",children:[d," by ",o]})]})),[m,r,d,o]);return(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row bg-white relative",children:[(0,s.jsxs)("div",{className:"flex relative flex-col lg:mr-5 lg:w-1/3",children:[p?v:null,(0,s.jsxs)("div",{className:"w-full flex-auto h-48 mt-2 md:mt-0 md:h-64 lg:h-[360px] relative",children:[(0,s.jsx)(_.E,{className:"object-center object-cover w-full",alt:r,src:h,fill:!0}),i&&(0,s.jsx)("div",{className:"rounded-[30px] absolute left-5 top-5 w-[48px] h-[48px] md:w-[60px] md:h-[60px] overflow-clip",children:(0,s.jsx)(A.d,{source:i,alt:"Avatar",width:60,height:60,layout:"responsive"})})]}),(0,s.jsxs)("div",{className:"flex flex-row bg-mostlyGreen p-5 md:p-10 pr-5 justify-between",children:[(0,s.jsxs)("div",{className:"flex flex-col justify-center",children:[(0,s.jsx)(P.ZA,{className:"mb-0 md:mb-2 text-white",children:t}),(0,s.jsx)(P.aM,{className:"text-white font-bold",children:n})]}),(0,s.jsx)("div",{className:"self-center text-white! w-14 h-14 md:w-20 md:h-20 relative",children:x?(0,s.jsx)(_.E,{alt:"statsIcon",src:x,fill:!0}):null})]})]}),(0,s.jsxs)("div",{className:"flex flex-col flex-1 py-10 lg:w-2/3",children:[(0,s.jsxs)("div",{className:"flex flex-col flex-1 px-5",children:[p?null:v,(0,s.jsx)("div",{className:"text-shark",children:(0,s.jsx)(P.nv,{className:"whitespace-pre-wrap",children:c})})]}),(0,s.jsx)("div",{className:"flex flex-col flex-1 ml-0 md:pl-5 pl-5 pr-5 md:pr-10 mt-5 lg:mt-0",children:(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)(R.i,{className:"mb-3"}),(null===u||void 0===u?void 0:u.length)?(0,s.jsxs)("div",{className:"flex flex-1 flex-col space-y-[10px]",children:[(0,s.jsx)(P.AO,{children:"Find out more"}),u.map(((e,t)=>
1e&&"object"===typeof e&&"_type"in e?"internalLink"===e._type?(0,s.jsx)(M.h$,{href:e.path,children:e.pageName},"link-".concat(t)):(0,s.jsx)(M.dL,{target:"_blank",href:e.url,children:e.text},"link-".concat(t)):e))]}):null]})})]})]})},ee=e=>{let{heading:t,projects:n}=e;return(0,s.jsxs)("div",{className:"mt-5 md:mt-10",children:[(0,s.jsx)("div",{className:"mb-10",children:(0,s.jsx)(u.nv,{className:"text-shark",children:t})}),(0,s.jsx)("div",{children:null===n||void 0===n?void 0:n.map((e=>(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-10 mt-10",children:(0,s.jsx)(J,{description:e.description,planter:e.plantingGroup,mainImage:e.mainImage,location:null===e||void 0===e?void 0:e.region,title:e.title,tags:e.tags,statusValue:L()(e.goal).format("0,0"),statusText:e.statusTitleText,urls:e.urls,statusIconPath:"/img/event-status-initial.svg"})}),(0,s.jsx)(R.i,{})]},e.slug.current)))})]})};var te;!function(e){e.Messages="Messages",e.Projects="Projects",e.Events="Events",e.Faq="Faq",e.About="About"}(te||(te={}));const ne=[{label:"Latest donations",value:"Messages"},{label:"Planting projects",value:"Projects"},{label:"Events",value:"Events"},{label:"FAQ",value:"Faq"},{label:"About",value:"About"}];var se=()=>{const e=(0,l.useRouter)(),t=(0,k.Z)("(max-width: 768px)"),n=(0,a.useRef)(null),{renderSocialBlock:r,handleShareFacebook:o,handleShareLinkedIn:h,handleCopyToClipboard:p}=(0,E.Z)(),{uri:v,activeTab:f="Messages"}=e.query,{data:g,isLoading:b}=I.S.useQuery(["sanity.getCrowdFunding",{slug:v}]),{data:M,isLoading:A}=I.S.useQuery(["registries.getByUri",{uri:v}],{onSuccess:t=>{(null===t||void 0===t?void 0:t.registry.IsCampaign)||e.replace((0,w.iR)({routeParams:{registryUri:v}}))}}),q=(0,a.useCallback)((t=>{t!==f&&(e.query.activeTab=t,e.push({query:e.query},void 0,{scroll:!1}))}),[f,e]),D=(0,a.useMemo)((()=>{const e=["Messages",(null===g||void 0===g?void 0:g.isEventsTabEnabled)&&"Events",(null===g||void 0===g?void 0:g.isProjectTabEnabled)&&"Projects",(null===g||void 0===g?void 0:g.isFAQTabEnabled)&&"Faq","About"];return ne.filter((t=>e.includes(t.value)))}),[g]),F=(0,a.useMemo)((()=>(0,s.jsx)("div",{className:"py-6",children:(null===M||void 0===M?void 0:M.registry.Id)?(0,s.jsx)(j,{registryId:M.registry.Id}):null})),[null===M||void 0===M?void 0:M.registry.Id]),L=(0,a.useMemo)((()=>(0,s.jsx)(H,{events:null===g||void 0===g?void 0:g.events,heading:null===g||void 0===g?void 0:g.eventsHeading})),[null===g||void 0===g?void 0:g.events,null===g||void 0===g?void 0:g.eventsHeading]),P=(0,a.useMemo)((()=>(0,s.jsx)(ee,{projects:null===g||void 0===g?void 0:g.projects,heading:null===g||void 0===g?void 0:g.projectsHeading})),[null===g||void 0===g?void 0:g.projects,null===g||void 0===g?void 0:g.projectsHeading]),_=(0,a.useMemo)((()=>(0,s.jsx)(K,{faq:null===g||void 0===g?void 0:g.faq})),[null===g||void 0===g?void 0:g.faq]),B=(0,a.useMemo)((()=>(0,s.jsx)(T,{sponsors:null===g||void 0===g?void 0:g.sponsors,description:(null===M||void 0===M?void 0:M.registry.Description)||"",isSponsorsEnabled:null===g||void 0===g?void 0:g.isSponsorsEnabled,onViewMessageClick:()=>{var e;null===(e=n.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}),q("Messages")},isLinkSectionEnabled:null===g||void 0===g?void 0:g.isAboutLinksEnabled,linkSectionTitle:null===g||void 0===g?void 0:g.aboutLinksTitle,links:(null===g||void 0===g?void 0:g.aboutLinks)||[]})),[g,q,null===M||void 0===M?void 0:M.registry.Description]);if(A||b)return null;if(!M)return(0,s.jsx)(S.T,{});const{registry:G}=M;return(0,s.jsxs)(x.T3,{showBreadcrumbs:!1,backgroundColor:x.yf.aquaSpring,title:(null===g||void 0===g?void 0:g.title)||"Tree Registry",metaTitle:(null===g||void 0===g?void 0:g.title)||"Tree Registry",metaDescription:(null===g||void 0===g?void 0:g.description)||G.Name,image:(null===g||void 0===g?void 0:g.openGraphImage)&&(0,C.h)(g.openGraphImage),children:[(0,s.jsxs)("div",{className:"flex flex-col w-full items-center mb-5 lg:mb-10",children:[(0,s.jsx)(u.SL,{className:"text-center text-mostlyGreen! mb-[10px] mx-[15px] xl:mx-[128px]",children:null===g||void 0===g?void 0:g.title}),(0,s.jsxs)(u.nv,{className:"mb-0! leading-[25px] font-medium text-[18px]! text-shark mx-[15px] lg:mx-48 text-center",children:[G.Summary," ",(0,s.jsx)(u.Dr,{className:"text-primary curs
1or-pointer",onClick:()=>{var e;q("About"),null===(e=n.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},children:"Read more"})]})]}),(0,s.jsx)(V,{name:G.Name,image:G.Hero,trees:G.Trees,gifts:G.Gifts,closesOn:G.ClosesOn,uri:G.Uri}),(0,s.jsx)("div",{className:"w-full flex justify-center md:justify-start mb-10 mt-52 md:mt-[10px]",children:(0,s.jsxs)(m.If,{className:"text-steelGrey text-[14px]!",children:["Tell your friends and family",(0,s.jsx)(u.Dr,{className:"group cursor-pointer",onClick:o,children:(0,s.jsx)(i.Am9,{className:"inline ml-2 w-5 h-5 group-hover:text-navyBlue"})}),(0,s.jsx)(u.Dr,{className:"group cursor-pointer",onClick:h,children:(0,s.jsx)(i.ltd,{className:"inline ml-2 w-5 h-5 group-hover:text-blue"})}),(0,s.jsx)(u.Dr,{className:"group cursor-pointer",onClick:()=>p(),children:(0,s.jsx)(i.gjK,{className:"inline ml-2 w-5 h-5 group-hover:text-alizarin"})})]})}),(0,s.jsx)("div",{ref:n,children:t?(0,s.jsxs)(d,{ariaLabel:"Crowdfund navigation",activeSection:f,onChange:q,children:[(0,s.jsx)(c,{value:"Messages",label:"Latest donations",children:F}),(null===g||void 0===g?void 0:g.isProjectTabEnabled)?(0,s.jsx)(c,{value:"Projects",label:"Planting Projects",children:P}):null,(null===g||void 0===g?void 0:g.isEventsTabEnabled)?(0,s.jsx)(c,{value:"Events",label:"Events",children:L}):null,(null===g||void 0===g?void 0:g.isFAQTabEnabled)?(0,s.jsx)(c,{value:"Faq",label:"FAQ",children:_}):null,(0,s.jsx)(c,{value:"About",label:"About",children:B})]}):(0,s.jsxs)("div",{className:"bg-white p-10",children:[(0,s.jsx)(y.m,{tabs:D,activeTab:f,onChange:q,ariaLabel:"Crowdfund navigation"}),(0,s.jsx)(N.x,{id:"Messages",isActive:"Messages"===f,className:"p-0! px-4!",children:F}),(null===g||void 0===g?void 0:g.isProjectTabEnabled)?(0,s.jsx)(N.x,{id:"Projects",isActive:"Projects"===f,className:"p-0! px-4!",children:P}):null,(null===g||void 0===g?void 0:g.isEventsTabEnabled)?(0,s.jsx)(N.x,{id:"Events",isActive:"Events"===f,className:"p-0! px-4!",children:L}):null,(null===g||void 0===g?void 0:g.isFAQTabEnabled)?(0,s.jsx)(N.x,{id:"Faq",isActive:"Faq"===f,className:"p-0! px-4!",children:_}):null,(0,s.jsx)(N.x,{id:"About",isActive:"About"===f,className:"p-0! px-4!",children:B})]})}),(0,s.jsxs)("div",{className:"flex flex-col md:flex-row gap-10 mt-10",children:[r(E.a.Share),r(E.a.WhyNativeTrees)]})]})}}},function(e){e.O(0,[5970,509,1255,5666,4053,1317,2888,9774,179],(function(){return t=36514,e(e.s=t);var t}));var t=e.O();_N_E=t}]); 2//# sourceMappingURL=[uri]-8064ceac578f42f1.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.