cortex-react-components 3.0.7 → 3.0.9

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 (225) hide show
  1. package/dist/{chunk-LSHBOPCT.mjs → chunk-27NWC2OO.mjs} +6 -3
  2. package/dist/{chunk-6B6BKJIE.mjs → chunk-34R3E2JB.mjs} +1 -1
  3. package/dist/{chunk-2NKCNQ56.mjs → chunk-3YAZKLH3.mjs} +1 -1
  4. package/dist/{chunk-FUNWDVGQ.mjs → chunk-4DNX5IYR.mjs} +1 -1
  5. package/dist/{chunk-HABWABS7.mjs → chunk-4O6ESJYG.mjs} +32 -11
  6. package/dist/{chunk-7H3IRT7K.mjs → chunk-5CQITTLV.mjs} +1 -1
  7. package/dist/{chunk-NAPGIF5D.mjs → chunk-5DYPBHBP.mjs} +3 -3
  8. package/dist/{chunk-DAQOEDAR.mjs → chunk-5NGZXIP7.mjs} +1 -1
  9. package/dist/{chunk-P4DQRHCA.mjs → chunk-6I3O6TVG.mjs} +1 -1
  10. package/dist/{chunk-EDJDHF22.mjs → chunk-6QSVFSOJ.mjs} +1 -1
  11. package/dist/{chunk-R2SJ5TZH.mjs → chunk-6VQJSQRU.mjs} +8 -8
  12. package/dist/{chunk-WMAVH7JO.mjs → chunk-6VQLA4YU.mjs} +2 -2
  13. package/dist/{chunk-GXTF5CHJ.mjs → chunk-7D3SYOXW.mjs} +7 -4
  14. package/dist/{chunk-DO73CLFG.mjs → chunk-AQPLEBKG.mjs} +1 -1
  15. package/dist/{chunk-ZPWWTTFF.mjs → chunk-BPAZFILP.mjs} +1 -1
  16. package/dist/{chunk-K3TF6OWE.mjs → chunk-BVCARDFK.mjs} +5 -5
  17. package/dist/{chunk-ENFQLMV3.mjs → chunk-CKBIYWPM.mjs} +1 -1
  18. package/dist/{chunk-KV5RVOAP.mjs → chunk-DGV5AVAW.mjs} +1 -1
  19. package/dist/{chunk-OS5X3ADZ.mjs → chunk-E5LGE3IW.mjs} +1 -1
  20. package/dist/chunk-F4LCVFZK.mjs +19 -0
  21. package/dist/{chunk-LAJ5FNY4.mjs → chunk-G5N5MCLS.mjs} +1 -1
  22. package/dist/{chunk-HZZWKYB5.mjs → chunk-G7GPQ6BO.mjs} +1 -1
  23. package/dist/{chunk-URCY4KWN.mjs → chunk-G7WAPCKX.mjs} +1 -1
  24. package/dist/{chunk-7OGBZ6QQ.mjs → chunk-ICVTRW5Y.mjs} +1 -1
  25. package/dist/{chunk-AICDXFGU.mjs → chunk-IFEQNYUB.mjs} +2 -2
  26. package/dist/{chunk-LCRSPNPB.mjs → chunk-LELKTN52.mjs} +18 -14
  27. package/dist/{chunk-RKQ4CVVG.mjs → chunk-M7LM5P64.mjs} +1 -1
  28. package/dist/{chunk-DQZO42TD.mjs → chunk-MSAH6P5O.mjs} +1 -1
  29. package/dist/{chunk-GZW77OJM.mjs → chunk-NKHYDT5B.mjs} +1 -1
  30. package/dist/{chunk-TTVOGAI4.mjs → chunk-OFES4YYV.mjs} +2 -2
  31. package/dist/{chunk-LP3K7AVX.mjs → chunk-OYHXC3AT.mjs} +13 -13
  32. package/dist/{chunk-7ZMZT7I6.mjs → chunk-P7BPG7W7.mjs} +1 -1
  33. package/dist/chunk-PIQUYPOZ.mjs +41 -0
  34. package/dist/{chunk-KVULICDA.mjs → chunk-PVI4R7FJ.mjs} +1 -1
  35. package/dist/{chunk-I647IJUG.mjs → chunk-QC2AXU6I.mjs} +2 -2
  36. package/dist/{chunk-M5JROT2X.mjs → chunk-R242HNC3.mjs} +1 -1
  37. package/dist/{chunk-6Q4KYDHK.mjs → chunk-RJRQ3SY5.mjs} +2 -2
  38. package/dist/{chunk-OXZ5QAXQ.mjs → chunk-S4FUSOSS.mjs} +1 -1
  39. package/dist/{chunk-DAGWV4UL.mjs → chunk-SRK3Y7FA.mjs} +1 -1
  40. package/dist/{chunk-2TJ5HOCV.mjs → chunk-UBEWNGCN.mjs} +1 -1
  41. package/dist/{chunk-JBFNSEIJ.mjs → chunk-UETTBM3J.mjs} +1 -1
  42. package/dist/{chunk-DB2F6SID.mjs → chunk-ULYN63F3.mjs} +1 -1
  43. package/dist/{chunk-VNSEHNDX.mjs → chunk-VF2QBVAI.mjs} +1 -1
  44. package/dist/{chunk-EC4N6ZH3.mjs → chunk-WA3OQB7X.mjs} +1 -1
  45. package/dist/{chunk-UDZU3AZC.mjs → chunk-XWYGGWIF.mjs} +4 -4
  46. package/dist/{chunk-2PGER2HM.mjs → chunk-YMXGTNMY.mjs} +1 -1
  47. package/dist/{chunk-G3UZUSQZ.mjs → chunk-ZFWHFUZP.mjs} +4 -4
  48. package/dist/{chunk-HQ2AUN2H.mjs → chunk-ZMITLXFT.mjs} +1 -1
  49. package/dist/{chunk-DRCDP3RU.mjs → chunk-ZXU5T3GV.mjs} +1 -1
  50. package/dist/{chunk-6RAMGDYG.mjs → chunk-ZZ5EM2M4.mjs} +1 -1
  51. package/dist/components/AdvancedComponents/index.mjs +9 -9
  52. package/dist/components/AdvancedComponents/org-chart-component/OrgChart.mjs +4 -4
  53. package/dist/components/AdvancedComponents/org-chart-component/OrgNode.mjs +2 -2
  54. package/dist/components/AdvancedComponents/org-chart-component/OrgTree.mjs +3 -3
  55. package/dist/components/AdvancedComponents/org-chart-component/index.mjs +6 -6
  56. package/dist/components/Blocks/Banner.js +17 -1
  57. package/dist/components/Blocks/Banner.mjs +4 -3
  58. package/dist/components/Blocks/CallToAction.js +17 -1
  59. package/dist/components/Blocks/CallToAction.mjs +4 -3
  60. package/dist/components/Blocks/CollapsibleArea.js +17 -1
  61. package/dist/components/Blocks/CollapsibleArea.mjs +5 -4
  62. package/dist/components/Blocks/Content.js +17 -1
  63. package/dist/components/Blocks/Content.mjs +5 -4
  64. package/dist/components/Blocks/FeaturesBlock.js +17 -1
  65. package/dist/components/Blocks/FeaturesBlock.mjs +4 -3
  66. package/dist/components/Blocks/RelatedPosts.js +17 -1
  67. package/dist/components/Blocks/RelatedPosts.mjs +5 -4
  68. package/dist/components/Blocks/RenderBlocks.js +17 -1
  69. package/dist/components/Blocks/RenderBlocks.mjs +7 -6
  70. package/dist/components/Blocks/ReusableContentBlock.js +17 -1
  71. package/dist/components/Blocks/ReusableContentBlock.mjs +7 -6
  72. package/dist/components/Blocks/index.js +17 -1
  73. package/dist/components/Blocks/index.mjs +13 -12
  74. package/dist/components/CRM/CogeBoard.js +1 -1
  75. package/dist/components/CRM/CogeBoard.mjs +2 -2
  76. package/dist/components/CRM/DealDetails.js +1 -1
  77. package/dist/components/CRM/DealDetails.mjs +1 -1
  78. package/dist/components/CRM/KanbanBoard.js +1 -1
  79. package/dist/components/CRM/KanbanBoard.mjs +2 -2
  80. package/dist/components/CRM/NewDealForm.js +1 -1
  81. package/dist/components/CRM/NewDealForm.mjs +1 -1
  82. package/dist/components/CRM/index.js +2 -2
  83. package/dist/components/CRM/index.mjs +4 -4
  84. package/dist/components/CRM/mockData.js +6 -6
  85. package/dist/components/CRM/mockData.mjs +6 -6
  86. package/dist/components/Cards/ContentCard.js +17 -1
  87. package/dist/components/Cards/ContentCard.mjs +4 -3
  88. package/dist/components/Cards/FeatureCard.js +17 -1
  89. package/dist/components/Cards/FeatureCard.mjs +4 -3
  90. package/dist/components/Cards/index.js +17 -1
  91. package/dist/components/Cards/index.mjs +6 -5
  92. package/dist/components/Chat/ChatInterface.mjs +7 -7
  93. package/dist/components/Chat/CopilotInterface.mjs +8 -8
  94. package/dist/components/Chat/PartTypes/MessageHandler.mjs +6 -6
  95. package/dist/components/Chat/PartTypes/index.mjs +19 -19
  96. package/dist/components/Chat/demo-long-messages.mjs +8 -8
  97. package/dist/components/Chat/demo-tests.mjs +8 -8
  98. package/dist/components/Chat/demo.mjs +8 -8
  99. package/dist/components/Chat/example-usage.mjs +9 -9
  100. package/dist/components/Chat/example-with-vercel-ai.mjs +8 -8
  101. package/dist/components/Chat/index.mjs +11 -11
  102. package/dist/components/DigitalColleagues/MainPage.mjs +4 -4
  103. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +9 -9
  104. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +2 -2
  105. package/dist/components/DigitalColleagues/Views/index.mjs +19 -19
  106. package/dist/components/DigitalColleagues/index.mjs +27 -27
  107. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +2 -2
  108. package/dist/components/Foundary/Knowledge/add-team-context.mjs +2 -2
  109. package/dist/components/Foundary/MainPage.mjs +4 -4
  110. package/dist/components/Foundary/Pages/dashboardpage.mjs +13 -13
  111. package/dist/components/Foundary/RichText/index.mjs +3 -3
  112. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +2 -2
  113. package/dist/components/Foundary/Views/KnowledgeView.mjs +9 -9
  114. package/dist/components/Foundary/Views/index.mjs +21 -21
  115. package/dist/components/Foundary/document-edit.mjs +4 -4
  116. package/dist/components/Foundary/document-preview-examples.mjs +5 -5
  117. package/dist/components/Foundary/document-preview.mjs +5 -5
  118. package/dist/components/Foundary/file-edit.mjs +6 -6
  119. package/dist/components/Foundary/index.mjs +39 -39
  120. package/dist/components/Foundary/knowledge-browser.mjs +6 -6
  121. package/dist/components/HeaderFooter/SectionHeading.js +17 -1
  122. package/dist/components/HeaderFooter/SectionHeading.mjs +5 -4
  123. package/dist/components/HeaderFooter/index.mjs +8 -8
  124. package/dist/components/Heros/HighImpact/index.js +17 -1
  125. package/dist/components/Heros/HighImpact/index.mjs +5 -4
  126. package/dist/components/Heros/LowImpact/index.js +17 -1
  127. package/dist/components/Heros/LowImpact/index.mjs +5 -4
  128. package/dist/components/Heros/MediumImpact/index.js +17 -1
  129. package/dist/components/Heros/MediumImpact/index.mjs +5 -4
  130. package/dist/components/Heros/PostHero/index.mjs +2 -2
  131. package/dist/components/Heros/RenderHero.js +17 -1
  132. package/dist/components/Heros/RenderHero.mjs +8 -7
  133. package/dist/components/Heros/index.js +17 -1
  134. package/dist/components/Heros/index.mjs +12 -11
  135. package/dist/components/Holidays/CalendarView.d.ts +2 -1
  136. package/dist/components/Holidays/CalendarView.js +18 -14
  137. package/dist/components/Holidays/CalendarView.mjs +1 -1
  138. package/dist/components/Holidays/HolidayGrid.js +5 -3
  139. package/dist/components/Holidays/HolidayGrid.mjs +2 -2
  140. package/dist/components/Holidays/HolidayTracker.d.ts +2 -1
  141. package/dist/components/Holidays/HolidayTracker.js +65 -35
  142. package/dist/components/Holidays/HolidayTracker.mjs +5 -5
  143. package/dist/components/Holidays/RequestLeave.js +40 -17
  144. package/dist/components/Holidays/RequestLeave.mjs +2 -2
  145. package/dist/components/Holidays/index.js +65 -35
  146. package/dist/components/Holidays/index.mjs +5 -5
  147. package/dist/components/Layouts/OutputHeaderFooter.js +17 -1
  148. package/dist/components/Layouts/OutputHeaderFooter.mjs +6 -5
  149. package/dist/components/Layouts/Print.js +17 -1
  150. package/dist/components/Layouts/Print.mjs +10 -9
  151. package/dist/components/Layouts/SlideShow.js +17 -1
  152. package/dist/components/Layouts/SlideShow.mjs +12 -11
  153. package/dist/components/Layouts/index.js +17 -1
  154. package/dist/components/Layouts/index.mjs +16 -15
  155. package/dist/components/Menus/index.mjs +3 -3
  156. package/dist/components/Payload/RichText/index.js +17 -1
  157. package/dist/components/Payload/RichText/index.mjs +4 -3
  158. package/dist/components/Payload/RichText/serialize.js +17 -1
  159. package/dist/components/Payload/RichText/serialize.mjs +4 -3
  160. package/dist/components/Payload/index.js +17 -1
  161. package/dist/components/Payload/index.mjs +7 -6
  162. package/dist/components/Projects/EpicsView.mjs +2 -2
  163. package/dist/components/Projects/FileView.mjs +9 -9
  164. package/dist/components/Projects/KanbanBoardView.mjs +12 -12
  165. package/dist/components/Projects/ProjectPage.mjs +16 -16
  166. package/dist/components/Projects/ProjectView.mjs +16 -16
  167. package/dist/components/Projects/TaskDetailsModal.mjs +10 -10
  168. package/dist/components/Projects/file-list.mjs +7 -7
  169. package/dist/components/Projects/index.mjs +15 -15
  170. package/dist/components/dc-temp/index.mjs +9 -9
  171. package/dist/components/index.js +116 -70
  172. package/dist/components/index.mjs +121 -120
  173. package/dist/components/ui/index.mjs +11 -11
  174. package/dist/decorators/Intranet.mjs +73 -72
  175. package/dist/index.js +116 -70
  176. package/dist/index.mjs +134 -133
  177. package/dist/metafile-cjs.json +1 -1
  178. package/dist/metafile-esm.json +1 -1
  179. package/dist/pages/Blog.js +17 -1
  180. package/dist/pages/Blog.mjs +12 -11
  181. package/dist/pages/Documentation.mjs +4 -4
  182. package/dist/pages/IndexPage.mjs +15 -14
  183. package/dist/pages/Intranet.mjs +1 -1
  184. package/dist/pages/LandingPage.js +17 -1
  185. package/dist/pages/LandingPage.mjs +83 -82
  186. package/dist/pages/Page.js +17 -1
  187. package/dist/pages/Page.mjs +15 -14
  188. package/dist/pages/Publish.js +17 -1
  189. package/dist/pages/Publish.mjs +72 -71
  190. package/dist/pages/Website.js +17 -1
  191. package/dist/pages/Website.mjs +17 -16
  192. package/dist/payload-types.d.ts +1 -1
  193. package/dist/sections/AboutSection.js +17 -1
  194. package/dist/sections/AboutSection.mjs +6 -5
  195. package/dist/sections/BlogDetail.js +17 -1
  196. package/dist/sections/BlogDetail.mjs +5 -4
  197. package/dist/sections/BlogList.js +17 -1
  198. package/dist/sections/BlogList.mjs +6 -5
  199. package/dist/sections/BlogListSection.mjs +2 -2
  200. package/dist/sections/ContactSection.js +17 -1
  201. package/dist/sections/ContactSection.mjs +6 -5
  202. package/dist/sections/PageSections.js +17 -1
  203. package/dist/sections/PageSections.mjs +81 -80
  204. package/dist/sections/PricingSection.js +17 -1
  205. package/dist/sections/PricingSection.mjs +6 -5
  206. package/dist/sections/ServiceDetail.js +17 -1
  207. package/dist/sections/ServiceDetail.mjs +5 -4
  208. package/dist/sections/ServiceDetailSection.js +17 -1
  209. package/dist/sections/ServiceDetailSection.mjs +5 -4
  210. package/dist/sections/ServiceSection.js +17 -1
  211. package/dist/sections/ServiceSection.mjs +72 -71
  212. package/dist/sections/index.js +17 -1
  213. package/dist/sections/index.mjs +83 -82
  214. package/dist/utils/DaysUtil.js +9 -7
  215. package/dist/utils/DaysUtil.mjs +1 -1
  216. package/dist/utils/getLinkHref.d.ts +12 -0
  217. package/dist/utils/getLinkHref.js +43 -0
  218. package/dist/utils/getLinkHref.mjs +7 -0
  219. package/package.json +1 -1
  220. package/dist/chunk-I4UOIVSC.mjs +0 -39
  221. package/dist/{chunk-25OSLP2V.mjs → chunk-6TVRFATY.mjs} +3 -3
  222. package/dist/{chunk-EUAUP52U.mjs → chunk-7UMFQPR5.mjs} +3 -3
  223. package/dist/{chunk-ECCJ42NJ.mjs → chunk-L666B5DN.mjs} +14 -14
  224. package/dist/{chunk-DZYAOBGH.mjs → chunk-PXB2ICFA.mjs} +3 -3
  225. package/dist/{chunk-6OFY4WMY.mjs → chunk-RWZ36G7W.mjs} +3 -3
