cortex-react-components 2.26.3 → 2.26.5

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 (200) hide show
  1. package/dist/{chunk-BDNY6OKE.mjs → chunk-2GM2LPLB.mjs} +1 -1
  2. package/dist/{chunk-2GZQYAN3.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
  3. package/dist/{chunk-UX5OJ3WS.mjs → chunk-3ANJOET7.mjs} +1 -1
  4. package/dist/{chunk-HB57GPGK.mjs → chunk-3M5KHST3.mjs} +1 -1
  5. package/dist/{chunk-NXG2Y4N4.mjs → chunk-4SRUEQTP.mjs} +1 -1
  6. package/dist/{chunk-AGWQ5S2Z.mjs → chunk-5NIEZE7A.mjs} +1 -1
  7. package/dist/chunk-6YHCNPFB.mjs +4 -0
  8. package/dist/{chunk-PRK2XFAZ.mjs → chunk-7OMPPFGG.mjs} +1 -1
  9. package/dist/{chunk-CNCT3JZV.mjs → chunk-AQQCH7Z2.mjs} +1 -1
  10. package/dist/{chunk-WDZOGIT2.mjs → chunk-BQQ4V4PX.mjs} +1 -1
  11. package/dist/{chunk-R3SDBXF2.mjs → chunk-CKU2T3AN.mjs} +1 -1
  12. package/dist/{chunk-RIFUOB7A.mjs → chunk-EFNFK7TR.mjs} +1 -1
  13. package/dist/{chunk-T36QUKC6.mjs → chunk-F64CA5CH.mjs} +1 -1
  14. package/dist/{chunk-VDN4LQSS.mjs → chunk-F6DMXMR4.mjs} +1 -1
  15. package/dist/{chunk-KRLNPNMZ.mjs → chunk-FEWOSBUJ.mjs} +1 -1
  16. package/dist/{chunk-CJ2ZX7QN.mjs → chunk-FMXCT6LU.mjs} +1 -1
  17. package/dist/{chunk-BGADMIWV.mjs → chunk-FYQBRCQM.mjs} +1 -1
  18. package/dist/{chunk-JLUX7EHB.mjs → chunk-GAZHKHGB.mjs} +1 -1
  19. package/dist/{chunk-5KS3DITB.mjs → chunk-GETYSIZV.mjs} +1 -1
  20. package/dist/chunk-GLZEHRPY.mjs +4 -0
  21. package/dist/chunk-HD6E7KI2.mjs +4 -0
  22. package/dist/{chunk-M74BIPBM.mjs → chunk-HDKHF3EA.mjs} +1 -1
  23. package/dist/{chunk-BN747TQM.mjs → chunk-HKMNAXLM.mjs} +1 -1
  24. package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
  25. package/dist/{chunk-6LY5CH7J.mjs → chunk-JCWFPKF3.mjs} +1 -1
  26. package/dist/{chunk-OP6ZWZIM.mjs → chunk-JVTCOOUV.mjs} +1 -1
  27. package/dist/{chunk-DJ2KA3MS.mjs → chunk-KBLVWXLK.mjs} +1 -1
  28. package/dist/{chunk-S3P6OGB7.mjs → chunk-KVLUT4U2.mjs} +1 -1
  29. package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
  30. package/dist/{chunk-CLGBBNRB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
  31. package/dist/chunk-LCEEFZH7.mjs +4 -0
  32. package/dist/chunk-LEF6M5ZD.mjs +4 -0
  33. package/dist/{chunk-ERHNVIOZ.mjs → chunk-LHO4WFYP.mjs} +1 -1
  34. package/dist/{chunk-JT65KF7C.mjs → chunk-MO4HRQEL.mjs} +1 -1
  35. package/dist/{chunk-DKRRVTCV.mjs → chunk-MS7YIAWP.mjs} +1 -1
  36. package/dist/chunk-MXMW65GM.mjs +4 -0
  37. package/dist/{chunk-GIL2SMPM.mjs → chunk-O24GFE6Q.mjs} +1 -1
  38. package/dist/chunk-P2B3OITE.mjs +4 -0
  39. package/dist/{chunk-PZZTGPEO.mjs → chunk-P6OSMPUQ.mjs} +1 -1
  40. package/dist/{chunk-23XORW7A.mjs → chunk-P7S6XFU4.mjs} +1 -1
  41. package/dist/{chunk-4NHQXOKZ.mjs → chunk-PNUBVBSR.mjs} +1 -1
  42. package/dist/{chunk-66ODXUVL.mjs → chunk-PTZT4QJW.mjs} +1 -1
  43. package/dist/{chunk-YJ7XPZWV.mjs → chunk-QUMUO63J.mjs} +1 -1
  44. package/dist/{chunk-JUFFNFV6.mjs → chunk-R6AYIVIR.mjs} +1 -1
  45. package/dist/{chunk-67PJ7D4O.mjs → chunk-RS4VD3ML.mjs} +1 -1
  46. package/dist/{chunk-CTTBF7F4.mjs → chunk-RS4WAAGI.mjs} +1 -1
  47. package/dist/{chunk-Y62OBV2E.mjs → chunk-U3FYDDE2.mjs} +1 -1
  48. package/dist/chunk-U3PUWUVM.mjs +4 -0
  49. package/dist/{chunk-DVE2KPLR.mjs → chunk-WH6JZSIA.mjs} +1 -1
  50. package/dist/{chunk-PXLSH6S2.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  51. package/dist/{chunk-I6OBIS4J.mjs → chunk-ZG5N4C4S.mjs} +1 -1
  52. package/dist/components/AdvancedComponents/AppSidebar.d.ts +3 -2
  53. package/dist/components/AdvancedComponents/AppSidebar.js +1 -2
  54. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  55. package/dist/components/AdvancedComponents/app-header.js +1 -1
  56. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  57. package/dist/components/AdvancedComponents/index.js +1 -1
  58. package/dist/components/AdvancedComponents/index.mjs +1 -1
  59. package/dist/components/AdvancedComponents/navigation-tabs.js +1 -1
  60. package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
  61. package/dist/components/AdvancedComponents/user-selection.js +1 -1
  62. package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
  63. package/dist/components/Blocks/Banner.mjs +1 -1
  64. package/dist/components/Blocks/CallToAction.mjs +1 -1
  65. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  66. package/dist/components/Blocks/Content.mjs +1 -1
  67. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  68. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  69. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  70. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  71. package/dist/components/Blocks/index.mjs +1 -1
  72. package/dist/components/Cards/ContentCard.mjs +1 -1
  73. package/dist/components/Cards/FeatureCard.mjs +1 -1
  74. package/dist/components/Cards/index.mjs +1 -1
  75. package/dist/components/Chat/CopilotInterface.js +3 -3
  76. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  77. package/dist/components/Chat/demo-long-messages.js +5 -5
  78. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  79. package/dist/components/Chat/demo-tests.js +5 -5
  80. package/dist/components/Chat/demo-tests.mjs +1 -1
  81. package/dist/components/Chat/demo.js +3 -3
  82. package/dist/components/Chat/demo.mjs +1 -1
  83. package/dist/components/Chat/example-usage.js +3 -3
  84. package/dist/components/Chat/example-usage.mjs +1 -1
  85. package/dist/components/Chat/example-with-vercel-ai.js +3 -3
  86. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  87. package/dist/components/Chat/index.js +3 -3
  88. package/dist/components/Chat/index.mjs +1 -1
  89. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  90. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
  91. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  92. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  93. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +5 -5
  94. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  95. package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
  96. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  97. package/dist/components/DigitalColleagues/Views/index.js +5 -5
  98. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  99. package/dist/components/DigitalColleagues/index.js +5 -5
  100. package/dist/components/DigitalColleagues/index.mjs +1 -1
  101. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  102. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  103. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  104. package/dist/components/Foundary/MainPage.mjs +1 -1
  105. package/dist/components/Foundary/Pages/dashboardpage.js +6 -6
  106. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  107. package/dist/components/Foundary/Views/ColleaguesView.d.ts +12 -1
  108. package/dist/components/Foundary/Views/ColleaguesView.js +1 -1
  109. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  110. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  111. package/dist/components/Foundary/Views/index.js +5 -5
  112. package/dist/components/Foundary/Views/index.mjs +1 -1
  113. package/dist/components/Foundary/colleague-card.js +1 -1
  114. package/dist/components/Foundary/colleague-card.mjs +1 -1
  115. package/dist/components/Foundary/colleague-form.d.ts +12 -1
  116. package/dist/components/Foundary/colleague-form.js +1 -1
  117. package/dist/components/Foundary/colleague-form.mjs +1 -1
  118. package/dist/components/Foundary/file-edit.mjs +1 -1
  119. package/dist/components/Foundary/foundary-clone.js +1 -1
  120. package/dist/components/Foundary/foundary-clone.mjs +1 -1
  121. package/dist/components/Foundary/foundary-layout.d.ts +2 -1
  122. package/dist/components/Foundary/foundary-layout.js +1 -1
  123. package/dist/components/Foundary/foundary-layout.mjs +1 -1
  124. package/dist/components/Foundary/index.js +5 -5
  125. package/dist/components/Foundary/index.mjs +1 -1
  126. package/dist/components/Foundary/knowledge-search.js +1 -1
  127. package/dist/components/Foundary/knowledge-search.mjs +1 -1
  128. package/dist/components/Foundary/types.d.ts +32 -9
  129. package/dist/components/HeaderFooter/Header.mjs +1 -1
  130. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  131. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  132. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  133. package/dist/components/HeaderFooter/index.mjs +1 -1
  134. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  135. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  136. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  137. package/dist/components/Heros/PostHero/index.mjs +1 -1
  138. package/dist/components/Heros/RenderHero.mjs +1 -1
  139. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  140. package/dist/components/Heros/index.mjs +1 -1
  141. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  142. package/dist/components/Layouts/Print.mjs +1 -1
  143. package/dist/components/Layouts/SlideShow.mjs +1 -1
  144. package/dist/components/Layouts/index.mjs +1 -1
  145. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  146. package/dist/components/Menus/SidebarRight.mjs +1 -1
  147. package/dist/components/Menus/index.mjs +1 -1
  148. package/dist/components/Other/index.mjs +1 -1
  149. package/dist/components/Payload/RichText/index.mjs +1 -1
  150. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  151. package/dist/components/Payload/index.mjs +1 -1
  152. package/dist/components/Projects/FileView.js +1 -1
  153. package/dist/components/Projects/FileView.mjs +1 -1
  154. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  155. package/dist/components/Projects/ProjectPage.js +5 -5
  156. package/dist/components/Projects/ProjectPage.mjs +1 -1
  157. package/dist/components/Projects/ProjectView.js +1 -1
  158. package/dist/components/Projects/ProjectView.mjs +1 -1
  159. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  160. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  161. package/dist/components/Projects/file-list.mjs +1 -1
  162. package/dist/components/Projects/index.mjs +1 -1
  163. package/dist/components/dc-temp/index.js +1 -1
  164. package/dist/components/dc-temp/index.mjs +1 -1
  165. package/dist/components/index.js +20 -20
  166. package/dist/components/index.mjs +1 -1
  167. package/dist/components/ui/index.mjs +1 -1
  168. package/dist/components/ui/sidebar.mjs +1 -1
  169. package/dist/index.js +27 -27
  170. package/dist/index.mjs +1 -1
  171. package/dist/metafile-cjs.json +1 -1
  172. package/dist/metafile-esm.json +1 -1
  173. package/dist/pages/Blog.mjs +1 -1
  174. package/dist/pages/Documentation.mjs +1 -1
  175. package/dist/pages/IndexPage.mjs +1 -1
  176. package/dist/pages/Intranet.mjs +1 -1
  177. package/dist/pages/LandingPage.mjs +1 -1
  178. package/dist/pages/Page.mjs +1 -1
  179. package/dist/pages/Publish.mjs +1 -1
  180. package/dist/pages/Website.mjs +1 -1
  181. package/dist/sections/AboutSection.mjs +1 -1
  182. package/dist/sections/BlogDetail.mjs +1 -1
  183. package/dist/sections/BlogList.mjs +1 -1
  184. package/dist/sections/BlogListSection.mjs +1 -1
  185. package/dist/sections/ContactSection.mjs +1 -1
  186. package/dist/sections/PageSections.mjs +1 -1
  187. package/dist/sections/PricingSection.mjs +1 -1
  188. package/dist/sections/ServiceDetail.mjs +1 -1
  189. package/dist/sections/ServiceDetailSection.mjs +1 -1
  190. package/dist/sections/ServiceSection.mjs +1 -1
  191. package/dist/sections/index.mjs +1 -1
  192. package/package.json +1 -1
  193. package/dist/chunk-4WA47ZQA.mjs +0 -4
  194. package/dist/chunk-5HT2KC5I.mjs +0 -4
  195. package/dist/chunk-CRAFZGCI.mjs +0 -4
  196. package/dist/chunk-FGEFYI5E.mjs +0 -4
  197. package/dist/chunk-GPFPTU7U.mjs +0 -4
  198. package/dist/chunk-KKW3FINI.mjs +0 -4
  199. package/dist/chunk-NDZ26EG6.mjs +0 -4
  200. package/dist/chunk-Y7H3EUBR.mjs +0 -4
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use client";import{a as r}from"../../chunk-RIFUOB7A.mjs";import"../../chunk-QOZ2O3FG.mjs";import"../../chunk-2R3MJSQ7.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-6PS55VJZ.mjs";import"../../chunk-OP6ZWZIM.mjs";import"../../chunk-R3SDBXF2.mjs";import"../../chunk-KZCIHFTM.mjs";import"../../chunk-IO5ZSALG.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-HTS3KCJL.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-AN744MXS.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-EOR2BAI2.mjs";import{a as s}from"../../chunk-CTTBF7F4.mjs";import"../../chunk-4WA47ZQA.mjs";import{a as o,b as a}from"../../chunk-NPVUICIF.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-VDN4LQSS.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-PXLSH6S2.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";import{useState as d}from"react";import{motion as M,AnimatePresence as R}from"motion/react";import{jsx as n,jsxs as ne}from"react/jsx-runtime";function H({title:l="",projects:c,businessUnits:t,epics:p,sprints:u,tasks:m,currentView:L,onAddTask:g,onUpdateTask:k,onDeleteTask:T,onTaskClick:v,onAddEpic:h,onUpdateEpic:b,onDeleteEpic:P,onAddTaskToEpic:j,onAddSprint:f,onUpdateSprint:C,onDeleteSprint:A,onAddProject:S,onUpdateProject:U,onDeleteProject:w,onViewChange:I,mobileMenuOpen:x,onToggleMobileMenu:y,onTeamClick:E,onTeamChange:O,onCopilotClick:B}){let[i,D]=d("projects"),[N,Y]=d(t[0]),_=e=>{console.log("Opening app:",e.name)},q=e=>{console.log("Favoriting app:",e.name)},z=e=>{console.log("Opening file:",e.name)},G=e=>{console.log("Sharing file:",e.name)},J=e=>{console.log("Opening project:",e.name)},K=e=>{console.log("Sharing project:",e.name)},F=e=>{console.log("Business unit changed to:",e.name)},V=()=>{switch(i){case"projects":return n(r,{initialProjects:c,initialEpics:p,initialSprints:u,initialTasks:m,onAddTask:g,onUpdateTask:k,onDeleteTask:T,onTaskClick:v,onAddEpic:h,onUpdateEpic:b,onDeleteEpic:P,onAddTaskToEpic:j,onAddSprint:f,onUpdateSprint:C,onDeleteSprint:A,onAddProject:S,onUpdateProject:U,onDeleteProject:w,onViewChange:I,onToggleMobileMenu:y,onTeamClick:E,onTeamChange:O,onCopilotClick:B});default:return null}};return n(s,{sidebarItems:o,title:l,notifications:a,businessUnits:t,currentBusinessUnit:N,onBusinessUnitChange:F,activeTab:i,onTabChange:D,showTabs:!0,children:n(R,{mode:"wait",children:n(M.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:V()},i)})})}export{H as default};
4
+ "use client";import{a as r}from"../../chunk-EFNFK7TR.mjs";import"../../chunk-QOZ2O3FG.mjs";import"../../chunk-6PS55VJZ.mjs";import"../../chunk-JVTCOOUV.mjs";import"../../chunk-CKU2T3AN.mjs";import"../../chunk-IO5ZSALG.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-HTS3KCJL.mjs";import"../../chunk-KZCIHFTM.mjs";import"../../chunk-2R3MJSQ7.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-AN744MXS.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-EOR2BAI2.mjs";import{a as s}from"../../chunk-RS4WAAGI.mjs";import"../../chunk-6YHCNPFB.mjs";import{a as o,b as a}from"../../chunk-NPVUICIF.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-F6DMXMR4.mjs";import"../../chunk-GLZEHRPY.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";import{useState as d}from"react";import{motion as M,AnimatePresence as R}from"motion/react";import{jsx as n,jsxs as ne}from"react/jsx-runtime";function H({title:l="",projects:c,businessUnits:t,epics:p,sprints:u,tasks:m,currentView:L,onAddTask:g,onUpdateTask:k,onDeleteTask:T,onTaskClick:v,onAddEpic:h,onUpdateEpic:b,onDeleteEpic:P,onAddTaskToEpic:j,onAddSprint:f,onUpdateSprint:C,onDeleteSprint:A,onAddProject:S,onUpdateProject:U,onDeleteProject:w,onViewChange:I,mobileMenuOpen:x,onToggleMobileMenu:y,onTeamClick:E,onTeamChange:O,onCopilotClick:B}){let[i,D]=d("projects"),[N,Y]=d(t[0]),_=e=>{console.log("Opening app:",e.name)},q=e=>{console.log("Favoriting app:",e.name)},z=e=>{console.log("Opening file:",e.name)},G=e=>{console.log("Sharing file:",e.name)},J=e=>{console.log("Opening project:",e.name)},K=e=>{console.log("Sharing project:",e.name)},F=e=>{console.log("Business unit changed to:",e.name)},V=()=>{switch(i){case"projects":return n(r,{initialProjects:c,initialEpics:p,initialSprints:u,initialTasks:m,onAddTask:g,onUpdateTask:k,onDeleteTask:T,onTaskClick:v,onAddEpic:h,onUpdateEpic:b,onDeleteEpic:P,onAddTaskToEpic:j,onAddSprint:f,onUpdateSprint:C,onDeleteSprint:A,onAddProject:S,onUpdateProject:U,onDeleteProject:w,onViewChange:I,onToggleMobileMenu:y,onTeamClick:E,onTeamChange:O,onCopilotClick:B});default:return null}};return n(s,{sidebarItems:o,title:l,notifications:a,businessUnits:t,currentBusinessUnit:N,onBusinessUnitChange:F,activeTab:i,onTabChange:D,showTabs:!0,children:n(R,{mode:"wait",children:n(M.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:V()},i)})})}export{H as default};
@@ -7,4 +7,4 @@
7
7
  `}return o(s)}).filter(Boolean).join("");e.root.children.forEach(i=>{let s=o(i);i.type==="paragraph"?t.push(s||""):s&&t.push(s)});let r=[];for(let i=0;i<t.length;i++)r.push(t[i]),i<t.length-1&&(t[i]===""||t[i+1]===""||r.push(""));return r.join(`
8
8
  `)},Ht=e=>{let t=[],o=0;for(;o<e.length;){let r=e.slice(o).match(/^<u\s*[^>]*>([\s\S]*?)<\/u>/i);if(r&&r[0]){let v=r[1]||"",N=v?Ht(v):[];N.length>0?(N.forEach(b=>{b.type==="text"&&(b.format=(b.format||0)|8)}),t.push(...N)):v===""&&t.push({type:"text",text:"",format:8}),o+=r[0].length;continue}if(e.slice(o).startsWith("</u>")){o+=4;continue}let i=e.slice(o).match(/^(`+)([^`]+)\1/);if(i){let v=i[2];v&&t.push({type:"text",text:v,format:16}),o+=i[0].length;continue}let s=e.slice(o).match(/^(~~)(.+?)\1/);if(s){let v=s[2],N=Ht(v);N.forEach(b=>{b.type==="text"&&(b.format=(b.format||0)|4)}),t.push(...N),o+=s[0].length;continue}let n=e.slice(o).match(/^(\*\*|__)(.+?)\1/);if(n){let v=n[2],N=Ht(v);N.forEach(b=>{b.type==="text"&&(b.format=(b.format||0)|1)}),t.push(...N),o+=n[0].length;continue}let m=e.slice(o).match(/^(\*|Dt)([^*Dt\n]+?)\1(?!\*|Dt)/);if(m&&m[0].length>2){let v=m[2],N=Ht(v);N.forEach(b=>{b.type==="text"&&(b.format=(b.format||0)|2)}),t.push(...N),o+=m[0].length;continue}if(e[o]===`
9
9
  `){t.push({type:"linebreak",version:1}),o+=1;continue}let u=e.length,l=[{pattern:/<u>/i,offset:0},{pattern:/\*\*/,offset:0},{pattern:/__/,offset:0},{pattern:/~~/,offset:0},{pattern:/`+/,offset:0},{pattern:/\*[^*\n]/,offset:0},{pattern:/Dt[^Dt\n]/,offset:0},{pattern:/\n/,offset:0}];for(let{pattern:v}of l){let N=e.slice(o+1).search(v);N!==-1&&N+1<u-o&&(u=o+N+1)}let g=e.slice(o,u);g&&t.push({type:"text",text:g,format:0}),o=u}let a=[];for(let r of t)r.type==="linebreak"?a.push(r):a.length>0&&a[a.length-1].type==="text"&&r.type==="text"&&a[a.length-1].format===r.format?a[a.length-1].text+=r.text:a.push(r);return a.length>0?a:[{type:"text",text:"",format:0}]},Cs=e=>{let t=e.split(`
10
- `),o=[],a=[],r=[],i=null,s=()=>{if(a.length>0){for(let m=0;m<a.length;m++){let u=a[m],l=Ht(u),g=l.length>0?l.map(v=>({...v,mode:"normal",style:"",detail:0,version:1})):[{type:"text",text:"",format:0,mode:"normal",style:"",detail:0,version:1}];o.push({type:"paragraph",children:g,direction:"ltr",format:"",indent:0,version:1})}a=[]}},n=()=>{r.length>0&&i&&(o.push({type:"list",listType:i,tag:i==="number"?"ol":"ul",start:1,format:"",indent:0,version:1,direction:"ltr",children:r}),r=[],i=null)};for(let m of t){let u=m.trim();if(!u){s(),n(),o.push({children:[],direction:null,format:"",indent:0,type:"paragraph",version:1,textFormat:0,textStyle:""});continue}let l=u.match(/^(#{1,6})\s+(.+)$/);if(l){s(),n();let N=l[1].length,b=l[2],k=Ht(b);o.push({type:"heading",tag:`h${N}`,children:k.length>0?k:[{type:"text",text:"",format:0}]});continue}let g=u.match(/^(\Dt+)\.\s+(.*)$/);if(g){s(),i==="bullet"&&n(),i!=="number"&&(r.length>0&&n(),i="number");let N=g[2]||"",b=Ht(N),k=b.length>0?b.map(p=>({...p,mode:"normal",style:"",detail:0,version:1})):[{type:"text",text:"",format:0,mode:"normal",style:"",detail:0,version:1}];r.push({type:"listitem",value:r.length+1,format:"start",indent:0,version:1,direction:"ltr",children:[{type:"paragraph",children:k,direction:"ltr",format:"",indent:0,version:1}]});continue}let v=u.match(/^[-*+]\s+(.+)$/);if(v){s(),i==="number"&&n(),i!=="bullet"&&(r.length>0&&n(),i="bullet");let N=v[1],b=Ht(N),k=b.length>0?b.map(p=>({...p,mode:"normal",style:"",detail:0,version:1})):[{type:"text",text:"",format:0,mode:"normal",style:"",detail:0,version:1}];r.push({type:"listitem",value:r.length+1,format:"start",indent:0,version:1,direction:"ltr",children:[{type:"paragraph",children:k,direction:"ltr",format:"",indent:0,version:1}]});continue}r.length>0&&n(),a.push(m)}return s(),n(),o.length===0&&o.push({type:"paragraph",children:[{type:"text",text:"",format:0}]}),{root:{type:"root",children:o,direction:"ltr",format:"",indent:0,version:1}}},Ts=async e=>{let t="",o,a="text";if(e.url)try{let r=e.url;!r.startsWith("http://")&&!r.startsWith("https://")&&!r.startsWith("/")&&(r="/"+r);let i=await fetch(r);i.ok?(t=await i.text(),console.log("Successfully loaded content, length:",t.length)):console.error("Failed to fetch file content:",i.status,i.statusText)}catch(r){console.error("Failed to fetch file content:",r)}else console.warn("No URL provided for file:",e.name);return e.mimeType==="text/markdown"?(a="richText",o=Cs(t)):e.mimeType?.startsWith("text/")&&(a="text"),{id:e.id.toString(),title:e.name,description:void 0,content:a==="richText"?void 0:t,richTextContent:a==="richText"?o:void 0,format:a,metadata:{},createdAt:typeof e.createdAt=="string"?new Date(e.createdAt):e.createdAt,updatedAt:new Date}};function gi({document:e,onCancel:t,onSave:o,onFileUpdate:a}){let[r,i]=(0,fe.useState)(Mo(e)),[s,n]=(0,fe.useState)(Mo(e)?{id:e.id.toString(),title:e.name,description:void 0,content:"",format:"text",metadata:{},createdAt:typeof e.createdAt=="string"?new Date(e.createdAt):e.createdAt,updatedAt:new Date}:{...e,updatedAt:new Date}),[m,u]=(0,fe.useState)(Mo(e)?void 0:s.richTextContent),[l,g]=(0,fe.useState)(!1),v=(0,fe.useRef)(Mo(e)?e:null);(0,fe.useEffect)(()=>{Mo(e)?(i(!0),Ts(e).then(p=>{n(p),u(p.richTextContent),i(!1)}).catch(p=>{p instanceof Error&&p.name!=="AbortError"&&(console.error("Failed to convert file:",p),i(!1))})):(n({...e,updatedAt:new Date}),u(e.richTextContent))},[e]);let N=p=>{switch(p){case"markdown":case"mdx":return(0,Dt.jsx)(St.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,Dt.jsx)(St.File,{className:"h-6 w-6 text-success"});case"text":return(0,Dt.jsx)(St.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Dt.jsx)(St.File,{className:"h-6 w-6 text-muted-foreground"})}},b=p=>{switch(p){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},k=async()=>{g(!0);try{let p,x;if(v.current&&v.current.mimeType==="text/markdown"){let C=m?Ns(m):"";p={...s,format:"markdown",content:C,richTextContent:void 0},x=C}else p={...s,richTextContent:m},x=s.content||"";let z=v.current?v.current.id.toString():s.id;await Promise.resolve(o()),a?.(z,x)}finally{g(!1)}};return(0,Dt.jsxs)(Ra.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,Dt.jsx)("div",{className:"border-b border-border bg-card p-8 pb-6",children:(0,Dt.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Dt.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,Dt.jsx)("div",{className:"flex-1 min-w-0",children:(0,Dt.jsxs)("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[(0,Dt.jsx)("div",{className:"flex-1 min-w-0",children:(0,Dt.jsx)(To,{fieldName:"title",value:s.title,label:"",onSave:(p,x)=>n(z=>({...z,title:x})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,Dt.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${b(s.format)} flex-shrink-0 mt-1`,children:s.format.toUpperCase()})]})})}),(0,Dt.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Dt.jsxs)(S,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,Dt.jsx)(St.X,{className:"h-4 w-4"}),"Close"]}),(0,Dt.jsxs)(S,{size:"sm",onClick:k,className:"gap-2",disabled:l,children:[l?(0,Dt.jsx)(St.Loader2,{className:"h-4 w-4 animate-spin"}):(0,Dt.jsx)(St.Save,{className:"h-4 w-4"}),l?"Saving...":"Save"]})]})]})}),(0,Dt.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,Dt.jsx)("div",{className:"p-8 pt-0 h-full max-h-full overflow-auto",children:r?(0,Dt.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,Dt.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,Dt.jsx)(St.Loader2,{className:"h-8 w-8 animate-spin text-primary"}),(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading file content..."})]})}):(0,Dt.jsx)(Dt.Fragment,{children:s.format==="richText"?(0,Dt.jsx)(ni,{setValue:u,value:m,name:"richTextContent"},`richtext-${s.id}-${r?"loading":"loaded"}`):(0,Dt.jsx)(Me,{value:s.content||"",onChange:p=>n(x=>({...x,content:p.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})})]})}var fi=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function po({files:e,onFileClick:t,onFileDelete:o,onFileUpdate:a,showHeader:r=!0,className:i,viewMode:s="list"}){let[n,m]=(0,fe.useState)(!1),[u,l]=(0,fe.useState)(!1),[g,v]=(0,fe.useState)(null),N=()=>{m(!1),v(null)},b=()=>{l(!0),setTimeout(()=>{l(!1),m(!1),v(null)},500)},k=p=>{v(p),m(!0)};return(0,Dt.jsxs)("div",{className:D("rounded-3xl border overflow-hidden",i),children:[(0,Dt.jsxs)("div",{className:"bg-muted/50 p-3 flex items-center justify-between",children:[r&&s==="list"&&(0,Dt.jsxs)("div",{className:"hidden md:grid md:grid-cols-10 text-sm font-medium flex-1",children:[(0,Dt.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Dt.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Dt.jsx)("div",{className:"col-span-2",children:"Modified"})]}),s==="card"&&(0,Dt.jsx)("div",{className:"text-sm font-medium",children:"Files"})]}),s==="list"&&(0,Dt.jsx)("div",{className:"divide-y",children:e.map(p=>(0,Dt.jsxs)(Ra.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(p),children:[(0,Dt.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Dt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,Dt.jsx)("div",{children:(0,Dt.jsx)("p",{className:"font-medium",children:p.name})})]}),(0,Dt.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:fi(p.filesize)}),(0,Dt.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Dt.jsx)("span",{className:"text-sm md:text-base",children:new Date(p.createdAt).toLocaleDateString()}),(0,Dt.jsxs)("div",{className:"flex gap-1",children:[p.mimeType==="text/markdown"&&(0,Dt.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:x=>{x.stopPropagation(),k(p)},children:(0,Dt.jsx)(St.Edit,{className:"h-4 w-4"})}),(0,Dt.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:x=>{x.stopPropagation(),o?.(p)},children:(0,Dt.jsx)(St.Trash2,{className:"h-4 w-4"})})]})]})]},p.name))}),s==="card"&&(0,Dt.jsx)("div",{className:"p-4 grid grid-cols-1 gap-4",children:e.map(p=>(0,Dt.jsx)(Ra.motion.div,{whileHover:{scale:1.02},className:"border rounded-lg p-4 bg-card hover:bg-muted/50 transition-colors cursor-pointer",onClick:()=>t?.(p),children:(0,Dt.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,Dt.jsxs)("div",{className:"flex-1 min-w-0 space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Dt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted flex-shrink-0"}),(0,Dt.jsx)("div",{className:"min-w-0 flex-1",children:(0,Dt.jsx)("p",{className:"font-medium truncate",children:p.name})})]}),(0,Dt.jsxs)("div",{className:"space-y-1 text-sm text-muted-foreground pl-[52px]",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsx)("span",{className:"font-medium",children:"Size:"}),(0,Dt.jsx)("span",{children:fi(p.filesize)})]}),(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsx)("span",{className:"font-medium",children:"Modified:"}),(0,Dt.jsx)("span",{children:new Date(p.createdAt).toLocaleDateString()})]})]})]}),(0,Dt.jsxs)("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[p.mimeType==="text/markdown"&&(0,Dt.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:x=>{x.stopPropagation(),k(p)},title:"Edit",children:(0,Dt.jsx)(St.Edit,{className:"h-4 w-4"})}),(0,Dt.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:x=>{x.stopPropagation(),o?.(p)},title:"Delete",children:(0,Dt.jsx)(St.Trash2,{className:"h-4 w-4"})})]})]})},p.name))}),(0,Dt.jsx)(Ge,{open:n,onOpenChange:p=>!p&&N(),children:(0,Dt.jsxs)(na,{children:[(0,Dt.jsx)(Lo,{}),(0,Dt.jsxs)(vi.Content,{className:D("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[(0,Dt.jsx)(ze,{className:"sr-only",children:g?`Edit ${g.name}`:"Edit File"}),u&&(0,Dt.jsx)("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:(0,Dt.jsx)(St.Loader2,{className:"h-8 w-8 animate-spin text-primary"})}),g&&(0,Dt.jsx)(gi,{document:g,onSave:b,onFileUpdate:a,onCancel:N})]})]})})]})}var Xo=({isOpen:e,onClose:t,onAddFile:o})=>{let[a,r]=(0,fe.useState)(null),[i,s]=(0,fe.useState)(""),[n,m]=(0,fe.useState)(""),[u,l]=(0,fe.useState)(""),g=N=>{let b=N.target.files?.[0];b&&(r(b),i||s(b.name))},v=async N=>{if(N.preventDefault(),!a)return;let b=new FormData;b.append("file",a),b.append("name",i),n&&b.append("description",n),u&&b.append("tags",u),o?.(b),t(),r(null),s(""),m(""),l("")};return(0,Dt.jsx)(Ge,{open:e,onOpenChange:t,children:(0,Dt.jsxs)(We,{className:"sm:max-w-md",children:[(0,Dt.jsx)(Ke,{children:(0,Dt.jsx)(ze,{children:"Add New File"})}),(0,Dt.jsxs)("form",{onSubmit:v,className:"grid gap-4",children:[(0,Dt.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,Dt.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,Dt.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[(0,Dt.jsx)(Ds,{className:"w-10 h-10 text-gray-400"}),(0,Dt.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,Dt.jsx)("span",{className:"font-semibold",children:"Click to upload"})," Xa drag and drop"]}),(0,Dt.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG Xa GIF (MAX. 800x400px)"})]}),(0,Dt.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:g})]})}),a&&(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("p",{className:"font-medium",children:a.name}),(0,Dt.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((a.size||0)/1024).toFixed(2)," KB"]})]}),(0,Dt.jsx)(S,{type:"submit",onClick:v,children:"Upload"})]})]})]})})};function Ds(e){return(0,Dt.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Dt.jsx)("path",{Dt:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,Dt.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,Dt.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}var bi=({isOpen:e,onClose:t,initialTask:o,epics:a,sprints:r,onUpdateTask:i,onDeleteTask:s,onAddComment:n,colleagues:m,onUploadFile:u,onDeleteFile:l,onFileUpdate:g})=>{let[v,N]=(0,fe.useState)(o),[b,k]=(0,fe.useState)(new Date),[p,x]=(0,fe.useState)("idle"),[z,C]=(0,fe.useState)("idle"),[T,Y]=(0,fe.useState)(!1),[M,Q]=(0,fe.useState)([]),[ee,j]=(0,fe.useState)(m);(0,fe.useEffect)(()=>{N(o)},[o]);let me=async(te,w)=>{if(w!==v[te]){x("loading");try{await i(v.id.toString(),{[te]:w}),k(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch(K){console.log("error",K),x("error"),setTimeout(()=>x("idle"),3e3)}}},ye=async(te,w)=>{if(w!==v[te]){x("loading");try{await i(v.id.toString(),{[te]:w}),k(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch(K){console.log("error",K),x("error"),setTimeout(()=>x("idle"),3e3)}}},I=async te=>{if(n){x("loading");try{await n?.({content:te,taskId:v.id.toString()}),k(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch{x("error"),setTimeout(()=>x("idle"),3e3)}}},ve=async()=>{C("loading");try{await s(v.id.toString()),C("success"),setTimeout(()=>{t(),C("idle")},1e3)}catch{C("error"),setTimeout(()=>C("idle"),3e3)}},ke=async te=>{if(u){x("loading");try{await u(v.id.toString(),te),k(new Date),x("success"),Y(!1),setTimeout(()=>x("idle"),1500)}catch(w){console.error("Error uploading file:",w),x("error"),setTimeout(()=>x("idle"),3e3)}}},E=async te=>{if(l){x("loading");try{await l(v.id.toString(),te.id.toString()),k(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch(w){console.error("Error deleting file:",w),x("error"),setTimeout(()=>x("idle"),3e3)}}},J=(v.files||[]).map(te=>typeof te=="number"?null:te).filter(te=>te!==null),ie=p!=="loading"&&z!=="loading",Ee=()=>{ie&&t()},ce=()=>p==="loading"?(0,Dt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Dt.jsx)(St.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Dt.jsx)("span",{children:"Updating..."})]}):p==="success"?(0,Dt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Dt.jsx)(St.Check,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{children:"Updated successfully"})]}):p==="error"?(0,Dt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Dt.jsx)(St.X,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{children:"Update failed"})]}):null;return(0,Dt.jsxs)(Ge,{open:e,onOpenChange:Ee,children:[(0,Dt.jsxs)(We,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,Dt.jsxs)(Ke,{children:[(0,Dt.jsx)(ze,{className:"sr-only",children:v?.name}),(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsx)("div",{className:"flex-1",children:ce()}),!ie&&(0,Dt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Dt.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Dt.jsx)(To,{fieldName:"name",value:v.name||"",label:"",onSave:me,className:"border-b border-border pb-3",disabled:p==="loading"}),(0,Dt.jsx)(To,{fieldName:"description",value:v.description||"",label:"Description",multiline:!0,onSave:me,disabled:p==="loading"}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsx)(St.File,{className:"h-4 w-4 text-muted-foreground"}),(0,Dt.jsx)("h3",{className:"text-sm font-medium",children:"Files"})]}),u&&(0,Dt.jsxs)(S,{variant:"outline",size:"sm",onClick:()=>Y(!0),disabled:p==="loading",className:"gap-2",children:[(0,Dt.jsx)(St.Upload,{className:"h-4 w-4"}),"Upload"]})]}),J.length>0?(0,Dt.jsx)(po,{files:J,onFileDelete:l?E:void 0,onFileUpdate:g,showHeader:!1,className:"border rounded-lg",viewMode:"card"}):(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground py-4 text-center border border-dashed rounded-lg",children:"No files attached"})]}),(0,Dt.jsx)(yr,{comments:(v?.comments||[]).map(te=>({author:te.author?.value.name||"",createdAt:new Date(te.timestamp),text:te.text,id:te.id||""})),onAddComment:I})]}),(0,Dt.jsx)(Cr,{task:v,epics:a,sprints:r,lastUpdated:b,onUpdateTask:ye,onClose:Ee,onDelete:ve,isUpdating:p==="loading",isDeleting:z==="loading",deleteState:z,teamMembers:ee})]})]}),u&&(0,Dt.jsx)(Xo,{isOpen:T,onClose:()=>Y(!1),onAddFile:ke})]})};var uo=({isOpen:e,onClose:t,onAddEpic:o})=>{let[a,r]=(0,fe.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),i=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],s=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],n=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],m=l=>{l.preventDefault(),a.name.trim()&&(o({name:a.name.trim(),description:a.description.trim(),color:a.color,confidence:a.confidence,phase:a.phase,startDate:a.startDate,endDate:a.endDate}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},u=(l,g)=>{r(v=>({...v,[l]:g}))};return(0,Dt.jsx)(Ge,{open:e,onOpenChange:t,children:(0,Dt.jsxs)(We,{className:"sm:max-w-md",children:[(0,Dt.jsx)(Ke,{children:(0,Dt.jsx)(ze,{children:"Add New Epic"})}),(0,Dt.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{htmlFor:"name",children:"Epic Name"}),(0,Dt.jsx)(ne,{id:"name",value:a.name,onChange:l=>u("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{htmlFor:"description",children:"Description"}),(0,Dt.jsx)(Me,{id:"description",value:a.description,onChange:l=>u("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"Color"}),(0,Dt.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(l=>(0,Dt.jsx)("button",{type:"button",onClick:()=>u("color",l),className:`w-8 h-8 rounded-full ${l} ${a.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"Confidence"}),(0,Dt.jsxs)(Xe,{value:a.confidence,onValueChange:l=>u("confidence",l),children:[(0,Dt.jsx)(Ze,{children:(0,Dt.jsx)(pt,{})}),(0,Dt.jsx)(Je,{children:s.map(l=>(0,Dt.jsx)(xe,{value:l.value,children:l.label},l.value))})]})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"Phase"}),(0,Dt.jsxs)(Xe,{value:a.phase.toString(),onValueChange:l=>u("phase",parseInt(l)),children:[(0,Dt.jsx)(Ze,{children:(0,Dt.jsx)(pt,{})}),(0,Dt.jsx)(Je,{children:n.map(l=>(0,Dt.jsx)(xe,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"Start Date"}),(0,Dt.jsx)(ne,{type:"date",value:a.startDate,onChange:l=>u("startDate",l.target.value)})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"End Date"}),(0,Dt.jsx)(ne,{type:"date",value:a.endDate,onChange:l=>u("endDate",l.target.value)})]})]}),(0,Dt.jsxs)(wo,{children:[(0,Dt.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Dt.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};function yi(e,t){let[o,a]=(0,fe.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{a(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,fe.useEffect)(()=>{r(o)},[]),[o,r]}var Qo=require("react-icons/fa");function yt({title:e,description:t,badge:o,primaryAction:a,secondaryAction:r,gradient:i,children:s,className:n}){let[m,u]=yi(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),l=!r&&!t||m;return(0,Dt.jsxs)(Ra.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${n||""}`,children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,Dt.jsx)(we,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:o}),(0,Dt.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Dt.jsxs)("div",{className:"flex items-center gap-3",children:[l&&a&&(0,Dt.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:a.onClick,children:a.label}),(r||t)&&(0,Dt.jsx)("button",{"aria-label":m?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>u(!m),style:{lineHeight:0},children:m?(0,Dt.jsx)(Qo.FaChevronDown,{size:22}):(0,Dt.jsx)(Qo.FaChevronUp,{size:22})})]})]}),!l&&(0,Dt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Dt.jsxs)("div",{className:"space-y-4",children:[(0,Dt.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Dt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[a&&(0,Dt.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:a.onClick,children:a.label}),r&&(0,Dt.jsx)(S,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),s&&(0,Dt.jsx)("div",{className:"hidden lg:block",children:s})]})]})}var Ni=({initialTasks:e=[],initialEpics:t=[],initialSprints:o=[],initialUsers:a=[],initialColleagues:r=[],initialProjects:i=[],onAddTask:s,onUpdateTask:n,onDeleteTask:m,onTaskClick:u,onAddEpic:l,onAddComment:g,onUploadFile:v,onDeleteFile:N,onFileUpdate:b})=>{let[k,p]=(0,pe.useState)([]),[x,z]=(0,pe.useState)([]),[C,T]=(0,pe.useState)([]),[Y,M]=(0,pe.useState)(!1),[Q,ee]=(0,pe.useState)(!1),[j,me]=(0,pe.useState)(null),[ye,I]=(0,pe.useState)(null),[ve,ke]=(0,pe.useState)([]),[E,J]=(0,pe.useState)([]),[ie,Ee]=(0,pe.useState)(0),ce=(0,pe.useRef)(null),te=(0,pe.useRef)(null),w=pe.default.useMemo(()=>[...x.map(h=>h.id),0],[x]),K=(0,pe.useRef)(""),De=(0,pe.useRef)(""),ot=(0,pe.useRef)(""),de=(0,pe.useRef)(""),je=(h,R)=>h.map(V=>`${V.id}-${new Date(V.createdAt).getTime()}-${new Date(V.updatedAt).getTime()}`).join("-")+(R?`-${R}`:"");(0,pe.useEffect)(()=>{let h=e.map(V=>V.files?.filter(Z=>typeof Z=="object").map(Z=>new Date(Z.updatedAt).getTime())).flat(),R=je(e,h.join("-"));R!==K.current&&(p(e),j&&me(e.find(V=>V.id===j.id)||null),K.current=R)},[e]),(0,pe.useEffect)(()=>{let h=je(t);h!==De.current&&(z(t),De.current=h)},[t]),(0,pe.useEffect)(()=>{let h=je(o);h!==ot.current&&(T(o),ot.current=h)},[o]),(0,pe.useEffect)(()=>{let h=je(r.map(R=>({id:R.id,updatedAt:R.updatedAt,createdAt:R.createdAt})));h!==de.current&&(J(r),de.current=h)},[r]),(0,pe.useEffect)(()=>{let h=()=>{if(ce.current){let Z=ce.current.offsetHeight;Ee(Z)}};h();let R=new ResizeObserver(h);ce.current&&R.observe(ce.current);let V=()=>{setTimeout(h,100)};return window.addEventListener("storage",V),()=>{R.disconnect(),window.removeEventListener("storage",V)}},[]),(0,pe.useEffect)(()=>{let h=setTimeout(()=>{ce.current&&Ee(ce.current.offsetHeight)},300);return()=>clearTimeout(h)},[Y,Q]);let go=k.filter(h=>!0),Nt=h=>go.filter(R=>R.status===h),fo=h=>{let R={};return x.forEach(V=>{R[V.id]=h.filter(Z=>Re(Z.epic)===V.id)}),R["no-epic"]=h.filter(V=>!Re(V.epic)),R},Ct=h=>{I(h)},Vt=h=>{ye&&(p(R=>R.map(V=>V.id===ye.id?{...V,status:h}:V)),n?.(ye.id.toString(),{status:h}),I(null))},Yt=h=>{let R={...h,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(V=>[...V,R]),s?.(h)},Ut=async(h,R)=>{p(V=>V.map(Z=>Z.id===Number(h)?{...Z,...R}:Z)),n&&await n(h,R),j?.id===Number(h)&&me(V=>({...V,...R}))},Qt=async h=>{p(R=>R.filter(V=>V.id!==Number(h))),j?.id===Number(h)&&me(null),m&&await m(h)},eo=h=>{let R={...h,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};z(V=>[...V,R]),l?.(h)},mt=h=>{me(h),u?.(h)},f=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],P=ie>0?`calc(100vh - ${ie+120}px)`:"calc(100vh - 12rem)";return(0,Dt.jsxs)("div",{ref:te,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Dt.jsx)("div",{ref:ce,className:"flex-shrink-0",children:(0,Dt.jsx)(yt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>M(!0)},secondaryAction:{label:"Add epic",onClick:()=>ee(!0)}})}),(0,Dt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Dt.jsx)("div",{className:"h-full",style:{height:ie>0?`calc(100vh - ${ie+120}px)`:"calc(100vh - 12rem)"},children:(0,Dt.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:f.map(h=>{let R=Nt(h.status),V=fo(R);return(0,Dt.jsxs)(Qa,{title:h.title,status:h.status,taskCount:R.length,onDrop:Vt,isCompact:h.status==="done",height:P,children:[V["no-epic"].map(Z=>(0,Dt.jsx)(xo,{epic:null,task:Z,onDragStart:Ct,onTaskClick:mt,isCompact:h.status==="done"},Z.id)),w.map(Z=>{let Le=x.find(ft=>ft.id===Z),Tt=V[Z]||[];return Tt.length===0?null:(0,Dt.jsxs)("div",{className:"mb-6",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Dt.jsx)("div",{className:`w-3 h-3 rounded-full ${Le?.color}`}),(0,Dt.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:Le?.name||"No Epic"}),(0,Dt.jsx)(we,{variant:"secondary",className:"text-xs",children:Tt.length})]})," ",(0,Dt.jsx)("div",{className:"space-y-3",children:Tt.map(ft=>(0,Dt.jsx)(xo,{task:ft,epic:Le,onDragStart:Ct,onTaskClick:mt,isCompact:h.status==="done"},ft.id))})]},Z)})]},h.id)})})})}),(0,Dt.jsx)(io,{isOpen:Y,onClose:()=>M(!1),onAddTask:Yt,assignees:[...E,...ve],epics:x,sprints:C}),(0,Dt.jsx)(uo,{isOpen:Q,onClose:()=>ee(!1),onAddEpic:eo}),j&&(0,Dt.jsx)(bi,{isOpen:!!j,onClose:()=>me(null),initialTask:j,epics:x,sprints:C,onUpdateTask:Ut,onDeleteTask:Qt,colleagues:E,onUploadFile:v,onDeleteFile:N,onFileUpdate:b,onAddComment:g})]})};var Ci=({tasks:e,epics:t,sprints:o,onUpdateTask:a,onTaskClick:r,onAddTaskToEpic:i,onAddEpic:s,onUpdateEpic:n,onDeleteEpic:m})=>{let[u,l]=(0,fe.useState)(t),[g,v]=(0,fe.useState)(null),[N,b]=(0,fe.useState)(null),[k,p]=(0,fe.useState)({}),[x,z]=(0,fe.useState)(0),[C,T]=(0,fe.useState)(!1),[Y,M]=(0,fe.useState)(!1),[Q,ee]=(0,fe.useState)(null),j=(0,fe.useRef)(null),me=(0,fe.useRef)(null);(0,fe.useEffect)(()=>{l(t)},[t]),(0,fe.useEffect)(()=>{let w=()=>{if(j.current){let ot=j.current.offsetHeight;z(ot)}};w();let K=new ResizeObserver(w);j.current&&K.observe(j.current);let De=()=>{setTimeout(w,100)};return window.addEventListener("storage",De),()=>{K.disconnect(),window.removeEventListener("storage",De)}},[]),(0,fe.useEffect)(()=>{let w=setTimeout(()=>{j.current&&z(j.current.offsetHeight)},300);return()=>clearTimeout(w)},[N]);let ye=w=>{v(w)},I=w=>{w.preventDefault()},ve=(w,K)=>{w.preventDefault(),g&&Re(g.epic).toString()!==K&&(a(g.id.toString(),{epic:Number(K)}),v(null))},ke=w=>e.filter(K=>Re(K.epic).toString()===w),E=w=>{b(w.id.toString()),p({name:w.name,description:w.description,confidence:w.confidence,phase:w.phase})},J=async()=>{N&&k.name&&(await n(N.toString(),k),l(w=>w.map(K=>K.id.toString()===N?{...K,...k}:K)),b(null),p({}))},ie=()=>{b(null),p({})},Ee=async w=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await m(w),l(K=>K.filter(De=>De.id.toString()!==w)))},ce=w=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[w]||`Phase ${w}`,te=w=>{switch(w){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsxs)("div",{ref:me,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Dt.jsx)("div",{ref:j,className:"flex-shrink-0",children:(0,Dt.jsx)(yt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>T(!0)}})}),(0,Dt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Dt.jsx)("div",{className:"h-full overflow-y-auto",style:{height:x>0?`calc(100vh - ${x+120}px)`:"calc(100vh - 12rem)"},children:(0,Dt.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:u.map(w=>{let K=ke(w.id.toString()),De=K.reduce((de,je)=>de+(je.storyPoints||0),0),ot=x>0?`calc(100vh - ${x+200}px)`:"calc(100vh - 14rem)";return(0,Dt.jsxs)(be,{className:`flex flex-col ${N===w.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:N===w.id.toString()?"auto":ot,minHeight:"400px"},onDragOver:I,onDrop:de=>ve(de,w.id.toString()),children:[(0,Dt.jsx)("div",{className:"p-4 border-b border-border",children:N===w.id.toString()?(0,Dt.jsxs)("div",{className:"space-y-4",children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsx)(ne,{value:k.name||"",onChange:de=>p({...k,name:de.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Dt.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:J,className:"p-1 h-8 w-8",children:(0,Dt.jsx)(St.Check,{className:"h-4 w-4"})}),(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:ie,className:"p-1 h-8 w-8",children:(0,Dt.jsx)(St.X,{className:"h-4 w-4"})})]})]}),(0,Dt.jsx)(Me,{value:k.description||"",onChange:de=>p({...k,description:de.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Dt.jsxs)("select",{value:k.confidence||w.confidence,onChange:de=>p({...k,confidence:de.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,Dt.jsx)("option",{value:"low",children:"Low"}),(0,Dt.jsx)("option",{value:"medium",children:"Medium"}),(0,Dt.jsx)("option",{value:"high",children:"High"})]})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Dt.jsx)("select",{value:k.phase?.toString()||w.phase.toString(),onChange:de=>p({...k,phase:parseInt(de.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(de=>(0,Dt.jsxs)("option",{value:de.toString(),children:["Phase ",de]},de))})]})]})]}):(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Dt.jsx)("div",{className:`w-4 h-4 rounded-full ${w.color}`}),(0,Dt.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:w.name}),(0,Dt.jsxs)("div",{className:"flex gap-1",children:[(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>E(w),className:"p-1 h-8 w-8",children:(0,Dt.jsx)(St.Edit2,{className:"h-3 w-3"})}),(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Ee(w.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Dt.jsx)(St.Trash2,{className:"h-3 w-3"})})]})]}),(0,Dt.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Dt.jsxs)(we,{className:`text-xs ${te(w.confidence)}`,children:[w.confidence," confidence"]}),(0,Dt.jsxs)(we,{variant:"outline",className:"text-xs",children:["Phase ",w.phase]}),(0,Dt.jsxs)(we,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[K.length," tasks"]}),(0,Dt.jsxs)(we,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[De," pts"]})]}),w.description&&(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:w.description}),(0,Dt.jsxs)(S,{onClick:()=>{M(!0),ee(w)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Dt.jsx)(St.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Dt.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,Dt.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${g?"border-primary bg-primary/10":"border-border"}`,children:K.length===0?(0,Dt.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,Dt.jsx)(St.Move,{className:"h-8 w-8 mb-2"}),(0,Dt.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):K.map(de=>(0,Dt.jsx)(xo,{task:de,epic:w,onDragStart:ye,onTaskClick:r,isCompact:!0},de.id))})})]},w.id)})})})})]}),(0,Dt.jsx)(uo,{isOpen:C,onClose:()=>T(!1),onAddEpic:s}),(0,Dt.jsx)(io,{isOpen:Y,onClose:()=>M(!1),onAddTask:i,assignees:[],epics:[],defaultEpicId:Q?.id.toString()||"",sprints:o})]})};var Ma=require("date-fns");var Di=({isOpen:e,onClose:t,onAddSprint:o})=>{let[a,r]=(0,fe.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),i=n=>{n.preventDefault(),!(!a.name||!a.startDate||!a.endDate)&&(o({name:a.name,description:a.description,startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},s=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,Dt.jsx)(Ge,{open:e,onOpenChange:s,children:(0,Dt.jsxs)(We,{className:"sm:max-w-md",children:[(0,Dt.jsx)(Ke,{children:(0,Dt.jsx)(ze,{children:"Add New Sprint"})}),(0,Dt.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{htmlFor:"name",children:"Sprint Name *"}),(0,Dt.jsx)(ne,{id:"name",value:a.name,onChange:n=>r(m=>({...m,name:n.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{htmlFor:"description",children:"Description"}),(0,Dt.jsx)(Me,{id:"description",value:a.description,onChange:n=>r(m=>({...m,description:n.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"Start Date *"}),(0,Dt.jsxs)(ka,{children:[(0,Dt.jsx)(Pa,{asChild:!0,children:(0,Dt.jsxs)(S,{variant:"outline",className:D("w-full justify-start text-left font-normal",!a.startDate&&"text-muted-foreground"),children:[(0,Dt.jsx)(St.CalendarIcon,{className:"mr-2 h-4 w-4"}),a.startDate?(0,Ma.format)(a.startDate,"PPP"):"Pick a date"]})}),(0,Dt.jsx)(Ko,{className:"w-auto p-0",align:"start",children:(0,Dt.jsx)(Zo,{mode:"single",selected:a.startDate,onSelect:n=>r(m=>({...m,startDate:n})),initialFocus:!0})})]})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"End Date *"}),(0,Dt.jsxs)(ka,{children:[(0,Dt.jsx)(Pa,{asChild:!0,children:(0,Dt.jsxs)(S,{variant:"outline",className:D("w-full justify-start text-left font-normal",!a.endDate&&"text-muted-foreground"),children:[(0,Dt.jsx)(St.CalendarIcon,{className:"mr-2 h-4 w-4"}),a.endDate?(0,Ma.format)(a.endDate,"PPP"):"Pick a date"]})}),(0,Dt.jsx)(Ko,{className:"w-auto p-0",align:"start",children:(0,Dt.jsx)(Zo,{mode:"single",selected:a.endDate,onSelect:n=>r(m=>({...m,endDate:n})),initialFocus:!0,disabled:n=>a.startDate?n<a.startDate:!1})})]})]})]}),(0,Dt.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Dt.jsx)(S,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),(0,Dt.jsx)(S,{type:"submit",disabled:!a.name||!a.startDate||!a.endDate,children:"Add Sprint"})]})]})]})})};var Si=({tasks:e,epics:t,sprints:o,onUpdateTask:a,onTaskClick:r,onAddSprint:i,onUpdateSprint:s,onDeleteSprint:n})=>{let[m,u]=(0,fe.useState)([]),[l,g]=(0,fe.useState)(new Set),[v,N]=(0,fe.useState)(null),[b,k]=(0,fe.useState)(!1),[p,x]=(0,fe.useState)(null),[z,C]=(0,fe.useState)(null),[T,Y]=(0,fe.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[M,Q]=(0,fe.useState)([]),[ee,j]=(0,fe.useState)("upcoming"),[me,ye]=(0,fe.useState)(!1),[I,ve]=(0,fe.useState)(0),ke=(0,fe.useRef)(null),E=(0,fe.useRef)(null);(0,fe.useEffect)(()=>{let f=()=>{ke.current&&ve(ke.current.offsetHeight)};f();let P=new ResizeObserver(f);return ke.current&&P.observe(ke.current),()=>P.disconnect()},[]);let J=f=>t.find(P=>P.id===Number(f)),ie=f=>o.find(P=>P.id===Number(f)),Ee=f=>{let P={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return P[f]||P.medium},ce=f=>{if(!f||f?.length===0)return"";let P=f?.trim().split(" ");if(P?.length===1)return P[0];let h=P[0],R=P[P.length-1][0].toUpperCase();return`${h} ${R}`},te=f=>{let P={},h=[];return f.forEach(R=>{R.epic?(P[Re(R.epic)]||(P[Re(R.epic)]=[]),P[Re(R.epic)].push(R)):h.push(R)}),{tasksByEpic:P,unassignedTasks:h}};(0,fe.useEffect)(()=>{Q(o)},[o]);let w=M.filter(f=>{switch(ee){default:return!0}}),K=M.filter(f=>m.includes(f.id.toString())),De=e.filter(f=>!f.sprint||f.status==="backlog"),ot=De.reduce((f,P)=>f+(P.storyPoints||0),0),de=f=>{u(P=>P.includes(f)?P.filter(h=>h!==f):P?.length<3?[...P,f]:P)},je=f=>{g(P=>{let h=new Set(P);return h.has(f)?h.delete(f):h.add(f),h})},go=f=>{i(f),k(!1)},Nt=f=>{C(f.id.toString()),Y({name:f.name,description:f.description||"",startDate:f.startDate?new Date(f.startDate).toISOString().split("T")[0]:f.startDate,endDate:f.endDate?new Date(f.endDate).toISOString().split("T")[0]:f.endDate,isActive:!1})},fo=()=>{z&&(s(z,{name:T.name,description:T.description,startDate:T.startDate,endDate:T.endDate}),Q(f=>f.map(P=>(P.id===Number(z)&&(P.name=T.name,P.description=T.description,P.startDate=T.startDate,P.endDate=T.endDate),P))),C(null))},Ct=()=>{C(null),Y({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Vt=(f,P)=>{N(P),f.dataTransfer.effectAllowed="move"},Yt=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},Ut=f=>{x(f)},Qt=()=>{x(null)},eo=(f,P)=>{if(f.preventDefault(),x(null),!v)return;(Re(v.sprint)||void 0)!==Number(P)&&a(v.id.toString(),{sprint:Number(P)}),N(null)},mt=({task:f,showSprint:P=!1})=>{let h=f.epic?J(Re(f.epic).toString()):null,R=f.sprint?ie(Re(f.sprint).toString()):null;return(0,Dt.jsx)(be,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:Le=>{Le.dataTransfer.effectAllowed="move",Le.dataTransfer.setData("text/plain",f.id.toString()),Vt(Le,f)},onClick:Le=>{v===null&&r(f)},style:{userSelect:"none"},children:(0,Dt.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,Dt.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Dt.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:f.name}),(0,Dt.jsx)(we,{className:`text-xs ${Ee(f.priority||"medium")}`,children:f.priority?.[0]?.toUpperCase()})]}),(0,Dt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-1",children:[h&&(0,Dt.jsx)("div",{className:`w-2 h-2 rounded-full ${h.color}`}),(0,Dt.jsx)("span",{className:"text-muted-foreground truncate",children:h?.name})]}),(0,Dt.jsx)("span",{className:"text-muted-foreground",children:ce(f.assignee?.value?.name)})]}),P&&R&&(0,Dt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Dt.jsx)(St.Calendar,{className:"h-3 w-3"}),(0,Dt.jsx)("span",{children:R.name})]})]})})};return(0,Dt.jsxs)("div",{ref:E,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Dt.jsx)("div",{ref:ke,className:"flex-shrink-0",children:(0,Dt.jsx)(yt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>k(!0)}})}),(0,Dt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Dt.jsxs)("div",{className:"h-full",style:{height:I>0?`calc(100vh - ${I+120}px)`:"calc(100vh - 12rem)"},children:[(0,Dt.jsxs)("div",{className:"mb-4",children:[(0,Dt.jsx)(be,{className:"p-3 bg-card shadow-sm",children:(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,Dt.jsxs)("p",{className:"text-xs text-muted-foreground",children:[m?.length,"/3 selected"]})]}),m?.length>0&&(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,Dt.jsx)("div",{className:"flex flex-wrap gap-1",children:K.map(f=>(0,Dt.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Dt.jsx)("span",{className:"max-w-[80px] truncate",children:f.name}),(0,Dt.jsx)("button",{onClick:()=>de(f.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Dt.jsx)(St.X,{className:"h-4 w-4"})})]},f.id))})]})]}),(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsxs)(S,{onClick:()=>k(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Dt.jsx)(St.Plus,{className:"h-3 w-3"}),"Add"]}),(0,Dt.jsxs)(S,{onClick:()=>ye(!me),variant:"outline",size:"sm",className:"gap-1",children:[(0,Dt.jsx)(St.Calendar,{className:"h-3 w-3"}),me?"Close":"Select"]})]})]})}),me&&(0,Dt.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>ye(!1)}),(0,Dt.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-xl z-10 transition-all duration-300 ease-in-out ${me?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,Dt.jsxs)(be,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Dt.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Dt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>ye(!1),className:"h-8 w-8 p-0",children:(0,Dt.jsx)(St.X,{className:"h-4 w-4"})})]}),(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Dt.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Dt.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:o.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(f=>(0,Dt.jsxs)(S,{variant:ee===f.key?"default":"outline",size:"sm",onClick:()=>j(f.key),className:"text-xs h-8 px-3 flex-1",children:[f.label," (",f.count,")"]},f.key))}),(0,Dt.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:w.length>0?w.map(f=>{let P=m.includes(f.id.toString()),h=e.filter(V=>Re(V.sprint)===f.id).length,R=!P&&m.length<3;return(0,Dt.jsx)("div",{className:`p-3 rounded-lg border transition-all ${P?"bg-primary/10 border-primary/30":R?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:z===f.id.toString()?(0,Dt.jsxs)("div",{className:"space-y-3",children:[(0,Dt.jsx)(ne,{value:T.name,onChange:V=>Y(Z=>({...Z,name:V.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Dt.jsx)(Me,{value:T.description,onChange:V=>Y(Z=>({...Z,description:V.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Dt.jsxs)("div",{className:"flex gap-2",children:[(0,Dt.jsxs)(S,{size:"sm",onClick:()=>fo(),className:"flex-1",children:[(0,Dt.jsx)(St.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,Dt.jsxs)(S,{size:"sm",variant:"outline",onClick:Ct,className:"flex-1",children:[(0,Dt.jsx)(St.X,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,Dt.jsxs)("div",{children:[(0,Dt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Dt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Dt.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:f.name}),(0,Dt.jsx)(we,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Dt.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:f.description}),(0,Dt.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Dt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Dt.jsx)(St.CalendarDays,{className:"h-3 w-3"}),new Date(f.startDate).toLocaleDateString()]}),(0,Dt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Dt.jsx)(St.User,{className:"h-3 w-3"}),h," tasks"]})]})]}),(0,Dt.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Nt(f),className:"h-6 w-6 p-0",children:(0,Dt.jsx)(St.Edit2,{className:"h-3 w-3"})}),(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>n(f.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,Dt.jsx)(St.Trash2,{className:"h-3 w-3"})})]})]}),(0,Dt.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,Dt.jsx)(S,{variant:P?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>de(f.id.toString()),disabled:!P&&m?.length>=3,children:(0,Dt.jsx)("span",{className:"pointer-events-none select-none",children:P?"Deselect":m?.length>=3?"Limit Reached":"Select"})})})]})},f.id)}):(0,Dt.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Dt.jsx)(St.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,Dt.jsxs)("p",{className:"text-sm",children:['No sprints found for "',ee,'" filter']}),(0,Dt.jsx)(S,{variant:"link",size:"sm",onClick:()=>j("all"),className:"text-xs",children:"Show all sprints"})]})}),m?.length===0&&(0,Dt.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Dt.jsxs)("div",{className:"text-center",children:[(0,Dt.jsx)(St.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Dt.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Dt.jsx)("div",{className:"lg:col-span-1",children:(0,Dt.jsxs)(be,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Yt,onDragEnter:()=>Ut("backlog"),onDragLeave:Qt,onDrop:f=>eo(f,"backlog"),style:{height:I>0?`calc(100vh - ${I+200}px)`:"calc(100vh - 16rem)"},children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Dt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsxs)(we,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[De?.length," tasks"]}),(0,Dt.jsxs)(we,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[ot," pts"]})]})]}),(0,Dt.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${p==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:f,unassignedTasks:P}=te(De);return(0,Dt.jsxs)(Dt.Fragment,{children:[Object.entries(f).map(([h,R])=>{let V=J(h);if(!V)return null;let Z=l.has(h);return(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>je(h),children:[(0,Dt.jsx)("div",{className:`w-3 h-3 rounded-full ${V.color}`}),(0,Dt.jsx)("span",{className:"font-medium text-muted-foreground",children:V.name}),(0,Dt.jsxs)("span",{className:"text-muted-foreground",children:["(",R?.length,")"]}),(0,Dt.jsx)("div",{className:"ml-auto",children:Z?(0,Dt.jsx)(St.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Dt.jsx)(St.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Z&&(0,Dt.jsx)("div",{className:"space-y-2 pl-2",children:R.map(Le=>(0,Dt.jsx)(mt,{task:Le},Le.id))})]},h)}),P?.length>0&&(()=>{let h=l.has("no-epic");return(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>je("no-epic"),children:[(0,Dt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Dt.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Dt.jsxs)("span",{className:"text-muted-foreground",children:["(",P?.length,")"]}),(0,Dt.jsx)("div",{className:"ml-auto",children:h?(0,Dt.jsx)(St.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Dt.jsx)(St.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!h&&(0,Dt.jsx)("div",{className:"space-y-2 pl-2",children:P?.map(R=>(0,Dt.jsx)(mt,{task:R},R.id))})]})})(),De?.length===0&&(0,Dt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),De?.length>0&&Object.keys(f).length===0&&P.length===0&&(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),De?.map(h=>(0,Dt.jsx)(mt,{task:h},h.id))]})]})})()})]})}),K.map(f=>{let P=e.filter(R=>Re(R?.sprint)===f.id),h=P.reduce((R,V)=>R+(V?.storyPoints||0),0);return(0,Dt.jsxs)(be,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Yt,onDragEnter:()=>Ut(f.id.toString()),onDragLeave:Qt,onDrop:R=>eo(R,f.id.toString()),style:{height:I>0?`calc(100vh - ${I+200}px)`:"calc(100vh - 16rem)"},children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Dt.jsx)("div",{children:(0,Dt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:f.name})}),(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsxs)(we,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[P?.length," tasks"]}),(0,Dt.jsxs)(we,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[h," pts"]}),(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>{ye(!0),Nt(f)},className:"h-6 px-2",children:(0,Dt.jsx)(St.Edit2,{className:"h-3 w-3"})}),(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>n(f.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Dt.jsx)(St.Trash2,{className:"h-3 w-3"})})]})]}),(0,Dt.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:R,unassignedTasks:V}=te(P);return(0,Dt.jsxs)(Dt.Fragment,{children:[Object.entries(R).map(([Z,Le])=>{let Tt=J(Z);if(!Tt)return null;let ft=l.has(Z);return(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>je(Z),children:[(0,Dt.jsx)("div",{className:`w-3 h-3 rounded-full ${Tt.color}`}),(0,Dt.jsx)("span",{className:"font-medium text-muted-foreground",children:Tt.name}),(0,Dt.jsxs)("span",{className:"text-muted-foreground",children:["(",Le?.length,")"]}),(0,Dt.jsx)("div",{className:"ml-auto",children:ft?(0,Dt.jsx)(St.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Dt.jsx)(St.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!ft&&(0,Dt.jsx)("div",{className:"space-y-2 pl-2",children:Le?.map(vo=>(0,Dt.jsx)(mt,{task:vo},vo.id))})]},Z)}),V?.length>0&&(()=>{let Z=l.has("no-epic");return(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>je("no-epic"),children:[(0,Dt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Dt.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Dt.jsxs)("span",{className:"text-muted-foreground",children:["(",V?.length,")"]}),(0,Dt.jsx)("div",{className:"ml-auto",children:Z?(0,Dt.jsx)(St.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Dt.jsx)(St.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Z&&(0,Dt.jsx)("div",{className:"space-y-2 pl-2",children:V?.map(Le=>(0,Dt.jsx)(mt,{task:Le},Le.id))})]})})(),P?.length===0&&(0,Dt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},f.id)})]}),(0,Dt.jsx)(Di,{isOpen:b,onClose:()=>k(!1),onAddSprint:go})]})})]})};var Ss=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),ks=e=>{let[t,o]=e.split(":"),a=new Date;return a.setHours(parseInt(t),parseInt(o)),a.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Aa=(e,t)=>{let o=new Date,a=new Date(e);if(t){let[r,i]=t.split(":");a.setHours(parseInt(r),parseInt(i))}return a<o},Ia=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Ps=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Rs=({colleagues:e,onAddReminder:t,open:o,setOpen:a})=>{let[r,i]=(0,fe.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[s,n]=(0,fe.useState)(!1),m=l=>{if(l.preventDefault(),!e.find(N=>N?.id.toString()===r.colleagueId.toString())){console.error("No valid colleague selected"),n(!0);return}n(!1);let v={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};t(v),a(!1),i({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,fe.useEffect)(()=>{r.colleagueId&&n(!1)},[r.colleagueId]);let u=e.filter(Boolean);return(0,Dt.jsx)(Ge,{open:o,onOpenChange:a,children:(0,Dt.jsxs)(We,{className:"max-w-2xl",children:[(0,Dt.jsx)(Ke,{children:(0,Dt.jsx)(ze,{children:"Add New Reminder"})}),(0,Dt.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,Dt.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"title",children:"Title"}),(0,Dt.jsx)(ne,{id:"title",value:r.title,onChange:l=>i({...r,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"description",children:"Description"}),(0,Dt.jsx)(Me,{id:"description",value:r.description,onChange:l=>i({...r,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"dueDate",children:"Due Date"}),(0,Dt.jsx)(ne,{id:"dueDate",type:"date",value:r.dueDate,onChange:l=>i({...r,dueDate:l.target.value}),required:!0})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Dt.jsx)(ne,{id:"dueTime",type:"time",value:r.dueTime,onChange:l=>i({...r,dueTime:l.target.value})})]})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{className:`${s?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Dt.jsxs)(Xe,{value:r.colleagueId,onValueChange:l=>{i({...r,colleagueId:l})},required:!0,children:[(0,Dt.jsx)(Ze,{className:`${s?"text-destructive border-red-500":""}`,children:(0,Dt.jsx)(pt,{className:`${s?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(l=>l?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Dt.jsx)(Je,{children:u.map(l=>(0,Dt.jsx)(xe,{value:l.id.toString(),children:l.name},l.id))})]}),s&&(0,Dt.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Dt.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:l=>i({...r,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,Dt.jsx)(H,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Dt.jsxs)(Xe,{value:r.recurrencePattern,onValueChange:l=>i({...r,recurrencePattern:l}),children:[(0,Dt.jsx)(Ze,{children:(0,Dt.jsx)(pt,{})}),(0,Dt.jsxs)(Je,{children:[(0,Dt.jsx)(xe,{value:"daily",children:"Daily"}),(0,Dt.jsx)(xe,{value:"weekly",children:"Weekly"}),(0,Dt.jsx)(xe,{value:"monthly",children:"Monthly"}),(0,Dt.jsx)(xe,{value:"yearly",children:"Yearly"})]})]})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Dt.jsx)(ne,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:l=>i({...r,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,Dt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Dt.jsx)(S,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Cancel"}),(0,Dt.jsx)(S,{type:"submit",children:"Add Reminder"})]})]})]})})},Es=({reminder:e,colleagues:t,onUpdateReminder:o,open:a,onClose:r})=>{let[i,s]=(0,fe.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),n=u=>{u.preventDefault(),o(e.id.toString(),{title:i.title,description:i.description,dueDate:new Date(i.dueDate||"").toISOString(),dueTime:i.dueTime||void 0,isRecurring:i.isRecurring}),r()},m=t.filter(Boolean);return(0,Dt.jsx)(Ge,{open:a,onOpenChange:r,children:(0,Dt.jsxs)(We,{className:"max-w-2xl",children:[(0,Dt.jsx)(Ke,{children:(0,Dt.jsx)(ze,{children:"Edit Reminder"})}),(0,Dt.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,Dt.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"edit-title",children:"Title"}),(0,Dt.jsx)(ne,{id:"edit-title",value:i.title,onChange:u=>s({...i,title:u.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"edit-description",children:"Description"}),(0,Dt.jsx)(Me,{id:"edit-description",value:i.description||"",onChange:u=>s({...i,description:u.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Dt.jsx)(ne,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:u=>s({...i,dueDate:u.target.value}),required:!0})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Dt.jsx)(ne,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:u=>s({...i,dueTime:u.target.value})})]})]}),(0,Dt.jsx)("div",{className:"space-y-2",children:(0,Dt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Dt.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring||!1,onChange:u=>s({...i,isRecurring:u.target.checked}),className:"rounded border-border"}),(0,Dt.jsx)(H,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,Dt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Dt.jsx)(S,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,Dt.jsx)(S,{type:"submit",children:"Save Changes"})]})]})]})})},Ms=({reminder:e,colleagues:t,onUpdateReminder:o,onDeleteReminder:a})=>{let[r,i]=(0,fe.useState)(!1);if(!e||!e.id)return null;let s=Aa(new Date(e.dueDate||""),e.dueTime||""),n=Ia(new Date(e.dueDate||"")),m=Ps(new Date(e.dueDate||"")),u=()=>{o(e.id.toString(),{})},l=()=>n?"Today":m?"Tomorrow":Ss(new Date(e.dueDate||""));return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(Es,{reminder:e,colleagues:t,onUpdateReminder:o,open:r,onClose:()=>i(!1)}),(0,Dt.jsx)(be,{children:(0,Dt.jsx)(ao,{className:"p-4",children:(0,Dt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Dt.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Dt.jsx)("button",{onClick:u,className:"mt-1 text-primary hover:text-primary/80"}),(0,Dt.jsxs)("div",{className:"flex-1",children:[(0,Dt.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,Dt.jsx)("h3",{children:e.title})}),(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Dt.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Dt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Dt.jsx)(St.Calendar,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{className:s?"text-destructive font-medium":"",children:l()})]}),e.dueTime&&(0,Dt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Dt.jsx)(St.Clock,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{children:ks(e.dueTime)})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Dt.jsx)(St.User,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Dt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>i(!0),className:"h-8 w-8 p-0",children:(0,Dt.jsx)(St.Edit2,{className:"h-4 w-4"})}),(0,Dt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>a(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,Dt.jsx)(St.Trash2,{className:"h-4 w-4"})})]})]})})})]})},ki=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:o,onUpdateReminder:a,onDeleteReminder:r})=>{let[i,s]=(0,fe.useState)(e.filter(Boolean)),[n,m]=(0,fe.useState)(t.filter(Boolean)),[u,l]=(0,fe.useState)("all"),[g,v]=(0,fe.useState)(""),[N,b]=(0,fe.useState)(!1);(0,fe.useEffect)(()=>{s(e.filter(Boolean))},[e]),(0,fe.useEffect)(()=>{m(t.filter(Boolean))},[t]);let k=M=>{if(!M.title){console.error("Invalid reminder data:",M);return}let Q={...M,id:Date.now(),createdAt:new Date().toISOString()};s(ee=>[...ee,Q]),o?.(M)},p=(M,Q)=>{if(!M){console.error("No reminder ID provided for update");return}s(ee=>ee.map(j=>j?.id.toString()===M?{...j,...Q}:j)),a?.(M,Q)},x=M=>{if(!M){console.error("No reminder ID provided for deletion");return}s(Q=>Q.filter(ee=>ee?.id.toString()!==M)),r?.(M)},C=i.filter(M=>{if(!M)return!1;if(g){let Q=g.toLowerCase();if(!(M.title.toLowerCase().includes(Q)||M.description?.toLowerCase().includes(Q)))return!1}switch(u){case"pending":case"completed":case"overdue":return Aa(new Date(M.dueDate||""),M.dueTime||"");case"today":return Ia(new Date(M.dueDate||""));default:return!0}}).sort((M,Q)=>{if(!M||!Q)return 0;let ee={high:3,medium:2,low:1},j=0;return j!==0?j:new Date(M.dueDate||"").getTime()-new Date(Q.dueDate||"").getTime()}),T={total:i.filter(Boolean).length,overdue:i.filter(M=>M&&Aa(new Date(M.dueDate||""),M.dueTime||"")).length,today:i.filter(M=>M&&Ia(new Date(M.dueDate||""))).length},Y=n.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,Dt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Dt.jsx)(yt,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,Dt.jsxs)("div",{className:"h-full bg-background",children:[(0,Dt.jsx)(Rs,{colleagues:n,onAddReminder:k,open:N,setOpen:b}),(0,Dt.jsxs)("div",{className:"p-6",children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Dt.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Dt.jsxs)(S,{className:"flex items-center space-x-2",onClick:()=>b(!0),children:[(0,Dt.jsx)(St.Plus,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{children:"Add Reminder"})]})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Dt.jsxs)(be,{className:"p-4",children:[(0,Dt.jsx)("div",{className:"text-2xl font-bold text-foreground",children:T.total}),(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Dt.jsxs)(be,{className:"p-4",children:[(0,Dt.jsx)("div",{className:"text-2xl font-bold text-primary",children:T.overdue}),(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Dt.jsxs)(be,{className:"p-4",children:[(0,Dt.jsx)("div",{className:"text-2xl font-bold text-success",children:T.today}),(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Dt.jsxs)(be,{className:"p-4",children:[(0,Dt.jsx)("div",{className:"text-2xl font-bold text-destructive",children:T.overdue}),(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Dt.jsxs)(be,{className:"p-4",children:[(0,Dt.jsx)("div",{className:"text-2xl font-bold text-warning",children:T.today}),(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Dt.jsx)("div",{className:"flex-1",children:(0,Dt.jsx)(ne,{placeholder:"Search reminders...",value:g,onChange:M=>v(M.target.value),className:"max-w-md"})}),(0,Dt.jsxs)(Xe,{value:u,onValueChange:M=>l(M),children:[(0,Dt.jsx)(Ze,{className:"w-40",children:(0,Dt.jsx)(pt,{})}),(0,Dt.jsxs)(Je,{children:[(0,Dt.jsxs)(xe,{value:"all",children:["All (",T.total,")"]}),(0,Dt.jsxs)(xe,{value:"overdue",children:["Overdue (",T.overdue,")"]}),(0,Dt.jsxs)(xe,{value:"overdue",children:["Overdue (",T.overdue,")"]}),(0,Dt.jsxs)(xe,{value:"today",children:["Today (",T.today,")"]})]})]})]}),(0,Dt.jsx)("div",{className:"space-y-4",children:C.length===0?(0,Dt.jsxs)(be,{className:"p-8 text-center",children:[(0,Dt.jsx)("div",{className:"text-muted-foreground",children:g||u!=="all"?"No reminders match your filters":"No reminders yet"}),!g&&u==="all"&&(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):C.map(M=>M&&(0,Dt.jsx)(Ms,{reminder:M,colleagues:n,onUpdateReminder:p,onDeleteReminder:x},M.id))})]})]})]})};function Ri({activeTab:e,onTabChange:t,tabOptions:o,className:a="",maxWidth:r="700px",gridCols:i=6}){let s=o.find(n=>n.value===e);return(0,Dt.jsxs)(Ra.motion.div,{className:`flex-1 flex justify-center ${a}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Dt.jsx)("div",{className:"hidden lg:block",children:(0,Dt.jsx)(ci,{value:e,onValueChange:t,children:(0,Dt.jsx)(mi,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,o.length)}, minmax(0, 1fr))`},children:o.map(n=>(0,Dt.jsx)(Ra.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Dt.jsx)(pi,{value:n.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:n.label})},n.value))})})}),(0,Dt.jsx)("div",{className:"lg:hidden",children:(0,Dt.jsxs)(lo,{children:[(0,Dt.jsx)(co,{asChild:!0,children:(0,Dt.jsxs)(S,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[s?.label||"Select",(0,Dt.jsx)(St.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Dt.jsx)(Jt,{align:"center",className:"w-[180px]",children:o.map(n=>(0,Dt.jsx)(qt,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function La({initialFiles:e=[],onFileAdd:t,onFileEdit:o,onFileDelete:a,onFileClick:r,onFileUpdate:i,compactView:s=!1,className:n}){let[m,u]=(0,fe.useState)(e),[l,g]=(0,fe.useState)(""),[v,N]=(0,fe.useState)("all"),[b,k]=(0,fe.useState)("all"),[p,x]=(0,fe.useState)(!1),z=(0,fe.useRef)(""),C=I=>I.map(ve=>`${ve.id}-${new Date(ve.createdAt).getTime()}-${new Date(ve.updatedAt).getTime()}`).join("-");(0,fe.useEffect)(()=>{let I=C(e.map(ve=>({...ve,updatedAt:new Date().toISOString()})));I!==z.current&&(u(e),z.current=I)},[e]);let T=m.filter(I=>I.name.toLowerCase().includes(l.toLowerCase())),Y=T.slice(0,10),M=T.filter(Boolean),Q=()=>{x(!0)},ee=I=>{o?.(I)},j=I=>{console.log("deleting file",I),u(ve=>ve.filter(ke=>ke.name!==I.name)),a?.(I.id.toString())},me=I=>{r?.(I)},ye=()=>{g(""),N("all")};return(0,Dt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Dt.jsx)(Ra.AnimatePresence,{mode:"wait",children:(0,Dt.jsx)(Ra.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Dt.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Dt.jsx)(yt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:Q},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Dt.jsx)(be,{children:(0,Dt.jsx)(ao,{className:"pt-6",children:(0,Dt.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Dt.jsx)("div",{className:"flex-1",children:(0,Dt.jsxs)("div",{className:"relative",children:[(0,Dt.jsx)(St.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Dt.jsx)(ne,{placeholder:"Search files...",value:l,onChange:I=>g(I.target.value),className:"pl-9"})]})}),(l||v!=="all")&&(0,Dt.jsxs)(S,{variant:"outline",onClick:ye,className:"gap-2",children:[(0,Dt.jsx)(St.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Dt.jsxs)("div",{className:"space-y-4",children:[(0,Dt.jsx)(Ri,{activeTab:b,onTabChange:k,tabOptions:[{value:"all",label:`All Files (${T.length})`},{value:"recent",label:`Recent (${Y.length})`}],maxWidth:"500px",gridCols:3}),b==="all"&&(0,Dt.jsx)(po,{files:T,onFileClick:me,onFileUpdate:i,onFileDelete:j,showHeader:!s}),b==="recent"&&(0,Dt.jsx)(po,{files:Y,onFileClick:me,onFileUpdate:i,onFileDelete:j,showHeader:!s}),b==="shared"&&(0,Dt.jsx)(po,{files:M,onFileClick:me,onFileUpdate:i,onFileDelete:j,showHeader:!s})]}),T.length===0&&(0,Dt.jsx)(be,{children:(0,Dt.jsx)(ao,{className:"pt-6",children:(0,Dt.jsxs)("div",{className:"text-center py-8",children:[(0,Dt.jsx)(St.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Dt.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,Dt.jsx)("p",{className:"text-muted-foreground mb-4",children:l||v!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Dt.jsxs)(S,{onClick:Q,className:"gap-2",children:[(0,Dt.jsx)(St.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,Dt.jsx)(Xo,{isOpen:p,onClose:()=>x(!1),onAddFile:t})]})}var Ei=require("next/navigation");function Mi({title:e="",initialTasks:t=[],initialEpics:o=[],initialSprints:a=[],initialProjects:r=[],initialReminders:i=[],initialColleagues:s=[],initialUsers:n=[],initialFiles:m=[],initialView:u="kanban",onAddTask:l,onUpdateTask:g,onDeleteTask:v,onTaskClick:N,onAddEpic:b,onUpdateEpic:k,onDeleteEpic:p,onAddTaskToEpic:x,onAddSprint:z,onUpdateSprint:C,onDeleteSprint:T,onAddProject:Y,onUpdateProject:M,onDeleteProject:Q,onFileAdd:ee,onFileEdit:j,onFileDelete:me,onFileClick:ye,onAddReminder:I,onUpdateReminder:ve,onDeleteReminder:ke,onViewChange:E,onToggleMobileMenu:J,onTeamClick:ie,onTeamChange:Ee,onCopilotClick:ce,handleAddComment:te}){let[w,K]=(0,fe.useState)(t),[De,ot]=(0,fe.useState)(o),[de,je]=(0,fe.useState)(a),[go,Nt]=(0,fe.useState)(r),[fo,Ct]=(0,fe.useState)(i),[Vt,Yt]=(0,fe.useState)(s),[Ut,Qt]=(0,fe.useState)(n),[eo,mt]=(0,fe.useState)(m),[f,P]=(0,fe.useState)(!1),[h,R]=(0,fe.useState)(!1),[V,Z]=(0,fe.useState)(null),[Le,Tt]=(0,fe.useState)(null),[ft,vo]=(0,fe.useState)(null),[zt,Oa]=(0,fe.useState)(u||"kanban"),[Is,Ai]=(0,fe.useState)(!1),Ii=(0,Ei.useRouter)();(0,fe.useEffect)(()=>{K(t)},[t]),(0,fe.useEffect)(()=>{je(a)},[a]),(0,fe.useEffect)(()=>{ot(o)},[o]),(0,fe.useEffect)(()=>{Nt(r)},[r]),(0,fe.useEffect)(()=>{mt(m)},[m]),(0,fe.useEffect)(()=>{Qt(n)},[n]),(0,fe.useEffect)(()=>{Yt(s)},[s]),(0,fe.useEffect)(()=>{Ct(i)},[i]),(0,fe.useEffect)(()=>{Oa(u)},[u]);let Fi=w.filter(y=>{}),Fs=y=>Fi.filter(B=>B.status===y),Ls=y=>{let B={};return De.forEach($=>{}),B},Os=y=>{vo(y)},Hs=y=>{ft&&(K(B=>B.map($=>$.id===ft.id?{...$,status:y}:$)),vo(null))},Ha=y=>{let B={...y,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};K($=>[...$,B]),l?.(B)},Io=async(y,B)=>(K($=>$.map(Oe=>Oe.id===Number(y)?{...Oe,...B}:Oe)),await g?.(y,B)),Bs=async(y,B)=>{Io(y,B)},Ba=y=>{K(B=>B.filter($=>$.id!==Number(y))),V?.id===Number(y)&&Z(null),v?.(y)},Vs=async y=>{Ba(y)},Us=y=>{let B={...y,id:Date.now()};Nt($=>[...$,B]),Y?.(y)},zs=(y,B)=>{Nt($=>$.map(Oe=>Oe.id===Number(y)?{...Oe,...B}:Oe)),M?.(y,B)},$s=y=>{Nt(B=>B.filter($=>$.id!==Number(y))),Q?.(y)},Va=y=>{let B={...y,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};ot($=>[...$,B]),b?.({...B})},Li=()=>{R(!0)},Oi=(y,B)=>{ot($=>$.map(Oe=>Oe.id===Number(y)?{...Oe,...B}:Oe)),k?.(y,B)},Hi=y=>{ot(B=>B.filter($=>$.id!==Number(y))),K(B=>B.filter($=>Re($.epic)!==Number(y))),p?.(y)},Bi=y=>{let B={...y,id:Date.now()};je($=>[...$,B]),z?.(y)},Vi=(y,B)=>{je($=>$.map(Oe=>Oe.id===Number(y)?{...Oe,...B}:Oe)),C?.(y,B)},Ui=y=>{y==="backlog"||y==="all-tasks"||(je(B=>B.filter($=>$.id!==Number(y))),K(B=>B.map($=>Re($.sprint)===Number(y)?{...$,sprint:void 0}:$)),T?.(y))},ta=y=>{Z(y)},zi=y=>{y==="planning"&&window.innerWidth<768||(Oa(y),E?.(y))},_s=()=>{Ai(y=>!y),J?.()},Gs=()=>{Ii.push("/")},js=y=>{console.log("Switching to team:",y)},Ws=y=>{console.log("Switching to team:",y)},$i=y=>{P(!0)},_i=()=>{P(!1),Tt(null)},Gi=y=>{let B={...y,id:Date.now(),createdAt:new Date().toISOString()};Ct($=>[...$,B]),I?.(y)},ji=(y,B)=>{Ct($=>$.map(Oe=>Oe.id===Number(y)?{...Oe,...B}:Oe)),ve?.(y,B)},Wi=y=>{Ct(B=>B.filter($=>$.id!==Number(y))),ke?.(y)},Ki=()=>{ee?.()},Zi=y=>{j?.(y)},Ji=y=>{mt(B=>B.filter($=>$.name!==y)),me?.(y)},qi=y=>{ye?.(y)},Ks=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Zs=()=>{switch(zt){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},oa=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],Js=oa.sort((y,B)=>B.lastUsed.getTime()-y.lastUsed.getTime()).slice(0,3),qs=oa.length>3,Xs=oa.slice(3);return(0,Dt.jsxs)(za,{currentView:zt,onViewChange:zi,children:[zt==="kanban"&&(0,Dt.jsx)("div",{className:"h-full overflow-hidden",children:(0,Dt.jsx)(Ni,{initialProjects:go,initialEpics:De,initialSprints:de.map(y=>({...y,isSelected:!1})),initialTasks:w,initialColleagues:Vt,initialUsers:Ut,onAddTask:Ha,onUpdateTask:Io,onDeleteTask:Ba,onTaskClick:ta,onAddEpic:Va,onAddComment:te})}),zt==="planning"&&(0,Dt.jsx)("div",{className:"hidden md:block h-full",children:(0,Dt.jsx)(Si,{tasks:w,epics:De,sprints:de,onUpdateTask:Io,onTaskClick:ta,onAddSprint:Bi,onUpdateSprint:Vi,onDeleteSprint:Ui})}),zt==="tasks"&&(0,Dt.jsx)("div",{className:"h-full",children:(0,Dt.jsx)(ki,{initialReminders:fo,initialColleagues:Vt,onAddReminder:Gi,onUpdateReminder:ji,onDeleteReminder:Wi})}),zt==="files"&&(0,Dt.jsx)("div",{className:"h-full",children:(0,Dt.jsx)(La,{initialFiles:eo,onFileAdd:Ki,onFileEdit:Zi,onFileDelete:Ji,onFileClick:qi,compactView:!1})}),zt==="epics"&&(0,Dt.jsx)("div",{className:"h-full",children:(0,Dt.jsx)(Ci,{tasks:w,epics:De,sprints:de,onUpdateTask:Io,onTaskClick:ta,onAddTaskToEpic:$i,onAddEpic:Li,onUpdateEpic:Oi,onDeleteEpic:Hi})}),(0,Dt.jsx)(io,{isOpen:f,onClose:_i,onAddTask:Ha,epics:De,sprints:de,assignees:[...Vt,...Ut],defaultEpicId:Le||void 0}),(0,Dt.jsx)(uo,{isOpen:h,onClose:()=>R(!1),onAddEpic:Va})]})}
10
+ `),o=[],a=[],r=[],i=null,s=()=>{if(a.length>0){for(let m=0;m<a.length;m++){let u=a[m],l=Ht(u),g=l.length>0?l.map(v=>({...v,mode:"normal",style:"",detail:0,version:1})):[{type:"text",text:"",format:0,mode:"normal",style:"",detail:0,version:1}];o.push({type:"paragraph",children:g,direction:"ltr",format:"",indent:0,version:1})}a=[]}},n=()=>{r.length>0&&i&&(o.push({type:"list",listType:i,tag:i==="number"?"ol":"ul",start:1,format:"",indent:0,version:1,direction:"ltr",children:r}),r=[],i=null)};for(let m of t){let u=m.trim();if(!u){s(),n(),o.push({children:[],direction:null,format:"",indent:0,type:"paragraph",version:1,textFormat:0,textStyle:""});continue}let l=u.match(/^(#{1,6})\s+(.+)$/);if(l){s(),n();let N=l[1].length,b=l[2],k=Ht(b);o.push({type:"heading",tag:`h${N}`,children:k.length>0?k:[{type:"text",text:"",format:0}]});continue}let g=u.match(/^(\Dt+)\.\s+(.*)$/);if(g){s(),i==="bullet"&&n(),i!=="number"&&(r.length>0&&n(),i="number");let N=g[2]||"",b=Ht(N),k=b.length>0?b.map(p=>({...p,mode:"normal",style:"",detail:0,version:1})):[{type:"text",text:"",format:0,mode:"normal",style:"",detail:0,version:1}];r.push({type:"listitem",value:r.length+1,format:"start",indent:0,version:1,direction:"ltr",children:[{type:"paragraph",children:k,direction:"ltr",format:"",indent:0,version:1}]});continue}let v=u.match(/^[-*+]\s+(.+)$/);if(v){s(),i==="number"&&n(),i!=="bullet"&&(r.length>0&&n(),i="bullet");let N=v[1],b=Ht(N),k=b.length>0?b.map(p=>({...p,mode:"normal",style:"",detail:0,version:1})):[{type:"text",text:"",format:0,mode:"normal",style:"",detail:0,version:1}];r.push({type:"listitem",value:r.length+1,format:"start",indent:0,version:1,direction:"ltr",children:[{type:"paragraph",children:k,direction:"ltr",format:"",indent:0,version:1}]});continue}r.length>0&&n(),a.push(m)}return s(),n(),o.length===0&&o.push({type:"paragraph",children:[{type:"text",text:"",format:0}]}),{root:{type:"root",children:o,direction:"ltr",format:"",indent:0,version:1}}},Ts=async e=>{let t="",o,a="text";if(e.url)try{let r=e.url;!r.startsWith("http://")&&!r.startsWith("https://")&&!r.startsWith("/")&&(r="/"+r);let i=await fetch(r);i.ok?(t=await i.text(),console.log("Successfully loaded content, length:",t.length)):console.error("Failed to fetch file content:",i.status,i.statusText)}catch(r){console.error("Failed to fetch file content:",r)}else console.warn("No URL provided for file:",e.name);return e.mimeType==="text/markdown"?(a="richText",o=Cs(t)):e.mimeType?.startsWith("text/")&&(a="text"),{id:e.id.toString(),title:e.name,description:void 0,content:a==="richText"?void 0:t,richTextContent:a==="richText"?o:void 0,format:a,metadata:{},createdAt:typeof e.createdAt=="string"?new Date(e.createdAt):e.createdAt,updatedAt:new Date}};function gi({document:e,onCancel:t,onSave:o,onFileUpdate:a}){let[r,i]=(0,fe.useState)(Mo(e)),[s,n]=(0,fe.useState)(Mo(e)?{id:e.id.toString(),title:e.name,description:void 0,content:"",format:"text",metadata:{},createdAt:typeof e.createdAt=="string"?new Date(e.createdAt):e.createdAt,updatedAt:new Date}:{...e,updatedAt:new Date}),[m,u]=(0,fe.useState)(Mo(e)?void 0:s.richTextContent),[l,g]=(0,fe.useState)(!1),v=(0,fe.useRef)(Mo(e)?e:null);(0,fe.useEffect)(()=>{Mo(e)?(i(!0),Ts(e).then(p=>{n(p),u(p.richTextContent),i(!1)}).catch(p=>{p instanceof Error&&p.name!=="AbortError"&&(console.error("Failed to convert file:",p),i(!1))})):(n({...e,updatedAt:new Date}),u(e.richTextContent))},[e]);let N=p=>{switch(p){case"markdown":case"mdx":return(0,Dt.jsx)(St.FileText,{className:"h-6 w-6 text-primary"});case"richText":return(0,Dt.jsx)(St.File,{className:"h-6 w-6 text-success"});case"text":return(0,Dt.jsx)(St.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Dt.jsx)(St.File,{className:"h-6 w-6 text-muted-foreground"})}},b=p=>{switch(p){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},k=async()=>{g(!0);try{let p,x;if(v.current&&v.current.mimeType==="text/markdown"){let C=m?Ns(m):"";p={...s,format:"markdown",content:C,richTextContent:void 0},x=C}else p={...s,richTextContent:m},x=s.content||"";let z=v.current?v.current.id.toString():s.id;await Promise.resolve(o()),a?.(z,x)}finally{g(!1)}};return(0,Dt.jsxs)(Ra.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-screen flex flex-col",children:[(0,Dt.jsx)("div",{className:"border-b border-border bg-card p-8 pb-6",children:(0,Dt.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Dt.jsx)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:(0,Dt.jsx)("div",{className:"flex-1 min-w-0",children:(0,Dt.jsxs)("div",{className:"flex items-start gap-4 mb-0 leading-tight",children:[(0,Dt.jsx)("div",{className:"flex-1 min-w-0",children:(0,Dt.jsx)(To,{fieldName:"title",value:s.title,label:"",onSave:(p,x)=>n(z=>({...z,title:x})),className:"[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"})}),(0,Dt.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${b(s.format)} flex-shrink-0 mt-1`,children:s.format.toUpperCase()})]})})}),(0,Dt.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Dt.jsxs)(S,{variant:"outline",size:"sm",onClick:t,className:"gap-2",children:[(0,Dt.jsx)(St.X,{className:"h-4 w-4"}),"Close"]}),(0,Dt.jsxs)(S,{size:"sm",onClick:k,className:"gap-2",disabled:l,children:[l?(0,Dt.jsx)(St.Loader2,{className:"h-4 w-4 animate-spin"}):(0,Dt.jsx)(St.Save,{className:"h-4 w-4"}),l?"Saving...":"Save"]})]})]})}),(0,Dt.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,Dt.jsx)("div",{className:"p-8 pt-0 h-full max-h-full overflow-auto",children:r?(0,Dt.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,Dt.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,Dt.jsx)(St.Loader2,{className:"h-8 w-8 animate-spin text-primary"}),(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading file content..."})]})}):(0,Dt.jsx)(Dt.Fragment,{children:s.format==="richText"?(0,Dt.jsx)(ni,{setValue:u,value:m,name:"richTextContent"},`richtext-${s.id}-${r?"loading":"loaded"}`):(0,Dt.jsx)(Me,{value:s.content||"",onChange:p=>n(x=>({...x,content:p.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})})})})]})}var fi=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function po({files:e,onFileClick:t,onFileDelete:o,onFileUpdate:a,showHeader:r=!0,className:i,viewMode:s="list"}){let[n,m]=(0,fe.useState)(!1),[u,l]=(0,fe.useState)(!1),[g,v]=(0,fe.useState)(null),N=()=>{m(!1),v(null)},b=()=>{l(!0),setTimeout(()=>{l(!1),m(!1),v(null)},500)},k=p=>{v(p),m(!0)};return(0,Dt.jsxs)("div",{className:D("rounded-3xl border overflow-hidden",i),children:[(0,Dt.jsxs)("div",{className:"bg-muted/50 p-3 flex items-center justify-between",children:[r&&s==="list"&&(0,Dt.jsxs)("div",{className:"hidden md:grid md:grid-cols-10 text-sm font-medium flex-1",children:[(0,Dt.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Dt.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Dt.jsx)("div",{className:"col-span-2",children:"Modified"})]}),s==="card"&&(0,Dt.jsx)("div",{className:"text-sm font-medium",children:"Files"})]}),s==="list"&&(0,Dt.jsx)("div",{className:"divide-y",children:e.map(p=>(0,Dt.jsxs)(Ra.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(p),children:[(0,Dt.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Dt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,Dt.jsx)("div",{children:(0,Dt.jsx)("p",{className:"font-medium",children:p.name})})]}),(0,Dt.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:fi(p.filesize)}),(0,Dt.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Dt.jsx)("span",{className:"text-sm md:text-base",children:new Date(p.createdAt).toLocaleDateString()}),(0,Dt.jsxs)("div",{className:"flex gap-1",children:[p.mimeType==="text/markdown"&&(0,Dt.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:x=>{x.stopPropagation(),k(p)},children:(0,Dt.jsx)(St.Edit,{className:"h-4 w-4"})}),(0,Dt.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:x=>{x.stopPropagation(),o?.(p)},children:(0,Dt.jsx)(St.Trash2,{className:"h-4 w-4"})})]})]})]},p.name))}),s==="card"&&(0,Dt.jsx)("div",{className:"p-4 grid grid-cols-1 gap-4",children:e.map(p=>(0,Dt.jsx)(Ra.motion.div,{whileHover:{scale:1.02},className:"border rounded-lg p-4 bg-card hover:bg-muted/50 transition-colors cursor-pointer",onClick:()=>t?.(p),children:(0,Dt.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,Dt.jsxs)("div",{className:"flex-1 min-w-0 space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Dt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted flex-shrink-0"}),(0,Dt.jsx)("div",{className:"min-w-0 flex-1",children:(0,Dt.jsx)("p",{className:"font-medium truncate",children:p.name})})]}),(0,Dt.jsxs)("div",{className:"space-y-1 text-sm text-muted-foreground pl-[52px]",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsx)("span",{className:"font-medium",children:"Size:"}),(0,Dt.jsx)("span",{children:fi(p.filesize)})]}),(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsx)("span",{className:"font-medium",children:"Modified:"}),(0,Dt.jsx)("span",{children:new Date(p.createdAt).toLocaleDateString()})]})]})]}),(0,Dt.jsxs)("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[p.mimeType==="text/markdown"&&(0,Dt.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:x=>{x.stopPropagation(),k(p)},title:"Edit",children:(0,Dt.jsx)(St.Edit,{className:"h-4 w-4"})}),(0,Dt.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:x=>{x.stopPropagation(),o?.(p)},title:"Delete",children:(0,Dt.jsx)(St.Trash2,{className:"h-4 w-4"})})]})]})},p.name))}),(0,Dt.jsx)(Ge,{open:n,onOpenChange:p=>!p&&N(),children:(0,Dt.jsxs)(na,{children:[(0,Dt.jsx)(Lo,{}),(0,Dt.jsxs)(vi.Content,{className:D("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[(0,Dt.jsx)(ze,{className:"sr-only",children:g?`Edit ${g.name}`:"Edit File"}),u&&(0,Dt.jsx)("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:(0,Dt.jsx)(St.Loader2,{className:"h-8 w-8 animate-spin text-primary"})}),g&&(0,Dt.jsx)(gi,{document:g,onSave:b,onFileUpdate:a,onCancel:N})]})]})})]})}var Xo=({isOpen:e,onClose:t,onAddFile:o})=>{let[a,r]=(0,fe.useState)(null),[i,s]=(0,fe.useState)(""),[n,m]=(0,fe.useState)(""),[u,l]=(0,fe.useState)(""),g=N=>{let b=N.target.files?.[0];b&&(r(b),i||s(b.name))},v=async N=>{if(N.preventDefault(),!a)return;let b=new FormData;b.append("file",a),b.append("name",i),n&&b.append("description",n),u&&b.append("tags",u),o?.(b),t(),r(null),s(""),m(""),l("")};return(0,Dt.jsx)(Ge,{open:e,onOpenChange:t,children:(0,Dt.jsxs)(We,{className:"sm:max-w-md",children:[(0,Dt.jsx)(Ke,{children:(0,Dt.jsx)(ze,{children:"Add New File"})}),(0,Dt.jsxs)("form",{onSubmit:v,className:"grid gap-4",children:[(0,Dt.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,Dt.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,Dt.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[(0,Dt.jsx)(Ds,{className:"w-10 h-10 text-gray-400"}),(0,Dt.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,Dt.jsx)("span",{className:"font-semibold",children:"Click to upload"})," Xa drag and drop"]}),(0,Dt.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG Xa GIF (MAX. 800x400px)"})]}),(0,Dt.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:g})]})}),a&&(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("p",{className:"font-medium",children:a.name}),(0,Dt.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((a.size||0)/1024).toFixed(2)," KB"]})]}),(0,Dt.jsx)(S,{type:"submit",onClick:v,children:"Upload"})]})]})]})})};function Ds(e){return(0,Dt.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Dt.jsx)("path",{Dt:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,Dt.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,Dt.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}var bi=({isOpen:e,onClose:t,initialTask:o,epics:a,sprints:r,onUpdateTask:i,onDeleteTask:s,onAddComment:n,colleagues:m,onUploadFile:u,onDeleteFile:l,onFileUpdate:g})=>{let[v,N]=(0,fe.useState)(o),[b,k]=(0,fe.useState)(new Date),[p,x]=(0,fe.useState)("idle"),[z,C]=(0,fe.useState)("idle"),[T,Y]=(0,fe.useState)(!1),[M,Q]=(0,fe.useState)([]),[ee,j]=(0,fe.useState)(m);(0,fe.useEffect)(()=>{N(o)},[o]);let me=async(te,w)=>{if(w!==v[te]){x("loading");try{await i(v.id.toString(),{[te]:w}),k(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch(K){console.log("error",K),x("error"),setTimeout(()=>x("idle"),3e3)}}},ye=async(te,w)=>{if(w!==v[te]){x("loading");try{await i(v.id.toString(),{[te]:w}),k(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch(K){console.log("error",K),x("error"),setTimeout(()=>x("idle"),3e3)}}},I=async te=>{if(n){x("loading");try{await n?.({content:te,taskId:v.id.toString()}),k(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch{x("error"),setTimeout(()=>x("idle"),3e3)}}},ve=async()=>{C("loading");try{await s(v.id.toString()),C("success"),setTimeout(()=>{t(),C("idle")},1e3)}catch{C("error"),setTimeout(()=>C("idle"),3e3)}},ke=async te=>{if(u){x("loading");try{await u(v.id.toString(),te),k(new Date),x("success"),Y(!1),setTimeout(()=>x("idle"),1500)}catch(w){console.error("Error uploading file:",w),x("error"),setTimeout(()=>x("idle"),3e3)}}},E=async te=>{if(l){x("loading");try{await l(v.id.toString(),te.id.toString()),k(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch(w){console.error("Error deleting file:",w),x("error"),setTimeout(()=>x("idle"),3e3)}}},J=(v.files||[]).map(te=>typeof te=="number"?null:te).filter(te=>te!==null),ie=p!=="loading"&&z!=="loading",Ee=()=>{ie&&t()},ce=()=>p==="loading"?(0,Dt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Dt.jsx)(St.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Dt.jsx)("span",{children:"Updating..."})]}):p==="success"?(0,Dt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Dt.jsx)(St.Check,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{children:"Updated successfully"})]}):p==="error"?(0,Dt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Dt.jsx)(St.X,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{children:"Update failed"})]}):null;return(0,Dt.jsxs)(Ge,{open:e,onOpenChange:Ee,children:[(0,Dt.jsxs)(We,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,Dt.jsxs)(Ke,{children:[(0,Dt.jsx)(ze,{className:"sr-only",children:v?.name}),(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsx)("div",{className:"flex-1",children:ce()}),!ie&&(0,Dt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Dt.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Dt.jsx)(To,{fieldName:"name",value:v.name||"",label:"",onSave:me,className:"border-b border-border pb-3",disabled:p==="loading"}),(0,Dt.jsx)(To,{fieldName:"description",value:v.description||"",label:"Description",multiline:!0,onSave:me,disabled:p==="loading"}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsx)(St.File,{className:"h-4 w-4 text-muted-foreground"}),(0,Dt.jsx)("h3",{className:"text-sm font-medium",children:"Files"})]}),u&&(0,Dt.jsxs)(S,{variant:"outline",size:"sm",onClick:()=>Y(!0),disabled:p==="loading",className:"gap-2",children:[(0,Dt.jsx)(St.Upload,{className:"h-4 w-4"}),"Upload"]})]}),J.length>0?(0,Dt.jsx)(po,{files:J,onFileDelete:l?E:void 0,onFileUpdate:g,showHeader:!1,className:"border rounded-lg",viewMode:"card"}):(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground py-4 text-center border border-dashed rounded-lg",children:"No files attached"})]}),(0,Dt.jsx)(yr,{comments:(v?.comments||[]).map(te=>({author:te.author?.value.name||"",createdAt:new Date(te.timestamp),text:te.text,id:te.id||""})),onAddComment:I})]}),(0,Dt.jsx)(Cr,{task:v,epics:a,sprints:r,lastUpdated:b,onUpdateTask:ye,onClose:Ee,onDelete:ve,isUpdating:p==="loading",isDeleting:z==="loading",deleteState:z,teamMembers:ee})]})]}),u&&(0,Dt.jsx)(Xo,{isOpen:T,onClose:()=>Y(!1),onAddFile:ke})]})};var uo=({isOpen:e,onClose:t,onAddEpic:o})=>{let[a,r]=(0,fe.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),i=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],s=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],n=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],m=l=>{l.preventDefault(),a.name.trim()&&(o({name:a.name.trim(),description:a.description.trim(),color:a.color,confidence:a.confidence,phase:a.phase,startDate:a.startDate,endDate:a.endDate}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},u=(l,g)=>{r(v=>({...v,[l]:g}))};return(0,Dt.jsx)(Ge,{open:e,onOpenChange:t,children:(0,Dt.jsxs)(We,{className:"sm:max-w-md",children:[(0,Dt.jsx)(Ke,{children:(0,Dt.jsx)(ze,{children:"Add New Epic"})}),(0,Dt.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{htmlFor:"name",children:"Epic Name"}),(0,Dt.jsx)(ne,{id:"name",value:a.name,onChange:l=>u("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{htmlFor:"description",children:"Description"}),(0,Dt.jsx)(Me,{id:"description",value:a.description,onChange:l=>u("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"Color"}),(0,Dt.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(l=>(0,Dt.jsx)("button",{type:"button",onClick:()=>u("color",l),className:`w-8 h-8 rounded-full ${l} ${a.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"Confidence"}),(0,Dt.jsxs)(Xe,{value:a.confidence,onValueChange:l=>u("confidence",l),children:[(0,Dt.jsx)(Ze,{children:(0,Dt.jsx)(pt,{})}),(0,Dt.jsx)(Je,{children:s.map(l=>(0,Dt.jsx)(xe,{value:l.value,children:l.label},l.value))})]})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"Phase"}),(0,Dt.jsxs)(Xe,{value:a.phase.toString(),onValueChange:l=>u("phase",parseInt(l)),children:[(0,Dt.jsx)(Ze,{children:(0,Dt.jsx)(pt,{})}),(0,Dt.jsx)(Je,{children:n.map(l=>(0,Dt.jsx)(xe,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"Start Date"}),(0,Dt.jsx)(ne,{type:"date",value:a.startDate,onChange:l=>u("startDate",l.target.value)})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"End Date"}),(0,Dt.jsx)(ne,{type:"date",value:a.endDate,onChange:l=>u("endDate",l.target.value)})]})]}),(0,Dt.jsxs)(wo,{children:[(0,Dt.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Dt.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};function yi(e,t){let[o,a]=(0,fe.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{a(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,fe.useEffect)(()=>{r(o)},[]),[o,r]}var Qo=require("react-icons/fa");function yt({title:e,description:t,badge:o,primaryAction:a,secondaryAction:r,gradient:i,children:s,className:n}){let[m,u]=yi(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),l=!r&&!t||m;return(0,Dt.jsxs)(Ra.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${n||""}`,children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-3",children:[o&&(0,Dt.jsx)(we,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:o}),(0,Dt.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Dt.jsxs)("div",{className:"flex items-center gap-3",children:[l&&a&&(0,Dt.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:a.onClick,children:a.label}),(r||t)&&(0,Dt.jsx)("button",{"aria-label":m?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>u(!m),style:{lineHeight:0},children:m?(0,Dt.jsx)(Qo.FaChevronDown,{size:22}):(0,Dt.jsx)(Qo.FaChevronUp,{size:22})})]})]}),!l&&(0,Dt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Dt.jsxs)("div",{className:"space-y-4",children:[(0,Dt.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Dt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[a&&(0,Dt.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:a.onClick,children:a.label}),r&&(0,Dt.jsx)(S,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),s&&(0,Dt.jsx)("div",{className:"hidden lg:block",children:s})]})]})}var Ni=({initialTasks:e=[],initialEpics:t=[],initialSprints:o=[],initialUsers:a=[],initialColleagues:r=[],initialProjects:i=[],onAddTask:s,onUpdateTask:n,onDeleteTask:m,onTaskClick:u,onAddEpic:l,onAddComment:g,onUploadFile:v,onDeleteFile:N,onFileUpdate:b})=>{let[k,p]=(0,pe.useState)([]),[x,z]=(0,pe.useState)([]),[C,T]=(0,pe.useState)([]),[Y,M]=(0,pe.useState)(!1),[Q,ee]=(0,pe.useState)(!1),[j,me]=(0,pe.useState)(null),[ye,I]=(0,pe.useState)(null),[ve,ke]=(0,pe.useState)([]),[E,J]=(0,pe.useState)([]),[ie,Ee]=(0,pe.useState)(0),ce=(0,pe.useRef)(null),te=(0,pe.useRef)(null),w=pe.default.useMemo(()=>[...x.map(h=>h.id),0],[x]),K=(0,pe.useRef)(""),De=(0,pe.useRef)(""),ot=(0,pe.useRef)(""),de=(0,pe.useRef)(""),je=(h,R)=>h.map(V=>`${V.id}-${new Date(V.createdAt).getTime()}-${new Date(V.updatedAt).getTime()}`).join("-")+(R?`-${R}`:"");(0,pe.useEffect)(()=>{let h=e.map(V=>V.files?.filter(Z=>typeof Z=="object").map(Z=>new Date(Z.updatedAt).getTime())).flat(),R=je(e,h.join("-"));R!==K.current&&(p(e),j&&me(e.find(V=>V.id===j.id)||null),K.current=R)},[e]),(0,pe.useEffect)(()=>{let h=je(t);h!==De.current&&(z(t),De.current=h)},[t]),(0,pe.useEffect)(()=>{let h=je(o);h!==ot.current&&(T(o),ot.current=h)},[o]),(0,pe.useEffect)(()=>{let h=je(r.map(R=>({id:R.id,updatedAt:R.updatedAt,createdAt:R.createdAt})));h!==de.current&&(J(r),de.current=h)},[r]),(0,pe.useEffect)(()=>{let h=()=>{if(ce.current){let Z=ce.current.offsetHeight;Ee(Z)}};h();let R=new ResizeObserver(h);ce.current&&R.observe(ce.current);let V=()=>{setTimeout(h,100)};return window.addEventListener("storage",V),()=>{R.disconnect(),window.removeEventListener("storage",V)}},[]),(0,pe.useEffect)(()=>{let h=setTimeout(()=>{ce.current&&Ee(ce.current.offsetHeight)},300);return()=>clearTimeout(h)},[Y,Q]);let go=k.filter(h=>!0),Nt=h=>go.filter(R=>R.status===h),fo=h=>{let R={};return x.forEach(V=>{R[V.id]=h.filter(Z=>Re(Z.epic)===V.id)}),R["no-epic"]=h.filter(V=>!Re(V.epic)),R},Ct=h=>{I(h)},Vt=h=>{ye&&(p(R=>R.map(V=>V.id===ye.id?{...V,status:h}:V)),n?.(ye.id.toString(),{status:h}),I(null))},Yt=h=>{let R={...h,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(V=>[...V,R]),s?.(h)},Ut=async(h,R)=>{p(V=>V.map(Z=>Z.id===Number(h)?{...Z,...R}:Z)),n&&await n(h,R),j?.id===Number(h)&&me(V=>({...V,...R}))},Qt=async h=>{p(R=>R.filter(V=>V.id!==Number(h))),j?.id===Number(h)&&me(null),m&&await m(h)},eo=h=>{let R={...h,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};z(V=>[...V,R]),l?.(h)},mt=h=>{me(h),u?.(h)},f=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],P=ie>0?`calc(100vh - ${ie+120}px)`:"calc(100vh - 12rem)";return(0,Dt.jsxs)("div",{ref:te,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Dt.jsx)("div",{ref:ce,className:"flex-shrink-0",children:(0,Dt.jsx)(yt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>M(!0)},secondaryAction:{label:"Add epic",onClick:()=>ee(!0)}})}),(0,Dt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Dt.jsx)("div",{className:"h-full",style:{height:ie>0?`calc(100vh - ${ie+120}px)`:"calc(100vh - 12rem)"},children:(0,Dt.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:f.map(h=>{let R=Nt(h.status),V=fo(R);return(0,Dt.jsxs)(Qa,{title:h.title,status:h.status,taskCount:R.length,onDrop:Vt,isCompact:h.status==="done",height:P,children:[V["no-epic"].map(Z=>(0,Dt.jsx)(xo,{epic:null,task:Z,onDragStart:Ct,onTaskClick:mt,isCompact:h.status==="done"},Z.id)),w.map(Z=>{let Le=x.find(ft=>ft.id===Z),Tt=V[Z]||[];return Tt.length===0?null:(0,Dt.jsxs)("div",{className:"mb-6",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Dt.jsx)("div",{className:`w-3 h-3 rounded-full ${Le?.color}`}),(0,Dt.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:Le?.name||"No Epic"}),(0,Dt.jsx)(we,{variant:"secondary",className:"text-xs",children:Tt.length})]})," ",(0,Dt.jsx)("div",{className:"space-y-3",children:Tt.map(ft=>(0,Dt.jsx)(xo,{task:ft,epic:Le,onDragStart:Ct,onTaskClick:mt,isCompact:h.status==="done"},ft.id))})]},Z)})]},h.id)})})})}),(0,Dt.jsx)(io,{isOpen:Y,onClose:()=>M(!1),onAddTask:Yt,assignees:[...E,...ve],epics:x,sprints:C}),(0,Dt.jsx)(uo,{isOpen:Q,onClose:()=>ee(!1),onAddEpic:eo}),j&&(0,Dt.jsx)(bi,{isOpen:!!j,onClose:()=>me(null),initialTask:j,epics:x,sprints:C,onUpdateTask:Ut,onDeleteTask:Qt,colleagues:E,onUploadFile:v,onDeleteFile:N,onFileUpdate:b,onAddComment:g})]})};var Ci=({tasks:e,epics:t,sprints:o,onUpdateTask:a,onTaskClick:r,onAddTaskToEpic:i,onAddEpic:s,onUpdateEpic:n,onDeleteEpic:m})=>{let[u,l]=(0,fe.useState)(t),[g,v]=(0,fe.useState)(null),[N,b]=(0,fe.useState)(null),[k,p]=(0,fe.useState)({}),[x,z]=(0,fe.useState)(0),[C,T]=(0,fe.useState)(!1),[Y,M]=(0,fe.useState)(!1),[Q,ee]=(0,fe.useState)(null),j=(0,fe.useRef)(null),me=(0,fe.useRef)(null);(0,fe.useEffect)(()=>{l(t)},[t]),(0,fe.useEffect)(()=>{let w=()=>{if(j.current){let ot=j.current.offsetHeight;z(ot)}};w();let K=new ResizeObserver(w);j.current&&K.observe(j.current);let De=()=>{setTimeout(w,100)};return window.addEventListener("storage",De),()=>{K.disconnect(),window.removeEventListener("storage",De)}},[]),(0,fe.useEffect)(()=>{let w=setTimeout(()=>{j.current&&z(j.current.offsetHeight)},300);return()=>clearTimeout(w)},[N]);let ye=w=>{v(w)},I=w=>{w.preventDefault()},ve=(w,K)=>{w.preventDefault(),g&&Re(g.epic).toString()!==K&&(a(g.id.toString(),{epic:Number(K)}),v(null))},ke=w=>e.filter(K=>Re(K.epic).toString()===w),E=w=>{b(w.id.toString()),p({name:w.name,description:w.description,confidence:w.confidence,phase:w.phase})},J=async()=>{N&&k.name&&(await n(N.toString(),k),l(w=>w.map(K=>K.id.toString()===N?{...K,...k}:K)),b(null),p({}))},ie=()=>{b(null),p({})},Ee=async w=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await m(w),l(K=>K.filter(De=>De.id.toString()!==w)))},ce=w=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[w]||`Phase ${w}`,te=w=>{switch(w){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsxs)("div",{ref:me,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Dt.jsx)("div",{ref:j,className:"flex-shrink-0",children:(0,Dt.jsx)(yt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>T(!0)}})}),(0,Dt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Dt.jsx)("div",{className:"h-full overflow-y-auto",style:{height:x>0?`calc(100vh - ${x+120}px)`:"calc(100vh - 12rem)"},children:(0,Dt.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:u.map(w=>{let K=ke(w.id.toString()),De=K.reduce((de,je)=>de+(je.storyPoints||0),0),ot=x>0?`calc(100vh - ${x+200}px)`:"calc(100vh - 14rem)";return(0,Dt.jsxs)(be,{className:`flex flex-col ${N===w.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:N===w.id.toString()?"auto":ot,minHeight:"400px"},onDragOver:I,onDrop:de=>ve(de,w.id.toString()),children:[(0,Dt.jsx)("div",{className:"p-4 border-b border-border",children:N===w.id.toString()?(0,Dt.jsxs)("div",{className:"space-y-4",children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsx)(ne,{value:k.name||"",onChange:de=>p({...k,name:de.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Dt.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:J,className:"p-1 h-8 w-8",children:(0,Dt.jsx)(St.Check,{className:"h-4 w-4"})}),(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:ie,className:"p-1 h-8 w-8",children:(0,Dt.jsx)(St.X,{className:"h-4 w-4"})})]})]}),(0,Dt.jsx)(Me,{value:k.description||"",onChange:de=>p({...k,description:de.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Dt.jsxs)("select",{value:k.confidence||w.confidence,onChange:de=>p({...k,confidence:de.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,Dt.jsx)("option",{value:"low",children:"Low"}),(0,Dt.jsx)("option",{value:"medium",children:"Medium"}),(0,Dt.jsx)("option",{value:"high",children:"High"})]})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Dt.jsx)("select",{value:k.phase?.toString()||w.phase.toString(),onChange:de=>p({...k,phase:parseInt(de.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(de=>(0,Dt.jsxs)("option",{value:de.toString(),children:["Phase ",de]},de))})]})]})]}):(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Dt.jsx)("div",{className:`w-4 h-4 rounded-full ${w.color}`}),(0,Dt.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:w.name}),(0,Dt.jsxs)("div",{className:"flex gap-1",children:[(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>E(w),className:"p-1 h-8 w-8",children:(0,Dt.jsx)(St.Edit2,{className:"h-3 w-3"})}),(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Ee(w.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Dt.jsx)(St.Trash2,{className:"h-3 w-3"})})]})]}),(0,Dt.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Dt.jsxs)(we,{className:`text-xs ${te(w.confidence)}`,children:[w.confidence," confidence"]}),(0,Dt.jsxs)(we,{variant:"outline",className:"text-xs",children:["Phase ",w.phase]}),(0,Dt.jsxs)(we,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[K.length," tasks"]}),(0,Dt.jsxs)(we,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[De," pts"]})]}),w.description&&(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:w.description}),(0,Dt.jsxs)(S,{onClick:()=>{M(!0),ee(w)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Dt.jsx)(St.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Dt.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,Dt.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${g?"border-primary bg-primary/10":"border-border"}`,children:K.length===0?(0,Dt.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,Dt.jsx)(St.Move,{className:"h-8 w-8 mb-2"}),(0,Dt.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):K.map(de=>(0,Dt.jsx)(xo,{task:de,epic:w,onDragStart:ye,onTaskClick:r,isCompact:!0},de.id))})})]},w.id)})})})})]}),(0,Dt.jsx)(uo,{isOpen:C,onClose:()=>T(!1),onAddEpic:s}),(0,Dt.jsx)(io,{isOpen:Y,onClose:()=>M(!1),onAddTask:i,assignees:[],epics:[],defaultEpicId:Q?.id.toString()||"",sprints:o})]})};var Ma=require("date-fns");var Di=({isOpen:e,onClose:t,onAddSprint:o})=>{let[a,r]=(0,fe.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),i=n=>{n.preventDefault(),!(!a.name||!a.startDate||!a.endDate)&&(o({name:a.name,description:a.description,startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},s=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,Dt.jsx)(Ge,{open:e,onOpenChange:s,children:(0,Dt.jsxs)(We,{className:"sm:max-w-md",children:[(0,Dt.jsx)(Ke,{children:(0,Dt.jsx)(ze,{children:"Add New Sprint"})}),(0,Dt.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{htmlFor:"name",children:"Sprint Name *"}),(0,Dt.jsx)(ne,{id:"name",value:a.name,onChange:n=>r(m=>({...m,name:n.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{htmlFor:"description",children:"Description"}),(0,Dt.jsx)(Me,{id:"description",value:a.description,onChange:n=>r(m=>({...m,description:n.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"Start Date *"}),(0,Dt.jsxs)(ka,{children:[(0,Dt.jsx)(Pa,{asChild:!0,children:(0,Dt.jsxs)(S,{variant:"outline",className:D("w-full justify-start text-left font-normal",!a.startDate&&"text-muted-foreground"),children:[(0,Dt.jsx)(St.CalendarIcon,{className:"mr-2 h-4 w-4"}),a.startDate?(0,Ma.format)(a.startDate,"PPP"):"Pick a date"]})}),(0,Dt.jsx)(Ko,{className:"w-auto p-0",align:"start",children:(0,Dt.jsx)(Zo,{mode:"single",selected:a.startDate,onSelect:n=>r(m=>({...m,startDate:n})),initialFocus:!0})})]})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)(H,{children:"End Date *"}),(0,Dt.jsxs)(ka,{children:[(0,Dt.jsx)(Pa,{asChild:!0,children:(0,Dt.jsxs)(S,{variant:"outline",className:D("w-full justify-start text-left font-normal",!a.endDate&&"text-muted-foreground"),children:[(0,Dt.jsx)(St.CalendarIcon,{className:"mr-2 h-4 w-4"}),a.endDate?(0,Ma.format)(a.endDate,"PPP"):"Pick a date"]})}),(0,Dt.jsx)(Ko,{className:"w-auto p-0",align:"start",children:(0,Dt.jsx)(Zo,{mode:"single",selected:a.endDate,onSelect:n=>r(m=>({...m,endDate:n})),initialFocus:!0,disabled:n=>a.startDate?n<a.startDate:!1})})]})]})]}),(0,Dt.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Dt.jsx)(S,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),(0,Dt.jsx)(S,{type:"submit",disabled:!a.name||!a.startDate||!a.endDate,children:"Add Sprint"})]})]})]})})};var Si=({tasks:e,epics:t,sprints:o,onUpdateTask:a,onTaskClick:r,onAddSprint:i,onUpdateSprint:s,onDeleteSprint:n})=>{let[m,u]=(0,fe.useState)([]),[l,g]=(0,fe.useState)(new Set),[v,N]=(0,fe.useState)(null),[b,k]=(0,fe.useState)(!1),[p,x]=(0,fe.useState)(null),[z,C]=(0,fe.useState)(null),[T,Y]=(0,fe.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[M,Q]=(0,fe.useState)([]),[ee,j]=(0,fe.useState)("upcoming"),[me,ye]=(0,fe.useState)(!1),[I,ve]=(0,fe.useState)(0),ke=(0,fe.useRef)(null),E=(0,fe.useRef)(null);(0,fe.useEffect)(()=>{let f=()=>{ke.current&&ve(ke.current.offsetHeight)};f();let P=new ResizeObserver(f);return ke.current&&P.observe(ke.current),()=>P.disconnect()},[]);let J=f=>t.find(P=>P.id===Number(f)),ie=f=>o.find(P=>P.id===Number(f)),Ee=f=>{let P={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return P[f]||P.medium},ce=f=>{if(!f||f?.length===0)return"";let P=f?.trim().split(" ");if(P?.length===1)return P[0];let h=P[0],R=P[P.length-1][0].toUpperCase();return`${h} ${R}`},te=f=>{let P={},h=[];return f.forEach(R=>{R.epic?(P[Re(R.epic)]||(P[Re(R.epic)]=[]),P[Re(R.epic)].push(R)):h.push(R)}),{tasksByEpic:P,unassignedTasks:h}};(0,fe.useEffect)(()=>{Q(o)},[o]);let w=M.filter(f=>{switch(ee){default:return!0}}),K=M.filter(f=>m.includes(f.id.toString())),De=e.filter(f=>!f.sprint||f.status==="backlog"),ot=De.reduce((f,P)=>f+(P.storyPoints||0),0),de=f=>{u(P=>P.includes(f)?P.filter(h=>h!==f):P?.length<3?[...P,f]:P)},je=f=>{g(P=>{let h=new Set(P);return h.has(f)?h.delete(f):h.add(f),h})},go=f=>{i(f),k(!1)},Nt=f=>{C(f.id.toString()),Y({name:f.name,description:f.description||"",startDate:f.startDate?new Date(f.startDate).toISOString().split("T")[0]:f.startDate,endDate:f.endDate?new Date(f.endDate).toISOString().split("T")[0]:f.endDate,isActive:!1})},fo=()=>{z&&(s(z,{name:T.name,description:T.description,startDate:T.startDate,endDate:T.endDate}),Q(f=>f.map(P=>(P.id===Number(z)&&(P.name=T.name,P.description=T.description,P.startDate=T.startDate,P.endDate=T.endDate),P))),C(null))},Ct=()=>{C(null),Y({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Vt=(f,P)=>{N(P),f.dataTransfer.effectAllowed="move"},Yt=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},Ut=f=>{x(f)},Qt=()=>{x(null)},eo=(f,P)=>{if(f.preventDefault(),x(null),!v)return;(Re(v.sprint)||void 0)!==Number(P)&&a(v.id.toString(),{sprint:Number(P)}),N(null)},mt=({task:f,showSprint:P=!1})=>{let h=f.epic?J(Re(f.epic).toString()):null,R=f.sprint?ie(Re(f.sprint).toString()):null;return(0,Dt.jsx)(be,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:Le=>{Le.dataTransfer.effectAllowed="move",Le.dataTransfer.setData("text/plain",f.id.toString()),Vt(Le,f)},onClick:Le=>{v===null&&r(f)},style:{userSelect:"none"},children:(0,Dt.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,Dt.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Dt.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:f.name}),(0,Dt.jsx)(we,{className:`text-xs ${Ee(f.priority||"medium")}`,children:f.priority?.[0]?.toUpperCase()})]}),(0,Dt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-1",children:[h&&(0,Dt.jsx)("div",{className:`w-2 h-2 rounded-full ${h.color}`}),(0,Dt.jsx)("span",{className:"text-muted-foreground truncate",children:h?.name})]}),(0,Dt.jsx)("span",{className:"text-muted-foreground",children:ce(f.assignee?.value?.name)})]}),P&&R&&(0,Dt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Dt.jsx)(St.Calendar,{className:"h-3 w-3"}),(0,Dt.jsx)("span",{children:R.name})]})]})})};return(0,Dt.jsxs)("div",{ref:E,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Dt.jsx)("div",{ref:ke,className:"flex-shrink-0",children:(0,Dt.jsx)(yt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>k(!0)}})}),(0,Dt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Dt.jsxs)("div",{className:"h-full",style:{height:I>0?`calc(100vh - ${I+120}px)`:"calc(100vh - 12rem)"},children:[(0,Dt.jsxs)("div",{className:"mb-4",children:[(0,Dt.jsx)(be,{className:"p-3 bg-card shadow-sm",children:(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,Dt.jsxs)("p",{className:"text-xs text-muted-foreground",children:[m?.length,"/3 selected"]})]}),m?.length>0&&(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,Dt.jsx)("div",{className:"flex flex-wrap gap-1",children:K.map(f=>(0,Dt.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Dt.jsx)("span",{className:"max-w-[80px] truncate",children:f.name}),(0,Dt.jsx)("button",{onClick:()=>de(f.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Dt.jsx)(St.X,{className:"h-4 w-4"})})]},f.id))})]})]}),(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsxs)(S,{onClick:()=>k(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Dt.jsx)(St.Plus,{className:"h-3 w-3"}),"Add"]}),(0,Dt.jsxs)(S,{onClick:()=>ye(!me),variant:"outline",size:"sm",className:"gap-1",children:[(0,Dt.jsx)(St.Calendar,{className:"h-3 w-3"}),me?"Close":"Select"]})]})]})}),me&&(0,Dt.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>ye(!1)}),(0,Dt.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-xl z-10 transition-all duration-300 ease-in-out ${me?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,Dt.jsxs)(be,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Dt.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Dt.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Dt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>ye(!1),className:"h-8 w-8 p-0",children:(0,Dt.jsx)(St.X,{className:"h-4 w-4"})})]}),(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Dt.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Dt.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:o.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(f=>(0,Dt.jsxs)(S,{variant:ee===f.key?"default":"outline",size:"sm",onClick:()=>j(f.key),className:"text-xs h-8 px-3 flex-1",children:[f.label," (",f.count,")"]},f.key))}),(0,Dt.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:w.length>0?w.map(f=>{let P=m.includes(f.id.toString()),h=e.filter(V=>Re(V.sprint)===f.id).length,R=!P&&m.length<3;return(0,Dt.jsx)("div",{className:`p-3 rounded-lg border transition-all ${P?"bg-primary/10 border-primary/30":R?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:z===f.id.toString()?(0,Dt.jsxs)("div",{className:"space-y-3",children:[(0,Dt.jsx)(ne,{value:T.name,onChange:V=>Y(Z=>({...Z,name:V.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Dt.jsx)(Me,{value:T.description,onChange:V=>Y(Z=>({...Z,description:V.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Dt.jsxs)("div",{className:"flex gap-2",children:[(0,Dt.jsxs)(S,{size:"sm",onClick:()=>fo(),className:"flex-1",children:[(0,Dt.jsx)(St.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,Dt.jsxs)(S,{size:"sm",variant:"outline",onClick:Ct,className:"flex-1",children:[(0,Dt.jsx)(St.X,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,Dt.jsxs)("div",{children:[(0,Dt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Dt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Dt.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:f.name}),(0,Dt.jsx)(we,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Dt.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:f.description}),(0,Dt.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Dt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Dt.jsx)(St.CalendarDays,{className:"h-3 w-3"}),new Date(f.startDate).toLocaleDateString()]}),(0,Dt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Dt.jsx)(St.User,{className:"h-3 w-3"}),h," tasks"]})]})]}),(0,Dt.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Nt(f),className:"h-6 w-6 p-0",children:(0,Dt.jsx)(St.Edit2,{className:"h-3 w-3"})}),(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>n(f.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,Dt.jsx)(St.Trash2,{className:"h-3 w-3"})})]})]}),(0,Dt.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,Dt.jsx)(S,{variant:P?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>de(f.id.toString()),disabled:!P&&m?.length>=3,children:(0,Dt.jsx)("span",{className:"pointer-events-none select-none",children:P?"Deselect":m?.length>=3?"Limit Reached":"Select"})})})]})},f.id)}):(0,Dt.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Dt.jsx)(St.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,Dt.jsxs)("p",{className:"text-sm",children:['No sprints found for "',ee,'" filter']}),(0,Dt.jsx)(S,{variant:"link",size:"sm",onClick:()=>j("all"),className:"text-xs",children:"Show all sprints"})]})}),m?.length===0&&(0,Dt.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Dt.jsxs)("div",{className:"text-center",children:[(0,Dt.jsx)(St.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Dt.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Dt.jsx)("div",{className:"lg:col-span-1",children:(0,Dt.jsxs)(be,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Yt,onDragEnter:()=>Ut("backlog"),onDragLeave:Qt,onDrop:f=>eo(f,"backlog"),style:{height:I>0?`calc(100vh - ${I+200}px)`:"calc(100vh - 16rem)"},children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Dt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsxs)(we,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[De?.length," tasks"]}),(0,Dt.jsxs)(we,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[ot," pts"]})]})]}),(0,Dt.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${p==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:f,unassignedTasks:P}=te(De);return(0,Dt.jsxs)(Dt.Fragment,{children:[Object.entries(f).map(([h,R])=>{let V=J(h);if(!V)return null;let Z=l.has(h);return(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>je(h),children:[(0,Dt.jsx)("div",{className:`w-3 h-3 rounded-full ${V.color}`}),(0,Dt.jsx)("span",{className:"font-medium text-muted-foreground",children:V.name}),(0,Dt.jsxs)("span",{className:"text-muted-foreground",children:["(",R?.length,")"]}),(0,Dt.jsx)("div",{className:"ml-auto",children:Z?(0,Dt.jsx)(St.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Dt.jsx)(St.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Z&&(0,Dt.jsx)("div",{className:"space-y-2 pl-2",children:R.map(Le=>(0,Dt.jsx)(mt,{task:Le},Le.id))})]},h)}),P?.length>0&&(()=>{let h=l.has("no-epic");return(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>je("no-epic"),children:[(0,Dt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Dt.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Dt.jsxs)("span",{className:"text-muted-foreground",children:["(",P?.length,")"]}),(0,Dt.jsx)("div",{className:"ml-auto",children:h?(0,Dt.jsx)(St.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Dt.jsx)(St.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!h&&(0,Dt.jsx)("div",{className:"space-y-2 pl-2",children:P?.map(R=>(0,Dt.jsx)(mt,{task:R},R.id))})]})})(),De?.length===0&&(0,Dt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),De?.length>0&&Object.keys(f).length===0&&P.length===0&&(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),De?.map(h=>(0,Dt.jsx)(mt,{task:h},h.id))]})]})})()})]})}),K.map(f=>{let P=e.filter(R=>Re(R?.sprint)===f.id),h=P.reduce((R,V)=>R+(V?.storyPoints||0),0);return(0,Dt.jsxs)(be,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Yt,onDragEnter:()=>Ut(f.id.toString()),onDragLeave:Qt,onDrop:R=>eo(R,f.id.toString()),style:{height:I>0?`calc(100vh - ${I+200}px)`:"calc(100vh - 16rem)"},children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Dt.jsx)("div",{children:(0,Dt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:f.name})}),(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsxs)(we,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[P?.length," tasks"]}),(0,Dt.jsxs)(we,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[h," pts"]}),(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>{ye(!0),Nt(f)},className:"h-6 px-2",children:(0,Dt.jsx)(St.Edit2,{className:"h-3 w-3"})}),(0,Dt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>n(f.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Dt.jsx)(St.Trash2,{className:"h-3 w-3"})})]})]}),(0,Dt.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:R,unassignedTasks:V}=te(P);return(0,Dt.jsxs)(Dt.Fragment,{children:[Object.entries(R).map(([Z,Le])=>{let Tt=J(Z);if(!Tt)return null;let ft=l.has(Z);return(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>je(Z),children:[(0,Dt.jsx)("div",{className:`w-3 h-3 rounded-full ${Tt.color}`}),(0,Dt.jsx)("span",{className:"font-medium text-muted-foreground",children:Tt.name}),(0,Dt.jsxs)("span",{className:"text-muted-foreground",children:["(",Le?.length,")"]}),(0,Dt.jsx)("div",{className:"ml-auto",children:ft?(0,Dt.jsx)(St.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Dt.jsx)(St.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!ft&&(0,Dt.jsx)("div",{className:"space-y-2 pl-2",children:Le?.map(vo=>(0,Dt.jsx)(mt,{task:vo},vo.id))})]},Z)}),V?.length>0&&(()=>{let Z=l.has("no-epic");return(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>je("no-epic"),children:[(0,Dt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Dt.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Dt.jsxs)("span",{className:"text-muted-foreground",children:["(",V?.length,")"]}),(0,Dt.jsx)("div",{className:"ml-auto",children:Z?(0,Dt.jsx)(St.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Dt.jsx)(St.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Z&&(0,Dt.jsx)("div",{className:"space-y-2 pl-2",children:V?.map(Le=>(0,Dt.jsx)(mt,{task:Le},Le.id))})]})})(),P?.length===0&&(0,Dt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},f.id)})]}),(0,Dt.jsx)(Di,{isOpen:b,onClose:()=>k(!1),onAddSprint:go})]})})]})};var Ss=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),ks=e=>{let[t,o]=e.split(":"),a=new Date;return a.setHours(parseInt(t),parseInt(o)),a.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Aa=(e,t)=>{let o=new Date,a=new Date(e);if(t){let[r,i]=t.split(":");a.setHours(parseInt(r),parseInt(i))}return a<o},Ia=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Ps=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Rs=({colleagues:e,onAddReminder:t,open:o,setOpen:a})=>{let[r,i]=(0,fe.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[s,n]=(0,fe.useState)(!1),m=l=>{if(l.preventDefault(),!e.find(N=>N?.id.toString()===r.colleagueId.toString())){console.error("No valid colleague selected"),n(!0);return}n(!1);let v={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};t(v),a(!1),i({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,fe.useEffect)(()=>{r.colleagueId&&n(!1)},[r.colleagueId]);let u=e.filter(Boolean);return(0,Dt.jsx)(Ge,{open:o,onOpenChange:a,children:(0,Dt.jsxs)(We,{className:"max-w-2xl",children:[(0,Dt.jsx)(Ke,{children:(0,Dt.jsx)(ze,{children:"Add New Reminder"})}),(0,Dt.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,Dt.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"title",children:"Title"}),(0,Dt.jsx)(ne,{id:"title",value:r.title,onChange:l=>i({...r,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"description",children:"Description"}),(0,Dt.jsx)(Me,{id:"description",value:r.description,onChange:l=>i({...r,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"dueDate",children:"Due Date"}),(0,Dt.jsx)(ne,{id:"dueDate",type:"date",value:r.dueDate,onChange:l=>i({...r,dueDate:l.target.value}),required:!0})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Dt.jsx)(ne,{id:"dueTime",type:"time",value:r.dueTime,onChange:l=>i({...r,dueTime:l.target.value})})]})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{className:`${s?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Dt.jsxs)(Xe,{value:r.colleagueId,onValueChange:l=>{i({...r,colleagueId:l})},required:!0,children:[(0,Dt.jsx)(Ze,{className:`${s?"text-destructive border-red-500":""}`,children:(0,Dt.jsx)(pt,{className:`${s?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(l=>l?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Dt.jsx)(Je,{children:u.map(l=>(0,Dt.jsx)(xe,{value:l.id.toString(),children:l.name},l.id))})]}),s&&(0,Dt.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Dt.jsxs)("div",{className:"space-y-2",children:[(0,Dt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Dt.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:l=>i({...r,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,Dt.jsx)(H,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Dt.jsxs)(Xe,{value:r.recurrencePattern,onValueChange:l=>i({...r,recurrencePattern:l}),children:[(0,Dt.jsx)(Ze,{children:(0,Dt.jsx)(pt,{})}),(0,Dt.jsxs)(Je,{children:[(0,Dt.jsx)(xe,{value:"daily",children:"Daily"}),(0,Dt.jsx)(xe,{value:"weekly",children:"Weekly"}),(0,Dt.jsx)(xe,{value:"monthly",children:"Monthly"}),(0,Dt.jsx)(xe,{value:"yearly",children:"Yearly"})]})]})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Dt.jsx)(ne,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:l=>i({...r,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,Dt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Dt.jsx)(S,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Cancel"}),(0,Dt.jsx)(S,{type:"submit",children:"Add Reminder"})]})]})]})})},Es=({reminder:e,colleagues:t,onUpdateReminder:o,open:a,onClose:r})=>{let[i,s]=(0,fe.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),n=u=>{u.preventDefault(),o(e.id.toString(),{title:i.title,description:i.description,dueDate:new Date(i.dueDate||"").toISOString(),dueTime:i.dueTime||void 0,isRecurring:i.isRecurring}),r()},m=t.filter(Boolean);return(0,Dt.jsx)(Ge,{open:a,onOpenChange:r,children:(0,Dt.jsxs)(We,{className:"max-w-2xl",children:[(0,Dt.jsx)(Ke,{children:(0,Dt.jsx)(ze,{children:"Edit Reminder"})}),(0,Dt.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,Dt.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"edit-title",children:"Title"}),(0,Dt.jsx)(ne,{id:"edit-title",value:i.title,onChange:u=>s({...i,title:u.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"edit-description",children:"Description"}),(0,Dt.jsx)(Me,{id:"edit-description",value:i.description||"",onChange:u=>s({...i,description:u.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Dt.jsx)(ne,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:u=>s({...i,dueDate:u.target.value}),required:!0})]}),(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)(H,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Dt.jsx)(ne,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:u=>s({...i,dueTime:u.target.value})})]})]}),(0,Dt.jsx)("div",{className:"space-y-2",children:(0,Dt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Dt.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring||!1,onChange:u=>s({...i,isRecurring:u.target.checked}),className:"rounded border-border"}),(0,Dt.jsx)(H,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,Dt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Dt.jsx)(S,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,Dt.jsx)(S,{type:"submit",children:"Save Changes"})]})]})]})})},Ms=({reminder:e,colleagues:t,onUpdateReminder:o,onDeleteReminder:a})=>{let[r,i]=(0,fe.useState)(!1);if(!e||!e.id)return null;let s=Aa(new Date(e.dueDate||""),e.dueTime||""),n=Ia(new Date(e.dueDate||"")),m=Ps(new Date(e.dueDate||"")),u=()=>{o(e.id.toString(),{})},l=()=>n?"Today":m?"Tomorrow":Ss(new Date(e.dueDate||""));return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(Es,{reminder:e,colleagues:t,onUpdateReminder:o,open:r,onClose:()=>i(!1)}),(0,Dt.jsx)(be,{children:(0,Dt.jsx)(ao,{className:"p-4",children:(0,Dt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Dt.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Dt.jsx)("button",{onClick:u,className:"mt-1 text-primary hover:text-primary/80"}),(0,Dt.jsxs)("div",{className:"flex-1",children:[(0,Dt.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,Dt.jsx)("h3",{children:e.title})}),(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Dt.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Dt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Dt.jsx)(St.Calendar,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{className:s?"text-destructive font-medium":"",children:l()})]}),e.dueTime&&(0,Dt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Dt.jsx)(St.Clock,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{children:ks(e.dueTime)})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Dt.jsx)(St.User,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Dt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>i(!0),className:"h-8 w-8 p-0",children:(0,Dt.jsx)(St.Edit2,{className:"h-4 w-4"})}),(0,Dt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>a(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,Dt.jsx)(St.Trash2,{className:"h-4 w-4"})})]})]})})})]})},ki=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:o,onUpdateReminder:a,onDeleteReminder:r})=>{let[i,s]=(0,fe.useState)(e.filter(Boolean)),[n,m]=(0,fe.useState)(t.filter(Boolean)),[u,l]=(0,fe.useState)("all"),[g,v]=(0,fe.useState)(""),[N,b]=(0,fe.useState)(!1);(0,fe.useEffect)(()=>{s(e.filter(Boolean))},[e]),(0,fe.useEffect)(()=>{m(t.filter(Boolean))},[t]);let k=M=>{if(!M.title){console.error("Invalid reminder data:",M);return}let Q={...M,id:Date.now(),createdAt:new Date().toISOString()};s(ee=>[...ee,Q]),o?.(M)},p=(M,Q)=>{if(!M){console.error("No reminder ID provided for update");return}s(ee=>ee.map(j=>j?.id.toString()===M?{...j,...Q}:j)),a?.(M,Q)},x=M=>{if(!M){console.error("No reminder ID provided for deletion");return}s(Q=>Q.filter(ee=>ee?.id.toString()!==M)),r?.(M)},C=i.filter(M=>{if(!M)return!1;if(g){let Q=g.toLowerCase();if(!(M.title.toLowerCase().includes(Q)||M.description?.toLowerCase().includes(Q)))return!1}switch(u){case"pending":case"completed":case"overdue":return Aa(new Date(M.dueDate||""),M.dueTime||"");case"today":return Ia(new Date(M.dueDate||""));default:return!0}}).sort((M,Q)=>{if(!M||!Q)return 0;let ee={high:3,medium:2,low:1},j=0;return j!==0?j:new Date(M.dueDate||"").getTime()-new Date(Q.dueDate||"").getTime()}),T={total:i.filter(Boolean).length,overdue:i.filter(M=>M&&Aa(new Date(M.dueDate||""),M.dueTime||"")).length,today:i.filter(M=>M&&Ia(new Date(M.dueDate||""))).length},Y=n.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,Dt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Dt.jsx)(yt,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,Dt.jsxs)("div",{className:"h-full bg-background",children:[(0,Dt.jsx)(Rs,{colleagues:n,onAddReminder:k,open:N,setOpen:b}),(0,Dt.jsxs)("div",{className:"p-6",children:[(0,Dt.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Dt.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Dt.jsxs)(S,{className:"flex items-center space-x-2",onClick:()=>b(!0),children:[(0,Dt.jsx)(St.Plus,{className:"h-4 w-4"}),(0,Dt.jsx)("span",{children:"Add Reminder"})]})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Dt.jsxs)(be,{className:"p-4",children:[(0,Dt.jsx)("div",{className:"text-2xl font-bold text-foreground",children:T.total}),(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Dt.jsxs)(be,{className:"p-4",children:[(0,Dt.jsx)("div",{className:"text-2xl font-bold text-primary",children:T.overdue}),(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Dt.jsxs)(be,{className:"p-4",children:[(0,Dt.jsx)("div",{className:"text-2xl font-bold text-success",children:T.today}),(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Dt.jsxs)(be,{className:"p-4",children:[(0,Dt.jsx)("div",{className:"text-2xl font-bold text-destructive",children:T.overdue}),(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Dt.jsxs)(be,{className:"p-4",children:[(0,Dt.jsx)("div",{className:"text-2xl font-bold text-warning",children:T.today}),(0,Dt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Dt.jsx)("div",{className:"flex-1",children:(0,Dt.jsx)(ne,{placeholder:"Search reminders...",value:g,onChange:M=>v(M.target.value),className:"max-w-md"})}),(0,Dt.jsxs)(Xe,{value:u,onValueChange:M=>l(M),children:[(0,Dt.jsx)(Ze,{className:"w-40",children:(0,Dt.jsx)(pt,{})}),(0,Dt.jsxs)(Je,{children:[(0,Dt.jsxs)(xe,{value:"all",children:["All (",T.total,")"]}),(0,Dt.jsxs)(xe,{value:"overdue",children:["Overdue (",T.overdue,")"]}),(0,Dt.jsxs)(xe,{value:"overdue",children:["Overdue (",T.overdue,")"]}),(0,Dt.jsxs)(xe,{value:"today",children:["Today (",T.today,")"]})]})]})]}),(0,Dt.jsx)("div",{className:"space-y-4",children:C.length===0?(0,Dt.jsxs)(be,{className:"p-8 text-center",children:[(0,Dt.jsx)("div",{className:"text-muted-foreground",children:g||u!=="all"?"No reminders match your filters":"No reminders yet"}),!g&&u==="all"&&(0,Dt.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):C.map(M=>M&&(0,Dt.jsx)(Ms,{reminder:M,colleagues:n,onUpdateReminder:p,onDeleteReminder:x},M.id))})]})]})]})};function Ri({activeTab:e,onTabChange:t,tabOptions:o,className:a="",maxWidth:r="700px",gridCols:i=6}){let s=o.find(n=>n.value===e);return(0,Dt.jsxs)(Ra.motion.div,{className:`flex-1 flex justify-center ${a}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Dt.jsx)("div",{className:"hidden lg:block",children:(0,Dt.jsx)(ci,{value:e,onValueChange:t,children:(0,Dt.jsx)(mi,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,o.length)}, minmax(0, 1fr))`},children:o.map(n=>(0,Dt.jsx)(Ra.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Dt.jsx)(pi,{value:n.value,onClick:()=>t?.(n.value),className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:n.label})},n.value))})})}),(0,Dt.jsx)("div",{className:"lg:hidden",children:(0,Dt.jsxs)(lo,{children:[(0,Dt.jsx)(co,{asChild:!0,children:(0,Dt.jsxs)(S,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[s?.label||"Select",(0,Dt.jsx)(St.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Dt.jsx)(Jt,{align:"center",className:"w-[180px]",children:o.map(n=>(0,Dt.jsx)(qt,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function La({initialFiles:e=[],onFileAdd:t,onFileEdit:o,onFileDelete:a,onFileClick:r,onFileUpdate:i,compactView:s=!1,className:n}){let[m,u]=(0,fe.useState)(e),[l,g]=(0,fe.useState)(""),[v,N]=(0,fe.useState)("all"),[b,k]=(0,fe.useState)("all"),[p,x]=(0,fe.useState)(!1),z=(0,fe.useRef)(""),C=I=>I.map(ve=>`${ve.id}-${new Date(ve.createdAt).getTime()}-${new Date(ve.updatedAt).getTime()}`).join("-");(0,fe.useEffect)(()=>{let I=C(e.map(ve=>({...ve,updatedAt:new Date().toISOString()})));I!==z.current&&(u(e),z.current=I)},[e]);let T=m.filter(I=>I.name.toLowerCase().includes(l.toLowerCase())),Y=T.slice(0,10),M=T.filter(Boolean),Q=()=>{x(!0)},ee=I=>{o?.(I)},j=I=>{console.log("deleting file",I),u(ve=>ve.filter(ke=>ke.name!==I.name)),a?.(I.id.toString())},me=I=>{r?.(I)},ye=()=>{g(""),N("all")};return(0,Dt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Dt.jsx)(Ra.AnimatePresence,{mode:"wait",children:(0,Dt.jsx)(Ra.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Dt.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Dt.jsx)(yt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:Q},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Dt.jsx)(be,{children:(0,Dt.jsx)(ao,{className:"pt-6",children:(0,Dt.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Dt.jsx)("div",{className:"flex-1",children:(0,Dt.jsxs)("div",{className:"relative",children:[(0,Dt.jsx)(St.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Dt.jsx)(ne,{placeholder:"Search files...",value:l,onChange:I=>g(I.target.value),className:"pl-9"})]})}),(l||v!=="all")&&(0,Dt.jsxs)(S,{variant:"outline",onClick:ye,className:"gap-2",children:[(0,Dt.jsx)(St.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Dt.jsxs)("div",{className:"space-y-4",children:[(0,Dt.jsx)(Ri,{activeTab:b,onTabChange:k,tabOptions:[{value:"all",label:`All Files (${T.length})`},{value:"recent",label:`Recent (${Y.length})`}],maxWidth:"500px",gridCols:3}),b==="all"&&(0,Dt.jsx)(po,{files:T,onFileClick:me,onFileUpdate:i,onFileDelete:j,showHeader:!s}),b==="recent"&&(0,Dt.jsx)(po,{files:Y,onFileClick:me,onFileUpdate:i,onFileDelete:j,showHeader:!s}),b==="shared"&&(0,Dt.jsx)(po,{files:M,onFileClick:me,onFileUpdate:i,onFileDelete:j,showHeader:!s})]}),T.length===0&&(0,Dt.jsx)(be,{children:(0,Dt.jsx)(ao,{className:"pt-6",children:(0,Dt.jsxs)("div",{className:"text-center py-8",children:[(0,Dt.jsx)(St.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Dt.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,Dt.jsx)("p",{className:"text-muted-foreground mb-4",children:l||v!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Dt.jsxs)(S,{onClick:Q,className:"gap-2",children:[(0,Dt.jsx)(St.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,Dt.jsx)(Xo,{isOpen:p,onClose:()=>x(!1),onAddFile:t})]})}var Ei=require("next/navigation");function Mi({title:e="",initialTasks:t=[],initialEpics:o=[],initialSprints:a=[],initialProjects:r=[],initialReminders:i=[],initialColleagues:s=[],initialUsers:n=[],initialFiles:m=[],initialView:u="kanban",onAddTask:l,onUpdateTask:g,onDeleteTask:v,onTaskClick:N,onAddEpic:b,onUpdateEpic:k,onDeleteEpic:p,onAddTaskToEpic:x,onAddSprint:z,onUpdateSprint:C,onDeleteSprint:T,onAddProject:Y,onUpdateProject:M,onDeleteProject:Q,onFileAdd:ee,onFileEdit:j,onFileDelete:me,onFileClick:ye,onAddReminder:I,onUpdateReminder:ve,onDeleteReminder:ke,onViewChange:E,onToggleMobileMenu:J,onTeamClick:ie,onTeamChange:Ee,onCopilotClick:ce,handleAddComment:te}){let[w,K]=(0,fe.useState)(t),[De,ot]=(0,fe.useState)(o),[de,je]=(0,fe.useState)(a),[go,Nt]=(0,fe.useState)(r),[fo,Ct]=(0,fe.useState)(i),[Vt,Yt]=(0,fe.useState)(s),[Ut,Qt]=(0,fe.useState)(n),[eo,mt]=(0,fe.useState)(m),[f,P]=(0,fe.useState)(!1),[h,R]=(0,fe.useState)(!1),[V,Z]=(0,fe.useState)(null),[Le,Tt]=(0,fe.useState)(null),[ft,vo]=(0,fe.useState)(null),[zt,Oa]=(0,fe.useState)(u||"kanban"),[Is,Ai]=(0,fe.useState)(!1),Ii=(0,Ei.useRouter)();(0,fe.useEffect)(()=>{K(t)},[t]),(0,fe.useEffect)(()=>{je(a)},[a]),(0,fe.useEffect)(()=>{ot(o)},[o]),(0,fe.useEffect)(()=>{Nt(r)},[r]),(0,fe.useEffect)(()=>{mt(m)},[m]),(0,fe.useEffect)(()=>{Qt(n)},[n]),(0,fe.useEffect)(()=>{Yt(s)},[s]),(0,fe.useEffect)(()=>{Ct(i)},[i]),(0,fe.useEffect)(()=>{Oa(u)},[u]);let Fi=w.filter(y=>{}),Fs=y=>Fi.filter(B=>B.status===y),Ls=y=>{let B={};return De.forEach($=>{}),B},Os=y=>{vo(y)},Hs=y=>{ft&&(K(B=>B.map($=>$.id===ft.id?{...$,status:y}:$)),vo(null))},Ha=y=>{let B={...y,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};K($=>[...$,B]),l?.(B)},Io=async(y,B)=>(K($=>$.map(Oe=>Oe.id===Number(y)?{...Oe,...B}:Oe)),await g?.(y,B)),Bs=async(y,B)=>{Io(y,B)},Ba=y=>{K(B=>B.filter($=>$.id!==Number(y))),V?.id===Number(y)&&Z(null),v?.(y)},Vs=async y=>{Ba(y)},Us=y=>{let B={...y,id:Date.now()};Nt($=>[...$,B]),Y?.(y)},zs=(y,B)=>{Nt($=>$.map(Oe=>Oe.id===Number(y)?{...Oe,...B}:Oe)),M?.(y,B)},$s=y=>{Nt(B=>B.filter($=>$.id!==Number(y))),Q?.(y)},Va=y=>{let B={...y,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};ot($=>[...$,B]),b?.({...B})},Li=()=>{R(!0)},Oi=(y,B)=>{ot($=>$.map(Oe=>Oe.id===Number(y)?{...Oe,...B}:Oe)),k?.(y,B)},Hi=y=>{ot(B=>B.filter($=>$.id!==Number(y))),K(B=>B.filter($=>Re($.epic)!==Number(y))),p?.(y)},Bi=y=>{let B={...y,id:Date.now()};je($=>[...$,B]),z?.(y)},Vi=(y,B)=>{je($=>$.map(Oe=>Oe.id===Number(y)?{...Oe,...B}:Oe)),C?.(y,B)},Ui=y=>{y==="backlog"||y==="all-tasks"||(je(B=>B.filter($=>$.id!==Number(y))),K(B=>B.map($=>Re($.sprint)===Number(y)?{...$,sprint:void 0}:$)),T?.(y))},ta=y=>{Z(y)},zi=y=>{y==="planning"&&window.innerWidth<768||(Oa(y),E?.(y))},_s=()=>{Ai(y=>!y),J?.()},Gs=()=>{Ii.push("/")},js=y=>{console.log("Switching to team:",y)},Ws=y=>{console.log("Switching to team:",y)},$i=y=>{P(!0)},_i=()=>{P(!1),Tt(null)},Gi=y=>{let B={...y,id:Date.now(),createdAt:new Date().toISOString()};Ct($=>[...$,B]),I?.(y)},ji=(y,B)=>{Ct($=>$.map(Oe=>Oe.id===Number(y)?{...Oe,...B}:Oe)),ve?.(y,B)},Wi=y=>{Ct(B=>B.filter($=>$.id!==Number(y))),ke?.(y)},Ki=()=>{ee?.()},Zi=y=>{j?.(y)},Ji=y=>{mt(B=>B.filter($=>$.name!==y)),me?.(y)},qi=y=>{ye?.(y)},Ks=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Zs=()=>{switch(zt){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},oa=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],Js=oa.sort((y,B)=>B.lastUsed.getTime()-y.lastUsed.getTime()).slice(0,3),qs=oa.length>3,Xs=oa.slice(3);return(0,Dt.jsxs)(za,{currentView:zt,onViewChange:zi,children:[zt==="kanban"&&(0,Dt.jsx)("div",{className:"h-full overflow-hidden",children:(0,Dt.jsx)(Ni,{initialProjects:go,initialEpics:De,initialSprints:de.map(y=>({...y,isSelected:!1})),initialTasks:w,initialColleagues:Vt,initialUsers:Ut,onAddTask:Ha,onUpdateTask:Io,onDeleteTask:Ba,onTaskClick:ta,onAddEpic:Va,onAddComment:te})}),zt==="planning"&&(0,Dt.jsx)("div",{className:"hidden md:block h-full",children:(0,Dt.jsx)(Si,{tasks:w,epics:De,sprints:de,onUpdateTask:Io,onTaskClick:ta,onAddSprint:Bi,onUpdateSprint:Vi,onDeleteSprint:Ui})}),zt==="tasks"&&(0,Dt.jsx)("div",{className:"h-full",children:(0,Dt.jsx)(ki,{initialReminders:fo,initialColleagues:Vt,onAddReminder:Gi,onUpdateReminder:ji,onDeleteReminder:Wi})}),zt==="files"&&(0,Dt.jsx)("div",{className:"h-full",children:(0,Dt.jsx)(La,{initialFiles:eo,onFileAdd:Ki,onFileEdit:Zi,onFileDelete:Ji,onFileClick:qi,compactView:!1})}),zt==="epics"&&(0,Dt.jsx)("div",{className:"h-full",children:(0,Dt.jsx)(Ci,{tasks:w,epics:De,sprints:de,onUpdateTask:Io,onTaskClick:ta,onAddTaskToEpic:$i,onAddEpic:Li,onUpdateEpic:Oi,onDeleteEpic:Hi})}),(0,Dt.jsx)(io,{isOpen:f,onClose:_i,onAddTask:Ha,epics:De,sprints:de,assignees:[...Vt,...Ut],defaultEpicId:Le||void 0}),(0,Dt.jsx)(uo,{isOpen:h,onClose:()=>R(!1),onAddEpic:Va})]})}
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-RIFUOB7A.mjs";import"../../chunk-QOZ2O3FG.mjs";import"../../chunk-2R3MJSQ7.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-6PS55VJZ.mjs";import"../../chunk-OP6ZWZIM.mjs";import"../../chunk-R3SDBXF2.mjs";import"../../chunk-KZCIHFTM.mjs";import"../../chunk-IO5ZSALG.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-HTS3KCJL.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-AN744MXS.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-EOR2BAI2.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-PXLSH6S2.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
2
+ "use strict";import{a}from"../../chunk-EFNFK7TR.mjs";import"../../chunk-QOZ2O3FG.mjs";import"../../chunk-6PS55VJZ.mjs";import"../../chunk-JVTCOOUV.mjs";import"../../chunk-CKU2T3AN.mjs";import"../../chunk-IO5ZSALG.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-HTS3KCJL.mjs";import"../../chunk-KZCIHFTM.mjs";import"../../chunk-2R3MJSQ7.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-AN744MXS.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-EOR2BAI2.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-GLZEHRPY.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-TKCFCYEQ.mjs";import"../../chunk-CDVRH3MC.mjs";import"../../chunk-KPTGYVDM.mjs";import"../../chunk-5RTGHMF3.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
2
+ "use strict";import{a}from"../../chunk-HSQAHQNP.mjs";import"../../chunk-KPTGYVDM.mjs";import"../../chunk-5RTGHMF3.mjs";import"../../chunk-CDVRH3MC.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
@@ -1 +1 @@
1
- import{a}from"../../chunk-IO5ZSALG.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-HTS3KCJL.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-AN744MXS.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-PXLSH6S2.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as TaskDetailsModal};
1
+ import{a}from"../../chunk-IO5ZSALG.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-HTS3KCJL.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-AN744MXS.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as TaskDetailsModal};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-HTS3KCJL.mjs";import"../../chunk-AN744MXS.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-PXLSH6S2.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as FileList};
2
+ "use strict";import{a}from"../../chunk-HTS3KCJL.mjs";import"../../chunk-AN744MXS.mjs";import"../../chunk-VTFO5GXK.mjs";import"../../chunk-GULRIPMU.mjs";import"../../chunk-RKS7CWAP.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-BZEGLKRZ.mjs";import"../../chunk-K7N3FRGH.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-QTW33JYG.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as FileList};