cortex-react-components 1.57.10 → 1.57.12

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.
Files changed (160) hide show
  1. package/dist/chunk-2NB62AHN.mjs +1 -0
  2. package/dist/{chunk-KEE2V4EL.mjs → chunk-2OBJ2XBF.mjs} +1 -1
  3. package/dist/{chunk-FZPMDY6M.mjs → chunk-34HO5VLY.mjs} +1 -1
  4. package/dist/{chunk-6YWAX7NS.mjs → chunk-3GYJDXNA.mjs} +1 -1
  5. package/dist/{chunk-57YERGED.mjs → chunk-3KAKEHMV.mjs} +1 -1
  6. package/dist/{chunk-5PISVFWK.mjs → chunk-3Z6DIZMR.mjs} +1 -1
  7. package/dist/chunk-466MOEEP.mjs +4 -0
  8. package/dist/{chunk-DT6YT6LE.mjs → chunk-4J7K65LS.mjs} +1 -1
  9. package/dist/{chunk-GHWZZAOE.mjs → chunk-7F7S63JI.mjs} +1 -1
  10. package/dist/{chunk-3BBZH3T3.mjs → chunk-7IZ2X75V.mjs} +1 -1
  11. package/dist/{chunk-IYWEEFR4.mjs → chunk-BYVWBEWQ.mjs} +1 -1
  12. package/dist/{chunk-ICKMUS6D.mjs → chunk-CHCARJTF.mjs} +1 -1
  13. package/dist/{chunk-SP6YCTLD.mjs → chunk-CJMWAH7C.mjs} +1 -1
  14. package/dist/{chunk-3JBSB22N.mjs → chunk-DUYFR7BN.mjs} +1 -1
  15. package/dist/{chunk-QLCCMHCI.mjs → chunk-DZAMK735.mjs} +1 -1
  16. package/dist/{chunk-5AOTUGTY.mjs → chunk-FO4JQMF6.mjs} +1 -1
  17. package/dist/{chunk-VJY7XPWL.mjs → chunk-GTYFC5BD.mjs} +1 -1
  18. package/dist/{chunk-2SU53XDR.mjs → chunk-GYUMEOL2.mjs} +1 -1
  19. package/dist/{chunk-OMKNW65S.mjs → chunk-HA3UNFOE.mjs} +1 -1
  20. package/dist/{chunk-OCXU6DZY.mjs → chunk-HDTY4G45.mjs} +1 -1
  21. package/dist/{chunk-2IKC7MAP.mjs → chunk-KB6PO4K4.mjs} +1 -1
  22. package/dist/{chunk-23BDC5JG.mjs → chunk-KIICLHKI.mjs} +1 -1
  23. package/dist/{chunk-DFB6DJCW.mjs → chunk-KQJLOUAU.mjs} +1 -1
  24. package/dist/{chunk-MK7B5OWM.mjs → chunk-KQOUC75G.mjs} +1 -1
  25. package/dist/{chunk-6R3XIKZA.mjs → chunk-LGHVM5IZ.mjs} +1 -1
  26. package/dist/{chunk-S7I4XJS6.mjs → chunk-LLJZRF3C.mjs} +1 -1
  27. package/dist/{chunk-7KGKA366.mjs → chunk-NFKHGNX5.mjs} +1 -1
  28. package/dist/{chunk-UTGGSGFH.mjs → chunk-NXNTWIJS.mjs} +1 -1
  29. package/dist/{chunk-PL4CLAKM.mjs → chunk-OSVNMQXM.mjs} +1 -1
  30. package/dist/{chunk-PIM2JQYT.mjs → chunk-OUKKI47A.mjs} +1 -1
  31. package/dist/{chunk-JJQETKKL.mjs → chunk-OVHU5KVD.mjs} +1 -1
  32. package/dist/{chunk-QMFZRG7O.mjs → chunk-PY53YVFX.mjs} +1 -1
  33. package/dist/{chunk-F55C2C5H.mjs → chunk-RQ23CZK5.mjs} +1 -1
  34. package/dist/{chunk-KZ2YZVEU.mjs → chunk-S5JFXQLZ.mjs} +1 -1
  35. package/dist/{chunk-IO222G5L.mjs → chunk-SBAFXZVU.mjs} +1 -1
  36. package/dist/{chunk-D44ZXHH4.mjs → chunk-T4I5D4XZ.mjs} +1 -1
  37. package/dist/{chunk-LPUZFFQN.mjs → chunk-VKYDAH7Y.mjs} +1 -1
  38. package/dist/{chunk-F2FWXTP2.mjs → chunk-YTQXBSBR.mjs} +1 -1
  39. package/dist/{chunk-4TCLIMFP.mjs → chunk-Z7P4QOKT.mjs} +1 -1
  40. package/dist/{chunk-YUJMW5S2.mjs → chunk-ZKKFZHS3.mjs} +1 -1
  41. package/dist/components/Blocks/Banner.mjs +1 -1
  42. package/dist/components/Blocks/CallToAction.mjs +1 -1
  43. package/dist/components/Blocks/CallToAction.stories.mjs +1 -1
  44. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  45. package/dist/components/Blocks/CollapsibleArea.stories.mjs +1 -1
  46. package/dist/components/Blocks/Content.mjs +1 -1
  47. package/dist/components/Blocks/Content.stories.mjs +1 -1
  48. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  49. package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
  50. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  51. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  52. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  53. package/dist/components/Blocks/index.mjs +1 -1
  54. package/dist/components/CRM/DealDetails.mjs +1 -1
  55. package/dist/components/CRM/DealDetails.stories.mjs +1 -1
  56. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  57. package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
  58. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  59. package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
  60. package/dist/components/CRM/NewDealForm.mjs +1 -1
  61. package/dist/components/CRM/NewDealForm.stories.mjs +1 -1
  62. package/dist/components/CRM/index.mjs +1 -1
  63. package/dist/components/Cards/ContentCard.mjs +1 -1
  64. package/dist/components/Cards/ContentCard.stories.mjs +1 -1
  65. package/dist/components/Cards/FeatureCard.mjs +1 -1
  66. package/dist/components/Cards/FeatureCard.stories.mjs +1 -1
  67. package/dist/components/Cards/index.mjs +1 -1
  68. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  69. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  70. package/dist/components/DigitalColleagues/MainPage.stories.mjs +1 -1
  71. package/dist/components/HeaderFooter/Header.mjs +1 -1
  72. package/dist/components/HeaderFooter/Header.stories.mjs +1 -1
  73. package/dist/components/HeaderFooter/SectionHeading.js +1 -1
  74. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  75. package/dist/components/HeaderFooter/index.mjs +1 -1
  76. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  77. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  78. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  79. package/dist/components/Heros/PostHero/index.mjs +1 -1
  80. package/dist/components/Heros/RenderHero.mjs +1 -1
  81. package/dist/components/Heros/index.mjs +1 -1
  82. package/dist/components/Layouts/FeatureGrid.stories.mjs +1 -1
  83. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  84. package/dist/components/Layouts/Print.mjs +1 -1
  85. package/dist/components/Layouts/Print.stories.mjs +1 -1
  86. package/dist/components/Layouts/SlideShow.mjs +1 -1
  87. package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
  88. package/dist/components/Layouts/index.mjs +1 -1
  89. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  90. package/dist/components/Menus/SidebarLeft.stories.mjs +1 -1
  91. package/dist/components/Menus/SidebarRight.mjs +1 -1
  92. package/dist/components/Menus/SidebarRight.stories.mjs +1 -1
  93. package/dist/components/Menus/index.mjs +1 -1
  94. package/dist/components/Payload/RichText/index.mjs +1 -1
  95. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  96. package/dist/components/Payload/RichText.stories.mjs +1 -1
  97. package/dist/components/Payload/index.mjs +1 -1
  98. package/dist/components/index.mjs +1 -1
  99. package/dist/components/ui/index.mjs +1 -1
  100. package/dist/components/ui/sidebar.mjs +1 -1
  101. package/dist/index.js +2 -2
  102. package/dist/index.mjs +1 -1
  103. package/dist/metafile-cjs.json +1 -1
  104. package/dist/metafile-esm.json +1 -1
  105. package/dist/pages/Blog.mjs +1 -1
  106. package/dist/pages/Blog.stories.mjs +1 -1
  107. package/dist/pages/Documentation.mjs +1 -1
  108. package/dist/pages/Documentation.stories.mjs +1 -1
  109. package/dist/pages/IndexPage.mjs +1 -1
  110. package/dist/pages/IndexPage.stories.mjs +1 -1
  111. package/dist/pages/Intranet.mjs +1 -1
  112. package/dist/pages/Intranet.stories.mjs +1 -1
  113. package/dist/pages/LandingPage.js +1 -1
  114. package/dist/pages/LandingPage.mjs +1 -1
  115. package/dist/pages/LandingPage.stories.js +1 -1
  116. package/dist/pages/LandingPage.stories.mjs +1 -1
  117. package/dist/pages/Page.mjs +1 -1
  118. package/dist/pages/Page.stories.mjs +1 -1
  119. package/dist/pages/Printable.stories.mjs +1 -1
  120. package/dist/pages/Publish.mjs +1 -1
  121. package/dist/pages/Publish.stories.mjs +1 -1
  122. package/dist/pages/Website.mjs +1 -1
  123. package/dist/pages/Website.stories.mjs +1 -1
  124. package/dist/sections/AboutSection.js +1 -1
  125. package/dist/sections/AboutSection.mjs +1 -1
  126. package/dist/sections/AboutSection.stories.js +1 -1
  127. package/dist/sections/AboutSection.stories.mjs +1 -1
  128. package/dist/sections/BlogDetail.mjs +1 -1
  129. package/dist/sections/BlogDetail.stories.mjs +1 -1
  130. package/dist/sections/BlogList.js +1 -1
  131. package/dist/sections/BlogList.mjs +1 -1
  132. package/dist/sections/BlogList.stories.js +1 -1
  133. package/dist/sections/BlogList.stories.mjs +1 -1
  134. package/dist/sections/BlogListSection.mjs +1 -1
  135. package/dist/sections/BlogListSection.stories.mjs +1 -1
  136. package/dist/sections/ContactSection.js +1 -1
  137. package/dist/sections/ContactSection.mjs +1 -1
  138. package/dist/sections/ContactSection.stories.js +1 -1
  139. package/dist/sections/ContactSection.stories.mjs +1 -1
  140. package/dist/sections/ImageSection.stories.mjs +1 -1
  141. package/dist/sections/PageSections.js +1 -1
  142. package/dist/sections/PageSections.mjs +1 -1
  143. package/dist/sections/PageSections.stories.js +1 -1
  144. package/dist/sections/PageSections.stories.mjs +1 -1
  145. package/dist/sections/PricingSection.js +1 -1
  146. package/dist/sections/PricingSection.mjs +1 -1
  147. package/dist/sections/PricingSection.stories.js +1 -1
  148. package/dist/sections/PricingSection.stories.mjs +1 -1
  149. package/dist/sections/ServiceDetailList.js +1 -1
  150. package/dist/sections/ServiceDetailList.mjs +1 -1
  151. package/dist/sections/ServiceDetailSection.mjs +1 -1
  152. package/dist/sections/ServiceDetailSection.stories.mjs +1 -1
  153. package/dist/sections/ServiceSection.mjs +1 -1
  154. package/dist/sections/ServiceSection.stories.mjs +1 -1
  155. package/dist/sections/form/index.mjs +1 -1
  156. package/dist/sections/index.js +2 -2
  157. package/dist/sections/index.mjs +1 -1
  158. package/package.json +1 -1
  159. package/dist/chunk-3DQRDWIQ.mjs +0 -4
  160. package/dist/chunk-D3CFJ7EO.mjs +0 -1
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@
15
15
  dark bg-background text-primary`,children:[(0,Dt.jsxs)("div",{className:"flex px-6 items-center space-Dt-2",children:[e&&(0,Dt.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Dt.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Dt.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]}),Rr=({title:e})=>(0,Dt.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,Dt.jsx)("div",{className:"container",children:(0,Dt.jsx)("span",{className:"container text-4xl px-6",children:e})})}),Tr=e=>{var r,s;let{title:t,hero:a,logoImage:o}=e;return(0,Dt.jsxs)("div",{className:"relative w-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[(0,Dt.jsx)("div",{className:"absolute inset-0",children:(0,Dt.jsx)(hn.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,Dt.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,Dt.jsx)("div",{className:"h-24",children:(0,Dt.jsx)(hn.default,{src:o.src,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})})}),(0,Dt.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,Dt.jsxs)("div",{className:"relative pl-24 z-10 max-w-3xl",children:[(0,Dt.jsx)("p",{className:"text-lg font-medium pt-48 text-accent mb-2",children:t}),a.richText&&(0,Dt.jsx)(q,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var Ps=e=>{let[t,a]=(0,ml.useState)(0),{blocks:o,hero:r,logoImage:s}=e,i=o&&Array.isArray(o)&&o.length>0,c=[{kl:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],m=f=>{a(f)},d=()=>{a(f=>(f+1)%c.length)},p=()=>{a(f=>(f-1+c.length)%c.length)},g=(0,ml.useCallback)(((f,h)=>{let k;return(...T)=>{clearTimeout(k),k=setTimeout(()=>f(...T),h)}})(f=>{f.deltaY>0?d():p()},300),[]),v=f=>{f.key==="ArrowDown"?d():f.key==="ArrowUp"&&p()};return(0,ml.useEffect)(()=>(window.addEventListener("wheel",g),window.addEventListener("keydown",v),()=>{window.removeEventListener("wheel",g),window.removeEventListener("keydown",v)}),[]),(0,Dt.jsxs)("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[(0,Dt.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:i&&c.map((f,h)=>(0,Dt.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===h?"bg-accent":"bg-gray-600"}`,onClick:()=>m(h),children:(0,Dt.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-Dt-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-Dt-2 transition-all duration-300",children:f.blockName})},f.kl))}),(0,Dt.jsx)(Wo.AnimatePresence,{children:c.map((f,h)=>(0,Dt.jsx)("div",{kl:`slide-${h}`,className:"print-section",children:(0,Dt.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
16
16
  ${h===t?"opacity-100":"opacity-0"}
17
17
  w-full h-full bg-cover bg-center`,children:h===0?(0,Dt.jsx)(Tr,{hero:r,title:e.title,logoImage:s}):(0,Dt.jsxs)(Dt.Fragment,{children:[f.blockName&&(0,Dt.jsx)(Rr,{title:f.blockName}),(0,Dt.jsx)(ho,{blocks:[f],fill:!0}),(0,Dt.jsx)(pc,{logoImage:s})]})})},h))}),(0,Dt.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,Dt.jsx)(lu,{})})]})},lu=()=>(0,Dt.jsx)(Wo.AnimatePresence,{children:(0,Dt.jsx)(Wo.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:l("w-fit min-h-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,Dt.jsx)(Wo.motion.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:l("w-[12px] h-[12px] rounded-full","bg-accent")})})});var uc=y(require("next/link")),fc=y(require("next/image"));function gc({blogs:e,width:t=3}){return(0,Dt.jsx)("div",{className:"w-full max-w-7xl mx-auto px-4 py-8",children:(0,Dt.jsx)("div",{className:`grid md:grid-cols-2 lg:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>{var r;return(0,Dt.jsx)(uc.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,Dt.jsxs)("div",{className:"relative size-full",children:[(0,Dt.jsx)(fc.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,Dt.jsxs)("div",{className:"absolute inset-0 px-4 pb-2 bg-gradient-Dt-t from-card Dt-transparrent flex flex-col justify-end",children:[(0,Dt.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,Dt.jsx)("h2",{className:"text-xl font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o)})})})}function bc({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:r,images:s,raisedAmount:i,companiesCount:n,dealsClosed:c,leadsGenerated:m}){return(0,Dt.jsx)("div",{className:"overflow-hidden bg-white py-24 sm:py-32",children:(0,Dt.jsxs)("div",{className:"mx-auto max-w-2xl px-6 lg:max-w-7xl lg:px-8",children:[(0,Dt.jsxs)("div",{className:"max-w-4xl",children:[(0,Dt.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,Dt.jsx)("h1",{className:"mt-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:text-5xl",children:e}),(0,Dt.jsx)("p",{className:"mt-6 text-balance text-xl/8 text-gray-700",children:a})]}),(0,Dt.jsxs)("section",{className:"mt-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-Dt-8 lg:gap-y-16",children:[(0,Dt.jsxs)("div",{className:"lg:pr-8",children:[(0,Dt.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,Dt.jsx)("p",{className:"mt-6 text-base/7 text-gray-600",children:r})]}),(0,Dt.jsx)("div",{className:"pt-16 lg:row-span-2 lg:-mr-16 xl:mr-auto",children:(0,Dt.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 xl:gap-8",children:s.map((d,p)=>(0,Dt.jsx)("div",{className:"aspect-square overflow-hidden rounded-xl shadow-xl outline-1 -outline-offset-1 outline-black/10",children:(0,Dt.jsx)("img",{alt:"",src:d,className:"block size-full object-cover"})},p))})}),(0,Dt.jsxs)("div",{className:"max-lg:mt-16 lg:col-span-1",children:[(0,Dt.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,Dt.jsx)("hr",{className:"mt-6 border-t border-gray-200"}),(0,Dt.jsxs)("dl",{className:"mt-6 grid grid-cols-1 gap-Dt-8 gap-y-4 sm:grid-cols-2",children:[(0,Dt.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 pb-4",children:[(0,Dt.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Raised"}),(0,Dt.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",i]})]}),(0,Dt.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 pb-4",children:[(0,Dt.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Companies"}),(0,Dt.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[n,"Dt"]})]}),(0,Dt.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,Dt.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Deals Closed"}),(0,Dt.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"Dt"]})]}),(0,Dt.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,Dt.jsx)("dt",{className:"text-sm/6 text-gray-600",children:"Leads Generated"}),(0,Dt.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[m,"Dt"]})]})]})]})]})]})})}function du(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 Xo=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)},yn=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,Dt.jsx)(vc,{page:e,layout:t,logoImage:a}):(0,Dt.jsx)(hc,{page:e,layout:t,logoImage:a}),vc=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=Mo(e),r=(0,ml.useRef)(null),s=(0,ml.useRef)(null),i=(0,ml.useRef)(new kh.Previewer),n={kl:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,ml.useEffect)(()=>{let d=document.getElementById("printable-content");if(d){let p=document.createElement("style");return p.textContent=`@page { size: ${Xo(d.offsetWidth)}oc ${Xo(d.offsetHeight)}oc ; margin: 0mm; width: ${Xo(d.offsetWidth)}oc }; .container : { max-width: ${Xo(d.offsetWidth)}oc; } .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,ml.useCallback)(()=>{if(!s.current)return;s.current&&(s.current.innerHTML="");let d=document.getElementById("printable-content");d&&i.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${Xo(d.offsetWidth)}oc ${Xo(d.offsetHeight)}oc ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],s.current).catch(p=>console.error("Paged.js error:",p))},[t]);(0,ml.useEffect)(()=>{i.current=new kh.Previewer},[c,t]);let m=[n,...o];return(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("div",{className:"w-[1123px] print:w-[1123px]",children:(0,Dt.jsxs)("div",{kl:"printable-content",ref:r,children:[m.map((d,p)=>(0,Dt.jsx)(Dt.Fragment,{children:p===0?(0,Dt.jsx)("section",{className:"title-page w-full h-full",children:(0,Dt.jsx)(Tr,{hero:e.hero,title:e.title})},p):(0,Dt.jsxs)("section",{className:"normal-page overflow-hidden",children:[d.blockName&&(0,Dt.jsx)(Rr,{title:d.blockName}),(0,Dt.jsx)(ho,{blocks:[d],fill:!0})]},p)})),(0,Dt.jsx)("section",{className:"normal-page",children:(0,Dt.jsxs)("div",{className:`w-full py-2 px-8 flex justify-between items-center
18
- dark bg-background text-primary`,children:[(0,Dt.jsxs)("div",{className:"flex px-6 items-center space-Dt-2",children:[a&&(0,Dt.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Dt.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Dt.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Dt.jsx)("div",{ref:s,className:"preview-container"})]})},hc=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=Mo(e),o=(0,ml.useRef)(null),r=(0,ml.useRef)(null),s=(0,ml.useRef)(new kh.Previewer),[i,n]=(0,ml.useState)(0),m=[{kl:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,ml.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,ml.useEffect)(()=>{s.current=new kh.Previewer,d()},[d,t]),(0,ml.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,Dt.jsxs)("div",{className:"pagedjs-container",children:[(0,Dt.jsx)("div",{kl:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:m.map((p,u)=>{var g,v;return(0,Dt.jsx)(Dt.Fragment,{children:u===0?(0,Dt.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,Dt.jsx)(Tr,{hero:e.hero,title:e.title})},u):(0,Dt.jsxs)("section",{className:l("pagedjs-section normal-page h-[699px]",`h-[${du("185mm")}px]`,((v=(g=p.theme)==null?void 0:g.settings)==null?void 0:v.theme)==="dark"?"dark":"light"),children:[p.blockName&&(0,Dt.jsx)(Rr,{title:p.blockName}),(0,Dt.jsx)(ho,{blocks:[p],fill:!0})]},u)})})}),(0,Dt.jsx)("div",{ref:o,className:"preview-container"})]})};var xn=y(require("clsx"));function cu({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:i,loading:n=!1,LinkComponent:c,...m}){let p=c?u=>(0,Dt.jsx)(c,{...u}):i?({href:u,children:g,...v})=>(0,Dt.jsx)("button",{onClick:()=>i&&i(u),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...v,children:g}):u=>(0,Dt.jsx)("a",{...u});return(0,Dt.jsxs)(ao,{...m,variant:"inset",children:[(0,Dt.jsx)(oo,{children:(0,Dt.jsx)(ft,{children:(0,Dt.jsx)(Xe,{children:n?(0,Dt.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Dt.jsx)(ke,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Dt.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Dt.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Dt.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),n&&(0,Dt.jsxs)(Ea,{children:[(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Dt.jsxs)(Ea,{children:[e&&!n&&e.map((u,g)=>(0,Dt.jsx)(mu,{subNav:u,pathName:r,Link:p},g)),(0,Dt.jsx)(Mt,{className:"mt-auto",children:(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(ft,{children:t&&!n&&t.map(u=>(0,Dt.jsx)(Xe,{children:(0,Dt.jsx)(At,{asChild:!0,size:"sm",children:(0,Dt.jsxs)(p,{href:u.url||"",children:[u.icon&&(0,Dt.jsx)(u.icon,{}),(0,Dt.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,Dt.jsx)(ro,{})]})}function mu({subNav:e,pathName:t,Link:a}){var s,i;let o=e,r=!1;return o.links&&o.links.map(n=>{n.url===t&&(r=!0)}),(0,Dt.jsx)(da,{defaultOpen:!0,className:"group/collapsible",children:(0,Dt.jsx)(Mt,{className:"py-0",children:(0,Dt.jsx)(ft,{children:(0,Dt.jsx)(da,{asChild:!0,defaultOpen:o.isActive,children:(0,Dt.jsxs)(Xe,{children:[(0,Dt.jsx)(At,{asChild:!0,tooltip:o.label,className:(0,xn.default)(r&&"font-bold text-accent"),children:(0,Dt.jsxs)(a,{href:o.url,children:[o.icon&&(0,Dt.jsx)(o.icon,{}),(0,Dt.jsx)("span",{children:o.label})]})}),(s=o.links)!=null&&s.length?(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(Ia,{asChild:!0,children:(0,Dt.jsxs)(dr,{className:"data-[state=open]:rotate-90",children:[(0,Dt.jsx)(El.ChevronRight,{}),(0,Dt.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Dt.jsx)(La,{children:(0,Dt.jsx)(za,{children:(i=o.links)==null?void 0:i.map(n=>(0,Dt.jsx)(Ha,{children:(0,Dt.jsx)(Fa,{asChild:!0,className:(0,xn.default)(n.url===t&&"font-bold text-accent"),children:(0,Dt.jsx)(a,{href:n.url,children:(0,Dt.jsx)("span",{children:n.label})})})},n.label))})})]}):null]})},o.label)})})})}var xc=y(require("clsx"));var pu=()=>(0,Dt.jsx)(Ye,{iconName:"github",size:"10x"});function uu({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:i,onPrintDocument:n,onGithubClick:c,onNavClick:m,LinkComponent:d,...p}){let v=d?f=>(0,Dt.jsx)(d,{...f}):m?({item:f,children:h,...k})=>(0,Dt.jsx)("button",{onClick:()=>m&&m(f),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...k,children:h}):f=>(0,Dt.jsx)("a",{href:f.href,...f});return(0,Dt.jsxs)(ao,{side:"right",variant:"inset",...p,children:[(0,Dt.jsxs)(oo,{className:"border-b border-sidebar-border",children:[(0,Dt.jsxs)(ft,{className:"flex-row space-Dt-1",children:[(0,Dt.jsx)(Xe,{children:(0,Dt.jsxs)(At,{onClick:s,children:[(0,Dt.jsx)(El.FilePlus,{})," ",(0,Dt.jsx)("span",{children:"Add Document"})]})}),c&&(0,Dt.jsx)(Xe,{children:(0,Dt.jsx)(At,{onClick:c,tooltip:"Open in GitHub",children:(0,Dt.jsx)(pu,{})})})]}),(0,Dt.jsxs)(ft,{className:"flex-row space-Dt-1",children:[(0,Dt.jsx)(Xe,{className:"w-5/12",children:(0,Dt.jsxs)(At,{onClick:()=>i(),variant:r?"outline":"default",className:(0,xc.default)(r&&"text-accent"),children:[(0,Dt.jsx)(El.Edit,{})," ",(0,Dt.jsx)("span",{children:"Edit"})]})}),(0,Dt.jsx)(Xe,{className:"w-5/12",children:(0,Dt.jsxs)(At,{onClick:n,children:[(0,Dt.jsx)(El.Printer,{})," ",(0,Dt.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(da,{defaultOpen:!0,className:"group/collapsible",children:(0,Dt.jsxs)(Mt,{children:[(0,Dt.jsx)(ma,{asChild:!0,children:(0,Dt.jsxs)(Ia,{children:["Editor Controls",(0,Dt.jsx)(El.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(La,{children:a})})]})}),(0,Dt.jsx)(lr,{className:"mx-0"})]}),(0,Dt.jsxs)(Ea,{className:"overflow-auto",children:[o&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsxs)(Mt,{children:[(0,Dt.jsx)(ma,{children:"Related Content"}),(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(ft,{children:Array.from({length:3}).map((f,h)=>(0,Dt.jsx)(Xe,{children:(0,Dt.jsx)(ke,{className:"bg-gray-200 w-full h-10"})},h))})})]}),(0,Dt.jsxs)(Mt,{children:[(0,Dt.jsx)(ma,{children:"Table of Contents"}),(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(ft,{children:Array.from({length:3}).map((f,h)=>(0,Dt.jsx)(Xe,{children:(0,Dt.jsx)(ke,{className:"bg-gray-200 w-full h-10"})},h))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Dt.jsx)(da,{defaultOpen:!0,className:"group/collapsible",children:(0,Dt.jsxs)(Mt,{children:[(0,Dt.jsx)(ma,{asChild:!0,children:(0,Dt.jsxs)(Ia,{children:["Related Content",(0,Dt.jsx)(El.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(La,{children:(0,Dt.jsx)(ft,{children:e&&Object.keys(e).map(f=>(0,Dt.jsxs)(Xe,{children:[(0,Dt.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",f.charAt(0).toUpperCase()+f.slice(1)]}),f&&e[f]&&(0,Dt.jsx)(za,{children:e[f].map(h=>(0,Dt.jsx)(Ha,{children:(0,Dt.jsx)(Fa,{asChild:!0,isActive:!1,size:"sm",children:(0,Dt.jsxs)(v,{href:h.url,item:h,className:"flex justify-between items-center w-full text-xs",children:[(0,Dt.jsx)("span",{children:h.label}),h.type==="note"&&(0,Dt.jsx)(El.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),h.type==="draft"&&(0,Dt.jsx)(Ye,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},h.label))})]},f))})})})]})}),t&&!o&&(0,Dt.jsx)(da,{defaultOpen:!0,className:"group/collapsible",children:(0,Dt.jsxs)(Mt,{children:[(0,Dt.jsx)(ma,{asChild:!0,children:(0,Dt.jsxs)(Ia,{children:["Table of Contents",(0,Dt.jsx)(El.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(La,{children:(0,Dt.jsx)(ft,{children:t.map(f=>{var h;return(0,Dt.jsxs)(Xe,{children:[(0,Dt.jsx)(At,{asChild:!0,children:(0,Dt.jsx)("a",{href:`#${f.url}`,className:"text-xs",children:f.title})}),(h=f.items)!=null&&h.length?(0,Dt.jsx)(za,{children:f.items.map(k=>(0,Dt.jsx)(Ha,{children:(0,Dt.jsx)(Fa,{asChild:!0,isActive:k.isActive,size:"sm",children:(0,Dt.jsx)("a",{href:`#${k.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,Dt.jsx)("span",{children:k.title})})})},k.title))}):null]},f.title)})})})})]})})]}),(0,Dt.jsx)(ro,{})]})}var Nc=y(require("next/image"));function fu({title:e,members:t}){return(0,Dt.jsx)(Te,{className:"mb-6",children:(0,Dt.jsxs)("div",{className:"p-6",children:[(0,Dt.jsxs)("div",{className:"flex items-center mb-4",children:[(0,Dt.jsx)(El.Users,{className:"w-6 h-6 text-accent mr-2"}),(0,Dt.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:e})]}),(0,Dt.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-4",children:[(0,Dt.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,Dt.jsx)(Nc.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Cc=y(require("next/link"));var gu=({links:e,title:t="Related Content"})=>(0,Dt.jsxs)(Te,{children:[(0,Dt.jsx)(qe,{children:(0,Dt.jsx)(Ke,{className:"text-accent",children:t})}),(0,Dt.jsx)(Oe,{children:(0,Dt.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,Dt.jsxs)(Cc.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,Dt.jsx)(El.ExternalLink,{className:"ml-1 h-3 w-3"})]},o))})})]});var wn=l("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 Nn({pages:e}){let t=(0,oc.useSearchParams)(),a=(0,oc.usePathname)(),{replace:o}=(0,oc.useRouter)(),{totalPages:r,page:s}=e,[i,n]=(0,ml.useState)({start:s>3?s-3:1,end:s+2}),c=p=>{p==="left"&&i.start>1?n(u=>({start:u.start-1,end:u.end-1})):p==="right"&&i.end<r&&n(u=>({start:u.start+1,end:u.end+1}))};function m(p){let u=new URLSearchParams(t);p?u.set("page",p):u.delete("page"),o(`${a}?${u.toString()}`)}if(r<=1)return null;let d=[];for(let p=i.start;p<=i.end;p++)d.push(p);return(0,Dt.jsx)("div",{className:"mt-12",children:(0,Dt.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[i.start>1&&(0,Dt.jsx)("li",{children:(0,Dt.jsx)("button",{className:l(wn,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>c("left"),children:(0,Dt.jsx)(yd.FaArrowLeft,{})})}),d.map((p,u)=>(0,Dt.jsx)("li",{children:(0,Dt.jsx)("a",{className:l(wn,p===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:g=>{g.preventDefault(),m(p.toString())},children:p})},u)),i.end<r&&(0,Dt.jsx)("li",{children:(0,Dt.jsx)("button",{className:l(wn,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>c("right"),children:(0,Dt.jsx)(yd.FaArrowRight,{})})})]})})}var iy=l("transition-colors duration-400 hover:text-primary ease-in-out");function Cn({title:e,links:t}){let a=(0,oc.useSearchParams)(),o=(0,oc.usePathname)(),{replace:r}=(0,oc.useRouter)();function s(i){let n=new URLSearchParams(a);i?n.set("category",i):n.delete("category"),r(`${o}?${n.toString()}`)}return(0,Dt.jsxs)(Te,{children:[(0,Dt.jsx)(qe,{children:(0,Dt.jsx)(Ke,{className:"text-accent",children:e&&e})}),(0,Dt.jsx)(Oe,{children:t&&t.length>0&&(0,Dt.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Dt.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((i,n)=>(0,Dt.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(i.href)},children:[i.label,(0,Dt.jsx)(El.ExternalLink,{className:"ml-1 h-3 w-3"})]},n))})})})]})}function kn({types:e}){let[t,a]=(0,ml.useState)(e&&e[0].href),o=(0,oc.useSearchParams)(),r=(0,oc.usePathname)(),{replace:s}=(0,oc.useRouter)();function i(n){let c=new URLSearchParams(o);n?c.set("type",n):c.delete("type"),a(n),s(`${r}?${c.toString()}`)}return(0,Dt.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-Dt-auto pb-4 mb-6",children:e&&e.map((n,c)=>(0,Dt.jsx)(A,{variant:n.href===t?"default":"ghost",className:l("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:()=>i(n.href),children:n.label},c))})}var Ac=y(require("next/image"));function et({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=l("container",t&&"full-width",a&&"no-padding",o);return(0,Dt.jsx)("div",{className:r,children:e})}var Dc=require("next-themes");function bu({children:e,...t}){return(0,Dt.jsx)(Dc.ThemeProvider,{...t,children:e})}var it=({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,$.jsx)("div",{className:"w-full h-[1240px] z-20",children:(0,$.jsxs)("svg",{kl:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:l(t,"absolute -bottom-[2px] flex"),children:[(0,$.jsx)("defs",{children:(0,$.jsxs)("mask",{kl:"mask",children:[(0,$.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,$.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0","stroke-width":"2"})]})}),(0,$.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,$.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,$.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,$.jsxs)("svg",{kl:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:l(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,$.jsx)("defs",{children:(0,$.jsxs)("mask",{kl:"mask",children:[(0,$.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,$.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,$.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,$.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,$.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,$.jsxs)("svg",{kl:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:l(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,$.jsx)("defs",{children:(0,$.jsxs)("mask",{kl:"mask",children:[(0,$.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,$.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,$.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,$.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,$.jsx)("svg",{kl:"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:l(t,"w-full block overflow-hidden"),children:(0,$.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,$.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,$.jsx)("svg",{kl:"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:l(t,"w-full block overflow-hidden"),transform:a[3],children:(0,$.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,$.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,$.jsx)("svg",{kl:"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:l(t,"w-full block overflow-hidden"),children:(0,$.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},vu=({className:e})=>(0,$.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:l(e,"absolute w-full h-full"),children:[(0,$.jsx)("defs",{children:(0,$.jsxs)("mask",{kl:"mask",children:[(0,$.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,$.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,$.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Sn=({links:e,media:t,children:a,richText:o})=>(0,Dt.jsx)("div",{children:(0,Dt.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,Dt.jsxs)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,Dt.jsx)(q,{className:"max-w-none mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,Dt.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,Dt.jsx)("li",{children:(0,Dt.jsx)(Xt,{...r})},s))})]}),(0,Dt.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,Dt.jsx)(qt,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Dt.jsx)("div",{children:(0,Dt.jsx)(Ac.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Dt.jsx)("span",{className:"absolute inset-0 bg-gradient-Dt-b from-white dark:from-black"})]}),(0,Dt.jsx)(it,{className:"text-black z-10",position:"header"})]})});var Rn=y(require("next/image"));var hu=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,Dt.jsx)(Rn.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,Dt.jsx)("div",{children:(0,Dt.jsx)(Rn.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},Tn=({links:e,media:t,children:a,richText:o})=>(0,Dt.jsxs)("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&(0,Dt.jsx)(hu,{media:t}),(0,Dt.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,Dt.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Dt.jsx)(q,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var Dn=({children:e,richText:t})=>(0,Dt.jsx)("div",{className:"min-w-full py-10 bg-muted mt-24",children:(0,Dt.jsx)("div",{className:"container",children:e||t&&(0,Dt.jsx)(q,{content:t,enableGutter:!1})})});var Lc=y(require("react")),Bc=y(require("next/image"));var Ic=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,i=r<10?`0${r}`:r,n=a.getFullYear();return`${i}/${s}/${n}`};var Rs=e=>{let t=e?new Date(e):new Date,a=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(t),o=t.getDate(),r=new Intl.DateTimeFormat("en-US",{month:"short"}).format(t);return`${a} ${o}${(i=>{if(i>3&&i<21)return"th";switch(i%10){case 1:return"Dt";case 2:return"Dt";case 3:return"rd";default:return"th"}})(o)} ${r}`};var yu=({post:e})=>{var i;let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,Dt.jsxs)("div",{className:"relative grid pt-24",children:[(0,Dt.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,Dt.jsxs)("div",{className:"container mx-auto",children:[(0,Dt.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,Dt.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,Dt.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Dt.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Dt.jsx)("p",{children:o.map((n,c)=>(0,Dt.jsxs)(Lc.default.Fragment,{children:[n.name,c<o.length-2&&", ",c===o.length-2&&(o.length>2?", and ":" and ")]},n.kl))})]}),r&&(0,Dt.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Dt.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Dt.jsx)("time",{dateTime:r,children:Ic(r)})]}),t&&t.length>0&&(0,Dt.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Dt.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Dt.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,c)=>typeof n=="object"&&n!==null&&(0,Dt.jsx)(Bt,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.kl||c))})]})]})]})}),(0,Dt.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,Dt.jsx)(Bc.default,{className:"object-cover",alt:`Cover image for ${s}`,src:((i=a==null?void 0:a.image)==null?void 0:i.url)||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,Dt.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-Dt-t from-background dark:from-black Dt-transparent"})]})]})};var Ts=require("@heroicons/react/20/solid");var Mn=y(require("next/image"));var An=({title:e,image:t})=>(0,Dt.jsx)("div",{children:(0,Dt.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,Dt.jsx)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-start",children:(0,Dt.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,Dt.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,Dt.jsx)(Mn.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,Dt.jsx)("div",{children:(0,Dt.jsx)(Mn.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Dt.jsx)("span",{className:"absolute inset-0 bg-gradient-Dt-b from-white dark:from-black"})]}),(0,Dt.jsx)(it,{className:"text-black z-10",position:"header"})]})});var xu={highImpact:Sn,lowImpact:Dn,mediumImpact:Tn,sectionHero:An},wu=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=xu[t];return a?(0,$e.jsx)(a,{...e}):null};function Nu({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,$e.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,$e.jsxs)("ol",{role:"list",className:"flex items-center space-Dt-4",children:[(0,$e.jsx)("li",{children:(0,$e.jsx)("div",{children:(0,$e.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,$e.jsx)(Ts.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,$e.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,$e.jsx)("li",{children:(0,$e.jsxs)("div",{className:"flex items-center",children:[(0,$e.jsx)(Ts.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,$e.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,$e.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,$e.jsx)($e.Fragment,{})}var kt=require("@headlessui/react"),As=require("@heroicons/react/24/outline");var Cu=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Dt.jsx)("a",{href:o,className:"flex items-center gap-Dt-1 text-sm text-foreground group",children:(0,Dt.jsxs)("span",{className:"relative",children:[e,(0,Dt.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-Dt-1/2 scale-Dt-0 transition-transform duration-300 ease-in-out group-hover:scale-Dt-100"})]})}):(0,Dt.jsxs)(kt.Popover,{children:[(0,Dt.jsxs)(kt.PopoverButton,{className:"flex items-center gap-Dt-1 text-sm/6 text-foreground outline-none group",children:[(0,Dt.jsxs)("span",{className:"relative",children:[e,(0,Dt.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-Dt-1/2 scale-Dt-0 transition-transform duration-300 ease-in-out group-hover:scale-Dt-100"})]}),(0,Dt.jsx)(Ts.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,Dt.jsxs)(kt.PopoverPanel,{transition:!0,className:"absolute inset-Dt-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,Dt.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-Dt-4 px-6 py-10 lg:px-8 xl:gap-Dt-8 z-50",children:t&&t.map(r=>(0,Dt.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Dt.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,Dt.jsx)(Ec,{icon:r.icon,size:"4x"})}),(0,Dt.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Dt.jsx)("span",{className:"absolute inset-0"})]}),(0,Dt.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Dt.jsx)("div",{className:"bg-gray-50",children:(0,Dt.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Dt.jsx)("div",{className:"grid grid-cols-3 divide-Dt divide-gray-900/5 border-Dt border-gray-900/5",children:a.map(r=>(0,Dt.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-Dt-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Dt.jsx)(Ec,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Ec=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Dt.jsx)(Ye,{...e,size:a});if("src"in e)return(0,Dt.jsx)("div",{className:l(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Dt.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Ds=Cu;var Ms=["light","dark","green"];function Pu({title:e,logo:t,menuItems:a}){let[o,r]=(0,ml.useState)(!1),[s,i]=(0,ml.useState)(!1),[n,c]=(0,ml.useState)("light"),m=t==null?void 0:t.split(".")[0],d=t==null?void 0:t.split(".")[1],[p,u]=(0,ml.useState)(`${m}.${d}`),g=f=>{Ms.includes(f)?u(f==="light"?`${m}.${d}`:`${m}-${f}.${d}`):u(`${m}.${d}`)};(0,ml.useEffect)(()=>{let f=localStorage.getItem("theme")||"light";c(f),document.documentElement.setAttribute("class",f),g(f)},[]);let v=()=>{let f=Ms[(Ms.indexOf(n)+1)%Ms.length];c(f),document.documentElement.setAttribute("class",f),localStorage.setItem("theme",f),g(f)};return(0,Dt.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,Dt.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Dt.jsx)("div",{className:"flex lg:flex-1",children:(0,Dt.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Dt.jsx)("span",{className:"sr-only",children:e}),(0,Dt.jsx)("img",{alt:e,src:p,className:"h-9 w-auto"})]})}),(0,Dt.jsx)("div",{className:"flex lg:hidden",children:(0,Dt.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,Dt.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Dt.jsx)(As.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,Dt.jsx)(kt.PopoverGroup,{className:"hidden lg:flex lg:gap-Dt-12",children:a.map(f=>(0,Dt.jsx)(Ds,{...f},f.name))}),(0,Dt.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Dt.jsx)("button",{onClick:v,className:"p-2 text-gray-700 outline-none",children:n==="dark"?(0,Dt.jsx)(Ts.SunIcon,{className:"h-6 w-6"}):n==="green"?(0,Dt.jsx)(Ts.MoonIcon,{className:"h-6 w-6"}):(0,Dt.jsx)(Ts.SunIcon,{className:"h-6 w-6"})})})]}),(0,Dt.jsxs)(kt.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Dt.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Dt.jsxs)(kt.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,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,Dt.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,Dt.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Dt.jsx)(As.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Dt.jsx)("div",{className:"mt-6 flow-root",children:(0,Dt.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Dt.jsx)("div",{className:"space-y-2 py-6",children:a.map(f=>(0,Dt.jsx)(ku,{...f},f.name))})})})]})]})]})}function ku({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Dt.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,Dt.jsxs)(kt.Disclosure,{Dt:"div",className:"-mx-3",children:[(0,Dt.jsx)(kt.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Dt.jsx)(kt.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Dt.jsx)(kt.DisclosureButton,{Dt:"a",href:r.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function Su({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let i=()=>{let n=document.getElementById("next-section");n&&n.scrollIntoView({behavior:"smooth"})};return(0,Dt.jsx)("div",{children:(0,Dt.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,Dt.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Dt.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Dt.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,Dt.jsx)(et,{children:(0,Dt.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 mb-10 z-0 md:mb-0",children:[(0,Dt.jsx)("h1",{className:"text-5xl md:text-7xl mb-6",children:r&&r}),(0,Dt.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 mb-8 max-w-lg",children:s&&s})]})})}),(0,Dt.jsx)(it,{className:"text-black z-10",position:"header"})]})})}var In=y(require("next/image"));function Ka({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Dt.jsxs)(We,{href:"/",className:l(a?"py-1":"py-2"),children:[(0,Dt.jsx)(In.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,Dt.jsx)(In.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 Ln({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[i,n]=(0,ml.useState)(!1),[c,m]=(0,ml.useState)(""),d=["light","dark"],{theme:p,setTheme:u}=(0,Dc.useTheme)();(0,ml.useEffect)(()=>{m(p||"dark")},[p]);let g=()=>{let v=d[(d.indexOf(c)+1)%d.length];m(v),u(v)};return(0,ml.useEffect)(()=>{let v=()=>{window.scrollY>100?n(!0):n(!1)};return window.addEventListener("scroll",v,{passive:!0}),()=>window.removeEventListener("scroll",v)},[]),(0,Dt.jsx)(Dt.Fragment,{children:(0,Dt.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${i||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Dt.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Dt.jsxs)("div",{className:l("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,Dt.jsx)(Ka,{logoDark:a,logoLight:t}),(0,Dt.jsx)(kt.PopoverGroup,{className:"hidden lg:flex lg:gap-Dt-12",children:o&&o.map(v=>(0,Dt.jsx)(Ds,{...v},v.name))}),r&&(0,Dt.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:g,children:(0,Dt.jsxs)("div",{className:"relative",children:[(0,Dt.jsx)(El.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Dt.jsx)(El.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Bn=["light","dark"];function En({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,ml.useState)(!1),{theme:i,setTheme:n}=(0,Dc.useTheme)(),[c,m]=(0,ml.useState)(!1),[d,p]=(0,ml.useState)("light");(0,ml.useEffect)(()=>{let g=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",g,{passive:!0}),()=>window.removeEventListener("scroll",g)},[]),(0,ml.useEffect)(()=>{p(i||"dark")},[i]);let u=()=>{let g=Bn[(Bn.indexOf(d)+1)%Bn.length];p(g),n(g)};return(0,Dt.jsx)(Dt.Fragment,{children:(0,Dt.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,Dt.jsx)("nav",{className:l("backdrop-blur-sm text-white p-0",c&&"hidden"),children:(0,Dt.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&Dt.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Dt.jsx)(Ka,{logoDark:t,logoLight:e,mobile:!0}),(0,Dt.jsx)("div",{className:"flex items-center space-Dt-4",children:(0,Dt.jsxs)("button",{type:"button",onClick:()=>m(!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,Dt.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Dt.jsx)(As.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,Dt.jsxs)(kt.Dialog,{open:c,onClose:m,className:"lg:hidden",children:[(0,Dt.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Dt.jsxs)(kt.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,Dt.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Dt.jsx)(Ka,{logoDark:t,logoLight:e,mobile:!0}),(0,Dt.jsxs)("button",{type:"button",onClick:()=>m(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Dt.jsx)(As.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Dt.jsx)("div",{className:"mt-6 flow-root",children:(0,Dt.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Dt.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(g=>(0,Dt.jsx)(Ru,{...g},g.name))})})})]})]})]})})}function Ru({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Dt.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,Dt.jsxs)(kt.Disclosure,{Dt:"div",className:"-mx-3",children:[(0,Dt.jsx)(kt.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Dt.jsx)(kt.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Dt.jsx)(kt.DisclosureButton,{Dt:"a",href:r.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var dx=l("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),_c=l("text-brand-green text-md leading-[1.25] md:text-lg mb-5 md:mb-[1.5rem]"),zn=l("bg-brand-green rounded-full p-3 mr-4 text-2xl"),Hn=l("flex items-center text-white gap-3"),Bs=l("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Tu({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:i,footerBottom:n}=t,c=void 0;return(0,Dt.jsxs)("footer",{className:l("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,Dt.jsx)("div",{className:"py-16 md:py-20",children:(0,Dt.jsx)("div",{className:"container",children:(0,Dt.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 xl:grid-cols-3",children:[(0,Dt.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,Dt.jsx)(Ka,{logoDark:o,logoLight:a}),(0,Dt.jsx)("p",{className:"mb-7 mt-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Dt.jsx)("nav",{"aria-label":"social links",children:(0,Dt.jsx)("ul",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((m,d)=>(0,Dt.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,Dt.jsx)(We,{"aria-label":m.href,className:"text-2xl",href:m.href,openNewTab:!0,children:(0,Dt.jsx)("span",{children:m.icon})})},d))})})]}),(0,Dt.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,Dt.jsx)("h3",{className:_c,children:s.title}),s.links&&s.links.length>0&&(0,Dt.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Dt.jsx)("ul",{className:"grid pl-0 gap-2",children:s.links.map(m=>(0,Dt.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,Dt.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,Dt.jsx)(yd.FaChevronRight,{})}),(0,Dt.jsx)(We,{href:m.href,openNewTab:m.openNewTab,className:Bs,children:m.label})]},m.label))})})]}),(0,Dt.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,Dt.jsx)("h3",{className:_c,children:i.title}),(0,Dt.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,Dt.jsxs)("li",{className:Hn,children:[(0,Dt.jsx)("span",{className:zn,children:(0,Dt.jsx)(yd.FaPaperPlane,{})}),(0,Dt.jsx)("address",{className:"not-italic",children:i.location})]}),(0,Dt.jsxs)("li",{className:Hn,children:[(0,Dt.jsx)("span",{className:zn,children:(0,Dt.jsx)(yd.FaEnvelope,{})}),i.mails&&i.mails.length>0&&(0,Dt.jsx)("div",{className:"grid gap-1",children:i.mails.map((m,d)=>(0,Dt.jsx)("a",{href:`mailto:${m}`,className:Bs,children:m},d))})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&(0,Dt.jsxs)("li",{className:Hn,children:[(0,Dt.jsx)("span",{className:zn,children:(0,Dt.jsx)(yd.FaPhone,{})}),(0,Dt.jsx)("div",{className:"grid gap-1",children:i.phoneNumbers.map((m,d)=>(0,Dt.jsx)("a",{href:`tel:${m.split(" ").join("")}`,className:Bs,children:m},d))})]})]})]})]})})}),(0,Dt.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,Dt.jsx)("div",{className:"container",children:(0,Dt.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-Dt-8 gap-y-4 md:gap-Dt-10",children:[(0,Dt.jsx)("p",{children:n.copyrightText}),n.links&&n.links.length>0&&(0,Dt.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Dt.jsx)("ul",{className:"flex flex-wrap items-center gap-Dt-4 md:gap-Dt-7",children:n.links.map(m=>(0,Dt.jsx)("li",{children:(0,Dt.jsx)(We,{"aria-label":`Dt Dt page ${m.label}`,href:m.href,openNewTab:m.openNewTab,className:Bs,children:m.label})},m.label))})})]})})})]})}function Du({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:i=!1}){return(0,Dt.jsxs)("div",{className:l("fixed top-0 left-0 right-0 z-50",r),children:[(0,Dt.jsx)(Ln,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:i,wide:s}),(0,Dt.jsx)(En,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function Fn({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,ml.useState)([]),s=(0,oc.useRouter)(),i=()=>{o.length===e.length?r([]):r(e.map(d=>d.kl))},n=d=>{r(p=>p.includes(d)?p.filter(u=>u!==d):[...p,d])},c=async()=>{let d=await t(o);d.success?(Zi.toast.success(d.message),s.refresh()):Zi.toast.error(`Error: ${d.message}`),r([])},m=async()=>{let d=await a(o);d.success?(Zi.toast.success(d.message),s.refresh()):Zi.toast.error(`Error: ${d.message}`),r([])};return(0,Dt.jsxs)("div",{className:"space-y-4",children:[(0,Dt.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Dt.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Dt.jsxs)("div",{className:"space-Dt-2",children:[(0,Dt.jsx)(A,{onClick:c,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Dt.jsx)(A,{onClick:m,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Dt.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Dt.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,Dt.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("div",{className:"flex items-center",children:[(0,Dt.jsx)(Ut,{kl:"select-all",checked:o.length===e.length,onCheckedChange:i,className:"border-accent"}),(0,Dt.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Dt.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,Dt.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("div",{className:"flex items-center",children:[(0,Dt.jsx)(Ut,{kl:`select-${d.kl}`,checked:o.includes(d.kl),onCheckedChange:()=>n(d.kl),className:"border-accent"}),(0,Dt.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Dt.jsxs)(fa,{className:"h-10 w-10",children:[(0,Dt.jsx)(ga,{src:d.userImage,alt:d.userName}),(0,Dt.jsx)(ba,{children:d.userName.split(" ").map(p=>p[0]).join("")})]}),(0,Dt.jsx)("div",{className:"ml-3",children:(0,Dt.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2",children:[(0,Dt.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,Dt.jsx)(Bt,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.kl))]})}),(0,Dt.jsx)(Zi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var On=require("date-fns");var $c=[{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 Lr=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=$c.some(r=>r.date.toISOString()===e.toISOString());return t||a||o},Vc=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!Lr(o))return .5;for(;o<=r;)Lr(o)||s++,o.setDate(o.getDate()+1);return s},Wc=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var Mu=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,Dt.jsx)("div",{className:"flex space-Dt-2",children:e.map((r,s)=>(0,Dt.jsx)(A,{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 jn({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,ml.useState)(new Date),[r,s]=(0,ml.useState)(new Date),[i,n]=(0,ml.useState)("Full Day"),[c,m]=(0,ml.useState)(!1),[d,p]=(0,ml.useState)(1),u=(0,oc.useRouter)();(0,ml.useEffect)(()=>{let f=Wc(a,r);m(f),f&&n("Full Day")},[a,r]),(0,ml.useEffect)(()=>{if(!a||!r){p(0);return}let f=Vc(a,r,i!=="Full Day");p(f)},[a,r,i]);let g=f=>{n(f)};return(0,Dt.jsxs)("div",{className:"max-w-2xl",children:[(0,Dt.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,Dt.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,Dt.jsxs)("form",{onSubmit:async f=>{if(f.preventDefault(),!a||!r){Zi.toast.error("Please select both start and end dates");return}if(d>e){Zi.toast.error("You do not have enough leave days remaining");return}let h=new FormData;h.append("startDate",a.toISOString()),h.append("endDate",r.toISOString()),h.append("leaveType",i),h.append("duration",d.toString());let k=await(t||Au)(h);k.success?(Zi.toast.success(k.message),o(void 0),s(void 0),n("Full Day"),u.refresh()):Zi.toast.error(`Error: ${k.message}`)},className:"space-y-4",children:[(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Dt.jsx)(ve,{htmlFor:"startDate",children:"Start Date"}),(0,Dt.jsxs)(vr,{children:[(0,Dt.jsx)(hr,{asChild:!0,children:(0,Dt.jsxs)(A,{variant:"outline",className:l("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,Dt.jsx)(El.CalendarIcon,{className:"mr-2 h-4 w-4"}),a?(0,On.format)(a,"PPP"):(0,Dt.jsx)("span",{children:"Pick a date"})]})}),(0,Dt.jsx)(Ho,{className:"w-auto p-0",align:"start",children:(0,Dt.jsx)(wr,{mode:"single",selected:a,onSelect:f=>{o(f),f&&(!r||f>r)&&s(f)},initialFocus:!0})})]})]}),(0,Dt.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Dt.jsx)(ve,{htmlFor:"endDate",children:"End Date"}),(0,Dt.jsxs)(vr,{children:[(0,Dt.jsx)(hr,{asChild:!0,children:(0,Dt.jsxs)(A,{variant:"outline",className:l("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Dt.jsx)(El.CalendarIcon,{className:"mr-2 h-4 w-4"}),r?(0,On.format)(r,"PPP"):(0,Dt.jsx)("span",{children:"Pick a date"})]})}),(0,Dt.jsx)(Ho,{className:"w-auto p-0",align:"start",children:(0,Dt.jsx)(wr,{mode:"single",selected:r,onSelect:s,disabled:f=>a?f<a:!1,initialFocus:!0})})]})]})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(ve,{children:"Leave Type"}),(0,Dt.jsx)(Mu,{options:["Full Day","Morning","Afternoon"],value:i,onChange:g,disabled:[!1,c,c]})]}),(0,Dt.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,Dt.jsx)(A,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Dt.jsx)(Zi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Au=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function Xc(...e){return e.filter(Boolean).join(" ")}function Gn({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))},i=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},n=()=>{t(new Date)},c=m=>m.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Dt.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Dt.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Dt.jsxs)("div",{className:"sm:flex-auto",children:[(0,Dt.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Dt.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Dt.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Dt.jsxs)(A,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Dt.jsx)(El.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Dt.jsx)(A,{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,Dt.jsxs)(A,{onClick:i,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Dt.jsx)(El.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,Dt.jsx)("div",{className:"mt-8 flow-root",children:(0,Dt.jsx)("div",{className:"-mx-4 -my-2 overflow-Dt-auto sm:-mx-6 lg:-mx-8",children:(0,Dt.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,Dt.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,Dt.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Dt.jsxs)("tr",{children:[(0,Dt.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 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((m,d)=>{let p=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,Dt.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 ${Lr(p)?"bg-gray-200":""}`,children:[(0,Dt.jsx)("div",{children:c(p)}),(0,Dt.jsx)("div",{children:d+1})]},d)})]})}),(0,Dt.jsx)("tbody",{children:o.map((m,d)=>(0,Dt.jsxs)("tr",{children:[(0,Dt.jsx)("Dt",{className:Xc(d!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,Dt.jsxs)("div",{className:"flex items-center",children:[(0,Dt.jsxs)(fa,{className:"h-11 w-11",children:[(0,Dt.jsx)(ga,{src:m.image,alt:m.name}),(0,Dt.jsx)(ba,{children:m.name.split(" ").map(p=>p[0]).join("")})]}),(0,Dt.jsx)("div",{className:"ml-4",children:(0,Dt.jsx)("div",{className:"font-medium text-accent",children:m.name})})]})}),[...Array(r)].map((p,u)=>{let g=new Date(e.getFullYear(),e.getMonth(),u+1),v=a.find(f=>f.userId===m.kl&&new Date(f.startDate)<=g&&new Date(f.endDate)>=g);return(0,Dt.jsx)("Dt",{className:Xc(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Lr(g)?"bg-gray-200":""),children:(0,Dt.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${v?v.status==="approved"?"bg-green-500":v.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:v?`${m.name}: ${v.status} (${v.startDate} - ${v.endDate}) - ${v.leaveType}`:"",children:v&&v.leaveType!=="Full Day"&&(0,Dt.jsx)("div",{className:`h-3 w-6 ${v.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${m.kl}-${u}`)})]},m.kl))})]})})})})]})}function $n({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,ml.useState)(null),s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,i=Array.from({length:42},(d,p)=>{let u=new Date(e.getFullYear(),e.getMonth(),p-s+1);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:a.filter(g=>new Date(g.startDate)<=u&&new Date(g.endDate)>=u)}}),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},c=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},m=()=>{t(new Date)};return(0,Dt.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Dt.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Dt.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Dt.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Dt.jsx)("div",{className:"flex items-center",children:(0,Dt.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Dt.jsxs)(A,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Dt.jsx)(El.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Dt.jsx)(A,{variant:"outline",onClick:m,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,Dt.jsxs)(A,{onClick:c,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Dt.jsx)(El.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,Dt.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Dt.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,Dt.jsxs)("div",{className:"bg-white py-2",children:["Dt",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Dt"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Dt"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["W",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["F",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,Dt.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto",children:[(0,Dt.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px",children:i.map(d=>(0,Dt.jsxs)("div",{className:l(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2"),children:[(0,Dt.jsx)("time",{dateTime:d.date.toISOString(),className:l("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,Dt.jsx)("ol",{className:"mt-2 space-y-1",children:d.holidays.map(p=>(0,Dt.jsx)("li",{children:(0,Dt.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.kl))})]},d.date.toISOString()))}),(0,Dt.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:i.map(d=>(0,Dt.jsxs)("button",{type:"button",className:l(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,Dt.jsx)("time",{dateTime:d.date.toISOString(),className:l("ml-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,Dt.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,Dt.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:d.holidays.map(p=>(0,Dt.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.kl))})]},d.date.toISOString()))})]})]})]})}var Ja=require("lucide-react");function qc(...e){return e.filter(Boolean).join(" ")}function Iu({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:i,rejectLeave:n}){let[c,m]=(0,ml.useState)("Calendar View"),d=(0,oc.useRouter)(),p=!1,u=(0,On.parseISO)(a),g=async f=>{let h=(0,On.format)(f,"dd-MM-yyyy"),k=new URL(window.location.href);return k.searchParams.set("date",h),d.push(k.toString()),{success:!0}};if(p)return(0,Dt.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Dt.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let v=[{name:"Grid View",icon:Ja.Grid,current:c==="Grid View"},{name:"Calendar View",icon:Ja.CalendarDays,current:c==="Calendar View"},{name:"Request Leave",icon:Ja.PlusCircle,current:c==="Request Leave"},{name:"Approve Leave",icon:Ja.CheckSquare,current:c==="Approve Leave"}];return(0,Dt.jsxs)("div",{className:"container fixed mx-auto p-4",children:[(0,Dt.jsxs)("div",{className:"mb-8",children:[(0,Dt.jsxs)("div",{className:"sm:hidden",children:[(0,Dt.jsx)("select",{value:c,onChange:f=>m(f.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:v.map(f=>(0,Dt.jsx)("option",{children:f.name},f.name))}),(0,Dt.jsx)(El.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,Dt.jsx)("div",{className:"hidden sm:block",children:(0,Dt.jsx)("div",{className:"border-b border-gray-200",children:(0,Dt.jsx)("nav",{className:"-mb-px flex space-Dt-8","aria-label":"Tabs",children:v.map(f=>(0,Dt.jsxs)("a",{onClick:()=>{(f.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&m(f.name)},className:qc(f.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",f.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":f.current?"page":void 0,children:[(0,Dt.jsx)(f.icon,{className:qc(f.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),(0,Dt.jsx)("span",{children:f.name})]},f.name))})})})]}),c==="Grid View"&&(0,Dt.jsx)(Gn,{currentDate:u,setCurrentDate:g,holidays:e,employees:r}),c==="Calendar View"&&(0,Dt.jsx)($n,{currentDate:u,setCurrentDate:g,holidays:e}),c==="Request Leave"&&(0,Dt.jsx)(jn,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:f=>s?s(f):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),c==="Approve Leave"&&(0,Dt.jsx)(Fn,{leaveRequests:o,onApprove:f=>i?i(f):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:f=>n?n(f):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function Vn({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:i}){var me,V,C,I,S;let[n,c]=(0,ml.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[m,d]=(0,ml.useState)(""),[p,u]=(0,ml.useState)(!1),[g,v]=(0,ml.useState)(null);(0,ml.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(n))},[e,n]);let f=async()=>{try{let b=await s(n);b.success?(u(!1),v(null)):console.error("Failed Dt save deal:",b.errors)}catch(b){console.error("Failed Dt save deal:",b)}},h=(b,N)=>{c(w=>({...w,[b]:N}))},k=b=>{let N=(n.categories||[]).includes(b)?(n.categories||[]).filter(w=>w!==b):[...n.categories||[],b];h("categories",N)},T=async()=>{if(m.trim()){let b={text:m,timestamp:new Date().toISOString()};try{let N=await i(b);if(!N.success){console.error("Failed Dt add comment:",N.errors);return}}catch(N){console.error("Failed Dt add comment:",N)}c(N=>({...N,comments:[...N.comments||[],b]})),d("")}},z=b=>{switch(b){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"}},L=b=>t==null?void 0:t.find(N=>N.kl===Number(b));return(0,Dt.jsx)(Lt,{open:!0,children:(0,Dt.jsxs)(Ct,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Dt.jsxs)(Vt,{className:"flex flex-row items-center justify-between",children:[(0,Dt.jsx)(Wt,{className:"text-2xl font-bold",children:a==null?void 0:a.name}),(0,Dt.jsxs)("div",{className:"flex space-Dt-2",children:[(0,Dt.jsx)(A,{variant:"outline",onClick:r,children:"Close"}),(0,Dt.jsxs)(A,{onClick:f,disabled:!p,children:[(0,Dt.jsx)(El.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,Dt.jsxs)(ja,{className:"flex-grow pr-4",children:[(0,Dt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Dt.jsx)("div",{className:"grid gap-2",children:g==="value"?(0,Dt.jsx)(ut,{type:"number",value:n.value,onChange:b=>h("value",Number(b.target.value)),onBlur:()=>v(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Dt.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>v("value"),children:["\xA3",(me=n.value)==null?void 0:me.toLocaleString()]})}),(0,Dt.jsxs)("div",{className:"grid gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),g==="assignee"?(0,Dt.jsxs)(co,{value:((C=(V=n==null?void 0:n.assignee)==null?void 0:V.kl)==null?void 0:C.toString())||"",onValueChange:b=>h("assignee",L(b)),children:[(0,Dt.jsx)(Va,{children:(0,Dt.jsx)(mo,{placeholder:"Select assignee"})}),(0,Dt.jsx)(Wa,{children:t&&t.map(b=>{var N;return(0,Dt.jsx)(Ua,{value:((N=b==null?void 0:b.kl)==null?void 0:N.toString())||"",children:b.name},b.kl)})})]}):(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>v("assignee"),children:[(0,Dt.jsx)(El.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,Dt.jsx)("span",{children:n.assignee.name})]})]}),(0,Dt.jsxs)("div",{className:"grid gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),g==="closureDate"?(0,Dt.jsx)(ut,{type:"date",value:(S=(I=n.closureDate)==null?void 0:I.split("T")[0])!=null?S:"",onChange:b=>h("closureDate",b.target.value),onBlur:()=>v(null),autoFocus:!0}):(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>v("closureDate"),children:[(0,Dt.jsx)(El.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,Dt.jsx)("span",{children:n.closureDate?new Date(n.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,Dt.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Dt.jsxs)("div",{className:"grid gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Description"}),g==="description"?(0,Dt.jsx)(Xa,{value:n.description||"",onChange:b=>h("description",b.target.value),onBlur:()=>v(null),className:"min-h-[100px]",autoFocus:!0}):(0,Dt.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>v("description"),children:n.description})]})}),(0,Dt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,Dt.jsxs)("div",{className:"grid gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Status"}),g==="status"?(0,Dt.jsxs)(co,{value:n.status,onValueChange:b=>{h("status",b),v(null)},children:[(0,Dt.jsx)(Va,{children:(0,Dt.jsx)(mo,{placeholder:"Select status"})}),(0,Dt.jsx)(Wa,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(b=>(0,Dt.jsx)(Ua,{value:b,children:b},b))})]}):(0,Dt.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>v("status"),children:n.status})]}),(0,Dt.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Categories"}),g==="categories"?(0,Dt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.map(b=>{var N,w;return(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsx)(Ut,{kl:((N=b.kl)==null?void 0:N.toString())||"",checked:(n.categories||[]).some(ye=>ye.kl===b.kl),onCheckedChange:()=>b.kl!==void 0&&k(b)}),(0,Dt.jsx)("label",{htmlFor:((w=b.kl)!=null?w:"").toString(),className:`text-sm font-medium ${z(b.type||"sector")} px-2 py-1 rounded`,children:b.name})]},b.kl)})}):(0,Dt.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>v("categories"),children:n.categories&&n.categories.map(b=>{let N=b;return N?(0,Dt.jsx)(Bt,{variant:"secondary",className:z(N.type||"sector"),children:N.name},N.kl):null})})]})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,Dt.jsxs)("div",{className:"grid gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,Dt.jsx)(ja,{className:"h-[200px] overflow-y-auto",children:(0,Dt.jsx)("div",{className:"space-y-2",children:n.comments&&n.comments.slice().sort((b,N)=>new Date(N.timestamp||"").getTime()-new Date(b.timestamp||"").getTime()).map(b=>{var N;return(0,Dt.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,Dt.jsx)("p",{className:"text-sm text-gray-700",children:b.text}),(0,Dt.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[(N=b==null?void 0:b.author)==null?void 0:N.name," - ",new Date(b.timestamp||"").toLocaleString()]})]},b.kl)})})}),(0,Dt.jsxs)("div",{className:"flex mt-2",children:[(0,Dt.jsx)(ut,{value:m,onChange:b=>d(b.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,Dt.jsxs)(A,{onClick:T,className:"ml-2",children:[(0,Dt.jsx)(El.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,Dt.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(n.updatedAt||"").toLocaleString()]})]})]})]})})}function Wn({deal:e,customer:t,categories:a,onClick:o}){let r=a.find(s=>{var i;return s.type==="proposition"&&((i=e.categories)!=null?i:[]).includes(s.kl)});return(0,Dt.jsxs)(Te,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Dt.jsxs)(qe,{className:"pb-2",children:[(0,Dt.jsx)("div",{className:"flex justify-between items-center",children:(0,Dt.jsx)(Ke,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,Dt.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,Dt.jsxs)(Oe,{children:[(0,Dt.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Dt.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,Dt.jsx)(El.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,Dt.jsx)("span",{children:e.assignee.name})]}),(0,Dt.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Dt.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Dt.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Dt.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Dt.jsx)(El.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,Dt.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Dt.jsx)("div",{className:"flex justify-between items-left",children:r&&(0,Dt.jsx)(Bt,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:r.name})})]})]})}var Os=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Un({onSubmit:e}){var r;let[t,a]=(0,ml.useState)({name:"",intro:"",active:!0});return(0,Dt.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,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(ve,{htmlFor:"customerName",children:"Customer Name"}),(0,Dt.jsx)(ut,{kl:"customerName",value:t.name,onChange:s=>a({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(ve,{htmlFor:"customerIntro",children:"Intro"}),(0,Dt.jsx)(Xa,{kl:"customerIntro",value:(r=t.intro)!=null?r:"",onChange:s=>a({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsx)(Ut,{kl:"activeCustomer",checked:!!t.active,onCheckedChange:s=>a({...t,active:s})}),(0,Dt.jsx)(ve,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Dt.jsx)(A,{type:"submit",className:"w-full",children:"Add Customer"})]})}function Xn({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:i}){var z,L,me,V;let[n,c]=(0,ml.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[m,d]=(0,ml.useState)(!1),[p,u]=(0,ml.useState)({});(0,ml.useEffect)(()=>{r&&c(r)},[r]);let g=()=>{let C={};return n.customer||(C.customer="Customer Dt required"),n.value||(C.value="Value Dt required"),n.assignee||(C.assignee="Assignee Dt required"),n.closureDate||(C.closureDate="Closure Date Dt required"),u(C),Object.keys(C).length===0},v=async C=>{C.preventDefault(),u({});try{if(g()){let I=await o({...n});I.success?(c({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),i==null||i()):u(I.errors||{})}}catch{u({submit:"An error occurred while submitting the form."})}},f=C=>{c(I=>({...I,categories:(I.categories||[]).includes(C.kl)?(I.categories||[]).filter(S=>S!==C.kl):[...I.categories||[],C.kl]}))},h=async C=>{c({...n,customer:C});try{let I=await s(C);I.success?d(!1):u(I.errors||{})}catch{u({submit:"An error occurred while submitting the form."})}},k=C=>t==null?void 0:t.find(I=>I.kl===Number(C)),T=C=>e==null?void 0:e.find(I=>I.kl===Number(C));return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsxs)("form",{onSubmit:v,className:"space-y-6",children:[(0,Dt.jsx)(ja,{className:"h-[60vh] pr-4",children:(0,Dt.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{htmlFor:"customer",children:"Customer"}),(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsxs)(co,{value:(L=(z=n.customer)==null?void 0:z.kl)==null?void 0:L.toString(),onValueChange:C=>c({...n,customer:T(C)}),children:[(0,Dt.jsx)(Va,{children:(0,Dt.jsx)(mo,{placeholder:"Select customer"})}),(0,Dt.jsx)(Wa,{children:e.map(C=>{var I;return(0,Dt.jsx)(Ua,{value:((I=C.kl)==null?void 0:I.toString())||"",children:C.name},C.kl)})})]}),(0,Dt.jsx)(A,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,Dt.jsx)(El.PlusIcon,{className:"w-5 h-5"})})]}),p.customerId&&(0,Dt.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{htmlFor:"value",children:"Value"}),(0,Dt.jsx)(ut,{kl:"value",type:"number",value:n.value||"",onChange:C=>c({...n,value:Number.parseFloat(C.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,Dt.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{htmlFor:"assignee",children:"Assignee"}),(0,Dt.jsxs)(co,{value:(V=(me=n.assignee)==null?void 0:me.kl)==null?void 0:V.toString(),onValueChange:C=>c({...n,assignee:k(C)}),children:[(0,Dt.jsx)(Va,{children:(0,Dt.jsx)(mo,{placeholder:"Select assignee"})}),(0,Dt.jsx)(Wa,{children:t&&t.map(C=>{var I;return(0,Dt.jsx)(Ua,{value:((I=C.kl)==null?void 0:I.toString())||"",children:C.name},C.kl)})})]}),p.assignee&&(0,Dt.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{htmlFor:"description",children:"Description"}),(0,Dt.jsx)(Xa,{kl:"description",value:n.description||"",onChange:C=>c({...n,description:C.target.value}),placeholder:"Enter deal description"})]}),(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{children:"Categories"}),(0,Dt.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(C=>(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)("h4",{className:"text-sm font-medium",children:C.charAt(0).toUpperCase()+C.slice(1)}),(0,Dt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(I=>I.type===C).map(I=>{var S;return(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsx)(Ut,{kl:I.kl.toString(),checked:(S=n.categories)==null?void 0:S.includes(I.kl),onCheckedChange:()=>f(I)}),(0,Dt.jsx)("label",{htmlFor:I.kl.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:I.name})]},I.kl)})})]},C))})]}),(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{htmlFor:"closureDate",children:"Closure Date"}),(0,Dt.jsx)(ut,{kl:"closureDate",type:"date",value:n.closureDate||"",onChange:C=>c({...n,closureDate:C.target.value})}),p.closureDate&&(0,Dt.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,Dt.jsx)(A,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,Dt.jsx)(Lt,{open:m,onOpenChange:d,children:(0,Dt.jsxs)(Ct,{children:[(0,Dt.jsx)(Vt,{children:(0,Dt.jsx)(Wt,{children:"Add New Customer"})}),(0,Dt.jsx)(Un,{onSubmit:h})]})})]})}function Yn({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:i,calculateWeightedValue:n,addNewDeal:c,onAddCustomer:m}){let[d,p]=(0,ml.useState)(!1);return(0,Dt.jsxs)("div",{className:"flex flex-col w-80",children:[(0,Dt.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),c&&(0,Dt.jsxs)(Lt,{open:d,onOpenChange:p,children:[(0,Dt.jsx)(Qr,{asChild:!0,children:(0,Dt.jsxs)(A,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,Dt.jsx)(El.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,Dt.jsxs)(Ct,{children:[(0,Dt.jsx)(Vt,{children:(0,Dt.jsx)(Wt,{children:"Add New Deal"})}),(0,Dt.jsx)(Xn,{customers:o,users:a,categories:r,onSubmit:c,onAddCustomer:m,onClose:()=>p(!1)})]})]}),(0,Dt.jsx)(Os.Droppable,{droppableId:e,isDropDisabled:!1,children:u=>(0,Dt.jsxs)("div",{ref:u.innerRef,...u.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((g,v)=>(0,Dt.jsx)(Os.Draggable,{draggableId:g.kl.toString(),index:g.kl,children:f=>(0,Dt.jsx)("div",{ref:f.innerRef,...f.draggableProps,...f.dragHandleProps,children:(0,Dt.jsx)(Wn,{deal:g,customer:g.customer,categories:r,onClick:()=>s(g)})})},g.kl.toString())),u.placeholder]})}),(0,Dt.jsxs)("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,Dt.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Dt.jsxs)("span",{className:"text-green-600",children:["\xA3",i(t).toLocaleString()]})]}),(0,Dt.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Dt.jsxs)("span",{className:"text-blue-600",children:["\xA3",n(t,e).toLocaleString()]})]})]})]})}var Lu=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function Bu({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){var p;let[s,i]=(0,ml.useState)(null),n=u=>{var g;return((g=e.deals)!=null?g:[]).filter(v=>v.status===u)},c=u=>u.reduce((g,v)=>g+(v.value||0),0),m=(u,g)=>{let v={Cold:.2,Qualified:.4,"Proposal Made":.6,"SoW Submitted":.7,Won:1,Lost:0};return u.reduce((f,h)=>f+(h.value||0)*v[g],0)},d=(0,ml.useCallback)(u=>{var z,L;let{source:g,destination:v}=u;if(!v||g.droppableId===v.droppableId&&g.index===v.index)return;let f=g.droppableId,h=v.droppableId,k=(z=e.deals)==null?void 0:z.filter(me=>me.kl===g.index)[0],T=[...(L=e.deals)!=null?L:[]];k&&(k.status=h,a(k))},[a]);return(0,Dt.jsx)(Os.DragDropContext,{onDragEnd:d,children:(0,Dt.jsxs)("div",{className:"p-4 max-h-[90vh] overflow-auto",children:[(0,Dt.jsx)("div",{className:"flex space-Dt-4 pb-4",children:Lu.filter(u=>u!=="Won"&&u!=="Lost").map(u=>{var v,f;let g=n(u);return(0,Dt.jsx)(Yn,{status:u,deals:g,customers:(v=e.customers)!=null?v:[],users:e.users,categories:(f=e.categories)!=null?f:[],onDealClick:i,calculateColumnValue:c,calculateWeightedValue:m,addNewDeal:u==="Cold"?t:void 0,onAddCustomer:r},u)})}),s&&(0,Dt.jsx)(Vn,{deal:s,users:e.users,customer:s.customer,categories:(p=e.categories)!=null?p:[],onClose:()=>i(null),onSave:a,onAddComment:u=>o(s.kl.toString(),u)})]})})}var er=(e,t)=>e[t%e.length];function Eu({services:e,className:t,title:a,content:o}){let r={settings:{width:"full",card:"light"}};return(0,Dt.jsxs)("div",{className:"pb-4 md:pb-0",children:[(0,Dt.jsxs)("div",{className:l("w-full text-left prose"),children:[a&&(0,Dt.jsx)("h2",{className:"text-primary",children:a}),(0,Dt.jsx)("div",{className:"pb-12 ",children:o&&(0,Dt.jsx)(q,{enableGutter:!1,content:o,enableProse:!1,className:l("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),e&&e.length>0&&(0,Dt.jsx)("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-4",children:e.map((s,i)=>(0,Dt.jsx)("div",{"data-aos":"fade-up","data-aos-delay":er([200,400,600],i),className:"w-full h-[33vh] md:h-[40vh] md:px-4 md:w-1/2 lg:w-1/3",children:(0,Dt.jsx)(_o,{...r,icon:{type:"none"},title:s.title,image:s.image,content:s.content,link:s.link})},i))})]})}function eo({subtitle:e,title:t,description:a,alignment:o="start",hasBottomSpacing:r=!1,className:s,invert:i=!1}){let n=l(o==="start"&&"text-left",o==="center"&&"text-center",o==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":r},"prose",s);return(0,Dt.jsxs)("div",{className:n,children:[e&&(0,Dt.jsx)("span",{className:"mb-[.625rem] block font-bold uppercase text-accent md:text-md",children:e}),(0,Dt.jsx)("h2",{className:l("text-primary"),children:t}),typeof a=="string"?a&&(0,Dt.jsx)("p",{className:"mt-5 whitespace-pre-line text-foreground",children:a}):a&&(0,Dt.jsx)(q,{content:a,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}function zu({sectionHeading:e,cards:t}){return(0,Dt.jsx)("section",{className:"section-padding-primary !pt-0",children:(0,Dt.jsxs)(et,{children:[(0,Dt.jsx)("div",{className:"mx-auto max-w-[630px]","data-aos":"fade-up","data-aos-delay":"100",children:(0,Dt.jsx)(eo,{...e,alignment:"center",hasBottomSpacing:!0})}),t&&t.length>0&&(0,Dt.jsx)("div",{className:"grid gap-30px",children:t.map((a,o)=>(0,Dt.jsx)("div",{"data-aos":"fade-up","data-aos-delay":er([200,400,600],o),className:"py-2",children:(0,Dt.jsx)(cn,{...a})},o))})]})})}var Br=y(require("next/image"));function Hu(e){let{images:t,sectionHeading:a,keyPoints:o,description:r}=e;return(0,Dt.jsx)(Dt.Fragment,{children:(0,Dt.jsx)("section",{kl:"about-section",className:l(" clip-custom-top-l sticky md:top-0 md:h-screen z-2 flex flex-col items-center justify-center section-padding-primary dark bg-background",e.className||""),children:(0,Dt.jsx)(et,{children:(0,Dt.jsxs)("div",{className:"grid items-center gap-12 lg:grid-cols-[.92fr_1fr] 2xl:gap-20",children:[(0,Dt.jsxs)("div",{className:"lg:order-2","data-aos":"fade-left","data-aos-delay":"200",children:[(0,Dt.jsx)(eo,{...a}),o&&o.length>0&&(0,Dt.jsx)("div",{className:"mt-7 grid gap-5 text-accent sm:grid-cols-2 md:mt-10 md:gap-[1.875rem]",children:o.map((s,i)=>(0,Dt.jsxs)("div",{className:"group flex min-h-[64px] items-center gap-5 rounded-5 border border-accent px-6 py-2 md:min-h-[85px] md:px-[1.875rem] md:py-3",children:[(0,Dt.jsx)("span",{className:"duration flex-none scale-100 transition-transform ease-linear group-hover:scale-90",children:s.icon}),(0,Dt.jsx)("h3",{className:"text-md font-bold leading-[1.25] md:text-lg",children:s.title})]},i))}),r&&(0,Dt.jsx)("p",{className:"mt-5 text-primary md:mt-[1.875rem]",children:r})]}),t&&(0,Dt.jsx)("div",{className:"mx-auto text-center",children:(0,Dt.jsxs)("div",{className:"relative mx-auto grid max-w-[580px] grid-cols-2 gap-2.5 overflow-hidden",children:[(0,Dt.jsx)("div",{className:"relative flex justify-end overflow-hidden",children:(0,Dt.jsx)("div",{className:"relative z-[2] mt-auto","data-aos":"fade-up","data-aos-delay":"200",children:(0,Dt.jsx)("div",{className:"relative z-[4] overflow-hidden",children:(0,Dt.jsx)(Br.default,{src:t.image1.src,alt:t.image1.alt,width:t.image1.width,height:t.image1.height,className:"rounded-tl-[60px] object-cover object-top"})})})}),(0,Dt.jsx)("div",{className:"flex overflow-hidden",children:(0,Dt.jsx)(Br.default,{src:t.image2.src,alt:t.image2.alt,width:t.image2.width,height:t.image2.height,className:"rounded-[80px_10px] object-cover","data-aos":"fade-right","data-aos-delay":"300"})}),(0,Dt.jsx)("div",{className:"ml-auto flex max-w-[250px] justify-end overflow-hidden",children:(0,Dt.jsx)(Br.default,{src:t.image3.src,alt:t.image4.alt,width:t.image3.width,height:t.image3.height,className:"rounded-[50px_10px] object-cover","data-aos":"fade-left","data-aos-delay":"350"})}),(0,Dt.jsx)("div",{className:"overflow-hidden",children:(0,Dt.jsx)(Br.default,{src:t.image4.src,alt:t.image4.alt,width:t.image4.width,height:t.image4.height,className:"rounded-10 rounded-br-[80px] object-cover","data-aos":"fade-right","data-aos-delay":"400"})}),(0,Dt.jsx)("div",{className:"absolute left-1/2 top-1/2 z-[4] -translate-Dt-1/2 -translate-y-1/2 overflow-hidden",children:(0,Dt.jsx)("div",{"data-aos":"zoom-in","data-aos-delay":"450",children:(0,Dt.jsx)("span",{className:"grid h-[100px] w-[100px] place-items-center rounded-full border-[12px] border-white bg-accent text-[30px] text-white",children:(0,Dt.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 27 27",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Dt.jsx)("path",{d:"M26.8125 13.8672C26.8125 14.9922 25.875 15.9297 24.8125 15.9297H15.8125V24.9297C15.8125 25.9922 14.875 26.8672 13.8125 26.8672C12.6875 26.8672 11.8125 25.9922 11.8125 24.9297V15.9297H2.8125C1.6875 15.9297 0.8125 14.9922 0.8125 13.8672C0.8125 12.8047 1.6875 11.9297 2.8125 11.9297H11.8125V2.92969C11.8125 1.80469 12.6875 0.867188 13.8125 0.867188C14.875 0.867188 15.8125 1.80469 15.8125 2.92969V11.9297H24.8125C25.875 11.8672 26.8125 12.8047 26.8125 13.8672Z"})})})})})]})})]})})})})}var rm=y(require("next/image"));function sm({blogs:e,base:t}){return(0,Dt.jsx)("div",{children:e&&e.length>0&&(0,Dt.jsx)("div",{className:"grid gap-10 lg:gap-10 md:grid-cols-2",children:e.map((a,o)=>(0,Dt.jsx)(Fu,{post:a,kl:o,base:t},o))})})}var Fu=({post:e,kl:t,base:a})=>{var m,d,p,u;let{slug:o,meta:r,authors:s,categories:i,title:n,publishedAt:c}=e;return(0,Dt.jsxs)("article",{className:"relative isolate flex flex-col gap-8 lg:flex-row",children:[(0,Dt.jsxs)("div",{className:"relative aspect-video sm:aspect-[2/1] lg:aspect-square lg:w-64 lg:shrink-0",children:[(0,Dt.jsx)(rm.default,{src:((m=r==null?void 0:r.image)==null?void 0:m.url)||"/assets/images/brand/cortex-reply-gradient.png",alt:((d=r==null?void 0:r.image)==null?void 0:d.alt)||"Post image",width:850,height:575,sizes:"100vw",className:"absolute inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,Dt.jsx)("div",{className:"absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsxs)("div",{className:"flex flex-wrap items-center gap-Dt-4 text-xs",children:[(0,Dt.jsx)("time",{dateTime:(p=e.publishedAt)!=null?p:void 0,className:"text-foreground",children:Rs((u=e.publishedAt)!=null?u:"")}),e.categories&&e.categories.map((g,v)=>(0,Dt.jsx)("a",{href:`#${g}`,className:"relative z-10 rounded-full bg-gray-50 px-3 py-1.5 font-medium text-gray-600 hover:bg-gray-100",children:g.title},v))]}),(0,Dt.jsx)("div",{className:"group relative max-w-xl",children:(0,Dt.jsx)("h3",{className:"mt-3 text-lg/6 font-semibold text-accent group-hover:text-xl/6",children:(0,Dt.jsxs)("a",{href:`/${a}/${e.slug}`||"#",children:[(0,Dt.jsx)("span",{className:"absolute inset-0"}),e.title]})})}),(0,Dt.jsx)("div",{className:"mt-6 flex flex-wrap lg:border-t gap-y-2 border-gray-200 dark:border-gray-700 pt-6",children:s&&s.map((g,v)=>{var f;return(0,Dt.jsxs)("div",{className:"relative flex items-center gap-Dt-4",children:[g.profilePicture?(0,Dt.jsx)("img",{alt:g.name||"Author",src:((f=g.profilePicture)==null?void 0:f.url)||"/assets/images/placeholder.jpg",className:"size-10 rounded-full bg-gray-50"}):(0,Dt.jsx)("div",{className:"size-10 rounded-full bg-gray-50"})," ",(0,Dt.jsx)("div",{className:"text-sm/6",children:(0,Dt.jsxs)("p",{className:"text-foreground pr-6",children:[(0,Dt.jsx)("span",{className:"absolute inset-0"}),g.name]})})]},v)})})]})]},t)};function Ou({blogs:e,pages:t,categories:a,types:o,base:r}){return(0,Dt.jsx)("section",{children:(0,Dt.jsx)(et,{children:(0,Dt.jsx)("div",{className:"grid",children:(0,Dt.jsxs)("div",{children:[o&&(0,Dt.jsx)(kn,{types:o}),(0,Dt.jsx)(sm,{blogs:e,base:r}),(0,Dt.jsx)(Nn,{pages:t})]})})})})}var im=y(require("next/image"));var js="data:image/jpeg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAALABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYEBQf/xAAgEAABBAICAwEAAAAAAAAAAAABAAIDBBEhEjEFBhMi/8QAFgEBAQEAAAAAAAAAAAAAAAAABAMF/8QAHBEAAgICAwAAAAAAAAAAAAAAAQIAIQMEBRFR/9oADAMBAAIRAxEAPwBqrV3PcNFL3s1Blny9eX7uYa7mtLAN95yFp9StCHajCp/YIImeUi4xtHLGdd7V9wkoOvZncagXIS10ZENFzsEA7GUJybBHxb+B0EJIeBOG5//Dt";function _u(e){let{sectionHeading:t,image:a}=e;return(0,Dt.jsxs)("div",{className:"relative w-full light py-[60px]",children:[(0,Dt.jsx)("div",{className:"absolute left-0 top-0 z-1 h-full w-full overflow-hidden md:w-[56%] md:rounded-r-5",children:(0,Dt.jsx)(im.default,{src:a.src,alt:a.alt,fill:!0,className:"object-cover",sizes:"(min-width: 768px) 60vw, 100vw",placeholder:"blur",blurDataURL:js})}),(0,Dt.jsx)(et,{children:(0,Dt.jsx)("div",{className:"ml-auto md:w-1/2",children:(0,Dt.jsxs)("div",{className:"relative z-[2] rounded-5 bg-white p-10 shadow-1 dark:bg-accent-700 lg:p-[60px]",children:[(0,Dt.jsx)("div",{className:"mb-30px",children:(0,Dt.jsx)(eo,{...t,invert:!0})}),(0,Dt.jsx)(ps,{})]})})})]})}function ju(e){return(0,Dt.jsx)("div",{className:"",children:(0,Dt.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Dt.jsx)("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:(0,Dt.jsxs)("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),(0,Dt.jsx)("p",{className:"mt-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),(0,Dt.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:e.locations&&e.locations.map((t,a)=>{var o;return(0,Dt.jsxs)("div",{className:"rounded-2xl p-10 border",children:[(0,Dt.jsx)("h3",{className:"text-base/7 text-primary",children:t.title}),(0,Dt.jsxs)("address",{className:"mt-3 space-y-1 text-sm/6 not-italic text-foreground",children:[(o=t.location.split(","))==null?void 0:o.map((r,s)=>(0,Dt.jsx)("p",{children:r},s))," ",t.mails&&(0,Dt.jsxs)("p",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsx)(yd.FaEnvelope,{className:"pr-2 text-primary size-auto"}),(0,Dt.jsx)("span",{children:t.mails[0]})]}),t.phoneNumbers&&t.phoneNumbers.length>0&&(0,Dt.jsxs)("p",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsx)(yd.FaPhoneFlip,{className:"pr-2 text-primary size-auto"}),t.phoneNumbers[0]]})]})]},a)})})]})})})})}var nm=y(require("next/image"));var dm=y(require("next/link"));function Gu({image:e,name:t,about:a,socialLinks:o}){return!e||!e.src||e.src.length<3||!t?null:(0,Dt.jsx)("div",{className:"mt-1 z-10 px-0 pt-0 lg:px-10",children:(0,Dt.jsx)(Te,{children:(0,Dt.jsxs)(Oe,{children:[e&&e.src&&(0,Dt.jsx)(nm.default,{src:e.src,alt:e.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:js,className:"mx-auto mt-6 rounded-full object-cover"}),(0,Dt.jsx)("h3",{className:"font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-xl",children:t}),(0,Dt.jsx)("p",{children:a}),o&&o.length>0&&(0,Dt.jsx)("nav",{"aria-label":"social links",children:(0,Dt.jsx)("ul",{className:"inline-flex items-center divide-Dt divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((r,s)=>(0,Dt.jsx)("li",{children:(0,Dt.jsx)(We,{href:r.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:(0,Dt.jsx)("span",{children:r.icon})})},s))})})]})})})}function $u({page:e,categoryList:t,edit:a=!1,path:o="/admin/collections/posts/"}){var u;if(!e)return(0,oc.notFound)();let{meta:r,populatedAuthors:s,authors:i,categories:n,content:c,title:m}=e,d={image:{src:r&&r.image&&r.image.url||void 0,alt:r&&r.image&&r.image.alt||void 0},authorName:((u=s==null?void 0:s[0])==null?void 0:u.name)||"",category:n,commentCount:0,title:m,description:(r==null?void 0:r.description)||""},p=i==null?void 0:i.map(g=>{var v,f;return{name:g.name||"",about:"",image:{src:g.profilePicture&&((f=(v=g.profilePicture.sizes)==null?void 0:v.square)==null?void 0:f.url)||"",alt:g.name||"blog author"},socialLinks:[]}});return(0,Dt.jsx)(et,{children:(0,Dt.jsxs)("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[(0,Dt.jsx)("div",{children:(0,Dt.jsxs)("div",{className:"[&_p+Dt]:mt-4",children:[(0,Dt.jsx)("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),(0,Dt.jsx)(q,{content:c,enableGutter:!1})]})}),(0,Dt.jsxs)("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:[a&&(0,Dt.jsx)("div",{className:"mt-4 lg:-mt-10 z-10 px-0 pt-0 lg:px-10",children:(0,Dt.jsxs)(Te,{children:[(0,Dt.jsx)(qe,{children:(0,Dt.jsx)(Ke,{className:"text-accent",children:"Content Actions"})}),(0,Dt.jsxs)(Oe,{children:[(0,Dt.jsx)("p",{className:"mb-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),(0,Dt.jsx)(dm.default,{href:`${o}${e.kl}`,children:(0,Dt.jsx)(A,{variant:"outline",className:"w-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),p&&p.map((g,v)=>(0,Dt.jsx)(Gu,{...g},v)),t&&t.links&&(0,Dt.jsx)("div",{className:"mt-4 px-0 pt-0 lg:px-10",children:(0,Dt.jsx)(Cn,{links:t.links,title:t.title})})]})]})})}var qn=y(require("next/link"));var pm=require("lucide-react"),Vu=({children:e,pageId:t,tableOfContents:a=[],edit:o=!0,path:r="/admin/collections/pages/",relatedContent:s=[{title:"Related Content",links:[]}]})=>{let[i,n]=(0,ml.useState)(!1),c=()=>{n(!i)};return(0,ml.useEffect)(()=>{let m=window.location.hash;if(m){let d=m.substring(1),p=document.getElementById(d);if(p){let g=p.getBoundingClientRect().top+window.pageYOffset+-300;window.scrollTo({top:g,behavior:"smooth"})}}},[window.location.hash]),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("div",{className:l(i?"col-span-3":"col-span-4","xl:col-span-3"),children:e}),(0,Dt.jsx)(Wu,{pageId:t,tableOfContents:a,edit:o,path:r,relatedContent:s,isSidebarVisible:i}),(0,Dt.jsx)("div",{className:"block md:hidden mt-8",children:(0,Dt.jsx)("div",{className:"space-y-6",children:e})})]})};var Wu=({pageId:e,tableOfContents:t=[],edit:a=!0,path:o="/admin/collections/pages/",relatedContent:r=[{title:"Related Content",links:[]}],isSidebarVisible:s})=>{let[i,n]=(0,ml.useState)(""),[c,m]=(0,ml.useState)(!1),[d,p]=(0,ml.useState)(!1),u=(0,oc.usePathname)(),g=()=>{m(!c),p(!1)},v=()=>{p(!d),m(!1)},f=T=>{switch(T){case"h3":return"ml-4";case"h4":return"ml-8";default:return""}},h=()=>{let T=u.split("/"),z="/print"+u,L=window.open(z,"Print","width=1754,height=1240,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");L&&L.focus()},k=()=>{let T=u.split("/"),z="/present"+u,L=window.open(z,"Print","width=1754,height=1240,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");L&&L.focus()};return(0,Dt.jsx)("div",{className:l("fixed right-2 z-20 top-1/4 space-y-6 transform transition-transform duration-300 translate-Dt-full",s?"translate-Dt-0":"md:translate-Dt-0"),children:(0,Dt.jsxs)("div",{className:"flex flex-row-reverse z-20 min-w-64 gap-4",children:[(0,Dt.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-gray-200 bg-card p-2.5 shadow-lg backdrop-blur-lg min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[(0,Dt.jsxs)(qn.default,{href:`${o}${e}`,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M454.6 45.3l12.1 12.1c12.5 12.5 12.5 32.8 0 45.3L440 129.4 382.6 72l26.7-26.7c12.5-12.5 32.8-12.5 45.3 0zM189 265.6l171-171L417.4 152l-171 171c-4.2 4.2-9.6 7.2-15.4 8.6l-65.6 15.1L180.5 281c1.3-5.8 4.3-11.2 8.6-15.4zm197.7-243L166.4 243c-8.5 8.5-14.4 19.2-17.1 30.9l-20.9 90.6c-1.2 5.4 .4 11 4.3 14.9s9.5 5.5 14.9 4.3l90.6-20.9c11.7-2.7 22.4-8.6 30.9-17.1L489.4 125.3c25-25 25-65.5 0-90.5L477.3 22.6c-25-25-65.5-25-90.5 0zM80 64C35.8 64 0 99.8 0 144L0 432c0 44.2 35.8 80 80 80l288 0c44.2 0 80-35.8 80-80l0-128c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 128c0 26.5-21.5 48-48 48L80 480c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48l128 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L80 64z"})}),(0,Dt.jsx)("small",{className:"text-center text-xs font-medium",children:" Edit "})]}),(0,Dt.jsxs)("a",{onClick:g,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M16 80C7.2 80 0 87.2 0 96s7.2 16 16 16l416 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 80zM144 240c-8.8 0-16 7.2-16 16s7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0zM128 416c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0c-8.8 0-16 7.2-16 16zM0 432c0 8.8 7.2 16 16 16s16-7.2 16-16l0-192c0-8.8-7.2-16-16-16s-16 7.2-16 16L0 432z"})}),(0,Dt.jsx)("small",{className:"text-center text-xs font-medium",children:" Contents "})]}),(0,Dt.jsxs)("a",{onClick:v,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M136 64c13.3 0 24 10.7 24 24l0 24 0 32 0 24c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0zm56 104l0-24 192 0 0 24c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-30.9 0-56 25.1-56 56l0 24-192 0 0-24c0-30.9-25.1-56-56-56L56 32C25.1 32 0 57.1 0 88l0 80c0 30.9 25.1 56 56 56l80 0c8.6 0 16.7-1.9 24-5.4l72.2 96.3c-5.2 8.5-8.2 18.5-8.2 29.1l0 80c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-8.6 0-16.7 1.9-24 5.4l-72.2-96.3c5.2-8.5 8.2-18.5 8.2-29.1zm224 0l0-24 0-32 0-24c0-13.3 10.7-24 24-24l80 0c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24zM360 320c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0z"})}),(0,Dt.jsx)("small",{className:"text-center text-xs font-medium",children:" Related "})]}),(0,Dt.jsx)("hr",{className:"dark:border-gray-400"}),(0,Dt.jsxs)("a",{onClick:k,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M16 0C7.2 0 0 7.2 0 16s7.2 16 16 16l544 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 0zM32 64l0 224c0 35.3 28.7 64 64 64l176 0 0 41.4-91.3 91.3c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L288 422.6l84.7 84.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L304 393.4l0-41.4 176 0c35.3 0 64-28.7 64-64l0-224-32 0 0 224c0 17.7-14.3 32-32 32l-192 0L96 320c-17.7 0-32-14.3-32-32L64 64 32 64z"})}),(0,Dt.jsx)("small",{className:"text-xs font-medium",children:"Present"})]}),(0,Dt.jsxs)("a",{onClick:h,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,Dt.jsx)("small",{className:"text-xs font-medium",children:"Print"})]})]}),c&&(0,Dt.jsx)("div",{className:l("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border"),children:(0,Dt.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-w-64",children:[(0,Dt.jsx)("div",{className:"flex text-accent",children:"On this Page"}),(0,Dt.jsx)("ul",{className:"flex flex-col space-y-2",children:t.map((T,z)=>(0,Dt.jsx)("li",{className:f(T.tag),children:(0,Dt.jsx)("a",{href:`#${T.kl}`,className:`text-xs ${i===T.kl?"text-accent font-semibold":"text-primary dark:text-foreground"} hover:text-accent`,children:T.text})},z))})]})}),d&&r&&r.length>0&&(0,Dt.jsx)("div",{className:l("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border"),children:(0,Dt.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-w-64",children:[(0,Dt.jsx)("div",{className:"flex text-accent",children:"Related Content"}),(0,Dt.jsx)("ul",{className:"flex flex-col space-y-2",children:r.map((T,z)=>T.links&&T.links.length>0?T.links.map((L,me)=>(0,Dt.jsxs)(qn.default,{href:L.url,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[L.title,L.url.startsWith("http")&&(0,Dt.jsx)(pm.ExternalLink,{className:"ml-1 h-3 w-3"})]},me)):null)})]})})]})})};var um=y(require("next/image"));function Uu({className:e,children:t,image:a="https://images.unsplash.com/photo-1557804506-669a67965ba0?q=80&w=2574&auto=format&fit=crop",imageAlt:o="Professional presentation in modern office setting",imagePosition:r="left",overlay:s=!0}){return(0,Dt.jsxs)("section",{className:l("relative min-h-[50vh] w-full overflow-hidden",e),children:[(0,Dt.jsxs)("div",{className:"absolute inset-0 w-full",children:[(0,Dt.jsx)(um.default,{src:a||"/placeholder.svg",alt:o,fill:!0,className:"object-cover",priority:!0}),s&&(0,Dt.jsx)("div",{className:"absolute inset-0",style:{background:r==="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%)"}})]}),(0,Dt.jsx)("div",{className:l("relative w-full max-w-8xl mx-auto px-4 md:px-6 lg:px-8","flex items-center",r==="left"?"justify-end":"justify-start"),children:(0,Dt.jsx)("div",{className:l("w-full max-w-xl py-12",r==="left"?"ml-auto":"mr-auto"),children:t})})]})}var Kn=y(require("next/image"));function Xu({blogs:e,sectionHeading:t,base:a="insights"}){return(0,Dt.jsxs)(et,{children:[(0,Dt.jsx)("div",{className:"",children:t&&(0,Dt.jsx)("div",{"data-aos":"fade-up","data-aos-delay":"100",children:(0,Dt.jsx)(eo,{...t,alignment:"start",hasBottomSpacing:!0})})}),e&&e.length>0&&(0,Dt.jsx)("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:e.map((o,r)=>(0,Dt.jsx)("div",{"data-aos":"fade-up","data-aos-delay":er([200,400,600],r),className:"w-full h-full md:w-1/2 md:px-4 lg:w-1/3",children:(0,Dt.jsx)(bm,{...o,base:a})},r))})]})}var fm=l("inline-flex items-center gap-2 text-white"),F1=l("text-sm text-white");function bm({slug:e,meta:t,authors:a,title:o,publishedAt:r,categories:s,base:i}){var n,c,m,d;return(0,Dt.jsxs)("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[(0,Dt.jsx)("span",{className:"absolute inset-0 z-[2] "}),(0,Dt.jsx)(Kn.default,{src:((n=t==null?void 0:t.image)==null?void 0:n.url)||"/assets/images/brand/cortex-reply-gradient.png",alt:((c=t==null?void 0:t.image)==null?void 0:c.alt)||"Blog image",fill:!0,sizes:`
18
+ dark bg-background text-primary`,children:[(0,Dt.jsxs)("div",{className:"flex px-6 items-center space-Dt-2",children:[a&&(0,Dt.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,Dt.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,Dt.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,Dt.jsx)("div",{ref:s,className:"preview-container"})]})},hc=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=Mo(e),o=(0,ml.useRef)(null),r=(0,ml.useRef)(null),s=(0,ml.useRef)(new kh.Previewer),[i,n]=(0,ml.useState)(0),m=[{kl:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,ml.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,ml.useEffect)(()=>{s.current=new kh.Previewer,d()},[d,t]),(0,ml.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,Dt.jsxs)("div",{className:"pagedjs-container",children:[(0,Dt.jsx)("div",{kl:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:m.map((p,u)=>{var g,v;return(0,Dt.jsx)(Dt.Fragment,{children:u===0?(0,Dt.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,Dt.jsx)(Tr,{hero:e.hero,title:e.title})},u):(0,Dt.jsxs)("section",{className:l("pagedjs-section normal-page h-[699px]",`h-[${du("185mm")}px]`,((v=(g=p.theme)==null?void 0:g.settings)==null?void 0:v.theme)==="dark"?"dark":"light"),children:[p.blockName&&(0,Dt.jsx)(Rr,{title:p.blockName}),(0,Dt.jsx)(ho,{blocks:[p],fill:!0})]},u)})})}),(0,Dt.jsx)("div",{ref:o,className:"preview-container"})]})};var xn=y(require("clsx"));function cu({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:i,loading:n=!1,LinkComponent:c,...m}){let p=c?u=>(0,Dt.jsx)(c,{...u}):i?({href:u,children:g,...v})=>(0,Dt.jsx)("button",{onClick:()=>i&&i(u),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...v,children:g}):u=>(0,Dt.jsx)("a",{...u});return(0,Dt.jsxs)(ao,{...m,variant:"inset",children:[(0,Dt.jsx)(oo,{children:(0,Dt.jsx)(ft,{children:(0,Dt.jsx)(Xe,{children:n?(0,Dt.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Dt.jsx)(ke,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Dt.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,Dt.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,Dt.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),n&&(0,Dt.jsxs)(Ea,{children:[(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"}),(0,Dt.jsx)(ke,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Dt.jsxs)(Ea,{children:[e&&!n&&e.map((u,g)=>(0,Dt.jsx)(mu,{subNav:u,pathName:r,Link:p},g)),(0,Dt.jsx)(Mt,{className:"mt-auto",children:(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(ft,{children:t&&!n&&t.map(u=>(0,Dt.jsx)(Xe,{children:(0,Dt.jsx)(At,{asChild:!0,size:"sm",children:(0,Dt.jsxs)(p,{href:u.url||"",children:[u.icon&&(0,Dt.jsx)(u.icon,{}),(0,Dt.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,Dt.jsx)(ro,{})]})}function mu({subNav:e,pathName:t,Link:a}){var s,i;let o=e,r=!1;return o.links&&o.links.map(n=>{n.url===t&&(r=!0)}),(0,Dt.jsx)(da,{defaultOpen:!0,className:"group/collapsible",children:(0,Dt.jsx)(Mt,{className:"py-0",children:(0,Dt.jsx)(ft,{children:(0,Dt.jsx)(da,{asChild:!0,defaultOpen:o.isActive,children:(0,Dt.jsxs)(Xe,{children:[(0,Dt.jsx)(At,{asChild:!0,tooltip:o.label,className:(0,xn.default)(r&&"font-bold text-accent"),children:(0,Dt.jsxs)(a,{href:o.url,children:[o.icon&&(0,Dt.jsx)(o.icon,{}),(0,Dt.jsx)("span",{children:o.label})]})}),(s=o.links)!=null&&s.length?(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(Ia,{asChild:!0,children:(0,Dt.jsxs)(dr,{className:"data-[state=open]:rotate-90",children:[(0,Dt.jsx)(El.ChevronRight,{}),(0,Dt.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Dt.jsx)(La,{children:(0,Dt.jsx)(za,{children:(i=o.links)==null?void 0:i.map(n=>(0,Dt.jsx)(Ha,{children:(0,Dt.jsx)(Fa,{asChild:!0,className:(0,xn.default)(n.url===t&&"font-bold text-accent"),children:(0,Dt.jsx)(a,{href:n.url,children:(0,Dt.jsx)("span",{children:n.label})})})},n.label))})})]}):null]})},o.label)})})})}var xc=y(require("clsx"));var pu=()=>(0,Dt.jsx)(Ye,{iconName:"github",size:"10x"});function uu({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:i,onPrintDocument:n,onGithubClick:c,onNavClick:m,LinkComponent:d,...p}){let v=d?f=>(0,Dt.jsx)(d,{...f}):m?({item:f,children:h,...k})=>(0,Dt.jsx)("button",{onClick:()=>m&&m(f),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...k,children:h}):f=>(0,Dt.jsx)("a",{href:f.href,...f});return(0,Dt.jsxs)(ao,{side:"right",variant:"inset",...p,children:[(0,Dt.jsxs)(oo,{className:"border-b border-sidebar-border",children:[(0,Dt.jsxs)(ft,{className:"flex-row space-Dt-1",children:[(0,Dt.jsx)(Xe,{children:(0,Dt.jsxs)(At,{onClick:s,children:[(0,Dt.jsx)(El.FilePlus,{})," ",(0,Dt.jsx)("span",{children:"Add Document"})]})}),c&&(0,Dt.jsx)(Xe,{children:(0,Dt.jsx)(At,{onClick:c,tooltip:"Open in GitHub",children:(0,Dt.jsx)(pu,{})})})]}),(0,Dt.jsxs)(ft,{className:"flex-row space-Dt-1",children:[(0,Dt.jsx)(Xe,{className:"w-5/12",children:(0,Dt.jsxs)(At,{onClick:()=>i(),variant:r?"outline":"default",className:(0,xc.default)(r&&"text-accent"),children:[(0,Dt.jsx)(El.Edit,{})," ",(0,Dt.jsx)("span",{children:"Edit"})]})}),(0,Dt.jsx)(Xe,{className:"w-5/12",children:(0,Dt.jsxs)(At,{onClick:n,children:[(0,Dt.jsx)(El.Printer,{})," ",(0,Dt.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(da,{defaultOpen:!0,className:"group/collapsible",children:(0,Dt.jsxs)(Mt,{children:[(0,Dt.jsx)(ma,{asChild:!0,children:(0,Dt.jsxs)(Ia,{children:["Editor Controls",(0,Dt.jsx)(El.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(La,{children:a})})]})}),(0,Dt.jsx)(lr,{className:"mx-0"})]}),(0,Dt.jsxs)(Ea,{className:"overflow-auto",children:[o&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsxs)(Mt,{children:[(0,Dt.jsx)(ma,{children:"Related Content"}),(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(ft,{children:Array.from({length:3}).map((f,h)=>(0,Dt.jsx)(Xe,{children:(0,Dt.jsx)(ke,{className:"bg-gray-200 w-full h-10"})},h))})})]}),(0,Dt.jsxs)(Mt,{children:[(0,Dt.jsx)(ma,{children:"Table of Contents"}),(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(ft,{children:Array.from({length:3}).map((f,h)=>(0,Dt.jsx)(Xe,{children:(0,Dt.jsx)(ke,{className:"bg-gray-200 w-full h-10"})},h))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,Dt.jsx)(da,{defaultOpen:!0,className:"group/collapsible",children:(0,Dt.jsxs)(Mt,{children:[(0,Dt.jsx)(ma,{asChild:!0,children:(0,Dt.jsxs)(Ia,{children:["Related Content",(0,Dt.jsx)(El.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(La,{children:(0,Dt.jsx)(ft,{children:e&&Object.keys(e).map(f=>(0,Dt.jsxs)(Xe,{children:[(0,Dt.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",f.charAt(0).toUpperCase()+f.slice(1)]}),f&&e[f]&&(0,Dt.jsx)(za,{children:e[f].map(h=>(0,Dt.jsx)(Ha,{children:(0,Dt.jsx)(Fa,{asChild:!0,isActive:!1,size:"sm",children:(0,Dt.jsxs)(v,{href:h.url,item:h,className:"flex justify-between items-center w-full text-xs",children:[(0,Dt.jsx)("span",{children:h.label}),h.type==="note"&&(0,Dt.jsx)(El.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),h.type==="draft"&&(0,Dt.jsx)(Ye,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},h.label))})]},f))})})})]})}),t&&!o&&(0,Dt.jsx)(da,{defaultOpen:!0,className:"group/collapsible",children:(0,Dt.jsxs)(Mt,{children:[(0,Dt.jsx)(ma,{asChild:!0,children:(0,Dt.jsxs)(Ia,{children:["Table of Contents",(0,Dt.jsx)(El.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,Dt.jsx)(Gt,{children:(0,Dt.jsx)(La,{children:(0,Dt.jsx)(ft,{children:t.map(f=>{var h;return(0,Dt.jsxs)(Xe,{children:[(0,Dt.jsx)(At,{asChild:!0,children:(0,Dt.jsx)("a",{href:`#${f.url}`,className:"text-xs",children:f.title})}),(h=f.items)!=null&&h.length?(0,Dt.jsx)(za,{children:f.items.map(k=>(0,Dt.jsx)(Ha,{children:(0,Dt.jsx)(Fa,{asChild:!0,isActive:k.isActive,size:"sm",children:(0,Dt.jsx)("a",{href:`#${k.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,Dt.jsx)("span",{children:k.title})})})},k.title))}):null]},f.title)})})})})]})})]}),(0,Dt.jsx)(ro,{})]})}var Nc=y(require("next/image"));function fu({title:e,members:t}){return(0,Dt.jsx)(Te,{className:"mb-6",children:(0,Dt.jsxs)("div",{className:"p-6",children:[(0,Dt.jsxs)("div",{className:"flex items-center mb-4",children:[(0,Dt.jsx)(El.Users,{className:"w-6 h-6 text-accent mr-2"}),(0,Dt.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:e})]}),(0,Dt.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-4",children:[(0,Dt.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,Dt.jsx)(Nc.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Cc=y(require("next/link"));var gu=({links:e,title:t="Related Content"})=>(0,Dt.jsxs)(Te,{children:[(0,Dt.jsx)(qe,{children:(0,Dt.jsx)(Ke,{className:"text-accent",children:t})}),(0,Dt.jsx)(Oe,{children:(0,Dt.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,Dt.jsxs)(Cc.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,Dt.jsx)(El.ExternalLink,{className:"ml-1 h-3 w-3"})]},o))})})]});var wn=l("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 Nn({pages:e}){let t=(0,oc.useSearchParams)(),a=(0,oc.usePathname)(),{replace:o}=(0,oc.useRouter)(),{totalPages:r,page:s}=e,[i,n]=(0,ml.useState)({start:s>3?s-3:1,end:s+2}),c=p=>{p==="left"&&i.start>1?n(u=>({start:u.start-1,end:u.end-1})):p==="right"&&i.end<r&&n(u=>({start:u.start+1,end:u.end+1}))};function m(p){let u=new URLSearchParams(t);p?u.set("page",p):u.delete("page"),o(`${a}?${u.toString()}`)}if(r<=1)return null;let d=[];for(let p=i.start;p<=i.end;p++)d.push(p);return(0,Dt.jsx)("div",{className:"mt-12",children:(0,Dt.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[i.start>1&&(0,Dt.jsx)("li",{children:(0,Dt.jsx)("button",{className:l(wn,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>c("left"),children:(0,Dt.jsx)(yd.FaArrowLeft,{})})}),d.map((p,u)=>(0,Dt.jsx)("li",{children:(0,Dt.jsx)("a",{className:l(wn,p===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:g=>{g.preventDefault(),m(p.toString())},children:p})},u)),i.end<r&&(0,Dt.jsx)("li",{children:(0,Dt.jsx)("button",{className:l(wn,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>c("right"),children:(0,Dt.jsx)(yd.FaArrowRight,{})})})]})})}var iy=l("transition-colors duration-400 hover:text-primary ease-in-out");function Cn({title:e,links:t}){let a=(0,oc.useSearchParams)(),o=(0,oc.usePathname)(),{replace:r}=(0,oc.useRouter)();function s(i){let n=new URLSearchParams(a);i?n.set("category",i):n.delete("category"),r(`${o}?${n.toString()}`)}return(0,Dt.jsxs)(Te,{children:[(0,Dt.jsx)(qe,{children:(0,Dt.jsx)(Ke,{className:"text-accent",children:e&&e})}),(0,Dt.jsx)(Oe,{children:t&&t.length>0&&(0,Dt.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Dt.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((i,n)=>(0,Dt.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(i.href)},children:[i.label,(0,Dt.jsx)(El.ExternalLink,{className:"ml-1 h-3 w-3"})]},n))})})})]})}function kn({types:e}){let[t,a]=(0,ml.useState)(e&&e[0].href),o=(0,oc.useSearchParams)(),r=(0,oc.usePathname)(),{replace:s}=(0,oc.useRouter)();function i(n){let c=new URLSearchParams(o);n?c.set("type",n):c.delete("type"),a(n),s(`${r}?${c.toString()}`)}return(0,Dt.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-Dt-auto pb-4 mb-6",children:e&&e.map((n,c)=>(0,Dt.jsx)(A,{variant:n.href===t?"default":"ghost",className:l("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:()=>i(n.href),children:n.label},c))})}var Ac=y(require("next/image"));function et({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=l("container",t&&"full-width",a&&"no-padding",o);return(0,Dt.jsx)("div",{className:r,children:e})}var Dc=require("next-themes");function bu({children:e,...t}){return(0,Dt.jsx)(Dc.ThemeProvider,{...t,children:e})}var it=({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,$.jsx)("div",{className:"w-full h-[1240px] z-20",children:(0,$.jsxs)("svg",{kl:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:l(t,"absolute -bottom-[2px] flex"),children:[(0,$.jsx)("defs",{children:(0,$.jsxs)("mask",{kl:"mask",children:[(0,$.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,$.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0","stroke-width":"2"})]})}),(0,$.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,$.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,$.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,$.jsxs)("svg",{kl:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:l(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,$.jsx)("defs",{children:(0,$.jsxs)("mask",{kl:"mask",children:[(0,$.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,$.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,$.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,$.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,$.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,$.jsxs)("svg",{kl:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:l(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,$.jsx)("defs",{children:(0,$.jsxs)("mask",{kl:"mask",children:[(0,$.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,$.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,$.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,$.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,$.jsx)("svg",{kl:"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:l(t,"w-full block overflow-hidden"),children:(0,$.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,$.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,$.jsx)("svg",{kl:"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:l(t,"w-full block overflow-hidden"),transform:a[3],children:(0,$.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,$.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,$.jsx)("svg",{kl:"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:l(t,"w-full block overflow-hidden"),children:(0,$.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},vu=({className:e})=>(0,$.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:l(e,"absolute w-full h-full"),children:[(0,$.jsx)("defs",{children:(0,$.jsxs)("mask",{kl:"mask",children:[(0,$.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,$.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,$.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Sn=({links:e,media:t,children:a,richText:o})=>(0,Dt.jsx)("div",{children:(0,Dt.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,Dt.jsxs)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,Dt.jsx)(q,{className:"max-w-none mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,Dt.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,Dt.jsx)("li",{children:(0,Dt.jsx)(Xt,{...r})},s))})]}),(0,Dt.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,Dt.jsx)(qt,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,Dt.jsx)("div",{children:(0,Dt.jsx)(Ac.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Dt.jsx)("span",{className:"absolute inset-0 bg-gradient-Dt-b from-white dark:from-black"})]}),(0,Dt.jsx)(it,{className:"text-black z-10",position:"header"})]})});var Rn=y(require("next/image"));var hu=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,Dt.jsx)(Rn.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,Dt.jsx)("div",{children:(0,Dt.jsx)(Rn.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},Tn=({links:e,media:t,children:a,richText:o})=>(0,Dt.jsxs)("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&(0,Dt.jsx)(hu,{media:t}),(0,Dt.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,Dt.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,Dt.jsx)(q,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var Dn=({children:e,richText:t})=>(0,Dt.jsx)("div",{className:"min-w-full py-10 bg-muted mt-24",children:(0,Dt.jsx)("div",{className:"container",children:e||t&&(0,Dt.jsx)(q,{content:t,enableGutter:!1})})});var Lc=y(require("react")),Bc=y(require("next/image"));var Ic=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,i=r<10?`0${r}`:r,n=a.getFullYear();return`${i}/${s}/${n}`};var Rs=e=>{let t=e?new Date(e):new Date,a=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(t),o=t.getDate(),r=new Intl.DateTimeFormat("en-US",{month:"short"}).format(t);return`${a} ${o}${(i=>{if(i>3&&i<21)return"th";switch(i%10){case 1:return"Dt";case 2:return"Dt";case 3:return"rd";default:return"th"}})(o)} ${r}`};var yu=({post:e})=>{var i;let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,Dt.jsxs)("div",{className:"relative grid pt-24",children:[(0,Dt.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,Dt.jsxs)("div",{className:"container mx-auto",children:[(0,Dt.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,Dt.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,Dt.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Dt.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,Dt.jsx)("p",{children:o.map((n,c)=>(0,Dt.jsxs)(Lc.default.Fragment,{children:[n.name,c<o.length-2&&", ",c===o.length-2&&(o.length>2?", and ":" and ")]},n.kl))})]}),r&&(0,Dt.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Dt.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,Dt.jsx)("time",{dateTime:r,children:Ic(r)})]}),t&&t.length>0&&(0,Dt.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,Dt.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,Dt.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,c)=>typeof n=="object"&&n!==null&&(0,Dt.jsx)(Bt,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.kl||c))})]})]})]})}),(0,Dt.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,Dt.jsx)(Bc.default,{className:"object-cover",alt:`Cover image for ${s}`,src:((i=a==null?void 0:a.image)==null?void 0:i.url)||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,Dt.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-Dt-t from-background dark:from-black Dt-transparent"})]})]})};var Ts=require("@heroicons/react/20/solid");var Mn=y(require("next/image"));var An=({title:e,image:t})=>(0,Dt.jsx)("div",{children:(0,Dt.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,Dt.jsx)("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-start",children:(0,Dt.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,Dt.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,Dt.jsx)(Mn.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,Dt.jsx)("div",{children:(0,Dt.jsx)(Mn.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,Dt.jsx)("span",{className:"absolute inset-0 bg-gradient-Dt-b from-white dark:from-black"})]}),(0,Dt.jsx)(it,{className:"text-black z-10",position:"header"})]})});var xu={highImpact:Sn,lowImpact:Dn,mediumImpact:Tn,sectionHero:An},wu=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=xu[t];return a?(0,$e.jsx)(a,{...e}):null};function Nu({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,$e.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,$e.jsxs)("ol",{role:"list",className:"flex items-center space-Dt-4",children:[(0,$e.jsx)("li",{children:(0,$e.jsx)("div",{children:(0,$e.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,$e.jsx)(Ts.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,$e.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,$e.jsx)("li",{children:(0,$e.jsxs)("div",{className:"flex items-center",children:[(0,$e.jsx)(Ts.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,$e.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,$e.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,$e.jsx)($e.Fragment,{})}var kt=require("@headlessui/react"),As=require("@heroicons/react/24/outline");var Cu=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Dt.jsx)("a",{href:o,className:"flex items-center gap-Dt-1 text-sm text-foreground group",children:(0,Dt.jsxs)("span",{className:"relative",children:[e,(0,Dt.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-Dt-1/2 scale-Dt-0 transition-transform duration-300 ease-in-out group-hover:scale-Dt-100"})]})}):(0,Dt.jsxs)(kt.Popover,{children:[(0,Dt.jsxs)(kt.PopoverButton,{className:"flex items-center gap-Dt-1 text-sm/6 text-foreground outline-none group",children:[(0,Dt.jsxs)("span",{className:"relative",children:[e,(0,Dt.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-Dt-1/2 scale-Dt-0 transition-transform duration-300 ease-in-out group-hover:scale-Dt-100"})]}),(0,Dt.jsx)(Ts.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,Dt.jsxs)(kt.PopoverPanel,{transition:!0,className:"absolute inset-Dt-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,Dt.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-Dt-4 px-6 py-10 lg:px-8 xl:gap-Dt-8 z-50",children:t&&t.map(r=>(0,Dt.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,Dt.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,Dt.jsx)(Ec,{icon:r.icon,size:"4x"})}),(0,Dt.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Dt.jsx)("span",{className:"absolute inset-0"})]}),(0,Dt.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Dt.jsx)("div",{className:"bg-gray-50",children:(0,Dt.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Dt.jsx)("div",{className:"grid grid-cols-3 divide-Dt divide-gray-900/5 border-Dt border-gray-900/5",children:a.map(r=>(0,Dt.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-Dt-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Dt.jsx)(Ec,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Ec=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Dt.jsx)(Ye,{...e,size:a});if("src"in e)return(0,Dt.jsx)("div",{className:l(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Dt.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Ds=Cu;var Ms=["light","dark","green"];function Pu({title:e,logo:t,menuItems:a}){let[o,r]=(0,ml.useState)(!1),[s,i]=(0,ml.useState)(!1),[n,c]=(0,ml.useState)("light"),m=t==null?void 0:t.split(".")[0],d=t==null?void 0:t.split(".")[1],[p,u]=(0,ml.useState)(`${m}.${d}`),g=f=>{Ms.includes(f)?u(f==="light"?`${m}.${d}`:`${m}-${f}.${d}`):u(`${m}.${d}`)};(0,ml.useEffect)(()=>{let f=localStorage.getItem("theme")||"light";c(f),document.documentElement.setAttribute("class",f),g(f)},[]);let v=()=>{let f=Ms[(Ms.indexOf(n)+1)%Ms.length];c(f),document.documentElement.setAttribute("class",f),localStorage.setItem("theme",f),g(f)};return(0,Dt.jsxs)("header",{className:"relative isolate z-10 bg-background h-14",children:[(0,Dt.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,Dt.jsx)("div",{className:"flex lg:flex-1",children:(0,Dt.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Dt.jsx)("span",{className:"sr-only",children:e}),(0,Dt.jsx)("img",{alt:e,src:p,className:"h-9 w-auto"})]})}),(0,Dt.jsx)("div",{className:"flex lg:hidden",children:(0,Dt.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,Dt.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Dt.jsx)(As.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,Dt.jsx)(kt.PopoverGroup,{className:"hidden lg:flex lg:gap-Dt-12",children:a.map(f=>(0,Dt.jsx)(Ds,{...f},f.name))}),(0,Dt.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,Dt.jsx)("button",{onClick:v,className:"p-2 text-gray-700 outline-none",children:n==="dark"?(0,Dt.jsx)(Ts.SunIcon,{className:"h-6 w-6"}):n==="green"?(0,Dt.jsx)(Ts.MoonIcon,{className:"h-6 w-6"}):(0,Dt.jsx)(Ts.SunIcon,{className:"h-6 w-6"})})})]}),(0,Dt.jsxs)(kt.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,Dt.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Dt.jsxs)(kt.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,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,Dt.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,Dt.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Dt.jsx)(As.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Dt.jsx)("div",{className:"mt-6 flow-root",children:(0,Dt.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Dt.jsx)("div",{className:"space-y-2 py-6",children:a.map(f=>(0,Dt.jsx)(ku,{...f},f.name))})})})]})]})]})}function ku({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Dt.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,Dt.jsxs)(kt.Disclosure,{Dt:"div",className:"-mx-3",children:[(0,Dt.jsx)(kt.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,Dt.jsx)(kt.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Dt.jsx)(kt.DisclosureButton,{Dt:"a",href:r.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function Su({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let i=()=>{let n=document.getElementById("next-section");n&&n.scrollIntoView({behavior:"smooth"})};return(0,Dt.jsx)("div",{children:(0,Dt.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,Dt.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,Dt.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,Dt.jsx)("div",{className:"fixed inset-0 h-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,Dt.jsx)(et,{children:(0,Dt.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 mb-10 z-0 md:mb-0",children:[(0,Dt.jsx)("h1",{className:"text-5xl md:text-7xl mb-6",children:r&&r}),(0,Dt.jsx)("div",{className:"text-lg md:text-2xl text-gray-300 mb-8 max-w-lg",children:s&&s})]})})}),(0,Dt.jsx)(it,{className:"text-black z-10",position:"header"})]})})}var In=y(require("next/image"));function Ka({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Dt.jsxs)(We,{href:"/",className:l(a?"py-1":"py-2"),children:[(0,Dt.jsx)(In.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,Dt.jsx)(In.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 Ln({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[i,n]=(0,ml.useState)(!1),[c,m]=(0,ml.useState)(""),d=["light","dark"],{theme:p,setTheme:u}=(0,Dc.useTheme)();(0,ml.useEffect)(()=>{m(p||"dark")},[p]);let g=()=>{let v=d[(d.indexOf(c)+1)%d.length];m(v),u(v)};return(0,ml.useEffect)(()=>{let v=()=>{window.scrollY>100?n(!0):n(!1)};return window.addEventListener("scroll",v,{passive:!0}),()=>window.removeEventListener("scroll",v)},[]),(0,Dt.jsx)(Dt.Fragment,{children:(0,Dt.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${i||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Dt.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,Dt.jsxs)("div",{className:l("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,Dt.jsx)(Ka,{logoDark:a,logoLight:t}),(0,Dt.jsx)(kt.PopoverGroup,{className:"hidden lg:flex lg:gap-Dt-12",children:o&&o.map(v=>(0,Dt.jsx)(Ds,{...v},v.name))}),r&&(0,Dt.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:g,children:(0,Dt.jsxs)("div",{className:"relative",children:[(0,Dt.jsx)(El.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Dt.jsx)(El.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Bn=["light","dark"];function En({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,ml.useState)(!1),{theme:i,setTheme:n}=(0,Dc.useTheme)(),[c,m]=(0,ml.useState)(!1),[d,p]=(0,ml.useState)("light");(0,ml.useEffect)(()=>{let g=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",g,{passive:!0}),()=>window.removeEventListener("scroll",g)},[]),(0,ml.useEffect)(()=>{p(i||"dark")},[i]);let u=()=>{let g=Bn[(Bn.indexOf(d)+1)%Bn.length];p(g),n(g)};return(0,Dt.jsx)(Dt.Fragment,{children:(0,Dt.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,Dt.jsx)("nav",{className:l("backdrop-blur-sm text-white p-0",c&&"hidden"),children:(0,Dt.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&Dt.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Dt.jsx)(Ka,{logoDark:t,logoLight:e,mobile:!0}),(0,Dt.jsx)("div",{className:"flex items-center space-Dt-4",children:(0,Dt.jsxs)("button",{type:"button",onClick:()=>m(!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,Dt.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Dt.jsx)(As.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,Dt.jsxs)(kt.Dialog,{open:c,onClose:m,className:"lg:hidden",children:[(0,Dt.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Dt.jsxs)(kt.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,Dt.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Dt.jsx)(Ka,{logoDark:t,logoLight:e,mobile:!0}),(0,Dt.jsxs)("button",{type:"button",onClick:()=>m(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Dt.jsx)(As.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Dt.jsx)("div",{className:"mt-6 flow-root",children:(0,Dt.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Dt.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(g=>(0,Dt.jsx)(Ru,{...g},g.name))})})})]})]})]})})}function Ru({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Dt.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,Dt.jsxs)(kt.Disclosure,{Dt:"div",className:"-mx-3",children:[(0,Dt.jsx)(kt.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Dt.jsx)(kt.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Dt.jsx)(kt.DisclosureButton,{Dt:"a",href:r.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var dx=l("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),_c=l("text-brand-green text-md leading-[1.25] md:text-lg mb-5 md:mb-[1.5rem]"),zn=l("bg-brand-green rounded-full p-3 mr-4 text-2xl"),Hn=l("flex items-center text-white gap-3"),Bs=l("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Tu({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:i,footerBottom:n}=t,c=void 0;return(0,Dt.jsxs)("footer",{className:l("sticky z-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,Dt.jsx)("div",{className:"py-16 md:py-20",children:(0,Dt.jsx)("div",{className:"container",children:(0,Dt.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 xl:grid-cols-3",children:[(0,Dt.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,Dt.jsx)(Ka,{logoDark:o,logoLight:a}),(0,Dt.jsx)("p",{className:"mb-7 mt-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,Dt.jsx)("nav",{"aria-label":"social links",children:(0,Dt.jsx)("ul",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((m,d)=>(0,Dt.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,Dt.jsx)(We,{"aria-label":m.href,className:"text-2xl",href:m.href,openNewTab:!0,children:(0,Dt.jsx)("span",{children:m.icon})})},d))})})]}),(0,Dt.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,Dt.jsx)("h3",{className:_c,children:s.title}),s.links&&s.links.length>0&&(0,Dt.jsx)("nav",{"aria-label":"footer links navigation",children:(0,Dt.jsx)("ul",{className:"grid pl-0 gap-2",children:s.links.map(m=>(0,Dt.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,Dt.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,Dt.jsx)(yd.FaChevronRight,{})}),(0,Dt.jsx)(We,{href:m.href,openNewTab:m.openNewTab,className:Bs,children:m.label})]},m.label))})})]}),(0,Dt.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,Dt.jsx)("h3",{className:_c,children:i.title}),(0,Dt.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,Dt.jsxs)("li",{className:Hn,children:[(0,Dt.jsx)("span",{className:zn,children:(0,Dt.jsx)(yd.FaPaperPlane,{})}),(0,Dt.jsx)("address",{className:"not-italic",children:i.location})]}),(0,Dt.jsxs)("li",{className:Hn,children:[(0,Dt.jsx)("span",{className:zn,children:(0,Dt.jsx)(yd.FaEnvelope,{})}),i.mails&&i.mails.length>0&&(0,Dt.jsx)("div",{className:"grid gap-1",children:i.mails.map((m,d)=>(0,Dt.jsx)("a",{href:`mailto:${m}`,className:Bs,children:m},d))})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&(0,Dt.jsxs)("li",{className:Hn,children:[(0,Dt.jsx)("span",{className:zn,children:(0,Dt.jsx)(yd.FaPhone,{})}),(0,Dt.jsx)("div",{className:"grid gap-1",children:i.phoneNumbers.map((m,d)=>(0,Dt.jsx)("a",{href:`tel:${m.split(" ").join("")}`,className:Bs,children:m},d))})]})]})]})]})})}),(0,Dt.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,Dt.jsx)("div",{className:"container",children:(0,Dt.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-Dt-8 gap-y-4 md:gap-Dt-10",children:[(0,Dt.jsx)("p",{children:n.copyrightText}),n.links&&n.links.length>0&&(0,Dt.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,Dt.jsx)("ul",{className:"flex flex-wrap items-center gap-Dt-4 md:gap-Dt-7",children:n.links.map(m=>(0,Dt.jsx)("li",{children:(0,Dt.jsx)(We,{"aria-label":`Dt Dt page ${m.label}`,href:m.href,openNewTab:m.openNewTab,className:Bs,children:m.label})},m.label))})})]})})})]})}function Du({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:i=!1}){return(0,Dt.jsxs)("div",{className:l("fixed top-0 left-0 right-0 z-50",r),children:[(0,Dt.jsx)(Ln,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:i,wide:s}),(0,Dt.jsx)(En,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function Fn({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,ml.useState)([]),s=(0,oc.useRouter)(),i=()=>{o.length===e.length?r([]):r(e.map(d=>d.kl))},n=d=>{r(p=>p.includes(d)?p.filter(u=>u!==d):[...p,d])},c=async()=>{let d=await t(o);d.success?(Zi.toast.success(d.message),s.refresh()):Zi.toast.error(`Error: ${d.message}`),r([])},m=async()=>{let d=await a(o);d.success?(Zi.toast.success(d.message),s.refresh()):Zi.toast.error(`Error: ${d.message}`),r([])};return(0,Dt.jsxs)("div",{className:"space-y-4",children:[(0,Dt.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Dt.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Dt.jsxs)("div",{className:"space-Dt-2",children:[(0,Dt.jsx)(A,{onClick:c,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Dt.jsx)(A,{onClick:m,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Dt.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Dt.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,Dt.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("div",{className:"flex items-center",children:[(0,Dt.jsx)(Ut,{kl:"select-all",checked:o.length===e.length,onCheckedChange:i,className:"border-accent"}),(0,Dt.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Dt.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,Dt.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("div",{className:"flex items-center",children:[(0,Dt.jsx)(Ut,{kl:`select-${d.kl}`,checked:o.includes(d.kl),onCheckedChange:()=>n(d.kl),className:"border-accent"}),(0,Dt.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Dt.jsxs)(fa,{className:"h-10 w-10",children:[(0,Dt.jsx)(ga,{src:d.userImage,alt:d.userName}),(0,Dt.jsx)(ba,{children:d.userName.split(" ").map(p=>p[0]).join("")})]}),(0,Dt.jsx)("div",{className:"ml-3",children:(0,Dt.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2",children:[(0,Dt.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,Dt.jsx)(Bt,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.kl))]})}),(0,Dt.jsx)(Zi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var On=require("date-fns");var $c=[{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 Lr=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=$c.some(r=>r.date.toISOString()===e.toISOString());return t||a||o},Vc=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!Lr(o))return .5;for(;o<=r;)Lr(o)||s++,o.setDate(o.getDate()+1);return s},Wc=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var Mu=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,Dt.jsx)("div",{className:"flex space-Dt-2",children:e.map((r,s)=>(0,Dt.jsx)(A,{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 jn({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,ml.useState)(new Date),[r,s]=(0,ml.useState)(new Date),[i,n]=(0,ml.useState)("Full Day"),[c,m]=(0,ml.useState)(!1),[d,p]=(0,ml.useState)(1),u=(0,oc.useRouter)();(0,ml.useEffect)(()=>{let f=Wc(a,r);m(f),f&&n("Full Day")},[a,r]),(0,ml.useEffect)(()=>{if(!a||!r){p(0);return}let f=Vc(a,r,i!=="Full Day");p(f)},[a,r,i]);let g=f=>{n(f)};return(0,Dt.jsxs)("div",{className:"max-w-2xl",children:[(0,Dt.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,Dt.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,Dt.jsxs)("form",{onSubmit:async f=>{if(f.preventDefault(),!a||!r){Zi.toast.error("Please select both start and end dates");return}if(d>e){Zi.toast.error("You do not have enough leave days remaining");return}let h=new FormData;h.append("startDate",a.toISOString()),h.append("endDate",r.toISOString()),h.append("leaveType",i),h.append("duration",d.toString());let k=await(t||Au)(h);k.success?(Zi.toast.success(k.message),o(void 0),s(void 0),n("Full Day"),u.refresh()):Zi.toast.error(`Error: ${k.message}`)},className:"space-y-4",children:[(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Dt.jsx)(ve,{htmlFor:"startDate",children:"Start Date"}),(0,Dt.jsxs)(vr,{children:[(0,Dt.jsx)(hr,{asChild:!0,children:(0,Dt.jsxs)(A,{variant:"outline",className:l("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,Dt.jsx)(El.CalendarIcon,{className:"mr-2 h-4 w-4"}),a?(0,On.format)(a,"PPP"):(0,Dt.jsx)("span",{children:"Pick a date"})]})}),(0,Dt.jsx)(Ho,{className:"w-auto p-0",align:"start",children:(0,Dt.jsx)(wr,{mode:"single",selected:a,onSelect:f=>{o(f),f&&(!r||f>r)&&s(f)},initialFocus:!0})})]})]}),(0,Dt.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Dt.jsx)(ve,{htmlFor:"endDate",children:"End Date"}),(0,Dt.jsxs)(vr,{children:[(0,Dt.jsx)(hr,{asChild:!0,children:(0,Dt.jsxs)(A,{variant:"outline",className:l("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Dt.jsx)(El.CalendarIcon,{className:"mr-2 h-4 w-4"}),r?(0,On.format)(r,"PPP"):(0,Dt.jsx)("span",{children:"Pick a date"})]})}),(0,Dt.jsx)(Ho,{className:"w-auto p-0",align:"start",children:(0,Dt.jsx)(wr,{mode:"single",selected:r,onSelect:s,disabled:f=>a?f<a:!1,initialFocus:!0})})]})]})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(ve,{children:"Leave Type"}),(0,Dt.jsx)(Mu,{options:["Full Day","Morning","Afternoon"],value:i,onChange:g,disabled:[!1,c,c]})]}),(0,Dt.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,Dt.jsx)(A,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Dt.jsx)(Zi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Au=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function Xc(...e){return e.filter(Boolean).join(" ")}function Gn({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))},i=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},n=()=>{t(new Date)},c=m=>m.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Dt.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Dt.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Dt.jsxs)("div",{className:"sm:flex-auto",children:[(0,Dt.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Dt.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Dt.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Dt.jsxs)(A,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Dt.jsx)(El.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Dt.jsx)(A,{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,Dt.jsxs)(A,{onClick:i,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Dt.jsx)(El.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,Dt.jsx)("div",{className:"mt-8 flow-root",children:(0,Dt.jsx)("div",{className:"-mx-4 -my-2 overflow-Dt-auto sm:-mx-6 lg:-mx-8",children:(0,Dt.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,Dt.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,Dt.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Dt.jsxs)("tr",{children:[(0,Dt.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 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((m,d)=>{let p=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,Dt.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 ${Lr(p)?"bg-gray-200":""}`,children:[(0,Dt.jsx)("div",{children:c(p)}),(0,Dt.jsx)("div",{children:d+1})]},d)})]})}),(0,Dt.jsx)("tbody",{children:o.map((m,d)=>(0,Dt.jsxs)("tr",{children:[(0,Dt.jsx)("Dt",{className:Xc(d!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,Dt.jsxs)("div",{className:"flex items-center",children:[(0,Dt.jsxs)(fa,{className:"h-11 w-11",children:[(0,Dt.jsx)(ga,{src:m.image,alt:m.name}),(0,Dt.jsx)(ba,{children:m.name.split(" ").map(p=>p[0]).join("")})]}),(0,Dt.jsx)("div",{className:"ml-4",children:(0,Dt.jsx)("div",{className:"font-medium text-accent",children:m.name})})]})}),[...Array(r)].map((p,u)=>{let g=new Date(e.getFullYear(),e.getMonth(),u+1),v=a.find(f=>f.userId===m.kl&&new Date(f.startDate)<=g&&new Date(f.endDate)>=g);return(0,Dt.jsx)("Dt",{className:Xc(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Lr(g)?"bg-gray-200":""),children:(0,Dt.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${v?v.status==="approved"?"bg-green-500":v.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:v?`${m.name}: ${v.status} (${v.startDate} - ${v.endDate}) - ${v.leaveType}`:"",children:v&&v.leaveType!=="Full Day"&&(0,Dt.jsx)("div",{className:`h-3 w-6 ${v.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${m.kl}-${u}`)})]},m.kl))})]})})})})]})}function $n({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,ml.useState)(null),s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,i=Array.from({length:42},(d,p)=>{let u=new Date(e.getFullYear(),e.getMonth(),p-s+1);return{date:u,isCurrentMonth:u.getMonth()===e.getMonth(),isToday:u.toDateString()===new Date().toDateString(),holidays:a.filter(g=>new Date(g.startDate)<=u&&new Date(g.endDate)>=u)}}),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},c=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},m=()=>{t(new Date)};return(0,Dt.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Dt.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Dt.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Dt.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Dt.jsx)("div",{className:"flex items-center",children:(0,Dt.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Dt.jsxs)(A,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Dt.jsx)(El.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Dt.jsx)(A,{variant:"outline",onClick:m,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,Dt.jsxs)(A,{onClick:c,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Dt.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Dt.jsx)(El.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,Dt.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Dt.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,Dt.jsxs)("div",{className:"bg-white py-2",children:["Dt",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Dt"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Dt"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["W",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["F",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,Dt.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Dt.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,Dt.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto",children:[(0,Dt.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px",children:i.map(d=>(0,Dt.jsxs)("div",{className:l(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2"),children:[(0,Dt.jsx)("time",{dateTime:d.date.toISOString(),className:l("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,Dt.jsx)("ol",{className:"mt-2 space-y-1",children:d.holidays.map(p=>(0,Dt.jsx)("li",{children:(0,Dt.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.kl))})]},d.date.toISOString()))}),(0,Dt.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:i.map(d=>(0,Dt.jsxs)("button",{type:"button",className:l(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,Dt.jsx)("time",{dateTime:d.date.toISOString(),className:l("ml-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,Dt.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,Dt.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:d.holidays.map(p=>(0,Dt.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.kl))})]},d.date.toISOString()))})]})]})]})}var Ja=require("lucide-react");function qc(...e){return e.filter(Boolean).join(" ")}function Iu({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:i,rejectLeave:n}){let[c,m]=(0,ml.useState)("Calendar View"),d=(0,oc.useRouter)(),p=!1,u=(0,On.parseISO)(a),g=async f=>{let h=(0,On.format)(f,"dd-MM-yyyy"),k=new URL(window.location.href);return k.searchParams.set("date",h),d.push(k.toString()),{success:!0}};if(p)return(0,Dt.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Dt.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let v=[{name:"Grid View",icon:Ja.Grid,current:c==="Grid View"},{name:"Calendar View",icon:Ja.CalendarDays,current:c==="Calendar View"},{name:"Request Leave",icon:Ja.PlusCircle,current:c==="Request Leave"},{name:"Approve Leave",icon:Ja.CheckSquare,current:c==="Approve Leave"}];return(0,Dt.jsxs)("div",{className:"container fixed mx-auto p-4",children:[(0,Dt.jsxs)("div",{className:"mb-8",children:[(0,Dt.jsxs)("div",{className:"sm:hidden",children:[(0,Dt.jsx)("select",{value:c,onChange:f=>m(f.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:v.map(f=>(0,Dt.jsx)("option",{children:f.name},f.name))}),(0,Dt.jsx)(El.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,Dt.jsx)("div",{className:"hidden sm:block",children:(0,Dt.jsx)("div",{className:"border-b border-gray-200",children:(0,Dt.jsx)("nav",{className:"-mb-px flex space-Dt-8","aria-label":"Tabs",children:v.map(f=>(0,Dt.jsxs)("a",{onClick:()=>{(f.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&m(f.name)},className:qc(f.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",f.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":f.current?"page":void 0,children:[(0,Dt.jsx)(f.icon,{className:qc(f.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),(0,Dt.jsx)("span",{children:f.name})]},f.name))})})})]}),c==="Grid View"&&(0,Dt.jsx)(Gn,{currentDate:u,setCurrentDate:g,holidays:e,employees:r}),c==="Calendar View"&&(0,Dt.jsx)($n,{currentDate:u,setCurrentDate:g,holidays:e}),c==="Request Leave"&&(0,Dt.jsx)(jn,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:f=>s?s(f):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),c==="Approve Leave"&&(0,Dt.jsx)(Fn,{leaveRequests:o,onApprove:f=>i?i(f):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:f=>n?n(f):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function Vn({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:i}){var me,V,C,I,S;let[n,c]=(0,ml.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[m,d]=(0,ml.useState)(""),[p,u]=(0,ml.useState)(!1),[g,v]=(0,ml.useState)(null);(0,ml.useEffect)(()=>{u(JSON.stringify(e)!==JSON.stringify(n))},[e,n]);let f=async()=>{try{let b=await s(n);b.success?(u(!1),v(null)):console.error("Failed Dt save deal:",b.errors)}catch(b){console.error("Failed Dt save deal:",b)}},h=(b,N)=>{c(w=>({...w,[b]:N}))},k=b=>{let N=(n.categories||[]).includes(b)?(n.categories||[]).filter(w=>w!==b):[...n.categories||[],b];h("categories",N)},T=async()=>{if(m.trim()){let b={text:m,timestamp:new Date().toISOString()};try{let N=await i(b);if(!N.success){console.error("Failed Dt add comment:",N.errors);return}}catch(N){console.error("Failed Dt add comment:",N)}c(N=>({...N,comments:[...N.comments||[],b]})),d("")}},z=b=>{switch(b){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"}},L=b=>t==null?void 0:t.find(N=>N.kl===Number(b));return(0,Dt.jsx)(Lt,{open:!0,children:(0,Dt.jsxs)(Ct,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,Dt.jsxs)(Vt,{className:"flex flex-row items-center justify-between",children:[(0,Dt.jsx)(Wt,{className:"text-2xl font-bold",children:a==null?void 0:a.name}),(0,Dt.jsxs)("div",{className:"flex space-Dt-2",children:[(0,Dt.jsx)(A,{variant:"outline",onClick:r,children:"Close"}),(0,Dt.jsxs)(A,{onClick:f,disabled:!p,children:[(0,Dt.jsx)(El.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,Dt.jsxs)(ja,{className:"flex-grow pr-4",children:[(0,Dt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,Dt.jsx)("div",{className:"grid gap-2",children:g==="value"?(0,Dt.jsx)(ut,{type:"number",value:n.value,onChange:b=>h("value",Number(b.target.value)),onBlur:()=>v(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,Dt.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>v("value"),children:["\xA3",(me=n.value)==null?void 0:me.toLocaleString()]})}),(0,Dt.jsxs)("div",{className:"grid gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),g==="assignee"?(0,Dt.jsxs)(co,{value:((C=(V=n==null?void 0:n.assignee)==null?void 0:V.kl)==null?void 0:C.toString())||"",onValueChange:b=>h("assignee",L(b)),children:[(0,Dt.jsx)(Va,{children:(0,Dt.jsx)(mo,{placeholder:"Select assignee"})}),(0,Dt.jsx)(Wa,{children:t&&t.map(b=>{var N;return(0,Dt.jsx)(Ua,{value:((N=b==null?void 0:b.kl)==null?void 0:N.toString())||"",children:b.name},b.kl)})})]}):(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>v("assignee"),children:[(0,Dt.jsx)(El.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,Dt.jsx)("span",{children:n.assignee.name})]})]}),(0,Dt.jsxs)("div",{className:"grid gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),g==="closureDate"?(0,Dt.jsx)(ut,{type:"date",value:(S=(I=n.closureDate)==null?void 0:I.split("T")[0])!=null?S:"",onChange:b=>h("closureDate",b.target.value),onBlur:()=>v(null),autoFocus:!0}):(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>v("closureDate"),children:[(0,Dt.jsx)(El.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,Dt.jsx)("span",{children:n.closureDate?new Date(n.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),(0,Dt.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,Dt.jsxs)("div",{className:"grid gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Description"}),g==="description"?(0,Dt.jsx)(Xa,{value:n.description||"",onChange:b=>h("description",b.target.value),onBlur:()=>v(null),className:"min-h-[100px]",autoFocus:!0}):(0,Dt.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>v("description"),children:n.description})]})}),(0,Dt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,Dt.jsxs)("div",{className:"grid gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Status"}),g==="status"?(0,Dt.jsxs)(co,{value:n.status,onValueChange:b=>{h("status",b),v(null)},children:[(0,Dt.jsx)(Va,{children:(0,Dt.jsx)(mo,{placeholder:"Select status"})}),(0,Dt.jsx)(Wa,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(b=>(0,Dt.jsx)(Ua,{value:b,children:b},b))})]}):(0,Dt.jsx)("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>v("status"),children:n.status})]}),(0,Dt.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Categories"}),g==="categories"?(0,Dt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.map(b=>{var N,w;return(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsx)(Ut,{kl:((N=b.kl)==null?void 0:N.toString())||"",checked:(n.categories||[]).some(ye=>ye.kl===b.kl),onCheckedChange:()=>b.kl!==void 0&&k(b)}),(0,Dt.jsx)("label",{htmlFor:((w=b.kl)!=null?w:"").toString(),className:`text-sm font-medium ${z(b.type||"sector")} px-2 py-1 rounded`,children:b.name})]},b.kl)})}):(0,Dt.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>v("categories"),children:n.categories&&n.categories.map(b=>{let N=b;return N?(0,Dt.jsx)(Bt,{variant:"secondary",className:z(N.type||"sector"),children:N.name},N.kl):null})})]})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,Dt.jsxs)("div",{className:"grid gap-2",children:[(0,Dt.jsx)(ve,{className:"text-sm font-medium text-gray-500",children:"Comments"}),(0,Dt.jsx)(ja,{className:"h-[200px] overflow-y-auto",children:(0,Dt.jsx)("div",{className:"space-y-2",children:n.comments&&n.comments.slice().sort((b,N)=>new Date(N.timestamp||"").getTime()-new Date(b.timestamp||"").getTime()).map(b=>{var N;return(0,Dt.jsxs)("div",{className:"bg-gray-50 p-3 rounded-lg",children:[(0,Dt.jsx)("p",{className:"text-sm text-gray-700",children:b.text}),(0,Dt.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[(N=b==null?void 0:b.author)==null?void 0:N.name," - ",new Date(b.timestamp||"").toLocaleString()]})]},b.kl)})})}),(0,Dt.jsxs)("div",{className:"flex mt-2",children:[(0,Dt.jsx)(ut,{value:m,onChange:b=>d(b.target.value),placeholder:"Add a comment...",className:"flex-grow"}),(0,Dt.jsxs)(A,{onClick:T,className:"ml-2",children:[(0,Dt.jsx)(El.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,Dt.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(n.updatedAt||"").toLocaleString()]})]})]})]})})}function Wn({deal:e,customer:t,categories:a,onClick:o}){let r=a.find(s=>{var i;return s.type==="proposition"&&((i=e.categories)!=null?i:[]).includes(s.kl)});return(0,Dt.jsxs)(Te,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,Dt.jsxs)(qe,{className:"pb-2",children:[(0,Dt.jsx)("div",{className:"flex justify-between items-center",children:(0,Dt.jsx)(Ke,{className:"text-lg font-semibold text-gray-800",children:t==null?void 0:t.name})}),(0,Dt.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,Dt.jsxs)(Oe,{children:[(0,Dt.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,Dt.jsxs)("div",{className:"flex items-center text-sm text-gray-600",children:[(0,Dt.jsx)(El.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,Dt.jsx)("span",{children:e.assignee.name})]}),(0,Dt.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,Dt.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,Dt.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,Dt.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Dt.jsx)(El.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,Dt.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,Dt.jsx)("div",{className:"flex justify-between items-left",children:r&&(0,Dt.jsx)(Bt,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:r.name})})]})]})}var Os=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Un({onSubmit:e}){var r;let[t,a]=(0,ml.useState)({name:"",intro:"",active:!0});return(0,Dt.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,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(ve,{htmlFor:"customerName",children:"Customer Name"}),(0,Dt.jsx)(ut,{kl:"customerName",value:t.name,onChange:s=>a({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(ve,{htmlFor:"customerIntro",children:"Intro"}),(0,Dt.jsx)(Xa,{kl:"customerIntro",value:(r=t.intro)!=null?r:"",onChange:s=>a({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsx)(Ut,{kl:"activeCustomer",checked:!!t.active,onCheckedChange:s=>a({...t,active:s})}),(0,Dt.jsx)(ve,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,Dt.jsx)(A,{type:"submit",className:"w-full",children:"Add Customer"})]})}function Xn({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:i}){var z,L,me,V;let[n,c]=(0,ml.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[m,d]=(0,ml.useState)(!1),[p,u]=(0,ml.useState)({});(0,ml.useEffect)(()=>{r&&c(r)},[r]);let g=()=>{let C={};return n.customer||(C.customer="Customer Dt required"),n.value||(C.value="Value Dt required"),n.assignee||(C.assignee="Assignee Dt required"),n.closureDate||(C.closureDate="Closure Date Dt required"),u(C),Object.keys(C).length===0},v=async C=>{C.preventDefault(),u({});try{if(g()){let I=await o({...n});I.success?(c({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),i==null||i()):u(I.errors||{})}}catch{u({submit:"An error occurred while submitting the form."})}},f=C=>{c(I=>({...I,categories:(I.categories||[]).includes(C.kl)?(I.categories||[]).filter(S=>S!==C.kl):[...I.categories||[],C.kl]}))},h=async C=>{c({...n,customer:C});try{let I=await s(C);I.success?d(!1):u(I.errors||{})}catch{u({submit:"An error occurred while submitting the form."})}},k=C=>t==null?void 0:t.find(I=>I.kl===Number(C)),T=C=>e==null?void 0:e.find(I=>I.kl===Number(C));return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsxs)("form",{onSubmit:v,className:"space-y-6",children:[(0,Dt.jsx)(ja,{className:"h-[60vh] pr-4",children:(0,Dt.jsxs)("div",{className:"space-y-6 px-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{htmlFor:"customer",children:"Customer"}),(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsxs)(co,{value:(L=(z=n.customer)==null?void 0:z.kl)==null?void 0:L.toString(),onValueChange:C=>c({...n,customer:T(C)}),children:[(0,Dt.jsx)(Va,{children:(0,Dt.jsx)(mo,{placeholder:"Select customer"})}),(0,Dt.jsx)(Wa,{children:e.map(C=>{var I;return(0,Dt.jsx)(Ua,{value:((I=C.kl)==null?void 0:I.toString())||"",children:C.name},C.kl)})})]}),(0,Dt.jsx)(A,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,Dt.jsx)(El.PlusIcon,{className:"w-5 h-5"})})]}),p.customerId&&(0,Dt.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{htmlFor:"value",children:"Value"}),(0,Dt.jsx)(ut,{kl:"value",type:"number",value:n.value||"",onChange:C=>c({...n,value:Number.parseFloat(C.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,Dt.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{htmlFor:"assignee",children:"Assignee"}),(0,Dt.jsxs)(co,{value:(V=(me=n.assignee)==null?void 0:me.kl)==null?void 0:V.toString(),onValueChange:C=>c({...n,assignee:k(C)}),children:[(0,Dt.jsx)(Va,{children:(0,Dt.jsx)(mo,{placeholder:"Select assignee"})}),(0,Dt.jsx)(Wa,{children:t&&t.map(C=>{var I;return(0,Dt.jsx)(Ua,{value:((I=C.kl)==null?void 0:I.toString())||"",children:C.name},C.kl)})})]}),p.assignee&&(0,Dt.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{htmlFor:"description",children:"Description"}),(0,Dt.jsx)(Xa,{kl:"description",value:n.description||"",onChange:C=>c({...n,description:C.target.value}),placeholder:"Enter deal description"})]}),(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{children:"Categories"}),(0,Dt.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(C=>(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)("h4",{className:"text-sm font-medium",children:C.charAt(0).toUpperCase()+C.slice(1)}),(0,Dt.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(I=>I.type===C).map(I=>{var S;return(0,Dt.jsxs)("div",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsx)(Ut,{kl:I.kl.toString(),checked:(S=n.categories)==null?void 0:S.includes(I.kl),onCheckedChange:()=>f(I)}),(0,Dt.jsx)("label",{htmlFor:I.kl.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:I.name})]},I.kl)})})]},C))})]}),(0,Dt.jsxs)("div",{className:"space-y-2 space-Dt-2",children:[(0,Dt.jsx)(ve,{htmlFor:"closureDate",children:"Closure Date"}),(0,Dt.jsx)(ut,{kl:"closureDate",type:"date",value:n.closureDate||"",onChange:C=>c({...n,closureDate:C.target.value})}),p.closureDate&&(0,Dt.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,Dt.jsx)(A,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,Dt.jsx)(Lt,{open:m,onOpenChange:d,children:(0,Dt.jsxs)(Ct,{children:[(0,Dt.jsx)(Vt,{children:(0,Dt.jsx)(Wt,{children:"Add New Customer"})}),(0,Dt.jsx)(Un,{onSubmit:h})]})})]})}function Yn({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:i,calculateWeightedValue:n,addNewDeal:c,onAddCustomer:m}){let[d,p]=(0,ml.useState)(!1);return(0,Dt.jsxs)("div",{className:"flex flex-col w-80",children:[(0,Dt.jsx)("h2",{className:"text-xl font-semibold mb-4",children:e}),c&&(0,Dt.jsxs)(Lt,{open:d,onOpenChange:p,children:[(0,Dt.jsx)(Qr,{asChild:!0,children:(0,Dt.jsxs)(A,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[(0,Dt.jsx)(El.PlusCircle,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),(0,Dt.jsxs)(Ct,{children:[(0,Dt.jsx)(Vt,{children:(0,Dt.jsx)(Wt,{children:"Add New Deal"})}),(0,Dt.jsx)(Xn,{customers:o,users:a,categories:r,onSubmit:c,onAddCustomer:m,onClose:()=>p(!1)})]})]}),(0,Dt.jsx)(Os.Droppable,{droppableId:e,isDropDisabled:!1,children:u=>(0,Dt.jsxs)("div",{ref:u.innerRef,...u.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((g,v)=>(0,Dt.jsx)(Os.Draggable,{draggableId:g.kl.toString(),index:g.kl,children:f=>(0,Dt.jsx)("div",{ref:f.innerRef,...f.draggableProps,...f.dragHandleProps,children:(0,Dt.jsx)(Wn,{deal:g,customer:g.customer,categories:r,onClick:()=>s(g)})})},g.kl.toString())),u.placeholder]})}),(0,Dt.jsxs)("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[(0,Dt.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,Dt.jsxs)("span",{className:"text-green-600",children:["\xA3",i(t).toLocaleString()]})]}),(0,Dt.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,Dt.jsxs)("span",{className:"text-blue-600",children:["\xA3",n(t,e).toLocaleString()]})]})]})]})}var Lu=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function Bu({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){var p;let[s,i]=(0,ml.useState)(null),n=u=>{var g;return((g=e.deals)!=null?g:[]).filter(v=>v.status===u)},c=u=>u.reduce((g,v)=>g+(v.value||0),0),m=(u,g)=>{let v={Cold:.2,Qualified:.4,"Proposal Made":.6,"SoW Submitted":.7,Won:1,Lost:0};return u.reduce((f,h)=>f+(h.value||0)*v[g],0)},d=(0,ml.useCallback)(u=>{var z,L;let{source:g,destination:v}=u;if(!v||g.droppableId===v.droppableId&&g.index===v.index)return;let f=g.droppableId,h=v.droppableId,k=(z=e.deals)==null?void 0:z.filter(me=>me.kl===g.index)[0],T=[...(L=e.deals)!=null?L:[]];k&&(k.status=h,a(k))},[a]);return(0,Dt.jsx)(Os.DragDropContext,{onDragEnd:d,children:(0,Dt.jsxs)("div",{className:"p-4 max-h-[90vh] overflow-auto",children:[(0,Dt.jsx)("div",{className:"flex space-Dt-4 pb-4",children:Lu.filter(u=>u!=="Won"&&u!=="Lost").map(u=>{var v,f;let g=n(u);return(0,Dt.jsx)(Yn,{status:u,deals:g,customers:(v=e.customers)!=null?v:[],users:e.users,categories:(f=e.categories)!=null?f:[],onDealClick:i,calculateColumnValue:c,calculateWeightedValue:m,addNewDeal:u==="Cold"?t:void 0,onAddCustomer:r},u)})}),s&&(0,Dt.jsx)(Vn,{deal:s,users:e.users,customer:s.customer,categories:(p=e.categories)!=null?p:[],onClose:()=>i(null),onSave:a,onAddComment:u=>o(s.kl.toString(),u)})]})})}var er=(e,t)=>e[t%e.length];function Eu({services:e,className:t,title:a,content:o}){let r={settings:{width:"full",card:"light"}};return(0,Dt.jsxs)("div",{className:"pb-4 md:pb-0",children:[(0,Dt.jsxs)("div",{className:l("w-full text-left prose"),children:[a&&(0,Dt.jsx)("h2",{className:"text-primary",children:a}),(0,Dt.jsx)("div",{className:"pb-12 ",children:o&&(0,Dt.jsx)(q,{enableGutter:!1,content:o,enableProse:!1,className:l("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),e&&e.length>0&&(0,Dt.jsx)("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-4",children:e.map((s,i)=>(0,Dt.jsx)("div",{"data-aos":"fade-up","data-aos-delay":er([200,400,600],i),className:"w-full h-[33vh] md:h-[40vh] md:px-4 md:w-1/2 lg:w-1/3",children:(0,Dt.jsx)(_o,{...r,icon:{type:"none"},title:s.title,image:s.image,content:s.content,link:s.link})},i))})]})}function eo({subtitle:e,title:t,description:a,alignment:o="start",hasBottomSpacing:r=!1,className:s,invert:i=!1}){let n=l(o==="start"&&"text-left",o==="center"&&"text-center",o==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":r},"prose",s);return(0,Dt.jsxs)("div",{className:n,children:[e&&(0,Dt.jsx)("span",{className:"mb-[.625rem] block font-bold uppercase text-accent md:text-md",children:e}),(0,Dt.jsx)("h2",{className:l("text-primary mt-0"),children:t}),typeof a=="string"?a&&(0,Dt.jsx)("p",{className:"mt-5 whitespace-pre-line text-foreground",children:a}):a&&(0,Dt.jsx)(q,{content:a,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}function zu({sectionHeading:e,cards:t}){return(0,Dt.jsx)("section",{className:"section-padding-primary !pt-0",children:(0,Dt.jsxs)(et,{children:[(0,Dt.jsx)("div",{className:"mx-auto max-w-[630px]","data-aos":"fade-up","data-aos-delay":"100",children:(0,Dt.jsx)(eo,{...e,alignment:"center",hasBottomSpacing:!0})}),t&&t.length>0&&(0,Dt.jsx)("div",{className:"grid gap-30px",children:t.map((a,o)=>(0,Dt.jsx)("div",{"data-aos":"fade-up","data-aos-delay":er([200,400,600],o),className:"py-2",children:(0,Dt.jsx)(cn,{...a})},o))})]})})}var Br=y(require("next/image"));function Hu(e){let{images:t,sectionHeading:a,keyPoints:o,description:r}=e;return(0,Dt.jsx)(Dt.Fragment,{children:(0,Dt.jsx)("section",{kl:"about-section",className:l(" clip-custom-top-l sticky md:top-0 md:h-screen z-2 flex flex-col items-center justify-center section-padding-primary dark bg-background",e.className||""),children:(0,Dt.jsx)(et,{children:(0,Dt.jsxs)("div",{className:"grid items-center gap-12 lg:grid-cols-[.92fr_1fr] 2xl:gap-20",children:[(0,Dt.jsxs)("div",{className:"lg:order-2","data-aos":"fade-left","data-aos-delay":"200",children:[(0,Dt.jsx)(eo,{...a}),o&&o.length>0&&(0,Dt.jsx)("div",{className:"mt-7 grid gap-5 text-accent sm:grid-cols-2 md:mt-10 md:gap-[1.875rem]",children:o.map((s,i)=>(0,Dt.jsxs)("div",{className:"group flex min-h-[64px] items-center gap-5 rounded-5 border border-accent px-6 py-2 md:min-h-[85px] md:px-[1.875rem] md:py-3",children:[(0,Dt.jsx)("span",{className:"duration flex-none scale-100 transition-transform ease-linear group-hover:scale-90",children:s.icon}),(0,Dt.jsx)("h3",{className:"text-md font-bold leading-[1.25] md:text-lg",children:s.title})]},i))}),r&&(0,Dt.jsx)("p",{className:"mt-5 text-primary md:mt-[1.875rem]",children:r})]}),t&&(0,Dt.jsx)("div",{className:"mx-auto text-center",children:(0,Dt.jsxs)("div",{className:"relative mx-auto grid max-w-[580px] grid-cols-2 gap-2.5 overflow-hidden",children:[(0,Dt.jsx)("div",{className:"relative flex justify-end overflow-hidden",children:(0,Dt.jsx)("div",{className:"relative z-[2] mt-auto","data-aos":"fade-up","data-aos-delay":"200",children:(0,Dt.jsx)("div",{className:"relative z-[4] overflow-hidden",children:(0,Dt.jsx)(Br.default,{src:t.image1.src,alt:t.image1.alt,width:t.image1.width,height:t.image1.height,className:"rounded-tl-[60px] object-cover object-top"})})})}),(0,Dt.jsx)("div",{className:"flex overflow-hidden",children:(0,Dt.jsx)(Br.default,{src:t.image2.src,alt:t.image2.alt,width:t.image2.width,height:t.image2.height,className:"rounded-[80px_10px] object-cover","data-aos":"fade-right","data-aos-delay":"300"})}),(0,Dt.jsx)("div",{className:"ml-auto flex max-w-[250px] justify-end overflow-hidden",children:(0,Dt.jsx)(Br.default,{src:t.image3.src,alt:t.image4.alt,width:t.image3.width,height:t.image3.height,className:"rounded-[50px_10px] object-cover","data-aos":"fade-left","data-aos-delay":"350"})}),(0,Dt.jsx)("div",{className:"overflow-hidden",children:(0,Dt.jsx)(Br.default,{src:t.image4.src,alt:t.image4.alt,width:t.image4.width,height:t.image4.height,className:"rounded-10 rounded-br-[80px] object-cover","data-aos":"fade-right","data-aos-delay":"400"})}),(0,Dt.jsx)("div",{className:"absolute left-1/2 top-1/2 z-[4] -translate-Dt-1/2 -translate-y-1/2 overflow-hidden",children:(0,Dt.jsx)("div",{"data-aos":"zoom-in","data-aos-delay":"450",children:(0,Dt.jsx)("span",{className:"grid h-[100px] w-[100px] place-items-center rounded-full border-[12px] border-white bg-accent text-[30px] text-white",children:(0,Dt.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 27 27",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Dt.jsx)("path",{d:"M26.8125 13.8672C26.8125 14.9922 25.875 15.9297 24.8125 15.9297H15.8125V24.9297C15.8125 25.9922 14.875 26.8672 13.8125 26.8672C12.6875 26.8672 11.8125 25.9922 11.8125 24.9297V15.9297H2.8125C1.6875 15.9297 0.8125 14.9922 0.8125 13.8672C0.8125 12.8047 1.6875 11.9297 2.8125 11.9297H11.8125V2.92969C11.8125 1.80469 12.6875 0.867188 13.8125 0.867188C14.875 0.867188 15.8125 1.80469 15.8125 2.92969V11.9297H24.8125C25.875 11.8672 26.8125 12.8047 26.8125 13.8672Z"})})})})})]})})]})})})})}var rm=y(require("next/image"));function sm({blogs:e,base:t}){return(0,Dt.jsx)("div",{children:e&&e.length>0&&(0,Dt.jsx)("div",{className:"grid gap-10 lg:gap-10 md:grid-cols-2",children:e.map((a,o)=>(0,Dt.jsx)(Fu,{post:a,kl:o,base:t},o))})})}var Fu=({post:e,kl:t,base:a})=>{var m,d,p,u;let{slug:o,meta:r,authors:s,categories:i,title:n,publishedAt:c}=e;return(0,Dt.jsxs)("article",{className:"relative isolate flex flex-col gap-8 lg:flex-row",children:[(0,Dt.jsxs)("div",{className:"relative aspect-video sm:aspect-[2/1] lg:aspect-square lg:w-64 lg:shrink-0",children:[(0,Dt.jsx)(rm.default,{src:((m=r==null?void 0:r.image)==null?void 0:m.url)||"/assets/images/brand/cortex-reply-gradient.png",alt:((d=r==null?void 0:r.image)==null?void 0:d.alt)||"Post image",width:850,height:575,sizes:"100vw",className:"absolute inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,Dt.jsx)("div",{className:"absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsxs)("div",{className:"flex flex-wrap items-center gap-Dt-4 text-xs",children:[(0,Dt.jsx)("time",{dateTime:(p=e.publishedAt)!=null?p:void 0,className:"text-foreground",children:Rs((u=e.publishedAt)!=null?u:"")}),e.categories&&e.categories.map((g,v)=>(0,Dt.jsx)("a",{href:`#${g}`,className:"relative z-10 rounded-full bg-gray-50 px-3 py-1.5 font-medium text-gray-600 hover:bg-gray-100",children:g.title},v))]}),(0,Dt.jsx)("div",{className:"group relative max-w-xl",children:(0,Dt.jsx)("h3",{className:"mt-3 text-lg/6 font-semibold text-accent group-hover:text-xl/6",children:(0,Dt.jsxs)("a",{href:`/${a}/${e.slug}`||"#",children:[(0,Dt.jsx)("span",{className:"absolute inset-0"}),e.title]})})}),(0,Dt.jsx)("div",{className:"mt-6 flex flex-wrap lg:border-t gap-y-2 border-gray-200 dark:border-gray-700 pt-6",children:s&&s.map((g,v)=>{var f;return(0,Dt.jsxs)("div",{className:"relative flex items-center gap-Dt-4",children:[g.profilePicture?(0,Dt.jsx)("img",{alt:g.name||"Author",src:((f=g.profilePicture)==null?void 0:f.url)||"/assets/images/placeholder.jpg",className:"size-10 rounded-full bg-gray-50"}):(0,Dt.jsx)("div",{className:"size-10 rounded-full bg-gray-50"})," ",(0,Dt.jsx)("div",{className:"text-sm/6",children:(0,Dt.jsxs)("p",{className:"text-foreground pr-6",children:[(0,Dt.jsx)("span",{className:"absolute inset-0"}),g.name]})})]},v)})})]})]},t)};function Ou({blogs:e,pages:t,categories:a,types:o,base:r}){return(0,Dt.jsx)("section",{children:(0,Dt.jsx)(et,{children:(0,Dt.jsx)("div",{className:"grid",children:(0,Dt.jsxs)("div",{children:[o&&(0,Dt.jsx)(kn,{types:o}),(0,Dt.jsx)(sm,{blogs:e,base:r}),(0,Dt.jsx)(Nn,{pages:t})]})})})})}var im=y(require("next/image"));var js="data:image/jpeg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAALABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYEBQf/xAAgEAABBAICAwEAAAAAAAAAAAABAAIDBBEhEjEFBhMi/8QAFgEBAQEAAAAAAAAAAAAAAAAABAMF/8QAHBEAAgICAwAAAAAAAAAAAAAAAQIAIQMEBRFR/9oADAMBAAIRAxEAPwBqrV3PcNFL3s1Blny9eX7uYa7mtLAN95yFp9StCHajCp/YIImeUi4xtHLGdd7V9wkoOvZncagXIS10ZENFzsEA7GUJybBHxb+B0EJIeBOG5//Dt";function _u(e){let{sectionHeading:t,image:a}=e;return(0,Dt.jsxs)("div",{className:"relative w-full light py-[60px]",children:[(0,Dt.jsx)("div",{className:"absolute left-0 top-0 z-1 h-full w-full overflow-hidden md:w-[56%] md:rounded-r-5",children:(0,Dt.jsx)(im.default,{src:a.src,alt:a.alt,fill:!0,className:"object-cover",sizes:"(min-width: 768px) 60vw, 100vw",placeholder:"blur",blurDataURL:js})}),(0,Dt.jsx)(et,{children:(0,Dt.jsx)("div",{className:"ml-auto md:w-1/2",children:(0,Dt.jsxs)("div",{className:"relative z-[2] rounded-5 bg-white p-10 shadow-1 dark:bg-accent-700 lg:p-[60px]",children:[(0,Dt.jsx)("div",{className:"mb-30px",children:(0,Dt.jsx)(eo,{...t,invert:!0})}),(0,Dt.jsx)(ps,{})]})})})]})}function ju(e){return(0,Dt.jsx)("div",{className:"",children:(0,Dt.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Dt.jsx)("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:(0,Dt.jsxs)("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),(0,Dt.jsx)("p",{className:"mt-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),(0,Dt.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:e.locations&&e.locations.map((t,a)=>{var o;return(0,Dt.jsxs)("div",{className:"rounded-2xl p-10 border",children:[(0,Dt.jsx)("h3",{className:"text-base/7 text-primary",children:t.title}),(0,Dt.jsxs)("address",{className:"mt-3 space-y-1 text-sm/6 not-italic text-foreground",children:[(o=t.location.split(","))==null?void 0:o.map((r,s)=>(0,Dt.jsx)("p",{children:r},s))," ",t.mails&&(0,Dt.jsxs)("p",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsx)(yd.FaEnvelope,{className:"pr-2 text-primary size-auto"}),(0,Dt.jsx)("span",{children:t.mails[0]})]}),t.phoneNumbers&&t.phoneNumbers.length>0&&(0,Dt.jsxs)("p",{className:"flex items-center space-Dt-2",children:[(0,Dt.jsx)(yd.FaPhoneFlip,{className:"pr-2 text-primary size-auto"}),t.phoneNumbers[0]]})]})]},a)})})]})})})})}var nm=y(require("next/image"));var dm=y(require("next/link"));function Gu({image:e,name:t,about:a,socialLinks:o}){return!e||!e.src||e.src.length<3||!t?null:(0,Dt.jsx)("div",{className:"mt-1 z-10 px-0 pt-0 lg:px-10",children:(0,Dt.jsx)(Te,{children:(0,Dt.jsxs)(Oe,{children:[e&&e.src&&(0,Dt.jsx)(nm.default,{src:e.src,alt:e.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:js,className:"mx-auto mt-6 rounded-full object-cover"}),(0,Dt.jsx)("h3",{className:"font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-xl",children:t}),(0,Dt.jsx)("p",{children:a}),o&&o.length>0&&(0,Dt.jsx)("nav",{"aria-label":"social links",children:(0,Dt.jsx)("ul",{className:"inline-flex items-center divide-Dt divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((r,s)=>(0,Dt.jsx)("li",{children:(0,Dt.jsx)(We,{href:r.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:(0,Dt.jsx)("span",{children:r.icon})})},s))})})]})})})}function $u({page:e,categoryList:t,edit:a=!1,path:o="/admin/collections/posts/"}){var u;if(!e)return(0,oc.notFound)();let{meta:r,populatedAuthors:s,authors:i,categories:n,content:c,title:m}=e,d={image:{src:r&&r.image&&r.image.url||void 0,alt:r&&r.image&&r.image.alt||void 0},authorName:((u=s==null?void 0:s[0])==null?void 0:u.name)||"",category:n,commentCount:0,title:m,description:(r==null?void 0:r.description)||""},p=i==null?void 0:i.map(g=>{var v,f;return{name:g.name||"",about:"",image:{src:g.profilePicture&&((f=(v=g.profilePicture.sizes)==null?void 0:v.square)==null?void 0:f.url)||"",alt:g.name||"blog author"},socialLinks:[]}});return(0,Dt.jsx)(et,{children:(0,Dt.jsxs)("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[(0,Dt.jsx)("div",{children:(0,Dt.jsxs)("div",{className:"[&_p+Dt]:mt-4",children:[(0,Dt.jsx)("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),(0,Dt.jsx)(q,{content:c,enableGutter:!1})]})}),(0,Dt.jsxs)("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:[a&&(0,Dt.jsx)("div",{className:"mt-4 lg:-mt-10 z-10 px-0 pt-0 lg:px-10",children:(0,Dt.jsxs)(Te,{children:[(0,Dt.jsx)(qe,{children:(0,Dt.jsx)(Ke,{className:"text-accent",children:"Content Actions"})}),(0,Dt.jsxs)(Oe,{children:[(0,Dt.jsx)("p",{className:"mb-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),(0,Dt.jsx)(dm.default,{href:`${o}${e.kl}`,children:(0,Dt.jsx)(A,{variant:"outline",className:"w-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),p&&p.map((g,v)=>(0,Dt.jsx)(Gu,{...g},v)),t&&t.links&&(0,Dt.jsx)("div",{className:"mt-4 px-0 pt-0 lg:px-10",children:(0,Dt.jsx)(Cn,{links:t.links,title:t.title})})]})]})})}var qn=y(require("next/link"));var pm=require("lucide-react"),Vu=({children:e,pageId:t,tableOfContents:a=[],edit:o=!0,path:r="/admin/collections/pages/",relatedContent:s=[{title:"Related Content",links:[]}]})=>{let[i,n]=(0,ml.useState)(!1),c=()=>{n(!i)};return(0,ml.useEffect)(()=>{let m=window.location.hash;if(m){let d=m.substring(1),p=document.getElementById(d);if(p){let g=p.getBoundingClientRect().top+window.pageYOffset+-300;window.scrollTo({top:g,behavior:"smooth"})}}},[window.location.hash]),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("div",{className:l(i?"col-span-3":"col-span-4","xl:col-span-3"),children:e}),(0,Dt.jsx)(Wu,{pageId:t,tableOfContents:a,edit:o,path:r,relatedContent:s,isSidebarVisible:i}),(0,Dt.jsx)("div",{className:"block md:hidden mt-8",children:(0,Dt.jsx)("div",{className:"space-y-6",children:e})})]})};var Wu=({pageId:e,tableOfContents:t=[],edit:a=!0,path:o="/admin/collections/pages/",relatedContent:r=[{title:"Related Content",links:[]}],isSidebarVisible:s})=>{let[i,n]=(0,ml.useState)(""),[c,m]=(0,ml.useState)(!1),[d,p]=(0,ml.useState)(!1),u=(0,oc.usePathname)(),g=()=>{m(!c),p(!1)},v=()=>{p(!d),m(!1)},f=T=>{switch(T){case"h3":return"ml-4";case"h4":return"ml-8";default:return""}},h=()=>{let T=u.split("/"),z="/print"+u,L=window.open(z,"Print","width=1754,height=1240,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");L&&L.focus()},k=()=>{let T=u.split("/"),z="/present"+u,L=window.open(z,"Print","width=1754,height=1240,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");L&&L.focus()};return(0,Dt.jsx)("div",{className:l("fixed right-2 z-20 top-1/4 space-y-6 transform transition-transform duration-300 translate-Dt-full",s?"translate-Dt-0":"md:translate-Dt-0"),children:(0,Dt.jsxs)("div",{className:"flex flex-row-reverse z-20 min-w-64 gap-4",children:[(0,Dt.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-gray-200 bg-card p-2.5 shadow-lg backdrop-blur-lg min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[(0,Dt.jsxs)(qn.default,{href:`${o}${e}`,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M454.6 45.3l12.1 12.1c12.5 12.5 12.5 32.8 0 45.3L440 129.4 382.6 72l26.7-26.7c12.5-12.5 32.8-12.5 45.3 0zM189 265.6l171-171L417.4 152l-171 171c-4.2 4.2-9.6 7.2-15.4 8.6l-65.6 15.1L180.5 281c1.3-5.8 4.3-11.2 8.6-15.4zm197.7-243L166.4 243c-8.5 8.5-14.4 19.2-17.1 30.9l-20.9 90.6c-1.2 5.4 .4 11 4.3 14.9s9.5 5.5 14.9 4.3l90.6-20.9c11.7-2.7 22.4-8.6 30.9-17.1L489.4 125.3c25-25 25-65.5 0-90.5L477.3 22.6c-25-25-65.5-25-90.5 0zM80 64C35.8 64 0 99.8 0 144L0 432c0 44.2 35.8 80 80 80l288 0c44.2 0 80-35.8 80-80l0-128c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 128c0 26.5-21.5 48-48 48L80 480c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48l128 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L80 64z"})}),(0,Dt.jsx)("small",{className:"text-center text-xs font-medium",children:" Edit "})]}),(0,Dt.jsxs)("a",{onClick:g,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M16 80C7.2 80 0 87.2 0 96s7.2 16 16 16l416 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 80zM144 240c-8.8 0-16 7.2-16 16s7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0zM128 416c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-288 0c-8.8 0-16 7.2-16 16zM0 432c0 8.8 7.2 16 16 16s16-7.2 16-16l0-192c0-8.8-7.2-16-16-16s-16 7.2-16 16L0 432z"})}),(0,Dt.jsx)("small",{className:"text-center text-xs font-medium",children:" Contents "})]}),(0,Dt.jsxs)("a",{onClick:v,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M136 64c13.3 0 24 10.7 24 24l0 24 0 32 0 24c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0zm56 104l0-24 192 0 0 24c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-30.9 0-56 25.1-56 56l0 24-192 0 0-24c0-30.9-25.1-56-56-56L56 32C25.1 32 0 57.1 0 88l0 80c0 30.9 25.1 56 56 56l80 0c8.6 0 16.7-1.9 24-5.4l72.2 96.3c-5.2 8.5-8.2 18.5-8.2 29.1l0 80c0 30.9 25.1 56 56 56l80 0c30.9 0 56-25.1 56-56l0-80c0-30.9-25.1-56-56-56l-80 0c-8.6 0-16.7 1.9-24 5.4l-72.2-96.3c5.2-8.5 8.2-18.5 8.2-29.1zm224 0l0-24 0-32 0-24c0-13.3 10.7-24 24-24l80 0c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24zM360 320c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24l80 0z"})}),(0,Dt.jsx)("small",{className:"text-center text-xs font-medium",children:" Related "})]}),(0,Dt.jsx)("hr",{className:"dark:border-gray-400"}),(0,Dt.jsxs)("a",{onClick:k,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M16 0C7.2 0 0 7.2 0 16s7.2 16 16 16l544 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L16 0zM32 64l0 224c0 35.3 28.7 64 64 64l176 0 0 41.4-91.3 91.3c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L288 422.6l84.7 84.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L304 393.4l0-41.4 176 0c35.3 0 64-28.7 64-64l0-224-32 0 0 224c0 17.7-14.3 32-32 32l-192 0L96 320c-17.7 0-32-14.3-32-32L64 64 32 64z"})}),(0,Dt.jsx)("small",{className:"text-xs font-medium",children:"Present"})]}),(0,Dt.jsxs)("a",{onClick:h,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,Dt.jsx)("small",{className:"text-xs font-medium",children:"Print"})]})]}),c&&(0,Dt.jsx)("div",{className:l("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border"),children:(0,Dt.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-w-64",children:[(0,Dt.jsx)("div",{className:"flex text-accent",children:"On this Page"}),(0,Dt.jsx)("ul",{className:"flex flex-col space-y-2",children:t.map((T,z)=>(0,Dt.jsx)("li",{className:f(T.tag),children:(0,Dt.jsx)("a",{href:`#${T.kl}`,className:`text-xs ${i===T.kl?"text-accent font-semibold":"text-primary dark:text-foreground"} hover:text-accent`,children:T.text})},z))})]})}),d&&r&&r.length>0&&(0,Dt.jsx)("div",{className:l("z-50 flex shrink-0 grow-0 gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border"),children:(0,Dt.jsxs)("div",{className:"flex flex-col m-2 justify-start z-50 min-w-64",children:[(0,Dt.jsx)("div",{className:"flex text-accent",children:"Related Content"}),(0,Dt.jsx)("ul",{className:"flex flex-col space-y-2",children:r.map((T,z)=>T.links&&T.links.length>0?T.links.map((L,me)=>(0,Dt.jsxs)(qn.default,{href:L.url,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[L.title,L.url.startsWith("http")&&(0,Dt.jsx)(pm.ExternalLink,{className:"ml-1 h-3 w-3"})]},me)):null)})]})})]})})};var um=y(require("next/image"));function Uu({className:e,children:t,image:a="https://images.unsplash.com/photo-1557804506-669a67965ba0?q=80&w=2574&auto=format&fit=crop",imageAlt:o="Professional presentation in modern office setting",imagePosition:r="left",overlay:s=!0}){return(0,Dt.jsxs)("section",{className:l("relative min-h-[50vh] w-full overflow-hidden",e),children:[(0,Dt.jsxs)("div",{className:"absolute inset-0 w-full",children:[(0,Dt.jsx)(um.default,{src:a||"/placeholder.svg",alt:o,fill:!0,className:"object-cover",priority:!0}),s&&(0,Dt.jsx)("div",{className:"absolute inset-0",style:{background:r==="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%)"}})]}),(0,Dt.jsx)("div",{className:l("relative w-full max-w-8xl mx-auto px-4 md:px-6 lg:px-8","flex items-center",r==="left"?"justify-end":"justify-start"),children:(0,Dt.jsx)("div",{className:l("w-full max-w-xl py-12",r==="left"?"ml-auto":"mr-auto"),children:t})})]})}var Kn=y(require("next/image"));function Xu({blogs:e,sectionHeading:t,base:a="insights"}){return(0,Dt.jsxs)(et,{children:[(0,Dt.jsx)("div",{className:"",children:t&&(0,Dt.jsx)("div",{"data-aos":"fade-up","data-aos-delay":"100",children:(0,Dt.jsx)(eo,{...t,alignment:"start",hasBottomSpacing:!0})})}),e&&e.length>0&&(0,Dt.jsx)("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:e.map((o,r)=>(0,Dt.jsx)("div",{"data-aos":"fade-up","data-aos-delay":er([200,400,600],r),className:"w-full h-full md:w-1/2 md:px-4 lg:w-1/3",children:(0,Dt.jsx)(bm,{...o,base:a})},r))})]})}var fm=l("inline-flex items-center gap-2 text-white"),F1=l("text-sm text-white");function bm({slug:e,meta:t,authors:a,title:o,publishedAt:r,categories:s,base:i}){var n,c,m,d;return(0,Dt.jsxs)("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[(0,Dt.jsx)("span",{className:"absolute inset-0 z-[2] "}),(0,Dt.jsx)(Kn.default,{src:((n=t==null?void 0:t.image)==null?void 0:n.url)||"/assets/images/brand/cortex-reply-gradient.png",alt:((c=t==null?void 0:t.image)==null?void 0:c.alt)||"Blog image",fill:!0,sizes:`
19
19
  (min-width:768px) 50vw,
20
20
  (min-width:1024px) 33vw,
21
21
  100vw
@@ -23,4 +23,4 @@
23
23
  (min-width:768px) 50vw,
24
24
  (min-width:1024px) 33vw,
25
25
  100vw
26
- `,className:l("pointer-events-none object-cover [transition:all_500ms_ease]","group-hover/blog:opacity-0 group-hover/blog:[filter:blur(10px)] group-hover/blog:[transform:translatex(-50%)_scalex(2)]")}),(0,Dt.jsxs)("div",{className:"relative z-10 flex h-full flex-1 w-full flex-col",children:[r&&(0,Dt.jsx)("div",{children:(0,Dt.jsx)("div",{className:"inline-grid w-full items-center justify-center rounded-5 bg-background/70 px-4 py-3 text-center font-secondary text-md font-bold text-foreground transition-colors group-hover/blog:bg-accent group-hover/blog:text-accent-foreground md:text-lg",children:(0,Dt.jsx)("time",{dateTime:r,className:"text-foreground",children:(0,Dt.jsx)("span",{className:"block",children:Rs(r)})})})}),(0,Dt.jsxs)("div",{className:"mt-auto space-y-2 text-white md:space-y-5",children:[(0,Dt.jsx)("div",{className:"inline-flex flex-wrap items-center gap-Dt-5 gap-y-2",children:(0,Dt.jsx)("p",{className:fm})}),(0,Dt.jsx)("h3",{className:"text-md font-bold w-full h-28 p-6 bg-background/70 text-foreground md:text-lg",children:(0,Dt.jsx)(We,{"aria-label":o,href:`/${i}/${e}`||"#",className:"transition-colors duration-300 hover:text-primary",children:o})}),(0,Dt.jsx)("div",{children:(0,Dt.jsxs)(We,{href:`/${i}/${e}`||"#",className:l(fm,"gap-[.625rem] bg-background/80 px-4 py-2 mx-6 my-3 text-base font-semibold uppercase text-foreground transition-colors duration-300 hover:text-accent-foreground"),children:[(0,Dt.jsx)("span",{children:"Read article"}),(0,Dt.jsx)("span",{className:"text-accent",children:(0,Dt.jsx)(yd.FaArrowRight,{})})]})})]})]})]})}var vm=y(require("next/image"));function Yu({image:e,title:t,content:a,link:o,theme:r}){return(0,Dt.jsxs)("section",{className:"container relative",children:[(0,Dt.jsx)("div",{className:l("absolute mt-[50%] w-full h-full",r==="dark"?"bg-white":"bg-black")}),(0,Dt.jsx)("div",{className:l("flex flex-col md:flex-row items-center justify-between gap-12 px-6 md:px-16 py-16 bg-background",r,r==="dark"&&"bg-black clip-custom-top-r"),children:(0,Dt.jsxs)("div",{className:"w-full flex flex-row items-center justify-center",children:[(0,Dt.jsxs)("div",{className:l("w-full md:w-1/2 max-w-lg text-left",r==="dark"&&"mt-48"),children:[(0,Dt.jsx)("h2",{className:"text-3xl md:text-5xl text-primary",children:t}),(0,Dt.jsx)("p",{className:"mt-4 text-gray-700 text-lg",children:a&&(0,Dt.jsx)(q,{enableGutter:!1,content:a,enableProse:!1,className:l("prose prose-headings:text-gray-700 prose-p:text-gray-700")})}),(0,Dt.jsx)("button",{className:"mt-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full text-base hover:bg-accent hover:text-white transition",children:(0,Dt.jsx)("a",{href:o.url||"#",children:o.label||"Learn more"})})]}),(0,Dt.jsx)("div",{className:"w-full md:w-1/2 flex justify-center",children:e&&e.url&&(0,Dt.jsx)(vm.default,{src:e.url,alt:e.alt||`Image of ${t}`,width:400,height:400,className:"max-w-full"})})]})})]})}var hm=y(require("next/image"));var Qn=({children:e,theme:t,style:a,neighbours:o,shape:r,image:s,kl:i,continueTheme:n})=>{let c=m=>(0,Dt.jsxs)("div",{className:"select-none",children:[m&&typeof m=="object"&&(0,Dt.jsx)(qt,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:m}),m&&typeof m=="string"&&(0,Dt.jsx)("div",{children:(0,Dt.jsx)(hm.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:m})})]});if(t==="dark"&&a==="slide")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"sticky md:top-0 h-screen",children:(0,Dt.jsxs)("div",{className:"dark pt-0 min-h-[80vh]",children:[(0,Dt.jsx)(it,{className:"z-10",position:"dark-top"}),(0,Dt.jsxs)("div",{className:"relative",children:[(0,Dt.jsx)("div",{className:"flex items-center bg-black justify-center pt-12",children:(0,Dt.jsx)("div",{className:"container",children:e})}),(0,Dt.jsx)(it,{className:"z-10",position:"dark-bottom"})]})]})});if(t==="light"&&a==="slide")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"sticky top-0 light pt-0 h-screen",children:(0,Dt.jsxs)("div",{className:"sticky top-0 light pt-0 h-screen",children:[(0,Dt.jsx)(it,{className:"z-10",position:"light-top"}),(0,Dt.jsxs)("div",{className:"relative bg-white",children:[(0,Dt.jsx)("div",{className:"flex items-center bg-white justify-center pt-12",children:(0,Dt.jsx)("div",{className:"container",children:e})}),(0,Dt.jsx)("div",{className:"h-[200px] bg-white"})]})]})});if(t==="first")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"",children:(0,Dt.jsx)("div",{className:"sticky top-0 light bg-background pt-6 min-h-[80vh]",children:(0,Dt.jsxs)("div",{className:"relative",children:[(0,Dt.jsx)("div",{className:"flex items-center justify-center pt-12",children:(0,Dt.jsx)("div",{className:"container",children:e})}),(0,Dt.jsx)(it,{className:"text-black z-10",position:"bottom-right"})]})})});if(t==="light")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"",children:(0,Dt.jsx)("div",{className:l("sticky top-0 light bg-background min-h-[50vh]","pb-10"),children:(0,Dt.jsx)("div",{className:"flex items-center pt-8 justify-center",children:(0,Dt.jsx)("div",{className:"container",children:e})})})});if(t==="dark")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"",children:(0,Dt.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,Dt.jsx)(it,{className:"text-black z-10",position:"bottom-right"}),(0,Dt.jsx)("div",{className:"flex items-center justify-center pt-12 bg-black",children:(0,Dt.jsx)("div",{className:"container",children:e})}),(0,Dt.jsx)(it,{className:"text-accent z-10",position:"top"})]})});if(t==="last")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"",children:(0,Dt.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,Dt.jsx)(it,{className:"text-black z-10",position:"bottom-right"}),(0,Dt.jsx)("div",{className:"flex items-center justify-center pb-12 bg-black min-h-[80vh]",children:(0,Dt.jsx)("div",{className:"container",children:e})})]})})};var ym=y(require("next/link"));var qu=({dynamicServiceDetail:e,style:t})=>e.map((a,o)=>(0,Dt.jsx)(Qn,{kl:a.slug,theme:o%2===0?"dark":"light",style:t,children:(0,Dt.jsx)("div",{className:"container",children:(0,Dt.jsxs)("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[(0,Dt.jsxs)("div",{className:l("w-full text-left prose"),children:[(0,Dt.jsx)("h2",{className:"text-primary",children:a.title}),(0,Dt.jsx)("div",{className:"",children:(0,Dt.jsx)(q,{enableGutter:!1,content:a.description,enableProse:!1,className:l("prose prose-headings:text-foreground prose-p:text-foreground")})}),(0,Dt.jsx)(A,{asChild:!0,className:"mt-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition no-underline",children:(0,Dt.jsx)(ym.default,{href:`/${a.slug}`,children:"Learn more"})})]}),a.icon&&typeof a.icon=="object"&&"type"in a.icon&&"iconName"in a.icon&&(0,Dt.jsx)("div",{className:l("w-full h-full min-h-96 py-6 p-0 md:p-16 flex justify-center"),children:(0,Dt.jsx)("i",{className:`${a.icon.type} fa-${a.icon.iconName} fa-10x w-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})},o));var wm=y(require("html2canvas")),Jn=require("jspdf");function Ku({type:e="slideshow",orientation:t="landscape",...a}){let o=a.page,[r,s]=(0,ml.useState)(t),{contentWithIds:i,tableOfContents:n}=Mo(o);if(e==="slideshow")return(0,Dt.jsx)("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:(0,Dt.jsx)(Ps,{blocks:i,hero:a.hero,title:a.page.title,logoImage:a.logoImage})});if(e==="print")return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(Qu,{layout:r,changeLayout:s}),(0,Dt.jsx)(yn,{page:a.page,layout:r,logoImage:a.logoImage})]})}var Qu=({changeLayout:e,layout:t="landscape"})=>{let a=async()=>{var i;if(t==="flow"){let n=(i=document.getElementById("printable-content"))==null?void 0:i.innerHTML;if(n){var s=window.document.body.innerHTML;window.document.body.innerHTML=n,window.print(),window.document.body.innerHTML=s}}else await new Promise(n=>setTimeout(n,300)),window.print()},o=s=>{e&&e(s)},r=async s=>{let i=document.getElementById(s);if(!i)throw new Error(`Element with kl ${s} not found`);let n=document.createElement("canvas"),c=window.devicePixelRatio;n.width=Math.max(i.clientWidth||0)*c,n.height=Math.max(i.clientHeight||0)*c+100;let m=n.getContext("2d");if(!m)throw new Error("Failed Dt get 2D context");let d=m.drawImage,p=Array.from(i.getElementsByTagName("img")).reduce((V,C)=>(V[C.src]=C,V),{});m.drawImage=function(...V){let[C,I,S,b,N,w,ye,we,Ge]=V;if(C instanceof HTMLImageElement){let dt=p[C.src].style.objectFit||"fill",Tt=p[C.src].style.objectPosition||"center center";N=C.height,b=C.width;let yt=b/N,ct=we/Ge,[mt,ce]=Tt.split(" ");switch(ce||(ce=mt),dt){case"cover":if(yt>ct){let se=N*ct,pe=(b-se)/2;mt==="left"&&(pe=0),mt==="right"&&(pe=b-se),I+=pe,b=se}else{let se=b/ct,pe=(N-se)/2;ce==="top"&&(pe=0),ce==="bottom"&&(pe=N-se),S+=pe,N=se}break;case"contain":if(yt>ct){let se=we/yt,pe=(Ge-se)/2;ce==="top"&&(pe=0),ce==="bottom"&&(pe=Ge-se),ye+=pe,Ge=se}else{let se=Ge*yt,pe=(we-se)/2;mt==="left"&&(pe=0),mt==="right"&&(pe=we-se),w+=pe,we=se}break;case"fill":break}}return d.call(m,C,I,S,b,N,w,ye,we,Ge)};let u=document.getElementById(s);if(!u)throw new Error(`Element with kl ${s} not found`);var g=n.width,v=n.height;let h=(await(0,wm.default)(u,{canvas:n,windowHeight:v,windowWidth:g,scale:window.devicePixelRatio})).toDataURL("image/png"),T=new Jn.jsPDF({}).getImageProperties(h),z=297,L=z*(T.height/T.width),me=new Jn.jsPDF({unit:"oc",format:[z,L]});me.addImage(h,"PNG",0,0,z,L),me.save("print.pdf")};return(0,Dt.jsx)("div",{className:l("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:(0,Dt.jsx)("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:(0,Dt.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[(0,Dt.jsxs)("a",{onClick:a,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,Dt.jsx)("small",{className:"text-xs font-medium",children:"Print"})]}),(0,Dt.jsx)("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),(0,Dt.jsxs)("a",{onClick:()=>o("portrait"),className:l("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="portrait"?"text-accent":"hover:text-accent"),children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),(0,Dt.jsx)("small",{className:"text-xs",children:"Portrait"})]}),(0,Dt.jsxs)("a",{onClick:()=>o("landscape"),className:l("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="landscape"?"text-accent":"hover:text-accent"),children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),(0,Dt.jsx)("small",{className:"text-xs",children:"Landscape"})]}),(0,Dt.jsxs)("a",{onClick:()=>o("flow"),className:l("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="flow"?"text-accent":"hover:text-accent"),children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),(0,Dt.jsx)("small",{className:"text-xs",children:"Continuous"})]})]})})})};0&&(module.exports={AOSInit,AboutSection,Alert,AlertDescription,AlertTitle,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BlogCard,BlogDetail,BlogList,BlogListSection,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,ContactSection,Container,ContentBlock,ContentCard,CopyButton,CustomLink,CustomerCard,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,ImageSection,InfoTile,Input,Insight,KanbanColumn,Label,LocationsSection,Logo,LowImpactHero,MOTD,MainPageSection,Mask,Media,MediaBlock,MediumImpactHero,NewCustomerForm,NewDealForm,NewsGrid,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadPagination,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,PricingSection,Printable,ProjectCard,ProjectTeam,ProposalSummary,Publish,RelatedContent,RelatedPosts,RenderBlocks,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,Section,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,ServiceDetailList,ServiceDetailSection,ServiceSection,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,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,cn,getTableOfContents,reducer,toast,toggleVariants,useIsMobile,useSidebar,useToast});
26
+ `,className:l("pointer-events-none object-cover [transition:all_500ms_ease]","group-hover/blog:opacity-0 group-hover/blog:[filter:blur(10px)] group-hover/blog:[transform:translatex(-50%)_scalex(2)]")}),(0,Dt.jsxs)("div",{className:"relative z-10 flex h-full flex-1 w-full flex-col",children:[r&&(0,Dt.jsx)("div",{children:(0,Dt.jsx)("div",{className:"inline-grid w-full items-center justify-center rounded-5 bg-background/70 px-4 py-3 text-center font-secondary text-md font-bold text-foreground transition-colors group-hover/blog:bg-accent group-hover/blog:text-accent-foreground md:text-lg",children:(0,Dt.jsx)("time",{dateTime:r,className:"text-foreground",children:(0,Dt.jsx)("span",{className:"block",children:Rs(r)})})})}),(0,Dt.jsxs)("div",{className:"mt-auto space-y-2 text-white md:space-y-5",children:[(0,Dt.jsx)("div",{className:"inline-flex flex-wrap items-center gap-Dt-5 gap-y-2",children:(0,Dt.jsx)("p",{className:fm})}),(0,Dt.jsx)("h3",{className:"text-md font-bold w-full h-28 p-6 bg-background/70 text-foreground md:text-lg",children:(0,Dt.jsx)(We,{"aria-label":o,href:`/${i}/${e}`||"#",className:"transition-colors duration-300 hover:text-primary",children:o})}),(0,Dt.jsx)("div",{children:(0,Dt.jsxs)(We,{href:`/${i}/${e}`||"#",className:l(fm,"gap-[.625rem] bg-background/80 px-4 py-2 mx-6 my-3 text-base font-semibold uppercase text-foreground transition-colors duration-300 hover:text-accent-foreground"),children:[(0,Dt.jsx)("span",{children:"Read article"}),(0,Dt.jsx)("span",{className:"text-accent",children:(0,Dt.jsx)(yd.FaArrowRight,{})})]})})]})]})]})}var vm=y(require("next/image"));function Yu({image:e,title:t,content:a,link:o,theme:r}){return(0,Dt.jsxs)("section",{className:"container relative",children:[(0,Dt.jsx)("div",{className:l("absolute mt-[50%] w-full h-full",r==="dark"?"bg-white":"bg-black")}),(0,Dt.jsx)("div",{className:l("flex flex-col md:flex-row items-center justify-between gap-12 px-6 md:px-16 py-16 bg-background",r,r==="dark"&&"bg-black clip-custom-top-r"),children:(0,Dt.jsxs)("div",{className:"w-full flex flex-row items-center justify-center",children:[(0,Dt.jsxs)("div",{className:l("w-full md:w-1/2 max-w-lg text-left",r==="dark"&&"mt-48"),children:[(0,Dt.jsx)("h2",{className:"text-3xl md:text-5xl text-primary",children:t}),(0,Dt.jsx)("p",{className:"mt-4 text-gray-700 text-lg",children:a&&(0,Dt.jsx)(q,{enableGutter:!1,content:a,enableProse:!1,className:l("prose prose-headings:text-gray-700 prose-p:text-gray-700")})}),(0,Dt.jsx)("button",{className:"mt-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full text-base hover:bg-accent hover:text-white transition",children:(0,Dt.jsx)("a",{href:o.url||"#",children:o.label||"Learn more"})})]}),(0,Dt.jsx)("div",{className:"w-full md:w-1/2 flex justify-center",children:e&&e.url&&(0,Dt.jsx)(vm.default,{src:e.url,alt:e.alt||`Image of ${t}`,width:400,height:400,className:"max-w-full"})})]})})]})}var hm=y(require("next/image"));var Qn=({children:e,theme:t,style:a,neighbours:o,shape:r,image:s,kl:i,continueTheme:n})=>{let c=m=>(0,Dt.jsxs)("div",{className:"select-none",children:[m&&typeof m=="object"&&(0,Dt.jsx)(qt,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:m}),m&&typeof m=="string"&&(0,Dt.jsx)("div",{children:(0,Dt.jsx)(hm.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:m})})]});if(t==="dark"&&a==="slide")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"sticky md:top-0 h-screen",children:(0,Dt.jsxs)("div",{className:"dark pt-0 min-h-[80vh]",children:[(0,Dt.jsx)(it,{className:"z-10",position:"dark-top"}),(0,Dt.jsxs)("div",{className:"relative",children:[(0,Dt.jsx)("div",{className:"flex items-center bg-black justify-center pt-12",children:(0,Dt.jsx)("div",{className:"container",children:e})}),(0,Dt.jsx)(it,{className:"z-10",position:"dark-bottom"})]})]})});if(t==="light"&&a==="slide")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"sticky top-0 light pt-0 h-screen",children:(0,Dt.jsxs)("div",{className:"sticky top-0 light pt-0 h-screen",children:[(0,Dt.jsx)(it,{className:"z-10",position:"light-top"}),(0,Dt.jsxs)("div",{className:"relative bg-white",children:[(0,Dt.jsx)("div",{className:"flex items-center bg-white justify-center pt-12",children:(0,Dt.jsx)("div",{className:"container",children:e})}),(0,Dt.jsx)("div",{className:"h-[200px] bg-white"})]})]})});if(t==="first")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"",children:(0,Dt.jsx)("div",{className:"sticky top-0 light bg-background pt-6 min-h-[80vh]",children:(0,Dt.jsxs)("div",{className:"relative",children:[(0,Dt.jsx)("div",{className:"flex items-center justify-center pt-12",children:(0,Dt.jsx)("div",{className:"container",children:e})}),(0,Dt.jsx)(it,{className:"text-black z-10",position:"bottom-right"})]})})});if(t==="light")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"",children:(0,Dt.jsx)("div",{className:l("sticky top-0 light bg-background min-h-[50vh]","pb-10"),children:(0,Dt.jsx)("div",{className:"flex items-center pt-8 justify-center",children:(0,Dt.jsx)("div",{className:"container",children:e})})})});if(t==="dark")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"",children:(0,Dt.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,Dt.jsx)(it,{className:"text-black z-10",position:"bottom-right"}),(0,Dt.jsx)("div",{className:"flex items-center justify-center pt-12 bg-black",children:(0,Dt.jsx)("div",{className:"container",children:e})}),(0,Dt.jsx)(it,{className:"text-accent z-10",position:"top"})]})});if(t==="last")return(0,Dt.jsx)("section",{kl:i||"next-section",className:"",children:(0,Dt.jsxs)("div",{className:"sticky -top-[1px] dark min-h-[80vh] bg-white",children:[(0,Dt.jsx)(it,{className:"text-black z-10",position:"bottom-right"}),(0,Dt.jsx)("div",{className:"flex items-center justify-center pb-12 bg-black min-h-[80vh]",children:(0,Dt.jsx)("div",{className:"container",children:e})})]})})};var ym=y(require("next/link"));var qu=({dynamicServiceDetail:e,style:t})=>e.map((a,o)=>(0,Dt.jsx)(Qn,{kl:a.slug,theme:o%2===0?"dark":"light",style:t,children:(0,Dt.jsx)("div",{className:"container",children:(0,Dt.jsxs)("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[(0,Dt.jsxs)("div",{className:l("w-full text-left prose"),children:[(0,Dt.jsx)("h2",{className:"text-primary",children:a.title}),(0,Dt.jsx)("div",{className:"",children:(0,Dt.jsx)(q,{enableGutter:!1,content:a.description,enableProse:!1,className:l("prose prose-headings:text-foreground prose-p:text-foreground")})}),(0,Dt.jsx)(A,{asChild:!0,className:"mt-6 px-6 py-3 border border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition no-underline",children:(0,Dt.jsx)(ym.default,{href:`/${a.slug}`,children:"Learn more"})})]}),a.icon&&typeof a.icon=="object"&&"type"in a.icon&&"iconName"in a.icon&&(0,Dt.jsx)("div",{className:l("w-full h-full min-h-96 py-6 p-0 md:p-16 flex justify-center"),children:(0,Dt.jsx)("i",{className:`${a.icon.type} fa-${a.icon.iconName} fa-10x w-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})},o));var wm=y(require("html2canvas")),Jn=require("jspdf");function Ku({type:e="slideshow",orientation:t="landscape",...a}){let o=a.page,[r,s]=(0,ml.useState)(t),{contentWithIds:i,tableOfContents:n}=Mo(o);if(e==="slideshow")return(0,Dt.jsx)("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:(0,Dt.jsx)(Ps,{blocks:i,hero:a.hero,title:a.page.title,logoImage:a.logoImage})});if(e==="print")return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(Qu,{layout:r,changeLayout:s}),(0,Dt.jsx)(yn,{page:a.page,layout:r,logoImage:a.logoImage})]})}var Qu=({changeLayout:e,layout:t="landscape"})=>{let a=async()=>{var i;if(t==="flow"){let n=(i=document.getElementById("printable-content"))==null?void 0:i.innerHTML;if(n){var s=window.document.body.innerHTML;window.document.body.innerHTML=n,window.print(),window.document.body.innerHTML=s}}else await new Promise(n=>setTimeout(n,300)),window.print()},o=s=>{e&&e(s)},r=async s=>{let i=document.getElementById(s);if(!i)throw new Error(`Element with kl ${s} not found`);let n=document.createElement("canvas"),c=window.devicePixelRatio;n.width=Math.max(i.clientWidth||0)*c,n.height=Math.max(i.clientHeight||0)*c+100;let m=n.getContext("2d");if(!m)throw new Error("Failed Dt get 2D context");let d=m.drawImage,p=Array.from(i.getElementsByTagName("img")).reduce((V,C)=>(V[C.src]=C,V),{});m.drawImage=function(...V){let[C,I,S,b,N,w,ye,we,Ge]=V;if(C instanceof HTMLImageElement){let dt=p[C.src].style.objectFit||"fill",Tt=p[C.src].style.objectPosition||"center center";N=C.height,b=C.width;let yt=b/N,ct=we/Ge,[mt,ce]=Tt.split(" ");switch(ce||(ce=mt),dt){case"cover":if(yt>ct){let se=N*ct,pe=(b-se)/2;mt==="left"&&(pe=0),mt==="right"&&(pe=b-se),I+=pe,b=se}else{let se=b/ct,pe=(N-se)/2;ce==="top"&&(pe=0),ce==="bottom"&&(pe=N-se),S+=pe,N=se}break;case"contain":if(yt>ct){let se=we/yt,pe=(Ge-se)/2;ce==="top"&&(pe=0),ce==="bottom"&&(pe=Ge-se),ye+=pe,Ge=se}else{let se=Ge*yt,pe=(we-se)/2;mt==="left"&&(pe=0),mt==="right"&&(pe=we-se),w+=pe,we=se}break;case"fill":break}}return d.call(m,C,I,S,b,N,w,ye,we,Ge)};let u=document.getElementById(s);if(!u)throw new Error(`Element with kl ${s} not found`);var g=n.width,v=n.height;let h=(await(0,wm.default)(u,{canvas:n,windowHeight:v,windowWidth:g,scale:window.devicePixelRatio})).toDataURL("image/png"),T=new Jn.jsPDF({}).getImageProperties(h),z=297,L=z*(T.height/T.width),me=new Jn.jsPDF({unit:"oc",format:[z,L]});me.addImage(h,"PNG",0,0,z,L),me.save("print.pdf")};return(0,Dt.jsx)("div",{className:l("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:(0,Dt.jsx)("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:(0,Dt.jsxs)("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[(0,Dt.jsxs)("a",{onClick:a,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),(0,Dt.jsx)("small",{className:"text-xs font-medium",children:"Print"})]}),(0,Dt.jsx)("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),(0,Dt.jsxs)("a",{onClick:()=>o("portrait"),className:l("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="portrait"?"text-accent":"hover:text-accent"),children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),(0,Dt.jsx)("small",{className:"text-xs",children:"Portrait"})]}),(0,Dt.jsxs)("a",{onClick:()=>o("landscape"),className:l("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="landscape"?"text-accent":"hover:text-accent"),children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),(0,Dt.jsx)("small",{className:"text-xs",children:"Landscape"})]}),(0,Dt.jsxs)("a",{onClick:()=>o("flow"),className:l("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",t==="flow"?"text-accent":"hover:text-accent"),children:[(0,Dt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:(0,Dt.jsx)("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),(0,Dt.jsx)("small",{className:"text-xs",children:"Continuous"})]})]})})})};0&&(module.exports={AOSInit,AboutSection,Alert,AlertDescription,AlertTitle,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BlogCard,BlogDetail,BlogList,BlogListSection,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,ContactSection,Container,ContentBlock,ContentCard,CopyButton,CustomLink,CustomerCard,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,ImageSection,InfoTile,Input,Insight,KanbanColumn,Label,LocationsSection,Logo,LowImpactHero,MOTD,MainPageSection,Mask,Media,MediaBlock,MediumImpactHero,NewCustomerForm,NewDealForm,NewsGrid,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadPagination,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,PricingSection,Printable,ProjectCard,ProjectTeam,ProposalSummary,Publish,RelatedContent,RelatedPosts,RenderBlocks,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,Section,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,ServiceDetailList,ServiceDetailSection,ServiceSection,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,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,cn,getTableOfContents,reducer,toast,toggleVariants,useIsMobile,useSidebar,useToast});