@@ -2854,7 +2854,6 @@ var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffse
2854
2854
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
2855
2855
 
2856
2856
  // src/components/Holidays/RequestLeave.tsx
2857
- var import_date_fns = require("date-fns");
2858
2857
  var import_lucide_react2 = require("lucide-react");
2859
2858
  var import_navigation2 = require("next/navigation");
2860
2859
  var import_sonner2 = require("sonner");
@@ -2899,14 +2898,16 @@ var bankHolidays = [
2899
2898
 
2900
2899
  // src/utils/DaysUtil.ts
2901
2900
  var isDayOff = (date) => {
2902
- const isSunday = date.getDay() === 0;
2903
- const isSaturday = date.getDay() === 6;
2904
- const isBankHoliday = bankHolidays.some((h) => h.toISOString() === date.toISOString());
2901
+ const isSunday = date.getUTCDay() === 0;
2902
+ const isSaturday = date.getUTCDay() === 6;
2903
+ const isBankHoliday = bankHolidays.some(
2904
+ (h) => h.getFullYear() === date.getUTCFullYear() && h.getMonth() === date.getUTCMonth() && h.getDate() === date.getUTCDate()
2905
+ );
2905
2906
  return isSunday || isSaturday || isBankHoliday;
2906
2907
  };
2907
2908
  var getTotalDaysBetween = (startDate, endDate, isHalfDay = false) => {
2908
- const start = new Date(startDate);
2909
- const end = new Date(endDate);
2909
+ let start = new Date(Date.UTC(startDate.getUTCFullYear(), startDate.getUTCMonth(), startDate.getUTCDate()));
2910
+ const end = new Date(Date.UTC(endDate.getUTCFullYear(), endDate.getUTCMonth(), endDate.getUTCDate()));
2910
2911
  let count = 0;
2911
2912
  if (isHalfDay && !isDayOff(start)) {
2912
2913
  return 0.5;
@@ -2915,7 +2916,7 @@ var getTotalDaysBetween = (startDate, endDate, isHalfDay = false) => {
2915
2916
  if (!isDayOff(start)) {
2916
2917
  count++;
2917
2918
  }
2918
- start.setDate(start.getDate() + 1);
2919
+ start = new Date(start.getTime() + 24 * 60 * 60 * 1e3);
2919
2920
  }
2920
2921
  return count;
2921
2922
  };
@@ -2923,7 +2924,7 @@ var getIsMultipleDays = (startDate, endDate) => {
2923
2924
  if (!startDate || !endDate) {
2924
2925
  return false;
2925
2926
  }
2926
- const isMultipleDays = startDate.toDateString() !== endDate.toDateString();
2927
+ const isMultipleDays = startDate.getUTCFullYear() !== endDate.getUTCFullYear() || startDate.getUTCMonth() !== endDate.getUTCMonth() || startDate.getUTCDate() !== endDate.getUTCDate();
2927
2928
  return isMultipleDays;
2928
2929
  };
2929
2930
 
@@ -2944,11 +2945,26 @@ var ButtonGroup = ({ options, value, onChange, disabled = [] }) => {
2944
2945
  )) });
