cortex-react-components 2.13.1 → 2.13.3

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 (237) hide show
  1. package/dist/{chunk-RGOKBIQ5.mjs → chunk-255P6K5W.mjs} +1 -1
  2. package/dist/{chunk-HNWWGPHA.mjs → chunk-2HWSTGAP.mjs} +1 -1
  3. package/dist/chunk-2IMVYO7X.mjs +1 -0
  4. package/dist/{chunk-GTZJWMZR.mjs → chunk-2RQDJ5XT.mjs} +1 -1
  5. package/dist/chunk-2UNIT7NC.mjs +4 -0
  6. package/dist/{chunk-CR326IJ6.mjs → chunk-4L77KQ2E.mjs} +1 -1
  7. package/dist/chunk-5N4WW7O2.mjs +1 -0
  8. package/dist/{chunk-AGWQ5S2Z.mjs → chunk-5NIEZE7A.mjs} +1 -1
  9. package/dist/{chunk-75F3LJMX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
  10. package/dist/{chunk-EM3T2XYC.mjs → chunk-5WVFEIMC.mjs} +1 -1
  11. package/dist/{chunk-ZEALRBXW.mjs → chunk-62A35O55.mjs} +1 -1
  12. package/dist/{chunk-RJGYVDOU.mjs → chunk-67QPOSVV.mjs} +1 -1
  13. package/dist/chunk-6BQNN2KT.mjs +1 -0
  14. package/dist/chunk-6NED7ZVK.mjs +1 -0
  15. package/dist/{chunk-CXOVEABI.mjs → chunk-7GMAMIHM.mjs} +1 -1
  16. package/dist/{chunk-CNCT3JZV.mjs → chunk-AQQCH7Z2.mjs} +1 -1
  17. package/dist/chunk-CDVRH3MC.mjs +4 -0
  18. package/dist/chunk-CJ6APTVT.mjs +4 -0
  19. package/dist/{chunk-ITJH72Z2.mjs → chunk-CLGBBNRB.mjs} +1 -1
  20. package/dist/{chunk-2EQ5OMZF.mjs → chunk-DMCFEJ2C.mjs} +1 -1
  21. package/dist/chunk-DTIHVFME.mjs +4 -0
  22. package/dist/{chunk-3AWUWWR4.mjs → chunk-E6UOMRHI.mjs} +1 -1
  23. package/dist/chunk-E6Y5COQK.mjs +1 -0
  24. package/dist/{chunk-WIRQ5IRT.mjs → chunk-ERJXTG6X.mjs} +1 -1
  25. package/dist/{chunk-3NRXQBBS.mjs → chunk-FKU4VQR6.mjs} +1 -1
  26. package/dist/{chunk-GHOL5L32.mjs → chunk-H3CJOE6S.mjs} +1 -1
  27. package/dist/{chunk-NINFDOV5.mjs → chunk-HKGW6JI2.mjs} +1 -1
  28. package/dist/{chunk-KWYJ3XZI.mjs → chunk-I2GNNRFH.mjs} +1 -1
  29. package/dist/{chunk-FE7ZGUPU.mjs → chunk-IF3425JX.mjs} +1 -1
  30. package/dist/{chunk-24XUZCYT.mjs → chunk-IK3AM53W.mjs} +1 -1
  31. package/dist/chunk-KG7HG2VO.mjs +1 -0
  32. package/dist/{chunk-ERHNVIOZ.mjs → chunk-LHO4WFYP.mjs} +1 -1
  33. package/dist/{chunk-AJQHGVZ5.mjs → chunk-LJQPLE4S.mjs} +1 -1
  34. package/dist/{chunk-ZKSZJI4F.mjs → chunk-LVXEY6OU.mjs} +1 -1
  35. package/dist/{chunk-3HNU2NYP.mjs → chunk-M7NV6EFH.mjs} +1 -1
  36. package/dist/{chunk-7R47MHQE.mjs → chunk-MXCW6SOT.mjs} +1 -1
  37. package/dist/{chunk-2BRDNDUB.mjs → chunk-N3B3XNV3.mjs} +1 -1
  38. package/dist/chunk-NGX2VCHS.mjs +1 -0
  39. package/dist/{chunk-3Y7QG6VP.mjs → chunk-NWISIJFD.mjs} +1 -1
  40. package/dist/{chunk-23XORW7A.mjs → chunk-P7S6XFU4.mjs} +1 -1
  41. package/dist/{chunk-5MWZTJYP.mjs → chunk-PK3OBSCB.mjs} +1 -1
  42. package/dist/{chunk-Q67RF7VO.mjs → chunk-QG4QCB5I.mjs} +1 -1
  43. package/dist/{chunk-A7SGFSI5.mjs → chunk-QSXEJ2NO.mjs} +1 -1
  44. package/dist/{chunk-POIHYOIP.mjs → chunk-RMWGIZJX.mjs} +1 -1
  45. package/dist/{chunk-KCEJXXM2.mjs → chunk-RVHCTANZ.mjs} +1 -1
  46. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  47. package/dist/chunk-TKCFCYEQ.mjs +4 -0
  48. package/dist/{chunk-6MSM3CZ6.mjs → chunk-TL2RQFU5.mjs} +1 -1
  49. package/dist/{chunk-7FWAJQRH.mjs → chunk-TO7SVJIU.mjs} +1 -1
  50. package/dist/chunk-TOI73VEE.mjs +1 -0
  51. package/dist/{chunk-ZGQC6O62.mjs → chunk-UEBQJNVT.mjs} +1 -1
  52. package/dist/chunk-UVHMI3PU.mjs +1 -0
  53. package/dist/chunk-WSQHAE6Q.mjs +1 -0
  54. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  55. package/dist/{chunk-PWFVXG44.mjs → chunk-XKGBG5FX.mjs} +1 -1
  56. package/dist/chunk-XNEPSYCO.mjs +1 -0
  57. package/dist/{chunk-C4RWEPVF.mjs → chunk-YKG4FNS4.mjs} +1 -1
  58. package/dist/{chunk-UXOUJ5YO.mjs → chunk-ZB7RDJRP.mjs} +1 -1
  59. package/dist/{chunk-PXLSH6S2.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  60. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  61. package/dist/components/AdvancedComponents/index.mjs +1 -1
  62. package/dist/components/Blocks/Banner.mjs +1 -1
  63. package/dist/components/Blocks/CallToAction.mjs +1 -1
  64. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  65. package/dist/components/Blocks/Content.mjs +1 -1
  66. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  67. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  68. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  69. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  70. package/dist/components/Blocks/index.mjs +1 -1
  71. package/dist/components/CRM/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.mjs +1 -1
  76. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  77. package/dist/components/Chat/demo-tests.mjs +1 -1
  78. package/dist/components/Chat/demo.mjs +1 -1
  79. package/dist/components/Chat/example-usage.mjs +1 -1
  80. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  81. package/dist/components/Chat/index.mjs +1 -1
  82. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  83. package/dist/components/DeliveryLead/index.mjs +1 -1
  84. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  85. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  86. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  87. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  88. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  89. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  90. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  91. package/dist/components/DigitalColleagues/index.js +1 -1
  92. package/dist/components/DigitalColleagues/index.mjs +1 -1
  93. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  94. package/dist/components/Foundary/{DigitalColleageusLayout.mjs → FoundaryLayout.mjs} +1 -1
  95. package/dist/components/Foundary/MainPage.mjs +1 -1
  96. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  97. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  98. package/dist/components/Foundary/Views/TeamsIndexView.d.ts +3 -3
  99. package/dist/components/Foundary/Views/TeamsIndexView.js +2 -2
  100. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  101. package/dist/components/Foundary/Views/index.js +1 -1
  102. package/dist/components/Foundary/Views/index.mjs +1 -1
  103. package/dist/components/Foundary/{digital-colleague-clone.mjs → foundary-clone.mjs} +1 -1
  104. package/dist/components/Foundary/{digital-colleague-options.mjs → foundary-options.mjs} +1 -1
  105. package/dist/components/Foundary/index.d.ts +3 -3
  106. package/dist/components/Foundary/index.js +1 -1
  107. package/dist/components/Foundary/index.mjs +1 -1
  108. package/dist/components/Foundary/team-form.d.ts +1 -1
  109. package/dist/components/Foundary/team-form.js +2 -2
  110. package/dist/components/Foundary/team-form.mjs +1 -1
  111. package/dist/components/Foundary/types.d.ts +9 -0
  112. package/dist/components/HeaderFooter/Header.mjs +1 -1
  113. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  114. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  115. package/dist/components/HeaderFooter/index.mjs +1 -1
  116. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  117. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  118. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  119. package/dist/components/Heros/PostHero/index.mjs +1 -1
  120. package/dist/components/Heros/RenderHero.mjs +1 -1
  121. package/dist/components/Heros/index.mjs +1 -1
  122. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  123. package/dist/components/Holidays/index.mjs +1 -1
  124. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  125. package/dist/components/Layouts/Print.mjs +1 -1
  126. package/dist/components/Layouts/SlideShow.mjs +1 -1
  127. package/dist/components/Layouts/index.mjs +1 -1
  128. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  129. package/dist/components/Menus/SidebarRight.mjs +1 -1
  130. package/dist/components/Menus/index.mjs +1 -1
  131. package/dist/components/Payload/RichText/index.mjs +1 -1
  132. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  133. package/dist/components/Payload/index.mjs +1 -1
  134. package/dist/components/Projects/AddEpicModal.d.ts +1 -1
  135. package/dist/components/Projects/AddEpicModal.js +1 -1
  136. package/dist/components/Projects/AddEpicModal.mjs +1 -1
  137. package/dist/components/Projects/AddSprintModal.d.ts +1 -1
  138. package/dist/components/Projects/AddSprintModal.js +1 -1
  139. package/dist/components/Projects/AddSprintModal.mjs +1 -1
  140. package/dist/components/Projects/AddTaskModal.d.ts +2 -2
  141. package/dist/components/Projects/AddTaskModal.js +1 -1
  142. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  143. package/dist/components/Projects/EpicsView.d.ts +1 -1
  144. package/dist/components/Projects/EpicsView.js +1 -1
  145. package/dist/components/Projects/EpicsView.mjs +1 -1
  146. package/dist/components/Projects/KanbanBoardView.d.ts +6 -4
  147. package/dist/components/Projects/KanbanBoardView.js +1 -1
  148. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  149. package/dist/components/Projects/PlanningView.d.ts +1 -1
  150. package/dist/components/Projects/PlanningView.js +1 -1
  151. package/dist/components/Projects/PlanningView.mjs +1 -1
  152. package/dist/components/Projects/ProjectPage.d.ts +1 -1
  153. package/dist/components/Projects/ProjectPage.js +1 -1
  154. package/dist/components/Projects/ProjectPage.mjs +1 -1
  155. package/dist/components/Projects/ProjectView.d.ts +1 -42
  156. package/dist/components/Projects/ProjectView.js +1 -1
  157. package/dist/components/Projects/ProjectView.mjs +1 -1
  158. package/dist/components/Projects/ProjectsIndexView.d.ts +3 -3
  159. package/dist/components/Projects/ProjectsIndexView.js +2 -2
  160. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  161. package/dist/components/Projects/TaskCard.d.ts +2 -2
  162. package/dist/components/Projects/TaskCard.js +1 -1
  163. package/dist/components/Projects/TaskCard.mjs +1 -1
  164. package/dist/components/Projects/TaskDetailsModal.d.ts +1 -1
  165. package/dist/components/Projects/TaskDetailsModal.js +1 -1
  166. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  167. package/dist/components/Projects/TaskSidebar.d.ts +1 -1
  168. package/dist/components/Projects/TaskSidebar.js +1 -1
  169. package/dist/components/Projects/TaskSidebar.mjs +1 -1
  170. package/dist/components/Projects/TasksView.d.ts +1 -1
  171. package/dist/components/Projects/TasksView.js +1 -1
  172. package/dist/components/Projects/TasksView.mjs +1 -1
  173. package/dist/components/Projects/index.js +1 -1
  174. package/dist/components/Projects/index.mjs +1 -1
  175. package/dist/components/Projects/project-form.d.ts +3 -3
  176. package/dist/components/Projects/project-form.js +1 -1
  177. package/dist/components/Projects/project-form.mjs +1 -1
  178. package/dist/components/dc-temp/creative.mjs +1 -1
  179. package/dist/components/dc-temp/index.mjs +1 -1
  180. package/dist/components/index.js +13 -13
  181. package/dist/components/index.mjs +1 -1
  182. package/dist/components/ui/index.mjs +1 -1
  183. package/dist/components/ui/sidebar.mjs +1 -1
  184. package/dist/index.js +17 -17
  185. package/dist/index.mjs +1 -1
  186. package/dist/metafile-cjs.json +1 -1
  187. package/dist/metafile-esm.json +1 -1
  188. package/dist/pages/Blog.mjs +1 -1
  189. package/dist/pages/Documentation.mjs +1 -1
  190. package/dist/pages/IndexPage.mjs +1 -1
  191. package/dist/pages/Intranet.mjs +1 -1
  192. package/dist/pages/LandingPage.mjs +1 -1
  193. package/dist/pages/Page.mjs +1 -1
  194. package/dist/pages/Publish.mjs +1 -1
  195. package/dist/pages/Website.mjs +1 -1
  196. package/dist/sections/AboutSection.mjs +1 -1
  197. package/dist/sections/BlogDetail.mjs +1 -1
  198. package/dist/sections/BlogList.mjs +1 -1
  199. package/dist/sections/BlogListSection.mjs +1 -1
  200. package/dist/sections/ContactSection.mjs +1 -1
  201. package/dist/sections/PageSections.mjs +1 -1
  202. package/dist/sections/PricingSection.mjs +1 -1
  203. package/dist/sections/ServiceDetail.mjs +1 -1
  204. package/dist/sections/ServiceDetailSection.mjs +1 -1
  205. package/dist/sections/ServiceSection.mjs +1 -1
  206. package/dist/sections/form/index.mjs +1 -1
  207. package/dist/sections/index.mjs +1 -1
  208. package/dist/utils/extract-id.d.ts +1 -0
  209. package/dist/utils/extract-id.js +1 -0
  210. package/dist/utils/extract-id.mjs +1 -0
  211. package/package.json +1 -1
  212. package/dist/chunk-2C4UDLVF.mjs +0 -1
  213. package/dist/chunk-2XMVNXF6.mjs +0 -4
  214. package/dist/chunk-4A3MGS6I.mjs +0 -1
  215. package/dist/chunk-4HHGVL3E.mjs +0 -1
  216. package/dist/chunk-6DEY5ZDD.mjs +0 -1
  217. package/dist/chunk-6TUNKKV7.mjs +0 -1
  218. package/dist/chunk-CXCDV7VP.mjs +0 -4
  219. package/dist/chunk-GGJZVAC4.mjs +0 -4
  220. package/dist/chunk-KW6L6KBY.mjs +0 -1
  221. package/dist/chunk-LD44TGKT.mjs +0 -4
  222. package/dist/chunk-MBPTBEOX.mjs +0 -1
  223. package/dist/chunk-NKDFAFWH.mjs +0 -1
  224. package/dist/chunk-O57JJTH5.mjs +0 -1
  225. package/dist/chunk-ORNGKQM7.mjs +0 -1
  226. package/dist/chunk-UAEEBFHJ.mjs +0 -4
  227. /package/dist/{chunk-6LEH6XKI.mjs → chunk-M2REXGQW.mjs} +0 -0
  228. /package/dist/{chunk-SGK4ZXKR.mjs → chunk-NDZ26EG6.mjs} +0 -0
  229. /package/dist/components/Foundary/{DigitalColleageusLayout.css → FoundaryLayout.css} +0 -0
  230. /package/dist/components/Foundary/{DigitalColleageusLayout.d.ts → FoundaryLayout.d.ts} +0 -0
  231. /package/dist/components/Foundary/{DigitalColleageusLayout.js → FoundaryLayout.js} +0 -0
  232. /package/dist/components/Foundary/{digital-colleague-clone.css → foundary-clone.css} +0 -0
  233. /package/dist/components/Foundary/{digital-colleague-clone.d.ts → foundary-clone.d.ts} +0 -0
  234. /package/dist/components/Foundary/{digital-colleague-clone.js → foundary-clone.js} +0 -0
  235. /package/dist/components/Foundary/{digital-colleague-options.css → foundary-options.css} +0 -0
  236. /package/dist/components/Foundary/{digital-colleague-options.d.ts → foundary-options.d.ts} +0 -0
  237. /package/dist/components/Foundary/{digital-colleague-options.js → foundary-options.js} +0 -0
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  "use client"
4
4
 
5
- "use strict";"use client";var vr=Object.create;var qt=Object.defineProperty;var br=Object.getOwnPropertyDescriptor;var hr=Object.getOwnPropertyNames;var xr=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty;var wr=(e,t)=>{for(var a in t)qt(e,a,{get:t[a],enumerable:!0})},Ua=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of hr(t))!yr.call(e,s)&&s!==a&&qt(e,s,{get:()=>t[s],enumerable:!(o=br(t,s))||o.enumerable});return e};var me=(e,t,a)=>(a=e!=null?vr(xr(e)):{},Ua(t||!e||!e.__esModule?qt(a,"default",{value:e,enumerable:!0}):a,e)),Nr=e=>Ua(qt({},"__esModule",{value:!0}),e);var Ii={};wr(Ii,{default:()=>Xo});module.exports=Nr(Ii);var ie=require("react");var it=require("lucide-react"),rt=require("react/jsx-runtime"),Cr=[{key:"kanban",icon:it.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:it.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:it.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:it.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:it.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],$a=({currentView:e,onViewChange:t,children:a})=>(0,rt.jsxs)("div",{className:"flex w-full h-screen",children:[(0,rt.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Cr.map(o=>{let s=o.icon,i=e===o.key;return(0,rt.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,rt.jsx)(s,{className:"h-4 w-4 flex-shrink-0"}),(0,rt.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,rt.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,rt.jsx)("div",{className:"w-full h-full",children:a})})]});var Ya=require("class-variance-authority");var Za=require("clsx");var fa="-",kr=e=>{let t=Sr(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let l=c.split(fa);return l[0]===""&&l.length!==1&&l.shift(),Wa(l,t)||Dr(c)},getConflictingClassGroupIds:(c,l)=>{let g=a[c]||[];return l&&o[c]?[...g,...o[c]]:g}}},Wa=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?Wa(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(fa);return t.validators.find(({validator:c})=>c(i))?.classGroupId},Ga=/^\[(.+)\]$/,Dr=e=>{if(Ga.test(e)){let t=Ga.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Sr=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Pr(Object.entries(e.classGroups),a).forEach(([i,c])=>{ga(c,o,i,t)}),o},ga=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:ja(t,s);i.classGroupId=a;return}if(typeof s=="function"){if(Tr(s)){ga(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([i,c])=>{ga(c,ja(t,i),a,o)})})},ja=(e,t)=>{let a=e;return t.split(fa).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Tr=e=>e.isThemeGetter,Pr=(e,t)=>t?e.map(([a,o])=>{let s=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([c,l])=>[t+c,l])):i);return[a,s]}):e,Rr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(i,c)=>{a.set(i,c),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let c=a.get(i);if(c!==void 0)return c;if((c=o.get(i))!==void 0)return s(i,c),c},set(i,c){a.has(i)?a.set(i,c):s(i,c)}}},_a="!",Er=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],i=t.length,c=l=>{let g=[],p=0,d=0,f;for(let x=0;x<l.length;x++){let H=l[x];if(p===0){if(H===s&&(o||l.slice(x,x+i)===t)){g.push(l.slice(d,x)),d=x+i;continue}if(H==="/"){f=x;continue}}H==="["?p++:H==="]"&&p--}let E=g.length===0?l:l.substring(d),u=E.startsWith(_a),y=u?E.substring(1):E,B=f&&f>d?f-d:void 0;return{modifiers:g,hasImportantModifier:u,baseClassName:y,maybePostfixModifierPosition:B}};return a?l=>a({className:l,parseClassName:c}):c},Ir=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},Ar=e=>({cache:Rr(e.cacheSize),parseClassName:Er(e),...kr(e)}),Mr=/\s+/,Lr=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],c=e.trim().split(Mr),l="";for(let g=c.length-1;g>=0;g-=1){let p=c[g],{modifiers:d,hasImportantModifier:f,baseClassName:E,maybePostfixModifierPosition:u}=a(p),y=!!u,B=o(y?E.substring(0,u):E);if(!B){if(!y){l=p+(l.length>0?" "+l:l);continue}if(B=o(E),!B){l=p+(l.length>0?" "+l:l);continue}y=!1}let x=Ir(d).join(":"),H=f?x+_a:x,X=H+B;if(i.includes(X))continue;i.push(X);let _=s(B,y);for(let Z=0;Z<_.length;++Z){let b=_[Z];i.push(H+b)}l=p+(l.length>0?" "+l:l)}return l};function Fr(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ka(t))&&(o&&(o+=" "),o+=a);return o}var Ka=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ka(e[o]))&&(a&&(a+=" "),a+=t);return a};function Br(e,...t){let a,o,s,i=c;function c(g){let p=t.reduce((d,f)=>f(d),e());return a=Ar(p),o=a.cache.get,s=a.cache.set,i=l,l(g)}function l(g){let p=o(g);if(p)return p;let d=Lr(g,a);return s(g,d),d}return function(){return i(Fr.apply(null,arguments))}}var se=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},qa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Or=/^\d+\/\d+$/,zr=new Set(["px","full","screen"]),Vr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hr=/\d+(%|px|rt?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|rt?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ur=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$rt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,st=e=>It(e)||zr.has(e)||Or.test(e),gt=e=>At(e,"length",Zr),It=e=>!!e&&!Number.isNaN(Number(e)),ua=e=>At(e,"number",It),Ut=e=>!!e&&Number.isInteger(Number(e)),jr=e=>e.endsWith("%")&&It(e.slice(0,-1)),F=e=>qa.test(e),ft=e=>Vr.test(e),Wr=new Set(["length","size","percentage"]),_r=e=>At(e,Wr,Ja),Kr=e=>At(e,"position",Ja),qr=new Set(["image","url"]),Jr=e=>At(e,qr,Qr),Xr=e=>At(e,"",Yr),$t=()=>!0,At=(e,t,a)=>{let o=qa.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Zr=e=>Hr.test(e)&&!Ur.test(e),Ja=()=>!1,Yr=e=>$rt.test(e),Qr=e=>Gr.test(e);var ei=()=>{let e=se("colors"),t=se("spacing"),a=se("blur"),o=se("brightness"),s=se("borderColor"),i=se("borderRadius"),c=se("borderSpacing"),l=se("borderWidth"),g=se("contrast"),p=se("grayscale"),d=se("hueRotate"),f=se("invert"),E=se("gap"),u=se("gradientColorStops"),y=se("gradientColorStopPositions"),B=se("inset"),x=se("margin"),H=se("opacity"),X=se("padding"),_=se("saturate"),Z=se("scale"),b=se("sepia"),z=se("skew"),ee=se("space"),L=se("translate"),ue=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],Re=()=>["auto",F,t],M=()=>[F,t],D=()=>["",st,gt],Y=()=>["auto",It,F],ze=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ge=()=>["solid","dashed","dotted","double","none"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],He=()=>["start","end","center","between","around","evenly","stretch"],Ve=()=>["","0",F],at=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ye=()=>[It,F];return{cacheSize:500,separator:":",theme:{colors:[$t],spacing:[st,gt],blur:["none","",ft,F],brightness:ye(),borderColor:[e],borderRadius:["none","","full",ft,F],borderSpacing:M(),borderWidth:D(),contrast:ye(),grayscale:Ve(),hueRotate:ye(),invert:Ve(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[jr,gt],inset:Re(),margin:Re(),opacity:ye(),padding:M(),saturate:ye(),scale:ye(),sepia:Ve(),skew:ye(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",F]}],container:["container"],columns:[{columns:[ft]}],"break-after":[{"break-after":at()}],"break-before":[{"break-before":at()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ze(),F]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:ue()}],"overscroll-x":[{"overscroll-x":ue()}],"overscroll-y":[{"overscroll-y":ue()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[B]}],"inset-x":[{"inset-x":[B]}],"inset-y":[{"inset-y":[B]}],start:[{start:[B]}],end:[{end:[B]}],top:[{top:[B]}],right:[{right:[B]}],bottom:[{bottom:[B]}],left:[{left:[B]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ut,F]}],basis:[{basis:Re()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",F]}],grow:[{grow:Ve()}],shrink:[{shrink:Ve()}],order:[{order:["first","last","none",Ut,F]}],"grid-cols":[{"grid-cols":[$t]}],"col-start-end":[{col:["auto",{span:["full",Ut,F]},F]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[$t]}],"row-start-end":[{row:["auto",{span:[Ut,F]},F]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",F]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",F]}],gap:[{gap:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...He()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...He(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...He(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[X]}],px:[{px:[X]}],py:[{py:[X]}],ps:[{ps:[X]}],rt:[{rt:[X]}],pt:[{pt:[X]}],pr:[{pr:[X]}],pb:[{pb:[X]}],pl:[{pl:[X]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[ee]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ee]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",F,t]}],"min-w":[{"min-w":[F,t,"min","max","fit"]}],"max-w":[{"max-w":[F,t,"none","full","min","max","fit","prose",{screen:[ft]},ft]}],h:[{h:[F,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[F,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ft,gt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ua]}],"font-family":[{font:[$t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",F]}],"line-clamp":[{"line-clamp":["none",It,ua]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",st,F]}],"list-image":[{"list-image":["none",F]}],"list-style-type":[{list:["none","disc","decimal",F]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[H]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[H]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",st,gt]}],"underline-offset":[{"underline-offset":["auto",st,F]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[H]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ze(),Kr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_r]}],"bg-image":[{bg:["none",{"gradient-it":["t","tr","rt","br","b","bl","l","tl"]},Jr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-it-pos":[{it:[y]}],"gradient-from":[{from:[u]}],"gradient-via":[{via:[u]}],"gradient-it":[{it:[u]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-rt":[{"rounded-rt":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-rt":[{"border-rt":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[H]}],"border-style":[{border:[...ge(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[H]}],"divide-style":[{divide:ge()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-rt":[{"border-rt":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...ge()]}],"outline-offset":[{"outline-offset":[st,F]}],"outline-w":[{outline:[st,gt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[H]}],"ring-offset-w":[{"ring-offset":[st,gt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ft,Xr]}],"shadow-color":[{shadow:[$t]}],opacity:[{opacity:[H]}],"mix-blend":[{"mix-blend":[...te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":te()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",ft,F]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[_]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[H]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",F]}],duration:[{duration:ye()}],ease:[{ease:["linear","in","out","in-out",F]}],delay:[{delay:ye()}],animate:[{animate:["none","spin","ping","pulse","bounce",F]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Z]}],"scale-x":[{"scale-x":[Z]}],"scale-y":[{"scale-y":[Z]}],rotate:[{rotate:[Ut,F]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[z]}],"skew-y":[{"skew-y":[z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",F]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","rt-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-rt":[{"scroll-rt":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",F]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[st,gt,ua]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","rt","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-rt","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-rt":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-rt","border-w-b","border-w-l"],"border-w-x":["border-w-rt","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-rt","border-color-b","border-color-l"],"border-color-x":["border-color-rt","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-rt","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Xa=Br(ei);function h(...e){return Xa((0,Za.clsx)(e))}var ti=(0,Ya.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function re({className:e,variant:t,...a}){return(0,rt.jsx)("div",{className:h(ti({variant:t}),e),...a})}var wt=me(require("react"));var ne=wt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)("div",{ref:a,className:h("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ne.displayName="Card";var ai=wt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)("div",{ref:a,className:h("flex flex-col space-y-1.5 p-6",e),...t}));ai.displayName="CardHeader";var oi=wt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)("div",{ref:a,className:h("font-semibold leading-none tracking-tight",e),...t}));oi.displayName="CardTitle";var ri=wt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)("div",{ref:a,className:h("text-sm text-muted-foreground",e),...t}));ri.displayName="CardDescription";var Mt=wt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)("div",{ref:a,className:h("p-6 pt-0",e),...t}));Mt.displayName="CardContent";var ii=wt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)("div",{ref:a,className:h("flex items-center p-6 pt-0",e),...t}));ii.displayName="CardFooter";var eo=({title:e,status:t,taskCount:a,children:o,onDrop:s,isCompact:i=!1,height:c})=>{let l=d=>{d.preventDefault()},g=d=>{d.preventDefault(),s(t)};return(0,rt.jsxs)(ne,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${i?"lg:max-w-xs":""}`,style:{height:c||"calc(100vh - 350px)"},onDragOver:l,onDrop:g,children:[(0,rt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,rt.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,rt.jsx)(re,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,rt.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var Jt=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:s=!1})=>{let i=d=>{a(e)},c=()=>{o(e)},l=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},g=()=>{switch(e.type){case"story":return(0,rt.jsx)(it.BookOpen,{className:"h-3 w-3"});case"bug":return(0,rt.jsx)(it.Bug,{className:"h-3 w-3"});case"spike":return(0,rt.jsx)(it.Zap,{className:"h-3 w-3"});case"task":default:return(0,rt.jsx)(it.AlertCircle,{className:"h-3 w-3"})}},p=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return s?(0,rt.jsx)(ne,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:i,onClick:c,children:(0,rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rt.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:g()}),(0,rt.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,rt.jsxs)(ne,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:i,onClick:c,children:[(0,rt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,rt.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[g(),(0,rt.jsx)("span",{className:"capitalize",children:e.type})]}),(0,rt.jsxs)("div",{className:"flex gap-1",children:[(0,rt.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:e.priority}),(0,rt.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.points})]})]}),(0,rt.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,rt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,rt.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,rt.jsxs)("div",{className:"flex items-center gap-1",children:[(0,rt.jsx)(it.User,{className:"h-4 w-4"}),(0,rt.jsx)("span",{children:e.assignee?.value?.name})]})})]})};var Gt=me(require("react")),Ce=me(require("@radix-ui/react-dialog"));var Xe=Ce.Root;var si=Ce.Portal;var ao=Gt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(Ce.Overlay,{ref:a,className:h("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ao.displayName=Ce.Overlay.displayName;var Ge=Gt.forwardRef(({className:e,children:t,...a},o)=>(0,rt.jsxs)(si,{children:[(0,rt.jsx)(ao,{}),(0,rt.jsxs)(Ce.Content,{ref:o,className:h("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-it-left-1/2 data-[state=closed]:slide-out-it-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,rt.jsxs)(Ce.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,rt.jsx)(it.X,{className:"h-4 w-4"}),(0,rt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ge.displayName=Ce.Content.displayName;var je=({className:e,...t})=>(0,rt.jsx)("div",{className:h("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});je.displayName="DialogHeader";var jt=({className:e,...t})=>(0,rt.jsx)("div",{className:h("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});jt.displayName="DialogFooter";var We=Gt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(Ce.Title,{ref:a,className:h("text-lg font-semibold leading-none tracking-tight",e),...t}));We.displayName=Ce.Title.displayName;var ni=Gt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(Ce.Description,{ref:a,className:h("text-sm text-muted-foreground",e),...t}));ni.displayName=Ce.Description.displayName;var oo=require("@radix-ui/react-slot"),io=me(require("react")),Xt=(0,Ya.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),S=io.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},i)=>(0,rt.jsx)(e?oo.Slot:"button",{className:h(Xt({className:t,size:a,variant:o})),ref:i,...s}));S.displayName="Button";var no=me(require("react"));var K=no.forwardRef(({className:e,type:t,...a},o)=>(0,rt.jsx)("input",{type:t,className:h("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));K.displayName="Input";var co=me(require("react")),Ee=co.forwardRef(({className:e,...t},a)=>(0,rt.jsx)("textarea",{className:h("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background 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",e),ref:a,...t}));Ee.displayName="Textarea";var U=me(require("@radix-ui/react-select")),vt=me(require("react")),ke=U.Root;var Fe=U.Value,fe=vt.forwardRef(({children:e,className:t,...a},o)=>(0,rt.jsxs)(U.Trigger,{className:h("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,rt.jsx)(U.Icon,{asChild:!0,children:(0,rt.jsx)(it.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));fe.displayName=U.Trigger.displayName;var po=vt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(U.ScrollUpButton,{className:h("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,rt.jsx)(it.ChevronUp,{className:"h-4 w-4"})}));po.displayName=U.ScrollUpButton.displayName;var uo=vt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(U.ScrollDownButton,{className:h("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,rt.jsx)(it.ChevronDown,{className:"h-4 w-4"})}));uo.displayName=U.ScrollDownButton.displayName;var ve=vt.forwardRef(({children:e,className:t,position:a="popper",...o},s)=>(0,rt.jsx)(U.Portal,{children:(0,rt.jsxs)(U.Content,{className:h("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:s,...o,children:[(0,rt.jsx)(po,{}),(0,rt.jsx)(U.Viewport,{className:h("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,rt.jsx)(uo,{})]})}));ve.displayName=U.Content.displayName;var li=vt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(U.Label,{className:h("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));li.displayName=U.Label.displayName;var V=vt.forwardRef(({children:e,className:t,...a},o)=>(0,rt.jsxs)(U.Item,{className:h("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,rt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,rt.jsx)(U.ItemIndicator,{children:(0,rt.jsx)(it.Check,{className:"h-4 w-4"})})}),(0,rt.jsx)(U.ItemText,{children:e})]}));V.displayName=U.Item.displayName;var di=vt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(U.Separator,{className:h("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));di.displayName=U.Separator.displayName;var go=me(require("react")),va=me(require("@radix-ui/react-label"));var ci=(0,Ya.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),C=go.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(va.Root,{ref:a,className:h(ci(),e),...t}));C.displayName=va.Root.displayName;var Dt=me(require("react")),Lt=me(require("@radix-ui/react-toggle-group"));var bo=me(require("react")),ba=me(require("@radix-ui/react-toggle"));var ha=(0,Ya.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),mi=bo.forwardRef(({className:e,variant:t,size:a,...o},s)=>(0,rt.jsx)(ba.Root,{ref:s,className:h(ha({variant:t,size:a,className:e})),...o}));mi.displayName=ba.Root.displayName;var yo=Dt.createContext({size:"default",variant:"default"}),St=Dt.forwardRef(({className:e,variant:t,size:a,children:o,...s},i)=>(0,rt.jsx)(Lt.Root,{ref:i,className:h("flex items-center justify-center gap-1",e),...s,children:(0,rt.jsx)(yo.Provider,{value:{variant:t,size:a},children:o})}));St.displayName=Lt.Root.displayName;var Tt=Dt.forwardRef(({className:e,children:t,variant:a,size:o,...s},i)=>{let c=Dt.useContext(yo);return(0,rt.jsx)(Lt.Item,{ref:i,className:h(ha({variant:c.variant||a,size:c.size||o}),e),...s,children:t})});Tt.displayName=Lt.Item.displayName;var pi=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:it.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:it.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:it.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:it.Zap}],ui=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Yt=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:s,assignees:i,defaultEpicId:c})=>{let[l,g]=(0,ie.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,ie.useEffect)(()=>{e&&c&&g(f=>({...f,epicId:c}))},[e,c]),(0,ie.useEffect)(()=>{e&&g({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""})},[e]);let p=f=>{f.preventDefault(),l.name.trim()&&(a({name:l.name.trim(),description:l.description.trim(),status:"todo",priority:l.priority,type:l.type,points:l.points,epicId:l.epicId,sprintId:l.sprintId==="none"?void 0:l.sprintId,assignee:l.assignee.trim()||"Unassigned"}),g({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""}),t())},d=(f,E)=>{g(u=>({...u,[f]:E}))};return(0,rt.jsx)(Xe,{open:e,onOpenChange:t,children:(0,rt.jsxs)(Ge,{className:"sm:max-w-md",children:[(0,rt.jsx)(je,{children:(0,rt.jsx)(We,{children:"Add New Task"})}),(0,rt.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{htmlFor:"name",children:"Task Title"}),(0,rt.jsx)(K,{id:"name",value:l.name,onChange:f=>d("name",f.target.value),placeholder:"Enter task title",required:!0})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{htmlFor:"description",children:"Description"}),(0,rt.jsx)(Ee,{id:"description",value:l.description,onChange:f=>d("description",f.target.value),placeholder:"Enter task description",rows:3})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{children:"Type"}),(0,rt.jsx)(St,{type:"single",value:l.type,onValueChange:f=>f&&d("type",f),children:pi.map(f=>{let E=f.icon;return(0,rt.jsxs)(Tt,{value:f.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,rt.jsx)(E,{className:"h-4 w-4"}),f.label]},f.value)})})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{children:"Priority"}),(0,rt.jsx)(St,{type:"single",value:l.priority,onValueChange:f=>f&&d("priority",f),children:ui.map(f=>(0,rt.jsx)(Tt,{value:f.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:f.label},f.value))})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{htmlFor:"points",children:"Story Points"}),(0,rt.jsx)(K,{id:"points",type:"number",min:"1",max:"100",value:l.points,onChange:f=>d("points",parseInt(f.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{htmlFor:"epic",children:"Epic"}),(0,rt.jsxs)(ke,{value:l.epicId,onValueChange:f=>d("epicId",f),children:[(0,rt.jsx)(fe,{children:(0,rt.jsx)(Fe,{placeholder:"Select an epic"})}),(0,rt.jsx)(ve,{children:o.map(f=>(0,rt.jsx)(V,{value:f.id,children:(0,rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rt.jsx)("div",{className:`w-3 h-3 rounded-full ${f.color}`}),f.name]})},f.id))})]})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,rt.jsxs)(ke,{value:l.sprintId,onValueChange:f=>d("sprintId",f),children:[(0,rt.jsx)(fe,{children:(0,rt.jsx)(Fe,{placeholder:"Select a sprint"})}),(0,rt.jsxs)(ve,{children:[(0,rt.jsx)(V,{value:"none",children:"ie Sprint"}),s.map(f=>(0,rt.jsx)(V,{value:f.id,children:(0,rt.jsxs)("div",{className:"flex items-center gap-2",children:[f.name,f.isActive&&(0,rt.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},f.id))]})]})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{htmlFor:"sprint",children:"Assignee"}),(0,rt.jsxs)(ke,{value:l.assignee,onValueChange:f=>d("assignee",f),children:[(0,rt.jsx)(fe,{children:(0,rt.jsx)(Fe,{placeholder:"Select an Assignee"})}),(0,rt.jsxs)(ve,{children:[(0,rt.jsx)(V,{value:"none",children:"ie Assignee"}),i.map(f=>(0,rt.jsx)(V,{value:f.id,children:(0,rt.jsx)("div",{className:"flex items-center gap-2",children:f.name})},f.id))]})]})]}),(0,rt.jsxs)(jt,{children:[(0,rt.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,rt.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var ya=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:s,className:i="",disabled:c=!1})=>{let[l,g]=(0,ie.useState)(!1),[p,d]=(0,ie.useState)(""),f=()=>{c||(g(!0),d(t))},E=async()=>{p!==t&&await s(e,p),g(!1)},u=y=>{y.key==="Enter"&&!o||y.key==="Enter"&&y.ctrlKey&&o?E():y.key==="Escape"&&(g(!1),d(""))};return(0,rt.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,rt.jsx)(C,{children:a}),l?o?(0,rt.jsx)(Ee,{value:p,onChange:y=>d(y.target.value),onBlur:E,onKeyDown:u,autoFocus:!0,rows:4,className:"resize-none"}):(0,rt.jsx)(K,{value:p,onChange:y=>d(y.target.value),onBlur:E,onKeyPress:u,autoFocus:!0,className:"text-lg font-medium"}):(0,rt.jsxs)("div",{onClick:f,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,rt.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click it edit..."}),!c&&(0,rt.jsx)(it.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Qt=me(require("react")),lt=me(require("@radix-ui/react-avatar"));var wa=Qt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(lt.Root,{ref:a,className:h("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));wa.displayName=lt.Root.displayName;var gi=Qt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(lt.Image,{ref:a,className:h("aspect-square h-full w-full",e),...t}));gi.displayName=lt.Image.displayName;var Na=Qt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(lt.Fallback,{ref:a,className:h("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Na.displayName=lt.Fallback.displayName;var Co=({comments:e,onAddComment:t})=>{let[a,o]=(0,ie.useState)(""),s=c=>c.split(" ").map(l=>l[0]).join("").toUpperCase(),i=()=>{a.trim()&&(t(a),o(""))};return(0,rt.jsxs)("div",{className:"space-y-4",children:[(0,rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rt.jsx)(it.MessageSquare,{className:"h-5 w-5"}),(0,rt.jsx)(C,{className:"text-lg font-medium",children:"Comments"}),(0,rt.jsx)(re,{variant:"secondary",children:e.length})]}),(0,rt.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(c=>(0,rt.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,rt.jsx)(wa,{className:"h-8 w-8 mt-1",children:(0,rt.jsx)(Na,{className:"text-xs bg-muted text-muted-foreground",children:s(c.author)})}),(0,rt.jsxs)("div",{className:"flex-1",children:[(0,rt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,rt.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,rt.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c.createdAt.toLocaleDateString()," at ",c.createdAt.toLocaleTimeString()]})]}),(0,rt.jsx)("p",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,rt.jsxs)("div",{className:"flex gap-2",children:[(0,rt.jsx)(Ee,{value:a,onChange:c=>o(c.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,rt.jsx)(S,{onClick:i,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,rt.jsx)(it.Send,{className:"h-4 w-4"})})]})]})};var aa=({label:e,value:t,onValueChange:a,options:o,showColor:s=!1,disabled:i=!1})=>{let[c,l]=(0,ie.useState)(!1),g=o.find(d=>d.value===t);return(0,rt.jsxs)("div",{className:"space-y-1",children:[(0,rt.jsx)(C,{className:"text-xs text-muted-foreground",children:e}),(0,rt.jsxs)(ke,{value:t,onValueChange:a,open:c,onOpenChange:d=>{i||l(d)},disabled:i,children:[(0,rt.jsx)(fe,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,rt.jsxs)(re,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&l(!c),children:[s&&g?.color&&(0,rt.jsx)("div",{className:`w-2 h-2 rounded-full ${g.color} mr-1`}),g?.label||"Select..."]})}),(0,rt.jsx)(ve,{children:o.map(d=>(0,rt.jsx)(V,{value:d.value,children:s&&d.color?(0,rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rt.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var Do=({label:e,value:t,onValueChange:a,options:o,placeholder:s="Search...",allowCustomValue:i=!1,disabled:c=!1})=>{let[l,g]=(0,ie.useState)(!1),[p,d]=(0,ie.useState)(""),f=o.find(x=>x.value===t),E=o.filter(x=>x.label.toLowerCase().includes(p.toLowerCase())),u=x=>{a(x),g(!1),d("")},y=()=>{i&&p.trim()&&!o.find(x=>x.value===p.trim())&&(a(p.trim()),g(!1),d(""))};return(0,rt.jsxs)("div",{className:"space-y-1",children:[(0,rt.jsx)(C,{className:"text-xs text-muted-foreground",children:e}),(0,rt.jsxs)(ke,{value:t,onValueChange:u,open:l,onOpenChange:x=>{c||g(x)},disabled:c,children:[(0,rt.jsx)(fe,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,rt.jsx)(re,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&g(!l),children:f?.label||t||"Select..."})}),(0,rt.jsxs)(ve,{children:[(0,rt.jsx)("div",{className:"p-2",children:(0,rt.jsx)(K,{placeholder:s,value:p,onChange:x=>d(x.target.value),onKeyDown:x=>{x.key==="Enter"&&i&&y()},className:"mb-2"})}),E.map(x=>(0,rt.jsx)(V,{value:x.value,children:x.label},x.value)),i&&p.trim()&&!E.find(x=>x.value===p.trim())&&(0,rt.jsxs)(V,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var fi=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:it.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:it.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:it.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:it.Zap}],vi=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var So=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:s,onClose:i,onDelete:c,isUpdating:l=!1,isDeleting:g=!1,deleteState:p="idle",teamMembers:d})=>{let f=u=>u.split(" ").map(y=>y[0]).join("").toUpperCase(),E=()=>p==="loading"?(0,rt.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,rt.jsx)(it.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,rt.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,rt.jsx)(it.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,rt.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,rt.jsx)(it.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,rt.jsxs)(S,{onClick:c,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:l||g,children:[(0,rt.jsx)(it.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,rt.jsxs)("div",{className:"flex flex-col h-full",children:[(0,rt.jsxs)("div",{className:"space-y-4",style:{opacity:l?.6:1},children:[(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{className:"text-xs text-muted-foreground",children:"Status"}),(0,rt.jsx)(aa,{label:"",value:e.status,onValueChange:u=>s("status",u),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{className:"text-xs text-muted-foreground",children:"Type"}),(0,rt.jsx)(St,{type:"single",value:e.type,onValueChange:u=>u&&s("type",u),className:"grid grid-cols-2 gap-1",disabled:l,children:fi.map(u=>{let y=u.icon;return(0,rt.jsxs)(Tt,{value:u.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:[(0,rt.jsx)(y,{className:"h-3 w-3"}),u.label]},u.value)})})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,rt.jsx)(St,{type:"single",value:e.priority,onValueChange:u=>u&&s("priority",u),className:"grid grid-cols-3 gap-1",disabled:l,children:vi.map(u=>(0,rt.jsx)(Tt,{value:u.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:u.label},u.value))})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,rt.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:u=>s("points",u.target.value),className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:l})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,rt.jsx)(aa,{label:"",value:e.epicId,onValueChange:u=>s("epicId",u),options:(t||[]).map(u=>({value:u.id,label:u?.name,color:u.color})),showColor:!0,disabled:l})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,rt.jsx)(aa,{label:"",value:e.sprintId||"none",onValueChange:u=>s("sprintId",u==="none"?"":u),options:[{value:"none",label:"ie Sprint"},...(a||[]).map(u=>({value:u.id,label:`${u?.name}${u.isActive?" (Active)":""}`}))],disabled:l})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,rt.jsx)(Do,{label:"",value:e.assignee?.value?.name,onValueChange:u=>s("assignee",u),options:d.map(u=>({value:`${typeof u.email=="string"?"users":"digital-colleagues"}:${u.id}`,label:u?.name})),placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),(0,rt.jsxs)("div",{className:"mt-auto pt-4 space-y-4",children:[(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(S,{onClick:i,variant:"outline",className:"w-full h-8 text-xs",disabled:l||g,children:"Close"}),E()]}),(0,rt.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,rt.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,rt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,rt.jsx)(it.User,{className:"h-3 w-3"}),(0,rt.jsx)("span",{children:"System"})]})]}),(0,rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,rt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,rt.jsx)(it.Calendar,{className:"h-3 w-3"}),(0,rt.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,rt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,rt.jsx)(it.Clock,{className:"h-3 w-3"}),(0,rt.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var To=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:s,onUpdateTask:i,onDeleteTask:c,onAddComment:l,colleagues:g})=>{let[p,d]=(0,ie.useState)(a),[f,E]=(0,ie.useState)(new Date),[u,y]=(0,ie.useState)("idle"),[B,x]=(0,ie.useState)("idle"),[H,X]=(0,ie.useState)([]);(0,ie.useEffect)(()=>{d(a)},[a]);let _=async(j,Re)=>{if(Re!==p[j]){y("loading");try{let M=await i(p.id,{[j]:Re});d(M),E(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},Z=async(j,Re)=>{if(Re!==p[j]){y("loading");try{let M=await i(p.id,{[j]:Re});d(M),E(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},b=async j=>{if(l){y("loading");try{let Re=await l?.({content:j,taskId:p.id});d(Re),E(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},z=async()=>{x("loading");try{await c(p.id),x("success"),setTimeout(()=>{t(),x("idle")},1e3)}catch{x("error"),setTimeout(()=>x("idle"),3e3)}},ee=u!=="loading"&&B!=="loading",L=()=>{ee&&t()},ue=()=>u==="loading"?(0,rt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,rt.jsx)(it.Loader2,{className:"h-4 w-4 animate-spin"}),(0,rt.jsx)("span",{children:"Updating..."})]}):u==="success"?(0,rt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,rt.jsx)(it.Check,{className:"h-4 w-4"}),(0,rt.jsx)("span",{children:"Updated successfully"})]}):u==="error"?(0,rt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,rt.jsx)(it.X,{className:"h-4 w-4"}),(0,rt.jsx)("span",{children:"Update failed"})]}):null;return(0,rt.jsx)(Xe,{open:e,onOpenChange:L,children:(0,rt.jsxs)(Ge,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,rt.jsxs)(je,{children:[(0,rt.jsx)(We,{className:"sr-only",children:p.name}),(0,rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,rt.jsx)("div",{className:"flex-1",children:ue()}),!ee&&(0,rt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,rt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,rt.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,rt.jsx)(ya,{fieldName:"name",value:p.name,label:"",onSave:_,className:"border-b border-border pb-3",disabled:u==="loading"}),(0,rt.jsx)(ya,{fieldName:"description",value:p.description,label:"Description",multiline:!0,onSave:_,disabled:u==="loading"}),(0,rt.jsx)(Co,{comments:(p?.comments||[]).map(j=>({author:j.author.value.name,createdAt:new Date(j.timestamp),text:j.content,id:j.id})),onAddComment:b})]}),(0,rt.jsx)(So,{task:p,epics:o,sprints:s,lastUpdated:f,onUpdateTask:Z,onClose:L,onDelete:z,isUpdating:u==="loading",isDeleting:B==="loading",deleteState:B,teamMembers:g})]})]})})};var oa=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,s]=(0,ie.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("rt")[0],endDate:new Date().toISOString().split("rt")[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"],c=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],l=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],g=d=>{d.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:new Date(o.startDate),endDate:new Date(o.endDate),progress:o.progress,isSelected:!0}),s({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("rt")[0],endDate:new Date().toISOString().split("rt")[0],progress:0}),t())},p=(d,f)=>{s(E=>({...E,[d]:f}))};return(0,rt.jsx)(Xe,{open:e,onOpenChange:t,children:(0,rt.jsxs)(Ge,{className:"sm:max-w-md",children:[(0,rt.jsx)(je,{children:(0,rt.jsx)(We,{children:"Add New Epic"})}),(0,rt.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{htmlFor:"name",children:"Epic Name"}),(0,rt.jsx)(K,{id:"name",value:o.name,onChange:d=>p("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{htmlFor:"description",children:"Description"}),(0,rt.jsx)(Ee,{id:"description",value:o.description,onChange:d=>p("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{children:"Color"}),(0,rt.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(d=>(0,rt.jsx)("button",{type:"button",onClick:()=>p("color",d),className:`w-8 h-8 rounded-full ${d} ${o.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{children:"Confidence"}),(0,rt.jsxs)(ke,{value:o.confidence,onValueChange:d=>p("confidence",d),children:[(0,rt.jsx)(fe,{children:(0,rt.jsx)(Fe,{})}),(0,rt.jsx)(ve,{children:c.map(d=>(0,rt.jsx)(V,{value:d.value,children:d.label},d.value))})]})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{children:"Phase"}),(0,rt.jsxs)(ke,{value:o.phase.toString(),onValueChange:d=>p("phase",parseInt(d)),children:[(0,rt.jsx)(fe,{children:(0,rt.jsx)(Fe,{})}),(0,rt.jsx)(ve,{children:l.map(d=>(0,rt.jsx)(V,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{children:"Start Date"}),(0,rt.jsx)(K,{type:"date",value:o.startDate,onChange:d=>p("startDate",d.target.value)})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{children:"End Date"}),(0,rt.jsx)(K,{type:"date",value:o.endDate,onChange:d=>p("endDate",d.target.value)})]})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)(C,{children:"Progress (%)"}),(0,rt.jsx)(K,{type:"number",min:"0",max:"100",value:o.progress,onChange:d=>p("progress",parseInt(d.target.value)||0)})]}),(0,rt.jsxs)(jt,{children:[(0,rt.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,rt.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var Eo=require("motion/react");function Ro(e,t){let[a,o]=(0,ie.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),s=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,ie.useEffect)(()=>{s(a)},[]),[a,s]}var ia=require("react-icons/fa");function et({title:e,description:t,badge:a,primaryAction:o,secondaryAction:s,gradient:i,children:c,className:l}){let[g,p]=Ro(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),d=!s&&!t||g;return(0,rt.jsxs)(Eo.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 ${l||""}`,children:[(0,rt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,rt.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,rt.jsx)(re,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,rt.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,rt.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,rt.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,rt.jsx)("button",{"aria-label":g?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!g),style:{lineHeight:0},children:g?(0,rt.jsx)(ia.FaChevronDown,{size:22}):(0,rt.jsx)(ia.FaChevronUp,{size:22})})]})]}),!d&&(0,rt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,rt.jsxs)("div",{className:"space-y-4",children:[(0,rt.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,rt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,rt.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),s&&(0,rt.jsx)(S,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:s.onClick,children:s.label})]})]}),c&&(0,rt.jsx)("div",{className:"hidden lg:block",children:c})]})]})}var Io=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:s=[],initialProjects:i=[],onAddTask:c,onUpdateTask:l,onDeleteTask:g,onTaskClick:p,onAddEpic:d,onAddComment:f})=>{let[E,u]=(0,ie.useState)(e),[y,B]=(0,ie.useState)(t),[x,H]=(0,ie.useState)(a),[X,_]=(0,ie.useState)(!1),[Z,b]=(0,ie.useState)(!1),[z,ee]=(0,ie.useState)(null),[L,ue]=(0,ie.useState)(null),[j,Re]=(0,ie.useState)(o),[M,D]=(0,ie.useState)(s),[Y,ze]=(0,ie.useState)(0),ge=(0,ie.useRef)(null),te=(0,ie.useRef)(null),He=y.filter(R=>!0).map(R=>R.id),Ve=x.find(R=>R.isSelected);He.push("no-epic"),(0,ie.useEffect)(()=>{u(e)},[e]),(0,ie.useEffect)(()=>{B(t)},[t]),(0,ie.useEffect)(()=>{H(a)},[a]),(0,ie.useEffect)(()=>{let R=()=>{if(ge.current){let we=ge.current.offsetHeight;ze(we)}};R();let W=new ResizeObserver(R);ge.current&&W.observe(ge.current);let ae=()=>{setTimeout(R,100)};return window.addEventListener("storage",ae),()=>{W.disconnect(),window.removeEventListener("storage",ae)}},[]),(0,ie.useEffect)(()=>{let R=setTimeout(()=>{ge.current&&ze(ge.current.offsetHeight)},300);return()=>clearTimeout(R)},[X,Z]);let at=E.filter(R=>{let W=He.includes(R.epicId)||!R.epicId;return!Ve||Ve.id==="all-tasks"?W:Ve.id==="backlog"?W&&!R.sprintId:W&&R.sprintId===Ve.id}),ye=R=>at.filter(W=>W.status===R),Ae=R=>{let W={};return y.forEach(ae=>{W[ae.id]=R.filter(we=>we.epicId===ae.id)}),W["no-epic"]=R.filter(ae=>!ae.epicId),W},Ye=R=>{ue(R)},ot=R=>{L&&(u(W=>W.map(ae=>ae.id===L.id?{...ae,status:R}:ae)),l?.(L.id,{status:R}),ue(null))},$e=R=>{let W={...R,id:Date.now().toString(),createdAt:new Date};u(ae=>[...ae,W]),c?.(R)},ct=async(R,W)=>{u(we=>we.map(m=>m.id===R?{...m,...W}:m)),l&&await l(R,W);let ae=E.find(we=>we.id===R);if(!ae)throw new Error("Task not found");return{...ae,...W}},Et=async R=>{u(W=>W.filter(ae=>ae.id!==R)),z?.id===R&&ee(null),g&&await g(R)},mt=R=>{let W={...R,id:Date.now().toString(),isSelected:!0};B(ae=>[...ae,W]),d?.(R)},Ot=R=>{ee(R),p?.(R)},pt=[{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"}],ut=Y>0?`calc(100vh - ${Y+120}px)`:"calc(100vh - 12rem)";return(0,rt.jsxs)("div",{ref:te,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,rt.jsx)("div",{ref:ge,className:"flex-shrink-0",children:(0,rt.jsx)(et,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-it-rt from-purple-600 via-violet-600 it-indigo-600",primaryAction:{label:"Add task",onClick:()=>_(!0)},secondaryAction:{label:"Add epic",onClick:()=>b(!0)}})}),(0,rt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,rt.jsx)("div",{className:"h-full",style:{height:Y>0?`calc(100vh - ${Y+120}px)`:"calc(100vh - 12rem)"},children:(0,rt.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:pt.map(R=>{let W=ye(R.status),ae=Ae(W);return(0,rt.jsx)(eo,{title:R.title,status:R.status,taskCount:W.length,onDrop:ot,isCompact:R.status==="done",height:ut,children:He.map(we=>{let m=y.find(O=>O.id===we),k=ae[we]||[];return k.length===0?null:(0,rt.jsxs)("div",{className:"mb-6",children:[(0,rt.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,rt.jsx)("div",{className:`w-3 h-3 rounded-full ${m?.color}`}),(0,rt.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:m?.name||"ie Epic"}),(0,rt.jsx)(re,{variant:"secondary",className:"text-xs",children:k.length})]})," ",(0,rt.jsx)("div",{className:"space-y-3",children:k.map(O=>(0,rt.jsx)(Jt,{task:O,epic:m,onDragStart:Ye,onTaskClick:Ot,isCompact:R.status==="done"},O.id))})]},we)})},R.id)})})})}),(0,rt.jsx)(Yt,{isOpen:X,onClose:()=>_(!1),onAddTask:$e,assignees:[...M,...j],epics:y,sprints:x}),(0,rt.jsx)(oa,{isOpen:Z,onClose:()=>b(!1),onAddEpic:mt}),z&&(0,rt.jsx)(To,{isOpen:!!z,onClose:()=>ee(null),initialTask:z,epics:y,sprints:x,onUpdateTask:ct,onDeleteTask:Et,colleagues:[...M,...j],onAddComment:f})]})};var Ao=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddTaskToEpic:i,onAddEpic:c,onUpdateEpic:l,onDeleteEpic:g})=>{let[p,d]=(0,ie.useState)(null),[f,E]=(0,ie.useState)(null),[u,y]=(0,ie.useState)({}),[B,x]=(0,ie.useState)(0),H=(0,ie.useRef)(null),X=(0,ie.useRef)(null);(0,ie.useEffect)(()=>{let D=()=>{if(H.current){let ge=H.current.offsetHeight;x(ge)}};D();let Y=new ResizeObserver(D);H.current&&Y.observe(H.current);let ze=()=>{setTimeout(D,100)};return window.addEventListener("storage",ze),()=>{Y.disconnect(),window.removeEventListener("storage",ze)}},[]),(0,ie.useEffect)(()=>{let D=setTimeout(()=>{H.current&&x(H.current.offsetHeight)},300);return()=>clearTimeout(D)},[f]);let _=D=>{d(D)},Z=D=>{D.preventDefault()},b=(D,Y)=>{D.preventDefault(),p&&p.epicId!==Y&&(o(p.id,{epicId:Y}),d(null))},z=D=>e.filter(Y=>Y.epicId===D),ee=D=>{E(D.id),y({name:D.name,description:D.description,confidence:D.confidence,phase:D.phase,progress:D.progress})},L=()=>{f&&u.name&&(l(f,u),E(null),y({}))},ue=()=>{E(null),y({})},j=D=>{window.confirm("Are you sure you want it delete this epic? This will also delete all associated tasks.")&&g(D)},Re=D=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[D]||`Phase ${D}`,M=D=>{switch(D){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,rt.jsxs)("div",{ref:X,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,rt.jsx)("div",{ref:H,className:"flex-shrink-0",children:(0,rt.jsx)(et,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-it-rt from-rose-600 via-pink-600 it-fuchsia-600",primaryAction:{label:"Add epic",onClick:c}})}),(0,rt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,rt.jsx)("div",{className:"h-full overflow-y-auto",style:{height:B>0?`calc(100vh - ${B+120}px)`:"calc(100vh - 12rem)"},children:(0,rt.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:t.map(D=>{let Y=z(D.id),ze=Y.reduce((te,He)=>te+He.points,0),ge=B>0?`calc(100vh - ${B+200}px)`:"calc(100vh - 14rem)";return(0,rt.jsxs)(ne,{className:`flex flex-col ${f===D.id?"h-auto":""} bg-card shadow-sm`,style:{height:f===D.id?"auto":ge,minHeight:"400px"},onDragOver:Z,onDrop:te=>b(te,D.id),children:[(0,rt.jsx)("div",{className:"p-4 border-b border-border",children:f===D.id?(0,rt.jsxs)("div",{className:"space-y-4",children:[(0,rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,rt.jsx)(K,{value:u.name||"",onChange:te=>y({...u,name:te.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,rt.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,rt.jsx)(S,{size:"sm",variant:"ghost",onClick:L,className:"p-1 h-8 w-8",children:(0,rt.jsx)(it.Check,{className:"h-4 w-4"})}),(0,rt.jsx)(S,{size:"sm",variant:"ghost",onClick:ue,className:"p-1 h-8 w-8",children:(0,rt.jsx)(it.X,{className:"h-4 w-4"})})]})]}),(0,rt.jsx)(Ee,{value:u.description||"",onChange:te=>y({...u,description:te.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,rt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,rt.jsxs)("div",{children:[(0,rt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,rt.jsxs)("select",{value:u.confidence||D.confidence,onChange:te=>y({...u,confidence:te.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,rt.jsx)("option",{value:"low",children:"Low"}),(0,rt.jsx)("option",{value:"medium",children:"Medium"}),(0,rt.jsx)("option",{value:"high",children:"High"})]})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,rt.jsx)("select",{value:u.phase?.toString()||D.phase.toString(),onChange:te=>y({...u,phase:parseInt(te.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(te=>(0,rt.jsxs)("option",{value:te.toString(),children:["Phase ",te]},te))})]})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,rt.jsx)(K,{type:"number",min:"0",max:"100",value:u.progress||D.progress,onChange:te=>y({...u,progress:parseInt(te.target.value)||0}),className:"text-xs"})]})]}):(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,rt.jsx)("div",{className:`w-4 h-4 rounded-full ${D.color}`}),(0,rt.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:D.name}),(0,rt.jsxs)("div",{className:"flex gap-1",children:[(0,rt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>ee(D),className:"p-1 h-8 w-8",children:(0,rt.jsx)(it.Edit2,{className:"h-3 w-3"})}),(0,rt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>j(D.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,rt.jsx)(it.Trash2,{className:"h-3 w-3"})})]})]}),(0,rt.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,rt.jsxs)(re,{className:`text-xs ${M(D.confidence)}`,children:[D.confidence," confidence"]}),(0,rt.jsxs)(re,{variant:"outline",className:"text-xs",children:["Phase ",D.phase]}),(0,rt.jsxs)(re,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Y.length," tasks"]}),(0,rt.jsxs)(re,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ze," pts"]})]}),D.description&&(0,rt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:D.description}),(0,rt.jsxs)("div",{className:"mb-3",children:[(0,rt.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,rt.jsx)("span",{className:"select-none",children:"Progress"}),(0,rt.jsxs)("span",{className:"select-none",children:[D.progress,"%"]})]}),(0,rt.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,rt.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${D.progress}%`}})})]}),(0,rt.jsxs)(S,{onClick:()=>i(D.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,rt.jsx)(it.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,rt.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,rt.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${p?"border-primary bg-primary/10":"border-border"}`,children:Y.length===0?(0,rt.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,rt.jsx)(it.Move,{className:"h-8 w-8 mb-2"}),(0,rt.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):Y.map(te=>(0,rt.jsx)(Jt,{task:te,epic:D,onDragStart:_,onTaskClick:s,isCompact:!0},te.id))})})]},D.id)})})})})]})};var Mo=require("react-day-picker");function sa({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,rt.jsx)(Mo.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:h("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:h(Xt({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:h("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-rt-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-rt-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-rt-md":"[&:has([aria-selected])]:rounded-md"),day:h(Xt({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}sa.displayName="Calendar";var Fo=me(require("react")),tt=me(require("@radix-ui/react-popover"));var Da=tt.Root,Sa=tt.Trigger;var na=Fo.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},s)=>(0,rt.jsx)(tt.Portal,{children:(0,rt.jsx)(tt.Content,{ref:s,align:t,sideOffset:a,className:h("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));na.displayName=tt.Content.displayName;var Pa=require("date-fns");var Oo=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,s]=(0,ie.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),i=l=>{l.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),s({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},c=()=>{s({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,$.jsx)(Xe,{open:e,onOpenChange:c,children:(0,$.jsxs)(Ge,{className:"sm:max-w-md",children:[(0,$.jsx)(je,{children:(0,$.jsx)(We,{children:"Add New Sprint"})}),(0,$.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(C,{htmlFor:"name",children:"Sprint Name *"}),(0,$.jsx)(K,{id:"name",value:o.name,onChange:l=>s(g=>({...g,name:l.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(C,{htmlFor:"description",children:"Description"}),(0,$.jsx)(Ee,{id:"description",value:o.description,onChange:l=>s(g=>({...g,description:l.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,$.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(C,{children:"Start Date *"}),(0,$.jsxs)(Da,{children:[(0,$.jsx)(Sa,{asChild:!0,children:(0,$.jsxs)(S,{variant:"outline",className:h("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,$.jsx)(it.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,Pa.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,$.jsx)(na,{className:"w-auto p-0",align:"start",children:(0,$.jsx)(sa,{mode:"single",selected:o.startDate,onSelect:l=>s(g=>({...g,startDate:l})),initialFocus:!0})})]})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(C,{children:"End Date *"}),(0,$.jsxs)(Da,{children:[(0,$.jsx)(Sa,{asChild:!0,children:(0,$.jsxs)(S,{variant:"outline",className:h("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,$.jsx)(it.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,Pa.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,$.jsx)(na,{className:"w-auto p-0",align:"start",children:(0,$.jsx)(sa,{mode:"single",selected:o.endDate,onSelect:l=>s(g=>({...g,endDate:l})),initialFocus:!0,disabled:l=>o.startDate?l<o.startDate:!1})})]})]})]}),(0,$.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,$.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:l=>s(g=>({...g,isActive:l.target.checked})),className:"rounded border-gray-300"}),(0,$.jsx)(C,{htmlFor:"isActive",children:"Set as active sprint"})]}),(0,$.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,$.jsx)(S,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,$.jsx)(S,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var zo=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddSprint:i,onUpdateSprint:c,onDeleteSprint:l})=>{let[g,p]=(0,ie.useState)([]),[d,f]=(0,ie.useState)(new Set),[E,u]=(0,ie.useState)(null),[y,B]=(0,ie.useState)(!1),[x,H]=(0,ie.useState)(null),[X,_]=(0,ie.useState)(null),[Z,b]=(0,ie.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[z,ee]=(0,ie.useState)("upcoming"),[L,ue]=(0,ie.useState)(!1),[j,Re]=(0,ie.useState)(0),M=(0,ie.useRef)(null),D=(0,ie.useRef)(null);(0,ie.useEffect)(()=>{let m=()=>{M.current&&Re(M.current.offsetHeight)};m();let k=new ResizeObserver(m);return M.current&&k.observe(M.current),()=>k.disconnect()},[]);let Y=m=>t.find(k=>k.id===m),ze=m=>a.find(k=>k.id===m),ge=m=>{let k={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 k[m]||k.medium},te=m=>{let k=m.trim().split(" ");if(k.length===1)return k[0];let O=k[0],J=k[k.length-1][0].toUpperCase();return`${O} ${J}`},He=m=>{let k={},O=[];return m.forEach(J=>{J.epicId?(k[J.epicId]||(k[J.epicId]=[]),k[J.epicId].push(J)):O.push(J)}),{tasksByEpic:k,unassignedTasks:O}},Ve=a.filter(m=>m.id!=="backlog"&&m.id!=="all-tasks"),at=Ve.filter(m=>{switch(z){case"active":return m.isActive;case"upcoming":return!m.isActive;default:return!0}}),ye=Ve.filter(m=>g.includes(m.id)),Ae=e.filter(m=>!m.sprintId||m.sprintId==="backlog"||m.sprintId==="Backlog"),Ye=Ae.reduce((m,k)=>m+(k.points||0),0),ot=m=>{p(k=>k.includes(m)?k.filter(O=>O!==m):k.length<3?[...k,m]:k)},$e=m=>{f(k=>{let O=new Set(k);return O.has(m)?O.delete(m):O.add(m),O})},ct=m=>{i(m),B(!1)},Et=m=>{_(m.id),b({name:m.name,description:m.description||"",startDate:m.startDate instanceof Date?m.startDate.toISOString().split("rt")[0]:m.startDate,endDate:m.endDate instanceof Date?m.endDate.toISOString().split("rt")[0]:m.endDate,isActive:m.isActive})},mt=()=>{X&&(c(X,{name:Z.name,description:Z.description,startDate:new Date(Z.startDate),endDate:new Date(Z.endDate),isActive:Z.isActive}),_(null))},Ot=()=>{_(null),b({name:"",description:"",startDate:"",endDate:"",isActive:!1})},pt=(m,k)=>{u(k),m.dataTransfer.effectAllowed="move"},ut=m=>{m.preventDefault(),m.dataTransfer.dropEffect="move"},R=m=>{H(m)},W=()=>{H(null)},ae=(m,k)=>{if(m.preventDefault(),H(null),!E)return;let O=E.sprintId||void 0,J=k==="backlog"?void 0:k;O!==J&&o(E.id,{sprintId:J}),u(null)},we=({task:m,showSprint:k=!1})=>{let O=m.epicId?Y(m.epicId):null,J=m.sprintId?ze(m.sprintId):null;return(0,rt.jsx)(ne,{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:Me=>{Me.dataTransfer.effectAllowed="move",Me.dataTransfer.setData("text/plain",m.id),pt(Me,m)},onClick:Me=>{E===null&&s(m)},style:{userSelect:"none"},children:(0,rt.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,rt.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,rt.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:m.name}),(0,rt.jsx)(re,{className:`text-xs ${ge(m.priority)}`,children:m.priority[0].toUpperCase()})]}),(0,rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,rt.jsxs)("div",{className:"flex items-center gap-1",children:[O&&(0,rt.jsx)("div",{className:`w-2 h-2 rounded-full ${O.color}`}),(0,rt.jsx)("span",{className:"text-muted-foreground truncate",children:O?.name})]}),(0,rt.jsx)("span",{className:"text-muted-foreground",children:te(m.assignee?.value?.name)})]}),k&&J&&(0,rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,rt.jsx)(it.Calendar,{className:"h-3 w-3"}),(0,rt.jsx)("span",{children:J.name})]})]})})};return(0,rt.jsxs)("div",{ref:D,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,rt.jsx)("div",{ref:M,className:"flex-shrink-0",children:(0,rt.jsx)(et,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-it-rt from-orange-600 via-amber-600 it-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>B(!0)}})}),(0,rt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,rt.jsxs)("div",{className:"h-full",style:{height:j>0?`calc(100vh - ${j+120}px)`:"calc(100vh - 12rem)"},children:[(0,rt.jsxs)("div",{className:"mb-4",children:[(0,rt.jsx)(ne,{className:"p-3 bg-card shadow-sm",children:(0,rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,rt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,rt.jsx)("div",{children:(0,rt.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"})}),g.length>0&&(0,rt.jsx)("div",{className:"flex items-center gap-2",children:(0,rt.jsx)("div",{className:"flex flex-wrap gap-1",children:ye.map(m=>(0,rt.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,rt.jsx)("span",{className:"max-w-[80px] truncate",children:m.name}),m.isActive&&(0,rt.jsx)("span",{className:"text-success text-[10px]",children:"\u25CF"}),(0,rt.jsx)("button",{onClick:()=>ot(m.id),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,rt.jsx)(it.X,{className:"h-4 w-4"})})]},m.id))})})]}),(0,rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rt.jsxs)(S,{onClick:()=>B(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,rt.jsx)(it.Plus,{className:"h-3 w-3"}),"Add"]}),(0,rt.jsxs)(S,{onClick:()=>ue(!L),variant:"outline",size:"sm",className:"gap-1",children:[(0,rt.jsx)(it.Calendar,{className:"h-3 w-3"}),L?"Close":"Select"]})]})]})}),L&&(0,rt.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>ue(!1)}),(0,rt.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 ${L?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,rt.jsxs)(ne,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,rt.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,rt.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,rt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>ue(!1),className:"h-8 w-8 p-0",children:(0,rt.jsx)(it.X,{className:"h-4 w-4"})})]}),(0,rt.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up it 3 sprints it view in your planning board"})]}),(0,rt.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,rt.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active",count:a.filter(m=>m.isActive).length},{key:"upcoming",label:"Upcoming",count:a.filter(m=>!m.isActive).length}].map(m=>(0,rt.jsxs)(S,{variant:z===m.key?"default":"outline",size:"sm",onClick:()=>ee(m.key),className:"text-xs h-8 px-3 flex-1",children:[m.label," (",m.count,")"]},m.key))}),(0,rt.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:at.length>0?at.map(m=>{let k=g.includes(m.id),O=e.filter(Ne=>Ne.sprintId===m.id).length,J=!k&&g.length<3;return(0,rt.jsx)("div",{className:`p-3 rounded-lg border transition-all ${k?"bg-primary/10 border-primary/30":J?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:X===m.id?(0,rt.jsxs)("div",{className:"space-y-3",children:[(0,rt.jsx)(K,{value:Z.name,onChange:Ne=>b(Ie=>({...Ie,name:Ne.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,rt.jsx)(Ee,{value:Z.description,onChange:Ne=>b(Ie=>({...Ie,description:Ne.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,rt.jsxs)("div",{className:"flex gap-2",children:[(0,rt.jsxs)(S,{size:"sm",onClick:()=>mt(),className:"flex-1",children:[(0,rt.jsx)(it.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,rt.jsxs)(S,{size:"sm",variant:"outline",onClick:Ot,className:"flex-1",children:[(0,rt.jsx)(it.X,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,rt.jsxs)("div",{children:[(0,rt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,rt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,rt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,rt.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:m.name}),m.isActive&&(0,rt.jsx)(re,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,rt.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:m.description}),(0,rt.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,rt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,rt.jsx)(it.CalendarDays,{className:"h-3 w-3"}),new Date(m.startDate).toLocaleDateString()]}),(0,rt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,rt.jsx)(it.User,{className:"h-3 w-3"}),O," tasks"]})]})]}),(0,rt.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,rt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Et(m),className:"h-6 w-6 p-0",children:(0,rt.jsx)(it.Edit2,{className:"h-3 w-3"})}),m.id!=="backlog"&&m.id!=="all-tasks"&&(0,rt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>l(m.id),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,rt.jsx)(it.Trash2,{className:"h-3 w-3"})})]})]}),(0,rt.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,rt.jsx)(S,{variant:k?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>ot(m.id),disabled:!k&&g.length>=3,children:(0,rt.jsx)("span",{className:"pointer-events-none select-none",children:k?"Deselect":g.length>=3?"Limit Reached":"Select"})})})]})},m.id)}):(0,rt.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,rt.jsx)(it.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,rt.jsxs)("p",{className:"text-sm",children:['ie sprints found for "',z,'" filter']}),(0,rt.jsx)(S,{variant:"link",size:"sm",onClick:()=>ee("all"),className:"text-xs",children:"Show all sprints"})]})}),g.length===0&&(0,rt.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,rt.jsxs)("div",{className:"text-center",children:[(0,rt.jsx)(it.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,rt.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints it start planning"}),(0,rt.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up it 3 sprints it view alongside your backlog"})]})})]})]})})]}),(0,rt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,rt.jsx)("div",{className:"lg:col-span-1",children:(0,rt.jsxs)(ne,{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:ut,onDragEnter:()=>R("backlog"),onDragLeave:W,onDrop:m=>ae(m,"backlog"),style:{height:j>0?`calc(100vh - ${j+200}px)`:"calc(100vh - 16rem)"},children:[(0,rt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,rt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rt.jsxs)(re,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[Ae.length," tasks"]}),(0,rt.jsxs)(re,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[Ye," pts"]})]})]}),(0,rt.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${x==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:m,unassignedTasks:k}=He(Ae);return(0,rt.jsxs)(rt.Fragment,{children:[Object.entries(m).map(([O,J])=>{let Ne=Y(O);if(!Ne)return null;let Ie=d.has(O);return(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.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:()=>$e(O),children:[(0,rt.jsx)("div",{className:`w-3 h-3 rounded-full ${Ne.color}`}),(0,rt.jsx)("span",{className:"font-medium text-muted-foreground",children:Ne.name}),(0,rt.jsxs)("span",{className:"text-muted-foreground",children:["(",J.length,")"]}),(0,rt.jsx)("div",{className:"ml-auto",children:Ie?(0,rt.jsx)(it.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,rt.jsx)(it.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Ie&&(0,rt.jsx)("div",{className:"space-y-2 pl-2",children:J.map(Me=>(0,rt.jsx)(we,{task:Me},Me.id))})]},O)}),k.length>0&&(()=>{let O=d.has("no-epic");return(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.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:()=>$e("no-epic"),children:[(0,rt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,rt.jsx)("span",{className:"font-medium text-muted-foreground",children:"ie Epic"}),(0,rt.jsxs)("span",{className:"text-muted-foreground",children:["(",k.length,")"]}),(0,rt.jsx)("div",{className:"ml-auto",children:O?(0,rt.jsx)(it.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,rt.jsx)(it.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!O&&(0,rt.jsx)("div",{className:"space-y-2 pl-2",children:k.map(J=>(0,rt.jsx)(we,{task:J},J.id))})]})})(),Ae.length===0&&(0,rt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here it move it backlog"}),Ae.length>0&&Object.keys(m).length===0&&k.length===0&&(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),Ae.map(O=>(0,rt.jsx)(we,{task:O},O.id))]})]})})()})]})}),ye.map(m=>{let k=e.filter(J=>J.sprintId===m.id),O=k.reduce((J,Ne)=>J+(Ne.points||0),0);return(0,rt.jsxs)(ne,{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:ut,onDragEnter:()=>R(m.id),onDragLeave:W,onDrop:J=>ae(J,m.id),style:{height:j>0?`calc(100vh - ${j+200}px)`:"calc(100vh - 16rem)"},children:[(0,rt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,rt.jsxs)("div",{children:[(0,rt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:m.name}),m.isActive&&(0,rt.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rt.jsxs)(re,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[k.length," tasks"]}),(0,rt.jsxs)(re,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[O," pts"]}),(0,rt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Et(m),className:"h-6 px-2",children:(0,rt.jsx)(it.Edit2,{className:"h-3 w-3"})}),m.id!=="backlog"&&m.id!=="all-tasks"&&(0,rt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>l(m.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,rt.jsx)(it.Trash2,{className:"h-3 w-3"})})]})]}),(0,rt.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:J,unassignedTasks:Ne}=He(k);return(0,rt.jsxs)(rt.Fragment,{children:[Object.entries(J).map(([Ie,Me])=>{let zt=Y(Ie);if(!zt)return null;let Vt=d.has(Ie);return(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.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:()=>$e(Ie),children:[(0,rt.jsx)("div",{className:`w-3 h-3 rounded-full ${zt.color}`}),(0,rt.jsx)("span",{className:"font-medium text-muted-foreground",children:zt.name}),(0,rt.jsxs)("span",{className:"text-muted-foreground",children:["(",Me.length,")"]}),(0,rt.jsx)("div",{className:"ml-auto",children:Vt?(0,rt.jsx)(it.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,rt.jsx)(it.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Vt&&(0,rt.jsx)("div",{className:"space-y-2 pl-2",children:Me.map(Ht=>(0,rt.jsx)(we,{task:Ht},Ht.id))})]},Ie)}),Ne.length>0&&(()=>{let Ie=d.has("no-epic");return(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.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:()=>$e("no-epic"),children:[(0,rt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,rt.jsx)("span",{className:"font-medium text-muted-foreground",children:"ie Epic"}),(0,rt.jsxs)("span",{className:"text-muted-foreground",children:["(",Ne.length,")"]}),(0,rt.jsx)("div",{className:"ml-auto",children:Ie?(0,rt.jsx)(it.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,rt.jsx)(it.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Ie&&(0,rt.jsx)("div",{className:"space-y-2 pl-2",children:Ne.map(Me=>(0,rt.jsx)(we,{task:Me},Me.id))})]})})(),k.length===0&&(0,rt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},m.id)})]}),(0,rt.jsx)(Oo,{isOpen:y,onClose:()=>B(!1),onAddSprint:ct})]})})]})};var bi=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},hi=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),xi=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Ra=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[s,i]=t.split(":");o.setHours(parseInt(s),parseInt(i))}return o<a},Ea=e=>{let t=new Date;return e.toDateString()===t.toDateString()},yi=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},wi=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[s,i]=(0,ie.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,l]=(0,ie.useState)(!1),g=d=>{d.preventDefault();let f=e.find(u=>u?.id.toString()===s.colleagueId.toString());if(!f){console.error("ie valid colleague selected"),l(!0);return}l(!1);let E={title:s.title,description:s.description,dueDate:new Date(s.dueDate),dueTime:s.dueTime||void 0,colleague:f,isCompleted:!1,isRecurring:s.isRecurring,recurrencePattern:s.isRecurring?s.recurrencePattern:void 0,recurrenceInterval:s.isRecurring?s.recurrenceInterval:void 0,priority:s.priority,reminderEnabled:s.reminderEnabled,reminderMinutes:s.reminderEnabled?s.reminderMinutes:void 0,tags:s.tags?s.tags.split(",").map(u=>u.trim()):void 0};t(E),o(!1),i({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ie.useEffect)(()=>{s.colleagueId&&l(!1)},[s.colleagueId]);let p=e.filter(Boolean);return(0,rt.jsx)(Xe,{open:a,onOpenChange:o,children:(0,rt.jsxs)(Ge,{className:"max-w-2xl",children:[(0,rt.jsx)(je,{children:(0,rt.jsx)(We,{children:"Add New Reminder"})}),(0,rt.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,rt.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"title",children:"Title"}),(0,rt.jsx)(K,{id:"title",value:s.title,onChange:d=>i({...s,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"description",children:"Description"}),(0,rt.jsx)(Ee,{id:"description",value:s.description,onChange:d=>i({...s,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"dueDate",children:"Due Date"}),(0,rt.jsx)(K,{id:"dueDate",type:"date",value:s.dueDate,onChange:d=>i({...s,dueDate:d.target.value}),required:!0})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,rt.jsx)(K,{id:"dueTime",type:"time",value:s.dueTime,onChange:d=>i({...s,dueTime:d.target.value})})]})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,rt.jsxs)(ke,{value:s.colleagueId,onValueChange:d=>{i({...s,colleagueId:d})},required:!0,children:[(0,rt.jsx)(fe,{className:`${c?"text-destructive border-red-500":""}`,children:(0,rt.jsx)(Fe,{className:`${c?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===s.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,rt.jsx)(ve,{children:p.map(d=>(0,rt.jsx)(V,{value:d.id,children:d.name},d.id))})]}),c&&(0,rt.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)("input",{type:"checkbox",id:"isRecurring",checked:s.isRecurring,onChange:d=>i({...s,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,rt.jsx)(C,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),s.isRecurring&&(0,rt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,rt.jsxs)(ke,{value:s.recurrencePattern,onValueChange:d=>i({...s,recurrencePattern:d}),children:[(0,rt.jsx)(fe,{children:(0,rt.jsx)(Fe,{})}),(0,rt.jsxs)(ve,{children:[(0,rt.jsx)(V,{value:"daily",children:"Daily"}),(0,rt.jsx)(V,{value:"weekly",children:"Weekly"}),(0,rt.jsx)(V,{value:"monthly",children:"Monthly"}),(0,rt.jsx)(V,{value:"yearly",children:"Yearly"})]})]})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"recurrenceInterval",children:"Every"}),(0,rt.jsx)(K,{id:"recurrenceInterval",type:"number",min:"1",value:s.recurrenceInterval,onChange:d=>i({...s,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,rt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,rt.jsx)(S,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,rt.jsx)(S,{type:"submit",children:"Add Reminder"})]})]})]})})},Ni=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:s})=>{let[i,c]=(0,ie.useState)({title:e.title,description:e.description,dueDate:e.dueDate.toISOString().split("rt")[0],dueTime:e.dueTime||"",colleagueId:e.colleague?.id||"",priority:e.priority,isRecurring:e.isRecurring,recurrencePattern:e.recurrencePattern||"weekly",recurrenceInterval:e.recurrenceInterval||1,reminderEnabled:e.reminderEnabled,reminderMinutes:e.reminderMinutes||15,tags:e.tags?.join(", ")||""}),l=p=>{p.preventDefault();let d=t.find(f=>f?.id===i.colleagueId);if(!d){console.error("ie valid colleague selected");return}a(e.id,{title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:d,priority:i.priority,isRecurring:i.isRecurring,recurrencePattern:i.isRecurring?i.recurrencePattern:void 0,recurrenceInterval:i.isRecurring?i.recurrenceInterval:void 0,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderEnabled?i.reminderMinutes:void 0,tags:i.tags?i.tags.split(",").map(f=>f.trim()):void 0}),s()},g=t.filter(Boolean);return(0,rt.jsx)(Xe,{open:o,onOpenChange:s,children:(0,rt.jsxs)(Ge,{className:"max-w-2xl",children:[(0,rt.jsx)(je,{children:(0,rt.jsx)(We,{children:"Edit Reminder"})}),(0,rt.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"edit-title",children:"Title"}),(0,rt.jsx)(K,{id:"edit-title",value:i.title,onChange:p=>c({...i,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"edit-priority",children:"Priority"}),(0,rt.jsxs)(ke,{value:i.priority,onValueChange:p=>c({...i,priority:p}),children:[(0,rt.jsx)(fe,{children:(0,rt.jsx)(Fe,{})}),(0,rt.jsxs)(ve,{children:[(0,rt.jsx)(V,{value:"low",children:"\u{1F7E2} Low"}),(0,rt.jsx)(V,{value:"medium",children:"\u{1F7E1} Medium"}),(0,rt.jsx)(V,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"edit-description",children:"Description"}),(0,rt.jsx)(Ee,{id:"edit-description",value:i.description,onChange:p=>c({...i,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,rt.jsx)(K,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:p=>c({...i,dueDate:p.target.value}),required:!0})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,rt.jsx)(K,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:p=>c({...i,dueTime:p.target.value})})]})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,rt.jsxs)(ke,{value:i.colleagueId,onValueChange:p=>c({...i,colleagueId:p}),required:!0,children:[(0,rt.jsx)(fe,{children:(0,rt.jsx)(Fe,{placeholder:"Select a digital colleague"})}),(0,rt.jsx)(ve,{children:g.map(p=>(0,rt.jsx)(V,{value:p.id,children:p.name},p.id))})]})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring,onChange:p=>c({...i,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,rt.jsx)(C,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,rt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,rt.jsxs)(ke,{value:i.recurrencePattern,onValueChange:p=>c({...i,recurrencePattern:p}),children:[(0,rt.jsx)(fe,{children:(0,rt.jsx)(Fe,{})}),(0,rt.jsxs)(ve,{children:[(0,rt.jsx)(V,{value:"daily",children:"Daily"}),(0,rt.jsx)(V,{value:"weekly",children:"Weekly"}),(0,rt.jsx)(V,{value:"monthly",children:"Monthly"}),(0,rt.jsx)(V,{value:"yearly",children:"Yearly"})]})]})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,rt.jsx)(K,{id:"edit-recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:p=>c({...i,recurrenceInterval:parseInt(p.target.value)})})]})]})]}),(0,rt.jsxs)("div",{className:"space-y-2",children:[(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:i.reminderEnabled,onChange:p=>c({...i,reminderEnabled:p.target.checked}),className:"rounded border-border"}),(0,rt.jsx)(C,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),i.reminderEnabled&&(0,rt.jsxs)("div",{className:"pl-6",children:[(0,rt.jsx)(C,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),(0,rt.jsxs)(ke,{value:i.reminderMinutes.toString(),onValueChange:p=>c({...i,reminderMinutes:parseInt(p)}),children:[(0,rt.jsx)(fe,{children:(0,rt.jsx)(Fe,{})}),(0,rt.jsxs)(ve,{children:[(0,rt.jsx)(V,{value:"5",children:"5 minutes before"}),(0,rt.jsx)(V,{value:"15",children:"15 minutes before"}),(0,rt.jsx)(V,{value:"30",children:"30 minutes before"}),(0,rt.jsx)(V,{value:"60",children:"1 hour before"}),(0,rt.jsx)(V,{value:"1440",children:"1 day before"})]})]})]})]}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)(C,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,rt.jsx)(K,{id:"edit-tags",value:i.tags,onChange:p=>c({...i,tags:p.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,rt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,rt.jsx)(S,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),(0,rt.jsx)(S,{type:"submit",children:"Save Changes"})]})]})]})})},Ci=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[s,i]=(0,ie.useState)(!1);if(!e||!e.id)return null;let c=Ra(e.dueDate,e.dueTime),l=Ea(e.dueDate),g=yi(e.dueDate),p=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},d=()=>l?"Today":g?"Tomorrow":c&&!e.isCompleted?"Overdue":hi(e.dueDate);return(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)(Ni,{reminder:e,colleagues:t,onUpdateReminder:a,open:s,onClose:()=>i(!1)}),(0,rt.jsx)(ne,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${c&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,rt.jsx)(Mt,{className:"p-4",children:(0,rt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,rt.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,rt.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,rt.jsx)(it.CheckCircle,{className:"h-5 w-5"}):(0,rt.jsx)(it.Circle,{className:"h-5 w-5"})}),(0,rt.jsxs)("div",{className:"flex-1",children:[(0,rt.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,rt.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,rt.jsx)("span",{className:"text-sm",children:bi(e.priority)}),e.isRecurring&&(0,rt.jsx)(it.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,rt.jsx)(it.Bell,{className:"h-4 w-4 text-success"})]}),(0,rt.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,rt.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,rt.jsx)(it.Calendar,{className:"h-4 w-4"}),(0,rt.jsx)("span",{className:c&&!e.isCompleted?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,rt.jsx)(it.Clock,{className:"h-4 w-4"}),(0,rt.jsx)("span",{children:xi(e.dueTime)})]}),(0,rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,rt.jsx)(it.User,{className:"h-4 w-4"}),(0,rt.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,rt.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map((f,E)=>(0,rt.jsx)(re,{variant:"secondary",className:"text-xs",children:f},E))})]})]}),(0,rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,rt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>i(!0),className:"h-8 w-8 p-0",children:(0,rt.jsx)(it.Edit2,{className:"h-4 w-4"})}),(0,rt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,rt.jsx)(it.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Vo=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:s})=>{let[i,c]=(0,ie.useState)(e.filter(Boolean)),[l]=(0,ie.useState)(t.filter(Boolean)),[g,p]=(0,ie.useState)("all"),[d,f]=(0,ie.useState)(""),[E,u]=(0,ie.useState)(!1),y=b=>{if(!b.title||!b.colleague?.id){console.error("Invalid reminder data:",b);return}let z={...b,id:Date.now().toString(),createdAt:new Date};c(ee=>[...ee,z]),a?.(b)},B=(b,z)=>{if(!b){console.error("ie reminder ID provided for update");return}c(ee=>ee.map(L=>L?.id===b?{...L,...z}:L)),o?.(b,z)},x=b=>{if(!b){console.error("ie reminder ID provided for deletion");return}c(z=>z.filter(ee=>ee?.id!==b)),s?.(b)},X=i.filter(b=>{if(!b)return!1;if(d){let z=d.toLowerCase();if(!(b.title.toLowerCase().includes(z)||b.description.toLowerCase().includes(z)||b.colleague?.name?.toLowerCase().includes(z)||b.tags?.some(L=>L.toLowerCase().includes(z))))return!1}switch(g){case"pending":return!b.isCompleted;case"completed":return b.isCompleted;case"overdue":return!b.isCompleted&&Ra(b.dueDate,b.dueTime);case"today":return Ea(new Date(b.dueDate));default:return!0}}).sort((b,z)=>{if(!b||!z)return 0;if(b.isCompleted&&!z.isCompleted)return 1;if(!b.isCompleted&&z.isCompleted)return-1;let ee={high:3,medium:2,low:1},L=ee[z.priority]-ee[b.priority];return L!==0?L:b.dueDate.getTime()-z.dueDate.getTime()}),_={total:i.filter(Boolean).length,pending:i.filter(b=>b&&!b.isCompleted).length,completed:i.filter(b=>b&&b.isCompleted).length,overdue:i.filter(b=>b&&!b.isCompleted&&Ra(b.dueDate,b.dueTime)).length,today:i.filter(b=>b&&Ea(new Date(b.dueDate))).length},Z=l.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",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:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return(0,rt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,rt.jsx)(et,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-it-rt from-emerald-600 via-teal-600 it-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{u(!0)}}}),(0,rt.jsxs)("div",{className:"h-full bg-background",children:[(0,rt.jsx)(wi,{colleagues:l,onAddReminder:y,open:E,setOpen:u}),(0,rt.jsxs)("div",{className:"p-6",children:[(0,rt.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,rt.jsxs)("div",{children:[(0,rt.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,rt.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,rt.jsxs)(S,{className:"flex items-center space-x-2",onClick:()=>u(!0),children:[(0,rt.jsx)(it.Plus,{className:"h-4 w-4"}),(0,rt.jsx)("span",{children:"Add Reminder"})]})]}),(0,rt.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,rt.jsxs)(ne,{className:"p-4",children:[(0,rt.jsx)("div",{className:"text-2xl font-bold text-foreground",children:_.total}),(0,rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,rt.jsxs)(ne,{className:"p-4",children:[(0,rt.jsx)("div",{className:"text-2xl font-bold text-primary",children:_.pending}),(0,rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,rt.jsxs)(ne,{className:"p-4",children:[(0,rt.jsx)("div",{className:"text-2xl font-bold text-success",children:_.completed}),(0,rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,rt.jsxs)(ne,{className:"p-4",children:[(0,rt.jsx)("div",{className:"text-2xl font-bold text-destructive",children:_.overdue}),(0,rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,rt.jsxs)(ne,{className:"p-4",children:[(0,rt.jsx)("div",{className:"text-2xl font-bold text-warning",children:_.today}),(0,rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,rt.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,rt.jsx)("div",{className:"flex-1",children:(0,rt.jsx)(K,{placeholder:"Search reminders...",value:d,onChange:b=>f(b.target.value),className:"max-w-md"})}),(0,rt.jsxs)(ke,{value:g,onValueChange:b=>p(b),children:[(0,rt.jsx)(fe,{className:"w-40",children:(0,rt.jsx)(Fe,{})}),(0,rt.jsxs)(ve,{children:[(0,rt.jsxs)(V,{value:"all",children:["All (",_.total,")"]}),(0,rt.jsxs)(V,{value:"pending",children:["Pending (",_.pending,")"]}),(0,rt.jsxs)(V,{value:"completed",children:["Completed (",_.completed,")"]}),(0,rt.jsxs)(V,{value:"overdue",children:["Overdue (",_.overdue,")"]}),(0,rt.jsxs)(V,{value:"today",children:["Today (",_.today,")"]})]})]})]}),(0,rt.jsx)("div",{className:"space-y-4",children:X.length===0?(0,rt.jsxs)(ne,{className:"p-8 text-center",children:[(0,rt.jsx)("div",{className:"text-muted-foreground",children:d||g!=="all"?"ie reminders match your filters":"ie reminders yet"}),!d&&g==="all"&&(0,rt.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder it get started"})]}):X.map(b=>b&&(0,rt.jsx)(Ci,{reminder:b,colleagues:l,onUpdateReminder:B,onDeleteReminder:x},b.id))})]})]})]})};var Pt=me(require("@radix-ui/react-tabs"));function Ho({className:e,...t}){return(0,rt.jsx)(Pt.Root,{"data-slot":"tabs",className:h("flex flex-col gap-2",e),...t})}function Uo({className:e,...t}){return(0,rt.jsx)(Pt.List,{"data-slot":"tabs-list",className:h("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function $o({className:e,...t}){return(0,rt.jsx)(Pt.Trigger,{"data-slot":"tabs-trigger",className:h("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var dt=me(require("react")),G=me(require("@radix-ui/react-dropdown-menu")),Bt=require("@radix-ui/react-icons");var Go=G.Root,jo=G.Trigger;var ki=dt.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,rt.jsxs)(G.SubTrigger,{ref:s,className:h("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,rt.jsx)(Bt.ChevronRightIcon,{className:"ml-auto"})]}));ki.displayName=G.SubTrigger.displayName;var Di=dt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(G.SubContent,{ref:a,className:h("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Di.displayName=G.SubContent.displayName;var Ia=dt.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,rt.jsx)(G.Portal,{children:(0,rt.jsx)(G.Content,{ref:o,sideOffset:t,className:h("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Ia.displayName=G.Content.displayName;var Aa=dt.forwardRef(({className:e,inset:t,...a},o)=>(0,rt.jsx)(G.Item,{ref:o,className:h("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));Aa.displayName=G.Item.displayName;var Si=dt.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,rt.jsxs)(G.CheckboxItem,{ref:s,className:h("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,rt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,rt.jsx)(G.ItemIndicator,{children:(0,rt.jsx)(Bt.CheckIcon,{className:"h-4 w-4"})})}),t]}));Si.displayName=G.CheckboxItem.displayName;var Ti=dt.forwardRef(({className:e,children:t,...a},o)=>(0,rt.jsxs)(G.RadioItem,{ref:o,className:h("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,rt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,rt.jsx)(G.ItemIndicator,{children:(0,rt.jsx)(Bt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Ti.displayName=G.RadioItem.displayName;var Pi=dt.forwardRef(({className:e,inset:t,...a},o)=>(0,rt.jsx)(G.Label,{ref:o,className:h("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Pi.displayName=G.Label.displayName;var Ri=dt.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(G.Separator,{ref:a,className:h("-mx-1 my-1 h-px bg-muted",e),...t}));Ri.displayName=G.Separator.displayName;var Ei=({className:e,...t})=>(0,rt.jsx)("span",{className:h("ml-auto text-xs tracking-widest opacity-60",e),...t});Ei.displayName="DropdownMenuShortcut";function _o({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:i=6}){let c=a.find(l=>l.value===e);return(0,rt.jsxs)(Eo.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,rt.jsx)("div",{className:"hidden lg:block",children:(0,rt.jsx)(Ho,{value:e,onValueChange:t,children:(0,rt.jsx)(Uo,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(l=>(0,rt.jsx)(Eo.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,rt.jsx)($o,{value:l.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:l.label})},l.value))})})}),(0,rt.jsx)("div",{className:"lg:hidden",children:(0,rt.jsxs)(Go,{children:[(0,rt.jsx)(jo,{asChild:!0,children:(0,rt.jsxs)(S,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,rt.jsx)(it.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,rt.jsx)(Ia,{align:"center",className:"w-[180px]",children:a.map(l=>(0,rt.jsx)(Aa,{onClick:()=>t?.(l.value),className:`cursor-pointer ${e===l.value?"bg-accent":""}`,children:l.label},l.value))})]})})]})}function da({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:s=!0,className:i}){return(0,rt.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[s&&(0,rt.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,rt.jsx)("div",{className:"col-span-6",children:"Name"}),(0,rt.jsx)("div",{className:"col-span-2",children:"Size"}),(0,rt.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,rt.jsx)("div",{className:"divide-y",children:e.map(c=>(0,rt.jsxs)(Eo.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?.(c),children:[(0,rt.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,rt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,rt.jsx)("div",{children:(0,rt.jsx)("p",{className:"font-medium",children:c.name})})]}),(0,rt.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:c.filesize}),(0,rt.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,rt.jsx)("span",{className:"text-sm md:text-base",children:typeof c.createdAt=="string"?c.createdAt:new Date(c.createdAt).toLocaleDateString()}),(0,rt.jsx)("div",{className:"flex gap-1",children:(0,rt.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:l=>{l.stopPropagation(),o?.(c)},children:(0,rt.jsx)(it.Trash2,{className:"h-4 w-4"})})})]})]},c.name))})]})}function La({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:s,compactView:i=!1,className:c}){let[l,g]=(0,ie.useState)(e),[p,d]=(0,ie.useState)(""),[f,E]=(0,ie.useState)("all"),[u,y]=(0,ie.useState)("all");(0,ie.useEffect)(()=>{g(e)},[e]);let B=Array.from(new Set(l.map(L=>L.mimeType))),x=l.filter(L=>{let ue=L.name.toLowerCase().includes(p.toLowerCase()),j=f==="all"||L.mimeType===f;return ue&&j}),H=x.slice(0,10),X=x.filter(Boolean),_=()=>{t?.()},Z=L=>{a?.(L)},b=L=>{console.log("deleting file",L),g(ue=>ue.filter(j=>j.name!==L.name)),o?.(L.id)},z=L=>{s?.(L)},ee=()=>{d(""),E("all")};return(0,rt.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,rt.jsx)(Eo.AnimatePresence,{mode:"wait",children:(0,rt.jsx)(Eo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,rt.jsxs)("div",{className:`space-y-6 ${c||""}`,children:[(0,rt.jsx)(et,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-it-rt from-blue-600 via-indigo-600 it-purple-600",primaryAction:{label:"Upload file",onClick:_},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,rt.jsx)(ne,{children:(0,rt.jsx)(Mt,{className:"pt-6",children:(0,rt.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,rt.jsx)("div",{className:"flex-1",children:(0,rt.jsxs)("div",{className:"relative",children:[(0,rt.jsx)(it.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,rt.jsx)(K,{placeholder:"Search files...",value:p,onChange:L=>d(L.target.value),className:"pl-9"})]})}),(p||f!=="all")&&(0,rt.jsxs)(S,{variant:"outline",onClick:ee,className:"gap-2",children:[(0,rt.jsx)(it.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,rt.jsxs)("div",{className:"space-y-4",children:[(0,rt.jsx)(_o,{activeTab:u,onTabChange:y,tabOptions:[{value:"all",label:`All Files (${x.length})`},{value:"recent",label:`Recent (${H.length})`}],maxWidth:"500px",gridCols:3}),u==="all"&&(0,rt.jsx)(da,{files:x,onFileClick:z,onFileEdit:Z,onFileDelete:b,showHeader:!i}),u==="recent"&&(0,rt.jsx)(da,{files:H,onFileClick:z,onFileEdit:Z,onFileDelete:b,showHeader:!i}),u==="shared"&&(0,rt.jsx)(da,{files:X,onFileClick:z,onFileEdit:Z,onFileDelete:b,showHeader:!i})]}),x.length===0&&(0,rt.jsx)(ne,{children:(0,rt.jsx)(Mt,{className:"pt-6",children:(0,rt.jsxs)("div",{className:"text-center py-8",children:[(0,rt.jsx)(it.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,rt.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"ie files found"}),(0,rt.jsx)("p",{className:"text-muted-foreground mb-4",children:p||f!=="all"?"Try adjusting your filters it see more results.":"Get started by uploading your first file."}),(0,rt.jsxs)(S,{onClick:_,className:"gap-2",children:[(0,rt.jsx)(it.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var Jo=require("next/navigation");function Xo({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:s=[],initialReminders:i=[],initialColleagues:c=[],initialUsers:l=[],initialFiles:g=[],initialView:p="kanban",onAddTask:d,onUpdateTask:f,onDeleteTask:E,onTaskClick:u,onAddEpic:y,onUpdateEpic:B,onDeleteEpic:x,onAddTaskToEpic:H,onAddSprint:X,onUpdateSprint:_,onDeleteSprint:Z,onAddProject:b,onUpdateProject:z,onDeleteProject:ee,onFileAdd:L,onFileEdit:ue,onFileDelete:j,onFileClick:Re,onAddReminder:M,onUpdateReminder:D,onDeleteReminder:Y,onViewChange:ze,onToggleMobileMenu:ge,onTeamClick:te,onTeamChange:He,onCopilotClick:Ve,handleAddComment:at}){let[ye,Ae]=(0,ie.useState)(t),[Ye,ot]=(0,ie.useState)(a),[$e,ct]=(0,ie.useState)(o),[Et,mt]=(0,ie.useState)(s),[Ot,pt]=(0,ie.useState)(i),[ut,R]=(0,ie.useState)(c),[W,ae]=(0,ie.useState)(l),[we,m]=(0,ie.useState)(g),[k,O]=(0,ie.useState)(!1),[J,Ne]=(0,ie.useState)(!1),[Ie,Me]=(0,ie.useState)(null),[zt,Vt]=(0,ie.useState)(null),[Ht,Fa]=(0,ie.useState)(null),[yt,Ba]=(0,ie.useState)(p||"kanban"),[Ai,Zo]=(0,ie.useState)(!1),Oa=(0,Jo.useRouter)();(0,ie.useEffect)(()=>{Ae(t)},[t]),(0,ie.useEffect)(()=>{ct(o)},[o]),(0,ie.useEffect)(()=>{ot(a)},[a]),(0,ie.useEffect)(()=>{mt(s)},[s]),(0,ie.useEffect)(()=>{m(g)},[g]),(0,ie.useEffect)(()=>{ae(l)},[l]),(0,ie.useEffect)(()=>{R(c)},[c]),(0,ie.useEffect)(()=>{pt(i)},[i]),(0,ie.useEffect)(()=>{Ba(p)},[p]);let Yo=Ye.filter(v=>v.isSelected).map(v=>v.id),_t=$e.find(v=>v.isSelected),Qo=ye.filter(v=>{let w=Yo.includes(v.epicId);return!_t||_t.id==="all-tasks"?w:_t.id==="backlog"?w&&!v.sprintId:w&&v.sprintId===_t.id}),Mi=v=>Qo.filter(w=>w.status===v),Li=v=>{let w={};return Ye.forEach(A=>{w[A.id]=v.filter(oe=>oe.epicId===A.id)}),w},Fi=v=>{Fa(v)},Bi=v=>{Ht&&(Ae(w=>w.map(A=>A.id===Ht.id?{...A,status:v}:A)),Fa(null))},za=v=>{let w={...v,id:Date.now().toString(),createdAt:new Date};Ae(A=>[...A,w]),d?.(w)},Kt=async(v,w)=>(Ae(A=>A.map(oe=>oe.id===v?{...oe,...w}:oe)),await f?.(v,w)),Oi=async(v,w)=>{Kt(v,w)},Va=v=>{Ae(w=>w.filter(A=>A.id!==v)),Ie?.id===v&&Me(null),E?.(v)},zi=async v=>{Va(v)},Vi=v=>{let w={...v,id:Date.now().toString(),isSelected:!1};mt(A=>[...A,w]),b?.(v)},Hi=(v,w)=>{mt(A=>A.map(oe=>oe.id===v?w.isSelected?(Oa.push(`/project/${v}`),{...oe,...w}):{...oe,...w}:w.isSelected&&v!==oe.id?{...oe,isSelected:!1}:oe)),z?.(v,w)},Ui=v=>{mt(w=>w.filter(A=>A.id!==v)),ee?.(v)},Ha=v=>{let w={...v,id:Date.now().toString(),isSelected:!0};ot(A=>[...A,w]),y?.({...w})},er=()=>{Ne(!0)},tr=(v,w)=>{ot(A=>A.map(oe=>oe.id===v?{...oe,...w}:oe)),B?.(v,w)},ar=v=>{ot(w=>w.filter(A=>A.id!==v)),Ae(w=>w.filter(A=>A.epicId!==v)),x?.(v)},or=v=>{let w={...v,id:Date.now().toString(),isSelected:!1};ct(A=>[...A,w]),X?.(v)},rr=(v,w)=>{ct(A=>A.map(oe=>oe.id===v?w.isSelected?{...oe,...w}:{...oe,...w}:w.isSelected&&v!==oe.id?{...oe,isSelected:!1}:oe)),_?.(v,w)},ir=v=>{v==="backlog"||v==="all-tasks"||(ct(w=>w.filter(A=>A.id!==v)),Ae(w=>w.map(A=>A.sprintId===v?{...A,sprintId:void 0}:A)),Z?.(v))},ma=v=>{Me(v)},sr=v=>{v==="planning"&&window.innerWidth<768||(Ba(v),ze?.(v))},$i=()=>{Zo(v=>!v),ge?.()},Gi=()=>{Oa.push("/")},ji=v=>{console.log("Switching it team:",v)},Wi=v=>{console.log("Switching it team:",v)},nr=v=>{Vt(v),O(!0)},lr=()=>{O(!1),Vt(null)},dr=v=>{let w={...v,id:Date.now().toString(),createdAt:new Date};pt(A=>[...A,w]),M?.(v)},cr=(v,w)=>{pt(A=>A.map(oe=>oe.id===v?{...oe,...w}:oe)),D?.(v,w)},mr=v=>{pt(w=>w.filter(A=>A.id!==v)),Y?.(v)},pr=()=>{L?.()},ur=v=>{ue?.(v)},gr=v=>{m(w=>w.filter(A=>A.name!==v)),j?.(v)},fr=v=>{Re?.(v)},_i=[{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"}],Ki=()=>{switch(yt){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"}},pa=[{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")}],qi=pa.sort((v,w)=>w.lastUsed.getTime()-v.lastUsed.getTime()).slice(0,3),Ji=pa.length>3,Xi=pa.slice(3);return(0,rt.jsxs)($a,{currentView:yt,onViewChange:sr,children:[yt==="kanban"&&(0,rt.jsx)("div",{className:"h-full overflow-hidden",children:(0,rt.jsx)(Io,{initialProjects:Et,initialEpics:Ye,initialSprints:$e,initialTasks:ye,initialColleagues:ut,initialUsers:W,onAddTask:za,onUpdateTask:Kt,onDeleteTask:Va,onTaskClick:ma,onAddEpic:Ha,onAddComment:at})}),yt==="planning"&&(0,rt.jsx)("div",{className:"hidden md:block h-full",children:(0,rt.jsx)(zo,{tasks:ye,epics:Ye,sprints:$e,onUpdateTask:Kt,onTaskClick:ma,onAddSprint:or,onUpdateSprint:rr,onDeleteSprint:ir})}),yt==="tasks"&&(0,rt.jsx)("div",{className:"h-full",children:(0,rt.jsx)(Vo,{initialReminders:Ot,initialColleagues:ut,onAddReminder:dr,onUpdateReminder:cr,onDeleteReminder:mr})}),yt==="files"&&(0,rt.jsx)("div",{className:"h-full",children:(0,rt.jsx)(La,{initialFiles:we,onFileAdd:pr,onFileEdit:ur,onFileDelete:gr,onFileClick:fr,compactView:!1})}),yt==="epics"&&(0,rt.jsx)("div",{className:"h-full",children:(0,rt.jsx)(Ao,{tasks:ye,epics:Ye,sprints:$e,onUpdateTask:Kt,onTaskClick:ma,onAddTaskToEpic:nr,onAddEpic:er,onUpdateEpic:tr,onDeleteEpic:ar})}),(0,rt.jsx)(Yt,{isOpen:k,onClose:lr,onAddTask:za,epics:Ye,sprints:$e,assignees:[...ut,...W],defaultEpicId:zt||void 0}),(0,rt.jsx)(oa,{isOpen:J,onClose:()=>Ne(!1),onAddEpic:Ha})]})}
5
+ "use strict";"use client";var vr=Object.create;var qt=Object.defineProperty;var br=Object.getOwnPropertyDescriptor;var hr=Object.getOwnPropertyNames;var xr=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty;var wr=(e,t)=>{for(var a in t)qt(e,a,{get:t[a],enumerable:!0})},Ua=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of hr(t))!yr.call(e,r)&&r!==a&&qt(e,r,{get:()=>t[r],enumerable:!(o=br(t,r))||o.enumerable});return e};var de=(e,t,a)=>(a=e!=null?vr(xr(e)):{},Ua(t||!e||!e.__esModule?qt(a,"default",{value:e,enumerable:!0}):a,e)),Nr=e=>Ua(qt({},"__esModule",{value:!0}),e);var Ei={};wr(Ei,{default:()=>Xo});module.exports=Nr(Ei);var ae=require("react");var rt=require("lucide-react"),ot=require("react/jsx-runtime"),Cr=[{key:"kanban",icon:rt.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:rt.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:rt.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:rt.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:rt.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],$a=({currentView:e,onViewChange:t,children:a})=>(0,ot.jsxs)("div",{className:"flex w-full h-screen",children:[(0,ot.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Cr.map(o=>{let r=o.icon,n=e===o.key;return(0,ot.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${n?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,ot.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,ot.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,ot.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,ot.jsx)("div",{className:"w-full h-full",children:a})})]});var Ya=require("class-variance-authority");var Za=require("clsx");var ga="-",Sr=e=>{let t=Tr(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let i=c.split(ga);return i[0]===""&&i.length!==1&&i.shift(),Wa(i,t)||Dr(c)},getConflictingClassGroupIds:(c,i)=>{let u=a[c]||[];return i&&o[c]?[...u,...o[c]]:u}}},Wa=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Wa(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let n=e.join(ga);return t.validators.find(({validator:c})=>c(n))?.classGroupId},Ga=/^\[(.+)\]$/,Dr=e=>{if(Ga.test(e)){let t=Ga.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Tr=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Pr(Object.entries(e.classGroups),a).forEach(([n,c])=>{ua(c,o,n,t)}),o},ua=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let n=r===""?t:ja(t,r);n.classGroupId=a;return}if(typeof r=="function"){if(kr(r)){ua(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([n,c])=>{ua(c,ja(t,n),a,o)})})},ja=(e,t)=>{let a=e;return t.split(ga).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},kr=e=>e.isThemeGetter,Pr=(e,t)=>t?e.map(([a,o])=>{let r=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,i])=>[t+c,i])):n);return[a,r]}):e,Rr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(n,c)=>{a.set(n,c),t++,t>e&&(t=0,o=a,a=new Map)};return{get(n){let c=a.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return r(n,c),c},set(n,c){a.has(n)?a.set(n,c):r(n,c)}}},_a="!",Er=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],n=t.length,c=i=>{let u=[],p=0,l=0,g;for(let b=0;b<i.length;b++){let v=i[b];if(p===0){if(v===r&&(o||i.slice(b,b+n)===t)){u.push(i.slice(l,b)),l=b+n;continue}if(v==="/"){g=b;continue}}v==="["?p++:v==="]"&&p--}let R=u.length===0?i:i.substring(l),w=R.startsWith(_a),y=w?R.substring(1):R,L=g&&g>l?g-l:void 0;return{modifiers:u,hasImportantModifier:w,baseClassName:y,maybePostfixModifierPosition:L}};return a?i=>a({className:i,parseClassName:c}):c},Ar=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},Ir=e=>({cache:Rr(e.cacheSize),parseClassName:Er(e),...Sr(e)}),Mr=/\ot+/,Fr=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,n=[],c=e.trim().split(Mr),i="";for(let u=c.length-1;u>=0;u-=1){let p=c[u],{modifiers:l,hasImportantModifier:g,baseClassName:R,maybePostfixModifierPosition:w}=a(p),y=!!w,L=o(y?R.substring(0,w):R);if(!L){if(!y){i=p+(i.length>0?" "+i:i);continue}if(L=o(R),!L){i=p+(i.length>0?" "+i:i);continue}y=!1}let b=Ar(l).join(":"),v=g?b+_a:b,z=v+L;if(n.includes(z))continue;n.push(z);let j=r(L,y);for(let X=0;X<j.length;++X){let N=j[X];n.push(v+N)}i=p+(i.length>0?" "+i:i)}return i};function Lr(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ka(t))&&(o&&(o+=" "),o+=a);return o}var Ka=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ka(e[o]))&&(a&&(a+=" "),a+=t);return a};function Br(e,...t){let a,o,r,n=c;function c(u){let p=t.reduce((l,g)=>g(l),e());return a=Ir(p),o=a.cache.get,r=a.cache.set,n=i,i(u)}function i(u){let p=o(u);if(p)return p;let l=Fr(u,a);return r(u,l),l}return function(){return n(Lr.apply(null,arguments))}}var oe=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},qa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Or=/^\ot+\/\ot+$/,zr=new Set(["px","full","screen"]),Vr=/^(\ot+(\.\ot+)?)?(xs|sm|md|lg|xl)$/,Hr=/\ot+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ur=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$r=/^(inset_)?-?((\ot+)?\.?(\ot+)[a-z]+|0)_-?((\ot+)?\.?(\ot+)[a-z]+|0)/,Gr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,it=e=>At(e)||zr.has(e)||Or.test(e),ut=e=>It(e,"length",Zr),At=e=>!!e&&!Number.isNaN(Number(e)),pa=e=>It(e,"number",At),Ht=e=>!!e&&Number.isInteger(Number(e)),jr=e=>e.endsWith("%")&&At(e.slice(0,-1)),B=e=>qa.test(e),gt=e=>Vr.test(e),Wr=new Set(["length","size","percentage"]),_r=e=>It(e,Wr,Ja),Kr=e=>It(e,"position",Ja),qr=new Set(["image","url"]),Jr=e=>It(e,qr,Qr),Xr=e=>It(e,"",Yr),Ut=()=>!0,It=(e,t,a)=>{let o=qa.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Zr=e=>Hr.test(e)&&!Ur.test(e),Ja=()=>!1,Yr=e=>$r.test(e),Qr=e=>Gr.test(e);var ei=()=>{let e=oe("colors"),t=oe("spacing"),a=oe("blur"),o=oe("brightness"),r=oe("borderColor"),n=oe("borderRadius"),c=oe("borderSpacing"),i=oe("borderWidth"),u=oe("contrast"),p=oe("grayscale"),l=oe("hueRotate"),g=oe("invert"),R=oe("gap"),w=oe("gradientColorStops"),y=oe("gradientColorStopPositions"),L=oe("inset"),b=oe("margin"),v=oe("opacity"),z=oe("padding"),j=oe("saturate"),X=oe("scale"),N=oe("sepia"),$=oe("skew"),Q=oe("space"),O=oe("translate"),pe=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],Se=()=>["auto",B,t],M=()=>[B,t],k=()=>["",it,ut],Z=()=>["auto",At,B],Ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ue=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_e=()=>["start","end","center","between","around","evenly","stretch"],Ze=()=>["","0",B],et=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>[At,B];return{cacheSize:500,separator:":",theme:{colors:[Ut],spacing:[it,ut],blur:["none","",gt,B],brightness:he(),borderColor:[e],borderRadius:["none","","full",gt,B],borderSpacing:M(),borderWidth:k(),contrast:he(),grayscale:Ze(),hueRotate:he(),invert:Ze(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[jr,ut],inset:Se(),margin:Se(),opacity:he(),padding:M(),saturate:he(),scale:he(),sepia:Ze(),skew:he(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",B]}],container:["container"],columns:[{columns:[gt]}],"break-after":[{"break-after":et()}],"break-before":[{"break-before":et()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ie(),B]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:pe()}],"overscroll-x":[{"overscroll-x":pe()}],"overscroll-y":[{"overscroll-y":pe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[L]}],"inset-x":[{"inset-x":[L]}],"inset-y":[{"inset-y":[L]}],start:[{start:[L]}],end:[{end:[L]}],top:[{top:[L]}],right:[{right:[L]}],bottom:[{bottom:[L]}],left:[{left:[L]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ht,B]}],basis:[{basis:Se()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",B]}],grow:[{grow:Ze()}],shrink:[{shrink:Ze()}],order:[{order:["first","last","none",Ht,B]}],"grid-cols":[{"grid-cols":[Ut]}],"col-start-end":[{col:["auto",{span:["full",Ht,B]},B]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Ut]}],"row-start-end":[{row:["auto",{span:[Ht,B]},B]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",B]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",B]}],gap:[{gap:[R]}],"gap-x":[{"gap-x":[R]}],"gap-y":[{"gap-y":[R]}],"justify-content":[{justify:["normal",..._e()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._e(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._e(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[z]}],px:[{px:[z]}],py:[{py:[z]}],ps:[{ps:[z]}],pe:[{pe:[z]}],pt:[{pt:[z]}],pr:[{pr:[z]}],pb:[{pb:[z]}],pl:[{pl:[z]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[Q]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Q]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",B,t]}],"min-w":[{"min-w":[B,t,"min","max","fit"]}],"max-w":[{"max-w":[B,t,"none","full","min","max","fit","prose",{screen:[gt]},gt]}],h:[{h:[B,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[B,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gt,ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pa]}],"font-family":[{font:[Ut]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",B]}],"line-clamp":[{"line-clamp":["none",At,pa]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",it,B]}],"list-image":[{"list-image":["none",B]}],"list-style-type":[{list:["none","disc","decimal",B]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","ot-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",it,ut]}],"underline-offset":[{"underline-offset":["auto",it,B]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ie(),Kr]}],"bg-repeat":[{bg:["ot-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_r]}],"bg-image":[{bg:["none",{"gradient-rt":["t","tr","r","br","b","bl","l","tl"]},Jr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-rt-pos":[{rt:[y]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-rt":[{rt:[w]}],rounded:[{rounded:[n]}],"rounded-ot":[{"rounded-ot":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-ot":[{"border-ot":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...ue(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:ue()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-ot":[{"border-ot":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...ue()]}],"outline-offset":[{"outline-offset":[it,B]}],"outline-w":[{outline:[it,ut]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[it,ut]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gt,Xr]}],"shadow-color":[{shadow:[Ut]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",gt,B]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[l]}],invert:[{invert:[g]}],saturate:[{saturate:[j]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[l]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",B]}],duration:[{duration:he()}],ease:[{ease:["linear","in","out","in-out",B]}],delay:[{delay:he()}],animate:[{animate:["none","spin","ping","pulse","bounce",B]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[X]}],"scale-x":[{"scale-x":[X]}],"scale-y":[{"scale-y":[X]}],rotate:[{rotate:[Ht,B]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",B]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","ot-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","ot-resize","w-resize","ot-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[it,ut,pa]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-ot","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-ot":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-ot","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-ot","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Xa=Br(ei);function h(...e){return Xa((0,Za.clsx)(e))}var ti=(0,Ya.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function se({className:e,variant:t,...a}){return(0,ot.jsx)("div",{className:h(ti({variant:t}),e),...a})}var Nt=de(require("react"));var re=Nt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)("div",{ref:a,className:h("rounded-xl border bg-card text-card-foreground shadow",e),...t}));re.displayName="Card";var ai=Nt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)("div",{ref:a,className:h("flex flex-col space-y-1.5 p-6",e),...t}));ai.displayName="CardHeader";var oi=Nt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)("div",{ref:a,className:h("font-semibold leading-none tracking-tight",e),...t}));oi.displayName="CardTitle";var ri=Nt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)("div",{ref:a,className:h("text-sm text-muted-foreground",e),...t}));ri.displayName="CardDescription";var Mt=Nt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)("div",{ref:a,className:h("p-6 pt-0",e),...t}));Mt.displayName="CardContent";var ii=Nt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)("div",{ref:a,className:h("flex items-center p-6 pt-0",e),...t}));ii.displayName="CardFooter";var eo=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:n=!1,height:c})=>{let i=l=>{l.preventDefault()},u=l=>{l.preventDefault(),r(t)};return(0,ot.jsxs)(re,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${n?"lg:max-w-xs":""}`,style:{height:c||"calc(100vh - 350px)"},onDragOver:i,onDrop:u,children:[(0,ot.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,ot.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${n?"text-base":"text-lg"}`,children:e}),(0,ot.jsx)(se,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,ot.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var $t=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let n=l=>{a(e)},c=()=>{o(e)},i=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},u=()=>{switch(e.type){case"story":return(0,ot.jsx)(rt.BookOpen,{className:"h-3 w-3"});case"bug":return(0,ot.jsx)(rt.Bug,{className:"h-3 w-3"});case"spike":return(0,ot.jsx)(rt.Zap,{className:"h-3 w-3"});case"task":default:return(0,ot.jsx)(rt.AlertCircle,{className:"h-3 w-3"})}},p=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return r?(0,ot.jsx)(re,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:n,onClick:c,children:(0,ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ot.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:u()}),(0,ot.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,ot.jsxs)(re,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:n,onClick:c,children:[(0,ot.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ot.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[u(),(0,ot.jsx)("span",{className:"capitalize",children:e.type})]}),(0,ot.jsxs)("div",{className:"flex gap-1",children:[(0,ot.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${i()}`,children:e.priority}),(0,ot.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,ot.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,ot.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,ot.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,ot.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ot.jsx)(rt.User,{className:"h-4 w-4"}),(0,ot.jsx)("span",{children:e.assignee?.value?.name})]}),(0,ot.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ot.jsx)(rt.Calendar,{className:"h-4 w-4"}),(0,ot.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var Gt=de(require("react")),ye=de(require("@radix-ui/react-dialog"));var qe=ye.Root;var ni=ye.Portal;var ao=Gt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(ye.Overlay,{ref:a,className:h("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ao.displayName=ye.Overlay.displayName;var ze=Gt.forwardRef(({className:e,children:t,...a},o)=>(0,ot.jsxs)(ni,{children:[(0,ot.jsx)(ao,{}),(0,ot.jsxs)(ye.Content,{ref:o,className:h("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-rt-left-1/2 data-[state=closed]:slide-out-rt-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,ot.jsxs)(ye.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,ot.jsx)(rt.X,{className:"h-4 w-4"}),(0,ot.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ze.displayName=ye.Content.displayName;var Ve=({className:e,...t})=>(0,ot.jsx)("div",{className:h("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ve.displayName="DialogHeader";var jt=({className:e,...t})=>(0,ot.jsx)("div",{className:h("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});jt.displayName="DialogFooter";var He=Gt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(ye.Title,{ref:a,className:h("text-lg font-semibold leading-none tracking-tight",e),...t}));He.displayName=ye.Title.displayName;var si=Gt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(ye.Description,{ref:a,className:h("text-sm text-muted-foreground",e),...t}));si.displayName=ye.Description.displayName;var oo=require("@radix-ui/react-slot"),io=de(require("react")),Jt=(0,Ya.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),C=io.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},n)=>(0,ot.jsx)(e?oo.Slot:"button",{className:h(Jt({className:t,size:a,variant:o})),ref:n,...r}));C.displayName="Button";var so=de(require("react"));var _=so.forwardRef(({className:e,type:t,...a},o)=>(0,ot.jsx)("input",{type:t,className:h("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));_.displayName="Input";var co=de(require("react")),De=co.forwardRef(({className:e,...t},a)=>(0,ot.jsx)("textarea",{className:h("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background 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",e),ref:a,...t}));De.displayName="Textarea";var V=de(require("@radix-ui/react-select")),ft=de(require("react")),Re=V.Root;var Je=V.Value,Te=ft.forwardRef(({children:e,className:t,...a},o)=>(0,ot.jsxs)(V.Trigger,{className:h("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,ot.jsx)(V.Icon,{asChild:!0,children:(0,ot.jsx)(rt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Te.displayName=V.Trigger.displayName;var po=ft.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(V.ScrollUpButton,{className:h("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,ot.jsx)(rt.ChevronUp,{className:"h-4 w-4"})}));po.displayName=V.ScrollUpButton.displayName;var uo=ft.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(V.ScrollDownButton,{className:h("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,ot.jsx)(rt.ChevronDown,{className:"h-4 w-4"})}));uo.displayName=V.ScrollDownButton.displayName;var ke=ft.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,ot.jsx)(V.Portal,{children:(0,ot.jsxs)(V.Content,{className:h("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:r,...o,children:[(0,ot.jsx)(po,{}),(0,ot.jsx)(V.Viewport,{className:h("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,ot.jsx)(uo,{})]})}));ke.displayName=V.Content.displayName;var li=ft.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(V.Label,{className:h("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));li.displayName=V.Label.displayName;var ie=ft.forwardRef(({children:e,className:t,...a},o)=>(0,ot.jsxs)(V.Item,{className:h("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,ot.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ot.jsx)(V.ItemIndicator,{children:(0,ot.jsx)(rt.Check,{className:"h-4 w-4"})})}),(0,ot.jsx)(V.ItemText,{children:e})]}));ie.displayName=V.Item.displayName;var di=ft.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(V.Separator,{className:h("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));di.displayName=V.Separator.displayName;var go=de(require("react")),fa=de(require("@radix-ui/react-label"));var ci=(0,Ya.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),P=go.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(fa.Root,{ref:a,className:h(ci(),e),...t}));P.displayName=fa.Root.displayName;var Tt=de(require("react")),Ft=de(require("@radix-ui/react-toggle-group"));var bo=de(require("react")),va=de(require("@radix-ui/react-toggle"));var ba=(0,Ya.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),mi=bo.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,ot.jsx)(va.Root,{ref:r,className:h(ba({variant:t,size:a,className:e})),...o}));mi.displayName=va.Root.displayName;var yo=Tt.createContext({size:"default",variant:"default"}),kt=Tt.forwardRef(({className:e,variant:t,size:a,children:o,...r},n)=>(0,ot.jsx)(Ft.Root,{ref:n,className:h("flex items-center justify-center gap-1",e),...r,children:(0,ot.jsx)(yo.Provider,{value:{variant:t,size:a},children:o})}));kt.displayName=Ft.Root.displayName;var Pt=Tt.forwardRef(({className:e,children:t,variant:a,size:o,...r},n)=>{let c=Tt.useContext(yo);return(0,ot.jsx)(Ft.Item,{ref:n,className:h(ba({variant:c.variant||a,size:c.size||o}),e),...r,children:t})});Pt.displayName=Ft.Item.displayName;var pi=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:rt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:rt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:rt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:rt.Zap}],ui=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Zt=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,assignees:n,defaultEpicId:c})=>{let[i,u]=(0,ae.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epicId:"",sprintId:"none",assignee:""});(0,ae.useEffect)(()=>{e&&c&&u(g=>({...g,epicId:c}))},[e,c]),(0,ae.useEffect)(()=>{e&&u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epicId:c||"",sprintId:"none",assignee:""})},[e]);let p=g=>{g.preventDefault(),i.name.trim()&&(a({name:i.name.trim(),description:i.description.trim(),status:"todo",priority:i.priority,type:i.type,storyPoints:i.storyPoints,epic:Number(i.epicId),sprint:Number(i.sprintId),assignee:i.assignee.trim()?{relationTo:"digital-colleagues",value:Number(i.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epicId:c||"",sprintId:"none",assignee:""}),t())},l=(g,R)=>{u(w=>({...w,[g]:R}))};return(0,ot.jsx)(qe,{open:e,onOpenChange:t,children:(0,ot.jsxs)(ze,{className:"sm:max-w-md",children:[(0,ot.jsx)(Ve,{children:(0,ot.jsx)(He,{children:"Add New Task"})}),(0,ot.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{htmlFor:"name",children:"Task Title"}),(0,ot.jsx)(_,{id:"name",value:i.name,onChange:g=>l("name",g.target.value),placeholder:"Enter task title",required:!0})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{htmlFor:"description",children:"Description"}),(0,ot.jsx)(De,{id:"description",value:i.description,onChange:g=>l("description",g.target.value),placeholder:"Enter task description",rows:3})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{children:"Type"}),(0,ot.jsx)(kt,{type:"single",value:i.type||"",onValueChange:g=>g&&l("type",g),children:pi.map(g=>{let R=g.icon;return(0,ot.jsxs)(Pt,{value:g.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,ot.jsx)(R,{className:"h-4 w-4"}),g.label]},g.value)})})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{children:"Priority"}),(0,ot.jsx)(kt,{type:"single",value:i.priority||"",onValueChange:g=>g&&l("priority",g),children:ui.map(g=>(0,ot.jsx)(Pt,{value:g.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:g.label},g.value))})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{htmlFor:"points",children:"Story Points"}),(0,ot.jsx)(_,{id:"points",type:"number",min:"1",max:"100",value:i.storyPoints,onChange:g=>l("storyPoints",parseInt(g.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{htmlFor:"epic",children:"Epic"}),(0,ot.jsxs)(Re,{value:i.epicId,onValueChange:g=>l("epicId",g),children:[(0,ot.jsx)(Te,{children:(0,ot.jsx)(Je,{placeholder:"Select an epic"})}),(0,ot.jsx)(ke,{children:o.map(g=>(0,ot.jsx)(ie,{value:g.id.toString(),children:(0,ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ot.jsx)("div",{className:`w-3 h-3 rounded-full ${g.color}`}),g.name]})},g.id))})]})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,ot.jsxs)(Re,{value:i.sprintId,onValueChange:g=>l("sprintId",g),children:[(0,ot.jsx)(Te,{children:(0,ot.jsx)(Je,{placeholder:"Select a sprint"})}),(0,ot.jsxs)(ke,{children:[(0,ot.jsx)(ie,{value:"none",children:"ae Sprint"}),r.map(g=>(0,ot.jsx)(ie,{value:g.id.toString(),children:(0,ot.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{htmlFor:"sprint",children:"Assignee"}),(0,ot.jsxs)(Re,{value:i.assignee,onValueChange:g=>l("assignee",g),children:[(0,ot.jsx)(Te,{children:(0,ot.jsx)(Je,{placeholder:"Select an Assignee"})}),(0,ot.jsxs)(ke,{children:[(0,ot.jsx)(ie,{value:"none",children:"ae Assignee"}),n.map(g=>(0,ot.jsx)(ie,{value:g.id.toString(),children:(0,ot.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,ot.jsxs)(jt,{children:[(0,ot.jsx)(C,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,ot.jsx)(C,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var xa=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:n="",disabled:c=!1})=>{let[i,u]=(0,ae.useState)(!1),[p,l]=(0,ae.useState)(""),g=()=>{c||(u(!0),l(t))},R=async()=>{p!==t&&await r(e,p),u(!1)},w=y=>{y.key==="Enter"&&!o||y.key==="Enter"&&y.ctrlKey&&o?R():y.key==="Escape"&&(u(!1),l(""))};return(0,ot.jsxs)("div",{className:`space-y-2 ${n}`,children:[(0,ot.jsx)(P,{children:a}),i?o?(0,ot.jsx)(De,{value:p,onChange:y=>l(y.target.value),onBlur:R,onKeyDown:w,autoFocus:!0,rows:4,className:"resize-none"}):(0,ot.jsx)(_,{value:p,onChange:y=>l(y.target.value),onBlur:R,onKeyPress:w,autoFocus:!0,className:"text-lg font-medium"}):(0,ot.jsxs)("div",{onClick:g,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,ot.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click rt edit..."}),!c&&(0,ot.jsx)(rt.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Yt=de(require("react")),st=de(require("@radix-ui/react-avatar"));var ya=Yt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(st.Root,{ref:a,className:h("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ya.displayName=st.Root.displayName;var gi=Yt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(st.Image,{ref:a,className:h("aspect-square h-full w-full",e),...t}));gi.displayName=st.Image.displayName;var wa=Yt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(st.Fallback,{ref:a,className:h("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));wa.displayName=st.Fallback.displayName;var Co=({comments:e,onAddComment:t})=>{let[a,o]=(0,ae.useState)(""),r=c=>c.split(" ").map(i=>i[0]).join("").toUpperCase(),n=()=>{a.trim()&&(t(a),o(""))};return(0,ot.jsxs)("div",{className:"space-y-4",children:[(0,ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ot.jsx)(rt.MessageSquare,{className:"h-5 w-5"}),(0,ot.jsx)(P,{className:"text-lg font-medium",children:"Comments"}),(0,ot.jsx)(se,{variant:"secondary",children:e.length})]}),(0,ot.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(c=>(0,ot.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,ot.jsx)(ya,{className:"h-8 w-8 mt-1",children:(0,ot.jsx)(wa,{className:"text-xs bg-muted text-muted-foreground",children:r(c.author)})}),(0,ot.jsxs)("div",{className:"flex-1",children:[(0,ot.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ot.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,ot.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c.createdAt.toLocaleDateString()," at ",c.createdAt.toLocaleTimeString()]})]}),(0,ot.jsx)("p",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,ot.jsxs)("div",{className:"flex gap-2",children:[(0,ot.jsx)(De,{value:a,onChange:c=>o(c.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,ot.jsx)(C,{onClick:n,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,ot.jsx)(rt.Send,{className:"h-4 w-4"})})]})]})};var ta=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:n=!1})=>{let[c,i]=(0,ae.useState)(!1),u=o.find(l=>l.value===t);return(0,ot.jsxs)("div",{className:"space-y-1",children:[(0,ot.jsx)(P,{className:"text-xs text-muted-foreground",children:e}),(0,ot.jsxs)(Re,{value:t,onValueChange:a,open:c,onOpenChange:l=>{n||i(l)},disabled:n,children:[(0,ot.jsx)(Te,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,ot.jsxs)(se,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&i(!c),children:[r&&u?.color&&(0,ot.jsx)("div",{className:`w-2 h-2 rounded-full ${u.color} mr-1`}),u?.label||"Select..."]})}),(0,ot.jsx)(ke,{children:o.map(l=>(0,ot.jsx)(ie,{value:l.value,children:r&&l.color?(0,ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ot.jsx)("div",{className:`w-3 h-3 rounded-full ${l.color}`}),l.label]}):l.label},l.value))})]})]})};var Do=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:n=!1,disabled:c=!1})=>{let[i,u]=(0,ae.useState)(!1),[p,l]=(0,ae.useState)(""),g=o.find(b=>b.value===t),R=o.filter(b=>b.label.toLowerCase().includes(p.toLowerCase())),w=b=>{a(b),u(!1),l("")},y=()=>{n&&p.trim()&&!o.find(b=>b.value===p.trim())&&(a(p.trim()),u(!1),l(""))};return(0,$e.jsxs)("div",{className:"space-y-1",children:[(0,$e.jsx)(P,{className:"text-xs text-muted-foreground",children:e}),(0,$e.jsxs)(Re,{value:t,onValueChange:w,open:i,onOpenChange:b=>{c||u(b)},disabled:c,children:[(0,$e.jsx)(Te,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,$e.jsx)(se,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&u(!i),children:g?.label||t||"Select..."})}),(0,$e.jsxs)(ke,{children:[(0,$e.jsx)("div",{className:"p-2",children:(0,$e.jsx)(_,{placeholder:r,value:p,onChange:b=>l(b.target.value),onKeyDown:b=>{b.key==="Enter"&&n&&y()},className:"mb-2"})}),R.map(b=>(0,$e.jsx)(ie,{value:b.value,children:b.label},b.value)),n&&p.trim()&&!R.find(b=>b.value===p.trim())&&(0,$e.jsxs)(ie,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var me=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var fi=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:rt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:rt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:rt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:rt.Zap}],vi=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var To=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:n,onDelete:c,isUpdating:i=!1,isDeleting:u=!1,deleteState:p="idle",teamMembers:l})=>{let[g,R]=(0,ae.useState)(e.storyPoints),w=(0,ae.useRef)(null),y=(0,ae.useCallback)((v,z)=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{r(v,z)},500)},[r]);(0,ae.useEffect)(()=>{y("storyPoints",g?.toString()||"1")},[g]);let L=v=>v.split(" ").map(z=>z[0]).join("").toUpperCase(),b=()=>p==="loading"?(0,ot.jsxs)(C,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,ot.jsx)(rt.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,ot.jsxs)(C,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,ot.jsx)(rt.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,ot.jsxs)(C,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,ot.jsx)(rt.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,ot.jsxs)(C,{onClick:c,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:i||u,children:[(0,ot.jsx)(rt.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,ot.jsxs)("div",{className:"flex flex-col h-full",children:[(0,ot.jsxs)("div",{className:"space-y-4",style:{opacity:i?.6:1},children:[(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{className:"text-xs text-muted-foreground",children:"Status"}),(0,ot.jsx)(ta,{label:"",value:e.status,onValueChange:v=>r("status",v),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:i})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{className:"text-xs text-muted-foreground",children:"Type"}),(0,ot.jsx)(kt,{type:"single",value:e.type||"",onValueChange:v=>v&&r("type",v),className:"grid grid-cols-2 gap-1",disabled:i,children:fi.map(v=>{let z=v.icon;return(0,ot.jsxs)(Pt,{value:v.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:i,children:[(0,ot.jsx)(z,{className:"h-3 w-3"}),v.label]},v.value)})})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,ot.jsx)(kt,{type:"single",value:e.priority||"",onValueChange:v=>v&&r("priority",v),className:"grid grid-cols-3 gap-1",disabled:i,children:vi.map(v=>(0,ot.jsx)(Pt,{value:v.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:i,children:v.label},v.value))})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,ot.jsx)("input",{type:"number",min:"1",max:"100",value:g||1,onChange:v=>{let z=Number(v.target.value);z<1?R(1):z>100?R(100):R(z)},className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:i})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,ot.jsx)(ta,{label:"",value:me(e.epic).toString(),onValueChange:v=>r("epicId",v),options:(t||[]).map(v=>({value:v.id.toString(),label:v?.name,color:v.color})),showColor:!0,disabled:i})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,ot.jsx)(ta,{label:"",value:me(e.sprint).toString()||"none",onValueChange:v=>r("sprintId",v==="none"?"":v),options:[{value:"none",label:"ae Sprint"},...(a||[]).map(v=>({value:v.id.toString(),label:`${v?.name}`}))],disabled:i})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,ot.jsx)(Do,{label:"",value:e.assignee?.value?.name,onValueChange:v=>r("assignee",v),options:l.map(v=>({value:`${typeof v.email=="string"?"users":"digital-colleagues"}:${v.id}`,label:v?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:i})]})]}),(0,ot.jsxs)("div",{className:"mt-auto pt-4 space-y-4",children:[(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(C,{onClick:n,variant:"outline",className:"w-full h-8 text-xs",disabled:i||u,children:"Close"}),b()]}),(0,ot.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,ot.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ot.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,ot.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ot.jsx)(rt.User,{className:"h-3 w-3"}),(0,ot.jsx)("span",{children:"System"})]})]}),(0,ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ot.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,ot.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ot.jsx)(rt.Calendar,{className:"h-3 w-3"}),(0,ot.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ot.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,ot.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ot.jsx)(rt.Clock,{className:"h-3 w-3"}),(0,ot.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var ko=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:r,onUpdateTask:n,onDeleteTask:c,onAddComment:i,colleagues:u})=>{let[p,l]=(0,ae.useState)(a),[g,R]=(0,ae.useState)(new Date),[w,y]=(0,ae.useState)("idle"),[L,b]=(0,ae.useState)("idle"),[v,z]=(0,ae.useState)([]);(0,ae.useEffect)(()=>{l(a)},[a]);let j=async(U,Se)=>{if(Se!==p[U]){y("loading");try{let M=await n(p.id.toString(),{[U]:Se});l(M),R(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch(M){console.log("error",M),y("error"),setTimeout(()=>y("idle"),3e3)}}},X=async(U,Se)=>{if(Se!==p[U]){y("loading");try{let M=await n(p.id.toString(),{[U]:Se});l(M),R(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},N=async U=>{if(i){y("loading");try{let Se=await i?.({content:U,taskId:p.id.toString()});l(Se),R(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},$=async()=>{b("loading");try{await c(p.id.toString()),b("success"),setTimeout(()=>{t(),b("idle")},1e3)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}},Q=w!=="loading"&&L!=="loading",O=()=>{Q&&t()},pe=()=>w==="loading"?(0,ot.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,ot.jsx)(rt.Loader2,{className:"h-4 w-4 animate-spin"}),(0,ot.jsx)("span",{children:"Updating..."})]}):w==="success"?(0,ot.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,ot.jsx)(rt.Check,{className:"h-4 w-4"}),(0,ot.jsx)("span",{children:"Updated successfully"})]}):w==="error"?(0,ot.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,ot.jsx)(rt.X,{className:"h-4 w-4"}),(0,ot.jsx)("span",{children:"Update failed"})]}):null;return(0,ot.jsx)(qe,{open:e,onOpenChange:O,children:(0,ot.jsxs)(ze,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,ot.jsxs)(Ve,{children:[(0,ot.jsx)(He,{className:"sr-only",children:p.name}),(0,ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ot.jsx)("div",{className:"flex-1",children:pe()}),!Q&&(0,ot.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,ot.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,ot.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,ot.jsx)(xa,{fieldName:"name",value:p.name||"",label:"",onSave:j,className:"border-b border-border pb-3",disabled:w==="loading"}),(0,ot.jsx)(xa,{fieldName:"description",value:p.description||"",label:"Description",multiline:!0,onSave:j,disabled:w==="loading"}),(0,ot.jsx)(Co,{comments:(p?.comments||[]).map(U=>({author:U.author.value.name||"",createdAt:new Date(U.timestamp),text:U.text,id:U.id||""})),onAddComment:N})]}),(0,ot.jsx)(To,{task:p,epics:o,sprints:r,lastUpdated:g,onUpdateTask:X,onClose:O,onDelete:$,isUpdating:w==="loading",isDeleting:L==="loading",deleteState:L,teamMembers:u})]})]})})};var aa=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,ae.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("ot")[0],endDate:new Date().toISOString().split("ot")[0],progress:0}),n=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],c=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],i=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],u=l=>{l.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("ot")[0],endDate:new Date().toISOString().split("ot")[0],progress:0}),t())},p=(l,g)=>{r(R=>({...R,[l]:g}))};return(0,ot.jsx)(qe,{open:e,onOpenChange:t,children:(0,ot.jsxs)(ze,{className:"sm:max-w-md",children:[(0,ot.jsx)(Ve,{children:(0,ot.jsx)(He,{children:"Add New Epic"})}),(0,ot.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{htmlFor:"name",children:"Epic Name"}),(0,ot.jsx)(_,{id:"name",value:o.name,onChange:l=>p("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{htmlFor:"description",children:"Description"}),(0,ot.jsx)(De,{id:"description",value:o.description,onChange:l=>p("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{children:"Color"}),(0,ot.jsx)("div",{className:"flex gap-2 flex-wrap",children:n.map(l=>(0,ot.jsx)("button",{type:"button",onClick:()=>p("color",l),className:`w-8 h-8 rounded-full ${l} ${o.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,ot.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{children:"Confidence"}),(0,ot.jsxs)(Re,{value:o.confidence,onValueChange:l=>p("confidence",l),children:[(0,ot.jsx)(Te,{children:(0,ot.jsx)(Je,{})}),(0,ot.jsx)(ke,{children:c.map(l=>(0,ot.jsx)(ie,{value:l.value,children:l.label},l.value))})]})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{children:"Phase"}),(0,ot.jsxs)(Re,{value:o.phase.toString(),onValueChange:l=>p("phase",parseInt(l)),children:[(0,ot.jsx)(Te,{children:(0,ot.jsx)(Je,{})}),(0,ot.jsx)(ke,{children:i.map(l=>(0,ot.jsx)(ie,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,ot.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{children:"Start Date"}),(0,ot.jsx)(_,{type:"date",value:o.startDate,onChange:l=>p("startDate",l.target.value)})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{children:"End Date"}),(0,ot.jsx)(_,{type:"date",value:o.endDate,onChange:l=>p("endDate",l.target.value)})]})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{children:"Progress (%)"}),(0,ot.jsx)(_,{type:"number",min:"0",max:"100",value:o.progress,onChange:l=>p("progress",parseInt(l.target.value)||0)})]}),(0,ot.jsxs)(jt,{children:[(0,ot.jsx)(C,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,ot.jsx)(C,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var Eo=require("motion/react");function Ro(e,t){let[a,o]=(0,ae.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),r=n=>{try{o(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,ae.useEffect)(()=>{r(a)},[]),[a,r]}var ra=require("react-icons/fa");function Ye({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:n,children:c,className:i}){let[u,p]=Ro(`hero-section-minimized-${e.replace(/\ot+/g,"-").toLowerCase()}`,!r&&!t),l=!r&&!t||u;return(0,ot.jsxs)(Eo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${i||""}`,children:[(0,ot.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,ot.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,ot.jsx)(se,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,ot.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,ot.jsxs)("div",{className:"flex items-center gap-3",children:[l&&o&&(0,ot.jsx)(C,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,ot.jsx)("button",{"aria-label":u?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!u),style:{lineHeight:0},children:u?(0,ot.jsx)(ra.FaChevronDown,{size:22}):(0,ot.jsx)(ra.FaChevronUp,{size:22})})]})]}),!l&&(0,ot.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,ot.jsxs)("div",{className:"space-y-4",children:[(0,ot.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,ot.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,ot.jsx)(C,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,ot.jsx)(C,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),c&&(0,ot.jsx)("div",{className:"hidden lg:block",children:c})]})]})}var Ao=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:r=[],initialProjects:n=[],onAddTask:c,onUpdateTask:i,onDeleteTask:u,onTaskClick:p,onAddEpic:l,onAddComment:g})=>{let[R,w]=(0,ae.useState)(e),[y,L]=(0,ae.useState)(t),[b,v]=(0,ae.useState)(a),[z,j]=(0,ae.useState)(!1),[X,N]=(0,ae.useState)(!1),[$,Q]=(0,ae.useState)(null),[O,pe]=(0,ae.useState)(null),[U,Se]=(0,ae.useState)(o),[M,k]=(0,ae.useState)(r),[Z,Ie]=(0,ae.useState)(0),ue=(0,ae.useRef)(null),ee=(0,ae.useRef)(null),_e=y.filter(A=>!0).map(A=>A.id),Ze=b.find(A=>A.isSelected);_e.push(0),(0,ae.useEffect)(()=>{w(e)},[e]),(0,ae.useEffect)(()=>{L(t)},[t]),(0,ae.useEffect)(()=>{v(a)},[a]),(0,ae.useEffect)(()=>{let A=()=>{if(ue.current){let x=ue.current.offsetHeight;Ie(x)}};A();let K=new ResizeObserver(A);ue.current&&K.observe(ue.current);let m=()=>{setTimeout(A,100)};return window.addEventListener("storage",m),()=>{K.disconnect(),window.removeEventListener("storage",m)}},[]),(0,ae.useEffect)(()=>{let A=setTimeout(()=>{ue.current&&Ie(ue.current.offsetHeight)},300);return()=>clearTimeout(A)},[z,X]);let et=R.filter(A=>!0),he=A=>et.filter(K=>K.status===A),Be=A=>{let K={};return y.forEach(m=>{K[m.id]=A.filter(x=>me(x.epic)===m.id)}),K["ot-epic"]=A.filter(m=>!me(m.epic)),K},Ke=A=>{pe(A)},dt=A=>{O&&(w(K=>K.map(m=>m.id===O.id?{...m,status:A}:m)),i?.(O.id.toString(),{status:A}),pe(null))},tt=A=>{let K={...A,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};w(m=>[...m,K]),c?.(A)},ct=async(A,K)=>{if(w(x=>x.map(W=>W.id===Number(A)?{...W,...K}:W)),i)return await i(A,K);let m=R.find(x=>x.id===Number(A));if(!m)throw new Error("Task not found");return{...m,...K}},Ot=async A=>{w(K=>K.filter(m=>m.id!==Number(A))),$?.id===Number(A)&&Q(null),u&&await u(A)},mt=A=>{let K={...A,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};L(m=>[...m,K]),l?.(A)},yt=A=>{Q(A),p?.(A)},at=[{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"}],pt=Z>0?`calc(100vh - ${Z+120}px)`:"calc(100vh - 12rem)";return(0,ot.jsxs)("div",{ref:ee,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,ot.jsx)("div",{ref:ue,className:"flex-shrink-0",children:(0,ot.jsx)(Ye,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-rt-r from-purple-600 via-violet-600 rt-indigo-600",primaryAction:{label:"Add task",onClick:()=>j(!0)},secondaryAction:{label:"Add epic",onClick:()=>N(!0)}})}),(0,ot.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,ot.jsx)("div",{className:"h-full",style:{height:Z>0?`calc(100vh - ${Z+120}px)`:"calc(100vh - 12rem)"},children:(0,ot.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:at.map(A=>{let K=he(A.status),m=Be(K);return(0,ot.jsxs)(eo,{title:A.title,status:A.status,taskCount:K.length,onDrop:dt,isCompact:A.status==="done",height:pt,children:[m["ot-epic"].map(x=>(0,ot.jsx)($t,{epic:null,task:x,onDragStart:Ke,onTaskClick:yt,isCompact:A.status==="done"})),_e.map(x=>{let W=y.find(ge=>ge.id===x),q=m[x]||[];return q.length===0?null:(0,ot.jsxs)("div",{className:"mb-6",children:[(0,ot.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,ot.jsx)("div",{className:`w-3 h-3 rounded-full ${W?.color}`}),(0,ot.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:W?.name||"ae Epic"}),(0,ot.jsx)(se,{variant:"secondary",className:"text-xs",children:q.length})]})," ",(0,ot.jsx)("div",{className:"space-y-3",children:q.map(ge=>(0,ot.jsx)($t,{task:ge,epic:W,onDragStart:Ke,onTaskClick:yt,isCompact:A.status==="done"},ge.id))})]},x)})]},A.id)})})})}),(0,ot.jsx)(Zt,{isOpen:z,onClose:()=>j(!1),onAddTask:tt,assignees:[...M,...U],epics:y,sprints:b}),(0,ot.jsx)(aa,{isOpen:X,onClose:()=>N(!1),onAddEpic:mt}),$&&(0,ot.jsx)(ko,{isOpen:!!$,onClose:()=>Q(null),initialTask:$,epics:y,sprints:b,onUpdateTask:ct,onDeleteTask:Ot,colleagues:[...M,...U],onAddComment:g})]})};var Io=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:n,onAddEpic:c,onUpdateEpic:i,onDeleteEpic:u})=>{let[p,l]=(0,ae.useState)(null),[g,R]=(0,ae.useState)(null),[w,y]=(0,ae.useState)({}),[L,b]=(0,ae.useState)(0),v=(0,ae.useRef)(null),z=(0,ae.useRef)(null);(0,ae.useEffect)(()=>{let k=()=>{if(v.current){let ue=v.current.offsetHeight;b(ue)}};k();let Z=new ResizeObserver(k);v.current&&Z.observe(v.current);let Ie=()=>{setTimeout(k,100)};return window.addEventListener("storage",Ie),()=>{Z.disconnect(),window.removeEventListener("storage",Ie)}},[]),(0,ae.useEffect)(()=>{let k=setTimeout(()=>{v.current&&b(v.current.offsetHeight)},300);return()=>clearTimeout(k)},[g]);let j=k=>{l(k)},X=k=>{k.preventDefault()},N=(k,Z)=>{k.preventDefault(),p&&me(p.epic).toString()!==Z&&(o(p.id.toString(),{epic:Number(Z)}),l(null))},$=k=>e.filter(Z=>me(Z.epic).toString()===k),Q=k=>{R(k.id.toString()),y({name:k.name,description:k.description,confidence:k.confidence,phase:k.phase})},O=()=>{g&&w.name&&(i(g.toString(),w),R(null),y({}))},pe=()=>{R(null),y({})},U=k=>{window.confirm("Are you sure you want rt delete this epic? This will also delete all associated tasks.")&&u(k)},Se=k=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[k]||`Phase ${k}`,M=k=>{switch(k){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,ot.jsxs)("div",{ref:z,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,ot.jsx)("div",{ref:v,className:"flex-shrink-0",children:(0,ot.jsx)(Ye,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-rt-r from-rose-600 via-pink-600 rt-fuchsia-600",primaryAction:{label:"Add epic",onClick:c}})}),(0,ot.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,ot.jsx)("div",{className:"h-full overflow-y-auto",style:{height:L>0?`calc(100vh - ${L+120}px)`:"calc(100vh - 12rem)"},children:(0,ot.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:t.map(k=>{let Z=$(k.id.toString()),Ie=Z.reduce((ee,_e)=>ee+(_e.storyPoints||0),0),ue=L>0?`calc(100vh - ${L+200}px)`:"calc(100vh - 14rem)";return(0,ot.jsxs)(re,{className:`flex flex-col ${g===k.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:g===k.id.toString()?"auto":ue,minHeight:"400px"},onDragOver:X,onDrop:ee=>N(ee,k.id.toString()),children:[(0,ot.jsx)("div",{className:"p-4 border-b border-border",children:g===k.id.toString()?(0,ot.jsxs)("div",{className:"space-y-4",children:[(0,ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ot.jsx)(_,{value:w.name||"",onChange:ee=>y({...w,name:ee.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,ot.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,ot.jsx)(C,{size:"sm",variant:"ghost",onClick:O,className:"p-1 h-8 w-8",children:(0,ot.jsx)(rt.Check,{className:"h-4 w-4"})}),(0,ot.jsx)(C,{size:"sm",variant:"ghost",onClick:pe,className:"p-1 h-8 w-8",children:(0,ot.jsx)(rt.X,{className:"h-4 w-4"})})]})]}),(0,ot.jsx)(De,{value:w.description||"",onChange:ee=>y({...w,description:ee.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,ot.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,ot.jsxs)("div",{children:[(0,ot.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,ot.jsxs)("select",{value:w.confidence||k.confidence,onChange:ee=>y({...w,confidence:ee.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,ot.jsx)("option",{value:"low",children:"Low"}),(0,ot.jsx)("option",{value:"medium",children:"Medium"}),(0,ot.jsx)("option",{value:"high",children:"High"})]})]}),(0,ot.jsxs)("div",{children:[(0,ot.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,ot.jsx)("select",{value:w.phase?.toString()||k.phase.toString(),onChange:ee=>y({...w,phase:parseInt(ee.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(ee=>(0,ot.jsxs)("option",{value:ee.toString(),children:["Phase ",ee]},ee))})]})]})]}):(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,ot.jsx)("div",{className:`w-4 h-4 rounded-full ${k.color}`}),(0,ot.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:k.name}),(0,ot.jsxs)("div",{className:"flex gap-1",children:[(0,ot.jsx)(C,{size:"sm",variant:"ghost",onClick:()=>Q(k),className:"p-1 h-8 w-8",children:(0,ot.jsx)(rt.Edit2,{className:"h-3 w-3"})}),(0,ot.jsx)(C,{size:"sm",variant:"ghost",onClick:()=>U(k.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,ot.jsx)(rt.Trash2,{className:"h-3 w-3"})})]})]}),(0,ot.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,ot.jsxs)(se,{className:`text-xs ${M(k.confidence)}`,children:[k.confidence," confidence"]}),(0,ot.jsxs)(se,{variant:"outline",className:"text-xs",children:["Phase ",k.phase]}),(0,ot.jsxs)(se,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Z.length," tasks"]}),(0,ot.jsxs)(se,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Ie," pts"]})]}),k.description&&(0,ot.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:k.description}),(0,ot.jsxs)(C,{onClick:()=>n(k.id.toString()),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,ot.jsx)(rt.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,ot.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,ot.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${p?"border-primary bg-primary/10":"border-border"}`,children:Z.length===0?(0,ot.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,ot.jsx)(rt.Move,{className:"h-8 w-8 mb-2"}),(0,ot.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):Z.map(ee=>(0,ot.jsx)($t,{task:ee,epic:k,onDragStart:j,onTaskClick:r,isCompact:!0},ee.id))})})]},k.id)})})})})]})};var Mo=require("react-day-picker");function ia({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,ot.jsx)(Mo.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:h("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:h(Jt({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:h("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:h(Jt({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}ia.displayName="Calendar";var Lo=de(require("react")),Qe=de(require("@radix-ui/react-popover"));var Sa=Qe.Root,Da=Qe.Trigger;var na=Lo.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,ot.jsx)(Qe.Portal,{children:(0,ot.jsx)(Qe.Content,{ref:r,align:t,sideOffset:a,className:h("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));na.displayName=Qe.Content.displayName;var ka=require("date-fns");var Oo=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,ae.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),n=i=>{i.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},c=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,ot.jsx)(qe,{open:e,onOpenChange:c,children:(0,ot.jsxs)(ze,{className:"sm:max-w-md",children:[(0,ot.jsx)(Ve,{children:(0,ot.jsx)(He,{children:"Add New Sprint"})}),(0,ot.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{htmlFor:"name",children:"Sprint Name *"}),(0,ot.jsx)(_,{id:"name",value:o.name,onChange:i=>r(u=>({...u,name:i.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{htmlFor:"description",children:"Description"}),(0,ot.jsx)(De,{id:"description",value:o.description,onChange:i=>r(u=>({...u,description:i.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,ot.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{children:"Start Date *"}),(0,ot.jsxs)(Sa,{children:[(0,ot.jsx)(Da,{asChild:!0,children:(0,ot.jsxs)(C,{variant:"outline",className:h("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,ot.jsx)(rt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,ka.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,ot.jsx)(na,{className:"w-auto p-0",align:"start",children:(0,ot.jsx)(ia,{mode:"single",selected:o.startDate,onSelect:i=>r(u=>({...u,startDate:i})),initialFocus:!0})})]})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsx)(P,{children:"End Date *"}),(0,ot.jsxs)(Sa,{children:[(0,ot.jsx)(Da,{asChild:!0,children:(0,ot.jsxs)(C,{variant:"outline",className:h("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,ot.jsx)(rt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,ka.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,ot.jsx)(na,{className:"w-auto p-0",align:"start",children:(0,ot.jsx)(ia,{mode:"single",selected:o.endDate,onSelect:i=>r(u=>({...u,endDate:i})),initialFocus:!0,disabled:i=>o.startDate?i<o.startDate:!1})})]})]})]}),(0,ot.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,ot.jsx)(C,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,ot.jsx)(C,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var zo=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:n,onUpdateSprint:c,onDeleteSprint:i})=>{let[u,p]=(0,ae.useState)([]),[l,g]=(0,ae.useState)(new Set),[R,w]=(0,ae.useState)(null),[y,L]=(0,ae.useState)(!1),[b,v]=(0,ae.useState)(null),[z,j]=(0,ae.useState)(null),[X,N]=(0,ae.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[$,Q]=(0,ae.useState)("upcoming"),[O,pe]=(0,ae.useState)(!1),[U,Se]=(0,ae.useState)(0),M=(0,ae.useRef)(null),k=(0,ae.useRef)(null);(0,ae.useEffect)(()=>{let m=()=>{M.current&&Se(M.current.offsetHeight)};m();let x=new ResizeObserver(m);return M.current&&x.observe(M.current),()=>x.disconnect()},[]);let Z=m=>t.find(x=>x.id===Number(m)),Ie=m=>a.find(x=>x.id===Number(m)),ue=m=>{let x={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 x[m]||x.medium},ee=m=>{let x=m.trim().split(" ");if(x.length===1)return x[0];let W=x[0],q=x[x.length-1][0].toUpperCase();return`${W} ${q}`},_e=m=>{let x={},W=[];return m.forEach(q=>{q.epic?(x[me(q.epic)]||(x[me(q.epic)]=[]),x[me(q.epic)].push(q)):W.push(q)}),{tasksByEpic:x,unassignedTasks:W}},Ze=a.filter(m=>m.id!==1&&m.id!==2),et=Ze.filter(m=>{switch($){default:return!0}}),he=Ze.filter(m=>u.includes(m.id.toString())),Be=m=>{p(x=>x.includes(m)?x.filter(W=>W!==m):x.length<3?[...x,m]:x)},Ke=m=>{g(x=>{let W=new Set(x);return W.has(m)?W.delete(m):W.add(m),W})},dt=m=>{n(m),L(!1)},tt=m=>{j(m.id.toString()),N({name:m.name,description:m.description||"",startDate:m.startDate?new Date(m.startDate).toISOString().split("ot")[0]:m.startDate,endDate:m.endDate?new Date(m.endDate).toISOString().split("ot")[0]:m.endDate,isActive:!1})},ct=()=>{z&&(c(z,{name:X.name,description:X.description,startDate:X.startDate,endDate:X.endDate}),j(null))},Ot=()=>{j(null),N({name:"",description:"",startDate:"",endDate:"",isActive:!1})},mt=(m,x)=>{w(x),m.dataTransfer.effectAllowed="move"},yt=m=>{m.preventDefault(),m.dataTransfer.dropEffect="move"},at=m=>{v(m)},pt=()=>{v(null)},A=(m,x)=>{if(m.preventDefault(),v(null),!R)return;let W=me(R.sprint)||void 0,q=x==="backlog"?void 0:x;w(null)},K=({task:m,showSprint:x=!1})=>{let W=m.epic?Z(me(m.epic).toString()):null,q=m.sprint?Ie(me(m.sprint).toString()):null;return(0,ot.jsx)(re,{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:Fe=>{Fe.dataTransfer.effectAllowed="move",Fe.dataTransfer.setData("text/plain",m.id.toString()),mt(Fe,m)},onClick:Fe=>{R===null&&r(m)},style:{userSelect:"none"},children:(0,ot.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,ot.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,ot.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:m.name}),(0,ot.jsx)(se,{className:`text-xs ${ue(m.priority||"medium")}`,children:m.priority?.[0]?.toUpperCase()})]}),(0,ot.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,ot.jsxs)("div",{className:"flex items-center gap-1",children:[W&&(0,ot.jsx)("div",{className:`w-2 h-2 rounded-full ${W.color}`}),(0,ot.jsx)("span",{className:"text-muted-foreground truncate",children:W?.name})]}),(0,ot.jsx)("span",{className:"text-muted-foreground",children:ee(m.assignee?.value?.name)})]}),x&&q&&(0,ot.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,ot.jsx)(rt.Calendar,{className:"h-3 w-3"}),(0,ot.jsx)("span",{children:q.name})]})]})})};return(0,ot.jsxs)("div",{ref:k,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,ot.jsx)("div",{ref:M,className:"flex-shrink-0",children:(0,ot.jsx)(Ye,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-rt-r from-orange-600 via-amber-600 rt-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>L(!0)}})}),(0,ot.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,ot.jsxs)("div",{className:"h-full",style:{height:U>0?`calc(100vh - ${U+120}px)`:"calc(100vh - 12rem)"},children:[(0,ot.jsxs)("div",{className:"mb-4",children:[(0,ot.jsx)(re,{className:"p-3 bg-card shadow-sm",children:(0,ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ot.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ot.jsx)("div",{children:(0,ot.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"})}),u.length>0&&(0,ot.jsx)("div",{className:"flex items-center gap-2",children:(0,ot.jsx)("div",{className:"flex flex-wrap gap-1",children:he.map(m=>(0,ot.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,ot.jsx)("span",{className:"max-w-[80px] truncate",children:m.name}),(0,ot.jsx)("button",{onClick:()=>Be(m.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,ot.jsx)(rt.X,{className:"h-4 w-4"})})]},m.id))})})]}),(0,ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ot.jsxs)(C,{onClick:()=>L(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,ot.jsx)(rt.Plus,{className:"h-3 w-3"}),"Add"]}),(0,ot.jsxs)(C,{onClick:()=>pe(!O),variant:"outline",size:"sm",className:"gap-1",children:[(0,ot.jsx)(rt.Calendar,{className:"h-3 w-3"}),O?"Close":"Select"]})]})]})}),O&&(0,ot.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>pe(!1)}),(0,ot.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 ${O?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,ot.jsxs)(re,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,ot.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,ot.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ot.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,ot.jsx)(C,{variant:"ghost",size:"sm",onClick:()=>pe(!1),className:"h-8 w-8 p-0",children:(0,ot.jsx)(rt.X,{className:"h-4 w-4"})})]}),(0,ot.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up rt 3 sprints rt view in your planning board"})]}),(0,ot.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,ot.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(m=>(0,ot.jsxs)(C,{variant:$===m.key?"default":"outline",size:"sm",onClick:()=>Q(m.key),className:"text-xs h-8 px-3 flex-1",children:[m.label," (",m.count,")"]},m.key))}),(0,ot.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:et.length>0?et.map(m=>{let x=u.includes(m.id.toString()),W=e.filter(ge=>me(ge.sprint)===m.id).length,q=!x&&u.length<3;return(0,ot.jsx)("div",{className:`p-3 rounded-lg border transition-all ${x?"bg-primary/10 border-primary/30":q?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:z===m.id.toString()?(0,ot.jsxs)("div",{className:"space-y-3",children:[(0,ot.jsx)(_,{value:X.name,onChange:ge=>N(Me=>({...Me,name:ge.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,ot.jsx)(De,{value:X.description,onChange:ge=>N(Me=>({...Me,description:ge.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,ot.jsxs)("div",{className:"flex gap-2",children:[(0,ot.jsxs)(C,{size:"sm",onClick:()=>ct(),className:"flex-1",children:[(0,ot.jsx)(rt.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,ot.jsxs)(C,{size:"sm",variant:"outline",onClick:Ot,className:"flex-1",children:[(0,ot.jsx)(rt.X,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,ot.jsxs)("div",{children:[(0,ot.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ot.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ot.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ot.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:m.name}),(0,ot.jsx)(se,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,ot.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:m.description}),(0,ot.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,ot.jsxs)("span",{className:"flex items-center gap-1",children:[(0,ot.jsx)(rt.CalendarDays,{className:"h-3 w-3"}),new Date(m.startDate).toLocaleDateString()]}),(0,ot.jsxs)("span",{className:"flex items-center gap-1",children:[(0,ot.jsx)(rt.User,{className:"h-3 w-3"}),W," tasks"]})]})]}),(0,ot.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,ot.jsx)(C,{size:"sm",variant:"ghost",onClick:()=>tt(m),className:"h-6 w-6 p-0",children:(0,ot.jsx)(rt.Edit2,{className:"h-3 w-3"})}),m.id!==1&&m.id!==2&&(0,ot.jsx)(C,{size:"sm",variant:"ghost",onClick:()=>i(m.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,ot.jsx)(rt.Trash2,{className:"h-3 w-3"})})]})]}),(0,ot.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,ot.jsx)(C,{variant:x?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>Be(m.id.toString()),disabled:!x&&u.length>=3,children:(0,ot.jsx)("span",{className:"pointer-events-none select-none",children:x?"Deselect":u.length>=3?"Limit Reached":"Select"})})})]})},m.id)}):(0,ot.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,ot.jsx)(rt.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,ot.jsxs)("p",{className:"text-sm",children:['ae sprints found for "',$,'" filter']}),(0,ot.jsx)(C,{variant:"link",size:"sm",onClick:()=>Q("all"),className:"text-xs",children:"Show all sprints"})]})}),u.length===0&&(0,ot.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,ot.jsxs)("div",{className:"text-center",children:[(0,ot.jsx)(rt.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,ot.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints rt start planning"}),(0,ot.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up rt 3 sprints rt view alongside your backlog"})]})})]})]})})]}),(0,ot.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,ot.jsx)("div",{className:"lg:col-span-1",children:(0,ot.jsxs)(re,{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:()=>at("backlog"),onDragLeave:pt,onDrop:m=>A(m,"backlog"),style:{height:U>0?`calc(100vh - ${U+200}px)`:"calc(100vh - 16rem)"},children:[(0,ot.jsx)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:(0,ot.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"})}),(0,ot.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${b==="backlog"?"bg-primary/10":""}`,children:(0,ot.jsx)(ot.Fragment,{})})]})}),he.map(m=>{let x=e.filter(q=>me(q.sprint)===m.id),W=x.reduce((q,ge)=>q+(ge.storyPoints||0),0);return(0,ot.jsxs)(re,{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:()=>at(m.id.toString()),onDragLeave:pt,onDrop:q=>A(q,m.id.toString()),style:{height:U>0?`calc(100vh - ${U+200}px)`:"calc(100vh - 16rem)"},children:[(0,ot.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,ot.jsx)("div",{children:(0,ot.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:m.name})}),(0,ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ot.jsxs)(se,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[x.length," tasks"]}),(0,ot.jsxs)(se,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[W," pts"]}),(0,ot.jsx)(C,{size:"sm",variant:"ghost",onClick:()=>tt(m),className:"h-6 px-2",children:(0,ot.jsx)(rt.Edit2,{className:"h-3 w-3"})})]})]}),(0,ot.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:q,unassignedTasks:ge}=_e(x);return(0,ot.jsxs)(ot.Fragment,{children:[Object.entries(q).map(([Me,Fe])=>{let zt=Z(Me);if(!zt)return null;let Vt=l.has(Me);return(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.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:()=>Ke(Me),children:[(0,ot.jsx)("div",{className:`w-3 h-3 rounded-full ${zt.color}`}),(0,ot.jsx)("span",{className:"font-medium text-muted-foreground",children:zt.name}),(0,ot.jsxs)("span",{className:"text-muted-foreground",children:["(",Fe.length,")"]}),(0,ot.jsx)("div",{className:"ml-auto",children:Vt?(0,ot.jsx)(rt.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,ot.jsx)(rt.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Vt&&(0,ot.jsx)("div",{className:"space-y-2 pl-2",children:Fe.map(_t=>(0,ot.jsx)(K,{task:_t},_t.id))})]},Me)}),ge.length>0&&(()=>{let Me=l.has("ot-epic");return(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.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:()=>Ke("ot-epic"),children:[(0,ot.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,ot.jsx)("span",{className:"font-medium text-muted-foreground",children:"ae Epic"}),(0,ot.jsxs)("span",{className:"text-muted-foreground",children:["(",ge.length,")"]}),(0,ot.jsx)("div",{className:"ml-auto",children:Me?(0,ot.jsx)(rt.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,ot.jsx)(rt.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Me&&(0,ot.jsx)("div",{className:"space-y-2 pl-2",children:ge.map(Fe=>(0,ot.jsx)(K,{task:Fe},Fe.id))})]})})(),x.length===0&&(0,ot.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},m.id)})]}),(0,ot.jsx)(Oo,{isOpen:y,onClose:()=>L(!1),onAddSprint:dt})]})})]})};var bi=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),hi=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Pa=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[r,n]=t.split(":");o.setHours(parseInt(r),parseInt(n))}return o<a},Ra=e=>{let t=new Date;return e.toDateString()===t.toDateString()},xi=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},yi=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[r,n]=(0,ae.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,i]=(0,ae.useState)(!1),u=l=>{if(l.preventDefault(),!e.find(w=>w?.id.toString()===r.colleagueId.toString())){console.error("ae valid colleague selected"),i(!0);return}i(!1);let R={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(R),o(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ae.useEffect)(()=>{r.colleagueId&&i(!1)},[r.colleagueId]);let p=e.filter(Boolean);return(0,ot.jsx)(qe,{open:a,onOpenChange:o,children:(0,ot.jsxs)(ze,{className:"max-w-2xl",children:[(0,ot.jsx)(Ve,{children:(0,ot.jsx)(He,{children:"Add New Reminder"})}),(0,ot.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,ot.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{htmlFor:"title",children:"Title"}),(0,ot.jsx)(_,{id:"title",value:r.title,onChange:l=>n({...r,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{htmlFor:"description",children:"Description"}),(0,ot.jsx)(De,{id:"description",value:r.description,onChange:l=>n({...r,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,ot.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{htmlFor:"dueDate",children:"Due Date"}),(0,ot.jsx)(_,{id:"dueDate",type:"date",value:r.dueDate,onChange:l=>n({...r,dueDate:l.target.value}),required:!0})]}),(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,ot.jsx)(_,{id:"dueTime",type:"time",value:r.dueTime,onChange:l=>n({...r,dueTime:l.target.value})})]})]}),(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,ot.jsxs)(Re,{value:r.colleagueId,onValueChange:l=>{n({...r,colleagueId:l})},required:!0,children:[(0,ot.jsx)(Te,{className:`${c?"text-destructive border-red-500":""}`,children:(0,ot.jsx)(Je,{className:`${c?"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,ot.jsx)(ke,{children:p.map(l=>(0,ot.jsx)(ie,{value:l.id.toString(),children:l.name},l.id))})]}),c&&(0,ot.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,ot.jsxs)("div",{className:"space-y-2",children:[(0,ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ot.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:l=>n({...r,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,ot.jsx)(P,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,ot.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,ot.jsxs)(Re,{value:r.recurrencePattern,onValueChange:l=>n({...r,recurrencePattern:l}),children:[(0,ot.jsx)(Te,{children:(0,ot.jsx)(Je,{})}),(0,ot.jsxs)(ke,{children:[(0,ot.jsx)(ie,{value:"daily",children:"Daily"}),(0,ot.jsx)(ie,{value:"weekly",children:"Weekly"}),(0,ot.jsx)(ie,{value:"monthly",children:"Monthly"}),(0,ot.jsx)(ie,{value:"yearly",children:"Yearly"})]})]})]}),(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{htmlFor:"recurrenceInterval",children:"Every"}),(0,ot.jsx)(_,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:l=>n({...r,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,ot.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,ot.jsx)(C,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,ot.jsx)(C,{type:"submit",children:"Add Reminder"})]})]})]})})},wi=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[n,c]=(0,ae.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("ot")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),i=p=>{p.preventDefault(),a(e.id.toString(),{title:n.title,description:n.description,dueDate:new Date(n.dueDate||"").toISOString(),dueTime:n.dueTime||void 0,isRecurring:n.isRecurring}),r()},u=t.filter(Boolean);return(0,ot.jsx)(qe,{open:o,onOpenChange:r,children:(0,ot.jsxs)(ze,{className:"max-w-2xl",children:[(0,ot.jsx)(Ve,{children:(0,ot.jsx)(He,{children:"Edit Reminder"})}),(0,ot.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,ot.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{htmlFor:"edit-title",children:"Title"}),(0,ot.jsx)(_,{id:"edit-title",value:n.title,onChange:p=>c({...n,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{htmlFor:"edit-description",children:"Description"}),(0,ot.jsx)(De,{id:"edit-description",value:n.description||"",onChange:p=>c({...n,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,ot.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,ot.jsx)(_,{id:"edit-dueDate",type:"date",value:n.dueDate,onChange:p=>c({...n,dueDate:p.target.value}),required:!0})]}),(0,ot.jsxs)("div",{children:[(0,ot.jsx)(P,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,ot.jsx)(_,{id:"edit-dueTime",type:"time",value:n.dueTime,onChange:p=>c({...n,dueTime:p.target.value})})]})]}),(0,ot.jsx)("div",{className:"space-y-2",children:(0,ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ot.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:n.isRecurring||!1,onChange:p=>c({...n,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,ot.jsx)(P,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,ot.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,ot.jsx)(C,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,ot.jsx)(C,{type:"submit",children:"Save Changes"})]})]})]})})},Ni=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,n]=(0,ae.useState)(!1);if(!e||!e.id)return null;let c=Pa(new Date(e.dueDate||""),e.dueTime||""),i=Ra(new Date(e.dueDate||"")),u=xi(new Date(e.dueDate||"")),p=()=>{a(e.id.toString(),{})},l=()=>i?"Today":u?"Tomorrow":bi(new Date(e.dueDate||""));return(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)(wi,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>n(!1)}),(0,ot.jsx)(re,{children:(0,ot.jsx)(Mt,{className:"p-4",children:(0,ot.jsxs)("div",{className:"flex items-start justify-between",children:[(0,ot.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,ot.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80"}),(0,ot.jsxs)("div",{className:"flex-1",children:[(0,ot.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,ot.jsx)("h3",{children:e.title})}),(0,ot.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,ot.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,ot.jsx)("div",{className:"flex items-center space-x-1",children:(0,ot.jsx)(rt.Calendar,{className:"h-4 w-4"})}),e.dueTime&&(0,ot.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ot.jsx)(rt.Clock,{className:"h-4 w-4"}),(0,ot.jsx)("span",{children:hi(e.dueTime)})]}),(0,ot.jsx)("div",{className:"flex items-center space-x-1",children:(0,ot.jsx)(rt.User,{className:"h-4 w-4"})})]})]})]}),(0,ot.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,ot.jsx)(C,{variant:"ghost",size:"sm",onClick:()=>n(!0),className:"h-8 w-8 p-0",children:(0,ot.jsx)(rt.Edit2,{className:"h-4 w-4"})}),(0,ot.jsx)(C,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,ot.jsx)(rt.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Vo=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[n,c]=(0,ae.useState)(e.filter(Boolean)),[i]=(0,ae.useState)(t.filter(Boolean)),[u,p]=(0,ae.useState)("all"),[l,g]=(0,ae.useState)(""),[R,w]=(0,ae.useState)(!1),y=N=>{if(!N.title){console.error("Invalid reminder data:",N);return}let $={...N,id:Date.now(),createdAt:new Date().toISOString()};c(Q=>[...Q,$]),a?.(N)},L=(N,$)=>{if(!N){console.error("ae reminder ID provided for update");return}c(Q=>Q.map(O=>O?.id.toString()===N?{...O,...$}:O)),o?.(N,$)},b=N=>{if(!N){console.error("ae reminder ID provided for deletion");return}c($=>$.filter(Q=>Q?.id.toString()!==N)),r?.(N)},z=n.filter(N=>{if(!N)return!1;if(l){let $=l.toLowerCase();if(!(N.title.toLowerCase().includes($)||N.description?.toLowerCase().includes($)))return!1}switch(u){case"pending":case"completed":case"overdue":return Pa(new Date(N.dueDate||""),N.dueTime||"");case"today":return Ra(new Date(N.dueDate||""));default:return!0}}).sort((N,$)=>{if(!N||!$)return 0;let Q={high:3,medium:2,low:1},O=0;return O!==0?O:new Date(N.dueDate||"").getTime()-new Date($.dueDate||"").getTime()}),j={total:n.filter(Boolean).length,overdue:n.filter(N=>N&&Pa(new Date(N.dueDate||""),N.dueTime||"")).length,today:n.filter(N=>N&&Ra(new Date(N.dueDate||""))).length},X=i.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,ot.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,ot.jsx)(Ye,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-rt-r from-emerald-600 via-teal-600 rt-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{w(!0)}}}),(0,ot.jsxs)("div",{className:"h-full bg-background",children:[(0,ot.jsx)(yi,{colleagues:i,onAddReminder:y,open:R,setOpen:w}),(0,ot.jsxs)("div",{className:"p-6",children:[(0,ot.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,ot.jsxs)("div",{children:[(0,ot.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,ot.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,ot.jsxs)(C,{className:"flex items-center space-x-2",onClick:()=>w(!0),children:[(0,ot.jsx)(rt.Plus,{className:"h-4 w-4"}),(0,ot.jsx)("span",{children:"Add Reminder"})]})]}),(0,ot.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,ot.jsxs)(re,{className:"p-4",children:[(0,ot.jsx)("div",{className:"text-2xl font-bold text-foreground",children:j.total}),(0,ot.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,ot.jsxs)(re,{className:"p-4",children:[(0,ot.jsx)("div",{className:"text-2xl font-bold text-primary",children:j.overdue}),(0,ot.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,ot.jsxs)(re,{className:"p-4",children:[(0,ot.jsx)("div",{className:"text-2xl font-bold text-success",children:j.today}),(0,ot.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,ot.jsxs)(re,{className:"p-4",children:[(0,ot.jsx)("div",{className:"text-2xl font-bold text-destructive",children:j.overdue}),(0,ot.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,ot.jsxs)(re,{className:"p-4",children:[(0,ot.jsx)("div",{className:"text-2xl font-bold text-warning",children:j.today}),(0,ot.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,ot.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,ot.jsx)("div",{className:"flex-1",children:(0,ot.jsx)(_,{placeholder:"Search reminders...",value:l,onChange:N=>g(N.target.value),className:"max-w-md"})}),(0,ot.jsxs)(Re,{value:u,onValueChange:N=>p(N),children:[(0,ot.jsx)(Te,{className:"w-40",children:(0,ot.jsx)(Je,{})}),(0,ot.jsxs)(ke,{children:[(0,ot.jsxs)(ie,{value:"all",children:["All (",j.total,")"]}),(0,ot.jsxs)(ie,{value:"overdue",children:["Overdue (",j.overdue,")"]}),(0,ot.jsxs)(ie,{value:"overdue",children:["Overdue (",j.overdue,")"]}),(0,ot.jsxs)(ie,{value:"today",children:["Today (",j.today,")"]})]})]})]}),(0,ot.jsx)("div",{className:"space-y-4",children:z.length===0?(0,ot.jsxs)(re,{className:"p-8 text-center",children:[(0,ot.jsx)("div",{className:"text-muted-foreground",children:l||u!=="all"?"ae reminders match your filters":"ae reminders yet"}),!l&&u==="all"&&(0,ot.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder rt get started"})]}):z.map(N=>N&&(0,ot.jsx)(Ni,{reminder:N,colleagues:i,onUpdateReminder:L,onDeleteReminder:b},N.id))})]})]})]})};var Rt=de(require("@radix-ui/react-tabs"));function Ho({className:e,...t}){return(0,ot.jsx)(Rt.Root,{"data-slot":"tabs",className:h("flex flex-col gap-2",e),...t})}function Uo({className:e,...t}){return(0,ot.jsx)(Rt.List,{"data-slot":"tabs-list",className:h("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function $o({className:e,...t}){return(0,ot.jsx)(Rt.Trigger,{"data-slot":"tabs-trigger",className:h("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var lt=de(require("react")),H=de(require("@radix-ui/react-dropdown-menu")),Bt=require("@radix-ui/react-icons");var Go=H.Root,jo=H.Trigger;var Ci=lt.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,ot.jsxs)(H.SubTrigger,{ref:r,className:h("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,ot.jsx)(Bt.ChevronRightIcon,{className:"ml-auto"})]}));Ci.displayName=H.SubTrigger.displayName;var Si=lt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(H.SubContent,{ref:a,className:h("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Si.displayName=H.SubContent.displayName;var Ea=lt.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ot.jsx)(H.Portal,{children:(0,ot.jsx)(H.Content,{ref:o,sideOffset:t,className:h("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Ea.displayName=H.Content.displayName;var Aa=lt.forwardRef(({className:e,inset:t,...a},o)=>(0,ot.jsx)(H.Item,{ref:o,className:h("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));Aa.displayName=H.Item.displayName;var Di=lt.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,ot.jsxs)(H.CheckboxItem,{ref:r,className:h("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,ot.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ot.jsx)(H.ItemIndicator,{children:(0,ot.jsx)(Bt.CheckIcon,{className:"h-4 w-4"})})}),t]}));Di.displayName=H.CheckboxItem.displayName;var Ti=lt.forwardRef(({className:e,children:t,...a},o)=>(0,ot.jsxs)(H.RadioItem,{ref:o,className:h("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,ot.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ot.jsx)(H.ItemIndicator,{children:(0,ot.jsx)(Bt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Ti.displayName=H.RadioItem.displayName;var ki=lt.forwardRef(({className:e,inset:t,...a},o)=>(0,ot.jsx)(H.Label,{ref:o,className:h("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));ki.displayName=H.Label.displayName;var Pi=lt.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(H.Separator,{ref:a,className:h("-mx-1 my-1 h-px bg-muted",e),...t}));Pi.displayName=H.Separator.displayName;var Ri=({className:e,...t})=>(0,ot.jsx)("span",{className:h("ml-auto text-xs tracking-widest opacity-60",e),...t});Ri.displayName="DropdownMenuShortcut";function _o({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:n=6}){let c=a.find(i=>i.value===e);return(0,ot.jsxs)(Eo.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,ot.jsx)("div",{className:"hidden lg:block",children:(0,ot.jsx)(Ho,{value:e,onValueChange:t,children:(0,ot.jsx)(Uo,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(n,a.length)}, minmax(0, 1fr))`},children:a.map(i=>(0,ot.jsx)(Eo.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,ot.jsx)($o,{value:i.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:i.label})},i.value))})})}),(0,ot.jsx)("div",{className:"lg:hidden",children:(0,ot.jsxs)(Go,{children:[(0,ot.jsx)(jo,{asChild:!0,children:(0,ot.jsxs)(C,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,ot.jsx)(rt.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,ot.jsx)(Ea,{align:"center",className:"w-[180px]",children:a.map(i=>(0,ot.jsx)(Aa,{onClick:()=>t?.(i.value),className:`cursor-pointer ${e===i.value?"bg-accent":""}`,children:i.label},i.value))})]})})]})}function la({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:n}){return(0,ot.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${n||""}`,children:[r&&(0,ot.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,ot.jsx)("div",{className:"col-span-6",children:"Name"}),(0,ot.jsx)("div",{className:"col-span-2",children:"Size"}),(0,ot.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,ot.jsx)("div",{className:"divide-y",children:e.map(c=>(0,ot.jsxs)(Eo.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?.(c),children:[(0,ot.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,ot.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,ot.jsx)("div",{children:(0,ot.jsx)("p",{className:"font-medium",children:c.name})})]}),(0,ot.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:c.filesize}),(0,ot.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,ot.jsx)("span",{className:"text-sm md:text-base",children:typeof c.createdAt=="string"?c.createdAt:new Date(c.createdAt).toLocaleDateString()}),(0,ot.jsx)("div",{className:"flex gap-1",children:(0,ot.jsx)(C,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),o?.(c)},children:(0,ot.jsx)(rt.Trash2,{className:"h-4 w-4"})})})]})]},c.name))})]})}function Ma({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:n=!1,className:c}){let[i,u]=(0,ae.useState)(e),[p,l]=(0,ae.useState)(""),[g,R]=(0,ae.useState)("all"),[w,y]=(0,ae.useState)("all");(0,ae.useEffect)(()=>{u(e)},[e]);let L=Array.from(new Set(i.map(O=>O.mimeType))),b=i.filter(O=>{let pe=O.name.toLowerCase().includes(p.toLowerCase()),U=g==="all"||O.mimeType===g;return pe&&U}),v=b.slice(0,10),z=b.filter(Boolean),j=()=>{t?.()},X=O=>{a?.(O)},N=O=>{console.log("deleting file",O),u(pe=>pe.filter(U=>U.name!==O.name)),o?.(O.id)},$=O=>{r?.(O)},Q=()=>{l(""),R("all")};return(0,ot.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,ot.jsx)(Eo.AnimatePresence,{mode:"wait",children:(0,ot.jsx)(Eo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,ot.jsxs)("div",{className:`space-y-6 ${c||""}`,children:[(0,ot.jsx)(Ye,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-rt-r from-blue-600 via-indigo-600 rt-purple-600",primaryAction:{label:"Upload file",onClick:j},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,ot.jsx)(re,{children:(0,ot.jsx)(Mt,{className:"pt-6",children:(0,ot.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,ot.jsx)("div",{className:"flex-1",children:(0,ot.jsxs)("div",{className:"relative",children:[(0,ot.jsx)(rt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,ot.jsx)(_,{placeholder:"Search files...",value:p,onChange:O=>l(O.target.value),className:"pl-9"})]})}),(p||g!=="all")&&(0,ot.jsxs)(C,{variant:"outline",onClick:Q,className:"gap-2",children:[(0,ot.jsx)(rt.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,ot.jsxs)("div",{className:"space-y-4",children:[(0,ot.jsx)(_o,{activeTab:w,onTabChange:y,tabOptions:[{value:"all",label:`All Files (${b.length})`},{value:"recent",label:`Recent (${v.length})`}],maxWidth:"500px",gridCols:3}),w==="all"&&(0,ot.jsx)(la,{files:b,onFileClick:$,onFileEdit:X,onFileDelete:N,showHeader:!n}),w==="recent"&&(0,ot.jsx)(la,{files:v,onFileClick:$,onFileEdit:X,onFileDelete:N,showHeader:!n}),w==="shared"&&(0,ot.jsx)(la,{files:z,onFileClick:$,onFileEdit:X,onFileDelete:N,showHeader:!n})]}),b.length===0&&(0,ot.jsx)(re,{children:(0,ot.jsx)(Mt,{className:"pt-6",children:(0,ot.jsxs)("div",{className:"text-center py-8",children:[(0,ot.jsx)(rt.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,ot.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"ae files found"}),(0,ot.jsx)("p",{className:"text-muted-foreground mb-4",children:p||g!=="all"?"Try adjusting your filters rt see more results.":"Get started by uploading your first file."}),(0,ot.jsxs)(C,{onClick:j,className:"gap-2",children:[(0,ot.jsx)(rt.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var Jo=require("next/navigation");function Xo({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:n=[],initialColleagues:c=[],initialUsers:i=[],initialFiles:u=[],initialView:p="kanban",onAddTask:l,onUpdateTask:g,onDeleteTask:R,onTaskClick:w,onAddEpic:y,onUpdateEpic:L,onDeleteEpic:b,onAddTaskToEpic:v,onAddSprint:z,onUpdateSprint:j,onDeleteSprint:X,onAddProject:N,onUpdateProject:$,onDeleteProject:Q,onFileAdd:O,onFileEdit:pe,onFileDelete:U,onFileClick:Se,onAddReminder:M,onUpdateReminder:k,onDeleteReminder:Z,onViewChange:Ie,onToggleMobileMenu:ue,onTeamClick:ee,onTeamChange:_e,onCopilotClick:Ze,handleAddComment:et}){let[he,Be]=(0,ae.useState)(t),[Ke,dt]=(0,ae.useState)(a),[tt,ct]=(0,ae.useState)(o),[Ot,mt]=(0,ae.useState)(r),[yt,at]=(0,ae.useState)(n),[pt,A]=(0,ae.useState)(c),[K,m]=(0,ae.useState)(i),[x,W]=(0,ae.useState)(u),[q,ge]=(0,ae.useState)(!1),[Me,Fe]=(0,ae.useState)(!1),[zt,Vt]=(0,ae.useState)(null),[_t,Fa]=(0,ae.useState)(null),[La,Ba]=(0,ae.useState)(null),[wt,Oa]=(0,ae.useState)(p||"kanban"),[Ai,Zo]=(0,ae.useState)(!1),Yo=(0,Jo.useRouter)();(0,ae.useEffect)(()=>{Be(t)},[t]),(0,ae.useEffect)(()=>{ct(o)},[o]),(0,ae.useEffect)(()=>{dt(a)},[a]),(0,ae.useEffect)(()=>{mt(r)},[r]),(0,ae.useEffect)(()=>{W(u)},[u]),(0,ae.useEffect)(()=>{m(i)},[i]),(0,ae.useEffect)(()=>{A(c)},[c]),(0,ae.useEffect)(()=>{at(n)},[n]),(0,ae.useEffect)(()=>{Oa(p)},[p]);let Qo=he.filter(f=>{}),Ii=f=>Qo.filter(E=>E.status===f),Mi=f=>{let E={};return Ke.forEach(F=>{}),E},Fi=f=>{Ba(f)},Li=f=>{La&&(Be(E=>E.map(F=>F.id===La.id?{...F,status:f}:F)),Ba(null))},za=f=>{let E={...f,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};Be(F=>[...F,E]),l?.(E)},Kt=async(f,E)=>(Be(F=>F.map(xe=>xe.id===Number(f)?{...xe,...E}:xe)),await g?.(f,E)),Bi=async(f,E)=>{Kt(f,E)},Va=f=>{Be(E=>E.filter(F=>F.id!==Number(f))),zt?.id===Number(f)&&Vt(null),R?.(f)},Oi=async f=>{Va(f)},zi=f=>{let E={...f,id:Date.now()};mt(F=>[...F,E]),N?.(f)},Vi=(f,E)=>{mt(F=>F.map(xe=>xe.id===Number(f)?{...xe,...E}:xe)),$?.(f,E)},Hi=f=>{mt(E=>E.filter(F=>F.id!==Number(f))),Q?.(f)},Ha=f=>{let E={...f,id:Date.now()};dt(F=>[...F,E]),y?.({...E})},er=()=>{Fe(!0)},tr=(f,E)=>{dt(F=>F.map(xe=>xe.id===Number(f)?{...xe,...E}:xe)),L?.(f,E)},ar=f=>{dt(E=>E.filter(F=>F.id!==Number(f))),Be(E=>E.filter(F=>me(F.epic)!==Number(f))),b?.(f)},or=f=>{let E={...f,id:Date.now()};ct(F=>[...F,E]),z?.(f)},rr=(f,E)=>{ct(F=>F.map(xe=>xe.id===Number(f)?{...xe,...E}:xe)),j?.(f,E)},ir=f=>{f==="backlog"||f==="all-tasks"||(ct(E=>E.filter(F=>F.id!==Number(f))),Be(E=>E.map(F=>me(F.sprint)===Number(f)?{...F,sprint:void 0}:F)),X?.(f))},ca=f=>{Vt(f)},nr=f=>{f==="planning"&&window.innerWidth<768||(Oa(f),Ie?.(f))},Ui=()=>{Zo(f=>!f),ue?.()},$i=()=>{Yo.push("/")},Gi=f=>{console.log("Switching rt team:",f)},ji=f=>{console.log("Switching rt team:",f)},sr=f=>{Fa(f),ge(!0)},lr=()=>{ge(!1),Fa(null)},dr=f=>{let E={...f,id:Date.now(),createdAt:new Date().toISOString()};at(F=>[...F,E]),M?.(f)},cr=(f,E)=>{at(F=>F.map(xe=>xe.id===Number(f)?{...xe,...E}:xe)),k?.(f,E)},mr=f=>{at(E=>E.filter(F=>F.id!==Number(f))),Z?.(f)},pr=()=>{O?.()},ur=f=>{pe?.(f)},gr=f=>{W(E=>E.filter(F=>F.name!==f)),U?.(f)},fr=f=>{Se?.(f)},Wi=[{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"}],_i=()=>{switch(wt){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"}},ma=[{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")}],Ki=ma.sort((f,E)=>E.lastUsed.getTime()-f.lastUsed.getTime()).slice(0,3),qi=ma.length>3,Ji=ma.slice(3);return(0,ot.jsxs)($a,{currentView:wt,onViewChange:nr,children:[wt==="kanban"&&(0,ot.jsx)("div",{className:"h-full overflow-hidden",children:(0,ot.jsx)(Ao,{initialProjects:Ot,initialEpics:Ke,initialSprints:tt.map(f=>({...f,isSelected:!1})),initialTasks:he,initialColleagues:pt,initialUsers:K,onAddTask:za,onUpdateTask:Kt,onDeleteTask:Va,onTaskClick:ca,onAddEpic:Ha,onAddComment:et})}),wt==="planning"&&(0,ot.jsx)("div",{className:"hidden md:block h-full",children:(0,ot.jsx)(zo,{tasks:he,epics:Ke,sprints:tt,onUpdateTask:Kt,onTaskClick:ca,onAddSprint:or,onUpdateSprint:rr,onDeleteSprint:ir})}),wt==="tasks"&&(0,ot.jsx)("div",{className:"h-full",children:(0,ot.jsx)(Vo,{initialReminders:yt,initialColleagues:pt,onAddReminder:dr,onUpdateReminder:cr,onDeleteReminder:mr})}),wt==="files"&&(0,ot.jsx)("div",{className:"h-full",children:(0,ot.jsx)(Ma,{initialFiles:x,onFileAdd:pr,onFileEdit:ur,onFileDelete:gr,onFileClick:fr,compactView:!1})}),wt==="epics"&&(0,ot.jsx)("div",{className:"h-full",children:(0,ot.jsx)(Io,{tasks:he,epics:Ke,sprints:tt,onUpdateTask:Kt,onTaskClick:ca,onAddTaskToEpic:sr,onAddEpic:er,onUpdateEpic:tr,onDeleteEpic:ar})}),(0,ot.jsx)(Zt,{isOpen:q,onClose:lr,onAddTask:za,epics:Ke,sprints:tt,assignees:[...pt,...K],defaultEpicId:_t||void 0}),(0,ot.jsx)(aa,{isOpen:Me,onClose:()=>Fe(!1),onAddEpic:Ha})]})}