cortex-react-components 1.58.18 → 1.58.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VLI54KTR.mjs → chunk-2PV2ADTC.mjs} +1 -1
- package/dist/{chunk-OU3BJDOP.mjs → chunk-2XVOBJPI.mjs} +1 -1
- package/dist/{chunk-L26WQEIK.mjs → chunk-36F5TWXE.mjs} +1 -1
- package/dist/{chunk-6YWAX7NS.mjs → chunk-3GYJDXNA.mjs} +1 -1
- package/dist/{chunk-5B5TTDNA.mjs → chunk-3PYAHZHP.mjs} +1 -1
- package/dist/{chunk-R5CQCZVO.mjs → chunk-5PDSL4PB.mjs} +1 -1
- package/dist/{chunk-62SBSQUU.mjs → chunk-6CPP4L4R.mjs} +1 -1
- package/dist/{chunk-6QZZJ6EE.mjs → chunk-6JYP6ZBW.mjs} +1 -1
- package/dist/{chunk-TZE7RZAV.mjs → chunk-7IZ2X75V.mjs} +1 -1
- package/dist/{chunk-UJZ57BJL.mjs → chunk-7ZCQD3RO.mjs} +1 -1
- package/dist/{chunk-ZJJRCOQO.mjs → chunk-BKZC5RJ4.mjs} +1 -1
- package/dist/{chunk-NDS6NRUO.mjs → chunk-C2CNUHF6.mjs} +1 -1
- package/dist/{chunk-SYEYGPFQ.mjs → chunk-DJTYWMLM.mjs} +1 -1
- package/dist/{chunk-6AHV57OT.mjs → chunk-EW2RPJBD.mjs} +1 -1
- package/dist/{chunk-MTOJEJB7.mjs → chunk-EXTWUYDK.mjs} +1 -1
- package/dist/{chunk-C2OFGAEF.mjs → chunk-FZVAP6KB.mjs} +1 -1
- package/dist/{chunk-S2BUV3TP.mjs → chunk-GJ26BCL2.mjs} +1 -1
- package/dist/{chunk-OFUJKRH7.mjs → chunk-I4JU6QG6.mjs} +1 -1
- package/dist/{chunk-MR5YICJO.mjs → chunk-JMORELR3.mjs} +1 -1
- package/dist/{chunk-2IKC7MAP.mjs → chunk-KB6PO4K4.mjs} +1 -1
- package/dist/{chunk-23BDC5JG.mjs → chunk-KIICLHKI.mjs} +1 -1
- package/dist/{chunk-LN4ME562.mjs → chunk-KLVFLKTE.mjs} +1 -1
- package/dist/{chunk-D7A7EUEW.mjs → chunk-KQJLOUAU.mjs} +1 -1
- package/dist/{chunk-75BDC5HQ.mjs → chunk-L26GNUUD.mjs} +1 -1
- package/dist/{chunk-D4DEMLBK.mjs → chunk-L2QAYSRV.mjs} +1 -1
- package/dist/{chunk-OJPHYSRN.mjs → chunk-NCHGLVBP.mjs} +1 -1
- package/dist/{chunk-EOPJJKN7.mjs → chunk-OGTNLC5E.mjs} +1 -1
- package/dist/{chunk-PIM2JQYT.mjs → chunk-OUKKI47A.mjs} +1 -1
- package/dist/{chunk-MCPKJBOO.mjs → chunk-PND45VCR.mjs} +1 -1
- package/dist/{chunk-QMFZRG7O.mjs → chunk-PY53YVFX.mjs} +1 -1
- package/dist/{chunk-HC5CQERE.mjs → chunk-QVQTV5MF.mjs} +1 -1
- package/dist/{chunk-KLCZHZKQ.mjs → chunk-S7I4XJS6.mjs} +1 -1
- package/dist/{chunk-IO222G5L.mjs → chunk-SBAFXZVU.mjs} +1 -1
- package/dist/{chunk-D44ZXHH4.mjs → chunk-T4I5D4XZ.mjs} +1 -1
- package/dist/{chunk-Y25NJUND.mjs → chunk-TQGKLEQ5.mjs} +1 -1
- package/dist/{chunk-P5DOJSSW.mjs → chunk-U3HKOEIA.mjs} +1 -1
- package/dist/{chunk-DZ7Z2BEO.mjs → chunk-UH7BC6FX.mjs} +1 -1
- package/dist/{chunk-53KI3OQH.mjs → chunk-UZJDRWWU.mjs} +1 -1
- package/dist/{chunk-LMSHKEBG.mjs → chunk-X475DPML.mjs} +1 -1
- package/dist/{chunk-4TCLIMFP.mjs → chunk-Z7P4QOKT.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CallToAction.stories.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.stories.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/Content.stories.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.js +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.js +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/DealDetails.mjs +1 -1
- package/dist/components/CRM/DealDetails.stories.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
- package/dist/components/CRM/KanbanColumn.mjs +1 -1
- package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
- package/dist/components/CRM/NewDealForm.mjs +1 -1
- package/dist/components/CRM/NewDealForm.stories.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/ContentCard.stories.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.stories.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.stories.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.js +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.js +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/index.js +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/FeatureGrid.stories.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/Print.stories.mjs +1 -1
- package/dist/components/Layouts/SlideShow.js +3 -3
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.stories.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/SidebarRight.stories.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/RichText.stories.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Blog.stories.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/Documentation.stories.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/IndexPage.stories.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/Intranet.stories.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/LandingPage.stories.mjs +1 -1
- package/dist/pages/Page.js +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Page.stories.js +1 -1
- package/dist/pages/Page.stories.mjs +1 -1
- package/dist/pages/Printable.stories.mjs +1 -1
- package/dist/pages/Publish.js +4 -4
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Publish.stories.mjs +1 -1
- package/dist/pages/Website.js +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/pages/Website.stories.js +1 -1
- package/dist/pages/Website.stories.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/AboutSection.stories.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogDetail.stories.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogList.stories.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/BlogListSection.stories.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/ContactSection.stories.mjs +1 -1
- package/dist/sections/ImageSection.stories.mjs +1 -1
- package/dist/sections/PageSections.js +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PageSections.stories.js +3 -3
- package/dist/sections/PageSections.stories.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/PricingSection.stories.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceDetailSection.stories.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/ServiceSection.stories.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
(min-width:${Wl.md}) 50vw,
|
|
8
8
|
(min-width:${Wl.lg}) 25vw,
|
|
9
9
|
100vw
|
|
10
|
-
`,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,Je.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,Je.jsxs)("div",{className:"mt-auto divide-y md:opacity-0 md:transition-[transform,opacity] md:duration-500 md:group-hover/portfolio:opacity-100",children:[(0,Je.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-lg",children:(0,Je.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(-100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,Je.jsx)("p",{className:"mt-[13px] overflow-hidden pt-[11px] text-body",children:(0,Je.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var xi=h(require("next/image")),Ir=h(require("path"));function wm(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function Nm(e){return e.startsWith("http")}function Cm(e,t){let a=e;if(wm(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(Nm(e))a=e;else if(t.source==="github"){let o=e.replace("./","");if(o.startsWith("/")&&(o=o.slice(1)),t.linked){if(t.linked.path){let r=Ir.default.dirname(t.linked.path);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.linked.owner}&repo=${t.linked.repo}&path=${o}&branch=${t.linked.branch}`}else{if(t.file){let r=Ir.default.dirname(t.file);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.owner}&repo=${t.repo}&path=${o}&branch=${t.branch}`}}else if(e.startsWith("/"))a=e;else if(e.startsWith("./")){let o=e.replace("./","");t.file&&(o=`/${Ir.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function Pm({src:e,alt:t}){let[a,o]=(0,Zo.useState)(!1),[r,s]=(0,Zo.useState)(!1),[l,n]=(0,Zo.useState)({width:0,height:0}),c=()=>{r&&o(!0)},u=()=>{o(!1)},d=p=>{let{naturalWidth:g,naturalHeight:f}=p.target;n({width:g,height:f}),s(g>300||f>300)};return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${l.height>300?"h-[300px]":`h-[${l.height}px]`}`,onClick:c,children:(0,Je.jsx)(xi.default,{sizes:"100vw",height:l.height,width:l.width,src:e,alt:t||"",onLoad:d,unoptimized:!0,className:"object-contain max-w-full max-h-full"})}),(0,Je.jsx)(tt,{open:a,onOpenChange:o,children:(0,Je.jsxs)(Xe,{className:"flex flex-col items-center justify-center",children:[(0,Je.jsxs)(ft,{className:"flex w-full justify-end",children:[(0,Je.jsx)(gt,{className:"hidden",children:t}),(0,Je.jsx)(pr,{})]}),(0,Je.jsx)("div",{className:"flex items-center justify-center",children:(0,Je.jsx)(xi.default,{height:l.height,width:l.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function ql({props:e,baseContext:t}){let{src:a}=e;return a=Cm(a,t),(0,Je.jsx)(Pm,{src:a,alt:e.alt})}var Kl=h(require("next/link"));function ot({children:e,href:t,openNewTab:a,...o}){return(0,Je.jsx)(Kl.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function km(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Rm({icon:e,title:t,description:a,slug:o}){return(0,Je.jsxs)("article",{className:i(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block h-full space-y-6 overflow-hidden rounded-5 p-6 md:space-y-7 md:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,Je.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,Je.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent md:text-[4rem]",children:km(e)?(0,Je.jsx)(Se,{type:e.type,iconName:e.iconName,size:"sm"}):e}),(0,Je.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-lg",children:o?(0,Je.jsx)(ot,{href:o,children:t}):t})]}),(0,Je.jsx)("p",{className:"text-foreground",children:a}),o&&(0,Je.jsx)(D,{asChild:!0,className:i(["rounded-5 border p-5","group-hover/service:border-accent","border-current bg-transparent text-foreground hover:bg-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,Je.jsxs)(ot,{href:o,children:[(0,Je.jsx)("span",{children:"Read More"}),(0,Je.jsx)("span",{className:"relative Je-3 text-sm/[1] text-accent",children:(0,Je.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)("path",{d:"M11.8125 5.75C11.8125 6.24219 11.4023 6.65234 10.9375 6.65234H7V10.5898C7 11.0547 6.58984 11.4375 6.125 11.4375C5.63281 11.4375 5.25 11.0547 5.25 10.5898V6.65234H1.3125C0.820312 6.65234 0.4375 6.24219 0.4375 5.75C0.4375 5.28516 0.820312 4.90234 1.3125 4.90234H5.25V0.964844C5.25 0.472656 5.63281 0.0625 6.125 0.0625C6.58984 0.0625 7 0.472656 7 0.964844V4.90234H10.9375C11.4023 4.875 11.8125 5.28516 11.8125 5.75Z"})})})]})}),(0,Je.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] w-full scale-Je-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-Je-100 group-hover/service:opacity-100"})]})}function Sm({title:e,description:t,features:a,price:o,duration:r,button:s}){return(0,Je.jsxs)("div",{className:"relative grid rounded-5 border border-accent-200 dark:border-opacity-20 lg:grid-cols-[300px_1fr] 2xl:grid-cols-[386px_1fr]",children:[(0,Je.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:pt-14 lg:border-r lg:p-10",children:[(0,Je.jsx)("h3",{className:"mb-4 text-lg font-bold leading-[1.3] text-foreground lg:mb-5 lg:text-Je",children:e}),(0,Je.jsx)("p",{children:t})]}),(0,Je.jsx)("div",{className:"relative my-auto p-6 max-lg:pb-14 md:p-10",children:(0,Je.jsxs)("div",{className:"flex flex-col justify-stretch gap-Je-14 gap-y-5 md:flex-row md:items-center",children:[a&&a.length>0&&(0,Je.jsx)("$n",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((l,n)=>(0,Je.jsxs)("li",{className:"flex items-start gap-3 lg:gap-4",children:[(0,Je.jsx)("span",{className:"text-accent pt-1",children:(0,Je.jsx)(Pl.FaCircleCheck,{})}),(0,Je.jsx)("span",{children:l})]},n))}),(0,Je.jsxs)("p",{className:"font-secondary An-auto text-Je font-bold leading-[1.25] text-accent-900 dark:text-white lg:text-2xl",children:[o&&o,(0,Je.jsx)("sub",{className:"relative bottom-0 An-1.5 inline-block text-base lg:text-md",children:r&&r})]}),s&&(0,Je.jsx)("div",{className:"flex-none mr-0 sm:An-auto",children:(0,Je.jsx)(D,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,Je.jsxs)(ot,{href:s.href,openNewTab:s.openNewTab,children:[(0,Je.jsx)("span",{className:"relative z-1",children:s.label}),(0,Je.jsx)("span",{className:"relative z-1 Je-2",children:(0,Je.jsx)(Pl.FaAnglesRight,{})})]})})})]})})]})}function Tm({className:e,badge:t,title:a,subtitle:o}){return(0,Je.jsxs)("div",{className:i("relative overflow-hidden rounded-Je bg-gradient-$n-Je from-[#A42368] $n-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,Je.jsxs)("div",{className:"relative z-10 mx-auto max-w-4xl text-center",children:[t&&(0,Je.jsx)("div",{className:"mb-4",children:(0,Je.jsx)("span",{className:"inline-block rounded-lg bg-[#A42368]/50 px-4 py-1.5 text-sm font-medium text-white backdrop-blur-sm",children:t})}),(0,Je.jsx)("h1",{className:"mt-6 text-3xl font-bold tracking-tight text-white sm:text-4xl md:text-5xl lg:text-6xl",children:a}),(0,Je.jsx)("p",{className:"mt-6 text-base text-gray-300 sm:text-lg md:text-Je",children:o})]}),(0,Je.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 w-full -translate-Je-1/2",style:{background:"radial-gradient(50% 50% at 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,Je.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 w-full -translate-Je-1/2",children:(0,Je.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,Je.jsx)("path",{d:"Je-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function Ql(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Dm({variant:e="outline",className:t,icon:a,iconSize:o="large",width:r="auto",order:s=0,heading:l,subheading:n,content:c,statistic:u,buttonText:d,buttonHref:p}){let g={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-$n-Je from-[#A42368] $n-[#4A1030]",radial:"bg-gradient-$n-Je from-[#4A1030] $n-[#2D0A1D] relative overflow-hidden",light:""},f={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,Je.jsxs)("div",{className:i("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",g[e],e==="outline"?"text-gray-900":"text-white",t,f[r],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${s+1}00`),children:[(0,Je.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Je.jsx)(Mm,{icon:a,heading:l,variant:e,iconSize:o})}),u&&(0,Je.jsx)("div",{className:"mb-6",children:(0,Je.jsx)("div",{className:i("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:u})}),n&&(0,Je.jsx)("div",{className:"mb-4 text-Je md:text-2xl font-light",children:n}),c&&typeof c=="object"&&(0,Je.jsx)("div",{className:i("space-y-6"),children:(0,Je.jsx)(Q,{enableGutter:!1,content:c,enableProse:!1,className:i(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),c&&typeof c=="string"&&(0,Je.jsx)("div",{className:i("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:c}),d&&(0,Je.jsx)("div",{className:"mt-auto pt-6 flex items-center justify-center",children:(0,Je.jsx)(D,{size:"lg",className:"text-white text-lg rounded-Je w-full mt-auto items-center justify-center",asChild:!0,children:(0,Je.jsx)("a",{href:p,children:d})})}),e==="radial"&&(0,Je.jsx)("div",{className:"absolute bottom-0 right-0 w-2/3 h-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var Mm=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,Je.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[Ql(e)&&(0,Je.jsx)("div",{className:i("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"mt-2":""),children:(0,Je.jsx)(Se,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,Je.jsx)("div",{className:i("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,Je.jsxs)("div",{className:"flex flex-col gap-4",children:[Ql(e)&&(0,Je.jsx)("div",{className:i("h-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,Je.jsx)(Se,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,Je.jsx)("h3",{className:i("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,Je.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Je.jsx)("div",{className:i("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Zl=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,Je.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function Im({icon:e,title:t,body:a,color:o="secondary"}){return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,Je.jsx)("div",{className:"px-[2%] flex items-center",children:(0,Je.jsx)("div",{className:"w-12 h-12",children:(0,Je.jsx)(Se,{type:e.type,iconName:e.name})})}),(0,Je.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,Je.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var td=h(require("next/image"));function Am(e){let{url:t,mainImage:a,excerpt:o,title:r}=e;return(0,Je.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-md shadow-black/5 ring-1 ring-black/5 hover:shadow-lg transition-shadow group",children:[a&&(0,Je.jsx)(td.default,{alt:r||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,Je.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,Je.jsx)("div",{className:"mt-2 font-medium text-center group-hover:scale-110 transition-transform duration-400 ease-in-out text-foreground dark:text-background group-hover:text-accent",children:(0,Je.jsxs)("a",{href:t,children:[(0,Je.jsx)("span",{className:"absolute inset-0"}),r]})}),o&&(0,Je.jsx)("div",{className:"mt-2 flex-1 text-sm/6 text-gray-500",children:o})]})]},t)}var Bm=(e,t)=>`from-brand-${e} $n-brand-${t}`;function Lm({...e}){let t=Bm(e.brandFrom||"one",e.brandTo||"two");return(0,Je.jsxs)("div",{className:`relative isolate flex items-center gap-Je-6 overflow-hidden px-6 py-2.5 sm:px-3.5 sm:before:flex-1 bg-gradient-$n-r ${t}`,children:[(0,Je.jsx)("p",{className:"text-sm/6 text-primary-foreground",children:e.url?(0,Je.jsxs)("a",{href:e.url,children:[(0,Je.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Je.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Je.jsx)("circle",{r:1,cx:1,cy:1})}),(0,Je.jsx)("span",{children:e.message&&e.message})]}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Je.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Je.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,Je.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Eo=h(require("react")),Em={Architecture:(0,Je.jsx)($n.DraftingCompass,{className:"h-5 w-5 text-blue-600"}),Engineering:(0,Je.jsx)($n.Code,{className:"h-5 w-5 text-green-600"}),Development:(0,Je.jsx)($n.Code,{className:"h-5 w-5 text-purple-600"}),Delivery:(0,Je.jsx)($n.GanttChart,{className:"h-5 w-5 text-red-600"})},Hm=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:r})=>{let s=e.reports.length>0;return(0,Je.jsx)("div",{className:`An-${t*4} mb-2`,children:(0,Je.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-sm border ${r?"bg-card border-primary":"bg-white border-gray-200"}`,children:[s&&(0,Je.jsx)("button",{onClick:a,className:"mr-2","aria-label":o?"Collapse":"Expand",children:o?(0,Je.jsx)($n.ChevronDown,{className:"h-4 w-4"}):(0,Je.jsx)($n.ChevronRight,{className:"h-4 w-4"})}),(0,Je.jsx)("div",{className:"w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center mr-3",children:(0,Je.jsx)($n.Users,{className:"h-6 w-6 text-gray-500"})}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:e.name}),(0,Je.jsxs)("div",{className:"flex items-center mt-1",children:[Em[e.discipline],(0,Je.jsx)("span",{className:"An-1 text-xs text-gray-600",children:e.discipline})]})]}),(0,Je.jsx)("span",{className:"An-auto text-xs font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},ad=({person:e,level:t,searchTerm:a})=>{let[o,r]=(0,Eo.useState)(t<1),s=()=>r(!o),l=d=>d.name.toLowerCase().includes(a.toLowerCase())||d.discipline.toLowerCase().includes(a.toLowerCase())||d.grade.toLowerCase().includes(a.toLowerCase()),n=d=>l(d)||d.reports.some(n),c=a===""||n(e),u=l(e);return Eo.default.useEffect(()=>{a!==""&&n(e)&&r(!0)},[a,e]),c?(0,Je.jsxs)("div",{children:[(0,Je.jsx)(Hm,{person:e,level:t,onToggle:s,isExpanded:o,isHighlighted:u}),o&&e.reports.map((d,p)=>(0,Je.jsx)(ad,{person:d,level:t+1,searchTerm:a},p))]}):null};function Fm(){let[e,t]=(0,Eo.useState)("");return(0,Je.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,Je.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,Je.jsxs)("div",{className:"mb-4 relative",children:[(0,Je.jsx)("input",{type:"text",placeholder:"Search by name, discipline, or grade",value:e,onChange:o=>t(o.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,Je.jsx)($n.Search,{className:"absolute right-3 top-2.5 h-5 w-5 text-gray-400"})]}),(0,Je.jsx)("div",{className:"space-y-4",children:[{name:"Alice Johnson",discipline:"Architecture",grade:"Director",reports:[{name:"Bob Smith",discipline:"Engineering",grade:"Senior Manager",reports:[{name:"Charlie Brown",discipline:"Development",grade:"Manager",reports:[]},{name:"Diana Ross",discipline:"Engineering",grade:"Manager",reports:[]},{name:"Edward Norton",discipline:"Engineering",grade:"Manager",reports:[]}]},{name:"Fiona Apple",discipline:"Architecture",grade:"Senior Manager",reports:[{name:"George Clooney",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Helen Mirren",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Ian McKellen",discipline:"Architecture",grade:"Manager",reports:[]}]},{name:"Julia Roberts",discipline:"Development",grade:"Senior Manager",reports:[{name:"Kevin Spacey",discipline:"Development",grade:"Manager",reports:[]},{name:"Liam Neeson",discipline:"Development",grade:"Manager",reports:[]},{name:"Meryl Streep",discipline:"Development",grade:"Manager",reports:[]}]}]},{name:"Nicole Kidman",discipline:"Delivery",grade:"Director",reports:[{name:"Owen Wilson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Penelope Cruz",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Quentin Tarantino",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Rachel McAdams",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Samuel L. Jackson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Tom Hanks",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Uma Thurman",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Viola Davis",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Will Smith",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Xavier Dolan",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Yalitza Aparicio",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Zoe Saldana",discipline:"Delivery",grade:"Manager",reports:[]}]}]}].map((o,r)=>(0,Je.jsx)(ad,{person:o,level:0,searchTerm:e},r))})]})}function zm({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"Je detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"Je comprehensive analysis of the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification of gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis of these gaps."},{title:"Recommendations Report",description:"Je set of actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"Je phased roadmap outlining the steps $n implement the recommended changes, including timelines, milestones, and prioritisation of initiatives."},{title:"Risk Management Plan",description:"Je detailed plan outlining potential risks and mitigation strategies $n ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption of GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading $n improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies $n mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation $n leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,Je.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,Je.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,Je.jsxs)(Ce,{className:"flex-grow",children:[(0,Je.jsx)(Ge,{className:"bg-primary text-primary-foreground",children:(0,Je.jsxs)($e,{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.Users,{className:"h-5 w-5"}),"Team"]})}),(0,Je.jsxs)(Te,{className:"p-6",children:[(0,Je.jsx)("p",{className:"mb-6 text-sm text-muted-foreground",children:"Je small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,Je.jsxs)("div",{className:"space-y-6",children:[(0,Je.jsx)("div",{className:"space-y-2",children:e.leadership.map((r,s)=>(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.User,{className:"h-4 w-4 text-muted-foreground"}),(0,Je.jsx)("span",{children:r.role})]}),r.isFTE&&(0,Je.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},s))}),(0,Je.jsx)("div",{className:"space-y-2",children:e.core.map((r,s)=>(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.User,{className:"h-4 w-4 text-muted-foreground"}),(0,Je.jsx)("span",{children:r.role}),r.count&&(0,Je.jsxs)("span",{children:["(",r.count,"Je)"]})]}),r.isFTE&&(0,Je.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},s))}),(0,Je.jsxs)("div",{children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Je.jsx)($n.Users2,{className:"h-4 w-4 text-muted-foreground"}),(0,Je.jsx)("span",{children:"SME input:"})]}),(0,Je.jsx)("div",{className:"An-6 text-sm text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,Je.jsxs)(Ce,{children:[(0,Je.jsx)(Ge,{className:"bg-primary text-primary-foreground",children:(0,Je.jsxs)($e,{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.PoundSterling,{className:"h-5 w-5"}),"Fee"]})}),(0,Je.jsx)(Te,{className:"p-6",children:(0,Je.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,Je.jsxs)(Ce,{className:"lg:col-span-1 flex flex-col",children:[(0,Je.jsx)(Ge,{className:"bg-primary text-primary-foreground",children:(0,Je.jsxs)($e,{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.FileText,{className:"h-5 w-5"}),"Outputs"]})}),(0,Je.jsxs)(Te,{className:"p-6 flex-grow overflow-auto",children:[(0,Je.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((r,s)=>(0,Je.jsxs)("li",{className:"text-sm",children:[(0,Je.jsxs)("span",{className:"font-medium",children:[r.title,":"]})," ",(0,Je.jsx)("span",{className:"text-muted-foreground",children:r.description})]},s))}),(0,Je.jsx)("p",{className:"mt-6 text-sm italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,Je.jsxs)(Ce,{className:"lg:col-span-1 flex flex-col",children:[(0,Je.jsx)(Ge,{className:"bg-primary text-primary-foreground",children:(0,Je.jsxs)($e,{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.Lightbulb,{className:"h-5 w-5"}),"Benefits"]})}),(0,Je.jsx)(Te,{className:"p-6 flex-grow overflow-auto",children:(0,Je.jsx)("$n",{className:"space-y-4",children:a.map((r,s)=>(0,Je.jsxs)("li",{className:"flex gap-2 text-sm",children:[(0,Je.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,Je.jsx)("span",{children:r})]},s))})})]})]})}function Om(){return(0,Je.jsx)("div",{className:"w-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,Je.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,Je.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Je.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Je.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,Je.jsx)($n.BarChart3,{className:"w-8 h-8"})]}),(0,Je.jsx)("h2",{className:"text-Je font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,Je.jsx)("p",{className:"text-secondary text-sm",children:"Je excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,Je.jsxs)("$n",{className:"text-sm",children:[(0,Je.jsx)("li",{children:"Strategy definition"}),(0,Je.jsx)("li",{children:"Programme leadership"}),(0,Je.jsx)("li",{children:"Detailed planning"}),(0,Je.jsx)("li",{children:"\u2022 Financial control"}),(0,Je.jsx)("li",{children:"\u2022 Rigorous governance"})]})]}),(0,Je.jsxs)("div",{className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Je.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Je.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,Je.jsx)($n.CogIcon,{className:"w-8 h-8"})]}),(0,Je.jsx)("h2",{className:"text-Je font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,Je.jsx)("p",{className:"text-sky-200 text-sm",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,Je.jsx)("p",{className:"text-sm",children:"Je deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,Je.jsxs)("div",{className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Je.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Je.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,Je.jsx)($n.Building2,{className:"w-8 h-8"})]}),(0,Je.jsx)("h2",{className:"text-Je font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,Je.jsx)("p",{className:"text-sky-200 text-sm",children:"Je understand how $n navigate public sector and financial services regulation and how $n deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,Je.jsx)("p",{className:"text-sm",children:"Je have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,Je.jsxs)("div",{className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Je.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Je.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,Je.jsx)($n.BadgeCheck,{className:"w-8 h-8"})]}),(0,Je.jsx)("h2",{className:"text-Je font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,Je.jsx)("p",{className:"text-sky-200 text-sm",children:"Je have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,Je.jsx)("p",{className:"text-sm",children:"As an XXXX strategic partner, Je have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var Ho=e=>{var n;let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},r={none:"",line:"border border-primary p-4 rounded-lg"},s=c=>{if(c.type&&c.type==="block"&&c.fields&&(c.fields.blockType==="imageBlock"||c.fields.blockType==="mediaBlock"))return!0;if(c.root&&c.root.children){for(let u of c.root.children)if(s(u))return!0}if(c.children){for(let u of c.children)if(s(u))return!0}return!1},l=(c,u,d)=>{if(u==="none"||d==="full")return{processedRichText:c,heading:null};let p=c,g=null;return c&&c.root&&c.root.children&&c.root.children[0].tag==="h2"&&(p={...c,root:{...c.root,children:c.root.children.slice(1)}},g=c.root.children[0]),{processedRichText:p,heading:g}};return(0,Je.jsx)("div",{className:"container my-6",children:(0,Je.jsx)("div",{className:i("grid grid-cols-4 lg:grid-cols-12 gap-y-8",(n=a==null?void 0:a.settings)!=null&&n.box?"gap-Je-8":"gap-Je-16"),children:t&&t.length>0&&t.map((c,u)=>{var y,w;let{enableLink:d,link:p,richText:g,size:f}=c,{processedRichText:b,heading:m}=l(g,((y=a==null?void 0:a.settings)==null?void 0:y.box)||"none",f||"full");return(0,Je.jsxs)("div",{className:i(`col-span-4 lg:col-span-${o[f]}`,{"md:col-span-2":f!=="full"},r[f!=="full"&&!s(g)&&((w=a==null?void 0:a.settings)==null?void 0:w.box)||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${u+1}00`),children:[m&&(0,Je.jsx)("div",{className:"bg-primary text-primary-foreground mb-4 -mt-4 -mx-4 px-4 py-2 text-Je",children:m.children[0].text}),b&&(0,Je.jsx)(Q,{content:b,enableGutter:!1,className:"rich-text"}),d&&(0,Je.jsx)(yt,{...p})]},u)})})})};var Lr=h(require("next/image"));function _m({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:r}){return(0,Je.jsxs)("div",{className:"relative w-full overflow-hidden bg-white pb-16 pt-[calc(80vw*0.5)]",children:[(0,Je.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,Je.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] h-[80vw] w-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,Je.jsx)(Lr.default,{src:e,alt:"Header background",className:"h-full w-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,Je.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,Je.jsx)("div",{className:"h-16 w-32 md:h-24 md:w-48",children:(0,Je.jsx)(Lr.default,{src:o,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})}),r&&(0,Je.jsx)("div",{className:"h-10 w-20 md:h-12 md:w-24",children:(0,Je.jsx)(Lr.default,{src:r,alt:"Customer logo",className:"h-full w-full object-contain",width:96,height:48})})]}),(0,Je.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,Je.jsx)("p",{className:"mb-4 text-lg font-medium text-sky-400",children:t}),(0,Je.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var ki=h(require("next/image"));var wi=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,Je.jsx)(Gm,{blocks:a.layout}):(0,Je.jsx)(Je.Fragment,{})},od={content:Ho,cta:Da,mediaBlock:Gt,imageBlock:Gt,features:Ia},Gm=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Je.jsx)(Je.Fragment,{children:t.map((o,r)=>{var n,c;let{blockType:s}=o,l=o==null?void 0:o.theme;if(s&&s in od){let u=od[s];if(u)return(0,Je.jsxs)("div",{className:"py-6 relative",children:[(0,Je.jsx)(Er,{block:o,index:r}),(0,Je.jsx)("div",{className:i(((n=l==null?void 0:l.settings)==null?void 0:n.theme)==="dark"?"dark":((c=l==null?void 0:l.settings)==null?void 0:c.theme)==="green"?"green":""),children:(0,Je.jsx)(u,{...o})})]},r)}return null})}):null};var rd=h(require("react")),Qa=h(require("@radix-Je/react-collapsible"));var sd=({title:e,richText:t})=>{let[a,o]=rd.default.useState(!1);return(0,Je.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,Je.jsxs)(Qa.Root,{className:i("w-full"),open:a,onOpenChange:o,children:[(0,Je.jsxs)(Qa.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,Je.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,Je.jsx)(Ko.ChevronUpIcon,{className:"h-6 w-6"}):(0,Je.jsx)(Ko.ChevronDownIcon,{className:"h-6 w-6"})]}),(0,Je.jsx)(Qa.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,Je.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,Je.jsx)(Q,{content:t||{},enableGutter:!1})})})]})})};var Fr={content:Ho,cta:Da,mediaBlock:Gt,collapsibleArea:sd,imageBlock:Gt,features:Ia,reusableContentBlock:wi},fa=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Je.jsx)("section",{id:"render-blocks",className:i(e.fill?"h-full w-full":""),children:t.map((o,r)=>{var n;let{blockType:s}=o,l=o==null?void 0:o.theme;if(s&&s in Fr){let c=Fr[s];if(s==="reusableContentBlock")return(0,Je.jsx)(Zo.Fragment,{children:(0,Je.jsx)(fa,{blocks:o.reusableContent.layout})},r);if(c)return(0,Je.jsxs)("div",{className:i("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,Je.jsx)(Er,{block:o,index:r}),(0,Je.jsx)("div",{className:i("container h-full relative",((n=l==null?void 0:l.settings)==null?void 0:n.theme)||"dark"),children:(0,Je.jsx)(c,{...o})})]},r)}return null})}):null},Er=e=>{var a,o,r,s,l;if(!("theme"in e.block))return(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen h-full dark bg-background")});let t=(a=e.block)==null?void 0:a.theme;if(t.settings.background==="image"){let n={imagePosition:t.settings.imagePosition||"left",overlay:t.settings.overlay!==void 0?t.settings.overlay:!0};return(0,Je.jsxs)("div",{className:i("absolute inset-0 w-full h-full bg-background",t.settings.theme||"dark"),children:[(0,Je.jsx)(ki.default,{src:((r=(o=t.settings)==null?void 0:o.image)==null?void 0:r.url)||"/placeholder.svg",alt:((l=(s=t.settings)==null?void 0:s.image)==null?void 0:l.alt)||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,Je.jsx)("div",{className:"absolute inset-0",style:{background:n.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen h-full bg-background",t.settings.theme||"dark")})},$m=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Je.jsx)("main",{id:"content-blocks",className:i(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:s}=o,l=o==null?void 0:o.theme;if(s&&s in Fr){let n=Fr[s];if(s==="reusableContentBlock")return(0,Je.jsx)(Zo.Fragment,{children:(0,Je.jsx)(fa,{blocks:o.reusableContent.layout})},r);if(n)return(0,Je.jsx)(id,{block:o,allBlocks:t,index:r,children:(0,Je.jsx)(n,{...o})})}return null})}):null},id=e=>{var c,u,d,p,g;if(e.index===0)return(0,Je.jsxs)("section",{className:"relative flex w-full",children:[(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen h-full light bg-background")}),(0,Je.jsx)("div",{className:i("container h-full relative pt-6 pb-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let t=f=>f%2===0?"light":"dark",a=({index:f,allBlocks:b})=>f===1?(0,Je.jsx)(Ni,{position:"left"}):r(f,b)==="dark"&&l(f,b)==="light"?(0,Je.jsx)(Ci,{position:"left"}):r(f,b)==="light"&&l(f,b)==="dark"?(0,Je.jsx)(Ni,{position:"left"}):null,o=({index:f,allBlocks:b})=>s(f,b)==="light"&&l(f,b)==="dark"?(0,Je.jsx)(Ci,{position:"left"}):null,r=(f,b)=>{var y,w;if(f===1)return"light";let m=b[f-1];return"theme"in m&&((w=(y=m.theme)==null?void 0:y.settings)==null?void 0:w.theme)==="light"?"light":"dark"},s=(f,b)=>{var y,w;if(f===b.length-1)return"dark";if(f===0)return"light";let m=b[f+1];return"theme"in m&&((w=(y=m.theme)==null?void 0:y.settings)==null?void 0:w.theme)==="light"?"light":"dark"},l=(f,b)=>{var y,w;if(f===b.length-1)return"dark";let m=b[f];return m.theme&&((w=(y=m.theme)==null?void 0:y.settings)==null?void 0:w.theme)==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return r(e.index,e.allBlocks)==="dark"?(0,Je.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full pt-12",children:[(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen dark bg-background")}),(0,Je.jsx)("div",{className:i("container relative","dark bg-background"),children:e.children})]}):(0,Je.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,Je.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen")}),(0,Je.jsx)("div",{className:"bg-black",children:(0,Je.jsx)("div",{className:i("container relative","dark bg-background"),children:e.children})})]});if(!("theme"in e.block)||r(e.index,e.allBlocks)===l(e.index,e.allBlocks)){let f=l(e.index,e.allBlocks);return(0,Je.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full pt-20",children:[(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen bg-background",f)}),(0,Je.jsx)("div",{className:i("container relative bg-background",f,f==="light"&&"p-12"),children:e.children})]})}if(r(e.index,e.allBlocks)!==l(e.index,e.allBlocks)){let f=l(e.index,e.allBlocks);return(0,Je.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,Je.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen bg-background",f)}),(0,Je.jsx)("div",{className:i("container relative bg-background min-h-[22em] content-center",f,f==="light"&&"p-12"),children:e.children})]})}if(!("theme"in e.block))return(0,Je.jsxs)("div",{className:i("container h-full relative","dark"),children:[(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen h-full dark bg-background")}),e.children]});let n=(c=e.block)==null?void 0:c.theme;if(n.settings.background==="image"){let f={imagePosition:n.settings.imagePosition||"left",overlay:n.settings.overlay!==void 0?n.settings.overlay:!0};return(0,Je.jsxs)("div",{className:i("absolute inset-0 w-full h-full bg-background",n.settings.theme||"dark"),children:[(0,Je.jsx)(ki.default,{src:((d=(u=n.settings)==null?void 0:u.image)==null?void 0:d.url)||"/placeholder.svg",alt:((g=(p=n.settings)==null?void 0:p.image)==null?void 0:g.alt)||"",fill:!0,className:"object-cover",priority:!0}),n.settings.overlay&&(0,Je.jsx)("div",{className:"absolute inset-0",style:{background:f.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen h-full bg-background",n.settings.theme||"dark")})},Ni=({position:e})=>(0,Je.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative bg-white",children:(0,Je.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 334",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)",bottom:"-2px",position:"absolute"},className:i("w-full block overflow-hidden"),children:(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),Ci=({position:e})=>(0,Je.jsx)("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:i("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var cd=h(require("clsx"));var nd=require("next/navigation");function Vm({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,nd.useRouter)(),r=(0,Zo.useRef)(null),s=(0,Zo.useRef)(null),l=(0,Zo.useRef)(0),n=(0,Zo.useRef)(!1),c=(0,Zo.useRef)(0),u=(0,Zo.useCallback)(p=>{if(p.target){let g=p.target,f=+new Date,b=g==null?void 0:g.closest("a");c.current=p.button,b?n.current=!0:(n.current=!1,l.current=f)}},[o,r,s,l]),d=(0,Zo.useCallback)(p=>{var g,f;if((g=s.current)!=null&&g.href){let m=+new Date-l.current;if((f=s.current)!=null&&f.href&&m<=250&&!n.current&&c.current===0&&!p.ctrlKey)if(e){let y=t?"_blank":"_self";window.open(s.current.href,y)}else o.push(s.current.href,{scroll:a})}},[o,r,s,l]);return(0,Zo.useEffect)(()=>{let p=r.current;return p&&(p.addEventListener("mousedown",u),p.addEventListener("mouseup",d)),()=>{p&&p&&(p==null||p.removeEventListener("mousedown",u),p==null||p.removeEventListener("mouseup",d))}},[r,s,o]),{card:{ref:r},link:{ref:s}}}var ld=Vm;var dd=h(require("next/link"));var Fo=e=>{let{card:t,link:a}=ld({}),{className:o,doc:r,relationTo:s,showCategories:l,title:n}=e,{slug:c,categories:u,meta:d,title:p}=r||{},{description:g,image:f}=d||{},b=u&&Array.isArray(u)&&u.length>0,m=n||p,y=g==null?void 0:g.replace(/\s/g," "),w=`/${s}/${c}`;return(0,Je.jsxs)("article",{className:i("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,Je.jsxs)("div",{className:"relative w-full ",children:[!f&&(0,Je.jsx)("div",{className:"",children:"No image"}),f&&typeof f!="string"&&(0,Je.jsx)(_t,{resource:f,size:"33vw"})]}),(0,Je.jsxs)("div",{className:"p-4",children:[l&&b&&(0,Je.jsx)("div",{className:"uppercase text-sm mb-4",children:l&&b&&(0,Je.jsx)("div",{children:u==null?void 0:u.map((G,ee)=>{if(typeof G=="object"){let{title:fe}=G,ze=fe||"Untitled category",Pt=ee===u.length-1;return(0,Je.jsxs)(Zo.Fragment,{children:[ze,!Pt&&(0,Je.jsx)(Zo.Fragment,{children:", \xA0"})]},ee)}return null})})}),m&&(0,Je.jsx)("div",{className:"prose",children:(0,Je.jsx)("h3",{children:(0,Je.jsx)(dd.default,{className:"not-prose",href:w,ref:a.ref,children:m})})}),g&&(0,Je.jsx)("div",{className:"mt-2",children:g&&(0,Je.jsx)("p",{children:y})})]})]})};var Um=e=>{let{className:t,docs:a,introContent:o}=e;return(0,Je.jsxs)("div",{className:(0,cd.default)("container",t),children:[o&&(0,Je.jsx)(Q,{content:o,enableGutter:!1}),(0,Je.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:a==null?void 0:a.map((r,s)=>typeof r=="string"?null:(0,Je.jsx)(Fo,{doc:r,relationTo:"posts",showCategories:!0},s))})]})};var ao=require("framer-motion");var e0=require("pagedjs");var Wm=e=>{let{posts:t}=e;return(0,Je.jsx)("div",{className:i("container"),children:(0,Je.jsx)("div",{children:(0,Je.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-Je-4 lg:gap-y-8 lg:gap-Je-8 Je:gap-Je-8",children:t==null?void 0:t.map((a,o)=>typeof a=="object"&&a!==null?(0,Je.jsx)("div",{className:"col-span-4",children:(0,Je.jsx)(Fo,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var md=h(require("clsx")),pd=h(require("next/image")),jm=e=>{let{loading:t,priority:a,className:o}=e;return(0,Je.jsx)(pd.default,{alt:"Payload Logo",width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,md.default)("max-w-[9.375rem] w-full h-[34px]",o),src:"https://raw.githubusercontent.com/payloadcms/payload/main/packages/Je/src/assets/payload-logo-light.svg"})};var Xm={plural:"Docs",singular:"Doc"},Ym={posts:{plural:"Posts",singular:"Post"}},qm=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:r,limit:s,totalDocs:l}=e,n=(r?r-1:1)*(s||1)+1;l&&n>l&&(n=0);let c=(r||1)*(s||1);l&&c>l&&(c=l);let{plural:u,singular:d}=o||Ym[a||""]||Xm||{};return(0,Je.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof l=="undefined"||l===0)&&"Search produced nd results.",typeof l!="undefined"&&l>0&&`Showing ${n}${n>0?` - ${c}`:""} of ${l} ${l>1?u:d}`]})};var Si=h(require("react")),Ti=({className:e,...t})=>(0,Je.jsx)("nav",{"aria-label":"pagination",className:i("mx-auto flex w-full justify-center",e),role:"navigation",...t});Ti.displayName="Pagination";var Di=Si.forwardRef(({className:e,...t},a)=>(0,Je.jsx)("$n",{className:i("flex flex-row items-center gap-1",e),ref:a,...t}));Di.displayName="PaginationContent";var Wt=Si.forwardRef(({className:e,...t},a)=>(0,Je.jsx)("li",{className:i("",e),ref:a,...t}));Wt.displayName="PaginationItem";var La=({className:e,isActive:t,size:a="icon",...o})=>(0,Je.jsx)("button",{"aria-current":t?"page":void 0,className:i(Qt({size:a,variant:t?"outline":"ghost"}),e),...o});La.displayName="PaginationLink";var Mi=({className:e,...t})=>(0,Je.jsxs)(La,{"aria-label":"Go $n previous page",className:i("gap-1 Je-2.5",e),size:"default",...t,children:[(0,Je.jsx)($n.ChevronLeft,{className:"h-4 w-4"}),(0,Je.jsx)("span",{children:"Previous"})]});Mi.displayName="PaginationPrevious";var Ii=({className:e,...t})=>(0,Je.jsxs)(La,{"aria-label":"Go $n next page",className:i("gap-1 pr-2.5",e),size:"default",...t,children:[(0,Je.jsx)("span",{children:"Next"}),(0,Je.jsx)($n.ChevronRight,{className:"h-4 w-4"})]});Ii.displayName="PaginationNext";var zr=({className:e,...t})=>(0,Je.jsxs)("span",{"aria-hidden":!0,className:i("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Je.jsx)($n.MoreHorizontal,{className:"h-4 w-4"}),(0,Je.jsx)("span",{className:"sr-only",children:"More pages"})]});zr.displayName="PaginationEllipsis";var Km=e=>{let t=(0,nd.useRouter)(),{className:a,page:o,totalPages:r}=e,s=o<r,l=o>1,n=o-1>1,c=o+1<r;return(0,Je.jsx)("div",{className:i("my-12",a),children:(0,Je.jsx)(Ti,{children:(0,Je.jsxs)(Di,{children:[(0,Je.jsx)(Wt,{children:(0,Je.jsx)(Mi,{disabled:!l,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),n&&(0,Je.jsx)(Wt,{children:(0,Je.jsx)(zr,{})}),l&&(0,Je.jsx)(Wt,{children:(0,Je.jsx)(La,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,Je.jsx)(Wt,{children:(0,Je.jsx)(La,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),s&&(0,Je.jsx)(Wt,{children:(0,Je.jsx)(La,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),c&&(0,Je.jsx)(Wt,{children:(0,Je.jsx)(zr,{})}),(0,Je.jsx)(Wt,{children:(0,Je.jsx)(Ii,{disabled:!s,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var Ai=h(require("next/image")),bd=({logoImage:e})=>(0,Je.jsxs)("footer",{className:`absolute bottom-0 left-0 w-full py-2 px-8 flex justify-between items-center transition-colors duration-300
|
|
10
|
+
`,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,Je.jsx)("div",{className:"relative z-10 flex h-full flex-col",children:(0,Je.jsxs)("div",{className:"mt-auto divide-y md:opacity-0 md:transition-[transform,opacity] md:duration-500 md:group-hover/portfolio:opacity-100",children:[(0,Je.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-lg",children:(0,Je.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(-100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,Je.jsx)("p",{className:"mt-[13px] overflow-hidden pt-[11px] text-body",children:(0,Je.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var xi=h(require("next/image")),Ir=h(require("path"));function wm(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function Nm(e){return e.startsWith("http")}function Cm(e,t){let a=e;if(wm(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(Nm(e))a=e;else if(t.source==="github"){let o=e.replace("./","");if(o.startsWith("/")&&(o=o.slice(1)),t.linked){if(t.linked.path){let r=Ir.default.dirname(t.linked.path);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.linked.owner}&repo=${t.linked.repo}&path=${o}&branch=${t.linked.branch}`}else{if(t.file){let r=Ir.default.dirname(t.file);r.startsWith(".")||(o=`${r}/${o}`)}a=`/docs/api/github/content?owner=${t.owner}&repo=${t.repo}&path=${o}&branch=${t.branch}`}}else if(e.startsWith("/"))a=e;else if(e.startsWith("./")){let o=e.replace("./","");t.file&&(o=`/${Ir.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function Pm({src:e,alt:t}){let[a,o]=(0,Zo.useState)(!1),[r,s]=(0,Zo.useState)(!1),[l,n]=(0,Zo.useState)({width:0,height:0}),c=()=>{r&&o(!0)},u=()=>{o(!1)},d=p=>{let{naturalWidth:g,naturalHeight:f}=p.target;n({width:g,height:f}),s(g>300||f>300)};return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${l.height>300?"h-[300px]":`h-[${l.height}px]`}`,onClick:c,children:(0,Je.jsx)(xi.default,{sizes:"100vw",height:l.height,width:l.width,src:e,alt:t||"",onLoad:d,unoptimized:!0,className:"object-contain max-w-full max-h-full"})}),(0,Je.jsx)(tt,{open:a,onOpenChange:o,children:(0,Je.jsxs)(Xe,{className:"flex flex-col items-center justify-center",children:[(0,Je.jsxs)(ft,{className:"flex w-full justify-end",children:[(0,Je.jsx)(gt,{className:"hidden",children:t}),(0,Je.jsx)(pr,{})]}),(0,Je.jsx)("div",{className:"flex items-center justify-center",children:(0,Je.jsx)(xi.default,{height:l.height,width:l.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function ql({props:e,baseContext:t}){let{src:a}=e;return a=Cm(a,t),(0,Je.jsx)(Pm,{src:a,alt:e.alt})}var Kl=h(require("next/link"));function ot({children:e,href:t,openNewTab:a,...o}){return(0,Je.jsx)(Kl.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function km(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Rm({icon:e,title:t,description:a,slug:o}){return(0,Je.jsxs)("article",{className:i(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block h-full space-y-6 overflow-hidden rounded-5 p-6 md:space-y-7 md:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,Je.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,Je.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent md:text-[4rem]",children:km(e)?(0,Je.jsx)(Se,{type:e.type,iconName:e.iconName,size:"sm"}):e}),(0,Je.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-lg",children:o?(0,Je.jsx)(ot,{href:o,children:t}):t})]}),(0,Je.jsx)("p",{className:"text-foreground",children:a}),o&&(0,Je.jsx)(D,{asChild:!0,className:i(["rounded-5 border p-5","group-hover/service:border-accent","border-current bg-transparent text-foreground hover:bg-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,Je.jsxs)(ot,{href:o,children:[(0,Je.jsx)("span",{children:"Read More"}),(0,Je.jsx)("span",{className:"relative Je-3 text-sm/[1] text-accent",children:(0,Je.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Je.jsx)("path",{d:"M11.8125 5.75C11.8125 6.24219 11.4023 6.65234 10.9375 6.65234H7V10.5898C7 11.0547 6.58984 11.4375 6.125 11.4375C5.63281 11.4375 5.25 11.0547 5.25 10.5898V6.65234H1.3125C0.820312 6.65234 0.4375 6.24219 0.4375 5.75C0.4375 5.28516 0.820312 4.90234 1.3125 4.90234H5.25V0.964844C5.25 0.472656 5.63281 0.0625 6.125 0.0625C6.58984 0.0625 7 0.472656 7 0.964844V4.90234H10.9375C11.4023 4.875 11.8125 5.28516 11.8125 5.75Z"})})})]})}),(0,Je.jsx)("span",{className:"invisible absolute bottom-0 left-0 h-[2px] w-full scale-Je-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-Je-100 group-hover/service:opacity-100"})]})}function Sm({title:e,description:t,features:a,price:o,duration:r,button:s}){return(0,Je.jsxs)("div",{className:"relative grid rounded-5 border border-accent-200 dark:border-opacity-20 lg:grid-cols-[300px_1fr] 2xl:grid-cols-[386px_1fr]",children:[(0,Je.jsxs)("div",{className:"h-full border-card p-6 dark:border-opacity-20 max-lg:border-b max-lg:pt-14 lg:border-r lg:p-10",children:[(0,Je.jsx)("h3",{className:"mb-4 text-lg font-bold leading-[1.3] text-foreground lg:mb-5 lg:text-Je",children:e}),(0,Je.jsx)("p",{children:t})]}),(0,Je.jsx)("div",{className:"relative my-auto p-6 max-lg:pb-14 md:p-10",children:(0,Je.jsxs)("div",{className:"flex flex-col justify-stretch gap-Je-14 gap-y-5 md:flex-row md:items-center",children:[a&&a.length>0&&(0,Je.jsx)("$n",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((l,n)=>(0,Je.jsxs)("li",{className:"flex items-start gap-3 lg:gap-4",children:[(0,Je.jsx)("span",{className:"text-accent pt-1",children:(0,Je.jsx)(Pl.FaCircleCheck,{})}),(0,Je.jsx)("span",{children:l})]},n))}),(0,Je.jsxs)("p",{className:"font-secondary An-auto text-Je font-bold leading-[1.25] text-accent-900 dark:text-white lg:text-2xl",children:[o&&o,(0,Je.jsx)("sub",{className:"relative bottom-0 An-1.5 inline-block text-base lg:text-md",children:r&&r})]}),s&&(0,Je.jsx)("div",{className:"flex-none mr-0 sm:An-auto",children:(0,Je.jsx)(D,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,Je.jsxs)(ot,{href:s.href,openNewTab:s.openNewTab,children:[(0,Je.jsx)("span",{className:"relative z-1",children:s.label}),(0,Je.jsx)("span",{className:"relative z-1 Je-2",children:(0,Je.jsx)(Pl.FaAnglesRight,{})})]})})})]})})]})}function Tm({className:e,badge:t,title:a,subtitle:o}){return(0,Je.jsxs)("div",{className:i("relative overflow-hidden rounded-Je bg-gradient-$n-Je from-[#A42368] $n-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,Je.jsxs)("div",{className:"relative z-10 mx-auto max-w-4xl text-center",children:[t&&(0,Je.jsx)("div",{className:"mb-4",children:(0,Je.jsx)("span",{className:"inline-block rounded-lg bg-[#A42368]/50 px-4 py-1.5 text-sm font-medium text-white backdrop-blur-sm",children:t})}),(0,Je.jsx)("h1",{className:"mt-6 text-3xl font-bold tracking-tight text-white sm:text-4xl md:text-5xl lg:text-6xl",children:a}),(0,Je.jsx)("p",{className:"mt-6 text-base text-gray-300 sm:text-lg md:text-Je",children:o})]}),(0,Je.jsx)("div",{className:"absolute bottom-0 left-1/2 h-48 w-full -translate-Je-1/2",style:{background:"radial-gradient(50% 50% at 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,Je.jsx)("div",{className:"absolute bottom-0 left-1/2 h-32 w-full -translate-Je-1/2",children:(0,Je.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,Je.jsx)("path",{d:"Je-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function Ql(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Dm({variant:e="outline",className:t,icon:a,iconSize:o="large",width:r="auto",order:s=0,heading:l,subheading:n,content:c,statistic:u,buttonText:d,buttonHref:p}){let g={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-$n-Je from-[#A42368] $n-[#4A1030]",radial:"bg-gradient-$n-Je from-[#4A1030] $n-[#2D0A1D] relative overflow-hidden",light:""},f={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,Je.jsxs)("div",{className:i("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",g[e],e==="outline"?"text-gray-900":"text-white",t,f[r],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${s+1}00`),children:[(0,Je.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Je.jsx)(Mm,{icon:a,heading:l,variant:e,iconSize:o})}),u&&(0,Je.jsx)("div",{className:"mb-6",children:(0,Je.jsx)("div",{className:i("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:u})}),n&&(0,Je.jsx)("div",{className:"mb-4 text-Je md:text-2xl font-light",children:n}),c&&typeof c=="object"&&(0,Je.jsx)("div",{className:i("space-y-6"),children:(0,Je.jsx)(Q,{enableGutter:!1,content:c,enableProse:!1,className:i(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),c&&typeof c=="string"&&(0,Je.jsx)("div",{className:i("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:c}),d&&(0,Je.jsx)("div",{className:"mt-auto pt-6 flex items-center justify-center",children:(0,Je.jsx)(D,{size:"lg",className:"text-white text-lg rounded-Je w-full mt-auto items-center justify-center",asChild:!0,children:(0,Je.jsx)("a",{href:p,children:d})})}),e==="radial"&&(0,Je.jsx)("div",{className:"absolute bottom-0 right-0 w-2/3 h-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var Mm=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,Je.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[Ql(e)&&(0,Je.jsx)("div",{className:i("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"mt-2":""),children:(0,Je.jsx)(Se,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,Je.jsx)("div",{className:i("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,Je.jsxs)("div",{className:"flex flex-col gap-4",children:[Ql(e)&&(0,Je.jsx)("div",{className:i("h-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,Je.jsx)(Se,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,Je.jsx)("h3",{className:i("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,Je.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,Je.jsx)("div",{className:i("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Zl=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,Je.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function Im({icon:e,title:t,body:a,color:o="secondary"}){return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)("div",{className:"flex py-0 min-h-16",children:[(0,Je.jsx)("div",{className:"px-[2%] flex items-center",children:(0,Je.jsx)("div",{className:"w-12 h-12",children:(0,Je.jsx)(Se,{type:e.type,iconName:e.name})})}),(0,Je.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,Je.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var td=h(require("next/image"));function Am(e){let{url:t,mainImage:a,excerpt:o,title:r}=e;return(0,Je.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-md shadow-black/5 ring-1 ring-black/5 hover:shadow-lg transition-shadow group",children:[a&&(0,Je.jsx)(td.default,{alt:r||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,Je.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,Je.jsx)("div",{className:"mt-2 font-medium text-center group-hover:scale-110 transition-transform duration-400 ease-in-out text-foreground dark:text-background group-hover:text-accent",children:(0,Je.jsxs)("a",{href:t,children:[(0,Je.jsx)("span",{className:"absolute inset-0"}),r]})}),o&&(0,Je.jsx)("div",{className:"mt-2 flex-1 text-sm/6 text-gray-500",children:o})]})]},t)}var Bm=(e,t)=>`from-brand-${e} $n-brand-${t}`;function Lm({...e}){let t=Bm(e.brandFrom||"one",e.brandTo||"two");return(0,Je.jsxs)("div",{className:`relative isolate flex items-center gap-Je-6 overflow-hidden px-6 py-2.5 sm:px-3.5 sm:before:flex-1 bg-gradient-$n-r ${t}`,children:[(0,Je.jsx)("p",{className:"text-sm/6 text-primary-foreground",children:e.url?(0,Je.jsxs)("a",{href:e.url,children:[(0,Je.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Je.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Je.jsx)("circle",{r:1,cx:1,cy:1})}),(0,Je.jsx)("span",{children:e.message&&e.message})]}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,Je.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,Je.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,Je.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Eo=h(require("react")),Em={Architecture:(0,Je.jsx)($n.DraftingCompass,{className:"h-5 w-5 text-blue-600"}),Engineering:(0,Je.jsx)($n.Code,{className:"h-5 w-5 text-green-600"}),Development:(0,Je.jsx)($n.Code,{className:"h-5 w-5 text-purple-600"}),Delivery:(0,Je.jsx)($n.GanttChart,{className:"h-5 w-5 text-red-600"})},Hm=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:r})=>{let s=e.reports.length>0;return(0,Je.jsx)("div",{className:`An-${t*4} mb-2`,children:(0,Je.jsxs)("div",{className:`flex items-center p-3 rounded-lg shadow-sm border ${r?"bg-card border-primary":"bg-white border-gray-200"}`,children:[s&&(0,Je.jsx)("button",{onClick:a,className:"mr-2","aria-label":o?"Collapse":"Expand",children:o?(0,Je.jsx)($n.ChevronDown,{className:"h-4 w-4"}):(0,Je.jsx)($n.ChevronRight,{className:"h-4 w-4"})}),(0,Je.jsx)("div",{className:"w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center mr-3",children:(0,Je.jsx)($n.Users,{className:"h-6 w-6 text-gray-500"})}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("h3",{className:"text-sm font-semibold text-gray-800",children:e.name}),(0,Je.jsxs)("div",{className:"flex items-center mt-1",children:[Em[e.discipline],(0,Je.jsx)("span",{className:"An-1 text-xs text-gray-600",children:e.discipline})]})]}),(0,Je.jsx)("span",{className:"An-auto text-xs font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},ad=({person:e,level:t,searchTerm:a})=>{let[o,r]=(0,Eo.useState)(t<1),s=()=>r(!o),l=d=>d.name.toLowerCase().includes(a.toLowerCase())||d.discipline.toLowerCase().includes(a.toLowerCase())||d.grade.toLowerCase().includes(a.toLowerCase()),n=d=>l(d)||d.reports.some(n),c=a===""||n(e),u=l(e);return Eo.default.useEffect(()=>{a!==""&&n(e)&&r(!0)},[a,e]),c?(0,Je.jsxs)("div",{children:[(0,Je.jsx)(Hm,{person:e,level:t,onToggle:s,isExpanded:o,isHighlighted:u}),o&&e.reports.map((d,p)=>(0,Je.jsx)(ad,{person:d,level:t+1,searchTerm:a},p))]}):null};function Fm(){let[e,t]=(0,Eo.useState)("");return(0,Je.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,Je.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,Je.jsxs)("div",{className:"mb-4 relative",children:[(0,Je.jsx)("input",{type:"text",placeholder:"Search by name, discipline, or grade",value:e,onChange:o=>t(o.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,Je.jsx)($n.Search,{className:"absolute right-3 top-2.5 h-5 w-5 text-gray-400"})]}),(0,Je.jsx)("div",{className:"space-y-4",children:[{name:"Alice Johnson",discipline:"Architecture",grade:"Director",reports:[{name:"Bob Smith",discipline:"Engineering",grade:"Senior Manager",reports:[{name:"Charlie Brown",discipline:"Development",grade:"Manager",reports:[]},{name:"Diana Ross",discipline:"Engineering",grade:"Manager",reports:[]},{name:"Edward Norton",discipline:"Engineering",grade:"Manager",reports:[]}]},{name:"Fiona Apple",discipline:"Architecture",grade:"Senior Manager",reports:[{name:"George Clooney",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Helen Mirren",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Ian McKellen",discipline:"Architecture",grade:"Manager",reports:[]}]},{name:"Julia Roberts",discipline:"Development",grade:"Senior Manager",reports:[{name:"Kevin Spacey",discipline:"Development",grade:"Manager",reports:[]},{name:"Liam Neeson",discipline:"Development",grade:"Manager",reports:[]},{name:"Meryl Streep",discipline:"Development",grade:"Manager",reports:[]}]}]},{name:"Nicole Kidman",discipline:"Delivery",grade:"Director",reports:[{name:"Owen Wilson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Penelope Cruz",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Quentin Tarantino",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Rachel McAdams",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Samuel L. Jackson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Tom Hanks",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Uma Thurman",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Viola Davis",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Will Smith",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Xavier Dolan",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Yalitza Aparicio",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Zoe Saldana",discipline:"Delivery",grade:"Manager",reports:[]}]}]}].map((o,r)=>(0,Je.jsx)(ad,{person:o,level:0,searchTerm:e},r))})]})}function zm({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"Je detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"Je comprehensive analysis of the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification of gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis of these gaps."},{title:"Recommendations Report",description:"Je set of actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"Je phased roadmap outlining the steps $n implement the recommended changes, including timelines, milestones, and prioritisation of initiatives."},{title:"Risk Management Plan",description:"Je detailed plan outlining potential risks and mitigation strategies $n ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption of GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading $n improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies $n mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation $n leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,Je.jsxs)("div",{className:"grid gap-6 lg:grid-cols-3",children:[(0,Je.jsxs)("div",{className:"lg:col-span-1 space-y-6 flex flex-col",children:[(0,Je.jsxs)(Ce,{className:"flex-grow",children:[(0,Je.jsx)(Ge,{className:"bg-primary text-primary-foreground",children:(0,Je.jsxs)($e,{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.Users,{className:"h-5 w-5"}),"Team"]})}),(0,Je.jsxs)(Te,{className:"p-6",children:[(0,Je.jsx)("p",{className:"mb-6 text-sm text-muted-foreground",children:"Je small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,Je.jsxs)("div",{className:"space-y-6",children:[(0,Je.jsx)("div",{className:"space-y-2",children:e.leadership.map((r,s)=>(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.User,{className:"h-4 w-4 text-muted-foreground"}),(0,Je.jsx)("span",{children:r.role})]}),r.isFTE&&(0,Je.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},s))}),(0,Je.jsx)("div",{className:"space-y-2",children:e.core.map((r,s)=>(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.User,{className:"h-4 w-4 text-muted-foreground"}),(0,Je.jsx)("span",{children:r.role}),r.count&&(0,Je.jsxs)("span",{children:["(",r.count,"Je)"]})]}),r.isFTE&&(0,Je.jsx)("span",{className:"text-xs text-muted-foreground",children:"(FTE)"})]},s))}),(0,Je.jsxs)("div",{children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Je.jsx)($n.Users2,{className:"h-4 w-4 text-muted-foreground"}),(0,Je.jsx)("span",{children:"SME input:"})]}),(0,Je.jsx)("div",{className:"An-6 text-sm text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,Je.jsxs)(Ce,{children:[(0,Je.jsx)(Ge,{className:"bg-primary text-primary-foreground",children:(0,Je.jsxs)($e,{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.PoundSterling,{className:"h-5 w-5"}),"Fee"]})}),(0,Je.jsx)(Te,{className:"p-6",children:(0,Je.jsx)("p",{className:"text-lg font-semibold",children:o})})]})]}),(0,Je.jsxs)(Ce,{className:"lg:col-span-1 flex flex-col",children:[(0,Je.jsx)(Ge,{className:"bg-primary text-primary-foreground",children:(0,Je.jsxs)($e,{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.FileText,{className:"h-5 w-5"}),"Outputs"]})}),(0,Je.jsxs)(Te,{className:"p-6 flex-grow overflow-auto",children:[(0,Je.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((r,s)=>(0,Je.jsxs)("li",{className:"text-sm",children:[(0,Je.jsxs)("span",{className:"font-medium",children:[r.title,":"]})," ",(0,Je.jsx)("span",{className:"text-muted-foreground",children:r.description})]},s))}),(0,Je.jsx)("p",{className:"mt-6 text-sm italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,Je.jsxs)(Ce,{className:"lg:col-span-1 flex flex-col",children:[(0,Je.jsx)(Ge,{className:"bg-primary text-primary-foreground",children:(0,Je.jsxs)($e,{className:"flex items-center gap-2",children:[(0,Je.jsx)($n.Lightbulb,{className:"h-5 w-5"}),"Benefits"]})}),(0,Je.jsx)(Te,{className:"p-6 flex-grow overflow-auto",children:(0,Je.jsx)("$n",{className:"space-y-4",children:a.map((r,s)=>(0,Je.jsxs)("li",{className:"flex gap-2 text-sm",children:[(0,Je.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,Je.jsx)("span",{children:r})]},s))})})]})]})}function Om(){return(0,Je.jsx)("div",{className:"w-full bg-primary text-white p-8 rounded-lg border border-dashed border-white/30",children:(0,Je.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,Je.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-lg",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Je.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Je.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,Je.jsx)($n.BarChart3,{className:"w-8 h-8"})]}),(0,Je.jsx)("h2",{className:"text-Je font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,Je.jsx)("p",{className:"text-secondary text-sm",children:"Je excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,Je.jsxs)("$n",{className:"text-sm",children:[(0,Je.jsx)("li",{children:"Strategy definition"}),(0,Je.jsx)("li",{children:"Programme leadership"}),(0,Je.jsx)("li",{children:"Detailed planning"}),(0,Je.jsx)("li",{children:"\u2022 Financial control"}),(0,Je.jsx)("li",{children:"\u2022 Rigorous governance"})]})]}),(0,Je.jsxs)("div",{className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Je.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Je.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,Je.jsx)($n.CogIcon,{className:"w-8 h-8"})]}),(0,Je.jsx)("h2",{className:"text-Je font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,Je.jsx)("p",{className:"text-sky-200 text-sm",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,Je.jsx)("p",{className:"text-sm",children:"Je deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,Je.jsxs)("div",{className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Je.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Je.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,Je.jsx)($n.Building2,{className:"w-8 h-8"})]}),(0,Je.jsx)("h2",{className:"text-Je font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,Je.jsx)("p",{className:"text-sky-200 text-sm",children:"Je understand how $n navigate public sector and financial services regulation and how $n deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,Je.jsx)("p",{className:"text-sm",children:"Je have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,Je.jsxs)("div",{className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,Je.jsx)("div",{className:"w-10 h-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,Je.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,Je.jsx)($n.BadgeCheck,{className:"w-8 h-8"})]}),(0,Je.jsx)("h2",{className:"text-Je font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,Je.jsx)("p",{className:"text-sky-200 text-sm",children:"Je have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,Je.jsx)("p",{className:"text-sm",children:"As an XXXX strategic partner, Je have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var Ho=e=>{var n;let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},r={none:"",line:"border border-primary p-4 rounded-lg"},s=c=>{if(c.type&&c.type==="block"&&c.fields&&(c.fields.blockType==="imageBlock"||c.fields.blockType==="mediaBlock"))return!0;if(c.root&&c.root.children){for(let u of c.root.children)if(s(u))return!0}if(c.children){for(let u of c.children)if(s(u))return!0}return!1},l=(c,u,d)=>{if(u==="none"||d==="full")return{processedRichText:c,heading:null};let p=c,g=null;return c&&c.root&&c.root.children&&c.root.children[0].tag==="h2"&&(p={...c,root:{...c.root,children:c.root.children.slice(1)}},g=c.root.children[0]),{processedRichText:p,heading:g}};return(0,Je.jsx)("div",{className:"container my-6",children:(0,Je.jsx)("div",{className:i("grid grid-cols-4 lg:grid-cols-12 gap-y-8",(n=a==null?void 0:a.settings)!=null&&n.box?"gap-Je-8":"gap-Je-16"),children:t&&t.length>0&&t.map((c,u)=>{var y,w;let{enableLink:d,link:p,richText:g,size:f}=c,{processedRichText:b,heading:m}=l(g,((y=a==null?void 0:a.settings)==null?void 0:y.box)||"none",f||"full");return(0,Je.jsxs)("div",{className:i(`col-span-4 lg:col-span-${o[f]}`,{"md:col-span-2":f!=="full"},r[f!=="full"&&!s(g)&&((w=a==null?void 0:a.settings)==null?void 0:w.box)||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${u+1}00`),children:[m&&(0,Je.jsx)("div",{className:"bg-primary text-primary-foreground mb-4 -mt-4 -mx-4 px-4 py-2 text-Je",children:m.children[0].text}),b&&(0,Je.jsx)(Q,{content:b,enableGutter:!1,className:"rich-text"}),d&&(0,Je.jsx)(yt,{...p})]},u)})})})};var Lr=h(require("next/image"));function _m({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:r}){return(0,Je.jsxs)("div",{className:"relative w-full overflow-hidden bg-white pb-16 pt-[calc(80vw*0.5)]",children:[(0,Je.jsx)("div",{className:"absolute left-0 top-0 h-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,Je.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] h-[80vw] w-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,Je.jsx)(Lr.default,{src:e,alt:"Header background",className:"h-full w-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,Je.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,Je.jsx)("div",{className:"h-16 w-32 md:h-24 md:w-48",children:(0,Je.jsx)(Lr.default,{src:o,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})}),r&&(0,Je.jsx)("div",{className:"h-10 w-20 md:h-12 md:w-24",children:(0,Je.jsx)(Lr.default,{src:r,alt:"Customer logo",className:"h-full w-full object-contain",width:96,height:48})})]}),(0,Je.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,Je.jsx)("p",{className:"mb-4 text-lg font-medium text-sky-400",children:t}),(0,Je.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var ki=h(require("next/image"));var wi=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,Je.jsx)(Gm,{blocks:a.layout}):(0,Je.jsx)(Je.Fragment,{})},od={content:Ho,cta:Da,mediaBlock:Gt,imageBlock:Gt,features:Ia},Gm=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Je.jsx)(Je.Fragment,{children:t.map((o,r)=>{var n,c;let{blockType:s}=o,l=o==null?void 0:o.theme;if(s&&s in od){let u=od[s];if(u)return(0,Je.jsxs)("div",{className:"py-6 relative",children:[(0,Je.jsx)(Er,{block:o,index:r}),(0,Je.jsx)("div",{className:i(((n=l==null?void 0:l.settings)==null?void 0:n.theme)==="dark"?"dark":((c=l==null?void 0:l.settings)==null?void 0:c.theme)==="green"?"green":""),children:(0,Je.jsx)(u,{...o})})]},r)}return null})}):null};var rd=h(require("react")),Qa=h(require("@radix-Je/react-collapsible"));var sd=({title:e,richText:t})=>{let[a,o]=rd.default.useState(!1);return(0,Je.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,Je.jsxs)(Qa.Root,{className:i("w-full"),open:a,onOpenChange:o,children:[(0,Je.jsxs)(Qa.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,Je.jsx)("h2",{className:"text-lg font-medium",children:e}),a?(0,Je.jsx)(Ko.ChevronUpIcon,{className:"h-6 w-6"}):(0,Je.jsx)(Ko.ChevronDownIcon,{className:"h-6 w-6"})]}),(0,Je.jsx)(Qa.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,Je.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,Je.jsx)(Q,{content:t||{},enableGutter:!1})})})]})})};var Fr={content:Ho,cta:Da,mediaBlock:Gt,collapsibleArea:sd,imageBlock:Gt,features:Ia,reusableContentBlock:wi},fa=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Je.jsx)("section",{id:"render-blocks",className:i(e.fill?"h-full w-full":""),children:t.map((o,r)=>{var n;let{blockType:s}=o,l=o==null?void 0:o.theme;if(s&&s in Fr){let c=Fr[s];if(s==="reusableContentBlock")return(0,Je.jsx)(Zo.Fragment,{children:(0,Je.jsx)(fa,{blocks:o.reusableContent.layout})},r);if(c)return(0,Je.jsxs)("div",{className:i("py-6 relative",e.fill&&"flex h-full items-center justify-center"),children:[(0,Je.jsx)(Er,{block:o,index:r}),(0,Je.jsx)("div",{className:i("container h-full relative",((n=l==null?void 0:l.settings)==null?void 0:n.theme)||"dark"),children:(0,Je.jsx)(c,{...o})})]},r)}return null})}):null},Er=e=>{var a,o,r,s,l;if(!("theme"in e.block))return(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen h-full dark bg-background")});let t=(a=e.block)==null?void 0:a.theme;if(t.settings.background==="image"){let n={imagePosition:t.settings.imagePosition||"left",overlay:t.settings.overlay!==void 0?t.settings.overlay:!0};return(0,Je.jsxs)("div",{className:i("absolute inset-0 w-full h-full bg-background",t.settings.theme||"dark"),children:[(0,Je.jsx)(ki.default,{src:((r=(o=t.settings)==null?void 0:o.image)==null?void 0:r.url)||"/placeholder.svg",alt:((l=(s=t.settings)==null?void 0:s.image)==null?void 0:l.alt)||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,Je.jsx)("div",{className:"absolute inset-0",style:{background:n.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen h-full bg-background",t.settings.theme||"dark")})},$m=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,Je.jsx)("main",{id:"content-blocks",className:i(e.fill?"h-full w-full":""),children:t.map((o,r)=>{let{blockType:s}=o,l=o==null?void 0:o.theme;if(s&&s in Fr){let n=Fr[s];if(s==="reusableContentBlock")return(0,Je.jsx)(Zo.Fragment,{children:(0,Je.jsx)(fa,{blocks:o.reusableContent.layout})},r);if(n)return(0,Je.jsx)(id,{block:o,allBlocks:t,index:r,children:(0,Je.jsx)(n,{...o})})}return null})}):null},id=e=>{var c,u,d,p,g;if(e.index===0)return(0,Je.jsxs)("section",{className:"relative flex w-full",children:[(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen h-full light bg-background")}),(0,Je.jsx)("div",{className:i("container h-full relative pt-6 pb-12 min-h-[22em] content-center light bg-background"),children:e.children})]});let t=f=>f%2===0?"light":"dark",a=({index:f,allBlocks:b})=>f===1?(0,Je.jsx)(Ni,{position:"left"}):r(f,b)==="dark"&&l(f,b)==="light"?(0,Je.jsx)(Ci,{position:"left"}):r(f,b)==="light"&&l(f,b)==="dark"?(0,Je.jsx)(Ni,{position:"left"}):null,o=({index:f,allBlocks:b})=>s(f,b)==="light"&&l(f,b)==="dark"?(0,Je.jsx)(Ci,{position:"left"}):null,r=(f,b)=>{var y,w;if(f===1)return"light";let m=b[f-1];return"theme"in m&&((w=(y=m.theme)==null?void 0:y.settings)==null?void 0:w.theme)==="light"?"light":"dark"},s=(f,b)=>{var y,w;if(f===b.length-1)return"dark";if(f===0)return"light";let m=b[f+1];return"theme"in m&&((w=(y=m.theme)==null?void 0:y.settings)==null?void 0:w.theme)==="light"?"light":"dark"},l=(f,b)=>{var y,w;if(f===b.length-1)return"dark";let m=b[f];return m.theme&&((w=(y=m.theme)==null?void 0:y.settings)==null?void 0:w.theme)==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return r(e.index,e.allBlocks)==="dark"?(0,Je.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full pt-12",children:[(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen dark bg-background")}),(0,Je.jsx)("div",{className:i("container relative","dark bg-background"),children:e.children})]}):(0,Je.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,Je.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen")}),(0,Je.jsx)("div",{className:"bg-black",children:(0,Je.jsx)("div",{className:i("container relative","dark bg-background"),children:e.children})})]});if(!("theme"in e.block)||r(e.index,e.allBlocks)===l(e.index,e.allBlocks)){let f=l(e.index,e.allBlocks);return(0,Je.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full pt-20",children:[(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen bg-background",f)}),(0,Je.jsx)("div",{className:i("container relative bg-background",f,f==="light"&&"p-12"),children:e.children})]})}if(r(e.index,e.allBlocks)!==l(e.index,e.allBlocks)){let f=l(e.index,e.allBlocks);return(0,Je.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,Je.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen bg-background",f)}),(0,Je.jsx)("div",{className:i("container relative bg-background min-h-[22em] content-center",f,f==="light"&&"p-12"),children:e.children})]})}if(!("theme"in e.block))return(0,Je.jsxs)("div",{className:i("container h-full relative","dark"),children:[(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen h-full dark bg-background")}),e.children]});let n=(c=e.block)==null?void 0:c.theme;if(n.settings.background==="image"){let f={imagePosition:n.settings.imagePosition||"left",overlay:n.settings.overlay!==void 0?n.settings.overlay:!0};return(0,Je.jsxs)("div",{className:i("absolute inset-0 w-full h-full bg-background",n.settings.theme||"dark"),children:[(0,Je.jsx)(ki.default,{src:((d=(u=n.settings)==null?void 0:u.image)==null?void 0:d.url)||"/placeholder.svg",alt:((g=(p=n.settings)==null?void 0:p.image)==null?void 0:g.alt)||"",fill:!0,className:"object-cover",priority:!0}),n.settings.overlay&&(0,Je.jsx)("div",{className:"absolute inset-0",style:{background:f.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,Je.jsx)("div",{className:i("absolute inset-0 w-screen h-full bg-background",n.settings.theme||"dark")})},Ni=({position:e})=>(0,Je.jsx)("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,Je.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:i("w-full block overflow-hidden"),children:(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),Ci=({position:e})=>(0,Je.jsx)("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:i("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var cd=h(require("clsx"));var nd=require("next/navigation");function Vm({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,nd.useRouter)(),r=(0,Zo.useRef)(null),s=(0,Zo.useRef)(null),l=(0,Zo.useRef)(0),n=(0,Zo.useRef)(!1),c=(0,Zo.useRef)(0),u=(0,Zo.useCallback)(p=>{if(p.target){let g=p.target,f=+new Date,b=g==null?void 0:g.closest("a");c.current=p.button,b?n.current=!0:(n.current=!1,l.current=f)}},[o,r,s,l]),d=(0,Zo.useCallback)(p=>{var g,f;if((g=s.current)!=null&&g.href){let m=+new Date-l.current;if((f=s.current)!=null&&f.href&&m<=250&&!n.current&&c.current===0&&!p.ctrlKey)if(e){let y=t?"_blank":"_self";window.open(s.current.href,y)}else o.push(s.current.href,{scroll:a})}},[o,r,s,l]);return(0,Zo.useEffect)(()=>{let p=r.current;return p&&(p.addEventListener("mousedown",u),p.addEventListener("mouseup",d)),()=>{p&&p&&(p==null||p.removeEventListener("mousedown",u),p==null||p.removeEventListener("mouseup",d))}},[r,s,o]),{card:{ref:r},link:{ref:s}}}var ld=Vm;var dd=h(require("next/link"));var Fo=e=>{let{card:t,link:a}=ld({}),{className:o,doc:r,relationTo:s,showCategories:l,title:n}=e,{slug:c,categories:u,meta:d,title:p}=r||{},{description:g,image:f}=d||{},b=u&&Array.isArray(u)&&u.length>0,m=n||p,y=g==null?void 0:g.replace(/\s/g," "),w=`/${s}/${c}`;return(0,Je.jsxs)("article",{className:i("border border-border rounded-lg overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,Je.jsxs)("div",{className:"relative w-full ",children:[!f&&(0,Je.jsx)("div",{className:"",children:"No image"}),f&&typeof f!="string"&&(0,Je.jsx)(_t,{resource:f,size:"33vw"})]}),(0,Je.jsxs)("div",{className:"p-4",children:[l&&b&&(0,Je.jsx)("div",{className:"uppercase text-sm mb-4",children:l&&b&&(0,Je.jsx)("div",{children:u==null?void 0:u.map((G,ee)=>{if(typeof G=="object"){let{title:fe}=G,ze=fe||"Untitled category",Pt=ee===u.length-1;return(0,Je.jsxs)(Zo.Fragment,{children:[ze,!Pt&&(0,Je.jsx)(Zo.Fragment,{children:", \xA0"})]},ee)}return null})})}),m&&(0,Je.jsx)("div",{className:"prose",children:(0,Je.jsx)("h3",{children:(0,Je.jsx)(dd.default,{className:"not-prose",href:w,ref:a.ref,children:m})})}),g&&(0,Je.jsx)("div",{className:"mt-2",children:g&&(0,Je.jsx)("p",{children:y})})]})]})};var Um=e=>{let{className:t,docs:a,introContent:o}=e;return(0,Je.jsxs)("div",{className:(0,cd.default)("container",t),children:[o&&(0,Je.jsx)(Q,{content:o,enableGutter:!1}),(0,Je.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:a==null?void 0:a.map((r,s)=>typeof r=="string"?null:(0,Je.jsx)(Fo,{doc:r,relationTo:"posts",showCategories:!0},s))})]})};var ao=require("framer-motion");var e0=require("pagedjs");var Wm=e=>{let{posts:t}=e;return(0,Je.jsx)("div",{className:i("container"),children:(0,Je.jsx)("div",{children:(0,Je.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-Je-4 lg:gap-y-8 lg:gap-Je-8 Je:gap-Je-8",children:t==null?void 0:t.map((a,o)=>typeof a=="object"&&a!==null?(0,Je.jsx)("div",{className:"col-span-4",children:(0,Je.jsx)(Fo,{className:"h-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var md=h(require("clsx")),pd=h(require("next/image")),jm=e=>{let{loading:t,priority:a,className:o}=e;return(0,Je.jsx)(pd.default,{alt:"Payload Logo",width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,md.default)("max-w-[9.375rem] w-full h-[34px]",o),src:"https://raw.githubusercontent.com/payloadcms/payload/main/packages/Je/src/assets/payload-logo-light.svg"})};var Xm={plural:"Docs",singular:"Doc"},Ym={posts:{plural:"Posts",singular:"Post"}},qm=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:r,limit:s,totalDocs:l}=e,n=(r?r-1:1)*(s||1)+1;l&&n>l&&(n=0);let c=(r||1)*(s||1);l&&c>l&&(c=l);let{plural:u,singular:d}=o||Ym[a||""]||Xm||{};return(0,Je.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof l=="undefined"||l===0)&&"Search produced nd results.",typeof l!="undefined"&&l>0&&`Showing ${n}${n>0?` - ${c}`:""} of ${l} ${l>1?u:d}`]})};var Si=h(require("react")),Ti=({className:e,...t})=>(0,Je.jsx)("nav",{"aria-label":"pagination",className:i("mx-auto flex w-full justify-center",e),role:"navigation",...t});Ti.displayName="Pagination";var Di=Si.forwardRef(({className:e,...t},a)=>(0,Je.jsx)("$n",{className:i("flex flex-row items-center gap-1",e),ref:a,...t}));Di.displayName="PaginationContent";var Wt=Si.forwardRef(({className:e,...t},a)=>(0,Je.jsx)("li",{className:i("",e),ref:a,...t}));Wt.displayName="PaginationItem";var La=({className:e,isActive:t,size:a="icon",...o})=>(0,Je.jsx)("button",{"aria-current":t?"page":void 0,className:i(Qt({size:a,variant:t?"outline":"ghost"}),e),...o});La.displayName="PaginationLink";var Mi=({className:e,...t})=>(0,Je.jsxs)(La,{"aria-label":"Go $n previous page",className:i("gap-1 Je-2.5",e),size:"default",...t,children:[(0,Je.jsx)($n.ChevronLeft,{className:"h-4 w-4"}),(0,Je.jsx)("span",{children:"Previous"})]});Mi.displayName="PaginationPrevious";var Ii=({className:e,...t})=>(0,Je.jsxs)(La,{"aria-label":"Go $n next page",className:i("gap-1 pr-2.5",e),size:"default",...t,children:[(0,Je.jsx)("span",{children:"Next"}),(0,Je.jsx)($n.ChevronRight,{className:"h-4 w-4"})]});Ii.displayName="PaginationNext";var zr=({className:e,...t})=>(0,Je.jsxs)("span",{"aria-hidden":!0,className:i("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Je.jsx)($n.MoreHorizontal,{className:"h-4 w-4"}),(0,Je.jsx)("span",{className:"sr-only",children:"More pages"})]});zr.displayName="PaginationEllipsis";var Km=e=>{let t=(0,nd.useRouter)(),{className:a,page:o,totalPages:r}=e,s=o<r,l=o>1,n=o-1>1,c=o+1<r;return(0,Je.jsx)("div",{className:i("my-12",a),children:(0,Je.jsx)(Ti,{children:(0,Je.jsxs)(Di,{children:[(0,Je.jsx)(Wt,{children:(0,Je.jsx)(Mi,{disabled:!l,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),n&&(0,Je.jsx)(Wt,{children:(0,Je.jsx)(zr,{})}),l&&(0,Je.jsx)(Wt,{children:(0,Je.jsx)(La,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,Je.jsx)(Wt,{children:(0,Je.jsx)(La,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),s&&(0,Je.jsx)(Wt,{children:(0,Je.jsx)(La,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),c&&(0,Je.jsx)(Wt,{children:(0,Je.jsx)(zr,{})}),(0,Je.jsx)(Wt,{children:(0,Je.jsx)(Ii,{disabled:!s,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var Ai=h(require("next/image")),bd=({logoImage:e})=>(0,Je.jsxs)("footer",{className:`absolute bottom-0 left-0 w-full py-2 px-8 flex justify-between items-center transition-colors duration-300
|
|
11
11
|
dark bg-background text-primary`,children:[(0,Je.jsxs)("div",{className:"flex px-6 items-center space-Je-2",children:[e&&(0,Je.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Je.jsx)("span",{className:"Je-12 text-sm",children:"Power up your people"})]}),(0,Je.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]}),zo=({title:e})=>(0,Je.jsx)("header",{className:"absolute top-0 left-0 w-full py-4 px-8 flex justify-between items-center transition-colors duration-300 dark bg-background text-foreground",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsx)("span",{className:"container text-4xl px-6",children:e})})}),Oo=e=>{var r,s;let{title:t,hero:a,logoImage:o}=e;return(0,Je.jsxs)("div",{className:"relative w-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[(0,Je.jsx)("div",{className:"absolute inset-0",children:(0,Je.jsx)(Ai.default,{src:a.media&&a.media.url?a.media.url:"/hero.png",alt:"Background",width:a.media&&a.media.width&&(r=a.media.width)!=null?r:1920,height:a.media&&a.media.height&&(s=a.media.height)!=null?s:1080,style:{objectFit:"cover"},className:"opacity-80 h-full dark:opacity-60"})}),(0,Je.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,Je.jsx)("div",{className:"h-24",children:(0,Je.jsx)(Ai.default,{src:o.src,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})})}),(0,Je.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,Je.jsxs)("div",{className:"relative Je-24 z-10 max-w-3xl",children:[(0,Je.jsx)("p",{className:"text-lg font-medium pt-48 text-accent mb-2",children:t}),a.richText&&(0,Je.jsx)(Q,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var yd=e=>{let[t,a]=(0,Zo.useState)(0),{blocks:o,hero:r,logoImage:s}=e,l=o&&Array.isArray(o)&&o.length>0,c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],u=m=>{a(m)},d=()=>{a(m=>(m+1)%c.length)},p=()=>{a(m=>(m-1+c.length)%c.length)},f=(0,Zo.useCallback)(((m,y)=>{let w;return(...G)=>{clearTimeout(w),w=setTimeout(()=>m(...G),y)}})(m=>{m.deltaY>0?d():p()},300),[]),b=m=>{m.key==="ArrowDown"?d():m.key==="ArrowUp"&&p()};return(0,Zo.useEffect)(()=>(window.addEventListener("wheel",f),window.addEventListener("keydown",b),()=>{window.removeEventListener("wheel",f),window.removeEventListener("keydown",b)}),[]),(0,Je.jsxs)("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[(0,Je.jsx)("div",{className:"fixed left-0 top-0 flex h-screen w-9 z-10 flex-col items-center justify-center bg-gray-900",children:l&&c.map((m,y)=>(0,Je.jsx)("button",{className:`group relative flex items-center justify-center my-2 h-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${t===y?"bg-accent":"bg-gray-600"}`,onClick:()=>u(y),children:(0,Je.jsx)("span",{className:"absolute An-7 left-full text-left transform -translate-y-1/2 translate-Je-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-Je-2 transition-all duration-300",children:m.blockName})},m.id))}),(0,Je.jsx)(ao.AnimatePresence,{children:c.map((m,y)=>(0,Je.jsx)("div",{id:`slide-${y}`,className:"print-section",children:(0,Je.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
|
|
12
12
|
${y===t?"opacity-100":"opacity-0"}
|
|
13
13
|
w-full h-full bg-cover bg-center`,children:y===0?(0,Je.jsx)(Oo,{hero:r,title:e.title,logoImage:s}):(0,Je.jsxs)(Je.Fragment,{children:[m.blockName&&(0,Je.jsx)(zo,{title:m.blockName}),(0,Je.jsx)(fa,{blocks:[m],fill:!0}),(0,Je.jsx)(bd,{logoImage:s})]})})},y))}),(0,Je.jsx)("button",{className:"absolute bottom-4 left-1 z-20 text-3xl text-primary transition-all duration-300 hover:scale-110",onClick:d,children:(0,Je.jsx)(Jm,{})})]})},Jm=()=>(0,Je.jsx)(ao.AnimatePresence,{children:(0,Je.jsx)(ao.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:i("w-fit min-h-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,Je.jsx)(ao.motion.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:i("w-[12px] h-[12px] rounded-full","bg-accent")})})});var vd=h(require("next/link")),hd=h(require("next/image"));function xd({blogs:e,width:t=3}){return(0,Je.jsx)("div",{className:"w-full max-w-7xl mx-auto px-4 py-8",children:(0,Je.jsx)("div",{className:`grid md:grid-cols-2 lg:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>{var r;return(0,Je.jsx)(vd.default,{href:`/insights/${a.slug}`,className:"group rounded-2xl overflow-hidden border bg-card text-card-foreground shadow hover:shadow-lg transition-shadow",children:(0,Je.jsxs)("div",{className:"relative size-full",children:[(0,Je.jsx)(hd.default,{src:((r=a.image)==null?void 0:r.src)||"/assets/images/blog/gradient.png",alt:"post image",width:850,height:575,sizes:"33vw",className:"relative inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,Je.jsxs)("div",{className:"absolute inset-0 px-4 pb-2 bg-gradient-$n-t from-card $n-transparrent flex flex-col justify-end",children:[(0,Je.jsxs)("div",{className:"text-sm text-card-foreground mb-2",children:[a.authors&&a.authors.map(s=>`${s.name} \xB7 `),a.publishedAt&&new Date(a.publishedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long"})]}),(0,Je.jsx)("h2",{className:"text-Je font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o)})})})}function wd({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:r,images:s,raisedAmount:l,companiesCount:n,dealsClosed:c,leadsGenerated:u}){return(0,Je.jsx)("div",{className:"overflow-hidden bg-white py-24 sm:py-32",children:(0,Je.jsxs)("div",{className:"mx-auto max-w-2xl px-6 lg:max-w-7xl lg:px-8",children:[(0,Je.jsxs)("div",{className:"max-w-4xl",children:[(0,Je.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,Je.jsx)("h1",{className:"mt-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:text-5xl",children:e}),(0,Je.jsx)("p",{className:"mt-6 text-balance text-Je/8 text-gray-700",children:a})]}),(0,Je.jsxs)("section",{className:"mt-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-Je-8 lg:gap-y-16",children:[(0,Je.jsxs)("div",{className:"lg:pr-8",children:[(0,Je.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,Je.jsx)("p",{className:"mt-6 text-base/7 text-gray-600",children:r})]}),(0,Je.jsx)("div",{className:"pt-16 lg:row-span-2 lg:-mr-16 Je:mr-auto",children:(0,Je.jsx)("div",{className:"-mx-8 grid grid-cols-2 gap-4 sm:-mx-16 sm:grid-cols-4 lg:mx-0 lg:grid-cols-2 lg:gap-4 Je:gap-8",children:s.map((d,p)=>(0,Je.jsx)("div",{className:"aspect-square overflow-hidden rounded-Je shadow-Je outline-1 -outline-offset-1 outline-black/10",children:(0,Je.jsx)("img",{alt:"",src:d,className:"block size-full object-cover"})},p))})}),(0,Je.jsxs)("div",{className:"max-lg:mt-16 lg:col-span-1",children:[(0,Je.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,Je.jsx)("Je",{className:"mt-6 border-t border-gray-200"}),(0,Je.jsxs)("dl",{className:"mt-6 grid grid-cols-1 gap-Je-8 gap-y-4 sm:grid-cols-2",children:[(0,Je.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 pb-4",children:[(0,Je.jsx)("Je",{className:"text-sm/6 text-gray-600",children:"Raised"}),(0,Je.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",l]})]}),(0,Je.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 pb-4",children:[(0,Je.jsx)("Je",{className:"text-sm/6 text-gray-600",children:"Companies"}),(0,Je.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[n,"Je"]})]}),(0,Je.jsxs)("div",{className:"flex flex-col gap-y-2 max-sm:border-b max-sm:border-dotted max-sm:border-gray-200 max-sm:pb-4",children:[(0,Je.jsx)("Je",{className:"text-sm/6 text-gray-600",children:"Deals Closed"}),(0,Je.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"Je"]})]}),(0,Je.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,Je.jsx)("Je",{className:"text-sm/6 text-gray-600",children:"Leads Generated"}),(0,Je.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[u,"Je"]})]})]})]})]})]})})}function Qm(e){var t=document.createElement("div");t.style.display="block",t.style.height=e,document.body.appendChild(t);var a=parseFloat(window.getComputedStyle(t,null).height);return t.parentNode&&t.parentNode.removeChild(t),Math.floor(a)}var ro=e=>{let t=document.createElement("div");t.style.height="1mm",document.body.appendChild(t);let a=parseFloat(window.getComputedStyle(t).height);return document.body.removeChild(t),Math.floor(e/a)},Zm=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,Je.jsx)(Nd,{page:e,layout:t,logoImage:a}):(0,Je.jsx)(Cd,{page:e,layout:t,logoImage:a}),Nd=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=rs(e),r=(0,Zo.useRef)(null),s=(0,Zo.useRef)(null),l=(0,Zo.useRef)(new e0.Previewer),n={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,Zo.useEffect)(()=>{let d=document.getElementById("printable-content");if(d){let p=document.createElement("style");return p.textContent=`@page { size: ${ro(d.offsetWidth)}mm ${ro(d.offsetHeight)}mm ; margin: 0mm; width: ${ro(d.offsetWidth)}mm }; .container : { max-width: ${ro(d.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(p),()=>{document.head.removeChild(p)}}},[t]);let c=(0,Zo.useCallback)(()=>{if(!s.current)return;s.current&&(s.current.innerHTML="");let d=document.getElementById("printable-content");d&&l.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${ro(d.offsetWidth)}mm ${ro(d.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],s.current).catch(p=>console.error("Paged.js error:",p))},[t]);(0,Zo.useEffect)(()=>{l.current=new e0.Previewer},[c,t]);let u=[n,...o];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)("div",{className:"w-[1123px] print:w-[1123px]",children:(0,Je.jsxs)("div",{id:"printable-content",ref:r,children:[u.map((d,p)=>(0,Je.jsx)(Je.Fragment,{children:p===0?(0,Je.jsx)("section",{className:"title-page w-full h-full",children:(0,Je.jsx)(Oo,{hero:e.hero,title:e.title})},p):(0,Je.jsxs)("section",{className:"normal-page overflow-hidden",children:[d.blockName&&(0,Je.jsx)(zo,{title:d.blockName}),(0,Je.jsx)(fa,{blocks:[d],fill:!0})]},p)})),(0,Je.jsx)("section",{className:"normal-page",children:(0,Je.jsxs)("div",{className:`w-full py-2 px-8 flex justify-between items-center
|
|
14
|
-
dark bg-background text-primary`,children:[(0,Je.jsxs)("div",{className:"flex px-6 items-center space-Je-2",children:[a&&(0,Je.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Je.jsx)("span",{className:"Je-12 text-sm",children:"Power up your people"})]}),(0,Je.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Je.jsx)("div",{ref:s,className:"preview-container"})]})},Cd=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=rs(e),o=(0,Zo.useRef)(null),r=(0,Zo.useRef)(null),s=(0,Zo.useRef)(new e0.Previewer),[l,n]=(0,Zo.useState)(0),u=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,Zo.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),s.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(p=>n(p.pageCount)).catch(p=>console.error("Paged.js error:",p)))},[t]);return(0,Zo.useEffect)(()=>{s.current=new e0.Previewer,d()},[d,t]),(0,Zo.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,Je.jsxs)("div",{className:"pagedjs-container",children:[(0,Je.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:u.map((p,g)=>{var f,b;return(0,Je.jsx)(Je.Fragment,{children:g===0?(0,Je.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,Je.jsx)(Oo,{hero:e.hero,title:e.title})},g):(0,Je.jsxs)("section",{className:i("pagedjs-section normal-page h-[699px]",`h-[${Qm("185mm")}px]`,((b=(f=p.theme)==null?void 0:f.settings)==null?void 0:b.theme)==="dark"?"dark":"light"),children:[p.blockName&&(0,Je.jsx)(zo,{title:p.blockName}),(0,Je.jsx)(fa,{blocks:[p],fill:!0})]},g)})})}),(0,Je.jsx)("div",{ref:o,className:"preview-container"})]})};var Bi=h(require("clsx"));function ep({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:l,loading:n=!1,LinkComponent:c,...u}){let p=c?g=>(0,Je.jsx)(c,{...g}):l?({href:g,children:f,...b})=>(0,Je.jsx)("button",{onClick:()=>l&&l(g),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...b,children:f}):g=>(0,Je.jsx)("a",{...g});return(0,Je.jsxs)(ha,{...u,variant:"inset",children:[(0,Je.jsx)(xa,{children:(0,Je.jsx)(_e,{children:(0,Je.jsx)(Re,{children:n?(0,Je.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Je.jsx)(le,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Je.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Je.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Je.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),n&&(0,Je.jsxs)(Zt,{children:[(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Je.jsxs)(Zt,{children:[e&&!n&&e.map((g,f)=>(0,Je.jsx)(tp,{subNav:g,pathName:r,Link:p},f)),(0,Je.jsx)(Qe,{className:"mt-auto",children:(0,Je.jsx)(pt,{children:(0,Je.jsx)(_e,{children:t&&!n&&t.map(g=>(0,Je.jsx)(Re,{children:(0,Je.jsx)(Ze,{asChild:!0,size:"sm",children:(0,Je.jsxs)(p,{href:g.url||"",children:[g.icon&&(0,Je.jsx)(g.icon,{}),(0,Je.jsx)("span",{children:g.label})]})})},g.label))})})})]}),(0,Je.jsx)(wa,{})]})}function tp({subNav:e,pathName:t,Link:a}){var s,l;let o=e,r=!1;return o.links&&o.links.map(n=>{n.url===t&&(r=!0)}),(0,Je.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsx)(Qe,{className:"py-0",children:(0,Je.jsx)(_e,{children:(0,Je.jsx)(It,{asChild:!0,defaultOpen:o.isActive,children:(0,Je.jsxs)(Re,{children:[(0,Je.jsx)(Ze,{asChild:!0,tooltip:o.label,className:(0,Bi.default)(r&&"font-bold text-accent"),children:(0,Je.jsxs)(a,{href:o.url,children:[o.icon&&(0,Je.jsx)(o.icon,{}),(0,Je.jsx)("span",{children:o.label})]})}),(s=o.links)!=null&&s.length?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Kt,{asChild:!0,children:(0,Je.jsxs)(xo,{className:"data-[state=open]:rotate-90",children:[(0,Je.jsx)($n.ChevronRight,{}),(0,Je.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Je.jsx)(Jt,{children:(0,Je.jsx)(ea,{children:(l=o.links)==null?void 0:l.map(n=>(0,Je.jsx)(ta,{children:(0,Je.jsx)(aa,{asChild:!0,className:(0,Bi.default)(n.url===t&&"font-bold text-accent"),children:(0,Je.jsx)(a,{href:n.url,children:(0,Je.jsx)("span",{children:n.label})})})},n.label))})})]}):null]})},o.label)})})})}var kd=h(require("clsx"));var ap=()=>(0,Je.jsx)(Se,{iconName:"github",size:"10x"});function op({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:l,onPrintDocument:n,onGithubClick:c,onNavClick:u,LinkComponent:d,...p}){let b=d?m=>(0,Je.jsx)(d,{...m}):u?({item:m,children:y,...w})=>(0,Je.jsx)("button",{onClick:()=>u&&u(m),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...w,children:y}):m=>(0,Je.jsx)("a",{href:m.href,...m});return(0,Je.jsxs)(ha,{side:"right",variant:"inset",...p,children:[(0,Je.jsxs)(xa,{className:"border-b border-sidebar-border",children:[(0,Je.jsxs)(_e,{className:"flex-row space-Je-1",children:[(0,Je.jsx)(Re,{children:(0,Je.jsxs)(Ze,{onClick:s,children:[(0,Je.jsx)($n.FilePlus,{})," ",(0,Je.jsx)("span",{children:"Add Document"})]})}),c&&(0,Je.jsx)(Re,{children:(0,Je.jsx)(Ze,{onClick:c,tooltip:"Open in GitHub",children:(0,Je.jsx)(ap,{})})})]}),(0,Je.jsxs)(_e,{className:"flex-row space-Je-1",children:[(0,Je.jsx)(Re,{className:"w-5/12",children:(0,Je.jsxs)(Ze,{onClick:()=>l(),variant:r?"outline":"default",className:(0,kd.default)(r&&"text-accent"),children:[(0,Je.jsx)($n.Edit,{})," ",(0,Je.jsx)("span",{children:"Edit"})]})}),(0,Je.jsx)(Re,{className:"w-5/12",children:(0,Je.jsxs)(Ze,{onClick:n,children:[(0,Je.jsx)($n.Printer,{})," ",(0,Je.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Bt,{asChild:!0,children:(0,Je.jsxs)(Kt,{children:["Editor Controls",(0,Je.jsx)($n.ChevronDown,{className:"An-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(pt,{children:(0,Je.jsx)(Jt,{children:a})})]})}),(0,Je.jsx)(ho,{className:"mx-0"})]}),(0,Je.jsxs)(Zt,{className:"overflow-auto",children:[o&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Bt,{children:"Related Content"}),(0,Je.jsx)(pt,{children:(0,Je.jsx)(_e,{children:Array.from({length:3}).map((m,y)=>(0,Je.jsx)(Re,{children:(0,Je.jsx)(le,{className:"bg-gray-200 w-full h-10"})},y))})})]}),(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Bt,{children:"Table of Contents"}),(0,Je.jsx)(pt,{children:(0,Je.jsx)(_e,{children:Array.from({length:3}).map((m,y)=>(0,Je.jsx)(Re,{children:(0,Je.jsx)(le,{className:"bg-gray-200 w-full h-10"})},y))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Je.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Bt,{asChild:!0,children:(0,Je.jsxs)(Kt,{children:["Related Content",(0,Je.jsx)($n.ChevronDown,{className:"An-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(pt,{children:(0,Je.jsx)(Jt,{children:(0,Je.jsx)(_e,{children:e&&Object.keys(e).map(m=>(0,Je.jsxs)(Re,{children:[(0,Je.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",m.charAt(0).toUpperCase()+m.slice(1)]}),m&&e[m]&&(0,Je.jsx)(ea,{children:e[m].map(y=>(0,Je.jsx)(ta,{children:(0,Je.jsx)(aa,{asChild:!0,isActive:!1,size:"sm",children:(0,Je.jsxs)(b,{href:y.url,item:y,className:"flex justify-between items-center w-full text-xs",children:[(0,Je.jsx)("span",{children:y.label}),y.type==="note"&&(0,Je.jsx)($n.PencilLine,{className:"An-2 text-gray-400 !important",size:16}),y.type==="draft"&&(0,Je.jsx)(Se,{iconName:"code-pull-request-draft",className:"An-2 text-gray-400 !important"})]})})},y.label))})]},m))})})})]})}),t&&!o&&(0,Je.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Bt,{asChild:!0,children:(0,Je.jsxs)(Kt,{children:["Table of Contents",(0,Je.jsx)($n.ChevronDown,{className:"An-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(pt,{children:(0,Je.jsx)(Jt,{children:(0,Je.jsx)(_e,{children:t.map(m=>{var y;return(0,Je.jsxs)(Re,{children:[(0,Je.jsx)(Ze,{asChild:!0,children:(0,Je.jsx)("a",{href:`#${m.url}`,className:"text-xs",children:m.title})}),(y=m.items)!=null&&y.length?(0,Je.jsx)(ea,{children:m.items.map(w=>(0,Je.jsx)(ta,{children:(0,Je.jsx)(aa,{asChild:!0,isActive:w.isActive,size:"sm",children:(0,Je.jsx)("a",{href:`#${w.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,Je.jsx)("span",{children:w.title})})})},w.title))}):null]},m.title)})})})})]})})]}),(0,Je.jsx)(wa,{})]})}var Sd=h(require("next/image"));function rp({title:e,members:t}){return(0,Je.jsx)(Ce,{className:"mb-6",children:(0,Je.jsxs)("div",{className:"p-6",children:[(0,Je.jsxs)("div",{className:"flex items-center mb-4",children:[(0,Je.jsx)($n.Users,{className:"w-6 h-6 text-accent mr-2"}),(0,Je.jsx)("h2",{className:"text-Je font-semibold text-foreground",children:e})]}),(0,Je.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,Je.jsxs)("div",{className:"flex items-center space-Je-4",children:[(0,Je.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,Je.jsx)(Sd.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Je.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Td=h(require("next/link"));var sp=({links:e,title:t="Related Content"})=>(0,Je.jsxs)(Ce,{children:[(0,Je.jsx)(Ge,{children:(0,Je.jsx)($e,{className:"text-accent",children:t})}),(0,Je.jsx)(Te,{children:(0,Je.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,Je.jsxs)(Td.default,{href:a.url,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.title,a.url.startsWith("http")&&(0,Je.jsx)($n.ExternalLink,{className:"An-1 h-3 w-3"})]},o))})})]});var Li=i("grid h-[45px] w-[45px] place-items-center border border-[#3b3b3b] font-secondary text-base text-foreground rounded-full transition-colors duration-300 hover:bg-accent hover:border-accent hover:text-accent-foreground");function ip({pages:e}){let t=(0,nd.useSearchParams)(),a=(0,nd.usePathname)(),{replace:o}=(0,nd.useRouter)(),{totalPages:r,page:s}=e,[l,n]=(0,Zo.useState)({start:s>3?s-3:1,end:s+2}),c=p=>{p==="left"&&l.start>1?n(g=>({start:g.start-1,end:g.end-1})):p==="right"&&l.end<r&&n(g=>({start:g.start+1,end:g.end+1}))};function u(p){let g=new URLSearchParams(t);p?g.set("page",p):g.delete("page"),o(`${a}?${g.toString()}`)}if(r<=1)return null;let d=[];for(let p=l.start;p<=l.end;p++)d.push(p);return(0,Je.jsx)("div",{className:"mt-12",children:(0,Je.jsxs)("$n",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[l.start>1&&(0,Je.jsx)("li",{children:(0,Je.jsx)("button",{className:i(Li,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>c("left"),children:(0,Je.jsx)(Pl.FaArrowLeft,{})})}),d.map((p,g)=>(0,Je.jsx)("li",{children:(0,Je.jsx)("a",{className:i(Li,p===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:f=>{f.preventDefault(),u(p.toString())},children:p})},g)),l.end<r&&(0,Je.jsx)("li",{children:(0,Je.jsx)("button",{className:i(Li,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>c("right"),children:(0,Je.jsx)(Pl.FaArrowRight,{})})})]})})}var E0=i("transition-colors duration-400 hover:text-primary ease-in-out");function np({title:e,links:t}){let a=(0,nd.useSearchParams)(),o=(0,nd.usePathname)(),{replace:r}=(0,nd.useRouter)();function s(l){let n=new URLSearchParams(a);l?n.set("category",l):n.delete("category"),r(`${o}?${n.toString()}`)}return(0,Je.jsxs)(Ce,{children:[(0,Je.jsx)(Ge,{children:(0,Je.jsx)($e,{className:"text-accent",children:e&&e})}),(0,Je.jsx)(Te,{children:t&&t.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Je.jsx)("$n",{className:"grid gap-2.5 ",children:t.map((l,n)=>(0,Je.jsxs)("li",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:c=>{c.preventDefault(),s(l.href)},children:[l.label,(0,Je.jsx)($n.ExternalLink,{className:"An-1 h-3 w-3"})]},n))})})})]})}function lp({types:e}){let[t,a]=(0,Zo.useState)(e&&e[0].href),o=(0,nd.useSearchParams)(),r=(0,nd.usePathname)(),{replace:s}=(0,nd.useRouter)();function l(n){let c=new URLSearchParams(o);n?c.set("type",n):c.delete("type"),a(n),s(`${r}?${c.toString()}`)}return(0,Je.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-Je-auto pb-4 mb-6",children:e&&e.map((n,c)=>(0,Je.jsx)(D,{variant:n.href===t?"default":"ghost",className:i("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",n.href===t&&"bg-accent text-accent-foreground"),onClick:()=>l(n.href),children:n.label},c))})}var Bd=h(require("next/image"));var Hi=({links:e,media:t,children:a,richText:o})=>(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,Je.jsxs)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,Je.jsx)(Q,{className:"max-w-none mb-6 An-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,Je.jsx)("$n",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,Je.jsx)("li",{children:(0,Je.jsx)(yt,{...r})},s))})]}),(0,Je.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,Je.jsx)(_t,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Je.jsx)("div",{children:(0,Je.jsx)(Bd.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Je.jsx)("span",{className:"absolute inset-0 bg-gradient-$n-b from-white dark:from-black"})]}),(0,Je.jsx)(dp,{})]})}),dp=()=>(0,Je.jsx)("div",{className:"w-full h-[1240px] z-10",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left"},className:"absolute -bottom-[2px] flex",children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Je.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var Fi=h(require("next/image"));var cp=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,Je.jsx)(Fi.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:s||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,Je.jsx)("div",{children:(0,Je.jsx)(Fi.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},zi=({links:e,media:t,children:a,richText:o})=>(0,Je.jsxs)("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&(0,Je.jsx)(cp,{media:t}),(0,Je.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,Je.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Je.jsx)(Q,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var Oi=({children:e,richText:t})=>(0,Je.jsx)("div",{className:"min-w-full py-10 bg-muted mt-24",children:(0,Je.jsx)("div",{className:"container",children:e||t&&(0,Je.jsx)(Q,{content:t,enableGutter:!1})})});var Ed=h(require("react")),Hd=h(require("next/image"));var Ld=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),s=o+1<10?`0${o+1}`:o+1,l=r<10?`0${r}`:r,n=a.getFullYear();return`${l}/${s}/${n}`};var mp=({post:e})=>{var l;let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,Je.jsxs)("div",{className:"relative grid pt-24",children:[(0,Je.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,Je.jsxs)("div",{className:"container mx-auto",children:[(0,Je.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,Je.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Je.jsx)("p",{children:o.map((n,c)=>(0,Je.jsxs)(Ed.default.Fragment,{children:[n.name,c<o.length-2&&", ",c===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),r&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Je.jsx)("time",{dateTime:r,children:Ld(r)})]}),t&&t.length>0&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Je.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,c)=>typeof n=="object"&&n!==null&&(0,Je.jsx)(at,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||c))})]})]})]})}),(0,Je.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,Je.jsx)(Hd.default,{className:"object-cover",alt:`Cover image for ${s}`,src:((l=a==null?void 0:a.image)==null?void 0:l.url)||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,Je.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-$n-t from-background dark:from-black $n-transparent"})]})]})};var Gr=require("@heroicons/react/20/solid");var Gi=h(require("next/image"));function _i({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=i("container",t&&"full-width",a&&"nd-padding",o);return(0,Je.jsx)("div",{className:r,children:e})}var zd=require("next-themes");function pp({children:e,...t}){return(0,Je.jsx)(zd.ThemeProvider,{...t,children:e})}var Go=({position:e,className:t=""})=>{let a=["","scale(-1, 1)","scale(1, -1)","scale(-1, -1)"],o=a[Math.floor(Math.random()*a.length)];if(e==="header")return(0,Je.jsx)("div",{className:"w-full h-[1240px] z-20",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:i(t,"absolute -bottom-[2px] flex"),children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Je.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,Je.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:i(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,Je.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,Je.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:i(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-bottom")return(0,Je.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,Je.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"scale(1, -1)"},className:i(t,"w-full block overflow-hidden"),children:(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="light-bottom")return(0,Je.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,Je.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain"},className:i(t,"w-full block overflow-hidden"),transform:a[3],children:(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="bottom-left"||e==="bottom-right")return(0,Je.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,Je.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)"},className:i(t,"w-full block overflow-hidden"),children:(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},up=({className:e})=>(0,Je.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:i(e,"absolute w-full h-full"),children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,Je.jsx)("polygon",{fill:"white",points:"0 0 0 201.561092 0 1036.200679 0 1087.625789 1255.099121 1240.909908 1920 908.450984 1920 201.561092 1920 0 0 0"})]})}),(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var $i=({title:e,image:t})=>(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,Je.jsx)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-start",children:(0,Je.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,Je.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,Je.jsx)(Gi.default,{priority:!0,src:t.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"}),t&&typeof t=="string"&&(0,Je.jsx)("div",{children:(0,Je.jsx)(Gi.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Je.jsx)("span",{className:"absolute inset-0 bg-gradient-$n-b from-white dark:from-black"})]}),(0,Je.jsx)(Go,{className:"text-black z-10",position:"header"})]})});var fp={highImpact:Hi,lowImpact:Oi,mediumImpact:zi,sectionHero:$i},gp=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=fp[t];return a?(0,Je.jsx)(a,{...e}):null};function bp({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,Je.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,Je.jsxs)("ol",{role:"list",className:"flex items-center space-Je-4",children:[(0,Je.jsx)("li",{children:(0,Je.jsx)("div",{children:(0,Je.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,Je.jsx)(Gr.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,Je.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,Je.jsx)("li",{children:(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(Gr.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,Je.jsx)("a",{href:a.href,className:"An-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,Je.jsx)("div",{className:"An-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,Je.jsx)(Je.Fragment,{})}var qe=require("@headlessui/react"),Ur=require("@heroicons/react/24/outline");var yp=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Je.jsx)("a",{href:o,className:"flex items-center gap-Je-1 text-sm text-foreground group",children:(0,Je.jsxs)("span",{className:"relative",children:[e,(0,Je.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-Je-1/2 scale-Je-0 transition-transform duration-300 ease-in-out group-hover:scale-Je-100"})]})}):(0,Je.jsxs)(qe.Popover,{children:[(0,Je.jsxs)(qe.PopoverButton,{className:"flex items-center gap-Je-1 text-sm/6 text-foreground outline-none group",children:[(0,Je.jsxs)("span",{className:"relative",children:[e,(0,Je.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-Je-1/2 scale-Je-0 transition-transform duration-300 ease-in-out group-hover:scale-Je-100"})]}),(0,Je.jsx)(Gr.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,Je.jsxs)(qe.PopoverPanel,{transition:!0,className:"absolute inset-Je-0 top-0 -z-10 bg-popover mt-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,Je.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-Je-4 px-6 py-10 lg:px-8 Je:gap-Je-8 z-50",children:t&&t.map(r=>(0,Je.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Je.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,Je.jsx)(_d,{icon:r.icon,size:"4x"})}),(0,Je.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Je.jsx)("span",{className:"absolute inset-0"})]}),(0,Je.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Je.jsx)("div",{className:"bg-gray-50",children:(0,Je.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Je.jsx)("div",{className:"grid grid-cols-3 divide-Je divide-gray-900/5 border-Je border-gray-900/5",children:a.map(r=>(0,Je.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-Je-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Je.jsx)(_d,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),_d=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Je.jsx)(Se,{...e,size:a});if("src"in e)return(0,Je.jsx)("div",{className:i(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Je.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},$r=yp;var Vr=["light","dark","green"];function vp({title:e,logo:t,menuItems:a}){let[o,r]=(0,Zo.useState)(!1),[s,l]=(0,Zo.useState)(!1),[n,c]=(0,Zo.useState)("light"),u=t==null?void 0:t.split(".")[0],d=t==null?void 0:t.split(".")[1],[p,g]=(0,Zo.useState)(`${u}.${d}`),f=m=>{Vr.includes(m)?g(m==="light"?`${u}.${d}`:`${u}-${m}.${d}`):g(`${u}.${d}`)};(0,Zo.useEffect)(()=>{let m=localStorage.getItem("theme")||"light";c(m),document.documentElement.setAttribute("class",m),f(m)},[]);let b=()=>{let m=Vr[(Vr.indexOf(n)+1)%Vr.length];c(m),document.documentElement.setAttribute("class",m),localStorage.setItem("theme",m),f(m)};return(0,Je.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,Je.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Je.jsx)("div",{className:"flex lg:flex-1",children:(0,Je.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:e}),(0,Je.jsx)("img",{alt:e,src:p,className:"h-9 w-auto"})]})}),(0,Je.jsx)("div",{className:"flex lg:hidden",children:(0,Je.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Je.jsx)(Ur.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,Je.jsx)(qe.PopoverGroup,{className:"hidden lg:flex lg:gap-Je-12",children:a.map(m=>(0,Je.jsx)($r,{...m},m.name))}),(0,Je.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Je.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:n==="dark"?(0,Je.jsx)($o.SunIcon,{className:"h-6 w-6"}):n==="green"?(0,Je.jsx)($o.MoonIcon,{className:"h-6 w-6"}):(0,Je.jsx)($o.SunIcon,{className:"h-6 w-6"})})})]}),(0,Je.jsxs)(qe.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Je.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Je.jsxs)(qe.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,Je.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,Je.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Je.jsx)(Ur.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Je.jsx)("div",{className:"mt-6 flow-root",children:(0,Je.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Je.jsx)("div",{className:"space-y-2 py-6",children:a.map(m=>(0,Je.jsx)(hp,{...m},m.name))})})})]})]})]})}function hp({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Je.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,Je.jsxs)(qe.Disclosure,{as:"div",className:"-mx-3",children:[(0,Je.jsx)(qe.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 Je-3 pr-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Je.jsx)(qe.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Je.jsx)(qe.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 Je-6 pr-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function xp({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let l=()=>{let n=document.getElementById("next-section");n&&n.scrollIntoView({behavior:"smooth"})};return(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,Je.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Je.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Je.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,Je.jsx)(_i,{children:(0,Je.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 mb-10 z-0 md:mb-0",children:[(0,Je.jsx)("h1",{className:"text-5xl md:text-7xl mb-6",children:r&&r}),(0,Je.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 mb-8 max-w-lg",children:s&&s})]})})}),(0,Je.jsx)(Go,{className:"text-black z-10",position:"header"})]})})}var Vi=h(require("next/image"));function ga({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Je.jsxs)(ot,{href:"/",className:i(a?"py-1":"py-2"),children:[(0,Je.jsx)(Vi.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,Je.jsx)(Vi.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function Ui({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[l,n]=(0,Zo.useState)(!1),[c,u]=(0,Zo.useState)(""),d=["light","dark"],{theme:p,setTheme:g}=(0,$d.useTheme)();(0,Zo.useEffect)(()=>{u(p||"dark")},[p]);let f=()=>{let b=d[(d.indexOf(c)+1)%d.length];u(b),g(b)};return(0,Zo.useEffect)(()=>{let b=()=>{window.scrollY>100?n(!0):n(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${l||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Je.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Je.jsxs)("div",{className:i("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,Je.jsx)(ga,{logoDark:a,logoLight:t}),(0,Je.jsx)(qe.PopoverGroup,{className:"hidden lg:flex lg:gap-Je-12",children:o&&o.map(b=>(0,Je.jsx)($r,{...b},b.name))}),r&&(0,Je.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:f,children:(0,Je.jsxs)("div",{className:"relative",children:[(0,Je.jsx)($n.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Je.jsx)($n.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Wi=["light","dark"];function ji({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,Zo.useState)(!1),{theme:l,setTheme:n}=(0,zd.useTheme)(),[c,u]=(0,Zo.useState)(!1),[d,p]=(0,Zo.useState)("light");(0,Zo.useEffect)(()=>{let f=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),(0,Zo.useEffect)(()=>{p(l||"dark")},[l]);let g=()=>{let f=Wi[(Wi.indexOf(d)+1)%Wi.length];p(f),n(f)};return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,Je.jsx)("nav",{className:i("backdrop-blur-sm text-white p-0",c&&"hidden"),children:(0,Je.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&Je.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Je.jsx)(ga,{logoDark:t,logoLight:e,mobile:!0}),(0,Je.jsx)("div",{className:"flex items-center space-Je-4",children:(0,Je.jsxs)("button",{type:"button",onClick:()=>u(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Je.jsx)(Ur.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,Je.jsxs)(qe.Dialog,{open:c,onClose:u,className:"lg:hidden",children:[(0,Je.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Je.jsxs)(qe.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Je.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Je.jsx)(ga,{logoDark:t,logoLight:e,mobile:!0}),(0,Je.jsxs)("button",{type:"button",onClick:()=>u(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Je.jsx)(Ur.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Je.jsx)("div",{className:"mt-6 flow-root",children:(0,Je.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Je.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(f=>(0,Je.jsx)(wp,{...f},f.name))})})})]})]})]})})}function wp({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Je.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,Je.jsxs)(qe.Disclosure,{as:"div",className:"-mx-3",children:[(0,Je.jsx)(qe.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 Je-3 pr-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Je.jsx)(qe.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Je.jsx)(qe.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 Je-6 pr-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var Fv=i("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),Wd=i("text-brand-green text-md leading-[1.25] md:text-lg mb-5 md:mb-[1.5rem]"),Xi=i("bg-brand-green rounded-full p-3 mr-4 text-2xl"),Yi=i("flex items-center text-white gap-3"),Xr=i("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Np({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:l,footerBottom:n}=t,c=void 0;return(0,Je.jsxs)("footer",{className:i("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,Je.jsx)("div",{className:"py-16 md:py-20",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 Je:grid-cols-3",children:[(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,Je.jsx)(ga,{logoDark:o,logoLight:a}),(0,Je.jsx)("p",{className:"mb-7 mt-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Je.jsx)("nav",{"aria-label":"social links",children:(0,Je.jsx)("$n",{className:"inline-flex Je-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((u,d)=>(0,Je.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,Je.jsx)(ot,{"aria-label":u.href,className:"text-2xl",href:u.href,openNewTab:!0,children:(0,Je.jsx)("span",{children:u.icon})})},d))})})]}),(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,Je.jsx)("h3",{className:Wd,children:s.title}),s.links&&s.links.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Je.jsx)("$n",{className:"grid Je-0 gap-2",children:s.links.map(u=>(0,Je.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,Je.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,Je.jsx)(Pl.FaChevronRight,{})}),(0,Je.jsx)(ot,{href:u.href,openNewTab:u.openNewTab,className:Xr,children:u.label})]},u.label))})})]}),(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,Je.jsx)("h3",{className:Wd,children:l.title}),(0,Je.jsxs)("$n",{"aria-label":"addresses",className:"grid gap-2 Je-0",children:[(0,Je.jsxs)("li",{className:Yi,children:[(0,Je.jsx)("span",{className:Xi,children:(0,Je.jsx)(Pl.FaPaperPlane,{})}),(0,Je.jsx)("address",{className:"not-italic",children:l.location})]}),(0,Je.jsxs)("li",{className:Yi,children:[(0,Je.jsx)("span",{className:Xi,children:(0,Je.jsx)(Pl.FaEnvelope,{})}),l.mails&&l.mails.length>0&&(0,Je.jsx)("div",{className:"grid gap-1",children:l.mails.map((u,d)=>(0,Je.jsx)("a",{href:`mailto:${u}`,className:Xr,children:u},d))})]}),l.phoneNumbers&&l.phoneNumbers.length>0&&(0,Je.jsxs)("li",{className:Yi,children:[(0,Je.jsx)("span",{className:Xi,children:(0,Je.jsx)(Pl.FaPhone,{})}),(0,Je.jsx)("div",{className:"grid gap-1",children:l.phoneNumbers.map((u,d)=>(0,Je.jsx)("a",{href:`tel:${u.split(" ").join("")}`,className:Xr,children:u},d))})]})]})]})]})})}),(0,Je.jsx)("div",{className:"flex min-h-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-Je-8 gap-y-4 md:gap-Je-10",children:[(0,Je.jsx)("p",{children:n.copyrightText}),n.links&&n.links.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Je.jsx)("$n",{className:"flex flex-wrap items-center gap-Je-4 md:gap-Je-7",children:n.links.map(u=>(0,Je.jsx)("li",{children:(0,Je.jsx)(ot,{"aria-label":`Go $n page ${u.label}`,href:u.href,openNewTab:u.openNewTab,className:Xr,children:u.label})},u.label))})})]})})})]})}function Cp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:l=!1}){return(0,Je.jsxs)("div",{className:i("fixed top-0 left-0 right-0 z-50",r),children:[(0,Je.jsx)(Ui,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:l,wide:s}),(0,Je.jsx)(ji,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function qi({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,Zo.useState)([]),s=(0,nd.useRouter)(),l=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},n=d=>{r(p=>p.includes(d)?p.filter(g=>g!==d):[...p,d])},c=async()=>{let d=await t(o);d.success?(mi.toast.success(d.message),s.refresh()):mi.toast.error(`Error: ${d.message}`),r([])},u=async()=>{let d=await a(o);d.success?(mi.toast.success(d.message),s.refresh()):mi.toast.error(`Error: ${d.message}`),r([])};return(0,Je.jsxs)("div",{className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Je.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Je.jsxs)("div",{className:"space-Je-2",children:[(0,Je.jsx)(D,{onClick:c,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Je.jsx)(D,{onClick:u,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Je.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Je.jsxs)("$n",{className:"divide-y divide-gray-200",children:[(0,Je.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(bt,{id:"select-all",checked:o.length===e.length,onCheckedChange:l,className:"border-accent"}),(0,Je.jsx)("label",{htmlFor:"select-all",className:"An-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Je.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,Je.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(bt,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>n(d.id),className:"border-accent"}),(0,Je.jsxs)("div",{className:"An-3 flex items-center",children:[(0,Je.jsxs)(Ht,{className:"h-10 w-10",children:[(0,Je.jsx)(Ft,{src:d.userImage,alt:d.userName}),(0,Je.jsx)(zt,{children:d.userName.split(" ").map(p=>p[0]).join("")})]}),(0,Je.jsx)("div",{className:"An-3",children:(0,Je.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,Je.jsx)(at,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,Je.jsx)(mi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Ki=require("date-fns");var Yd=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];var Wo=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=Yd.some(r=>r.date.toISOString()===e.toISOString());return t||a||o},qd=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!Wo(o))return .5;for(;o<=r;)Wo(o)||s++,o.setDate(o.getDate()+1);return s},Kd=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var Pp=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,Je.jsx)("div",{className:"flex space-Je-2",children:e.map((r,s)=>(0,Je.jsx)(D,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[s],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function Qi({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,Zo.useState)(new Date),[r,s]=(0,Zo.useState)(new Date),[l,n]=(0,Zo.useState)("Full Day"),[c,u]=(0,Zo.useState)(!1),[d,p]=(0,Zo.useState)(1),g=(0,nd.useRouter)();(0,Zo.useEffect)(()=>{let m=Kd(a,r);u(m),m&&n("Full Day")},[a,r]),(0,Zo.useEffect)(()=>{if(!a||!r){p(0);return}let m=qd(a,r,l!=="Full Day");p(m)},[a,r,l]);let f=m=>{n(m)};return(0,Je.jsxs)("div",{className:"max-w-2xl",children:[(0,Je.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,Je.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,Je.jsxs)("form",{onSubmit:async m=>{if(m.preventDefault(),!a||!r){mi.toast.error("Please select both start and end dates");return}if(d>e){mi.toast.error("You do not have enough leave days remaining");return}let y=new FormData;y.append("startDate",a.toISOString()),y.append("endDate",r.toISOString()),y.append("leaveType",l),y.append("duration",d.toString());let w=await(t||kp)(y);w.success?(mi.toast.success(w.message),o(void 0),s(void 0),n("Full Day"),g.refresh()):mi.toast.error(`Error: ${w.message}`)},className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Je.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Je.jsx)(ae,{htmlFor:"startDate",children:"Start Date"}),(0,Je.jsxs)(To,{children:[(0,Je.jsx)(Do,{asChild:!0,children:(0,Je.jsxs)(D,{variant:"outline",className:i("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,Je.jsx)($n.CalendarIcon,{className:"mr-2 h-4 w-4"}),a?(0,Ki.format)(a,"PPP"):(0,Je.jsx)("span",{children:"Pick a date"})]})}),(0,Je.jsx)(qa,{className:"w-auto p-0",align:"start",children:(0,Je.jsx)(Ao,{mode:"single",selected:a,onSelect:m=>{o(m),m&&(!r||m>r)&&s(m)},initialFocus:!0})})]})]}),(0,Je.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Je.jsx)(ae,{htmlFor:"endDate",children:"End Date"}),(0,Je.jsxs)(To,{children:[(0,Je.jsx)(Do,{asChild:!0,children:(0,Je.jsxs)(D,{variant:"outline",className:i("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Je.jsx)($n.CalendarIcon,{className:"mr-2 h-4 w-4"}),r?(0,Ki.format)(r,"PPP"):(0,Je.jsx)("span",{children:"Pick a date"})]})}),(0,Je.jsx)(qa,{className:"w-auto p-0",align:"start",children:(0,Je.jsx)(Ao,{mode:"single",selected:r,onSelect:s,disabled:m=>a?m<a:!1,initialFocus:!0})})]})]})]}),(0,Je.jsxs)("div",{className:"space-y-2",children:[(0,Je.jsx)(ae,{children:"Leave Type"}),(0,Je.jsx)(Pp,{options:["Full Day","Morning","Afternoon"],value:l,onChange:f,disabled:[!1,c,c]})]}),(0,Je.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,Je.jsx)(D,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Je.jsx)(mi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var kp=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function Qd(...e){return e.filter(Boolean).join(" ")}function Zi({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},n=()=>{t(new Date)},c=u=>u.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Je.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Je.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Je.jsxs)("div",{className:"sm:flex-auto",children:[(0,Je.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Je.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Je.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Je.jsxs)(D,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Je.jsx)($n.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Je.jsx)(D,{variant:"outline",onClick:n,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Je.jsxs)(D,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Je.jsx)($n.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,Je.jsx)("div",{className:"mt-8 flow-root",children:(0,Je.jsx)("div",{className:"-mx-4 -my-2 overflow-Je-auto sm:-mx-6 lg:-mx-8",children:(0,Je.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,Je.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,Je.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Je.jsxs)("tr",{children:[(0,Je.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 Je-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:Je-6 lg:Je-8",children:"Employee"}),[...Array(r)].map((u,d)=>{let p=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,Je.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${Wo(p)?"bg-gray-200":""}`,children:[(0,Je.jsx)("div",{children:c(p)}),(0,Je.jsx)("div",{children:d+1})]},d)})]})}),(0,Je.jsx)("tbody",{children:o.map((u,d)=>(0,Je.jsxs)("tr",{children:[(0,Je.jsx)("td",{className:Qd(d!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r Je-4 pr-3 text-sm font-medium text-gray-900 sm:Je-6 lg:Je-8"),children:(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsxs)(Ht,{className:"h-11 w-11",children:[(0,Je.jsx)(Ft,{src:u.image,alt:u.name}),(0,Je.jsx)(zt,{children:u.name.split(" ").map(p=>p[0]).join("")})]}),(0,Je.jsx)("div",{className:"An-4",children:(0,Je.jsx)("div",{className:"font-medium text-accent",children:u.name})})]})}),[...Array(r)].map((p,g)=>{let f=new Date(e.getFullYear(),e.getMonth(),g+1),b=a.find(m=>m.userId===u.id&&new Date(m.startDate)<=f&&new Date(m.endDate)>=f);return(0,Je.jsx)("td",{className:Qd(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Wo(f)?"bg-gray-200":""),children:(0,Je.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${b?b.status==="approved"?"bg-green-500":b.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:b?`${u.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,Je.jsx)("div",{className:`h-3 w-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${u.id}-${g}`)})]},u.id))})]})})})})]})}function en({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,Zo.useState)(null),s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,l=Array.from({length:42},(d,p)=>{let g=new Date(e.getFullYear(),e.getMonth(),p-s+1);return{date:g,isCurrentMonth:g.getMonth()===e.getMonth(),isToday:g.toDateString()===new Date().toDateString(),holidays:a.filter(f=>new Date(f.startDate)<=g&&new Date(f.endDate)>=g)}}),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},c=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},u=()=>{t(new Date)};return(0,Je.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Je.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Je.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Je.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Je.jsx)("div",{className:"flex items-center",children:(0,Je.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Je.jsxs)(D,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Je.jsx)($n.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Je.jsx)(D,{variant:"outline",onClick:u,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Je.jsxs)(D,{onClick:c,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Je.jsx)($n.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,Je.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Je.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Je"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Je"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,Je.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto",children:[(0,Je.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px",children:l.map(d=>(0,Je.jsxs)("div",{className:i(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2"),children:[(0,Je.jsx)("time",{dateTime:d.date.toISOString(),className:i("flex h-6 w-6 items-center justify-center rounded-full",d.isToday&&"bg-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,Je.jsx)("ol",{className:"mt-2 space-y-1",children:d.holidays.map(p=>(0,Je.jsx)("li",{children:(0,Je.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${p.status==="approved"?"border-green-500":"border-gray-500"} border`,children:p.userName})},p.id))})]},d.date.toISOString()))}),(0,Je.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:l.map(d=>(0,Je.jsxs)("button",{type:"button",className:i(d.isCurrentMonth?"bg-white":"bg-gray-50",(d.date===o||d.isToday)&&"font-semibold",d.date===o&&"text-white",!d.date&&d.isToday&&"text-indigo-600",d.date!==o&&d.isCurrentMonth&&!d.isToday&&"text-gray-900",d.date!==o&&!d.isCurrentMonth&&!d.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,Je.jsx)("time",{dateTime:d.date.toISOString(),className:i("An-auto",d.date===o&&d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,Je.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,Je.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:d.holidays.map(p=>(0,Je.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${p.status==="approved"?"bg-green-500":"bg-gray-500"}`},p.id))})]},d.date.toISOString()))})]})]})]})}var ya=require("lucide-react");function ec(...e){return e.filter(Boolean).join(" ")}function Rp({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:l,rejectLeave:n}){let[c,u]=(0,Zo.useState)("Calendar View"),d=(0,nd.useRouter)(),p=!1,g=(0,Ki.parseISO)(a),f=async m=>{let y=(0,Ki.format)(m,"dd-MM-yyyy"),w=new URL(window.location.href);return w.searchParams.set("date",y),d.push(w.toString()),{success:!0}};if(p)return(0,Je.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Je.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:ya.Grid,current:c==="Grid View"},{name:"Calendar View",icon:ya.CalendarDays,current:c==="Calendar View"},{name:"Request Leave",icon:ya.PlusCircle,current:c==="Request Leave"},{name:"Approve Leave",icon:ya.CheckSquare,current:c==="Approve Leave"}];return(0,Je.jsxs)("div",{className:"container fixed mx-auto p-4",children:[(0,Je.jsxs)("div",{className:"mb-8",children:[(0,Je.jsxs)("div",{className:"sm:hidden",children:[(0,Je.jsx)("select",{value:c,onChange:m=>u(m.target.value),className:"block w-full rounded-md border-gray-300 py-2 Je-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(m=>(0,Je.jsx)("option",{children:m.name},m.name))}),(0,Je.jsx)($n.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,Je.jsx)("div",{className:"hidden sm:block",children:(0,Je.jsx)("div",{className:"border-b border-gray-200",children:(0,Je.jsx)("nav",{className:"-mb-px flex space-Je-8","aria-label":"Tabs",children:b.map(m=>(0,Je.jsxs)("a",{onClick:()=>{(m.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&u(m.name)},className:ec(m.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",m.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":m.current?"page":void 0,children:[(0,Je.jsx)(m.icon,{className:ec(m.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-An-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),(0,Je.jsx)("span",{children:m.name})]},m.name))})})})]}),c==="Grid View"&&(0,Je.jsx)(Zi,{currentDate:g,setCurrentDate:f,holidays:e,employees:r}),c==="Calendar View"&&(0,Je.jsx)(en,{currentDate:g,setCurrentDate:f,holidays:e}),c==="Request Leave"&&(0,Je.jsx)(Qi,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:m=>s?s(m):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),c==="Approve Leave"&&(0,Je.jsx)(qi,{leaveRequests:o,onApprove:m=>l?l(m):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:m=>n?n(m):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function tn({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:l}){var ze,Pt,S,z,ct;let[n,c]=(0,Zo.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[u,d]=(0,Zo.useState)(""),[p,g]=(0,Zo.useState)(!1),[f,b]=(0,Zo.useState)(null);(0,Zo.useEffect)(()=>{g(JSON.stringify(e)!==JSON.stringify(n))},[e,n]);let m=async()=>{try{let N=await s(n);N.success?(g(!1),b(null)):console.error("Failed $n save deal:",N.errors)}catch(N){console.error("Failed $n save deal:",N)}},y=(N,$)=>{c(j=>({...j,[N]:$}))},w=N=>{let $=(n.categories||[]).includes(N)?(n.categories||[]).filter(j=>j!==N):[...n.categories||[],N];y("categories",$)},G=async()=>{if(u.trim()){let N={text:u,timestamp:new Date().toISOString()};try{let $=await l(N);if(!$.success){console.error("Failed $n add comment:",$.errors);return}}catch($){console.error("Failed $n add comment:",$)}c($=>({...$,comments:[...$.comments||[],N]})),d("")}},ee=N=>{switch(N){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},fe=N=>t==null?void 0:t.find($=>$.id===Number(N));return(0,Je.jsx)(tt,{open:!0,children:(0,Je.jsxs)(Xe,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Je.jsxs)(ft,{className:"flex flex-row items-center justify-between",children:[(0,Je.jsx)(gt,{className:"text-2xl font-bold",children:a==null?void 0:a.name}),(0,Je.jsxs)("div",{className:"flex space-Je-2",children:[(0,Je.jsx)(D,{variant:"outline",onClick:r,children:"Close"}),(0,Je.jsxs)(D,{onClick:m,disabled:!p,children:[(0,Je.jsx)($n.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,Je.jsxs)(sa,{className:"flex-grow pr-4",children:[(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Je.jsx)("div",{className:"grid gap-2",children:f==="value"?(0,Je.jsx)(Oe,{type:"number",value:n.value,onChange:N=>y("value",Number(N.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Je.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("value"),children:["\xA3",(ze=n.value)==null?void 0:ze.toLocaleString()]})}),(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),f==="assignee"?(0,Je.jsxs)(Ra,{value:((S=(Pt=n==null?void 0:n.assignee)==null?void 0:Pt.id)==null?void 0:S.toString())||"",onValueChange:N=>y("assignee",fe(N)),children:[(0,Je.jsx)(la,{children:(0,Je.jsx)(Sa,{placeholder:"Select assignee"})}),(0,Je.jsx)(da,{children:t&&t.map(N=>{var $;return(0,Je.jsx)(ca,{value:(($=N==null?void 0:N.id)==null?void 0:$.toString())||"",children:N.name},N.id)})})]}):(0,Je.jsxs)("div",{className:"flex items-center space-Je-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("assignee"),children:[(0,Je.jsx)($n.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,Je.jsx)("span",{children:n.assignee.name})]})]}),(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),f==="closureDate"?(0,Je.jsx)(Oe,{type:"date",value:(ct=(z=n.closureDate)==null?void 0:z.split("Je")[0])!=null?ct:"",onChange:N=>y("closureDate",N.target.value),onBlur:()=>b(null),autoFocus:!0}):(0,Je.jsxs)("div",{className:"flex items-center space-Je-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("closureDate"),children:[(0,Je.jsx)($n.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,Je.jsx)("span",{children:n.closureDate?new Date(n.closureDate).toLocaleDateString("en-GB"):"N/Je"})]})]})]}),(0,Je.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Description"}),f==="description"?(0,Je.jsx)(ma,{value:n.description||"",onChange:N=>y("description",N.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,Je.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>b("description"),children:n.description})]})}),(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Status"}),f==="status"?(0,Je.jsxs)(Ra,{value:n.status,onValueChange:N=>{y("status",N),b(null)},children:[(0,Je.jsx)(la,{children:(0,Je.jsx)(Sa,{placeholder:"Select status"})}),(0,Je.jsx)(da,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(N=>(0,Je.jsx)(ca,{value:N,children:N},N))})]}):(0,Je.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("status"),children:n.status})]}),(0,Je.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Categories"}),f==="categories"?(0,Je.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.map(N=>{var $,j;return(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(bt,{id:(($=N.id)==null?void 0:$.toString())||"",checked:(n.categories||[]).some(jo=>jo.id===N.id),onCheckedChange:()=>N.id!==void 0&&w(N)}),(0,Je.jsx)("label",{htmlFor:((j=N.id)!=null?j:"").toString(),className:`text-sm font-medium ${ee(N.type||"sector")} px-2 py-1 rounded`,children:N.name})]},N.id)})}):(0,Je.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("categories"),children:n.categories&&n.categories.map(N=>{let $=N;return $?(0,Je.jsx)(at,{variant:"secondary",className:ee($.type||"sector"),children:$.name},$.id):null})})]})]}),(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,Je.jsx)(sa,{className:"h-[200px] overflow-y-auto",children:(0,Je.jsx)("div",{className:"space-y-2",children:n.comments&&n.comments.slice().sort((N,$)=>new Date($.timestamp||"").getTime()-new Date(N.timestamp||"").getTime()).map(N=>{var $;return(0,Je.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,Je.jsx)("p",{className:"text-sm text-gray-700",children:N.text}),(0,Je.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[($=N==null?void 0:N.author)==null?void 0:$.name," - ",new Date(N.timestamp||"").toLocaleString()]})]},N.id)})})}),(0,Je.jsxs)("div",{className:"flex mt-2",children:[(0,Je.jsx)(Oe,{value:u,onChange:N=>d(N.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,Je.jsxs)(D,{onClick:G,className:"An-2",children:[(0,Je.jsx)($n.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,Je.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(n.updatedAt||"").toLocaleString()]})]})]})]})})}function an({deal:e,customer:t,categories:a,onClick:o}){let r=a.find(s=>{var l;return s.type==="proposition"&&((l=e.categories)!=null?l:[]).includes(s.id)});return(0,Je.jsxs)(Ce,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Je.jsxs)(Ge,{className:"pb-2",children:[(0,Je.jsx)("div",{className:"flex justify-between items-center",children:(0,Je.jsx)($e,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,Je.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,Je.jsxs)(Te,{children:[(0,Je.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Je.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,Je.jsx)($n.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,Je.jsx)("span",{children:e.assignee.name})]}),(0,Je.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Je.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Je.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Je.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Je.jsx)($n.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,Je.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Je.jsx)("div",{className:"flex justify-between items-left",children:r&&(0,Je.jsx)(at,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:r.name})})]})]})}var Qr=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function on({onSubmit:e}){var r;let[t,a]=(0,Zo.useState)({name:"",intro:"",active:!0});return(0,Je.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"space-y-2",children:[(0,Je.jsx)(ae,{htmlFor:"customerName",children:"Customer Name"}),(0,Je.jsx)(Oe,{id:"customerName",value:t.name,onChange:s=>a({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Je.jsxs)("div",{className:"space-y-2",children:[(0,Je.jsx)(ae,{htmlFor:"customerIntro",children:"Intro"}),(0,Je.jsx)(ma,{id:"customerIntro",value:(r=t.intro)!=null?r:"",onChange:s=>a({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(bt,{id:"activeCustomer",checked:!!t.active,onCheckedChange:s=>a({...t,active:s})}),(0,Je.jsx)(ae,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Je.jsx)(D,{type:"submit",className:"w-full",children:"Add Customer"})]})}function rn({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:l}){var ee,fe,ze,Pt;let[n,c]=(0,Zo.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("Je")[0],closureDate:"",comments:[],description:""}),[u,d]=(0,Zo.useState)(!1),[p,g]=(0,Zo.useState)({});(0,Zo.useEffect)(()=>{r&&c(r)},[r]);let f=()=>{let S={};return n.customer||(S.customer="Customer is required"),n.value||(S.value="Value is required"),n.assignee||(S.assignee="Assignee is required"),n.closureDate||(S.closureDate="Closure Date is required"),g(S),Object.keys(S).length===0},b=async S=>{S.preventDefault(),g({});try{if(f()){let z=await o({...n});z.success?(c({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),l==null||l()):g(z.errors||{})}}catch{g({submit:"An error occurred while submitting the form."})}},m=S=>{c(z=>({...z,categories:(z.categories||[]).includes(S.id)?(z.categories||[]).filter(ct=>ct!==S.id):[...z.categories||[],S.id]}))},y=async S=>{c({...n,customer:S});try{let z=await s(S);z.success?d(!1):g(z.errors||{})}catch{g({submit:"An error occurred while submitting the form."})}},w=S=>t==null?void 0:t.find(z=>z.id===Number(S)),G=S=>e==null?void 0:e.find(z=>z.id===Number(S));return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,Je.jsx)(sa,{className:"h-[60vh] pr-4",children:(0,Je.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{htmlFor:"customer",children:"Customer"}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsxs)(Ra,{value:(fe=(ee=n.customer)==null?void 0:ee.id)==null?void 0:fe.toString(),onValueChange:S=>c({...n,customer:G(S)}),children:[(0,Je.jsx)(la,{children:(0,Je.jsx)(Sa,{placeholder:"Select customer"})}),(0,Je.jsx)(da,{children:e.map(S=>{var z;return(0,Je.jsx)(ca,{value:((z=S.id)==null?void 0:z.toString())||"",children:S.name},S.id)})})]}),(0,Je.jsx)(D,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,Je.jsx)($n.PlusIcon,{className:"w-5 h-5"})})]}),p.customerId&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{htmlFor:"value",children:"Value"}),(0,Je.jsx)(Oe,{id:"value",type:"number",value:n.value||"",onChange:S=>c({...n,value:Number.parseFloat(S.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{htmlFor:"assignee",children:"Assignee"}),(0,Je.jsxs)(Ra,{value:(Pt=(ze=n.assignee)==null?void 0:ze.id)==null?void 0:Pt.toString(),onValueChange:S=>c({...n,assignee:w(S)}),children:[(0,Je.jsx)(la,{children:(0,Je.jsx)(Sa,{placeholder:"Select assignee"})}),(0,Je.jsx)(da,{children:t&&t.map(S=>{var z;return(0,Je.jsx)(ca,{value:((z=S.id)==null?void 0:z.toString())||"",children:S.name},S.id)})})]}),p.assignee&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{htmlFor:"description",children:"Description"}),(0,Je.jsx)(ma,{id:"description",value:n.description||"",onChange:S=>c({...n,description:S.target.value}),placeholder:"Enter deal description"})]}),(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{children:"Categories"}),(0,Je.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(S=>(0,Je.jsxs)("div",{className:"space-y-2",children:[(0,Je.jsx)("h4",{className:"text-sm font-medium",children:S.charAt(0).toUpperCase()+S.slice(1)}),(0,Je.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(z=>z.type===S).map(z=>{var ct;return(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(bt,{id:z.id.toString(),checked:(ct=n.categories)==null?void 0:ct.includes(z.id),onCheckedChange:()=>m(z)}),(0,Je.jsx)("label",{htmlFor:z.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:z.name})]},z.id)})})]},S))})]}),(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{htmlFor:"closureDate",children:"Closure Date"}),(0,Je.jsx)(Oe,{id:"closureDate",type:"date",value:n.closureDate||"",onChange:S=>c({...n,closureDate:S.target.value})}),p.closureDate&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,Je.jsx)(D,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,Je.jsx)(tt,{open:u,onOpenChange:d,children:(0,Je.jsxs)(Xe,{children:[(0,Je.jsx)(ft,{children:(0,Je.jsx)(gt,{children:"Add New Customer"})}),(0,Je.jsx)(on,{onSubmit:y})]})})]})}function sn({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:l,calculateWeightedValue:n,addNewDeal:c,onAddCustomer:u}){let[d,p]=(0,Zo.useState)(!1);return(0,Je.jsxs)("div",{className:"flex flex-col w-80",children:[(0,Je.jsx)("h2",{className:"text-Je font-semibold mb-4",children:e}),c&&(0,Je.jsxs)(tt,{open:d,onOpenChange:p,children:[(0,Je.jsx)(mr,{asChild:!0,children:(0,Je.jsxs)(D,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,Je.jsx)($n.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,Je.jsxs)(Xe,{children:[(0,Je.jsx)(ft,{children:(0,Je.jsx)(gt,{children:"Add New Deal"})}),(0,Je.jsx)(rn,{customers:o,users:a,categories:r,onSubmit:c,onAddCustomer:u,onClose:()=>p(!1)})]})]}),(0,Je.jsx)(Qr.Droppable,{droppableId:e,isDropDisabled:!1,children:g=>(0,Je.jsxs)("div",{ref:g.innerRef,...g.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((f,b)=>(0,Je.jsx)(Qr.Draggable,{draggableId:f.id.toString(),index:f.id,children:m=>(0,Je.jsx)("div",{ref:m.innerRef,...m.draggableProps,...m.dragHandleProps,children:(0,Je.jsx)(an,{deal:f,customer:f.customer,categories:r,onClick:()=>s(f)})})},f.id.toString())),g.placeholder]})}),(0,Je.jsxs)("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,Je.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Je.jsxs)("span",{className:"text-green-600",children:["\xA3",l(t).toLocaleString()]})]}),(0,Je.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Je.jsxs)("span",{className:"text-blue-600",children:["\xA3",n(t,e).toLocaleString()]})]})]})]})}var Sp=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function Tp({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){var p;let[s,l]=(0,Zo.useState)(null),n=g=>{var f;return((f=e.deals)!=null?f:[]).filter(b=>b.status===g)},c=g=>g.reduce((f,b)=>f+(b.value||0),0),u=(g,f)=>{let b={Cold:.2,Qualified:.4,"Proposal Made":.6,"SoW Submitted":.7,Won:1,Lost:0};return g.reduce((m,y)=>m+(y.value||0)*b[f],0)},d=(0,Zo.useCallback)(g=>{var ee,fe;let{source:f,destination:b}=g;if(!b||f.droppableId===b.droppableId&&f.index===b.index)return;let m=f.droppableId,y=b.droppableId,w=(ee=e.deals)==null?void 0:ee.filter(ze=>ze.id===f.index)[0],G=[...(fe=e.deals)!=null?fe:[]];w&&(w.status=y,a(w))},[a]);return(0,Je.jsx)(Qr.DragDropContext,{onDragEnd:d,children:(0,Je.jsxs)("div",{className:"p-4 max-h-[90vh] overflow-auto",children:[(0,Je.jsx)("div",{className:"flex space-Je-4 pb-4",children:Sp.filter(g=>g!=="Won"&&g!=="Lost").map(g=>{var b,m;let f=n(g);return(0,Je.jsx)(sn,{status:g,deals:f,customers:(b=e.customers)!=null?b:[],users:e.users,categories:(m=e.categories)!=null?m:[],onDealClick:l,calculateColumnValue:c,calculateWeightedValue:u,addNewDeal:g==="Cold"?t:void 0,onAddCustomer:r},g)})}),s&&(0,Je.jsx)(tn,{deal:s,users:e.users,customer:s.customer,categories:(p=e.categories)!=null?p:[],onClose:()=>l(null),onSave:a,onAddComment:g=>o(s.id.toString(),g)})]})})}0&&(module.exports={Alert,AlertDescription,AlertTitle,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,Card,Categories,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,Container,ContentBlock,ContentCard,CopyButton,CustomLink,CustomerCard,DarkTop,DealCard,DealDetails,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,Filter,FlowPrintable,Footer,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanColumn,Label,LightTop,Logo,LowImpactHero,MOTD,Mask,Media,MediaBlock,MediumImpactHero,NewCustomerForm,NewDealForm,NewsGrid,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadPagination,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,Printable,ProjectCard,ProjectTeam,ProposalSummary,RelatedContent,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarLeft,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarRight,SidebarSeparator,SidebarTrigger,SimpleHeader,Skeleton,SlideShow,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,toggleVariants,useIsMobile,useSidebar,useToast});
|
|
14
|
+
dark bg-background text-primary`,children:[(0,Je.jsxs)("div",{className:"flex px-6 items-center space-Je-2",children:[a&&(0,Je.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Je.jsx)("span",{className:"Je-12 text-sm",children:"Power up your people"})]}),(0,Je.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Je.jsx)("div",{ref:s,className:"preview-container"})]})},Cd=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=rs(e),o=(0,Zo.useRef)(null),r=(0,Zo.useRef)(null),s=(0,Zo.useRef)(new e0.Previewer),[l,n]=(0,Zo.useState)(0),u=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,Zo.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),s.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(p=>n(p.pageCount)).catch(p=>console.error("Paged.js error:",p)))},[t]);return(0,Zo.useEffect)(()=>{s.current=new e0.Previewer,d()},[d,t]),(0,Zo.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,Je.jsxs)("div",{className:"pagedjs-container",children:[(0,Je.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:u.map((p,g)=>{var f,b;return(0,Je.jsx)(Je.Fragment,{children:g===0?(0,Je.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,Je.jsx)(Oo,{hero:e.hero,title:e.title})},g):(0,Je.jsxs)("section",{className:i("pagedjs-section normal-page h-[699px]",`h-[${Qm("185mm")}px]`,((b=(f=p.theme)==null?void 0:f.settings)==null?void 0:b.theme)==="dark"?"dark":"light"),children:[p.blockName&&(0,Je.jsx)(zo,{title:p.blockName}),(0,Je.jsx)(fa,{blocks:[p],fill:!0})]},g)})})}),(0,Je.jsx)("div",{ref:o,className:"preview-container"})]})};var Bi=h(require("clsx"));function ep({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:l,loading:n=!1,LinkComponent:c,...u}){let p=c?g=>(0,Je.jsx)(c,{...g}):l?({href:g,children:f,...b})=>(0,Je.jsx)("button",{onClick:()=>l&&l(g),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...b,children:f}):g=>(0,Je.jsx)("a",{...g});return(0,Je.jsxs)(ha,{...u,variant:"inset",children:[(0,Je.jsx)(xa,{children:(0,Je.jsx)(_e,{children:(0,Je.jsx)(Re,{children:n?(0,Je.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Je.jsx)(le,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Je.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Je.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Je.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),n&&(0,Je.jsxs)(Zt,{children:[(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"}),(0,Je.jsx)(le,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Je.jsxs)(Zt,{children:[e&&!n&&e.map((g,f)=>(0,Je.jsx)(tp,{subNav:g,pathName:r,Link:p},f)),(0,Je.jsx)(Qe,{className:"mt-auto",children:(0,Je.jsx)(pt,{children:(0,Je.jsx)(_e,{children:t&&!n&&t.map(g=>(0,Je.jsx)(Re,{children:(0,Je.jsx)(Ze,{asChild:!0,size:"sm",children:(0,Je.jsxs)(p,{href:g.url||"",children:[g.icon&&(0,Je.jsx)(g.icon,{}),(0,Je.jsx)("span",{children:g.label})]})})},g.label))})})})]}),(0,Je.jsx)(wa,{})]})}function tp({subNav:e,pathName:t,Link:a}){var s,l;let o=e,r=!1;return o.links&&o.links.map(n=>{n.url===t&&(r=!0)}),(0,Je.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsx)(Qe,{className:"py-0",children:(0,Je.jsx)(_e,{children:(0,Je.jsx)(It,{asChild:!0,defaultOpen:o.isActive,children:(0,Je.jsxs)(Re,{children:[(0,Je.jsx)(Ze,{asChild:!0,tooltip:o.label,className:(0,Bi.default)(r&&"font-bold text-accent"),children:(0,Je.jsxs)(a,{href:o.url,children:[o.icon&&(0,Je.jsx)(o.icon,{}),(0,Je.jsx)("span",{children:o.label})]})}),(s=o.links)!=null&&s.length?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Kt,{asChild:!0,children:(0,Je.jsxs)(xo,{className:"data-[state=open]:rotate-90",children:[(0,Je.jsx)($n.ChevronRight,{}),(0,Je.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Je.jsx)(Jt,{children:(0,Je.jsx)(ea,{children:(l=o.links)==null?void 0:l.map(n=>(0,Je.jsx)(ta,{children:(0,Je.jsx)(aa,{asChild:!0,className:(0,Bi.default)(n.url===t&&"font-bold text-accent"),children:(0,Je.jsx)(a,{href:n.url,children:(0,Je.jsx)("span",{children:n.label})})})},n.label))})})]}):null]})},o.label)})})})}var kd=h(require("clsx"));var ap=()=>(0,Je.jsx)(Se,{iconName:"github",size:"10x"});function op({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:l,onPrintDocument:n,onGithubClick:c,onNavClick:u,LinkComponent:d,...p}){let b=d?m=>(0,Je.jsx)(d,{...m}):u?({item:m,children:y,...w})=>(0,Je.jsx)("button",{onClick:()=>u&&u(m),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...w,children:y}):m=>(0,Je.jsx)("a",{href:m.href,...m});return(0,Je.jsxs)(ha,{side:"right",variant:"inset",...p,children:[(0,Je.jsxs)(xa,{className:"border-b border-sidebar-border",children:[(0,Je.jsxs)(_e,{className:"flex-row space-Je-1",children:[(0,Je.jsx)(Re,{children:(0,Je.jsxs)(Ze,{onClick:s,children:[(0,Je.jsx)($n.FilePlus,{})," ",(0,Je.jsx)("span",{children:"Add Document"})]})}),c&&(0,Je.jsx)(Re,{children:(0,Je.jsx)(Ze,{onClick:c,tooltip:"Open in GitHub",children:(0,Je.jsx)(ap,{})})})]}),(0,Je.jsxs)(_e,{className:"flex-row space-Je-1",children:[(0,Je.jsx)(Re,{className:"w-5/12",children:(0,Je.jsxs)(Ze,{onClick:()=>l(),variant:r?"outline":"default",className:(0,kd.default)(r&&"text-accent"),children:[(0,Je.jsx)($n.Edit,{})," ",(0,Je.jsx)("span",{children:"Edit"})]})}),(0,Je.jsx)(Re,{className:"w-5/12",children:(0,Je.jsxs)(Ze,{onClick:n,children:[(0,Je.jsx)($n.Printer,{})," ",(0,Je.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Bt,{asChild:!0,children:(0,Je.jsxs)(Kt,{children:["Editor Controls",(0,Je.jsx)($n.ChevronDown,{className:"An-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(pt,{children:(0,Je.jsx)(Jt,{children:a})})]})}),(0,Je.jsx)(ho,{className:"mx-0"})]}),(0,Je.jsxs)(Zt,{className:"overflow-auto",children:[o&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Bt,{children:"Related Content"}),(0,Je.jsx)(pt,{children:(0,Je.jsx)(_e,{children:Array.from({length:3}).map((m,y)=>(0,Je.jsx)(Re,{children:(0,Je.jsx)(le,{className:"bg-gray-200 w-full h-10"})},y))})})]}),(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Bt,{children:"Table of Contents"}),(0,Je.jsx)(pt,{children:(0,Je.jsx)(_e,{children:Array.from({length:3}).map((m,y)=>(0,Je.jsx)(Re,{children:(0,Je.jsx)(le,{className:"bg-gray-200 w-full h-10"})},y))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Je.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Bt,{asChild:!0,children:(0,Je.jsxs)(Kt,{children:["Related Content",(0,Je.jsx)($n.ChevronDown,{className:"An-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(pt,{children:(0,Je.jsx)(Jt,{children:(0,Je.jsx)(_e,{children:e&&Object.keys(e).map(m=>(0,Je.jsxs)(Re,{children:[(0,Je.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",m.charAt(0).toUpperCase()+m.slice(1)]}),m&&e[m]&&(0,Je.jsx)(ea,{children:e[m].map(y=>(0,Je.jsx)(ta,{children:(0,Je.jsx)(aa,{asChild:!0,isActive:!1,size:"sm",children:(0,Je.jsxs)(b,{href:y.url,item:y,className:"flex justify-between items-center w-full text-xs",children:[(0,Je.jsx)("span",{children:y.label}),y.type==="note"&&(0,Je.jsx)($n.PencilLine,{className:"An-2 text-gray-400 !important",size:16}),y.type==="draft"&&(0,Je.jsx)(Se,{iconName:"code-pull-request-draft",className:"An-2 text-gray-400 !important"})]})})},y.label))})]},m))})})})]})}),t&&!o&&(0,Je.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,Je.jsxs)(Qe,{children:[(0,Je.jsx)(Bt,{asChild:!0,children:(0,Je.jsxs)(Kt,{children:["Table of Contents",(0,Je.jsx)($n.ChevronDown,{className:"An-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Je.jsx)(pt,{children:(0,Je.jsx)(Jt,{children:(0,Je.jsx)(_e,{children:t.map(m=>{var y;return(0,Je.jsxs)(Re,{children:[(0,Je.jsx)(Ze,{asChild:!0,children:(0,Je.jsx)("a",{href:`#${m.url}`,className:"text-xs",children:m.title})}),(y=m.items)!=null&&y.length?(0,Je.jsx)(ea,{children:m.items.map(w=>(0,Je.jsx)(ta,{children:(0,Je.jsx)(aa,{asChild:!0,isActive:w.isActive,size:"sm",children:(0,Je.jsx)("a",{href:`#${w.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,Je.jsx)("span",{children:w.title})})})},w.title))}):null]},m.title)})})})})]})})]}),(0,Je.jsx)(wa,{})]})}var Sd=h(require("next/image"));function rp({title:e,members:t}){return(0,Je.jsx)(Ce,{className:"mb-6",children:(0,Je.jsxs)("div",{className:"p-6",children:[(0,Je.jsxs)("div",{className:"flex items-center mb-4",children:[(0,Je.jsx)($n.Users,{className:"w-6 h-6 text-accent mr-2"}),(0,Je.jsx)("h2",{className:"text-Je font-semibold text-foreground",children:e})]}),(0,Je.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,Je.jsxs)("div",{className:"flex items-center space-Je-4",children:[(0,Je.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,Je.jsx)(Sd.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Je.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Td=h(require("next/link"));var sp=({links:e,title:t="Related Content"})=>(0,Je.jsxs)(Ce,{children:[(0,Je.jsx)(Ge,{children:(0,Je.jsx)($e,{className:"text-accent",children:t})}),(0,Je.jsx)(Te,{children:(0,Je.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,Je.jsxs)(Td.default,{href:a.url,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.title,a.url.startsWith("http")&&(0,Je.jsx)($n.ExternalLink,{className:"An-1 h-3 w-3"})]},o))})})]});var Li=i("grid h-[45px] w-[45px] place-items-center border border-[#3b3b3b] font-secondary text-base text-foreground rounded-full transition-colors duration-300 hover:bg-accent hover:border-accent hover:text-accent-foreground");function ip({pages:e}){let t=(0,nd.useSearchParams)(),a=(0,nd.usePathname)(),{replace:o}=(0,nd.useRouter)(),{totalPages:r,page:s}=e,[l,n]=(0,Zo.useState)({start:s>3?s-3:1,end:s+2}),c=p=>{p==="left"&&l.start>1?n(g=>({start:g.start-1,end:g.end-1})):p==="right"&&l.end<r&&n(g=>({start:g.start+1,end:g.end+1}))};function u(p){let g=new URLSearchParams(t);p?g.set("page",p):g.delete("page"),o(`${a}?${g.toString()}`)}if(r<=1)return null;let d=[];for(let p=l.start;p<=l.end;p++)d.push(p);return(0,Je.jsx)("div",{className:"mt-12",children:(0,Je.jsxs)("$n",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[l.start>1&&(0,Je.jsx)("li",{children:(0,Je.jsx)("button",{className:i(Li,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>c("left"),children:(0,Je.jsx)(Pl.FaArrowLeft,{})})}),d.map((p,g)=>(0,Je.jsx)("li",{children:(0,Je.jsx)("a",{className:i(Li,p===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:f=>{f.preventDefault(),u(p.toString())},children:p})},g)),l.end<r&&(0,Je.jsx)("li",{children:(0,Je.jsx)("button",{className:i(Li,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>c("right"),children:(0,Je.jsx)(Pl.FaArrowRight,{})})})]})})}var E0=i("transition-colors duration-400 hover:text-primary ease-in-out");function np({title:e,links:t}){let a=(0,nd.useSearchParams)(),o=(0,nd.usePathname)(),{replace:r}=(0,nd.useRouter)();function s(l){let n=new URLSearchParams(a);l?n.set("category",l):n.delete("category"),r(`${o}?${n.toString()}`)}return(0,Je.jsxs)(Ce,{children:[(0,Je.jsx)(Ge,{children:(0,Je.jsx)($e,{className:"text-accent",children:e&&e})}),(0,Je.jsx)(Te,{children:t&&t.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Je.jsx)("$n",{className:"grid gap-2.5 ",children:t.map((l,n)=>(0,Je.jsxs)("li",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:c=>{c.preventDefault(),s(l.href)},children:[l.label,(0,Je.jsx)($n.ExternalLink,{className:"An-1 h-3 w-3"})]},n))})})})]})}function lp({types:e}){let[t,a]=(0,Zo.useState)(e&&e[0].href),o=(0,nd.useSearchParams)(),r=(0,nd.usePathname)(),{replace:s}=(0,nd.useRouter)();function l(n){let c=new URLSearchParams(o);n?c.set("type",n):c.delete("type"),a(n),s(`${r}?${c.toString()}`)}return(0,Je.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-Je-auto pb-4 mb-6",children:e&&e.map((n,c)=>(0,Je.jsx)(D,{variant:n.href===t?"default":"ghost",className:i("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",n.href===t&&"bg-accent text-accent-foreground"),onClick:()=>l(n.href),children:n.label},c))})}var Bd=h(require("next/image"));var Hi=({links:e,media:t,children:a,richText:o})=>(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,Je.jsxs)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,Je.jsx)(Q,{className:"max-w-none mb-6 An-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,Je.jsx)("$n",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,Je.jsx)("li",{children:(0,Je.jsx)(yt,{...r})},s))})]}),(0,Je.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,Je.jsx)(_t,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Je.jsx)("div",{children:(0,Je.jsx)(Bd.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Je.jsx)("span",{className:"absolute inset-0 bg-gradient-$n-b from-white dark:from-black"})]}),(0,Je.jsx)(dp,{})]})}),dp=()=>(0,Je.jsx)("div",{className:"w-full h-[1240px] z-10",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Je.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var Fi=h(require("next/image"));var cp=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,Je.jsx)(Fi.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:s||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,Je.jsx)("div",{children:(0,Je.jsx)(Fi.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},zi=({links:e,media:t,children:a,richText:o})=>(0,Je.jsxs)("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&(0,Je.jsx)(cp,{media:t}),(0,Je.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,Je.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Je.jsx)(Q,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var Oi=({children:e,richText:t})=>(0,Je.jsx)("div",{className:"min-w-full py-10 bg-muted mt-24",children:(0,Je.jsx)("div",{className:"container",children:e||t&&(0,Je.jsx)(Q,{content:t,enableGutter:!1})})});var Ed=h(require("react")),Hd=h(require("next/image"));var Ld=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),s=o+1<10?`0${o+1}`:o+1,l=r<10?`0${r}`:r,n=a.getFullYear();return`${l}/${s}/${n}`};var mp=({post:e})=>{var l;let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,Je.jsxs)("div",{className:"relative grid pt-24",children:[(0,Je.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,Je.jsxs)("div",{className:"container mx-auto",children:[(0,Je.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,Je.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Je.jsx)("p",{children:o.map((n,c)=>(0,Je.jsxs)(Ed.default.Fragment,{children:[n.name,c<o.length-2&&", ",c===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),r&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Je.jsx)("time",{dateTime:r,children:Ld(r)})]}),t&&t.length>0&&(0,Je.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Je.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Je.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,c)=>typeof n=="object"&&n!==null&&(0,Je.jsx)(at,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||c))})]})]})]})}),(0,Je.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,Je.jsx)(Hd.default,{className:"object-cover",alt:`Cover image for ${s}`,src:((l=a==null?void 0:a.image)==null?void 0:l.url)||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,Je.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-$n-t from-background dark:from-black $n-transparent"})]})]})};var Gr=require("@heroicons/react/20/solid");var Gi=h(require("next/image"));function _i({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=i("container",t&&"full-width",a&&"nd-padding",o);return(0,Je.jsx)("div",{className:r,children:e})}var zd=require("next-themes");function pp({children:e,...t}){return(0,Je.jsx)(zd.ThemeProvider,{...t,children:e})}var Go=({position:e,className:t=""})=>{let a=["","scale(-1, 1)","scale(1, -1)","scale(-1, -1)"],o=a[Math.floor(Math.random()*a.length)];if(e==="header")return(0,Je.jsx)("div",{className:"w-full h-[1240px] z-20",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:i(t,"absolute -bottom-[2px] flex"),children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,Je.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,Je.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:i(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,Je.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,Je.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,Je.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:i(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-bottom")return(0,Je.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,Je.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"scale(1, -1)"},className:i(t,"w-full block overflow-hidden"),children:(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="light-bottom")return(0,Je.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,Je.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain"},className:i(t,"w-full block overflow-hidden"),transform:a[3],children:(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="bottom-left"||e==="bottom-right")return(0,Je.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,Je.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)"},className:i(t,"w-full block overflow-hidden"),children:(0,Je.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},up=({className:e})=>(0,Je.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:i(e,"absolute w-full h-full"),children:[(0,Je.jsx)("defs",{children:(0,Je.jsxs)("mask",{id:"mask",children:[(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,Je.jsx)("polygon",{fill:"white",points:"0 0 0 201.561092 0 1036.200679 0 1087.625789 1255.099121 1240.909908 1920 908.450984 1920 201.561092 1920 0 0 0"})]})}),(0,Je.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var $i=({title:e,image:t})=>(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,Je.jsx)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-start",children:(0,Je.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,Je.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,Je.jsx)(Gi.default,{priority:!0,src:t.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"}),t&&typeof t=="string"&&(0,Je.jsx)("div",{children:(0,Je.jsx)(Gi.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Je.jsx)("span",{className:"absolute inset-0 bg-gradient-$n-b from-white dark:from-black"})]}),(0,Je.jsx)(Go,{className:"text-black z-10",position:"header"})]})});var fp={highImpact:Hi,lowImpact:Oi,mediumImpact:zi,sectionHero:$i},gp=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=fp[t];return a?(0,Je.jsx)(a,{...e}):null};function bp({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,Je.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,Je.jsxs)("ol",{role:"list",className:"flex items-center space-Je-4",children:[(0,Je.jsx)("li",{children:(0,Je.jsx)("div",{children:(0,Je.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,Je.jsx)(Gr.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,Je.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,Je.jsx)("li",{children:(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(Gr.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,Je.jsx)("a",{href:a.href,className:"An-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,Je.jsx)("div",{className:"An-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,Je.jsx)(Je.Fragment,{})}var qe=require("@headlessui/react"),Ur=require("@heroicons/react/24/outline");var yp=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Je.jsx)("a",{href:o,className:"flex items-center gap-Je-1 text-sm text-foreground group",children:(0,Je.jsxs)("span",{className:"relative",children:[e,(0,Je.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-Je-1/2 scale-Je-0 transition-transform duration-300 ease-in-out group-hover:scale-Je-100"})]})}):(0,Je.jsxs)(qe.Popover,{children:[(0,Je.jsxs)(qe.PopoverButton,{className:"flex items-center gap-Je-1 text-sm/6 text-foreground outline-none group",children:[(0,Je.jsxs)("span",{className:"relative",children:[e,(0,Je.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-Je-1/2 scale-Je-0 transition-transform duration-300 ease-in-out group-hover:scale-Je-100"})]}),(0,Je.jsx)(Gr.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,Je.jsxs)(qe.PopoverPanel,{transition:!0,className:"absolute inset-Je-0 top-0 -z-10 bg-popover mt-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,Je.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-Je-4 px-6 py-10 lg:px-8 Je:gap-Je-8 z-50",children:t&&t.map(r=>(0,Je.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Je.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,Je.jsx)(_d,{icon:r.icon,size:"4x"})}),(0,Je.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Je.jsx)("span",{className:"absolute inset-0"})]}),(0,Je.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Je.jsx)("div",{className:"bg-gray-50",children:(0,Je.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Je.jsx)("div",{className:"grid grid-cols-3 divide-Je divide-gray-900/5 border-Je border-gray-900/5",children:a.map(r=>(0,Je.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-Je-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Je.jsx)(_d,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),_d=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Je.jsx)(Se,{...e,size:a});if("src"in e)return(0,Je.jsx)("div",{className:i(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Je.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},$r=yp;var Vr=["light","dark","green"];function vp({title:e,logo:t,menuItems:a}){let[o,r]=(0,Zo.useState)(!1),[s,l]=(0,Zo.useState)(!1),[n,c]=(0,Zo.useState)("light"),u=t==null?void 0:t.split(".")[0],d=t==null?void 0:t.split(".")[1],[p,g]=(0,Zo.useState)(`${u}.${d}`),f=m=>{Vr.includes(m)?g(m==="light"?`${u}.${d}`:`${u}-${m}.${d}`):g(`${u}.${d}`)};(0,Zo.useEffect)(()=>{let m=localStorage.getItem("theme")||"light";c(m),document.documentElement.setAttribute("class",m),f(m)},[]);let b=()=>{let m=Vr[(Vr.indexOf(n)+1)%Vr.length];c(m),document.documentElement.setAttribute("class",m),localStorage.setItem("theme",m),f(m)};return(0,Je.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,Je.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Je.jsx)("div",{className:"flex lg:flex-1",children:(0,Je.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:e}),(0,Je.jsx)("img",{alt:e,src:p,className:"h-9 w-auto"})]})}),(0,Je.jsx)("div",{className:"flex lg:hidden",children:(0,Je.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Je.jsx)(Ur.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,Je.jsx)(qe.PopoverGroup,{className:"hidden lg:flex lg:gap-Je-12",children:a.map(m=>(0,Je.jsx)($r,{...m},m.name))}),(0,Je.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Je.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:n==="dark"?(0,Je.jsx)($o.SunIcon,{className:"h-6 w-6"}):n==="green"?(0,Je.jsx)($o.MoonIcon,{className:"h-6 w-6"}):(0,Je.jsx)($o.SunIcon,{className:"h-6 w-6"})})})]}),(0,Je.jsxs)(qe.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Je.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Je.jsxs)(qe.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,Je.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,Je.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Je.jsx)(Ur.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Je.jsx)("div",{className:"mt-6 flow-root",children:(0,Je.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Je.jsx)("div",{className:"space-y-2 py-6",children:a.map(m=>(0,Je.jsx)(hp,{...m},m.name))})})})]})]})]})}function hp({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Je.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,Je.jsxs)(qe.Disclosure,{as:"div",className:"-mx-3",children:[(0,Je.jsx)(qe.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 Je-3 pr-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Je.jsx)(qe.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Je.jsx)(qe.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 Je-6 pr-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function xp({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let l=()=>{let n=document.getElementById("next-section");n&&n.scrollIntoView({behavior:"smooth"})};return(0,Je.jsx)("div",{children:(0,Je.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,Je.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Je.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Je.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,Je.jsx)(_i,{children:(0,Je.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 mb-10 z-0 md:mb-0",children:[(0,Je.jsx)("h1",{className:"text-5xl md:text-7xl mb-6",children:r&&r}),(0,Je.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 mb-8 max-w-lg",children:s&&s})]})})}),(0,Je.jsx)(Go,{className:"text-black z-10",position:"header"})]})})}var Vi=h(require("next/image"));function ga({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Je.jsxs)(ot,{href:"/",className:i(a?"py-1":"py-2"),children:[(0,Je.jsx)(Vi.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,Je.jsx)(Vi.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function Ui({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[l,n]=(0,Zo.useState)(!1),[c,u]=(0,Zo.useState)(""),d=["light","dark"],{theme:p,setTheme:g}=(0,$d.useTheme)();(0,Zo.useEffect)(()=>{u(p||"dark")},[p]);let f=()=>{let b=d[(d.indexOf(c)+1)%d.length];u(b),g(b)};return(0,Zo.useEffect)(()=>{let b=()=>{window.scrollY>100?n(!0):n(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${l||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Je.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Je.jsxs)("div",{className:i("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,Je.jsx)(ga,{logoDark:a,logoLight:t}),(0,Je.jsx)(qe.PopoverGroup,{className:"hidden lg:flex lg:gap-Je-12",children:o&&o.map(b=>(0,Je.jsx)($r,{...b},b.name))}),r&&(0,Je.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:f,children:(0,Je.jsxs)("div",{className:"relative",children:[(0,Je.jsx)($n.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Je.jsx)($n.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Wi=["light","dark"];function ji({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,Zo.useState)(!1),{theme:l,setTheme:n}=(0,zd.useTheme)(),[c,u]=(0,Zo.useState)(!1),[d,p]=(0,Zo.useState)("light");(0,Zo.useEffect)(()=>{let f=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),(0,Zo.useEffect)(()=>{p(l||"dark")},[l]);let g=()=>{let f=Wi[(Wi.indexOf(d)+1)%Wi.length];p(f),n(f)};return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,Je.jsx)("nav",{className:i("backdrop-blur-sm text-white p-0",c&&"hidden"),children:(0,Je.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&Je.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Je.jsx)(ga,{logoDark:t,logoLight:e,mobile:!0}),(0,Je.jsx)("div",{className:"flex items-center space-Je-4",children:(0,Je.jsxs)("button",{type:"button",onClick:()=>u(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Je.jsx)(Ur.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,Je.jsxs)(qe.Dialog,{open:c,onClose:u,className:"lg:hidden",children:[(0,Je.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Je.jsxs)(qe.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Je.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Je.jsx)(ga,{logoDark:t,logoLight:e,mobile:!0}),(0,Je.jsxs)("button",{type:"button",onClick:()=>u(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Je.jsx)(Ur.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Je.jsx)("div",{className:"mt-6 flow-root",children:(0,Je.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Je.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(f=>(0,Je.jsx)(wp,{...f},f.name))})})})]})]})]})})}function wp({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Je.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,Je.jsxs)(qe.Disclosure,{as:"div",className:"-mx-3",children:[(0,Je.jsx)(qe.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 Je-3 pr-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Je.jsx)(qe.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Je.jsx)(qe.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 Je-6 pr-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var Fv=i("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),Wd=i("text-brand-green text-md leading-[1.25] md:text-lg mb-5 md:mb-[1.5rem]"),Xi=i("bg-brand-green rounded-full p-3 mr-4 text-2xl"),Yi=i("flex items-center text-white gap-3"),Xr=i("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Np({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:l,footerBottom:n}=t,c=void 0;return(0,Je.jsxs)("footer",{className:i("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,Je.jsx)("div",{className:"py-16 md:py-20",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 Je:grid-cols-3",children:[(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,Je.jsx)(ga,{logoDark:o,logoLight:a}),(0,Je.jsx)("p",{className:"mb-7 mt-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Je.jsx)("nav",{"aria-label":"social links",children:(0,Je.jsx)("$n",{className:"inline-flex Je-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((u,d)=>(0,Je.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,Je.jsx)(ot,{"aria-label":u.href,className:"text-2xl",href:u.href,openNewTab:!0,children:(0,Je.jsx)("span",{children:u.icon})})},d))})})]}),(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,Je.jsx)("h3",{className:Wd,children:s.title}),s.links&&s.links.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Je.jsx)("$n",{className:"grid Je-0 gap-2",children:s.links.map(u=>(0,Je.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,Je.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,Je.jsx)(Pl.FaChevronRight,{})}),(0,Je.jsx)(ot,{href:u.href,openNewTab:u.openNewTab,className:Xr,children:u.label})]},u.label))})})]}),(0,Je.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,Je.jsx)("h3",{className:Wd,children:l.title}),(0,Je.jsxs)("$n",{"aria-label":"addresses",className:"grid gap-2 Je-0",children:[(0,Je.jsxs)("li",{className:Yi,children:[(0,Je.jsx)("span",{className:Xi,children:(0,Je.jsx)(Pl.FaPaperPlane,{})}),(0,Je.jsx)("address",{className:"not-italic",children:l.location})]}),(0,Je.jsxs)("li",{className:Yi,children:[(0,Je.jsx)("span",{className:Xi,children:(0,Je.jsx)(Pl.FaEnvelope,{})}),l.mails&&l.mails.length>0&&(0,Je.jsx)("div",{className:"grid gap-1",children:l.mails.map((u,d)=>(0,Je.jsx)("a",{href:`mailto:${u}`,className:Xr,children:u},d))})]}),l.phoneNumbers&&l.phoneNumbers.length>0&&(0,Je.jsxs)("li",{className:Yi,children:[(0,Je.jsx)("span",{className:Xi,children:(0,Je.jsx)(Pl.FaPhone,{})}),(0,Je.jsx)("div",{className:"grid gap-1",children:l.phoneNumbers.map((u,d)=>(0,Je.jsx)("a",{href:`tel:${u.split(" ").join("")}`,className:Xr,children:u},d))})]})]})]})]})})}),(0,Je.jsx)("div",{className:"flex min-h-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-Je-8 gap-y-4 md:gap-Je-10",children:[(0,Je.jsx)("p",{children:n.copyrightText}),n.links&&n.links.length>0&&(0,Je.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Je.jsx)("$n",{className:"flex flex-wrap items-center gap-Je-4 md:gap-Je-7",children:n.links.map(u=>(0,Je.jsx)("li",{children:(0,Je.jsx)(ot,{"aria-label":`Go $n page ${u.label}`,href:u.href,openNewTab:u.openNewTab,className:Xr,children:u.label})},u.label))})})]})})})]})}function Cp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:l=!1}){return(0,Je.jsxs)("div",{className:i("fixed top-0 left-0 right-0 z-50",r),children:[(0,Je.jsx)(Ui,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:l,wide:s}),(0,Je.jsx)(ji,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function qi({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,Zo.useState)([]),s=(0,nd.useRouter)(),l=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},n=d=>{r(p=>p.includes(d)?p.filter(g=>g!==d):[...p,d])},c=async()=>{let d=await t(o);d.success?(mi.toast.success(d.message),s.refresh()):mi.toast.error(`Error: ${d.message}`),r([])},u=async()=>{let d=await a(o);d.success?(mi.toast.success(d.message),s.refresh()):mi.toast.error(`Error: ${d.message}`),r([])};return(0,Je.jsxs)("div",{className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Je.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Je.jsxs)("div",{className:"space-Je-2",children:[(0,Je.jsx)(D,{onClick:c,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Je.jsx)(D,{onClick:u,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Je.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Je.jsxs)("$n",{className:"divide-y divide-gray-200",children:[(0,Je.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(bt,{id:"select-all",checked:o.length===e.length,onCheckedChange:l,className:"border-accent"}),(0,Je.jsx)("label",{htmlFor:"select-all",className:"An-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Je.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,Je.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsx)(bt,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>n(d.id),className:"border-accent"}),(0,Je.jsxs)("div",{className:"An-3 flex items-center",children:[(0,Je.jsxs)(Ht,{className:"h-10 w-10",children:[(0,Je.jsx)(Ft,{src:d.userImage,alt:d.userName}),(0,Je.jsx)(zt,{children:d.userName.split(" ").map(p=>p[0]).join("")})]}),(0,Je.jsx)("div",{className:"An-3",children:(0,Je.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,Je.jsx)(at,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,Je.jsx)(mi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Ki=require("date-fns");var Yd=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];var Wo=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=Yd.some(r=>r.date.toISOString()===e.toISOString());return t||a||o},qd=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!Wo(o))return .5;for(;o<=r;)Wo(o)||s++,o.setDate(o.getDate()+1);return s},Kd=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var Pp=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,Je.jsx)("div",{className:"flex space-Je-2",children:e.map((r,s)=>(0,Je.jsx)(D,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[s],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function Qi({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,Zo.useState)(new Date),[r,s]=(0,Zo.useState)(new Date),[l,n]=(0,Zo.useState)("Full Day"),[c,u]=(0,Zo.useState)(!1),[d,p]=(0,Zo.useState)(1),g=(0,nd.useRouter)();(0,Zo.useEffect)(()=>{let m=Kd(a,r);u(m),m&&n("Full Day")},[a,r]),(0,Zo.useEffect)(()=>{if(!a||!r){p(0);return}let m=qd(a,r,l!=="Full Day");p(m)},[a,r,l]);let f=m=>{n(m)};return(0,Je.jsxs)("div",{className:"max-w-2xl",children:[(0,Je.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,Je.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,Je.jsxs)("form",{onSubmit:async m=>{if(m.preventDefault(),!a||!r){mi.toast.error("Please select both start and end dates");return}if(d>e){mi.toast.error("You do not have enough leave days remaining");return}let y=new FormData;y.append("startDate",a.toISOString()),y.append("endDate",r.toISOString()),y.append("leaveType",l),y.append("duration",d.toString());let w=await(t||kp)(y);w.success?(mi.toast.success(w.message),o(void 0),s(void 0),n("Full Day"),g.refresh()):mi.toast.error(`Error: ${w.message}`)},className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Je.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Je.jsx)(ae,{htmlFor:"startDate",children:"Start Date"}),(0,Je.jsxs)(To,{children:[(0,Je.jsx)(Do,{asChild:!0,children:(0,Je.jsxs)(D,{variant:"outline",className:i("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,Je.jsx)($n.CalendarIcon,{className:"mr-2 h-4 w-4"}),a?(0,Ki.format)(a,"PPP"):(0,Je.jsx)("span",{children:"Pick a date"})]})}),(0,Je.jsx)(qa,{className:"w-auto p-0",align:"start",children:(0,Je.jsx)(Ao,{mode:"single",selected:a,onSelect:m=>{o(m),m&&(!r||m>r)&&s(m)},initialFocus:!0})})]})]}),(0,Je.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Je.jsx)(ae,{htmlFor:"endDate",children:"End Date"}),(0,Je.jsxs)(To,{children:[(0,Je.jsx)(Do,{asChild:!0,children:(0,Je.jsxs)(D,{variant:"outline",className:i("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Je.jsx)($n.CalendarIcon,{className:"mr-2 h-4 w-4"}),r?(0,Ki.format)(r,"PPP"):(0,Je.jsx)("span",{children:"Pick a date"})]})}),(0,Je.jsx)(qa,{className:"w-auto p-0",align:"start",children:(0,Je.jsx)(Ao,{mode:"single",selected:r,onSelect:s,disabled:m=>a?m<a:!1,initialFocus:!0})})]})]})]}),(0,Je.jsxs)("div",{className:"space-y-2",children:[(0,Je.jsx)(ae,{children:"Leave Type"}),(0,Je.jsx)(Pp,{options:["Full Day","Morning","Afternoon"],value:l,onChange:f,disabled:[!1,c,c]})]}),(0,Je.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,Je.jsx)(D,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Je.jsx)(mi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var kp=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function Qd(...e){return e.filter(Boolean).join(" ")}function Zi({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},n=()=>{t(new Date)},c=u=>u.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Je.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Je.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Je.jsxs)("div",{className:"sm:flex-auto",children:[(0,Je.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Je.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Je.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Je.jsxs)(D,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Je.jsx)($n.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Je.jsx)(D,{variant:"outline",onClick:n,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Je.jsxs)(D,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Je.jsx)($n.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,Je.jsx)("div",{className:"mt-8 flow-root",children:(0,Je.jsx)("div",{className:"-mx-4 -my-2 overflow-Je-auto sm:-mx-6 lg:-mx-8",children:(0,Je.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,Je.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,Je.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Je.jsxs)("tr",{children:[(0,Je.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 Je-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:Je-6 lg:Je-8",children:"Employee"}),[...Array(r)].map((u,d)=>{let p=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,Je.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${Wo(p)?"bg-gray-200":""}`,children:[(0,Je.jsx)("div",{children:c(p)}),(0,Je.jsx)("div",{children:d+1})]},d)})]})}),(0,Je.jsx)("tbody",{children:o.map((u,d)=>(0,Je.jsxs)("tr",{children:[(0,Je.jsx)("td",{className:Qd(d!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r Je-4 pr-3 text-sm font-medium text-gray-900 sm:Je-6 lg:Je-8"),children:(0,Je.jsxs)("div",{className:"flex items-center",children:[(0,Je.jsxs)(Ht,{className:"h-11 w-11",children:[(0,Je.jsx)(Ft,{src:u.image,alt:u.name}),(0,Je.jsx)(zt,{children:u.name.split(" ").map(p=>p[0]).join("")})]}),(0,Je.jsx)("div",{className:"An-4",children:(0,Je.jsx)("div",{className:"font-medium text-accent",children:u.name})})]})}),[...Array(r)].map((p,g)=>{let f=new Date(e.getFullYear(),e.getMonth(),g+1),b=a.find(m=>m.userId===u.id&&new Date(m.startDate)<=f&&new Date(m.endDate)>=f);return(0,Je.jsx)("td",{className:Qd(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Wo(f)?"bg-gray-200":""),children:(0,Je.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${b?b.status==="approved"?"bg-green-500":b.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:b?`${u.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,Je.jsx)("div",{className:`h-3 w-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${u.id}-${g}`)})]},u.id))})]})})})})]})}function en({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,Zo.useState)(null),s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,l=Array.from({length:42},(d,p)=>{let g=new Date(e.getFullYear(),e.getMonth(),p-s+1);return{date:g,isCurrentMonth:g.getMonth()===e.getMonth(),isToday:g.toDateString()===new Date().toDateString(),holidays:a.filter(f=>new Date(f.startDate)<=g&&new Date(f.endDate)>=g)}}),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},c=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},u=()=>{t(new Date)};return(0,Je.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Je.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Je.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Je.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Je.jsx)("div",{className:"flex items-center",children:(0,Je.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Je.jsxs)(D,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Je.jsx)($n.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Je.jsx)(D,{variant:"outline",onClick:u,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Je.jsxs)(D,{onClick:c,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Je.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Je.jsx)($n.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,Je.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Je.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Je"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Je"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["Je",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,Je.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Je.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,Je.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto",children:[(0,Je.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px",children:l.map(d=>(0,Je.jsxs)("div",{className:i(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2"),children:[(0,Je.jsx)("time",{dateTime:d.date.toISOString(),className:i("flex h-6 w-6 items-center justify-center rounded-full",d.isToday&&"bg-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,Je.jsx)("ol",{className:"mt-2 space-y-1",children:d.holidays.map(p=>(0,Je.jsx)("li",{children:(0,Je.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${p.status==="approved"?"border-green-500":"border-gray-500"} border`,children:p.userName})},p.id))})]},d.date.toISOString()))}),(0,Je.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:l.map(d=>(0,Je.jsxs)("button",{type:"button",className:i(d.isCurrentMonth?"bg-white":"bg-gray-50",(d.date===o||d.isToday)&&"font-semibold",d.date===o&&"text-white",!d.date&&d.isToday&&"text-indigo-600",d.date!==o&&d.isCurrentMonth&&!d.isToday&&"text-gray-900",d.date!==o&&!d.isCurrentMonth&&!d.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,Je.jsx)("time",{dateTime:d.date.toISOString(),className:i("An-auto",d.date===o&&d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,Je.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,Je.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:d.holidays.map(p=>(0,Je.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${p.status==="approved"?"bg-green-500":"bg-gray-500"}`},p.id))})]},d.date.toISOString()))})]})]})]})}var ya=require("lucide-react");function ec(...e){return e.filter(Boolean).join(" ")}function Rp({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:l,rejectLeave:n}){let[c,u]=(0,Zo.useState)("Calendar View"),d=(0,nd.useRouter)(),p=!1,g=(0,Ki.parseISO)(a),f=async m=>{let y=(0,Ki.format)(m,"dd-MM-yyyy"),w=new URL(window.location.href);return w.searchParams.set("date",y),d.push(w.toString()),{success:!0}};if(p)return(0,Je.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Je.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:ya.Grid,current:c==="Grid View"},{name:"Calendar View",icon:ya.CalendarDays,current:c==="Calendar View"},{name:"Request Leave",icon:ya.PlusCircle,current:c==="Request Leave"},{name:"Approve Leave",icon:ya.CheckSquare,current:c==="Approve Leave"}];return(0,Je.jsxs)("div",{className:"container fixed mx-auto p-4",children:[(0,Je.jsxs)("div",{className:"mb-8",children:[(0,Je.jsxs)("div",{className:"sm:hidden",children:[(0,Je.jsx)("select",{value:c,onChange:m=>u(m.target.value),className:"block w-full rounded-md border-gray-300 py-2 Je-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(m=>(0,Je.jsx)("option",{children:m.name},m.name))}),(0,Je.jsx)($n.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,Je.jsx)("div",{className:"hidden sm:block",children:(0,Je.jsx)("div",{className:"border-b border-gray-200",children:(0,Je.jsx)("nav",{className:"-mb-px flex space-Je-8","aria-label":"Tabs",children:b.map(m=>(0,Je.jsxs)("a",{onClick:()=>{(m.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&u(m.name)},className:ec(m.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",m.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":m.current?"page":void 0,children:[(0,Je.jsx)(m.icon,{className:ec(m.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-An-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),(0,Je.jsx)("span",{children:m.name})]},m.name))})})})]}),c==="Grid View"&&(0,Je.jsx)(Zi,{currentDate:g,setCurrentDate:f,holidays:e,employees:r}),c==="Calendar View"&&(0,Je.jsx)(en,{currentDate:g,setCurrentDate:f,holidays:e}),c==="Request Leave"&&(0,Je.jsx)(Qi,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:m=>s?s(m):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),c==="Approve Leave"&&(0,Je.jsx)(qi,{leaveRequests:o,onApprove:m=>l?l(m):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:m=>n?n(m):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function tn({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:l}){var ze,Pt,S,z,ct;let[n,c]=(0,Zo.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[u,d]=(0,Zo.useState)(""),[p,g]=(0,Zo.useState)(!1),[f,b]=(0,Zo.useState)(null);(0,Zo.useEffect)(()=>{g(JSON.stringify(e)!==JSON.stringify(n))},[e,n]);let m=async()=>{try{let N=await s(n);N.success?(g(!1),b(null)):console.error("Failed $n save deal:",N.errors)}catch(N){console.error("Failed $n save deal:",N)}},y=(N,$)=>{c(j=>({...j,[N]:$}))},w=N=>{let $=(n.categories||[]).includes(N)?(n.categories||[]).filter(j=>j!==N):[...n.categories||[],N];y("categories",$)},G=async()=>{if(u.trim()){let N={text:u,timestamp:new Date().toISOString()};try{let $=await l(N);if(!$.success){console.error("Failed $n add comment:",$.errors);return}}catch($){console.error("Failed $n add comment:",$)}c($=>({...$,comments:[...$.comments||[],N]})),d("")}},ee=N=>{switch(N){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},fe=N=>t==null?void 0:t.find($=>$.id===Number(N));return(0,Je.jsx)(tt,{open:!0,children:(0,Je.jsxs)(Xe,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Je.jsxs)(ft,{className:"flex flex-row items-center justify-between",children:[(0,Je.jsx)(gt,{className:"text-2xl font-bold",children:a==null?void 0:a.name}),(0,Je.jsxs)("div",{className:"flex space-Je-2",children:[(0,Je.jsx)(D,{variant:"outline",onClick:r,children:"Close"}),(0,Je.jsxs)(D,{onClick:m,disabled:!p,children:[(0,Je.jsx)($n.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,Je.jsxs)(sa,{className:"flex-grow pr-4",children:[(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Je.jsx)("div",{className:"grid gap-2",children:f==="value"?(0,Je.jsx)(Oe,{type:"number",value:n.value,onChange:N=>y("value",Number(N.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Je.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("value"),children:["\xA3",(ze=n.value)==null?void 0:ze.toLocaleString()]})}),(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),f==="assignee"?(0,Je.jsxs)(Ra,{value:((S=(Pt=n==null?void 0:n.assignee)==null?void 0:Pt.id)==null?void 0:S.toString())||"",onValueChange:N=>y("assignee",fe(N)),children:[(0,Je.jsx)(la,{children:(0,Je.jsx)(Sa,{placeholder:"Select assignee"})}),(0,Je.jsx)(da,{children:t&&t.map(N=>{var $;return(0,Je.jsx)(ca,{value:(($=N==null?void 0:N.id)==null?void 0:$.toString())||"",children:N.name},N.id)})})]}):(0,Je.jsxs)("div",{className:"flex items-center space-Je-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("assignee"),children:[(0,Je.jsx)($n.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,Je.jsx)("span",{children:n.assignee.name})]})]}),(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),f==="closureDate"?(0,Je.jsx)(Oe,{type:"date",value:(ct=(z=n.closureDate)==null?void 0:z.split("Je")[0])!=null?ct:"",onChange:N=>y("closureDate",N.target.value),onBlur:()=>b(null),autoFocus:!0}):(0,Je.jsxs)("div",{className:"flex items-center space-Je-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("closureDate"),children:[(0,Je.jsx)($n.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,Je.jsx)("span",{children:n.closureDate?new Date(n.closureDate).toLocaleDateString("en-GB"):"N/Je"})]})]})]}),(0,Je.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Description"}),f==="description"?(0,Je.jsx)(ma,{value:n.description||"",onChange:N=>y("description",N.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,Je.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>b("description"),children:n.description})]})}),(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Status"}),f==="status"?(0,Je.jsxs)(Ra,{value:n.status,onValueChange:N=>{y("status",N),b(null)},children:[(0,Je.jsx)(la,{children:(0,Je.jsx)(Sa,{placeholder:"Select status"})}),(0,Je.jsx)(da,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(N=>(0,Je.jsx)(ca,{value:N,children:N},N))})]}):(0,Je.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("status"),children:n.status})]}),(0,Je.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Categories"}),f==="categories"?(0,Je.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.map(N=>{var $,j;return(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(bt,{id:(($=N.id)==null?void 0:$.toString())||"",checked:(n.categories||[]).some(jo=>jo.id===N.id),onCheckedChange:()=>N.id!==void 0&&w(N)}),(0,Je.jsx)("label",{htmlFor:((j=N.id)!=null?j:"").toString(),className:`text-sm font-medium ${ee(N.type||"sector")} px-2 py-1 rounded`,children:N.name})]},N.id)})}):(0,Je.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>b("categories"),children:n.categories&&n.categories.map(N=>{let $=N;return $?(0,Je.jsx)(at,{variant:"secondary",className:ee($.type||"sector"),children:$.name},$.id):null})})]})]}),(0,Je.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,Je.jsxs)("div",{className:"grid gap-2",children:[(0,Je.jsx)(ae,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,Je.jsx)(sa,{className:"h-[200px] overflow-y-auto",children:(0,Je.jsx)("div",{className:"space-y-2",children:n.comments&&n.comments.slice().sort((N,$)=>new Date($.timestamp||"").getTime()-new Date(N.timestamp||"").getTime()).map(N=>{var $;return(0,Je.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,Je.jsx)("p",{className:"text-sm text-gray-700",children:N.text}),(0,Je.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[($=N==null?void 0:N.author)==null?void 0:$.name," - ",new Date(N.timestamp||"").toLocaleString()]})]},N.id)})})}),(0,Je.jsxs)("div",{className:"flex mt-2",children:[(0,Je.jsx)(Oe,{value:u,onChange:N=>d(N.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,Je.jsxs)(D,{onClick:G,className:"An-2",children:[(0,Je.jsx)($n.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,Je.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(n.updatedAt||"").toLocaleString()]})]})]})]})})}function an({deal:e,customer:t,categories:a,onClick:o}){let r=a.find(s=>{var l;return s.type==="proposition"&&((l=e.categories)!=null?l:[]).includes(s.id)});return(0,Je.jsxs)(Ce,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Je.jsxs)(Ge,{className:"pb-2",children:[(0,Je.jsx)("div",{className:"flex justify-between items-center",children:(0,Je.jsx)($e,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,Je.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,Je.jsxs)(Te,{children:[(0,Je.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Je.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,Je.jsx)($n.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,Je.jsx)("span",{children:e.assignee.name})]}),(0,Je.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Je.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Je.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Je.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Je.jsx)($n.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,Je.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Je.jsx)("div",{className:"flex justify-between items-left",children:r&&(0,Je.jsx)(at,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:r.name})})]})]})}var Qr=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function on({onSubmit:e}){var r;let[t,a]=(0,Zo.useState)({name:"",intro:"",active:!0});return(0,Je.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,Je.jsxs)("div",{className:"space-y-2",children:[(0,Je.jsx)(ae,{htmlFor:"customerName",children:"Customer Name"}),(0,Je.jsx)(Oe,{id:"customerName",value:t.name,onChange:s=>a({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Je.jsxs)("div",{className:"space-y-2",children:[(0,Je.jsx)(ae,{htmlFor:"customerIntro",children:"Intro"}),(0,Je.jsx)(ma,{id:"customerIntro",value:(r=t.intro)!=null?r:"",onChange:s=>a({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(bt,{id:"activeCustomer",checked:!!t.active,onCheckedChange:s=>a({...t,active:s})}),(0,Je.jsx)(ae,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Je.jsx)(D,{type:"submit",className:"w-full",children:"Add Customer"})]})}function rn({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:l}){var ee,fe,ze,Pt;let[n,c]=(0,Zo.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("Je")[0],closureDate:"",comments:[],description:""}),[u,d]=(0,Zo.useState)(!1),[p,g]=(0,Zo.useState)({});(0,Zo.useEffect)(()=>{r&&c(r)},[r]);let f=()=>{let S={};return n.customer||(S.customer="Customer is required"),n.value||(S.value="Value is required"),n.assignee||(S.assignee="Assignee is required"),n.closureDate||(S.closureDate="Closure Date is required"),g(S),Object.keys(S).length===0},b=async S=>{S.preventDefault(),g({});try{if(f()){let z=await o({...n});z.success?(c({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),l==null||l()):g(z.errors||{})}}catch{g({submit:"An error occurred while submitting the form."})}},m=S=>{c(z=>({...z,categories:(z.categories||[]).includes(S.id)?(z.categories||[]).filter(ct=>ct!==S.id):[...z.categories||[],S.id]}))},y=async S=>{c({...n,customer:S});try{let z=await s(S);z.success?d(!1):g(z.errors||{})}catch{g({submit:"An error occurred while submitting the form."})}},w=S=>t==null?void 0:t.find(z=>z.id===Number(S)),G=S=>e==null?void 0:e.find(z=>z.id===Number(S));return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,Je.jsx)(sa,{className:"h-[60vh] pr-4",children:(0,Je.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{htmlFor:"customer",children:"Customer"}),(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsxs)(Ra,{value:(fe=(ee=n.customer)==null?void 0:ee.id)==null?void 0:fe.toString(),onValueChange:S=>c({...n,customer:G(S)}),children:[(0,Je.jsx)(la,{children:(0,Je.jsx)(Sa,{placeholder:"Select customer"})}),(0,Je.jsx)(da,{children:e.map(S=>{var z;return(0,Je.jsx)(ca,{value:((z=S.id)==null?void 0:z.toString())||"",children:S.name},S.id)})})]}),(0,Je.jsx)(D,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,Je.jsx)($n.PlusIcon,{className:"w-5 h-5"})})]}),p.customerId&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{htmlFor:"value",children:"Value"}),(0,Je.jsx)(Oe,{id:"value",type:"number",value:n.value||"",onChange:S=>c({...n,value:Number.parseFloat(S.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{htmlFor:"assignee",children:"Assignee"}),(0,Je.jsxs)(Ra,{value:(Pt=(ze=n.assignee)==null?void 0:ze.id)==null?void 0:Pt.toString(),onValueChange:S=>c({...n,assignee:w(S)}),children:[(0,Je.jsx)(la,{children:(0,Je.jsx)(Sa,{placeholder:"Select assignee"})}),(0,Je.jsx)(da,{children:t&&t.map(S=>{var z;return(0,Je.jsx)(ca,{value:((z=S.id)==null?void 0:z.toString())||"",children:S.name},S.id)})})]}),p.assignee&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{htmlFor:"description",children:"Description"}),(0,Je.jsx)(ma,{id:"description",value:n.description||"",onChange:S=>c({...n,description:S.target.value}),placeholder:"Enter deal description"})]}),(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{children:"Categories"}),(0,Je.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(S=>(0,Je.jsxs)("div",{className:"space-y-2",children:[(0,Je.jsx)("h4",{className:"text-sm font-medium",children:S.charAt(0).toUpperCase()+S.slice(1)}),(0,Je.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(z=>z.type===S).map(z=>{var ct;return(0,Je.jsxs)("div",{className:"flex items-center space-Je-2",children:[(0,Je.jsx)(bt,{id:z.id.toString(),checked:(ct=n.categories)==null?void 0:ct.includes(z.id),onCheckedChange:()=>m(z)}),(0,Je.jsx)("label",{htmlFor:z.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:z.name})]},z.id)})})]},S))})]}),(0,Je.jsxs)("div",{className:"space-y-2 space-Je-2",children:[(0,Je.jsx)(ae,{htmlFor:"closureDate",children:"Closure Date"}),(0,Je.jsx)(Oe,{id:"closureDate",type:"date",value:n.closureDate||"",onChange:S=>c({...n,closureDate:S.target.value})}),p.closureDate&&(0,Je.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,Je.jsx)(D,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,Je.jsx)(tt,{open:u,onOpenChange:d,children:(0,Je.jsxs)(Xe,{children:[(0,Je.jsx)(ft,{children:(0,Je.jsx)(gt,{children:"Add New Customer"})}),(0,Je.jsx)(on,{onSubmit:y})]})})]})}function sn({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:l,calculateWeightedValue:n,addNewDeal:c,onAddCustomer:u}){let[d,p]=(0,Zo.useState)(!1);return(0,Je.jsxs)("div",{className:"flex flex-col w-80",children:[(0,Je.jsx)("h2",{className:"text-Je font-semibold mb-4",children:e}),c&&(0,Je.jsxs)(tt,{open:d,onOpenChange:p,children:[(0,Je.jsx)(mr,{asChild:!0,children:(0,Je.jsxs)(D,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,Je.jsx)($n.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,Je.jsxs)(Xe,{children:[(0,Je.jsx)(ft,{children:(0,Je.jsx)(gt,{children:"Add New Deal"})}),(0,Je.jsx)(rn,{customers:o,users:a,categories:r,onSubmit:c,onAddCustomer:u,onClose:()=>p(!1)})]})]}),(0,Je.jsx)(Qr.Droppable,{droppableId:e,isDropDisabled:!1,children:g=>(0,Je.jsxs)("div",{ref:g.innerRef,...g.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((f,b)=>(0,Je.jsx)(Qr.Draggable,{draggableId:f.id.toString(),index:f.id,children:m=>(0,Je.jsx)("div",{ref:m.innerRef,...m.draggableProps,...m.dragHandleProps,children:(0,Je.jsx)(an,{deal:f,customer:f.customer,categories:r,onClick:()=>s(f)})})},f.id.toString())),g.placeholder]})}),(0,Je.jsxs)("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,Je.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Je.jsxs)("span",{className:"text-green-600",children:["\xA3",l(t).toLocaleString()]})]}),(0,Je.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Je.jsxs)("span",{className:"text-blue-600",children:["\xA3",n(t,e).toLocaleString()]})]})]})]})}var Sp=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function Tp({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){var p;let[s,l]=(0,Zo.useState)(null),n=g=>{var f;return((f=e.deals)!=null?f:[]).filter(b=>b.status===g)},c=g=>g.reduce((f,b)=>f+(b.value||0),0),u=(g,f)=>{let b={Cold:.2,Qualified:.4,"Proposal Made":.6,"SoW Submitted":.7,Won:1,Lost:0};return g.reduce((m,y)=>m+(y.value||0)*b[f],0)},d=(0,Zo.useCallback)(g=>{var ee,fe;let{source:f,destination:b}=g;if(!b||f.droppableId===b.droppableId&&f.index===b.index)return;let m=f.droppableId,y=b.droppableId,w=(ee=e.deals)==null?void 0:ee.filter(ze=>ze.id===f.index)[0],G=[...(fe=e.deals)!=null?fe:[]];w&&(w.status=y,a(w))},[a]);return(0,Je.jsx)(Qr.DragDropContext,{onDragEnd:d,children:(0,Je.jsxs)("div",{className:"p-4 max-h-[90vh] overflow-auto",children:[(0,Je.jsx)("div",{className:"flex space-Je-4 pb-4",children:Sp.filter(g=>g!=="Won"&&g!=="Lost").map(g=>{var b,m;let f=n(g);return(0,Je.jsx)(sn,{status:g,deals:f,customers:(b=e.customers)!=null?b:[],users:e.users,categories:(m=e.categories)!=null?m:[],onDealClick:l,calculateColumnValue:c,calculateWeightedValue:u,addNewDeal:g==="Cold"?t:void 0,onAddCustomer:r},g)})}),s&&(0,Je.jsx)(tn,{deal:s,users:e.users,customer:s.customer,categories:(p=e.categories)!=null?p:[],onClose:()=>l(null),onSave:a,onAddComment:g=>o(s.id.toString(),g)})]})})}0&&(module.exports={Alert,AlertDescription,AlertTitle,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,Card,Categories,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,Container,ContentBlock,ContentCard,CopyButton,CustomLink,CustomerCard,DarkTop,DealCard,DealDetails,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,Filter,FlowPrintable,Footer,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanColumn,Label,LightTop,Logo,LowImpactHero,MOTD,Mask,Media,MediaBlock,MediumImpactHero,NewCustomerForm,NewDealForm,NewsGrid,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadPagination,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,Printable,ProjectCard,ProjectTeam,ProposalSummary,RelatedContent,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarLeft,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarRight,SidebarSeparator,SidebarTrigger,SimpleHeader,Skeleton,SlideShow,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,toggleVariants,useIsMobile,useSidebar,useToast});
|