2945
2946
  };
2946
2947
  function RequestLeave({ remainingDays, submitLeaveRequest }) {
2947
- const [startDate, setStartDate] = (0, import_react2.useState)(/* @__PURE__ */ new Date());
2948
- const [endDate, setEndDate] = (0, import_react2.useState)(/* @__PURE__ */ new Date());
2948
+ const setToMidnightUTC = (date) => {
2949
+ return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0, 0));
2950
+ };
2951
+ const formatDateUTC = (date) => {
2952
+ const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
2953
+ const day = date.getUTCDate();
2954
+ const month = months[date.getUTCMonth()];
2955
+ const year = date.getUTCFullYear();
2956
+ const suffix = day === 1 || day === 21 || day === 31 ? "st" : day === 2 || day === 22 ? "nd" : day === 3 || day === 23 ? "rd" : "th";
2957
+ return `${month} ${day}${suffix}, ${year}`;
2958
+ };
2959
+ const [startDate, setStartDate] = (0, import_react2.useState)(void 0);
2960
+ const [endDate, setEndDate] = (0, import_react2.useState)(void 0);
2961
+ (0, import_react2.useEffect)(() => {
2962
+ if (startDate === void 0) setStartDate(setToMidnightUTC(/* @__PURE__ */ new Date()));
2963
+ if (endDate === void 0) setEndDate(setToMidnightUTC(/* @__PURE__ */ new Date()));
2964
+ }, []);
2949
2965
  const [leaveType, setLeaveType] = (0, import_react2.useState)("Full Day");
