cortex-react-components 2.28.0 → 2.28.2

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 (369) hide show
  1. package/dist/{chunk-ORODSHZN.mjs → chunk-255P6K5W.mjs} +1 -1
  2. package/dist/{chunk-D76LTQRD.mjs → chunk-2RQDJ5XT.mjs} +1 -1
  3. package/dist/chunk-2TUBS2HM.mjs +4 -0
  4. package/dist/{chunk-JDIPWJBD.mjs → chunk-46N4YPMB.mjs} +1 -1
  5. package/dist/{chunk-27XIU7FW.mjs → chunk-4LUF5GZ6.mjs} +1 -1
  6. package/dist/{chunk-KBEXWUKI.mjs → chunk-5NIEZE7A.mjs} +1 -1
  7. package/dist/{chunk-LKUK55GC.mjs → chunk-5SHZBJ5R.mjs} +1 -1
  8. package/dist/{chunk-KAAHIHZK.mjs → chunk-5WVFEIMC.mjs} +1 -1
  9. package/dist/{chunk-XSCZQEYP.mjs → chunk-62A35O55.mjs} +1 -1
  10. package/dist/{chunk-43YJ2VYN.mjs → chunk-67QPOSVV.mjs} +1 -1
  11. package/dist/{chunk-VDFRWGXR.mjs → chunk-6PS55VJZ.mjs} +1 -1
  12. package/dist/{chunk-YI6EQRWN.mjs → chunk-6ZMZX5TB.mjs} +1 -1
  13. package/dist/{chunk-WDRL3N5V.mjs → chunk-7GMAMIHM.mjs} +1 -1
  14. package/dist/{chunk-75HU5Q6A.mjs → chunk-AHMDJQZI.mjs} +1 -1
  15. package/dist/{chunk-XX4GSGRP.mjs → chunk-AQQCH7Z2.mjs} +1 -1
  16. package/dist/{chunk-YVXFRQPA.mjs → chunk-ATPB5HSG.mjs} +1 -1
  17. package/dist/{chunk-ZA6MGTGM.mjs → chunk-B7AXSCTN.mjs} +1 -1
  18. package/dist/{chunk-D44OXIPN.mjs → chunk-CDVRH3MC.mjs} +1 -1
  19. package/dist/{chunk-OQBCIB4L.mjs → chunk-CK2TD4BY.mjs} +1 -1
  20. package/dist/{chunk-633ESSXN.mjs → chunk-COBOHCBL.mjs} +1 -1
  21. package/dist/{chunk-KEOMDWUC.mjs → chunk-EHSOO47V.mjs} +1 -1
  22. package/dist/{chunk-2R3ECSWF.mjs → chunk-ERJXTG6X.mjs} +1 -1
  23. package/dist/{chunk-CXHPLJDO.mjs → chunk-F6DMXMR4.mjs} +1 -1
  24. package/dist/{chunk-VKCDLKYH.mjs → chunk-FJ2HHNPX.mjs} +1 -1
  25. package/dist/{chunk-6L7VJ7IH.mjs → chunk-FKU4VQR6.mjs} +1 -1
  26. package/dist/chunk-GED5VYLZ.mjs +4 -0
  27. package/dist/{chunk-DTKZ3I6Z.mjs → chunk-H3CJOE6S.mjs} +1 -1
  28. package/dist/{chunk-RCI3L3M5.mjs → chunk-HD6E7KI2.mjs} +1 -1
  29. package/dist/{chunk-YG7SLO6G.mjs → chunk-HKGW6JI2.mjs} +1 -1
  30. package/dist/{chunk-24R7CI5Q.mjs → chunk-I2GNNRFH.mjs} +1 -1
  31. package/dist/{chunk-FRYADWTQ.mjs → chunk-IF3425JX.mjs} +1 -1
  32. package/dist/{chunk-I6D5JCNY.mjs → chunk-IQQ7ZWCP.mjs} +1 -1
  33. package/dist/chunk-IUVPH5LV.mjs +4 -0
  34. package/dist/{chunk-6VRPQKAK.mjs → chunk-JCWFPKF3.mjs} +1 -1
  35. package/dist/chunk-JQL4XGAF.mjs +4 -0
  36. package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
  37. package/dist/{chunk-CLGBBNRB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
  38. package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
  39. package/dist/{chunk-2O54GV6Q.mjs → chunk-LJFBHY4P.mjs} +1 -1
  40. package/dist/{chunk-GXVC6ETI.mjs → chunk-LJQPLE4S.mjs} +1 -1
  41. package/dist/{chunk-YPQUYIGO.mjs → chunk-LLED3RQS.mjs} +1 -1
  42. package/dist/{chunk-GRNOF6LY.mjs → chunk-M7NV6EFH.mjs} +1 -1
  43. package/dist/chunk-MCOHKE2T.mjs +1 -0
  44. package/dist/{chunk-SWE754OC.mjs → chunk-MH4YPGH4.mjs} +1 -1
  45. package/dist/{chunk-B63FA7LF.mjs → chunk-MXCW6SOT.mjs} +1 -1
  46. package/dist/{chunk-4ITG3T35.mjs → chunk-N3B3XNV3.mjs} +1 -1
  47. package/dist/{chunk-4FEVXBNU.mjs → chunk-NCJAMNMQ.mjs} +1 -1
  48. package/dist/{chunk-NJ7PW5T7.mjs → chunk-NWISIJFD.mjs} +1 -1
  49. package/dist/{chunk-O3BCESMN.mjs → chunk-NXAXOI33.mjs} +1 -1
  50. package/dist/{chunk-MX3JKY3V.mjs → chunk-P7S6XFU4.mjs} +1 -1
  51. package/dist/{chunk-IBC5Z55T.mjs → chunk-PK3OBSCB.mjs} +1 -1
  52. package/dist/{chunk-SADWUWLZ.mjs → chunk-PTSAG7IY.mjs} +1 -1
  53. package/dist/{chunk-AMAB4E2X.mjs → chunk-QKDYTCZC.mjs} +1 -1
  54. package/dist/{chunk-2IMY4VWR.mjs → chunk-RR4QSUV2.mjs} +1 -1
  55. package/dist/{chunk-XQ3XV5DH.mjs → chunk-RS4VD3ML.mjs} +1 -1
  56. package/dist/{chunk-UBZYXZ7B.mjs → chunk-RS4WAAGI.mjs} +1 -1
  57. package/dist/chunk-SMKYMYUV.mjs +1 -0
  58. package/dist/{chunk-LEF6M5ZD.mjs → chunk-SNFBF6KT.mjs} +1 -1
  59. package/dist/{chunk-ZZFYIP6H.mjs → chunk-TKCFCYEQ.mjs} +1 -1
  60. package/dist/{chunk-OWL3KUE3.mjs → chunk-TKY52BNP.mjs} +1 -1
  61. package/dist/{chunk-I75OOO4H.mjs → chunk-VRHJOUL3.mjs} +1 -1
  62. package/dist/{chunk-MDIJOHFV.mjs → chunk-WLI2YTOQ.mjs} +1 -1
  63. package/dist/{chunk-O5QXPC23.mjs → chunk-X2JWNPWT.mjs} +1 -1
  64. package/dist/{chunk-XMYXQR5W.mjs → chunk-X3YJJBFJ.mjs} +1 -1
  65. package/dist/{chunk-LBVWIF2J.mjs → chunk-XJKNH5LL.mjs} +1 -1
  66. package/dist/{chunk-IFUIQ57U.mjs → chunk-XKGBG5FX.mjs} +1 -1
  67. package/dist/{chunk-MX6GXHJJ.mjs → chunk-YKG4FNS4.mjs} +1 -1
  68. package/dist/chunk-YRDJBAYA.mjs +4 -0
  69. package/dist/chunk-Z4ZRNNSX.mjs +4 -0
  70. package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  71. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  72. package/dist/components/AdvancedComponents/CommentSection.mjs +1 -1
  73. package/dist/components/AdvancedComponents/EditableField.mjs +1 -1
  74. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  75. package/dist/components/AdvancedComponents/index.mjs +1 -1
  76. package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
  77. package/dist/components/AdvancedComponents/notifications-panel.mjs +1 -1
  78. package/dist/components/AdvancedComponents/switch.mjs +1 -1
  79. package/dist/components/AdvancedComponents/theme-toggle.mjs +1 -1
  80. package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
  81. package/dist/components/Blocks/Banner.mjs +1 -1
  82. package/dist/components/Blocks/CallToAction.mjs +1 -1
  83. package/dist/components/Blocks/CaseStudy.mjs +1 -1
  84. package/dist/components/Blocks/Code.client.mjs +1 -1
  85. package/dist/components/Blocks/Code.mjs +1 -1
  86. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  87. package/dist/components/Blocks/ConsultantProfile.mjs +1 -1
  88. package/dist/components/Blocks/Content.mjs +1 -1
  89. package/dist/components/Blocks/CopyButton.mjs +1 -1
  90. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  91. package/dist/components/Blocks/ProposalSummary.mjs +1 -1
  92. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  93. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  94. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  95. package/dist/components/Blocks/index.mjs +1 -1
  96. package/dist/components/CRM/CogeBoard.js +1 -1
  97. package/dist/components/CRM/CogeBoard.mjs +1 -1
  98. package/dist/components/CRM/DealCard.mjs +1 -1
  99. package/dist/components/CRM/DealDetails.mjs +1 -1
  100. package/dist/components/CRM/KanbanBoard.js +1 -1
  101. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  102. package/dist/components/CRM/KanbanColumn.js +1 -1
  103. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  104. package/dist/components/CRM/NewCustomerForm.mjs +1 -1
  105. package/dist/components/CRM/NewDealForm.mjs +1 -1
  106. package/dist/components/CRM/index.js +1 -1
  107. package/dist/components/CRM/index.mjs +1 -1
  108. package/dist/components/CRM/types.d.ts +1 -1
  109. package/dist/components/CRM/types.js +1 -1
  110. package/dist/components/Cards/ContentCard.mjs +1 -1
  111. package/dist/components/Cards/CustomerCard.mjs +1 -1
  112. package/dist/components/Cards/EventCard.mjs +1 -1
  113. package/dist/components/Cards/FeatureCard.mjs +1 -1
  114. package/dist/components/Cards/HeroCard.mjs +1 -1
  115. package/dist/components/Cards/Image.mjs +1 -1
  116. package/dist/components/Cards/PricingCard.mjs +1 -1
  117. package/dist/components/Cards/ServiceCard.mjs +1 -1
  118. package/dist/components/Cards/index.mjs +1 -1
  119. package/dist/components/Chat/ChatInterface.js +7 -7
  120. package/dist/components/Chat/ChatInterface.mjs +1 -1
  121. package/dist/components/Chat/Components/ChatCardArtefact.mjs +1 -1
  122. package/dist/components/Chat/Components/ChatCardTask.mjs +1 -1
  123. package/dist/components/Chat/Components/Conversation.mjs +1 -1
  124. package/dist/components/Chat/Components/Message.mjs +1 -1
  125. package/dist/components/Chat/CopilotInterface.js +11 -10
  126. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  127. package/dist/components/Chat/PartTypes/CodeBlock.d.ts +7 -5
  128. package/dist/components/Chat/PartTypes/CodeBlock.js +1 -1
  129. package/dist/components/Chat/PartTypes/CodeBlock.mjs +1 -1
  130. package/dist/components/Chat/PartTypes/ColleagueHandoff.mjs +1 -1
  131. package/dist/components/Chat/PartTypes/Confirmation.css +1 -0
  132. package/dist/components/Chat/PartTypes/Confirmation.d.ts +49 -0
  133. package/dist/components/Chat/PartTypes/Confirmation.js +4 -0
  134. package/dist/components/Chat/PartTypes/Confirmation.mjs +2 -0
  135. package/dist/components/Chat/PartTypes/Conversation.css +1 -0
  136. package/dist/components/Chat/PartTypes/Conversation.d.ts +15 -0
  137. package/dist/components/Chat/PartTypes/Conversation.js +4 -0
  138. package/dist/components/Chat/PartTypes/Conversation.mjs +2 -0
  139. package/dist/components/Chat/PartTypes/MessageHandler.js +8 -7
  140. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  141. package/dist/components/Chat/PartTypes/Reasoning.mjs +1 -1
  142. package/dist/components/Chat/PartTypes/Response.mjs +1 -1
  143. package/dist/components/Chat/PartTypes/Tool.d.ts +12 -11
  144. package/dist/components/Chat/PartTypes/Tool.js +1 -1
  145. package/dist/components/Chat/PartTypes/Tool.mjs +1 -1
  146. package/dist/components/Chat/PartTypes/index.d.ts +2 -0
  147. package/dist/components/Chat/PartTypes/index.js +9 -8
  148. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  149. package/dist/components/Chat/capability-menu.mjs +1 -1
  150. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  151. package/dist/components/Chat/demo-long-messages.js +18 -17
  152. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  153. package/dist/components/Chat/demo-tests.js +89 -88
  154. package/dist/components/Chat/demo-tests.mjs +1 -1
  155. package/dist/components/Chat/demo.js +11 -10
  156. package/dist/components/Chat/demo.mjs +1 -1
  157. package/dist/components/Chat/example-usage.js +11 -10
  158. package/dist/components/Chat/example-usage.mjs +1 -1
  159. package/dist/components/Chat/example-with-file-uploads.mjs +1 -1
  160. package/dist/components/Chat/example-with-vercel-ai.js +11 -10
  161. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  162. package/dist/components/Chat/index.js +11 -10
  163. package/dist/components/Chat/index.mjs +1 -1
  164. package/dist/components/DeliveryLead/DeliveryLeadSubmission.mjs +1 -1
  165. package/dist/components/DeliveryLead/DeliveryLeadSubmissionList.mjs +1 -1
  166. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  167. package/dist/components/DeliveryLead/index.mjs +1 -1
  168. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  169. package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
  170. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  171. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  172. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  173. package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
  174. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  175. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  176. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
  177. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  178. package/dist/components/DigitalColleagues/colleague-card.mjs +1 -1
  179. package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
  180. package/dist/components/DigitalColleagues/colleague-type-selection.mjs +1 -1
  181. package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
  182. package/dist/components/DigitalColleagues/digital-colleague-options.mjs +1 -1
  183. package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
  184. package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
  185. package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
  186. package/dist/components/DigitalColleagues/index.mjs +1 -1
  187. package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
  188. package/dist/components/DigitalColleagues/knowledge-search.mjs +1 -1
  189. package/dist/components/DigitalColleagues/team-form.mjs +1 -1
  190. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  191. package/dist/components/Foundary/DashboardHeader.mjs +1 -1
  192. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  193. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  194. package/dist/components/Foundary/Knowledge/manage-team-context.mjs +1 -1
  195. package/dist/components/Foundary/LandingMenu.mjs +1 -1
  196. package/dist/components/Foundary/Login.mjs +1 -1
  197. package/dist/components/Foundary/MainPage.mjs +1 -1
  198. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  199. package/dist/components/Foundary/RichText/components/RawUploadComponent/index.mjs +1 -1
  200. package/dist/components/Foundary/RichText/index.mjs +1 -1
  201. package/dist/components/Foundary/RichText/nodes/image-node.mjs +1 -1
  202. package/dist/components/Foundary/RichText/plugins/image-plugin.mjs +1 -1
  203. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  204. package/dist/components/Foundary/SearchableSelect.mjs +1 -1
  205. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  206. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  207. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  208. package/dist/components/Foundary/Views/index.mjs +1 -1
  209. package/dist/components/Foundary/colleague-card.mjs +1 -1
  210. package/dist/components/Foundary/colleague-form.mjs +1 -1
  211. package/dist/components/Foundary/colleague-type-selection.mjs +1 -1
  212. package/dist/components/Foundary/document-edit.mjs +1 -1
  213. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  214. package/dist/components/Foundary/document-preview.mjs +1 -1
  215. package/dist/components/Foundary/file-edit.mjs +1 -1
  216. package/dist/components/Foundary/foundary-clone.mjs +1 -1
  217. package/dist/components/Foundary/foundary-layout.mjs +1 -1
  218. package/dist/components/Foundary/foundary-options.mjs +1 -1
  219. package/dist/components/Foundary/index.mjs +1 -1
  220. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  221. package/dist/components/Foundary/knowledge-search.mjs +1 -1
  222. package/dist/components/Foundary/team-form.mjs +1 -1
  223. package/dist/components/HeaderFooter/Footer.mjs +1 -1
  224. package/dist/components/HeaderFooter/Header.mjs +1 -1
  225. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  226. package/dist/components/HeaderFooter/HeaderMenu.mjs +1 -1
  227. package/dist/components/HeaderFooter/RelatedPagesMenu.mjs +1 -1
  228. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  229. package/dist/components/HeaderFooter/SimpleHeader.mjs +1 -1
  230. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  231. package/dist/components/HeaderFooter/enhanced-header.mjs +1 -1
  232. package/dist/components/HeaderFooter/index.mjs +1 -1
  233. package/dist/components/Heros/DashboardHero/DashboardHero.mjs +1 -1
  234. package/dist/components/Heros/DashboardHero/index.mjs +1 -1
  235. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  236. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  237. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  238. package/dist/components/Heros/PostHero/index.mjs +1 -1
  239. package/dist/components/Heros/RenderHero.mjs +1 -1
  240. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  241. package/dist/components/Heros/index.mjs +1 -1
  242. package/dist/components/Holidays/ApproveLeave.mjs +1 -1
  243. package/dist/components/Holidays/CalendarView.mjs +1 -1
  244. package/dist/components/Holidays/HolidayGrid.mjs +1 -1
  245. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  246. package/dist/components/Holidays/RequestLeave.mjs +1 -1
  247. package/dist/components/Holidays/index.mjs +1 -1
  248. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  249. package/dist/components/Layouts/Print.mjs +1 -1
  250. package/dist/components/Layouts/SlideShow.mjs +1 -1
  251. package/dist/components/Layouts/index.mjs +1 -1
  252. package/dist/components/Menus/Categories.mjs +1 -1
  253. package/dist/components/Menus/Filter.mjs +1 -1
  254. package/dist/components/Menus/ProjectTeam.mjs +1 -1
  255. package/dist/components/Menus/RelatedContent.mjs +1 -1
  256. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  257. package/dist/components/Menus/SidebarRight.mjs +1 -1
  258. package/dist/components/Menus/index.mjs +1 -1
  259. package/dist/components/Other/Container.mjs +1 -1
  260. package/dist/components/Other/index.mjs +1 -1
  261. package/dist/components/Payload/Link/index.mjs +1 -1
  262. package/dist/components/Payload/Pagination/index.mjs +1 -1
  263. package/dist/components/Payload/RichText/index.mjs +1 -1
  264. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  265. package/dist/components/Payload/index.mjs +1 -1
  266. package/dist/components/Projects/AddEpicModal.mjs +1 -1
  267. package/dist/components/Projects/AddFileModal.mjs +1 -1
  268. package/dist/components/Projects/AddSprintModal.mjs +1 -1
  269. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  270. package/dist/components/Projects/EpicFilter.mjs +1 -1
  271. package/dist/components/Projects/EpicsView.mjs +1 -1
  272. package/dist/components/Projects/FileView.mjs +1 -1
  273. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  274. package/dist/components/Projects/KanbanColumn.mjs +1 -1
  275. package/dist/components/Projects/PlanningView.mjs +1 -1
  276. package/dist/components/Projects/ProjectPage.mjs +1 -1
  277. package/dist/components/Projects/ProjectView.mjs +1 -1
  278. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  279. package/dist/components/Projects/TaskCard.mjs +1 -1
  280. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  281. package/dist/components/Projects/TaskSelect.mjs +1 -1
  282. package/dist/components/Projects/TaskSidebar.mjs +1 -1
  283. package/dist/components/Projects/TasksView.mjs +1 -1
  284. package/dist/components/Projects/TeamSwitcher.mjs +1 -1
  285. package/dist/components/Projects/business-unit-switcher.mjs +1 -1
  286. package/dist/components/Projects/file-list.mjs +1 -1
  287. package/dist/components/Projects/index.mjs +1 -1
  288. package/dist/components/Projects/project-card.mjs +1 -1
  289. package/dist/components/Projects/project-form.mjs +1 -1
  290. package/dist/components/Projects/team-card.mjs +1 -1
  291. package/dist/components/Projects/team-switcher-bar.mjs +1 -1
  292. package/dist/components/dc-temp/creative.mjs +1 -1
  293. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  294. package/dist/components/dc-temp/index.mjs +1 -1
  295. package/dist/components/dc-temp/markdown-renderer.mjs +1 -1
  296. package/dist/components/index.js +24 -23
  297. package/dist/components/index.mjs +1 -1
  298. package/dist/components/ui/alert.mjs +1 -1
  299. package/dist/components/ui/avatar.mjs +1 -1
  300. package/dist/components/ui/badge.mjs +1 -1
  301. package/dist/components/ui/breadcrumb.mjs +1 -1
  302. package/dist/components/ui/button.mjs +1 -1
  303. package/dist/components/ui/calendar.mjs +1 -1
  304. package/dist/components/ui/card.mjs +1 -1
  305. package/dist/components/ui/checkbox.mjs +1 -1
  306. package/dist/components/ui/command.mjs +1 -1
  307. package/dist/components/ui/dialog.mjs +1 -1
  308. package/dist/components/ui/dropdown-menu.mjs +1 -1
  309. package/dist/components/ui/hover-card.mjs +1 -1
  310. package/dist/components/ui/index.mjs +1 -1
  311. package/dist/components/ui/input.mjs +1 -1
  312. package/dist/components/ui/inputs/common/styles/index.mjs +1 -1
  313. package/dist/components/ui/inputs/text-input/index.mjs +1 -1
  314. package/dist/components/ui/inputs/textarea-input/index.mjs +1 -1
  315. package/dist/components/ui/label.mjs +1 -1
  316. package/dist/components/ui/pagination.mjs +1 -1
  317. package/dist/components/ui/popover.mjs +1 -1
  318. package/dist/components/ui/progress.mjs +1 -1
  319. package/dist/components/ui/scroll-area.mjs +1 -1
  320. package/dist/components/ui/select.mjs +1 -1
  321. package/dist/components/ui/separator.mjs +1 -1
  322. package/dist/components/ui/sheet.mjs +1 -1
  323. package/dist/components/ui/sidebar.mjs +1 -1
  324. package/dist/components/ui/skeleton.mjs +1 -1
  325. package/dist/components/ui/switch.mjs +1 -1
  326. package/dist/components/ui/tabs.mjs +1 -1
  327. package/dist/components/ui/textarea.mjs +1 -1
  328. package/dist/components/ui/toast.mjs +1 -1
  329. package/dist/components/ui/toaster.mjs +1 -1
  330. package/dist/components/ui/toggle-group.mjs +1 -1
  331. package/dist/components/ui/toggle.mjs +1 -1
  332. package/dist/components/ui/tooltip.mjs +1 -1
  333. package/dist/globals.css +1 -1
  334. package/dist/index.js +28 -27
  335. package/dist/index.mjs +1 -1
  336. package/dist/metafile-cjs.json +1 -1
  337. package/dist/metafile-esm.json +1 -1
  338. package/dist/pages/Blog.mjs +1 -1
  339. package/dist/pages/Documentation.mjs +1 -1
  340. package/dist/pages/IndexPage.mjs +1 -1
  341. package/dist/pages/Intranet.mjs +1 -1
  342. package/dist/pages/LandingPage.mjs +1 -1
  343. package/dist/pages/Page.mjs +1 -1
  344. package/dist/pages/Publish.mjs +1 -1
  345. package/dist/pages/Website.mjs +1 -1
  346. package/dist/payload-types.d.ts +1 -1
  347. package/dist/sections/AboutSection.mjs +1 -1
  348. package/dist/sections/BlogDetail.mjs +1 -1
  349. package/dist/sections/BlogList.mjs +1 -1
  350. package/dist/sections/BlogListSection.mjs +1 -1
  351. package/dist/sections/ContactSection.mjs +1 -1
  352. package/dist/sections/ImageSection.mjs +1 -1
  353. package/dist/sections/MainPageSection.mjs +1 -1
  354. package/dist/sections/PageSections.mjs +1 -1
  355. package/dist/sections/PricingSection.mjs +1 -1
  356. package/dist/sections/ServiceDetail.mjs +1 -1
  357. package/dist/sections/ServiceDetailSection.mjs +1 -1
  358. package/dist/sections/ServiceSection.mjs +1 -1
  359. package/dist/sections/form/index.mjs +1 -1
  360. package/dist/sections/index.mjs +1 -1
  361. package/dist/styles/Colors.mjs +1 -1
  362. package/dist/utils/index.mjs +1 -1
  363. package/package.json +3 -2
  364. package/dist/chunk-7JDMW5R3.mjs +0 -4
  365. package/dist/chunk-IMRGPVFS.mjs +0 -1
  366. package/dist/chunk-SZXMQMZ6.mjs +0 -4
  367. package/dist/chunk-UA2E23AS.mjs +0 -4
  368. package/dist/chunk-V6GC3UGV.mjs +0 -1
  369. package/dist/chunk-WBDSOPDY.mjs +0 -4
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as b}from"./chunk-UBZYXZ7B.mjs";import{a as I}from"./chunk-56X4PU43.mjs";import{a as S}from"./chunk-IMRGPVFS.mjs";import{useChat as me}from"@ai-sdk/react";import{useState as l}from"react";import{motion as fe,AnimatePresence as he}from"motion/react";import{Users as ye}from"lucide-react";import{jsx as n,jsxs as Ce}from"react/jsx-runtime";function Le({aiConfig:w,useCustomChat:F,enableAI:T=!0,messages:D=[],businessUnits:R=[],capabilities:B=[],sidebarItems:x=[],notifications:N=[],sessions:M=[],onNewChat:A,onSessionSelect:L,onSessionDelete:P,onSessionEdit:k=()=>{},onBusinessUnitChange:E=()=>{},onNotificationRemove:K=()=>{},onRemoveAll:O=()=>{},onActionClick:$=()=>{},onSearch:q=p=>console.log("Search query:",p),initialTeam:z="design",currentSession:m=null,showCapabilities:ve=!0,title:W="Digital Colleagues",enableFileUpload:f=!0,maxFileSize:h=10,allowedFileTypes:y=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:H="/headerlogo.png",appName:X="Nuvia",tagline:G="AI-Powered Workspace",actionIcon:J=n(ye,{className:"mr-2 h-4 w-4"}),actionText:Q="Collaborate",sidebarInitiallyClosed:V=!1}){let p={...w,onError:e=>{i?.setMessages(t=>[...t,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:e.message}]}]),console.error("Error in CopilotInterface:",e)}},Y=me(p||{}),i=T?F||Y:null,[Z,u]=l(""),[_,C]=l(!1),j=i?.messages||D,r=Z,ee=i?.status==="submitted"||_,se=i?.addToolResult?(e,t,s)=>{i.addToolResult({tool:t,toolCallId:e,output:s}),console.log("Tool result added:",{toolCallId:e,tool:t,output:s}),i.sendMessage()}:()=>{console.log("addToolResult not available")},o=R||[],te={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ie,ne]=l(()=>o.length===0?te:o.find(e=>e.id===z)||o[0]),[a,c]=l([]),[oe,ae]=l(!1),le=e=>{if(!e||!f)return;let t=[];Array.from(e).forEach(s=>{if(s.size>h*1024*1024){alert(`File ${s.name} is too large. Maximum size is ${h}MB.`);return}if(y.length>0&&!y.some(d=>s.type.match(d))){alert(`File type ${s.type} is not allowed.`);return}let U={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:s,status:"pending",progress:0};if(s.type.startsWith("image/")){let d=new FileReader;d.onload=ue=>{c(ge=>ge.map(g=>g.id===U.id?{...g,preview:ue.target?.result}:g))},d.readAsDataURL(s)}t.push(U)}),c(s=>[...s,...t])},re=e=>{c(t=>t.filter(s=>s.id!==e))},v=()=>{if(!(!r.trim()&&a.length===0)){if(i){let e=a.length>0?ce(a.map(t=>t.file)):void 0;i.sendMessage({text:r,files:e},{body:{timestamp:Date.now()}}),u("")}else console.log("Message to send:",r),console.log("Files to upload:",a),u(""),C(!0),setTimeout(()=>{C(!1)},1500);c([])}},ce=e=>{let t=new DataTransfer;return e.forEach(s=>t.items.add(s)),t.files},de=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),v())},pe=e=>{u(e)};return n(b,{sidebarItems:x||[],title:W,notifications:N||[],businessUnits:o,currentBusinessUnit:ie,onBusinessUnitChange:e=>{e&&(ne(e),E?.(e))},onSearch:q,showTabs:!1,onActionClick:$,actionIcon:J,actionText:Q,onNotificationRemove:K,onRemoveAll:O,logo:H,appName:X,tagline:G,sidebarInitiallyClosed:V,children:n(he,{mode:"wait",children:n(fe.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Ce("div",{className:"h-full flex",children:[n("div",{className:"w-80 flex-shrink-0 h-full p-2",children:n(I,{sessions:M||[],currentSession:m,teams:o,onNewChat:A,onSessionSelect:L,onSessionEdit:k,onSessionDelete:P})}),n("div",{className:"flex-1 h-full p-2",children:n(S,{messages:j||[],input:r,isTyping:ee,currentSessionTitle:m?.title,capabilities:B||[],onInputChange:pe,addToolResult:se,onSendMessage:v,onKeyPress:de,fileUploads:a,isDragOver:oe,enableFileUpload:f,onFileUpload:le,onRemoveFile:re,onDragOver:ae})})]})},"chat-interface")})})}export{Le as a};
4
+ import{a as b}from"./chunk-RS4WAAGI.mjs";import{a as I}from"./chunk-56X4PU43.mjs";import{a as S}from"./chunk-MCOHKE2T.mjs";import{useChat as me}from"@ai-sdk/react";import{useState as l}from"react";import{motion as fe,AnimatePresence as he}from"motion/react";import{Users as ye}from"lucide-react";import{jsx as n,jsxs as Ce}from"react/jsx-runtime";function Le({aiConfig:w,useCustomChat:F,enableAI:T=!0,messages:D=[],businessUnits:R=[],capabilities:B=[],sidebarItems:x=[],notifications:N=[],sessions:M=[],onNewChat:A,onSessionSelect:L,onSessionDelete:P,onSessionEdit:k=()=>{},onBusinessUnitChange:E=()=>{},onNotificationRemove:K=()=>{},onRemoveAll:O=()=>{},onActionClick:$=()=>{},onSearch:q=p=>console.log("Search query:",p),initialTeam:z="design",currentSession:m=null,showCapabilities:ve=!0,title:W="Digital Colleagues",enableFileUpload:f=!0,maxFileSize:h=10,allowedFileTypes:y=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:H="/headerlogo.png",appName:X="Nuvia",tagline:G="AI-Powered Workspace",actionIcon:J=n(ye,{className:"mr-2 h-4 w-4"}),actionText:Q="Collaborate",sidebarInitiallyClosed:V=!1}){let p={...w,onError:e=>{i?.setMessages(t=>[...t,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:e.message}]}]),console.error("Error in CopilotInterface:",e)}},Y=me(p||{}),i=T?F||Y:null,[Z,u]=l(""),[_,C]=l(!1),j=i?.messages||D,r=Z,ee=i?.status==="submitted"||_,se=i?.addToolResult?(e,t,s)=>{i.addToolResult({tool:t,toolCallId:e,output:s}),console.log("Tool result added:",{toolCallId:e,tool:t,output:s}),i.sendMessage()}:()=>{console.log("addToolResult not available")},o=R||[],te={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ie,ne]=l(()=>o.length===0?te:o.find(e=>e.id===z)||o[0]),[a,c]=l([]),[oe,ae]=l(!1),le=e=>{if(!e||!f)return;let t=[];Array.from(e).forEach(s=>{if(s.size>h*1024*1024){alert(`File ${s.name} is too large. Maximum size is ${h}MB.`);return}if(y.length>0&&!y.some(d=>s.type.match(d))){alert(`File type ${s.type} is not allowed.`);return}let U={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:s,status:"pending",progress:0};if(s.type.startsWith("image/")){let d=new FileReader;d.onload=ue=>{c(ge=>ge.map(g=>g.id===U.id?{...g,preview:ue.target?.result}:g))},d.readAsDataURL(s)}t.push(U)}),c(s=>[...s,...t])},re=e=>{c(t=>t.filter(s=>s.id!==e))},v=()=>{if(!(!r.trim()&&a.length===0)){if(i){let e=a.length>0?ce(a.map(t=>t.file)):void 0;i.sendMessage({text:r,files:e},{body:{timestamp:Date.now()}}),u("")}else console.log("Message to send:",r),console.log("Files to upload:",a),u(""),C(!0),setTimeout(()=>{C(!1)},1500);c([])}},ce=e=>{let t=new DataTransfer;return e.forEach(s=>t.items.add(s)),t.files},de=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),v())},pe=e=>{u(e)};return n(b,{sidebarItems:x||[],title:W,notifications:N||[],businessUnits:o,currentBusinessUnit:ie,onBusinessUnitChange:e=>{e&&(ne(e),E?.(e))},onSearch:q,showTabs:!1,onActionClick:$,actionIcon:J,actionText:Q,onNotificationRemove:K,onRemoveAll:O,logo:H,appName:X,tagline:G,sidebarInitiallyClosed:V,children:n(he,{mode:"wait",children:n(fe.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Ce("div",{className:"h-full flex",children:[n("div",{className:"w-80 flex-shrink-0 h-full p-2",children:n(I,{sessions:M||[],currentSession:m,teams:o,onNewChat:A,onSessionSelect:L,onSessionEdit:k,onSessionDelete:P})}),n("div",{className:"flex-1 h-full p-2",children:n(S,{messages:j||[],input:r,isTyping:ee,currentSessionTitle:m?.title,capabilities:B||[],onInputChange:pe,addToolResult:se,onSendMessage:v,onKeyPress:de,fileUploads:a,isDragOver:oe,enableFileUpload:f,onFileUpload:le,onRemoveFile:re,onDragOver:ae})})]})},"chat-interface")})})}export{Le as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-AEBUMA72.mjs";import{a as r}from"./chunk-FMH5CZ7X.mjs";import{a as e}from"./chunk-OM5ZUHCN.mjs";import{a as o}from"./chunk-FMJBJ3HN.mjs";import{jsx as t,jsxs as m}from"react/jsx-runtime";function c({blogs:n,pages:g,categories:p,types:i,base:a}){return t("section",{children:t(o,{children:t("div",{className:"grid",children:m("div",{children:[i&&t(e,{types:i}),t(s,{blogs:n,base:a}),t(r,{pages:g})]})})})})}export{c as a};
1
+ import{a as s}from"./chunk-AEBUMA72.mjs";import{a as e}from"./chunk-OM5ZUHCN.mjs";import{a as r}from"./chunk-FMH5CZ7X.mjs";import{a as o}from"./chunk-FMJBJ3HN.mjs";import{jsx as t,jsxs as m}from"react/jsx-runtime";function c({blogs:n,pages:g,categories:p,types:i,base:a}){return t("section",{children:t(o,{children:t("div",{className:"grid",children:m("div",{children:[i&&t(e,{types:i}),t(s,{blogs:n,base:a}),t(r,{pages:g})]})})})})}export{c as a};
@@ -1 +1 @@
1
- import{f as c}from"./chunk-4ITG3T35.mjs";import{a as t}from"./chunk-MDJREBVI.mjs";import n from"next/image";import{jsx as e,jsxs as l}from"react/jsx-runtime";function g({image:a,title:i,content:s,link:o,theme:r}){return l("section",{className:"container relative",children:[e("div",{className:t("absolute mt-[50%] w-full h-full",r==="dark"?"bg-white":"bg-black")}),e("div",{className:t("flex flex-col md:flex-row items-center justify-between gap-12 px-6 md:px-16 py-16 bg-background",r,r==="dark"&&"bg-black clip-custom-top-r"),children:l("div",{className:"w-full flex flex-row items-center justify-center",children:[l("div",{className:t("w-full md:w-1/2 max-w-lg text-left",r==="dark"&&"mt-48"),children:[e("h2",{className:"text-3xl md:text-5xl text-primary",children:i}),e("p",{className:"mt-4 text-gray-700 text-lg",children:s&&e(c,{enableGutter:!1,content:s,enableProse:!1,className:t("prose prose-headings:text-gray-700 prose-p:text-gray-700")})}),e("button",{className:"mt-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full text-base hover:bg-accent hover:text-white transition",children:e("a",{href:o.url||"#",children:o.label||"Learn more"})})]}),e("div",{className:"w-full md:w-1/2 flex justify-center",children:a&&a.url&&e(n,{src:a.url,alt:a.alt||`Image of ${i}`,width:400,height:400,className:"max-w-full"})})]})})]})}export{g as a};
1
+ import{f as c}from"./chunk-N3B3XNV3.mjs";import{a as t}from"./chunk-MDJREBVI.mjs";import n from"next/image";import{jsx as e,jsxs as l}from"react/jsx-runtime";function g({image:a,title:i,content:s,link:o,theme:r}){return l("section",{className:"container relative",children:[e("div",{className:t("absolute mt-[50%] w-full h-full",r==="dark"?"bg-white":"bg-black")}),e("div",{className:t("flex flex-col md:flex-row items-center justify-between gap-12 px-6 md:px-16 py-16 bg-background",r,r==="dark"&&"bg-black clip-custom-top-r"),children:l("div",{className:"w-full flex flex-row items-center justify-center",children:[l("div",{className:t("w-full md:w-1/2 max-w-lg text-left",r==="dark"&&"mt-48"),children:[e("h2",{className:"text-3xl md:text-5xl text-primary",children:i}),e("p",{className:"mt-4 text-gray-700 text-lg",children:s&&e(c,{enableGutter:!1,content:s,enableProse:!1,className:t("prose prose-headings:text-gray-700 prose-p:text-gray-700")})}),e("button",{className:"mt-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full text-base hover:bg-accent hover:text-white transition",children:e("a",{href:o.url||"#",children:o.label||"Learn more"})})]}),e("div",{className:"w-full md:w-1/2 flex justify-center",children:a&&a.url&&e(n,{src:a.url,alt:a.alt||`Image of ${i}`,width:400,height:400,className:"max-w-full"})})]})})]})}export{g as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as u}from"./chunk-AZKOVKSK.mjs";import{a as b}from"./chunk-GLZEHRPY.mjs";import{a as N}from"./chunk-MU5WPW4N.mjs";import{a as m,b as d,c as p,d as f}from"./chunk-KY7WQYN4.mjs";import{b as a}from"./chunk-ZUA4KNIR.mjs";import{a as v,b as g,c as h}from"./chunk-SOLZ4VQH.mjs";import{useState as T}from"react";import{motion as e}from"motion/react";import{Bell as $,Menu as q,PanelLeft as E,Bot as G}from"lucide-react";import{Fragment as J,jsx as t,jsxs as i}from"react/jsx-runtime";function at({title:Q,notifications:x=[],onToggleSidebar:w,onToggleMobileMenu:y,sidebarOpen:C=!0,className:A,activeTab:k="assistant",onTabChange:P,showTabs:O=!0,tabOptions:R=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:B,actionIcon:H=t(G,{className:"mr-2 h-4 w-4"}),actionText:j="Action",onNotificationRemove:z,onRemoveAll:D,logo:I="/headerlogo.png",appName:L="Nuvia",tagline:M="Collaboration Platform"}){let[F,l]=T(!1),[r,c]=T(x),n=r.filter(o=>!o.read).length,S=o=>{c(s=>s.filter(U=>U.id!==o)),z?.(o)},K=()=>{c(o=>o.filter(s=>s.read)),D?.()};return i(J,{children:[i("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${A||""}`,children:[t(a,{variant:"ghost",size:"icon",className:"md:hidden",onClick:y,children:t(q,{className:"h-5 w-5"})}),t(a,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:w,children:t(E,{className:"h-5 w-5"})}),!C&&i(e.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[t("div",{className:"flex h-10 w-10 items-center justify-center",children:t("img",{src:I,alt:"Logo",className:"h-10 w-10 object-contain"})}),i("div",{children:[t("h2",{className:"font-semibold text-sm",children:L}),t("p",{className:"text-xs text-muted-foreground",children:M})]})]}),i("div",{className:"flex flex-1 items-center",children:[O&&t(b,{activeTab:k,onTabChange:P,tabOptions:R}),i("div",{className:"flex items-center gap-3 ml-auto",children:[t(e.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:B,children:[H,j]})})}),t(u,{}),t(m,{children:i(d,{children:[t(p,{asChild:!0,children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>l(!0),children:[t(e.div,{animate:n>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:n>0?1/0:0,repeatDelay:3},children:t($,{className:"h-5 w-5"})}),n>0&&t(e.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:n})]})})}),t(f,{children:"Notifications"})]})}),t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(v,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[t(g,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),t(h,{})]})})]})]})]}),t(N,{notifications:r,open:F,onClose:()=>l(!1),onNotificationRemove:S,onRemoveAll:K})]})}export{at as a};
4
+ import{a as b}from"./chunk-GLZEHRPY.mjs";import{a as N}from"./chunk-MU5WPW4N.mjs";import{a as u}from"./chunk-AZKOVKSK.mjs";import{a as m,b as d,c as p,d as f}from"./chunk-KY7WQYN4.mjs";import{b as a}from"./chunk-ZUA4KNIR.mjs";import{a as v,b as g,c as h}from"./chunk-SOLZ4VQH.mjs";import{useState as T}from"react";import{motion as e}from"motion/react";import{Bell as $,Menu as q,PanelLeft as E,Bot as G}from"lucide-react";import{Fragment as J,jsx as t,jsxs as i}from"react/jsx-runtime";function at({title:Q,notifications:x=[],onToggleSidebar:w,onToggleMobileMenu:y,sidebarOpen:C=!0,className:A,activeTab:k="assistant",onTabChange:P,showTabs:O=!0,tabOptions:R=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:B,actionIcon:H=t(G,{className:"mr-2 h-4 w-4"}),actionText:j="Action",onNotificationRemove:z,onRemoveAll:D,logo:I="/headerlogo.png",appName:L="Nuvia",tagline:M="Collaboration Platform"}){let[F,l]=T(!1),[r,c]=T(x),n=r.filter(o=>!o.read).length,S=o=>{c(s=>s.filter(U=>U.id!==o)),z?.(o)},K=()=>{c(o=>o.filter(s=>s.read)),D?.()};return i(J,{children:[i("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${A||""}`,children:[t(a,{variant:"ghost",size:"icon",className:"md:hidden",onClick:y,children:t(q,{className:"h-5 w-5"})}),t(a,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:w,children:t(E,{className:"h-5 w-5"})}),!C&&i(e.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[t("div",{className:"flex h-10 w-10 items-center justify-center",children:t("img",{src:I,alt:"Logo",className:"h-10 w-10 object-contain"})}),i("div",{children:[t("h2",{className:"font-semibold text-sm",children:L}),t("p",{className:"text-xs text-muted-foreground",children:M})]})]}),i("div",{className:"flex flex-1 items-center",children:[O&&t(b,{activeTab:k,onTabChange:P,tabOptions:R}),i("div",{className:"flex items-center gap-3 ml-auto",children:[t(e.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:B,children:[H,j]})})}),t(u,{}),t(m,{children:i(d,{children:[t(p,{asChild:!0,children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>l(!0),children:[t(e.div,{animate:n>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:n>0?1/0:0,repeatDelay:3},children:t($,{className:"h-5 w-5"})}),n>0&&t(e.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:n})]})})}),t(f,{children:"Notifications"})]})}),t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(v,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[t(g,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),t(h,{})]})})]})]})]}),t(N,{notifications:r,open:F,onClose:()=>l(!1),onNotificationRemove:S,onRemoveAll:K})]})}export{at as a};
@@ -1 +1 @@
1
- import{a as P}from"./chunk-ZHBYZ4HE.mjs";import{a as I}from"./chunk-2O54GV6Q.mjs";import{a as M}from"./chunk-DCOFQFVJ.mjs";import{a as C}from"./chunk-6SWKEZN6.mjs";import{a as v}from"./chunk-DFIXTV2M.mjs";import{a as S,f as b,g as F,i as U}from"./chunk-3UMMMQEH.mjs";import{b as N}from"./chunk-ZUA4KNIR.mjs";import{useEffect as W,useState as n}from"react";import{Loader2 as Y,Check as Z,X as _,Upload as $,File as ee}from"lucide-react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var fe=({isOpen:A,onClose:h,initialTask:m,epics:E,sprints:O,onUpdateTask:y,onDeleteTask:H,onAddComment:T,colleagues:L,onUploadFile:c,onDeleteFile:p,onFileUpdate:B})=>{let[s,R]=n(m),[j,d]=n(new Date),[r,e]=n("idle"),[g,l]=n("idle"),[z,u]=n(!1),[te,ae]=n([]),[X,se]=n(L);W(()=>{R(m)},[m]);let D=async(t,o)=>{if(o!==s[t]){e("loading");try{await y(s.id.toString(),{[t]:o}),d(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch(f){console.log("error",f),e("error"),setTimeout(()=>e("idle"),3e3)}}},q=async(t,o)=>{if(o!==s[t]){e("loading");try{await y(s.id.toString(),{[t]:o}),d(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch(f){console.log("error",f),e("error"),setTimeout(()=>e("idle"),3e3)}}},G=async t=>{if(T){e("loading");try{await T?.({content:t,taskId:s.id.toString()}),d(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch{e("error"),setTimeout(()=>e("idle"),3e3)}}},J=async()=>{l("loading");try{await H(s.id.toString()),l("success"),setTimeout(()=>{h(),l("idle")},1e3)}catch{l("error"),setTimeout(()=>l("idle"),3e3)}},K=async t=>{if(c){e("loading");try{await c(s.id.toString(),t),d(new Date),e("success"),u(!1),setTimeout(()=>e("idle"),1500)}catch(o){console.error("Error uploading file:",o),e("error"),setTimeout(()=>e("idle"),3e3)}}},Q=async t=>{if(p){e("loading");try{await p(s.id.toString(),t.id.toString()),d(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch(o){console.error("Error deleting file:",o),e("error"),setTimeout(()=>e("idle"),3e3)}}},x=(s.files||[]).map(t=>typeof t=="number"?null:t).filter(t=>t!==null),k=r!=="loading"&&g!=="loading",w=()=>{k&&h()},V=()=>r==="loading"?i("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a(Y,{className:"h-4 w-4 animate-spin"}),a("span",{children:"Updating..."})]}):r==="success"?i("div",{className:"flex items-center gap-2 text-sm text-success",children:[a(Z,{className:"h-4 w-4"}),a("span",{children:"Updated successfully"})]}):r==="error"?i("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[a(_,{className:"h-4 w-4"}),a("span",{children:"Update failed"})]}):null;return i(S,{open:A,onOpenChange:w,children:[i(b,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[i(F,{children:[a(U,{className:"sr-only",children:s?.name}),i("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex-1",children:V()}),!k&&a("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),i("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[i("div",{className:"lg:col-span-2 space-y-4",children:[a(v,{fieldName:"name",value:s.name||"",label:"",onSave:D,className:"border-b border-border pb-3",disabled:r==="loading"}),a(v,{fieldName:"description",value:s.description||"",label:"Description",multiline:!0,onSave:D,disabled:r==="loading"}),i("div",{className:"space-y-2",children:[i("div",{className:"flex items-center justify-between",children:[i("div",{className:"flex items-center gap-2",children:[a(ee,{className:"h-4 w-4 text-muted-foreground"}),a("h3",{className:"text-sm font-medium",children:"Files"})]}),c&&i(N,{variant:"outline",size:"sm",onClick:()=>u(!0),disabled:r==="loading",className:"gap-2",children:[a($,{className:"h-4 w-4"}),"Upload"]})]}),x.length>0?a(I,{files:x,onFileDelete:p?Q:void 0,onFileUpdate:B,showHeader:!1,className:"border rounded-lg",viewMode:"card"}):a("div",{className:"text-sm text-muted-foreground py-4 text-center border border-dashed rounded-lg",children:"No files attached"})]}),a(C,{comments:(s?.comments||[]).map(t=>({author:t.author?.value.name||"",createdAt:new Date(t.timestamp),text:t.text,id:t.id||""})),onAddComment:G})]}),a(P,{task:s,epics:E,sprints:O,lastUpdated:j,onUpdateTask:q,onClose:w,onDelete:J,isUpdating:r==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:X})]})]}),c&&a(M,{isOpen:z,onClose:()=>u(!1),onAddFile:K})]})};export{fe as a};
1
+ import{a as P}from"./chunk-ZHBYZ4HE.mjs";import{a as I}from"./chunk-LJFBHY4P.mjs";import{a as M}from"./chunk-DCOFQFVJ.mjs";import{a as C}from"./chunk-6SWKEZN6.mjs";import{a as v}from"./chunk-DFIXTV2M.mjs";import{a as S,f as b,g as F,i as U}from"./chunk-3UMMMQEH.mjs";import{b as N}from"./chunk-ZUA4KNIR.mjs";import{useEffect as W,useState as n}from"react";import{Loader2 as Y,Check as Z,X as _,Upload as $,File as ee}from"lucide-react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var fe=({isOpen:A,onClose:h,initialTask:m,epics:E,sprints:O,onUpdateTask:y,onDeleteTask:H,onAddComment:T,colleagues:L,onUploadFile:c,onDeleteFile:p,onFileUpdate:B})=>{let[s,R]=n(m),[j,d]=n(new Date),[r,e]=n("idle"),[g,l]=n("idle"),[z,u]=n(!1),[te,ae]=n([]),[X,se]=n(L);W(()=>{R(m)},[m]);let D=async(t,o)=>{if(o!==s[t]){e("loading");try{await y(s.id.toString(),{[t]:o}),d(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch(f){console.log("error",f),e("error"),setTimeout(()=>e("idle"),3e3)}}},q=async(t,o)=>{if(o!==s[t]){e("loading");try{await y(s.id.toString(),{[t]:o}),d(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch(f){console.log("error",f),e("error"),setTimeout(()=>e("idle"),3e3)}}},G=async t=>{if(T){e("loading");try{await T?.({content:t,taskId:s.id.toString()}),d(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch{e("error"),setTimeout(()=>e("idle"),3e3)}}},J=async()=>{l("loading");try{await H(s.id.toString()),l("success"),setTimeout(()=>{h(),l("idle")},1e3)}catch{l("error"),setTimeout(()=>l("idle"),3e3)}},K=async t=>{if(c){e("loading");try{await c(s.id.toString(),t),d(new Date),e("success"),u(!1),setTimeout(()=>e("idle"),1500)}catch(o){console.error("Error uploading file:",o),e("error"),setTimeout(()=>e("idle"),3e3)}}},Q=async t=>{if(p){e("loading");try{await p(s.id.toString(),t.id.toString()),d(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch(o){console.error("Error deleting file:",o),e("error"),setTimeout(()=>e("idle"),3e3)}}},x=(s.files||[]).map(t=>typeof t=="number"?null:t).filter(t=>t!==null),k=r!=="loading"&&g!=="loading",w=()=>{k&&h()},V=()=>r==="loading"?i("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a(Y,{className:"h-4 w-4 animate-spin"}),a("span",{children:"Updating..."})]}):r==="success"?i("div",{className:"flex items-center gap-2 text-sm text-success",children:[a(Z,{className:"h-4 w-4"}),a("span",{children:"Updated successfully"})]}):r==="error"?i("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[a(_,{className:"h-4 w-4"}),a("span",{children:"Update failed"})]}):null;return i(S,{open:A,onOpenChange:w,children:[i(b,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[i(F,{children:[a(U,{className:"sr-only",children:s?.name}),i("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex-1",children:V()}),!k&&a("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),i("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[i("div",{className:"lg:col-span-2 space-y-4",children:[a(v,{fieldName:"name",value:s.name||"",label:"",onSave:D,className:"border-b border-border pb-3",disabled:r==="loading"}),a(v,{fieldName:"description",value:s.description||"",label:"Description",multiline:!0,onSave:D,disabled:r==="loading"}),i("div",{className:"space-y-2",children:[i("div",{className:"flex items-center justify-between",children:[i("div",{className:"flex items-center gap-2",children:[a(ee,{className:"h-4 w-4 text-muted-foreground"}),a("h3",{className:"text-sm font-medium",children:"Files"})]}),c&&i(N,{variant:"outline",size:"sm",onClick:()=>u(!0),disabled:r==="loading",className:"gap-2",children:[a($,{className:"h-4 w-4"}),"Upload"]})]}),x.length>0?a(I,{files:x,onFileDelete:p?Q:void 0,onFileUpdate:B,showHeader:!1,className:"border rounded-lg",viewMode:"card"}):a("div",{className:"text-sm text-muted-foreground py-4 text-center border border-dashed rounded-lg",children:"No files attached"})]}),a(C,{comments:(s?.comments||[]).map(t=>({author:t.author?.value.name||"",createdAt:new Date(t.timestamp),text:t.text,id:t.id||""})),onAddComment:G})]}),a(P,{task:s,epics:E,sprints:O,lastUpdated:j,onUpdateTask:q,onClose:w,onDelete:J,isUpdating:r==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:X})]})]}),c&&a(M,{isOpen:z,onClose:()=>u(!1),onAddFile:K})]})};export{fe as a};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-GRNOF6LY.mjs";import{a as l}from"./chunk-FMJBJ3HN.mjs";import{a as m}from"./chunk-MDJREBVI.mjs";import t from"next/image";import{Fragment as p,jsx as e,jsxs as i}from"react/jsx-runtime";function u(d){let{images:a,sectionHeading:n,keyPoints:s,description:o}=d;return e(p,{children:e("section",{id:"about-section",className:m(" clip-custom-top-l sticky md:top-0 md:h-screen z-2 flex flex-col items-center justify-center section-padding-primary dark bg-background",d.className||""),children:e(l,{children:i("div",{className:"grid items-center gap-12 lg:grid-cols-[.92fr_1fr] 2xl:gap-20",children:[i("div",{className:"lg:order-2","data-aos":"fade-left","data-aos-delay":"200",children:[e(c,{...n}),s&&s.length>0&&e("div",{className:"mt-7 grid gap-5 text-accent sm:grid-cols-2 md:mt-10 md:gap-[1.875rem]",children:s.map((r,g)=>i("div",{className:"group flex min-h-[64px] items-center gap-5 rounded-5 border border-accent px-6 py-2 md:min-h-[85px] md:px-[1.875rem] md:py-3",children:[e("span",{className:"duration flex-none scale-100 transition-transform ease-linear group-hover:scale-90",children:r.icon}),e("h3",{className:"text-md font-bold leading-[1.25] md:text-lg",children:r.title})]},g))}),o&&e("p",{className:"mt-5 text-primary md:mt-[1.875rem]",children:o})]}),a&&e("div",{className:"mx-auto text-center",children:i("div",{className:"relative mx-auto grid max-w-[580px] grid-cols-2 gap-2.5 overflow-hidden",children:[e("div",{className:"relative flex justify-end overflow-hidden",children:e("div",{className:"relative z-[2] mt-auto","data-aos":"fade-up","data-aos-delay":"200",children:e("div",{className:"relative z-[4] overflow-hidden",children:e(t,{src:a.image1.src,alt:a.image1.alt,width:a.image1.width,height:a.image1.height,className:"rounded-tl-[60px] object-cover object-top"})})})}),e("div",{className:"flex overflow-hidden",children:e(t,{src:a.image2.src,alt:a.image2.alt,width:a.image2.width,height:a.image2.height,className:"rounded-[80px_10px] object-cover","data-aos":"fade-right","data-aos-delay":"300"})}),e("div",{className:"ml-auto flex max-w-[250px] justify-end overflow-hidden",children:e(t,{src:a.image3.src,alt:a.image4.alt,width:a.image3.width,height:a.image3.height,className:"rounded-[50px_10px] object-cover","data-aos":"fade-left","data-aos-delay":"350"})}),e("div",{className:"overflow-hidden",children:e(t,{src:a.image4.src,alt:a.image4.alt,width:a.image4.width,height:a.image4.height,className:"rounded-10 rounded-br-[80px] object-cover","data-aos":"fade-right","data-aos-delay":"400"})}),e("div",{className:"absolute left-1/2 top-1/2 z-[4] -translate-x-1/2 -translate-y-1/2 overflow-hidden",children:e("div",{"data-aos":"zoom-in","data-aos-delay":"450",children:e("span",{className:"grid h-[100px] w-[100px] place-items-center rounded-full border-[12px] border-white bg-accent text-[30px] text-white",children:e("svg",{width:"1em",height:"1em",viewBox:"0 0 27 27",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M26.8125 13.8672C26.8125 14.9922 25.875 15.9297 24.8125 15.9297H15.8125V24.9297C15.8125 25.9922 14.875 26.8672 13.8125 26.8672C12.6875 26.8672 11.8125 25.9922 11.8125 24.9297V15.9297H2.8125C1.6875 15.9297 0.8125 14.9922 0.8125 13.8672C0.8125 12.8047 1.6875 11.9297 2.8125 11.9297H11.8125V2.92969C11.8125 1.80469 12.6875 0.867188 13.8125 0.867188C14.875 0.867188 15.8125 1.80469 15.8125 2.92969V11.9297H24.8125C25.875 11.8672 26.8125 12.8047 26.8125 13.8672Z"})})})})})]})})]})})})})}export{u as a};
1
+ import{a as c}from"./chunk-M7NV6EFH.mjs";import{a as l}from"./chunk-FMJBJ3HN.mjs";import{a as m}from"./chunk-MDJREBVI.mjs";import t from"next/image";import{Fragment as p,jsx as e,jsxs as i}from"react/jsx-runtime";function u(d){let{images:a,sectionHeading:n,keyPoints:s,description:o}=d;return e(p,{children:e("section",{id:"about-section",className:m(" clip-custom-top-l sticky md:top-0 md:h-screen z-2 flex flex-col items-center justify-center section-padding-primary dark bg-background",d.className||""),children:e(l,{children:i("div",{className:"grid items-center gap-12 lg:grid-cols-[.92fr_1fr] 2xl:gap-20",children:[i("div",{className:"lg:order-2","data-aos":"fade-left","data-aos-delay":"200",children:[e(c,{...n}),s&&s.length>0&&e("div",{className:"mt-7 grid gap-5 text-accent sm:grid-cols-2 md:mt-10 md:gap-[1.875rem]",children:s.map((r,g)=>i("div",{className:"group flex min-h-[64px] items-center gap-5 rounded-5 border border-accent px-6 py-2 md:min-h-[85px] md:px-[1.875rem] md:py-3",children:[e("span",{className:"duration flex-none scale-100 transition-transform ease-linear group-hover:scale-90",children:r.icon}),e("h3",{className:"text-md font-bold leading-[1.25] md:text-lg",children:r.title})]},g))}),o&&e("p",{className:"mt-5 text-primary md:mt-[1.875rem]",children:o})]}),a&&e("div",{className:"mx-auto text-center",children:i("div",{className:"relative mx-auto grid max-w-[580px] grid-cols-2 gap-2.5 overflow-hidden",children:[e("div",{className:"relative flex justify-end overflow-hidden",children:e("div",{className:"relative z-[2] mt-auto","data-aos":"fade-up","data-aos-delay":"200",children:e("div",{className:"relative z-[4] overflow-hidden",children:e(t,{src:a.image1.src,alt:a.image1.alt,width:a.image1.width,height:a.image1.height,className:"rounded-tl-[60px] object-cover object-top"})})})}),e("div",{className:"flex overflow-hidden",children:e(t,{src:a.image2.src,alt:a.image2.alt,width:a.image2.width,height:a.image2.height,className:"rounded-[80px_10px] object-cover","data-aos":"fade-right","data-aos-delay":"300"})}),e("div",{className:"ml-auto flex max-w-[250px] justify-end overflow-hidden",children:e(t,{src:a.image3.src,alt:a.image4.alt,width:a.image3.width,height:a.image3.height,className:"rounded-[50px_10px] object-cover","data-aos":"fade-left","data-aos-delay":"350"})}),e("div",{className:"overflow-hidden",children:e(t,{src:a.image4.src,alt:a.image4.alt,width:a.image4.width,height:a.image4.height,className:"rounded-10 rounded-br-[80px] object-cover","data-aos":"fade-right","data-aos-delay":"400"})}),e("div",{className:"absolute left-1/2 top-1/2 z-[4] -translate-x-1/2 -translate-y-1/2 overflow-hidden",children:e("div",{"data-aos":"zoom-in","data-aos-delay":"450",children:e("span",{className:"grid h-[100px] w-[100px] place-items-center rounded-full border-[12px] border-white bg-accent text-[30px] text-white",children:e("svg",{width:"1em",height:"1em",viewBox:"0 0 27 27",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M26.8125 13.8672C26.8125 14.9922 25.875 15.9297 24.8125 15.9297H15.8125V24.9297C15.8125 25.9922 14.875 26.8672 13.8125 26.8672C12.6875 26.8672 11.8125 25.9922 11.8125 24.9297V15.9297H2.8125C1.6875 15.9297 0.8125 14.9922 0.8125 13.8672C0.8125 12.8047 1.6875 11.9297 2.8125 11.9297H11.8125V2.92969C11.8125 1.80469 12.6875 0.867188 13.8125 0.867188C14.875 0.867188 15.8125 1.80469 15.8125 2.92969V11.9297H24.8125C25.875 11.8672 26.8125 12.8047 26.8125 13.8672Z"})})})})})]})})]})})})})}export{u as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as i}from"./chunk-LLED3RQS.mjs";import{a as m}from"./chunk-SMKYMYUV.mjs";import{useState as b,useCallback as R}from"react";import{DragDropContext as P}from"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration";import{jsx as r,jsxs as M}from"react/jsx-runtime";var w=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function I({initialData:t,addNewDeal:x,updateDeal:l,addComment:C,addNewCustomer:v}){let[a,u]=b(null),p=e=>(t.deals??[]).filter(s=>s.status===e),D=e=>e.reduce((s,o)=>s+(o.value||0),0),g=(e,s)=>{let o={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0};return e.reduce((c,d)=>c+(d.value||0)*o[s],0)},f=R(e=>{let{source:s,destination:o}=e;if(!o||s.droppableId===o.droppableId&&s.index===o.index)return;let c=s.droppableId,d=o.droppableId,n=t.deals?.filter(S=>S.id===s.index)[0],N=[...t.deals??[]];n&&(n.status=d,l(n))},[l]);return r(P,{onDragEnd:f,children:M("div",{className:"h-screen flex flex-col p-4 overflow-hidden",children:[r("div",{className:"flex space-x-4 flex-1 min-h-0 h-full",children:w.filter(e=>e!=="Lost").map(e=>{let s=p(e);return r(m,{status:e,deals:s,customers:t.customers??[],users:t.users,categories:t.categories??[],onDealClick:u,calculateColumnValue:D,calculateWeightedValue:g},e)})}),a&&r(i,{deal:a,users:t.users,customer:a.customer,categories:t.categories??[],onClose:()=>u(null),onSave:l,onAddComment:e=>C(a.id.toString(),e)})]})})}export{I as a};
@@ -1 +1 @@
1
- import{f as t}from"./chunk-4ITG3T35.mjs";import{b as o}from"./chunk-ZUA4KNIR.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import s from"next/link";import{jsx as i,jsxs as n}from"react/jsx-runtime";var p=({dynamicServiceDetail:c,style:a})=>{let e=c;return i("div",{className:"container",children:n("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[n("div",{className:r("w-full text-left prose"),children:[i("h2",{className:"text-primary",children:e.title}),i("div",{className:"",children:i(t,{enableGutter:!1,content:e.description,enableProse:!1,className:r("prose prose-headings:text-foreground prose-p:text-foreground")})}),i(o,{asChild:!0,className:"mt-6 px-6 py-3 border border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition no-underline",children:i(s,{href:`/${e.slug}`,children:"Learn more"})})]}),e.icon&&typeof e.icon=="object"&&"type"in e.icon&&"iconName"in e.icon&&i("div",{className:r("w-full h-full min-h-96 py-6 p-0 md:p-16 flex justify-center"),children:i("i",{className:`${e.icon.type} fa-${e.icon.iconName} fa-10x w-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})};export{p as a};
1
+ import{f as t}from"./chunk-N3B3XNV3.mjs";import{b as o}from"./chunk-ZUA4KNIR.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import s from"next/link";import{jsx as i,jsxs as n}from"react/jsx-runtime";var p=({dynamicServiceDetail:c,style:a})=>{let e=c;return i("div",{className:"container",children:n("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[n("div",{className:r("w-full text-left prose"),children:[i("h2",{className:"text-primary",children:e.title}),i("div",{className:"",children:i(t,{enableGutter:!1,content:e.description,enableProse:!1,className:r("prose prose-headings:text-foreground prose-p:text-foreground")})}),i(o,{asChild:!0,className:"mt-6 px-6 py-3 border border-accent text-foreground bg-background rounded-full hover:bg-accent hover:text-accent-foreground transition no-underline",children:i(s,{href:`/${e.slug}`,children:"Learn more"})})]}),e.icon&&typeof e.icon=="object"&&"type"in e.icon&&"iconName"in e.icon&&i("div",{className:r("w-full h-full min-h-96 py-6 p-0 md:p-16 flex justify-center"),children:i("i",{className:`${e.icon.type} fa-${e.icon.iconName} fa-10x w-3/4 h-full text-foreground fill-gradient-linear`,style:{width:"90%"}})})]})})};export{p as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as b}from"./chunk-CXHPLJDO.mjs";import{a}from"./chunk-6YHCNPFB.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as i,jsxs as h}from"react/jsx-runtime";var v=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:i(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:U,title:C="Digital Colleagues",notifications:N=[],currentBusinessUnit:B=v[0],onBusinessUnitChange:y,onSearch:c,businessUnits:F=v,activeTab:x,onTabChange:T,showTabs:k=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:w,onRemoveAll:M,logo:n="/headerlogo.png",logoLink:d="/teams",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:O=!1}){let[e,I]=l(!O),[m,t]=l(!1),[u,L]=l(B),p=f=>{L(f),y?.(f)};return h("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[m&&i("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),i("div",{className:"md:hidden",children:i(a,{items:r,isOpen:m,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),i("div",{className:"hidden md:block",children:i(a,{items:r,isOpen:e,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),h("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",e?"md:pl-64":"md:pl-0"),children:[i(b,{title:C,notifications:N,onToggleSidebar:()=>I(!e),onToggleMobileMenu:()=>t(!0),sidebarOpen:e,activeTab:x,onTabChange:T,showTabs:k,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:w,onRemoveAll:M,logo:n,appName:o,tagline:s}),i("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-y-scroll",children:U})]})]})}export{E as a};
4
+ import{a}from"./chunk-6YHCNPFB.mjs";import{a as b}from"./chunk-F6DMXMR4.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as i,jsxs as h}from"react/jsx-runtime";var v=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:i(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:U,title:C="Digital Colleagues",notifications:N=[],currentBusinessUnit:B=v[0],onBusinessUnitChange:y,onSearch:c,businessUnits:F=v,activeTab:x,onTabChange:T,showTabs:k=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:w,onRemoveAll:M,logo:n="/headerlogo.png",logoLink:d="/teams",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:O=!1}){let[e,I]=l(!O),[m,t]=l(!1),[u,L]=l(B),p=f=>{L(f),y?.(f)};return h("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[m&&i("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),i("div",{className:"md:hidden",children:i(a,{items:r,isOpen:m,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),i("div",{className:"hidden md:block",children:i(a,{items:r,isOpen:e,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),h("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",e?"md:pl-64":"md:pl-0"),children:[i(b,{title:C,notifications:N,onToggleSidebar:()=>I(!e),onToggleMobileMenu:()=>t(!0),sidebarOpen:e,activeTab:x,onTabChange:T,showTabs:k,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:w,onRemoveAll:M,logo:n,appName:o,tagline:s}),i("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-y-scroll",children:U})]})]})}export{E as a};
@@ -1 +1 @@
1
- import{f as r}from"./chunk-4ITG3T35.mjs";import{jsx as e}from"react/jsx-runtime";var c=({children:o,richText:t})=>e("div",{className:"min-w-full py-10 bg-muted mt-24",children:e("div",{className:"container",children:o||t&&e(r,{content:t,enableGutter:!1})})});export{c as a};
1
+ import{f as r}from"./chunk-N3B3XNV3.mjs";import{jsx as e}from"react/jsx-runtime";var c=({children:o,richText:t})=>e("div",{className:"min-w-full py-10 bg-muted mt-24",children:e("div",{className:"container",children:o||t&&e(r,{content:t,enableGutter:!1})})});export{c as a};
@@ -1,4 +1,4 @@
1
- import{a as c}from"./chunk-SV7NMNDI.mjs";import{a as d}from"./chunk-GRNOF6LY.mjs";import{c as g}from"./chunk-YNNW2C2U.mjs";import{a as p}from"./chunk-FMJBJ3HN.mjs";import{a as l}from"./chunk-WISCWNL2.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import f from"next/image";import{FaArrowRight as x}from"react-icons/fa6";import{jsx as e,jsxs as r}from"react/jsx-runtime";function z({blogs:a,sectionHeading:t,base:n="insights"}){return r(p,{children:[e("div",{className:"",children:t&&e("div",{"data-aos":"fade-up","data-aos-delay":"100",children:e(d,{...t,alignment:"start",hasBottomSpacing:!0})})}),a&&a.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:a.map((s,o)=>e("div",{"data-aos":"fade-up","data-aos-delay":c([200,400,600],o),className:"w-full h-full md:w-1/2 md:px-4 lg:w-1/3",children:e(v,{...s,base:n})},o))})]})}var u=i("inline-flex items-center gap-2 text-white"),L=i("text-sm text-white");function v({slug:a,meta:t,authors:n,title:s,publishedAt:o,categories:h,base:m}){return r("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[e("span",{className:"absolute inset-0 z-[2] "}),e(f,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
1
+ import{a as c}from"./chunk-SV7NMNDI.mjs";import{a as d}from"./chunk-M7NV6EFH.mjs";import{c as g}from"./chunk-YNNW2C2U.mjs";import{a as l}from"./chunk-WISCWNL2.mjs";import{a as p}from"./chunk-FMJBJ3HN.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import f from"next/image";import{FaArrowRight as x}from"react-icons/fa6";import{jsx as e,jsxs as r}from"react/jsx-runtime";function z({blogs:a,sectionHeading:t,base:n="insights"}){return r(p,{children:[e("div",{className:"",children:t&&e("div",{"data-aos":"fade-up","data-aos-delay":"100",children:e(d,{...t,alignment:"start",hasBottomSpacing:!0})})}),a&&a.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:a.map((s,o)=>e("div",{"data-aos":"fade-up","data-aos-delay":c([200,400,600],o),className:"w-full h-full md:w-1/2 md:px-4 lg:w-1/3",children:e(v,{...s,base:n})},o))})]})}var u=i("inline-flex items-center gap-2 text-white"),L=i("text-sm text-white");function v({slug:a,meta:t,authors:n,title:s,publishedAt:o,categories:h,base:m}){return r("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[e("span",{className:"absolute inset-0 z-[2] "}),e(f,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
2
2
  (min-width:768px) 50vw,
3
3
  (min-width:1024px) 33vw,
4
4
  100vw
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{b as w,c as C}from"./chunk-WDRL3N5V.mjs";import{b as y}from"./chunk-D76LTQRD.mjs";import{a as P}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-Q3G5UAAD.mjs";import{useEffect as d,useRef as s,useState as H,useCallback as x}from"react";import{Previewer as p}from"pagedjs";import{Fragment as N,jsx as n,jsxs as l}from"react/jsx-runtime";function T(r){var e=document.createElement("div");e.style.display="block",e.style.height=r,document.body.appendChild(e);var i=parseFloat(window.getComputedStyle(e,null).height);return e.parentNode&&e.parentNode.removeChild(e),Math.floor(i)}var m=r=>{let e=document.createElement("div");e.style.height="1mm",document.body.appendChild(e);let i=parseFloat(window.getComputedStyle(e).height);return document.body.removeChild(e),Math.floor(r/i)},F=({page:r,layout:e="portrait",logoImage:i})=>e==="flow"?n(E,{page:r,layout:e,logoImage:i}):n(B,{page:r,layout:e,logoImage:i}),E=({page:r,layout:e="portrait",logoImage:i})=>{let{contentWithIds:c}=b(r),u=s(null),a=s(null),h=s(new p),f={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};d(()=>{let o=document.getElementById("printable-content");if(o){let t=document.createElement("style");return t.textContent=`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; width: ${m(o.offsetWidth)}mm }; .container : { max-width: ${m(o.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[e]);let k=x(()=>{if(!a.current)return;a.current&&(a.current.innerHTML="");let o=document.getElementById("printable-content");o&&h.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],a.current).catch(t=>console.error("Paged.js error:",t))},[e]);d(()=>{h.current=new p},[k,e]);let g=[f,...c];return l("div",{children:[n("div",{className:"w-[1123px] print:w-[1123px]",children:l("div",{id:"printable-content",ref:u,children:[g.map((o,t)=>n(N,{children:t===0?n("section",{className:"title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},t):l("section",{className:"normal-page overflow-hidden",children:[o.blockName&&n(w,{title:o.blockName}),n(y,{blocks:[o],fill:!0})]},t)})),n("section",{className:"normal-page",children:l("div",{className:`w-full py-2 px-8 flex justify-between items-center
4
+ import{b as w,c as C}from"./chunk-7GMAMIHM.mjs";import{b as y}from"./chunk-2RQDJ5XT.mjs";import{a as P}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-Q3G5UAAD.mjs";import{useEffect as d,useRef as s,useState as H,useCallback as x}from"react";import{Previewer as p}from"pagedjs";import{Fragment as N,jsx as n,jsxs as l}from"react/jsx-runtime";function T(r){var e=document.createElement("div");e.style.display="block",e.style.height=r,document.body.appendChild(e);var i=parseFloat(window.getComputedStyle(e,null).height);return e.parentNode&&e.parentNode.removeChild(e),Math.floor(i)}var m=r=>{let e=document.createElement("div");e.style.height="1mm",document.body.appendChild(e);let i=parseFloat(window.getComputedStyle(e).height);return document.body.removeChild(e),Math.floor(r/i)},F=({page:r,layout:e="portrait",logoImage:i})=>e==="flow"?n(E,{page:r,layout:e,logoImage:i}):n(B,{page:r,layout:e,logoImage:i}),E=({page:r,layout:e="portrait",logoImage:i})=>{let{contentWithIds:c}=b(r),u=s(null),a=s(null),h=s(new p),f={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};d(()=>{let o=document.getElementById("printable-content");if(o){let t=document.createElement("style");return t.textContent=`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; width: ${m(o.offsetWidth)}mm }; .container : { max-width: ${m(o.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[e]);let k=x(()=>{if(!a.current)return;a.current&&(a.current.innerHTML="");let o=document.getElementById("printable-content");o&&h.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],a.current).catch(t=>console.error("Paged.js error:",t))},[e]);d(()=>{h.current=new p},[k,e]);let g=[f,...c];return l("div",{children:[n("div",{className:"w-[1123px] print:w-[1123px]",children:l("div",{id:"printable-content",ref:u,children:[g.map((o,t)=>n(N,{children:t===0?n("section",{className:"title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},t):l("section",{className:"normal-page overflow-hidden",children:[o.blockName&&n(w,{title:o.blockName}),n(y,{blocks:[o],fill:!0})]},t)})),n("section",{className:"normal-page",children:l("div",{className:`w-full py-2 px-8 flex justify-between items-center
5
5
  dark bg-background text-primary`,children:[l("div",{className:"flex px-6 items-center space-x-2",children:[i&&n("img",{src:i.src,alt:"Cortex Reply Logo",className:"h-8"}),n("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),n("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),n("div",{ref:a,className:"preview-container"})]})},B=({page:r,layout:e="portrait"})=>{let{contentWithIds:i}=b(r),c=s(null),u=s(null),a=s(new p),[h,f]=H(0),g=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...i],o=x(()=>{c.current&&(c.current&&(c.current.innerHTML=""),a.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",e==="landscape"?"./landscape.css":"./portrait.css"],c.current).then(t=>f(t.pageCount)).catch(t=>console.error("Paged.js error:",t)))},[e]);return d(()=>{a.current=new p,o()},[o,e]),d(()=>{let t=document.createElement("style");return t.textContent=`@page { size: A4 ${e} ; margin: 0mm; };`,document.head.appendChild(t),()=>{document.head.removeChild(t)}},[]),l("div",{className:"pagedjs-container",children:[n("div",{id:"printable-content",ref:u,style:{display:"none"},className:"pagedjs-content",children:g.map((t,v)=>n(N,{children:v===0?n("section",{className:"pagedjs-section title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},v):l("section",{className:P("pagedjs-section normal-page h-[699px]",`h-[${T("185mm")}px]`,t.theme?.settings?.theme==="dark"?"dark":"light"),children:[t.blockName&&n(w,{title:t.blockName}),n(y,{blocks:[t],fill:!0})]},v)}))}),n("div",{ref:c,className:"preview-container"})]})};export{F as a,E as b,B as c};
@@ -1 +1 @@
1
- import{a as A}from"./chunk-2IMY4VWR.mjs";import{a as g,c as v,d as f,g as C,i as h}from"./chunk-YFAZQYK4.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as F}from"./chunk-INCYANPB.mjs";import{a as N}from"./chunk-FT3AE7L2.mjs";import{a as S,f as y,g as x,i as w}from"./chunk-3UMMMQEH.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{useState as D,useEffect as M}from"react";import{PlusIcon as z}from"lucide-react";import{Fragment as j,jsx as t,jsxs as r}from"react/jsx-runtime";function se({customers:b,users:d,categories:I,onSubmit:E,initialDeal:n,onAddCustomer:P,onClose:L}){let[a,o]=D(n||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[T,m]=D(!1),[i,c]=D({});M(()=>{n&&o(n)},[n]);let U=()=>{let e={};return a.customer||(e.customer="Customer is required"),a.value||(e.value="Value is required"),a.assignee||(e.assignee="Assignee is required"),a.closureDate||(e.closureDate="Closure Date is required"),c(e),Object.keys(e).length===0},B=async e=>{e.preventDefault(),c({});try{if(U()){let s=await E({...a});s.success?(o({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),L?.()):c(s.errors||{})}}catch{c({submit:"An error occurred while submitting the form."})}},O=e=>{o(s=>({...s,categories:(s.categories||[]).includes(e.id)?(s.categories||[]).filter(H=>H!==e.id):[...s.categories||[],e.id]}))},V=async e=>{o({...a,customer:e});try{let s=await P(e);s.success?m(!1):c(s.errors||{})}catch{c({submit:"An error occurred while submitting the form."})}},q=e=>d?.find(s=>s.id===Number(e)),R=e=>b?.find(s=>s.id===Number(e));return r(j,{children:[r("form",{onSubmit:B,className:"space-y-6",children:[t(N,{className:"h-[60vh] pr-4",children:r("div",{className:"space-y-6 px-4",children:[r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"customer",children:"Customer"}),r("div",{className:"flex items-center space-x-2",children:[r(g,{value:a.customer?.id?.toString(),onValueChange:e=>o({...a,customer:R(e)}),children:[t(f,{children:t(v,{placeholder:"Select customer"})}),t(C,{children:b.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),t(p,{variant:"outline",size:"icon",onClick:()=>m(!0),children:t(z,{className:"w-5 h-5"})})]}),i.customerId&&t("p",{className:"text-red-500 text-sm",children:i.customerId})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"value",children:"Value"}),t(u,{id:"value",type:"number",value:a.value||"",onChange:e=>o({...a,value:Number.parseFloat(e.target.value)}),placeholder:"Enter deal value"}),i.value&&t("p",{className:"text-red-500 text-sm",children:i.value})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"assignee",children:"Assignee"}),r(g,{value:a.assignee?.id?.toString(),onValueChange:e=>o({...a,assignee:q(e)}),children:[t(f,{children:t(v,{placeholder:"Select assignee"})}),t(C,{children:d&&d.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),i.assignee&&t("p",{className:"text-red-500 text-sm",children:i.assignee})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"description",children:"Description"}),t(k,{id:"description",value:a.description||"",onChange:e=>o({...a,description:e.target.value}),placeholder:"Enter deal description"})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{children:"Categories"}),t("div",{className:"space-y-4",children:["proposition","source","sector"].map(e=>r("div",{className:"space-y-2",children:[t("h4",{className:"text-sm font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)}),t("div",{className:"grid grid-cols-2 gap-2",children:I.filter(s=>s.type===e).map(s=>r("div",{className:"flex items-center space-x-2",children:[t(F,{id:s.id.toString(),checked:a.categories?.includes(s.id),onCheckedChange:()=>O(s)}),t("label",{htmlFor:s.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:s.name})]},s.id))})]},e))})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"closureDate",children:"Closure Date"}),t(u,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:e=>o({...a,closureDate:e.target.value})}),i.closureDate&&t("p",{className:"text-red-500 text-sm",children:i.closureDate})]})]})}),t(p,{type:"submit",className:"w-full",children:n?"Update Deal":"Add Deal"})]}),t(S,{open:T,onOpenChange:m,children:r(y,{children:[t(x,{children:t(w,{children:"Add New Customer"})}),t(A,{onSubmit:V})]})})]})}export{se as a};
1
+ import{a as A}from"./chunk-RR4QSUV2.mjs";import{a as g,c as v,d as f,g as C,i as h}from"./chunk-YFAZQYK4.mjs";import{a as F}from"./chunk-INCYANPB.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as N}from"./chunk-FT3AE7L2.mjs";import{a as S,f as y,g as x,i as w}from"./chunk-3UMMMQEH.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{useState as D,useEffect as M}from"react";import{PlusIcon as z}from"lucide-react";import{Fragment as j,jsx as t,jsxs as r}from"react/jsx-runtime";function se({customers:b,users:d,categories:I,onSubmit:E,initialDeal:n,onAddCustomer:P,onClose:L}){let[a,o]=D(n||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[T,m]=D(!1),[i,c]=D({});M(()=>{n&&o(n)},[n]);let U=()=>{let e={};return a.customer||(e.customer="Customer is required"),a.value||(e.value="Value is required"),a.assignee||(e.assignee="Assignee is required"),a.closureDate||(e.closureDate="Closure Date is required"),c(e),Object.keys(e).length===0},B=async e=>{e.preventDefault(),c({});try{if(U()){let s=await E({...a});s.success?(o({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),L?.()):c(s.errors||{})}}catch{c({submit:"An error occurred while submitting the form."})}},O=e=>{o(s=>({...s,categories:(s.categories||[]).includes(e.id)?(s.categories||[]).filter(H=>H!==e.id):[...s.categories||[],e.id]}))},V=async e=>{o({...a,customer:e});try{let s=await P(e);s.success?m(!1):c(s.errors||{})}catch{c({submit:"An error occurred while submitting the form."})}},q=e=>d?.find(s=>s.id===Number(e)),R=e=>b?.find(s=>s.id===Number(e));return r(j,{children:[r("form",{onSubmit:B,className:"space-y-6",children:[t(N,{className:"h-[60vh] pr-4",children:r("div",{className:"space-y-6 px-4",children:[r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"customer",children:"Customer"}),r("div",{className:"flex items-center space-x-2",children:[r(g,{value:a.customer?.id?.toString(),onValueChange:e=>o({...a,customer:R(e)}),children:[t(f,{children:t(v,{placeholder:"Select customer"})}),t(C,{children:b.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),t(p,{variant:"outline",size:"icon",onClick:()=>m(!0),children:t(z,{className:"w-5 h-5"})})]}),i.customerId&&t("p",{className:"text-red-500 text-sm",children:i.customerId})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"value",children:"Value"}),t(u,{id:"value",type:"number",value:a.value||"",onChange:e=>o({...a,value:Number.parseFloat(e.target.value)}),placeholder:"Enter deal value"}),i.value&&t("p",{className:"text-red-500 text-sm",children:i.value})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"assignee",children:"Assignee"}),r(g,{value:a.assignee?.id?.toString(),onValueChange:e=>o({...a,assignee:q(e)}),children:[t(f,{children:t(v,{placeholder:"Select assignee"})}),t(C,{children:d&&d.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),i.assignee&&t("p",{className:"text-red-500 text-sm",children:i.assignee})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"description",children:"Description"}),t(k,{id:"description",value:a.description||"",onChange:e=>o({...a,description:e.target.value}),placeholder:"Enter deal description"})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{children:"Categories"}),t("div",{className:"space-y-4",children:["proposition","source","sector"].map(e=>r("div",{className:"space-y-2",children:[t("h4",{className:"text-sm font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)}),t("div",{className:"grid grid-cols-2 gap-2",children:I.filter(s=>s.type===e).map(s=>r("div",{className:"flex items-center space-x-2",children:[t(F,{id:s.id.toString(),checked:a.categories?.includes(s.id),onCheckedChange:()=>O(s)}),t("label",{htmlFor:s.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:s.name})]},s.id))})]},e))})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"closureDate",children:"Closure Date"}),t(u,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:e=>o({...a,closureDate:e.target.value})}),i.closureDate&&t("p",{className:"text-red-500 text-sm",children:i.closureDate})]})]})}),t(p,{type:"submit",className:"w-full",children:n?"Update Deal":"Add Deal"})]}),t(S,{open:T,onOpenChange:m,children:r(y,{children:[t(x,{children:t(w,{children:"Add New Customer"})}),t(A,{onSubmit:V})]})})]})}export{se as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a,c as s}from"./chunk-4QRKVSTE.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{createContext as f,useContext as c}from"react";import{jsx as r}from"react/jsx-runtime";var l=f(null),i=()=>{let o=c(l);if(!o)throw new Error("Confirmation components must be used within Confirmation");return o},P=({className:o,approval:e,state:t,...m})=>!e||t==="input-streaming"||t==="input-available"?null:r(l.Provider,{value:{approval:e,state:t},children:r(a,{className:n("flex flex-col gap-2",o),...m})}),x=({className:o,...e})=>r(s,{className:n("inline",o),...e}),y=({children:o})=>{let{state:e}=i();return e!=="approval-requested"?null:o},A=({children:o})=>{let{approval:e,state:t}=i();return!e?.approved||t!=="approval-responded"&&t!=="output-denied"&&t!=="output-available"?null:o},g=({children:o})=>{let{approval:e,state:t}=i();return e?.approved!==!1||t!=="approval-responded"&&t!=="output-denied"&&t!=="output-available"?null:o},R=({className:o,...e})=>{let{state:t}=i();return t!=="approval-requested"?null:r("div",{className:n("flex items-center justify-end gap-2 self-end",o),...e})},T=o=>r(p,{className:"h-8 px-3 text-sm",type:"button",...o});export{P as a,x as b,y as c,A as d,g as e,R as f,T as g};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as g}from"./chunk-XX4GSGRP.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-O5P35LEY.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as p}from"./chunk-CLGBBNRB.mjs";import{a as f}from"./chunk-WU3JMLSC.mjs";import{a as S}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:S,logoDark:f,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(g,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),e(u,{})]})}export{h as a};
4
+ import{a as g}from"./chunk-AQQCH7Z2.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-ZFUP5NVF.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as p}from"./chunk-LAQ3QAUW.mjs";import{a as f}from"./chunk-WU3JMLSC.mjs";import{a as S}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:S,logoDark:f,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(g,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),e(u,{})]})}export{h as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{b as f}from"./chunk-ZUA4KNIR.mjs";import{a as u}from"./chunk-MDJREBVI.mjs";import{CheckIcon as k,CopyIcon as v}from"lucide-react";import{createContext as b,useContext as x,useEffect as B,useRef as T,useState as g}from"react";import{codeToHtml as C}from"shiki";import{jsx as t,jsxs as P}from"react/jsx-runtime";var h=b({code:""}),w={name:"line-numbers",line(e,o){e.children.unshift({type:"element",tagName:"span",properties:{className:["inline-block","min-w-10","mr-4","text-right","select-none","text-muted-foreground"]},children:[{type:"text",value:String(o)}]})}};async function H(e,o,r=!1){let n=r?[w]:[];return await Promise.all([C(e,{lang:o,theme:"one-light",transformers:n}),C(e,{lang:o,theme:"one-dark-pro",transformers:n})])}var E=({code:e,language:o,showLineNumbers:r=!1,className:n,children:s,...a})=>{let[l,d]=g(""),[c,p]=g(""),i=T(!1);return B(()=>(H(e,o,r).then(([m,y])=>{i.current||(d(m),p(y),i.current=!0)}),()=>{i.current=!1}),[e,o,r]),t(h.Provider,{value:{code:e},children:t("div",{className:u("group relative w-full overflow-hidden rounded-md border bg-background text-foreground",n),...a,children:P("div",{className:"relative",children:[t("div",{className:"overflow-hidden dark:hidden [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm",dangerouslySetInnerHTML:{__html:l}}),t("div",{className:"hidden overflow-hidden dark:block [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm",dangerouslySetInnerHTML:{__html:c}}),s&&t("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:s})]})})})},M=({onCopy:e,onError:o,timeout:r=2e3,children:n,className:s,...a})=>{let[l,d]=g(!1),{code:c}=x(h),p=async()=>{if(typeof window>"u"||!navigator?.clipboard?.writeText){o?.(new Error("Clipboard API not available"));return}try{await navigator.clipboard.writeText(c),d(!0),e?.(),setTimeout(()=>d(!1),r)}catch(m){o?.(m)}},i=l?k:v;return t(f,{className:u("shrink-0",s),onClick:p,size:"icon",variant:"ghost",...a,children:n??t(i,{size:14})})};export{H as a,E as b,M as c};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as i}from"./chunk-WISC5QJV.mjs";import{a as c}from"./chunk-Q5XT55O3.mjs";import{a as l}from"./chunk-MDJREBVI.mjs";import{useState as m,useEffect as d}from"react";import{useTheme as S}from"next-themes";import{Moon as N,Sun as y}from"lucide-react";import{PopoverGroup as D}from"@headlessui/react";import{Fragment as H,jsx as e,jsxs as p}from"react/jsx-runtime";function z({isMenuOpen:u,logoLight:h,logoDark:f,menuItems:o,themeControl:g=!1,wide:b=!1}){let[v,a]=m(!1),[k,n]=m(""),r=["light","dark"],{theme:s,setTheme:w}=S();d(()=>{n(s||"dark")},[s]);let x=()=>{let t=r[(r.indexOf(k)+1)%r.length];n(t),w(t)};return d(()=>{let t=()=>{window.scrollY>100?a(!0):a(!1)};return window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[]),e(H,{children:e("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${v||u?"translate-y-0":"-translate-y-full bg-transparent"}`,children:e("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:p("div",{className:l("flex items-center justify-between px-9 py-0",!b&&"container"),children:[e(c,{logoDark:f,logoLight:h}),e(D,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(t=>e(i,{...t},t.name))}),g&&e("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:x,children:p("div",{className:"relative",children:[e(y,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),e(N,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}export{z as a};
4
+ import{a as c}from"./chunk-Q5XT55O3.mjs";import{a as i}from"./chunk-WISC5QJV.mjs";import{a as l}from"./chunk-MDJREBVI.mjs";import{useState as m,useEffect as d}from"react";import{useTheme as S}from"next-themes";import{Moon as N,Sun as y}from"lucide-react";import{PopoverGroup as D}from"@headlessui/react";import{Fragment as H,jsx as e,jsxs as p}from"react/jsx-runtime";function z({isMenuOpen:u,logoLight:h,logoDark:f,menuItems:o,themeControl:g=!1,wide:b=!1}){let[v,a]=m(!1),[k,n]=m(""),r=["light","dark"],{theme:s,setTheme:w}=S();d(()=>{n(s||"dark")},[s]);let x=()=>{let t=r[(r.indexOf(k)+1)%r.length];n(t),w(t)};return d(()=>{let t=()=>{window.scrollY>100?a(!0):a(!1)};return window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[]),e(H,{children:e("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${v||u?"translate-y-0":"-translate-y-full bg-transparent"}`,children:e("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:p("div",{className:l("flex items-center justify-between px-9 py-0",!b&&"container"),children:[e(c,{logoDark:f,logoLight:h}),e(D,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(t=>e(i,{...t},t.name))}),g&&e("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:x,children:p("div",{className:"relative",children:[e(y,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),e(N,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}export{z as a};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-WUA65ZZB.mjs";import{a as m}from"./chunk-PDY7JYY3.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import{jsx as n,jsxs as d}from"react/jsx-runtime";function u({isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,className:p,wide:l,themeControl:s=!1}){return d("div",{className:r("fixed top-0 left-0 right-0 z-50",p),children:[n(i,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,themeControl:s,wide:l}),n(m,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a})]})}export{u as a};
1
+ import{a as m}from"./chunk-PDY7JYY3.mjs";import{a as i}from"./chunk-L3BLBPSR.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import{jsx as n,jsxs as d}from"react/jsx-runtime";function u({isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,className:p,wide:l,themeControl:s=!1}){return d("div",{className:r("fixed top-0 left-0 right-0 z-50",p),children:[n(i,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,themeControl:s,wide:l}),n(m,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a})]})}export{u as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{c as k,h as R,i as v,k as S,l as f,o as x,p as u,q as c,r as y,s as w,v as P,w as B,x as L}from"./chunk-O5P35LEY.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as g,b as N,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as A}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:l,secondaryNav:s,title:o,subTitle:a,pathName:b,menuHeading:i,onNavClick:d,loading:p=!1,LinkComponent:h,...F}){let C=h?t=>e(h,{...t}):d?({href:t,children:m,...I})=>e("button",{onClick:()=>d&&d(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:m}):t=>e("a",{...t});return r(k,{...F,variant:"inset",children:[e(R,{children:e(u,{children:e(c,{children:p?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:o}),a&&e("span",{className:"truncate text-sm",children:a})]})})})}),p&&r(S,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(S,{children:[l&&!p&&l.map((t,m)=>e(G,{subNav:t,pathName:b,Link:C},m)),e(f,{className:"mt-auto",children:e(x,{children:e(u,{children:s&&!p&&s.map(t=>e(c,{children:e(y,{asChild:!0,size:"sm",children:r(C,{href:t.url||"",children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})})},t.label))})})})]}),e(v,{})]})}function G({subNav:l,pathName:s,Link:o}){let a=l,b=!1;return a.links&&a.links.map(i=>{i.url===s&&(b=!0)}),e(g,{defaultOpen:!0,className:"group/collapsible",children:e(f,{className:"py-0",children:e(u,{children:e(g,{asChild:!0,defaultOpen:a.isActive,children:r(c,{children:[e(y,{asChild:!0,tooltip:a.label,className:T(b&&"font-bold text-accent"),children:r(o,{href:a.url,children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})}),a.links?.length?r(H,{children:[e(N,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(A,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(P,{children:a.links?.map(i=>e(B,{children:e(L,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(o,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},a.label)})})})}export{J as a};
4
+ import{c as k,h as R,i as v,k as S,l as f,o as x,p as u,q as c,r as y,s as w,v as P,w as B,x as L}from"./chunk-ZFUP5NVF.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as g,b as N,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as A}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:l,secondaryNav:s,title:o,subTitle:a,pathName:b,menuHeading:i,onNavClick:d,loading:p=!1,LinkComponent:h,...F}){let C=h?t=>e(h,{...t}):d?({href:t,children:m,...I})=>e("button",{onClick:()=>d&&d(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:m}):t=>e("a",{...t});return r(k,{...F,variant:"inset",children:[e(R,{children:e(u,{children:e(c,{children:p?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:o}),a&&e("span",{className:"truncate text-sm",children:a})]})})})}),p&&r(S,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(S,{children:[l&&!p&&l.map((t,m)=>e(G,{subNav:t,pathName:b,Link:C},m)),e(f,{className:"mt-auto",children:e(x,{children:e(u,{children:s&&!p&&s.map(t=>e(c,{children:e(y,{asChild:!0,size:"sm",children:r(C,{href:t.url||"",children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})})},t.label))})})})]}),e(v,{})]})}function G({subNav:l,pathName:s,Link:o}){let a=l,b=!1;return a.links&&a.links.map(i=>{i.url===s&&(b=!0)}),e(g,{defaultOpen:!0,className:"group/collapsible",children:e(f,{className:"py-0",children:e(u,{children:e(g,{asChild:!0,defaultOpen:a.isActive,children:r(c,{children:[e(y,{asChild:!0,tooltip:a.label,className:T(b&&"font-bold text-accent"),children:r(o,{href:a.url,children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})}),a.links?.length?r(H,{children:[e(N,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(A,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(P,{children:a.links?.map(i=>e(B,{children:e(L,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(o,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},a.label)})})})}export{J as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as y}from"./chunk-OWL3KUE3.mjs";import{a as x,c as N,e as w,i as h}from"./chunk-3UMMMQEH.mjs";import{b as n}from"./chunk-ZUA4KNIR.mjs";import{a as p}from"./chunk-MDJREBVI.mjs";import{motion as b}from"motion/react";import{Trash2 as F,Edit as D}from"lucide-react";import*as C from"@radix-ui/react-dialog";import{Loader2 as L}from"lucide-react";import{useState as v}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var k=s=>{if(!s||s<=0)return"0 KB";let o=s/1024;return o<1024?`${o.toFixed(2)} KB`:`${(o/1024).toFixed(2)} MB`};function q({files:s,onFileClick:o,onFileDelete:m,onFileUpdate:z,showHeader:T=!0,className:P,viewMode:l="list"}){let[S,r]=v(!1),[B,g]=v(!1),[d,c]=v(null),u=()=>{r(!1),c(null)},E=()=>{g(!0),setTimeout(()=>{g(!1),r(!1),c(null)},500)},f=t=>{c(t),r(!0)};return a("div",{className:p("rounded-3xl border overflow-hidden",P),children:[a("div",{className:"bg-muted/50 p-3 flex items-center justify-between",children:[T&&l==="list"&&a("div",{className:"hidden md:grid md:grid-cols-10 text-sm font-medium flex-1",children:[e("div",{className:"col-span-6",children:"Name"}),e("div",{className:"col-span-2",children:"Size"}),e("div",{className:"col-span-2",children:"Modified"})]}),l==="card"&&e("div",{className:"text-sm font-medium",children:"Files"})]}),l==="list"&&e("div",{className:"divide-y",children:s.map(t=>a(b.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:()=>o?.(t),children:[a("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),e("div",{children:e("p",{className:"font-medium",children:t.name})})]}),e("div",{className:"col-span-2 text-sm md:text-base",children:k(t.filesize)}),a("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[e("span",{className:"text-sm md:text-base",children:new Date(t.createdAt).toLocaleDateString()}),a("div",{className:"flex gap-1",children:[t.mimeType==="text/markdown"&&e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),f(t)},children:e(D,{className:"h-4 w-4"})}),e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),m?.(t)},children:e(F,{className:"h-4 w-4"})})]})]})]},t.name))}),l==="card"&&e("div",{className:"p-4 grid grid-cols-1 gap-4",children:s.map(t=>e(b.div,{whileHover:{scale:1.02},className:"border rounded-lg p-4 bg-card hover:bg-muted/50 transition-colors cursor-pointer",onClick:()=>o?.(t),children:a("div",{className:"flex items-start justify-between gap-4",children:[a("div",{className:"flex-1 min-w-0 space-y-2",children:[a("div",{className:"flex items-center gap-3",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted flex-shrink-0"}),e("div",{className:"min-w-0 flex-1",children:e("p",{className:"font-medium truncate",children:t.name})})]}),a("div",{className:"space-y-1 text-sm text-muted-foreground pl-[52px]",children:[a("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-medium",children:"Size:"}),e("span",{children:k(t.filesize)})]}),a("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-medium",children:"Modified:"}),e("span",{children:new Date(t.createdAt).toLocaleDateString()})]})]})]}),a("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[t.mimeType==="text/markdown"&&e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),f(t)},title:"Edit",children:e(D,{className:"h-4 w-4"})}),e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),m?.(t)},title:"Delete",children:e(F,{className:"h-4 w-4"})})]})]})},t.name))}),e(x,{open:S,onOpenChange:t=>!t&&u(),children:a(N,{children:[e(w,{}),a(C.Content,{className:p("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[e(h,{className:"sr-only",children:d?`Edit ${d.name}`:"Edit File"}),B&&e("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:e(L,{className:"h-8 w-8 animate-spin text-primary"})}),d&&e(y,{document:d,onSave:E,onFileUpdate:z,onCancel:u})]})]})})]})}export{q as a};
4
+ import{a as y}from"./chunk-TKY52BNP.mjs";import{a as x,c as N,e as w,i as h}from"./chunk-3UMMMQEH.mjs";import{b as n}from"./chunk-ZUA4KNIR.mjs";import{a as p}from"./chunk-MDJREBVI.mjs";import{motion as b}from"motion/react";import{Trash2 as F,Edit as D}from"lucide-react";import*as C from"@radix-ui/react-dialog";import{Loader2 as L}from"lucide-react";import{useState as v}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var k=s=>{if(!s||s<=0)return"0 KB";let o=s/1024;return o<1024?`${o.toFixed(2)} KB`:`${(o/1024).toFixed(2)} MB`};function q({files:s,onFileClick:o,onFileDelete:m,onFileUpdate:z,showHeader:T=!0,className:P,viewMode:l="list"}){let[S,r]=v(!1),[B,g]=v(!1),[d,c]=v(null),u=()=>{r(!1),c(null)},E=()=>{g(!0),setTimeout(()=>{g(!1),r(!1),c(null)},500)},f=t=>{c(t),r(!0)};return a("div",{className:p("rounded-3xl border overflow-hidden",P),children:[a("div",{className:"bg-muted/50 p-3 flex items-center justify-between",children:[T&&l==="list"&&a("div",{className:"hidden md:grid md:grid-cols-10 text-sm font-medium flex-1",children:[e("div",{className:"col-span-6",children:"Name"}),e("div",{className:"col-span-2",children:"Size"}),e("div",{className:"col-span-2",children:"Modified"})]}),l==="card"&&e("div",{className:"text-sm font-medium",children:"Files"})]}),l==="list"&&e("div",{className:"divide-y",children:s.map(t=>a(b.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:()=>o?.(t),children:[a("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),e("div",{children:e("p",{className:"font-medium",children:t.name})})]}),e("div",{className:"col-span-2 text-sm md:text-base",children:k(t.filesize)}),a("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[e("span",{className:"text-sm md:text-base",children:new Date(t.createdAt).toLocaleDateString()}),a("div",{className:"flex gap-1",children:[t.mimeType==="text/markdown"&&e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),f(t)},children:e(D,{className:"h-4 w-4"})}),e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),m?.(t)},children:e(F,{className:"h-4 w-4"})})]})]})]},t.name))}),l==="card"&&e("div",{className:"p-4 grid grid-cols-1 gap-4",children:s.map(t=>e(b.div,{whileHover:{scale:1.02},className:"border rounded-lg p-4 bg-card hover:bg-muted/50 transition-colors cursor-pointer",onClick:()=>o?.(t),children:a("div",{className:"flex items-start justify-between gap-4",children:[a("div",{className:"flex-1 min-w-0 space-y-2",children:[a("div",{className:"flex items-center gap-3",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted flex-shrink-0"}),e("div",{className:"min-w-0 flex-1",children:e("p",{className:"font-medium truncate",children:t.name})})]}),a("div",{className:"space-y-1 text-sm text-muted-foreground pl-[52px]",children:[a("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-medium",children:"Size:"}),e("span",{children:k(t.filesize)})]}),a("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-medium",children:"Modified:"}),e("span",{children:new Date(t.createdAt).toLocaleDateString()})]})]})]}),a("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[t.mimeType==="text/markdown"&&e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),f(t)},title:"Edit",children:e(D,{className:"h-4 w-4"})}),e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),m?.(t)},title:"Delete",children:e(F,{className:"h-4 w-4"})})]})]})},t.name))}),e(x,{open:S,onOpenChange:t=>!t&&u(),children:a(N,{children:[e(w,{}),a(C.Content,{className:p("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[e(h,{className:"sr-only",children:d?`Edit ${d.name}`:"Edit File"}),B&&e("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:e(L,{className:"h-8 w-8 animate-spin text-primary"})}),d&&e(y,{document:d,onSave:E,onFileUpdate:z,onCancel:u})]})]})})]})}export{q as a};
@@ -1 +1 @@
1
- import{f as u}from"./chunk-4ITG3T35.mjs";import{a as m}from"./chunk-2QZUKVBA.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{jsx as r,jsxs as h}from"react/jsx-runtime";var B=g=>{let{columns:a,theme:i}=g,y={full:"12",half:"6",oneThird:"4",twoThirds:"8"},b={none:"",line:"border border-primary p-4 rounded-lg"},c=e=>{if(e.type&&e.type==="block"&&e.fields&&(e.fields.blockType==="imageBlock"||e.fields.blockType==="mediaBlock"))return!0;if(e.root&&e.root.children){for(let o of e.root.children)if(c(o))return!0}if(e.children){for(let o of e.children)if(c(o))return!0}return!1},k=(e,o,n)=>{if(o==="none"||n==="full")return{processedRichText:e,heading:null};let l=e,t=null;return e&&e.root&&e.root.children&&e.root.children[0].tag==="h2"&&(l={...e,root:{...e.root,children:e.root.children.slice(1)}},t=e.root.children[0]),{processedRichText:l,heading:t}};return r("div",{className:"my-6",children:r("div",{className:d("grid grid-cols-4 lg:grid-cols-12 gap-y-8",i?.settings?.box?"gap-x-8":"gap-x-16"),children:a&&a.length>0&&a.map((e,o)=>{let{enableLink:n,link:l,richText:t,size:s}=e,{processedRichText:p,heading:f}=k(t,i?.settings?.box||"none",s||"full");return h("div",{className:d(`col-span-4 lg:col-span-${y[s]}`,{"md:col-span-2":s!=="full"},b[s!=="full"&&!c(t)&&i?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${o+1}00`),children:[f&&r("div",{className:"bg-primary text-primary-foreground mb-4 -mt-4 -mx-4 px-4 py-2 text-xl",children:f.children[0].text}),p&&r(u,{content:p,enableGutter:!1,className:"rich-text"}),n&&r(m,{...l})]},o)})})})};export{B as a};
1
+ import{f as u}from"./chunk-N3B3XNV3.mjs";import{a as m}from"./chunk-2QZUKVBA.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{jsx as r,jsxs as h}from"react/jsx-runtime";var B=g=>{let{columns:a,theme:i}=g,y={full:"12",half:"6",oneThird:"4",twoThirds:"8"},b={none:"",line:"border border-primary p-4 rounded-lg"},c=e=>{if(e.type&&e.type==="block"&&e.fields&&(e.fields.blockType==="imageBlock"||e.fields.blockType==="mediaBlock"))return!0;if(e.root&&e.root.children){for(let o of e.root.children)if(c(o))return!0}if(e.children){for(let o of e.children)if(c(o))return!0}return!1},k=(e,o,n)=>{if(o==="none"||n==="full")return{processedRichText:e,heading:null};let l=e,t=null;return e&&e.root&&e.root.children&&e.root.children[0].tag==="h2"&&(l={...e,root:{...e.root,children:e.root.children.slice(1)}},t=e.root.children[0]),{processedRichText:l,heading:t}};return r("div",{className:"my-6",children:r("div",{className:d("grid grid-cols-4 lg:grid-cols-12 gap-y-8",i?.settings?.box?"gap-x-8":"gap-x-16"),children:a&&a.length>0&&a.map((e,o)=>{let{enableLink:n,link:l,richText:t,size:s}=e,{processedRichText:p,heading:f}=k(t,i?.settings?.box||"none",s||"full");return h("div",{className:d(`col-span-4 lg:col-span-${y[s]}`,{"md:col-span-2":s!=="full"},b[s!=="full"&&!c(t)&&i?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${o+1}00`),children:[f&&r("div",{className:"bg-primary text-primary-foreground mb-4 -mt-4 -mx-4 px-4 py-2 text-xl",children:f.children[0].text}),p&&r(u,{content:p,enableGutter:!1,className:"rich-text"}),n&&r(m,{...l})]},o)})})})};export{B as a};
@@ -1 +1 @@
1
- import{a as u,c as g,d as p,g as v,i as b}from"./chunk-YFAZQYK4.mjs";import{a as F}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as B}from"./chunk-INCYANPB.mjs";import{a as S}from"./chunk-FT3AE7L2.mjs";import{a as w,f as P,g as L,i as A}from"./chunk-3UMMMQEH.mjs";import{a as d}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{b as I}from"./chunk-CSBGSBEU.mjs";import{useState as x,useEffect as M}from"react";import{UserIcon as Q,CalendarIcon as $,SaveIcon as j,PlusIcon as q}from"lucide-react";import{jsx as a,jsxs as r}from"react/jsx-runtime";function ie({deal:c,users:f,customer:T,categories:U,onClose:E,onSave:O,onAddComment:V}){let[t,h]=x({...c,value:c.value||0,comments:c.comments||[],customer:c.customer||{}}),[C,D]=x(""),[H,y]=x(!1),[i,s]=x(null);M(()=>{y(JSON.stringify(c)!==JSON.stringify(t))},[c,t]);let R=async()=>{try{let e=await O(t);e.success?(y(!1),s(null)):console.error("Failed to save deal:",e.errors)}catch(e){console.error("Failed to save deal:",e)}},n=(e,o)=>{h(N=>({...N,[e]:o}))},G=e=>{let o=(t.categories||[]).includes(e)?(t.categories||[]).filter(N=>N!==e):[...t.categories||[],e];n("categories",o)},J=async()=>{if(C.trim()){let e={text:C,timestamp:new Date().toISOString()};try{let o=await V(e);if(!o.success){console.error("Failed to add comment:",o.errors);return}}catch(o){console.error("Failed to add comment:",o)}h(o=>({...o,comments:[...o.comments||[],e]})),D("")}},k=e=>{switch(e){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},W=e=>f?.find(o=>o.id===Number(e));return a(w,{open:!0,children:r(P,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[r(L,{className:"flex flex-row items-center justify-between",children:[a(A,{className:"text-2xl font-bold",children:T?.name||"no customer"}),r("div",{className:"flex space-x-2",children:[a(m,{variant:"outline",onClick:E,children:"Close"}),r(m,{onClick:R,disabled:!H,children:[a(j,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),r(S,{className:"flex-grow pr-4",children:[r("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[a("div",{className:"grid gap-2 m-1",children:i==="value"?a(d,{type:"number",value:t.value,onChange:e=>n("value",Number(e.target.value)),onBlur:()=>s(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):r("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("value"),children:["\xA3",t.value?.toLocaleString()]})}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Assignee"}),i==="assignee"?r(u,{value:t?.assignee?.id?.toString()||"",onValueChange:e=>n("assignee",W(e)),children:[a(p,{children:a(g,{placeholder:"Select assignee"})}),a(v,{children:f&&f.map(e=>a(b,{value:e?.id?.toString()||"",children:e.name},e.id))})]}):r("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("assignee"),children:[a(Q,{className:"w-4 h-4 text-gray-400"}),a("span",{children:t?.assignee?.name})]})]}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Closure Date"}),i==="closureDate"?a(d,{type:"date",value:t.closureDate?.split("T")[0]??"",onChange:e=>n("closureDate",e.target.value),onBlur:()=>s(null),className:"mr-2",autoFocus:!0}):r("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("closureDate"),children:[a($,{className:"w-4 h-4 text-gray-400"}),a("span",{children:t.closureDate?new Date(t.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),a("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Description"}),i==="description"?a(F,{value:t.description||"",onChange:e=>n("description",e.target.value),onBlur:()=>s(null),className:"min-h-[100px]",autoFocus:!0}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>s("description"),children:t.description})]})}),r("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Status"}),i==="status"?r(u,{value:t.status,onValueChange:e=>{n("status",e),s(null)},children:[a(p,{children:a(g,{placeholder:"Select status"})}),a(v,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(e=>a(b,{value:e,children:e},e))})]}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("status"),children:t.status})]}),r("div",{className:"grid col-span-2 gap-2",children:[a(l,{className:"text-sm font-medium text-accent",children:"Categories"}),i==="categories"?a("div",{className:"grid grid-cols-2 gap-2 m-1",children:U.map(e=>r("div",{className:"flex items-center space-x-2",children:[a(B,{id:e.id?.toString()||"",checked:(t.categories||[]).some(o=>o.id===e.id),onCheckedChange:()=>e.id!==void 0&&G(e)}),a("label",{htmlFor:(e.id??"").toString(),className:`text-sm font-medium ${k(e.type||"sector")} px-2 py-1 rounded`,children:e.name})]},e.id))}):a("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("categories"),children:t.categories&&t.categories.map(e=>{let o=e;return o?a(I,{variant:"outline",className:k(o.type||"sector"),children:o.name},o.id):null})})]}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"COGE Status"}),i==="gecoStatus"?r(u,{value:t.gecoStatus??void 0,onValueChange:e=>{n("gecoStatus",e),s(null)},children:[a(p,{children:a(g,{placeholder:"Select status"})}),a(v,{children:["firm","forecast","other"].map(e=>a(b,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("gecoStatus"),children:t.gecoStatus?t.gecoStatus.charAt(0).toUpperCase()+t.gecoStatus.slice(1):"N/A"})]})]}),r("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[r("div",{className:"grid gap-2",children:[a(l,{className:"text-sm font-medium text-accent",children:"Comments"}),a(S,{className:"h-[200px] overflow-y-auto",children:a("div",{className:"space-y-2",children:t.comments&&t.comments.slice().sort((e,o)=>new Date(o.timestamp||"").getTime()-new Date(e.timestamp||"").getTime()).map(e=>r("div",{className:"p-3 rounded-lg",children:[a("p",{className:"text-sm text-foreground",children:e.text}),r("p",{className:"text-xs text-foreground mt-1",children:[e?.author?.name," - ",new Date(e.timestamp||"").toLocaleString()]})]},e.id))})}),r("div",{className:"flex mt-2",children:[a(d,{value:C,onChange:e=>D(e.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),r(m,{onClick:J,className:"ml-2",children:[a(q,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),r("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(t.updatedAt||"").toLocaleString()]})]})]})]})})}export{ie as a};
1
+ import{a as u,c as g,d as p,g as v,i as b}from"./chunk-YFAZQYK4.mjs";import{a as B}from"./chunk-INCYANPB.mjs";import{a as F}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as S}from"./chunk-FT3AE7L2.mjs";import{a as w,f as P,g as L,i as A}from"./chunk-3UMMMQEH.mjs";import{a as d}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{b as I}from"./chunk-CSBGSBEU.mjs";import{useState as x,useEffect as M}from"react";import{UserIcon as Q,CalendarIcon as $,SaveIcon as j,PlusIcon as q}from"lucide-react";import{jsx as a,jsxs as r}from"react/jsx-runtime";function ie({deal:c,users:f,customer:T,categories:U,onClose:E,onSave:O,onAddComment:V}){let[t,h]=x({...c,value:c.value||0,comments:c.comments||[],customer:c.customer||{}}),[C,D]=x(""),[H,y]=x(!1),[i,s]=x(null);M(()=>{y(JSON.stringify(c)!==JSON.stringify(t))},[c,t]);let R=async()=>{try{let e=await O(t);e.success?(y(!1),s(null)):console.error("Failed to save deal:",e.errors)}catch(e){console.error("Failed to save deal:",e)}},n=(e,o)=>{h(N=>({...N,[e]:o}))},G=e=>{let o=(t.categories||[]).includes(e)?(t.categories||[]).filter(N=>N!==e):[...t.categories||[],e];n("categories",o)},J=async()=>{if(C.trim()){let e={text:C,timestamp:new Date().toISOString()};try{let o=await V(e);if(!o.success){console.error("Failed to add comment:",o.errors);return}}catch(o){console.error("Failed to add comment:",o)}h(o=>({...o,comments:[...o.comments||[],e]})),D("")}},k=e=>{switch(e){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},W=e=>f?.find(o=>o.id===Number(e));return a(w,{open:!0,children:r(P,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[r(L,{className:"flex flex-row items-center justify-between",children:[a(A,{className:"text-2xl font-bold",children:T?.name||"no customer"}),r("div",{className:"flex space-x-2",children:[a(m,{variant:"outline",onClick:E,children:"Close"}),r(m,{onClick:R,disabled:!H,children:[a(j,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),r(S,{className:"flex-grow pr-4",children:[r("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[a("div",{className:"grid gap-2 m-1",children:i==="value"?a(d,{type:"number",value:t.value,onChange:e=>n("value",Number(e.target.value)),onBlur:()=>s(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):r("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("value"),children:["\xA3",t.value?.toLocaleString()]})}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Assignee"}),i==="assignee"?r(u,{value:t?.assignee?.id?.toString()||"",onValueChange:e=>n("assignee",W(e)),children:[a(p,{children:a(g,{placeholder:"Select assignee"})}),a(v,{children:f&&f.map(e=>a(b,{value:e?.id?.toString()||"",children:e.name},e.id))})]}):r("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("assignee"),children:[a(Q,{className:"w-4 h-4 text-gray-400"}),a("span",{children:t?.assignee?.name})]})]}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Closure Date"}),i==="closureDate"?a(d,{type:"date",value:t.closureDate?.split("T")[0]??"",onChange:e=>n("closureDate",e.target.value),onBlur:()=>s(null),className:"mr-2",autoFocus:!0}):r("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("closureDate"),children:[a($,{className:"w-4 h-4 text-gray-400"}),a("span",{children:t.closureDate?new Date(t.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),a("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Description"}),i==="description"?a(F,{value:t.description||"",onChange:e=>n("description",e.target.value),onBlur:()=>s(null),className:"min-h-[100px]",autoFocus:!0}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>s("description"),children:t.description})]})}),r("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Status"}),i==="status"?r(u,{value:t.status,onValueChange:e=>{n("status",e),s(null)},children:[a(p,{children:a(g,{placeholder:"Select status"})}),a(v,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(e=>a(b,{value:e,children:e},e))})]}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("status"),children:t.status})]}),r("div",{className:"grid col-span-2 gap-2",children:[a(l,{className:"text-sm font-medium text-accent",children:"Categories"}),i==="categories"?a("div",{className:"grid grid-cols-2 gap-2 m-1",children:U.map(e=>r("div",{className:"flex items-center space-x-2",children:[a(B,{id:e.id?.toString()||"",checked:(t.categories||[]).some(o=>o.id===e.id),onCheckedChange:()=>e.id!==void 0&&G(e)}),a("label",{htmlFor:(e.id??"").toString(),className:`text-sm font-medium ${k(e.type||"sector")} px-2 py-1 rounded`,children:e.name})]},e.id))}):a("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("categories"),children:t.categories&&t.categories.map(e=>{let o=e;return o?a(I,{variant:"outline",className:k(o.type||"sector"),children:o.name},o.id):null})})]}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"COGE Status"}),i==="gecoStatus"?r(u,{value:t.gecoStatus??void 0,onValueChange:e=>{n("gecoStatus",e),s(null)},children:[a(p,{children:a(g,{placeholder:"Select status"})}),a(v,{children:["firm","forecast","other"].map(e=>a(b,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("gecoStatus"),children:t.gecoStatus?t.gecoStatus.charAt(0).toUpperCase()+t.gecoStatus.slice(1):"N/A"})]})]}),r("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[r("div",{className:"grid gap-2",children:[a(l,{className:"text-sm font-medium text-accent",children:"Comments"}),a(S,{className:"h-[200px] overflow-y-auto",children:a("div",{className:"space-y-2",children:t.comments&&t.comments.slice().sort((e,o)=>new Date(o.timestamp||"").getTime()-new Date(e.timestamp||"").getTime()).map(e=>r("div",{className:"p-3 rounded-lg",children:[a("p",{className:"text-sm text-foreground",children:e.text}),r("p",{className:"text-xs text-foreground mt-1",children:[e?.author?.name," - ",new Date(e.timestamp||"").toLocaleString()]})]},e.id))})}),r("div",{className:"flex mt-2",children:[a(d,{value:C,onChange:e=>D(e.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),r(m,{onClick:J,className:"ml-2",children:[a(q,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),r("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(t.updatedAt||"").toLocaleString()]})]})]})]})})}export{ie as a};
@@ -1 +1 @@
1
- import{f as r}from"./chunk-4ITG3T35.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{jsx as t,jsxs as c}from"react/jsx-runtime";function f({subtitle:s,title:o,description:e,alignment:a="start",hasBottomSpacing:i=!1,className:m,invert:l=!1}){let p=n(a==="start"&&"text-left",a==="center"&&"text-center",a==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":i},"prose",m);return c("div",{className:p,children:[s&&t("span",{className:"mb-[.625rem] block font-semibold uppercase text-accent md:text-md",children:s}),t("h2",{className:n("text-primary mt-0"),children:o}),typeof e=="string"?e&&t("p",{className:"mt-5 whitespace-pre-line text-foreground",children:e}):e&&t(r,{content:e,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}export{f as a};
1
+ import{f as r}from"./chunk-N3B3XNV3.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{jsx as t,jsxs as c}from"react/jsx-runtime";function f({subtitle:s,title:o,description:e,alignment:a="start",hasBottomSpacing:i=!1,className:m,invert:l=!1}){let p=n(a==="start"&&"text-left",a==="center"&&"text-center",a==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":i},"prose",m);return c("div",{className:p,children:[s&&t("span",{className:"mb-[.625rem] block font-semibold uppercase text-accent md:text-md",children:s}),t("h2",{className:n("text-primary mt-0"),children:o}),typeof e=="string"?e&&t("p",{className:"mt-5 whitespace-pre-line text-foreground",children:e}):e&&t(r,{content:e,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}export{f as a};
@@ -0,0 +1 @@
1
+ import{a as S}from"./chunk-6ZMZX5TB.mjs";import{a as k,b as D,c as E,d as B}from"./chunk-YRDJBAYA.mjs";import{a as z,b as R}from"./chunk-TIAA3ZN3.mjs";import{d as f}from"./chunk-Q2DPE66H.mjs";import{a as M}from"./chunk-L5JPAKPM.mjs";import{b as n}from"./chunk-ZUA4KNIR.mjs";import{useRef as p,useEffect as F,useState as T}from"react";import{Send as X,Menu as Y,Paperclip as Z,X as _,FileText as j,Image as ee,File as te,MessageSquareIcon as ae}from"lucide-react";import{jsx as t,jsxs as o}from"react/jsx-runtime";function be({messages:i,input:g,isTyping:v=!1,currentSessionTitle:A,capabilities:h,fileUploads:c,isDragOver:se,enableFileUpload:C,onInputChange:H,addToolResult:O,onSendMessage:L,onKeyPress:$,onFileUpload:x,onRemoveFile:P,onDragOver:m,className:K,status:U="ready"}){let b=p(null),ne=p(null),N=p(null),[l,u]=T(!1),[d,oe]=T({path:[],selectedItems:[],filters:{}});F(()=>{b.current?.scrollIntoView({behavior:"smooth"})},[i]),F(()=>{l&&setTimeout(()=>{b.current?.scrollIntoView({behavior:"smooth"})},100)},[l]);let y=()=>f(d),w=()=>{let e=[];return h.forEach(a=>{a.actions&&a.actions.forEach(s=>{e.push({label:s.label,action:()=>I(s.id,{path:[a],selectedItems:[],filters:{}})})}),a.children&&a.children.forEach(s=>{s.type==="list"&&s.data&&e.push({label:`View ${s.name}`,action:()=>u(!0)})})}),e.slice(0,5)},I=(e,a)=>{console.log("Capability action:",e,a);let s=`Executing ${e} with context: ${JSON.stringify(a.path.map(r=>r.name))}`;u(!1)},V=f({path:[],selectedItems:[],filters:{}}),J=e=>{x(e.target.files),e.target.files&&(e.target.value="")},ie=e=>{e.preventDefault(),m(!0)},le=e=>{e.preventDefault(),m(!1)},re=e=>{e.preventDefault(),m(!1),x(e.dataTransfer.files)},Q=e=>{if(e===0)return"0 Bytes";let a=1024,s=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,r)).toFixed(2))+" "+s[r]},W=e=>e.startsWith("image/")?t(ee,{className:"h-4 w-4"}):e.startsWith("text/")?t(j,{className:"h-4 w-4"}):t(te,{className:"h-4 w-4"}),q={messages:i,currentSessionTitle:A,capabilities:h,currentCapabilityContext:d,contextualActions:V,getQuickSuggestions:w().map(e=>e.label)},G=()=>{navigator.clipboard.writeText(JSON.stringify(q,null,2)),alert("Debug info copied to clipboard")};return o("div",{className:`h-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${K||""}`,children:[o(k,{className:"relative flex-1 h-full size-full",children:[t(D,{children:i.length===0?t(E,{description:"Messages will appear here as the conversation progresses.",icon:t(ae,{className:"size-6"}),title:"Start a conversation"}):i.map((e,a)=>t(z,{from:e.role,children:t(R,{children:S({message:e,addToolResult:O??(()=>{}),status:U,messages:i})})},a))}),t(B,{})]}),c.length>0&&t("div",{className:"p-4 border-t bg-muted/10",children:t("div",{className:"flex flex-wrap gap-2",children:c.map(e=>o("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[W(e.file.type),t("span",{className:"text-sm font-medium",children:e.file.name}),t("span",{className:"text-xs text-muted-foreground",children:Q(e.file.size)}),t(n,{variant:"ghost",size:"sm",onClick:()=>P(e.id),className:"h-6 w-6 p-0",children:t(_,{className:"h-4 w-4"})})]},e.id))})}),o("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[o("div",{className:"flex gap-3",children:[t(M,{value:g,onChange:e=>H(e.target.value),onKeyPress:$,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:v}),C&&t(n,{variant:"outline",size:"icon",onClick:()=>N.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:t(Z,{className:"h-4 w-4"})}),t(n,{onClick:L,disabled:!g.trim()&&c.length===0||v,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:t(X,{className:"h-4 w-4"})})]}),o("div",{className:"flex items-center gap-3 mt-3",children:[o(n,{onClick:()=>u(!l),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[t(Y,{className:"h-3 w-3 mr-1"}),l?"Hide":"Show"," Capabilities"]}),o("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[y().map((e,a)=>t(n,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>I(e.id,d),children:e.label},`context-${e.id}`)),y().length===0&&w().map((e,a)=>t(n,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:e.action,children:e.label},`suggestion-${a}`)),t(n,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:G,children:"Debug"})]})]}),C&&t("input",{ref:N,type:"file",multiple:!0,onChange:J,className:"hidden"})]})]})}export{be as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as C}from"./chunk-JDIPWJBD.mjs";import{a as D}from"./chunk-XMYXQR5W.mjs";import{a as w,c as y,e as k}from"./chunk-3UMMMQEH.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import{a as N}from"./chunk-MDJREBVI.mjs";import{motion as R}from"motion/react";import{File as T,FileText as K,Edit3 as A,Type as G,ChevronDown as L,ChevronRight as Z,Info as P,Loader2 as H}from"lucide-react";import{startTransition as M,useEffect as Q,useMemo as V,useRef as W,useState as c}from"react";import*as E from"@radix-ui/react-dialog";import Y from"react-markdown";import _ from"remark-gfm";import{Fragment as ae,jsx as e,jsxs as o}from"react/jsx-runtime";var S=s=>e(Y,{remarkPlugins:[_],components:{h1:({children:t})=>e("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>e("h2",{className:"text-xl font-bold",children:t}),h3:({children:t})=>e("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>e("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>e("ol",{className:"list-decimal",children:t}),ul:({children:t})=>e("ul",{className:"list-disc",children:t}),li:({children:t})=>e("li",{className:"ml-4",children:t}),p:({children:t})=>e("p",{className:"mb-4",children:t}),a:({children:t,href:i})=>e("a",{href:i,className:"text-blue-500",children:t}),img:({src:t,alt:i})=>e("img",{src:t,alt:i,className:"mb-4"}),blockquote:({children:t})=>e("blockquote",{className:"border-l-4 border-gray-300 pl-4 mb-4",children:t})},children:s}),O=s=>e("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:s}),ee=s=>e("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:s&&e(D,{value:JSON.stringify(s),editable:!1,name:"richTextContent"},JSON.stringify(s))}),te=s=>o("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[e("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:o("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[e("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),S(s)]});function pe({document:s,onDocumentUpdate:t,editable:i=!0,mode:g="view",renderers:j,availableDocuments:I=[],knowledgeContexts:B=[]}){let[$,x]=c(!1),[d,q]=c(!1),[a,m]=c(s),[z,p]=c(!1),u=W(null),b=a.format==="richText"?a.richTextContent:a.content,F=V(()=>`${a.format}:${JSON.stringify(b)}`,[a.format,b]);Q(()=>{m(s)},[s]);let re=r=>{switch(r){case"markdown":case"mdx":return e(K,{className:"h-6 w-6 text-primary"});case"richText":return e(T,{className:"h-6 w-6 text-success"});case"text":return e(G,{className:"h-6 w-6 text-muted-foreground"});default:return e(T,{className:"h-6 w-6 text-muted-foreground"})}},J=r=>{switch(r){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},X=(r,n)=>{let l={markdown:S,mdx:te,text:O},h=j?.[n]||l[n];if(n==="richText"&&typeof r=="object")return ee(r);if(h&&typeof r=="string")return h(r);if(typeof r=="string")return O(r)},U=async(r,n="save")=>{n==="save"&&p(!0),u.current=a,M(()=>{m({...r,richTextContent:r.richTextContent?structuredClone(r.richTextContent):void 0})});try{let l=await t?.(r);if(n==="save"&&p(!1),!l)throw new Error("save failed")}catch{u.current&&M(()=>m(u.current))}},v=()=>{x(!1)};return o(ae,{children:[e(w,{open:$||g==="create",onOpenChange:r=>!r&&v(),children:o(y,{children:[e(k,{}),o(E.Content,{className:N("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[z&&e("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center",children:e(H,{className:"h-8 w-8 animate-spin text-primary"})}),e(C,{mode:g==="create"?"create":"edit",document:a,onSave:U,onCancel:v,availableDocuments:I,knowledgeContexts:B})]})]})}),o(R.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[o("div",{className:"border-b border-border bg-card p-8 pb-6",children:[o("div",{className:"flex items-start justify-between gap-4",children:[e("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:o("div",{className:"flex-1 min-w-0",children:[o("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[a.title,e("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${J(a.format)}`,children:a.format.toUpperCase()})]}),a.description&&e("p",{className:"text-muted-foreground text-lg leading-relaxed",children:a.description})]})}),o("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[a.metadata&&Object.keys(a.metadata).length>0&&o(f,{variant:"ghost",size:"sm",onClick:()=>q(!d),className:"gap-2",children:[e(P,{className:"h-4 w-4"}),"Metadata",d?e(L,{className:"h-4 w-4"}):e(Z,{className:"h-4 w-4"})]}),i&&o(f,{variant:"outline",size:"sm",onClick:()=>x(!0),className:"gap-2",children:[e(A,{className:"h-4 w-4"}),"Edit"]})]})]}),a.metadata&&Object.keys(a.metadata).length>0&&e(R.div,{initial:!1,animate:{height:d?"auto":0,opacity:d?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:o("div",{className:"pt-4 border-t border-border mt-4",children:[o("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[e(P,{className:"h-4 w-4"}),"Document Metadata"]}),e("div",{className:"bg-muted rounded-lg p-4 border border-border",children:e("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(a.metadata).map(([r,n])=>o("div",{className:"flex flex-col gap-1",children:[e("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:r.replace(/([A-Z])/g," $1").trim()}),e("span",{className:"text-foreground font-medium",children:String(n)})]},r))})})]})})]}),e("div",{className:"flex-1 ",children:e("div",{className:"py-4 h-full",children:e("div",{className:"space-y-4",children:a.content||a.richTextContent?e("div",{className:"relative",children:e("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:X(a.format==="richText"?a.richTextContent:a.content,a.format)})},F):o("div",{className:"text-center p-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),e("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}export{pe as a};
4
+ import{a as C}from"./chunk-46N4YPMB.mjs";import{a as D}from"./chunk-X3YJJBFJ.mjs";import{a as w,c as y,e as k}from"./chunk-3UMMMQEH.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import{a as N}from"./chunk-MDJREBVI.mjs";import{motion as R}from"motion/react";import{File as T,FileText as K,Edit3 as A,Type as G,ChevronDown as L,ChevronRight as Z,Info as P,Loader2 as H}from"lucide-react";import{startTransition as M,useEffect as Q,useMemo as V,useRef as W,useState as c}from"react";import*as E from"@radix-ui/react-dialog";import Y from"react-markdown";import _ from"remark-gfm";import{Fragment as ae,jsx as e,jsxs as o}from"react/jsx-runtime";var S=s=>e(Y,{remarkPlugins:[_],components:{h1:({children:t})=>e("h1",{className:"text-2xl font-bold",children:t}),h2:({children:t})=>e("h2",{className:"text-xl font-bold",children:t}),h3:({children:t})=>e("h3",{className:"text-lg font-bold",children:t}),h4:({children:t})=>e("h4",{className:"text-base font-bold",children:t}),ol:({children:t})=>e("ol",{className:"list-decimal",children:t}),ul:({children:t})=>e("ul",{className:"list-disc",children:t}),li:({children:t})=>e("li",{className:"ml-4",children:t}),p:({children:t})=>e("p",{className:"mb-4",children:t}),a:({children:t,href:i})=>e("a",{href:i,className:"text-blue-500",children:t}),img:({src:t,alt:i})=>e("img",{src:t,alt:i,className:"mb-4"}),blockquote:({children:t})=>e("blockquote",{className:"border-l-4 border-gray-300 pl-4 mb-4",children:t})},children:s}),O=s=>e("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:s}),ee=s=>e("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:s&&e(D,{value:JSON.stringify(s),editable:!1,name:"richTextContent"},JSON.stringify(s))}),te=s=>o("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[e("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:o("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[e("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),S(s)]});function pe({document:s,onDocumentUpdate:t,editable:i=!0,mode:g="view",renderers:j,availableDocuments:I=[],knowledgeContexts:B=[]}){let[$,x]=c(!1),[d,q]=c(!1),[a,m]=c(s),[z,p]=c(!1),u=W(null),b=a.format==="richText"?a.richTextContent:a.content,F=V(()=>`${a.format}:${JSON.stringify(b)}`,[a.format,b]);Q(()=>{m(s)},[s]);let re=r=>{switch(r){case"markdown":case"mdx":return e(K,{className:"h-6 w-6 text-primary"});case"richText":return e(T,{className:"h-6 w-6 text-success"});case"text":return e(G,{className:"h-6 w-6 text-muted-foreground"});default:return e(T,{className:"h-6 w-6 text-muted-foreground"})}},J=r=>{switch(r){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richText":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},X=(r,n)=>{let l={markdown:S,mdx:te,text:O},h=j?.[n]||l[n];if(n==="richText"&&typeof r=="object")return ee(r);if(h&&typeof r=="string")return h(r);if(typeof r=="string")return O(r)},U=async(r,n="save")=>{n==="save"&&p(!0),u.current=a,M(()=>{m({...r,richTextContent:r.richTextContent?structuredClone(r.richTextContent):void 0})});try{let l=await t?.(r);if(n==="save"&&p(!1),!l)throw new Error("save failed")}catch{u.current&&M(()=>m(u.current))}},v=()=>{x(!1)};return o(ae,{children:[e(w,{open:$||g==="create",onOpenChange:r=>!r&&v(),children:o(y,{children:[e(k,{}),o(E.Content,{className:N("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[z&&e("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center",children:e(H,{className:"h-8 w-8 animate-spin text-primary"})}),e(C,{mode:g==="create"?"create":"edit",document:a,onSave:U,onCancel:v,availableDocuments:I,knowledgeContexts:B})]})]})}),o(R.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[o("div",{className:"border-b border-border bg-card p-8 pb-6",children:[o("div",{className:"flex items-start justify-between gap-4",children:[e("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:o("div",{className:"flex-1 min-w-0",children:[o("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:[a.title,e("span",{className:`inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${J(a.format)}`,children:a.format.toUpperCase()})]}),a.description&&e("p",{className:"text-muted-foreground text-lg leading-relaxed",children:a.description})]})}),o("div",{className:"items-center gap-2 flex-shrink-0 hidden lg:flex",children:[a.metadata&&Object.keys(a.metadata).length>0&&o(f,{variant:"ghost",size:"sm",onClick:()=>q(!d),className:"gap-2",children:[e(P,{className:"h-4 w-4"}),"Metadata",d?e(L,{className:"h-4 w-4"}):e(Z,{className:"h-4 w-4"})]}),i&&o(f,{variant:"outline",size:"sm",onClick:()=>x(!0),className:"gap-2",children:[e(A,{className:"h-4 w-4"}),"Edit"]})]})]}),a.metadata&&Object.keys(a.metadata).length>0&&e(R.div,{initial:!1,animate:{height:d?"auto":0,opacity:d?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:o("div",{className:"pt-4 border-t border-border mt-4",children:[o("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[e(P,{className:"h-4 w-4"}),"Document Metadata"]}),e("div",{className:"bg-muted rounded-lg p-4 border border-border",children:e("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:Object.entries(a.metadata).map(([r,n])=>o("div",{className:"flex flex-col gap-1",children:[e("span",{className:"text-muted-foreground font-medium text-xs uppercase tracking-wide",children:r.replace(/([A-Z])/g," $1").trim()}),e("span",{className:"text-foreground font-medium",children:String(n)})]},r))})})]})})]}),e("div",{className:"flex-1 ",children:e("div",{className:"py-4 h-full",children:e("div",{className:"space-y-4",children:a.content||a.richTextContent?e("div",{className:"relative",children:e("div",{className:"bg-background px-8 overflow-hidden h-full flex-1",children:X(a.format==="richText"?a.richTextContent:a.content,a.format)})},F):o("div",{className:"text-center p-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),e("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})})})]})]})}export{pe as a};
@@ -1 +1 @@
1
- import{a as l}from"./chunk-GRNOF6LY.mjs";import{a as o}from"./chunk-SRUG246N.mjs";import{a as r}from"./chunk-KML6U7IE.mjs";import p from"next/image";import{FaEnvelope as c,FaPhoneFlip as d}from"react-icons/fa6";import{jsx as e,jsxs as t}from"react/jsx-runtime";function f(s){let{sectionHeading:i,image:a}=s;return e("div",{className:"relative w-full light py-[60px]",children:t("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[e("div",{className:"relative h-full w-full",children:e(p,{src:a.src,alt:a.alt,fill:!0,objectFit:"contain",sizes:"(min-width: 768px) 30vw, 50vw",placeholder:"blur",blurDataURL:r})}),e("div",{className:"w-full h-full",children:t("div",{className:"bg-white p-10",children:[e("div",{className:"mb-30px",children:e(l,{...i,invert:!0})}),e(o,{})]})})]})})}function y(s){return e("div",{className:"",children:e("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:e("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:t("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[t("div",{children:[e("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),e("p",{className:"mt-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),e("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:s.locations&&s.locations.map((i,a)=>t("div",{className:"rounded-2xl p-10 border",children:[e("h3",{className:"text-base/7 text-primary",children:i.title}),t("address",{className:"mt-3 space-y-1 text-sm/6 not-italic text-foreground",children:[i.location.split(",")?.map((m,n)=>e("p",{children:m},n))," ",i.mails&&t("p",{className:"flex items-center space-x-2",children:[e(c,{className:"pr-2 text-primary size-auto"}),e("span",{children:i.mails[0]})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&t("p",{className:"flex items-center space-x-2",children:[e(d,{className:"pr-2 text-primary size-auto"}),i.phoneNumbers[0]]})]})]},a))})]})})})})}export{f as a,y as b};
1
+ import{a as l}from"./chunk-M7NV6EFH.mjs";import{a as r}from"./chunk-KML6U7IE.mjs";import{a as o}from"./chunk-SRUG246N.mjs";import p from"next/image";import{FaEnvelope as c,FaPhoneFlip as d}from"react-icons/fa6";import{jsx as e,jsxs as t}from"react/jsx-runtime";function f(s){let{sectionHeading:i,image:a}=s;return e("div",{className:"relative w-full light py-[60px]",children:t("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[e("div",{className:"relative h-full w-full",children:e(p,{src:a.src,alt:a.alt,fill:!0,objectFit:"contain",sizes:"(min-width: 768px) 30vw, 50vw",placeholder:"blur",blurDataURL:r})}),e("div",{className:"w-full h-full",children:t("div",{className:"bg-white p-10",children:[e("div",{className:"mb-30px",children:e(l,{...i,invert:!0})}),e(o,{})]})})]})})}function y(s){return e("div",{className:"",children:e("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:e("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:t("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[t("div",{children:[e("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),e("p",{className:"mt-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),e("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:s.locations&&s.locations.map((i,a)=>t("div",{className:"rounded-2xl p-10 border",children:[e("h3",{className:"text-base/7 text-primary",children:i.title}),t("address",{className:"mt-3 space-y-1 text-sm/6 not-italic text-foreground",children:[i.location.split(",")?.map((m,n)=>e("p",{children:m},n))," ",i.mails&&t("p",{className:"flex items-center space-x-2",children:[e(c,{className:"pr-2 text-primary size-auto"}),e("span",{children:i.mails[0]})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&t("p",{className:"flex items-center space-x-2",children:[e(d,{className:"pr-2 text-primary size-auto"}),i.phoneNumbers[0]]})]})]},a))})]})})})})}export{f as a,y as b};