2950
2966
  const [isMultipleDays, setIsMultipleDays] = (0, import_react2.useState)(false);
2951
- const [totalDays, setTotalDays] = (0, import_react2.useState)(1);
2967
+ const [totalDays, setTotalDays] = (0, import_react2.useState)(0);
2952
2968
  const router = (0, import_navigation2.useRouter)();
2953
2969
  (0, import_react2.useEffect)(() => {
2954
2970
  const isMultipleDays2 = getIsMultipleDays(startDate, endDate);
@@ -3017,7 +3033,7 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
3017
3033
  ),
3018
3034
  children: [
3019
3035
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.CalendarIcon, { className: "mr-2 h-4 w-4" }),
3020
- startDate ? (0, import_date_fns.format)(startDate, "PPP") : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Pick a date" })
3036
+ startDate ? formatDateUTC(startDate) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Pick a date" })
3021
3037
  ]
3022
3038
  }
3023
3039
  ) }),
@@ -3027,9 +3043,12 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
3027
3043
  mode: "single",
3028
3044
  selected: startDate,
3029
3045
  onSelect: (date) => {
3030
- setStartDate(date);
3031
- if (date && (!endDate || date > endDate)) {
3032
- setEndDate(date);
3046
+ if (date) {
3047
+ const dateMidnight = setToMidnightUTC(date);
3048
+ setStartDate(dateMidnight);
3049
+ if (!endDate || date > endDate) {
3050
+ setEndDate(dateMidnight);
3051
+ }
3033
3052
  }
3034
3053
  },
3035
3054
  initialFocus: true
@@ -3050,7 +3069,7 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
3050
3069
  ),
3051
3070
  children: [
3052
3071
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.CalendarIcon, { className: "mr-2 h-4 w-4" }),
3053
- endDate ? (0, import_date_fns.format)(endDate, "PPP") : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Pick a date" })
3072
+ endDate ? formatDateUTC(endDate) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Pick a date" })
3054
3073
  ]
3055
3074
  }
3056
3075
  ) }),
@@ -3059,7 +3078,11 @@ function RequestLeave({ remainingDays, submitLeaveRequest }) {
3059
3078
  {
3060
3079
  mode: "single",
3061
3080
  selected: endDate,
3062
- onSelect: setEndDate,
3081
+ onSelect: (date) => {
3082
+ if (date) {
3083
+ setEndDate(setToMidnightUTC(date));
3084
+ }
3085
+ },
3063
3086
  disabled: (date) => startDate ? date < startDate : false,
3064
3087
  initialFocus: true
3065
3088
  }
@@ -3278,38 +3301,42 @@ function HolidayGrid({
3278
3301
  var import_react3 = require("react");
3279
3302
  var import_lucide_react4 = require("lucide-react");
3280
3303
  var import_jsx_runtime11 = require("react/jsx-runtime");
3281
- function CalendarView({ currentDate, setCurrentDate, holidays }) {
3304
+ function CalendarView({ currentDate, setCurrentDate, holidays, today }) {
3282
3305
  const [selectedDay, setSelectedDay] = (0, import_react3.useState)(null);
3283
- const firstDayOfMonth = (new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).getDay() + 6) % 7;
3306
+ const isSameUtcDay = (a, b) => a.getUTCFullYear() === b.getUTCFullYear() && a.getUTCMonth() === b.getUTCMonth() && a.getUTCDate() === b.getUTCDate();
3307
+ const firstDayOfMonth = (new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), 1)).getUTCDay() + 6) % 7;
3284
3308
  const days = Array.from({ length: 42 }, (_, i) => {
3285
3309
  const day = new Date(
3286
- currentDate.getFullYear(),
3287
- currentDate.getMonth(),
3288
- i - firstDayOfMonth + 1,
3289
- currentDate.getHours()
3310
+ Date.UTC(
3311
+ currentDate.getUTCFullYear(),
3312
+ currentDate.getUTCMonth(),
3313
+ i - firstDayOfMonth + 1
3314
+ )
3290
3315
  );
3291
3316
  const filteredHolidays = holidays.filter(
3292
3317
  (h) => TimeUtil.toUtcMidnight(new Date(h.startDate)) <= day && TimeUtil.toUtcEndOfDay(new Date(h.endDate)) >= day
3293
3318
  );
3294
3319
  return {
3295
3320
  date: day,
3296
- isCurrentMonth: day.getMonth() === currentDate.getMonth(),
3297
- isToday: day.toDateString() === (/* @__PURE__ */ new Date()).toDateString(),
3321
+ isCurrentMonth: day.getUTCMonth() === currentDate.getUTCMonth(),
3322
+ isToday: isSameUtcDay(day, today),
3298
3323
  holidays: filteredHolidays
3299
3324
  };
3300
3325
  });
3301
3326
  const prevMonth = () => {
3302
- setCurrentDate(new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1));
3327
+ setCurrentDate(new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth() - 1, 1)));
3303
3328
  };
3304
3329
  const nextMonth = () => {
3305
- setCurrentDate(new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 1));
3330
+ setCurrentDate(new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth() + 1, 1)));
3306
3331
  };
3307
3332
  const setToday = () => {
3308
- setCurrentDate(/* @__PURE__ */ new Date());
3333
+ setCurrentDate(TimeUtil.toUtcMidnight(/* @__PURE__ */ new Date()));
3309
3334
  };
3335
+ const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
3336
+ const monthYearDisplay = `${months[currentDate.getUTCMonth()]} ${currentDate.getUTCFullYear()}`;
3310
3337
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "lg:flex lg:h-full lg:flex-col", children: [
3311
3338
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("header", { className: "flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none", children: [
3312
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { className: "text-base font-semibold text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("time", { dateTime: currentDate.toISOString(), children: currentDate.toLocaleString("default", { month: "long", year: "numeric" }) }) }),
3339
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { className: "text-base font-semibold text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("time", { dateTime: currentDate.toISOString(), children: monthYearDisplay }) }),
3313
3340
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "relative flex items-center rounded-md gap-1 md:items-stretch", children: [
3314
3341
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3315
3342
  Button,
@@ -3396,7 +3423,7 @@ function CalendarView({ currentDate, setCurrentDate, holidays }) {
3396
3423
  "flex h-6 w-6 items-center justify-center rounded-full",
3397
3424
  day.isToday && "bg-indigo-600 font-semibold text-white"
3398
3425
  ),
3399
- children: day.date.getDate()
3426
+ children: day.date.getUTCDate()
3400
3427
  }
3401
3428
  ),
3402
3429
  day.holidays.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ol", { className: "mt-2 space-y-1 overflow-visible", children: day.holidays.map((holiday) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { className: "overflow-visible", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
@@ -3433,7 +3460,7 @@ function CalendarView({ currentDate, setCurrentDate, holidays }) {
3433
3460
  day.date === selectedDay && day.isToday && "flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",
3434
3461
  day.date === selectedDay && !day.isToday && "flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"
3435
3462
  ),
3436
- children: day.date.getDate()
3463
+ children: day.date.getUTCDate()
3437
3464
  }
3438
3465
  ),
3439
3466
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "sr-only", children: [
@@ -3461,7 +3488,7 @@ var import_react4 = require("react");
3461
3488
  var import_lucide_react5 = require("lucide-react");
3462
3489
  var import_lucide_react6 = require("lucide-react");
3463
3490
  var import_navigation3 = require("next/navigation");
3464
- var import_date_fns2 = require("date-fns");
3491
+ var import_date_fns = require("date-fns");
3465
3492
  var import_jsx_runtime12 = require("react/jsx-runtime");
3466
3493
  function classNames2(...classes) {
3467
3494
  return classes.filter(Boolean).join(" ");
@@ -3470,6 +3497,7 @@ function HolidayTracker({
3470
3497
  holidays,
3471
3498
  currentUser,
3472
3499
  currentDate,
3500
+ today,
3473
3501
  leaveApprovals,
3474
3502
  employees,
3475
3503
  submitLeaveRequest,
@@ -3479,9 +3507,10 @@ function HolidayTracker({
3479
3507
  const [currentTab, setCurrentTab] = (0, import_react4.useState)("Calendar View");
3480
3508
  const router = (0, import_navigation3.useRouter)();
3481
3509
  const isLoading = false;
3482
- const parsedCurrentDate = TimeUtil.toUtcMidnight((0, import_date_fns2.parseISO)(currentDate));
3510
+ const parsedCurrentDate = TimeUtil.toUtcMidnight((0, import_date_fns.parseISO)(currentDate));
3511
+ const parsedToday = TimeUtil.toUtcMidnight((0, import_date_fns.parseISO)(today));
3483
3512
  const setCurrentDate = async (date) => {
3484
- const formattedDate = (0, import_date_fns2.format)(date, "dd-MM-yyyy");
3513
+ const formattedDate = (0, import_date_fns.format)(date, "dd-MM-yyyy");
3485
3514
  const url = new URL(window.location.href);
3486
3515
  url.searchParams.set("date", formattedDate);
3487
3516
  router.push(url.toString());
@@ -3561,7 +3590,8 @@ function HolidayTracker({
3561
3590
  {
3562
3591
  currentDate: parsedCurrentDate,
3563
3592
  setCurrentDate,
3564
- holidays
3593
+ holidays,
3594
+ today: parsedToday
3565
3595
  }
3566
3596
  ),
3567
3597
  currentTab === "Request Leave" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  HolidayTracker
3
- } from "../../chunk-GXTF5CHJ.mjs";
3
+ } from "../../chunk-7D3SYOXW.mjs";
4
4
  import {
5
5
  RequestLeave
6
- } from "../../chunk-HABWABS7.mjs";
6
+ } from "../../chunk-4O6ESJYG.mjs";
7
7
  import {
8
8
  ApproveLeave
9
9
  } from "../../chunk-7UVCCDPI.mjs";
10
10
  import {
11
11
  CalendarView
12
- } from "../../chunk-LCRSPNPB.mjs";
12
+ } from "../../chunk-LELKTN52.mjs";
13
13
  import {
14
14
  HolidayGrid
15
- } from "../../chunk-7ZMZT7I6.mjs";
16
- import "../../chunk-I4UOIVSC.mjs";
15
+ } from "../../chunk-P7BPG7W7.mjs";
16
+ import "../../chunk-PIQUYPOZ.mjs";
17
17
  import "../../chunk-IZ2IHNU4.mjs";
18
18
  import "../../chunk-6V75REDA.mjs";
19
19
  import "../../chunk-B2NSGNGK.mjs";
@@ -3132,6 +3132,22 @@ var ImageBlock = (props) => {
3132
3132
  );
3133
3133
  };
3134
3134
 
3135
+ // src/utils/getLinkHref.ts
3136
+ function getLinkHref(link) {
3137
+ if (!link) return "#";
3138
+ if (link.url) return link.url;
3139
+ if (link.reference?.value) {
3140
+ const { relationTo, value } = link.reference;
3141
+ const slug = value?.slug;
3142
+ if (!slug) return "#";
3143
+ if (relationTo === "pages") {
3144
+ return `/${slug}`;
3145
+ }
3146
+ return `/${relationTo}/${slug}`;
3147
+ }
3148
+ return "#";
3149
+ }
3150
+
3135
3151
  // src/components/Images/DynamicIcon.tsx
3136
3152
  var import_jsx_runtime16 = require("react/jsx-runtime");
3137
3153
  var DynamicIcon = ({
@@ -3181,7 +3197,7 @@ function FeatureCard({
3181
3197
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
3182
3198
  "a",
3183
3199
  {
3184
- href: link?.url || "#",
3200
+ href: getLinkHref(link),
3185
3201
  className: cn(
3186
3202
  "min-w-56 max-w-xl h-full flex flex-col group bg-background",
3187
3203
  image ? "p-0" : "p-6 md:p-8",
@@ -2,35 +2,36 @@ import {
2
2
  Footer,
3
3
  HeaderTop,
4
4
  TitleSlide
5
- } from "../../chunk-KVULICDA.mjs";
5
+ } from "../../chunk-PVI4R7FJ.mjs";
6
+ import "../../chunk-NR6HSUH7.mjs";
6
7
  import "../../chunk-N42O5NIO.mjs";
7
8
  import "../../chunk-5OGDBGXG.mjs";
8
- import "../../chunk-NR6HSUH7.mjs";
9
9
  import "../../chunk-ZTCAYEGT.mjs";
10
10
  import "../../chunk-HKVESRML.mjs";
11
11
  import "../../chunk-PAXCURFR.mjs";
12
12
  import "../../chunk-4Z4X2GG7.mjs";
13
- import "../../chunk-LSHBOPCT.mjs";
13
+ import "../../chunk-27NWC2OO.mjs";
14
14
  import "../../chunk-YLULVMZ7.mjs";
15
15
  import "../../chunk-2NXKZY7U.mjs";
16
16
  import "../../chunk-GSG52WU5.mjs";
17
17
  import "../../chunk-US72SCH3.mjs";
18
18
  import "../../chunk-G6EC37S7.mjs";
19
19
  import "../../chunk-LTOFCHXU.mjs";
20
+ import "../../chunk-LIJ2ES4B.mjs";
20
21
  import "../../chunk-GTHNG3Q7.mjs";
21
22
  import "../../chunk-PE44IHZN.mjs";
22
23
  import "../../chunk-4GLXI5J3.mjs";
23
24
  import "../../chunk-2X45TVQS.mjs";
24
25
  import "../../chunk-DTQ2W22B.mjs";
25
- import "../../chunk-LIJ2ES4B.mjs";
26
26
  import "../../chunk-6GO5N6ZP.mjs";
27
- import "../../chunk-WPX6MOFB.mjs";
28
27
  import "../../chunk-3R2LCGLI.mjs";
29
28
  import "../../chunk-NKRBXAPF.mjs";
30
29
  import "../../chunk-MW5UCIIC.mjs";
31
30
  import "../../chunk-ZYKYDIOF.mjs";
31
+ import "../../chunk-WPX6MOFB.mjs";
32
32
  import "../../chunk-R57RJLFQ.mjs";
33
33
  import "../../chunk-GIHP74M4.mjs";
34
+ import "../../chunk-F4LCVFZK.mjs";
34
35
  import "../../chunk-3BYULUMU.mjs";
35
36
  import "../../chunk-RZRMW2DZ.mjs";
36
37
  import "../../chunk-GUHOQLS3.mjs";
@@ -2887,6 +2887,22 @@ var ImageBlock = (props) => {
2887
2887
  );
2888
2888
  };
2889
2889
 
2890
+ // src/utils/getLinkHref.ts
2891
+ function getLinkHref(link) {
2892
+ if (!link) return "#";
2893
+ if (link.url) return link.url;
2894
+ if (link.reference?.value) {
2895
+ const { relationTo, value } = link.reference;
2896
+ const slug = value?.slug;
2897
+ if (!slug) return "#";
2898
+ if (relationTo === "pages") {
2899
+ return `/${slug}`;
2900
+ }
2901
+ return `/${relationTo}/${slug}`;
2902
+ }
2903
+ return "#";
2904
+ }
2905
+
2890
2906
  // src/components/Images/DynamicIcon.tsx
2891
2907
  var import_jsx_runtime11 = require("react/jsx-runtime");
2892
2908
  var DynamicIcon = ({
@@ -2936,7 +2952,7 @@ function FeatureCard({
2936
2952
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2937
2953
  "a",
2938
2954
  {
2939
- href: link?.url || "#",
2955
+ href: getLinkHref(link),
2940
2956
  className: cn(
2941
2957
  "min-w-56 max-w-xl h-full flex flex-col group bg-background",
2942
2958
  image ? "p-0" : "p-6 md:p-8",
@@ -4,39 +4,40 @@ import {
4
4
  FlowPrintable,
5
5
  PagePrintable,
6
6
  Printable
7
- } from "../../chunk-WMAVH7JO.mjs";
8
- import "../../chunk-KVULICDA.mjs";
7
+ } from "../../chunk-6VQLA4YU.mjs";
8
+ import "../../chunk-PVI4R7FJ.mjs";
9
+ import "../../chunk-NR6HSUH7.mjs";
9
10
  import "../../chunk-N42O5NIO.mjs";
10
11
  import "../../chunk-5OGDBGXG.mjs";
11
- import "../../chunk-NR6HSUH7.mjs";
12
12
  import "../../chunk-ZTCAYEGT.mjs";
13
13
  import "../../chunk-HKVESRML.mjs";
14
14
  import "../../chunk-PAXCURFR.mjs";
15
15
  import "../../chunk-4Z4X2GG7.mjs";
16
- import "../../chunk-NAPGIF5D.mjs";
17
- import "../../chunk-KV5RVOAP.mjs";
18
- import "../../chunk-EC4N6ZH3.mjs";
19
- import "../../chunk-LSHBOPCT.mjs";
16
+ import "../../chunk-5DYPBHBP.mjs";
17
+ import "../../chunk-DGV5AVAW.mjs";
18
+ import "../../chunk-WA3OQB7X.mjs";
19
+ import "../../chunk-27NWC2OO.mjs";
20
20
  import "../../chunk-YLULVMZ7.mjs";
21
21
  import "../../chunk-2NXKZY7U.mjs";
22
22
  import "../../chunk-GSG52WU5.mjs";
23
23
  import "../../chunk-US72SCH3.mjs";
24
24
  import "../../chunk-G6EC37S7.mjs";
25
25
  import "../../chunk-LTOFCHXU.mjs";
26
+ import "../../chunk-LIJ2ES4B.mjs";
26
27
  import "../../chunk-GTHNG3Q7.mjs";
27
28
  import "../../chunk-PE44IHZN.mjs";
28
29
  import "../../chunk-4GLXI5J3.mjs";
29
30
  import "../../chunk-2X45TVQS.mjs";
30
31
  import "../../chunk-DTQ2W22B.mjs";
31
- import "../../chunk-LIJ2ES4B.mjs";
32
32
  import "../../chunk-6GO5N6ZP.mjs";
33
- import "../../chunk-WPX6MOFB.mjs";
34
33
  import "../../chunk-3R2LCGLI.mjs";
35
34
  import "../../chunk-NKRBXAPF.mjs";
36
35
  import "../../chunk-MW5UCIIC.mjs";
37
36
  import "../../chunk-ZYKYDIOF.mjs";
37
+ import "../../chunk-WPX6MOFB.mjs";
38
38
  import "../../chunk-R57RJLFQ.mjs";
39
39
  import "../../chunk-GIHP74M4.mjs";
40
+ import "../../chunk-F4LCVFZK.mjs";
40
41
  import "../../chunk-3BYULUMU.mjs";
41
42
  import "../../chunk-RZRMW2DZ.mjs";
42
43
  import "../../chunk-GUHOQLS3.mjs";
@@ -3147,6 +3147,22 @@ var ImageBlock = (props) => {
3147
3147
  );
3148
3148
  };
3149
3149
 
3150
+ // src/utils/getLinkHref.ts
3151
+ function getLinkHref(link) {
3152
+ if (!link) return "#";
3153
+ if (link.url) return link.url;
3154
+ if (link.reference?.value) {
3155
+ const { relationTo, value } = link.reference;
3156
+ const slug = value?.slug;
3157
+ if (!slug) return "#";
3158
+ if (relationTo === "pages") {
3159
+ return `/${slug}`;
3160
+ }
3161
+ return `/${relationTo}/${slug}`;
3162
+ }
3163
+ return "#";
3164
+ }
3165
+
3150
3166
  // src/components/Cards/FeatureCard.tsx
3151
3167
  var import_image2 = __toESM(require("next/image"));
3152
3168
  var import_jsx_runtime17 = require("react/jsx-runtime");
@@ -3181,7 +3197,7 @@ function FeatureCard({
3181
3197
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
3182
3198
  "a",
3183
3199
  {
3184
- href: link?.url || "#",
3200
+ href: getLinkHref(link),
3185
3201
  className: cn(
3186
3202
  "min-w-56 max-w-xl h-full flex flex-col group bg-background",
3187
3203
  image ? "p-0" : "p-6 md:p-8",
@@ -2,48 +2,49 @@
2
2
  "use strict";
3
3
  import {
4
4
  SlideShow
5
- } from "../../chunk-I647IJUG.mjs";
6
- import "../../chunk-KVULICDA.mjs";
5
+ } from "../../chunk-QC2AXU6I.mjs";
6
+ import "../../chunk-PVI4R7FJ.mjs";
7
+ import "../../chunk-NR6HSUH7.mjs";
7
8
  import "../../chunk-N42O5NIO.mjs";
8
9
  import "../../chunk-5OGDBGXG.mjs";
9
- import "../../chunk-NR6HSUH7.mjs";
10
10
  import "../../chunk-ZTCAYEGT.mjs";
11
11
  import "../../chunk-HKVESRML.mjs";
12
12
  import "../../chunk-KC2JN5E4.mjs";
13
13
  import "../../chunk-RVVTP5NL.mjs";
14
14
  import "../../chunk-64SYH2HO.mjs";
15
- import "../../chunk-2PGER2HM.mjs";
15
+ import "../../chunk-YMXGTNMY.mjs";
16
16
  import "../../chunk-PAXCURFR.mjs";
17
17
  import "../../chunk-WE7DY7DV.mjs";
18
18
  import "../../chunk-R5QFVX2Y.mjs";
19
19
  import "../../chunk-XPLDQMNA.mjs";
20
20
  import "../../chunk-4Z4X2GG7.mjs";
21
- import "../../chunk-R6GWYR6G.mjs";
22
21
  import "../../chunk-VSL4NZ5W.mjs";
23
- import "../../chunk-NAPGIF5D.mjs";
24
- import "../../chunk-KV5RVOAP.mjs";
25
- import "../../chunk-EC4N6ZH3.mjs";
26
- import "../../chunk-LSHBOPCT.mjs";
22
+ import "../../chunk-R6GWYR6G.mjs";
23
+ import "../../chunk-5DYPBHBP.mjs";
24
+ import "../../chunk-DGV5AVAW.mjs";
25
+ import "../../chunk-WA3OQB7X.mjs";
26
+ import "../../chunk-27NWC2OO.mjs";
27
27
  import "../../chunk-YLULVMZ7.mjs";
28
28
  import "../../chunk-2NXKZY7U.mjs";
29
29
  import "../../chunk-GSG52WU5.mjs";
30
30
  import "../../chunk-US72SCH3.mjs";
31
31
  import "../../chunk-G6EC37S7.mjs";
32
32
  import "../../chunk-LTOFCHXU.mjs";
33
+ import "../../chunk-LIJ2ES4B.mjs";
33
34
  import "../../chunk-GTHNG3Q7.mjs";
34
35
  import "../../chunk-PE44IHZN.mjs";
35
36
  import "../../chunk-4GLXI5J3.mjs";
36
37
  import "../../chunk-2X45TVQS.mjs";
37
38
  import "../../chunk-DTQ2W22B.mjs";
38
- import "../../chunk-LIJ2ES4B.mjs";
39
39
  import "../../chunk-6GO5N6ZP.mjs";
40
- import "../../chunk-WPX6MOFB.mjs";
41
40
  import "../../chunk-3R2LCGLI.mjs";
42
41
  import "../../chunk-NKRBXAPF.mjs";
43
42
  import "../../chunk-MW5UCIIC.mjs";
44
43
  import "../../chunk-ZYKYDIOF.mjs";
44
+ import "../../chunk-WPX6MOFB.mjs";
45
45
  import "../../chunk-R57RJLFQ.mjs";
46
46
  import "../../chunk-GIHP74M4.mjs";
47
+ import "../../chunk-F4LCVFZK.mjs";
47
48
  import "../../chunk-3BYULUMU.mjs";
48
49
  import "../../chunk-RZRMW2DZ.mjs";
49
50
  import "../../chunk-GUHOQLS3.mjs";
@@ -3249,6 +3249,22 @@ var ImageBlock = (props) => {
3249
3249
  );
3250
3250
  };
3251
3251
 
3252
+ // src/utils/getLinkHref.ts
3253
+ function getLinkHref(link) {
3254
+ if (!link) return "#";
3255
+ if (link.url) return link.url;
3256
+ if (link.reference?.value) {
3257
+ const { relationTo, value } = link.reference;
3258
+ const slug = value?.slug;
3259
+ if (!slug) return "#";
3260
+ if (relationTo === "pages") {
3261
+ return `/${slug}`;
3262
+ }
3263
+ return `/${relationTo}/${slug}`;
3264
+ }
3265
+ return "#";
3266
+ }
3267
+
3252
3268
  // src/components/Cards/FeatureCard.tsx
3253
3269
  var import_image2 = __toESM(require("next/image"));
3254
3270
  var import_jsx_runtime18 = require("react/jsx-runtime");
@@ -3283,7 +3299,7 @@ function FeatureCard({
3283
3299
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3284
3300
  "a",
3285
3301
  {
3286
- href: link?.url || "#",
3302
+ href: getLinkHref(link),
3287
3303
  className: cn(
3288
3304
  "min-w-56 max-w-xl h-full flex flex-col group bg-background",
3289
3305
  image ? "p-0" : "p-6 md:p-8",
@@ -1,3 +1,6 @@
1
+ import {
2
+ FeatureGrid
3
+ } from "../../chunk-G6V3RRSZ.mjs";
1
4
  import {
2
5
  NewsGrid
3
6
  } from "../../chunk-4NTAQQDM.mjs";
@@ -5,57 +8,55 @@ import {
5
8
  FlowPrintable,
6
9
  PagePrintable,
7
10
  Printable
8
- } from "../../chunk-WMAVH7JO.mjs";
11
+ } from "../../chunk-6VQLA4YU.mjs";
9
12
  import {
10
13
  SlideShow
11
- } from "../../chunk-I647IJUG.mjs";
12
- import "../../chunk-KVULICDA.mjs";
14
+ } from "../../chunk-QC2AXU6I.mjs";
15
+ import "../../chunk-PVI4R7FJ.mjs";
16
+ import "../../chunk-NR6HSUH7.mjs";
13
17
  import "../../chunk-N42O5NIO.mjs";
14
18
  import "../../chunk-5OGDBGXG.mjs";
15
- import "../../chunk-NR6HSUH7.mjs";
16
19
  import "../../chunk-ZTCAYEGT.mjs";
17
20
  import {
18
21
  TextAndImages
19
22
  } from "../../chunk-C2NN5W2Q.mjs";
20
- import {
21
- FeatureGrid
22
- } from "../../chunk-G6V3RRSZ.mjs";
23
23
  import "../../chunk-HKVESRML.mjs";
24
24
  import "../../chunk-KC2JN5E4.mjs";
25
25
  import "../../chunk-RVVTP5NL.mjs";
26
26
  import "../../chunk-64SYH2HO.mjs";
27
- import "../../chunk-2PGER2HM.mjs";
27
+ import "../../chunk-YMXGTNMY.mjs";
28
28
  import "../../chunk-PAXCURFR.mjs";
29
29
  import "../../chunk-WE7DY7DV.mjs";
30
30
  import "../../chunk-R5QFVX2Y.mjs";
31
31
  import "../../chunk-XPLDQMNA.mjs";
32
32
  import "../../chunk-4Z4X2GG7.mjs";
33
- import "../../chunk-R6GWYR6G.mjs";
34
33
  import "../../chunk-VSL4NZ5W.mjs";
35
- import "../../chunk-NAPGIF5D.mjs";
36
- import "../../chunk-KV5RVOAP.mjs";
37
- import "../../chunk-EC4N6ZH3.mjs";
38
- import "../../chunk-LSHBOPCT.mjs";
34
+ import "../../chunk-R6GWYR6G.mjs";
35
+ import "../../chunk-5DYPBHBP.mjs";
36
+ import "../../chunk-DGV5AVAW.mjs";
37
+ import "../../chunk-WA3OQB7X.mjs";
38
+ import "../../chunk-27NWC2OO.mjs";
39
39
  import "../../chunk-YLULVMZ7.mjs";
40
40
  import "../../chunk-2NXKZY7U.mjs";
41
41
  import "../../chunk-GSG52WU5.mjs";
42
42
  import "../../chunk-US72SCH3.mjs";
43
43
  import "../../chunk-G6EC37S7.mjs";
44
44
  import "../../chunk-LTOFCHXU.mjs";
45
+ import "../../chunk-LIJ2ES4B.mjs";
45
46
  import "../../chunk-GTHNG3Q7.mjs";
46
47
  import "../../chunk-PE44IHZN.mjs";
47
48
  import "../../chunk-4GLXI5J3.mjs";
48
49
  import "../../chunk-2X45TVQS.mjs";
49
50
  import "../../chunk-DTQ2W22B.mjs";
50
- import "../../chunk-LIJ2ES4B.mjs";
51
51
  import "../../chunk-6GO5N6ZP.mjs";
52
- import "../../chunk-WPX6MOFB.mjs";
53
52
  import "../../chunk-3R2LCGLI.mjs";
54
53
  import "../../chunk-NKRBXAPF.mjs";
55
54
  import "../../chunk-MW5UCIIC.mjs";
56
55
  import "../../chunk-ZYKYDIOF.mjs";
56
+ import "../../chunk-WPX6MOFB.mjs";
57
57
  import "../../chunk-R57RJLFQ.mjs";
58
58
  import "../../chunk-GIHP74M4.mjs";
59
+ import "../../chunk-F4LCVFZK.mjs";
59
60
  import "../../chunk-3BYULUMU.mjs";
60
61
  import "../../chunk-RZRMW2DZ.mjs";
61
62
  import "../../chunk-GUHOQLS3.mjs";
@@ -1,12 +1,12 @@
1
- import {
2
- ProjectTeam
3
- } from "../../chunk-SGTQI2KC.mjs";
4
1
  import {
5
2
  Filter
6
3
  } from "../../chunk-MJUHBEZN.mjs";
7
4
  import {
8
5
  Pagination
9
6
  } from "../../chunk-PNQ3GU5Q.mjs";
7
+ import {
8
+ ProjectTeam
9
+ } from "../../chunk-SGTQI2KC.mjs";
10
10
  import {
11
11
  RelatedContent
12
12
  } from "../../chunk-ZEJD233P.mjs";